diff options
539 files changed, 11083 insertions, 10912 deletions
diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx index c2526cbec18d..1ade2b6289f5 100644 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx @@ -48,8 +48,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/AccessibleGridControlBase.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx index c6a26d8c4548..c6a26d8c4548 100755..100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx index 90306435bd4b..90306435bd4b 100755..100644 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx +++ b/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx diff --git a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx index 245645dfebf0..ccea420a1cff 100644 --- a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx +++ b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx @@ -128,7 +128,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 d4b3be6c5bf3..be6cffc22e8b 100644 --- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx +++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx @@ -624,7 +624,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 f5320c2fd20f..0df5bd0fd1b4 100644 --- a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx +++ b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx @@ -41,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 e0a1fed7f8e8..b1edb36893f0 100644 --- a/accessibility/inc/accessibility/helper/listboxhelper.hxx +++ b/accessibility/inc/accessibility/helper/listboxhelper.hxx @@ -54,7 +54,7 @@ public: m_aComboListBox( _pListBox ){} // ----------------------------------------------------------------------------- - virtual String GetEntry( USHORT nPos ) const + virtual String GetEntry( sal_uInt16 nPos ) const { return m_aComboListBox.GetEntry( nPos ); } @@ -67,7 +67,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 ) ) @@ -89,24 +89,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); } @@ -116,22 +116,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(); } @@ -141,12 +141,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(); } @@ -156,12 +156,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(); } @@ -179,7 +179,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 dfebec17b4e9..f90cb286b4c4 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx @@ -156,7 +156,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; @@ -215,8 +215,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 index 9a266d78bb05..829a4337e878 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx @@ -95,15 +95,15 @@ protected: private: sal_Int32 m_nLastTopEntry; - USHORT m_nLastSelectedPos; + sal_uInt16 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, + sal_Bool checkEntrySelected(ListBox* _pListBox, + sal_uInt16 _nPos, ::com::sun::star::uno::Any& _rNewValue, ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxNewAcc); }; diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx index 4e2073a47a89..2869e240227d 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx @@ -65,7 +65,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/source/extended/AccessibleBrowseBoxHeaderBar.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx index e801a6cf2c20..43d016b86588 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx @@ -356,12 +356,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 9e9f63ec72c8..44d547f8fd5b 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx @@ -130,7 +130,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; @@ -140,20 +140,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 00a095a104d7..1ac635ec6230 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx @@ -239,7 +239,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 fe79593e5613..a7392ff46e4a 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx @@ -65,7 +65,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/accessiblebrowseboxcell.cxx b/accessibility/source/extended/accessiblebrowseboxcell.cxx index 1c7aca77e603..87e47d83c600 100644 --- a/accessibility/source/extended/accessiblebrowseboxcell.cxx +++ b/accessibility/source/extended/accessiblebrowseboxcell.cxx @@ -76,13 +76,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 397161fd6ac0..3a98169c620a 100644 --- a/accessibility/source/extended/accessibleiconchoicectrl.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx @@ -90,7 +90,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 19e809bcc6ea..e910b503ad1c 100644 --- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx @@ -87,7 +87,7 @@ namespace accessibility // Ctor() and Dtor() // ----------------------------------------------------------------------------- AccessibleIconChoiceCtrlEntry::AccessibleIconChoiceCtrlEntry( SvtIconChoiceCtrl& _rIconCtrl, - ULONG _nPos, + sal_uLong _nPos, const Reference< XAccessible >& _xParent ) : AccessibleIconChoiceCtrlEntry_BASE ( m_aMutex ), @@ -527,7 +527,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; @@ -548,7 +548,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 0468cce97d94..b95643670985 100644 --- a/accessibility/source/extended/accessiblelistbox.cxx +++ b/accessibility/source/extended/accessiblelistbox.cxx @@ -306,7 +306,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) @@ -334,7 +334,7 @@ namespace accessibility { SvLBoxEntry* pEntry = getListBox()->GetEntry( i ); if ( getListBox()->IsSelected( pEntry ) ) - getListBox()->Select( pEntry, FALSE ); + getListBox()->Select( pEntry, sal_False ); } } // ----------------------------------------------------------------------------- @@ -350,7 +350,7 @@ namespace accessibility { SvLBoxEntry* pEntry = getListBox()->GetEntry( i ); if ( !getListBox()->IsSelected( pEntry ) ) - getListBox()->Select( pEntry, TRUE ); + getListBox()->Select( pEntry, sal_True ); } } // ----------------------------------------------------------------------------- @@ -410,7 +410,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 5ce10cbc81b3..939e99b10fbb 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -618,7 +618,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; } @@ -725,7 +725,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) @@ -759,7 +759,7 @@ namespace accessibility { SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, i ); if ( getListBox()->IsSelected( pEntry ) ) - getListBox()->Select( pEntry, FALSE ); + getListBox()->Select( pEntry, sal_False ); } } // ----------------------------------------------------------------------------- @@ -779,7 +779,7 @@ namespace accessibility { SvLBoxEntry* pEntry = getListBox()->GetEntry( pParent, i ); if ( !getListBox()->IsSelected( pEntry ) ) - getListBox()->Select( pEntry, TRUE ); + getListBox()->Select( pEntry, sal_True ); } } // ----------------------------------------------------------------------------- @@ -851,7 +851,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 fc1fb578bd21..34fd7ef88d1f 100644 --- a/accessibility/source/extended/accessibletabbar.cxx +++ b/accessibility/source/extended/accessibletabbar.cxx @@ -272,7 +272,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(); } @@ -318,7 +318,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 51c86003b0c2..a8fce05dcff0 100644 --- a/accessibility/source/extended/accessibletabbarpagelist.cxx +++ b/accessibility/source/extended/accessibletabbarpagelist.cxx @@ -488,7 +488,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 ); @@ -715,7 +715,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(); @@ -732,7 +732,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 59408a31fe84..a87ba9586098 100644 --- a/accessibility/source/extended/accessibletablistboxtable.cxx +++ b/accessibility/source/extended/accessibletablistboxtable.cxx @@ -92,7 +92,7 @@ namespace accessibility { if ( isAlive() ) { - ULONG nEventId = rVclWindowEvent.GetId(); + sal_uLong nEventId = rVclWindowEvent.GetId(); switch ( nEventId ) { case VCLEVENT_OBJECT_DYING : @@ -127,7 +127,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; @@ -167,7 +167,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 ) ) { @@ -192,7 +192,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 8af1b240343e..5b669033fcfd 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -898,7 +898,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 } @@ -922,7 +922,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) @@ -954,7 +954,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) @@ -969,17 +969,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 @@ -1006,7 +1006,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)))); @@ -1023,7 +1023,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( @@ -1098,8 +1098,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 @@ -1155,7 +1155,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( @@ -1176,7 +1176,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); @@ -1191,7 +1191,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()) @@ -1201,8 +1201,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) } } @@ -1213,7 +1213,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()) @@ -1223,8 +1223,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(); } @@ -1237,7 +1237,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()) @@ -1256,15 +1256,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) } } @@ -1275,7 +1275,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()) @@ -1285,8 +1285,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) } } @@ -1302,7 +1302,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( @@ -1312,8 +1312,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 ) ); @@ -1344,7 +1344,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( @@ -1354,7 +1354,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 ) ); @@ -1675,11 +1675,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 @@ -1783,7 +1783,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) { @@ -1809,7 +1809,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"); @@ -1861,7 +1861,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); @@ -1976,7 +1976,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"); @@ -2077,10 +2077,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 cb1f425b08cf..5ebb06dc9db1 100644 --- a/accessibility/source/standard/accessiblemenubasecomponent.cxx +++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx @@ -353,13 +353,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 ); @@ -524,7 +524,7 @@ void OAccessibleMenuBaseComponent::SelectChild( sal_Int32 i ) // highlight the child if ( m_pMenu ) - m_pMenu->HighlightItem( (USHORT)i ); + m_pMenu->HighlightItem( (sal_uInt16)i ); } // ----------------------------------------------------------------------------- @@ -541,7 +541,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 6bc7f59b75d9..9ac93cedd299 100644 --- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx +++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx @@ -157,7 +157,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/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx index 690babdf5c41..e133579922b3 100644 --- a/accessibility/source/standard/vclxaccessiblebutton.cxx +++ b/accessibility/source/standard/vclxaccessiblebutton.cxx @@ -292,7 +292,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 07378c0ea42f..b806e308bc28 100644 --- a/accessibility/source/standard/vclxaccessibleedit.cxx +++ b/accessibility/source/standard/vclxaccessibleedit.cxx @@ -158,7 +158,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 6d287a02f0e9..03fde2b0dc28 100644 --- a/accessibility/source/standard/vclxaccessiblelist.cxx +++ b/accessibility/source/standard/vclxaccessiblelist.cxx @@ -94,7 +94,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); } // ----------------------------------------------------------------------------- @@ -181,10 +181,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 ); } @@ -245,7 +245,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 ) @@ -275,7 +275,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; @@ -304,7 +304,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); @@ -333,15 +333,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 ) ); @@ -362,7 +362,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); @@ -419,7 +419,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 { @@ -491,8 +491,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 ) ) { @@ -535,7 +535,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; @@ -558,7 +558,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; @@ -575,10 +575,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); @@ -592,7 +592,7 @@ BOOL VCLXAccessibleList::checkEntrySelected(USHORT _nPos,Any& _rNewValue,Referen } // ----------------------------------------------------------------------------- -void VCLXAccessibleList::UpdateSelection_Impl(USHORT) +void VCLXAccessibleList::UpdateSelection_Impl(sal_uInt16) { uno::Any aOldValue, aNewValue; @@ -603,7 +603,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) { @@ -612,7 +612,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() ) { @@ -629,7 +629,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 ) @@ -668,7 +668,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(); @@ -691,7 +691,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; } @@ -725,9 +725,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(); @@ -759,7 +759,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; @@ -777,7 +777,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 56bcf14f1980..66a819bdf036 100644 --- a/accessibility/source/standard/vclxaccessiblelistitem.cxx +++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx @@ -90,7 +90,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() @@ -356,7 +356,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 ) ); } @@ -375,7 +375,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; } @@ -388,7 +388,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 ); @@ -402,7 +402,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(); } @@ -416,7 +416,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 ); } @@ -477,7 +477,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 ); } @@ -501,12 +501,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 825e5990e783..a3e2f8cd6ae4 100644 --- a/accessibility/source/standard/vclxaccessiblemenubar.cxx +++ b/accessibility/source/standard/vclxaccessiblemenubar.cxx @@ -172,7 +172,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 5dd35a699b27..1e1d7b0ef640 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbar.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbar.cxx @@ -331,7 +331,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 ac6aca77dda0..e23580b05280 100644 --- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx +++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx @@ -288,7 +288,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 ); @@ -391,7 +391,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 ); @@ -433,7 +433,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 ) ); } // ----------------------------------------------------------------------------- @@ -446,7 +446,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 ce796af77ab4..a11e1d52c7e3 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 7580d1a3ae2c..d4ad29a27bef 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -86,11 +86,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 : @@ -244,7 +244,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; } @@ -697,7 +697,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 72a362e5e052..2e035ba91bfa 100644 --- a/automation/inc/automation/commtypes.hxx +++ b/automation/inc/automation/commtypes.hxx @@ -54,42 +54,17 @@ typedef sal_Unicode comm_UniChar; #include "rtl/string.hxx" -// 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 - //#define DBG_ASSERT( cond, text ) //#define DBG_ERROR( text ) #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; diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx index c1ed42a66b48..1590bb9f58fb 100644 --- a/automation/inc/automation/communi.hxx +++ b/automation/inc/automation/communi.hxx @@ -44,14 +44,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(); // Hält alle CommunicationLinks an + 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 ); @@ -61,19 +61,19 @@ protected: /// allerdings schon ein StopCommunication gekriegt haben, bzw ein ConnectionTerminated virtual void DestroyingLink( CommunicationLink *pCL ); // Link trägt sich im Destruktor aus - 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 vos::OThread @@ -82,14 +82,14 @@ public: CommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *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;} @@ -98,17 +98,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; vos::OMutex aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist vos::OMutex 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; }; @@ -118,15 +118,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; @@ -136,7 +136,7 @@ private: class CommunicationManagerServerAcceptThread: public vos::OThread { 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; } @@ -146,9 +146,9 @@ protected: private: CommunicationManagerServerViaSocket* pMyServer; vos::OAcceptorSocket *pAcceptorSocket; - ULONG nPortToListen; - USHORT nMaxConnections; - ULONG nAddConnectionEventId; + sal_uLong nPortToListen; + sal_uInt16 nMaxConnections; + sal_uLong nAddConnectionEventId; vos::OMutex aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist void CallInfoMsg( InfoString aMsg ){ pMyServer->CallInfoMsg( aMsg ); } CM_InfoType GetInfoType(){ return pMyServer->GetInfoType(); } @@ -163,16 +163,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, vos::OConnectorSocket *pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); } }; diff --git a/automation/inc/automation/simplecm.hxx b/automation/inc/automation/simplecm.hxx index 8f65e31b3471..657357431f9f 100644 --- a/automation/inc/automation/simplecm.hxx +++ b/automation/inc/automation/simplecm.hxx @@ -39,11 +39,11 @@ // 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 ) @@ -143,8 +143,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 @@ -159,27 +159,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; } + sal_uInt16 GetProtocol(){ return nServiceProtocol; } // 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; } + void FinishCallback(){ bIsInsideCallback = sal_False; } /// Syncrones Empfangen der Daten. Nur für Kommandozeile, sonst leer implementiert - virtual BOOL ReceiveDataStream(){ return FALSE; } + 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 ); @@ -192,23 +192,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; + 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: @@ -217,8 +217,8 @@ private: #if OSL_DEBUG_LEVEL > 1 public: // misc (debuging) purposes - BOOL bFlag; - ULONG nSomething; + sal_Bool bFlag; + sal_uLong nSomething; #endif }; @@ -231,23 +231,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; } @@ -260,8 +260,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: @@ -280,7 +280,7 @@ protected: 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 @@ -292,18 +292,18 @@ 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 ); @@ -317,15 +317,15 @@ 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 ); @@ -347,10 +347,10 @@ protected: void SetStreamSocket( vos::OStreamSocket* 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); void SetFinalRecieveTimeout(); - BOOL bIsRequestShutdownPending; + sal_Bool bIsRequestShutdownPending; virtual void WaitForShutdown()=0; void SetNewPacketAsCurrent(); }; @@ -360,16 +360,16 @@ class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommun public: SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, vos::OStreamSocket *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, vos::OConnectorSocket *pCS )=0; }; @@ -379,13 +379,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, vos::OConnectorSocket *pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); } }; diff --git a/automation/source/app/testbasi.cxx b/automation/source/app/testbasi.cxx index 292cd70b34a4..c2efb51589a4 100644 --- a/automation/source/app/testbasi.cxx +++ b/automation/source/app/testbasi.cxx @@ -58,7 +58,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; @@ -67,7 +67,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; @@ -102,7 +102,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 ); } @@ -117,7 +117,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(); @@ -125,7 +125,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 ); } @@ -155,7 +155,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 882b697f1cf3..e649dab0950b 100644 --- a/automation/source/app/testbasi.hxx +++ b/automation/source/app/testbasi.hxx @@ -44,7 +44,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 @@ -53,10 +53,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 4cc944ed9702..36f79bb4fa55 100644 --- a/automation/source/communi/communi.cxx +++ b/automation/source/communi/communi.cxx @@ -51,10 +51,10 @@ #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++ ) \ + for( sal_uInt16 n=nP; n < nP + nL; n++ ) \ DBG_ERROR("Das Element der Liste wurde nicht gelöscht"); \ SvPtrarr::Remove( nP, nL ); \ } \ @@ -72,8 +72,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 ) @@ -87,7 +87,7 @@ CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pM CommunicationLinkViaSocket::~CommunicationLinkViaSocket() { - bDestroying = TRUE; + bDestroying = sal_True; StopCommunication(); while ( nConnectionClosedEventId || nDataReceivedEventId ) GetpApp()->Yield(); @@ -116,7 +116,7 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket() } } -BOOL CommunicationLinkViaSocket::ShutdownCommunication() +sal_Bool CommunicationLinkViaSocket::ShutdownCommunication() { if ( isRunning() ) { @@ -144,10 +144,10 @@ BOOL CommunicationLinkViaSocket::ShutdownCommunication() join(); } - return TRUE; + return sal_True; } -BOOL CommunicationLinkViaSocket::StopCommunication() +sal_Bool CommunicationLinkViaSocket::StopCommunication() { if ( !bShutdownStarted ) { @@ -156,7 +156,7 @@ BOOL CommunicationLinkViaSocket::StopCommunication() else { WaitForShutdown(); - return TRUE; + return sal_True; } } @@ -176,7 +176,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 ) { @@ -190,14 +190,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() ) @@ -226,10 +226,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 ); } @@ -263,9 +263,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; @@ -280,8 +280,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(); @@ -298,7 +298,7 @@ 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(); + sal_uInt16 i = ActiveLinks->Count(); while ( i-- ) { CommunicationLinkRef rTempLink = ActiveLinks->GetObject( i ); @@ -321,12 +321,12 @@ 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(); + sal_uInt16 i = ActiveLinks->Count(); int nFail = 0; while ( i ) { @@ -338,20 +338,20 @@ BOOL MultiCommunicationManager::StopCommunication() 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 ); } @@ -371,7 +371,7 @@ void MultiCommunicationManager::CallConnectionClosed( CommunicationLink* pCL ) CommunicationManager::CallConnectionClosed( pCL ); - USHORT nPos; + sal_uInt16 nPos; if ( ActiveLinks->Seek_Entry( pCL, &nPos ) ) { InactiveLinks->C40_PTR_INSERT(CommunicationLink, pCL); // Ohne Reference @@ -382,13 +382,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(); @@ -396,7 +396,7 @@ void MultiCommunicationManager::DestroyingLink( CommunicationLink *pCL ) -CommunicationManagerClient::CommunicationManagerClient( BOOL bUseMultiChannel ) +CommunicationManagerClient::CommunicationManagerClient( sal_Bool bUseMultiChannel ) : MultiCommunicationManager( bUseMultiChannel ) { ByteString aApplication("Something inside "); @@ -406,7 +406,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 ) @@ -419,15 +419,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; @@ -444,7 +444,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 ) @@ -575,14 +575,14 @@ IMPL_LINK( CommunicationManagerServerAcceptThread, AddConnection, void*, EMPTYAR } -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/testapp.hxx b/automation/source/inc/testapp.hxx index 8393019d1605..bf4d35626102 100644 --- a/automation/source/inc/testapp.hxx +++ b/automation/source/inc/testapp.hxx @@ -54,10 +54,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; @@ -68,7 +68,7 @@ SV_DECL_PTRARR_DEL(CErrors, ErrorEntry*, 1, 1) struct ControlDefLoad { const char* Kurzname; - ULONG nUId; + sal_uLong nUId; }; class TestToolObj: public SbxObject @@ -80,24 +80,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; } @@ -119,25 +119,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 + 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 @@ -151,31 +151,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. @@ -183,7 +183,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 33c9e225b684..9454f57f05f7 100644 --- a/automation/source/inc/testtool.hxx +++ b/automation/source/inc/testtool.hxx @@ -46,9 +46,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 @@ -56,7 +56,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 f00917e6d2e5..67476c09bf6a 100644 --- a/automation/source/miniapp/editwin.cxx +++ b/automation/source/miniapp/editwin.cxx @@ -35,13 +35,13 @@ #endif -BOOL GHEditWindow::Close() +sal_Bool GHEditWindow::Close() { if (aInhalt.IsModified()) { } delete(this); - return TRUE; + return sal_True; } void GHEditWindow::Resize() @@ -65,7 +65,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(); @@ -111,11 +111,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 8fbf04227382..9547695fcc9d 100644 --- a/automation/source/miniapp/editwin.hxx +++ b/automation/source/miniapp/editwin.hxx @@ -40,7 +40,7 @@ protected: MultiLineEdit aInhalt; - virtual BOOL Close(); // derived + virtual sal_Bool Close(); // derived void Resize(); public: @@ -49,7 +49,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); }; @@ -58,7 +58,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 a708e026a2a6..f01d5d8c79b1 100644 --- a/automation/source/miniapp/servres.cxx +++ b/automation/source/miniapp/servres.cxx @@ -34,7 +34,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() ) ), @@ -52,7 +52,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.hxx b/automation/source/miniapp/servres.hxx index 848779a39fa7..9262b50d946a 100644 --- a/automation/source/miniapp/servres.hxx +++ b/automation/source/miniapp/servres.hxx @@ -69,13 +69,13 @@ 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 ); }; diff --git a/automation/source/miniapp/testapp.cxx b/automation/source/miniapp/testapp.cxx index eec1d8ac837b..6711ffe8b333 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() @@ -113,7 +113,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); @@ -125,7 +125,7 @@ void MainWindow::Tree(GHEditWindow *aEditWin, Window *pBase, USHORT Indent) // 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); @@ -240,7 +240,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 31a480a0173e..a3c33ed359d3 100644 --- a/automation/source/miniapp/testapp.hxx +++ b/automation/source/miniapp/testapp.hxx @@ -75,12 +75,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*); @@ -94,8 +94,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 e07f1654ecd5..a2aab7ab1e94 100644 --- a/automation/source/server/XMLParser.cxx +++ b/automation/source/server/XMLParser.cxx @@ -90,9 +90,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; } @@ -161,8 +161,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; } @@ -209,7 +209,7 @@ class SAXParser : public cppu::WeakImplHelper2< XErrorHandler, XDocumentHandler NodeRef xTreeRoot; NodeRef xCurrentNode; - ULONG nTimestamp; + sal_uLong nTimestamp; ParseAction aAction; public: @@ -220,11 +220,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 @@ -255,13 +255,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 @@ -297,8 +297,8 @@ BOOL SAXParser::Parse( ParseAction aAct ) xParser->setDocumentHandler( NULL ); // otherwile Object holds itself } else - return FALSE; - return TRUE; + return sal_False; + return sal_True; } @@ -366,13 +366,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; } @@ -577,7 +577,7 @@ 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) ) { @@ -600,14 +600,14 @@ void StatementCommand::HandleSAXParser() if ( aString1.EqualsAscii( "/" ) ) { if ( bCheckOnly ) - pRet->GenReturn ( RET_Value, nMethodId, (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, nMethodId, (comm_BOOL)(pSAXParser->GetTimestamp() == nTimestamp) ); else @@ -623,13 +623,13 @@ void StatementCommand::HandleSAXParser() } else if ( pElementNode ) { - USHORT nNthOccurance; + sal_uInt16 nNthOccurance; if( (nParams & PARAM_USHORT_1) ) nNthOccurance = nNr1; else nNthOccurance = 1; - USHORT i; + sal_uInt16 i; NodeRef xNew; for ( i = 0 ; i < pElementNode->GetChildCount() && !xNew.Is() ; i++ ) { @@ -661,7 +661,7 @@ void StatementCommand::HandleSAXParser() } else if ( bCheckOnly ) - pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)FALSE ); + pRet->GenReturn ( RET_Value, nMethodId, (comm_BOOL)sal_False ); else ReportError( GEN_RES_STR0( S_INVALID_PARAMETERS ) ); } @@ -671,14 +671,14 @@ 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 ) ); + 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 7f867c3a997c..b17bf66c0597 100644 --- a/automation/source/server/cmdbasestream.cxx +++ b/automation/source/server/cmdbasestream.cxx @@ -118,7 +118,7 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_ULONG { Write(comm_USHORT(SIReturn)); Write(nRet); - Write((comm_ULONG)nMethod); //HELPID BACKWARD (no ULONG needed) + Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) Write(comm_USHORT(PARAM_ULONG_1)); // Typ der folgenden Parameter Write(nNr); } @@ -127,7 +127,7 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_Strin { Write(comm_USHORT(SIReturn)); Write(nRet); - Write((comm_ULONG)nMethod); //HELPID BACKWARD (no ULONG needed) + Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) Write(comm_USHORT(PARAM_STR_1)); // Typ der folgenden Parameter Write(pString); } @@ -136,7 +136,7 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_BOOL { Write(comm_USHORT(SIReturn)); Write(nRet); - Write((comm_ULONG)nMethod); //HELPID BACKWARD (no ULONG needed) + Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) Write(comm_USHORT(PARAM_BOOL_1)); // Typ der folgenden Parameter Write(bBool); } @@ -145,7 +145,7 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, comm_USHORT nMethod, comm_USHOR { Write(comm_USHORT(SIReturn)); Write(nRet); - Write((comm_ULONG)nMethod); //HELPID BACKWARD (no ULONG needed) + Write((comm_ULONG)nMethod); //HELPID BACKWARD (no sal_uLong needed) Write(comm_USHORT(PARAM_USHORT_1)); // Typ der folgenden Parameter Write(nNr); } diff --git a/automation/source/server/editwin.cxx b/automation/source/server/editwin.cxx index 0bcb35a8b306..b1897152a337 100644 --- a/automation/source/server/editwin.cxx +++ b/automation/source/server/editwin.cxx @@ -62,14 +62,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() @@ -77,7 +77,7 @@ void EditWindow::Show() if ( Check() ) pImpWorkWindow->Show(); else - bShowWin = TRUE; + bShowWin = sal_True; } void EditWindow::Hide() @@ -85,7 +85,7 @@ void EditWindow::Hide() if ( Check() ) pImpWorkWindow->Hide(); else - bShowWin = FALSE; + bShowWin = sal_False; } EditWindow::EditWindow( WorkWindow *pParent, const String &rName, WinBits iWstyle ) @@ -94,7 +94,7 @@ EditWindow::EditWindow( WorkWindow *pParent, const String &rName, WinBits iWstyl , aMemName(rName) , iMemWstyle(iWstyle) , nTextLen(0) -, bQuiet(FALSE) +, bQuiet(sal_False) { } @@ -103,7 +103,7 @@ EditWindow::~EditWindow() Close(); } -BOOL EditWindow::Check() +sal_Bool EditWindow::Check() { if ( ! pImpWorkWindow && Application::IsInExecute() ) { @@ -113,7 +113,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 021982333d39..d02e96276507 100644 --- a/automation/source/server/editwin.hxx +++ b/automation/source/server/editwin.hxx @@ -43,14 +43,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 @@ -64,9 +64,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 c8f70eb06821..314b2d0c41e5 100644 --- a/automation/source/server/prof_nul.cxx +++ b/automation/source/server/prof_nul.cxx @@ -82,7 +82,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 91048e0c6c75..cccf196b795b 100644 --- a/automation/source/server/prof_usl.cxx +++ b/automation/source/server/prof_usl.cxx @@ -85,7 +85,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() ) @@ -122,8 +122,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 150b0d1ec5ef..8bd4e76401fe 100644 --- a/automation/source/server/profiler.cxx +++ b/automation/source/server/profiler.cxx @@ -44,10 +44,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(); @@ -95,13 +95,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; } } @@ -109,10 +109,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); @@ -147,7 +147,7 @@ void TTProfiler::EndProfileInterval() { GetProfileSnapshot( mpEnd ); GetSysdepProfileSnapshot( mpEnd->pSysdepProfileSnapshot, PROFILE_END ); - bIsProfileIntervalStarted = FALSE; + bIsProfileIntervalStarted = sal_False; } @@ -161,32 +161,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 ) { @@ -197,7 +197,7 @@ void TTProfiler::StartAutoProfiling( ULONG nMSec ) GetProfileSnapshot( pAutoStart ); GetSysdepProfileSnapshot( pAutoStart->pSysdepProfileSnapshot, PROFILE_START ); SetTimeout( nMSec ); - bIsAutoProfiling = TRUE; + bIsAutoProfiling = sal_True; Start(); } @@ -234,14 +234,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 e5c3b6d02a15..3903ac5fee42 100644 --- a/automation/source/server/profiler.hxx +++ b/automation/source/server/profiler.hxx @@ -47,8 +47,8 @@ struct ProfileSnapshot { Time aTime; SysdepProfileSnapshot *pSysdepProfileSnapshot; - ULONG nProcessTicks; - ULONG nSystemTicks; + sal_uLong nProcessTicks; + sal_uLong nSystemTicks; }; @@ -59,24 +59,24 @@ public: ~TTProfiler(); String GetProfileHeader(); // Titelzeile für Logdatei - void StartProfileInterval( BOOL bReadAnyway = FALSE ); // Zustand merken + 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: @@ -88,20 +88,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 ProfileSnapshot *pAutoStart; ProfileSnapshot *pAutoEnd; - BOOL bIsAutoProfiling; + sal_Bool bIsAutoProfiling; String aAutoProfileBuffer; virtual void Timeout(); @@ -109,8 +109,8 @@ private: // Einige Hilfsfunktionen -// String Hex( ULONG nNr ); - String Dec( ULONG nNr ); // Ergebnis = nNr / 100 mit 2 Dezimalen +// 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 @@ -129,7 +129,7 @@ private: 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 ac0b9db9aaf8..4546ba966a1d 100644 --- a/automation/source/server/recorder.cxx +++ b/automation/source/server/recorder.cxx @@ -56,9 +56,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) ); @@ -105,12 +105,12 @@ IMPL_LINK( MacroRecorder, HookRefreshHdl, void*, EMPTYARG ) return 0; } -void MacroRecorder::LogVCL( rtl::OString aParentID, USHORT nVCLWindowType, rtl::OString 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( Id2Str( aParentID ), nVCLWindowType, Id2Str( aID ), aMethod, nParam ); } -void MacroRecorder::LogVCL( rtl::OString aParentID, USHORT nVCLWindowType, rtl::OString aID, String aMethod ) +void MacroRecorder::LogVCL( rtl::OString aParentID, sal_uInt16 nVCLWindowType, rtl::OString aID, String aMethod ) { ::comphelper::UiEventsLogger::logVcl( Id2Str( aParentID ), nVCLWindowType, Id2Str( aID ), aMethod ); } @@ -133,13 +133,13 @@ rtl::OString MacroRecorder::GetParentID( Window* pThis ) 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 @@ -167,13 +167,13 @@ 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; } if ( m_bLog ) { @@ -182,7 +182,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) // cleanup aKeyString.Erase(); pKeyWin = NULL; - bKeyFollowFocus = FALSE; + bKeyFollowFocus = sal_False; } switch ( pWin->GetType() ) @@ -194,7 +194,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( m_bRecord ) { StatementList::pRet->GenReturn( RET_MacroRecorder, rtl::OString(), (comm_USHORT)(M_SetPage|M_RET_NUM_CONTROL), Id2Str( pWin->GetUniqueOrHelpId() ) ); - bSendData = TRUE; + bSendData = sal_True; } if ( m_bLog ) { @@ -214,7 +214,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( m_bRecord ) { StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Check ); - bSendData = TRUE; + bSendData = sal_True; } if ( m_bLog ) { @@ -244,7 +244,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( m_bRecord ) { StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), nMethod ); - bSendData = TRUE; + bSendData = sal_True; } if ( m_bLog ) { @@ -278,7 +278,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( m_bRecord ) { StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Select, comm_ULONG( ((ListBox*)pWin)->GetSelectEntryPos() +1 ) ); - bSendData = TRUE; + bSendData = sal_True; } if ( m_bLog ) { @@ -305,7 +305,7 @@ 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 ) @@ -313,7 +313,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) else { StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Select, (comm_ULONG) nPos+1 ); - bSendData = TRUE; + bSendData = sal_True; } } if ( m_bLog ) @@ -333,7 +333,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) { case VCLEVENT_BUTTON_CLICK: Window* pParent = pWin->GetParent(); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( pParent->IsDialog() && !pWin->GetUniqueOrHelpId().getLength() ) { switch ( pParent->GetType() ) @@ -350,8 +350,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 ) @@ -377,7 +377,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) StatementList::pRet->GenReturn( RET_MacroRecorder, UID_ACTIVE, nMethod ); else StatementList::pRet->GenReturn( RET_MacroRecorder, UID_ACTIVE, nMethod, (comm_ULONG)nCurrentButtonId ); - bSendData = TRUE; + bSendData = sal_True; } if ( m_bLog ) { @@ -385,7 +385,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) LogVCL( rtl::OString(), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod ); else LogVCL( rtl::OString(), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod, nCurrentButtonId ); - bDone = TRUE; + bDone = sal_True; } } break; @@ -404,12 +404,12 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( m_bRecord ) { StatementList::pRet->GenReturn( RET_MacroRecorder, pParent->GetUniqueOrHelpId(), nMethod ); - bSendData = TRUE; + bSendData = sal_True; } if ( m_bLog ) { LogVCL( GetParentID( pWin ), pWin->GetType(), pWin->GetUniqueOrHelpId(), aMethod ); - bDone = TRUE; + bDone = sal_True; } } break; @@ -420,7 +420,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( !bSendData && pWin->GetUniqueOrHelpId().getLength() ) { StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Click ); - bSendData = TRUE; + bSendData = sal_True; } } if ( m_bLog ) @@ -440,10 +440,10 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) ((MoreButton*)pControl)->Click(); break; case M_Open : - ((MoreButton*)pControl)->SetState(TRUE); + ((MoreButton*)pControl)->SetState(sal_True); break; case M_Close : - ((MoreButton*)pControl)->SetState(FALSE); + ((MoreButton*)pControl)->SetState(sal_False); break; default: ReportError( nUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "MoreButton" ) ); @@ -481,7 +481,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( m_bRecord ) { StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), nMethod ); - bSendData = TRUE; + bSendData = sal_True; } if ( m_bLog ) { @@ -503,7 +503,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( m_bRecord ) { StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), (comm_USHORT)M_Click ); - bSendData = TRUE; + bSendData = sal_True; } if ( m_bLog ) { @@ -518,8 +518,8 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) aMEvnt = MouseEvent( aPt,1,MOUSE_SIMPLECLICK,MOUSE_LEFT ); ImplMouseButtonDown( pControl, aMEvnt ); - ULONG nStart = Time::GetSystemTicks(); - ULONG nDelay = pControl->GetSettings().GetMouseSettings().GetActionDelay(); + sal_uLong nStart = Time::GetSystemTicks(); + sal_uLong nDelay = pControl->GetSettings().GetMouseSettings().GetActionDelay(); while ( ( Time::GetSystemTicks() - nStart ) < nDelay + 100 ) SafeReschedule(); @@ -546,7 +546,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) else // access via Toolbox StatementList::pRet->GenReturn( RET_MacroRecorder, pTB->GetUniqueOrHelpId(), (comm_USHORT)(M_Click|M_RET_NUM_CONTROL), Id2Str( pTB->GetHelpId( pTB->GetCurItemId() ) ) ); - bSendData = TRUE; + bSendData = sal_True; } /* not needed if ( m_bLog ) { @@ -569,8 +569,8 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) // StatementList::pRet->GenReturn( RET_MacroRecorder, rtl::OString( pActionParent->GetHelpId( pActionParent->GetCurItemId() ) ), (comm_USHORT)(M_TearOff) ); // else // // access via Toolbox -// StatementList::pRet->GenReturn( RET_MacroRecorder, pActionParent->GetSmartUniqueOrHelpId(), (comm_USHORT)(M_TearOff|M_RET_NUM_CONTROL), static_cast<comm_ULONG>(pActionParent->GetHelpId( pActionParent->GetCurItemId() )) ); // GetHelpId() ULONG != comm_ULONG on 64bit -// bSendData = TRUE; +// StatementList::pRet->GenReturn( RET_MacroRecorder, pActionParent->GetSmartUniqueOrHelpId(), (comm_USHORT)(M_TearOff|M_RET_NUM_CONTROL), static_cast<comm_ULONG>(pActionParent->GetHelpId( pActionParent->GetCurItemId() )) ); // GetHelpId() sal_uLong != comm_ULONG on 64bit +// bSendData = sal_True; // } // if ( m_bLog ) // { @@ -611,21 +611,21 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( !pTB->IsItemEnabled( pTB->GetItemId(nNr1) ) && nMethodId != _M_IsEnabled )\ {\ ReportError( nUId, GEN_RES_STR1( S_BUTTON_DISABLED_ON_TOOLBOX, MethodString( nMethodId ) ) );\ - bBool1 = FALSE;\ + bBool1 = sal_False;\ }\ else if ( !pTB->IsItemVisible( pTB->GetItemId(nNr1) ) )\ {\ ReportError( nUId, GEN_RES_STR1( S_BUTTON_HIDDEN_ON_TOOLBOX, MethodString( nMethodId ) ) );\ - bBool1 = FALSE;\ + bBool1 = sal_False;\ }\ else\ {\ if ( pTB->GetItemRect(pTB->GetItemId(nNr1)).IsEmpty() )\ {\ - USHORT nLine = pTB->GetCurLine();\ + sal_uInt16 nLine = pTB->GetCurLine();\ do\ {\ - pTB->ShowLine( FALSE );\ + pTB->ShowLine( sal_False );\ for ( int i = 1 ; i < 30 ; i++ )\ SafeReschedule();\ }\ @@ -635,7 +635,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( pTB->GetItemRect(pTB->GetItemId(nNr1)).IsEmpty() )\ {\ ReportError( nUId, GEN_RES_STR1( S_CANNOT_MAKE_BUTTON_VISIBLE_IN_TOOLBOX, MethodString( nMethodId ) ) );\ - bBool1 = FALSE;\ + bBool1 = sal_False;\ }\ }\ }\ @@ -675,7 +675,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) pKeyWin = pWin; Window *pIdWin = GetParentWithID( pWin ); if ( pIdWin != pWin ) - bKeyFollowFocus = TRUE; + bKeyFollowFocus = sal_True; aKeyUniqueID = pIdWin->GetUniqueOrHelpId(); if ( m_bLog ) { @@ -726,17 +726,17 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) { // case 1 .. 0xffff: DBG_TRACE3( "TT_VCLMessage %u %u %X",nEventID, pWin->GetType(), pWin ); -// BOOL bx = ((DockingWindow*)pWin)->IsFloatingMode(); +// sal_Bool bx = ((DockingWindow*)pWin)->IsFloatingMode(); // break; /* case M_Dock : if ( ((DockingWindow*)pControl)->IsFloatingMode() ) - ((DockingWindow*)pControl)->SetFloatingMode(FALSE); + ((DockingWindow*)pControl)->SetFloatingMode(sal_False); else ReportError( nUId, GEN_RES_STR1( S_ALLOWED_ONLY_IN_FLOATING_MODE, MethodString( nMethodId ) ) ); break; case M_Undock : if ( !((DockingWindow*)pControl)->IsFloatingMode() ) - ((DockingWindow*)pControl)->SetFloatingMode(TRUE); + ((DockingWindow*)pControl)->SetFloatingMode(sal_True); else ReportError( nUId, GEN_RES_STR1( S_ALLOWED_ONLY_IN_FLOATING_MODE, MethodString( nMethodId ) ) ); break; @@ -794,7 +794,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) else // access via Toolbox StatementList::pRet->GenReturn( RET_MacroRecorder, pActionParent->GetUniqueOrHelpId(), (comm_USHORT)(M_OpenMenu|M_RET_NUM_CONTROL), pActionParent->GetHelpId( pActionParent->GetCurItemId() ) ); - bSendData = TRUE; + bSendData = sal_True; } break; @@ -935,7 +935,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) case C_ErrorBox: case C_QueryBox: { - BOOL bDone = TRUE; + sal_Bool bDone = sal_True; MessBox* pMB = (MessBox*)pControl; switch( nEventID ) { @@ -959,7 +959,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) break; default: - bDone = FALSE; + bDone = sal_False; break; } if ( bDone ) @@ -1025,7 +1025,7 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent ) if ( m_bRecord ) { StatementList::pRet->GenReturn( RET_MacroRecorder, pWin->GetUniqueOrHelpId(), M_SetText, aEditModifyString ); - bSendData = TRUE; + bSendData = sal_True; } if ( m_bLog ) { @@ -1087,7 +1087,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 5a409513cacc..cb59f02b76cc 100644 --- a/automation/source/server/recorder.hxx +++ b/automation/source/server/recorder.hxx @@ -52,15 +52,15 @@ private: String aKeyString; 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( rtl::OString aParentID, USHORT nVCLWindowType, rtl::OString aID, String aMethod, USHORT aParam ); - void LogVCL( rtl::OString aParentID, USHORT nVCLWindowType, rtl::OString 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; @@ -69,15 +69,15 @@ 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(); }; diff --git a/automation/source/server/retstrm.cxx b/automation/source/server/retstrm.cxx index 951237dbcd2f..7fb3c6dd8949 100644 --- a/automation/source/server/retstrm.cxx +++ b/automation/source/server/retstrm.cxx @@ -53,38 +53,38 @@ void RetStream::GenError ( rtl::OString aUId, String aString ) CmdBaseStream::GenError ( &aUId, &aString ); } -void RetStream::GenReturn ( USHORT nRet, rtl::OString aUId, String aString ) +void RetStream::GenReturn ( sal_uInt16 nRet, rtl::OString aUId, String aString ) { CmdBaseStream::GenReturn ( nRet, &aUId, &aString ); } -void RetStream::GenReturn ( USHORT nRet, rtl::OString 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 ); } // MacroRecorder -void RetStream::GenReturn( USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, String aString ) +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, rtl::OString 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 ( USHORT nRet, USHORT nMethod, SbxValue &aValue ) +void RetStream::GenReturn ( sal_uInt16 nRet, sal_uInt16 nMethod, SbxValue &aValue ) { - Write(USHORT(SIReturn)); + Write(sal_uInt16(SIReturn)); Write(nRet); - Write((comm_ULONG)nMethod); //HELPID BACKWARD (no ULONG needed) - Write(USHORT(PARAM_SBXVALUE_1)); // Typ der folgenden Parameter + 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( USHORT nRet, USHORT nMethod, String aString ) +void RetStream::GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, String aString ) { CmdBaseStream::GenReturn ( nRet, nMethod, &aString ); } @@ -99,7 +99,7 @@ void RetStream::Write( String *pString ) void RetStream::Write( SbxValue &aValue ) { - *pSammel << USHORT( BinSbxValue ); + *pSammel << sal_uInt16( BinSbxValue ); aValue.Store( *pSammel ); } diff --git a/automation/source/server/retstrm.hxx b/automation/source/server/retstrm.hxx index a7033714ba6d..e8220a5848e4 100644 --- a/automation/source/server/retstrm.hxx +++ b/automation/source/server/retstrm.hxx @@ -54,16 +54,16 @@ public: void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );} // new - void GenReturn( USHORT nRet, rtl::OString aUId, String aString ); - void GenReturn( USHORT nRet, rtl::OString aUId, comm_ULONG nNr, String aString, BOOL bBool ); + 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( USHORT nRet, USHORT nMethod, SbxValue &aValue ); - void GenReturn( USHORT nRet, USHORT nMethod, String aString ); + void GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, SbxValue &aValue ); + void GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, String aString ); // MacroRecorder - void GenReturn( USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, String aString ); - void GenReturn( USHORT nRet, rtl::OString 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(); diff --git a/automation/source/server/scmdstrm.cxx b/automation/source/server/scmdstrm.cxx index 0c4485f46a6b..de9eb9c38015 100644 --- a/automation/source/server/scmdstrm.cxx +++ b/automation/source/server/scmdstrm.cxx @@ -56,7 +56,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 ); @@ -66,7 +66,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 ); @@ -75,8 +75,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: " ); @@ -145,7 +145,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 00d2aaabd197..7c7c8282e3ba 100644 --- a/automation/source/server/server.cxx +++ b/automation/source/server/server.cxx @@ -89,16 +89,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 @@ -174,20 +174,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; } } @@ -234,7 +234,7 @@ ULONG RemoteControlCommunicationManager::GetPort() 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"); @@ -253,7 +253,7 @@ class ExtraIdle : public AutoTimer { virtual void Timeout(); - USHORT nStep; + sal_uInt16 nStep; ImplRemoteControl *pRemoteControl; public: ExtraIdle( ImplRemoteControl *pRC ); @@ -284,8 +284,8 @@ void ExtraIdle::Timeout() // 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 ) @@ -323,7 +323,7 @@ void ExtraIdle::Timeout() { 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; @@ -384,7 +384,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 ) { @@ -535,7 +535,7 @@ void ExtraIdle::Timeout() } /*********************************************************************** -// USHORT nBC = pBmp->GetBitCount(); +// sal_uInt16 nBC = pBmp->GetBitCount(); // pBmp->Scale( 0.02, 0.02 ); // nBC = pBmp->GetBitCount(); // SvMemoryStream aStream; @@ -610,7 +610,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 @@ -644,7 +644,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) // 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(); @@ -689,7 +689,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) pDlg->Show(); DBG_ERROR("GPF"); pC->ReportError( GEN_RES_STR0( S_GPF_ABORT ) ); - StatementList::bDying = TRUE; + StatementList::bDying = sal_True; while ( StatementList::pFirst ) // Kommandos werden übersprungen StatementList::NormalReschedule(); delete pDlg; @@ -706,7 +706,7 @@ IMPL_LINK( ImplRemoteControl, CommandHdl, Application*, EMPTYARG ) for (int xx = 1;xx < 20;xx++) StatementList::NormalReschedule(); */ - m_bInsideExecutionLoop = FALSE; + m_bInsideExecutionLoop = sal_False; } StatementList::aWindowWaitUId = rtl::OString(); // Warten rücksetzen, da handler sowieso verlassen wird @@ -734,10 +734,10 @@ IMPL_LINK( ImplRemoteControl, QueCommandsEvent, CommunicationLink*, pCL ) return 0; } -BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn ) +sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn ) { -// return TRUE; - USHORT nId; +// return sal_True; + sal_uInt16 nId; if( !m_bIdleInserted ) { @@ -748,11 +748,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) @@ -765,7 +765,7 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn ) if( nServiceId != SI_IPCCommandBlock && nServiceId != SI_DirectCommandBlock ) { DBG_ERROR1( "Ungültiger Request :%i", (int)nServiceId ); - return FALSE; + return sal_False; } SCmdStream *pCmdStream = new SCmdStream(pIn); @@ -812,7 +812,7 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn ) } } - StatementList::bReadingCommands = FALSE; + StatementList::bReadingCommands = sal_False; delete pCmdStream; #if OSL_DEBUG_LEVEL > 1 @@ -830,10 +830,10 @@ BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn ) } #ifdef DEBUG else - m_bInsideExecutionLoop = TRUE; + m_bInsideExecutionLoop = sal_True; #endif - return TRUE; -} // BOOL ImplRemoteControl::QueCommands( ULONG nServiceId, SvStream *pIn ) + return sal_True; +} // sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn ) SvStream* ImplRemoteControl::GetReturnStream() @@ -844,8 +844,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 @@ -855,9 +855,9 @@ 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 = FALSE; + m_pDbgWin->bQuiet = sal_False; m_pDbgWin->Show(); StatementList::m_pDbgWin = m_pDbgWin; @@ -890,13 +890,13 @@ 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 @@ -935,7 +935,7 @@ ImplRemoteControl::~ImplRemoteControl() #else GetpApp()->RemoveIdleHdl( LINK( this, ImplRemoteControl, IdleHdl ) ); #endif - m_bIdleInserted = FALSE; + m_bIdleInserted = sal_False; } delete pServiceMgr; } @@ -976,6 +976,6 @@ 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 } diff --git a/automation/source/server/server.hxx b/automation/source/server/server.hxx index 099973bee6bb..abca26fc2a5f 100644 --- a/automation/source/server/server.hxx +++ b/automation/source/server/server.hxx @@ -41,7 +41,7 @@ namespace vos #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 @@ -51,12 +51,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 @@ -69,8 +69,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 f663665c20b6..3164c5729466 100644 --- a/automation/source/server/sta_list.cxx +++ b/automation/source/server/sta_list.cxx @@ -60,19 +60,19 @@ 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 @@ -82,23 +82,23 @@ rtl::OString StatementList::aWindowWaitUId = rtl::OString(); Window *StatementList::pWindowWaitPointer = NULL; rtl::OString StatementList::aWindowWaitOldHelpId = rtl::OString(); rtl::OString StatementList::aWindowWaitOldUniqueId = rtl::OString(); -USHORT StatementList::nUseBindings = 0; +sal_uInt16 StatementList::nUseBindings = 0; -USHORT StatementList::aSubMenuId1 = 0; // Untermenüs bei PopupMenus -USHORT StatementList::aSubMenuId2 = 0; // erstmal 2-Stufig -USHORT StatementList::aSubMenuId3 = 0; // 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; @@ -121,7 +121,7 @@ TTSettings* GetTTSettings() // Translate pTTSettings->pTranslateWin = NULL; - pTTSettings->bToTop = TRUE; + pTTSettings->bToTop = sal_True; } return pTTSettings; @@ -134,14 +134,14 @@ TTSettings* GetTTSettings() #define IS_WINP_CLOSING(pWin) (pWin->GetHelpId().equals( "TT_Win_is_closing_HID" ) && pWin->GetUniqueId().equals( "TT_Win_is_closing_UID" )) /* -UniString GEN_RES_STR0( ULONG nResId ) { return ResString( nResId ); } -UniString GEN_RES_STR1( ULONG nResId, const UniString &Text1 ) { return GEN_RES_STR0( nResId ).Append( ArgString( 1, Text1 ) ); } -UniString GEN_RES_STR2( ULONG nResId, const UniString &Text1, const UniString &Text2 ) { return GEN_RES_STR1( nResId, Text1 ).Append( ArgString( 2, Text2 ) ); } -UniString GEN_RES_STR3( ULONG nResId, const UniString &Text1, const UniString &Text2, const UniString &Text3 ) { return GEN_RES_STR2( nResId, Text1, Text2 ).Append( ArgString( 3, Text3 ) );} +UniString GEN_RES_STR0( sal_uLong nResId ) { return ResString( nResId ); } +UniString GEN_RES_STR1( sal_uLong nResId, const UniString &Text1 ) { return GEN_RES_STR0( nResId ).Append( ArgString( 1, Text1 ) ); } +UniString GEN_RES_STR2( sal_uLong nResId, const UniString &Text1, const UniString &Text2 ) { return GEN_RES_STR1( nResId, Text1 ).Append( ArgString( 2, Text2 ) ); } +UniString GEN_RES_STR3( sal_uLong nResId, const UniString &Text1, const UniString &Text2, const UniString &Text3 ) { return GEN_RES_STR2( nResId, Text1, Text2 ).Append( ArgString( 3, Text3 ) );} */ 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. @@ -176,7 +176,7 @@ void StatementList::SendProfile( String aText ) if ( pProfiler->IsPartitioning() ) // FIXME: HELPID - pRet->GenReturn( RET_ProfileInfo, S_ProfileTime, static_cast<comm_ULONG>(pProfiler->GetPartitioningTime()) ); // GetPartitioningTime() ULONG != comm_ULONG on 64bit + pRet->GenReturn( RET_ProfileInfo, S_ProfileTime, static_cast<comm_ULONG>(pProfiler->GetPartitioningTime()) ); // GetPartitioningTime() sal_uLong != comm_ULONG on 64bit } if ( pProfiler->IsAutoProfiling() ) @@ -196,7 +196,7 @@ void StatementList::QueStatement(StatementList *pAfterThis) if ( bStatementInQue ) return; - bStatementInQue = TRUE; + bStatementInQue = sal_True; if ( pAfterThis ) { if ( pAfterThis->bStatementInQue ) @@ -229,7 +229,7 @@ void StatementList::QueStatement(StatementList *pAfterThis) void StatementList::Advance() { // pFirst ist static! pFirst = pNext; - bStatementInQue = FALSE; + bStatementInQue = sal_False; pNext = NULL; } @@ -242,7 +242,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(); @@ -259,10 +259,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 ) { @@ -273,10 +273,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 ) { @@ -287,12 +287,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 ) @@ -372,7 +372,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; @@ -382,7 +382,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 ); @@ -390,23 +390,23 @@ Window* StatementList::SearchClientWin( Window *pBase, Search &aSearch, BOOL May } -BOOL SearchUID::IsWinOK( Window *pWin ) +sal_Bool SearchUID::IsWinOK( Window *pWin ) { 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.equals( Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ) ) || aUId.equals( pTB->GetHelpId(pTB->GetItemId( i )) ) ) @@ -421,17 +421,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 ) @@ -441,23 +441,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( rtl::OString aUId ,BOOL bSearchButtonOnToolbox ) +Window* StatementList::SearchTree( rtl::OString aUId ,sal_Bool bSearchButtonOnToolbox ) { SearchUID aSearch(aUId,bSearchButtonOnToolbox); @@ -471,19 +471,19 @@ Window* StatementList::SearchTree( rtl::OString aUId ,BOOL bSearchButtonOnToolbo } -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 ) { @@ -491,15 +491,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 ) @@ -510,7 +510,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 ); @@ -518,7 +518,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 ) ) { @@ -526,10 +526,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 ); @@ -537,12 +537,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; @@ -557,7 +557,7 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu ) if ( pBaseMenu->GetWindow() == pWin ) return pBaseMenu; - USHORT i; + sal_uInt16 i; // while ( pBaseMenu ) // { i = 0; @@ -588,16 +588,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 ) @@ -621,26 +621,26 @@ Menu* StatementList::GetMatchingMenu( Window* pWin, Menu* pBaseMenu ) } -BOOL SearchActive::IsWinOK( Window *pWin ) +sal_Bool SearchActive::IsWinOK( Window *pWin ) { // return pWin->IsVisible() && ( (nRT == WINDOW_ANYTYPE && IsDialog(pWin) ) || pWin->GetType() == nRT ) && (nRT == WINDOW_FILEDIALOG || nRT == WINDOW_PATHDIALOG || nRT == WINDOW_PRINTDIALOG || nRT == WINDOW_PRINTERSETUPDIALOG || nRT == WINDOW_COLORDIALOG || ((SystemWindow*)pWin)->IsActive()); // 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(); @@ -654,7 +654,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 ); @@ -682,13 +682,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); } @@ -696,7 +696,7 @@ Window* StatementList::GetFocus( WindowType nRT, BOOL MaybeBase ) return NULL; } -Window* StatementList::GetAnyActive( BOOL MaybeBase ) +Window* StatementList::GetAnyActive( sal_Bool MaybeBase ) { Window *pControl; @@ -785,7 +785,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() ) ); } @@ -794,7 +794,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 ) @@ -805,35 +805,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 @@ -841,28 +841,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) @@ -1010,7 +1010,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); @@ -1019,7 +1019,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) ) @@ -1049,10 +1049,10 @@ BOOL StatementList::CheckWindowWait() aWindowWaitUId = rtl::OString(); pWindowWaitPointer = NULL; StartTime = Time(0L); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } pWindowWaitPointer = NULL; aWindowWaitUId = rtl::OString(); @@ -1061,7 +1061,7 @@ BOOL StatementList::CheckWindowWait() #endif } StartTime = Time(0L); - return TRUE; + return sal_True; } void StatementList::ReportError(String aMessage) @@ -1072,18 +1072,18 @@ void StatementList::ReportError(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, (USHORT) nType, aMessage ); + pRet->GenReturn( RET_DirectLoging, (sal_uInt16) nType, aMessage ); } @@ -1097,15 +1097,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 @@ -1129,7 +1129,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 ); } } @@ -1139,13 +1139,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 ); } @@ -1166,13 +1166,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 ); } @@ -1183,13 +1183,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 ); } @@ -1215,7 +1215,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 1b22b32388ec..4b40f39a1d77 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -142,11 +142,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; @@ -164,24 +164,24 @@ pfunc_osl_printDebugMessage StatementCommand::pOriginal_osl_DebugMessageFunc = N // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -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); @@ -216,7 +216,7 @@ void StatementFlow::SendViaSocket() DBG_ERROR("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 ... @@ -229,11 +229,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: " ); @@ -247,16 +247,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 } } @@ -271,7 +271,7 @@ BOOL StatementFlow::Execute() if ( !bUseIPC ) { // wird oben abgehandelt pRet->Reset(); - IsError = FALSE; + IsError = sal_False; } else SendViaSocket(); @@ -295,7 +295,7 @@ BOOL StatementFlow::Execute() } delete this; - return TRUE; + return sal_True; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -393,7 +393,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; } @@ -402,7 +402,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; @@ -415,15 +415,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 ) ); @@ -446,7 +446,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; } @@ -476,7 +476,7 @@ void StatementSlot::AddReferer() aArgs.realloc(nAnzahl); pArg = aArgs.getArray(); pArg[nAnzahl-1].Name = rtl::OUString::createFromAscii("SynchronMode"); - pArg[nAnzahl-1].Value <<= sal_Bool( TRUE ); + pArg[nAnzahl-1].Value <<= sal_Bool( sal_True ); } class SlotStatusListener : public cppu::WeakImplHelper1< XStatusListener > @@ -490,8 +490,8 @@ 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; }; /* struct FeatureStateEvent : public ::com::sun::star::lang::EventObject @@ -505,8 +505,8 @@ struct FeatureStateEvent : public ::com::sun::star::lang::EventObject */ SlotStatusListener::SlotStatusListener() -: bDisposed( FALSE ) -, bEnabled( TRUE ) +: bDisposed( sal_False ) +, bEnabled( sal_True ) {} // XStatusListener @@ -522,10 +522,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 ) { @@ -537,7 +537,7 @@ BOOL StatementSlot::Execute() Advance(); delete this; - return TRUE; + return sal_True; } InitProfile(); @@ -561,18 +561,18 @@ BOOL StatementSlot::Execute() 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 ) ); @@ -658,9 +658,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 @@ -702,7 +702,7 @@ BOOL StatementSlot::Execute() SendProfile( SlotString( nFunctionId ) ); delete this; - return TRUE; + return sal_True; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -723,7 +723,7 @@ 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 ) , nParams(Params) , nNr1(Nr1) @@ -733,8 +733,8 @@ StatementCommand::StatementCommand( StatementList *pAfterThis, USHORT MethodId, , nLNr1(0) , aString1() , aString2() -, bBool1(FALSE) -, bBool2(FALSE) +, bBool1(sal_False) +, bBool2(sal_False) { QueStatement( pAfterThis ); @@ -767,8 +767,8 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn ) , nLNr1(0) , aString1() , aString2() -, bBool1(FALSE) -, bBool2(FALSE) +, bBool1(sal_False) +, bBool2(sal_False) { QueStatement( NULL ); pCmdIn->Read( nMethodId ); @@ -806,14 +806,14 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn ) #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( "*Deleting all Commands:\n" ); #endif - bReadingCommands = FALSE; + 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 @@ -821,14 +821,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, rtl::OString(), (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 ) { @@ -839,7 +839,7 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst { // 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() ) { @@ -906,7 +906,7 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst default: if ( ( pBase->GetUniqueOrHelpId().getLength() == 0 ) && !( nConf & DH_MODE_ALLWIN ) ) - bSkip = TRUE; + bSkip = sal_True; break; } @@ -939,13 +939,13 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst rtl::OString aId = pBase->GetUniqueOrHelpId(); pRet->GenReturn ( RET_WinInfo, aId, (comm_ULONG)pBase->GetType(), - TypeString(pBase->GetType()).Append(aTypeSuffix).AppendAscii(": ").Append(aName), FALSE ); + 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(); @@ -962,10 +962,10 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst { if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) pRet->GenReturn ( RET_WinInfo, Str2Id(pTB->GetItemCommand(pTB->GetItemId( i ))), (comm_ULONG)WINDOW_BUTTON, - TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), FALSE ); + TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), sal_False ); if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)WINDOW_BUTTON, - TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), FALSE ); + TypeString(WINDOW_BUTTON).AppendAscii(": ").Append(aName), sal_False ); } else { @@ -973,13 +973,13 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst { if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) pRet->GenReturn ( RET_WinInfo, Str2Id(pTB->GetItemCommand(pTB->GetItemId( i ))), (comm_ULONG)pItemWin->GetType(), - TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), FALSE ); + TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), sal_False ); if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)pItemWin->GetType(), - TypeString(pItemWin->GetType()).AppendAscii(": ").Append(aName), FALSE ); - USHORT ii; + 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 { @@ -1008,10 +1008,10 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst } if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) pRet->GenReturn ( RET_WinInfo, Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BASE, - aToolBoxItemType.AppendAscii(": ").Append(aName), FALSE ); + aToolBoxItemType.AppendAscii(": ").Append(aName), sal_False ); if ( !pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) ) pRet->GenReturn ( RET_WinInfo, pTB->GetHelpId(pTB->GetItemId( i )), (comm_ULONG)WINDOW_BASE, - aToolBoxItemType.AppendAscii(": ").Append(aName), FALSE ); + aToolBoxItemType.AppendAscii(": ").Append(aName), sal_False ); } } } @@ -1029,7 +1029,7 @@ 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(); @@ -1063,7 +1063,7 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst 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 = ").AppendAscii( aID.GetBuffer() ), FALSE ); + .AppendAscii(" ButtonId = ").AppendAscii( aID.GetBuffer() ), sal_False ); } return; // ButtonDialog ist hier schon komplett abgehandelt. @@ -1074,10 +1074,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 ) @@ -1111,10 +1111,10 @@ void StatementCommand::WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst } if ( pMenu->GetItemCommand(nID).Len() || ( nConf & DH_MODE_ALLWIN ) ) pRet->GenReturn ( RET_WinInfo, Str2Id( pMenu->GetItemCommand(nID) ), (comm_ULONG)0, - aMenuItemType.AppendAscii(": ").Append(aName), FALSE ); + aMenuItemType.AppendAscii(": ").Append(aName), sal_False ); if ( !pMenu->GetItemCommand(nID).Len() || ( nConf & DH_MODE_ALLWIN ) ) pRet->GenReturn ( RET_WinInfo, rtl::OString::valueOf( (sal_Int32)nID ), (comm_ULONG)0, - aMenuItemType.AppendAscii(": ").Append(aName), FALSE ); + aMenuItemType.AppendAscii(": ").Append(aName), sal_False ); } } @@ -1123,8 +1123,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 @@ -1145,7 +1145,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(); @@ -1177,10 +1177,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 ); @@ -1189,7 +1189,7 @@ void SysWinContainer::Resizing( Size& rSize ) { nBestValue = nThisValue; aBestSize = aSize; - bHasValue = TRUE; + bHasValue = sal_True; } } rSize = aBestSize; @@ -1200,15 +1200,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 ); @@ -1220,9 +1220,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(); @@ -1235,27 +1235,27 @@ 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; } -// BOOL IsAllWin() { return GetItemState( TT_ALLWIN ) == STATE_CHECK; } + sal_Bool IsSendData() { return GetItemState( TT_SEND_DATA ) == STATE_CHECK; } +// sal_Bool IsAllWin() { return GetItemState( TT_ALLWIN ) == 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 ) @@ -1284,7 +1284,7 @@ DisplayHidWin::~DisplayHidWin() delete pEdit; } -void DisplayHidWin::SetDraging( BOOL bNewDraging ) +void DisplayHidWin::SetDraging( sal_Bool bNewDraging ) { if ( !pShow ) pShow = new Image( GetItemImage( TT_SHOW ) ); @@ -1299,9 +1299,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 ); @@ -1310,7 +1310,7 @@ void DisplayHidWin::EnableButtons( ULONG nConf ) void DisplayHidWin::Tracking( const TrackingEvent& rTEvt ) { // if ( nLastItemID == TT_SHOW && GetItemState( TT_SHOW ) == STATE_NOCHECK && ( rTEvt.IsTrackingEnded() || rTEvt.IsTrackingCanceled() ) ) -// SetDraging( FALSE ); +// SetDraging( sal_False ); if ( nLastItemID == TT_SHOW && GetItemState( TT_SHOW ) == STATE_NOCHECK ) EndTracking( ENDTRACK_CANCEL ); ToolBox::Tracking( rTEvt); @@ -1321,7 +1321,7 @@ void DisplayHidWin::Click() nLastItemID = GetCurItemId(); if ( nLastItemID == TT_SHOW ) { - SetDraging( TRUE ); + SetDraging( sal_True ); } ToolBox::Click(); } @@ -1333,8 +1333,8 @@ void DisplayHidWin::Select() SetItemState( GetCurItemId(), STATE_CHECK ); if ( GetCurItemId() == TT_SHOW ) { - bIsPermanentDraging = TRUE; - SetDraging( TRUE ); + bIsPermanentDraging = sal_True; + SetDraging( sal_True ); } } else @@ -1342,8 +1342,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 ) @@ -1352,7 +1352,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 ); @@ -1361,9 +1361,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 ) @@ -1404,8 +1404,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 ); } } @@ -1413,18 +1413,18 @@ 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) ) @@ -1447,7 +1447,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 ) @@ -1465,8 +1465,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 ); } @@ -1486,8 +1486,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 ); \ @@ -1624,15 +1624,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 ); @@ -1644,11 +1644,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(); } @@ -1672,9 +1672,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 ) ); @@ -1693,7 +1693,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() ) @@ -1702,7 +1702,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 ) @@ -1713,7 +1713,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; } @@ -1727,7 +1727,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; } @@ -1737,7 +1737,7 @@ IMPL_LINK( TranslateWin, DoSelect, PushButton*, EMPTYARG ) if ( bSelecting ) { // ReleaseMouse(); - bSelecting = FALSE; + bSelecting = sal_False; } else { @@ -1745,7 +1745,7 @@ IMPL_LINK( TranslateWin, DoSelect, PushButton*, EMPTYARG ) { PushButtonTT_PB_RESTORE.Disable(); // CaptureMouse(); - bSelecting = TRUE; + bSelecting = sal_True; } } return 0; @@ -1771,7 +1771,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; } @@ -1795,7 +1795,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; } @@ -1813,7 +1813,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); @@ -1877,7 +1877,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") ); @@ -1893,7 +1893,7 @@ long TranslateWin::VCLEventHook( NotifyEvent& rEvt ) PushButtonTT_PB_ACCEPT.Enable(); } // ReleaseMouse(); - bSelecting = FALSE; + bSelecting = sal_False; } } @@ -1907,11 +1907,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; } }; @@ -1921,7 +1921,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 ) @@ -1931,14 +1931,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 ); @@ -1958,7 +1958,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 { @@ -1972,7 +1972,7 @@ BOOL FindShortcutErrors::IsWinOK( Window *pWin ) (pChild->GetType() == WINDOW_PUSHBUTTON) ) { if ( !pChild->GetText().EqualsAscii( "..." ) ) - bMissing = TRUE; + bMissing = sal_True; } if ( pChild->GetType() == WINDOW_FIXEDTEXT ) @@ -2002,7 +2002,7 @@ BOOL FindShortcutErrors::IsWinOK( Window *pWin ) (pTempChild->GetType() == WINDOW_DATEBOX) || (pTempChild->GetType() == WINDOW_TIMEBOX) ) { - bMissing = TRUE; + bMissing = sal_True; } } } @@ -2050,22 +2050,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(); @@ -2075,8 +2075,8 @@ void TranslateWin::EnableTranslation() { PushButtonTT_PB_SELECT.Enable(); PushButtonTT_PB_NEXT.Enable(); - bAvailable = FALSE; - bNext = FALSE; + bAvailable = sal_False; + bNext = sal_False; } void StatementCommand::Translate() @@ -2085,11 +2085,11 @@ void StatementCommand::Translate() if( (nParams & PARAM_STR_1) && nLNr1 ) { String aDouble; - Window *pWin = SearchTree( Str2Id( aString1 ) ,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, nMethodId, aDouble ); return; @@ -2098,18 +2098,18 @@ void StatementCommand::Translate() 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 )->Enable( TRUE, TRUE ); - GetTTSettings()->pTranslateWin->GetWindow( WINDOW_OVERLAP )->EnableInput( TRUE, TRUE ); +// GetTTSettings()->pTranslateWin->GetWindow( WINDOW_OVERLAP )->Enable( sal_True, sal_True ); + GetTTSettings()->pTranslateWin->GetWindow( WINDOW_OVERLAP )->EnableInput( sal_True, sal_True ); if ( GetTTSettings()->pTranslateWin->IsTranslationAvailable() ) { @@ -2176,7 +2176,7 @@ void StatementCommand::Translate() pRet->GenReturn ( RET_Value, nMethodId, aTranslation ); GetTTSettings()->pTranslateWin->EnableTranslation(); - GetTTSettings()->bToTop = TRUE; + GetTTSettings()->bToTop = sal_True; } else { @@ -2184,7 +2184,7 @@ void StatementCommand::Translate() GetTTSettings()->pTranslateWin->EnableTranslation(); ErrorBox err( GetTTSettings()->pTranslateWin, TTProperties::GetSvtResId( TT_NO_CONTROL )); err.Execute(); - GetTTSettings()->bToTop = TRUE; + GetTTSettings()->bToTop = sal_True; } } @@ -2193,7 +2193,7 @@ void StatementCommand::Translate() pRet->GenReturn ( RET_Value, nMethodId, CUniString("1") ); GetTTSettings()->pTranslateWin->ResetNextDialog(); GetTTSettings()->pTranslateWin->LoseFocus(); - GetTTSettings()->bToTop = TRUE; + GetTTSettings()->bToTop = sal_True; } else { @@ -2280,7 +2280,7 @@ Window* StatementCommand::GetNextRecoverWin() return NULL; } -BOOL StatementCommand::Execute() +sal_Bool StatementCommand::Execute() { if ( IsError ) { @@ -2292,7 +2292,7 @@ BOOL StatementCommand::Execute() Advance(); delete this; - return TRUE; + return sal_True; } InitProfile(); @@ -2335,29 +2335,29 @@ 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 nUseBindings = 0; - bCatchGPF = TRUE; - bUsePostEvents = TRUE; + bCatchGPF = sal_True; + bUsePostEvents = sal_True; aSubMenuId1 = 0; aSubMenuId2 = 0; @@ -2371,7 +2371,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 @@ -2452,7 +2452,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(")")); @@ -2473,7 +2473,7 @@ BOOL StatementCommand::Execute() #endif break; } - return FALSE; + return sal_False; } else { @@ -2488,9 +2488,9 @@ BOOL StatementCommand::Execute() // 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; + nLNr1 = (sal_uLong)pControl; - return FALSE; + return sal_False; } } if ( nRetryCount-- @@ -2520,9 +2520,9 @@ BOOL StatementCommand::Execute() // nur bei TaskWindows! if ( (Window*)nLNr1 != pControl ) nNr1 = 1; // Zum durchprobieren der Buttons beim Schließen - nLNr1 = (ULONG)pControl; + nLNr1 = (sal_uLong)pControl; - return FALSE; + return sal_False; } } } @@ -2537,9 +2537,9 @@ BOOL StatementCommand::Execute() // Eigentlich nur bei TaskWindows! if ( (Window*)nLNr1 != pControl ) nNr1 = 1; // Zum durchprobieren der Buttons beim Schließen - nLNr1 = (ULONG)pControl; + nLNr1 = (sal_uLong)pControl; - return FALSE; + return sal_False; } } } @@ -2550,10 +2550,10 @@ 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, nMethodId, aString1); } @@ -2565,7 +2565,7 @@ BOOL StatementCommand::Execute() if ( !bBool1 ) { nLNr1 = Time().GetTime() + nNr1/10; - bBool1 = TRUE; + bBool1 = sal_True; } if ( !bIsSlotInExecute ) @@ -2573,7 +2573,7 @@ BOOL StatementCommand::Execute() else { if ( Time().GetTime() < long(nLNr1) ) // Aktuelle Zeit kleiner Endzeit - return FALSE; + return sal_False; pRet->GenReturn ( RET_Value, nMethodId, comm_USHORT(CONST_WSTimeout) ); } } @@ -2622,7 +2622,7 @@ BOOL StatementCommand::Execute() break; case RC_ApplicationBusy: { - BOOL bWait = FALSE; + sal_Bool bWait = sal_False; ReportError( GEN_RES_STR0( S_NO_ACTIVE_WINDOW ) ); // if ( Application::GetAppWindow() ) // bWait = Application::GetAppWindow()->IsWait(); @@ -2644,12 +2644,12 @@ BOOL StatementCommand::Execute() 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 @@ -2777,7 +2777,7 @@ BOOL StatementCommand::Execute() MenuBar *pMenuBar = NULL; Menu *pMenu; - USHORT nErr = GetCurrentMenues( pPopup, pMenuBar, pMenu ); + sal_uInt16 nErr = GetCurrentMenues( pPopup, pMenuBar, pMenu ); if ( !pMenu ) { @@ -2788,7 +2788,7 @@ BOOL StatementCommand::Execute() break; } - USHORT nItemCount = 0; + sal_uInt16 nItemCount = 0; switch ( nMethodId ) { case RC_MenuGetItemCount: @@ -2798,8 +2798,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--; @@ -2818,7 +2818,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: @@ -2827,9 +2827,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 ) ) @@ -2863,20 +2863,20 @@ BOOL StatementCommand::Execute() 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; } } } @@ -2911,7 +2911,7 @@ BOOL StatementCommand::Execute() break; case RC_MenuHasSubMenu: { - pRet->GenReturn ( RET_Value, nMethodId, (BOOL)(pMenu->GetPopupMenu(nNr1) != NULL) ); + pRet->GenReturn ( RET_Value, nMethodId, (sal_Bool)(pMenu->GetPopupMenu(nNr1) != NULL) ); } break; case RC_MenuSelect: @@ -3015,7 +3015,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 @@ -3038,7 +3038,7 @@ BOOL StatementCommand::Execute() } else { - USHORT nFlags = 0; + sal_uInt16 nFlags = 0; if ( (nParams & PARAM_USHORT_1) ) nDirFlags = nFlags = nNr1; else @@ -3051,7 +3051,7 @@ BOOL StatementCommand::Execute() 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 ) @@ -3147,7 +3147,7 @@ BOOL StatementCommand::Execute() if ( FSYS_ERR_OK == nErrorcode ) { FileStat aFS( aFile ); - pRet->GenReturn ( RET_Value, nMethodId, 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(); } } @@ -3308,7 +3308,7 @@ BOOL StatementCommand::Execute() } #if OSL_DEBUG_LEVEL > 1 - USHORT nEntries = Dir( aDestPath, FSYS_KIND_FILE | FSYS_KIND_DIR ).Count(); + sal_uInt16 nEntries = Dir( aDestPath, FSYS_KIND_FILE | FSYS_KIND_DIR ).Count(); (void) nEntries; /* avoid warning about unused parameter */ #endif // The Count is only larger than 2 is the path is a directory which is not empty @@ -3393,7 +3393,7 @@ BOOL StatementCommand::Execute() case RC_RecordMacro: { if ( ! (nParams & PARAM_BOOL_1) ) - bBool1 = TRUE; + bBool1 = sal_True; MacroRecorder::GetMacroRecorder()->SetActionRecord( bBool1 ); } @@ -3431,18 +3431,18 @@ BOOL StatementCommand::Execute() if( (nParams & PARAM_BOOL_1) ) bCatchGPF = bBool1; else - bCatchGPF = TRUE; + bCatchGPF = sal_True; } break; case RC_IsProduct : { - BOOL bIsProduct; + sal_Bool bIsProduct; #ifdef DBG_UTIL - bIsProduct = FALSE; + bIsProduct = sal_False; #else - bIsProduct = TRUE; + bIsProduct = sal_True; #endif - pRet->GenReturn ( RET_Value, nMethodId, (BOOL)bIsProduct ); + pRet->GenReturn ( RET_Value, nMethodId, (sal_Bool)bIsProduct ); } break; case RC_UsePostEvents : @@ -3450,7 +3450,7 @@ BOOL StatementCommand::Execute() if( (nParams & PARAM_BOOL_1) ) bUsePostEvents = bBool1; else - bUsePostEvents = TRUE; + bUsePostEvents = sal_True; } break; default: @@ -3458,38 +3458,38 @@ BOOL StatementCommand::Execute() } SendProfile( RcString(nMethodId) ); delete this; - return TRUE; + return sal_True; } -BOOL StatementCommand::UnpackStorage( SotStorageRef xStorage, DirEntry &aBaseDir ) +sal_Bool StatementCommand::UnpackStorage( SotStorageRef xStorage, DirEntry &aBaseDir ) { SvStorageInfoList aList; xStorage->FillInfoList( &aList ); - for( USHORT i = 0; i < aList.Count(); i++ ) + for( sal_uInt16 i = 0; i < aList.Count(); i++ ) { SvStorageInfo& rInfo = aList.GetObject( i ); String aName = rInfo.GetName(); DirEntry aPath ( aBaseDir ); aPath += DirEntry( aName ); - BOOL bIsStorage = xStorage->IsStorage( aName ); + sal_Bool bIsStorage = xStorage->IsStorage( aName ); if ( bIsStorage ) { SotStorageRef xSubStorage = xStorage->OpenSotStorage( aName, STREAM_STD_READ ); if ( xSubStorage->GetError() ) { ReportError( GEN_RES_STR2(S_UNPACKING_STORAGE_FAILED, aName, aPath.GetFull()) ); - return FALSE; + return sal_False; } UnpackStorage( xSubStorage, aPath ); } else { - if ( !aPath.MakeDir( TRUE ) ) + if ( !aPath.MakeDir( sal_True ) ) { ReportError( GEN_RES_STR1(S_CANNOT_CREATE_DIRECTORY, aPath.GetFull()) ); - return FALSE; + return sal_False; } SotStorageStreamRef xStream = xStorage->OpenSotStream( aName, STREAM_STD_READ ); SvFileStream aDestination( aPath.GetFull(), STREAM_STD_READWRITE | STREAM_TRUNC ); @@ -3497,18 +3497,18 @@ BOOL StatementCommand::UnpackStorage( SotStorageRef xStorage, DirEntry &aBaseDir if ( aDestination.GetError() != ERRCODE_NONE ) { ReportError( GEN_RES_STR2(S_UNPACKING_STORAGE_FAILED, aName, aPath.GetFull()) ); - return FALSE; + return sal_False; } aDestination.Close(); } } - return TRUE; + return sal_True; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -StatementControl::StatementControl( SCmdStream *pCmdIn, USHORT nControlIdType ) +StatementControl::StatementControl( SCmdStream *pCmdIn, sal_uInt16 nControlIdType ) : StatementList() , nNr1( 0 ) , nNr2( 0 ) @@ -3517,8 +3517,8 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, USHORT nControlIdType ) , nLNr1( 0 ) , aString1() , aString2() -, bBool1(FALSE) -, bBool2(FALSE) +, bBool1(sal_False) +, bBool2(sal_False) { QueStatement( NULL ); //HELPID BACKWARD (SIControl is no longer needed) @@ -3575,10 +3575,10 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, USHORT nControlIdType ) #endif } -BOOL IsDialog(Window *pWin) +sal_Bool IsDialog(Window *pWin) { // Alles was von SystemWindow abgeleitet ist if ( !pWin ) - return FALSE; + return sal_False; switch (pWin->GetType()) { @@ -3608,19 +3608,19 @@ BOOL IsDialog(Window *pWin) case WINDOW_PATHDIALOG: - return TRUE; + return sal_True; // break; default: - return FALSE; + return sal_False; // break; } } -BOOL IsAccessable(Window *pWin) +sal_Bool IsAccessable(Window *pWin) { if ( pWin == NULL ) - return FALSE; + return sal_False; return pWin->IsEnabled() && pWin->IsInputEnabled(); } @@ -3630,8 +3630,8 @@ BOOL IsAccessable(Window *pWin) // neue Hilfsfunktion static Window*ImpGetButton( Window *pBase, WinBits nMask, WinBits nWinBits ) { - USHORT n = pBase->GetChildCount(); - for( USHORT i = 0 ; i < n; i++ ) { + sal_uInt16 n = pBase->GetChildCount(); + for( sal_uInt16 i = 0 ; i < n; i++ ) { Window *pChild = pBase->GetChild(i); if( pChild->GetType() == WINDOW_OKBUTTON || pChild->GetType() == WINDOW_CANCELBUTTON @@ -3643,12 +3643,12 @@ static Window*ImpGetButton( Window *pBase, WinBits nMask, WinBits nWinBits ) return NULL; } -BOOL StatementControl::ControlOK( Window *pControl, const sal_Char* cBezeichnung ) +sal_Bool StatementControl::ControlOK( Window *pControl, const sal_Char* cBezeichnung ) { if ( pControl && ( ( ( IsAccessable(pControl) || (nMethodId & M_WITH_RETURN) ) && pControl->IsVisible() ) || aUId.equals( UID_ACTIVE ) ) ) - return TRUE; + return sal_True; else { UniString aBezeichnung( cBezeichnung, RTL_TEXTENCODING_ASCII_US ); @@ -3665,30 +3665,30 @@ BOOL StatementControl::ControlOK( Window *pControl, const sal_Char* cBezeichnung m_pDbgWin->AddText( aBezeichnung.AppendAscii(" NotFound or Disabled or Invisible") ); #endif - return FALSE; + return sal_False; } } -BOOL StatementList::ValueOK( rtl::OString aId, String aBezeichnung, ULONG nValue, ULONG nMax ) +sal_Bool StatementList::ValueOK( rtl::OString aId, String aBezeichnung, sal_uLong nValue, sal_uLong nMax ) { if ( nMax < nValue ) { if ( aBezeichnung.Len() > 0 ) ReportError( aId, GEN_RES_STR3( S_NUMBER_TOO_BIG, aBezeichnung, UniString::CreateFromInt32( nValue ), UniString::CreateFromInt32( nMax ) ) ); - return FALSE; + return sal_False; } if ( nValue < 1 ) { if ( aBezeichnung.Len() > 0 ) ReportError( aId, GEN_RES_STR3c3( S_NUMBER_TOO_SMALL, aBezeichnung, UniString::CreateFromInt32( nValue ), "1" ) ); - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } -USHORT StatementList::GetCurrentMenues( PopupMenu *&pPopup, MenuBar *&pMenuBar, Menu *&pMenu ) +sal_uInt16 StatementList::GetCurrentMenues( PopupMenu *&pPopup, MenuBar *&pMenuBar, Menu *&pMenu ) { if ( WinPtrValid( pMenuWindow ) ) pMenuBar = pMenuWindow->GetMenuBar(); @@ -3774,7 +3774,7 @@ void StatementControl::AnimateMouse( Window *pControl, Point aWohin ) aDiff *= 1000; aDiff /= nSteps; - StatementList::bExecuting = TRUE; // Bah ist das ein ekliger Hack + StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack // Das verhindert, daß schon der nächste Befehl ausgeführt wird. for ( ; nSteps ; nSteps-- ) @@ -3787,37 +3787,37 @@ void StatementControl::AnimateMouse( Window *pControl, Point aWohin ) SafeReschedule(); } pControl->SetPointerPosPixel(aZiel); - StatementList::bExecuting = FALSE; // Bah ist das ein ekliger Hack + StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack } -BOOL StatementControl::MaybeDoTypeKeysDelay( Window *pTestWindow ) +sal_Bool StatementControl::MaybeDoTypeKeysDelay( Window *pTestWindow ) { if ( bDoTypeKeysDelay ) { - ULONG nTimeWait = nMinTypeKeysDelay; + sal_uLong nTimeWait = nMinTypeKeysDelay; if ( nMaxTypeKeysDelay != nMinTypeKeysDelay ) nTimeWait += Time::GetSystemTicks() % ( nMaxTypeKeysDelay - nMinTypeKeysDelay ); Timer aTimer; aTimer.SetTimeout( nTimeWait ); aTimer.Start(); - StatementList::bExecuting = TRUE; // Bah ist das ein ekliger Hack + StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack // Das verhindert, daß schon der nächste Befehl ausgeführt wird. while ( aTimer.IsActive() ) { - SafeReschedule( TRUE ); + SafeReschedule( sal_True ); } - StatementList::bExecuting = FALSE; // Bah ist das ein ekliger Hack + StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack if ( !WinPtrValid(pTestWindow ) ) { ReportError( aUId, GEN_RES_STR1( S_WINDOW_DISAPPEARED, MethodString( nMethodId ) ) ); - return FALSE; + return sal_False; } } - return TRUE; + return sal_True; } -BOOL StatementControl::HandleVisibleControls( Window *pControl ) +sal_Bool StatementControl::HandleVisibleControls( Window *pControl ) { if( pControl ) // Also auch bei Disabled nicht jedoch bei Invisible { @@ -3912,15 +3912,15 @@ BOOL StatementControl::HandleVisibleControls( Window *pControl ) nParams |= PARAM_USHORT_2; nParams |= PARAM_USHORT_3; nParams |= PARAM_USHORT_4; - nNr1 = (USHORT)-aStart.X(); - nNr2 = (USHORT)-aStart.Y(); - nNr3 = (USHORT)pControl->GetSizePixel().Width() + 2*(USHORT)aStart.X(); - nNr4 = (USHORT)pControl->GetSizePixel().Height() + 2*(USHORT)aStart.Y(); + nNr1 = (sal_uInt16)-aStart.X(); + nNr2 = (sal_uInt16)-aStart.Y(); + nNr3 = (sal_uInt16)pControl->GetSizePixel().Width() + 2*(sal_uInt16)aStart.X(); + nNr4 = (sal_uInt16)pControl->GetSizePixel().Height() + 2*(sal_uInt16)aStart.Y(); } - nNr1 = std::max((USHORT)-aStart.X(),nNr1); - nNr2 = std::max((USHORT)-aStart.Y(),nNr2); - nNr3 = std::min((USHORT)(pControl->GetSizePixel().Width() + 2*(USHORT)aStart.X()),nNr3); - nNr4 = std::min((USHORT)(pControl->GetSizePixel().Height() + 2*(USHORT)aStart.Y()),nNr4); + nNr1 = std::max((sal_uInt16)-aStart.X(),nNr1); + nNr2 = std::max((sal_uInt16)-aStart.Y(),nNr2); + nNr3 = std::min((sal_uInt16)(pControl->GetSizePixel().Width() + 2*(sal_uInt16)aStart.X()),nNr3); + nNr4 = std::min((sal_uInt16)(pControl->GetSizePixel().Height() + 2*(sal_uInt16)aStart.Y()),nNr4); } if( nParams & PARAM_USHORT_4 ) { // Zuschneiden @@ -3943,7 +3943,7 @@ BOOL StatementControl::HandleVisibleControls( Window *pControl ) break; case M_GetFixedTextCount: { - pRet->GenReturn ( RET_Value, aUId, CountWinByRT( pControl, WINDOW_FIXEDTEXT, TRUE ) ); + pRet->GenReturn ( RET_Value, aUId, CountWinByRT( pControl, WINDOW_FIXEDTEXT, sal_True ) ); } break; case M_GetFixedText: @@ -3951,23 +3951,23 @@ BOOL StatementControl::HandleVisibleControls( Window *pControl ) if( ( nParams & PARAM_USHORT_1 ) == 0 ) nNr1 = 1; - FixedText* pFixedText = (FixedText*)GetWinByRT( pControl, WINDOW_FIXEDTEXT, TRUE, nNr1-1 ); + FixedText* pFixedText = (FixedText*)GetWinByRT( pControl, WINDOW_FIXEDTEXT, sal_True, nNr1-1 ); if ( pFixedText ) pRet->GenReturn ( RET_Value, aUId, pFixedText->GetText() ); else - ValueOK(aUId, MethodString( nMethodId ),nNr1,CountWinByRT( pControl, WINDOW_FIXEDTEXT, TRUE ) ); + ValueOK(aUId, MethodString( nMethodId ),nNr1,CountWinByRT( pControl, WINDOW_FIXEDTEXT, sal_True ) ); } break; default: - return FALSE; + return sal_False; } SendProfile( UIdString( aUId ).Append('.').Append( MethodString( nMethodId ) ) ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL StatementControl::HandleCommonMethods( Window *pControl ) +sal_Bool StatementControl::HandleCommonMethods( Window *pControl ) { switch( nMethodId ) // Diese können an jedem Window ausgeführt werden { @@ -3995,14 +3995,14 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl ) if( !(nParams & PARAM_USHORT_1) ) // Anzahl wiederholungen nNr1 = 1; if( !(nParams & PARAM_BOOL_1) ) // Follow Focus - bBool1 = FALSE; // so bleibt das bisherige Verhalten + bBool1 = sal_False; // so bleibt das bisherige Verhalten if ( !bBool1 ) // Altes Verhalten pControl->GrabFocus(); else // If focus is not inside given control we grab it once. { Window *pFocus = GetpApp()->GetFocusWindow(); - if ( !pFocus || !pControl->IsWindowOrChild( pFocus, TRUE ) ) + if ( !pFocus || !pControl->IsWindowOrChild( pFocus, sal_True ) ) pControl->GrabFocus(); } @@ -4011,7 +4011,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl ) if ( pControl->GetType() == WINDOW_COMBOBOX ) { // Bei COMBOBOX an das Edit direkt liefern Window *pTemp = NULL; - for ( USHORT i = 0 ; i < pControl->GetChildCount() && !pTemp ; i++ ) + for ( sal_uInt16 i = 0 ; i < pControl->GetChildCount() && !pTemp ; i++ ) if ( pControl->GetChild( i )->GetType() == WINDOW_EDIT ) pTemp = pControl->GetChild( i ); if ( pTemp ) @@ -4025,22 +4025,22 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl ) if ( StatementList::bUsePostEvents ) { // grab focus every time Window *pFocus = GetpApp()->GetFocusWindow(); - if ( !pFocus || !pControl->IsWindowOrChild( pFocus, TRUE ) ) + if ( !pFocus || !pControl->IsWindowOrChild( pFocus, sal_True ) ) pControl->GrabFocus(); } if ( bBool1 ) // Jedesmal das FocusWindow finden { Window *pFocus = GetpApp()->GetFocusWindow(); - if ( pFocus && pControl->IsWindowOrChild( pFocus, TRUE ) ) + if ( pFocus && pControl->IsWindowOrChild( pFocus, sal_True ) ) pDeliverHere = pFocus; else // sonst fallback auf das Basisfenster pDeliverHere = pControl; } pDeliverHere = pDeliverHere->GetPreferredKeyInputWindow(); KeyEvent aEvent; - if ( ((USHORT)aString1.GetChar(i)) <= 7 ) + if ( ((sal_uInt16)aString1.GetChar(i)) <= 7 ) { - USHORT nVal = 0; + sal_uInt16 nVal = 0; switch (aString1.GetChar(i)) { case 1: nVal = aString1.GetChar(i+1) + (aString1.GetChar(i+2) << 8); @@ -4057,8 +4057,8 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl ) } // #105672# // find out the keycode - USHORT nKeygroup = nVal & KEYGROUP_TYPE; - USHORT nKeyCode = nVal & KEY_CODE; + sal_uInt16 nKeygroup = nVal & KEYGROUP_TYPE; + sal_uInt16 nKeyCode = nVal & KEY_CODE; sal_Unicode aCh; switch (nKeygroup) { @@ -4103,7 +4103,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl ) else if ( aCh >= '0' && aCh <= '9' ) aEvent = KeyEvent(aCh, KeyCode(KEYGROUP_NUM + aCh-'0', 0)); else if ( aPrintableMisc.Search(aCh) != STRING_NOTFOUND ) - aEvent = KeyEvent(aCh, KeyCode(KEYGROUP_MISC + (USHORT)aPrintableMisc.Search(aCh), 0)); + aEvent = KeyEvent(aCh, KeyCode(KEYGROUP_MISC + (sal_uInt16)aPrintableMisc.Search(aCh), 0)); else // Sollte eigentlich nicht auftreten aEvent = KeyEvent(aCh, KeyCode()); } @@ -4117,7 +4117,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl ) break; #define CalcMouseButton\ - USHORT nButton = MOUSE_LEFT;\ + sal_uInt16 nButton = MOUSE_LEFT;\ if ( (nParams & PARAM_USHORT_3) )\ {\ switch ( nNr3 )\ @@ -4224,7 +4224,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl ) pDlg->SetText(UniString("Schließen", RTL_TEXTENCODING_ISO_8859_1)); pDlg->Show(); pMyEd->Show(); - ULONG nTime = Time().GetTime(); + sal_uLong nTime = Time().GetTime(); while (pDlg->IsVisible()) { @@ -4262,7 +4262,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl ) } else { - BOOL bAtMousePos = ( nParams & PARAM_BOOL_1 ) && bBool1; + sal_Bool bAtMousePos = ( nParams & PARAM_BOOL_1 ) && bBool1; if ( bAtMousePos ) { aPos = pControl->GetPointerPosPixel(); @@ -4386,7 +4386,7 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl ) StatusBar *pStatus = NULL; while ( !pStatus && pControl ) { - pStatus = (StatusBar*)GetWinByRT( pControl, WINDOW_STATUSBAR, TRUE ); + pStatus = (StatusBar*)GetWinByRT( pControl, WINDOW_STATUSBAR, sal_True ); pControl = pControl->GET_REAL_PARENT(); } @@ -4463,10 +4463,10 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl ) ScrollBar *pScroll = NULL; - USHORT nSteps = 2; + sal_uInt16 nSteps = 2; while ( !pScroll && pControl && nSteps-- ) { - pScroll = GetScrollBar( pControl, nNr1, TRUE ); + pScroll = GetScrollBar( pControl, nNr1, sal_True ); pControl = pControl->GET_REAL_PARENT(); } @@ -4475,9 +4475,9 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl ) case M_HasScrollBar: { if ( pScroll ) - pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)TRUE ); + pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_True ); else - pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)FALSE ); + pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_False ); } break; case M_IsScrollBarEnabled: @@ -4494,16 +4494,16 @@ BOOL StatementControl::HandleCommonMethods( Window *pControl ) } break; default: - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } -BOOL StatementControl::Execute() +sal_Bool StatementControl::Execute() { Window *pControl; - BOOL bStatementDone = TRUE; + sal_Bool bStatementDone = sal_True; if ( IsError ) @@ -4517,7 +4517,7 @@ BOOL StatementControl::Execute() #endif Advance(); delete this; - return TRUE; + return sal_True; } InitProfile(); @@ -4534,7 +4534,7 @@ BOOL StatementControl::Execute() pControl = GetAnyActive(); else { - BOOL bSearchButtonOnToolbox = (nParams == PARAM_NONE) && ((M_Click == nMethodId) || (M_TearOff == nMethodId) || (M_IsEnabled == nMethodId) || (M_OpenMenu == nMethodId)); + sal_Bool bSearchButtonOnToolbox = (nParams == PARAM_NONE) && ((M_Click == nMethodId) || (M_TearOff == nMethodId) || (M_IsEnabled == nMethodId) || (M_OpenMenu == nMethodId)); bSearchButtonOnToolbox |= (nParams == PARAM_USHORT_1) && (M_GetState == nMethodId); if ( nMethodId == M_TypeKeys || nMethodId == M_MouseDown || nMethodId == M_MouseUp || nMethodId == M_MouseMove @@ -4575,10 +4575,10 @@ BOOL StatementControl::Execute() case M_Exists: case M_NotExists: Time aT; - USHORT aSeconds = aT.GetMin()*60+aT.GetSec(); - if ( !bBool2 ) // wurde im Konstruktor auf FALSE gesetzt + sal_uInt16 aSeconds = aT.GetMin()*60+aT.GetSec(); + if ( !bBool2 ) // wurde im Konstruktor auf sal_False gesetzt { - bBool2 = TRUE; + bBool2 = sal_True; nNr2 = aSeconds; if( !(nParams & PARAM_USHORT_1) ) nNr1 = 0; // defaultmäßig sofort zurück @@ -4591,17 +4591,17 @@ BOOL StatementControl::Execute() if ( ((nMethodId == M_Exists) && pControl) || ((nMethodId == M_NotExists) && !pControl) ) { // Wenn Bedingung erfüllt - pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)TRUE ); + pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_True ); } else if ( aSeconds <= nNr2 + nNr1 ) // Zeit ist noch nicht abgelaufen - return FALSE; + return sal_False; else - pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)FALSE ); + pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)sal_False ); Advance(); delete this; - return TRUE; + return sal_True; // break; } @@ -4646,7 +4646,7 @@ BOOL StatementControl::Execute() #if OSL_DEBUG_LEVEL > 1 m_pDbgWin->AddText( CUniString("Reschedule command (").Append( UniString::CreateFromInt32(nRetryCount) ).AppendAscii(")\n") ); #endif - return FALSE; + return sal_False; } if( ControlOK( pControl, "" ) ) @@ -4654,8 +4654,8 @@ BOOL StatementControl::Execute() if ( nMethodId == M_OpenContextMenu && !bBool2 ) { pControl->GrabFocus(); // to get asyncron focus on unix - bBool2 = TRUE; - return FALSE; + bBool2 = sal_True; + return sal_False; } // TODO: handle GetFocus for all Methods and Windows like this (remove part below) // See for impact of changed focus for HandleVisibleControls() (taking Snapshots might be different, possible exclude those methods) @@ -4674,12 +4674,12 @@ BOOL StatementControl::Execute() { SafeReschedule(); if ( !WinPtrValid( pControl ) ) - return FALSE; + return sal_False; } if ( !pControl->HasFocus() ) // to get asyncronous focus { - bBool2 = TRUE; - return FALSE; + bBool2 = sal_True; + return sal_False; } } } @@ -4690,7 +4690,7 @@ BOOL StatementControl::Execute() if ( HandleVisibleControls( pControl ) ) { delete this; - return TRUE; + return sal_True; } if( ControlOK( pControl, "Window/Control" ) ) { @@ -4714,7 +4714,7 @@ BOOL StatementControl::Execute() { // Hier wird das Statement auf ein TypeKeys umgebogen nMethodId = M_TypeKeys; nParams = PARAM_BOOL_1 | PARAM_STR_1; - bBool1 = TRUE; + bBool1 = sal_True; pControl->GrabFocus(); } */ @@ -4758,8 +4758,8 @@ BOOL StatementControl::Execute() case M_SetPage : { // Wegen lokaler Variablen TabControl *pTControl = ((TabControl*)pControl); - USHORT nActive = pTControl->GetCurPageId(); - USHORT i,anz; + sal_uInt16 nActive = pTControl->GetCurPageId(); + sal_uInt16 i,anz; rtl::OString aID; rtl::OString aWantedID; //HELPID BACKWARD (No numbers please (remove PARAM_ULONG_1 part) @@ -4956,21 +4956,21 @@ BOOL StatementControl::Execute() case M_Select: case M_MultiSelect: { - BOOL bUnselectBeforeSelect = ( nMethodId == M_Select ); - BOOL bFehler = FALSE; + sal_Bool bUnselectBeforeSelect = ( nMethodId == M_Select ); + sal_Bool bFehler = sal_False; if ( ! (nParams & PARAM_BOOL_1) ) - bBool1 = TRUE; + bBool1 = sal_True; if ( nMethodId == M_MultiSelect && nRT == C_ListBox ) { ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "ListBox" ) ); - bFehler = TRUE; + bFehler = sal_True; } if ( !bBool1 && nMethodId == M_Select ) { ReportError( aUId, GEN_RES_STR1( S_NO_SELECT_FALSE, MethodString( nMethodId ) ) ); - bFehler = TRUE; + bFehler = sal_True; } if ( !bFehler ) @@ -4978,7 +4978,7 @@ BOOL StatementControl::Execute() if( nParams & PARAM_STR_1 ) { ListBox *pLB = ((ListBox*)pControl); - USHORT nPos; + sal_uInt16 nPos; if ( (nPos = pLB->GetEntryPos( aString1 )) == LISTBOX_ENTRY_NOTFOUND ) ReportError( aUId, GEN_RES_STR2( S_ENTRY_NOT_FOUND, MethodString( nMethodId ), aString1 ) ); else @@ -5033,7 +5033,7 @@ BOOL StatementControl::Execute() break; case M_GetSelIndex : { - USHORT nPos = ((ComboBox*)pControl)->GetEntryPos(((ComboBox*)pControl)->GetText()); + sal_uInt16 nPos = ((ComboBox*)pControl)->GetEntryPos(((ComboBox*)pControl)->GetText()); if ( nPos == COMBOBOX_ENTRY_NOTFOUND ) nPos = 0; else @@ -5118,10 +5118,10 @@ BOOL StatementControl::Execute() ((MoreButton*)pControl)->Click(); break; case M_Open : - ((MoreButton*)pControl)->SetState(TRUE); + ((MoreButton*)pControl)->SetState(sal_True); break; case M_Close : - ((MoreButton*)pControl)->SetState(FALSE); + ((MoreButton*)pControl)->SetState(sal_False); break; default: ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "MoreButton" ) ); @@ -5219,8 +5219,8 @@ BOOL StatementControl::Execute() aMEvnt = MouseEvent( aPt,1,MOUSE_SIMPLECLICK,MOUSE_LEFT ); ImplMouseButtonDown( pControl, aMEvnt, FORCE_DIRECT_CALL ); - ULONG nStart = Time::GetSystemTicks(); - ULONG nDelay = pControl->GetSettings().GetMouseSettings().GetActionDelay(); + sal_uLong nStart = Time::GetSystemTicks(); + sal_uLong nDelay = pControl->GetSettings().GetMouseSettings().GetActionDelay(); while ( ( Time::GetSystemTicks() - nStart ) < nDelay + 100 ) SafeReschedule(); @@ -5252,8 +5252,8 @@ BOOL StatementControl::Execute() } #define FIND_ITEM\ - USHORT nItemPos = 0;\ - BOOL bItemFound = FALSE;\ + sal_uInt16 nItemPos = 0;\ + sal_Bool bItemFound = sal_False;\ {\ rtl::OString aButtonId;\ if( nParams & PARAM_STR_1 )\ @@ -5270,12 +5270,12 @@ BOOL StatementControl::Execute() if ( !pTB->IsItemEnabled( pTB->GetItemId(nItemPos) ) && nMethodId != _M_IsEnabled && nMethodId != M_GetState )\ {\ ReportError( aUId, GEN_RES_STR1( S_BUTTON_DISABLED_ON_TOOLBOX, MethodString( nMethodId ) ) );\ - bItemFound = FALSE;\ + bItemFound = sal_False;\ }\ else if ( !pTB->IsItemVisible( pTB->GetItemId(nItemPos) ) && nMethodId != M_GetState )\ {\ ReportError( aUId, GEN_RES_STR1( S_BUTTON_HIDDEN_ON_TOOLBOX, MethodString( nMethodId ) ) );\ - bItemFound = FALSE;\ + bItemFound = sal_False;\ }\ else\ {\ @@ -5286,10 +5286,10 @@ BOOL StatementControl::Execute() { /* Try the multi line way */\ if ( pTB->GetItemRect(pTB->GetItemId(nItemPos)).IsEmpty() )\ {\ - USHORT nLine = pTB->GetCurLine();\ + sal_uInt16 nLine = pTB->GetCurLine();\ do\ {\ - pTB->ShowLine( FALSE );\ + pTB->ShowLine( sal_False );\ for ( int i = 1 ; i < 30 ; i++ )\ SafeReschedule();\ }\ @@ -5299,7 +5299,7 @@ BOOL StatementControl::Execute() if ( pTB->GetItemRect(pTB->GetItemId(nItemPos)).IsEmpty() )\ {\ ReportError( aUId, GEN_RES_STR1( S_CANNOT_MAKE_BUTTON_VISIBLE_IN_TOOLBOX, MethodString( nMethodId ) ) );\ - bItemFound = FALSE;\ + bItemFound = sal_False;\ }\ }\ }\ @@ -5354,13 +5354,13 @@ BOOL StatementControl::Execute() Window *pWin = NULL; // Wait for the window to open. - StatementList::bExecuting = TRUE; // Bah ist das ein ekliger Hack + StatementList::bExecuting = sal_True; // Bah ist das ein ekliger Hack { // Das verhindert, daß schon der nächste Befehl ausgeführt wird. Time aDelay; while ( !pWin && ( (pWin = GetPopupFloatingWin()) == NULL ) && ( Time() - aDelay ).GetSec() < 15 ) SafeReschedule(); } - StatementList::bExecuting = FALSE; // Bah ist das ein ekliger Hack + StatementList::bExecuting = sal_False; // Bah ist das ein ekliger Hack if ( pWin && pWin->GetType() == WINDOW_FLOATINGWINDOW ) { @@ -5495,9 +5495,9 @@ BOOL StatementControl::Execute() if ( pThisEntry ) { SvLBoxString* pItem = NULL; - USHORT nValidTextItemCount = 0; + sal_uInt16 nValidTextItemCount = 0; { - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; SvLBoxItem *pMyItem; while ( ( nValidTextItemCount < nNr1 ) && nIndex < pThisEntry->ItemCount() ) { @@ -5535,7 +5535,7 @@ BOOL StatementControl::Execute() break; case M_Select : if ( ! (nParams & PARAM_BOOL_1) ) - bBool1 = TRUE; + bBool1 = sal_True; if( nParams & PARAM_STR_1 ) { /* ListBox *pLB = ((ListBox*)pControl); @@ -5747,7 +5747,7 @@ BOOL StatementControl::Execute() break; case C_Control: { - USHORT nRealControlType = 0; + sal_uInt16 nRealControlType = 0; if ( dynamic_cast< EditBrowseBox* >(pControl) ) nRealControlType = CONST_CTBrowseBox; else if ( dynamic_cast< ValueSet* >(pControl) ) @@ -5779,40 +5779,40 @@ BOOL StatementControl::Execute() /* - BOOL MakeFieldVisible( long nRow, USHORT nColId, BOOL bComplete = FALSE ); + sal_Bool MakeFieldVisible( long nRow, sal_uInt16 nColId, sal_Bool bComplete = sal_False ); // access to dynamic values of cursor row - String GetColumnTitle( USHORT nColumnId ) const; - USHORT GetColumnId( USHORT nPos ) const; - USHORT GetColumnPos( USHORT nColumnId ) const; + String GetColumnTitle( sal_uInt16 nColumnId ) const; + sal_uInt16 GetColumnId( sal_uInt16 nPos ) const; + sal_uInt16 GetColumnPos( sal_uInt16 nColumnId ) const; // access and movement of cursor long GetCurRow() const { return nCurRow; } - USHORT GetCurColumnId() const { return nCurColId; } - BOOL GoToRow( long nRow ); - BOOL GoToRowAndDoNotModifySelection( long nRow ); - BOOL GoToColumnId( USHORT nColId ); - BOOL GoToRowColumnId( long nRow, USHORT nColId ); + sal_uInt16 GetCurColumnId() const { return nCurColId; } + sal_Bool GoToRow( long nRow ); + sal_Bool GoToRowAndDoNotModifySelection( long nRow ); + sal_Bool GoToColumnId( sal_uInt16 nColId ); + sal_Bool GoToRowColumnId( long nRow, sal_uInt16 nColId ); // selections void SetNoSelection(); void SelectAll(); - void SelectRow( long nRow, BOOL bSelect = TRUE, BOOL bExpand = TRUE ); - void SelectColumnPos( USHORT nCol, BOOL bSelect = TRUE ) - { SelectColumnPos( nCol, bSelect, TRUE); } - void SelectColumnId( USHORT nColId, BOOL bSelect = TRUE ) - { SelectColumnPos( GetColumnPos(nColId), bSelect, TRUE); } + void SelectRow( long nRow, sal_Bool bSelect = sal_True, sal_Bool bExpand = sal_True ); + void SelectColumnPos( sal_uInt16 nCol, sal_Bool bSelect = sal_True ) + { SelectColumnPos( nCol, bSelect, sal_True); } + void SelectColumnId( sal_uInt16 nColId, sal_Bool bSelect = sal_True ) + { SelectColumnPos( GetColumnPos(nColId), bSelect, sal_True); } long GetSelectRowCount() const; - USHORT GetSelectColumnCount() const; - BOOL IsRowSelected( long nRow ) const; - BOOL IsColumnSelected( USHORT nColumnId ) const; - long FirstSelectedRow( BOOL bInverse = FALSE ); - long LastSelectedRow( BOOL bInverse = FALSE ); + sal_uInt16 GetSelectColumnCount() const; + sal_Bool IsRowSelected( long nRow ) const; + sal_Bool IsColumnSelected( sal_uInt16 nColumnId ) const; + long FirstSelectedRow( sal_Bool bInverse = sal_False ); + long LastSelectedRow( sal_Bool bInverse = sal_False ); long PrevSelectedRow(); long NextSelectedRow(); const MultiSelection* GetSelection() const { return bMultiSelection ? uRow.pSel : 0; } void SetSelection( const MultiSelection &rSelection ); - virtual String GetCellText(long _nRow, USHORT _nColId) const; - USHORT GetColumnCount() const { return ColCount(); } + virtual String GetCellText(long _nRow, sal_uInt16 _nColId) const; + sal_uInt16 GetColumnCount() const { return ColCount(); } protected: virtual long GetRowCount() const; @@ -5839,9 +5839,9 @@ protected: break; case M_GetColumnCount : { - USHORT nColCount = pEBBox->GetColumnCount(); + sal_uInt16 nColCount = pEBBox->GetColumnCount(); comm_USHORT nUnfrozenColCount = 0; - USHORT i; + sal_uInt16 i; for ( i=0 ; i < nColCount ; i++ ) { if ( !pEBBox->IsFrozen( pEBBox->GetColumnId( i ) ) ) @@ -5866,9 +5866,9 @@ protected: { if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,pEBBox->GetRowCount() ) ) { - USHORT nColCount = pEBBox->GetColumnCount(); + sal_uInt16 nColCount = pEBBox->GetColumnCount(); comm_USHORT nUnfrozenColCount = 0; - USHORT i; + sal_uInt16 i; for ( i=0 ; i < nColCount ; i++ ) { if ( !pEBBox->IsFrozen( pEBBox->GetColumnId( i ) ) ) @@ -5920,7 +5920,7 @@ protected: break; case M_Select : if ( ! (nParams & PARAM_BOOL_1) ) - bBool1 = TRUE; + bBool1 = sal_True; if( nParams & PARAM_STR_1 ) { / * ListBox *pLB = ((ListBox*)pControl); @@ -6065,13 +6065,13 @@ protected: else if ( (nParams & PARAM_STR_1) ) { pELB->select( aString1 ); - BOOL bSuccess = TRUE; + sal_Bool bSuccess = sal_True; if ( pELB->getSelIndex() == EXTENSION_LISTBOX_ENTRY_NOTFOUND ) - bSuccess = FALSE; + bSuccess = sal_False; else { if ( !aString1.Equals( String( pELB->getItemName( pELB->getSelIndex() ) ) ) ) - bSuccess = FALSE; + bSuccess = sal_False; } if ( !bSuccess ) ReportError( aUId, GEN_RES_STR2( S_ENTRY_NOT_FOUND, MethodString( nMethodId ), aString1 ) ); @@ -6289,13 +6289,13 @@ protected: break; case M_Dock : if ( ((DockingWindow*)pControl)->IsFloatingMode() ) - ((DockingWindow*)pControl)->SetFloatingMode(FALSE); + ((DockingWindow*)pControl)->SetFloatingMode(sal_False); else ReportError( aUId, GEN_RES_STR1( S_ALLOWED_ONLY_IN_FLOATING_MODE, MethodString( nMethodId ) ) ); break; case M_Undock : if ( !((DockingWindow*)pControl)->IsFloatingMode() ) - ((DockingWindow*)pControl)->SetFloatingMode(TRUE); + ((DockingWindow*)pControl)->SetFloatingMode(sal_True); else ReportError( aUId, GEN_RES_STR1( S_ALLOWED_ONLY_IN_FLOATING_MODE, MethodString( nMethodId ) ) ); break; @@ -6478,14 +6478,14 @@ protected: pRet->GenReturn ( RET_Value, aUId, comm_BOOL (!((WorkWindow*)pControl)->IsMaximized() && !((WorkWindow*)pControl)->IsMinimized()) ); break; case M_Minimize : - ((WorkWindow*)pControl)->Maximize( FALSE ); + ((WorkWindow*)pControl)->Maximize( sal_False ); ((WorkWindow*)pControl)->Minimize(); break; case M_Maximize : ((WorkWindow*)pControl)->Maximize(); break; case M_Restore : - ((WorkWindow*)pControl)->Maximize( FALSE ); + ((WorkWindow*)pControl)->Maximize( sal_False ); ((WorkWindow*)pControl)->Restore(); break; case M_Help: // Alles was unten weiterbehandelt werden soll @@ -6504,7 +6504,7 @@ protected: case C_ErrorBox: case C_QueryBox: { - BOOL bDone = TRUE; + sal_Bool bDone = sal_True; MessBox* pMB = (MessBox*)pControl; switch( nMethodId ) { @@ -6515,17 +6515,17 @@ protected: pRet->GenReturn ( RET_Value, aUId, comm_BOOL( pMB->GetCheckBoxState() == STATE_CHECK) ); break; case M_Check : - pMB->SetCheckBoxState( TRUE ); + pMB->SetCheckBoxState( sal_True ); break; case M_UnCheck : - pMB->SetCheckBoxState( FALSE ); + pMB->SetCheckBoxState( sal_False ); break; case M_GetText : pRet->GenReturn ( RET_Value, aUId, pMB->GetMessText()); break; default: - bDone = FALSE; + bDone = sal_False; break; } if ( bDone ) @@ -6547,9 +6547,6 @@ protected: AnimateMouse( pControl, Mitte); break; case M_OK: -#if ( BUTTONID_OK != RET_OK ) -#error BUTTONID_OK != RET_OK -#endif if ( pBD->GetPushButton( BUTTONID_OK ) ) { SET_WINP_CLOSING(pControl); @@ -6699,7 +6696,7 @@ protected: } else { - bStatementDone=TRUE; + bStatementDone=sal_True; } } return bStatementDone; diff --git a/automation/source/server/statemnt.hxx b/automation/source/server/statemnt.hxx index 61f3ad52309e..42f8dbf05d1a 100644 --- a/automation/source/server/statemnt.hxx +++ b/automation/source/server/statemnt.hxx @@ -92,9 +92,9 @@ extern "C" #define GET_REAL_PARENT() GetWindow( WINDOW_REALPARENT ) // switch behaviour of ImplMouse* and ImplKeyInput -#define FORCE_DIRECT_CALL TRUE +#define FORCE_DIRECT_CALL sal_True -typedef USHORT SearchFlags; +typedef sal_uInt16 SearchFlags; #define SEARCH_NOOVERLAP ((SearchFlags) 0x0001) #define SEARCH_NO_TOPLEVEL_WIN ((SearchFlags) 0x0002) #define SEARCH_FOCUS_FIRST ((SearchFlags) 0x0004) @@ -107,15 +107,15 @@ public: Search( SearchFlags nSearchFlags = 0): nmSearchFlags(nSearchFlags) {} virtual ~Search() {} - virtual BOOL IsWinOK( Window *pWin ) = 0; + virtual sal_Bool IsWinOK( Window *pWin ) = 0; SearchFlags GetSearchFlags() { return nmSearchFlags; } void AddSearchFlags( SearchFlags aNewFlags ) { nmSearchFlags |= aNewFlags; } void RemoveSearchFlags( SearchFlags aRemoveFlags ) { nmSearchFlags &= ( ~aRemoveFlags ); } - BOOL HasSearchFlag( SearchFlags aQueryFlag ) { return (nmSearchFlags & aQueryFlag) == aQueryFlag; } + sal_Bool HasSearchFlag( SearchFlags aQueryFlag ) { return (nmSearchFlags & aQueryFlag) == aQueryFlag; } }; -BOOL IsDialog(Window *pWin); // Ist *pWin von SystemWindow abgeleitet (Kann es Active sein) -BOOL IsAccessable(Window *pWin); // Ist *pWin Zugreifbar (über IsEnabled und Parents geprüft) +sal_Bool IsDialog(Window *pWin); // Ist *pWin von SystemWindow abgeleitet (Kann es Active sein) +sal_Bool IsAccessable(Window *pWin); // Ist *pWin Zugreifbar (über IsEnabled und Parents geprüft) //class SafePointer : CriticalSection @@ -126,7 +126,7 @@ public: SafePointer() { pSelf = this; } virtual ~SafePointer() { DBG_ASSERT(pSelf==this,"Destructor von Nicht existierendem Objekt aufgerufen"); pSelf = NULL; } -// static BOOL IsValid( SafePointer *pThis ) { return pThis == pThis->pSelf; } +// static sal_Bool IsValid( SafePointer *pThis ) { return pThis == pThis->pSelf; } // virtual operator -> (); { DBG_ASSERT(pMyself == this,"-> von Nicht existierendem Objekt aufgerufen"); } }; @@ -146,7 +146,7 @@ struct TTSettings // Translate TranslateWin *pTranslateWin; - BOOL bToTop; + sal_Bool bToTop; }; @@ -162,37 +162,37 @@ private: protected: StatementList(); - USHORT nRetryCount; + sal_uInt16 nRetryCount; void QueStatement(StatementList *pAfterThis); - BOOL bStatementInQue; - static USHORT nUseBindings; + sal_Bool bStatementInQue; + static sal_uInt16 nUseBindings; static TTProfiler *pProfiler; void InitProfile(); void SendProfile( String aText ); static StatementList *pCurrentProfileStatement; - static BOOL bIsInReschedule; - static USHORT nModalCount; + static sal_Bool bIsInReschedule; + static sal_uInt16 nModalCount; static Window *pLastFocusWindow; // Wenn dieses sich ändert wird Safe Reschedule abgebrochen - static BOOL bWasDragManager; // Wenn dieses sich ändert wird Safe Reschedule abgebrochen - static BOOL bWasPopupMenu; // Wenn dieses sich ändert wird Safe Reschedule abgebrochen - static BOOL bBasicWasRunning; + static sal_Bool bWasDragManager; // Wenn dieses sich ändert wird Safe Reschedule abgebrochen + static sal_Bool bWasPopupMenu; // Wenn dieses sich ändert wird Safe Reschedule abgebrochen + static sal_Bool bBasicWasRunning; - static USHORT nMinTypeKeysDelay; /// Verzögerung der einzelnen Anschläge für TypeKeys - static USHORT nMaxTypeKeysDelay; - static BOOL bDoTypeKeysDelay; + static sal_uInt16 nMinTypeKeysDelay; /// Verzögerung der einzelnen Anschläge für TypeKeys + static sal_uInt16 nMaxTypeKeysDelay; + static sal_Bool bDoTypeKeysDelay; static Window* pFirstDocFrame; - static BOOL bIsSlotInExecute; + static sal_Bool bIsSlotInExecute; public: - static BOOL IsInReschedule() { return bIsInReschedule; } - void SafeReschedule( BOOL bYield = FALSE ) // Setzt Flag, so daß nicht schon der nächste Befehl ausgeführt wird + static sal_Bool IsInReschedule() { return bIsInReschedule; } + void SafeReschedule( sal_Bool bYield = sal_False ) // Setzt Flag, so daß nicht schon der nächste Befehl ausgeführt wird { nModalCount = Application::GetModalModeCount(); - bIsInReschedule = TRUE; + bIsInReschedule = sal_True; pLastFocusWindow = GetpApp()->GetFocusWindow(); bWasDragManager = false /*!= DragManager::GetDragManager()*/; bWasPopupMenu = NULL != PopupMenu::GetActivePopupMenu(); @@ -203,17 +203,17 @@ public: else GetpApp()->Reschedule(); bExecuting = bWasExecuting; - bBasicWasRunning = FALSE; - bWasPopupMenu = FALSE; - bWasDragManager = FALSE; + bBasicWasRunning = sal_False; + bWasPopupMenu = sal_False; + bWasDragManager = sal_False; pLastFocusWindow = NULL; - bIsInReschedule = FALSE; + bIsInReschedule = sal_False; nModalCount = 0; } - static BOOL MaybeResetSafeReschedule() + static sal_Bool MaybeResetSafeReschedule() { // Implementierung muß hier zwar nicht sein, ist aber übersichtlicher so if ( !bIsInReschedule ) - return FALSE; + return sal_False; if ( pLastFocusWindow != GetpApp()->GetFocusWindow() || ( Application::GetModalModeCount() > nModalCount ) @@ -221,12 +221,12 @@ public: || ( PopupMenu::GetActivePopupMenu() && !bWasPopupMenu ) || ( StarBASIC::IsRunning() && !bBasicWasRunning ) ) { - bIsInReschedule = FALSE; + bIsInReschedule = sal_False; pLastFocusWindow = NULL; - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } static void NormalReschedule() // Setzt das flag nicht { @@ -235,84 +235,84 @@ public: #define Reschedule RescheduleNichtBenutzen_StattdessenSafeRescheduleAnStatementList static Window* GetMouseWin(); - static BOOL WinPtrValid(Window *pTest); - static Window* SearchAllWin( Window *pBase, Search &aSearch, BOOL MaybeBase = TRUE ); + static sal_Bool WinPtrValid(Window *pTest); + static Window* SearchAllWin( Window *pBase, Search &aSearch, sal_Bool MaybeBase = sal_True ); protected: - static Window* SearchClientWin( Window *pBase, Search &aSearch, BOOL MaybeBase = TRUE ); - - Window* SearchTree( rtl::OString aUId, BOOL bSearchButtonOnToolbox = FALSE ); - Window* GetActive( WindowType nRT, BOOL MaybeBase = TRUE ); - Window* GetFocus( WindowType nRT, BOOL MaybeBase = TRUE ); - Window* GetAnyActive( BOOL MaybeBase = TRUE ); - ScrollBar* GetScrollBar( Window *pBase, USHORT nDirection, BOOL MaybeBase = TRUE ); - Window* GetPopupFloatingWin( BOOL MaybeBase = TRUE ); + static Window* SearchClientWin( Window *pBase, Search &aSearch, sal_Bool MaybeBase = sal_True ); + + Window* SearchTree( rtl::OString aUId, sal_Bool bSearchButtonOnToolbox = sal_False ); + Window* GetActive( WindowType nRT, sal_Bool MaybeBase = sal_True ); + Window* GetFocus( WindowType nRT, sal_Bool MaybeBase = sal_True ); + Window* GetAnyActive( sal_Bool MaybeBase = sal_True ); + ScrollBar* GetScrollBar( Window *pBase, sal_uInt16 nDirection, sal_Bool MaybeBase = sal_True ); + Window* GetPopupFloatingWin( sal_Bool MaybeBase = sal_True ); Menu* GetMatchingMenu( Window* pWin, Menu* pBaseMenu = NULL ); - Window* GetWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase = TRUE, USHORT nSkip = 0, BOOL bSearchAll = FALSE ); - USHORT CountWinByRT( Window *pBase, WindowType nRT, BOOL MaybeBase = TRUE ); - Window* GetDocWin( USHORT nNr ); - USHORT GetDocWinCount(); - Window* GetFadeSplitWin( Window *pBase, WindowAlign nAlign, BOOL MaybeBase = TRUE ); - BOOL ValueOK(rtl::OString nId, String aBezeichnung, ULONG nValue, ULONG nMax); + Window* GetWinByRT( Window *pBase, WindowType nRT, sal_Bool MaybeBase = sal_True, sal_uInt16 nSkip = 0, sal_Bool bSearchAll = sal_False ); + sal_uInt16 CountWinByRT( Window *pBase, WindowType nRT, sal_Bool MaybeBase = sal_True ); + Window* GetDocWin( sal_uInt16 nNr ); + sal_uInt16 GetDocWinCount(); + Window* GetFadeSplitWin( Window *pBase, WindowAlign nAlign, sal_Bool MaybeBase = sal_True ); + sal_Bool ValueOK(rtl::OString nId, String aBezeichnung, sal_uLong nValue, sal_uLong nMax); - USHORT GetCurrentMenues( PopupMenu *&pPopup, MenuBar *&pMenuBar, Menu *&pMenu ); + sal_uInt16 GetCurrentMenues( PopupMenu *&pPopup, MenuBar *&pMenuBar, Menu *&pMenu ); public: // void AddStatement( StatementList *pNewStatement ); virtual ~StatementList(); void Advance(); - virtual BOOL Execute() = 0; + virtual sal_Bool Execute() = 0; /*************************************************************************** ** Bestimmt erst den nächsten Befehl, setzt Current ** und führt dann aus. ** Returnwert gibt an, ob Befehl nochmal ausgeführt ** werden soll. Dann muß auch der UserEvent verlassen werden, um der Applikation ** normales Arbeiten zu ermöglichen (Dialog schliessen) -** TRUE bedeutet, dass alles klar gegangen ist -** FALSE bedeutet nochmal Bitte +** sal_True bedeutet, dass alles klar gegangen ist +** sal_False bedeutet nochmal Bitte ***************************************************************************/ void ReportError(String aMessage); void ReportError(rtl::OString aUId, String aMessage); - void ReportError(String aMessage, ULONG nWhatever); + void ReportError(String aMessage, sal_uLong nWhatever); - static void DirectLog( ULONG nType, String aString ); + static void DirectLog( sal_uLong nType, String aString ); String Tree(Window *pBase, int Indent); String ClientTree(Window *pBase, int Indent); StatementList *pNext; static StatementList /**pCurrent,*/ *pFirst; - static BOOL bReadingCommands; + static sal_Bool bReadingCommands; static rtl::OString aWindowWaitUId; static Window *pWindowWaitPointer; static rtl::OString aWindowWaitOldHelpId; static rtl::OString aWindowWaitOldUniqueId; static RetStream *pRet; - static BOOL IsError; - static BOOL bDying; - static BOOL bExecuting; // Gesetzt, wenn ein Befehl rescheduled ohne einen neuen Befehl zu erlauben - BOOL bWasExecuting; // Wurde bei einem MaybeResetSafeReschedule resettet, so wird der Zustand danach wiederhergestellt - static USHORT aSubMenuId1; // Untermenüs bei PopupMenus - static USHORT aSubMenuId2; // erstmal 2-Stufig - static USHORT aSubMenuId3; // and now even 3 levels #i31512# + static sal_Bool IsError; + static sal_Bool bDying; + static sal_Bool bExecuting; // Gesetzt, wenn ein Befehl rescheduled ohne einen neuen Befehl zu erlauben + sal_Bool bWasExecuting; // Wurde bei einem MaybeResetSafeReschedule resettet, so wird der Zustand danach wiederhergestellt + static sal_uInt16 aSubMenuId1; // Untermenüs bei PopupMenus + static sal_uInt16 aSubMenuId2; // erstmal 2-Stufig + static sal_uInt16 aSubMenuId3; // and now even 3 levels #i31512# static SystemWindow *pMenuWindow; // when using MenuBar as base for MenuCommands static TTProperties *pTTProperties; // Hier stehen die SlotIDs aus dem SFX drin - BOOL CheckWindowWait(); //True heisst, dass Window noch existiert + sal_Bool CheckWindowWait(); //True heisst, dass Window noch existiert //False -> Window weg; static void SetFirstDocFrame( Window* pWin ); static Window* GetFirstDocFrame(); - static BOOL IsFirstDocFrame( Window* pWin ); - static BOOL IsDocWin( Window* pWin ); - static BOOL IsIMEWin( Window* pWin ); // Input Window for CJK under Solaris - static BOOL IsDocFrame( Window* pWin ); + static sal_Bool IsFirstDocFrame( Window* pWin ); + static sal_Bool IsDocWin( Window* pWin ); + static sal_Bool IsIMEWin( Window* pWin ); // Input Window for CJK under Solaris + static sal_Bool IsDocFrame( Window* pWin ); static MenuBar* GetDocFrameMenuBar( Window* pWin ); - static USHORT GetDocFrameCount(); + static sal_uInt16 GetDocFrameCount(); - static BOOL bCatchGPF; + static sal_Bool bCatchGPF; - static BOOL bUsePostEvents; // use Application::Post*Event or own impl to handle key and mouseevents + static sal_Bool bUsePostEvents; // use Application::Post*Event or own impl to handle key and mouseevents #if OSL_DEBUG_LEVEL > 1 static EditWindow *m_pDbgWin; @@ -322,20 +322,20 @@ public: class StatementSlot : public StatementList //Slots aufrufen { protected: - USHORT nAnzahl; + sal_uInt16 nAnzahl; SfxPoolItem **pItemArr; ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> aArgs; - USHORT nFunctionId; // can get removed when the old (numeric) slothandling is removed + sal_uInt16 nFunctionId; // can get removed when the old (numeric) slothandling is removed String aUnoUrl; - BOOL bMenuClosed; + sal_Bool bMenuClosed; StatementSlot(); void AddReferer(); public: StatementSlot( SCmdStream *pIn ); - StatementSlot( ULONG nSlot, SfxPoolItem* pItem = NULL ); + StatementSlot( sal_uLong nSlot, SfxPoolItem* pItem = NULL ); virtual ~StatementSlot(); - virtual BOOL Execute(); + virtual sal_Bool Execute(); }; class StatementUnoSlot : public StatementSlot //Uno Slots aufrufen @@ -348,32 +348,32 @@ class StatementCommand : public StatementList // Befehl ausführen (wintree, re { friend class ImplRemoteControl; protected: - USHORT nMethodId; - USHORT nParams; + sal_uInt16 nMethodId; + sal_uInt16 nParams; comm_USHORT nNr1,nNr2,nNr3,nNr4; comm_ULONG nLNr1; String aString1,aString2; - BOOL bBool1,bBool2; + sal_Bool bBool1,bBool2; Window* GetNextOverlap( Window* pBase ); Window* GetNextRecoverWin(); - static USHORT nDirPos; + static sal_uInt16 nDirPos; static Dir *pDir; static pfunc_osl_printDebugMessage pOriginal_osl_DebugMessageFunc; - BOOL UnpackStorage( SotStorageRef xStorage, DirEntry &aBaseDir ); + sal_Bool UnpackStorage( SotStorageRef xStorage, DirEntry &aBaseDir ); void HandleSAXParser(); public: StatementCommand( SCmdStream *pIn ); - StatementCommand( StatementList *pAfterThis, USHORT MethodId, USHORT Params, USHORT Nr1 ); - virtual BOOL Execute(); - BOOL DisplayHID(); + StatementCommand( StatementList *pAfterThis, sal_uInt16 MethodId, sal_uInt16 Params, sal_uInt16 Nr1 ); + virtual sal_Bool Execute(); + sal_Bool DisplayHID(); void Translate(); - void WriteControlData( Window *pBase, ULONG nConf, BOOL bFirst = TRUE ); + void WriteControlData( Window *pBase, sal_uLong nConf, sal_Bool bFirst = sal_True ); }; @@ -384,46 +384,46 @@ class StatementControl : public StatementList { protected: rtl::OString aUId; - USHORT nMethodId; - USHORT nParams; + sal_uInt16 nMethodId; + sal_uInt16 nParams; comm_USHORT nNr1,nNr2,nNr3,nNr4; comm_ULONG nLNr1; String aString1,aString2; - BOOL bBool1,bBool2; - BOOL ControlOK( Window *pControl, const sal_Char* aBezeichnung ); + sal_Bool bBool1,bBool2; + sal_Bool ControlOK( Window *pControl, const sal_Char* aBezeichnung ); void AnimateMouse( Window *pControl, TTHotSpots aWohin ); void AnimateMouse( Window *pControl, Point aWohin ); - BOOL MaybeDoTypeKeysDelay( Window *pTestWindow ); + sal_Bool MaybeDoTypeKeysDelay( Window *pTestWindow ); - BOOL HandleVisibleControls( Window *pControl ); - BOOL HandleCommonMethods( Window *pControl ); + sal_Bool HandleVisibleControls( Window *pControl ); + sal_Bool HandleCommonMethods( Window *pControl ); public: - StatementControl( SCmdStream *pIn, USHORT nControlType ); - virtual BOOL Execute(); + StatementControl( SCmdStream *pIn, sal_uInt16 nControlType ); + virtual sal_Bool Execute(); }; class StatementFlow : public StatementList // Kommunikation mit Sequence { - USHORT nArt; + sal_uInt16 nArt; - USHORT nParams; + sal_uInt16 nParams; comm_USHORT nSNr1; comm_ULONG nLNr1; String aString1; - BOOL bBool1; + sal_Bool bBool1; public: - StatementFlow (ULONG nServiceId, SCmdStream *pIn, ImplRemoteControl *pRC ); - StatementFlow( StatementList *pAfterThis, USHORT nArtP ); - virtual BOOL Execute(); + StatementFlow (sal_uLong nServiceId, SCmdStream *pIn, ImplRemoteControl *pRC ); + StatementFlow( StatementList *pAfterThis, sal_uInt16 nArtP ); + virtual sal_Bool Execute(); static CommunicationLink *pCommLink; - static BOOL bSending; + static sal_Bool bSending; - static BOOL bUseIPC; // Soll zur rückmeldung IPC verwendet werden? + static sal_Bool bUseIPC; // Soll zur rückmeldung IPC verwendet werden? static ImplRemoteControl *pRemoteControl; // Static für 2. Constructor private: @@ -435,10 +435,10 @@ class SearchUID : public Search Window *pMaybeResult; Window *pAlternateResult; rtl::OString aUId; - BOOL bSearchButtonOnToolbox; + sal_Bool bSearchButtonOnToolbox; public: - SearchUID( rtl::OString aUIdP, BOOL bSearchButtonOnToolboxP ): Search( SEARCH_FOCUS_FIRST ), pMaybeResult(NULL), pAlternateResult(NULL), aUId(aUIdP), bSearchButtonOnToolbox(bSearchButtonOnToolboxP) {} - virtual BOOL IsWinOK( Window *pWin ); + SearchUID( rtl::OString aUIdP, sal_Bool bSearchButtonOnToolboxP ): Search( SEARCH_FOCUS_FIRST ), pMaybeResult(NULL), pAlternateResult(NULL), aUId(aUIdP), bSearchButtonOnToolbox(bSearchButtonOnToolboxP) {} + virtual sal_Bool IsWinOK( Window *pWin ); Window* GetMaybeWin() { return pMaybeResult; } Window* GetAlternateResultWin() { return pAlternateResult; } }; @@ -447,52 +447,52 @@ class SearchActive : public Search WindowType nRT; public: SearchActive( WindowType nRTP ): nRT(nRTP) {} - virtual BOOL IsWinOK( Window *pWin ); + virtual sal_Bool IsWinOK( Window *pWin ); }; class SearchPopupFloatingWin : public Search { public: SearchPopupFloatingWin(): Search( SEARCH_FOCUS_FIRST ) {} - virtual BOOL IsWinOK( Window *pWin ); + virtual sal_Bool IsWinOK( Window *pWin ); }; class SearchRT : public Search { WindowType mnRT; - USHORT mnSkip; - USHORT mnCount; + sal_uInt16 mnSkip; + sal_uInt16 mnCount; public: - SearchRT( WindowType nRTP, SearchFlags nSearchFlags, USHORT nSkip = 0 ): Search(nSearchFlags), mnRT(nRTP), mnSkip( nSkip ), mnCount( 0 ) {} - virtual BOOL IsWinOK( Window *pWin ); - USHORT GetCount(){ return mnCount; } + SearchRT( WindowType nRTP, SearchFlags nSearchFlags, sal_uInt16 nSkip = 0 ): Search(nSearchFlags), mnRT(nRTP), mnSkip( nSkip ), mnCount( 0 ) {} + virtual sal_Bool IsWinOK( Window *pWin ); + sal_uInt16 GetCount(){ return mnCount; } }; class SearchScroll : public SearchRT { - USHORT nDirection; + sal_uInt16 nDirection; public: - SearchScroll( USHORT nDir, SearchFlags nSearchFlags ): SearchRT(WINDOW_SCROLLBAR, nSearchFlags), nDirection(nDir) {} - virtual BOOL IsWinOK( Window *pWin ); + SearchScroll( sal_uInt16 nDir, SearchFlags nSearchFlags ): SearchRT(WINDOW_SCROLLBAR, nSearchFlags), nDirection(nDir) {} + virtual sal_Bool IsWinOK( Window *pWin ); }; class SearchWinPtr : public Search { Window *pTest; public: SearchWinPtr( Window *pTestP ): pTest(pTestP) {} - virtual BOOL IsWinOK( Window *pWin ); + virtual sal_Bool IsWinOK( Window *pWin ); }; class SearchFadeSplitWin : public Search { WindowAlign nAlign; public: SearchFadeSplitWin( WindowAlign nAlignP ): nAlign(nAlignP) {} - virtual BOOL IsWinOK( Window *pWin ); + virtual sal_Bool IsWinOK( Window *pWin ); }; -void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, BOOL bForceDirect=FALSE ); -void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect=FALSE ); -void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect=FALSE ); -void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, BOOL bForceDirect=FALSE ); +void ImplKeyInput( Window* pWin, KeyEvent &aKEvnt, sal_Bool bForceDirect=sal_False ); +void ImplMouseMove( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect=sal_False ); +void ImplMouseButtonDown( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect=sal_False ); +void ImplMouseButtonUp( Window* pWin, MouseEvent &aMEvnt, sal_Bool bForceDirect=sal_False ); void ImplCommand( Window* pWin, CommandEvent &aCmdEvnt ); -void ImplEventWait( ULONG nID ); +void ImplEventWait( sal_uLong nID ); #endif diff --git a/automation/source/simplecm/packethandler.cxx b/automation/source/simplecm/packethandler.cxx index 91f787fbff2f..bafd277ca422 100644 --- a/automation/source/simplecm/packethandler.cxx +++ b/automation/source/simplecm/packethandler.cxx @@ -85,8 +85,8 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen ) nLen = 0; pData = NULL; - comm_BOOL bWasError = FALSE; - comm_BOOL bForceMultiChannelThisPacket = FALSE; + comm_BOOL bWasError = sal_False; + comm_BOOL bForceMultiChannelThisPacket = sal_False; if ( pReceiver ) { comm_UINT32 nBytes = 0; @@ -95,14 +95,14 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen ) READ_SOCKET( &nBytes, sizeof(nBytes) ) if ( bWasError ) - return FALSE; + return sal_False; if ( 0xFFFFFFFF == nBytes ) // Expliziter Request für dieses Datenpaket auf MultiChannel umzuschalten { READ_SOCKET( &nBytes, sizeof(nBytes) ) if ( bWasError ) - return FALSE; - bForceMultiChannelThisPacket = TRUE; + return sal_False; + bForceMultiChannelThisPacket = sal_True; } nBytes = NETDWORD( nBytes ); @@ -143,13 +143,13 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen ) default: { DBG_ERROR("Unbekannter Headertyp in der Kommunikation"); - bWasError = TRUE; + bWasError = sal_True; } } if ( bWasError ) - return FALSE; + return sal_False; /// Längen anpassen und ggf restheader überlesen. while ( nHeaderBytes > nHeaderReadSoFar ) @@ -181,12 +181,12 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen ) if ( bWasError ) { ::operator delete(pData), pData = 0; - return FALSE; + return sal_False; } nLen = nBytes; } else - bWasError = TRUE; + bWasError = sal_True; return !bWasError; } @@ -204,7 +204,7 @@ comm_BOOL PacketHandler::ReceiveData( void* &pData, comm_UINT32 &nLen ) comm_BOOL PacketHandler::TransferData( const void* pData, comm_UINT32 nLen, CMProtocol nProtocol ) { comm_UINT32 nBuffer = nLen; - comm_BOOL bWasError = FALSE; + comm_BOOL bWasError = sal_False; #ifndef FORCE_MULTI_CHANNEL_HEADERS if ( bMultiChannel ) @@ -254,7 +254,7 @@ comm_BOOL PacketHandler::TransferData( const void* pData, comm_UINT32 nLen, CMPr comm_BOOL PacketHandler::SendHandshake( HandshakeType aHandshakeType, const void* pData, comm_UINT32 nLen ) { - comm_BOOL bWasError = FALSE; + comm_BOOL bWasError = sal_False; comm_UINT32 nBuffer = 0; diff --git a/automation/source/simplecm/packethandler.hxx b/automation/source/simplecm/packethandler.hxx index ce0c22c100c9..cb62f07343df 100644 --- a/automation/source/simplecm/packethandler.hxx +++ b/automation/source/simplecm/packethandler.hxx @@ -56,7 +56,7 @@ protected: comm_UINT16 nReceiveHeaderType; public: - PacketHandler( ITransmiter* pTransmitter_, IReceiver* pReceiver_, comm_BOOL bMC = FALSE ); + PacketHandler( ITransmiter* pTransmitter_, IReceiver* pReceiver_, comm_BOOL bMC = sal_False ); comm_UINT16 GetReceiveProtocol() { return nReceiveProtocol; } comm_UINT16 GetReceiveHeaderType() { return nReceiveHeaderType; } diff --git a/automation/source/simplecm/simplecm.cxx b/automation/source/simplecm/simplecm.cxx index bebd4fc9b206..74a86f343677 100644 --- a/automation/source/simplecm/simplecm.cxx +++ b/automation/source/simplecm/simplecm.cxx @@ -54,11 +54,11 @@ CommunicationLink::CommunicationLink( CommunicationManager *pMan ) : pMyManager(pMan) , pServiceData(NULL) , nServiceProtocol( 0 ) -, bIsInsideCallback( FALSE ) +, bIsInsideCallback( sal_False ) , nTotalBytes( 0 ) , maApplication("Undefined") #if OSL_DEBUG_LEVEL > 1 -, bFlag( FALSE ) +, bFlag( sal_False ) , nSomething( 0 ) #endif { @@ -68,7 +68,7 @@ CommunicationLink::~CommunicationLink() { #if OSL_DEBUG_LEVEL > 1 if ( !bFlag ) // bFlag will be set if deletion is expected else we can set a breakpoint - bFlag = FALSE; + bFlag = sal_False; #endif if ( pMyManager ) pMyManager->DestroyingLink( this ); @@ -102,14 +102,14 @@ IMPL_LINK( CommunicationLink, DataReceived, void*, EMPTYARG ) return 1; } -BOOL CommunicationLink::DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol ) +sal_Bool CommunicationLink::DoTransferDataStream( SvStream *pDataStream, CMProtocol nProtocol ) { INFO_MSG( CByteString("S :").Append( GetCommunicationPartner( CM_FQDN ) ), CByteString("Daten Senden:").Append( GetCommunicationPartner( CM_FQDN ) ), CM_SEND, this ); - BOOL bWasError = FALSE; + sal_Bool bWasError = sal_False; - UINT32 nBuffer; + sal_uInt32 nBuffer; nBuffer = pDataStream->SeekRel(0) +1; bWasError = pPacketHandler->TransferData( ((SvMemoryStream*)pDataStream)->GetData(), nBuffer, nProtocol ) != C_ERROR_NONE; @@ -123,7 +123,7 @@ BOOL CommunicationLink::DoTransferDataStream( SvStream *pDataStream, CMProtocol return !bWasError; } -BOOL CommunicationLink::TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol ) +sal_Bool CommunicationLink::TransferDataStream( SvStream *pDataStream, CMProtocol nProtocol ) { aLastAccess = DateTime(); nTotalBytes += pDataStream->Seek( STREAM_SEEK_TO_END ); @@ -142,7 +142,7 @@ SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( Communicatio , aMyName() , pStreamSocket( pSocket ) , pReceiveStream( NULL ) -, bIsRequestShutdownPending( FALSE ) +, bIsRequestShutdownPending( sal_False ) { pTCPIO = new TCPIO( pStreamSocket ); pPacketHandler = new PacketHandler( (ITransmiter*) pTCPIO, pTCPIO, pMyManager->IsMultiChannel() ); @@ -165,7 +165,7 @@ void SimpleCommunicationLinkViaSocket::SetStreamSocket( vos::OStreamSocket* pSoc pStreamSocket = pSocket; } -BOOL SimpleCommunicationLinkViaSocket::StopCommunication() +sal_Bool SimpleCommunicationLinkViaSocket::StopCommunication() { CommunicationLinkRef rHold(this); // avoid deleting this link before the end of the method if ( !IsCommunicationError() ) // Meaning that the Communication is still runnung @@ -176,7 +176,7 @@ BOOL SimpleCommunicationLinkViaSocket::StopCommunication() SendHandshake( CH_REQUEST_ShutdownLink ); } WaitForShutdown(); - return TRUE; + return sal_True; } void SimpleCommunicationLinkViaSocket::SetFinalRecieveTimeout() @@ -188,7 +188,7 @@ void SimpleCommunicationLinkViaSocket::SetFinalRecieveTimeout() } } -BOOL SimpleCommunicationLinkViaSocket::IsCommunicationError() +sal_Bool SimpleCommunicationLinkViaSocket::IsCommunicationError() { return !pStreamSocket; } @@ -273,9 +273,9 @@ SvStream* SimpleCommunicationLinkViaSocket::GetBestCommunicationStream() if ( !bWasError )\ {nTotal += nLength;} -BOOL SimpleCommunicationLinkViaSocket::DoReceiveDataStream() +sal_Bool SimpleCommunicationLinkViaSocket::DoReceiveDataStream() { - BOOL bWasError = FALSE; + sal_Bool bWasError = sal_False; void* pBuffer = NULL; comm_UINT32 nLen; bWasError = pPacketHandler->ReceiveData( pBuffer, nLen ) != C_ERROR_NONE; @@ -284,7 +284,7 @@ BOOL SimpleCommunicationLinkViaSocket::DoReceiveDataStream() pReceiveStream = GetBestCommunicationStream(); DBG_ASSERT( pReceiveStream->IsA() == ID_MEMORYSTREAM, "CommunicationStream is not an SvMemoryStream. Communication has to be reimplemented here!"); if ( pReceiveStream->IsA() == ID_MEMORYSTREAM ) - ((SvMemoryStream*)pReceiveStream)->SetBuffer( pBuffer, nLen, TRUE, nLen ); + ((SvMemoryStream*)pReceiveStream)->SetBuffer( pBuffer, nLen, sal_True, nLen ); DBG_ASSERT( pReceiveStream, "Datastream is NULL"); } @@ -307,13 +307,13 @@ void SimpleCommunicationLinkViaSocket::SetNewPacketAsCurrent() nServiceHeaderType = pPacketHandler->GetReceiveHeaderType(); } -BOOL SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeType, SvStream* pData ) +sal_Bool SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeType, SvStream* pData ) { - BOOL bWasError; + sal_Bool bWasError; if ( pData ) { - UINT32 nBuffer; + sal_uInt32 nBuffer; nBuffer = pData->Seek( STREAM_SEEK_TO_END ); bWasError = !pPacketHandler->SendHandshake( aHandshakeType, ((SvMemoryStream*)pData)->GetData(), nBuffer ); } @@ -337,7 +337,7 @@ BOOL SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeTy case CH_RESPONSE_HandshakeAlive: break; case CH_REQUEST_ShutdownLink: - bIsRequestShutdownPending = TRUE; + bIsRequestShutdownPending = sal_True; break; case CH_ShutdownLink: break; @@ -371,24 +371,24 @@ void SimpleCommunicationLinkViaSocketWithReceiveCallbacks::WaitForShutdown() ReceiveDataStream(); } -BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ReceiveDataStream() +sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ReceiveDataStream() { if ( DoReceiveDataStream() ) { SetNewPacketAsCurrent(); StartCallback(); DataReceived(); - return TRUE; + return sal_True; } else { StartCallback(); ShutdownCommunication(); - return FALSE; + return sal_False; } } -BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication() +sal_Bool SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication() { if ( GetStreamSocket() ) GetStreamSocket()->shutdown(); @@ -402,14 +402,14 @@ BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication ConnectionClosed(); - return TRUE; + return sal_True; } -CommunicationManager::CommunicationManager( BOOL bUseMultiChannel ) +CommunicationManager::CommunicationManager( sal_Bool bUseMultiChannel ) : nInfoType( CM_NONE ) -, bIsCommunicationRunning( FALSE ) +, bIsCommunicationRunning( sal_False ) , maApplication("Unknown") , bIsMultiChannel( bUseMultiChannel ) { @@ -420,18 +420,18 @@ CommunicationManager::~CommunicationManager() xLastNewLink.Clear(); } -BOOL CommunicationManager::StartCommunication( String aApp, String aParams ) +sal_Bool CommunicationManager::StartCommunication( String aApp, String aParams ) { (void) aApp; /* avoid warning about unused parameter */ (void) aParams; /* avoid warning about unused parameter */ - return FALSE; + return sal_False; } -BOOL CommunicationManager::StartCommunication( ByteString aHost, ULONG nPort ) +sal_Bool CommunicationManager::StartCommunication( ByteString aHost, sal_uLong nPort ) { (void) aHost; /* avoid warning about unused parameter */ (void) nPort; /* avoid warning about unused parameter */ - return FALSE; + return sal_False; } ByteString CommunicationManager::GetMyName( CM_NameType ) @@ -446,7 +446,7 @@ void CommunicationManager::CallConnectionOpened( CommunicationLink* pCL ) pCL->StartCallback(); // Sollte bereits vor dem Aufruf gerufen werden pCL->aStart = DateTime(); pCL->aLastAccess = pCL->aStart; - bIsCommunicationRunning = TRUE; + bIsCommunicationRunning = sal_True; pCL->SetApplication( GetApplication() ); xLastNewLink = pCL; @@ -493,7 +493,7 @@ void CommunicationManager::CallDataReceived( CommunicationLink* pCL ) if ( CH_Handshake == pCL->nServiceHeaderType ) { SvStream *pData = pCL->GetServiceData(); - USHORT nType; + sal_uInt16 nType; pData->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); // Unfortulately it is written this way :(( *pData >> nType; pData->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); @@ -565,12 +565,12 @@ void CommunicationManager::CallInfoMsg( InfoString aMsg ) InfoMsg( aMsg ); } -void CommunicationManager::SetApplication( const ByteString& aApp, BOOL bRunningLinks ) +void CommunicationManager::SetApplication( const ByteString& aApp, sal_Bool bRunningLinks ) { maApplication = aApp; if ( bRunningLinks ) { - USHORT i; + sal_uInt16 i; for ( i = 0 ; i < GetCommunicationLinkCount() ; i++ ) GetCommunicationLink( i )->SetApplication( aApp ); } @@ -578,7 +578,7 @@ void CommunicationManager::SetApplication( const ByteString& aApp, BOOL bRunning -SingleCommunicationManager::SingleCommunicationManager( BOOL bUseMultiChannel ) +SingleCommunicationManager::SingleCommunicationManager( sal_Bool bUseMultiChannel ) : CommunicationManager( bUseMultiChannel ) { xActiveLink = NULL; @@ -592,31 +592,31 @@ SingleCommunicationManager::~SingleCommunicationManager() pInactiveLink->InvalidateManager(); } -BOOL SingleCommunicationManager::StopCommunication() +sal_Bool SingleCommunicationManager::StopCommunication() { if ( xActiveLink.Is() ) { - BOOL bSuccess = xActiveLink->StopCommunication(); + sal_Bool bSuccess = xActiveLink->StopCommunication(); if ( pInactiveLink ) pInactiveLink->InvalidateManager(); pInactiveLink = xActiveLink; xActiveLink.Clear(); return bSuccess; } - return TRUE; + return sal_True; } -BOOL SingleCommunicationManager::IsLinkValid( CommunicationLink* pCL ) +sal_Bool SingleCommunicationManager::IsLinkValid( CommunicationLink* pCL ) { return &xActiveLink == pCL; } -USHORT SingleCommunicationManager::GetCommunicationLinkCount() +sal_uInt16 SingleCommunicationManager::GetCommunicationLinkCount() { return IsCommunicationRunning()?1:0; } -CommunicationLinkRef SingleCommunicationManager::GetCommunicationLink( USHORT ) +CommunicationLinkRef SingleCommunicationManager::GetCommunicationLink( sal_uInt16 ) { return xActiveLink; } @@ -644,7 +644,7 @@ void SingleCommunicationManager::CallConnectionClosed( CommunicationLink* pCL ) pInactiveLink->InvalidateManager(); pInactiveLink = xActiveLink; xActiveLink.Clear(); - bIsCommunicationRunning = FALSE; + bIsCommunicationRunning = sal_False; } void SingleCommunicationManager::DestroyingLink( CommunicationLink *pCL ) @@ -654,7 +654,7 @@ void SingleCommunicationManager::DestroyingLink( CommunicationLink *pCL ) } -SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( ByteString aHost, ULONG nPort, BOOL bUseMultiChannel ) +SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel ) : SingleCommunicationManager( bUseMultiChannel ) , aHostToTalk( aHost ) , nPortToTalk( nPort ) @@ -662,7 +662,7 @@ SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSo } -SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( BOOL bUseMultiChannel ) +SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSocket( sal_Bool bUseMultiChannel ) : SingleCommunicationManager( bUseMultiChannel ) , aHostToTalk() , nPortToTalk( 0 ) @@ -670,7 +670,7 @@ SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSo } -BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort ) +sal_Bool CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, sal_uLong nPort ) { vos::OInetSocketAddr Addr; vos::OConnectorSocket *pConnSocket; @@ -690,13 +690,13 @@ BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICo pConnSocket->setTcpNoDelay( 1 ); pCM->CallConnectionOpened( CreateCommunicationLink( pCM, pConnSocket ) ); - return TRUE; + return sal_True; } else delete pConnSocket; } while ( pCMC->RetryConnect() ); - return FALSE; + return sal_False; } diff --git a/automation/source/testtool/cmdstrm.cxx b/automation/source/testtool/cmdstrm.cxx index a0e50e912498..17621aec9d53 100644 --- a/automation/source/testtool/cmdstrm.cxx +++ b/automation/source/testtool/cmdstrm.cxx @@ -66,8 +66,8 @@ CmdStream::~CmdStream() #define PUT_CHAR(ch) \ - USHORT nMCode = nModify + ch; \ - USHORT _Code = 1; \ + sal_uInt16 nMCode = nModify + ch; \ + sal_uInt16 _Code = 1; \ if ( (nMCode & 0xFF) == 0 ) \ _Code |= 2; \ if ( (nMCode >> 8) == 0 ) \ @@ -93,17 +93,17 @@ String CmdStream::WandleKeyEventString( String aKeys ) String Work = aKeys.Copy(nPos1+1,nPos2-nPos1+1-2); aKeys.Erase(nPos1,nPos2-nPos1+1); // Inclusive Spitze Klammern weg String Result, Token; - USHORT nModify = 0; + sal_uInt16 nModify = 0; while ( Work.Len() > 0 ) { Token = Work.GetToken(0,' '); Work.Erase(0,Token.Len()+1); ControlDef WhatName(Token,rtl::OString()); - USHORT nElement; + sal_uInt16 nElement; if (pKeyCodes->Seek_Entry(&WhatName,&nElement)) { // FIXME: HELPID - USHORT nCode = 0;//(USHORT) pKeyCodes->GetObject(nElement)->pData->aUId.GetNum(); + sal_uInt16 nCode = 0;//(sal_uInt16) pKeyCodes->GetObject(nElement)->pData->aUId.GetNum(); if ( nCode >= KEY_SHIFT ) nModify ^= nCode; else @@ -169,17 +169,17 @@ String CmdStream::WandleKeyEventString( String aKeys ) } -void CmdStream::WriteSortedParams( SbxArray* rPar, BOOL IsKeyString ) +void CmdStream::WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString ) { - USHORT nParams = PARAM_NONE; - USHORT nNr1=0,nNr2=0,nNr3=0,nNr4=0; + sal_uInt16 nParams = PARAM_NONE; + sal_uInt16 nNr1=0,nNr2=0,nNr3=0,nNr4=0; comm_ULONG nLNr1=0; String aString1,aString2; - BOOL bBool1=FALSE,bBool2=FALSE; + sal_Bool bBool1=sal_False,bBool2=sal_False; if ( rPar ) { - for ( USHORT i = 1; i < rPar->Count() ; i++) + for ( sal_uInt16 i = 1; i < rPar->Count() ; i++) { switch (rPar->Get( i )->GetType()) { @@ -309,27 +309,27 @@ void CmdStream::WriteSortedParams( SbxArray* rPar, BOOL IsKeyString ) if( nParams & PARAM_BOOL_2 ) Write( bBool2 ); } -void CmdStream::GenCmdCommand( USHORT nNr, SbxArray* rPar ) +void CmdStream::GenCmdCommand( sal_uInt16 nNr, SbxArray* rPar ) { - Write(USHORT(SICommand)); + Write(sal_uInt16(SICommand)); Write(nNr); WriteSortedParams(rPar, (nNr & M_KEY_STRING) != 0 ); } -void CmdStream::GenCmdSlot( USHORT nNr, SbxArray* rPar ) +void CmdStream::GenCmdSlot( sal_uInt16 nNr, SbxArray* rPar ) { - Write(USHORT(SISlot)); + Write(sal_uInt16(SISlot)); Write(nNr); if (rPar) { - USHORT nAnz = (rPar->Count()-1) >> 1; // Geteilt durch 2 + sal_uInt16 nAnz = (rPar->Count()-1) >> 1; // Geteilt durch 2 Write(nAnz); - BOOL bWriteUnoSlot = rPar->Get( 1 )->GetType() == SbxSTRING; + sal_Bool bWriteUnoSlot = rPar->Get( 1 )->GetType() == SbxSTRING; - for (USHORT n = 1 ; n <= nAnz ; n++) + for (sal_uInt16 n = 1 ; n <= nAnz ; n++) { /// #59513# nicht mehr ben�tigt -// ULONG nUserData = rPar->Get( 2*n-1 )->GetUserData(); +// sal_uLong nUserData = rPar->Get( 2*n-1 )->GetUserData(); // rPar->Get( 2*n-1 )->SetUserData(ID_DoNothing); // Verhindert Ausf�hrung der Slots, die als Parameter �bergeben sind. if ( bWriteUnoSlot ) @@ -345,7 +345,7 @@ void CmdStream::GenCmdSlot( USHORT nNr, SbxArray* rPar ) case SbxUINT: case SbxSINGLE: if ( !bWriteUnoSlot ) - Write( (USHORT)BinUSHORT ); + Write( (sal_uInt16)BinUSHORT ); Write(rPar->Get( 2*n )->GetUShort()); break; case SbxLONG: @@ -354,18 +354,18 @@ void CmdStream::GenCmdSlot( USHORT nNr, SbxArray* rPar ) case SbxULONG64: case SbxDOUBLE: if ( !bWriteUnoSlot ) - Write( (USHORT)BinULONG ); + Write( (sal_uInt16)BinULONG ); Write(rPar->Get( 2*n )->GetULong()); break; case SbxSTRING: case SbxCHAR: if ( !bWriteUnoSlot ) - Write( (USHORT)BinString); + Write( (sal_uInt16)BinString); Write((String)rPar->Get( 2*n )->GetString()); // Cast f�r OS/2 break; case SbxBOOL: if ( !bWriteUnoSlot ) - Write( (USHORT)BinBool); + Write( (sal_uInt16)BinBool); Write(rPar->Get( 2*n )->GetBool()); break; default: @@ -378,20 +378,20 @@ void CmdStream::GenCmdSlot( USHORT nNr, SbxArray* rPar ) } } else - Write(USHORT(0)); + Write(sal_uInt16(0)); } void CmdStream::GenCmdUNOSlot( const String &aURL ) { - Write( USHORT(SIUnoSlot) ); -/* Write( USHORT(0) ); // Hier wird im Office die SID_OPENURL Eingetragen. + Write( sal_uInt16(SIUnoSlot) ); +/* Write( sal_uInt16(0) ); // Hier wird im Office die SID_OPENURL Eingetragen. // Dies mu� nat�rlich im Office hart verdratet werden und nicht hier, // da sich die ID ja mal �ndern kann. // Da auch die ID f�r das PoolItem im Office entnommen werden mu� hier also kein PoolItem // gesendet werden. - Write( USHORT(0) ); // Anzahl PoolItems + Write( sal_uInt16(0) ); // Anzahl PoolItems // Stattdessen wird noch eine extra String gesendet, der dann Officeseitig in ein // SfxStringItem mit entsprechender ID gewandelt wird. @@ -400,57 +400,57 @@ void CmdStream::GenCmdUNOSlot( const String &aURL ) Write( aURL ); // Die UNO URL eben } -void CmdStream::GenCmdControl( comm_ULONG nUId, USHORT nMethodId, SbxArray* rPar ) +void CmdStream::GenCmdControl( comm_ULONG nUId, sal_uInt16 nMethodId, SbxArray* rPar ) { - Write(USHORT(SIControl)); + Write(sal_uInt16(SIControl)); Write(nUId); Write(nMethodId); WriteSortedParams(rPar, (nMethodId & M_KEY_STRING) != 0 ); } -void CmdStream::GenCmdControl( String aUId, USHORT nMethodId, SbxArray* rPar ) +void CmdStream::GenCmdControl( String aUId, sal_uInt16 nMethodId, SbxArray* rPar ) { - Write(USHORT(SIStringControl)); + Write(sal_uInt16(SIStringControl)); Write(aUId); Write(nMethodId); WriteSortedParams(rPar, (nMethodId & M_KEY_STRING) != 0 ); } -void CmdStream::GenCmdFlow( USHORT nArt ) +void CmdStream::GenCmdFlow( sal_uInt16 nArt ) { - Write(USHORT(SIFlow)); + Write(sal_uInt16(SIFlow)); Write(nArt); - Write(USHORT(PARAM_NONE)); // Typ der folgenden Parameter + Write(sal_uInt16(PARAM_NONE)); // Typ der folgenden Parameter } -void CmdStream::GenCmdFlow( USHORT nArt, USHORT nNr1 ) +void CmdStream::GenCmdFlow( sal_uInt16 nArt, sal_uInt16 nNr1 ) { - Write(USHORT(SIFlow)); + Write(sal_uInt16(SIFlow)); Write(nArt); - Write(USHORT(PARAM_USHORT_1)); // Typ der folgenden Parameter + Write(sal_uInt16(PARAM_USHORT_1)); // Typ der folgenden Parameter Write(nNr1); } -void CmdStream::GenCmdFlow( USHORT nArt, comm_ULONG nNr1 ) +void CmdStream::GenCmdFlow( sal_uInt16 nArt, comm_ULONG nNr1 ) { - Write(USHORT(SIFlow)); + Write(sal_uInt16(SIFlow)); Write(nArt); - Write(USHORT(PARAM_ULONG_1)); // Typ der folgenden Parameter + Write(sal_uInt16(PARAM_ULONG_1)); // Typ der folgenden Parameter Write(nNr1); } -void CmdStream::GenCmdFlow( USHORT nArt, String aString1 ) +void CmdStream::GenCmdFlow( sal_uInt16 nArt, String aString1 ) { - Write(USHORT(SIFlow)); + Write(sal_uInt16(SIFlow)); Write(nArt); - Write(USHORT(PARAM_STR_1)); // Typ der folgenden Parameter + Write(sal_uInt16(PARAM_STR_1)); // Typ der folgenden Parameter Write(aString1); } -void CmdStream::Write( String aString, BOOL IsKeyString ) +void CmdStream::Write( String aString, sal_Bool IsKeyString ) { if ( IsKeyString ) - Write( WandleKeyEventString( aString ), FALSE ); + Write( WandleKeyEventString( aString ), sal_False ); else Write( aString.GetBuffer(), aString.Len() ); } diff --git a/automation/source/testtool/cmdstrm.hxx b/automation/source/testtool/cmdstrm.hxx index 857517483280..8cdd695c6ca7 100644 --- a/automation/source/testtool/cmdstrm.hxx +++ b/automation/source/testtool/cmdstrm.hxx @@ -37,22 +37,22 @@ public: CmdStream(); ~CmdStream(); - void WriteSortedParams( SbxArray* rPar, BOOL IsKeyString = FALSE ); + void WriteSortedParams( SbxArray* rPar, sal_Bool IsKeyString = sal_False ); - void GenCmdCommand( USHORT nNr, SbxArray* rPar ); + void GenCmdCommand( sal_uInt16 nNr, SbxArray* rPar ); - void GenCmdSlot( USHORT nNr, SbxArray* rPar ); + void GenCmdSlot( sal_uInt16 nNr, SbxArray* rPar ); void GenCmdUNOSlot( const String &aURL ); - void GenCmdControl( comm_ULONG nUId, USHORT nMethodId, SbxArray* rPar ); - void GenCmdControl( String aUId, USHORT nMethodId, SbxArray* rPar ); + void GenCmdControl( comm_ULONG nUId, sal_uInt16 nMethodId, SbxArray* rPar ); + void GenCmdControl( String aUId, sal_uInt16 nMethodId, SbxArray* rPar ); - void GenCmdFlow( USHORT nArt ); - void GenCmdFlow( USHORT nArt, USHORT nNr1 ); - void GenCmdFlow( USHORT nArt, comm_ULONG nNr1 ); - void GenCmdFlow( USHORT nArt, String aString1 ); + void GenCmdFlow( sal_uInt16 nArt ); + void GenCmdFlow( sal_uInt16 nArt, sal_uInt16 nNr1 ); + void GenCmdFlow( sal_uInt16 nArt, comm_ULONG nNr1 ); + void GenCmdFlow( sal_uInt16 nArt, String aString1 ); void Reset(comm_ULONG nSequence); @@ -70,7 +70,7 @@ private: void Write( const comm_UniChar* aString, comm_USHORT nLenInChars ){CmdBaseStream::Write( aString, nLenInChars );} void Write( comm_BOOL bBool ){CmdBaseStream::Write( bBool );} // new - void Write( String aString, BOOL IsKeyString = FALSE ); + void Write( String aString, sal_Bool IsKeyString = sal_False ); SvMemoryStream *pSammel; }; diff --git a/automation/source/testtool/comm_bas.cxx b/automation/source/testtool/comm_bas.cxx index e35448c012c5..f8dafece2a5b 100644 --- a/automation/source/testtool/comm_bas.cxx +++ b/automation/source/testtool/comm_bas.cxx @@ -47,9 +47,9 @@ // 2) Methoden: // CommunicationLink StartCommunication( Host, Port ) // StopAllCommunication // Alle Kommunikation wird abgebrochen -// BOOL IsCommunicationRunning // Läuft noch irgendwas +// sal_Bool IsCommunicationRunning // Läuft noch irgendwas // String GetMyName Der eigene Name -// BOOL IsLinkValid( CommunicationLink ) // Ist dieser Link noch gültig +// sal_Bool IsLinkValid( CommunicationLink ) // Ist dieser Link noch gültig // SetCommunicationEventHandler( String ) // Diese Funktion wird aufgerufen bei jedem Event // Der CommunicationLink hat folgende Elemente: @@ -144,8 +144,8 @@ CommunicationWrapper::Methods CommunicationWrapper::aLinkMethods[] = { // Konstruktor für den Manager CommunicationWrapper::CommunicationWrapper( const String& rClass ) : SbxObject( rClass ) , m_pLink( NULL ) -, m_bIsManager( TRUE ) -, m_bCatchOpen( FALSE ) +, m_bIsManager( sal_True ) +, m_bCatchOpen( sal_False ) , m_pNewLink( NULL ) { // SetName( CUniString("Manager") ); @@ -159,8 +159,8 @@ CommunicationWrapper::CommunicationWrapper( const String& rClass ) : SbxObject( // Konstruktor für den Link CommunicationWrapper::CommunicationWrapper( CommunicationLink *pThisLink ) : SbxObject( CUniString("Link") ) , m_pLink( pThisLink ) -, m_bIsManager( FALSE ) -, m_bCatchOpen( FALSE ) +, m_bIsManager( sal_False ) +, m_bCatchOpen( sal_False ) , m_pNewLink( NULL ) { m_pMethods = &aLinkMethods[0]; @@ -191,12 +191,12 @@ SbxVariable* CommunicationWrapper::Find( const String& rName, SbxClassType t ) // sonst suchen Methods* p = m_pMethods; short nIndex = 0; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; while( p->nArgs != -1 ) { if( rName.CompareIgnoreCaseToAscii( p->pName ) == COMPARE_EQUAL ) { - bFound = TRUE; break; + bFound = sal_True; break; } nIndex += ( p->nArgs & _ARGSMASK ) + 1; p = m_pMethods + nIndex; @@ -233,22 +233,22 @@ void CommunicationWrapper::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCT, { SbxVariable* pVar = pHint->GetVar(); SbxArray* pPar = pVar->GetParameters(); - USHORT nIndex = (USHORT) pVar->GetUserData(); + sal_uInt16 nIndex = (sal_uInt16) pVar->GetUserData(); // kein Index: weiterreichen! if( nIndex ) { - ULONG t = pHint->GetId(); + sal_uLong t = pHint->GetId(); if( t == SBX_HINT_INFOWANTED ) pVar->SetInfo( GetInfo( (short) pVar->GetUserData() ) ); else { - BOOL bWrite = FALSE; + sal_Bool bWrite = sal_False; if( t == SBX_HINT_DATACHANGED ) - bWrite = TRUE; + bWrite = sal_True; if( t == SBX_HINT_DATAWANTED || bWrite ) { // Parameter-Test fuer Methoden: - USHORT nPar = m_pMethods[ --nIndex ].nArgs & 0x00FF; + sal_uInt16 nPar = m_pMethods[ --nIndex ].nArgs & 0x00FF; // Element 0 ist der Returnwert if( ( !pPar && nPar ) || ( pPar && pPar->Count() != nPar+1 ) ) @@ -278,7 +278,7 @@ SbxInfo* CommunicationWrapper::GetInfo( short nIdx ) { p++; String aName( p->pName, RTL_TEXTENCODING_ASCII_US ); - USHORT nIFlags = ( p->nArgs >> 8 ) & 0x03; + sal_uInt16 nIFlags = ( p->nArgs >> 8 ) & 0x03; if( p->nArgs & _OPT ) nIFlags |= SBX_OPTIONAL; pRetInfo->AddParam( aName, p->eType, nIFlags ); @@ -332,21 +332,21 @@ void CommunicationWrapper::Events( String aType, CommunicationLink* pLink ) //////////////////////////////////////////////////////////////////////////// -// Properties und Methoden legen beim Get (bPut = FALSE) den Returnwert -// im Element 0 des Argv ab; beim Put (bPut = TRUE) wird der Wert aus +// Properties und Methoden legen beim Get (bPut = sal_False) den Returnwert +// im Element 0 des Argv ab; beim Put (bPut = sal_True) wird der Wert aus // Element 0 gespeichert. // Die Methoden: // Manager -void CommunicationWrapper::MStartCommunication( SbxVariable* pVar, SbxArray* pPar, BOOL /*bWrite*/ ) +void CommunicationWrapper::MStartCommunication( SbxVariable* pVar, SbxArray* pPar, sal_Bool /*bWrite*/ ) { // CommunicationLink StartCommunication( Host, Port ) - m_bCatchOpen = TRUE; + m_bCatchOpen = sal_True; if ( m_pManager->StartCommunication( ByteString( pPar->Get( 1 )->GetString(), RTL_TEXTENCODING_UTF8 ), pPar->Get( 2 )->GetULong() ) ) { while ( !m_pNewLink ) GetpApp()->Reschedule(); - m_bCatchOpen = FALSE; + m_bCatchOpen = sal_False; CommunicationWrapper *pNewLinkWrapper = new CommunicationWrapper( m_pNewLink ); m_pNewLink = NULL; pVar->PutObject( pNewLinkWrapper ); @@ -354,28 +354,28 @@ void CommunicationWrapper::MStartCommunication( SbxVariable* pVar, SbxArray* pPa } -void CommunicationWrapper::MStopAllCommunication( SbxVariable* /*pVar*/, SbxArray* /*pPar*/, BOOL /*bWrite*/ ) +void CommunicationWrapper::MStopAllCommunication( SbxVariable* /*pVar*/, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ ) { // StopAllCommunication // Alle Kommunikation wird abgebrochen m_pManager->StopCommunication(); } -void CommunicationWrapper::MIsCommunicationRunning( SbxVariable* pVar, SbxArray* /*pPar*/, BOOL /*bWrite*/ ) -{ // BOOL IsCommunicationRunning // Läuft noch irgendwas +void CommunicationWrapper::MIsCommunicationRunning( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ ) +{ // sal_Bool IsCommunicationRunning // Läuft noch irgendwas pVar->PutBool( m_pManager->IsCommunicationRunning() ); } -void CommunicationWrapper::MGetMyName( SbxVariable* pVar, SbxArray* /*pPar*/, BOOL /*bWrite*/ ) +void CommunicationWrapper::MGetMyName( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ ) { // String GetMyName Der eigene Name pVar->PutString( UniString( m_pManager->GetMyName( CM_FQDN ), RTL_TEXTENCODING_UTF8 ) ); } -void CommunicationWrapper::MIsLinkValid( SbxVariable* pVar, SbxArray* pPar, BOOL /*bWrite*/ ) -{ // BOOL IsLinkValid( CommunicationLink ) // Ist dieser Link noch gültig +void CommunicationWrapper::MIsLinkValid( SbxVariable* pVar, SbxArray* pPar, sal_Bool /*bWrite*/ ) +{ // sal_Bool IsLinkValid( CommunicationLink ) // Ist dieser Link noch gültig CommunicationWrapper *pWrapper = (CommunicationWrapper*)(pPar->Get( 1 )->GetObject()); pVar->PutBool( m_pManager->IsLinkValid( pWrapper->GetCommunicationLink() ) ); } -void CommunicationWrapper::MSetCommunicationEventHandler( SbxVariable* /*pVar*/, SbxArray* pPar, BOOL /*bWrite*/ ) +void CommunicationWrapper::MSetCommunicationEventHandler( SbxVariable* /*pVar*/, SbxArray* pPar, sal_Bool /*bWrite*/ ) { // SetCommunicationEventHandler( String ) // Diese Funktion wird aufgerufen bei jedem Event m_aEventHandlerName = pPar->Get( 1 )->GetString(); } @@ -385,22 +385,22 @@ void CommunicationWrapper::MSetCommunicationEventHandler( SbxVariable* /*pVar*/, // Link -void CommunicationWrapper::LStopCommunication( SbxVariable* /*pVar*/, SbxArray* /*pPar*/, BOOL /*bWrite*/ ) +void CommunicationWrapper::LStopCommunication( SbxVariable* /*pVar*/, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ ) { // StopCommunication Die Kommunikation wird abgebrochen m_pLink->StopCommunication(); } -void CommunicationWrapper::LGetMyName( SbxVariable* pVar, SbxArray* /*pPar*/, BOOL /*bWrite*/ ) +void CommunicationWrapper::LGetMyName( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ ) { // String GetMyName Der eigene Name pVar->PutString( UniString( m_pLink->GetMyName( CM_FQDN ), RTL_TEXTENCODING_UTF8 ) ); } -void CommunicationWrapper::LGetHostName( SbxVariable* pVar, SbxArray* /*pPar*/, BOOL /*bWrite*/ ) +void CommunicationWrapper::LGetHostName( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ ) { // String GetHostName Der Name des Anderen pVar->PutString( UniString( m_pLink->GetCommunicationPartner( CM_FQDN ), RTL_TEXTENCODING_UTF8 ) ); } -void CommunicationWrapper::LSend( SbxVariable* /*pVar*/, SbxArray* pPar, BOOL /*bWrite*/ ) +void CommunicationWrapper::LSend( SbxVariable* /*pVar*/, SbxArray* pPar, sal_Bool /*bWrite*/ ) { // Send(String ) String an den Partner schicken SvStream *pSendStream = m_pLink->GetBestCommunicationStream(); String aSendString = pPar->Get( 1 )->GetString(); @@ -409,12 +409,12 @@ void CommunicationWrapper::LSend( SbxVariable* /*pVar*/, SbxArray* pPar, BOOL /* delete pSendStream; } -void CommunicationWrapper::LGetString( SbxVariable* pVar, SbxArray* /*pPar*/, BOOL /*bWrite*/ ) +void CommunicationWrapper::LGetString( SbxVariable* pVar, SbxArray* /*pPar*/, sal_Bool /*bWrite*/ ) { // String GetString Ergebnis des letzten Empfangs SvStream *pReceiveStream = m_pLink->GetServiceData(); if ( pReceiveStream ) { - ULONG nLength = pReceiveStream->Seek( STREAM_SEEK_TO_END ); + sal_uLong nLength = pReceiveStream->Seek( STREAM_SEEK_TO_END ); pReceiveStream->Seek( STREAM_SEEK_TO_BEGIN ); char *pBuffer = new char[nLength]; pReceiveStream->Read( pBuffer, nLength ); diff --git a/automation/source/testtool/comm_bas.hxx b/automation/source/testtool/comm_bas.hxx index d39f0895eefd..2080354334aa 100644 --- a/automation/source/testtool/comm_bas.hxx +++ b/automation/source/testtool/comm_bas.hxx @@ -46,7 +46,7 @@ class CommunicationWrapper : public SbxObject // Einer für Manager und Links public: #endif typedef void( CommunicationWrapper::*pMeth ) - ( SbxVariable* pThis, SbxArray* pArgs, BOOL bWrite ); + ( SbxVariable* pThis, SbxArray* pArgs, sal_Bool bWrite ); #if defined ( ICC ) || defined ( HPUX ) private: #endif @@ -63,31 +63,31 @@ private: // Methoden // Manager - void MStartCommunication( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void MStopAllCommunication( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void MIsCommunicationRunning( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void MGetMyName( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void MIsLinkValid( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void MSetCommunicationEventHandler( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); + void MStartCommunication( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void MStopAllCommunication( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void MIsCommunicationRunning( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void MGetMyName( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void MIsLinkValid( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void MSetCommunicationEventHandler( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); // Link - void LStopCommunication( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void LGetMyName( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void LGetHostName( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void LSend( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); - void LGetString( SbxVariable* pVar, SbxArray* pPar, BOOL bWrite ); + void LStopCommunication( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void LGetMyName( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void LGetHostName( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void LSend( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); + void LGetString( SbxVariable* pVar, SbxArray* pPar, sal_Bool bWrite ); // Interne Member und Methoden CommunicationManagerClientViaSocket *m_pManager; CommunicationLink *m_pLink; - BOOL m_bIsManager; // Ist es kein Manager, so ist es ein Link + sal_Bool m_bIsManager; // Ist es kein Manager, so ist es ein Link // Kram für Manager DECL_LINK( Open, CommunicationLink* ); DECL_LINK( Close, CommunicationLink* ); DECL_LINK( Data, CommunicationLink* ); void Events( String aType, CommunicationLink* pLink ); - BOOL m_bCatchOpen; + sal_Bool m_bCatchOpen; CommunicationLink *m_pNewLink; String m_aEventHandlerName; diff --git a/automation/source/testtool/cretstrm.cxx b/automation/source/testtool/cretstrm.cxx index a6850b1c2cc4..907ce02a4731 100644 --- a/automation/source/testtool/cretstrm.cxx +++ b/automation/source/testtool/cretstrm.cxx @@ -52,7 +52,7 @@ CRetStream::~CRetStream() void CRetStream::Read ( String &aString ) { comm_UniChar* pStr; - USHORT nLenInChars; + sal_uInt16 nLenInChars; CmdBaseStream::Read( pStr, nLenInChars ); aString = String( pStr, nLenInChars ); diff --git a/automation/source/testtool/cretstrm.hxx b/automation/source/testtool/cretstrm.hxx index 147b04bc0414..7fe1416c681e 100644 --- a/automation/source/testtool/cretstrm.hxx +++ b/automation/source/testtool/cretstrm.hxx @@ -35,7 +35,7 @@ class CRetStream : public CmdBaseStream { SvStream *pSammel; - USHORT nId; + sal_uInt16 nId; public: CRetStream( SvStream *pIn ); diff --git a/automation/source/testtool/httprequest.cxx b/automation/source/testtool/httprequest.cxx index d8118b996ee9..691d803998ae 100644 --- a/automation/source/testtool/httprequest.cxx +++ b/automation/source/testtool/httprequest.cxx @@ -55,7 +55,7 @@ HttpRequest::~HttpRequest() pStream = NULL; } -void HttpRequest::SetRequest( ByteString aHost, ByteString aPath, USHORT nPort ) +void HttpRequest::SetRequest( ByteString aHost, ByteString aPath, sal_uInt16 nPort ) { nStatus = HTTP_REQUEST_SET; Init(); @@ -64,7 +64,7 @@ void HttpRequest::SetRequest( ByteString aHost, ByteString aPath, USHORT nPort ) nRequestPort = nPort; } -void HttpRequest::SetProxy( ByteString aHost, USHORT nPort ) +void HttpRequest::SetProxy( ByteString aHost, sal_uInt16 nPort ) { nStatus = HTTP_REQUEST_SET; Init(); @@ -72,7 +72,7 @@ void HttpRequest::SetProxy( ByteString aHost, USHORT nPort ) nProxyPort = nPort; } -BOOL HttpRequest::Execute() +sal_Bool HttpRequest::Execute() { nStatus = HTTP_REQUEST_PENDING; Init(); @@ -104,7 +104,7 @@ BOOL HttpRequest::Execute() { delete pOutSocket; nStatus = HTTP_REQUEST_ERROR; - return FALSE; + return sal_False; } @@ -141,9 +141,9 @@ BOOL HttpRequest::Execute() #define BUFFRE_SIZE 0x10000 // 64K Buffer char* pBuffer = new char[ BUFFRE_SIZE ]; - BOOL bWasError = ( nStatus != HTTP_REQUEST_PENDING ); + sal_Bool bWasError = ( nStatus != HTTP_REQUEST_PENDING ); - ULONG nDataRead; + sal_uLong nDataRead; pStream = new SvMemoryStream( 0x10000, 0x10000 ); while ( !bWasError ) { @@ -159,16 +159,16 @@ BOOL HttpRequest::Execute() pStream->Seek( 0 ); ByteString aLine; - BOOL bInsideHeader = TRUE; + sal_Bool bInsideHeader = sal_True; while ( bInsideHeader ) { pStream->ReadLine( aLine ); if ( !aLine.Len() ) - bInsideHeader = FALSE; + bInsideHeader = sal_False; else { if ( IsItem( "HTTP/", aLine ) ) - nResultId = (USHORT)aLine.GetToken( 1, ' ' ).ToInt32(); + nResultId = (sal_uInt16)aLine.GetToken( 1, ' ' ).ToInt32(); if ( IsItem( "Content-Type:", aLine ) ) { aContentType = aLine.Copy( 13 ); @@ -182,12 +182,12 @@ BOOL HttpRequest::Execute() if ( nStatus == HTTP_REQUEST_PENDING ) { nStatus = HTTP_REQUEST_DONE; - return TRUE; + return sal_True; } else { nStatus = HTTP_REQUEST_ERROR; - return FALSE; + return sal_False; } } /* @@ -208,7 +208,7 @@ void HttpRequest::SendString( vos::OStreamSocket* pSocket , ByteString aText ) pSocket->write( aText.GetBuffer(), aText.Len() ); } -BOOL HttpRequest::IsItem( ByteString aItem, ByteString aLine ) +sal_Bool HttpRequest::IsItem( ByteString aItem, ByteString aLine ) { return aItem.Match( aLine ) == STRING_MATCH; } @@ -232,7 +232,7 @@ SvMemoryStream* HttpRequest::GetBody() return pStream; } -USHORT HttpRequest::GetStatus() +sal_uInt16 HttpRequest::GetStatus() { return nStatus; } diff --git a/automation/source/testtool/httprequest.hxx b/automation/source/testtool/httprequest.hxx index 44234239b81f..e9b36a321d82 100644 --- a/automation/source/testtool/httprequest.hxx +++ b/automation/source/testtool/httprequest.hxx @@ -47,38 +47,38 @@ class HttpRequest { ByteString aRequestPath; ByteString aRequestHost; - USHORT nRequestPort; + sal_uInt16 nRequestPort; ByteString aProxyHost; - USHORT nProxyPort; + sal_uInt16 nProxyPort; - USHORT nStatus; + sal_uInt16 nStatus; vos::OConnectorSocket *pOutSocket; ByteString aHeader; - USHORT nResultId; + sal_uInt16 nResultId; ByteString aContentType; SvMemoryStream* pStream; void SendString( vos::OStreamSocket* pSocket, ByteString aText ); - BOOL IsItem( ByteString aItem, ByteString aLine ); + sal_Bool IsItem( ByteString aItem, ByteString aLine ); void Init(); public: HttpRequest(); ~HttpRequest(); - void SetRequest( ByteString aHost, ByteString aPath, USHORT nPort ); - void SetProxy( ByteString aHost, USHORT nPort ); + void SetRequest( ByteString aHost, ByteString aPath, sal_uInt16 nPort ); + void SetProxy( ByteString aHost, sal_uInt16 nPort ); - BOOL Execute(); + sal_Bool Execute(); void Abort(); ByteString GetHeader() { return aHeader; } SvMemoryStream* GetBody(); ByteString GetContentType() { return aContentType; } - USHORT GetResultId() { return nResultId; } + sal_uInt16 GetResultId() { return nResultId; } - USHORT GetStatus(); + sal_uInt16 GetStatus(); }; diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx index 4f0f5084ad37..43334a915788 100644 --- a/automation/source/testtool/objtest.cxx +++ b/automation/source/testtool/objtest.cxx @@ -162,7 +162,7 @@ DBG_CTOR(ControlItem,0); pData->nUId = aType; } -ControlItem::ControlItem( const String &Name, const String &URL, const ULONG nUId ) +ControlItem::ControlItem( const String &Name, const String &URL, const sal_uLong nUId ) { DBG_CTOR(ControlItem,0); InitData(); @@ -171,7 +171,7 @@ DBG_CTOR(ControlItem,0); pData->nUId = nUId; } -ControlItem::ControlItem( const char *Name, const String &URL, const ULONG nUId ) +ControlItem::ControlItem( const char *Name, const String &URL, const sal_uLong nUId ) { DBG_CTOR(ControlItem,0); InitData(); @@ -204,22 +204,22 @@ ControlItemSon::ControlItemSon(const String &Name, rtl::OString aUIdP ) : ControlItem( Name, URL, aType ) {} -ControlItemSon::ControlItemSon(const String &Name, const String &URL, const ULONG nUId ) +ControlItemSon::ControlItemSon(const String &Name, const String &URL, const sal_uLong nUId ) : ControlItem( Name, URL, nUId ) {} -ControlItemSon::ControlItemSon(const char *Name, const String &URL, const ULONG nUId ) +ControlItemSon::ControlItemSon(const char *Name, const String &URL, const sal_uLong nUId ) : ControlItem( Name, URL, nUId ) {}*/ -BOOL ControlDef::operator < (const ControlItem &rPar) +sal_Bool ControlDef::operator < (const ControlItem &rPar) { return pData->Kurzname.CompareIgnoreCaseToAscii(rPar.pData->Kurzname) == COMPARE_LESS; } -BOOL ControlDef::operator == (const ControlItem &rPar) +sal_Bool ControlDef::operator == (const ControlItem &rPar) { return pData->Kurzname.CompareIgnoreCaseToAscii(rPar.pData->Kurzname) == COMPARE_EQUAL; } @@ -232,13 +232,13 @@ void ControlDef::Write( SvStream &aStream ) aStream.WriteByteString( String('*').Append( pData->Kurzname ), RTL_TEXTENCODING_UTF8 ); else aStream.WriteByteString( pData->Kurzname, RTL_TEXTENCODING_UTF8 ); - aStream << ((USHORT)pData->aUId.HasNumeric()); + aStream << ((sal_uInt16)pData->aUId.HasNumeric()); if ( pData->aUId.HasString() ) aStream.WriteByteString( pData->aUId.GetStr(), RTL_TEXTENCODING_UTF8 ); else - aStream << static_cast<comm_ULONG>(pData->aUId.GetNum()); //GetNum() ULONG != comm_ULONG on 64bit + aStream << static_cast<comm_ULONG>(pData->aUId.GetNum()); //GetNum() sal_uLong != comm_ULONG on 64bit if ( pSons ) - for ( USHORT i = 0 ; pSons->Count() > i ; i++ ) + for ( sal_uInt16 i = 0 ; pSons->Count() > i ; i++ ) ((ControlDef*)(*pSons)[i])->Write(aStream); #else (void)aStream; @@ -257,7 +257,7 @@ ControlDef::ControlDef(const String &Name, rtl::OString aUIdP ) DBG_CTOR(ControlDef,0); } */ -ControlDef::ControlDef(const String &aOldName, const String &aNewName, ControlDef *pOriginal, BOOL bWithSons ) +ControlDef::ControlDef(const String &aOldName, const String &aNewName, ControlDef *pOriginal, sal_Bool bWithSons ) : ControlItemSon("", pOriginal->pData->aUId) { DBG_CTOR(ControlDef,0); @@ -269,10 +269,10 @@ ControlDef::ControlDef(const String &aOldName, const String &aNewName, ControlDe if ( bWithSons && pOriginal->pSons ) { pSons = new CNames(); - for ( USHORT i = 0; i < pOriginal->pSons->Count() ; i++) + for ( sal_uInt16 i = 0; i < pOriginal->pSons->Count() ; i++) { ControlDef *pNewDef; - pNewDef = new ControlDef( aOldName, aNewName, pOriginal->SonGetObject(i) ,TRUE ); + pNewDef = new ControlDef( aOldName, aNewName, pOriginal->SonGetObject(i) ,sal_True ); if (! SonInsert(pNewDef)) { DBG_ERROR("Name Doppelt im CopyConstructor. Neuer Name = Controlname!!"); @@ -285,22 +285,22 @@ ControlDef::ControlDef(const String &aOldName, const String &aNewName, ControlDe pSons = NULL; } -BOOL ControlItemUId::operator < (const ControlItem &rPar) +sal_Bool ControlItemUId::operator < (const ControlItem &rPar) { return pData->aUId < rPar.pData->aUId; } -BOOL ControlItemUId::operator == (const ControlItem &rPar) +sal_Bool ControlItemUId::operator == (const ControlItem &rPar) { return pData->aUId == rPar.pData->aUId; } SV_IMPL_OP_PTRARR_SORT( CNames, ControlItem* ) -void CRevNames::Insert( String aName, rtl::OString aUId, ULONG nSeq ) +void CRevNames::Insert( String aName, rtl::OString aUId, sal_uLong nSeq ) { ControlItem *pRN = new ReverseName(aName,aUId,nSeq); - USHORT nPos; + sal_uInt16 nPos; if ( Seek_Entry(pRN,&nPos) ) DeleteAndDestroy(nPos); @@ -315,8 +315,8 @@ void CRevNames::Insert( String aName, rtl::OString aUId, ULONG nSeq ) String CRevNames::GetName( rtl::OString aUId ) { ReverseName *pRN = new ReverseName(UniString(),aUId,0); - USHORT nPos; - BOOL bSeekOK = Seek_Entry(pRN,&nPos); + sal_uInt16 nPos; + sal_Bool bSeekOK = Seek_Entry(pRN,&nPos); delete pRN; if ( bSeekOK ) @@ -335,9 +335,9 @@ String CRevNames::GetName( rtl::OString aUId ) } } -void CRevNames::Invalidate ( ULONG nSeq ) +void CRevNames::Invalidate ( sal_uLong nSeq ) { - USHORT i; + sal_uInt16 i; for (i = 0; i < Count() ;) { if (((ReverseName*)GetObject(i))->LastSequence < nSeq) @@ -360,12 +360,12 @@ SbxTransportMethod::SbxTransportMethod( SbxDataType DT ) TestToolObj::TestToolObj( String aName, String aFilePath ) // Interner Aufruf : SbxObject( aName ) -, bUseIPC(FALSE) -, bReturnOK(TRUE) +, bUseIPC(sal_False) +, bReturnOK(sal_True) , nSequence(KEEP_SEQUENCES) , ProgPath() -, IsBlock(FALSE) -, SingleCommandBlock(TRUE) +, IsBlock(sal_False) +, SingleCommandBlock(sal_True) , m_pControls(NULL) , m_pNameKontext(NULL) , m_pSIds(NULL) @@ -383,7 +383,7 @@ TestToolObj::TestToolObj( String aName, String aFilePath ) // Inter pImpl->aFileBase = DirEntry(aFilePath); // pImpl->aLogFileBase = DirEntry(); pImpl->aHIDDir = DirEntry(aFilePath); - pImpl->bIsStart = FALSE; + pImpl->bIsStart = sal_False; pImpl->pMyBasic = NULL; pImpl->aServerTimeout = Time(0,1,00); // 1:00 Minuten fest @@ -392,12 +392,12 @@ TestToolObj::TestToolObj( String aName, String aFilePath ) // Inter TestToolObj::TestToolObj( String aName, MyBasic* pBas ) // Aufruf im Testtool : SbxObject( aName ) -, bUseIPC(TRUE) -, bReturnOK(TRUE) +, bUseIPC(sal_True) +, bReturnOK(sal_True) , nSequence(KEEP_SEQUENCES) , ProgPath() -, IsBlock(FALSE) -, SingleCommandBlock(TRUE) +, IsBlock(sal_False) +, SingleCommandBlock(sal_True) , m_pControls(NULL) , m_pNameKontext(NULL) , m_pSIds(NULL) @@ -412,7 +412,7 @@ TestToolObj::TestToolObj( String aName, MyBasic* pBas ) // Aufruf { pImpl = new ImplTestToolObj; pImpl->ProgParam = String(); - pImpl->bIsStart = FALSE; + pImpl->bIsStart = sal_False; pImpl->pMyBasic = pBas; LoadIniFile(); @@ -477,7 +477,7 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die d String aST; GETSET( aST, "ServerTimeout", ByteString::CreateFromInt64(Time(0,0,45).GetTime()) ); // 45 Sekunden Initial - pImpl->aServerTimeout = Time(ULONG(aST.ToInt64())); + pImpl->aServerTimeout = Time(sal_uLong(aST.ToInt64())); String aSOSE; aCurrentProfile = aConf.ReadKey( "CurrentProfile", "Misc" ); @@ -566,9 +566,9 @@ void TestToolObj::InitTestToolObj() pImpl->nMinRemoteCommandDelay = 0; pImpl->nMaxRemoteCommandDelay = 0; - pImpl->bDoRemoteCommandDelay = FALSE; + pImpl->bDoRemoteCommandDelay = sal_False; - pImpl->bLnaguageExtensionLoaded= FALSE; + pImpl->bLnaguageExtensionLoaded= sal_False; pImpl->pTTSfxBroadcaster = NULL; pImpl->nErrorCount = 0; @@ -583,8 +583,8 @@ void TestToolObj::InitTestToolObj() pImpl->nTestCaseLineNr = 0; - pImpl->bEnableQaErrors = TRUE; - pImpl->bDebugFindNoErrors = FALSE; + pImpl->bEnableQaErrors = sal_True; + pImpl->bDebugFindNoErrors = sal_False; pImpl->pChildEnv = new Environment; @@ -607,8 +607,8 @@ void TestToolObj::InitTestToolObj() pWait = pRTLObject->Make( CUniString("Wait"), SbxCLASS_METHOD, SbxNULL ); pWait->SetUserData( ID_Wait ); // change listener here - pRTLObject->EndListening( pWait->GetBroadcaster(), TRUE ); - StartListening( pWait->GetBroadcaster(), TRUE ); + pRTLObject->EndListening( pWait->GetBroadcaster(), sal_True ); + StartListening( pWait->GetBroadcaster(), sal_True ); } else { @@ -690,7 +690,7 @@ void TestToolObj::InitTestToolObj() // Load the Remote Commands from list if ( !pRCommands ) // Ist static, wird also nur einmal geladen ReadFlatArray( arR_Cmds, pRCommands ); - USHORT i; + sal_uInt16 i; for ( i = 0 ; i < pRCommands->Count() ; i++ ) { SbxTransportMethod *pMeth = new SbxTransportMethod( SbxVARIANT ); @@ -703,7 +703,7 @@ void TestToolObj::InitTestToolObj() pMeth->nValue = 0; #endif Insert( pMeth ); - StartListening( pMeth->GetBroadcaster(), TRUE ); + StartListening( pMeth->GetBroadcaster(), sal_True ); } // Konstanten f�r SetControlType @@ -757,7 +757,7 @@ void TestToolObj::InitTestToolObj() pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(String::CreateFromInt32(i) ) ); Insert( pImpl->pMyVars[i] ); -// StartListening( pMyVars[i]->GetBroadcaster(), TRUE ); +// StartListening( pMyVars[i]->GetBroadcaster(), sal_True ); } @@ -865,7 +865,7 @@ SfxBroadcaster& TestToolObj::GetTTBroadcaster() return *pImpl->pTTSfxBroadcaster; } -void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, BOOL bIsFlat ) +void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, sal_Bool bIsFlat ) { /******************************************************************************* ** @@ -883,7 +883,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B String aLine,aShortname,aLongname; rtl::OString aUId; xub_StrLen nLineNr; - USHORT nElement; + sal_uInt16 nElement; ControlDef *pNewDef, *pNewDef2; ControlDef *pFatherDef = NULL; @@ -896,7 +896,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B TTExecutionStatusHint aHint( TT_EXECUTION_SHOW_ACTION, String(SttResId(S_READING_LONGNAMES)), aFileName ); GetTTBroadcaster().Broadcast( aHint ); } - ReadFlat( aFileName ,pUIds, TRUE ); + ReadFlat( aFileName ,pUIds, sal_True ); if ( !pUIds ) return; pNewDef = new ControlDef("Active",rtl::OString()); @@ -962,12 +962,12 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B aFirstAllowedExtra.AssignAscii("+*"); aAllowed.AssignAscii("_"); xub_StrLen nIndex = 0; - BOOL bOK = TRUE; + sal_Bool bOK = sal_True; while ( bOK && nIndex < aShortname.Len() ) { sal_Unicode aChar = aShortname.GetChar( nIndex ); - BOOL bOKThis = FALSE; + sal_Bool bOKThis = sal_False; bOKThis |= ( aAllowed.Search( aChar ) != STRING_NOTFOUND ); if ( !nIndex ) bOKThis |= ( aFirstAllowedExtra.Search( aChar ) != STRING_NOTFOUND ); @@ -984,7 +984,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B continue; } - BOOL bUnoName = ( aLongname.Copy( 0, 5 ).EqualsIgnoreCaseAscii( ".uno:" ) + sal_Bool bUnoName = ( aLongname.Copy( 0, 5 ).EqualsIgnoreCaseAscii( ".uno:" ) || aLongname.Copy( 0, 4 ).EqualsIgnoreCaseAscii( "http" ) || aLongname.Copy( 0, 15 ).EqualsIgnoreCaseAscii( "private:factory" ) || aLongname.Copy( 0, 8 ).EqualsIgnoreCaseAscii( "service:" ) @@ -993,10 +993,10 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B // generic method to mark longnames as symbolic if ( aLongname.Copy( 0, 4 ).EqualsIgnoreCaseAscii( "sym:" ) ) { - bUnoName = TRUE; + bUnoName = sal_True; aLongname.Erase( 0, 4 ); } - BOOL bMozillaName = ( !bIsFlat && aLongname.Copy( 0, 4 ).EqualsIgnoreCaseAscii( ".moz" ) ); + sal_Bool bMozillaName = ( !bIsFlat && aLongname.Copy( 0, 4 ).EqualsIgnoreCaseAscii( ".moz" ) ); if ( aShortname.GetChar(0) == '+' ) // Kompletten Eintrag kopieren { @@ -1006,7 +1006,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, B if (pNames->Seek_Entry(&WhatName,&nElement)) { OldTree = (ControlDef*)pNames->GetObject(nElement); - pNewDef = new ControlDef(aLongname,aShortname,OldTree,TRUE); + pNewDef = new ControlDef(aLongname,aShortname,OldTree,sal_True); const ControlItem *pItem = pNewDef; if (! pNames->Insert(pItem)) @@ -1138,15 +1138,15 @@ void TestToolObj::AddName(String &aBisher, String &aNeu ) } -void TestToolObj::ReadFlat( String Filename, CNames *&pNames, BOOL bSortByName ) -// Wenn bSortByName == FALSE, dann nach UId Sortieren (ControlItemUId statt ControlDef) +void TestToolObj::ReadFlat( String Filename, CNames *&pNames, sal_Bool bSortByName ) +// Wenn bSortByName == sal_False, dann nach UId Sortieren (ControlItemUId statt ControlDef) { SvFileStream Stream; String aLine,aLongname; rtl::OString aUId; xub_StrLen nLineNr; ControlItem *pNewItem; - USHORT nDoubleCount = 0; + sal_uInt16 nDoubleCount = 0; Stream.Open(Filename, STREAM_STD_READ); @@ -1202,7 +1202,7 @@ void TestToolObj::ReadFlat( String Filename, CNames *&pNames, BOOL bSortByName ) } else { - USHORT nNr; + sal_uInt16 nNr; pNames->Seek_Entry( pNewItem, &nNr ); AddName( pNames->GetObject(nNr)->pData->Kurzname, pNewItem->pData->Kurzname ); } @@ -1227,7 +1227,7 @@ void TestToolObj::ReadFlat( String Filename, CNames *&pNames, BOOL bSortByName ) void ReadFlatArray( const ControlDefLoad arWas [], CNames *&pNames ) { - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; if ( !pNames ) pNames = new CNames(); @@ -1247,15 +1247,15 @@ void TestToolObj::WaitForAnswer () if ( bUseIPC ) { #ifdef DBG_UTILx - USHORT nSysWinModeMemo = GetpApp()->GetSystemWindowMode(); + sal_uInt16 nSysWinModeMemo = GetpApp()->GetSystemWindowMode(); GetpApp()->SetSystemWindowMode( 0 ); ModelessDialog aDlg(NULL); aDlg.SetOutputSizePixel(Size(200,0)); aDlg.SetText(CUniString("Waiting for Answer")); - aDlg.Show( TRUE, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); + aDlg.Show( sal_True, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); GetpApp()->SetSystemWindowMode( nSysWinModeMemo ); #endif - BOOL bWasRealWait = !bReturnOK; + sal_Bool bWasRealWait = !bReturnOK; BasicRuntime aRun( NULL ); if ( BasicRuntimeAccess::HasRuntime() ) aRun = BasicRuntimeAccess::GetRuntime(); @@ -1292,7 +1292,7 @@ void TestToolObj::WaitForAnswer () if ( pTemp ) { ReturnResults( pTemp ); - bReturnOK = TRUE; + bReturnOK = sal_True; } else { @@ -1306,7 +1306,7 @@ void TestToolObj::WaitForAnswer () if ( !bReturnOK ) { ADD_ERROR(ERR_EXEC_TIMEOUT,GEN_RES_STR1(S_TIMOUT_WAITING, String::CreateFromInt64(nSequence))); - bReturnOK = TRUE; + bReturnOK = sal_True; nSequence++; } } @@ -1330,7 +1330,7 @@ IMPL_LINK( TestToolObj, CallDialogHandler, Application*, EMPTYARG ) String aHandlerName(aDialogHandlerName); aDialogHandlerName.Erase(); - ULONG nRememberSequence = nSequence; // Da sich die Sequence im DialogHandler �ndert + sal_uLong nRememberSequence = nSequence; // Da sich die Sequence im DialogHandler �ndert ((StarBASIC*)GetParent())->Call( aHandlerName ); nSequence = nRememberSequence; // Die Sequenznummern werden dann zwar doppelt vergeben, aber wen k�mmerts. @@ -1348,7 +1348,7 @@ void TestToolObj::BeginBlock() DBG_ASSERT(!IsBlock,"BeginBlock innerhalb eines Blockes"); In->Reset(nSequence); - IsBlock = TRUE; + IsBlock = sal_True; } @@ -1385,21 +1385,21 @@ void TestToolObj::SendViaSocket() } } - bReturnOK = FALSE; + bReturnOK = sal_False; if ( pCommunicationManager->GetLastNewLink() ) { if ( !pCommunicationManager->GetLastNewLink()->TransferDataStream( In->GetStream() ) ) { ADD_ERROR(ERR_SEND_TIMEOUT,GEN_RES_STR1(S_TIMOUT_SENDING, String::CreateFromInt64(nSequence))); nSequence++; - bReturnOK = TRUE; // Kein Return zu erwarten + bReturnOK = sal_True; // Kein Return zu erwarten } } else { ADD_ERROR(ERR_SEND_TIMEOUT,GEN_RES_STR1(S_NO_CONNECTION, String::CreateFromInt64(nSequence))); nSequence++; - bReturnOK = TRUE; // Kein Return zu erwarten + bReturnOK = sal_True; // Kein Return zu erwarten } } @@ -1414,7 +1414,7 @@ void TestToolObj::EndBlock() if ( pImpl->bDoRemoteCommandDelay ) { - ULONG nTimeWait = pImpl->nMinRemoteCommandDelay; + sal_uLong nTimeWait = pImpl->nMinRemoteCommandDelay; if ( pImpl->nMaxRemoteCommandDelay != pImpl->nMinRemoteCommandDelay ) nTimeWait += Time::GetSystemTicks() % ( pImpl->nMaxRemoteCommandDelay - pImpl->nMinRemoteCommandDelay ); Timer aTimer; @@ -1434,11 +1434,11 @@ void TestToolObj::EndBlock() else { // PlugInApplication::GetPlugInApp()->ExecuteRemoteStatements( In->GetStream() ); - bReturnOK = FALSE; + bReturnOK = sal_False; if ( aDialogHandlerName.Len() > 0 ) GetpApp()->InsertIdleHdl( LINK( this, TestToolObj, IdleHdl ), 1 ); } - IsBlock = FALSE; + IsBlock = sal_False; } else { @@ -1447,14 +1447,14 @@ void TestToolObj::EndBlock() } -BOOL TestToolObj::Load( String aFileName, SbModule *pMod ) +sal_Bool TestToolObj::Load( String aFileName, SbModule *pMod ) { - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; SvFileStream aStrm( aFileName, STREAM_STD_READ ); if( aStrm.IsOpen() ) { String aText, aLine; - BOOL bIsFirstLine = TRUE; + sal_Bool bIsFirstLine = sal_True; rtl_TextEncoding aFileEncoding = RTL_TEXTENCODING_IBM_850; while( !aStrm.IsEof() && bOk ) { @@ -1466,10 +1466,10 @@ BOOL TestToolObj::Load( String aFileName, SbModule *pMod ) if ( !bIsFirstLine ) aText += '\n'; aText += aLine; - bIsFirstLine = FALSE; + bIsFirstLine = sal_False; } if( aStrm.GetError() != SVSTREAM_OK ) - bOk = FALSE; + bOk = sal_False; } aText.ConvertLineEnd(); pMod->SetName(CUniString("--").Append(aFileName)); @@ -1483,16 +1483,16 @@ BOOL TestToolObj::Load( String aFileName, SbModule *pMod ) MyBasic::SetCompileModule( pOldModule ); if ( WasPrecompilerError() ) - bOk = FALSE; + bOk = sal_False; } else - bOk = FALSE; + bOk = sal_False; return bOk; } -BOOL TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pControls ) +sal_Bool TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pControls ) { SvFileStream aStream; String aName,aURL; @@ -1505,7 +1505,7 @@ BOOL TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pContr if (!aStream.IsOpen()) { ADD_ERROR(ERR_NO_FILE,GEN_RES_STR1(S_CANNOT_OPEN_FILE, Filename)); - return FALSE; + return sal_False; } if ( !pSIds ) @@ -1518,17 +1518,17 @@ BOOL TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pContr GetTTBroadcaster().Broadcast( aHint ); } - USHORT nAnz; + sal_uInt16 nAnz; aStream >> nAnz; CNames *pNames = pSIds; // first read all the slots - BOOL bIsFlat = TRUE; // Slots do not have children + sal_Bool bIsFlat = sal_True; // Slots do not have children while ( nAnz && !aStream.IsEof() ) { aStream.ReadByteString( aName, RTL_TEXTENCODING_UTF8 ); - USHORT nType; + sal_uInt16 nType; aStream >> nType; if ( !nType /* HasNumeric() */) { @@ -1599,7 +1599,7 @@ BOOL TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pContr { aStream >> nAnz; pNames = pControls; // Now read the controls - bIsFlat = FALSE; // Controls *do* have children + bIsFlat = sal_False; // Controls *do* have children } @@ -1611,17 +1611,17 @@ BOOL TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pContr } aStream.Close(); - return TRUE; + return sal_True; } -BOOL TestToolObj::WriteNamesBin( String Filename, CNames *pSIds, CNames *pControls ) +sal_Bool TestToolObj::WriteNamesBin( String Filename, CNames *pSIds, CNames *pControls ) { - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; SvFileStream aStrm( String(Filename).AppendAscii(".bin"), STREAM_STD_WRITE ); if( aStrm.IsOpen() ) { - USHORT i; + sal_uInt16 i; if ( pSIds ) { aStrm << pSIds->Count(); @@ -1629,11 +1629,11 @@ BOOL TestToolObj::WriteNamesBin( String Filename, CNames *pSIds, CNames *pContro { ((ControlDef*)(*pSIds)[i])->Write(aStrm); if( aStrm.GetError() != SVSTREAM_OK ) - bOk = FALSE; + bOk = sal_False; } } else - aStrm << USHORT( 0 ); + aStrm << sal_uInt16( 0 ); if ( pControls ) { @@ -1642,14 +1642,14 @@ BOOL TestToolObj::WriteNamesBin( String Filename, CNames *pSIds, CNames *pContro { ((ControlDef*)(*pControls)[i])->Write(aStrm); if( aStrm.GetError() != SVSTREAM_OK ) - bOk = FALSE; + bOk = sal_False; } } else - aStrm << USHORT( 0 ); + aStrm << sal_uInt16( 0 ); } else - bOk = FALSE; + bOk = sal_False; return bOk; } @@ -1665,8 +1665,8 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, SbxVariable* pVar = p->GetVar(); SbxArray* rPar = pVar->GetParameters(); - ULONG nHintId = p->GetId(); - ULONG nHintUserData = pVar->GetUserData(); + sal_uLong nHintId = p->GetId(); + sal_uLong nHintUserData = pVar->GetUserData(); if( nHintId == SBX_HINT_DATAWANTED ) { nMyVar = 0; @@ -1678,14 +1678,14 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, m_pNameKontext = m_pControls; // So da� nicht immer mal wieder was aus einem alten Kontext dazwischenhaut - for (USHORT i=0;i<VAR_POOL_SIZE;i++) + for (sal_uInt16 i=0;i<VAR_POOL_SIZE;i++) { pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(UniString::CreateFromInt32(i)) ); } } else if ( rPar && rPar->Count() == 2 ) { - USHORT nElement; + sal_uInt16 nElement; SbxVariableRef pArg = rPar->Get( 1 ); String aKontext = pArg->GetString(); ControlDef WhatName(aKontext,rtl::OString()); @@ -1694,7 +1694,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, m_pNameKontext = ((ControlDef*)m_pControls->GetObject(nElement))->GetSons(); // So da� nicht immer mal wieder was aus einem alten Kontext dazwischenhaut - for (USHORT i=0;i<VAR_POOL_SIZE;i++) + for (sal_uInt16 i=0;i<VAR_POOL_SIZE;i++) { pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(UniString::CreateFromInt32(i)) ); } @@ -1724,10 +1724,10 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, GetTTBroadcaster().Broadcast( aHint ); } - pImpl->bIsStart = TRUE; + pImpl->bIsStart = sal_True; BeginBlock(); EndBlock(); - pImpl->bIsStart = FALSE; + pImpl->bIsStart = sal_False; { TTExecutionStatusHint aHint( TT_EXECUTION_HIDE_ACTION ); GetTTBroadcaster().Broadcast( aHint ); @@ -1808,12 +1808,12 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, while ( pCommunicationManager->IsCommunicationRunning() ) Application::Reschedule(); - SingleCommandBlock = TRUE; // Bug 57188 - IsBlock = FALSE; + SingleCommandBlock = sal_True; // Bug 57188 + IsBlock = sal_False; // pCommunicationManager->StartCommunication(); - for (USHORT i=0;i<VAR_POOL_SIZE;i++) + for (sal_uInt16 i=0;i<VAR_POOL_SIZE;i++) { pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(UniString::CreateFromInt32(i)) ); } @@ -1855,19 +1855,19 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, m_pReverseUIds = NULL; } m_pNameKontext = m_pControls; - pImpl->bLnaguageExtensionLoaded = FALSE; + pImpl->bLnaguageExtensionLoaded = sal_False; SfxSimpleHint aHint( SBX_HINT_LANGUAGE_EXTENSION_LOADED ); GetTTBroadcaster().Broadcast( aHint ); pImpl->nMinRemoteCommandDelay = 0; pImpl->nMaxRemoteCommandDelay = 0; - pImpl->bDoRemoteCommandDelay = FALSE; + pImpl->bDoRemoteCommandDelay = sal_False; pImpl->aTestCaseName.Erase(); pImpl->aTestCaseFileName.Erase(); pImpl->nTestCaseLineNr = 0; - pImpl->bEnableQaErrors = TRUE; - pImpl->bDebugFindNoErrors = FALSE; + pImpl->bEnableQaErrors = sal_True; + pImpl->bDebugFindNoErrors = sal_False; pImpl->pChildEnv->clear(); @@ -1892,21 +1892,21 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, if ( Ext.CompareIgnoreCaseToAscii("Win") == COMPARE_EQUAL ) { ReadNames( FilePath.GetFull(),m_pControls,pUIds); - pImpl->bLnaguageExtensionLoaded = TRUE; + pImpl->bLnaguageExtensionLoaded = sal_True; SfxSimpleHint aHint( SBX_HINT_LANGUAGE_EXTENSION_LOADED ); GetTTBroadcaster().Broadcast( aHint ); } else if ( Ext.CompareIgnoreCaseToAscii("Sid") == COMPARE_EQUAL ) { ReadNames( FilePath.GetFull(),m_pSIds,pUIds,FLAT); - pImpl->bLnaguageExtensionLoaded = TRUE; + pImpl->bLnaguageExtensionLoaded = sal_True; SfxSimpleHint aHint( SBX_HINT_LANGUAGE_EXTENSION_LOADED ); GetTTBroadcaster().Broadcast( aHint ); } else if ( Ext.CompareIgnoreCaseToAscii("Bin") == COMPARE_EQUAL ) { ReadNamesBin( FilePath.GetFull(), m_pSIds, m_pControls ); - pImpl->bLnaguageExtensionLoaded = TRUE; + pImpl->bLnaguageExtensionLoaded = sal_True; SfxSimpleHint aHint( SBX_HINT_LANGUAGE_EXTENSION_LOADED ); GetTTBroadcaster().Broadcast( aHint ); } @@ -1986,7 +1986,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, case ID_CaseLog: if ( rPar ) // rPar != NULL <=> Es gibt Parameter { - USHORT n; + sal_uInt16 n; String aX; for ( n = 1; n < rPar->Count(); n++ ) { @@ -2014,16 +2014,16 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, if ( IS_ERROR() ) { BasicRuntime aRun = BasicRuntimeAccess::GetRuntime(); - BOOL bWasNewError = FALSE; + sal_Bool bWasNewError = sal_False; if ( BasicRuntimeAccess::HasStack() ) { - for ( USHORT i = 0 ; i < BasicRuntimeAccess::GetStackEntryCount() -1 ; i++ ) + for ( sal_uInt16 i = 0 ; i < BasicRuntimeAccess::GetStackEntryCount() -1 ; i++ ) { BasicErrorStackEntry aThisEntry = BasicRuntimeAccess::GetStackEntry(i); if ( !bWasNewError ) { - bWasNewError = TRUE; + bWasNewError = sal_True; ADD_ERROR_LOG( GET_ERROR()->aText, aThisEntry.GetModuleName(SbxNAME_SHORT_TYPES), aThisEntry.GetLine(), aThisEntry.GetCol1(), aThisEntry.GetCol2(), aThisEntry.GetSourceRevision() ); } @@ -2036,7 +2036,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, BasicRuntimeAccess::DeleteStack(); } - BOOL bIsFirst = TRUE; + sal_Bool bIsFirst = sal_True; while ( aRun.IsValid() ) { xub_StrLen nErrLn; @@ -2044,7 +2044,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, xub_StrLen nCol2; if ( bIsFirst ) { - bIsFirst = FALSE; + bIsFirst = sal_False; nErrLn = GET_ERROR()->nLine; nCol1 = GET_ERROR()->nCol1; nCol2 = GET_ERROR()->nCol2; @@ -2058,7 +2058,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, if ( !bWasNewError ) { - bWasNewError = TRUE; + bWasNewError = sal_True; ADD_ERROR_LOG( GET_ERROR()->aText, aRun.GetModuleName(SbxNAME_SHORT_TYPES), nErrLn, nCol1, nCol2, aRun.GetSourceRevision() ); } @@ -2091,7 +2091,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, case ID_QAErrorLog: if ( rPar ) // rPar != NULL <=> Es gibt Parameter { - USHORT n; + sal_uInt16 n; String aSammel; for ( n = 1; n < rPar->Count(); n++ ) { @@ -2104,7 +2104,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, case ID_PrintLog: if ( rPar ) // rPar != NULL <=> Es gibt Parameter { - USHORT n; + sal_uInt16 n; String aSammel; for ( n = 1; n < rPar->Count(); n++ ) { @@ -2117,7 +2117,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, case ID_WarnLog: if ( rPar ) // rPar != NULL <=> Es gibt Parameter { - USHORT n; + sal_uInt16 n; String aSammel; for ( n = 1; n < rPar->Count(); n++ ) { @@ -2151,7 +2151,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, // Das ist total rotten und mu� wohl komplett neu!! -/* BOOL bWasBlock = IsBlock; +/* sal_Bool bWasBlock = IsBlock; if ( !IsBlock ) // Impliziter call bei Aufruf mit Methode if ( SingleCommandBlock ) BeginBlock(); @@ -2159,7 +2159,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, // In->GenCmdSlot (128,rPar); // ((Controls*)pVar)->pMethodVar->nValue = 128; - ULONG nOldValue = ((Controls*)pVar)->GetULong(); + sal_uLong nOldValue = ((Controls*)pVar)->GetULong(); // Setzen, so da� beim Return der Wert stimmt ((Controls*)pVar)->PutULong( 128 ); pImpl->pNextReturn = ((Controls*)pVar)->pMethodVar; @@ -2216,7 +2216,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, SetError( SbxERR_NOTIMP ); } if ( !IsError() ) - In->GenCmdCommand ((USHORT)(((SbxTransportMethod*)pVar)->nValue),rPar); + In->GenCmdCommand ((sal_uInt16)(((SbxTransportMethod*)pVar)->nValue),rPar); if ( !IsError() && ((SbxTransportMethod*)pVar)->nValue & M_WITH_RETURN ) { pImpl->pNextReturn = ((SbxTransportMethod*)pVar); @@ -2225,7 +2225,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, } if ( SingleCommandBlock ) EndBlock(); - if ( !IsError() && (USHORT)((SbxTransportMethod*)pVar)->nValue & M_WITH_RETURN ) + if ( !IsError() && (sal_uInt16)((SbxTransportMethod*)pVar)->nValue & M_WITH_RETURN ) { WaitForAnswer(); } @@ -2245,8 +2245,8 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, if ( SingleCommandBlock ) BeginBlock(); if ( !IsError() ) - In->GenCmdSlot ( (USHORT)((SbxTransportMethod*)pVar)->nValue, rPar ); - pVar->PutInteger( (USHORT)((SbxTransportMethod*)pVar)->nValue ); + In->GenCmdSlot ( (sal_uInt16)((SbxTransportMethod*)pVar)->nValue, rPar ); + pVar->PutInteger( (sal_uInt16)((SbxTransportMethod*)pVar)->nValue ); if ( SingleCommandBlock ) EndBlock(); } @@ -2293,14 +2293,14 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, if ( nHintUserData == ID_Control ) { In->GenCmdControl (pMember->GetULong(), - (USHORT)((SbxTransportMethod*)pVar)->nValue, rPar); + (sal_uInt16)((SbxTransportMethod*)pVar)->nValue, rPar); // FIXME: HELPID aNextReturnId = rtl::OString();// pMember->GetULong() ); } else { In->GenCmdControl (pMember->GetString(), - (USHORT)((SbxTransportMethod*)pVar)->nValue, rPar); + (sal_uInt16)((SbxTransportMethod*)pVar)->nValue, rPar); // FIXME: HELPID #if 0 aNextReturnId = rtl::OString( pMember->GetString() ); @@ -2321,7 +2321,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, } if ( SingleCommandBlock ) EndBlock(); - if ( !IsError() && (USHORT)((SbxTransportMethod*)pVar)->nValue & M_WITH_RETURN ) + if ( !IsError() && (sal_uInt16)((SbxTransportMethod*)pVar)->nValue & M_WITH_RETURN ) { WaitForAnswer(); } @@ -2796,7 +2796,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, delete pFehlerListe; pFehlerListe = new CErrors; - for (USHORT i=0;i<VAR_POOL_SIZE;i++) + for (sal_uInt16 i=0;i<VAR_POOL_SIZE;i++) { pImpl->pMyVars[i]->SetName( CUniString("VarDummy").Append(UniString::CreateFromInt32(i)) ); } @@ -2847,7 +2847,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, } } -void TestToolObj::DebugFindNoErrors( BOOL bDebugFindNoErrors ) +void TestToolObj::DebugFindNoErrors( sal_Bool bDebugFindNoErrors ) { pImpl->bDebugFindNoErrors = bDebugFindNoErrors; } @@ -2870,7 +2870,7 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType) else { - USHORT nElement; + sal_uInt16 nElement; ControlDef *pWhatName = new ControlDef(aStr,rtl::OString()); /// nach Controls suchen @@ -2987,18 +2987,18 @@ String TestToolObj::GetRevision( String const &aSourceIn ) return String::CreateFromAscii("No Revision found"); } -BOOL TestToolObj::CError( ULONG code, const String& rMsg, xub_StrLen l, xub_StrLen c1, xub_StrLen c2 ) +sal_Bool TestToolObj::CError( sal_uLong code, const String& rMsg, xub_StrLen l, xub_StrLen c1, xub_StrLen c2 ) { - bWasPrecompilerError = TRUE; + bWasPrecompilerError = sal_True; if ( aCErrorHdl.IsSet() ) { ErrorEntry aErrorEntry( code, rMsg, l, c1, c2 ); - return (BOOL)aCErrorHdl.Call( &aErrorEntry ); + return (sal_Bool)aCErrorHdl.Call( &aErrorEntry ); } else { ADD_ERROR( code, rMsg ) - return TRUE; + return sal_True; } } @@ -3020,15 +3020,15 @@ void TestToolObj::CalcPosition( String const &aSource, xub_StrLen nPos, xub_StrL #define CATCHRES_LABEL CUniString( "ctchres" ) #define ENDCATCH_LABEL CUniString( "endctch" ) -BOOL IsAlphaChar( sal_Unicode cChar ) +sal_Bool IsAlphaChar( sal_Unicode cChar ) { return ( cChar >= 'a' && cChar <= 'z' ) || ( cChar >= 'A' && cChar <= 'Z' ); } -BOOL IsInsideString( const String& aSource, const xub_StrLen nStart ) +sal_Bool IsInsideString( const String& aSource, const xub_StrLen nStart ) { - BOOL bInside = FALSE; + sal_Bool bInside = sal_False; xub_StrLen nPos = nStart-1; while ( nPos && aSource.GetChar(nPos) != _CR && aSource.GetChar(nPos) != _LF ) @@ -3040,7 +3040,7 @@ BOOL IsInsideString( const String& aSource, const xub_StrLen nStart ) return bInside; } -BOOL IsValidHit( const String& aSource, const xub_StrLen nStart, const xub_StrLen nEnd ) +sal_Bool IsValidHit( const String& aSource, const xub_StrLen nStart, const xub_StrLen nEnd ) { return !IsAlphaChar( aSource.GetChar(nStart-1) ) && !IsAlphaChar( aSource.GetChar(nEnd+1)) && !IsInsideString( aSource, nStart ); @@ -3061,7 +3061,7 @@ xub_StrLen TestToolObj::ImplSearch( const String &aSource, const xub_StrLen nSta } } -xub_StrLen TestToolObj::PreCompilePart( String &aSource, xub_StrLen nStart, xub_StrLen nEnd, String aFinalErrorLabel, USHORT &nLabelCount ) +xub_StrLen TestToolObj::PreCompilePart( String &aSource, xub_StrLen nStart, xub_StrLen nEnd, String aFinalErrorLabel, sal_uInt16 &nLabelCount ) { xub_StrLen nTry,nCatch,nEndcatch; if( (nTry = ImplSearch( aSource, nStart, nEnd, CUniString("try"), nStart )) == STRING_NOTFOUND ) @@ -3170,7 +3170,7 @@ xub_StrLen TestToolObj::PreCompilePart( String &aSource, xub_StrLen nStart, xub_ void TestToolObj::PreCompileDispatchParts( String &aSource, String aStart, String aEnd, String aFinalLable ) { - USHORT nLabelCount = 0; + sal_uInt16 nLabelCount = 0; xub_StrLen nPartPos = 0; while ( !WasPrecompilerError() && (nPartPos = ImplSearch( aSource, nPartPos, aSource.Len(), aStart )) != STRING_NOTFOUND ) @@ -3184,7 +3184,7 @@ void TestToolObj::PreCompileDispatchParts( String &aSource, String aStart, Strin } -BOOL TestToolObj::WasPrecompilerError() +sal_Bool TestToolObj::WasPrecompilerError() { return bWasPrecompilerError; } @@ -3192,13 +3192,13 @@ BOOL TestToolObj::WasPrecompilerError() String TestToolObj::PreCompile( String const &aSourceIn ) { // Im CTOR zu fr�h, und hier grade nicg rechtzeitig. Start und Stop von Programmausf�hrung - StartListening( ((StarBASIC*)GetParent())->GetBroadcaster(), TRUE ); + StartListening( ((StarBASIC*)GetParent())->GetBroadcaster(), sal_True ); xub_StrLen nTestCase; xub_StrLen nEndCase; xub_StrLen nStartPos = 0; String aSource(aSourceIn); - bWasPrecompilerError = FALSE; + bWasPrecompilerError = sal_False; HACK("Ich gestehe alles: Ich war zu faul das richtig zu machen.") aSource = String(' ').Append( aSource ); // Da Schl�sselworte an Position 0 sonst nicht gefunden werden @@ -3209,7 +3209,7 @@ HACK("Ich gestehe alles: Ich war zu faul das richtig zu machen.") xub_StrLen nComment; while ( (nComment = aSource.SearchAscii("'",nStartPos)) != STRING_NOTFOUND ) { - USHORT nStringEndCount = 0; + sal_uInt16 nStringEndCount = 0; xub_StrLen nIndex = nComment; while ( nIndex && aSource.GetChar(nIndex) != '\n' ) { @@ -3260,7 +3260,7 @@ HACK("Ich gestehe alles: Ich war zu faul das richtig zu machen.") if ( aSource.SearchAscii(":",nTestCase) < nTcEnd ) nTcEnd = aSource.SearchAscii(":",nTestCase) -1; String aSuffix = aSource.Copy(nTestCase+8,nTcEnd-nTestCase-8); - USHORT nOldLen; + sal_uInt16 nOldLen; do { nOldLen = aSuffix.Len(); @@ -3288,7 +3288,7 @@ HACK("Ich gestehe alles: Ich war zu faul das richtig zu machen.") void TestToolObj::AddToListByNr( CNames *&pControls, ControlItemUId *&pNewItem ) { - USHORT nNr; + sal_uInt16 nNr; if ( pControls->Seek_Entry( pNewItem, &nNr ) ) { AddName( pControls->GetObject(nNr)->pData->Kurzname, pNewItem->pData->Kurzname ); @@ -3319,7 +3319,7 @@ void TestToolObj::ReadHidLstByNumber() GetTTBroadcaster().Broadcast( aHint ); } - ReadFlat( aName, m_pReverseUIds, FALSE ); + ReadFlat( aName, m_pReverseUIds, sal_False ); { TTExecutionStatusHint aHint( TT_EXECUTION_HIDE_ACTION ); @@ -3328,14 +3328,14 @@ void TestToolObj::ReadHidLstByNumber() } } -void TestToolObj::SortControlsByNumber( BOOL bIncludeActive ) +void TestToolObj::SortControlsByNumber( sal_Bool bIncludeActive ) { // Die Controls einmal hirarchisch und einmal alle flach nach nummer sortiert if ( !m_pReverseControls && !m_pReverseControlsSon && m_pControls ) { m_pReverseControls = new CNames; m_pReverseControlsSon = new CNames; - USHORT nWin,nCont; + sal_uInt16 nWin,nCont; const String aSl('/'); for ( nWin = 0 ; nWin < m_pControls->Count() ; nWin++ ) { @@ -3366,7 +3366,7 @@ void TestToolObj::SortControlsByNumber( BOOL bIncludeActive ) { // FIXME: HELPID ControlItem *pZeroItem = new ControlItemUId( UniString(), rtl::OString() ); - USHORT nNr; + sal_uInt16 nNr; if ( m_pReverseControls->Seek_Entry( pZeroItem, &nNr ) ) { m_pReverseControls->DeleteAndDestroy( nNr ); @@ -3383,12 +3383,12 @@ void TestToolObj::SortControlsByNumber( BOOL bIncludeActive ) } -BOOL TestToolObj::ReturnResults( SvStream *pIn ) +sal_Bool TestToolObj::ReturnResults( SvStream *pIn ) { - USHORT nId; - ULONG nClearSequence = 0; - BOOL bSequenceOK = TRUE; + sal_uInt16 nId; + sal_uLong nClearSequence = 0; + sal_Bool bSequenceOK = sal_True; CNames *pReverseControlsKontext = NULL; CRetStream *pRetStream = new CRetStream(pIn); @@ -3400,7 +3400,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) { case SIReturn: { - USHORT nRet,nParams; + sal_uInt16 nRet,nParams; rtl::OString aUId; pRetStream->Read(nRet); if ( pRetStream->GetNextType() == BinString ) @@ -3423,10 +3423,10 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) } pRetStream->Read(nParams); - USHORT nNr1 = 0; + sal_uInt16 nNr1 = 0; comm_ULONG nLNr1 = 0; String aString1; - BOOL bBool1 = FALSE; + sal_Bool bBool1 = sal_False; SbxValueRef xValue1 = new SbxValue; if( nParams & PARAM_USHORT_1 ) @@ -3450,10 +3450,10 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) { // FIXME: HELPID #if 0 - ULONG nUId = aUId.GetNum(); + sal_uLong nUId = aUId.GetNum(); if ( nSequence != nUId ) { - bSequenceOK = FALSE; + bSequenceOK = sal_False; ADD_ERROR(SbxERR_BAD_ACTION, GEN_RES_STR2(S_RETURN_SEQUENCE_MISSMATCH, String::CreateFromInt64(nUId), String::CreateFromInt64(nSequence)) ); } else @@ -3466,7 +3466,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) case RET_Value: if ( pImpl->pNextReturn ) { -// ULONG nHintUserData = pImpl->pNextReturn->GetParent()->GetUserData(); +// sal_uLong nHintUserData = pImpl->pNextReturn->GetParent()->GetUserData(); // pImpl->pNextReturn->GetParent()->SetUserData(0); // if ( nUId == pImpl->pNextReturn->GetParent()->GetULong() ) if ( aNextReturnId.equals( aUId ) ) @@ -3512,7 +3512,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) if ( !m_pReverseSlots && m_pSIds ) { m_pReverseSlots = new CNames; - USHORT nWin; + sal_uInt16 nWin; const String aSl('/'); for ( nWin = 0 ; nWin < m_pSIds->Count() ; nWin++ ) { @@ -3526,7 +3526,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) #if 0 pWinInfo->aUId = aUId.GetText(); #endif - pWinInfo->nRType = (USHORT)nLNr1; // just ULONG for Transport, data is always USHORT + pWinInfo->nRType = (sal_uInt16)nLNr1; // just sal_uLong for Transport, data is always USHORT pWinInfo->aRName = aString1; pWinInfo->bIsReset = bBool1; pWinInfo->aKurzname.Erase(); @@ -3535,7 +3535,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) // eventuell den Kontext feststellen. Passiert nur beim ersten Eintrag nach reset if ( !pReverseControlsKontext && m_pReverseControlsSon ) { - USHORT nNr; + sal_uInt16 nNr; ControlItem *pNewItem = new ControlItemUId( String(), aUId ); if ( m_pReverseControlsSon->Seek_Entry(pNewItem,&nNr) ) { @@ -3557,7 +3557,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) // Kurzname feststellen if ( pReverseControlsKontext ) { - USHORT nNr; + sal_uInt16 nNr; ControlItem *pNewItem = new ControlItemUId( String(), aUId ); if ( pReverseControlsKontext->Seek_Entry(pNewItem,&nNr) ) { @@ -3570,7 +3570,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) // Slotname feststellen if ( m_pReverseSlots ) { - USHORT nNr; + sal_uInt16 nNr; ControlItem *pNewItem = new ControlItemUId( String(), aUId ); if ( m_pReverseSlots->Seek_Entry(pNewItem,&nNr) ) pWinInfo->aSlotname = m_pReverseSlots->GetObject(nNr)->pData->Kurzname; @@ -3588,7 +3588,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) { if ( m_pReverseUIds ) { - USHORT nNr; + sal_uInt16 nNr; ControlItem *pNewItem = new ControlItemUId( String(), aUId ); if ( m_pReverseUIds->Seek_Entry(pNewItem,&nNr) ) pWinInfo->aLangname = m_pReverseUIds->GetObject(nNr)->pData->Kurzname; @@ -3606,7 +3606,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) { // FIXME: HELPID #if 0 - ULONG nUId = aUId.GetNum(); + sal_uLong nUId = aUId.GetNum(); if ( nParams & PARAM_STR_1 ) { DirEntry FilePath = pImpl->aLogFileBase + DirEntry(DirEntry(aLogFileName).GetBase().AppendAscii(".prf")); @@ -3625,8 +3625,8 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) { case S_ProfileReset: // nLNr1 = Anzahl Borders { - pImpl->nNumBorders = (USHORT)nLNr1; // Borders are 0 to 4 - USHORT i; + pImpl->nNumBorders = (sal_uInt16)nLNr1; // Borders are 0 to 4 + sal_uInt16 i; for ( i=0 ; i<4 ; i++ ) pImpl->naValBorders[i] = 0; @@ -3648,7 +3648,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) } case S_ProfileTime: // nLNr1 = remote Zeit des Befehls { - USHORT i; + sal_uInt16 i; for ( i=0 ; i<pImpl->nNumBorders && pImpl->naValBorders[i] <= nLNr1 ; i++ ) {}; @@ -3683,7 +3683,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) if( aStrm.IsOpen() ) { String aProfile; - USHORT i; + sal_uInt16 i; aProfile += String().Expand(15); for ( i=0 ; i<pImpl->nNumBorders ; i++ ) @@ -3741,7 +3741,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) { // FIXME: HELPID #if 0 - ULONG nUId = aUId.GetNum(); + sal_uLong nUId = aUId.GetNum(); switch ( nUId ) { case S_AssertError: @@ -3764,15 +3764,15 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) break; case RET_MacroRecorder: { - SortControlsByNumber( TRUE ); + SortControlsByNumber( sal_True ); String aCommand,aControls,aControl,aULongNames,aULongName; - BOOL bWriteNewKontext = FALSE; + sal_Bool bWriteNewKontext = sal_False; aControls.Erase(); // Kurzname feststellen if ( m_pReverseControls ) { - USHORT nNr; + sal_uInt16 nNr; ControlItem *pNewItem = new ControlItemUId( String(), aUId ); if ( m_pReverseControls->Seek_Entry(pNewItem,&nNr) ) aControls = m_pReverseControls->GetObject(nNr)->pData->Kurzname; @@ -3789,7 +3789,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) { if ( m_pReverseControls ) { - USHORT nNr; + sal_uInt16 nNr; // FIXME: HELPID ControlItem *pNewItem = new ControlItemUId( String(), rtl::OString( /*nLNr1*/ ) ); if ( m_pReverseControls->Seek_Entry(pNewItem,&nNr) ) @@ -3803,8 +3803,8 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) } // now determin the best common kontext - USHORT i,j; - BOOL bFoundUlongName = FALSE, bFoundControl = FALSE; + sal_uInt16 i,j; + sal_Bool bFoundUlongName = sal_False, bFoundControl = sal_False; // check for current kontext for ( i = 0 ; !bFoundUlongName && i < aULongNames.GetTokenCount('/') ; i++ ) bFoundUlongName = aLastRecordedKontext.Equals( aULongNames.GetToken(i,'/').GetToken( 0,':') ); @@ -3819,7 +3819,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) } else { // see if we can find common kontext - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; String aCurrentKontext; for ( i = 0 ; !bFound && i < aULongNames.GetTokenCount('/') ; i++ ) @@ -3830,19 +3830,19 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) { if ( aCurrentKontext.Equals( aControls.GetToken(j,'/').GetToken( 0,':') ) ) { - bFound = TRUE; + bFound = sal_True; aULongName = aULongNames.GetToken(i,'/').GetToken( 1,':'); aControl = aControls.GetToken(j,'/').GetToken( 1,':'); aLastRecordedKontext = aCurrentKontext; - bWriteNewKontext = TRUE; + bWriteNewKontext = sal_True; } } } if ( !bFound ) { // check if both contain toplevel - bFoundUlongName = FALSE; - bFoundControl = FALSE; + bFoundUlongName = sal_False; + bFoundControl = sal_False; for ( i = 0 ; !bFoundUlongName && i < aULongNames.GetTokenCount('/') ; i++ ) bFoundUlongName = aULongNames.GetToken(i,'/').GetToken( 0,':').Equals( aULongNames.GetToken(i,'/').GetToken( 1,':') ); @@ -3856,7 +3856,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) if ( aLastRecordedKontext.Len() ) { aLastRecordedKontext.Erase(); - bWriteNewKontext = TRUE; + bWriteNewKontext = sal_True; } } else @@ -3874,8 +3874,8 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) } else { // we only have a Control - USHORT i; - BOOL bFoundControl = FALSE; + sal_uInt16 i; + sal_Bool bFoundControl = sal_False; // check for current kontext for ( i = 0 ; !bFoundControl && i < aControls.GetTokenCount('/') ; i++ ) bFoundControl = aLastRecordedKontext.Equals( aControls.GetToken(i,'/').GetToken( 0,':') ); @@ -3884,7 +3884,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) else { aLastRecordedKontext = aControls.GetToken(0,'/').GetToken( 0,':'); - bWriteNewKontext = TRUE; + bWriteNewKontext = sal_True; aControl = aControls.GetToken(0,'/').GetToken( 1,':'); } @@ -3911,35 +3911,35 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) aCommand += '.'; aCommand += aMethod; - BOOL bWasParam = FALSE; + sal_Bool bWasParam = sal_False; if( nParams & PARAM_STR_1 ) { - bWasParam = TRUE; + bWasParam = sal_True; aCommand.AppendAscii( " \"" ); if ( nNr1 & M_KEY_STRING ) { - USHORT nModify = 0; - BOOL bIsProsa = FALSE; + sal_uInt16 nModify = 0; + sal_Bool bIsProsa = sal_False; xub_StrLen i; for ( i = 0; i < aString1.Len(); i++ ) { - if ( ((USHORT)aString1.GetChar(i)) == 1 ) // we have a spechial char + if ( ((sal_uInt16)aString1.GetChar(i)) == 1 ) // we have a spechial char { i++; if ( !bIsProsa ) { aCommand.AppendAscii( "<" ); - bIsProsa = TRUE; + bIsProsa = sal_True; } else aCommand.AppendAscii( " " ); - USHORT nKeyCode = (USHORT)aString1.GetChar(i) & KEY_CODE; - USHORT nNewModify = (USHORT)aString1.GetChar(i) & KEY_MODTYPE; + sal_uInt16 nKeyCode = (sal_uInt16)aString1.GetChar(i) & KEY_CODE; + sal_uInt16 nNewModify = (sal_uInt16)aString1.GetChar(i) & KEY_MODTYPE; if ( nNewModify != nModify ) { // generate modifiers - USHORT nChanged = ( nNewModify ^ nModify ); + sal_uInt16 nChanged = ( nNewModify ^ nModify ); if ( nChanged & KEY_SHIFT ) { aCommand += GetKeyName( KEY_SHIFT ); @@ -3964,7 +3964,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) if ( bIsProsa ) { aCommand.AppendAscii( ">" ); - bIsProsa = FALSE; + bIsProsa = sal_False; } aCommand += aString1.GetChar(i); nModify = 0; @@ -3973,7 +3973,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) if ( bIsProsa ) { aCommand.AppendAscii( ">" ); - bIsProsa = FALSE; + bIsProsa = sal_False; } } else @@ -3988,7 +3988,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) aCommand.AppendAscii( ", " ); else aCommand.AppendAscii( " " ); - bWasParam = TRUE; + bWasParam = sal_True; if ( nNr1 & M_RET_NUM_CONTROL ) { aCommand.Append( aULongName ); @@ -4004,7 +4004,7 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) aCommand.AppendAscii( ", " ); else aCommand.AppendAscii( " " ); - bWasParam = TRUE; + bWasParam = sal_True; if ( bBool1 ) aCommand.AppendAscii( "true" ); else @@ -4077,14 +4077,14 @@ BOOL TestToolObj::ReturnResults( SvStream *pIn ) pShortNames->Invalidate( nClearSequence - KEEP_SEQUENCES ); } - bReturnOK = TRUE; + bReturnOK = sal_True; - return TRUE; + return sal_True; } // RetService::Request() -String TestToolObj::GetMethodName( ULONG nMethodId ) +String TestToolObj::GetMethodName( sal_uLong nMethodId ) { - USHORT nElement; + sal_uInt16 nElement; if ( !Controls::pClasses ) // Ist static, wird also nur einmal geladen ReadFlatArray( Controls::arClasses, Controls::pClasses ); if ( Controls::pClasses ) @@ -4102,9 +4102,9 @@ String TestToolObj::GetMethodName( ULONG nMethodId ) return String(); } -String TestToolObj::GetKeyName( USHORT nKeyCode ) +String TestToolObj::GetKeyName( sal_uInt16 nKeyCode ) { - USHORT nElement; + sal_uInt16 nElement; if ( !CmdStream::pKeyCodes ) // Ist static, wird also nur einmal geladen ReadFlatArray( CmdStream::arKeyCodes, CmdStream::pKeyCodes ); if ( CmdStream::pKeyCodes ) @@ -4132,36 +4132,36 @@ static ControlDefLoad __READONLY_DATA arRes_Type [] = xub_StrLen nGleich = STRING_NOTFOUND; xub_StrLen nEnd = STRING_NOTFOUND; xub_StrLen nStartPos = 0; - ULONG nNumber; + sal_uLong nNumber; String aType; String aResult; - BOOL bFound; + sal_Bool bFound; while ( (nStart = aText.Search(StartKenn,nStartPos)) != STRING_NOTFOUND && (nGleich = aText.SearchAscii("=",nStart+StartKenn.Len())) != STRING_NOTFOUND && (nEnd = aText.Search(EndKenn,nGleich+1)) != STRING_NOTFOUND) { aType = aText.Copy(nStart,nGleich-nStart); - nNumber = (ULONG)aText.Copy(nGleich+1,nEnd-nGleich-1).ToInt64(); - bFound = FALSE; + nNumber = (sal_uLong)aText.Copy(nGleich+1,nEnd-nGleich-1).ToInt64(); + bFound = sal_False; if ( aType.CompareTo(UIdKenn) == COMPARE_EQUAL ) { // FIXME: HELPID aResult = pShortNames->GetName(rtl::OString(/*nNumber*/)); - bFound = TRUE; + bFound = sal_True; } if ( aType.CompareTo(MethodKenn ) == COMPARE_EQUAL ) { - bFound = TRUE; + bFound = sal_True; aResult = GetMethodName( nNumber ); } if ( aType.CompareTo(RcKenn ) == COMPARE_EQUAL ) { - bFound = TRUE; + bFound = sal_True; if ( !pRCommands ) // Ist static, wird also nur einmal geladen ReadFlatArray( arR_Cmds, pRCommands ); - USHORT nElement; + sal_uInt16 nElement; if ( pRCommands ) { // FIXME: HELPID @@ -4179,11 +4179,11 @@ static ControlDefLoad __READONLY_DATA arRes_Type [] = } if ( aType.CompareTo(TypeKenn ) == COMPARE_EQUAL ) { - bFound = TRUE; + bFound = sal_True; if ( !pRTypes ) // Ist static, wird also nur einmal geladen ReadFlatArray( arRes_Type, pRTypes ); - USHORT nElement; + sal_uInt16 nElement; if ( pRTypes ) { // FIXME: HELPID @@ -4203,15 +4203,15 @@ static ControlDefLoad __READONLY_DATA arRes_Type [] = { // FIXME: HELPID aResult = pShortNames->GetName(rtl::OString(/*nNumber*/)); - bFound = TRUE; + bFound = sal_True; } if ( aType.CompareTo(TabKenn ) == COMPARE_EQUAL ) { if ( nNumber > nStart ) - aResult.Fill( (USHORT)nNumber - nStart +1 ); + aResult.Fill( (sal_uInt16)nNumber - nStart +1 ); else aResult = CUniString(" "); - bFound = TRUE; + bFound = sal_True; } nStartPos = nStart; @@ -4227,7 +4227,7 @@ static ControlDefLoad __READONLY_DATA arRes_Type [] = } -SbTextType TestToolObj::GetSymbolType( const String &rSymbol, BOOL bWasControl ) +SbTextType TestToolObj::GetSymbolType( const String &rSymbol, sal_Bool bWasControl ) { if ( rSymbol.CompareToAscii( "try" ) == COMPARE_EQUAL || rSymbol.CompareToAscii( "catch" ) == COMPARE_EQUAL @@ -4257,7 +4257,7 @@ SbTextType TestToolObj::GetSymbolType( const String &rSymbol, BOOL bWasControl ) // Die Controls durchsuchen if ( m_pControls ) { - USHORT nWin; + sal_uInt16 nWin; for ( nWin = 0 ; nWin < m_pControls->Count() ; nWin++ ) { @@ -4306,8 +4306,8 @@ Controls::~Controls() void Controls::ChangeListener( SbxObject* parent ) { - EndListening( pMethodVar->GetBroadcaster(), TRUE ); - parent->StartListening( pMethodVar->GetBroadcaster(), TRUE ); + EndListening( pMethodVar->GetBroadcaster(), sal_True ); + parent->StartListening( pMethodVar->GetBroadcaster(), sal_True ); } void Controls::SFX_NOTIFY( SfxBroadcaster&, const TypeId&, @@ -4329,13 +4329,13 @@ SbxVariable* Controls::Find( const String& aStr, SbxClassType aType) } - USHORT nElement; + sal_uInt16 nElement; ControlDef WhatName(aStr,rtl::OString()); if (pClasses && pClasses->Seek_Entry(&WhatName,&nElement)) { pMethodVar->SetName(aStr); // FIXME: HELPID - ULONG nUId = 0;//pClasses->GetObject(nElement)->pData->aUId.GetNum(); + sal_uLong nUId = 0;//pClasses->GetObject(nElement)->pData->aUId.GetNum(); pMethodVar->nValue = nUId; pMethodVar->SetUserData( GetUserData() ); @@ -4354,7 +4354,7 @@ SbxVariable* Controls::Find( const String& aStr, SbxClassType aType) } -String TTFormat::ms2s( ULONG nMilliSeconds ) +String TTFormat::ms2s( sal_uLong nMilliSeconds ) { if ( nMilliSeconds < 100000 ) // 100 Sekunden return String::CreateFromInt64( nMilliSeconds ); diff --git a/automation/source/testtool/objtest.hxx b/automation/source/testtool/objtest.hxx index f62d59311024..c0dfd1c12ac6 100644 --- a/automation/source/testtool/objtest.hxx +++ b/automation/source/testtool/objtest.hxx @@ -120,24 +120,24 @@ public: ControlItem( const char *Name, rtl::OString aUIdP ); ControlItem( const String &Name, rtl::OString aUIdP ); // ControlItem( const String &Name, const String &URL, const URLType aType ); -// ControlItem( const String &Name, const String &URL, const ULONG nUId ); -// ControlItem( const char *Name, const String &URL, const ULONG nUId ); +// ControlItem( const String &Name, const String &URL, const sal_uLong nUId ); +// ControlItem( const char *Name, const String &URL, const sal_uLong nUId ); ControlItem( ControlData *pDataP ); virtual ~ControlItem() { DBG_DTOR(ControlItem,0); delete pData; } - virtual BOOL operator < (const ControlItem &rPar)=0; - virtual BOOL operator == (const ControlItem &rPar)=0; + virtual sal_Bool operator < (const ControlItem &rPar)=0; + virtual sal_Bool operator == (const ControlItem &rPar)=0; // void Write( SvStream &aStream ); }; SV_DECL_PTRARR_SORT_DEL(CNames, ControlItem*, 50, 10) #define MK_SON_ACCESS( ClassName )\ - BOOL SonInsert( const ClassName *pNewEntry ) { const ControlItem *pItem = pNewEntry; return pSons->Insert( pItem ); }\ - BOOL SonSeek_Entry( const ClassName *pSearchEntry, USHORT *nRes = NULL) { return pSons->Seek_Entry( pSearchEntry, nRes ); }\ - ClassName* SonGetObject( USHORT nNr ) { return (ClassName*)pSons->GetObject( nNr ); } + sal_Bool SonInsert( const ClassName *pNewEntry ) { const ControlItem *pItem = pNewEntry; return pSons->Insert( pItem ); }\ + sal_Bool SonSeek_Entry( const ClassName *pSearchEntry, sal_uInt16 *nRes = NULL) { return pSons->Seek_Entry( pSearchEntry, nRes ); }\ + ClassName* SonGetObject( sal_uInt16 nNr ) { return (ClassName*)pSons->GetObject( nNr ); } class ControlSon { @@ -149,7 +149,7 @@ public: ~ControlSon(); // void Write( SvStream &aStream ); - USHORT Son_Count() { return pSons->Count(); } + sal_uInt16 Son_Count() { return pSons->Count(); } void Sons( CNames *pNewSons ) { pSons = pNewSons; } CNames*& GetSons() { return pSons; } }; @@ -161,8 +161,8 @@ public: : ControlItem( Name, aUIdP ) {} ControlItemSon(const String &Name, rtl::OString aUIdP ); // ControlItemSon(const String &Name, const String &URL, const URLType aType ); -// ControlItemSon(const String &Name, const String &URL, const ULONG nUId ); -// ControlItemSon(const char *Name, const String &URL, const ULONG nUId ); +// ControlItemSon(const String &Name, const String &URL, const sal_uLong nUId ); +// ControlItemSon(const char *Name, const String &URL, const sal_uLong nUId ); // void Write( SvStream &aStream ); }; @@ -173,10 +173,10 @@ public: : ControlItemSon( Name, aUIdP ) {DBG_CTOR(ControlDef,0);} ControlDef(const String &Name, rtl::OString aUIdP ); // ControlDef(const String &Name, const String &URL, const URLType aType ); - ControlDef(const String &aOldName, const String &aNewName, ControlDef *pOriginal, BOOL bWithSons = FALSE ); + ControlDef(const String &aOldName, const String &aNewName, ControlDef *pOriginal, sal_Bool bWithSons = sal_False ); ~ControlDef() {DBG_DTOR(ControlDef,0);} - virtual BOOL operator < (const ControlItem &rPar); - virtual BOOL operator == (const ControlItem &rPar); + virtual sal_Bool operator < (const ControlItem &rPar); + virtual sal_Bool operator == (const ControlItem &rPar); void Write( SvStream &aStream ); MK_SON_ACCESS( ControlDef ) }; @@ -186,8 +186,8 @@ class ControlItemUId : public ControlItem public: ControlItemUId(String Name, rtl::OString aUIdP) : ControlItem( Name, aUIdP){} - virtual BOOL operator < (const ControlItem &rPar); - virtual BOOL operator == (const ControlItem &rPar); + virtual sal_Bool operator < (const ControlItem &rPar); + virtual sal_Bool operator == (const ControlItem &rPar); }; class ControlItemUIdSon : public ControlItemUId, public ControlSon @@ -200,17 +200,17 @@ public: class ReverseName : public ControlItemUId { public: - ULONG LastSequence; + sal_uLong LastSequence; - ReverseName(String Name, rtl::OString aUIdP, ULONG nSeq) : ControlItemUId( Name, aUIdP), LastSequence(nSeq) {} + ReverseName(String Name, rtl::OString aUIdP, sal_uLong nSeq) : ControlItemUId( Name, aUIdP), LastSequence(nSeq) {} }; class CRevNames: public CNames { public: - void Insert( String aName, rtl::OString aUId, ULONG nSeq ); + void Insert( String aName, rtl::OString aUId, sal_uLong nSeq ); String GetName( rtl::OString aUId ); - void Invalidate ( ULONG nSeq ); + void Invalidate ( sal_uLong nSeq ); }; @@ -218,7 +218,7 @@ class SbxTransportMethod: public SbxMethod { public: SbxTransportMethod( SbxDataType ); - ULONG nValue; + sal_uLong nValue; String aUnoSlot; }; SV_DECL_IMPL_REF(SbxTransportMethod); @@ -263,42 +263,42 @@ public: // Profiling Datenfelder - ULONG LocalStarttime; - USHORT nNumBorders; - ULONG naValBorders[4]; - ULONG naNumEntries[5]; - ULONG naRemoteTime[5]; - ULONG naLocalTime[5]; - - ULONG nMinRemoteCommandDelay; - ULONG nMaxRemoteCommandDelay; - BOOL bDoRemoteCommandDelay; - - BOOL bLnaguageExtensionLoaded; // Wurde über 'use' was geladen? Für syntax highlighting + sal_uLong LocalStarttime; + sal_uInt16 nNumBorders; + sal_uLong naValBorders[4]; + sal_uLong naNumEntries[5]; + sal_uLong naRemoteTime[5]; + sal_uLong naLocalTime[5]; + + sal_uLong nMinRemoteCommandDelay; + sal_uLong nMaxRemoteCommandDelay; + sal_Bool bDoRemoteCommandDelay; + + sal_Bool bLnaguageExtensionLoaded; // Wurde über 'use' was geladen? Für syntax highlighting SfxBroadcaster *pTTSfxBroadcaster; - ULONG nErrorCount; - ULONG nWarningCount; - ULONG nQAErrorCount; - ULONG nIncludeFileWarningCount; + sal_uLong nErrorCount; + sal_uLong nWarningCount; + sal_uLong nQAErrorCount; + sal_uLong nIncludeFileWarningCount; SbxDimArrayRef xErrorList; SbxDimArrayRef xWarningList; SbxDimArrayRef xQAErrorList; SbxDimArrayRef xIncludeFileWarningList; - BOOL bIsStart; // set tu TRUE while command Start is initiating the communication + sal_Bool bIsStart; // set tu sal_True while command Start is initiating the communication MyBasic* pMyBasic; String aTestCaseName; // holds name of current TestCase String aTestCaseFileName; // holds FileName of current TestCase - USHORT nTestCaseLineNr; // holds Line of current TestCase + sal_uInt16 nTestCaseLineNr; // holds Line of current TestCase - BOOL bEnableQaErrors; // include QA errors in report - BOOL bDebugFindNoErrors; // suppress generating errors when find of variables is called for variable viewing purposes + sal_Bool bEnableQaErrors; // include QA errors in report + sal_Bool bDebugFindNoErrors; // suppress generating errors when find of variables is called for variable viewing purposes - BOOL bStopOnSyntaxError; // catch syntax errors in testcases or not + sal_Bool bStopOnSyntaxError; // catch syntax errors in testcases or not Environment *pChildEnv; // Environment Variables for child Process @@ -309,7 +309,7 @@ public: class TTFormat { public: - static String ms2s( ULONG nMilliSeconds ); + static String ms2s( sal_uLong nMilliSeconds ); }; diff --git a/automation/source/testtool/tcommuni.cxx b/automation/source/testtool/tcommuni.cxx index 97684cfba2cf..f3c338362529 100644 --- a/automation/source/testtool/tcommuni.cxx +++ b/automation/source/testtool/tcommuni.cxx @@ -44,7 +44,7 @@ #include <basic/testtool.hxx> CommunicationManagerClientViaSocketTT::CommunicationManagerClientViaSocketTT() -: CommunicationManagerClientViaSocket( TRUE ) +: CommunicationManagerClientViaSocket( sal_True ) , aAppPath() , aAppParams() , pProcess( NULL ) @@ -52,14 +52,14 @@ CommunicationManagerClientViaSocketTT::CommunicationManagerClientViaSocketTT() } -BOOL CommunicationManagerClientViaSocketTT::StartCommunication() +sal_Bool CommunicationManagerClientViaSocketTT::StartCommunication() { - bApplicationStarted = FALSE; + bApplicationStarted = sal_False; return CommunicationManagerClientViaSocket::StartCommunication( ByteString( GetHostConfig(), RTL_TEXTENCODING_UTF8 ), GetTTPortConfig() ); } -BOOL CommunicationManagerClientViaSocketTT::StartCommunication( String aApp, String aParams, Environment *pChildEnv ) +sal_Bool CommunicationManagerClientViaSocketTT::StartCommunication( String aApp, String aParams, Environment *pChildEnv ) { aAppPath = aApp; aAppParams = aParams; @@ -68,7 +68,7 @@ BOOL CommunicationManagerClientViaSocketTT::StartCommunication( String aApp, Str } -BOOL CommunicationManagerClientViaSocketTT::RetryConnect() +sal_Bool CommunicationManagerClientViaSocketTT::RetryConnect() { if ( !bApplicationStarted ) { @@ -80,8 +80,8 @@ BOOL CommunicationManagerClientViaSocketTT::RetryConnect() pProcess = new Process(); pProcess->SetImage( aAppPath, aAppParams, &aAppEnv ); - BOOL bSucc = pProcess->Start(); - bApplicationStarted = TRUE; + sal_Bool bSucc = pProcess->Start(); + bApplicationStarted = sal_True; if ( bSucc ) { @@ -91,7 +91,7 @@ BOOL CommunicationManagerClientViaSocketTT::RetryConnect() } return bSucc; } - return FALSE; + return sal_False; } else { @@ -102,18 +102,18 @@ BOOL CommunicationManagerClientViaSocketTT::RetryConnect() aWait.Start(); while ( aWait.IsActive() ) GetpApp()->Yield(); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } } -BOOL CommunicationManagerClientViaSocketTT::KillApplication() +sal_Bool CommunicationManagerClientViaSocketTT::KillApplication() { if ( pProcess ) return pProcess->Terminate(); - return TRUE; + return sal_True; } #define GETSET(aVar, KeyName, Dafault) \ @@ -129,7 +129,7 @@ String GetHostConfig() { String aHostToTalk; - for ( USHORT i = 0 ; i < Application::GetCommandLineParamCount() ; i++ ) + for ( sal_uInt16 i = 0 ; i < Application::GetCommandLineParamCount() ; i++ ) { if ( Application::GetCommandLineParam( i ).Copy(0,6).CompareIgnoreCaseToAscii("-host=") == COMPARE_EQUAL #ifndef UNX @@ -148,11 +148,11 @@ String GetHostConfig() } -ULONG GetTTPortConfig() +sal_uLong GetTTPortConfig() { String aPortToTalk; - for ( USHORT i = 0 ; i < Application::GetCommandLineParamCount() ; i++ ) + for ( sal_uInt16 i = 0 ; i < Application::GetCommandLineParamCount() ; i++ ) { if ( Application::GetCommandLineParam( i ).Copy(0,6).CompareIgnoreCaseToAscii("-port=") == COMPARE_EQUAL #ifndef UNX @@ -161,7 +161,7 @@ ULONG GetTTPortConfig() ) { aPortToTalk = Application::GetCommandLineParam( i ).Copy(6); - return (ULONG)aPortToTalk.ToInt64(); + return (sal_uLong)aPortToTalk.ToInt64(); } } @@ -170,15 +170,15 @@ ULONG GetTTPortConfig() aConf.SetGroup("Communication"); GETSET( abPortToTalk, "TTPort", ByteString::CreateFromInt32( TESTTOOL_DEFAULT_PORT ) ); - return (ULONG)abPortToTalk.ToInt64(); + return (sal_uLong)abPortToTalk.ToInt64(); } -ULONG GetUnoPortConfig() +sal_uLong GetUnoPortConfig() { String aPortToTalk; - for ( USHORT i = 0 ; i < Application::GetCommandLineParamCount() ; i++ ) + for ( sal_uInt16 i = 0 ; i < Application::GetCommandLineParamCount() ; i++ ) { if ( Application::GetCommandLineParam( i ).Copy(0,9).CompareIgnoreCaseToAscii("-unoport=") == COMPARE_EQUAL #ifndef UNX @@ -187,7 +187,7 @@ ULONG GetUnoPortConfig() ) { aPortToTalk = Application::GetCommandLineParam( i ).Copy(6); - return (ULONG)aPortToTalk.ToInt64(); + return (sal_uLong)aPortToTalk.ToInt64(); } } @@ -196,5 +196,5 @@ ULONG GetUnoPortConfig() aConf.SetGroup("Communication"); GETSET( abPortToTalk, "UnoPort", ByteString::CreateFromInt32( UNO_DEFAULT_PORT ) ); - return (ULONG)abPortToTalk.ToInt64(); + return (sal_uLong)abPortToTalk.ToInt64(); } diff --git a/automation/source/testtool/tcommuni.hxx b/automation/source/testtool/tcommuni.hxx index 4374edfd7fc9..c3fec2f7b04d 100644 --- a/automation/source/testtool/tcommuni.hxx +++ b/automation/source/testtool/tcommuni.hxx @@ -45,14 +45,14 @@ public: CommunicationManagerClientViaSocketTT(); using CommunicationManagerClientViaSocket::StartCommunication; - virtual BOOL StartCommunication(); - virtual BOOL StartCommunication( String aApp, String aParams, Environment *pChildEnv ); + virtual sal_Bool StartCommunication(); + virtual sal_Bool StartCommunication( String aApp, String aParams, Environment *pChildEnv ); - BOOL KillApplication(); + sal_Bool KillApplication(); protected: - virtual BOOL RetryConnect(); - BOOL bApplicationStarted; + virtual sal_Bool RetryConnect(); + sal_Bool bApplicationStarted; Time aFirstRetryCall; String aAppPath; String aAppParams; @@ -62,6 +62,6 @@ protected: String GetHostConfig(); -ULONG GetTTPortConfig(); -ULONG GetUnoPortConfig(); +sal_uLong GetTTPortConfig(); +sal_uLong GetUnoPortConfig(); diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx index c774f2d166eb..2d21620a659a 100644 --- a/basctl/source/accessibility/accessibledialogwindow.cxx +++ b/basctl/source/accessibility/accessibledialogwindow.cxx @@ -130,9 +130,9 @@ AccessibleDialogWindow::AccessibleDialogWindow( DialogWindow* pDialogWindow ) SdrPage* pSdrPage = m_pDialogWindow->GetPage(); if ( pSdrPage ) { - ULONG nCount = pSdrPage->GetObjCount(); + sal_uLong nCount = pSdrPage->GetObjCount(); - for ( ULONG i = 0; i < nCount; ++i ) + for ( sal_uLong i = 0; i < nCount; ++i ) { SdrObject* pObj = pSdrPage->GetObj( i ); DlgEdObj* pDlgEdObj = PTR_CAST( DlgEdObj, pObj ); @@ -357,7 +357,7 @@ void AccessibleDialogWindow::UpdateChildren() SdrPage* pSdrPage = m_pDialogWindow->GetPage(); if ( pSdrPage ) { - for ( ULONG i = 0, nCount = pSdrPage->GetObjCount(); i < nCount; ++i ) + for ( sal_uLong i = 0, nCount = pSdrPage->GetObjCount(); i < nCount; ++i ) { SdrObject* pObj = pSdrPage->GetObj( i ); DlgEdObj* pDlgEdObj = PTR_CAST( DlgEdObj, pObj ); @@ -751,7 +751,7 @@ sal_Int32 AccessibleDialogWindow::getAccessibleIndexInParent( ) throw (RuntimeE Window* pParent = m_pDialogWindow->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_pDialogWindow ) ) @@ -1114,7 +1114,7 @@ void AccessibleDialogWindow::deselectAccessibleChild( sal_Int32 nChildIndex ) th { SdrPageView* pPgView = pSdrView->GetSdrPageView(); if ( pPgView ) - pSdrView->MarkObj( pDlgEdObj, pPgView, TRUE ); + pSdrView->MarkObj( pDlgEdObj, pPgView, sal_True ); } } } diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx index 7b91d7c3a7d8..a999e1dbd7d3 100644 --- a/basctl/source/basicide/basdoc.cxx +++ b/basctl/source/basicide/basdoc.cxx @@ -71,7 +71,7 @@ __EXPORT BasicDocShell::~BasicDocShell() delete pPrinter; } -SfxPrinter* BasicDocShell::GetPrinter( BOOL bCreate ) +SfxPrinter* BasicDocShell::GetPrinter( sal_Bool bCreate ) { if ( !pPrinter && bCreate ) pPrinter = new SfxPrinter( new SfxItemSet( GetPool(), SID_PRINTER_NOTFOUND_WARN , SID_PRINTER_NOTFOUND_WARN ) ); @@ -94,6 +94,6 @@ void BasicDocShell::FillClass( SvGlobalName*, sal_uInt32*, String*, String*, Str DBG_ASSERT( bTemplate == sal_False, "No template for Basic" ); } -void BasicDocShell::Draw( OutputDevice *, const JobSetup &, USHORT ) +void BasicDocShell::Draw( OutputDevice *, const JobSetup &, sal_uInt16 ) {} diff --git a/basctl/source/basicide/basdoc.hxx b/basctl/source/basicide/basdoc.hxx index a2ec0917ceb5..2e5c1d21c456 100644 --- a/basctl/source/basicide/basdoc.hxx +++ b/basctl/source/basicide/basdoc.hxx @@ -40,7 +40,7 @@ class BasicDocShell: public SfxObjectShell protected: virtual void Draw( OutputDevice *, const JobSetup & rSetup, - USHORT nAspect = ASPECT_CONTENT ); + sal_uInt16 nAspect = ASPECT_CONTENT ); virtual void FillClass( SvGlobalName * pClassName, sal_uInt32 * pFormat, String * pAppName, @@ -58,7 +58,7 @@ public: BasicDocShell(); ~BasicDocShell(); - SfxPrinter* GetPrinter( BOOL bCreate ); + SfxPrinter* GetPrinter( sal_Bool bCreate ); void SetPrinter( SfxPrinter* pPrinter ); }; diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index 4ab42fbe97a7..0ff56f208cad 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -56,7 +56,7 @@ using namespace ::com::sun::star::uno; SFX_IMPL_TOOLBOX_CONTROL( LibBoxControl, SfxStringItem ); -LibBoxControl::LibBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) +LibBoxControl::LibBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { } @@ -69,7 +69,7 @@ LibBoxControl::~LibBoxControl() -void LibBoxControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* pState ) +void LibBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { BasicLibBox* pBox = (BasicLibBox*) GetToolBox().GetItemWindow( GetId() ); @@ -144,9 +144,7 @@ void DocListenerBox::onDocumentSaveAsDone( const ScriptDocument& /*_rDocument*/ void DocListenerBox::onDocumentClosed( const ScriptDocument& /*_rDocument*/ ) { - if ( SFX_APP()->IsInBasicCall() ) - // Nicht wenn Office beendet - FillBox(); + FillBox(); } void DocListenerBox::onDocumentTitleChanged( const ScriptDocument& /*_rDocument*/ ) @@ -167,12 +165,12 @@ BasicLibBox::BasicLibBox( Window* pParent, const uno::Reference< frame::XFrame > m_xFrame( rFrame ) { FillBox(); - bIgnoreSelect = TRUE; // Select von 0 noch nicht weiterleiten - bFillBox = TRUE; + bIgnoreSelect = sal_True; // Select von 0 noch nicht weiterleiten + bFillBox = sal_True; SelectEntryPos( 0 ); aCurText = GetEntry( 0 ); SetSizePixel( Size( 250, 200 ) ); - bIgnoreSelect = FALSE; + bIgnoreSelect = sal_False; } @@ -216,8 +214,8 @@ void __EXPORT BasicLibBox::ReleaseFocus() void BasicLibBox::FillBox() { - SetUpdateMode( FALSE ); - bIgnoreSelect = TRUE; + SetUpdateMode( sal_False ); + bIgnoreSelect = sal_True; aCurText = GetSelectEntry(); @@ -225,7 +223,7 @@ void BasicLibBox::FillBox() ClearBox(); // create list box entries - USHORT nPos = InsertEntry( String( IDEResId( RID_STR_ALL ) ), LISTBOX_APPEND ); + sal_uInt16 nPos = InsertEntry( String( IDEResId( RID_STR_ALL ) ), LISTBOX_APPEND ); SetEntryData( nPos, new BasicLibEntry( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_UNKNOWN, String() ) ); InsertEntries( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_USER ); InsertEntries( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_SHARE ); @@ -239,7 +237,7 @@ void BasicLibBox::FillBox() InsertEntries( *doc, LIBRARY_LOCATION_DOCUMENT ); } - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); SelectEntry( aCurText ); if ( !GetSelectEntryCount() ) @@ -247,7 +245,7 @@ void BasicLibBox::FillBox() SelectEntryPos( GetEntryCount() ); // gibst es nicht => leer? aCurText = GetSelectEntry(); } - bIgnoreSelect = FALSE; + bIgnoreSelect = sal_False; } void BasicLibBox::InsertEntries( const ScriptDocument& rDocument, LibraryLocation eLocation ) @@ -264,7 +262,7 @@ void BasicLibBox::InsertEntries( const ScriptDocument& rDocument, LibraryLocatio { String aName( rDocument.getTitle( eLocation ) ); String aEntryText( CreateMgrAndLibStr( aName, aLibName ) ); - USHORT nPos = InsertEntry( aEntryText, LISTBOX_APPEND ); + sal_uInt16 nPos = InsertEntry( aEntryText, LISTBOX_APPEND ); SetEntryData( nPos, new BasicLibEntry( rDocument, eLocation, aLibName ) ); } } @@ -276,7 +274,7 @@ long BasicLibBox::PreNotify( NotifyEvent& rNEvt ) if( rNEvt.GetType() == EVENT_KEYINPUT ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); - USHORT nKeyCode = aKeyEvt.GetKeyCode().GetCode(); + sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode(); switch( nKeyCode ) { case KEY_RETURN: @@ -300,15 +298,15 @@ long BasicLibBox::PreNotify( NotifyEvent& rNEvt ) if ( bFillBox ) { FillBox(); - bFillBox = FALSE; + bFillBox = sal_False; } } else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) { - if ( !HasChildPathFocus( TRUE ) ) + if ( !HasChildPathFocus( sal_True ) ) { - bIgnoreSelect = TRUE; - bFillBox = TRUE; + bIgnoreSelect = sal_True; + bFillBox = sal_True; } } @@ -328,7 +326,7 @@ void __EXPORT BasicLibBox::Select() void BasicLibBox::NotifyIDE() { - USHORT nSelPos = GetSelectEntryPos(); + sal_uInt16 nSelPos = GetSelectEntryPos(); BasicLibEntry* pEntry = (BasicLibEntry*)GetEntryData( nSelPos ); if ( pEntry ) { @@ -350,8 +348,8 @@ void BasicLibBox::NotifyIDE() void BasicLibBox::ClearBox() { - USHORT nCount = GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { BasicLibEntry* pEntry = (BasicLibEntry*)GetEntryData( i ); delete pEntry; @@ -363,7 +361,7 @@ void BasicLibBox::ClearBox() SFX_IMPL_TOOLBOX_CONTROL( LanguageBoxControl, SfxStringItem ); -LanguageBoxControl::LanguageBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) +LanguageBoxControl::LanguageBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { } @@ -372,7 +370,7 @@ LanguageBoxControl::~LanguageBoxControl() { } -void LanguageBoxControl::StateChanged( USHORT _nID, SfxItemState _eState, const SfxPoolItem* _pItem ) +void LanguageBoxControl::StateChanged( sal_uInt16 _nID, SfxItemState _eState, const SfxPoolItem* _pItem ) { (void)_nID; @@ -422,7 +420,7 @@ BasicLanguageBox::~BasicLanguageBox() void BasicLanguageBox::FillBox() { - SetUpdateMode( FALSE ); + SetUpdateMode( sal_False ); m_bIgnoreSelect = true; m_sCurrentText = GetSelectEntry(); ClearBox(); @@ -436,8 +434,8 @@ void BasicLanguageBox::FillBox() Locale aCurrentLocale = pCurMgr->getStringResourceManager()->getCurrentLocale(); Sequence< Locale > aLocaleSeq = pCurMgr->getStringResourceManager()->getLocales(); const Locale* pLocale = aLocaleSeq.getConstArray(); - INT32 i, nCount = aLocaleSeq.getLength(); - USHORT nSelPos = LISTBOX_ENTRY_NOTFOUND; + sal_Int32 i, nCount = aLocaleSeq.getLength(); + sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND; for ( i = 0; i < nCount; ++i ) { bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] ); @@ -449,7 +447,7 @@ void BasicLanguageBox::FillBox() sLanguage += ' '; sLanguage += m_sDefaultLanguageStr; } - USHORT nPos = InsertEntry( sLanguage ); + sal_uInt16 nPos = InsertEntry( sLanguage ); SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) ); if ( bIsCurrent ) @@ -469,14 +467,14 @@ void BasicLanguageBox::FillBox() Disable(); } - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); m_bIgnoreSelect = false; } void BasicLanguageBox::ClearBox() { - USHORT nCount = GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { LanguageEntry* pEntry = (LanguageEntry*)GetEntryData(i); delete pEntry; @@ -504,7 +502,7 @@ long BasicLanguageBox::PreNotify( NotifyEvent& rNEvt ) long nDone = 0; if( rNEvt.GetType() == EVENT_KEYINPUT ) { - USHORT nKeyCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); + sal_uInt16 nKeyCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); switch( nKeyCode ) { case KEY_RETURN: diff --git a/basctl/source/basicide/basicbox.hxx b/basctl/source/basicide/basicbox.hxx index 3a8d26581350..a2b4d92a56a8 100644 --- a/basctl/source/basicide/basicbox.hxx +++ b/basctl/source/basicide/basicbox.hxx @@ -40,10 +40,10 @@ class LibBoxControl: public SfxToolBoxControl public: SFX_DECL_TOOLBOX_CONTROL(); - LibBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + LibBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); ~LibBoxControl(); - virtual void StateChanged( USHORT nSID, SfxItemState eState, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual Window* CreateItemWindow( Window *pParent ); }; @@ -83,8 +83,8 @@ class BasicLibBox : public DocListenerBox { private: String aCurText; - BOOL bIgnoreSelect; - BOOL bFillBox; + sal_Bool bIgnoreSelect; + sal_Bool bFillBox; com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; void ReleaseFocus(); @@ -114,10 +114,10 @@ class LanguageBoxControl: public SfxToolBoxControl public: SFX_DECL_TOOLBOX_CONTROL(); - LanguageBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + LanguageBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); ~LanguageBoxControl(); - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual Window* CreateItemWindow( Window *pParent ); }; diff --git a/basctl/source/basicide/basicmod.hxx b/basctl/source/basicide/basicmod.hxx index 374b933c4ea6..def43295a336 100644 --- a/basctl/source/basicide/basicmod.hxx +++ b/basctl/source/basicide/basicmod.hxx @@ -36,7 +36,7 @@ class BasicIDEModule : public SfxModule { public: BasicIDEModule( ResMgr *pMgr, SfxObjectFactory *pObjFact) : - SfxModule( pMgr, FALSE, pObjFact, NULL ) + SfxModule( pMgr, sal_False, pObjFact, NULL ) {} }; diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index d0a8ca1a6ddb..5c13be2ff187 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -108,7 +108,7 @@ DBG_NAME( ModulWindow ) TYPEINIT1( ModulWindow , IDEBaseWindow ); -void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const String& rTitle, bool bOutput ) +void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage, const String& rTitle, bool bOutput ) { short nLeftMargin = LMARGPRN; Size aSz = pPrinter->GetOutputSize(); @@ -173,8 +173,8 @@ void lcl_ConvertTabsToSpaces( String& rLine ) { if ( rLine.Len() ) { - USHORT nPos = 0; - USHORT nMax = rLine.Len(); + sal_uInt16 nPos = 0; + sal_uInt16 nMax = rLine.Len(); while ( nPos < nMax ) { if ( rLine.GetChar( nPos ) == '\t' ) @@ -284,13 +284,13 @@ void ModulWindow::CheckCompileBasic() if ( XModule().Is() ) { // Zur Laufzeit wird niemals compiliert! - BOOL bRunning = StarBASIC::IsRunning(); - BOOL bModified = ( !xModule->IsCompiled() || + sal_Bool bRunning = StarBASIC::IsRunning(); + sal_Bool bModified = ( !xModule->IsCompiled() || ( GetEditEngine() && GetEditEngine()->IsModified() ) ); if ( !bRunning && bModified ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); pIDEShell->GetViewFrame()->GetWindow().EnterWait(); @@ -298,14 +298,14 @@ void ModulWindow::CheckCompileBasic() if( bModified ) { AssertValidEditEngine(); - GetEditorWindow().SetSourceInBasic( FALSE ); + GetEditorWindow().SetSourceInBasic( sal_False ); } - BOOL bWasModified = GetBasic()->IsModified(); + sal_Bool bWasModified = GetBasic()->IsModified(); bDone = GetBasic()->Compile( xModule ); if ( !bWasModified ) - GetBasic()->SetModified( FALSE ); + GetBasic()->SetModified( sal_False ); if ( bDone ) { @@ -315,12 +315,12 @@ void ModulWindow::CheckCompileBasic() pIDEShell->GetViewFrame()->GetWindow().LeaveWait(); aStatus.bError = !bDone; - aStatus.bIsRunning = FALSE; + aStatus.bIsRunning = sal_False; } } } -BOOL ModulWindow::BasicExecute() +sal_Bool ModulWindow::BasicExecute() { DBG_CHKTHIS( ModulWindow, 0 ); @@ -331,7 +331,7 @@ BOOL ModulWindow::BasicExecute() if ( !aDocument.allowMacros() ) { WarningBox( this, WB_OK, String( IDEResId( RID_STR_CANNOTRUNMACRO ) ) ).Execute(); - return FALSE; + return sal_False; } } @@ -346,13 +346,13 @@ BOOL ModulWindow::BasicExecute() { DBG_ASSERT( xModule.Is(), "Kein Modul!" ); AddStatus( BASWIN_RUNNINGBASIC ); - USHORT nStart, nEnd, nCurMethodStart = 0; + sal_uInt16 nStart, nEnd, nCurMethodStart = 0; TextSelection aSel = GetEditView()->GetSelection(); if ( aDocument.isInVBAMode() ) nCurMethodStart = ( aSel.GetStart().GetPara() + 1 ); SbMethod* pMethod = 0; // erstes Macro, sonst blind "Main" (ExtSearch?) - for ( USHORT nMacro = 0; nMacro < xModule->GetMethods()->Count(); nMacro++ ) + for ( sal_uInt16 nMacro = 0; nMacro < xModule->GetMethods()->Count(); nMacro++ ) { SbMethod* pM = (SbMethod*)xModule->GetMethods()->Get( nMacro ); DBG_ASSERT( pM, "Method?" ); @@ -374,75 +374,75 @@ BOOL ModulWindow::BasicExecute() if ( !pMethod ) { if ( aDocument.isInVBAMode() ) - return ( BasicIDE::ChooseMacro( uno::Reference< frame::XModel >(), FALSE, rtl::OUString() ).getLength() > 0 ) ? TRUE : FALSE; + return ( BasicIDE::ChooseMacro( uno::Reference< frame::XModel >(), sal_False, rtl::OUString() ).getLength() > 0 ) ? sal_True : sal_False; else pMethod = (SbMethod*)xModule->Find( String( RTL_CONSTASCII_USTRINGPARAM( "Main" ) ), SbxCLASS_METHOD ); } if ( pMethod ) { pMethod->SetDebugFlags( aStatus.nBasicFlags ); - BasicDLL::SetDebugMode( TRUE ); + BasicDLL::SetDebugMode( sal_True ); BasicIDE::RunMethod( pMethod ); - BasicDLL::SetDebugMode( FALSE ); - // Falls waehrend Interactive=FALSE abgebrochen - BasicDLL::EnableBreak( TRUE ); + BasicDLL::SetDebugMode( sal_False ); + // Falls waehrend Interactive=sal_False abgebrochen + BasicDLL::EnableBreak( sal_True ); } ClearStatus( BASWIN_RUNNINGBASIC ); } else - aStatus.bIsRunning = FALSE; // Abbruch von Reschedule() + aStatus.bIsRunning = sal_False; // Abbruch von Reschedule() } - BOOL bDone = !aStatus.bError; + sal_Bool bDone = !aStatus.bError; return bDone; } -BOOL ModulWindow::CompileBasic() +sal_Bool ModulWindow::CompileBasic() { DBG_CHKTHIS( ModulWindow, 0 ); CheckCompileBasic(); - BOOL bIsCompiled = FALSE; + sal_Bool bIsCompiled = sal_False; if ( XModule().Is() ) bIsCompiled = xModule->IsCompiled(); return bIsCompiled; } -BOOL ModulWindow::BasicRun() +sal_Bool ModulWindow::BasicRun() { DBG_CHKTHIS( ModulWindow, 0 ); aStatus.nBasicFlags = 0; - BOOL bDone = BasicExecute(); + sal_Bool bDone = BasicExecute(); return bDone; } -BOOL ModulWindow::BasicStepOver() +sal_Bool ModulWindow::BasicStepOver() { DBG_CHKTHIS( ModulWindow, 0 ); aStatus.nBasicFlags = SbDEBUG_STEPINTO | SbDEBUG_STEPOVER; - BOOL bDone = BasicExecute(); + sal_Bool bDone = BasicExecute(); return bDone; } -BOOL ModulWindow::BasicStepInto() +sal_Bool ModulWindow::BasicStepInto() { DBG_CHKTHIS( ModulWindow, 0 ); aStatus.nBasicFlags = SbDEBUG_STEPINTO; - BOOL bDone = BasicExecute(); + sal_Bool bDone = BasicExecute(); return bDone; } -BOOL ModulWindow::BasicStepOut() +sal_Bool ModulWindow::BasicStepOut() { DBG_CHKTHIS( ModulWindow, 0 ); aStatus.nBasicFlags = SbDEBUG_STEPOUT; - BOOL bDone = BasicExecute(); + sal_Bool bDone = BasicExecute(); return bDone; } @@ -453,13 +453,13 @@ void ModulWindow::BasicStop() DBG_CHKTHIS( ModulWindow, 0 ); GetBasic()->Stop(); - aStatus.bIsRunning = FALSE; + aStatus.bIsRunning = sal_False; } -BOOL ModulWindow::LoadBasic() +sal_Bool ModulWindow::LoadBasic() { DBG_CHKTHIS( ModulWindow, 0 ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); Reference < XFilePicker > xFP; @@ -485,25 +485,25 @@ BOOL ModulWindow::LoadBasic() { Sequence< ::rtl::OUString > aPaths = xFP->getFiles(); aCurPath = aPaths[0]; - SfxMedium aMedium( aCurPath, STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE, TRUE ); + SfxMedium aMedium( aCurPath, STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE, sal_True ); SvStream* pStream = aMedium.GetInStream(); if ( pStream ) { AssertValidEditEngine(); - ULONG nLines = CalcLineCount( *pStream ); + sal_uLong nLines = CalcLineCount( *pStream ); // nLines*4: ReadText/Formatting/Highlighting/Formatting GetEditorWindow().CreateProgress( String( IDEResId( RID_STR_GENERATESOURCE ) ), nLines*4 ); - GetEditEngine()->SetUpdateMode( FALSE ); + GetEditEngine()->SetUpdateMode( sal_False ); GetEditView()->Read( *pStream ); - GetEditEngine()->SetUpdateMode( TRUE ); - GetEditorWindow().Update(); // Es wurde bei UpdateMode = TRUE nur Invalidiert + GetEditEngine()->SetUpdateMode( sal_True ); + GetEditorWindow().Update(); // Es wurde bei UpdateMode = sal_True nur Invalidiert GetEditorWindow().ForceSyntaxTimeout(); GetEditorWindow().DestroyProgress(); - ULONG nError = aMedium.GetError(); + sal_uLong nError = aMedium.GetError(); if ( nError ) ErrorHandler::HandleError( nError ); else - bDone = TRUE; + bDone = sal_True; } else ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_COULDNTREAD ) ) ).Execute(); @@ -512,10 +512,10 @@ BOOL ModulWindow::LoadBasic() } -BOOL ModulWindow::SaveBasicSource() +sal_Bool ModulWindow::SaveBasicSource() { DBG_CHKTHIS( ModulWindow, 0 ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); Reference < XFilePicker > xFP; @@ -547,7 +547,7 @@ BOOL ModulWindow::SaveBasicSource() { Sequence< ::rtl::OUString > aPaths = xFP->getFiles(); aCurPath = aPaths[0]; - SfxMedium aMedium( aCurPath, STREAM_WRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC, TRUE, FALSE ); + SfxMedium aMedium( aCurPath, STREAM_WRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC, sal_True, sal_False ); SvStream* pStream = aMedium.GetOutStream(); if ( pStream ) { @@ -556,11 +556,11 @@ BOOL ModulWindow::SaveBasicSource() GetEditEngine()->Write( *pStream ); aMedium.Commit(); LeaveWait(); - ULONG nError = aMedium.GetError(); + sal_uLong nError = aMedium.GetError(); if ( nError ) ErrorHandler::HandleError( nError ); else - bDone = TRUE; + bDone = sal_True; } else ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_COULDNTWRITE) ) ).Execute(); @@ -569,21 +569,21 @@ BOOL ModulWindow::SaveBasicSource() return bDone; } -BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName ); +sal_Bool implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName ); -BOOL ModulWindow::ImportDialog() +sal_Bool ModulWindow::ImportDialog() { const ScriptDocument& rDocument = GetDocument(); String aLibName = GetLibName(); - BOOL bRet = implImportDialog( this, aCurPath, rDocument, aLibName ); + sal_Bool bRet = implImportDialog( this, aCurPath, rDocument, aLibName ); return bRet; } -BOOL ModulWindow::ToggleBreakPoint( ULONG nLine ) +sal_Bool ModulWindow::ToggleBreakPoint( sal_uLong nLine ) { DBG_ASSERT( XModule().Is(), "Kein Modul!" ); - BOOL bNewBreakPoint = FALSE; + sal_Bool bNewBreakPoint = sal_False; if ( XModule().Is() ) { @@ -591,24 +591,24 @@ BOOL ModulWindow::ToggleBreakPoint( ULONG nLine ) if ( aStatus.bError ) { Sound::Beep(); - return FALSE; + return sal_False; } BreakPoint* pBrk = GetBreakPoints().FindBreakPoint( nLine ); if ( pBrk ) // entfernen { - xModule->ClearBP( (USHORT)nLine ); + xModule->ClearBP( (sal_uInt16)nLine ); delete GetBreakPoints().Remove( pBrk ); } else // einen erzeugen { - if ( xModule->SetBP( (USHORT)nLine) ) + if ( xModule->SetBP( (sal_uInt16)nLine) ) { GetBreakPoints().InsertSorted( new BreakPoint( nLine ) ); - bNewBreakPoint = TRUE; + bNewBreakPoint = sal_True; if ( StarBASIC::IsRunning() ) { - for ( USHORT nMethod = 0; nMethod < xModule->GetMethods()->Count(); nMethod++ ) + for ( sal_uInt16 nMethod = 0; nMethod < xModule->GetMethods()->Count(); nMethod++ ) { SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( nMethod ); DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" ); @@ -634,14 +634,14 @@ void ModulWindow::UpdateBreakPoint( const BreakPoint& rBrk ) CheckCompileBasic(); if ( rBrk.bEnabled ) - xModule->SetBP( (USHORT)rBrk.nLine ); + xModule->SetBP( (sal_uInt16)rBrk.nLine ); else - xModule->ClearBP( (USHORT)rBrk.nLine ); + xModule->ClearBP( (sal_uInt16)rBrk.nLine ); } } -BOOL ModulWindow::BasicToggleBreakPoint() +sal_Bool ModulWindow::BasicToggleBreakPoint() { DBG_CHKTHIS( ModulWindow, 0 ); AssertValidEditEngine(); @@ -650,12 +650,12 @@ BOOL ModulWindow::BasicToggleBreakPoint() aSel.GetStart().GetPara()++; // Basic-Zeilen beginnen bei 1! aSel.GetEnd().GetPara()++; - BOOL bNewBreakPoint = FALSE; + sal_Bool bNewBreakPoint = sal_False; - for ( ULONG nLine = aSel.GetStart().GetPara(); nLine <= aSel.GetEnd().GetPara(); nLine++ ) + for ( sal_uLong nLine = aSel.GetStart().GetPara(); nLine <= aSel.GetEnd().GetPara(); nLine++ ) { if ( ToggleBreakPoint( nLine ) ) - bNewBreakPoint = TRUE; + bNewBreakPoint = sal_True; } aXEditorWindow.GetBrkWindow().Invalidate(); @@ -674,12 +674,12 @@ void ModulWindow::BasicToggleBreakPointEnabled() TextSelection aSel = pView->GetSelection(); BreakPointList& rList = GetBreakPoints(); - for ( ULONG nLine = ++aSel.GetStart().GetPara(), nEnd = ++aSel.GetEnd().GetPara(); nLine <= nEnd; ++nLine ) + for ( sal_uLong nLine = ++aSel.GetStart().GetPara(), nEnd = ++aSel.GetEnd().GetPara(); nLine <= nEnd; ++nLine ) { BreakPoint* pBrk = rList.FindBreakPoint( nLine ); if ( pBrk ) { - pBrk->bEnabled = pBrk->bEnabled ? FALSE : TRUE; + pBrk->bEnabled = pBrk->bEnabled ? sal_False : sal_True; UpdateBreakPoint( *pBrk ); } } @@ -707,9 +707,9 @@ IMPL_LINK( ModulWindow, BasicErrorHdl, StarBASIC *, pBasic ) // FALSE: Abbrechen // TRUE: Weiter.... String aErrorText( pBasic->GetErrorText() ); - USHORT nErrorLine = pBasic->GetLine() - 1; - USHORT nErrCol1 = pBasic->GetCol1(); - USHORT nErrCol2 = pBasic->GetCol2(); + sal_uInt16 nErrorLine = pBasic->GetLine() - 1; + sal_uInt16 nErrCol1 = pBasic->GetCol1(); + sal_uInt16 nErrCol2 = pBasic->GetCol2(); if ( nErrCol2 != 0xFFFF ) nErrCol2++; @@ -730,9 +730,9 @@ IMPL_LINK( ModulWindow, BasicErrorHdl, StarBASIC *, pBasic ) } // Wenn anderes Basic, dan sollte die IDE versuchen, da richtige // Modul anzuzeigen... - BOOL bMarkError = ( pBasic == GetBasic() ) ? TRUE : FALSE; + sal_Bool bMarkError = ( pBasic == GetBasic() ) ? sal_True : sal_False; if ( bMarkError ) - aXEditorWindow.GetBrkWindow().SetMarkerPos( nErrorLine, TRUE ); + aXEditorWindow.GetBrkWindow().SetMarkerPos( nErrorLine, sal_True ); // ErrorBox( this, WB_OK | WB_DEF_OK, String( aErrorTextPrefix + aErrorText ) ).Execute(); // ErrorHandler::HandleError( pBasic->GetErrorCode() ); @@ -744,11 +744,11 @@ IMPL_LINK( ModulWindow, BasicErrorHdl, StarBASIC *, pBasic ) // #i47002# Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( !pWindow ) - return FALSE; + return sal_False; if ( bMarkError ) aXEditorWindow.GetBrkWindow().SetMarkerPos( MARKER_NOMARKER ); - return FALSE; + return sal_False; } long __EXPORT ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) @@ -761,8 +761,8 @@ long __EXPORT ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) // #i69280 Required in Window despite normal usage in next command! (void)pBasic; - // ReturnWert: USHORT => siehe SB-Debug-Flags - USHORT nErrorLine = pBasic->GetLine(); + // ReturnWert: sal_uInt16 => siehe SB-Debug-Flags + sal_uInt16 nErrorLine = pBasic->GetLine(); // Gibt es hier einen BreakPoint? BreakPoint* pBrk = GetBreakPoints().FindBreakPoint( nErrorLine ); @@ -782,8 +782,8 @@ long __EXPORT ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) pLayout->GetWatchWindow().UpdateWatches(); pLayout->GetStackWindow().UpdateCalls(); - aStatus.bIsInReschedule = TRUE; - aStatus.bIsRunning = TRUE; + aStatus.bIsInReschedule = sal_True; + aStatus.bIsRunning = sal_True; AddStatus( BASWIN_INRESCHEDULE ); @@ -792,7 +792,7 @@ long __EXPORT ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) while( aStatus.bIsRunning ) Application::Yield(); - aStatus.bIsInReschedule = FALSE; + aStatus.bIsInReschedule = sal_False; aXEditorWindow.GetBrkWindow().SetMarkerPos( MARKER_NOMARKER ); ClearStatus( BASWIN_INRESCHEDULE ); @@ -804,9 +804,9 @@ void ModulWindow::BasicAddWatch() { DBG_CHKTHIS( ModulWindow, 0 ); String aWatchStr; - BOOL bInserted = FALSE; + sal_Bool bInserted = sal_False; AssertValidEditEngine(); - BOOL bAdd = TRUE; + sal_Bool bAdd = sal_True; if ( !GetEditView()->HasSelection() ) { // bAdd = GetEditView()->SelectCurrentWord(); @@ -815,11 +815,11 @@ void ModulWindow::BasicAddWatch() if ( aWord.Len() ) { TextSelection aSel( aWordStart ); - USHORT& rIndex = aSel.GetEnd().GetIndex(); + sal_uInt16& rIndex = aSel.GetEnd().GetIndex(); rIndex = rIndex + aWord.Len(); // aSel.GetEnd().GetIndex() += sal::static_int_cast<int>( aWord.Len() ); GetEditView()->SetSelection( aSel ); - bAdd = TRUE; + bAdd = sal_True; } } if ( bAdd ) @@ -830,7 +830,7 @@ void ModulWindow::BasicAddWatch() aWatchStr = GetEditView()->GetSelected(); pLayout->GetWatchWindow().AddWatch( aWatchStr ); pLayout->GetWatchWindow().UpdateWatches(); - bInserted = TRUE; + bInserted = sal_True; } } @@ -843,7 +843,7 @@ void ModulWindow::BasicAddWatch() void ModulWindow::BasicRemoveWatch() { DBG_CHKTHIS( ModulWindow, 0 ); - BOOL bRemoved = pLayout->GetWatchWindow().RemoveSelectedWatch(); + sal_Bool bRemoved = pLayout->GetWatchWindow().RemoveSelectedWatch(); if ( !bRemoved ) Sound::Beep(); @@ -861,7 +861,7 @@ void ModulWindow::EditMacro( const String& rMacroName ) if ( !aStatus.bError ) { - USHORT nStart, nEnd; + sal_uInt16 nStart, nEnd; SbMethod* pMethod = (SbMethod*)xModule->Find( rMacroName, SbxCLASS_METHOD ); if ( pMethod ) { @@ -884,7 +884,7 @@ void ModulWindow::EditMacro( const String& rMacroName ) long nNewStartY = nStart * pView->GetTextEngine()->GetCharHeight(); nNewStartY = Min( nNewStartY, nMaxY ); pView->Scroll( 0, -(nNewStartY-nOldStartY) ); - pView->ShowCursor( FALSE, TRUE ); + pView->ShowCursor( sal_False, sal_True ); GetEditVScrollBar().SetThumbPos( pView->GetStartDocPos().Y() ); } pView->SetSelection( aSel ); @@ -903,20 +903,20 @@ void __EXPORT ModulWindow::StoreData() // dieses Fenster beendet wird. // => Keine Unterbrechungen erwuenscht! // Und bei SAVE, wenn AppBasic... - GetEditorWindow().SetSourceInBasic( TRUE ); + GetEditorWindow().SetSourceInBasic( sal_True ); // Nicht das Modify loeschen, sonst wird das Basic nicht gespeichert // Es wird beim Speichern sowieso geloescht. -// xModule->SetModified( FALSE ); +// xModule->SetModified( sal_False ); } -BOOL __EXPORT ModulWindow::CanClose() +sal_Bool __EXPORT ModulWindow::CanClose() { DBG_CHKTHIS( ModulWindow, 0 ); - return TRUE; + return sal_True; } -BOOL __EXPORT ModulWindow::AllowUndo() +sal_Bool __EXPORT ModulWindow::AllowUndo() { return GetEditorWindow().CanModify(); } @@ -939,7 +939,7 @@ void __EXPORT ModulWindow::UpdateData() TextSelection aSel = GetEditView()->GetSelection(); setTextEngineText( GetEditEngine(), xModule->GetSource32() ); GetEditView()->SetSelection( aSel ); - GetEditEngine()->SetModified( FALSE ); + GetEditEngine()->SetModified( sal_False ); BasicIDE::MarkDocumentModified( GetDocument() ); } } @@ -973,37 +973,37 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage ) // Font aFont( GetEditEngine()->CreateFontFromItemSet( GetEditEngine()->GetEmptyItemSet() ) ); Font aFont( GetEditEngine()->GetFont() ); aFont.SetAlign( ALIGN_BOTTOM ); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aFont.SetSize( Size( 0, 360 ) ); pPrinter->SetFont( aFont ); pPrinter->SetMapMode( MAP_100TH_MM ); String aTitle( CreateQualifiedName() ); - USHORT nLineHeight = (USHORT) pPrinter->GetTextHeight(); // etwas mehr. - USHORT nParaSpace = 10; + sal_uInt16 nLineHeight = (sal_uInt16) pPrinter->GetTextHeight(); // etwas mehr. + sal_uInt16 nParaSpace = 10; Size aPaperSz = pPrinter->GetOutputSize(); aPaperSz.Width() -= (LMARGPRN+RMARGPRN); aPaperSz.Height() -= (TMARGPRN+BMARGPRN); // nLinepPage stimmt nicht, wenn Zeilen umgebrochen werden muessen... - USHORT nLinespPage = (USHORT) (aPaperSz.Height()/nLineHeight); - USHORT nCharspLine = (USHORT) (aPaperSz.Width() / pPrinter->GetTextWidth( 'X' ) ); - ULONG nParas = GetEditEngine()->GetParagraphCount(); + sal_uInt16 nLinespPage = (sal_uInt16) (aPaperSz.Height()/nLineHeight); + sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pPrinter->GetTextWidth( 'X' ) ); + sal_uLong nParas = GetEditEngine()->GetParagraphCount(); - USHORT nPages = (USHORT) (nParas/nLinespPage+1 ); - USHORT nCurPage = 1; + sal_uInt16 nPages = (sal_uInt16) (nParas/nLinespPage+1 ); + sal_uInt16 nCurPage = 1; // Header drucken... lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle, nPrintPage == 0 ); Point aPos( LMARGPRN, TMARGPRN ); - for ( ULONG nPara = 0; nPara < nParas; nPara++ ) + for ( sal_uLong nPara = 0; nPara < nParas; nPara++ ) { String aLine( GetEditEngine()->GetText( nPara ) ); lcl_ConvertTabsToSpaces( aLine ); - USHORT nLines = aLine.Len()/nCharspLine+1; - for ( USHORT nLine = 0; nLine < nLines; nLine++ ) + sal_uInt16 nLines = aLine.Len()/nCharspLine+1; + for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ ) { String aTmpLine( aLine, nLine*nCharspLine, nCharspLine ); aPos.Y() += nLineHeight; @@ -1030,7 +1030,7 @@ void __EXPORT ModulWindow::ExecuteCommand( SfxRequest& rReq ) { DBG_CHKTHIS( ModulWindow, 0 ); AssertValidEditEngine(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_BASICRUN: @@ -1145,7 +1145,7 @@ void __EXPORT ModulWindow::GetState( SfxItemSet &rSet ) { DBG_CHKTHIS( ModulWindow, 0 ); SfxWhichIter aIter(rSet); - for ( USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() ) + for ( sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() ) { switch ( nWh ) { @@ -1216,16 +1216,16 @@ void __EXPORT ModulWindow::DoScroll( ScrollBar* pCurScrollBar ) // VisArea verwenden: long nDiff = GetEditView()->GetStartDocPos().X() - pCurScrollBar->GetThumbPos(); GetEditView()->Scroll( nDiff, 0 ); - GetEditView()->ShowCursor( FALSE, TRUE ); + GetEditView()->ShowCursor( sal_False, sal_True ); pCurScrollBar->SetThumbPos( GetEditView()->GetStartDocPos().X() ); } } -BOOL __EXPORT ModulWindow::IsModified() +sal_Bool __EXPORT ModulWindow::IsModified() { - return GetEditEngine() ? GetEditEngine()->IsModified() : FALSE; + return GetEditEngine() ? GetEditEngine()->IsModified() : sal_False; } @@ -1260,7 +1260,7 @@ void ModulWindow::FrameWindowMoved() -void ModulWindow::ShowCursor( BOOL bOn ) +void ModulWindow::ShowCursor( sal_Bool bOn ) { if ( GetEditEngine() ) { @@ -1293,7 +1293,7 @@ void ModulWindow::Deactivating() GetEditView()->EraseVirtualDevice(); } -USHORT ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, BOOL bFromStart ) +sal_uInt16 ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, sal_Bool bFromStart ) { // Mann koennte fuer das blinde Alle-Ersetzen auch auf // Syntaxhighlighting/Formatierung verzichten... @@ -1309,8 +1309,8 @@ USHORT ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, BOO pView->SetSelection( TextSelection( TextPaM( 0xFFFFFFFF, 0xFFFF ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) ); } - BOOL bForward = !rSearchItem.GetBackward(); - USHORT nFound = 0; + sal_Bool bForward = !rSearchItem.GetBackward(); + sal_uInt16 nFound = 0; if ( ( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND ) || ( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND_ALL ) ) { @@ -1321,7 +1321,7 @@ USHORT ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, BOO { if ( !IsReadOnly() ) { - BOOL bAll = rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL; + sal_Bool bAll = rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL; nFound = pView->Replace( rSearchItem.GetSearchOptions() , bAll , bForward ); } } @@ -1332,16 +1332,16 @@ USHORT ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, BOO return nFound; } -SfxUndoManager* __EXPORT ModulWindow::GetUndoManager() +::svl::IUndoManager* __EXPORT ModulWindow::GetUndoManager() { if ( GetEditEngine() ) return &GetEditEngine()->GetUndoManager(); return NULL; } -USHORT __EXPORT ModulWindow::GetSearchOptions() +sal_uInt16 __EXPORT ModulWindow::GetSearchOptions() { - USHORT nOptions = SEARCH_OPTIONS_SEARCH | + sal_uInt16 nOptions = SEARCH_OPTIONS_SEARCH | SEARCH_OPTIONS_WHOLE_WORDS | SEARCH_OPTIONS_BACKWARDS | SEARCH_OPTIONS_REG_EXP | @@ -1362,13 +1362,13 @@ void __EXPORT ModulWindow::BasicStarted() { if ( XModule().Is() ) { - aStatus.bIsRunning = TRUE; + aStatus.bIsRunning = sal_True; BreakPointList& rList = GetBreakPoints(); if ( rList.Count() ) { rList.ResetHitCount(); rList.SetBreakPointsInBasic( xModule ); - for ( USHORT nMethod = 0; nMethod < xModule->GetMethods()->Count(); nMethod++ ) + for ( sal_uInt16 nMethod = 0; nMethod < xModule->GetMethods()->Count(); nMethod++ ) { SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( nMethod ); DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" ); @@ -1380,7 +1380,7 @@ void __EXPORT ModulWindow::BasicStarted() void __EXPORT ModulWindow::BasicStopped() { - aStatus.bIsRunning = FALSE; + aStatus.bIsRunning = sal_False; GetBreakPointWindow().SetMarkerPos( MARKER_NOMARKER ); } @@ -1424,15 +1424,15 @@ BasicEntryDescriptor ModulWindow::CreateEntryDescriptor() return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, aModName, OBJ_TYPE_MODULE ); } -void ModulWindow::SetReadOnly( BOOL b ) +void ModulWindow::SetReadOnly( sal_Bool b ) { if ( GetEditView() ) GetEditView()->SetReadOnly( b ); } -BOOL ModulWindow::IsReadOnly() +sal_Bool ModulWindow::IsReadOnly() { - BOOL bReadOnly = FALSE; + sal_Bool bReadOnly = sal_False; if ( GetEditView() ) bReadOnly = GetEditView()->IsReadOnly(); @@ -1440,9 +1440,9 @@ BOOL ModulWindow::IsReadOnly() return bReadOnly; } -BOOL ModulWindow::IsPasteAllowed() +sal_Bool ModulWindow::IsPasteAllowed() { - BOOL bPaste = FALSE; + sal_Bool bPaste = sal_False; // get clipboard Reference< datatransfer::clipboard::XClipboard > xClipboard = GetClipboard(); @@ -1458,7 +1458,7 @@ BOOL ModulWindow::IsPasteAllowed() SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); if ( xTransf->isDataFlavorSupported( aFlavor ) ) { - bPaste = TRUE; + bPaste = sal_True; } } } @@ -1472,8 +1472,8 @@ ModulWindowLayout::ModulWindowLayout( Window* pParent ) : aHSplitter( this, WinBits( WB_HSCROLL ) ), aWatchWindow( this ), aStackWindow( this ), - bVSplitted(FALSE), - bHSplitted(FALSE), + bVSplitted(sal_False), + bHSplitted(sal_False), m_pModulWindow(0), m_aImagesNormal(IDEResId(RID_IMGLST_LAYOUT)), m_aImagesHighContrast(IDEResId(RID_IMGLST_LAYOUT_HC)) @@ -1610,15 +1610,15 @@ void ModulWindowLayout::ArrangeWindows() IMPL_LINK( ModulWindowLayout, SplitHdl, Splitter *, pSplitter ) { if ( pSplitter == &aVSplitter ) - bVSplitted = TRUE; + bVSplitted = sal_True; else - bHSplitted = TRUE; + bHSplitted = sal_True; ArrangeWindows(); return 0; } -BOOL ModulWindowLayout::IsToBeDocked( DockingWindow* pDockingWindow, const Point& rPos, Rectangle& rRect ) +sal_Bool ModulWindowLayout::IsToBeDocked( DockingWindow* pDockingWindow, const Point& rPos, Rectangle& rRect ) { // prueffen, ob als Dock oder als Child: // TRUE: Floating @@ -1636,7 +1636,7 @@ BOOL ModulWindowLayout::IsToBeDocked( DockingWindow* pDockingWindow, const Point { rRect.SetSize( Size( nHSplitPos, aSz.Height() - nVSplitPos ) ); rRect.SetPos( OutputToScreenPixel( Point( 0, nVSplitPos ) ) ); - return TRUE; + return sal_True; } } if ( pDockingWindow == &aStackWindow ) @@ -1645,11 +1645,11 @@ BOOL ModulWindowLayout::IsToBeDocked( DockingWindow* pDockingWindow, const Point { rRect.SetSize( Size( aSz.Width() - nHSplitPos, aSz.Height() - nVSplitPos ) ); rRect.SetPos( OutputToScreenPixel( Point( nHSplitPos, nVSplitPos ) ) ); - return TRUE; + return sal_True; } } } - return FALSE; + return sal_False; } void ModulWindowLayout::DockaWindow( DockingWindow* pDockingWindow ) @@ -1758,13 +1758,13 @@ void ModulWindowLayout::updateSyntaxHighlighting() if (m_pModulWindow != 0) { EditorWindow & rEditor = m_pModulWindow->GetEditorWindow(); - ULONG nCount = rEditor.GetEditEngine()->GetParagraphCount(); - for (ULONG i = 0; i < nCount; ++i) + sal_uLong nCount = rEditor.GetEditEngine()->GetParagraphCount(); + for (sal_uLong i = 0; i < nCount; ++i) rEditor.DoDelayedSyntaxHighlight(i); } } -Image ModulWindowLayout::getImage(USHORT nId, bool bHighContrastMode) const +Image ModulWindowLayout::getImage(sal_uInt16 nId, bool bHighContrastMode) const { return (bHighContrastMode ? m_aImagesHighContrast : m_aImagesNormal). GetImage(nId); diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 280bb6ee3ab6..86e8527524f4 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -69,24 +69,24 @@ void setTextEngineText( ExtTextEngine* pEngine, const ::rtl::OUString aStr ); class ProgressInfo : public SfxProgress { private: - ULONG nCurState; + sal_uLong nCurState; public: - inline ProgressInfo( SfxObjectShell* pObjSh, const String& rText, ULONG nRange ); + inline ProgressInfo( SfxObjectShell* pObjSh, const String& rText, sal_uLong nRange ); -// inline void StartProgress( const String& rName, ULONG nStates ); +// inline void StartProgress( const String& rName, sal_uLong nStates ); // inline void EndProgress(); inline void StepProgress(); }; -inline ProgressInfo::ProgressInfo( SfxObjectShell* pObjSh, const String& rText, ULONG nRange ) +inline ProgressInfo::ProgressInfo( SfxObjectShell* pObjSh, const String& rText, sal_uLong nRange ) : SfxProgress( pObjSh, rText, nRange ) { nCurState = 0; } -// inline void ProgressInfo::StartProgress( const String& rName, ULONG nStates ) +// inline void ProgressInfo::StartProgress( const String& rName, sal_uLong nStates ) // { // nCurState = 0; // if ( pStbMgr ) @@ -131,16 +131,16 @@ private: using Window::Notify; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - void ImpDoHighlight( ULONG nLineOff ); + void ImpDoHighlight( sal_uLong nLineOff ); void ImplSetFont(); - BOOL bHighlightning; - BOOL bDoSyntaxHighlight; - BOOL bDelayHighlight; + sal_Bool bHighlightning; + sal_Bool bDoSyntaxHighlight; + sal_Bool bDelayHighlight; virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > - GetComponentInterface(BOOL bCreate = TRUE); + GetComponentInterface(sal_Bool bCreate = sal_True); protected: virtual void Paint( const Rectangle& ); @@ -154,9 +154,9 @@ protected: virtual void RequestHelp( const HelpEvent& rHEvt ); virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); - void DoSyntaxHighlight( ULONG nPara ); + void DoSyntaxHighlight( sal_uLong nPara ); String GetWordAtCursor(); - BOOL ImpCanModify(); + sal_Bool ImpCanModify(); public: EditorWindow( Window* pParent ); @@ -166,11 +166,11 @@ public: ExtTextView* GetEditView() const { return pEditView; } ProgressInfo* GetProgress() const { return pProgress; } - void CreateProgress( const String& rText, ULONG nRange ); + void CreateProgress( const String& rText, sal_uLong nRange ); void DestroyProgress(); - void ParagraphInsertedDeleted( ULONG nNewPara, BOOL bInserted ); - void DoDelayedSyntaxHighlight( ULONG nPara ); + void ParagraphInsertedDeleted( sal_uLong nNewPara, sal_Bool bInserted ); + void DoDelayedSyntaxHighlight( sal_uLong nPara ); void CreateEditEngine(); void SetScrollBarRanges(); @@ -179,9 +179,9 @@ public: { pModulWindow = pWin; } void ForceSyntaxTimeout(); - BOOL SetSourceInBasic( BOOL bQuiet = TRUE ); + sal_Bool SetSourceInBasic( sal_Bool bQuiet = sal_True ); - BOOL CanModify() { return ImpCanModify(); } + sal_Bool CanModify() { return ImpCanModify(); } }; @@ -189,10 +189,10 @@ class BreakPointWindow : public Window { private: long nCurYOffset; - USHORT nMarkerPos; + sal_uInt16 nMarkerPos; BreakPointList aBreakPointList; ModulWindow* pModulWindow; - BOOL bErrorMarker; + sal_Bool bErrorMarker; bool m_bHighContrastMode; virtual void DataChanged(DataChangedEvent const & rDCEvt); @@ -203,11 +203,11 @@ protected: virtual void Paint( const Rectangle& ); virtual void Resize(); BreakPoint* FindBreakPoint( const Point& rMousePos ); - void ShowMarker( BOOL bShow ); + void ShowMarker( sal_Bool bShow ); virtual void MouseButtonDown( const MouseEvent& rMEvt ); virtual void Command( const CommandEvent& rCEvt ); - BOOL SyncYOffset(); + sal_Bool SyncYOffset(); public: BreakPointWindow( Window* pParent ); @@ -216,7 +216,7 @@ public: void SetModulWindow( ModulWindow* pWin ) { pModulWindow = pWin; } - void SetMarkerPos( USHORT nLine, BOOL bErrorMarker = FALSE ); + void SetMarkerPos( sal_uInt16 nLine, sal_Bool bErrorMarker = sal_False ); void DoScroll( long nHorzScroll, long nVertScroll ); long& GetCurYOffset() { return nCurYOffset; } @@ -229,21 +229,21 @@ class WatchTreeListBox : public SvHeaderTabListBox String aEditingRes; protected: - virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); - virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ); + virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); + virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ); - BOOL ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult ); + sal_Bool ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult ); SbxBase* ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArrayElement ); // virtual DragDropMode NotifyBeginDrag( SvLBoxEntry* ); -// virtual BOOL NotifyQueryDrop( SvLBoxEntry* ); +// virtual sal_Bool NotifyQueryDrop( SvLBoxEntry* ); -// virtual BOOL NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, -// SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos ); -// virtual BOOL NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, -// SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos ); -// BOOL NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, -// SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos, BOOL bMove ); +// virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, +// SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos ); +// virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, +// SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos ); +// sal_Bool NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, +// SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove ); public: WatchTreeListBox( Window* pParent, WinBits nWinBits ); @@ -282,7 +282,7 @@ public: ~WatchWindow(); void AddWatch( const String& rVName ); - BOOL RemoveSelectedWatch(); + sal_Bool RemoveSelectedWatch(); void UpdateWatches( bool bBasicStopped = false ); WatchTreeListBox& GetWatchTreeListBox() { return aTreeListBox; } @@ -351,7 +351,7 @@ private: long BasicBreakHdl( StarBASIC* pBasic ); void CheckCompileBasic(); - BOOL BasicExecute(); + sal_Bool BasicExecute(); void GoOnTop(); void AssertValidEditEngine(); @@ -378,7 +378,7 @@ public: virtual void GetState( SfxItemSet& ); virtual void StoreData(); virtual void UpdateData(); - virtual BOOL CanClose(); + virtual sal_Bool CanClose(); // virtual void PrintData( Printer* pPrinter ); // return number of pages to be printed virtual sal_Int32 countPages( Printer* pPrinter ); @@ -386,9 +386,9 @@ public: virtual void printPage( sal_Int32 nPage, Printer* pPrinter ); virtual String GetTitle(); virtual BasicEntryDescriptor CreateEntryDescriptor(); - virtual BOOL AllowUndo(); - virtual void SetReadOnly( BOOL bReadOnly ); - virtual BOOL IsReadOnly(); + virtual sal_Bool AllowUndo(); + virtual void SetReadOnly( sal_Bool bReadOnly ); + virtual sal_Bool IsReadOnly(); StarBASIC* GetBasic() { XModule(); return xBasic; } @@ -396,39 +396,39 @@ public: void SetSbModule( SbModule* pModule ) { xModule = pModule; } String GetSbModuleName(); - BOOL CompileBasic(); - BOOL BasicRun(); - BOOL BasicStepOver(); - BOOL BasicStepInto(); - BOOL BasicStepOut(); + sal_Bool CompileBasic(); + sal_Bool BasicRun(); + sal_Bool BasicStepOver(); + sal_Bool BasicStepInto(); + sal_Bool BasicStepOut(); void BasicStop(); - BOOL BasicToggleBreakPoint(); + sal_Bool BasicToggleBreakPoint(); void BasicToggleBreakPointEnabled(); void ManageBreakPoints(); void UpdateBreakPoint( const BreakPoint& rBrk ); void BasicAddWatch(); void BasicRemoveWatch(); - BOOL LoadBasic(); - BOOL SaveBasicSource(); - BOOL ImportDialog(); + sal_Bool LoadBasic(); + sal_Bool SaveBasicSource(); + sal_Bool ImportDialog(); void EditMacro( const String& rMacroName ); // void InsertFromObjectCatalog( ObjectCatalog* pObjDlg ); - BOOL ToggleBreakPoint( ULONG nLine ); + sal_Bool ToggleBreakPoint( sal_uLong nLine ); BasicStatus& GetBasicStatus() { return aStatus; } - virtual BOOL IsModified(); - virtual BOOL IsPasteAllowed(); + virtual sal_Bool IsModified(); + virtual sal_Bool IsPasteAllowed(); void FrameWindowMoved(); - void ShowCursor( BOOL bOn ); + void ShowCursor( sal_Bool bOn ); - virtual USHORT GetSearchOptions(); - USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem, BOOL bFromStart = FALSE ); + virtual sal_uInt16 GetSearchOptions(); + sal_uInt16 StartSearchAndReplace( const SvxSearchItem& rSearchItem, sal_Bool bFromStart = sal_False ); virtual Window* GetLayoutWindow(); @@ -443,7 +443,8 @@ public: virtual void BasicStarted(); virtual void BasicStopped(); - virtual SfxUndoManager* GetUndoManager(); + virtual ::svl::IUndoManager* + GetUndoManager(); const ::rtl::OUString& GetModule() const { return m_aModule; } void SetModule( const ::rtl::OUString& aModule ) { m_aModule = aModule; } @@ -459,8 +460,8 @@ private: WatchWindow aWatchWindow; StackWindow aStackWindow; - BOOL bVSplitted; - BOOL bHSplitted; + sal_Bool bVSplitted; + sal_Bool bHSplitted; ModulWindow * m_pModulWindow; @@ -489,7 +490,7 @@ public: ~ModulWindowLayout(); void DockaWindow( DockingWindow* pDockingWin ); - BOOL IsToBeDocked( DockingWindow* pDockingWin, const Point& rPos, Rectangle& rRect ); + sal_Bool IsToBeDocked( DockingWindow* pDockingWin, const Point& rPos, Rectangle& rRect ); void SetModulWindow( ModulWindow* pModWin ); ModulWindow* GetModulWindow() const { return m_pModulWindow; } @@ -497,7 +498,7 @@ public: WatchWindow& GetWatchWindow() { return aWatchWindow; } StackWindow& GetStackWindow() { return aStackWindow; } - Image getImage(USHORT nId, bool bHighContrastMode) const; + Image getImage(sal_uInt16 nId, bool bHighContrastMode) const; inline Color const & getSyntaxColor(TokenTypes eType) const { return m_aSyntaxColors[eType]; } diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 68cdbe9ad9ed..8dcad1f5608b 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -92,7 +92,7 @@ MapUnit eEditMapUnit = MAP_100TH_MM; aMemStream.SetStreamCharSet( RTL_TEXTENCODING_UTF8 ); aMemStream.SetLineDelimiter( LINEEND_LF ); pEngine->Write( aMemStream ); - ULONG nSize = aMemStream.Tell(); + sal_uLong nSize = aMemStream.Tell(); ::rtl::OUString aText( (const sal_Char*)aMemStream.GetData(), nSize, RTL_TEXTENCODING_UTF8 ); return aText; @@ -131,10 +131,10 @@ void lcl_SeparateNameAndIndex( const String& rVName, String& rVar, String& rInde { rVar = rVName; rIndex.Erase(); - USHORT nIndexStart = rVar.Search( '(' ); + sal_uInt16 nIndexStart = rVar.Search( '(' ); if ( nIndexStart != STRING_NOTFOUND ) { - USHORT nIndexEnd = rVar.Search( ')', nIndexStart ); + sal_uInt16 nIndexEnd = rVar.Search( ')', nIndexStart ); if ( nIndexStart != STRING_NOTFOUND ) { rIndex = rVar.Copy( nIndexStart+1, nIndexEnd-nIndexStart-1 ); @@ -147,13 +147,13 @@ void lcl_SeparateNameAndIndex( const String& rVName, String& rVar, String& rInde if ( rVar.Len() ) { - USHORT nLastChar = rVar.Len()-1; + sal_uInt16 nLastChar = rVar.Len()-1; if ( strchr( cSuffixes, rVar.GetChar( nLastChar ) ) ) rVar.Erase( nLastChar, 1 ); } if ( rIndex.Len() ) { - USHORT nLastChar = rIndex.Len()-1; + sal_uInt16 nLastChar = rIndex.Len()-1; if ( strchr( cSuffixes, rIndex.GetChar( nLastChar ) ) ) rIndex.Erase( nLastChar, 1 ); } @@ -163,13 +163,13 @@ void lcl_SeparateNameAndIndex( const String& rVName, String& rVar, String& rInde EditorWindow::EditorWindow( Window* pParent ) : Window( pParent, WB_BORDER ) { - bDoSyntaxHighlight = TRUE; - bDelayHighlight = TRUE; + bDoSyntaxHighlight = sal_True; + bDelayHighlight = sal_True; pModulWindow = 0; pEditView = 0; pEditEngine = 0; pSourceViewConfig = new utl::SourceViewConfig; - bHighlightning = FALSE; + bHighlightning = sal_False; pProgress = 0; nCurTextWidth = 0; SetBackground( @@ -249,7 +249,7 @@ String EditorWindow::GetWordAtCursor() void __EXPORT EditorWindow::RequestHelp( const HelpEvent& rHEvt ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; // Sollte eigentlich mal aktiviert werden... if ( pEditEngine ) @@ -258,7 +258,7 @@ void __EXPORT EditorWindow::RequestHelp( const HelpEvent& rHEvt ) { String aKeyword = GetWordAtCursor(); Application::GetHelp()->SearchKeyword( aKeyword ); - bDone = TRUE; + bDone = sal_True; } else if ( rHEvt.GetMode() & HELPMODE_QUICK ) { @@ -269,12 +269,12 @@ void __EXPORT EditorWindow::RequestHelp( const HelpEvent& rHEvt ) Point aWindowPos = rHEvt.GetMousePosPixel(); aWindowPos = ScreenToOutputPixel( aWindowPos ); Point aDocPos = GetEditView()->GetDocPos( aWindowPos ); - TextPaM aCursor = GetEditView()->GetTextEngine()->GetPaM( aDocPos, FALSE ); + TextPaM aCursor = GetEditView()->GetTextEngine()->GetPaM( aDocPos, sal_False ); TextPaM aStartOfWord; String aWord = GetEditView()->GetTextEngine()->GetWord( aCursor, &aStartOfWord ); if ( aWord.Len() && !ByteString( aWord, RTL_TEXTENCODING_UTF8 ).IsNumericAscii() ) { - USHORT nLastChar =aWord.Len()-1; + sal_uInt16 nLastChar =aWord.Len()-1; if ( strchr( cSuffixes, aWord.GetChar( nLastChar ) ) ) aWord.Erase( nLastChar, 1 ); SbxBase* pSBX = StarBASIC::FindSBXInCurrentScope( aWord ); @@ -282,13 +282,13 @@ void __EXPORT EditorWindow::RequestHelp( const HelpEvent& rHEvt ) { SbxVariable* pVar = (SbxVariable*)pSBX; SbxDataType eType = pVar->GetType(); - if ( (BYTE)eType == (BYTE)SbxOBJECT ) + if ( (sal_uInt8)eType == (sal_uInt8)SbxOBJECT ) // Kann zu Absturz, z.B. bei Selections-Objekt fuehren // Type == Object heisst nicht, dass pVar == Object! ; // aHelpText = ((SbxObject*)pVar)->GetClassName(); else if ( eType & SbxARRAY ) ; // aHelpText = "{...}"; - else if ( (BYTE)eType != (BYTE)SbxEMPTY ) + else if ( (sal_uInt8)eType != (sal_uInt8)SbxEMPTY ) { aHelpText = pVar->GetName(); if ( !aHelpText.Len() ) // Bei Uebergabeparametern wird der Name nicht kopiert @@ -308,7 +308,7 @@ void __EXPORT EditorWindow::RequestHelp( const HelpEvent& rHEvt ) } } Help::ShowQuickHelp( this, Rectangle( aTopLeft, Size( 1, 1 ) ), aHelpText, QUICKHELP_TOP|QUICKHELP_LEFT); - bDone = TRUE; + bDone = sal_True; } } @@ -387,9 +387,9 @@ void __EXPORT EditorWindow::Command( const CommandEvent& rCEvt ) } } -BOOL EditorWindow::ImpCanModify() +sal_Bool EditorWindow::ImpCanModify() { - BOOL bCanModify = TRUE; + sal_Bool bCanModify = sal_True; if ( StarBASIC::IsRunning() ) { // Wenn im Trace-Mode, entweder Trace abbrechen oder @@ -398,11 +398,11 @@ BOOL EditorWindow::ImpCanModify() // entfernen! if ( QueryBox( 0, WB_OK_CANCEL, String( IDEResId( RID_STR_WILLSTOPPRG ) ) ).Execute() == RET_OK ) { - pModulWindow->GetBasicStatus().bIsRunning = FALSE; + pModulWindow->GetBasicStatus().bIsRunning = sal_False; BasicIDE::StopBasic(); } else - bCanModify = FALSE; + bCanModify = sal_False; } return bCanModify; } @@ -419,14 +419,14 @@ void __EXPORT EditorWindow::KeyInput( const KeyEvent& rKEvt ) long nLinSz = pModulWindow->GetHScrollBar()->GetLineSize(); (void)nLinSz; long nThumb = pModulWindow->GetHScrollBar()->GetThumbPos(); (void)nThumb; #endif - BOOL bDone = FALSE; - BOOL bWasModified = pEditEngine->IsModified(); + sal_Bool bDone = sal_False; + sal_Bool bWasModified = pEditEngine->IsModified(); if ( !TextEngine::DoesKeyChangeText( rKEvt ) || ImpCanModify() ) { if ( ( rKEvt.GetKeyCode().GetCode() == KEY_A) && rKEvt.GetKeyCode().IsMod1() ) pEditView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) ); else if ( ( rKEvt.GetKeyCode().GetCode() == KEY_Y ) && rKEvt.GetKeyCode().IsMod1() ) - bDone = TRUE; // CTRL-Y schlucken, damit kein Vorlagenkatalog + bDone = sal_True; // CTRL-Y schlucken, damit kein Vorlagenkatalog else { if ( ( rKEvt.GetKeyCode().GetCode() == KEY_TAB ) && !rKEvt.GetKeyCode().IsMod1() && @@ -435,13 +435,13 @@ void __EXPORT EditorWindow::KeyInput( const KeyEvent& rKEvt ) TextSelection aSel( pEditView->GetSelection() ); if ( aSel.GetStart().GetPara() != aSel.GetEnd().GetPara() ) { - bDelayHighlight = FALSE; + bDelayHighlight = sal_False; if ( !rKEvt.GetKeyCode().IsShift() ) pEditView->IndentBlock(); else pEditView->UnindentBlock(); - bDelayHighlight = TRUE; - bDone = TRUE; + bDelayHighlight = sal_True; + bDone = sal_True; } } if ( !bDone ) @@ -486,11 +486,11 @@ void __EXPORT EditorWindow::LoseFocus() Window::LoseFocus(); } -BOOL EditorWindow::SetSourceInBasic( BOOL bQuiet ) +sal_Bool EditorWindow::SetSourceInBasic( sal_Bool bQuiet ) { (void)bQuiet; - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; if ( pEditEngine && pEditEngine->IsModified() && !GetEditView()->IsReadOnly() ) // Added because of #i60626, otherwise // any read only bug in the text engine could lead to a crash later @@ -514,9 +514,9 @@ BOOL EditorWindow::SetSourceInBasic( BOOL bQuiet ) String aName = pModulWindow->GetName(); OSL_VERIFY( aDocument.updateModule( aLibName, aName, aModule ) ); - pEditEngine->SetModified( FALSE ); + pEditEngine->SetModified( sal_False ); BasicIDE::MarkDocumentModified( aDocument ); - bChanged = TRUE; + bChanged = sal_True; } } return bChanged; @@ -549,8 +549,8 @@ void EditorWindow::CreateEditEngine() pEditEngine = new ExtTextEngine; pEditView = new ExtTextView( pEditEngine, this ); - pEditView->SetAutoIndentMode( TRUE ); - pEditEngine->SetUpdateMode( FALSE ); + pEditView->SetAutoIndentMode( sal_True ); + pEditEngine->SetUpdateMode( sal_False ); pEditEngine->InsertView( pEditView ); ImplSetFont(); @@ -560,8 +560,8 @@ void EditorWindow::CreateEditEngine() aHighlighter.initialize( HIGHLIGHT_BASIC ); - BOOL bWasDoSyntaxHighlight = bDoSyntaxHighlight; - bDoSyntaxHighlight = FALSE; // Bei grossen Texten zu langsam... + sal_Bool bWasDoSyntaxHighlight = bDoSyntaxHighlight; + bDoSyntaxHighlight = sal_False; // Bei grossen Texten zu langsam... ::rtl::OUString aOUSource( pModulWindow->GetModule() ); sal_Int32 nLines = 0; sal_Int32 nIndex = -1; @@ -581,15 +581,15 @@ void EditorWindow::CreateEditEngine() pEditView->SetStartDocPos( Point( 0, 0 ) ); pEditView->SetSelection( TextSelection() ); pModulWindow->GetBreakPointWindow().GetCurYOffset() = 0; - pEditEngine->SetUpdateMode( TRUE ); - Update(); // Es wurde bei UpdateMode = TRUE nur Invalidiert + pEditEngine->SetUpdateMode( sal_True ); + Update(); // Es wurde bei UpdateMode = sal_True nur Invalidiert // Die anderen Fenster auch, damit keine halben Sachen auf dem Bildschirm! pModulWindow->GetLayout()->GetWatchWindow().Update(); pModulWindow->GetLayout()->GetStackWindow().Update(); pModulWindow->GetBreakPointWindow().Update(); - pEditView->ShowCursor( TRUE, TRUE ); + pEditView->ShowCursor( sal_True, sal_True ); StartListening( *pEditEngine ); @@ -598,15 +598,15 @@ void EditorWindow::CreateEditEngine() bDoSyntaxHighlight = bWasDoSyntaxHighlight; - for ( USHORT nLine = 0; nLine < nLines; nLine++ ) - aSyntaxLineTable.Insert( nLine, (void*)(USHORT)1 ); + for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ ) + aSyntaxLineTable.Insert( nLine, (void*)(sal_uInt16)1 ); ForceSyntaxTimeout(); DELETEZ( pProgress ); pEditView->EraseVirtualDevice(); - pEditEngine->SetModified( FALSE ); - pEditEngine->EnableUndo( TRUE ); + pEditEngine->SetModified( sal_False ); + pEditEngine->EnableUndo( sal_True ); InitScrollBars(); @@ -622,11 +622,11 @@ void EditorWindow::CreateEditEngine() Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) { - pModulWindow->SetReadOnly( TRUE ); + pModulWindow->SetReadOnly( sal_True ); } if ( aDocument.isDocument() && aDocument.isReadOnly() ) - pModulWindow->SetReadOnly( TRUE ); + pModulWindow->SetReadOnly( sal_True ); } // virtual @@ -686,7 +686,7 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) { if ( pModulWindow->GetHScrollBar() ) { - ULONG nWidth = pEditEngine->CalcTextWidth(); + sal_uLong nWidth = pEditEngine->CalcTextWidth(); if ( (long)nWidth != nCurTextWidth ) { nCurTextWidth = nWidth; @@ -701,12 +701,12 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) } else if( rTextHint.GetId() == TEXT_HINT_PARAINSERTED ) { - ParagraphInsertedDeleted( rTextHint.GetValue(), TRUE ); + ParagraphInsertedDeleted( rTextHint.GetValue(), sal_True ); DoDelayedSyntaxHighlight( rTextHint.GetValue() ); } else if( rTextHint.GetId() == TEXT_HINT_PARAREMOVED ) { - ParagraphInsertedDeleted( rTextHint.GetValue(), FALSE ); + ParagraphInsertedDeleted( rTextHint.GetValue(), sal_False ); } else if( rTextHint.GetId() == TEXT_HINT_PARACONTENTCHANGED ) { @@ -755,7 +755,7 @@ void EditorWindow::InitScrollBars() } } -void EditorWindow::ImpDoHighlight( ULONG nLine ) +void EditorWindow::ImpDoHighlight( sal_uLong nLine ) { if ( bDoSyntaxHighlight ) { @@ -764,12 +764,12 @@ void EditorWindow::ImpDoHighlight( ULONG nLine ) if ( aChanges.Len() ) { for ( long n = aChanges.Min() + 1; n <= aChanges.Max(); n++ ) - aSyntaxLineTable.Insert( n, (void*)(ULONG)1 ); + aSyntaxLineTable.Insert( n, (void*)(sal_uLong)1 ); aSyntaxIdleTimer.Start(); } - BOOL bWasModified = pEditEngine->IsModified(); - pEditEngine->RemoveAttribs( nLine, TRUE ); + sal_Bool bWasModified = pEditEngine->IsModified(); + pEditEngine->RemoveAttribs( nLine, sal_True ); HighlightPortions aPortions; aHighlighter.getHighlightPortions( nLine, aLine, aPortions ); @@ -777,7 +777,7 @@ void EditorWindow::ImpDoHighlight( ULONG nLine ) { HighlightPortion& r = aPortions[i]; const Color& rColor = ((ModulWindowLayout*)pModulWindow->GetLayoutWindow())->getSyntaxColor(r.tokenType); - pEditEngine->SetAttrib( TextAttribFontColor( rColor ), nLine, r.nBegin, r.nEnd, TRUE ); + pEditEngine->SetAttrib( TextAttribFontColor( rColor ), nLine, r.nBegin, r.nEnd, sal_True ); } // Das Highlighten soll kein Modify setzen @@ -806,14 +806,14 @@ void EditorWindow::ImplSetFont() if ( pEditEngine ) { - BOOL bModified = pEditEngine->IsModified(); + sal_Bool bModified = pEditEngine->IsModified(); pEditEngine->SetFont( aFont ); pEditEngine->SetModified( bModified ); } } } -void EditorWindow::DoSyntaxHighlight( ULONG nPara ) +void EditorWindow::DoSyntaxHighlight( sal_uLong nPara ) { // Durch das DelayedSyntaxHighlight kann es passieren, // dass die Zeile nicht mehr existiert! @@ -826,7 +826,7 @@ void EditorWindow::DoSyntaxHighlight( ULONG nPara ) } } -void EditorWindow::DoDelayedSyntaxHighlight( ULONG nPara ) +void EditorWindow::DoDelayedSyntaxHighlight( sal_uLong nPara ) { // Zeile wird nur in 'Liste' aufgenommen, im TimerHdl abgearbeitet. // => Nicht Absaetze manipulieren, waehrend EditEngine formatiert. @@ -837,7 +837,7 @@ void EditorWindow::DoDelayedSyntaxHighlight( ULONG nPara ) { if ( bDelayHighlight ) { - aSyntaxLineTable.Insert( nPara, (void*)(ULONG)1 ); + aSyntaxLineTable.Insert( nPara, (void*)(sal_uLong)1 ); aSyntaxIdleTimer.Start(); } else @@ -849,38 +849,38 @@ IMPL_LINK( EditorWindow, SyntaxTimerHdl, Timer *, EMPTYARG ) { DBG_ASSERT( pEditView, "Noch keine View, aber Syntax-Highlight ?!" ); - BOOL bWasModified = pEditEngine->IsModified(); - // pEditEngine->SetUpdateMode( FALSE ); + sal_Bool bWasModified = pEditEngine->IsModified(); + // pEditEngine->SetUpdateMode( sal_False ); - bHighlightning = TRUE; - USHORT nLine; + bHighlightning = sal_True; + sal_uInt16 nLine; void* p = aSyntaxLineTable.First(); while ( p ) { - nLine = (USHORT)aSyntaxLineTable.GetCurKey(); + nLine = (sal_uInt16)aSyntaxLineTable.GetCurKey(); DoSyntaxHighlight( nLine ); p = aSyntaxLineTable.Next(); } // MT: Removed, because of idle format now when set/remove attribs... - // pEditView->SetAutoScroll( FALSE ); // #101043# Don't scroll because of syntax highlight - // pEditEngine->SetUpdateMode( TRUE ); - // pEditView->ShowCursor( FALSE, TRUE ); - // pEditView->SetAutoScroll( TRUE ); + // pEditView->SetAutoScroll( sal_False ); // #101043# Don't scroll because of syntax highlight + // pEditEngine->SetUpdateMode( sal_True ); + // pEditView->ShowCursor( sal_False, sal_True ); + // pEditView->SetAutoScroll( sal_True ); // #i45572# if ( pEditView ) - pEditView->ShowCursor( FALSE, TRUE ); + pEditView->ShowCursor( sal_False, sal_True ); pEditEngine->SetModified( bWasModified ); aSyntaxLineTable.Clear(); - bHighlightning = FALSE; + bHighlightning = sal_False; return 0; } -void EditorWindow::ParagraphInsertedDeleted( ULONG nPara, BOOL bInserted ) +void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, sal_Bool bInserted ) { if ( pProgress ) pProgress->StepProgress(); @@ -897,7 +897,7 @@ void EditorWindow::ParagraphInsertedDeleted( ULONG nPara, BOOL bInserted ) // keine Sonderbehandlung fuer EditEngine-CTOR ( Erste-Zeile-Problem ), // da in diesem Moment noch keine BreakPoints. // +1: Basic-Zeilen beginnen bei 1! - pModulWindow->GetBreakPoints().AdjustBreakPoints( (USHORT)nPara+1, bInserted ); + pModulWindow->GetBreakPoints().AdjustBreakPoints( (sal_uInt16)nPara+1, bInserted ); // Im BreakPointWindow invalidieren... long nLineHeight = GetTextHeight(); @@ -915,7 +915,7 @@ void EditorWindow::ParagraphInsertedDeleted( ULONG nPara, BOOL bInserted ) } } -void EditorWindow::CreateProgress( const String& rText, ULONG nRange ) +void EditorWindow::CreateProgress( const String& rText, sal_uLong nRange ) { DBG_ASSERT( !pProgress, "ProgressInfo existiert schon" ); pProgress = new ProgressInfo( IDE_DLL()->GetShell()->GetViewFrame()->GetObjectShell(), rText, nRange ); @@ -986,12 +986,12 @@ void __EXPORT BreakPointWindow::Paint( const Rectangle& ) BreakPoint* pBrk = GetBreakPoints().First(); while ( pBrk ) { - ULONG nLine = pBrk->nLine-1; - ULONG nY = nLine*nLineHeight - nCurYOffset; + sal_uLong nLine = pBrk->nLine-1; + sal_uLong nY = nLine*nLineHeight - nCurYOffset; DrawImage( Point( 0, nY ) + aBmpOff, pBrk->bEnabled ? aBrk1 : aBrk0 ); pBrk = GetBreakPoints().Next(); } - ShowMarker( TRUE ); + ShowMarker( sal_True ); } @@ -1004,18 +1004,18 @@ void BreakPointWindow::DoScroll( long nHorzScroll, long nVertScroll ) -void BreakPointWindow::SetMarkerPos( USHORT nLine, BOOL bError ) +void BreakPointWindow::SetMarkerPos( sal_uInt16 nLine, sal_Bool bError ) { if ( SyncYOffset() ) Update(); - ShowMarker( FALSE ); // Alten wegzeichen... + ShowMarker( sal_False ); // Alten wegzeichen... nMarkerPos = nLine; bErrorMarker = bError; - ShowMarker( TRUE ); // Neuen zeichnen... + ShowMarker( sal_True ); // Neuen zeichnen... } -void BreakPointWindow::ShowMarker( BOOL bShow ) +void BreakPointWindow::ShowMarker( sal_Bool bShow ) { if ( nMarkerPos == MARKER_NOMARKER ) return; @@ -1034,7 +1034,7 @@ void BreakPointWindow::ShowMarker( BOOL bShow ) aMarkerOff.X() = ( aOutSz.Width() - aMarkerSz.Width() ) / 2; aMarkerOff.Y() = ( nLineHeight - aMarkerSz.Height() ) / 2; - ULONG nY = nMarkerPos*nLineHeight - nCurYOffset; + sal_uLong nY = nMarkerPos*nLineHeight - nCurYOffset; Point aPos( 0, nY ); aPos += aMarkerOff; if ( bShow ) @@ -1057,7 +1057,7 @@ BreakPoint* BreakPointWindow::FindBreakPoint( const Point& rMousePos ) BreakPoint* pBrk = GetBreakPoints().First(); while ( pBrk ) { - ULONG nLine = pBrk->nLine-1; + sal_uLong nLine = pBrk->nLine-1; long nY = nLine*nLineHeight; if ( ( nYPos > nY ) && ( nYPos < ( nY + nLineHeight ) ) ) return pBrk; @@ -1074,7 +1074,7 @@ void __EXPORT BreakPointWindow::MouseButtonDown( const MouseEvent& rMEvt ) long nLineHeight = GetTextHeight(); long nYPos = aMousePos.Y() + nCurYOffset; long nLine = nYPos / nLineHeight + 1; - pModulWindow->ToggleBreakPoint( (ULONG)nLine ); + pModulWindow->ToggleBreakPoint( (sal_uLong)nLine ); // vielleicht mal etwas genauer... Invalidate(); } @@ -1098,7 +1098,7 @@ void __EXPORT BreakPointWindow::Command( const CommandEvent& rCEvt ) { case RID_ACTIV: { - pBrk->bEnabled = pBrk->bEnabled ? FALSE : TRUE; + pBrk->bEnabled = pBrk->bEnabled ? sal_False : sal_True; pModulWindow->UpdateBreakPoint( *pBrk ); Invalidate(); } @@ -1130,7 +1130,7 @@ void __EXPORT BreakPointWindow::Command( const CommandEvent& rCEvt ) } } -BOOL BreakPointWindow::SyncYOffset() +sal_Bool BreakPointWindow::SyncYOffset() { TextView* pView = pModulWindow->GetEditView(); if ( pView ) @@ -1140,10 +1140,10 @@ BOOL BreakPointWindow::SyncYOffset() { nCurYOffset = nViewYOffset; Invalidate(); - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } // virtual @@ -1170,9 +1170,9 @@ void BreakPointWindow::setBackgroundColor(Color aColor) } -const USHORT ITEM_ID_VARIABLE = 1; -const USHORT ITEM_ID_VALUE = 2; -const USHORT ITEM_ID_TYPE = 3; +const sal_uInt16 ITEM_ID_VARIABLE = 1; +const sal_uInt16 ITEM_ID_VALUE = 2; +const sal_uInt16 ITEM_ID_TYPE = 3; WatchWindow::WatchWindow( Window* pParent ) : BasicDockingWindow( pParent ), @@ -1187,7 +1187,7 @@ WatchWindow::WatchWindow( Window* pParent ) : nHeaderBarHeight = 16; aTreeListBox.SetHelpId(HID_BASICIDE_WATCHWINDOW_LIST); - aTreeListBox.EnableInplaceEditing( TRUE ); + aTreeListBox.EnableInplaceEditing( sal_True ); aTreeListBox.SetSelectHdl( LINK( this, WatchWindow, TreeListHdl ) ); aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight + nHeaderBarHeight ) ); aTreeListBox.SetHighlightRange( 1, 5 ); @@ -1389,15 +1389,15 @@ void WatchWindow::AddWatch( const String& rVName ) String aWatchStr_( aVar ); aWatchStr_ += String( RTL_CONSTASCII_USTRINGPARAM( "\t\t" ) ); - SvLBoxEntry* pNewEntry = aTreeListBox.InsertEntry( aWatchStr_, 0, TRUE, LIST_APPEND ); + SvLBoxEntry* pNewEntry = aTreeListBox.InsertEntry( aWatchStr_, 0, sal_True, LIST_APPEND ); pNewEntry->SetUserData( pWatchItem ); - aTreeListBox.Select( pNewEntry, TRUE ); + aTreeListBox.Select( pNewEntry, sal_True ); aTreeListBox.MakeVisible( pNewEntry ); aRemoveWatchButton.Enable(); } -BOOL WatchWindow::RemoveSelectedWatch() +sal_Bool WatchWindow::RemoveSelectedWatch() { SvLBoxEntry* pEntry = aTreeListBox.GetCurEntry(); if ( pEntry ) @@ -1410,10 +1410,10 @@ BOOL WatchWindow::RemoveSelectedWatch() aXEdit.SetText( String() ); if ( !aTreeListBox.GetEntryCount() ) aRemoveWatchButton.Disable(); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } @@ -1470,9 +1470,9 @@ IMPL_LINK_INLINE_START( WatchWindow, implEndDragHdl, HeaderBar *, pBar ) aHeaderBar.SetItemSize( ITEM_ID_TYPE, TAB_WIDTH_MIN ); sal_Int32 nPos = 0; - USHORT nTabs = aHeaderBar.GetItemCount(); + sal_uInt16 nTabs = aHeaderBar.GetItemCount(); // OSL_ASSERT( m_treelb->TabCount() == nTabs ); - for( USHORT i = 1 ; i < nTabs ; ++i ) + for( sal_uInt16 i = 1 ; i < nTabs ; ++i ) { nPos += aHeaderBar.GetItemSize( i ); aTreeListBox.SetTab( i, nPos, MAP_PIXEL ); @@ -1525,7 +1525,7 @@ StackWindow::StackWindow( Window* pParent ) : aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) ); aTreeListBox.SetHighlightRange(); aTreeListBox.SetSelectionMode( NO_SELECTION ); - aTreeListBox.InsertEntry( String(), 0, FALSE, LIST_APPEND ); + aTreeListBox.InsertEntry( String(), 0, sal_False, LIST_APPEND ); aTreeListBox.Show(); SetText( String( IDEResId( RID_STR_STACKNAME ) ) ); @@ -1599,7 +1599,7 @@ IMPL_LINK_INLINE_END( StackWindow, ButtonHdl, ImageButton *, pButton ) void __EXPORT StackWindow::UpdateCalls() { - aTreeListBox.SetUpdateMode( FALSE ); + aTreeListBox.SetUpdateMode( sal_False ); aTreeListBox.Clear(); if ( StarBASIC::IsRunning() ) @@ -1607,7 +1607,7 @@ void __EXPORT StackWindow::UpdateCalls() SbxError eOld = SbxBase::GetError(); aTreeListBox.SetSelectionMode( SINGLE_SELECTION ); - USHORT nScope = 0; + sal_uInt16 nScope = 0; SbMethod* pMethod = StarBASIC::GetActiveMethod( nScope ); while ( pMethod ) { @@ -1622,7 +1622,7 @@ void __EXPORT StackWindow::UpdateCalls() { aEntry += '('; // 0 ist der Name der Sub... - for ( USHORT nParam = 1; nParam < pParams->Count(); nParam++ ) + for ( sal_uInt16 nParam = 1; nParam < pParams->Count(); nParam++ ) { SbxVariable* pVar = pParams->Get( nParam ); DBG_ASSERT( pVar, "Parameter?!" ); @@ -1645,7 +1645,7 @@ void __EXPORT StackWindow::UpdateCalls() } aEntry += ')'; } - aTreeListBox.InsertEntry( aEntry, 0, FALSE, LIST_APPEND ); + aTreeListBox.InsertEntry( aEntry, 0, sal_False, LIST_APPEND ); nScope++; pMethod = StarBASIC::GetActiveMethod( nScope ); } @@ -1657,10 +1657,10 @@ void __EXPORT StackWindow::UpdateCalls() else { aTreeListBox.SetSelectionMode( NO_SELECTION ); - aTreeListBox.InsertEntry( String(), 0, FALSE, LIST_APPEND ); + aTreeListBox.InsertEntry( String(), 0, sal_False, LIST_APPEND ); } - aTreeListBox.SetUpdateMode( TRUE ); + aTreeListBox.SetUpdateMode( sal_True ); } @@ -1716,7 +1716,7 @@ IMPL_LINK( ComplexEditorWindow, ScrollHdl, ScrollBar *, pCurScrollBar ) long nDiff = aEdtWindow.GetEditView()->GetStartDocPos().Y() - pCurScrollBar->GetThumbPos(); aEdtWindow.GetEditView()->Scroll( 0, nDiff ); aBrkWindow.DoScroll( 0, nDiff ); - aEdtWindow.GetEditView()->ShowCursor( FALSE, TRUE ); + aEdtWindow.GetEditView()->ShowCursor( sal_False, sal_True ); pCurScrollBar->SetThumbPos( aEdtWindow.GetEditView()->GetStartDocPos().Y() ); } @@ -1742,7 +1742,7 @@ void ComplexEditorWindow::DataChanged(DataChangedEvent const & rDCEvt) // virtual uno::Reference< awt::XWindowPeer > -EditorWindow::GetComponentInterface(BOOL bCreate) +EditorWindow::GetComponentInterface(sal_Bool bCreate) { uno::Reference< awt::XWindowPeer > xPeer( Window::GetComponentInterface(false)); @@ -1776,8 +1776,8 @@ WatchTreeListBox::~WatchTreeListBox() void WatchTreeListBox::SetTabs() { SvHeaderTabListBox::SetTabs(); - USHORT nTabCount_ = aTabs.Count(); - for( USHORT i = 0 ; i < nTabCount_ ; i++ ) + sal_uInt16 nTabCount_ = aTabs.Count(); + for( sal_uInt16 i = 0 ; i < nTabCount_ ; i++ ) { SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(i); if( i == 2 ) @@ -1812,10 +1812,10 @@ void WatchTreeListBox::RequestingChilds( SvLBoxEntry * pParent ) { createAllObjectProperties( pObj ); SbxArray* pProps = pObj->GetProperties(); - USHORT nPropCount = pProps->Count(); + sal_uInt16 nPropCount = pProps->Count(); pItem->maMemberList.allocList( nPropCount ); - for( USHORT i = 0 ; i < nPropCount - 3 ; i++ ) + for( sal_uInt16 i = 0 ; i < nPropCount - 3 ; i++ ) { SbxVariable* pVar = pProps->Get( i ); @@ -1833,14 +1833,14 @@ void WatchTreeListBox::RequestingChilds( SvLBoxEntry * pParent ) } else if( pArray ) { - USHORT nElementCount = 0; + sal_uInt16 nElementCount = 0; // Loop through indices of current level int nParentLevel = bArrayIsRootArray ? pItem->nDimLevel : 0; int nThisLevel = nParentLevel + 1; - INT32 nMin, nMax; + sal_Int32 nMin, nMax; pArray->GetDim32( nThisLevel, nMin, nMax ); - for( INT32 i = nMin ; i <= nMax ; i++ ) + for( sal_Int32 i = nMin ; i <= nMax ; i++ ) { WatchItem* pChildItem = new WatchItem(); @@ -1854,7 +1854,7 @@ void WatchTreeListBox::RequestingChilds( SvLBoxEntry * pParent ) pChildItem->nDimLevel = nThisLevel; pChildItem->nDimCount = pItem->nDimCount; pChildItem->pIndices = new short[ pChildItem->nDimCount ]; - USHORT j; + sal_uInt16 j; for( j = 0 ; j < nParentLevel ; j++ ) { short n = pChildItem->pIndices[j] = pItem->pIndices[j]; @@ -1932,11 +1932,11 @@ SbxBase* WatchTreeListBox::ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArra return pSBX; } -BOOL __EXPORT WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) +sal_Bool __EXPORT WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) { WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); - BOOL bEdit = FALSE; + sal_Bool bEdit = sal_False; if ( StarBASIC::IsRunning() && StarBASIC::GetActiveMethod() && !SbxBase::IsError() ) { // No out of scope entries @@ -1950,7 +1950,7 @@ BOOL __EXPORT WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) aEditingRes = SvHeaderTabListBox::GetEntryText( pEntry, ITEM_ID_VALUE-1 ); aEditingRes.EraseLeadingChars(); aEditingRes.EraseTrailingChars(); - bEdit = TRUE; + bEdit = sal_True; } } } @@ -1961,7 +1961,7 @@ BOOL __EXPORT WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) return bEdit; } -BOOL __EXPORT WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ) +sal_Bool __EXPORT WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ) { WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); String aVName( pItem->maName ); @@ -1970,20 +1970,20 @@ BOOL __EXPORT WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& aResult.EraseLeadingChars(); aResult.EraseTrailingChars(); - USHORT nResultLen = aResult.Len(); + sal_uInt16 nResultLen = aResult.Len(); sal_Unicode cFirst = aResult.GetChar( 0 ); sal_Unicode cLast = aResult.GetChar( nResultLen - 1 ); if( cFirst == '\"' && cLast == '\"' ) aResult = aResult.Copy( 1, nResultLen - 2 ); - BOOL bResModified = ( aResult != aEditingRes ) ? TRUE : FALSE; - BOOL bError = FALSE; + sal_Bool bResModified = ( aResult != aEditingRes ) ? sal_True : sal_False; + sal_Bool bError = sal_False; if ( !aVName.Len() ) { - bError = TRUE; + bError = sal_True; } - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( bError ) { @@ -1997,12 +1997,12 @@ BOOL __EXPORT WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& return bRet; } -BOOL WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult ) +sal_Bool WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult ) { WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); String aVName( pItem->maName ); - BOOL bError = FALSE; + sal_Bool bError = sal_False; String aResult( rResult ); String aIndex; bool bArrayElement; @@ -2013,10 +2013,10 @@ BOOL WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& { SbxVariable* pVar = (SbxVariable*)pSBX; SbxDataType eType = pVar->GetType(); - if ( (BYTE)eType == (BYTE)SbxOBJECT ) - bError = TRUE; + if ( (sal_uInt8)eType == (sal_uInt8)SbxOBJECT ) + bError = sal_True; else if ( eType & SbxARRAY ) - bError = TRUE; + bError = sal_True; else pToBeChanged = pSBX; } @@ -2030,14 +2030,14 @@ BOOL WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& ((SbxVariable*)pToBeChanged)->PutStringExt( aResult ); } else - bError = TRUE; + bError = sal_True; } // Wenn jemand z.B. einen zu grossen Wert fuer ein Int eingegeben hat, // folgt beim naechsten Step() ein Runtime-Error. if ( SbxBase::IsError() ) { - bError = TRUE; + bError = sal_True; SbxBase::ResetError(); } @@ -2048,7 +2048,7 @@ BOOL WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& // Der Text soll niemals 1-zu-1 uebernommen werden, weil dann das // UpdateWatches verlorengeht. - return FALSE; + return sal_False; } @@ -2166,8 +2166,8 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) { // Compare Array dimensions to see if array has changed // Can be a copy, so comparing pointers does not work - USHORT nOldDims = pOldArray->GetDims(); - USHORT nNewDims = pNewArray->GetDims(); + sal_uInt16 nOldDims = pOldArray->GetDims(); + sal_uInt16 nNewDims = pNewArray->GetDims(); if( nOldDims != nNewDims ) { bArrayChanged = true; @@ -2204,7 +2204,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) implEnableChildren( pEntry, true ); pItem->mpArray = pNewArray; - USHORT nDims = pNewArray->GetDims(); + sal_uInt16 nDims = pNewArray->GetDims(); pItem->nDimLevel = 0; pItem->nDimCount = nDims; } @@ -2217,7 +2217,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) else aWatchStr += String( RTL_CONSTASCII_USTRINGPARAM( "<?>" ) ); } - else if ( (BYTE)eType == (BYTE)SbxOBJECT ) + else if ( (sal_uInt8)eType == (sal_uInt8)SbxOBJECT ) { SbxObject* pObj = NULL; SbxBase* pBase = pVar->GetObject(); @@ -2231,8 +2231,8 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) if( pItem->mpObject != NULL && pItem->maMemberList.mpMemberNames != NULL ) { SbxArray* pProps = pObj->GetProperties(); - USHORT nPropCount = pProps->Count(); - for( USHORT i = 0 ; i < nPropCount - 3 ; i++ ) + sal_uInt16 nPropCount = pProps->Count(); + for( sal_uInt16 i = 0 ; i < nPropCount - 3 ; i++ ) { SbxVariable* pVar_ = pProps->Get( i ); String aName( pVar_->GetName() ); @@ -2272,7 +2272,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped ) implEnableChildren( pEntry, false ); } - bool bString = ((BYTE)eType == (BYTE)SbxSTRING); + bool bString = ((sal_uInt8)eType == (sal_uInt8)SbxSTRING); String aStrStr( RTL_CONSTASCII_USTRINGPARAM( "\"" ) ); if( bString ) aWatchStr += aStrStr; diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 84291656c755..a0e217e55666 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -108,7 +108,7 @@ DialogWindow::DialogWindow( Window* pParent, const ScriptDocument& rDocument, St :IDEBaseWindow( pParent, rDocument, aLibName, aName ) ,pUndoMgr(NULL) { - InitSettings( TRUE, TRUE, TRUE ); + InitSettings( sal_True, sal_True, sal_True ); pEditor = new DlgEditor(); pEditor->SetWindow( this ); @@ -128,10 +128,10 @@ DialogWindow::DialogWindow( Window* pParent, const ScriptDocument& rDocument, St ::rtl::OUString aOULibName( aLibName ); Reference< script::XLibraryContainer2 > xDlgLibContainer( GetDocument().getLibraryContainer( E_DIALOGS ), UNO_QUERY ); if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) - SetReadOnly( TRUE ); + SetReadOnly( sal_True ); if ( rDocument.isDocument() && rDocument.isReadOnly() ) - SetReadOnly( TRUE ); + SetReadOnly( sal_True ); } DialogWindow::~DialogWindow() @@ -304,7 +304,7 @@ void __EXPORT DialogWindow::DoScroll( ScrollBar* pCurScrollBar ) void __EXPORT DialogWindow::GetState( SfxItemSet& rSet ) { SfxWhichIter aIter(rSet); - for ( USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() ) + for ( sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() ) { switch ( nWh ) { @@ -350,10 +350,10 @@ void __EXPORT DialogWindow::GetState( SfxItemSet& rSet ) if( IDE_DLL()->GetShell()->GetFrame() ) { rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE, - (pEditor->GetMode() == DLGED_TEST) ? TRUE : FALSE) ); + (pEditor->GetMode() == DLGED_TEST) ? sal_True : sal_False) ); } else - rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE,FALSE )); + rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE,sal_False )); } break; @@ -370,7 +370,7 @@ void __EXPORT DialogWindow::GetState( SfxItemSet& rSet ) aItem.SetValue( SVX_SNAP_SELECT ); else { - USHORT nObj; + sal_uInt16 nObj; switch( pEditor->GetInsertObj() ) { case OBJ_DLG_PUSHBUTTON: nObj = SVX_SNAP_PUSHBUTTON; break; @@ -650,16 +650,16 @@ Reference< container::XNameContainer > DialogWindow::GetDialog() const return pEditor->GetDialog(); } -BOOL DialogWindow::RenameDialog( const String& rNewName ) +sal_Bool DialogWindow::RenameDialog( const String& rNewName ) { if ( !BasicIDE::RenameDialog( this, GetDocument(), GetLibName(), GetName(), rNewName ) ) - return FALSE; + return sal_False; SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if ( pBindings ) pBindings->Invalidate( SID_DOC_MODIFIED ); - return TRUE; + return sal_True; } void DialogWindow::DisableBrowser() @@ -683,10 +683,10 @@ void DialogWindow::UpdateBrowser() static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAscii( "ResourceResolver" ); -BOOL DialogWindow::SaveDialog() +sal_Bool DialogWindow::SaveDialog() { DBG_CHKTHIS( DialogWindow, 0 ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); Reference < XFilePicker > xFP; @@ -950,9 +950,9 @@ LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent, QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() ); } -BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName ) +sal_Bool implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); Reference < XFilePicker > xFP; @@ -1046,7 +1046,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen aQueryBoxText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "$(ARG1)" ) ), aXmlDlgName ); NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ); - USHORT nRet = aQueryBox.Execute(); + sal_uInt16 nRet = aQueryBox.Execute(); if( RET_YES == nRet ) { // RET_YES == Rename, see NameClashQueryBox::NameClashQueryBox @@ -1083,7 +1083,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen Sequence< lang::Locale > aImportLocaleSeq = xImportStringResource->getLocales(); sal_Int32 nImportLocaleCount = aImportLocaleSeq.getLength(); - Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) ); + Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) ); Reference< resource::XStringResourceManager > xLibStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); sal_Int32 nLibLocaleCount = 0; Sequence< lang::Locale > aLibLocaleSeq; @@ -1108,7 +1108,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen String aQueryBoxTitle( IDEResId( RID_STR_DLGIMP_MISMATCH_TITLE ) ); String aQueryBoxText( IDEResId( RID_STR_DLGIMP_MISMATCH_TEXT ) ); LanguageMismatchQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ); - USHORT nRet = aQueryBox.Execute(); + sal_uInt16 nRet = aQueryBox.Execute(); if( RET_YES == nRet ) { // RET_YES == Add, see LanguageMismatchQueryBox::LanguageMismatchQueryBox @@ -1194,9 +1194,9 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen { if ( BasicIDE::RemoveDialog( rDocument, aLibName, aNewDlgName ) ) { - IDEBaseWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, aLibName, aNewDlgName, FALSE, TRUE ); + IDEBaseWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, aLibName, aNewDlgName, sal_False, sal_True ); if( pDlgWin != NULL ) - pIDEShell->RemoveWindow( pDlgWin, TRUE ); + pIDEShell->RemoveWindow( pDlgWin, sal_True ); BasicIDE::MarkDocumentModified( rDocument ); } else @@ -1239,10 +1239,10 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen if( bSuccess ) { DialogWindow* pNewDlgWin = pIDEShell->CreateDlgWin( rDocument, aLibName, aNewDlgName ); - pIDEShell->SetCurWindow( pNewDlgWin, TRUE ); + pIDEShell->SetCurWindow( pNewDlgWin, sal_True ); } - bDone = TRUE; + bDone = sal_True; } catch( Exception& ) {} @@ -1251,13 +1251,13 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen return bDone; } -BOOL DialogWindow::ImportDialog() +sal_Bool DialogWindow::ImportDialog() { DBG_CHKTHIS( DialogWindow, 0 ); const ScriptDocument& rDocument = GetDocument(); String aLibName = GetLibName(); - BOOL bRet = implImportDialog( this, aCurPath, rDocument, aLibName ); + sal_Bool bRet = implImportDialog( this, aCurPath, rDocument, aLibName ); return bRet; } @@ -1276,12 +1276,12 @@ DlgEdView* DialogWindow::GetView() const return pEditor ? pEditor->GetView() : NULL; } -BOOL __EXPORT DialogWindow::IsModified() +sal_Bool __EXPORT DialogWindow::IsModified() { return pEditor->IsModified(); } -SfxUndoManager* __EXPORT DialogWindow::GetUndoManager() +::svl::IUndoManager* __EXPORT DialogWindow::GetUndoManager() { return pUndoMgr; } @@ -1300,7 +1300,7 @@ BasicEntryDescriptor DialogWindow::CreateEntryDescriptor() return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, GetName(), OBJ_TYPE_DIALOG ); } -void DialogWindow::SetReadOnly( BOOL b ) +void DialogWindow::SetReadOnly( sal_Bool b ) { if ( pEditor ) { @@ -1311,19 +1311,19 @@ void DialogWindow::SetReadOnly( BOOL b ) } } -BOOL DialogWindow::IsReadOnly() +sal_Bool DialogWindow::IsReadOnly() { - BOOL bReadOnly = FALSE; + sal_Bool bReadOnly = sal_False; if ( pEditor && pEditor->GetMode() == DLGED_READONLY ) - bReadOnly = TRUE; + bReadOnly = sal_True; return bReadOnly; } -BOOL DialogWindow::IsPasteAllowed() +sal_Bool DialogWindow::IsPasteAllowed() { - return pEditor ? pEditor->IsPasteAllowed() : FALSE; + return pEditor ? pEditor->IsPasteAllowed() : sal_False; } void DialogWindow::StoreData() @@ -1378,14 +1378,14 @@ void DialogWindow::DataChanged( const DataChangedEvent& rDCEvt ) { if( (rDCEvt.GetType()==DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - InitSettings( TRUE, TRUE, TRUE ); + InitSettings( sal_True, sal_True, sal_True ); Invalidate(); } else IDEBaseWindow::DataChanged( rDCEvt ); } -void DialogWindow::InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground) +void DialogWindow::InitSettings(sal_Bool bFont,sal_Bool bForeground,sal_Bool bBackground) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 351186325b09..f6d4204fb586 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -93,7 +93,7 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) case SID_BASICIDE_HIDECURPAGE: { pCurWin->StoreData(); - RemoveWindow( pCurWin, FALSE ); + RemoveWindow( pCurWin, sal_False ); } break; case SID_BASICIDE_DELETECURRENT: @@ -120,7 +120,7 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) { if ( BasicIDE::RemoveDialog( aDocument, aLibName, aName ) ) { - RemoveWindow( pCurWin, TRUE ); + RemoveWindow( pCurWin, sal_True ); BasicIDE::MarkDocumentModified( aDocument ); } } @@ -139,7 +139,7 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) DBG_ASSERT( rReq.GetArgs(), "arguments expected" ); const SfxItemSet* pArgs = rReq.GetArgs(); // Leider kenne ich die ID nicht: - USHORT nWhich = pArgs->GetWhichByPos( 0 ); + sal_uInt16 nWhich = pArgs->GetWhichByPos( 0 ); DBG_ASSERT( nWhich, "Wich fuer SearchItem ?" ); const SfxPoolItem& rItem = pArgs->Get( nWhich ); DBG_ASSERT( rItem.ISA( SvxSearchItem ), "Kein Searchitem!" ); @@ -147,11 +147,11 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) { // Item wegen der Einstellungen merken... IDE_DLL()->GetExtraData()->SetSearchItem( (const SvxSearchItem&)rItem ); - USHORT nFound = 0; - BOOL bCanceled = FALSE; + sal_uInt16 nFound = 0; + sal_Bool bCanceled = sal_False; if ( ((const SvxSearchItem&)rItem).GetCommand() == SVX_SEARCHCMD_REPLACE_ALL ) { - USHORT nActModWindows = 0; + sal_uInt16 nActModWindows = 0; IDEBaseWindow* pWin = aIDEWindowTable.First(); while ( pWin ) { @@ -184,11 +184,11 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) if ( !nFound && !((const SvxSearchItem&)rItem).GetSelection() ) { // Andere Module durchsuchen... - BOOL bChangeCurWindow = FALSE; + sal_Bool bChangeCurWindow = sal_False; aIDEWindowTable.Seek( pCurWin ); // Erstmal beim naechsten Anfangen, ggf. spaeter von vorne IDEBaseWindow* pWin = aIDEWindowTable.Next(); - BOOL bSearchedFromStart = FALSE; + sal_Bool bSearchedFromStart = sal_False; while ( !nFound && !bCanceled && ( pWin || !bSearchedFromStart ) ) { if ( !pWin ) @@ -200,10 +200,10 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) if ( aQuery.Execute() == RET_YES ) { pWin = aIDEWindowTable.First(); - bSearchedFromStart = TRUE; + bSearchedFromStart = sal_True; } else - bCanceled = TRUE; + bCanceled = sal_True; } if ( pWin && !pWin->IsSuspended() && pWin->IsA( TYPE( ModulWindow ) ) ) @@ -214,11 +214,11 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) // gleich richtig justiert werden kann. if ( pCurWin ) pWin->SetSizePixel( pCurWin->GetSizePixel() ); - nFound = ((ModulWindow*)pWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, TRUE ); + nFound = ((ModulWindow*)pWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_True ); } if ( nFound ) { - bChangeCurWindow = TRUE; + bChangeCurWindow = sal_True; break; } } @@ -228,9 +228,9 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) pWin = 0; // Dann sind wir durch... } if ( !nFound && bSearchedFromStart ) // Aktuelles von vorne... - nFound = ((ModulWindow*)pCurWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, TRUE ); + nFound = ((ModulWindow*)pCurWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_True ); if ( bChangeCurWindow ) - SetCurWindow( pWin, TRUE ); + SetCurWindow( pWin, sal_True ); } if ( !nFound && !bCanceled ) InfoBox( pCurWin, String( IDEResId( RID_STR_SEARCHNOTFOUND ) ) ).Execute(); @@ -266,7 +266,7 @@ void __EXPORT BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) // Egal, wer oben, Einfluss auf die Shell: void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_BASICSTOP: @@ -291,7 +291,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) { uno::Reference< task::XStatusIndicator > xStatusIndicator; - SFX_REQUEST_ARG( rReq, pStatusIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, FALSE ); + SFX_REQUEST_ARG( rReq, pStatusIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, sal_False ); if ( pStatusIndicatorItem ) OSL_VERIFY( pStatusIndicatorItem->GetValue() >>= xStatusIndicator ); else @@ -353,7 +353,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) break; case SID_BASICIDE_CHOOSEMACRO: { - BasicIDE::ChooseMacro( NULL, FALSE, ::rtl::OUString() ); + BasicIDE::ChooseMacro( NULL, sal_False, ::rtl::OUString() ); } break; case SID_BASICIDE_CREATEMACRO: @@ -366,7 +366,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); - StartListening( *pBasMgr, TRUE /* Nur einmal anmelden */ ); + StartListening( *pBasMgr, sal_True /* Nur einmal anmelden */ ); String aLibName( rInfo.GetLib() ); if ( !aLibName.Len() ) aLibName = String::CreateFromAscii( "Standard" ); @@ -394,7 +394,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) String aModName = rInfo.GetModule(); ::rtl::OUString sModuleCode; - if ( aDocument.createModule( aLibName, aModName, FALSE, sModuleCode ) ) + if ( aDocument.createModule( aLibName, aModName, sal_False, sModuleCode ) ) pModule = pBasic->FindModule( aModName ); } else @@ -407,15 +407,15 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) SfxViewFrame* pViewFrame = GetViewFrame(); if ( pViewFrame ) pViewFrame->ToTop(); - ModulWindow* pWin = FindBasWin( aDocument, aLibName, rInfo.GetModule(), TRUE ); + ModulWindow* pWin = FindBasWin( aDocument, aLibName, rInfo.GetModule(), sal_True ); DBG_ASSERT( pWin, "Edit/Create Macro: Fenster wurde nicht erzeugt/gefunden!" ); - SetCurWindow( pWin, TRUE ); + SetCurWindow( pWin, sal_True ); pWin->EditMacro( rInfo.GetMethod() ); } break; case SID_BASICIDE_OBJCAT: { - ShowObjectDialog( TRUE, TRUE ); + ShowObjectDialog( sal_True, sal_True ); } break; case SID_BASICIDE_NAMECHANGEDONTAB: @@ -444,7 +444,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) // Because we listen for container events for script // modules, rename will delete the 'old' window // pWin has been invalidated, restore now - pWin = FindBasWin( aDocument, aLibName, aNewName, TRUE ); + pWin = FindBasWin( aDocument, aLibName, aNewName, sal_True ); } } @@ -460,7 +460,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) else { // set old name in TabWriter - USHORT nId = (USHORT)aIDEWindowTable.GetKey( pWin ); + sal_uInt16 nId = (sal_uInt16)aIDEWindowTable.GetKey( pWin ); DBG_ASSERT( nId, "No entry in Tabbar!" ); if ( nId ) pTabBar->SetPageText( nId, aOldName ); @@ -480,7 +480,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) BasicManager* pBasMgr = (BasicManager*)rInfo.GetBasicManager(); DBG_ASSERT( pBasMgr, "Store source: Kein BasMgr?" ); ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); - ModulWindow* pWin = FindBasWin( aDocument, rInfo.GetLib(), rInfo.GetModule(), FALSE, TRUE ); + ModulWindow* pWin = FindBasWin( aDocument, rInfo.GetLib(), rInfo.GetModule(), sal_False, sal_True ); if ( pWin ) { if ( rReq.GetSlot() == SID_BASICIDE_STOREMODULESOURCE ) @@ -525,7 +525,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) aDocument.loadLibraryIfExists( E_DIALOGS, aLibName ); // check password, if library is password protected and not verified - BOOL bOK = TRUE; + sal_Bool bOK = sal_True; Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) ) { @@ -546,14 +546,14 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) // alten Wert einstellen... SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if ( pBindings ) - pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, TRUE, FALSE ); + pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, sal_True, sal_False ); } } else if ( nSlot == SID_BASICIDE_LIBREMOVED ) { if ( !m_aCurLibName.Len() || ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) ) { - RemoveWindows( aDocument, aLibName, TRUE ); + RemoveWindows( aDocument, aLibName, sal_True ); if ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) { m_aCurDocument = ScriptDocument::getApplicationScriptDocument(); @@ -573,14 +573,14 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) { ModulWindow* pWin = CreateBasWin( m_aCurDocument, m_aCurLibName, String() ); DBG_ASSERT( pWin, "New Module: Konnte Fenster nicht erzeugen!" ); - SetCurWindow( pWin, TRUE ); + SetCurWindow( pWin, sal_True ); } break; case SID_BASICIDE_NEWDIALOG: { DialogWindow* pWin = CreateDlgWin( m_aCurDocument, m_aCurLibName, String() ); DBG_ASSERT( pWin, "New Module: Konnte Fenster nicht erzeugen!" ); - SetCurWindow( pWin, TRUE ); + SetCurWindow( pWin, sal_True ); } break; case SID_BASICIDE_SBXRENAMED: @@ -599,9 +599,9 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) { IDEBaseWindow* pWin = 0; if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE ) - pWin = FindBasWin( aDocument, aLibName, aName, TRUE ); + pWin = FindBasWin( aDocument, aLibName, aName, sal_True ); else if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG ) - pWin = FindDlgWin( aDocument, aLibName, aName, TRUE ); + pWin = FindDlgWin( aDocument, aLibName, aName, sal_True ); } } break; @@ -610,9 +610,9 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) DBG_ASSERT( rReq.GetArgs(), "arguments expected" ); const SbxItem& rSbxItem = (const SbxItem&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ); ScriptDocument aDocument( rSbxItem.GetDocument() ); - IDEBaseWindow* pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetType(), TRUE ); + IDEBaseWindow* pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetType(), sal_True ); if ( pWin ) - RemoveWindow( pWin, TRUE ); + RemoveWindow( pWin, sal_True ); } break; case SID_BASICIDE_SHOWSBX: @@ -626,19 +626,19 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) IDEBaseWindow* pWin = 0; if ( rSbxItem.GetType() == BASICIDE_TYPE_DIALOG ) { - pWin = FindDlgWin( aDocument, aLibName, aName, TRUE ); + pWin = FindDlgWin( aDocument, aLibName, aName, sal_True ); } else if ( rSbxItem.GetType() == BASICIDE_TYPE_MODULE ) { - pWin = FindBasWin( aDocument, aLibName, aName, TRUE ); + pWin = FindBasWin( aDocument, aLibName, aName, sal_True ); } else if ( rSbxItem.GetType() == BASICIDE_TYPE_METHOD ) { - pWin = FindBasWin( aDocument, aLibName, aName, TRUE ); + pWin = FindBasWin( aDocument, aLibName, aName, sal_True ); ((ModulWindow*)pWin)->EditMacro( rSbxItem.GetMethodName() ); } DBG_ASSERT( pWin, "Fenster wurde nicht erzeugt!" ); - SetCurWindow( pWin, TRUE ); + SetCurWindow( pWin, sal_True ); pTabBar->MakeVisible( pTabBar->GetCurPageId() ); } break; @@ -691,13 +691,13 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) IDEBaseWindow* pWin = 0; if ( aType == aModType ) - pWin = FindBasWin( *pDocument, aLibName, aName, FALSE ); + pWin = FindBasWin( *pDocument, aLibName, aName, sal_False ); else if ( aType == aDlgType ) - pWin = FindDlgWin( *pDocument, aLibName, aName, FALSE ); + pWin = FindDlgWin( *pDocument, aLibName, aName, sal_False ); if ( pWin ) { - SetCurWindow( pWin, TRUE ); + SetCurWindow( pWin, sal_True ); if ( pTabBar ) pTabBar->MakeVisible( pTabBar->GetCurPageId() ); @@ -733,7 +733,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) long nNewY = nLine * pTextEngine->GetCharHeight() - nVisHeight / 2; nNewY = ::std::min( nNewY, nMaxY ); pTextView->Scroll( 0, -( nNewY - nOldY ) ); - pTextView->ShowCursor( FALSE, TRUE ); + pTextView->ShowCursor( sal_False, sal_True ); pModWin->GetEditVScrollBar().SetThumbPos( pTextView->GetStartDocPos().Y() ); } sal_uInt16 nCol1 = 0, nCol2 = 0; @@ -781,7 +781,7 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet) { SfxWhichIter aIter(rSet); - for ( USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() ) + for ( sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() ) { switch ( nWh ) { @@ -792,7 +792,7 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet) break; case SID_SAVEDOC: { - BOOL bDisable = FALSE; + sal_Bool bDisable = sal_False; if ( pCurWin ) { @@ -805,7 +805,7 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet) } else { - bDisable = TRUE; + bDisable = sal_True; } if ( bDisable ) @@ -899,7 +899,7 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet) break; case SID_SEARCH_OPTIONS: { - USHORT nOptions = 0; + sal_uInt16 nOptions = 0; if( pCurWin ) nOptions = pCurWin->GetSearchOptions(); rSet.Put( SfxUInt16Item( SID_SEARCH_OPTIONS, nOptions ) ); @@ -919,7 +919,7 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet) break; case SID_SEARCH_ITEM: { - String aSelected = GetSelectionText( TRUE ); + String aSelected = GetSelectionText( sal_True ); SvxSearchItem& rItem = IDE_DLL()->GetExtraData()->GetSearchItem(); rItem.SetSearchString( aSelected ); rSet.Put( rItem ); @@ -936,12 +936,12 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet) case SID_DOC_MODIFIED: { String aModifiedMarker; - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if ( pCurWin ) { if ( pCurWin->IsModified() ) - bModified = TRUE; + bModified = sal_True; else { ScriptDocument aDocument( pCurWin->GetDocument() ); @@ -998,7 +998,7 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet) { Sequence< lang::Locale > aLocaleSeq = pCurMgr->getStringResourceManager()->getLocales(); const lang::Locale* pLocale = aLocaleSeq.getConstArray(); - INT32 i, nCount = aLocaleSeq.getLength(); + sal_Int32 i, nCount = aLocaleSeq.getLength(); // Force different results for any combination of locales and default locale ::rtl::OUString aLangStr; @@ -1047,7 +1047,7 @@ sal_Bool BasicIDEShell::HasUIFeature( sal_uInt32 nFeature ) return bResult; } -void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar, BOOL bRememberAsCurrent ) +void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, sal_Bool bUpdateTabBar, sal_Bool bRememberAsCurrent ) { // Es muss ein EditWindow am Sfx gesetzt sein, sonst kommt kein // Resize, also stehen die Controls auf den Wiese... @@ -1057,7 +1057,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar, BO pModulLayout->Show(); AdjustPosSizePixel( Point( 0, 0 ), GetViewFrame()->GetWindow().GetOutputSizePixel() ); SetWindow( pModulLayout ); - EnableScrollbars( FALSE ); + EnableScrollbars( sal_False ); aVScrollBar.Hide(); } @@ -1099,7 +1099,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar, BO BasicIDEData* pData = IDE_DLL()->GetExtraData(); if ( pData ) { - USHORT nCurrentType = pCurWin->IsA( TYPE( ModulWindow ) ) ? BASICIDE_TYPE_MODULE : BASICIDE_TYPE_DIALOG; + sal_uInt16 nCurrentType = pCurWin->IsA( TYPE( ModulWindow ) ) ? BASICIDE_TYPE_MODULE : BASICIDE_TYPE_DIALOG; LibInfoItem* pLibInfoItem = new LibInfoItem( pCurWin->GetDocument(), pCurWin->GetLibName(), pCurWin->GetName(), nCurrentType ); pData->GetLibInfos().InsertInfo( pLibInfoItem ); } @@ -1124,10 +1124,10 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar, BO } if ( bUpdateTabBar ) { - ULONG nKey = aIDEWindowTable.GetKey( pCurWin ); - if ( pCurWin && ( pTabBar->GetPagePos( (USHORT)nKey ) == TAB_PAGE_NOTFOUND ) ) - pTabBar->InsertPage( (USHORT)nKey, pCurWin->GetTitle() ); // wurde neu eingeblendet - pTabBar->SetCurPageId( (USHORT)nKey ); + sal_uLong nKey = aIDEWindowTable.GetKey( pCurWin ); + if ( pCurWin && ( pTabBar->GetPagePos( (sal_uInt16)nKey ) == TAB_PAGE_NOTFOUND ) ) + pTabBar->InsertPage( (sal_uInt16)nKey, pCurWin->GetTitle() ); // wurde neu eingeblendet + pTabBar->SetCurPageId( (sal_uInt16)nKey ); } if ( pCurWin && pCurWin->IsSuspended() ) // Wenn das Fenster im Fehlerfall angezeigt wird... pCurWin->SetStatus( pCurWin->GetStatus() & ~BASWIN_SUSPENDED ); @@ -1145,7 +1145,7 @@ void BasicIDEShell::SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar, BO } SetUndoManager( pCurWin ? pCurWin->GetUndoManager() : 0 ); InvalidateBasicIDESlots(); - EnableScrollbars( pCurWin ? TRUE : FALSE ); + EnableScrollbars( pCurWin ? sal_True : sal_False ); if ( m_pCurLocalizationMgr ) m_pCurLocalizationMgr->handleTranslationbar(); @@ -1205,7 +1205,7 @@ IDEBaseWindow* BasicIDEShell::FindApplicationWindow() return FindWindow( ScriptDocument::getApplicationScriptDocument() ); } -IDEBaseWindow* BasicIDEShell::FindWindow( const ScriptDocument& rDocument, const String& rLibName, const String& rName, USHORT nType, BOOL bFindSuspended ) +IDEBaseWindow* BasicIDEShell::FindWindow( const ScriptDocument& rDocument, const String& rLibName, const String& rName, sal_uInt16 nType, sal_Bool bFindSuspended ) { IDEBaseWindow* pWin = aIDEWindowTable.First(); while ( pWin ) @@ -1244,8 +1244,8 @@ long BasicIDEShell::CallBasicBreakHdl( StarBASIC* pBasic ) ModulWindow* pModWin = ShowActiveModuleWindow( pBasic ); if ( pModWin ) { - BOOL bAppWindowDisabled, bDispatcherLocked; - USHORT nWaitCount; + sal_Bool bAppWindowDisabled, bDispatcherLocked; + sal_uInt16 nWaitCount; SfxUInt16Item *pSWActionCount, *pSWLockViewCount; BasicIDE::BasicStopped( &bAppWindowDisabled, &bDispatcherLocked, &nWaitCount, &pSWActionCount, &pSWLockViewCount ); @@ -1255,15 +1255,15 @@ long BasicIDEShell::CallBasicBreakHdl( StarBASIC* pBasic ) if ( StarBASIC::IsRunning() ) // Falls abgebrochen... { if ( bAppWindowDisabled ) - Application::GetDefDialogParent()->Enable( FALSE ); + Application::GetDefDialogParent()->Enable( sal_False ); /* if ( bDispatcherLocked ) - SFX_APP()->LockDispatcher( TRUE ); + SFX_APP()->LockDispatcher( sal_True ); */ if ( nWaitCount ) { BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); - for ( USHORT n = 0; n < nWaitCount; n++ ) + for ( sal_uInt16 n = 0; n < nWaitCount; n++ ) pIDEShell->GetViewFrame()->GetWindow().EnterWait(); } } @@ -1294,15 +1294,15 @@ ModulWindow* BasicIDEShell::ShowActiveModuleWindow( StarBASIC* pBasic ) { ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); String aLibName = pLib->GetName(); - pWin = FindBasWin( aDocument, aLibName, pActiveModule->GetName(), TRUE ); + pWin = FindBasWin( aDocument, aLibName, pActiveModule->GetName(), sal_True ); DBG_ASSERT( pWin, "Error/Step-Hdl: Fenster wurde nicht erzeugt/gefunden!" ); SetCurLib( aDocument, aLibName ); - SetCurWindow( pWin, TRUE ); + SetCurWindow( pWin, sal_True ); } } BasicManager* pBasicMgr = BasicIDE::FindBasicManager( pBasic ); if ( pBasicMgr ) - StartListening( *pBasicMgr, TRUE /* Nur einmal anmelden */ ); + StartListening( *pBasicMgr, sal_True /* Nur einmal anmelden */ ); return pWin; } return 0; @@ -1358,7 +1358,7 @@ Reference< XModel > BasicIDEShell::GetCurrentDocument() const return xDocument; } -void __EXPORT BasicIDEShell::Activate( BOOL bMDI ) +void __EXPORT BasicIDEShell::Activate( sal_Bool bMDI ) { SfxViewShell::Activate( bMDI ); @@ -1367,13 +1367,13 @@ void __EXPORT BasicIDEShell::Activate( BOOL bMDI ) if( pCurWin && pCurWin->IsA( TYPE( DialogWindow ) ) ) ((DialogWindow*)pCurWin)->UpdateBrowser(); - ShowObjectDialog( TRUE, FALSE ); + ShowObjectDialog( sal_True, sal_False ); } } -void __EXPORT BasicIDEShell::Deactivate( BOOL bMDI ) +void __EXPORT BasicIDEShell::Deactivate( sal_Bool bMDI ) { - // bMDI TRUE heisst, dass ein anderes MDI aktiviert wurde, bei einem + // bMDI sal_True heisst, dass ein anderes MDI aktiviert wurde, bei einem // Deactivate durch eine MessageBox ist bMDI FALSE if ( bMDI ) { @@ -1387,30 +1387,30 @@ void __EXPORT BasicIDEShell::Deactivate( BOOL bMDI ) // CanClose pruefen, damit auch beim deaktivieren der BasicIDE geprueft wird, // ob in einem Modul der Sourcecode zu gross ist... - for ( ULONG nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ ) + for ( sal_uLong nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ ) { IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin ); if ( /* !pWin->IsSuspended() && */ !pWin->CanClose() ) { if ( m_aCurLibName.Len() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) ) SetCurLib( ScriptDocument::getApplicationScriptDocument(), String(), false ); - SetCurWindow( pWin, TRUE ); + SetCurWindow( pWin, sal_True ); break; } } - ShowObjectDialog( FALSE, FALSE ); + ShowObjectDialog( sal_False, sal_False ); } } IMPL_LINK( BasicIDEShell, AccelSelectHdl, Accelerator*, pAccel ) { - BOOL bDone = TRUE; + sal_Bool bDone = sal_True; SfxViewFrame* pViewFrame = GetViewFrame(); SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL; if( !pDispatcher ) - return FALSE; + return sal_False; switch ( pAccel->GetCurKeyCode().GetCode() ) { case KEY_F5: @@ -1434,7 +1434,7 @@ IMPL_LINK( BasicIDEShell, AccelSelectHdl, Accelerator*, pAccel ) else pDispatcher->Execute( SID_BASICIDE_TOGGLEBRKPNT, SFX_CALLMODE_SYNCHRON ); break; - default: bDone = FALSE; + default: bDone = sal_False; } return bDone; } diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx index 3a3a162f5b5e..a5ee2a0aba19 100644 --- a/basctl/source/basicide/basides2.cxx +++ b/basctl/source/basicide/basides2.cxx @@ -61,7 +61,7 @@ namespace css = ::com::sun::star; IMPL_LINK_INLINE_START( BasicIDEShell, ObjectDialogCancelHdl, ObjectCatalog *, EMPTYARG ) { - ShowObjectDialog( FALSE, TRUE ); + ShowObjectDialog( sal_False, sal_True ); return 0; } IMPL_LINK_INLINE_END( BasicIDEShell, ObjectDialogCancelHdl, ObjectCatalog *, EMPTYARG ) @@ -90,11 +90,11 @@ Reference< view::XRenderable > BasicIDEShell::GetRenderable() } #if 0 -USHORT __EXPORT BasicIDEShell::Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog ) +sal_uInt16 __EXPORT BasicIDEShell::Print( SfxProgress &rProgress, sal_Bool bIsAPI, PrintDialog *pPrintDialog ) { if ( pCurWin ) { - SfxPrinter* pPrinter = GetPrinter( TRUE ); + SfxPrinter* pPrinter = GetPrinter( sal_True ); if ( pPrinter ) { SfxViewShell::Print( rProgress, bIsAPI, pPrintDialog ); @@ -105,19 +105,19 @@ USHORT __EXPORT BasicIDEShell::Print( SfxProgress &rProgress, BOOL bIsAPI, Print } #endif -BOOL BasicIDEShell::HasSelection( BOOL /* bText */ ) const +sal_Bool BasicIDEShell::HasSelection( sal_Bool /* bText */ ) const { - BOOL bSel = FALSE; + sal_Bool bSel = sal_False; if ( pCurWin && pCurWin->ISA( ModulWindow ) ) { TextView* pEditView = ((ModulWindow*)pCurWin)->GetEditView(); if ( pEditView && pEditView->HasSelection() ) - bSel = TRUE; + bSel = sal_True; } return bSel; } -String BasicIDEShell::GetSelectionText( BOOL bWholeWord ) +String BasicIDEShell::GetSelectionText( sal_Bool bWholeWord ) { String aText; if ( pCurWin && pCurWin->ISA( ModulWindow ) ) @@ -143,7 +143,7 @@ String BasicIDEShell::GetSelectionText( BOOL bWholeWord ) return aText; } -SfxPrinter* __EXPORT BasicIDEShell::GetPrinter( BOOL bCreate ) +SfxPrinter* __EXPORT BasicIDEShell::GetPrinter( sal_Bool bCreate ) { if ( pCurWin ) // && pCurWin->ISA( ModulWindow ) ) { @@ -154,7 +154,7 @@ SfxPrinter* __EXPORT BasicIDEShell::GetPrinter( BOOL bCreate ) return 0; } -USHORT __EXPORT BasicIDEShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool ) +sal_uInt16 __EXPORT BasicIDEShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool ) { (void)nDiffFlags; BasicDocShell* pDocShell = (BasicDocShell*)GetViewFrame()->GetObjectShell(); @@ -194,7 +194,7 @@ void BasicIDEShell::SetMDITitle() if ( pShell && aTitle != pShell->GetTitle( SFX_TITLE_CAPTION ) ) { pShell->SetTitle( aTitle ); - pShell->SetModified( FALSE ); + pShell->SetModified( sal_False ); } css::uno::Reference< css::frame::XController > xController = GetController (); @@ -227,9 +227,9 @@ void BasicIDEShell::CreateModulWindowLayout() ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName ) { - bCreatingWindow = TRUE; + bCreatingWindow = sal_True; - ULONG nKey = 0; + sal_uLong nKey = 0; ModulWindow* pWin = 0; String aLibName( rLibName ); @@ -244,7 +244,7 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const aModName = rDocument.createObjectName( E_SCRIPTS, aLibName ); // Vielleicht gibt es ein suspendiertes? - pWin = FindBasWin( rDocument, aLibName, aModName, FALSE, TRUE ); + pWin = FindBasWin( rDocument, aLibName, aModName, sal_False, sal_True ); if ( !pWin ) { @@ -253,11 +253,11 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const if ( rDocument.hasModule( aLibName, aModName ) ) bSuccess = rDocument.getModule( aLibName, aModName, aModule ); else - bSuccess = rDocument.createModule( aLibName, aModName, TRUE, aModule ); + bSuccess = rDocument.createModule( aLibName, aModName, sal_True, aModule ); if ( bSuccess ) { - pWin = FindBasWin( rDocument, aLibName, aModName, FALSE, TRUE ); + pWin = FindBasWin( rDocument, aLibName, aModName, sal_False, sal_True ); if( !pWin ) { // new module window @@ -291,17 +291,17 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const aModName.AppendAscii(" (").Append(sObjName).AppendAscii(")"); } } - pTabBar->InsertPage( (USHORT)nKey, aModName ); + pTabBar->InsertPage( (sal_uInt16)nKey, aModName ); pTabBar->Sort(); pWin->GrabScrollBars( &aHScrollBar, &aVScrollBar ); if ( !pCurWin ) - SetCurWindow( pWin, FALSE, FALSE ); + SetCurWindow( pWin, sal_False, sal_False ); - bCreatingWindow = FALSE; + bCreatingWindow = sal_False; return pWin; } -ModulWindow* BasicIDEShell::FindBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, BOOL bCreateIfNotExist, BOOL bFindSuspended ) +ModulWindow* BasicIDEShell::FindBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended ) { ModulWindow* pModWin = 0; IDEBaseWindow* pWin = aIDEWindowTable.First(); @@ -331,7 +331,7 @@ void __EXPORT BasicIDEShell::Move() void __EXPORT BasicIDEShell::ShowCursor( FASTBOOL bOn ) { if ( pCurWin && pCurWin->ISA( ModulWindow ) ) - ((ModulWindow*)pCurWin)->ShowCursor( (BOOL)bOn ); + ((ModulWindow*)pCurWin)->ShowCursor( (sal_Bool)bOn ); } // Hack for #101048 diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx index 22fbdc4a9c7b..e3b072f905cd 100644 --- a/basctl/source/basicide/basides3.cxx +++ b/basctl/source/basicide/basides3.cxx @@ -57,9 +57,9 @@ using namespace ::com::sun::star::io; DialogWindow* BasicIDEShell::CreateDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName ) { - bCreatingWindow = TRUE; + bCreatingWindow = sal_True; - ULONG nKey = 0; + sal_uLong nKey = 0; DialogWindow* pWin = 0; String aLibName( rLibName ); String aDlgName( rDlgName ); @@ -73,7 +73,7 @@ DialogWindow* BasicIDEShell::CreateDlgWin( const ScriptDocument& rDocument, cons aDlgName = rDocument.createObjectName( E_DIALOGS, aLibName ); // Vielleicht gibt es ein suspendiertes? - pWin = FindDlgWin( rDocument, aLibName, aDlgName, FALSE, TRUE ); + pWin = FindDlgWin( rDocument, aLibName, aDlgName, sal_False, sal_True ); if ( !pWin ) { @@ -125,17 +125,17 @@ DialogWindow* BasicIDEShell::CreateDlgWin( const ScriptDocument& rDocument, cons if( pWin ) { pWin->GrabScrollBars( &aHScrollBar, &aVScrollBar ); - pTabBar->InsertPage( (USHORT)nKey, aDlgName ); + pTabBar->InsertPage( (sal_uInt16)nKey, aDlgName ); pTabBar->Sort(); if ( !pCurWin ) - SetCurWindow( pWin, FALSE, FALSE ); + SetCurWindow( pWin, sal_False, sal_False ); } - bCreatingWindow = FALSE; + bCreatingWindow = sal_False; return pWin; } -DialogWindow* BasicIDEShell::FindDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName, BOOL bCreateIfNotExist, BOOL bFindSuspended ) +DialogWindow* BasicIDEShell::FindDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended ) { DialogWindow* pDlgWin = 0; IDEBaseWindow* pWin = aIDEWindowTable.First(); diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 0af7b9dda920..2786aa3311be 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -106,7 +106,7 @@ public: { try { - uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, FALSE ), uno::UNO_QUERY ); + uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, sal_False ), uno::UNO_QUERY ); if ( xContainer.is() ) { uno::Reference< container::XContainerListener > xContainerListener( this ); @@ -119,7 +119,7 @@ public: { try { - uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, FALSE ), uno::UNO_QUERY ); + uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, sal_False ), uno::UNO_QUERY ); if ( xContainer.is() ) { uno::Reference< container::XContainerListener > xContainerListener( this ); @@ -137,7 +137,7 @@ public: { rtl::OUString sModuleName; if( mpShell && ( Event.Accessor >>= sModuleName ) ) - mpShell->FindBasWin( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, TRUE, FALSE ); + mpShell->FindBasWin( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, sal_True, sal_False ); } virtual void SAL_CALL elementReplaced( const container::ContainerEvent& ) throw( com::sun::star::uno::RuntimeException ) { } virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event ) throw( com::sun::star::uno::RuntimeException ) @@ -145,9 +145,9 @@ public: rtl::OUString sModuleName; if( mpShell && ( Event.Accessor >>= sModuleName ) ) { - IDEBaseWindow* pWin = mpShell->FindWindow( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, BASICIDE_TYPE_MODULE, TRUE ); + IDEBaseWindow* pWin = mpShell->FindWindow( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, BASICIDE_TYPE_MODULE, sal_True ); if( pWin ) - mpShell->RemoveWindow( pWin, TRUE, TRUE ); + mpShell->RemoveWindow( pWin, sal_True, sal_True ); } } @@ -184,7 +184,7 @@ BasicIDEShell::BasicIDEShell( SfxViewFrame* pFrame_, SfxViewShell* /* pOldShell aHScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_HSCROLL | WB_DRAG ) ), aVScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_VSCROLL | WB_DRAG ) ), aScrollBarBox( &GetViewFrame()->GetWindow(), WinBits( WB_SIZEABLE ) ), - m_bAppBasicModified( FALSE ), + m_bAppBasicModified( sal_False ), m_aNotifier( *this ) { m_xLibListener = new ContainerListenerImpl( this ); @@ -205,13 +205,11 @@ void BasicIDEShell::Init() SvxSearchDialogWrapper::RegisterChildWindow( sal_False ); - IDE_DLL()->GetExtraData()->ShellInCriticalSection() = TRUE; + IDE_DLL()->GetExtraData()->ShellInCriticalSection() = sal_True; SetName( String( RTL_CONSTASCII_USTRINGPARAM( "BasicIDE" ) ) ); SetHelpId( SVX_INTERFACE_BASIDE_VIEWSH ); - SFX_APP()->EnterBasicCall(); - LibBoxControl::RegisterControl( SID_BASICIDE_LIBSELECTOR ); LanguageBoxControl::RegisterControl( SID_BASICIDE_CURRENT_LANG ); @@ -222,13 +220,13 @@ void BasicIDEShell::Init() pCurWin = 0; m_aCurDocument = ScriptDocument::getApplicationScriptDocument(); pObjectCatalog = 0; - bCreatingWindow = FALSE; + bCreatingWindow = sal_False; m_pCurLocalizationMgr = NULL; pTabBar = new BasicIDETabBar( &GetViewFrame()->GetWindow() ); pTabBar->SetSplitHdl( LINK( this, BasicIDEShell, TabBarSplitHdl ) ); - bTabBarSplitted = FALSE; + bTabBarSplitted = sal_False; nCurKey = 100; InitScrollBars(); @@ -239,7 +237,7 @@ void BasicIDEShell::Init() if ( IDE_DLL() && IDE_DLL()->pShell == NULL ) IDE_DLL()->pShell = this; - IDE_DLL()->GetExtraData()->ShellInCriticalSection() = FALSE; + IDE_DLL()->GetExtraData()->ShellInCriticalSection() = sal_False; // It's enough to create the controller ... // It will be public by using magic :-) @@ -261,7 +259,7 @@ __EXPORT BasicIDEShell::~BasicIDEShell() // Damit bei einem Basic-Fehler beim Speichern die Shell nicht sofort // wieder hoch kommt: - IDE_DLL()->GetExtraData()->ShellInCriticalSection() = TRUE; + IDE_DLL()->GetExtraData()->ShellInCriticalSection() = sal_True; SetWindow( 0 ); SetCurWindow( 0 ); @@ -289,8 +287,7 @@ __EXPORT BasicIDEShell::~BasicIDEShell() // ObjSh loslaesst. Es wusste auch keiner mehr wozu das gut war. // GetViewFrame()->GetObjectShell()->Broadcast( SfxSimpleHint( SFX_HINT_DYING ) ); - SFX_APP()->LeaveBasicCall(); - IDE_DLL()->GetExtraData()->ShellInCriticalSection() = FALSE; + IDE_DLL()->GetExtraData()->ShellInCriticalSection() = sal_False; GnBasicIDEShellCount--; } @@ -334,7 +331,7 @@ void BasicIDEShell::onDocumentClosed( const ScriptDocument& _rDocument ) bool bSetCurLib = ( _rDocument == m_aCurDocument ); // remove all windows which belong to this document - for ( ULONG nWin = aIDEWindowTable.Count(); nWin; ) + for ( sal_uLong nWin = aIDEWindowTable.Count(); nWin; ) { IDEBaseWindow* pWin = aIDEWindowTable.GetObject( --nWin ); if ( pWin->IsDocument( _rDocument ) ) @@ -352,7 +349,7 @@ void BasicIDEShell::onDocumentClosed( const ScriptDocument& _rDocument ) pWin->StoreData(); if ( pWin == pCurWin ) bSetCurWindow = true; - RemoveWindow( pWin, TRUE, FALSE ); + RemoveWindow( pWin, sal_True, sal_False ); } } } @@ -365,20 +362,20 @@ void BasicIDEShell::onDocumentClosed( const ScriptDocument& _rDocument ) if ( bSetCurLib ) SetCurLib( ScriptDocument::getApplicationScriptDocument(), String::CreateFromAscii( "Standard" ), true, false ); else if ( bSetCurWindow ) - SetCurWindow( FindApplicationWindow(), TRUE ); + SetCurWindow( FindApplicationWindow(), sal_True ); } void BasicIDEShell::onDocumentTitleChanged( const ScriptDocument& /*_rDocument*/ ) { SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if ( pBindings ) - pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, TRUE, FALSE ); + pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, sal_True, sal_False ); SetMDITitle(); } void BasicIDEShell::onDocumentModeChanged( const ScriptDocument& _rDocument ) { - for ( ULONG nWin = aIDEWindowTable.Count(); nWin; ) + for ( sal_uLong nWin = aIDEWindowTable.Count(); nWin; ) { IDEBaseWindow* pWin = aIDEWindowTable.GetObject( --nWin ); if ( pWin->IsDocument( _rDocument ) && _rDocument.isDocument() ) @@ -386,9 +383,9 @@ void BasicIDEShell::onDocumentModeChanged( const ScriptDocument& _rDocument ) } } -void BasicIDEShell::StoreAllWindowData( BOOL bPersistent ) +void BasicIDEShell::StoreAllWindowData( sal_Bool bPersistent ) { - for ( ULONG nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ ) + for ( sal_uLong nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ ) { IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin ); DBG_ASSERT( pWin, "PrepareClose: NULL-Pointer in Table?" ); @@ -399,7 +396,7 @@ void BasicIDEShell::StoreAllWindowData( BOOL bPersistent ) if ( bPersistent ) { SFX_APP()->SaveBasicAndDialogContainer(); - SetAppBasicModified( FALSE ); + SetAppBasicModified( sal_False ); SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if ( pBindings ) @@ -411,12 +408,12 @@ void BasicIDEShell::StoreAllWindowData( BOOL bPersistent ) } -USHORT __EXPORT BasicIDEShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) +sal_uInt16 __EXPORT BasicIDEShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) { (void)bForBrowsing; // da es nach Drucken etc. (DocInfo) modifiziert ist, hier resetten - GetViewFrame()->GetObjectShell()->SetModified(FALSE); + GetViewFrame()->GetObjectShell()->SetModified(sal_False); if ( StarBASIC::IsRunning() ) { @@ -426,28 +423,28 @@ USHORT __EXPORT BasicIDEShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) Window *pParent = &GetViewFrame()->GetWindow(); InfoBox( pParent, aErrorStr ).Execute(); } - return FALSE; + return sal_False; } else { // Hier unguenstig, wird zweimal gerufen... // StoreAllWindowData(); - BOOL bCanClose = TRUE; - for ( ULONG nWin = 0; bCanClose && ( nWin < aIDEWindowTable.Count() ); nWin++ ) + sal_Bool bCanClose = sal_True; + for ( sal_uLong nWin = 0; bCanClose && ( nWin < aIDEWindowTable.Count() ); nWin++ ) { IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin ); if ( /* !pWin->IsSuspended() && */ !pWin->CanClose() ) { if ( m_aCurLibName.Len() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) ) SetCurLib( ScriptDocument::getApplicationScriptDocument(), String(), false ); - SetCurWindow( pWin, TRUE ); - bCanClose = FALSE; + SetCurWindow( pWin, sal_True ); + bCanClose = sal_False; } } if ( bCanClose ) - StoreAllWindowData( FALSE ); // Nicht auf Platte schreiben, das passiert am Ende automatisch + StoreAllWindowData( sal_False ); // Nicht auf Platte schreiben, das passiert am Ende automatisch return bCanClose; } @@ -493,7 +490,7 @@ void __EXPORT BasicIDEShell::OuterResizePixel( const Point &rPos, const Size &rS IMPL_LINK_INLINE_START( BasicIDEShell, TabBarSplitHdl, TabBar *, pTBar ) { (void)pTBar; - bTabBarSplitted = TRUE; + bTabBarSplitted = sal_True; ArrangeTabBar(); return 0; @@ -504,7 +501,7 @@ IMPL_LINK_INLINE_END( BasicIDEShell, TabBarSplitHdl, TabBar *, pTBar ) IMPL_LINK( BasicIDEShell, TabBarHdl, TabBar *, pCurTabBar ) { - USHORT nCurId = pCurTabBar->GetCurPageId(); + sal_uInt16 nCurId = pCurTabBar->GetCurPageId(); IDEBaseWindow* pWin = aIDEWindowTable.Get( nCurId ); DBG_ASSERT( pWin, "Eintrag in TabBar passt zu keinem Fenster!" ); SetCurWindow( pWin ); @@ -514,10 +511,10 @@ IMPL_LINK( BasicIDEShell, TabBarHdl, TabBar *, pCurTabBar ) -BOOL BasicIDEShell::NextPage( BOOL bPrev ) +sal_Bool BasicIDEShell::NextPage( sal_Bool bPrev ) { - BOOL bRet = FALSE; - USHORT nPos = pTabBar->GetPagePos( pTabBar->GetCurPageId() ); + sal_Bool bRet = sal_False; + sal_uInt16 nPos = pTabBar->GetPagePos( pTabBar->GetCurPageId() ); if ( bPrev ) --nPos; @@ -527,8 +524,8 @@ BOOL BasicIDEShell::NextPage( BOOL bPrev ) if ( nPos < pTabBar->GetPageCount() ) { IDEBaseWindow* pWin = aIDEWindowTable.Get( pTabBar->GetPageId( nPos ) ); - SetCurWindow( pWin, TRUE ); - bRet = TRUE; + SetCurWindow( pWin, sal_True ); + bRet = sal_True; } return bRet; @@ -554,9 +551,9 @@ void BasicIDEShell::ArrangeTabBar() -SfxUndoManager* BasicIDEShell::GetUndoManager() +::svl::IUndoManager* BasicIDEShell::GetUndoManager() { - SfxUndoManager* pMgr = NULL; + ::svl::IUndoManager* pMgr = NULL; if( pCurWin ) pMgr = pCurWin->GetUndoManager(); @@ -565,7 +562,7 @@ SfxUndoManager* BasicIDEShell::GetUndoManager() -void BasicIDEShell::ShowObjectDialog( BOOL bShow, BOOL bCreateOrDestroy ) +void BasicIDEShell::ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy ) { if ( bShow ) { @@ -620,7 +617,7 @@ void __EXPORT BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&, { case SFX_HINT_DYING: { - EndListening( rBC, TRUE /* Alle abmelden */ ); + EndListening( rBC, sal_True /* Alle abmelden */ ); if ( pObjectCatalog ) pObjectCatalog->UpdateEntries(); } @@ -630,7 +627,7 @@ void __EXPORT BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&, if ( rHint.IsA( TYPE( SbxHint ) ) ) { SbxHint& rSbxHint = (SbxHint&)rHint; - ULONG nHintId = rSbxHint.GetId(); + sal_uLong nHintId = rSbxHint.GetId(); if ( ( nHintId == SBX_HINT_BASICSTART ) || ( nHintId == SBX_HINT_BASICSTOP ) ) { @@ -692,42 +689,42 @@ void __EXPORT BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&, void BasicIDEShell::CheckWindows() { - BOOL bSetCurWindow = FALSE; - for ( ULONG nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ ) + sal_Bool bSetCurWindow = sal_False; + for ( sal_uLong nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ ) { IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin ); if ( pWin->GetStatus() & BASWIN_TOBEKILLED ) { pWin->StoreData(); if ( pWin == pCurWin ) - bSetCurWindow = TRUE; - RemoveWindow( pWin, TRUE, FALSE ); + bSetCurWindow = sal_True; + RemoveWindow( pWin, sal_True, sal_False ); nWin--; } } if ( bSetCurWindow ) - SetCurWindow( FindApplicationWindow(), TRUE ); + SetCurWindow( FindApplicationWindow(), sal_True ); } -void BasicIDEShell::RemoveWindows( const ScriptDocument& rDocument, const String& rLibName, BOOL bDestroy ) +void BasicIDEShell::RemoveWindows( const ScriptDocument& rDocument, const String& rLibName, sal_Bool bDestroy ) { - BOOL bChangeCurWindow = pCurWin ? FALSE : TRUE; - for ( ULONG nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ ) + sal_Bool bChangeCurWindow = pCurWin ? sal_False : sal_True; + for ( sal_uLong nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ ) { IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin ); if ( pWin->IsDocument( rDocument ) && pWin->GetLibName() == rLibName ) { if ( pWin == pCurWin ) - bChangeCurWindow = TRUE; + bChangeCurWindow = sal_True; pWin->StoreData(); - RemoveWindow( pWin, bDestroy, FALSE ); + RemoveWindow( pWin, bDestroy, sal_False ); nWin--; } } if ( bChangeCurWindow ) - SetCurWindow( FindApplicationWindow(), TRUE ); + SetCurWindow( FindApplicationWindow(), sal_True ); } @@ -735,16 +732,16 @@ void BasicIDEShell::RemoveWindows( const ScriptDocument& rDocument, const String void BasicIDEShell::UpdateWindows() { // Alle Fenster, die nicht angezeigt werden duerfen, entfernen - BOOL bChangeCurWindow = pCurWin ? FALSE : TRUE; + sal_Bool bChangeCurWindow = pCurWin ? sal_False : sal_True; if ( m_aCurLibName.Len() ) { - for ( ULONG nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ ) + for ( sal_uLong nWin = 0; nWin < aIDEWindowTable.Count(); nWin++ ) { IDEBaseWindow* pWin = aIDEWindowTable.GetObject( nWin ); if ( !pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) { if ( pWin == pCurWin ) - bChangeCurWindow = TRUE; + bChangeCurWindow = sal_True; pWin->StoreData(); // Die Abfrage auf RUNNING verhindert den Absturz, wenn in Reschedule. // Fenster bleibt erstmal stehen, spaeter sowieso mal umstellen, @@ -752,7 +749,7 @@ void BasicIDEShell::UpdateWindows() // geloescht. if ( !(pWin->GetStatus() & ( BASWIN_TOBEKILLED | BASWIN_RUNNINGBASIC | BASWIN_SUSPENDED ) ) ) { - RemoveWindow( pWin, FALSE, FALSE ); + RemoveWindow( pWin, sal_False, sal_False ); nWin--; } } @@ -771,7 +768,7 @@ void BasicIDEShell::UpdateWindows() ++doc ) { - StartListening( *doc->getBasicManager(), TRUE /* Nur einmal anmelden */ ); + StartListening( *doc->getBasicManager(), sal_True /* Nur einmal anmelden */ ); // libraries Sequence< ::rtl::OUString > aLibNames( doc->getLibraryNames() ); @@ -785,14 +782,14 @@ void BasicIDEShell::UpdateWindows() if ( !m_aCurLibName.Len() || ( *doc == m_aCurDocument && aLibName == m_aCurLibName ) ) { // check, if library is password protected and not verified - BOOL bProtected = FALSE; + sal_Bool bProtected = sal_False; Reference< script::XLibraryContainer > xModLibContainer( doc->getLibraryContainer( E_SCRIPTS ) ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) ) { Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) ) { - bProtected = TRUE; + bProtected = sal_True; } } @@ -819,7 +816,7 @@ void BasicIDEShell::UpdateWindows() for ( sal_Int32 j = 0 ; j < nModCount ; j++ ) { String aModName = pModNames[ j ]; - ModulWindow* pWin = FindBasWin( *doc, aLibName, aModName, FALSE ); + ModulWindow* pWin = FindBasWin( *doc, aLibName, aModName, sal_False ); if ( !pWin ) pWin = CreateBasWin( *doc, aLibName, aModName ); if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aModName && @@ -850,7 +847,7 @@ void BasicIDEShell::UpdateWindows() String aDlgName = pDlgNames[ j ]; // this find only looks for non-suspended windows; // suspended windows are handled in CreateDlgWin - DialogWindow* pWin = FindDlgWin( *doc, aLibName, aDlgName, FALSE ); + DialogWindow* pWin = FindDlgWin( *doc, aLibName, aDlgName, sal_False ); if ( !pWin ) pWin = CreateDlgWin( *doc, aLibName, aDlgName ); if ( !pNextActiveWindow && pLibInfoItem && pLibInfoItem->GetCurrentName() == aDlgName && @@ -874,22 +871,22 @@ void BasicIDEShell::UpdateWindows() { if ( !pNextActiveWindow ) pNextActiveWindow = FindApplicationWindow(); - SetCurWindow( pNextActiveWindow, TRUE ); + SetCurWindow( pNextActiveWindow, sal_True ); } } -void BasicIDEShell::RemoveWindow( IDEBaseWindow* pWindow_, BOOL bDestroy, BOOL bAllowChangeCurWindow ) +void BasicIDEShell::RemoveWindow( IDEBaseWindow* pWindow_, sal_Bool bDestroy, sal_Bool bAllowChangeCurWindow ) { DBG_ASSERT( pWindow_, "Kann keinen NULL-Pointer loeschen!" ); - ULONG nKey = aIDEWindowTable.GetKey( pWindow_ ); - pTabBar->RemovePage( (USHORT)nKey ); + sal_uLong nKey = aIDEWindowTable.GetKey( pWindow_ ); + pTabBar->RemovePage( (sal_uInt16)nKey ); aIDEWindowTable.Remove( nKey ); if ( pWindow_ == pCurWin ) { if ( bAllowChangeCurWindow ) - SetCurWindow( FindApplicationWindow(), TRUE ); + SetCurWindow( FindApplicationWindow(), sal_True ); else - SetCurWindow( NULL, FALSE ); + SetCurWindow( NULL, sal_False ); } if ( bDestroy ) { @@ -932,7 +929,7 @@ void BasicIDEShell::RemoveWindow( IDEBaseWindow* pWindow_, BOOL bDestroy, BOOL b -USHORT BasicIDEShell::InsertWindowInTable( IDEBaseWindow* pNewWin ) +sal_uInt16 BasicIDEShell::InsertWindowInTable( IDEBaseWindow* pNewWin ) { // Eigentlich prueffen, nCurKey++; @@ -986,7 +983,7 @@ void BasicIDEShell::InvalidateBasicIDESlots() } } -void BasicIDEShell::EnableScrollbars( BOOL bEnable ) +void BasicIDEShell::EnableScrollbars( sal_Bool bEnable ) { if ( bEnable ) { @@ -1041,7 +1038,7 @@ void BasicIDEShell::SetCurLibForLocalization( const ScriptDocument& rDocument, S { if( aLibName.Len() ) { - Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) ); + Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) ); xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); } } @@ -1055,7 +1052,7 @@ void BasicIDEShell::SetCurLibForLocalization( const ScriptDocument& rDocument, S void BasicIDEShell::ImplStartListening( StarBASIC* pBasic ) { - StartListening( pBasic->GetBroadcaster(), TRUE /* Nur einmal anmelden */ ); + StartListening( pBasic->GetBroadcaster(), sal_True /* Nur einmal anmelden */ ); } diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 9604a8bd9933..3309d0c9ffc3 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -30,23 +30,29 @@ #include <ide_pch.hxx> -#include <vector> -#include <algorithm> -#include <basic/sbx.hxx> -#include <unotools/moduleoptions.hxx> +#include "basobj.hxx" +#include "iderdll.hxx" +#include "iderdll2.hxx" +#include "iderid.hxx" +#include "macrodlg.hxx" +#include "moduldlg.hxx" +#include "basidesh.hxx" +#include "basidesh.hrc" +#include "baside2.hxx" +#include "basicmod.hxx" +#include "basdoc.hxx" + #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <com/sun/star/document/XScriptInvocationContext.hpp> -#include <basobj.hxx> -#include <iderdll.hxx> -#include <iderdll2.hxx> -#include <iderid.hxx> -#include <macrodlg.hxx> -#include <moduldlg.hxx> -#include <basidesh.hxx> -#include <basidesh.hrc> -#include <baside2.hxx> -#include <basicmod.hxx> -#include <basdoc.hxx> + +#include <basic/sbx.hxx> +#include <framework/documentundoguard.hxx> +#include <tools/diagnose_ex.h> +#include <unotools/moduleoptions.hxx> + +#include <vector> +#include <algorithm> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -56,7 +62,7 @@ using namespace ::com::sun::star::container; //---------------------------------------------------------------------------- extern "C" { - SAL_DLLPUBLIC_EXPORT rtl_uString* basicide_choose_macro( void* pOnlyInDocument_AsXModel, BOOL bChooseOnly, rtl_uString* pMacroDesc ) + SAL_DLLPUBLIC_EXPORT rtl_uString* basicide_choose_macro( void* pOnlyInDocument_AsXModel, sal_Bool bChooseOnly, rtl_uString* pMacroDesc ) { ::rtl::OUString aMacroDesc( pMacroDesc ); Reference< frame::XModel > aDocument( static_cast< frame::XModel* >( pOnlyInDocument_AsXModel ) ); @@ -66,7 +72,7 @@ extern "C" { return pScriptURL; } - SAL_DLLPUBLIC_EXPORT void basicide_macro_organizer( INT16 nTabId ) + SAL_DLLPUBLIC_EXPORT void basicide_macro_organizer( sal_Int16 nTabId ) { OSL_TRACE("in basicide_macro_organizer"); BasicIDE::Organize( nTabId ); @@ -77,7 +83,7 @@ namespace BasicIDE { //---------------------------------------------------------------------------- -void Organize( INT16 tabId ) +void Organize( sal_Int16 tabId ) { BasicIDEDLL::Init(); @@ -98,21 +104,21 @@ void Organize( INT16 tabId ) //---------------------------------------------------------------------------- -BOOL IsValidSbxName( const String& rName ) +sal_Bool IsValidSbxName( const String& rName ) { - for ( USHORT nChar = 0; nChar < rName.Len(); nChar++ ) + for ( sal_uInt16 nChar = 0; nChar < rName.Len(); nChar++ ) { - BOOL bValid = ( ( rName.GetChar(nChar) >= 'A' && rName.GetChar(nChar) <= 'Z' ) || + sal_Bool bValid = ( ( rName.GetChar(nChar) >= 'A' && rName.GetChar(nChar) <= 'Z' ) || ( rName.GetChar(nChar) >= 'a' && rName.GetChar(nChar) <= 'z' ) || ( rName.GetChar(nChar) >= '0' && rName.GetChar(nChar) <= '9' && nChar ) || ( rName.GetChar(nChar) == '_' ) ); if ( !bValid ) - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } -static BOOL StringCompareLessThan( const String& rStr1, const String& rStr2 ) +static sal_Bool StringCompareLessThan( const String& rStr1, const String& rStr2 ) { return (rStr1.CompareIgnoreCaseToAscii( rStr2 ) == COMPARE_LESS); } @@ -191,7 +197,7 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); if ( pIDEShell ) { - IDEBaseWindow* pWin = pIDEShell->FindWindow( rDocument, rLibName, rNewName, BASICIDE_TYPE_MODULE, TRUE ); + IDEBaseWindow* pWin = pIDEShell->FindWindow( rDocument, rLibName, rNewName, BASICIDE_TYPE_MODULE, sal_True ); if ( pWin ) { // set new name in window @@ -202,7 +208,7 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const pModWin->SetSbModule( (SbModule*)pModWin->GetBasic()->FindModule( rNewName ) ); // update tabwriter - USHORT nId = (USHORT)(pIDEShell->GetIDEWindowTable()).GetKey( pWin ); + sal_uInt16 nId = (sal_uInt16)(pIDEShell->GetIDEWindowTable()).GetKey( pWin ); DBG_ASSERT( nId, "No entry in Tabbar!" ); if ( nId ) { @@ -216,22 +222,66 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const return true; } + +//---------------------------------------------------------------------------- + +namespace +{ + struct MacroExecutionData + { + ScriptDocument aDocument; + SbMethodRef xMethod; + + MacroExecutionData() + :aDocument( ScriptDocument::NoDocument ) + ,xMethod( NULL ) + { + } + }; + + class MacroExecution + { + public: + DECL_STATIC_LINK( MacroExecution, ExecuteMacroEvent, MacroExecutionData* ); + }; + + + IMPL_STATIC_LINK( MacroExecution, ExecuteMacroEvent, MacroExecutionData*, i_pData ) + { + (void)pThis; + ENSURE_OR_RETURN( i_pData, "wrong MacroExecutionData", 0L ); + // take ownership of the data + ::std::auto_ptr< MacroExecutionData > pData( i_pData ); + + DBG_ASSERT( pData->xMethod->GetParent()->GetFlags() & SBX_EXTSEARCH, "Kein EXTSEARCH!" ); + + // in case this is a document-local macro, try to protect the document's Undo Manager from + // flawed scripts + ::std::auto_ptr< ::framework::DocumentUndoGuard > pUndoGuard; + if ( pData->aDocument.isDocument() ) + pUndoGuard.reset( new ::framework::DocumentUndoGuard( pData->aDocument.getDocument() ) ); + + BasicIDE::RunMethod( pData->xMethod ); + + return 1L; + } +} + //---------------------------------------------------------------------------- -::rtl::OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc ) +::rtl::OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, sal_Bool bChooseOnly, const ::rtl::OUString& rMacroDesc ) { (void)rMacroDesc; BasicIDEDLL::Init(); - IDE_DLL()->GetExtraData()->ChoosingMacro() = TRUE; - SFX_APP()->EnterBasicCall(); + IDE_DLL()->GetExtraData()->ChoosingMacro() = sal_True; String aScriptURL; - BOOL bError = FALSE; + sal_Bool bError = sal_False; SbMethod* pMethod = NULL; - MacroChooser* pChooser = new MacroChooser( NULL, TRUE ); + ::std::auto_ptr< MacroChooser > pChooser( new MacroChooser( NULL, sal_True ) ); if ( bChooseOnly || !SvtModuleOptions().IsBasicIDE() ) pChooser->SetMode( MACROCHOOSER_CHOOSEONLY ); @@ -241,7 +291,7 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const short nRetValue = pChooser->Execute(); - IDE_DLL()->GetExtraData()->ChoosingMacro() = FALSE; + IDE_DLL()->GetExtraData()->ChoosingMacro() = sal_False; switch ( nRetValue ) { @@ -251,103 +301,95 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const if ( !pMethod && pChooser->GetMode() == MACROCHOOSER_RECORDING ) pMethod = pChooser->CreateMacro(); - if ( pMethod ) + if ( !pMethod ) + break; + + SbModule* pModule = pMethod->GetModule(); + ENSURE_OR_BREAK( pModule, "BasicIDE::ChooseMacro: No Module found!" ); + + StarBASIC* pBasic = (StarBASIC*)pModule->GetParent(); + ENSURE_OR_BREAK( pBasic, "BasicIDE::ChooseMacro: No Basic found!" ); + + BasicManager* pBasMgr = BasicIDE::FindBasicManager( pBasic ); + ENSURE_OR_BREAK( pBasMgr, "BasicIDE::ChooseMacro: No BasicManager found!" ); + + // name + String aName; + aName += pBasic->GetName(); + aName += '.'; + aName += pModule->GetName(); + aName += '.'; + aName += pMethod->GetName(); + + // language + String aLanguage = String::CreateFromAscii("Basic"); + + // location + String aLocation; + ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); + if ( aDocument.isDocument() ) { - SbModule* pModule = pMethod->GetModule(); - DBG_ASSERT(pModule, "BasicIDE::ChooseMacro: No Module found!"); - if ( pModule ) - { - StarBASIC* pBasic = (StarBASIC*)pModule->GetParent(); - DBG_ASSERT(pBasic, "BasicIDE::ChooseMacro: No Basic found!"); - if ( pBasic ) - { - BasicManager* pBasMgr = BasicIDE::FindBasicManager( pBasic ); - DBG_ASSERT(pBasMgr, "BasicIDE::ChooseMacro: No BasicManager found!"); - if ( pBasMgr ) - { - // name - String aName; - aName += pBasic->GetName(); - aName += '.'; - aName += pModule->GetName(); - aName += '.'; - aName += pMethod->GetName(); - - // language - String aLanguage = String::CreateFromAscii("Basic"); - - // location - String aLocation; - ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); - if ( aDocument.isDocument() ) - { - // document basic - aLocation = String::CreateFromAscii("document"); - - if ( rxLimitToDocument.is() ) - { - uno::Reference< frame::XModel > xLimitToDocument( rxLimitToDocument ); - - uno::Reference< document::XEmbeddedScripts > xScripts( rxLimitToDocument, UNO_QUERY ); - if ( !xScripts.is() ) - { // the document itself does not support embedding scripts - uno::Reference< document::XScriptInvocationContext > xContext( rxLimitToDocument, UNO_QUERY ); - if ( xContext.is() ) - xScripts = xContext->getScriptContainer(); - if ( xScripts.is() ) - { // but it is able to refer to a document which actually does support this - xLimitToDocument.set( xScripts, UNO_QUERY ); - if ( !xLimitToDocument.is() ) - { - OSL_ENSURE( false, "BasicIDE::ChooseMacro: a script container which is no document!?" ); - xLimitToDocument = rxLimitToDocument; - } - } - } - - if ( xLimitToDocument != aDocument.getDocument() ) - { - // error - bError = TRUE; - ErrorBox( NULL, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_ERRORCHOOSEMACRO ) ) ).Execute(); - } - } - } - else - { - // application basic - aLocation = String::CreateFromAscii("application"); - } + // document basic + aLocation = String::CreateFromAscii("document"); - // script URL - if ( !bError ) + if ( rxLimitToDocument.is() ) + { + uno::Reference< frame::XModel > xLimitToDocument( rxLimitToDocument ); + + uno::Reference< document::XEmbeddedScripts > xScripts( rxLimitToDocument, UNO_QUERY ); + if ( !xScripts.is() ) + { // the document itself does not support embedding scripts + uno::Reference< document::XScriptInvocationContext > xContext( rxLimitToDocument, UNO_QUERY ); + if ( xContext.is() ) + xScripts = xContext->getScriptContainer(); + if ( xScripts.is() ) + { // but it is able to refer to a document which actually does support this + xLimitToDocument.set( xScripts, UNO_QUERY ); + if ( !xLimitToDocument.is() ) { - aScriptURL = String::CreateFromAscii("vnd.sun.star.script:"); - aScriptURL += aName; - aScriptURL += String::CreateFromAscii("?language="); - aScriptURL += aLanguage; - aScriptURL += String::CreateFromAscii("&location="); - aScriptURL += aLocation; + OSL_ENSURE( false, "BasicIDE::ChooseMacro: a script container which is no document!?" ); + xLimitToDocument = rxLimitToDocument; } } } + + if ( xLimitToDocument != aDocument.getDocument() ) + { + // error + bError = sal_True; + ErrorBox( NULL, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_ERRORCHOOSEMACRO ) ) ).Execute(); + } } } + else + { + // application basic + aLocation = String::CreateFromAscii("application"); + } + + // script URL + if ( !bError ) + { + aScriptURL = String::CreateFromAscii("vnd.sun.star.script:"); + aScriptURL += aName; + aScriptURL += String::CreateFromAscii("?language="); + aScriptURL += aLanguage; + aScriptURL += String::CreateFromAscii("&location="); + aScriptURL += aLocation; + } - if ( pMethod && !rxLimitToDocument.is() ) + if ( !rxLimitToDocument.is() ) { - pMethod->AddRef(); // festhalten, bis Event abgearbeitet. - Application::PostUserEvent( LINK( IDE_DLL()->GetExtraData(), BasicIDEData, ExecuteMacroEvent ), pMethod ); + MacroExecutionData* pExecData = new MacroExecutionData; + pExecData->aDocument = aDocument; + pExecData->xMethod = pMethod; // keep alive until the event has been processed + Application::PostUserEvent( STATIC_LINK( NULL, MacroExecution, ExecuteMacroEvent ), pExecData ); } } break; } - delete pChooser; - - SFX_APP()->LeaveBasicCall(); - - return ::rtl::OUString( aScriptURL ); + return aScriptURL; } //---------------------------------------------------------------------------- @@ -363,9 +405,9 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con { SbModuleRef xModule = new SbModule( rModName ); xModule->SetSource32( aOUSource ); - USHORT nCount = xModule->GetMethods()->Count(); - USHORT nRealCount = nCount; - for ( USHORT i = 0; i < nCount; i++ ) + sal_uInt16 nCount = xModule->GetMethods()->Count(); + sal_uInt16 nRealCount = nCount; + for ( sal_uInt16 i = 0; i < nCount; i++ ) { SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i ); if( pMethod->IsHidden() ) @@ -373,8 +415,8 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con } aSeqMethods.realloc( nRealCount ); - USHORT iTarget = 0; - for ( USHORT i = 0 ; i < nCount; ++i ) + sal_uInt16 iTarget = 0; + for ( sal_uInt16 i = 0 ; i < nCount; ++i ) { SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i ); if( pMethod->IsHidden() ) @@ -389,9 +431,9 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con //---------------------------------------------------------------------------- -BOOL HasMethod( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, const String& rMethName ) +sal_Bool HasMethod( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, const String& rMethName ) { - BOOL bHasMethod = FALSE; + sal_Bool bHasMethod = sal_False; ::rtl::OUString aOUSource; if ( rDocument.hasModule( rLibName, rModName ) && rDocument.getModule( rLibName, rModName, aOUSource ) ) @@ -403,7 +445,7 @@ BOOL HasMethod( const ScriptDocument& rDocument, const String& rLibName, const S { SbMethod* pMethod = (SbMethod*)pMethods->Find( rMethName, SbxCLASS_METHOD ); if ( pMethod && !pMethod->IsHidden() ) - bHasMethod = TRUE; + bHasMethod = sal_True; } } diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx index 8d04320ec010..d9280749091d 100644 --- a/basctl/source/basicide/basobj3.cxx +++ b/basctl/source/basicide/basobj3.cxx @@ -101,16 +101,16 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName ) aMacroName = String( RTL_CONSTASCII_USTRINGPARAM( "Main" ) ); else { - BOOL bValid = FALSE; + sal_Bool bValid = sal_False; String aStdMacroText( RTL_CONSTASCII_USTRINGPARAM( "Macro" ) ); //String aStdMacroText( IDEResId( RID_STR_STDMACRONAME ) ); - USHORT nMacro = 1; + sal_uInt16 nMacro = 1; while ( !bValid ) { aMacroName = aStdMacroText; aMacroName += String::CreateFromInt32( nMacro ); // Pruefen, ob vorhanden... - bValid = pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ) ? FALSE : TRUE; + bValid = pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ) ? sal_False : sal_True; nMacro++; } } @@ -200,7 +200,7 @@ bool RenameDialog( Window* pErrorParent, const ScriptDocument& rDocument, const } BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); - IDEBaseWindow* pWin = pIDEShell ? pIDEShell->FindWindow( rDocument, rLibName, rOldName, BASICIDE_TYPE_DIALOG, FALSE ) : NULL; + IDEBaseWindow* pWin = pIDEShell ? pIDEShell->FindWindow( rDocument, rLibName, rOldName, BASICIDE_TYPE_DIALOG, sal_False ) : NULL; Reference< XNameContainer > xExistingDialog; if ( pWin ) xExistingDialog = ((DialogWindow*)pWin)->GetEditor()->GetDialog(); @@ -220,7 +220,7 @@ bool RenameDialog( Window* pErrorParent, const ScriptDocument& rDocument, const ((DialogWindow*)pWin)->UpdateBrowser(); // update tabwriter - USHORT nId = (USHORT)(pIDEShell->GetIDEWindowTable()).GetKey( pWin ); + sal_uInt16 nId = (sal_uInt16)(pIDEShell->GetIDEWindowTable()).GetKey( pWin ); DBG_ASSERT( nId, "No entry in Tabbar!" ); if ( nId ) { @@ -240,7 +240,7 @@ bool RemoveDialog( const ScriptDocument& rDocument, const String& rLibName, cons BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); if ( pIDEShell ) { - DialogWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, rLibName, rDlgName, FALSE ); + DialogWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, rLibName, rDlgName, sal_False ); if( pDlgWin ) { Reference< container::XNameContainer > xDialogModel = pDlgWin->GetDialog(); @@ -355,17 +355,17 @@ void StopBasic() //---------------------------------------------------------------------------- -void BasicStopped( BOOL* pbAppWindowDisabled, - BOOL* pbDispatcherLocked, USHORT* pnWaitCount, +void BasicStopped( sal_Bool* pbAppWindowDisabled, + sal_Bool* pbDispatcherLocked, sal_uInt16* pnWaitCount, SfxUInt16Item** ppSWActionCount, SfxUInt16Item** ppSWLockViewCount ) { // Nach einem Error oder dem expliziten abbrechen des Basics muessen // ggf. einige Locks entfernt werden... if ( pbAppWindowDisabled ) - *pbAppWindowDisabled = FALSE; + *pbAppWindowDisabled = sal_False; if ( pbDispatcherLocked ) - *pbDispatcherLocked = FALSE; + *pbDispatcherLocked = sal_False; if ( pnWaitCount ) *pnWaitCount = 0; if ( ppSWActionCount ) @@ -374,7 +374,7 @@ void BasicStopped( BOOL* pbAppWindowDisabled, *ppSWLockViewCount = 0; // AppWait ? - USHORT nWait = 0; + sal_uInt16 nWait = 0; BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); if( pIDEShell ) { @@ -388,20 +388,20 @@ void BasicStopped( BOOL* pbAppWindowDisabled, } /* - // Interactive = FALSE ? + // Interactive = sal_False ? if ( SFX_APP()->IsDispatcherLocked() ) { - SFX_APP()->LockDispatcher( FALSE ); + SFX_APP()->LockDispatcher( sal_False ); if ( pbDispatcherLocked ) - *pbDispatcherLocked = TRUE; + *pbDispatcherLocked = sal_True; } */ Window* pDefParent = Application::GetDefDialogParent(); if ( pDefParent && !pDefParent->IsEnabled() ) { - pDefParent->Enable( TRUE ); + pDefParent->Enable( sal_True ); if ( pbAppWindowDisabled ) - *pbAppWindowDisabled = TRUE; + *pbAppWindowDisabled = sal_True; } } @@ -452,7 +452,7 @@ long HandleBasicError( StarBASIC* pBasic ) BasicManager* pBasMgr = BasicIDE::FindBasicManager( pBasic ); if ( pBasMgr ) { - BOOL bProtected = FALSE; + sal_Bool bProtected = sal_False; ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); OSL_ENSURE( aDocument.isValid(), "BasicIDE::HandleBasicError: no document for the given BasicManager!" ); if ( aDocument.isValid() ) @@ -464,7 +464,7 @@ long HandleBasicError( StarBASIC* pBasic ) Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) ) { - bProtected = TRUE; + bProtected = sal_True; } } } diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 79f3cdb84c6b..356973647060 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -191,7 +191,7 @@ bool BasicEntryDescriptor::operator==( const BasicEntryDescriptor& rDesc ) const } BasicTreeListBox::BasicTreeListBox( Window* pParent, const ResId& rRes ) : - SvTreeListBox( pParent, IDEResId( sal::static_int_cast<USHORT>( rRes.GetId() ) ) ), + SvTreeListBox( pParent, IDEResId( sal::static_int_cast<sal_uInt16>( rRes.GetId() ) ) ), m_aNotifier( *this ) { SetNodeDefaultImages(); @@ -223,7 +223,7 @@ void BasicTreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocati // can be called multiple times for updating! // eigentlich prueffen, ob Basic bereits im Baum ?! - SetUpdateMode( FALSE ); + SetUpdateMode( sal_False ); // level 1: BasicManager (application, document, ...) SvLBoxEntry* pDocumentRootEntry = FindRootEntry( rDocument, eLocation ); @@ -243,7 +243,7 @@ void BasicTreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocati std::auto_ptr< BasicEntry >( new BasicDocumentEntry( rDocument, eLocation ) ) ); } - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); } void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation ) @@ -260,19 +260,19 @@ void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, con if ( eLocation == rDocument.getLibraryLocation( aLibName ) ) { // check, if the module library is loaded - BOOL bModLibLoaded = FALSE; + sal_Bool bModLibLoaded = sal_False; ::rtl::OUString aOULibName( aLibName ); Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLoaded( aOULibName ) ) - bModLibLoaded = TRUE; + bModLibLoaded = sal_True; // check, if the dialog library is loaded - BOOL bDlgLibLoaded = FALSE; + sal_Bool bDlgLibLoaded = sal_False; Reference< script::XLibraryContainer > xDlgLibContainer( rDocument.getLibraryContainer( E_DIALOGS ) ); if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryLoaded( aOULibName ) ) - bDlgLibLoaded = TRUE; + bDlgLibLoaded = sal_True; - BOOL bLoaded = bModLibLoaded || bDlgLibLoaded; + sal_Bool bLoaded = bModLibLoaded || bDlgLibLoaded; // if only one of the libraries is loaded, load also the other if ( bLoaded ) @@ -285,7 +285,7 @@ void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, con } // create tree list box entry - USHORT nId, nIdHC; + sal_uInt16 nId, nIdHC; if ( ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES ) ) { nId = bLoaded ? RID_IMG_DLGLIB : RID_IMG_DLGLIBNOTLOADED; @@ -537,7 +537,7 @@ void BasicTreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubR SvLBoxEntry* BasicTreeListBox::ImpFindEntry( SvLBoxEntry* pParent, const String& rText ) { - ULONG nRootPos = 0; + sal_uLong nRootPos = 0; SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos ); while ( pEntry ) { @@ -634,7 +634,7 @@ SvLBoxEntry* __EXPORT BasicTreeListBox::CloneEntry( SvLBoxEntry* pSource ) SvLBoxEntry* BasicTreeListBox::FindEntry( SvLBoxEntry* pParent, const String& rText, BasicEntryType eType ) { - ULONG nRootPos = 0; + sal_uLong nRootPos = 0; SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos ); while ( pEntry ) { @@ -651,7 +651,7 @@ SvLBoxEntry* BasicTreeListBox::FindEntry( SvLBoxEntry* pParent, const String& rT long BasicTreeListBox::ExpandingHdl() { // Expanding oder Collaps? - BOOL bOK = TRUE; + sal_Bool bOK = sal_True; if ( GetModel()->GetDepth( GetHdlEntry() ) == 1 ) { SvLBoxEntry* pCurEntry = GetCurEntry(); @@ -685,9 +685,9 @@ long BasicTreeListBox::ExpandingHdl() return bOK; } -BOOL BasicTreeListBox::IsEntryProtected( SvLBoxEntry* pEntry ) +sal_Bool BasicTreeListBox::IsEntryProtected( SvLBoxEntry* pEntry ) { - BOOL bProtected = FALSE; + sal_Bool bProtected = sal_False; if ( pEntry && ( GetModel()->GetDepth( pEntry ) == 1 ) ) { BasicEntryDescriptor aDesc( GetEntryDescriptor( pEntry ) ); @@ -702,7 +702,7 @@ BOOL BasicTreeListBox::IsEntryProtected( SvLBoxEntry* pEntry ) Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) ) { - bProtected = TRUE; + bProtected = sal_True; } } } @@ -788,12 +788,12 @@ void BasicTreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Ima if ( sFactoryURL.getLength() ) { rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), - FALSE /* small */, - FALSE /* normal */ ); + sal_False /* small */, + sal_False /* normal */ ); rImageHC = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), - FALSE /* small */, - TRUE /* high contrast */ ); + sal_False /* small */, + sal_True /* high contrast */ ); } else { diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx index 4b4d42f477d0..70f60bf5d784 100644 --- a/basctl/source/basicide/bastype2.hxx +++ b/basctl/source/basicide/bastype2.hxx @@ -152,7 +152,7 @@ class BasicTreeListBox :public SvTreeListBox ,public ::basctl::DocumentEventListener { private: - USHORT nMode; + sal_uInt16 nMode; ::basctl::DocumentEventNotifier m_aNotifier; void SetEntryBitmaps( SvLBoxEntry * pEntry, const Image& rImage, const Image& rImageHC ); @@ -188,10 +188,10 @@ public: void ScanAllEntries(); void UpdateEntries(); - BOOL IsEntryProtected( SvLBoxEntry* pEntry ); + sal_Bool IsEntryProtected( SvLBoxEntry* pEntry ); - void SetMode( USHORT nM ) { nMode = nM; } - USHORT GetMode() const { return nMode; } + void SetMode( sal_uInt16 nM ) { nMode = nM; } + sal_uInt16 GetMode() const { return nMode; } SbModule* FindModule( SvLBoxEntry* pEntry ); SbxVariable* FindVariable( SvLBoxEntry* pEntry ); @@ -200,7 +200,7 @@ public: BasicEntryDescriptor GetEntryDescriptor( SvLBoxEntry* pEntry ); - USHORT ConvertType( BasicEntryType eType ); + sal_uInt16 ConvertType( BasicEntryType eType ); bool IsValidEntry( SvLBoxEntry* pEntry ); SvLBoxEntry* AddEntry( const String& rText, const Image& rImage, const Image& rImageHC, diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index 77e92189507b..e57f7882d532 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -72,7 +72,7 @@ void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry ) ::rtl::OUString aOULibName( aLibName ); // check password - BOOL bOK = TRUE; + sal_Bool bOK = sal_True; Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) { @@ -87,7 +87,7 @@ void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry ) if ( bOK ) { // load module library - BOOL bModLibLoaded = FALSE; + sal_Bool bModLibLoaded = sal_False; if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) { if ( !xModLibContainer->isLibraryLoaded( aOULibName ) ) @@ -100,7 +100,7 @@ void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry ) } // load dialog library - BOOL bDlgLibLoaded = FALSE; + sal_Bool bDlgLibLoaded = sal_False; Reference< script::XLibraryContainer > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY ); if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) ) { @@ -187,7 +187,7 @@ SbxVariable* BasicTreeListBox::FindVariable( SvLBoxEntry* pEntry ) while ( pEntry ) { - USHORT nDepth = GetModel()->GetDepth( pEntry ); + sal_uInt16 nDepth = GetModel()->GetDepth( pEntry ); switch ( nDepth ) { case 4: @@ -292,7 +292,7 @@ BasicEntryDescriptor BasicTreeListBox::GetEntryDescriptor( SvLBoxEntry* pEntry ) while ( pEntry ) { - USHORT nDepth = GetModel()->GetDepth( pEntry ); + sal_uInt16 nDepth = GetModel()->GetDepth( pEntry ); switch ( nDepth ) { case 4: @@ -378,9 +378,9 @@ BasicEntryDescriptor BasicTreeListBox::GetEntryDescriptor( SvLBoxEntry* pEntry ) return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, aName, aMethodName, eType ); } -USHORT BasicTreeListBox::ConvertType( BasicEntryType eType ) +sal_uInt16 BasicTreeListBox::ConvertType( BasicEntryType eType ) { - USHORT nType = OBJ_TYPE_UNKNOWN; + sal_uInt16 nType = OBJ_TYPE_UNKNOWN; switch ( eType ) { @@ -482,7 +482,7 @@ SbModule* BasicTreeListBox::FindModule( SvLBoxEntry* pEntry ) SvLBoxEntry* BasicTreeListBox::FindRootEntry( const ScriptDocument& rDocument, LibraryLocation eLocation ) { OSL_ENSURE( rDocument.isValid(), "BasicTreeListBox::FindRootEntry: invalid document!" ); - ULONG nRootPos = 0; + sal_uLong nRootPos = 0; SvLBoxEntry* pRootEntry = GetEntry( nRootPos ); while ( pRootEntry ) { diff --git a/basctl/source/basicide/bastype4.hxx b/basctl/source/basicide/bastype4.hxx index e1b76ea1e897..90e1bb56845a 100644 --- a/basctl/source/basicide/bastype4.hxx +++ b/basctl/source/basicide/bastype4.hxx @@ -37,9 +37,9 @@ class ExtendedTabBar : public TabBar { EditEngine* pEditEngine; EditView* pEditView; - BOOL bIsInKeyInput; + sal_Bool bIsInKeyInput; #if _SOLAR__PRIVATE - void ImpCheckEditEngine( BOOL bKeepNewText ); + void ImpCheckEditEngine( sal_Bool bKeepNewText ); #endif protected: virtual void MouseButtonDown( const MouseEvent& rMEvt ); @@ -49,17 +49,17 @@ protected: virtual void KeyInput( const KeyEvent& rKEvent ); virtual void Paint( const Rectangle& ); - virtual BOOL StartRenamingTab( USHORT nCurId ); - virtual BOOL AllowRenamingTab( USHORT nCurId, const String& rNewName ); - virtual void TabRenamed( USHORT nCurId, const String& rNewName ); + virtual sal_Bool StartRenamingTab( sal_uInt16 nCurId ); + virtual sal_Bool AllowRenamingTab( sal_uInt16 nCurId, const String& rNewName ); + virtual void TabRenamed( sal_uInt16 nCurId, const String& rNewName ); public: ExtendedTabBar( Window* pParent, WinBits nStyle ); ~ExtendedTabBar(); void RenameSelectedTab(); - BOOL IsInEditMode() const { return pEditEngine ? TRUE : FALSE; } - void StopEditMode( BOOL bKeepCurText = FALSE ); + sal_Bool IsInEditMode() const { return pEditEngine ? sal_True : sal_False; } + void StopEditMode( sal_Bool bKeepCurText = sal_False ); }; #endif //_BASTYPE4_HXX diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 150e10a5a76f..9e8b1c452b9a 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -154,7 +154,7 @@ long IDEBaseWindow::Notify( NotifyEvent& rNEvt ) { KeyEvent aKEvt = *rNEvt.GetKeyEvent(); KeyCode aCode = aKEvt.GetKeyCode(); - USHORT nCode = aCode.GetCode(); + sal_uInt16 nCode = aCode.GetCode(); switch ( nCode ) { @@ -188,14 +188,14 @@ void __EXPORT IDEBaseWindow::StoreData() { } -BOOL __EXPORT IDEBaseWindow::CanClose() +sal_Bool __EXPORT IDEBaseWindow::CanClose() { - return TRUE; + return sal_True; } -BOOL __EXPORT IDEBaseWindow::AllowUndo() +sal_Bool __EXPORT IDEBaseWindow::AllowUndo() { - return TRUE; + return sal_True; } @@ -228,13 +228,13 @@ String IDEBaseWindow::CreateQualifiedName() return aName; } -void IDEBaseWindow::SetReadOnly( BOOL ) +void IDEBaseWindow::SetReadOnly( sal_Bool ) { } -BOOL IDEBaseWindow::IsReadOnly() +sal_Bool IDEBaseWindow::IsReadOnly() { - return FALSE; + return sal_False; } void __EXPORT IDEBaseWindow::BasicStarted() @@ -245,14 +245,14 @@ void __EXPORT IDEBaseWindow::BasicStopped() { } -BOOL __EXPORT IDEBaseWindow::IsModified() +sal_Bool __EXPORT IDEBaseWindow::IsModified() { - return TRUE; + return sal_True; } -BOOL __EXPORT IDEBaseWindow::IsPasteAllowed() +sal_Bool __EXPORT IDEBaseWindow::IsPasteAllowed() { - return FALSE; + return sal_False; } Window* __EXPORT IDEBaseWindow::GetLayoutWindow() @@ -260,7 +260,7 @@ Window* __EXPORT IDEBaseWindow::GetLayoutWindow() return this; } -SfxUndoManager* __EXPORT IDEBaseWindow::GetUndoManager() +::svl::IUndoManager* __EXPORT IDEBaseWindow::GetUndoManager() { return NULL; } @@ -269,9 +269,9 @@ BreakPointList::BreakPointList() {} BreakPointList::BreakPointList(BreakPointList const & rList): - BreakPL( sal::static_int_cast<USHORT>( rList.Count() )) + BreakPL( sal::static_int_cast<sal_uInt16>( rList.Count() )) { - for (ULONG i = 0; i < rList.Count(); ++i) + for (sal_uLong i = 0; i < rList.Count(); ++i) Insert(new BreakPoint(*rList.GetObject(i)), i); } @@ -289,7 +289,7 @@ void BreakPointList::reset() void BreakPointList::transfer(BreakPointList & rList) { reset(); - for (ULONG i = 0; i < rList.Count(); ++i) + for (sal_uLong i = 0; i < rList.Count(); ++i) Insert(rList.GetObject(i), i); rList.Clear(); } @@ -319,12 +319,12 @@ void BreakPointList::SetBreakPointsInBasic( SbModule* pModule ) while ( pBrk ) { if ( pBrk->bEnabled ) - pModule->SetBP( (USHORT)pBrk->nLine ); + pModule->SetBP( (sal_uInt16)pBrk->nLine ); pBrk = Next(); } } -BreakPoint* BreakPointList::FindBreakPoint( ULONG nLine ) +BreakPoint* BreakPointList::FindBreakPoint( sal_uLong nLine ) { BreakPoint* pBrk = First(); while ( pBrk ) @@ -340,18 +340,18 @@ BreakPoint* BreakPointList::FindBreakPoint( ULONG nLine ) -void BreakPointList::AdjustBreakPoints( ULONG nLine, BOOL bInserted ) +void BreakPointList::AdjustBreakPoints( sal_uLong nLine, sal_Bool bInserted ) { BreakPoint* pBrk = First(); while ( pBrk ) { - BOOL bDelBrk = FALSE; + sal_Bool bDelBrk = sal_False; if ( pBrk->nLine == nLine ) { if ( bInserted ) pBrk->nLine++; else - bDelBrk = TRUE; + bDelBrk = sal_True; } else if ( pBrk->nLine > nLine ) { @@ -363,7 +363,7 @@ void BreakPointList::AdjustBreakPoints( ULONG nLine, BOOL bInserted ) if ( bDelBrk ) { - ULONG n = GetCurPos(); + sal_uLong n = GetCurPos(); delete Remove( pBrk ); pBrk = Seek( n ); } @@ -388,7 +388,7 @@ void IDEBaseWindow::Deactivating() { } -USHORT __EXPORT IDEBaseWindow::GetSearchOptions() +sal_uInt16 __EXPORT IDEBaseWindow::GetSearchOptions() { return 0; } @@ -403,11 +403,11 @@ BasicDockingWindow::BasicDockingWindow( Window* pParent ) : -BOOL __EXPORT BasicDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) +sal_Bool __EXPORT BasicDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) { ModulWindowLayout* pLayout = (ModulWindowLayout*)GetParent(); Rectangle aTmpRec( rRect ); - BOOL bDock = IsDockingPrevented() ? FALSE : pLayout->IsToBeDocked( this, rPos, aTmpRec ); + sal_Bool bDock = IsDockingPrevented() ? sal_False : pLayout->IsToBeDocked( this, rPos, aTmpRec ); if ( bDock ) { rRect.SetSize( aTmpRec.GetSize() ); @@ -422,13 +422,13 @@ BOOL __EXPORT BasicDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) -void __EXPORT BasicDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode ) +void __EXPORT BasicDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) { if ( bFloatMode ) DockingWindow::EndDocking( rRect, bFloatMode ); else { - SetFloatingMode( FALSE ); + SetFloatingMode( sal_False ); ModulWindowLayout* pLayout = (ModulWindowLayout*)GetParent(); pLayout->DockaWindow( this ); } @@ -450,7 +450,7 @@ void __EXPORT BasicDockingWindow::ToggleFloatingMode() -BOOL __EXPORT BasicDockingWindow::PrepareToggleFloatingMode() +sal_Bool __EXPORT BasicDockingWindow::PrepareToggleFloatingMode() { if ( IsFloatingMode() ) { @@ -458,7 +458,7 @@ BOOL __EXPORT BasicDockingWindow::PrepareToggleFloatingMode() aFloatingPosAndSize.SetPos( GetParent()->OutputToScreenPixel( GetPosPixel() ) ); aFloatingPosAndSize.SetSize( GetSizePixel() ); } - return TRUE; + return sal_True; } @@ -509,18 +509,18 @@ IMPL_LINK_INLINE_END( ExtendedEdit, EditAccHdl, Accelerator *, pAcc ) struct TabBarDDInfo { - ULONG npTabBar; - USHORT nPage; + sal_uLong npTabBar; + sal_uInt16 nPage; TabBarDDInfo() { npTabBar = 0; nPage = 0; } - TabBarDDInfo( ULONG _npTabBar, USHORT _nPage ) { npTabBar = _npTabBar; nPage = _nPage; } + TabBarDDInfo( sal_uLong _npTabBar, sal_uInt16 _nPage ) { npTabBar = _npTabBar; nPage = _nPage; } }; BasicIDETabBar::BasicIDETabBar( Window* pParent ) : TabBar( pParent, WinBits( WB_3DLOOK | WB_SCROLL | WB_BORDER | WB_SIZEABLE | WB_DRAG ) ) { - EnableEditMode( TRUE ); + EnableEditMode( sal_True ); SetHelpId( HID_BASICIDE_TABBAR ); } @@ -558,9 +558,9 @@ void __EXPORT BasicIDETabBar::Command( const CommandEvent& rCEvt ) PopupMenu aPopup( IDEResId( RID_POPUP_TABBAR ) ); if ( GetPageCount() == 0 ) { - aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, FALSE ); - aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, FALSE ); - aPopup.EnableItem( SID_BASICIDE_HIDECURPAGE, FALSE ); + aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, sal_False ); + aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, sal_False ); + aPopup.EnableItem( SID_BASICIDE_HIDECURPAGE, sal_False ); } if ( StarBASIC::IsRunning() ) @@ -580,9 +580,9 @@ void __EXPORT BasicIDETabBar::Command( const CommandEvent& rCEvt ) if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) || ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) ) { - aPopup.EnableItem( aPopup.GetItemId( 0 ), FALSE ); - aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, FALSE ); - aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, FALSE ); + aPopup.EnableItem( aPopup.GetItemId( 0 ), sal_False ); + aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, sal_False ); + aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, sal_False ); aPopup.RemoveDisabledEntries(); } if ( aDocument.isInVBAMode() ) @@ -601,8 +601,8 @@ void __EXPORT BasicIDETabBar::Command( const CommandEvent& rCEvt ) SbModule* pActiveModule = (SbModule*)pBasic->FindModule( pWin->GetName() ); if( pActiveModule && ( pActiveModule->GetModuleType() == script::ModuleType::DOCUMENT ) ) { - aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, FALSE ); - aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, FALSE ); + aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, sal_False ); + aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, sal_False ); } } } @@ -620,7 +620,7 @@ void __EXPORT BasicIDETabBar::Command( const CommandEvent& rCEvt ) long BasicIDETabBar::AllowRenaming() { - BOOL bValid = BasicIDE::IsValidSbxName( GetEditText() ); + sal_Bool bValid = BasicIDE::IsValidSbxName( GetEditText() ); if ( !bValid ) ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); @@ -656,13 +656,13 @@ void BasicIDETabBar::Sort() TabBarSortHelper aTabBarSortHelper; ::std::vector<TabBarSortHelper> aModuleList; ::std::vector<TabBarSortHelper> aDialogList; - USHORT nPageCount = GetPageCount(); - USHORT i; + sal_uInt16 nPageCount = GetPageCount(); + sal_uInt16 i; // create module and dialog lists for sorting for ( i = 0; i < nPageCount; i++) { - USHORT nId = GetPageId( i ); + sal_uInt16 nId = GetPageId( i ); aTabBarSortHelper.nPageId = nId; aTabBarSortHelper.aPageText = GetPageText( nId ); IDEBaseWindow* pWin = aIDEWindowTable.Get( nId ); @@ -682,8 +682,8 @@ void BasicIDETabBar::Sort() ::std::sort( aDialogList.begin() , aDialogList.end() ); - USHORT nModules = sal::static_int_cast<USHORT>( aModuleList.size() ); - USHORT nDialogs = sal::static_int_cast<USHORT>( aDialogList.size() ); + sal_uInt16 nModules = sal::static_int_cast<sal_uInt16>( aModuleList.size() ); + sal_uInt16 nDialogs = sal::static_int_cast<sal_uInt16>( aDialogList.size() ); // move module pages to new positions for (i = 0; i < nModules; i++) @@ -699,7 +699,7 @@ void BasicIDETabBar::Sort() } } -void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BOOL bEraseTrailingEmptyLines ) +void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sal_Bool bEraseTrailingEmptyLines ) { sal_Int32 nStartPos = 0; sal_Int32 nEndPos = 0; @@ -749,10 +749,10 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BO } } -ULONG CalcLineCount( SvStream& rStream ) +sal_uLong CalcLineCount( SvStream& rStream ) { - ULONG nLFs = 0; - ULONG nCRs = 0; + sal_uLong nLFs = 0; + sal_uLong nCRs = 0; char c; rStream.Seek( 0 ); @@ -803,7 +803,7 @@ bool LibInfoKey::operator==( const LibInfoKey& rKey ) const return bRet; } -LibInfoItem::LibInfoItem( const ScriptDocument& rDocument, const String& rLibName, const String& rCurrentName, USHORT nCurrentType ) +LibInfoItem::LibInfoItem( const ScriptDocument& rDocument, const String& rLibName, const String& rCurrentName, sal_uInt16 nCurrentType ) :m_aDocument( rDocument ) ,m_aLibName( rLibName ) ,m_aCurrentName( rCurrentName ) @@ -889,7 +889,7 @@ LibInfoItem* LibInfos::GetInfo( const LibInfoKey& rKey ) return pItem; } -SbxItem::SbxItem(USHORT nWhich_, const ScriptDocument& rDocument, const String& aLibName, const String& aName, USHORT nType ) +SbxItem::SbxItem(sal_uInt16 nWhich_, const ScriptDocument& rDocument, const String& aLibName, const String& aName, sal_uInt16 nType ) :SfxPoolItem( nWhich_ ) ,m_aDocument(rDocument) ,m_aLibName(aLibName) @@ -898,7 +898,7 @@ SbxItem::SbxItem(USHORT nWhich_, const ScriptDocument& rDocument, const String& { } -SbxItem::SbxItem(USHORT nWhich_, const ScriptDocument& rDocument, const String& aLibName, const String& aName, const String& aMethodName, USHORT nType ) +SbxItem::SbxItem(sal_uInt16 nWhich_, const ScriptDocument& rDocument, const String& aLibName, const String& aName, const String& aMethodName, sal_uInt16 nType ) :SfxPoolItem( nWhich_ ) ,m_aDocument(rDocument) ,m_aLibName(aLibName) @@ -933,7 +933,7 @@ SfxPoolItem *SbxItem::Clone( SfxItemPool* ) const return new SbxItem(*this); } -BOOL QueryDel( const String& rName, const ResId& rId, Window* pParent ) +sal_Bool QueryDel( const String& rName, const ResId& rId, Window* pParent ) { String aQuery( rId ); String aName( rName ); @@ -942,39 +942,39 @@ BOOL QueryDel( const String& rName, const ResId& rId, Window* pParent ) aQuery.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "XX" ) ), aName ); QueryBox aQueryBox( pParent, WB_YES_NO | WB_DEF_YES, aQuery ); if ( aQueryBox.Execute() == RET_YES ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } -BOOL QueryDelMacro( const String& rName, Window* pParent ) +sal_Bool QueryDelMacro( const String& rName, Window* pParent ) { return QueryDel( rName, IDEResId( RID_STR_QUERYDELMACRO ), pParent ); } -BOOL QueryReplaceMacro( const String& rName, Window* pParent ) +sal_Bool QueryReplaceMacro( const String& rName, Window* pParent ) { return QueryDel( rName, IDEResId( RID_STR_QUERYREPLACEMACRO ), pParent ); } -BOOL QueryDelDialog( const String& rName, Window* pParent ) +sal_Bool QueryDelDialog( const String& rName, Window* pParent ) { return QueryDel( rName, IDEResId( RID_STR_QUERYDELDIALOG ), pParent ); } -BOOL QueryDelLib( const String& rName, BOOL bRef, Window* pParent ) +sal_Bool QueryDelLib( const String& rName, sal_Bool bRef, Window* pParent ) { return QueryDel( rName, IDEResId( bRef ? RID_STR_QUERYDELLIBREF : RID_STR_QUERYDELLIB ), pParent ); } -BOOL QueryDelModule( const String& rName, Window* pParent ) +sal_Bool QueryDelModule( const String& rName, Window* pParent ) { return QueryDel( rName, IDEResId( RID_STR_QUERYDELMODULE ), pParent ); } -BOOL QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, const String& rLibName, String& rPassword, BOOL bRepeat, BOOL bNewTitle ) +sal_Bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, const String& rLibName, String& rPassword, sal_Bool bRepeat, sal_Bool bNewTitle ) { - BOOL bOK = FALSE; - USHORT nRet = 0; + sal_Bool bOK = sal_False; + sal_uInt16 nRet = 0; do { diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx index 6d126784cac0..d14d64e106f4 100644 --- a/basctl/source/basicide/brkdlg.cxx +++ b/basctl/source/basicide/brkdlg.cxx @@ -42,13 +42,13 @@ #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> -// FIXME Why does BreakPointDialog allow only USHORT for break-point line -// numbers, whereas BreakPoint supports ULONG? +// FIXME Why does BreakPointDialog allow only sal_uInt16 for break-point line +// numbers, whereas BreakPoint supports sal_uLong? -bool lcl_ParseText( String aText, USHORT& rLineNr ) +bool lcl_ParseText( String aText, sal_uInt16& rLineNr ) { // aText should look like "# n" where - // n > 0 && n < std::numeric_limits< USHORT >::max(). + // n > 0 && n < std::numeric_limits< sal_uInt16 >::max(). // All spaces are ignored, so there can even be spaces within the // number n. (Maybe it would be better to ignore all whitespace instead // of just spaces.) @@ -58,11 +58,11 @@ bool lcl_ParseText( String aText, USHORT& rLineNr ) return false; if (cFirst == '#') aText.Erase(0, 1); - // XXX Assumes that USHORT is contained within sal_Int32: + // XXX Assumes that sal_uInt16 is contained within sal_Int32: sal_Int32 n = aText.ToInt32(); - if (n <= 0 || n > std::numeric_limits< USHORT >::max()) + if (n <= 0 || n > std::numeric_limits< sal_uInt16 >::max()) return false; - rLineNr = static_cast< USHORT >(n); + rLineNr = static_cast< sal_uInt16 >(n); return true; } @@ -82,7 +82,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList { FreeResource(); - aComboBox.SetUpdateMode( FALSE ); + aComboBox.SetUpdateMode( sal_False ); BreakPoint* pBrk = m_aModifiedBreakPointList.First(); BreakPoint* pFirstBrk = pBrk; while ( pBrk ) @@ -92,7 +92,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND ); pBrk = m_aModifiedBreakPointList.Next(); } - aComboBox.SetUpdateMode( TRUE ); + aComboBox.SetUpdateMode( sal_True ); aOKButton.SetClickHdl( LINK( this, BreakPointDialog, ButtonHdl ) ); aNewButton.SetClickHdl( LINK( this, BreakPointDialog, ButtonHdl ) ); @@ -107,7 +107,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList aNumericField.SetMin( 0 ); aNumericField.SetMax( 0x7FFFFFFF ); aNumericField.SetSpinSize( 1 ); - aNumericField.SetStrictFormat( TRUE ); + aNumericField.SetStrictFormat( sal_True ); aNumericField.SetModifyHdl( LINK( this, BreakPointDialog, EditModifyHdl ) ); aComboBox.SetText( aComboBox.GetEntry( 0 ) ); @@ -129,7 +129,7 @@ void BreakPointDialog::CheckButtons() // "New" button is enabled if the combo box edit contains a valid line // number that is not already present in the combo box list; otherwise // "OK" and "Delete" buttons are enabled: - USHORT nLine; + sal_uInt16 nLine; if (lcl_ParseText(aComboBox.GetText(), nLine) && m_aModifiedBreakPointList.FindBreakPoint(nLine) == 0) { @@ -163,7 +163,7 @@ IMPL_LINK( BreakPointDialog, ComboBoxHighlightHdl, ComboBox *, pBox ) aOKButton.Enable(); aDelButton.Enable(); - USHORT nEntry = pBox->GetEntryPos( pBox->GetText() ); + sal_uInt16 nEntry = pBox->GetEntryPos( pBox->GetText() ); BreakPoint* pBrk = m_aModifiedBreakPointList.GetObject( nEntry ); DBG_ASSERT( pBrk, "Kein passender Breakpoint zur Liste ?" ); UpdateFields( pBrk ); @@ -199,13 +199,13 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton ) { // Checkbox beruecksichtigen! String aText( aComboBox.GetText() ); - USHORT nLine; - BOOL bValid = lcl_ParseText( aText, nLine ); + sal_uInt16 nLine; + sal_Bool bValid = lcl_ParseText( aText, nLine ); if ( bValid ) { BreakPoint* pBrk = new BreakPoint( nLine ); pBrk->bEnabled = aCheckBox.IsChecked(); - pBrk->nStopAfter = (ULONG) aNumericField.GetValue(); + pBrk->nStopAfter = (sal_uLong) aNumericField.GetValue(); m_aModifiedBreakPointList.InsertSorted( pBrk ); String aEntryStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) ); aEntryStr += String::CreateFromInt32( pBrk->nLine ); @@ -228,7 +228,7 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton ) } else if ( pButton == &aDelButton ) { - USHORT nEntry = aComboBox.GetEntryPos( aComboBox.GetText() ); + sal_uInt16 nEntry = aComboBox.GetEntryPos( aComboBox.GetText() ); BreakPoint* pBrk = m_aModifiedBreakPointList.GetObject( nEntry ); if ( pBrk ) { @@ -271,7 +271,7 @@ void BreakPointDialog::UpdateFields( BreakPoint* pBrk ) BreakPoint* BreakPointDialog::GetSelectedBreakPoint() { - USHORT nEntry = aComboBox.GetEntryPos( aComboBox.GetText() ); + sal_uInt16 nEntry = aComboBox.GetEntryPos( aComboBox.GetText() ); BreakPoint* pBrk = m_aModifiedBreakPointList.GetObject( nEntry ); return pBrk; } diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx index a15bed689b6f..473b6219d16f 100644 --- a/basctl/source/basicide/iderdll.cxx +++ b/basctl/source/basicide/iderdll.cxx @@ -68,7 +68,7 @@ BasicIDEDLL* BasicIDEDLL::GetDLL() return pBasicIDEDLL; } -IDEResId::IDEResId( USHORT nId ): +IDEResId::IDEResId( sal_uInt16 nId ): ResId( nId, *(*(BasicIDEModule**)GetAppData(SHL_IDE))->GetResMgr() ) { } @@ -139,8 +139,8 @@ BasicIDEData* BasicIDEDLL::GetExtraData() BasicIDEData::BasicIDEData() : aObjCatPos( INVPOSITION, INVPOSITION ) { nBasicDialogCount = 0; - bChoosingMacro = FALSE; - bShellInCriticalSection = FALSE; + bChoosingMacro = sal_False; + bShellInCriticalSection = sal_False; pSearchItem = new SvxSearchItem( SID_SEARCH_ITEM ); StarBASIC::SetGlobalBreakHdl( LINK( this, BasicIDEData, GlobalBasicBreakHdl ) ); @@ -211,20 +211,3 @@ IMPL_LINK( BasicIDEData, GlobalBasicBreakHdl, StarBASIC *, pBasic ) return nRet; } - -IMPL_LINK( BasicIDEData, ExecuteMacroEvent, void *, pData ) -{ - if ( pData ) - { - SFX_APP()->EnterBasicCall(); - SbMethod* pMethod = (SbMethod*)pData; - - // Ist es eine StarScript-Methode? Am Parent erkennen - DBG_ASSERT( pMethod->GetParent()->GetFlags() & SBX_EXTSEARCH, "Kein EXTSEARCH!" ); - BasicIDE::RunMethod( pMethod ); - pMethod->ReleaseRef(); // muss vorher inkrementiert worden sein! - SFX_APP()->LeaveBasicCall(); - } - return 0; -} - diff --git a/basctl/source/basicide/iderdll2.hxx b/basctl/source/basicide/iderdll2.hxx index 162d08ddcb5e..bd812ee36f6f 100644 --- a/basctl/source/basicide/iderdll2.hxx +++ b/basctl/source/basicide/iderdll2.hxx @@ -57,11 +57,11 @@ private: String aAddLibPath; String aAddLibFilter; - USHORT nBasicDialogCount; + sal_uInt16 nBasicDialogCount; - BOOL OLD_bRelMacroRecording; - BOOL bChoosingMacro; - BOOL bShellInCriticalSection; + sal_Bool OLD_bRelMacroRecording; + sal_Bool bChoosingMacro; + sal_Bool bShellInCriticalSection; protected: DECL_LINK( GlobalBasicBreakHdl, StarBASIC * ); @@ -75,10 +75,10 @@ public: BasicEntryDescriptor& GetLastEntryDescriptor() { return m_aLastEntryDesc; } void SetLastEntryDescriptor( BasicEntryDescriptor& rDesc ) { m_aLastEntryDesc = rDesc; } - BOOL& ChoosingMacro() { return bChoosingMacro; } - BOOL& ShellInCriticalSection() { return bShellInCriticalSection; } + sal_Bool& ChoosingMacro() { return bChoosingMacro; } + sal_Bool& ShellInCriticalSection() { return bShellInCriticalSection; } - USHORT GetBasicDialogCount() const { return nBasicDialogCount; } + sal_uInt16 GetBasicDialogCount() const { return nBasicDialogCount; } void IncBasicDialogCount() { nBasicDialogCount++; } void DecBasicDialogCount() { nBasicDialogCount--; } @@ -100,8 +100,6 @@ public: const String& GetAddLibFilter() const { return aAddLibFilter; } void SetAddLibFilter( const String& rFilter ) { aAddLibFilter = rFilter; } - - DECL_LINK( ExecuteMacroEvent, void * ); }; diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index 95c27c65acdb..ca298f76b171 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -147,7 +147,7 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou for( sal_Int32 i = 0 ; i < nDlgCount ; i++ ) { String aDlgName = pDlgNames[ i ]; - DialogWindow* pWin = m_pIDEShell->FindDlgWin( m_aDocument, m_aLibName, aDlgName, FALSE ); + DialogWindow* pWin = m_pIDEShell->FindDlgWin( m_aDocument, m_aLibName, aDlgName, sal_False ); if( pWin && pWin->IsA( TYPE( DialogWindow ) ) ) { DialogWindow* pDialogWin = static_cast< DialogWindow* >( pWin ); @@ -903,7 +903,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEdito if ( !aDocument.isValid() ) return; const String& rLibName = pDlgWin->GetLibName(); - Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, TRUE ) ); + Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, sal_True ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); @@ -933,7 +933,7 @@ void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEdito if ( !aDocument.isValid() ) return; const String& rLibName = pDlgWin->GetLibName(); - Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, TRUE ) ); + Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, sal_True ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); @@ -961,7 +961,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor* if ( !aDocument.isValid() ) return; const String& rLibName = pDlgWin->GetLibName(); - Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, TRUE ) ); + Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, sal_True ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); @@ -981,7 +981,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAscii( "ResourceResolver" ); // Get library - Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) ); + Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); @@ -1011,7 +1011,7 @@ void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument, const String& aDlgName, Reference< container::XNameContainer > xDialogModel ) { // Get library - Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) ); + Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); if( !xStringResourceManager.is() ) @@ -1042,7 +1042,7 @@ void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument, const String& aDlgName, Reference< container::XNameContainer > xDialogModel ) { // Get library - Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) ); + Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); if( !xStringResourceManager.is() ) @@ -1136,7 +1136,7 @@ void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor* pEditor, if ( !aDocument.isValid() ) return; const String& rLibName = pDlgWin->GetLibName(); - Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, TRUE ) ); + Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, sal_True ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 996e98f52ce4..29e376869e72 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -63,7 +63,7 @@ using namespace ::com::sun::star::uno; DECLARE_LIST( MacroList, SbMethod* ) -MacroChooser::MacroChooser( Window* pParnt, BOOL bCreateEntries ) : +MacroChooser::MacroChooser( Window* pParnt, sal_Bool bCreateEntries ) : SfxModalDialog( pParnt, IDEResId( RID_MACROCHOOSER ) ), aMacroNameTxt( this, IDEResId( RID_TXT_MACRONAME ) ), aMacroNameEdit( this, IDEResId( RID_ED_MACRONAME ) ), @@ -85,12 +85,12 @@ MacroChooser::MacroChooser( Window* pParnt, BOOL bCreateEntries ) : FreeResource(); nMode = MACROCHOOSER_ALL; - bNewDelIsDel = TRUE; + bNewDelIsDel = sal_True; // Der Sfx fragt den BasicManager nicht, ob modified // => Speichern anschmeissen, wenn Aenderung, aber kein Sprung in // die BasicIDE. - bForceStoreBasic = FALSE; + bForceStoreBasic = sal_False; aMacrosInTxtBaseStr = aMacrosInTxt.GetText(); @@ -188,7 +188,7 @@ void MacroChooser::RestoreMacroDescription() { // find entry in macro box SvLBoxEntry* pEntry = 0; - ULONG nPos = 0; + sal_uLong nPos = 0; SvLBoxEntry* pE = aMacroBox.GetEntry( nPos ); while ( pE ) { @@ -224,7 +224,7 @@ short __EXPORT MacroChooser::Execute() if( rSelectedDoc.isDocument() && !rSelectedDoc.isActive() ) { // Search for the right entry - ULONG nRootPos = 0; + sal_uLong nRootPos = 0; SvLBoxEntry* pRootEntry = aBasicBox.GetEntry( nRootPos ); while( pRootEntry ) { @@ -262,7 +262,7 @@ short __EXPORT MacroChooser::Execute() } -void MacroChooser::EnableButton( Button& rButton, BOOL bEnable ) +void MacroChooser::EnableButton( Button& rButton, sal_Bool bEnable ) { if ( bEnable ) { @@ -333,10 +333,10 @@ void MacroChooser::DeleteMacro() SbModule* pModule = pMethod->GetModule(); DBG_ASSERT( pModule, "DeleteMacro: Kein Modul?!" ); ::rtl::OUString aSource( pModule->GetSource32() ); - USHORT nStart, nEnd; + sal_uInt16 nStart, nEnd; pMethod->GetLineRange( nStart, nEnd ); pModule->GetMethods()->Remove( pMethod ); - CutLines( aSource, nStart-1, nEnd-nStart+1, TRUE ); + CutLines( aSource, nStart-1, nEnd-nStart+1, sal_True ); pModule->SetSource32( aSource ); // update module in library @@ -347,7 +347,7 @@ void MacroChooser::DeleteMacro() SvLBoxEntry* pEntry = aMacroBox.FirstSelected(); DBG_ASSERT( pEntry, "DeleteMacro: Entry ?!" ); aMacroBox.GetModel()->Remove( pEntry ); - bForceStoreBasic = TRUE; + bForceStoreBasic = sal_True; } } @@ -429,8 +429,8 @@ void MacroChooser::CheckButtons() SbMethod* pMethod = GetMacro(); // check, if corresponding libraries are readonly - BOOL bReadOnly = FALSE; - USHORT nDepth = pCurEntry ? aBasicBox.GetModel()->GetDepth( pCurEntry ) : 0; + sal_Bool bReadOnly = sal_False; + sal_uInt16 nDepth = pCurEntry ? aBasicBox.GetModel()->GetDepth( pCurEntry ) : 0; if ( nDepth == 1 || nDepth == 2 ) { ScriptDocument aDocument( aDesc.GetDocument() ); @@ -440,26 +440,26 @@ void MacroChooser::CheckButtons() if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) || ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) ) { - bReadOnly = TRUE; + bReadOnly = sal_True; } } if ( nMode != MACROCHOOSER_RECORDING ) { // Run... - BOOL bEnable = pMethod ? TRUE : FALSE; + sal_Bool bEnable = pMethod ? sal_True : sal_False; if ( ( nMode != MACROCHOOSER_CHOOSEONLY ) && StarBASIC::IsRunning() ) - bEnable = FALSE; + bEnable = sal_False; EnableButton( aRunButton, bEnable ); } // Organisieren immer moeglich ? // Assign... - EnableButton( aAssignButton, pMethod ? TRUE : FALSE ); + EnableButton( aAssignButton, pMethod ? sal_True : sal_False ); // Edit... - EnableButton( aEditButton, pMacroEntry ? TRUE : FALSE ); + EnableButton( aEditButton, pMacroEntry ? sal_True : sal_False ); // aOrganizeButton EnableButton( aOrganizeButton, !StarBASIC::IsRunning() && ( nMode == MACROCHOOSER_ALL )); @@ -469,8 +469,8 @@ void MacroChooser::CheckButtons() bool bShare = ( aDesc.GetLocation() == LIBRARY_LOCATION_SHARE ); EnableButton( aNewDelButton, !StarBASIC::IsRunning() && ( nMode == MACROCHOOSER_ALL ) && !bProtected && !bReadOnly && !bShare ); - BOOL bPrev = bNewDelIsDel; - bNewDelIsDel = pMethod ? TRUE : FALSE; + sal_Bool bPrev = bNewDelIsDel; + bNewDelIsDel = pMethod ? sal_True : sal_False; if ( ( bPrev != bNewDelIsDel ) && ( nMode == MACROCHOOSER_ALL ) ) { String aBtnText( bNewDelIsDel ? IDEResId( RID_STR_BTNDEL) : IDEResId( RID_STR_BTNNEW ) ); @@ -555,9 +555,9 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox ) // Die Macros sollen in der Reihenfolge angezeigt werden, // wie sie im Modul stehen. MacroList aMacros; - USHORT nMacroCount = pModule->GetMethods()->Count(); - USHORT nRealMacroCount = 0; - USHORT iMeth; + sal_uInt16 nMacroCount = pModule->GetMethods()->Count(); + sal_uInt16 nRealMacroCount = 0; + sal_uInt16 iMeth; for ( iMeth = 0; iMeth < nMacroCount; iMeth++ ) { SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( iMeth ); @@ -565,13 +565,13 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox ) continue; ++nRealMacroCount; DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" ); - ULONG nPos = LIST_APPEND; + sal_uLong nPos = LIST_APPEND; // Eventuell weiter vorne ? - USHORT nStart, nEnd; + sal_uInt16 nStart, nEnd; pMethod->GetLineRange( nStart, nEnd ); - for ( ULONG n = 0; n < aMacros.Count(); n++ ) + for ( sal_uLong n = 0; n < aMacros.Count(); n++ ) { - USHORT nS, nE; + sal_uInt16 nS, nE; SbMethod* pM = aMacros.GetObject( n ); DBG_ASSERT( pM, "Macro nicht in Liste ?!" ); pM->GetLineRange( nS, nE ); @@ -584,10 +584,10 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox ) aMacros.Insert( pMethod, nPos ); } - aMacroBox.SetUpdateMode( FALSE ); + aMacroBox.SetUpdateMode( sal_False ); for ( iMeth = 0; iMeth < nRealMacroCount; iMeth++ ) aMacroBox.InsertEntry( aMacros.GetObject( iMeth )->GetName() ); - aMacroBox.SetUpdateMode( TRUE ); + aMacroBox.SetUpdateMode( sal_True ); if ( aMacroBox.GetEntryCount() ) { @@ -613,7 +613,7 @@ IMPL_LINK( MacroChooser, EditModifyHdl, Edit *, pEdit ) SvLBoxEntry* pCurEntry = aBasicBox.GetCurEntry(); if ( pCurEntry ) { - USHORT nDepth = aBasicBox.GetModel()->GetDepth( pCurEntry ); + sal_uInt16 nDepth = aBasicBox.GetModel()->GetDepth( pCurEntry ); if ( ( nDepth == 1 ) && ( aBasicBox.IsEntryProtected( pCurEntry ) ) ) { // Dann auf die entsprechende Std-Lib stellen... @@ -637,15 +637,15 @@ IMPL_LINK( MacroChooser, EditModifyHdl, Edit *, pEdit ) if ( aMacroBox.GetEntryCount() ) { String aEdtText( aMacroNameEdit.GetText() ); - BOOL bFound = FALSE; - for ( USHORT n = 0; n < aMacroBox.GetEntryCount(); n++ ) + sal_Bool bFound = sal_False; + for ( sal_uInt16 n = 0; n < aMacroBox.GetEntryCount(); n++ ) { SvLBoxEntry* pEntry = aMacroBox.GetEntry( n ); DBG_ASSERT( pEntry, "Entry ?!" ); if ( aMacroBox.GetEntryText( pEntry ).CompareIgnoreCaseToAscii( aEdtText ) == COMPARE_EQUAL ) { SaveSetCurEntry( aMacroBox, pEntry ); - bFound = TRUE; + bFound = sal_True; break; } } @@ -654,7 +654,7 @@ IMPL_LINK( MacroChooser, EditModifyHdl, Edit *, pEdit ) SvLBoxEntry* pEntry = aMacroBox.FirstSelected(); // Wenn es den Eintrag gibt ->Select ->Desription... if ( pEntry ) - aMacroBox.Select( pEntry, FALSE ); + aMacroBox.Select( pEntry, sal_False ); } } } @@ -691,7 +691,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) } else if ( nMode == MACROCHOOSER_RECORDING ) { - BOOL bValid = BasicIDE::IsValidSbxName( aMacroNameEdit.GetText() ); + sal_Bool bValid = BasicIDE::IsValidSbxName( aMacroNameEdit.GetText() ); if ( !bValid ) { ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); @@ -768,7 +768,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) } else { - BOOL bValid = BasicIDE::IsValidSbxName( aMacroNameEdit.GetText() ); + sal_Bool bValid = BasicIDE::IsValidSbxName( aMacroNameEdit.GetText() ); if ( !bValid ) { ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); @@ -843,7 +843,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) BasicEntryDescriptor aDesc( aBasicBox.GetEntryDescriptor( aBasicBox.FirstSelected() ) ); OrganizeDialog* pDlg = new OrganizeDialog( this, 0, aDesc ); - USHORT nRet = pDlg->Execute(); + sal_uInt16 nRet = pDlg->Execute(); delete pDlg; if ( nRet ) // Nicht einfach nur geschlossen @@ -854,7 +854,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); if ( pIDEShell && pIDEShell->IsAppBasicModified() ) - bForceStoreBasic = TRUE; + bForceStoreBasic = sal_True; aBasicBox.UpdateEntries(); } @@ -873,26 +873,26 @@ void MacroChooser::UpdateFields() aMacroNameEdit.SetText( aMacroBox.GetEntryText( pMacroEntry ) ); } -void MacroChooser::SetMode( USHORT nM ) +void MacroChooser::SetMode( sal_uInt16 nM ) { nMode = nM; if ( nMode == MACROCHOOSER_ALL ) { aRunButton.SetText( String( IDEResId( RID_STR_RUN ) ) ); - EnableButton( aNewDelButton, TRUE ); - EnableButton( aOrganizeButton, TRUE ); + EnableButton( aNewDelButton, sal_True ); + EnableButton( aOrganizeButton, sal_True ); } else if ( nMode == MACROCHOOSER_CHOOSEONLY ) { aRunButton.SetText( String( IDEResId( RID_STR_CHOOSE ) ) ); - EnableButton( aNewDelButton, FALSE ); - EnableButton( aOrganizeButton, FALSE ); + EnableButton( aNewDelButton, sal_False ); + EnableButton( aOrganizeButton, sal_False ); } else if ( nMode == MACROCHOOSER_RECORDING ) { aRunButton.SetText( String( IDEResId( RID_STR_RECORD ) ) ); - EnableButton( aNewDelButton, FALSE ); - EnableButton( aOrganizeButton, FALSE ); + EnableButton( aNewDelButton, sal_False ); + EnableButton( aOrganizeButton, sal_False ); aAssignButton.Hide(); aEditButton.Hide(); diff --git a/basctl/source/basicide/macrodlg.hxx b/basctl/source/basicide/macrodlg.hxx index b610b2041b50..5184d763d28c 100644 --- a/basctl/source/basicide/macrodlg.hxx +++ b/basctl/source/basicide/macrodlg.hxx @@ -74,10 +74,10 @@ private: PushButton aNewLibButton; PushButton aNewModButton; - BOOL bNewDelIsDel; - BOOL bForceStoreBasic; + sal_Bool bNewDelIsDel; + sal_Bool bForceStoreBasic; - USHORT nMode; + sal_uInt16 nMode; DECL_LINK( MacroSelectHdl, SvTreeListBox * ); DECL_LINK( MacroDoubleClickHdl, SvTreeListBox * ); @@ -89,7 +89,7 @@ private: void SaveSetCurEntry( SvTreeListBox& rBox, SvLBoxEntry* pEntry ); void UpdateFields(); - void EnableButton( Button& rButton, BOOL bEnable ); + void EnableButton( Button& rButton, sal_Bool bEnable ); String GetInfo( SbxVariable* pVar ); @@ -97,7 +97,7 @@ private: void RestoreMacroDescription(); public: - MacroChooser( Window* pParent, BOOL bCreateEntries = TRUE ); + MacroChooser( Window* pParent, sal_Bool bCreateEntries = sal_True ); ~MacroChooser(); SbMethod* GetMacro(); @@ -106,8 +106,8 @@ public: virtual short Execute(); - void SetMode( USHORT nMode ); - USHORT GetMode() const { return nMode; } + void SetMode( sal_uInt16 nMode ); + sal_uInt16 GetMode() const { return nMode; } }; #endif // _MACRODLG_HXX diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 35bc94e24fca..4d6bfa923f37 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -127,15 +127,15 @@ public: class BasicLibLBoxString : public SvLBoxString { public: - BasicLibLBoxString( SvLBoxEntry* pEntry, USHORT nFlags, const String& rTxt ) : + BasicLibLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rTxt ) : SvLBoxString( pEntry, nFlags, rTxt ) {} - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry ); + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry ); }; //---------------------------------------------------------------------------- -void BasicLibLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT, SvLBoxEntry* pEntry ) +void BasicLibLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) { // Change text color if library is read only: bool bReadOnly = false; @@ -210,7 +210,7 @@ void BasicCheckBox::Init() //---------------------------------------------------------------------------- -void BasicCheckBox::SetMode( USHORT n ) +void BasicCheckBox::SetMode( sal_uInt16 n ) { nMode = n; @@ -222,7 +222,7 @@ void BasicCheckBox::SetMode( USHORT n ) //---------------------------------------------------------------------------- -SvLBoxEntry* BasicCheckBox::DoInsertEntry( const String& rStr, ULONG nPos ) +SvLBoxEntry* BasicCheckBox::DoInsertEntry( const String& rStr, sal_uLong nPos ) { return SvTabListBox::InsertEntryToColumn( rStr, nPos, 0 ); } @@ -231,8 +231,8 @@ SvLBoxEntry* BasicCheckBox::DoInsertEntry( const String& rStr, ULONG nPos ) SvLBoxEntry* BasicCheckBox::FindEntry( const String& rName ) { - ULONG nCount = GetEntryCount(); - for ( ULONG i = 0; i < nCount; i++ ) + sal_uLong nCount = GetEntryCount(); + for ( sal_uLong i = 0; i < nCount; i++ ) { SvLBoxEntry* pEntry = GetEntry( i ); DBG_ASSERT( pEntry, "pEntry?!" ); @@ -244,7 +244,7 @@ SvLBoxEntry* BasicCheckBox::FindEntry( const String& rName ) //---------------------------------------------------------------------------- -void BasicCheckBox::CheckEntryPos( ULONG nPos, BOOL bCheck ) +void BasicCheckBox::CheckEntryPos( sal_uLong nPos, sal_Bool bCheck ) { if ( nPos < GetEntryCount() ) { @@ -260,11 +260,11 @@ void BasicCheckBox::CheckEntryPos( ULONG nPos, BOOL bCheck ) //---------------------------------------------------------------------------- -BOOL BasicCheckBox::IsChecked( ULONG nPos ) const +sal_Bool BasicCheckBox::IsChecked( sal_uLong nPos ) const { if ( nPos < GetEntryCount() ) return (GetCheckButtonState( GetEntry( nPos ) ) == SV_BUTTON_CHECKED); - return FALSE; + return sal_False; } //---------------------------------------------------------------------------- @@ -276,8 +276,8 @@ void BasicCheckBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt, const if ( nMode == LIBMODE_MANAGER ) { // initialize all columns with own string class (column 0 == bitmap) - USHORT nCount = pEntry->ItemCount(); - for ( USHORT nCol = 1; nCol < nCount; ++nCol ) + sal_uInt16 nCount = pEntry->ItemCount(); + for ( sal_uInt16 nCol = 1; nCol < nCount; ++nCol ) { SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nCol ); BasicLibLBoxString* pStr = new BasicLibLBoxString( pEntry, 0, pCol->GetText() ); @@ -288,10 +288,10 @@ void BasicCheckBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt, const //---------------------------------------------------------------------------- -BOOL __EXPORT BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) +sal_Bool __EXPORT BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) { if ( nMode != LIBMODE_MANAGER ) - return FALSE; + return sal_False; DBG_ASSERT( pEntry, "Kein Eintrag?" ); @@ -300,7 +300,7 @@ BOOL __EXPORT BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) if ( aLibName.EqualsIgnoreCaseAscii( "Standard" ) ) { ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_CANNOTCHANGENAMESTDLIB ) ) ).Execute(); - return FALSE; + return sal_False; } // check, if library is readonly @@ -311,11 +311,11 @@ BOOL __EXPORT BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) && !xDlgLibContainer->isLibraryLink( aOULibName ) ) ) { ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_LIBISREADONLY ) ) ).Execute(); - return FALSE; + return sal_False; } // i24094: Password verification necessary for renaming - BOOL bOK = TRUE; + sal_Bool bOK = sal_True; if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) ) { // check password @@ -327,29 +327,29 @@ BOOL __EXPORT BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) bOK = QueryPassword( xModLibContainer1, aLibName, aPassword ); } if ( !bOK ) - return FALSE; + return sal_False; } // TODO: check if library is reference/link // Prueffen, ob Referenz... /* - USHORT nLib = pBasMgr->GetLibId( GetEntryText( pEntry, 0 ) ); + sal_uInt16 nLib = pBasMgr->GetLibId( GetEntryText( pEntry, 0 ) ); DBG_ASSERT( nLib != LIB_NOTFOUND, "LibId ?!" ); if ( pBasMgr->IsReference( nLib ) ) { ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_CANNOTCHANGENAMEREFLIB ) ) ).Execute(); - return FALSE; + return sal_False; } */ - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- -BOOL __EXPORT BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ) +sal_Bool __EXPORT BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ) { - BOOL bValid = ( rNewText.Len() <= 30 ) && BasicIDE::IsValidSbxName( rNewText ); + sal_Bool bValid = ( rNewText.Len() <= 30 ) && BasicIDE::IsValidSbxName( rNewText ); String aCurText( GetEntryText( pEntry, 0 ) ); if ( bValid && ( aCurText != rNewText ) ) { @@ -381,12 +381,12 @@ BOOL __EXPORT BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNe catch ( container::ElementExistException& ) { ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_SBXNAMEALLREADYUSED ) ) ).Execute(); - return FALSE; + return sal_False; } catch ( container::NoSuchElementException& ) { DBG_UNHANDLED_EXCEPTION(); - return FALSE; + return sal_False; } } @@ -418,7 +418,7 @@ IMPL_LINK(NewObjectDialog, OkButtonHandler, Button *, EMPTYARG) return 0; } -NewObjectDialog::NewObjectDialog(Window * pParent, USHORT nMode, +NewObjectDialog::NewObjectDialog(Window * pParent, sal_uInt16 nMode, bool bCheckName) : ModalDialog( pParent, IDEResId( RID_DLG_NEWLIB ) ), aText( this, IDEResId( RID_FT_NEWLIB ) ), @@ -520,7 +520,7 @@ LibPage::LibPage( Window * pParent ) aBasicsBox.SetSelectHdl( LINK( this, LibPage, BasicSelectHdl ) ); aLibBox.SetMode( LIBMODE_MANAGER ); - aLibBox.EnableInplaceEditing( TRUE ); + aLibBox.EnableInplaceEditing( sal_True ); aLibBox.SetStyle( WB_HSCROLL | WB_BORDER | WB_TABSTOP ); aCloseButton.GrabFocus(); @@ -538,8 +538,8 @@ LibPage::LibPage( Window * pParent ) LibPage::~LibPage() { - USHORT nCount = aBasicsBox.GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = aBasicsBox.GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { BasicDocumentEntry* pEntry = (BasicDocumentEntry*)aBasicsBox.GetEntryData( i ); delete pEntry; @@ -713,19 +713,19 @@ IMPL_LINK( LibPage, ButtonHdl, Button *, pButton ) Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); if ( xPasswd.is() ) { - BOOL bProtected = xPasswd->isLibraryPasswordProtected( aOULibName ); + sal_Bool bProtected = xPasswd->isLibraryPasswordProtected( aOULibName ); // change password dialog - SvxPasswordDialog* pDlg = new SvxPasswordDialog( this, TRUE, !bProtected ); + SvxPasswordDialog* pDlg = new SvxPasswordDialog( this, sal_True, !bProtected ); pDlg->SetCheckPasswordHdl( LINK( this, LibPage, CheckPasswordHdl ) ); if ( pDlg->Execute() == RET_OK ) { - BOOL bNewProtected = xPasswd->isLibraryPasswordProtected( aOULibName ); + sal_Bool bNewProtected = xPasswd->isLibraryPasswordProtected( aOULibName ); if ( bNewProtected != bProtected ) { - ULONG nPos = (ULONG)aLibBox.GetModel()->GetAbsPos( pCurEntry ); + sal_uLong nPos = (sal_uLong)aLibBox.GetModel()->GetAbsPos( pCurEntry ); aLibBox.GetModel()->Remove( pCurEntry ); ImpInsertLibEntry( aLibName, nPos ); aLibBox.SetCurEntry( aLibBox.GetEntry( nPos ) ); @@ -910,8 +910,8 @@ void LibPage::InsertLib() ( xDlgLibContImport.is() && xDlgLibContImport->hasByName( aOULibName ) && xDlgLibContImport->isLibraryLink( aOULibName ) ) ) ) { SvLBoxEntry* pEntry = pLibDlg->GetLibBox().DoInsertEntry( aLibName ); - USHORT nPos = (USHORT) pLibDlg->GetLibBox().GetModel()->GetAbsPos( pEntry ); - pLibDlg->GetLibBox().CheckEntryPos( nPos, TRUE); + sal_uInt16 nPos = (sal_uInt16) pLibDlg->GetLibBox().GetModel()->GetAbsPos( pEntry ); + pLibDlg->GetLibBox().CheckEntryPos( nPos, sal_True); } } @@ -919,22 +919,22 @@ void LibPage::InsertLib() InfoBox( this, String( IDEResId( RID_STR_NOLIBINSTORAGE ) ) ).Execute(); else { - BOOL bChanges = FALSE; + sal_Bool bChanges = sal_False; String aExtension( aURLObj.getExtension() ); String aLibExtension( String::CreateFromAscii( "xlb" ) ); String aContExtension( String::CreateFromAscii( "xlc" ) ); // disable reference checkbox for documents and sbls if ( aExtension != aLibExtension && aExtension != aContExtension ) - pLibDlg->EnableReference( FALSE ); + pLibDlg->EnableReference( sal_False ); if ( pLibDlg->Execute() ) { - ULONG nNewPos = aLibBox.GetEntryCount(); - BOOL bRemove = FALSE; - BOOL bReplace = pLibDlg->IsReplace(); - BOOL bReference = pLibDlg->IsReference(); - for ( USHORT nLib = 0; nLib < pLibDlg->GetLibBox().GetEntryCount(); nLib++ ) + sal_uLong nNewPos = aLibBox.GetEntryCount(); + sal_Bool bRemove = sal_False; + sal_Bool bReplace = pLibDlg->IsReplace(); + sal_Bool bReference = pLibDlg->IsReference(); + for ( sal_uInt16 nLib = 0; nLib < pLibDlg->GetLibBox().GetEntryCount(); nLib++ ) { if ( pLibDlg->GetLibBox().IsChecked( nLib ) ) { @@ -971,7 +971,7 @@ void LibPage::InsertLib() } // remove existing libraries - bRemove = TRUE; + bRemove = sal_True; } else { @@ -989,14 +989,14 @@ void LibPage::InsertLib() } // check, if the library is password protected - BOOL bOK = FALSE; + sal_Bool bOK = sal_False; String aPassword; if ( xModLibContImport.is() && xModLibContImport->hasByName( aOULibName ) ) { Reference< script::XLibraryContainerPassword > xPasswd( xModLibContImport, UNO_QUERY ); if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) && !bReference ) { - bOK = QueryPassword( xModLibContImp, aLibName, aPassword, TRUE, TRUE ); + bOK = QueryPassword( xModLibContImp, aLibName, aPassword, sal_True, sal_True ); if ( !bOK ) { @@ -1043,7 +1043,7 @@ void LibPage::InsertLib() ::rtl::OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); // create library link - xModLib = Reference< container::XNameContainer >( xModLibContainer->createLibraryLink( aOULibName, aModStorageURL, TRUE ), UNO_QUERY); + xModLib = Reference< container::XNameContainer >( xModLibContainer->createLibraryLink( aOULibName, aModStorageURL, sal_True ), UNO_QUERY); } else { @@ -1112,7 +1112,7 @@ void LibPage::InsertLib() ::rtl::OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); // create library link - xDlgLib = Reference< container::XNameContainer >( xDlgLibContainer->createLibraryLink( aOULibName, aDlgStorageURL, TRUE ), UNO_QUERY); + xDlgLib = Reference< container::XNameContainer >( xDlgLibContainer->createLibraryLink( aOULibName, aDlgStorageURL, sal_True ), UNO_QUERY); } else { @@ -1148,7 +1148,7 @@ void LibPage::InsertLib() // insert listbox entry ImpInsertLibEntry( aLibName, aLibBox.GetEntryCount() ); - bChanges = TRUE; + bChanges = sal_True; } } @@ -1178,7 +1178,7 @@ void LibPage::Export( void ) if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) ) { - BOOL bOK = TRUE; + sal_Bool bOK = sal_True; // check password Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); @@ -1450,14 +1450,14 @@ void LibPage::DeleteCurrent() String aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) ); // check, if library is link - BOOL bIsLibraryLink = FALSE; + sal_Bool bIsLibraryLink = sal_False; ::rtl::OUString aOULibName( aLibName ); Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY ); Reference< script::XLibraryContainer2 > xDlgLibContainer( m_aCurDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY ); if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLink( aOULibName ) ) || ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryLink( aOULibName ) ) ) { - bIsLibraryLink = TRUE; + bIsLibraryLink = sal_True; } if ( QueryDelLib( aLibName, bIsLibraryLink, this ) ) @@ -1487,7 +1487,7 @@ void LibPage::DeleteCurrent() //---------------------------------------------------------------------------- -void LibPage::EndTabDialog( USHORT nRet ) +void LibPage::EndTabDialog( sal_uInt16 nRet ) { DBG_ASSERT( pTabDlg, "TabDlg nicht gesetzt!" ); if ( pTabDlg ) @@ -1516,7 +1516,7 @@ void LibPage::FillListBox() void LibPage::InsertListBoxEntry( const ScriptDocument& rDocument, LibraryLocation eLocation ) { String aEntryText( rDocument.getTitle( eLocation ) ); - USHORT nPos = aBasicsBox.InsertEntry( aEntryText, LISTBOX_APPEND ); + sal_uInt16 nPos = aBasicsBox.InsertEntry( aEntryText, LISTBOX_APPEND ); aBasicsBox.SetEntryData( nPos, new BasicDocumentEntry( rDocument, eLocation ) ); } @@ -1524,7 +1524,7 @@ void LibPage::InsertListBoxEntry( const ScriptDocument& rDocument, LibraryLocati void LibPage::SetCurLib() { - USHORT nSelPos = aBasicsBox.GetSelectEntryPos(); + sal_uInt16 nSelPos = aBasicsBox.GetSelectEntryPos(); BasicDocumentEntry* pEntry = (BasicDocumentEntry*)aBasicsBox.GetEntryData( nSelPos ); if ( pEntry ) { @@ -1562,10 +1562,10 @@ void LibPage::SetCurLib() //---------------------------------------------------------------------------- -SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, ULONG nPos ) +SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, sal_uLong nPos ) { // check, if library is password protected - BOOL bProtected = FALSE; + sal_Bool bProtected = sal_False; ::rtl::OUString aOULibName( rLibName ); Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) @@ -1616,14 +1616,14 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument, String aLibName; String aLibStdName( String( RTL_CONSTASCII_USTRINGPARAM( "Library" ) ) ); //String aLibStdName( IDEResId( RID_STR_STDLIBNAME ) ); - BOOL bValid = FALSE; - USHORT i = 1; + sal_Bool bValid = sal_False; + sal_uInt16 i = 1; while ( !bValid ) { aLibName = aLibStdName; aLibName += String::CreateFromInt32( i ); if ( !rDocument.hasLibrary( E_SCRIPTS, aLibName ) && !rDocument.hasLibrary( E_DIALOGS, aLibName ) ) - bValid = TRUE; + bValid = sal_True; i++; } @@ -1667,7 +1667,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument, // create a module String aModName = rDocument.createObjectName( E_SCRIPTS, aLibName ); ::rtl::OUString sModuleCode; - if ( !rDocument.createModule( aLibName, aModName, TRUE, sModuleCode ) ) + if ( !rDocument.createModule( aLibName, aModName, sal_True, sModuleCode ) ) throw Exception(); SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, BASICIDE_TYPE_MODULE ); @@ -1690,10 +1690,10 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument, pEntry = pBasicBox->GetParent( pEntry ); } - USHORT nMode = pBasicBox->GetMode(); + sal_uInt16 nMode = pBasicBox->GetMode(); bool bDlgMode = ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES ); - USHORT nId = bDlgMode ? RID_IMG_DLGLIB : RID_IMG_MODLIB; - USHORT nIdHC = bDlgMode ? RID_IMG_DLGLIB_HC : RID_IMG_MODLIB_HC; + sal_uInt16 nId = bDlgMode ? RID_IMG_DLGLIB : RID_IMG_MODLIB; + sal_uInt16 nIdHC = bDlgMode ? RID_IMG_DLGLIB_HC : RID_IMG_MODLIB_HC; SvLBoxEntry* pNewLibEntry = pBasicBox->AddEntry( aLibName, Image( IDEResId( nId ) ), diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index c877b2f35bb2..5c82e3edc90f 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -77,13 +77,13 @@ ExtBasicTreeListBox::~ExtBasicTreeListBox() { } -BOOL __EXPORT ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) +sal_Bool __EXPORT ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( pEntry ) { - USHORT nDepth = GetModel()->GetDepth( pEntry ); + sal_uInt16 nDepth = GetModel()->GetDepth( pEntry ); if ( nDepth >= 2 ) { BasicEntryDescriptor aDesc( GetEntryDescriptor( pEntry ) ); @@ -95,7 +95,7 @@ BOOL __EXPORT ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) ) ) { // allow editing only for libraries, which are not readonly - bRet = TRUE; + bRet = sal_True; } } } @@ -103,25 +103,25 @@ BOOL __EXPORT ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& return bRet; } -BOOL __EXPORT ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ) +sal_Bool __EXPORT ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ) { - BOOL bValid = BasicIDE::IsValidSbxName( rNewText ); + sal_Bool bValid = BasicIDE::IsValidSbxName( rNewText ); if ( !bValid ) { ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); - return FALSE; + return sal_False; } String aCurText( GetEntryText( pEntry ) ); if ( aCurText == rNewText ) // nothing to do - return TRUE; + return sal_True; BasicEntryDescriptor aDesc( GetEntryDescriptor( pEntry ) ); ScriptDocument aDocument( aDesc.GetDocument() ); DBG_ASSERT( aDocument.isValid(), "ExtBasicTreeListBox::EditedEntry: no document!" ); if ( !aDocument.isValid() ) - return FALSE; + return sal_False; String aLibName( aDesc.GetLibName() ); BasicEntryType eType( aDesc.GetType() ); @@ -130,7 +130,7 @@ BOOL __EXPORT ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const Strin : BasicIDE::RenameDialog( this, aDocument, aLibName, aCurText, rNewText ); if ( !bSuccess ) - return FALSE; + return sal_False; BasicIDE::MarkDocumentModified( aDocument ); @@ -148,10 +148,10 @@ BOOL __EXPORT ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const Strin SetEntryText( pEntry, rNewText ); SetCurEntry( pEntry ); SetCurEntry( pEntry ); - Select( pEntry, FALSE ); + Select( pEntry, sal_False ); Select( pEntry ); // damit Handler gerufen wird => Edit updaten - return TRUE; + return sal_True; } @@ -161,7 +161,7 @@ DragDropMode __EXPORT ExtBasicTreeListBox::NotifyStartDrag( TransferDataContaine if ( pEntry ) { - USHORT nDepth = GetModel()->GetDepth( pEntry ); + sal_uInt16 nDepth = GetModel()->GetDepth( pEntry ); if ( nDepth >= 2 ) { nMode_ = SV_DRAGDROP_CTRL_COPY; @@ -179,7 +179,7 @@ DragDropMode __EXPORT ExtBasicTreeListBox::NotifyStartDrag( TransferDataContaine if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) ) { // Get StringResourceManager - Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, aOULibName, TRUE ) ); + Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, aOULibName, sal_True ) ); Reference< XStringResourceManager > xSourceMgr = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); if( xSourceMgr.is() ) @@ -195,18 +195,18 @@ DragDropMode __EXPORT ExtBasicTreeListBox::NotifyStartDrag( TransferDataContaine } -BOOL __EXPORT ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry ) +sal_Bool __EXPORT ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry ) { // don't drop on a BasicManager (nDepth == 0) - USHORT nDepth = pEntry ? GetModel()->GetDepth( pEntry ) : 0; - BOOL bValid = nDepth ? TRUE : FALSE; + sal_uInt16 nDepth = pEntry ? GetModel()->GetDepth( pEntry ) : 0; + sal_Bool bValid = nDepth ? sal_True : sal_False; // don't drop in the same library SvLBoxEntry* pSelected = FirstSelected(); if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) ) - bValid = FALSE; + bValid = sal_False; else if ( ( nDepth == 2 ) && ( GetParent( pEntry ) == GetParent( pSelected ) ) ) - bValid = FALSE; + bValid = sal_False; // don't drop on a library, which is not loaded, readonly or password protected // or which already has a module/dialog with this name @@ -228,14 +228,14 @@ BOOL __EXPORT ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry ) if ( xModLibContainer.is() && xModLibContainer->hasByName( aOUDestLibName ) ) { if ( !xModLibContainer->isLibraryLoaded( aOUDestLibName ) ) - bValid = FALSE; + bValid = sal_False; if ( xModLibContainer->isLibraryReadOnly( aOUDestLibName ) ) - bValid = FALSE; + bValid = sal_False; Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOUDestLibName ) && !xPasswd->isLibraryPasswordVerified( aOUDestLibName ) ) - bValid = FALSE; + bValid = sal_False; } // check if dialog library is not loaded or readonly @@ -243,17 +243,17 @@ BOOL __EXPORT ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry ) if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOUDestLibName ) ) { if ( !xDlgLibContainer->isLibraryLoaded( aOUDestLibName ) ) - bValid = FALSE; + bValid = sal_False; if ( xDlgLibContainer->isLibraryReadOnly( aOUDestLibName ) ) - bValid = FALSE; + bValid = sal_False; } // check, if module/dialog with this name is already existing in target library if ( ( eSourceType == OBJ_TYPE_MODULE && rDestDoc.hasModule( aDestLibName, aSourceName ) ) || ( eSourceType == OBJ_TYPE_DIALOG && rDestDoc.hasDialog( aDestLibName, aSourceName ) ) ) { - bValid = FALSE; + bValid = sal_False; } } @@ -261,20 +261,20 @@ BOOL __EXPORT ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry ) } -BOOL __EXPORT ExtBasicTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos ) +sal_Bool __EXPORT ExtBasicTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos ) { return NotifyCopyingMoving( pTarget, pEntry, - rpNewParent, rNewChildPos, TRUE ); + rpNewParent, rNewChildPos, sal_True ); } -BOOL __EXPORT ExtBasicTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos ) +sal_Bool __EXPORT ExtBasicTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos ) { -// return FALSE; // Wie kopiere ich ein SBX ?! +// return sal_False; // Wie kopiere ich ein SBX ?! return NotifyCopyingMoving( pTarget, pEntry, - rpNewParent, rNewChildPos, FALSE ); + rpNewParent, rNewChildPos, sal_False ); } @@ -286,14 +286,14 @@ void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >& return; // Get StringResourceManager - Reference< container::XNameContainer > xSourceDialogLib( rSourceDoc.getLibrary( E_DIALOGS, rSourceLibName, TRUE ) ); + Reference< container::XNameContainer > xSourceDialogLib( rSourceDoc.getLibrary( E_DIALOGS, rSourceLibName, sal_True ) ); Reference< XStringResourceManager > xSourceMgr = LocalizationMgr::getStringResourceFromDialogLibrary( xSourceDialogLib ); if( !xSourceMgr.is() ) return; bool bSourceLocalized = ( xSourceMgr->getLocales().getLength() > 0 ); - Reference< container::XNameContainer > xDestDialogLib( rDestDoc.getLibrary( E_DIALOGS, rDestLibName, TRUE ) ); + Reference< container::XNameContainer > xDestDialogLib( rDestDoc.getLibrary( E_DIALOGS, rDestLibName, sal_True ) ); Reference< XStringResourceManager > xDestMgr = LocalizationMgr::getStringResourceFromDialogLibrary( xDestDialogLib ); if( !xDestMgr.is() ) @@ -334,13 +334,13 @@ void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >& } -BOOL __EXPORT ExtBasicTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos, BOOL bMove ) +sal_Bool __EXPORT ExtBasicTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove ) { (void)pEntry; DBG_ASSERT( pEntry, "Kein Eintrag?" ); // Hier ASS ok, sollte nicht mit DBG_ASSERT( pTarget, "Kein Ziel?" ); // NULL (ganz vorne) erreicht werden - USHORT nDepth = GetModel()->GetDepth( pTarget ); + sal_uInt16 nDepth = GetModel()->GetDepth( pTarget ); DBG_ASSERT( nDepth, "Tiefe?" ); if ( nDepth == 1 ) { @@ -480,7 +480,7 @@ BOOL __EXPORT ExtBasicTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, Sv return 2; // Aufklappen... } -OrganizeDialog::OrganizeDialog( Window* pParent, INT16 tabId, BasicEntryDescriptor& rDesc ) +OrganizeDialog::OrganizeDialog( Window* pParent, sal_Int16 tabId, BasicEntryDescriptor& rDesc ) :TabDialog( pParent, IDEResId( RID_TD_ORGANIZE ) ) ,aTabCtrl( this, IDEResId( RID_TC_ORGANIZE ) ) ,m_aCurEntry( rDesc ) @@ -513,7 +513,7 @@ OrganizeDialog::OrganizeDialog( Window* pParent, INT16 tabId, BasicEntryDescript __EXPORT OrganizeDialog::~OrganizeDialog() { - for ( USHORT i = 0; i < aTabCtrl.GetPageCount(); i++ ) + for ( sal_uInt16 i = 0; i < aTabCtrl.GetPageCount(); i++ ) delete aTabCtrl.GetTabPage( aTabCtrl.GetPageId( i ) ); }; @@ -529,7 +529,7 @@ short OrganizeDialog::Execute() IMPL_LINK( OrganizeDialog, ActivatePageHdl, TabControl *, pTabCtrl ) { - USHORT nId = pTabCtrl->GetCurPageId(); + sal_uInt16 nId = pTabCtrl->GetCurPageId(); // Wenn TabPage noch nicht erzeugt wurde, dann erzeugen if ( !pTabCtrl->GetTabPage( nId ) ) { @@ -564,7 +564,7 @@ IMPL_LINK( OrganizeDialog, ActivatePageHdl, TabControl *, pTabCtrl ) return 0; } -ObjectPage::ObjectPage( Window * pParent, const ResId& rResId, USHORT nMode ) : +ObjectPage::ObjectPage( Window * pParent, const ResId& rResId, sal_uInt16 nMode ) : TabPage( pParent, rResId ), aLibText( this, IDEResId( RID_STR_LIB ) ), aBasicBox( this, IDEResId( RID_TRLBOX ) ), @@ -594,7 +594,7 @@ ObjectPage::ObjectPage( Window * pParent, const ResId& rResId, USHORT nMode ) : } aBasicBox.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY ); - aBasicBox.EnableInplaceEditing( TRUE ); + aBasicBox.EnableInplaceEditing( sal_True ); aBasicBox.SetMode( nMode ); aBasicBox.SetStyle( WB_BORDER | WB_TABSTOP | WB_HASLINES | WB_HASLINESATROOT | @@ -629,9 +629,9 @@ void ObjectPage::CheckButtons() ::rtl::OUString aOULibName( aDesc.GetLibName() ); String aLibSubName( aDesc.GetLibSubName() ); sal_Bool bVBAEnabled = aDocument.isInVBAMode(); - USHORT nMode = aBasicBox.GetMode(); + sal_uInt16 nMode = aBasicBox.GetMode(); - USHORT nDepth = pCurEntry ? aBasicBox.GetModel()->GetDepth( pCurEntry ) : 0; + sal_uInt16 nDepth = pCurEntry ? aBasicBox.GetModel()->GetDepth( pCurEntry ) : 0; if ( nDepth >= 2 ) { if( bVBAEnabled && ( nMode & BROWSEMODE_MODULES ) && ( nDepth == 2 ) ) @@ -644,7 +644,7 @@ void ObjectPage::CheckButtons() // enable/disable new module/dialog buttons LibraryLocation eLocation( aDesc.GetLocation() ); - BOOL bReadOnly = FALSE; + sal_Bool bReadOnly = sal_False; if ( nDepth > 0 ) { Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY ); @@ -652,7 +652,7 @@ void ObjectPage::CheckButtons() if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) || ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) ) { - bReadOnly = TRUE; + bReadOnly = sal_True; } } if ( bReadOnly || eLocation == LIBRARY_LOCATION_SHARE ) @@ -766,7 +766,7 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName ) return false; // check if the module library is loaded - BOOL bOK = TRUE; + sal_Bool bOK = sal_True; ::rtl::OUString aOULibName( rLibName ); Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) ) @@ -932,7 +932,7 @@ void ObjectPage::DeleteCurrent() -void ObjectPage::EndTabDialog( USHORT nRet ) +void ObjectPage::EndTabDialog( sal_uInt16 nRet ) { DBG_ASSERT( pTabDlg, "TabDlg nicht gesetzt!" ); if ( pTabDlg ) diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index f9efa779357e..93263b020453 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -64,7 +64,7 @@ private: DECL_LINK(OkButtonHandler, Button *); public: - NewObjectDialog(Window * pParent, USHORT nMode, bool bCheckName = false); + NewObjectDialog(Window * pParent, sal_uInt16 nMode, bool bCheckName = false); ~NewObjectDialog(); String GetObjectName() const { return aEdit.GetText(); } @@ -94,18 +94,18 @@ public: class ExtBasicTreeListBox : public BasicTreeListBox { protected: - virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); - virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ); + virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); + virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ); virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData, SvLBoxEntry* pEntry ); - virtual BOOL NotifyAcceptDrop( SvLBoxEntry* pEntry ); + virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* pEntry ); - virtual BOOL NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos ); - virtual BOOL NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos ); - BOOL NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos, BOOL bMove ); + virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos ); + virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos ); + sal_Bool NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove ); public: ExtBasicTreeListBox( Window* pParent, const ResId& rRes ); @@ -118,7 +118,7 @@ public: class BasicCheckBox : public SvTabListBox { private: - USHORT nMode; + sal_uInt16 nMode; SvLBoxButtonData* pCheckButton; ScriptDocument m_aDocument; void Init(); @@ -127,20 +127,20 @@ public: BasicCheckBox( Window* pParent, const ResId& rResId ); ~BasicCheckBox(); - SvLBoxEntry* DoInsertEntry( const String& rStr, ULONG nPos = LISTBOX_APPEND ); + SvLBoxEntry* DoInsertEntry( const String& rStr, sal_uLong nPos = LISTBOX_APPEND ); SvLBoxEntry* FindEntry( const String& rName ); - void CheckEntryPos( ULONG nPos, BOOL bCheck = TRUE ); - BOOL IsChecked( ULONG nPos ) const; + void CheckEntryPos( sal_uLong nPos, sal_Bool bCheck = sal_True ); + sal_Bool IsChecked( sal_uLong nPos ) const; virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image&, SvLBoxButtonKind eButtonKind ); - virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); - virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ); + virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); + virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const String& rNewText ); void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; } - void SetMode( USHORT n ); - USHORT GetMode() const { return nMode; } + void SetMode( sal_uInt16 n ); + sal_uInt16 GetMode() const { return nMode; } }; class LibDialog: public ModalDialog @@ -161,11 +161,11 @@ public: void SetStorageName( const String& rName ); BasicCheckBox& GetLibBox() { return aLibBox; } - BOOL IsReference() const { return aReferenceBox.IsChecked(); } - BOOL IsReplace() const { return aReplaceBox.IsChecked(); } + sal_Bool IsReference() const { return aReferenceBox.IsChecked(); } + sal_Bool IsReplace() const { return aReplaceBox.IsChecked(); } - void EnableReference( BOOL b ) { aReferenceBox.Enable( b ); } - void EnableReplace( BOOL b ) { aReplaceBox.Enable( b ); } + void EnableReference( sal_Bool b ) { aReferenceBox.Enable( b ); } + void EnableReplace( sal_Bool b ) { aReplaceBox.Enable( b ); } }; @@ -176,7 +176,7 @@ private: BasicEntryDescriptor m_aCurEntry; public: - OrganizeDialog( Window* pParent, INT16 tabId, BasicEntryDescriptor& rDesc ); + OrganizeDialog( Window* pParent, sal_Int16 tabId, BasicEntryDescriptor& rDesc ); ~OrganizeDialog(); virtual short Execute(); @@ -202,7 +202,7 @@ protected: void DeleteCurrent(); void NewModule(); void NewDialog(); - void EndTabDialog( USHORT nRet ); + void EndTabDialog( sal_uInt16 nRet ); TabDialog* pTabDlg; @@ -210,7 +210,7 @@ protected: virtual void DeactivatePage(); public: - ObjectPage( Window* pParent, const ResId& rResId, USHORT nMode ); + ObjectPage( Window* pParent, const ResId& rResId, sal_uInt16 nMode ); void SetCurrentEntry( BasicEntryDescriptor& rDesc ); void SetTabDlg( TabDialog* p ) { pTabDlg = p;} @@ -250,11 +250,11 @@ protected: void Export(); void ExportAsPackage( const String& aLibName ); void ExportAsBasic( const String& aLibName ); - void EndTabDialog( USHORT nRet ); + void EndTabDialog( sal_uInt16 nRet ); void FillListBox(); void InsertListBoxEntry( const ScriptDocument& rDocument, LibraryLocation eLocation ); void SetCurLib(); - SvLBoxEntry* ImpInsertLibEntry( const String& rLibName, ULONG nPos ); + SvLBoxEntry* ImpInsertLibEntry( const String& rLibName, sal_uLong nPos ); virtual void ActivatePage(); virtual void DeactivatePage(); diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx index 82030adfccee..9b9006953411 100644 --- a/basctl/source/basicide/objdlg.cxx +++ b/basctl/source/basicide/objdlg.cxx @@ -146,10 +146,10 @@ void __EXPORT ObjectCatalog::Move() IDE_DLL()->GetExtraData()->SetObjectCatalogPos( GetPosPixel() ); } -BOOL __EXPORT ObjectCatalog::Close() +sal_Bool __EXPORT ObjectCatalog::Close() { aCancelHdl.Call( this ); - return TRUE; + return sal_True; } void __EXPORT ObjectCatalog::Resize() @@ -184,7 +184,7 @@ void __EXPORT ObjectCatalog::Resize() IMPL_LINK( ObjectCatalog, ToolBoxHdl, ToolBox*, pToolBox ) { - USHORT nCurItem = pToolBox->GetCurItemId(); + sal_uInt16 nCurItem = pToolBox->GetCurItemId(); switch ( nCurItem ) { case TBITEM_SHOW: @@ -231,9 +231,9 @@ void ObjectCatalog::CheckButtons() SvLBoxEntry* pCurEntry = aMacroTreeList.GetCurEntry(); BasicEntryType eType = pCurEntry ? ((BasicEntry*)pCurEntry->GetUserData())->GetType() : OBJ_TYPE_UNKNOWN; if ( eType == OBJ_TYPE_DIALOG || eType == OBJ_TYPE_MODULE || eType == OBJ_TYPE_METHOD ) - aToolBox.EnableItem( TBITEM_SHOW, TRUE ); + aToolBox.EnableItem( TBITEM_SHOW, sal_True ); else - aToolBox.EnableItem( TBITEM_SHOW, FALSE ); + aToolBox.EnableItem( TBITEM_SHOW, sal_False ); } diff --git a/basctl/source/basicide/objdlg.hxx b/basctl/source/basicide/objdlg.hxx index 796d3cd4fbf6..5f0cbc126641 100644 --- a/basctl/source/basicide/objdlg.hxx +++ b/basctl/source/basicide/objdlg.hxx @@ -80,7 +80,7 @@ protected: DECL_LINK( TreeListHighlightHdl, SvTreeListBox * ); void UpdateFields(); virtual void Move(); - virtual BOOL Close(); + virtual sal_Bool Close(); virtual void Resize(); public: diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index 6b16316d889c..5fbfbf61caca 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -584,7 +584,7 @@ namespace basctl { try { - Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, TRUE ) ); + Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ) ); if ( xLib.is() ) { xLib->removeByName( _rModuleName ); @@ -608,7 +608,7 @@ namespace basctl try { - Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, TRUE ) ); + Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ) ); if ( xLib.is() ) return xLib->hasByName( _rModName ); } @@ -629,7 +629,7 @@ namespace basctl _out_rModuleOrDialog.clear(); try { - Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, TRUE ), UNO_QUERY_THROW ); + Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ), UNO_QUERY_THROW ); if ( xLib->hasByName( _rObjectName ) ) { _out_rModuleOrDialog = xLib->getByName( _rObjectName ); @@ -653,7 +653,7 @@ namespace basctl try { - Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, TRUE ), UNO_QUERY_THROW ); + Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ), UNO_QUERY_THROW ); // get element Any aElement( xLib->getByName( _rOldName ) ); @@ -717,7 +717,7 @@ namespace basctl _out_rNewModuleCode = ::rtl::OUString(); try { - Reference< XNameContainer > xLib( getLibrary( E_SCRIPTS, _rLibName, TRUE ) ); + Reference< XNameContainer > xLib( getLibrary( E_SCRIPTS, _rLibName, sal_True ) ); if ( !xLib.is() || xLib->hasByName( _rModName ) ) return false; @@ -780,7 +780,7 @@ namespace basctl { try { - Reference< XNameContainer > xLib( getLibrary( E_DIALOGS, _rLibName, TRUE ), UNO_QUERY_THROW ); + Reference< XNameContainer > xLib( getLibrary( E_DIALOGS, _rLibName, sal_True ), UNO_QUERY_THROW ); // create dialog _out_rDialogProvider.clear(); @@ -1350,14 +1350,14 @@ namespace basctl ::std::insert_iterator< ::std::set< ::rtl::OUString > >( aUsedNamesCheck, aUsedNamesCheck.begin() ) ); bool bValid = false; - USHORT i = 1; + sal_uInt16 i = 1; while ( !bValid ) { aObjectName = aBaseName; aObjectName += String::CreateFromInt32( i ); if ( aUsedNamesCheck.find( aObjectName ) == aUsedNamesCheck.end() ) - bValid = TRUE; + bValid = sal_True; ++i; } diff --git a/basctl/source/basicide/tbxctl.cxx b/basctl/source/basicide/tbxctl.cxx index 8a7afc6b64c2..d046a2356ec9 100644 --- a/basctl/source/basicide/tbxctl.cxx +++ b/basctl/source/basicide/tbxctl.cxx @@ -65,7 +65,7 @@ IMPL_LINK( PopupWindowTbx, SelectHdl, void*, EMPTYARG ) return 0; } -PopupWindowTbx::PopupWindowTbx( USHORT nId, WindowAlign eAlign, +PopupWindowTbx::PopupWindowTbx( sal_uInt16 nId, WindowAlign eAlign, ResId aRIdWin, ResId aRIdTbx, SfxBindings& rBind ) : SfxPopupWindow ( nId, aRIdWin, rBind ), @@ -117,7 +117,7 @@ PopupWindowTbx::~PopupWindowTbx() |* \************************************************************************/ -TbxControls::TbxControls( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +TbxControls::TbxControls( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { nLastSlot = USHRT_MAX; @@ -138,7 +138,7 @@ SfxPopupWindowType TbxControls::GetPopupWindowType() const return(SFX_POPUPWINDOW_ONTIMEOUT); } -void TbxControls::StateChanged( USHORT nSID, SfxItemState eState, +void TbxControls::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { if( pState ) @@ -146,8 +146,8 @@ void TbxControls::StateChanged( USHORT nSID, SfxItemState eState, SfxAllEnumItem* pItem = PTR_CAST(SfxAllEnumItem, pState); if( pItem ) { - USHORT nLastEnum = pItem->GetValue(); - USHORT nTemp = 0; + sal_uInt16 nLastEnum = pItem->GetValue(); + sal_uInt16 nTemp = 0; switch( nLastEnum ) { case SVX_SNAP_PUSHBUTTON: nTemp = SID_INSERT_PUSHBUTTON; break; @@ -193,7 +193,7 @@ void TbxControls::StateChanged( USHORT nSID, SfxItemState eState, SfxToolBoxControl::StateChanged( nSID, eState,pState ); } -void TbxControls::Select( USHORT nModifier ) +void TbxControls::Select( sal_uInt16 nModifier ) { (void)nModifier; SfxAllEnumItem aItem( SID_CHOOSE_CONTROLS, nLastSlot ); @@ -228,7 +228,7 @@ SfxPopupWindow* TbxControls::CreatePopupWindow() IDEResId( RID_TBXCONTROLS ), IDEResId( RID_TOOLBOX ), GetBindings() ); - pWin->StartPopupMode(&GetToolBox(), TRUE); + pWin->StartPopupMode(&GetToolBox(), sal_True); pWin->Update(); pWin->StartSelection(); pWin->Show(); diff --git a/basctl/source/basicide/tbxctl.hxx b/basctl/source/basicide/tbxctl.hxx index 94dfd32b96e6..f10f10b49640 100644 --- a/basctl/source/basicide/tbxctl.hxx +++ b/basctl/source/basicide/tbxctl.hxx @@ -44,7 +44,7 @@ private: DECL_LINK( SelectHdl, void* ); public: - PopupWindowTbx( USHORT nId, WindowAlign eAlign, + PopupWindowTbx( sal_uInt16 nId, WindowAlign eAlign, ResId aRIdWin, ResId aRIdTbx, SfxBindings& rBind ); ~PopupWindowTbx(); @@ -70,22 +70,22 @@ private: bool bDisabled; }; - USHORT nLastSlot; + sal_uInt16 nLastSlot; protected: - virtual void StateChanged( USHORT nSID, SfxItemState eState, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); public: SFX_DECL_TOOLBOX_CONTROL(); - TbxControls(USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + TbxControls(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); ~TbxControls() {} virtual SfxPopupWindowType GetPopupWindowType() const; virtual SfxPopupWindow* CreatePopupWindow(); using SfxToolBoxControl::Select; - void Select( USHORT nModifier ); + void Select( sal_uInt16 nModifier ); }; diff --git a/basctl/source/basicide/unomodel.hxx b/basctl/source/basicide/unomodel.hxx index 2eb79a34e946..5aa14c17d70e 100644 --- a/basctl/source/basicide/unomodel.hxx +++ b/basctl/source/basicide/unomodel.hxx @@ -50,7 +50,7 @@ public: //XServiceInfo virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) + virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 326098976d87..328bb94d7cc2 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -175,30 +175,30 @@ void DlgEditor::ShowDialog() //---------------------------------------------------------------------------- -BOOL DlgEditor::UnmarkDialog() +sal_Bool DlgEditor::UnmarkDialog() { SdrObject* pDlgObj = pDlgEdModel->GetPage(0)->GetObj(0); SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); - BOOL bWasMarked = pDlgEdView->IsObjMarked( pDlgObj ); + sal_Bool bWasMarked = pDlgEdView->IsObjMarked( pDlgObj ); if( bWasMarked ) - pDlgEdView->MarkObj( pDlgObj, pPgView, TRUE ); + pDlgEdView->MarkObj( pDlgObj, pPgView, sal_True ); return bWasMarked; } //---------------------------------------------------------------------------- -BOOL DlgEditor::RemarkDialog() +sal_Bool DlgEditor::RemarkDialog() { SdrObject* pDlgObj = pDlgEdModel->GetPage(0)->GetObj(0); SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); - BOOL bWasMarked = pDlgEdView->IsObjMarked( pDlgObj ); + sal_Bool bWasMarked = pDlgEdView->IsObjMarked( pDlgObj ); if( !bWasMarked ) - pDlgEdView->MarkObj( pDlgObj, pPgView, FALSE ); + pDlgEdView->MarkObj( pDlgObj, pPgView, sal_False ); return bWasMarked; } @@ -220,12 +220,12 @@ DlgEditor::DlgEditor() ,pFunc(NULL) ,eMode( DLGED_SELECT ) ,eActObj( OBJ_DLG_PUSHBUTTON ) - ,bFirstDraw(FALSE) + ,bFirstDraw(sal_False) ,aGridSize( 100, 100 ) // 100TH_MM - ,bGridVisible(FALSE) - ,bGridSnap(TRUE) - ,bCreateOK(TRUE) - ,bDialogModelChanged(FALSE) + ,bGridVisible(sal_False) + ,bGridSnap(sal_True) + ,bCreateOK(sal_True) + ,bDialogModelChanged(sal_False) ,mnPaintGuard(0) { pDlgEdModel = new DlgEdModel(); @@ -294,17 +294,17 @@ void DlgEditor::SetWindow( Window* pWindow_ ) pDlgEdView = new DlgEdView( pDlgEdModel, pWindow_, this ); pDlgEdView->ShowSdrPage(pDlgEdView->GetModel()->GetPage(0)); - pDlgEdView->SetLayerVisible( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "HiddenLayer" ) ), FALSE ); - pDlgEdView->SetMoveSnapOnlyTopLeft( TRUE ); + pDlgEdView->SetLayerVisible( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "HiddenLayer" ) ), sal_False ); + pDlgEdView->SetMoveSnapOnlyTopLeft( sal_True ); pDlgEdView->SetWorkArea( Rectangle( Point( 0, 0 ), pDlgEdPage->GetSize() ) ); pDlgEdView->SetGridCoarse( aGridSize ); pDlgEdView->SetSnapGridWidth(Fraction(aGridSize.Width(), 1), Fraction(aGridSize.Height(), 1)); pDlgEdView->SetGridSnap( bGridSnap ); pDlgEdView->SetGridVisible( bGridVisible ); - pDlgEdView->SetDragStripes( FALSE ); + pDlgEdView->SetDragStripes( sal_False ); - pDlgEdView->SetDesignMode( TRUE ); + pDlgEdView->SetDesignMode( sal_True ); ::comphelper::disposeComponent( m_xControlContainer ); } @@ -333,8 +333,8 @@ void DlgEditor::InitScrollBars() pHScroll->SetRange( Range( 0, aPgSize.Width() )); pVScroll->SetRange( Range( 0, aPgSize.Height() )); - pHScroll->SetVisibleSize( (ULONG)aOutSize.Width() ); - pVScroll->SetVisibleSize( (ULONG)aOutSize.Height() ); + pHScroll->SetVisibleSize( (sal_uLong)aOutSize.Width() ); + pVScroll->SetVisibleSize( (sal_uLong)aOutSize.Height() ); pHScroll->SetLineSize( aOutSize.Width() / 10 ); pVScroll->SetLineSize( aOutSize.Height() / 10 ); @@ -464,9 +464,9 @@ void DlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoContr } } - bFirstDraw = TRUE; + bFirstDraw = sal_True; - pDlgEdModel->SetChanged( FALSE ); + pDlgEdModel->SetChanged( sal_False ); } void DlgEditor::ResetDialog( void ) @@ -474,13 +474,13 @@ void DlgEditor::ResetDialog( void ) DlgEdForm* pOldDlgEdForm = pDlgEdForm; DlgEdPage* pPage = (DlgEdPage*)pDlgEdModel->GetPage(0); SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); - BOOL bWasMarked = pDlgEdView->IsObjMarked( pOldDlgEdForm ); + sal_Bool bWasMarked = pDlgEdView->IsObjMarked( pOldDlgEdForm ); pDlgEdView->UnmarkAll(); pPage->Clear(); pPage->SetDlgEdForm( NULL ); SetDialog( m_xUnoControlDialogModel ); if( bWasMarked ) - pDlgEdView->MarkObj( pDlgEdForm, pPgView, FALSE ); + pDlgEdView->MarkObj( pDlgEdForm, pPgView, sal_False ); } @@ -516,7 +516,7 @@ void DlgEditor::MouseButtonDown( const MouseEvent& rMEvt ) void DlgEditor::MouseButtonUp( const MouseEvent& rMEvt ) { - BOOL bRet = pFunc->MouseButtonUp( rMEvt ); + sal_Bool bRet = pFunc->MouseButtonUp( rMEvt ); if( (eMode == DLGED_INSERT) ) bCreateOK = bRet; @@ -531,7 +531,7 @@ void DlgEditor::MouseMove( const MouseEvent& rMEvt ) //---------------------------------------------------------------------------- -BOOL DlgEditor::KeyInput( const KeyEvent& rKEvt ) +sal_Bool DlgEditor::KeyInput( const KeyEvent& rKEvt ) { return pFunc->KeyInput( rKEvt ); } @@ -558,7 +558,7 @@ IMPL_LINK( DlgEditor, PaintTimeout, Timer *, EMPTYARG ) pWindow->IsVisible() && (pWindow->GetOutputSize() != aMacSize) ) { - bFirstDraw = FALSE; + bFirstDraw = sal_False; // get property set ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPSet(pDlgEdForm->GetUnoControlModel(), ::com::sun::star::uno::UNO_QUERY); @@ -601,14 +601,14 @@ IMPL_LINK( DlgEditor, PaintTimeout, Timer *, EMPTYARG ) pDlgEdForm->SetSnapRect( Rectangle( aPos, aSize ) ); pDlgEdForm->EndListening(sal_False); pDlgEdForm->SetPropsFromRect(); - pDlgEdForm->GetDlgEditor()->SetDialogModelChanged(TRUE); + pDlgEdForm->GetDlgEditor()->SetDialogModelChanged(sal_True); pDlgEdForm->StartListening(); // set position and size of controls - ULONG nObjCount; + sal_uLong nObjCount; if ( pDlgEdPage && ( ( nObjCount = pDlgEdPage->GetObjCount() ) > 0 ) ) { - for ( ULONG i = 0 ; i < nObjCount ; i++ ) + for ( sal_uLong i = 0 ; i < nObjCount ; i++ ) { SdrObject* pObj = pDlgEdPage->GetObj(i); DlgEdObj* pDlgEdObj = PTR_CAST(DlgEdObj, pObj); @@ -686,9 +686,9 @@ void DlgEditor::SetMode( DlgEdMode eNewMode ) pFunc = new DlgEdFuncSelect( this ); if ( eNewMode == DLGED_READONLY ) - pDlgEdModel->SetReadOnly( TRUE ); + pDlgEdModel->SetReadOnly( sal_True ); else - pDlgEdModel->SetReadOnly( FALSE ); + pDlgEdModel->SetReadOnly( sal_False ); } if ( eNewMode == DLGED_TEST ) @@ -699,7 +699,7 @@ void DlgEditor::SetMode( DlgEdMode eNewMode ) //---------------------------------------------------------------------------- -void DlgEditor::SetInsertObj( USHORT eObj ) +void DlgEditor::SetInsertObj( sal_uInt16 eObj ) { eActObj = eObj; @@ -709,7 +709,7 @@ void DlgEditor::SetInsertObj( USHORT eObj ) //---------------------------------------------------------------------------- -USHORT DlgEditor::GetInsertObj() const +sal_uInt16 DlgEditor::GetInsertObj() const { return eActObj; } @@ -797,8 +797,8 @@ void DlgEditor::Copy() } // insert control models of marked objects into clipboard dialog model - ULONG nMark = pDlgEdView->GetMarkedObjectList().GetMarkCount(); - for( ULONG i = 0; i < nMark; i++ ) + sal_uLong nMark = pDlgEdView->GetMarkedObjectList().GetMarkCount(); + for( sal_uLong i = 0; i < nMark; i++ ) { SdrObject* pObj = pDlgEdView->GetMarkedObjectList().GetMark(i)->GetMarkedSdrObj(); DlgEdObj* pDlgEdObj = PTR_CAST(DlgEdObj, pObj); @@ -1095,7 +1095,7 @@ void DlgEditor::Paste() // mark object SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); - pDlgEdView->MarkObj( pCtrlObj, pPgView, FALSE, TRUE); + pDlgEdView->MarkObj( pCtrlObj, pPgView, sal_False, sal_True); } // center marked objects in dialog editor form @@ -1107,7 +1107,7 @@ void DlgEditor::Paste() pDlgEdView->MarkListHasChanged(); // dialog model changed - SetDialogModelChanged(TRUE); + SetDialogModelChanged(sal_True); } } } @@ -1122,9 +1122,9 @@ void DlgEditor::Delete() return; // remove control models of marked objects from dialog model - ULONG nMark = pDlgEdView->GetMarkedObjectList().GetMarkCount(); + sal_uLong nMark = pDlgEdView->GetMarkedObjectList().GetMarkCount(); - for( ULONG i = 0; i < nMark; i++ ) + for( sal_uLong i = 0; i < nMark; i++ ) { SdrObject* pObj = pDlgEdView->GetMarkedObjectList().GetMark(i)->GetMarkedSdrObj(); DlgEdObj* pDlgEdObj = PTR_CAST(DlgEdObj, pObj); @@ -1165,7 +1165,7 @@ void DlgEditor::Delete() pDlgEdView->BrkAction(); - BOOL bDlgMarked = UnmarkDialog(); + sal_Bool bDlgMarked = UnmarkDialog(); pDlgEdView->DeleteMarked(); if( bDlgMarked ) RemarkDialog(); @@ -1173,9 +1173,9 @@ void DlgEditor::Delete() //---------------------------------------------------------------------------- -BOOL DlgEditor::IsPasteAllowed() +sal_Bool DlgEditor::IsPasteAllowed() { - BOOL bPaste = FALSE; + sal_Bool bPaste = sal_False; // get clipboard Reference< datatransfer::clipboard::XClipboard > xClipboard = GetWindow()->GetClipboard(); @@ -1189,7 +1189,7 @@ BOOL DlgEditor::IsPasteAllowed() { if ( xTransf->isDataFlavorSupported( m_ClipboardDataFlavors[0] ) ) { - bPaste = TRUE; + bPaste = sal_True; } } } @@ -1216,7 +1216,7 @@ void DlgEditor::UpdatePropertyBrowserDelayed() //---------------------------------------------------------------------------- -BOOL DlgEditor::IsModified() const +sal_Bool DlgEditor::IsModified() const { return pDlgEdModel->IsChanged() || bDialogModelChanged; } @@ -1225,8 +1225,8 @@ BOOL DlgEditor::IsModified() const void DlgEditor::ClearModifyFlag() { - pDlgEdModel->SetChanged( FALSE ); - bDialogModelChanged = FALSE; + pDlgEdModel->SetChanged( sal_False ); + bDialogModelChanged = sal_False; } //---------------------------------------------------------------------------- diff --git a/basctl/source/dlged/dlgedfunc.cxx b/basctl/source/dlged/dlgedfunc.cxx index 576fd4cab99d..d15a1798467f 100644 --- a/basctl/source/dlged/dlgedfunc.cxx +++ b/basctl/source/dlged/dlgedfunc.cxx @@ -110,37 +110,37 @@ DlgEdFunc::~DlgEdFunc() //---------------------------------------------------------------------------- -BOOL DlgEdFunc::MouseButtonDown( const MouseEvent& ) +sal_Bool DlgEdFunc::MouseButtonDown( const MouseEvent& ) { - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- -BOOL DlgEdFunc::MouseButtonUp( const MouseEvent& ) +sal_Bool DlgEdFunc::MouseButtonUp( const MouseEvent& ) { aScrollTimer.Stop(); - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- -BOOL DlgEdFunc::MouseMove( const MouseEvent& ) +sal_Bool DlgEdFunc::MouseMove( const MouseEvent& ) { - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- -BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) +sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; SdrView* pView = pParent->GetView(); Window* pWindow = pParent->GetWindow(); KeyCode aCode = rKEvt.GetKeyCode(); - USHORT nCode = aCode.GetCode(); + sal_uInt16 nCode = aCode.GetCode(); switch ( nCode ) { @@ -149,7 +149,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) if ( pView->IsAction() ) { pView->BrkAction(); - bReturn = TRUE; + bReturn = sal_True; } else if ( pView->AreObjectsMarked() ) { @@ -160,7 +160,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) else pView->UnmarkAll(); - bReturn = TRUE; + bReturn = sal_True; } } break; @@ -179,7 +179,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) if ( pView->AreObjectsMarked() ) pView->MakeVisible( pView->GetAllMarkedRect(), *pWindow ); - bReturn = TRUE; + bReturn = sal_True; } else if ( aCode.IsMod1() ) { @@ -196,7 +196,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) pView->MakeVisible( aVisRect, *pWindow ); } - bReturn = TRUE; + bReturn = sal_True; } } break; @@ -303,13 +303,13 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) if ( pView->IsDragObj() ) { FASTBOOL bWasNoSnap = rDragStat.IsNoSnap(); - BOOL bWasSnapEnabled = pView->IsSnapEnabled(); + sal_Bool bWasSnapEnabled = pView->IsSnapEnabled(); // switch snapping off if ( !bWasNoSnap ) - ((SdrDragStat&)rDragStat).SetNoSnap( TRUE ); + ((SdrDragStat&)rDragStat).SetNoSnap( sal_True ); if ( bWasSnapEnabled ) - pView->SetSnapEnabled( FALSE ); + pView->SetSnapEnabled( sal_False ); pView->MovAction( aEndPoint ); pView->EndDragObj(); @@ -345,7 +345,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) } } - bReturn = TRUE; + bReturn = sal_True; } break; default: @@ -365,30 +365,30 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) DlgEdFuncInsert::DlgEdFuncInsert( DlgEditor* pParent_ ) : DlgEdFunc( pParent_ ) { - pParent_->GetView()->SetCreateMode( TRUE ); + pParent_->GetView()->SetCreateMode( sal_True ); } //---------------------------------------------------------------------------- DlgEdFuncInsert::~DlgEdFuncInsert() { - pParent->GetView()->SetEditMode( TRUE ); + pParent->GetView()->SetEditMode( sal_True ); } //---------------------------------------------------------------------------- -BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) { if( !rMEvt.IsLeft() ) - return TRUE; + return sal_True; SdrView* pView = pParent->GetView(); Window* pWindow= pParent->GetWindow(); pView->SetActualWin( pWindow ); Point aPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() ); - USHORT nHitLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() ); - USHORT nDrgLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() ); + sal_uInt16 nHitLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() ); + sal_uInt16 nDrgLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() ); pWindow->CaptureMouse(); @@ -413,12 +413,12 @@ BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) pParent->ShowProperties(); } - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- -BOOL DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) +sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) { DlgEdFunc::MouseButtonUp( rMEvt ); @@ -435,34 +435,34 @@ BOOL DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) if ( !pView->AreObjectsMarked() ) { - USHORT nHitLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() ); + sal_uInt16 nHitLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() ); Point aPos( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); pView->MarkObj(aPos, nHitLog); } if( pView->AreObjectsMarked() ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } else { if ( pView->IsDragObj() ) pView->EndDragObj( rMEvt.IsMod1() ); - return TRUE; + return sal_True; } } //---------------------------------------------------------------------------- -BOOL DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt ) +sal_Bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt ) { SdrView* pView = pParent->GetView(); Window* pWindow= pParent->GetWindow(); pView->SetActualWin( pWindow ); Point aPos( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); - USHORT nHitLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() ); + sal_uInt16 nHitLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() ); if ( pView->IsAction() ) { @@ -472,14 +472,14 @@ BOOL DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt ) pWindow->SetPointer( pView->GetPreferedPointer( aPos, pWindow, nHitLog ) ); - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- DlgEdFuncSelect::DlgEdFuncSelect( DlgEditor* pParent_ ) : DlgEdFunc( pParent_ ), - bMarkAction(FALSE) + bMarkAction(sal_False) { } @@ -491,15 +491,15 @@ DlgEdFuncSelect::~DlgEdFuncSelect() //---------------------------------------------------------------------------- -BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) { // get view from parent SdrView* pView = pParent->GetView(); Window* pWindow = pParent->GetWindow(); pView->SetActualWin( pWindow ); - USHORT nDrgLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() ); - USHORT nHitLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() ); + sal_uInt16 nDrgLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() ); + sal_uInt16 nHitLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() ); Point aMDPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() ); if ( rMEvt.IsLeft() && rMEvt.GetClicks() == 1 ) @@ -539,7 +539,7 @@ BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) { // select object pView->BegMarkObj(aMDPos); - bMarkAction = TRUE; + bMarkAction = sal_True; } } } @@ -550,12 +550,12 @@ BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) pParent->ShowProperties(); } - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- -BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt ) +sal_Bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt ) { DlgEdFunc::MouseButtonUp( rMEvt ); @@ -565,7 +565,7 @@ BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt ) pView->SetActualWin( pWindow ); Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); - USHORT nHitLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() ); + sal_uInt16 nHitLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() ); if ( rMEvt.IsLeft() ) { @@ -584,7 +584,7 @@ BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt ) } } -// USHORT nClicks = rMEvt.GetClicks(); +// sal_uInt16 nClicks = rMEvt.GetClicks(); // if (nClicks == 2) // { // if ( pView->AreObjectsMarked() ) @@ -601,24 +601,24 @@ BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt ) // } // } - bMarkAction = FALSE; + bMarkAction = sal_False; pWindow->SetPointer( pView->GetPreferedPointer( aPnt, pWindow, nHitLog ) ); pWindow->ReleaseMouse(); - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- -BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) +sal_Bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) { SdrView* pView = pParent->GetView(); Window* pWindow= pParent->GetWindow(); pView->SetActualWin( pWindow ); Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); - USHORT nHitLog = USHORT ( pWindow->PixelToLogic(Size(3,0)).Width() ); + sal_uInt16 nHitLog = sal_uInt16 ( pWindow->PixelToLogic(Size(3,0)).Width() ); if ( pView->IsAction() ) { @@ -631,7 +631,7 @@ BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) pWindow->SetPointer( pView->GetPreferedPointer( aPnt, pWindow, nHitLog ) ); - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 5af7519f85f0..45b41c831769 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -578,7 +578,7 @@ void DlgEdObj::UpdateStep() sal_Int32 nStep = GetStep(); SdrLayerAdmin& rLayerAdmin = GetModel()->GetLayerAdmin(); - SdrLayerID nHiddenLayerId = rLayerAdmin.GetLayerID( String( RTL_CONSTASCII_USTRINGPARAM( "HiddenLayer" ) ), FALSE ); + SdrLayerID nHiddenLayerId = rLayerAdmin.GetLayerID( String( RTL_CONSTASCII_USTRINGPARAM( "HiddenLayer" ) ), sal_False ); SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID( rLayerAdmin.GetControlLayerName(), sal_False ); if( nCurStep ) @@ -1027,7 +1027,7 @@ void DlgEdObj::NbcMove( const Size& rSize ) StartListening(); // dialog model changed - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE); + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); } //---------------------------------------------------------------------------- @@ -1046,7 +1046,7 @@ void DlgEdObj::NbcResize(const Point& rRef, const Fraction& xFract, const Fracti StartListening(); // dialog model changed - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE); + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); } //---------------------------------------------------------------------------- @@ -1145,7 +1145,7 @@ void DlgEdObj::SetDefaults() } // dialog model changed - pDlgEdForm->GetDlgEditor()->SetDialogModelChanged( TRUE ); + pDlgEdForm->GetDlgEditor()->SetDialogModelChanged( sal_True ); } } @@ -1252,7 +1252,7 @@ void SAL_CALL DlgEdObj::_propertyChange( const ::com::sun::star::beans::Propert return; // dialog model changed - pDlgEditor->SetDialogModelChanged(TRUE); + pDlgEditor->SetDialogModelChanged(sal_True); // update position and size if ( evt.PropertyName == DLGED_PROP_POSITIONX || evt.PropertyName == DLGED_PROP_POSITIONY || @@ -1302,11 +1302,11 @@ void SAL_CALL DlgEdObj::_elementInserted(const ::com::sun::star::container::Cont // dialog model changed if ( ISA(DlgEdForm) ) { - ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(TRUE); + ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(sal_True); } else { - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE); + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); } } } @@ -1320,11 +1320,11 @@ void SAL_CALL DlgEdObj::_elementReplaced(const ::com::sun::star::container::Cont // dialog model changed if ( ISA(DlgEdForm) ) { - ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(TRUE); + ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(sal_True); } else { - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE); + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); } } } @@ -1338,11 +1338,11 @@ void SAL_CALL DlgEdObj::_elementRemoved(const ::com::sun::star::container::Conta // dialog model changed if ( ISA(DlgEdForm) ) { - ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(TRUE); + ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(sal_True); } else { - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(TRUE); + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); } } } @@ -1600,12 +1600,12 @@ void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt ) void DlgEdForm::UpdateStep() { - ULONG nObjCount; + sal_uLong nObjCount; SdrPage* pSdrPage = GetPage(); if ( pSdrPage && ( ( nObjCount = pSdrPage->GetObjCount() ) > 0 ) ) { - for ( ULONG i = 0 ; i < nObjCount ; i++ ) + for ( sal_uLong i = 0 ; i < nObjCount ; i++ ) { SdrObject* pObj = pSdrPage->GetObj(i); DlgEdObj* pDlgEdObj = PTR_CAST(DlgEdObj, pObj); @@ -1798,7 +1798,7 @@ void DlgEdForm::NbcMove( const Size& rSize ) } // dialog model changed - GetDlgEditor()->SetDialogModelChanged(TRUE); + GetDlgEditor()->SetDialogModelChanged(sal_True); } //---------------------------------------------------------------------------- @@ -1822,7 +1822,7 @@ void DlgEdForm::NbcResize(const Point& rRef, const Fraction& xFract, const Fract } // dialog model changed - GetDlgEditor()->SetDialogModelChanged(TRUE); + GetDlgEditor()->SetDialogModelChanged(sal_True); } //---------------------------------------------------------------------------- @@ -1838,7 +1838,7 @@ FASTBOOL DlgEdForm::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) SetPropsFromRect(); // dialog model changed - GetDlgEditor()->SetDialogModelChanged(TRUE); + GetDlgEditor()->SetDialogModelChanged(sal_True); // start listening StartListening(); diff --git a/basctl/source/dlged/dlgedpage.cxx b/basctl/source/dlged/dlgedpage.cxx index eaabbfef0ff2..a2cd7dfbc364 100644 --- a/basctl/source/dlged/dlgedpage.cxx +++ b/basctl/source/dlged/dlgedpage.cxx @@ -68,7 +68,7 @@ SdrPage* DlgEdPage::Clone() const //---------------------------------------------------------------------------- -SdrObject* DlgEdPage::SetObjectOrdNum(ULONG nOldObjNum, ULONG nNewObjNum) +SdrObject* DlgEdPage::SetObjectOrdNum(sal_uLong nOldObjNum, sal_uLong nNewObjNum) { SdrObject* pObj = SdrPage::SetObjectOrdNum( nOldObjNum, nNewObjNum ); diff --git a/basctl/source/dlged/dlgedview.cxx b/basctl/source/dlged/dlgedview.cxx index da8bbc638a1e..e57abbcaeaea 100644 --- a/basctl/source/dlged/dlgedview.cxx +++ b/basctl/source/dlged/dlgedview.cxx @@ -149,7 +149,7 @@ void DlgEdView::MakeVisible( const Rectangle& rRect, Window& rWin ) //---------------------------------------------------------------------------- -SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, USHORT nTol) +SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt16 nTol) { DlgEdObj* pDlgEdObj = dynamic_cast< DlgEdObj* >(pRetval); @@ -198,7 +198,7 @@ SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, USHORT n return pRetval; } -SdrObject* DlgEdView::CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const +SdrObject* DlgEdView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const { // call parent SdrObject* pRetval = SdrView::CheckSingleSdrObjectHit(rPnt, nTol, pObj, pPV, nOptions, pMVisLay); diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index 41c86699203b..085191370425 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -86,8 +86,8 @@ namespace { { nStartPos = aBoundary.endPos; String sWord( rText.Copy( - (USHORT)aBoundary.startPos, - (USHORT)aBoundary.endPos - (USHORT)aBoundary.startPos ) ); + (sal_uInt16)aBoundary.startPos, + (sal_uInt16)aBoundary.endPos - (sal_uInt16)aBoundary.startPos ) ); long nTemp = rWin.GetCtrlTextWidth( sWord ); if ( nTemp > nWidth ) nWidth = nTemp; @@ -145,7 +145,7 @@ void ManageLanguageDialog::Init() m_aMakeDefPB.SetClickHdl( LINK( this, ManageLanguageDialog, MakeDefHdl ) ); m_aLanguageLB.SetSelectHdl( LINK( this, ManageLanguageDialog, SelectHdl ) ); - m_aLanguageLB.EnableMultiSelection( TRUE ); + m_aLanguageLB.EnableMultiSelection( sal_True ); CalcInfoSize(); } @@ -188,7 +188,7 @@ void ManageLanguageDialog::FillLanguageBox() Locale aDefaultLocale = m_pLocalizationMgr->getStringResourceManager()->getDefaultLocale(); Sequence< Locale > aLocaleSeq = m_pLocalizationMgr->getStringResourceManager()->getLocales(); const Locale* pLocale = aLocaleSeq.getConstArray(); - INT32 i, nCount = aLocaleSeq.getLength(); + sal_Int32 i, nCount = aLocaleSeq.getLength(); for ( i = 0; i < nCount; ++i ) { bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] ); @@ -199,7 +199,7 @@ void ManageLanguageDialog::FillLanguageBox() sLanguage += ' '; sLanguage += m_sDefLangStr; } - USHORT nPos = m_aLanguageLB.InsertEntry( sLanguage ); + sal_uInt16 nPos = m_aLanguageLB.InsertEntry( sLanguage ); m_aLanguageLB.SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) ); } } @@ -209,7 +209,7 @@ void ManageLanguageDialog::FillLanguageBox() void ManageLanguageDialog::ClearLanguageBox() { - USHORT i, nCount = m_aLanguageLB.GetEntryCount(); + sal_uInt16 i, nCount = m_aLanguageLB.GetEntryCount(); for ( i = 0; i < nCount; ++i ) { LanguageEntry* pEntry = (LanguageEntry*)( m_aLanguageLB.GetEntryData(i) ); @@ -244,13 +244,13 @@ IMPL_LINK( ManageLanguageDialog, DeleteHdl, Button *, EMPTYARG ) aQBox.SetButtonText( RET_OK, m_sDeleteStr ); if ( aQBox.Execute() == RET_OK ) { - USHORT i, nCount = m_aLanguageLB.GetSelectEntryCount(); - USHORT nPos = m_aLanguageLB.GetSelectEntryPos(); + sal_uInt16 i, nCount = m_aLanguageLB.GetSelectEntryCount(); + sal_uInt16 nPos = m_aLanguageLB.GetSelectEntryPos(); // remove locales Sequence< Locale > aLocaleSeq( nCount ); for ( i = 0; i < nCount; ++i ) { - USHORT nSelPos = m_aLanguageLB.GetSelectEntryPos(i); + sal_uInt16 nSelPos = m_aLanguageLB.GetSelectEntryPos(i); LanguageEntry* pEntry = (LanguageEntry*)( m_aLanguageLB.GetEntryData( nSelPos ) ); if ( pEntry ) aLocaleSeq[i] = pEntry->m_aLocale; @@ -271,7 +271,7 @@ IMPL_LINK( ManageLanguageDialog, DeleteHdl, Button *, EMPTYARG ) IMPL_LINK( ManageLanguageDialog, MakeDefHdl, Button *, EMPTYARG ) { - USHORT nPos = m_aLanguageLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aLanguageLB.GetSelectEntryPos(); LanguageEntry* pSelectEntry = (LanguageEntry*)( m_aLanguageLB.GetEntryData( nPos ) ); if ( pSelectEntry && !pSelectEntry->m_bIsDefault ) { @@ -290,7 +290,7 @@ IMPL_LINK( ManageLanguageDialog, MakeDefHdl, Button *, EMPTYARG ) IMPL_LINK( ManageLanguageDialog, SelectHdl, ListBox *, EMPTYARG ) { - USHORT nCount = m_aLanguageLB.GetEntryCount(); + sal_uInt16 nCount = m_aLanguageLB.GetEntryCount(); bool bEmpty = ( !nCount || m_aLanguageLB.GetEntryPos( m_sCreateLangStr ) != LISTBOX_ENTRY_NOTFOUND ); bool bSelect = ( m_aLanguageLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ); @@ -345,18 +345,18 @@ SetDefaultLanguageDialog::~SetDefaultLanguageDialog() void SetDefaultLanguageDialog::FillLanguageBox() { // fill list with all languages - m_pLanguageLB->SetLanguageList( LANG_LIST_ALL, FALSE ); + m_pLanguageLB->SetLanguageList( LANG_LIST_ALL, sal_False ); // remove the already localized languages Sequence< Locale > aLocaleSeq = m_pLocalizationMgr->getStringResourceManager()->getLocales(); const Locale* pLocale = aLocaleSeq.getConstArray(); - INT32 i, nCount = aLocaleSeq.getLength(); + sal_Int32 i, nCount = aLocaleSeq.getLength(); for ( i = 0; i < nCount; ++i ) m_pLanguageLB->RemoveLanguage( SvxLocaleToLanguage( pLocale[i] ) ); // fill checklistbox if not in default mode if ( m_pLocalizationMgr->isLibraryLocalized() ) { - USHORT j, nCount_ = m_pLanguageLB->GetEntryCount(); + sal_uInt16 j, nCount_ = m_pLanguageLB->GetEntryCount(); for ( j = 0; j < nCount_; ++j ) { m_pCheckLangLB->InsertEntry( @@ -401,7 +401,7 @@ void SetDefaultLanguageDialog::CalcInfoSize() Sequence< Locale > SetDefaultLanguageDialog::GetLocales() const { bool bNotLocalized = !m_pLocalizationMgr->isLibraryLocalized(); - INT32 nSize = bNotLocalized ? 1 : m_pCheckLangLB->GetCheckedEntryCount(); + sal_Int32 nSize = bNotLocalized ? 1 : m_pCheckLangLB->GetCheckedEntryCount(); Sequence< Locale > aLocaleSeq( nSize ); if ( bNotLocalized ) { @@ -411,13 +411,13 @@ Sequence< Locale > SetDefaultLanguageDialog::GetLocales() const } else { - USHORT i, nCount = static_cast< USHORT >( m_pCheckLangLB->GetEntryCount() ); - INT32 j = 0; + sal_uInt16 i, nCount = static_cast< sal_uInt16 >( m_pCheckLangLB->GetEntryCount() ); + sal_Int32 j = 0; for ( i = 0; i < nCount; ++i ) { if ( m_pCheckLangLB->IsChecked(i) ) { - LanguageType eType = LanguageType( (ULONG)m_pCheckLangLB->GetEntryData(i) ); + LanguageType eType = LanguageType( (sal_uLong)m_pCheckLangLB->GetEntryData(i) ); Locale aLocale; SvxLanguageToLocale( aLocale, eType ); aLocaleSeq[j++] = aLocale; diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index c55e5bd721d5..f59f921a0739 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -75,7 +75,7 @@ protected: virtual void DoInit(); virtual void DoScroll( ScrollBar* pCurScrollBar ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); - void InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground); + void InitSettings(sal_Bool bFont,sal_Bool bForeground,sal_Bool bBackground); public: TYPEINFO(); @@ -91,22 +91,23 @@ public: DlgEdModel* GetModel() const; DlgEdPage* GetPage() const; DlgEdView* GetView() const; - BOOL RenameDialog( const String& rNewName ); + sal_Bool RenameDialog( const String& rNewName ); void DisableBrowser(); void UpdateBrowser(); - BOOL SaveDialog(); - BOOL ImportDialog(); + sal_Bool SaveDialog(); + sal_Bool ImportDialog(); virtual String GetTitle(); virtual BasicEntryDescriptor CreateEntryDescriptor(); - virtual void SetReadOnly( BOOL bReadOnly ); - virtual BOOL IsReadOnly(); + virtual void SetReadOnly( sal_Bool bReadOnly ); + virtual sal_Bool IsReadOnly(); virtual void StoreData(); - virtual BOOL IsModified(); - virtual BOOL IsPasteAllowed(); + virtual sal_Bool IsModified(); + virtual sal_Bool IsPasteAllowed(); - virtual SfxUndoManager* GetUndoManager(); + virtual ::svl::IUndoManager* + GetUndoManager(); // return number of pages to be printed virtual sal_Int32 countPages( Printer* pPrinter ); // print page diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index 07bc2dfa3149..de0cb539694c 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -50,7 +50,7 @@ //---------------------------------------------------------------------------- -const ULONG BASICIDE_UI_FEATURE_SHOW_BROWSER = 0x00000001; +const sal_uLong BASICIDE_UI_FEATURE_SHOW_BROWSER = 0x00000001; //---------------------------------------------------------------------------- @@ -84,13 +84,13 @@ class BasicIDEShell :public SfxViewShell { friend class JavaDebuggingListenerImpl; friend class LocalizationMgr; -friend BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName ); +friend sal_Bool implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName ); friend bool BasicIDE::RemoveDialog( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName ); ObjectCatalog* pObjectCatalog; IDEWindowTable aIDEWindowTable; - USHORT nCurKey; + sal_uInt16 nCurKey; IDEBaseWindow* pCurWin; ScriptDocument m_aCurDocument; String m_aCurLibName; @@ -100,10 +100,10 @@ friend bool BasicIDE::RemoveDialog( const ScriptDocument& rDocument, const Strin ScrollBar aVScrollBar; ScrollBarBox aScrollBarBox; BasicIDETabBar* pTabBar; - BOOL bTabBarSplitted; - BOOL bCreatingWindow; + sal_Bool bTabBarSplitted; + sal_Bool bCreatingWindow; ModulWindowLayout* pModulLayout; - BOOL m_bAppBasicModified; + sal_Bool m_bAppBasicModified; ::basctl::DocumentEventNotifier m_aNotifier; friend class ContainerListenerImpl; @@ -114,13 +114,13 @@ friend class ContainerListenerImpl; void InitTabBar(); void InitScrollBars(); void CheckWindows(); - void RemoveWindows( const ScriptDocument& rDocument, const String& rLibName, BOOL bDestroy ); + void RemoveWindows( const ScriptDocument& rDocument, const String& rLibName, sal_Bool bDestroy ); void UpdateWindows(); - void ShowObjectDialog( BOOL bShow, BOOL bCreateOrDestroy ); + void ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy ); void InvalidateBasicIDESlots(); - void StoreAllWindowData( BOOL bPersistent = TRUE ); + void StoreAllWindowData( sal_Bool bPersistent = sal_True ); void SetMDITitle(); - void EnableScrollbars( BOOL bEnable ); + void EnableScrollbars( sal_Bool bEnable ); void SetCurLib( const ScriptDocument& rDocument, String aLibName, bool bUpdateWindows = true , bool bCheck = true ); void SetCurLibForLocalization( const ScriptDocument& rDocument, String aLibName ); @@ -136,28 +136,28 @@ protected: virtual void AdjustPosSizePixel( const Point &rPos, const Size &rSize ); virtual void OuterResizePixel( const Point &rPos, const Size &rSize ); virtual Size GetOptimalSizePixel() const; - USHORT InsertWindowInTable( IDEBaseWindow* pNewWin ); - virtual USHORT PrepareClose( BOOL bUI, BOOL bForBrowsing ); + sal_uInt16 InsertWindowInTable( IDEBaseWindow* pNewWin ); + virtual sal_uInt16 PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ); - void SetCurWindow( IDEBaseWindow* pNewWin, BOOL bUpdateTabBar = FALSE, BOOL bRememberAsCurrent = TRUE ); + void SetCurWindow( IDEBaseWindow* pNewWin, sal_Bool bUpdateTabBar = sal_False, sal_Bool bRememberAsCurrent = sal_True ); void ManageToolbars(); - void RemoveWindow( IDEBaseWindow* pWindow, BOOL bDestroy, BOOL bAllowChangeCurWindow = TRUE ); + void RemoveWindow( IDEBaseWindow* pWindow, sal_Bool bDestroy, sal_Bool bAllowChangeCurWindow = sal_True ); void ArrangeTabBar(); ModulWindow* CreateBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName ); DialogWindow* CreateDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName ); - ModulWindow* FindBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, BOOL bCreateIfNotExist, BOOL bFindSuspended = FALSE ); + ModulWindow* FindBasWin( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended = sal_False ); ModulWindow* ShowActiveModuleWindow( StarBASIC* pBasic ); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ); - virtual void Activate(BOOL bMDI); - virtual void Deactivate(BOOL bMDI); + virtual void Activate(sal_Bool bMDI); + virtual void Deactivate(sal_Bool bMDI); virtual void Move(); - virtual void ShowCursor( FASTBOOL bOn = TRUE ); + virtual void ShowCursor( FASTBOOL bOn = sal_True ); void CreateModulWindowLayout(); void DestroyModulWindowLayout(); @@ -197,15 +197,16 @@ public: SdrView* GetCurDlgView() const; - SfxUndoManager* GetUndoManager(); + ::svl::IUndoManager* + GetUndoManager(); virtual com::sun::star::uno::Reference< com::sun::star::view::XRenderable > GetRenderable(); - // virtual USHORT Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog = 0 ); - virtual SfxPrinter* GetPrinter( BOOL bCreate ); - virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); - virtual String GetSelectionText( BOOL bCompleteWords ); - virtual BOOL HasSelection( BOOL bText ) const; + // virtual sal_uInt16 Print( SfxProgress &rProgress, sal_Bool bIsAPI, PrintDialog *pPrintDialog = 0 ); + virtual SfxPrinter* GetPrinter( sal_Bool bCreate ); + virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); + virtual String GetSelectionText( sal_Bool bCompleteWords ); + virtual sal_Bool HasSelection( sal_Bool bText ) const; void GetState( SfxItemSet& ); void ExecuteGlobal( SfxRequest& rReq ); @@ -220,13 +221,13 @@ public: ModulWindowLayout* GetLayoutWindow() const { return pModulLayout; } - IDEBaseWindow* FindWindow( const ScriptDocument& rDocument, const String& rLibName = String(), const String& rName = String(), USHORT nType = BASICIDE_TYPE_UNKNOWN, BOOL bFindSuspended = FALSE ); - DialogWindow* FindDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName, BOOL bCreateIfNotExist, BOOL bFindSuspended = FALSE ); + IDEBaseWindow* FindWindow( const ScriptDocument& rDocument, const String& rLibName = String(), const String& rName = String(), sal_uInt16 nType = BASICIDE_TYPE_UNKNOWN, sal_Bool bFindSuspended = sal_False ); + DialogWindow* FindDlgWin( const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName, sal_Bool bCreateIfNotExist, sal_Bool bFindSuspended = sal_False ); IDEBaseWindow* FindApplicationWindow(); - BOOL NextPage( BOOL bPrev = FALSE ); + sal_Bool NextPage( sal_Bool bPrev = sal_False ); - BOOL IsAppBasicModified() const { return m_bAppBasicModified; } - void SetAppBasicModified( BOOL bModified = TRUE ) { m_bAppBasicModified = bModified; } + sal_Bool IsAppBasicModified() const { return m_bAppBasicModified; } + void SetAppBasicModified( sal_Bool bModified = sal_True ) { m_bAppBasicModified = bModified; } // For Dialog Drag&Drop in Dialog Organizer static void CopyDialogResources( diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx index d4fa39fcb67d..e446ba4b1e99 100644 --- a/basctl/source/inc/basobj.hxx +++ b/basctl/source/inc/basobj.hxx @@ -51,7 +51,7 @@ struct BasicIDE_Impl; namespace BasicIDE { - void Organize( INT16 tabId ); + void Organize( sal_Int16 tabId ); // Hilfsmethoden fuer den allg. Gebrauch: @@ -61,10 +61,10 @@ namespace BasicIDE StarBASIC* FindBasic( const SbxVariable* pVar ); void StopBasic(); long HandleBasicError( StarBASIC* pBasic ); - void BasicStopped( BOOL* pbAppWindowDisabled = 0, BOOL* pbDispatcherLocked = 0, USHORT* pnWaitCount = 0, + void BasicStopped( sal_Bool* pbAppWindowDisabled = 0, sal_Bool* pbDispatcherLocked = 0, sal_uInt16* pnWaitCount = 0, SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 ); - BOOL IsValidSbxName( const String& rName ); + sal_Bool IsValidSbxName( const String& rName ); BasicManager* FindBasicManager( StarBASIC* pLib ); @@ -95,13 +95,13 @@ namespace BasicIDE // new methods for macros ::rtl::OUString ChooseMacro( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxLimitToDocument, - BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc ); + sal_Bool bChooseOnly, const ::rtl::OUString& rMacroDesc ); ::com::sun::star::uno::Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, const String& rLibName, const String& rModName ) throw( ::com::sun::star::container::NoSuchElementException ); - BOOL HasMethod( + sal_Bool HasMethod( const ScriptDocument& rDocument, const String& rLibName, const String& rModName, const String& rMethName ); // new methods for dialogs diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index bc588fccaf14..1a5283ae0691 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -70,26 +70,26 @@ sal_Int32 searchEOL( const ::rtl::OUString& rStr, sal_Int32 fromIndex ); struct BasicStatus { -// BOOL bCompiled : 1; - BOOL bIsRunning : 1; - BOOL bError : 1; - BOOL bIsInReschedule : 1; - USHORT nBasicFlags; +// sal_Bool bCompiled : 1; + sal_Bool bIsRunning : 1; + sal_Bool bError : 1; + sal_Bool bIsInReschedule : 1; + sal_uInt16 nBasicFlags; BasicStatus() { - bIsRunning = FALSE; bError = FALSE; - nBasicFlags = 0; bIsInReschedule = FALSE; } + bIsRunning = sal_False; bError = sal_False; + nBasicFlags = 0; bIsInReschedule = sal_False; } }; struct BreakPoint { - BOOL bEnabled; - BOOL bTemp; - ULONG nLine; - ULONG nStopAfter; - ULONG nHitCount; + sal_Bool bEnabled; + sal_Bool bTemp; + sal_uLong nLine; + sal_uLong nStopAfter; + sal_uLong nHitCount; - BreakPoint( ULONG nL ) { nLine = nL; nStopAfter = 0; nHitCount = 0; bEnabled = TRUE; bTemp = FALSE; } + BreakPoint( sal_uLong nL ) { nLine = nL; nStopAfter = 0; nHitCount = 0; bEnabled = sal_True; bTemp = sal_False; } }; @@ -98,10 +98,10 @@ class BasicDockingWindow : public DockingWindow Rectangle aFloatingPosAndSize; protected: - virtual BOOL Docking( const Point& rPos, Rectangle& rRect ); - virtual void EndDocking( const Rectangle& rRect, BOOL bFloatMode ); + virtual sal_Bool Docking( const Point& rPos, Rectangle& rRect ); + virtual void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ); virtual void ToggleFloatingMode(); - virtual BOOL PrepareToggleFloatingMode(); + virtual sal_Bool PrepareToggleFloatingMode(); virtual void StartDocking(); public: @@ -126,8 +126,8 @@ public: void transfer(BreakPointList & rList); void InsertSorted( BreakPoint* pBrk ); - BreakPoint* FindBreakPoint( ULONG nLine ); - void AdjustBreakPoints( ULONG nLine, BOOL bInserted ); + BreakPoint* FindBreakPoint( sal_uLong nLine ); + void AdjustBreakPoints( sal_uLong nLine, sal_Bool bInserted ); void SetBreakPointsInBasic( SbModule* pModule ); void ResetHitCount(); }; @@ -136,7 +136,7 @@ public: class TabBarSortHelper { public: - USHORT nPageId; + sal_uInt16 nPageId; String aPageText; bool operator<(const TabBarSortHelper& rComp) const { return (aPageText.CompareIgnoreCaseToAscii( rComp.aPageText ) == COMPARE_LESS); } @@ -164,9 +164,13 @@ public: #define BASWIN_INRESCHEDULE 0x08 class Printer; -class SfxUndoManager; class BasicEntryDescriptor; +namespace svl +{ + class IUndoManager; +} + class IDEBaseWindow : public Window { private: @@ -174,7 +178,7 @@ private: ScrollBar* pShellVScrollBar; DECL_LINK( ScrollHdl, ScrollBar * ); - BYTE nStatus; + sal_uInt8 nStatus; ScriptDocument m_aDocument; String m_aLibName; @@ -202,7 +206,7 @@ public: virtual void StoreData(); virtual void UpdateData(); - virtual BOOL CanClose(); + virtual sal_Bool CanClose(); // return number of pages to be printed virtual sal_Int32 countPages( Printer* pPrinter ) = 0; @@ -213,30 +217,31 @@ public: String CreateQualifiedName(); virtual BasicEntryDescriptor CreateEntryDescriptor() = 0; - virtual BOOL IsModified(); - virtual BOOL IsPasteAllowed(); + virtual sal_Bool IsModified(); + virtual sal_Bool IsPasteAllowed(); - virtual BOOL AllowUndo(); + virtual sal_Bool AllowUndo(); - virtual void SetReadOnly( BOOL bReadOnly ); - virtual BOOL IsReadOnly(); + virtual void SetReadOnly( sal_Bool bReadOnly ); + virtual sal_Bool IsReadOnly(); - BYTE GetStatus() { return nStatus; } - void SetStatus( BYTE n ) { nStatus = n; } - void AddStatus( BYTE n ) { nStatus = nStatus | n; } - void ClearStatus( BYTE n ) { nStatus = nStatus & ~n; } + sal_uInt8 GetStatus() { return nStatus; } + void SetStatus( sal_uInt8 n ) { nStatus = n; } + void AddStatus( sal_uInt8 n ) { nStatus = nStatus | n; } + void ClearStatus( sal_uInt8 n ) { nStatus = nStatus & ~n; } virtual Window* GetLayoutWindow(); - virtual SfxUndoManager* GetUndoManager(); + virtual ::svl::IUndoManager* + GetUndoManager(); - virtual USHORT GetSearchOptions(); + virtual sal_uInt16 GetSearchOptions(); virtual void BasicStarted(); virtual void BasicStopped(); - BOOL IsSuspended() const - { return ( nStatus & BASWIN_SUSPENDED ) ? TRUE : FALSE; } + sal_Bool IsSuspended() const + { return ( nStatus & BASWIN_SUSPENDED ) ? sal_True : sal_False; } const ScriptDocument& GetDocument() const { return m_aDocument; } @@ -274,10 +279,10 @@ private: ScriptDocument m_aDocument; String m_aLibName; String m_aCurrentName; - USHORT m_nCurrentType; + sal_uInt16 m_nCurrentType; public: - LibInfoItem( const ScriptDocument& rDocument, const String& rLibName, const String& rCurrentName, USHORT nCurrentType ); + LibInfoItem( const ScriptDocument& rDocument, const String& rLibName, const String& rCurrentName, sal_uInt16 nCurrentType ); ~LibInfoItem(); LibInfoItem( const LibInfoItem& rItem ); @@ -287,7 +292,7 @@ public: GetDocument() const { return m_aDocument; } const String& GetLibName() const { return m_aLibName; } const String& GetCurrentName() const { return m_aCurrentName; } - USHORT GetCurrentType() const { return m_nCurrentType; } + sal_uInt16 GetCurrentType() const { return m_nCurrentType; } }; class LibInfos @@ -317,16 +322,16 @@ public: LibInfoItem* GetInfo( const LibInfoKey& rKey ); }; -void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BOOL bEraseTrailingEmptyLines = FALSE ); +void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sal_Bool bEraseTrailingEmptyLines = sal_False ); String CreateMgrAndLibStr( const String& rMgrName, const String& rLibName ); -ULONG CalcLineCount( SvStream& rStream ); - -BOOL QueryReplaceMacro( const String& rName, Window* pParent = 0 ); -BOOL QueryDelMacro( const String& rName, Window* pParent = 0 ); -BOOL QueryDelDialog( const String& rName, Window* pParent = 0 ); -BOOL QueryDelModule( const String& rName, Window* pParent = 0 ); -BOOL QueryDelLib( const String& rName, BOOL bRef = FALSE, Window* pParent = 0 ); -BOOL QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const String& rLibName, String& rPassword, BOOL bRepeat = FALSE, BOOL bNewTitle = FALSE ); +sal_uLong CalcLineCount( SvStream& rStream ); + +sal_Bool QueryReplaceMacro( const String& rName, Window* pParent = 0 ); +sal_Bool QueryDelMacro( const String& rName, Window* pParent = 0 ); +sal_Bool QueryDelDialog( const String& rName, Window* pParent = 0 ); +sal_Bool QueryDelModule( const String& rName, Window* pParent = 0 ); +sal_Bool QueryDelLib( const String& rName, sal_Bool bRef = sal_False, Window* pParent = 0 ); +sal_Bool QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const String& rLibName, String& rPassword, sal_Bool bRepeat = sal_False, sal_Bool bNewTitle = sal_False ); class ModuleInfoHelper { diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx index 1444bab59c65..cf8f8a1df350 100644 --- a/basctl/source/inc/dlged.hxx +++ b/basctl/source/inc/dlged.hxx @@ -117,15 +117,15 @@ protected: Window* pWindow; DlgEdFunc* pFunc; DlgEdMode eMode; - USHORT eActObj; - BOOL bFirstDraw; + sal_uInt16 eActObj; + sal_Bool bFirstDraw; Size aGridSize; - BOOL bGridVisible; - BOOL bGridSnap; - BOOL bCreateOK; + sal_Bool bGridVisible; + sal_Bool bGridSnap; + sal_Bool bCreateOK; Timer aPaintTimer; Rectangle aPaintRect; - BOOL bDialogModelChanged; + sal_Bool bDialogModelChanged; Timer aMarkTimer; long mnPaintGuard; @@ -167,33 +167,33 @@ public: void ShowDialog(); - BOOL UnmarkDialog(); - BOOL RemarkDialog(); + sal_Bool UnmarkDialog(); + sal_Bool RemarkDialog(); - void SetDialogModelChanged( BOOL bChanged = TRUE ) { bDialogModelChanged = bChanged; } - BOOL IsDialogModelChanged() const { return bDialogModelChanged; } + void SetDialogModelChanged( sal_Bool bChanged = sal_True ) { bDialogModelChanged = bChanged; } + sal_Bool IsDialogModelChanged() const { return bDialogModelChanged; } - BOOL IsModified() const; + sal_Bool IsModified() const; void ClearModifyFlag(); void MouseButtonDown( const MouseEvent& rMEvt ); void MouseButtonUp( const MouseEvent& rMEvt ); void MouseMove( const MouseEvent& rMEvt ); void Paint( const Rectangle& rRect ); - BOOL KeyInput( const KeyEvent& rKEvt ); + sal_Bool KeyInput( const KeyEvent& rKEvt ); void SetMode( DlgEdMode eMode ); - void SetInsertObj( USHORT eObj ); - USHORT GetInsertObj() const; + void SetInsertObj( sal_uInt16 eObj ); + sal_uInt16 GetInsertObj() const; void CreateDefaultObject(); DlgEdMode GetMode() const { return eMode; } - BOOL IsCreateOK() const { return bCreateOK; } + sal_Bool IsCreateOK() const { return bCreateOK; } void Cut(); void Copy(); void Paste(); void Delete(); - BOOL IsPasteAllowed(); + sal_Bool IsPasteAllowed(); void ShowProperties(); void UpdatePropertyBrowserDelayed(); diff --git a/basctl/source/inc/dlgeddef.hxx b/basctl/source/inc/dlgeddef.hxx index d93ef9001959..e2ccf72158c8 100644 --- a/basctl/source/inc/dlgeddef.hxx +++ b/basctl/source/inc/dlgeddef.hxx @@ -31,36 +31,36 @@ #include <tools/solar.h> -const UINT32 DlgInventor = UINT32('D')*0x00000001+ - UINT32('L')*0x00000100+ - UINT32('G')*0x00010000+ - UINT32('1')*0x01000000; +const sal_uInt32 DlgInventor = sal_uInt32('D')*0x00000001+ + sal_uInt32('L')*0x00000100+ + sal_uInt32('G')*0x00010000+ + sal_uInt32('1')*0x01000000; -#define OBJ_DLG_CONTROL ((UINT16) 1) -#define OBJ_DLG_DIALOG ((UINT16) 2) -#define OBJ_DLG_PUSHBUTTON ((UINT16) 3) -#define OBJ_DLG_RADIOBUTTON ((UINT16) 4) -#define OBJ_DLG_CHECKBOX ((UINT16) 5) -#define OBJ_DLG_LISTBOX ((UINT16) 6) -#define OBJ_DLG_COMBOBOX ((UINT16) 7) -#define OBJ_DLG_GROUPBOX ((UINT16) 8) -#define OBJ_DLG_EDIT ((UINT16) 9) -#define OBJ_DLG_FIXEDTEXT ((UINT16)10) -#define OBJ_DLG_IMAGECONTROL ((UINT16)11) -#define OBJ_DLG_PROGRESSBAR ((UINT16)12) -#define OBJ_DLG_HSCROLLBAR ((UINT16)13) -#define OBJ_DLG_VSCROLLBAR ((UINT16)14) -#define OBJ_DLG_HFIXEDLINE ((UINT16)15) -#define OBJ_DLG_VFIXEDLINE ((UINT16)16) -#define OBJ_DLG_DATEFIELD ((UINT16)17) -#define OBJ_DLG_TIMEFIELD ((UINT16)18) -#define OBJ_DLG_NUMERICFIELD ((UINT16)19) -#define OBJ_DLG_CURRENCYFIELD ((UINT16)20) -#define OBJ_DLG_FORMATTEDFIELD ((UINT16)21) -#define OBJ_DLG_PATTERNFIELD ((UINT16)22) -#define OBJ_DLG_FILECONTROL ((UINT16)23) -#define OBJ_DLG_TREECONTROL ((UINT16)24) +#define OBJ_DLG_CONTROL ((sal_uInt16) 1) +#define OBJ_DLG_DIALOG ((sal_uInt16) 2) +#define OBJ_DLG_PUSHBUTTON ((sal_uInt16) 3) +#define OBJ_DLG_RADIOBUTTON ((sal_uInt16) 4) +#define OBJ_DLG_CHECKBOX ((sal_uInt16) 5) +#define OBJ_DLG_LISTBOX ((sal_uInt16) 6) +#define OBJ_DLG_COMBOBOX ((sal_uInt16) 7) +#define OBJ_DLG_GROUPBOX ((sal_uInt16) 8) +#define OBJ_DLG_EDIT ((sal_uInt16) 9) +#define OBJ_DLG_FIXEDTEXT ((sal_uInt16)10) +#define OBJ_DLG_IMAGECONTROL ((sal_uInt16)11) +#define OBJ_DLG_PROGRESSBAR ((sal_uInt16)12) +#define OBJ_DLG_HSCROLLBAR ((sal_uInt16)13) +#define OBJ_DLG_VSCROLLBAR ((sal_uInt16)14) +#define OBJ_DLG_HFIXEDLINE ((sal_uInt16)15) +#define OBJ_DLG_VFIXEDLINE ((sal_uInt16)16) +#define OBJ_DLG_DATEFIELD ((sal_uInt16)17) +#define OBJ_DLG_TIMEFIELD ((sal_uInt16)18) +#define OBJ_DLG_NUMERICFIELD ((sal_uInt16)19) +#define OBJ_DLG_CURRENCYFIELD ((sal_uInt16)20) +#define OBJ_DLG_FORMATTEDFIELD ((sal_uInt16)21) +#define OBJ_DLG_PATTERNFIELD ((sal_uInt16)22) +#define OBJ_DLG_FILECONTROL ((sal_uInt16)23) +#define OBJ_DLG_TREECONTROL ((sal_uInt16)24) // control properties #define DLGED_PROP_BACKGROUNDCOLOR ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BackgroundColor" ) ) diff --git a/basctl/source/inc/dlgedfunc.hxx b/basctl/source/inc/dlgedfunc.hxx index d603321f782e..fea2c23fc85c 100644 --- a/basctl/source/inc/dlgedfunc.hxx +++ b/basctl/source/inc/dlgedfunc.hxx @@ -52,10 +52,10 @@ public: DlgEdFunc( DlgEditor* pParent ); virtual ~DlgEdFunc(); - virtual BOOL MouseButtonDown( const MouseEvent& rMEvt ); - virtual BOOL MouseButtonUp( const MouseEvent& rMEvt ); - virtual BOOL MouseMove( const MouseEvent& rMEvt ); - virtual BOOL KeyInput( const KeyEvent& rKEvt ); + virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); + virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt ); + virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); + virtual sal_Bool KeyInput( const KeyEvent& rKEvt ); }; //============================================================================ @@ -68,9 +68,9 @@ public: DlgEdFuncInsert( DlgEditor* pParent ); ~DlgEdFuncInsert(); - virtual BOOL MouseButtonDown( const MouseEvent& rMEvt ); - virtual BOOL MouseButtonUp( const MouseEvent& rMEvt ); - virtual BOOL MouseMove( const MouseEvent& rMEvt ); + virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); + virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt ); + virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); }; //============================================================================ @@ -80,15 +80,15 @@ public: class DlgEdFuncSelect : public DlgEdFunc { protected: - BOOL bMarkAction; + sal_Bool bMarkAction; public: DlgEdFuncSelect( DlgEditor* pParent ); ~DlgEdFuncSelect(); - virtual BOOL MouseButtonDown( const MouseEvent& rMEvt ); - virtual BOOL MouseButtonUp( const MouseEvent& rMEvt ); - virtual BOOL MouseMove( const MouseEvent& rMEvt ); + virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); + virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt ); + virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); }; diff --git a/basctl/source/inc/dlgedmod.hxx b/basctl/source/inc/dlgedmod.hxx index 5a0118fe25eb..b4579ec7298a 100644 --- a/basctl/source/inc/dlgedmod.hxx +++ b/basctl/source/inc/dlgedmod.hxx @@ -54,7 +54,7 @@ public: DlgEdModel(); virtual ~DlgEdModel(); - virtual void DlgEdModelChanged( FASTBOOL bChanged = TRUE ); + virtual void DlgEdModelChanged( FASTBOOL bChanged = sal_True ); virtual SdrPage* AllocPage(FASTBOOL bMasterPage); diff --git a/basctl/source/inc/dlgedpage.hxx b/basctl/source/inc/dlgedpage.hxx index ec1f7d10600b..e14d6cbe2831 100644 --- a/basctl/source/inc/dlgedpage.hxx +++ b/basctl/source/inc/dlgedpage.hxx @@ -45,7 +45,7 @@ private: public: TYPEINFO(); - DlgEdPage( DlgEdModel& rModel, FASTBOOL bMasterPage=FALSE ); + DlgEdPage( DlgEdModel& rModel, FASTBOOL bMasterPage=sal_False ); DlgEdPage( const DlgEdPage& ); virtual ~DlgEdPage(); @@ -55,7 +55,7 @@ public: void SetDlgEdForm( DlgEdForm* pForm ) { pDlgEdForm = pForm; } DlgEdForm* GetDlgEdForm() const { return pDlgEdForm; } - virtual SdrObject* SetObjectOrdNum(ULONG nOldObjNum, ULONG nNewObjNum); + virtual SdrObject* SetObjectOrdNum(sal_uLong nOldObjNum, sal_uLong nNewObjNum); }; #endif //_BASCTL_DLGEDPAGE_HXX diff --git a/basctl/source/inc/dlgedview.hxx b/basctl/source/inc/dlgedview.hxx index 003c56721cba..9842ed65e3d3 100644 --- a/basctl/source/inc/dlgedview.hxx +++ b/basctl/source/inc/dlgedview.hxx @@ -54,7 +54,7 @@ public: protected: // overloaded to handle HitTest for some objects special using SdrView::CheckSingleSdrObjectHit; - virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const; + virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const; }; #endif //_BASCTL_DLGEDVIEW_HXX diff --git a/basctl/source/inc/iderid.hxx b/basctl/source/inc/iderid.hxx index ef88708b734e..e5ac72a7a58e 100644 --- a/basctl/source/inc/iderid.hxx +++ b/basctl/source/inc/iderid.hxx @@ -33,7 +33,7 @@ class IDEResId: public ResId { public: - IDEResId( USHORT nId ); + IDEResId( sal_uInt16 nId ); }; diff --git a/basctl/source/inc/sbxitem.hxx b/basctl/source/inc/sbxitem.hxx index f863b00aac7c..ec50979e7189 100644 --- a/basctl/source/inc/sbxitem.hxx +++ b/basctl/source/inc/sbxitem.hxx @@ -30,12 +30,12 @@ #include "scriptdocument.hxx" #include <svl/poolitem.hxx> -const USHORT BASICIDE_TYPE_UNKNOWN = 0; -const USHORT BASICIDE_TYPE_SHELL = 1; -const USHORT BASICIDE_TYPE_LIBRARY = 2; -const USHORT BASICIDE_TYPE_MODULE = 3; -const USHORT BASICIDE_TYPE_DIALOG = 4; -const USHORT BASICIDE_TYPE_METHOD = 5; +const sal_uInt16 BASICIDE_TYPE_UNKNOWN = 0; +const sal_uInt16 BASICIDE_TYPE_SHELL = 1; +const sal_uInt16 BASICIDE_TYPE_LIBRARY = 2; +const sal_uInt16 BASICIDE_TYPE_MODULE = 3; +const sal_uInt16 BASICIDE_TYPE_DIALOG = 4; +const sal_uInt16 BASICIDE_TYPE_METHOD = 5; class SbxItem : public SfxPoolItem @@ -44,12 +44,12 @@ class SbxItem : public SfxPoolItem String m_aLibName; String m_aName; String m_aMethodName; - USHORT m_nType; + sal_uInt16 m_nType; public: TYPEINFO(); - SbxItem( USHORT nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, USHORT nType ); - SbxItem( USHORT nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, const String& aMethodName, USHORT nType ); + SbxItem( sal_uInt16 nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, sal_uInt16 nType ); + SbxItem( sal_uInt16 nWhich, const ScriptDocument& rDocument, const String& aLibName, const String& aName, const String& aMethodName, sal_uInt16 nType ); SbxItem( const SbxItem& ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; @@ -68,8 +68,8 @@ public: const String& GetMethodName() const { return m_aMethodName; } void SetMethodName( const String& aMethodName ) { m_aMethodName = aMethodName; } - USHORT GetType() const { return m_nType; } - void SetType( USHORT nType ) { m_nType = nType; } + sal_uInt16 GetType() const { return m_nType; } + void SetType( sal_uInt16 nType ) { m_nType = nType; } }; diff --git a/basctl/util/makefile.mk b/basctl/util/makefile.mk index e690a5a20a3b..1719a7c9c078 100644 --- a/basctl/util/makefile.mk +++ b/basctl/util/makefile.mk @@ -54,6 +54,7 @@ SHL1STDLIBS= \ $(SVXCORELIB) \ $(SVXLIB) \ $(SFX2LIB) \ + $(FWELIB) \ $(BASICLIB) \ $(SVTOOLLIB) \ $(TKLIB) \ diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 25ccabf2789b..80847fd8ae27 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -36,7 +36,6 @@ #include <dialmgr.hxx> #include <sfx2/msg.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/app.hxx> #include <sfx2/filedlghelper.hxx> #include <sfx2/minfitem.hxx> @@ -113,7 +112,7 @@ static ::rtl::OUString MEDIATYPE_PROPNAME = ::rtl::OUString::creat static ::rtl::OUString MEDIATYPE_UICONFIG = ::rtl::OUString::createFromAscii("application/vnd.sun.xml.ui.configuration" ); //----------------------------------------------- -static USHORT __FAR_DATA KEYCODE_ARRAY[] = +static sal_uInt16 __FAR_DATA KEYCODE_ARRAY[] = { KEY_F1 , KEY_F2 , @@ -573,7 +572,7 @@ static USHORT __FAR_DATA KEYCODE_ARRAY[] = KEY_DELETE | KEY_SHIFT | KEY_MOD1 | KEY_MOD2 }; -static USHORT KEYCODE_ARRAY_SIZE = (sizeof(KEYCODE_ARRAY) / sizeof(KEYCODE_ARRAY[0])); +static sal_uInt16 KEYCODE_ARRAY_SIZE = (sizeof(KEYCODE_ARRAY) / sizeof(KEYCODE_ARRAY[0])); //----------------------------------------------- // seems to be needed to layout the list box, which shows all @@ -590,20 +589,20 @@ class SfxAccCfgLBoxString_Impl : public SvLBoxString { public: SfxAccCfgLBoxString_Impl( SvLBoxEntry* pEntry, - USHORT nFlags, + sal_uInt16 nFlags, const String& sText ); virtual ~SfxAccCfgLBoxString_Impl(); virtual void Paint(const Point& aPos , SvLBox& rDevice, - USHORT nFlags , + sal_uInt16 nFlags , SvLBoxEntry* pEntry ); }; //----------------------------------------------- SfxAccCfgLBoxString_Impl::SfxAccCfgLBoxString_Impl( SvLBoxEntry* pEntry, - USHORT nFlags, + sal_uInt16 nFlags, const String& sText ) : SvLBoxString(pEntry, nFlags, sText) { @@ -617,7 +616,7 @@ SfxAccCfgLBoxString_Impl::~SfxAccCfgLBoxString_Impl() //----------------------------------------------- void SfxAccCfgLBoxString_Impl::Paint(const Point& aPos , SvLBox& rDevice, - USHORT /*nFlags*/, + sal_uInt16 /*nFlags*/, SvLBoxEntry* pEntry ) { /*/ ??? realy needed !!! @@ -658,8 +657,8 @@ void SfxAccCfgTabListBox_Impl::InitEntry( SvLBoxEntry* pEntry , void SfxAccCfgTabListBox_Impl::KeyInput(const KeyEvent& aKey) { KeyCode aCode1 = aKey.GetKeyCode(); - USHORT nCode1 = aCode1.GetCode(); - USHORT nMod1 = aCode1.GetModifier(); + sal_uInt16 nCode1 = aCode1.GetCode(); + sal_uInt16 nMod1 = aCode1.GetModifier(); // is it related to our list box ? if ( @@ -677,8 +676,8 @@ void SfxAccCfgTabListBox_Impl::KeyInput(const KeyEvent& aKey) TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData(); if (pUserData) { - USHORT nCode2 = pUserData->m_aKey.GetCode(); - USHORT nMod2 = pUserData->m_aKey.GetModifier(); + sal_uInt16 nCode2 = pUserData->m_aKey.GetCode(); + sal_uInt16 nMod2 = pUserData->m_aKey.GetModifier(); if ( (nCode1 == nCode2) && (nMod1 == nMod2 ) @@ -755,7 +754,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( Window* pParent, const SfxIt // detect max keyname width long nMaxWidth = 0; - for ( USHORT i = 0; i < KEYCODE_ARRAY_SIZE; ++i ) + for ( sal_uInt16 i = 0; i < KEYCODE_ARRAY_SIZE; ++i ) { long nTmp = GetTextWidth( KeyCode( KEYCODE_ARRAY[i] ).GetName() ); if ( nTmp > nMaxWidth ) @@ -888,9 +887,9 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler // Insert all editable accelerators into list box. It is possible // that some accelerators are not mapped on the current system/keyboard // but we don't want to lose these mappings. - USHORT c1 = KEYCODE_ARRAY_SIZE; - USHORT i1 = 0; - USHORT nListPos = 0; + sal_uInt16 c1 = KEYCODE_ARRAY_SIZE; + sal_uInt16 i1 = 0; + sal_uInt16 nListPos = 0; for (i1=0; i1<c1; ++i1) { KeyCode aKey = KEYCODE_ARRAY[i1]; @@ -906,7 +905,7 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler css::uno::Sequence< css::awt::KeyEvent > lKeys = xAccMgr->getAllKeyEvents(); sal_Int32 c2 = lKeys.getLength(); sal_Int32 i2 = 0; - USHORT nCol = aEntriesBox.TabCount()-1; + sal_uInt16 nCol = aEntriesBox.TabCount()-1; for (i2=0; i2<c2; ++i2) { @@ -914,7 +913,7 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler ::rtl::OUString sCommand = xAccMgr->getCommandByKeyEvent(aAWTKey); String sLabel = GetLabel4Command(sCommand); KeyCode aKeyCode = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(aAWTKey); - USHORT nPos = MapKeyCodeToPos(aKeyCode); + sal_uInt16 nPos = MapKeyCodeToPos(aKeyCode); if (nPos == LISTBOX_ENTRY_NOTFOUND) continue; @@ -930,12 +929,12 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler } // Map the VCL hardcoded key codes and mark them as not changeable - ULONG c3 = Application::GetReservedKeyCodeCount(); - ULONG i3 = 0; + sal_uLong c3 = Application::GetReservedKeyCodeCount(); + sal_uLong i3 = 0; for (i3=0; i3<c3; ++i3) { const KeyCode* pKeyCode = Application::GetReservedKeyCode(i3); - USHORT nPos = MapKeyCodeToPos(*pKeyCode); + sal_uInt16 nPos = MapKeyCodeToPos(*pKeyCode); if (nPos == LISTBOX_ENTRY_NOTFOUND) continue; @@ -1015,10 +1014,10 @@ IMPL_LINK(SfxAcceleratorConfigPage, Default, PushButton*, EMPTYARG) if (xReset.is()) xReset->reset(); - aEntriesBox.SetUpdateMode(FALSE); + aEntriesBox.SetUpdateMode(sal_False); ResetConfig(); Init(m_xAct); - aEntriesBox.SetUpdateMode(TRUE); + aEntriesBox.SetUpdateMode(sal_True); aEntriesBox.Invalidate(); aEntriesBox.Select(aEntriesBox.GetEntry(0, 0)); @@ -1028,7 +1027,7 @@ IMPL_LINK(SfxAcceleratorConfigPage, Default, PushButton*, EMPTYARG) //----------------------------------------------- IMPL_LINK( SfxAcceleratorConfigPage, ChangeHdl, Button*, EMPTYARG ) { - USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); + sal_uInt16 nPos = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); String sNewCommand = pFunctionBox->GetCurCommand(); String sLabel = pFunctionBox->GetCurLabel(); @@ -1036,7 +1035,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, ChangeHdl, Button*, EMPTYARG ) sLabel = GetLabel4Command(sNewCommand); pEntry->m_sCommand = sNewCommand; - USHORT nCol = aEntriesBox.TabCount() - 1; + sal_uInt16 nCol = aEntriesBox.TabCount() - 1; aEntriesBox.SetEntryText(sLabel, nPos, nCol); ((Link &) pFunctionBox->GetSelectHdl()).Call( pFunctionBox ); @@ -1047,11 +1046,11 @@ IMPL_LINK( SfxAcceleratorConfigPage, ChangeHdl, Button*, EMPTYARG ) IMPL_LINK( SfxAcceleratorConfigPage, RemoveHdl, Button *, EMPTYARG ) { // get selected entry - USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); + sal_uInt16 nPos = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); // remove function name from selected entry - USHORT nCol = aEntriesBox.TabCount() - 1; + sal_uInt16 nCol = aEntriesBox.TabCount() - 1; aEntriesBox.SetEntryText( String(), nPos, nCol ); pEntry->m_sCommand = ::rtl::OUString(); @@ -1066,17 +1065,17 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox ) Help::ShowBalloon( this, Point(), String() ); if ( pListBox == &aEntriesBox ) { - USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); + sal_uInt16 nPos = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() ); TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); ::rtl::OUString sPossibleNewCommand = pFunctionBox->GetCurCommand(); - aRemoveButton.Enable( FALSE ); - aChangeButton.Enable( FALSE ); + aRemoveButton.Enable( sal_False ); + aChangeButton.Enable( sal_False ); if (pEntry->m_bIsConfigurable) { if (pEntry->isConfigured()) - aRemoveButton.Enable( TRUE ); + aRemoveButton.Enable( sal_True ); aChangeButton.Enable( pEntry->m_sCommand != sPossibleNewCommand ); } } @@ -1084,25 +1083,25 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox ) { pGroupLBox->GroupSelected(); if ( !pFunctionBox->FirstSelected() ) - aChangeButton.Enable( FALSE ); + aChangeButton.Enable( sal_False ); } else if ( pListBox == pFunctionBox ) { - aRemoveButton.Enable( FALSE ); - aChangeButton.Enable( FALSE ); + aRemoveButton.Enable( sal_False ); + aChangeButton.Enable( sal_False ); // #i36994 First selected can return zero! SvLBoxEntry* pLBEntry = aEntriesBox.FirstSelected(); if ( pLBEntry != 0 ) { - USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( pLBEntry ); + sal_uInt16 nPos = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( pLBEntry ); TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData(); ::rtl::OUString sPossibleNewCommand = pFunctionBox->GetCurCommand(); if (pEntry->m_bIsConfigurable) { if (pEntry->isConfigured()) - aRemoveButton.Enable( TRUE ); + aRemoveButton.Enable( sal_True ); aChangeButton.Enable( pEntry->m_sCommand != sPossibleNewCommand ); } @@ -1115,9 +1114,9 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox ) if ( pUserData && pUserData->m_sCommand == sPossibleNewCommand ) { TAccInfo* pU1 = new TAccInfo(-1, -1, pUserData->m_aKey); - SvLBoxEntry* pE1 = aKeyBox.InsertEntry( pUserData->m_aKey.GetName(), 0L, TRUE, LIST_APPEND ); + SvLBoxEntry* pE1 = aKeyBox.InsertEntry( pUserData->m_aKey.GetName(), 0L, sal_True, LIST_APPEND ); pE1->SetUserData(pU1); - pE1->EnableChildsOnDemand( FALSE ); + pE1->EnableChildsOnDemand( sal_False ); } pIt = aEntriesBox.Next(pIt); } @@ -1128,7 +1127,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox ) // goto selected "key" entry of the key box SvLBoxEntry* pE2 = 0; TAccInfo* pU2 = 0; - USHORT nP2 = LISTBOX_ENTRY_NOTFOUND; + sal_uInt16 nP2 = LISTBOX_ENTRY_NOTFOUND; SvLBoxEntry* pE3 = 0; pE2 = aKeyBox.FirstSelected(); @@ -1162,10 +1161,10 @@ IMPL_LINK( SfxAcceleratorConfigPage, RadioHdl, RadioButton *, EMPTYARG ) if ( m_xAct.is() && ( xOld == m_xAct ) ) return 0; - aEntriesBox.SetUpdateMode( FALSE ); + aEntriesBox.SetUpdateMode( sal_False ); ResetConfig(); Init(m_xAct); - aEntriesBox.SetUpdateMode( TRUE ); + aEntriesBox.SetUpdateMode( sal_True ); aEntriesBox.Invalidate(); pGroupLBox->Init(m_xSMGR, m_xFrame, m_sModuleLongName); @@ -1234,10 +1233,10 @@ IMPL_LINK( SfxAcceleratorConfigPage, LoadHdl, sfx2::FileDialogHelper*, EMPTYARG // open the configuration and update our UI css::uno::Reference< css::ui::XAcceleratorConfiguration > xTempAccMgr(xCfgMgr->getShortCutManager(), css::uno::UNO_QUERY_THROW); - aEntriesBox.SetUpdateMode(FALSE); + aEntriesBox.SetUpdateMode(sal_False); ResetConfig(); Init(xTempAccMgr); - aEntriesBox.SetUpdateMode(TRUE); + aEntriesBox.SetUpdateMode(sal_True); aEntriesBox.Invalidate(); aEntriesBox.Select(aEntriesBox.GetEntry(0, 0)); @@ -1388,7 +1387,7 @@ void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const String& rTi } //----------------------------------------------- -BOOL SfxAcceleratorConfigPage::FillItemSet( SfxItemSet& ) +sal_Bool SfxAcceleratorConfigPage::FillItemSet( SfxItemSet& ) { Apply(m_xAct); try @@ -1398,9 +1397,9 @@ BOOL SfxAcceleratorConfigPage::FillItemSet( SfxItemSet& ) catch(const css::uno::RuntimeException& exRun) { throw exRun; } catch(const css::uno::Exception&) - { return FALSE; } + { return sal_False; } - return TRUE; + return sal_True; } //----------------------------------------------- @@ -1428,7 +1427,7 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet ) RadioHdl(0); const SfxPoolItem* pMacroItem=0; - if( SFX_ITEM_SET == rSet.GetItemState( SID_MACROINFO, TRUE, &pMacroItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_MACROINFO, sal_True, &pMacroItem ) ) { m_pMacroInfoItem = PTR_CAST( SfxMacroInfoItem, pMacroItem ); pGroupLBox->SelectMacro( m_pMacroInfoItem ); @@ -1436,31 +1435,28 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet ) else { const SfxPoolItem* pStringItem=0; - if( SFX_ITEM_SET == rSet.GetItemState( SID_CHARMAP, TRUE, &pStringItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_CHARMAP, sal_True, &pStringItem ) ) m_pStringItem = PTR_CAST( SfxStringItem, pStringItem ); const SfxPoolItem* pFontItem=0; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_SPECIALCHAR, TRUE, &pFontItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_SPECIALCHAR, sal_True, &pFontItem ) ) m_pFontItem = PTR_CAST( SfxStringItem, pFontItem ); - - if ( m_pStringItem ) - pGroupLBox->AddAndSelect( m_pStringItem, m_pFontItem ); } } //----------------------------------------------- -USHORT SfxAcceleratorConfigPage::MapKeyCodeToPos(const KeyCode& aKey) const +sal_uInt16 SfxAcceleratorConfigPage::MapKeyCodeToPos(const KeyCode& aKey) const { - USHORT nCode1 = aKey.GetCode()+aKey.GetModifier(); + sal_uInt16 nCode1 = aKey.GetCode()+aKey.GetModifier(); SvLBoxEntry* pEntry = aEntriesBox.First(); - USHORT i = 0; + sal_uInt16 i = 0; while (pEntry) { TAccInfo* pUserData = (TAccInfo*)pEntry->GetUserData(); if (pUserData) { - USHORT nCode2 = pUserData->m_aKey.GetCode()+pUserData->m_aKey.GetModifier(); + sal_uInt16 nCode2 = pUserData->m_aKey.GetCode()+pUserData->m_aKey.GetModifier(); if (nCode1 == nCode2) return i; } diff --git a/cui/source/customize/acccfg.hrc b/cui/source/customize/acccfg.hrc index be0771b83fc8..d358b757949c 100644 --- a/cui/source/customize/acccfg.hrc +++ b/cui/source/customize/acccfg.hrc @@ -63,7 +63,7 @@ #define STR_PDF_EXPORT_SEND 59 #define STR_RECHECK_DOCUMENT 60 #define IMG_INFO 61 -#define STR_BASICNAME 62 + // FREE #define BMP_COLLAPSED 63 #define BMP_EXPANDED 64 #define BMP_COLLAPSED_HC 65 diff --git a/cui/source/customize/acccfg.src b/cui/source/customize/acccfg.src index de5d4b89f186..a03fa9c3eb00 100644 --- a/cui/source/customize/acccfg.src +++ b/cui/source/customize/acccfg.src @@ -271,10 +271,6 @@ Resource RID_SVXPAGE_CONFIGGROUPBOX ImageBitmap = Bitmap { File = "imh30826.png"; }; MASKCOLOR }; - String STR_BASICNAME - { - Text = "%PRODUCTNAME Basic" ; - }; Image BMP_COLLAPSED { ImageBitmap = Bitmap diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 858564af4e40..359d4417fae1 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -54,7 +54,6 @@ #include <sfx2/msg.hxx> #include <sfx2/msgpool.hxx> #include <sfx2/mnumgr.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/minfitem.hxx> #include <sfx2/objsh.hxx> #include <sfx2/request.hxx> @@ -438,9 +437,9 @@ SvxConfigPage::CanConfig( const OUString& aModuleId ) || aModuleId.equalsAscii( "com.sun.star.frame.Bibliography" ) ) { - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } OUString GetModuleName( const OUString& aModuleId ) @@ -550,14 +549,14 @@ bool GetMenuItemData( } } - return TRUE; + return sal_True; } } catch ( ::com::sun::star::lang::IndexOutOfBoundsException& ) { } - return FALSE; + return sal_False; } bool GetToolbarItemData( @@ -643,9 +642,9 @@ ConvertSvxConfigEntry( // as an empty string. // It will be initialised again later using the command to label map. aPropSeq[2].Name = aDescriptorLabel; - if ( pEntry->HasChangedName() == FALSE && pEntry->GetCommand().getLength() ) + if ( pEntry->HasChangedName() == sal_False && pEntry->GetCommand().getLength() ) { - BOOL isDefaultName = FALSE; + sal_Bool isDefaultName = sal_False; try { uno::Any a( xCommandToLabelMap->getByName( pEntry->GetCommand() ) ); @@ -661,7 +660,7 @@ ConvertSvxConfigEntry( if ( tmpLabel.equals( pEntry->GetName() ) ) { - isDefaultName = TRUE; + isDefaultName = sal_True; } break; @@ -724,9 +723,9 @@ ConvertToolbarEntry( // as an empty string. // It will be initialised again later using the command to label map. aPropSeq[2].Name = aDescriptorLabel; - if ( pEntry->HasChangedName() == FALSE && pEntry->GetCommand().getLength() ) + if ( pEntry->HasChangedName() == sal_False && pEntry->GetCommand().getLength() ) { - BOOL isDefaultName = FALSE; + sal_Bool isDefaultName = sal_False; try { uno::Any a( xCommandToLabelMap->getByName( pEntry->GetCommand() ) ); @@ -742,7 +741,7 @@ ConvertToolbarEntry( if ( tmpLabel.equals( pEntry->GetName() ) ) { - isDefaultName = TRUE; + isDefaultName = sal_True; } break; @@ -876,7 +875,7 @@ short SvxConfigDialog::Ok() return SfxTabDialog::Ok(); } -void SvxConfigDialog::PageCreated( USHORT nId, SfxTabPage& rPage ) +void SvxConfigDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) { (void)rPage; @@ -915,9 +914,9 @@ SaveInData::SaveInData( const OUString& aModuleId, bool isDocConfig ) : - bModified( FALSE ), + bModified( sal_False ), bDocConfig( isDocConfig ), - bReadOnly( FALSE ), + bReadOnly( sal_False ), m_xCfgMgr( xCfgMgr ), m_xParentCfgMgr( xParentCfgMgr ) { @@ -1039,7 +1038,7 @@ Image SaveInData::GetImage( const OUString& rCommandURL ) bool SaveInData::PersistChanges( const uno::Reference< uno::XInterface >& xManager ) { - bool result = TRUE; + bool result = sal_True; try { @@ -1056,7 +1055,7 @@ bool SaveInData::PersistChanges( } catch ( com::sun::star::io::IOException& ) { - result = FALSE; + result = sal_False; } return result; @@ -1119,7 +1118,7 @@ MenuSaveInData::GetEntries() if ( pRootEntry == NULL ) { pRootEntry = new SvxConfigEntry( - String::CreateFromAscii("MainMenus"), String(), TRUE ); + String::CreateFromAscii("MainMenus"), String(), sal_True ); if ( m_xMenuSettings.is() ) { @@ -1164,7 +1163,7 @@ bool MenuSaveInData::LoadSubMenus( uno::Reference< container::XIndexAccess > xSubMenu; OUString aCommandURL; OUString aLabel; - bool bIsUserDefined = TRUE; + bool bIsUserDefined = sal_True; sal_uInt16 nType( css::ui::ItemType::DEFAULT ); @@ -1179,11 +1178,11 @@ bool MenuSaveInData::LoadSubMenus( try { a = m_xCommandToLabelMap->getByName( aCommandURL ); - bIsUserDefined = FALSE; + bIsUserDefined = sal_False; } catch ( container::NoSuchElementException& ) { - bIsUserDefined = TRUE; + bIsUserDefined = sal_True; } // If custom label not set retrieve it from the command @@ -1208,7 +1207,7 @@ bool MenuSaveInData::LoadSubMenus( { // popup menu SvxConfigEntry* pEntry = new SvxConfigEntry( - aLabel, aCommandURL, TRUE ); + aLabel, aCommandURL, sal_True ); pEntry->SetUserDefined( bIsUserDefined ); @@ -1223,7 +1222,7 @@ bool MenuSaveInData::LoadSubMenus( } else { - pEntry->SetMain( TRUE ); + pEntry->SetMain( sal_True ); } subMenuTitle += stripHotKey( aLabel ); @@ -1233,7 +1232,7 @@ bool MenuSaveInData::LoadSubMenus( else { SvxConfigEntry* pEntry = new SvxConfigEntry( - aLabel, aCommandURL, FALSE ); + aLabel, aCommandURL, sal_False ); pEntry->SetUserDefined( bIsUserDefined ); pEntries->push_back( pEntry ); } @@ -1251,7 +1250,7 @@ bool MenuSaveInData::LoadSubMenus( bool MenuSaveInData::Apply() { - bool result = FALSE; + bool result = sal_False; if ( IsModified() ) { @@ -1293,7 +1292,7 @@ bool MenuSaveInData::Apply() OSL_TRACE("caught some other exception saving settings"); } - SetModified( FALSE ); + SetModified( sal_False ); result = PersistChanges( GetConfigManager() ); } @@ -1409,7 +1408,7 @@ public: ~PopupPainter() { } void Paint( const Point& rPos, SvLBox& rOutDev, - USHORT nViewDataEntryFlags, SvLBoxEntry* pEntry ) + sal_uInt16 nViewDataEntryFlags, SvLBoxEntry* pEntry ) { SvLBoxString::Paint( rPos, rOutDev, nViewDataEntryFlags, pEntry ); @@ -1463,7 +1462,7 @@ SvxMenuEntriesListBox::SvxMenuEntriesListBox( Window* pParent, const ResId& rResId) : SvTreeListBox( pParent, rResId ) , pPage( (SvxMenuConfigPage*) pParent ) - , m_bIsInternalDrag( FALSE ) + , m_bIsInternalDrag( sal_False ) { SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HIDESELECTION ); @@ -1492,14 +1491,14 @@ DragDropMode SvxMenuEntriesListBox::NotifyStartDrag( (void)aTransferDataContainer; (void)pEntry; - m_bIsInternalDrag = TRUE; + m_bIsInternalDrag = sal_True; return GetDragDropMode(); } void SvxMenuEntriesListBox::DragFinished( sal_Int8 nDropAction ) { (void)nDropAction; - m_bIsInternalDrag = FALSE; + m_bIsInternalDrag = sal_False; } sal_Int8 SvxMenuEntriesListBox::AcceptDrop( const AcceptDropEvent& rEvt ) @@ -1519,27 +1518,27 @@ sal_Int8 SvxMenuEntriesListBox::AcceptDrop( const AcceptDropEvent& rEvt ) return SvTreeListBox::AcceptDrop( aNewAcceptDropEvent ); } -BOOL SvxMenuEntriesListBox::NotifyAcceptDrop( SvLBoxEntry* ) +sal_Bool SvxMenuEntriesListBox::NotifyAcceptDrop( SvLBoxEntry* ) { - return TRUE; + return sal_True; } -BOOL SvxMenuEntriesListBox::NotifyMoving( +sal_Bool SvxMenuEntriesListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pSource, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos) + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos) { // only try to do a move if we are dragging within the list box if ( m_bIsInternalDrag ) { - if ( pPage->MoveEntryData( pSource, pTarget ) == TRUE ) + if ( pPage->MoveEntryData( pSource, pTarget ) == sal_True ) { SvTreeListBox::NotifyMoving( pTarget, pSource, rpNewParent, rNewChildPos ); - return TRUE; + return sal_True; } else { - return FALSE; + return sal_False; } } else @@ -1548,9 +1547,9 @@ BOOL SvxMenuEntriesListBox::NotifyMoving( } } -BOOL SvxMenuEntriesListBox::NotifyCopying( +sal_Bool SvxMenuEntriesListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pSource, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos) + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos) { (void)pSource; (void)rpNewParent; @@ -1563,11 +1562,11 @@ BOOL SvxMenuEntriesListBox::NotifyCopying( // AddFunction already adds the listbox entry so return FALSE // to stop another listbox entry being added - return FALSE; + return sal_False; } // Copying is only allowed from external controls, not within the listbox - return FALSE; + return sal_False; } void SvxMenuEntriesListBox::KeyInput( const KeyEvent& rKeyEvent ) @@ -1582,11 +1581,11 @@ void SvxMenuEntriesListBox::KeyInput( const KeyEvent& rKeyEvent ) // support CTRL+UP and CTRL+DOWN for moving selected entries else if ( keycode.GetCode() == KEY_UP && keycode.IsMod1() ) { - pPage->MoveEntry( TRUE ); + pPage->MoveEntry( sal_True ); } else if ( keycode.GetCode() == KEY_DOWN && keycode.IsMod1() ) { - pPage->MoveEntry( FALSE ); + pPage->MoveEntry( sal_False ); } else { @@ -1644,7 +1643,7 @@ SvxConfigPage::SvxConfigPage( Window *pParent, const SfxItemSet& rSet ) : SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_MENUS ), rSet ), - bInitialised( FALSE ), + bInitialised( sal_False ), pCurrentSaveInData( 0 ), aTopLevelSeparator( this, CUI_RES( GRP_MENUS ) ), aTopLevelLabel( this, CUI_RES( FT_MENUS ) ), @@ -1665,8 +1664,8 @@ SvxConfigPage::SvxConfigPage( pSelectorDlg( 0 ) { aDescriptionField.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() ); - aDescriptionField.SetAutoScroll( TRUE ); - aDescriptionField.EnableCursor( FALSE ); + aDescriptionField.SetAutoScroll( sal_True ); + aDescriptionField.EnableCursor( sal_False ); } SvxConfigPage::~SvxConfigPage() @@ -1683,7 +1682,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) // all other open documents of the same module type if ( !bInitialised ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; uno::Reference < css::ui::XUIConfigurationManager > xCfgMgr; uno::Reference < css::ui::XUIConfigurationManager > xDocCfgMgr; @@ -1729,7 +1728,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) pModuleData = CreateSaveInData( xCfgMgr, uno::Reference< css::ui::XUIConfigurationManager >(), aModuleId, - FALSE ); + sal_False ); } catch ( container::NoSuchElementException& ) { @@ -1770,7 +1769,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) SaveInData* pDocData = NULL; if ( xDocCfgMgr.is() ) { - pDocData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, TRUE ); + pDocData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, sal_True ); if ( !pDocData->IsReadOnly() ) { @@ -1781,35 +1780,35 @@ void SvxConfigPage::Reset( const SfxItemSet& ) // if an item to select has been passed in (eg. the ResourceURL for a // toolbar) then try to select the SaveInData entry that has that item - bool bURLToSelectFound = FALSE; + bool bURLToSelectFound = sal_False; if ( m_aURLToSelect.getLength() != 0 ) { if ( pDocData != NULL && pDocData->HasURL( m_aURLToSelect ) ) { - aSaveInListBox.SelectEntryPos( nPos, TRUE ); + aSaveInListBox.SelectEntryPos( nPos, sal_True ); pCurrentSaveInData = pDocData; - bURLToSelectFound = TRUE; + bURLToSelectFound = sal_True; } else if ( pModuleData->HasURL( m_aURLToSelect ) ) { - aSaveInListBox.SelectEntryPos( 0, TRUE ); + aSaveInListBox.SelectEntryPos( 0, sal_True ); pCurrentSaveInData = pModuleData; - bURLToSelectFound = TRUE; + bURLToSelectFound = sal_True; } } - if ( bURLToSelectFound == FALSE ) + if ( bURLToSelectFound == sal_False ) { // if the document has menu configuration settings select it // it the SaveIn listbox, otherwise select the module data if ( pDocData != NULL && pDocData->HasSettings() ) { - aSaveInListBox.SelectEntryPos( nPos, TRUE ); + aSaveInListBox.SelectEntryPos( nPos, sal_True ); pCurrentSaveInData = pDocData; } else { - aSaveInListBox.SelectEntryPos( 0, TRUE ); + aSaveInListBox.SelectEntryPos( 0, sal_True ); pCurrentSaveInData = pModuleData; } } @@ -1885,7 +1884,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) if ( xDocCfgMgr.is() ) { - pData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, TRUE ); + pData = CreateSaveInData( xDocCfgMgr, xCfgMgr, aModuleId, sal_True ); if ( pData && !pData->IsReadOnly() ) { @@ -1901,7 +1900,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) aSaveInListBox.SetSelectHdl( LINK( this, SvxConfigPage, SelectSaveInLocation ) ); - bInitialised = TRUE; + bInitialised = sal_True; Init(); } @@ -1972,11 +1971,11 @@ void SvxConfigPage::Reset( const SfxItemSet& ) return sModuleID; } -BOOL SvxConfigPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxConfigPage::FillItemSet( SfxItemSet& ) { - bool result = FALSE; + bool result = sal_False; - for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) { SaveInData* pData = (SaveInData*) aSaveInListBox.GetEntryData( i ); @@ -2028,7 +2027,7 @@ IMPL_LINK( SvxConfigPage, SelectSaveInLocation, ListBox *, pBox ) void SvxConfigPage::ReloadTopLevelListBox( SvxConfigEntry* pToSelect ) { - USHORT nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); + sal_uInt16 nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); aTopLevelListBox.Clear(); if ( GetSaveInData() && GetSaveInData()->GetEntries() ) @@ -2039,7 +2038,7 @@ void SvxConfigPage::ReloadTopLevelListBox( SvxConfigEntry* pToSelect ) for ( ; iter != end; iter++ ) { SvxConfigEntry* pEntryData = *iter; - USHORT nPos = aTopLevelListBox.InsertEntry( stripHotKey( pEntryData->GetName() ) ); + sal_uInt16 nPos = aTopLevelListBox.InsertEntry( stripHotKey( pEntryData->GetName() ) ); aTopLevelListBox.SetEntryData( nPos, pEntryData ); if ( pEntryData == pToSelect ) @@ -2060,7 +2059,7 @@ void SvxConfigPage::ReloadTopLevelListBox( SvxConfigEntry* pToSelect ) nSelectionPos = nSelectionPos < aTopLevelListBox.GetEntryCount() ? nSelectionPos : aTopLevelListBox.GetEntryCount() - 1; - aTopLevelListBox.SelectEntryPos( nSelectionPos, TRUE ); + aTopLevelListBox.SelectEntryPos( nSelectionPos, sal_True ); aTopLevelListBox.GetSelectHdl().Call( this ); } @@ -2080,7 +2079,7 @@ void SvxConfigPage::AddSubMenusToUI( subMenuTitle += OUString::createFromAscii( pMenuSeparatorStr ); subMenuTitle += stripHotKey( pEntryData->GetName() ); - USHORT nPos = aTopLevelListBox.InsertEntry( subMenuTitle ); + sal_uInt16 nPos = aTopLevelListBox.InsertEntry( subMenuTitle ); aTopLevelListBox.SetEntryData( nPos, pEntryData ); AddSubMenusToUI( subMenuTitle, pEntryData ); @@ -2129,8 +2128,8 @@ SvLBoxEntry* SvxConfigPage::AddFunction( } SvxConfigEntry* pNewEntryData = - new SvxConfigEntry( aDisplayName, aURL, FALSE ); - pNewEntryData->SetUserDefined( TRUE ); + new SvxConfigEntry( aDisplayName, aURL, sal_False ); + pNewEntryData->SetUserDefined( sal_True ); // check that this function is not already in the menu SvxConfigEntry* pParent = GetTopLevelSelection(); @@ -2190,7 +2189,7 @@ SvLBoxEntry* SvxConfigPage::InsertEntry( SvxEntries::const_iterator end = pEntries->end(); // Advance the iterator to the data for currently selected entry - USHORT nPos = 0; + sal_uInt16 nPos = 0; while (*iter != pEntryData && ++iter != end) { nPos++; @@ -2213,14 +2212,14 @@ SvLBoxEntry* SvxConfigPage::InsertEntry( aContentsListBox->Select( pNewEntry ); aContentsListBox->MakeVisible( pNewEntry ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } return pNewEntry; } SvLBoxEntry* SvxConfigPage::InsertEntryIntoUI( - SvxConfigEntry* pNewEntryData, ULONG nPos ) + SvxConfigEntry* pNewEntryData, sal_uLong nPos ) { SvLBoxEntry* pNewEntry = NULL; @@ -2228,7 +2227,7 @@ SvLBoxEntry* SvxConfigPage::InsertEntryIntoUI( { pNewEntry = aContentsListBox->InsertEntry( String::CreateFromAscii( pSeparatorStr ), - 0, FALSE, nPos, pNewEntryData ); + 0, sal_False, nPos, pNewEntryData ); } else { @@ -2240,12 +2239,12 @@ SvLBoxEntry* SvxConfigPage::InsertEntryIntoUI( if ( !!aImage ) { pNewEntry = aContentsListBox->InsertEntry( - aName, aImage, aImage, 0, FALSE, nPos, pNewEntryData ); + aName, aImage, aImage, 0, sal_False, nPos, pNewEntryData ); } else { pNewEntry = aContentsListBox->InsertEntry( - aName, 0, FALSE, nPos, pNewEntryData ); + aName, 0, sal_False, nPos, pNewEntryData ); } if ( pNewEntryData->IsPopup() || @@ -2318,7 +2317,7 @@ bool SvxConfigPage::MoveEntryData( //modified by shizhoubo for issue53677 if ( NULL == pSourceEntry || NULL == pTargetEntry ) { - return FALSE; + return sal_False; } // Grab the entries list for the currently selected menu @@ -2333,9 +2332,9 @@ bool SvxConfigPage::MoveEntryData( pEntries->insert( pEntries->begin(), pSourceData ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); - return TRUE; + return sal_True; } else { @@ -2356,13 +2355,13 @@ bool SvxConfigPage::MoveEntryData( // insert the source entry at the position after the target pEntries->insert( ++iter, pSourceData ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } SvxMenuConfigPage::SvxMenuConfigPage( @@ -2417,13 +2416,13 @@ void SvxMenuConfigPage::Init() ReloadTopLevelListBox(); - aTopLevelListBox.SelectEntryPos(0, TRUE); + aTopLevelListBox.SelectEntryPos(0, sal_True); aTopLevelListBox.GetSelectHdl().Call(this); } SvxMenuConfigPage::~SvxMenuConfigPage() { - for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) { MenuSaveInData* pData = (MenuSaveInData*) aSaveInListBox.GetEntryData( i ); @@ -2457,12 +2456,12 @@ void SvxMenuConfigPage::UpdateButtonStates() if ( aContentsListBox->GetEntryCount() == 0 || selection == NULL ) { - aMoveUpButton.Enable( FALSE ); - aMoveDownButton.Enable( FALSE ); + aMoveUpButton.Enable( sal_False ); + aMoveDownButton.Enable( sal_False ); - pPopup->EnableItem( ID_BEGIN_GROUP, TRUE ); - pPopup->EnableItem( ID_RENAME, FALSE ); - pPopup->EnableItem( ID_DELETE, FALSE ); + pPopup->EnableItem( ID_BEGIN_GROUP, sal_True ); + pPopup->EnableItem( ID_RENAME, sal_False ); + pPopup->EnableItem( ID_DELETE, sal_False ); aDescriptionField.Clear(); @@ -2480,17 +2479,17 @@ void SvxMenuConfigPage::UpdateButtonStates() if ( pEntryData->IsSeparator() ) { - pPopup->EnableItem( ID_DELETE, TRUE ); - pPopup->EnableItem( ID_BEGIN_GROUP, FALSE ); - pPopup->EnableItem( ID_RENAME, FALSE ); + pPopup->EnableItem( ID_DELETE, sal_True ); + pPopup->EnableItem( ID_BEGIN_GROUP, sal_False ); + pPopup->EnableItem( ID_RENAME, sal_False ); aDescriptionField.Clear(); } else { - pPopup->EnableItem( ID_BEGIN_GROUP, TRUE ); - pPopup->EnableItem( ID_DELETE, TRUE ); - pPopup->EnableItem( ID_RENAME, TRUE ); + pPopup->EnableItem( ID_BEGIN_GROUP, sal_True ); + pPopup->EnableItem( ID_DELETE, sal_True ); + pPopup->EnableItem( ID_RENAME, sal_True ); aDescriptionField.SetNewText( pEntryData->GetHelpText() ); } @@ -2508,7 +2507,7 @@ void SvxMenuConfigPage::DeleteSelectedTopLevel() ReloadTopLevelListBox(); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } bool SvxMenuConfigPage::DeleteSelectedContent() @@ -2539,11 +2538,11 @@ bool SvxMenuConfigPage::DeleteSelectedContent() // delete data for menu entry delete pMenuEntry; - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } short SvxMenuConfigPage::QueryReset() @@ -2619,7 +2618,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton ) ReloadTopLevelListBox(); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } // #i68101# Moemory leak (!) @@ -2643,7 +2642,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton ) ReloadTopLevelListBox( pDialog->GetSelectedEntry() ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } delete pDialog; @@ -2651,9 +2650,9 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton ) break; } default: - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) @@ -2675,14 +2674,14 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) pNameDialog->GetName(aNewName); SvxConfigEntry* pNewEntryData = - new SvxConfigEntry( aNewName, aNewName, TRUE ); - pNewEntryData->SetUserDefined( TRUE ); + new SvxConfigEntry( aNewName, aNewName, sal_True ); + pNewEntryData->SetUserDefined( sal_True ); InsertEntry( pNewEntryData ); ReloadTopLevelListBox(); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } delete pNameDialog; @@ -2692,7 +2691,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) case ID_BEGIN_GROUP: { SvxConfigEntry* pNewEntryData = new SvxConfigEntry; - pNewEntryData->SetUserDefined( TRUE ); + pNewEntryData->SetUserDefined( sal_True ); InsertEntry( pNewEntryData ); break; @@ -2723,7 +2722,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) pEntry->SetName( aNewName ); aContentsListBox->SetEntryText( pActEntry, aNewName ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } delete pNameDialog; @@ -2732,7 +2731,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) } default: { - return FALSE; + return sal_False; } } @@ -2741,7 +2740,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton ) UpdateButtonStates(); } - return TRUE; + return sal_True; } IMPL_LINK( SvxMenuConfigPage, AddFunctionHdl, @@ -2760,7 +2759,7 @@ IMPL_LINK( SvxMenuConfigPage, NewMenuHdl, Button *, pButton ) SvxMainMenuOrganizerDialog* pDialog = new SvxMainMenuOrganizerDialog( 0, - GetSaveInData()->GetEntries(), NULL, TRUE ); + GetSaveInData()->GetEntries(), NULL, sal_True ); bool ret = pDialog->Execute(); @@ -2768,7 +2767,7 @@ IMPL_LINK( SvxMenuConfigPage, NewMenuHdl, Button *, pButton ) { GetSaveInData()->SetEntries( pDialog->GetEntries() ); ReloadTopLevelListBox( pDialog->GetSelectedEntry() ); - GetSaveInData()->SetModified( TRUE ); + GetSaveInData()->SetModified( sal_True ); } delete pDialog; @@ -2783,7 +2782,7 @@ IMPL_LINK( SvxMenuConfigPage, AddCommandsHdl, Button *, pButton ) if ( pSelectorDlg == NULL ) { // Create Script Selector which also shows builtin commands - pSelectorDlg = new SvxScriptSelectorDialog( this, TRUE, m_xFrame ); + pSelectorDlg = new SvxScriptSelectorDialog( this, sal_True, m_xFrame ); pSelectorDlg->SetAddHdl( LINK( this, SvxMenuConfigPage, AddFunctionHdl ) ); @@ -2827,7 +2826,7 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog( aOKButton( this, CUI_RES( BTN_MENU_ADD ) ), aCloseButton( this, CUI_RES( BTN_MENU_CLOSE ) ), aHelpButton( this, CUI_RES( BTN_MENU_HELP ) ), - bModified( FALSE ) + bModified( sal_False ) { FreeResource(); @@ -2866,9 +2865,9 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog( OUString newurl = generateCustomMenuURL( pEntries ); SvxConfigEntry* pNewEntryData = - new SvxConfigEntry( newname, newurl, TRUE ); - pNewEntryData->SetUserDefined( TRUE ); - pNewEntryData->SetMain( TRUE ); + new SvxConfigEntry( newname, newurl, sal_True ); + pNewEntryData->SetUserDefined( sal_True ); + pNewEntryData->SetMain( sal_True ); pNewMenuEntry = aMenuListBox.InsertEntry( stripHotKey( pNewEntryData->GetName() ) ); @@ -3012,7 +3011,7 @@ IMPL_LINK( SvxMainMenuOrganizerDialog, MoveHdl, Button *, pButton ) aMenuListBox.GetModel()->Move( pSourceEntry, pTargetEntry ); aMenuListBox.MakeVisible( pSourceEntry ); - bModified = TRUE; + bModified = sal_True; } } @@ -3054,11 +3053,11 @@ SvxConfigEntry::SvxConfigEntry( const OUString& rDisplayName, , aLabel(rDisplayName) , aCommand(rCommandURL) , bPopUp(bPopup) - , bStrEdited( FALSE ) - , bIsUserDefined( FALSE ) - , bIsMain( FALSE ) + , bStrEdited( sal_False ) + , bIsUserDefined( sal_False ) + , bIsMain( sal_False ) , bIsParentData( bParentData ) - , bIsVisible( TRUE ) + , bIsVisible( sal_True ) , nStyle( 0 ) , pEntries( 0 ) { @@ -3086,27 +3085,27 @@ bool SvxConfigEntry::IsMovable() { if ( IsPopup() && !IsMain() ) { - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } bool SvxConfigEntry::IsDeletable() { if ( IsMain() && !IsUserDefined() ) { - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } bool SvxConfigEntry::IsRenamable() { if ( IsMain() && !IsUserDefined() ) { - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } SvxToolbarConfigPage::SvxToolbarConfigPage( @@ -3151,8 +3150,8 @@ SvxToolbarConfigPage::SvxToolbarConfigPage( aMoveDownButton.SetClickHdl ( LINK( this, SvxToolbarConfigPage, MoveHdl) ); // Always enable Up and Down buttons // added for issue i53677 by shizhoubo - aMoveDownButton.Enable( TRUE ); - aMoveUpButton.Enable( TRUE ); + aMoveDownButton.Enable( sal_True ); + aMoveUpButton.Enable( sal_True ); PopupMenu* pMenu = new PopupMenu( CUI_RES( MODIFY_TOOLBAR ) ); pMenu->SetMenuFlags( @@ -3206,7 +3205,7 @@ SvxToolbarConfigPage::SvxToolbarConfigPage( SvxToolbarConfigPage::~SvxToolbarConfigPage() { - for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) { ToolbarSaveInData* pData = (ToolbarSaveInData*) aSaveInListBox.GetEntryData( i ); @@ -3225,7 +3224,7 @@ SvxToolbarConfigPage::~SvxToolbarConfigPage() void SvxToolbarConfigPage::DeleteSelectedTopLevel() { - USHORT nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); + sal_uInt16 nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); ToolbarSaveInData* pSaveInData = (ToolbarSaveInData*) GetSaveInData(); pSaveInData->RemoveToolbar( GetTopLevelSelection() ); @@ -3236,11 +3235,11 @@ void SvxToolbarConfigPage::DeleteSelectedTopLevel() // subtract one from the entry count if ( nSelectionPos != aTopLevelListBox.GetEntryCount() - 1 ) { - aTopLevelListBox.SelectEntryPos( nSelectionPos + 1, TRUE ); + aTopLevelListBox.SelectEntryPos( nSelectionPos + 1, sal_True ); } else { - aTopLevelListBox.SelectEntryPos( nSelectionPos - 1, TRUE ); + aTopLevelListBox.SelectEntryPos( nSelectionPos - 1, sal_True ); } aTopLevelListBox.GetSelectHdl().Call( this ); @@ -3292,10 +3291,10 @@ bool SvxToolbarConfigPage::DeleteSelectedContent() } } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } IMPL_LINK( SvxToolbarConfigPage, MoveHdl, Button *, pButton ) @@ -3321,7 +3320,7 @@ void SvxToolbarConfigPage::MoveEntry( bool bMoveUp ) IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton ) { - USHORT nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); + sal_uInt16 nSelectionPos = aTopLevelListBox.GetSelectEntryPos(); SvxConfigEntry* pToolbar = (SvxConfigEntry*)aTopLevelListBox.GetEntryData( nSelectionPos ); @@ -3416,7 +3415,7 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton ) IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) { - bool bNeedsApply = FALSE; + bool bNeedsApply = sal_False; // get currently selected toolbar SvxConfigEntry* pToolbar = GetTopLevelSelection(); @@ -3444,7 +3443,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) pEntry->SetName( aNewName ); aContentsListBox->SetEntryText( pActEntry, aNewName ); - bNeedsApply = TRUE; + bNeedsApply = sal_True; } delete pNameDialog; @@ -3456,10 +3455,10 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) SvxConfigEntry* pEntry = (SvxConfigEntry*) pActEntry->GetUserData(); - USHORT nSelectionPos = 0; + sal_uInt16 nSelectionPos = 0; // find position of entry within the list - for ( USHORT i = 0; i < aContentsListBox->GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0; i < aContentsListBox->GetEntryCount(); i++ ) { if ( aContentsListBox->GetEntry( 0, i ) == pActEntry ) { @@ -3479,7 +3478,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) pEntry->SetName( aSystemName ); aContentsListBox->SetEntryText( pActEntry, stripHotKey( aSystemName ) ); - bNeedsApply = TRUE; + bNeedsApply = sal_True; } uno::Sequence< OUString > aURLSeq( 1 ); @@ -3509,7 +3508,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) aContentsListBox->Select( pNewLBEntry ); aContentsListBox->MakeVisible( pNewLBEntry ); - bNeedsApply = TRUE; + bNeedsApply = sal_True; } catch ( uno::Exception& ) { @@ -3520,14 +3519,14 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) case ID_BEGIN_GROUP: { SvxConfigEntry* pNewEntryData = new SvxConfigEntry; - pNewEntryData->SetUserDefined( TRUE ); + pNewEntryData->SetUserDefined( sal_True ); SvLBoxEntry* pNewLBEntry = InsertEntry( pNewEntryData ); aContentsListBox->SetCheckButtonState( pNewLBEntry, SV_BUTTON_TRISTATE ); - bNeedsApply = TRUE; + bNeedsApply = sal_True; break; } case ID_DELETE: @@ -3553,10 +3552,10 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) SvxConfigEntry* pEntry = (SvxConfigEntry*) pActEntry->GetUserData(); - USHORT nSelectionPos = 0; + sal_uInt16 nSelectionPos = 0; // find position of entry within the list - for ( USHORT i = 0; i < aContentsListBox->GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0; i < aContentsListBox->GetEntryCount(); i++ ) { if ( aContentsListBox->GetEntry( 0, i ) == pActEntry ) { @@ -3636,10 +3635,10 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) SvxConfigEntry* pEntry = (SvxConfigEntry*) pActEntry->GetUserData(); - USHORT nSelectionPos = 0; + sal_uInt16 nSelectionPos = 0; // find position of entry within the list - for ( USHORT i = 0; i < aContentsListBox->GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0; i < aContentsListBox->GetEntryCount(); i++ ) { if ( aContentsListBox->GetEntry( 0, i ) == pActEntry ) { @@ -3691,7 +3690,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton ) } } - if ( bNeedsApply == TRUE ) + if ( bNeedsApply == sal_True ) { (( ToolbarSaveInData* ) GetSaveInData())->ApplyToolbar( pToolbar ); UpdateButtonStates(); @@ -3708,10 +3707,10 @@ void SvxToolbarConfigPage::Init() ReloadTopLevelListBox(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; if ( m_aURLToSelect.getLength() != 0 ) { - for ( USHORT i = 0 ; i < aTopLevelListBox.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0 ; i < aTopLevelListBox.GetEntryCount(); i++ ) { SvxConfigEntry* pData = (SvxConfigEntry*) aTopLevelListBox.GetEntryData( i ); @@ -3728,7 +3727,7 @@ void SvxToolbarConfigPage::Init() m_aURLToSelect += OUString::createFromAscii( "standardbar" ); } - aTopLevelListBox.SelectEntryPos(nPos, TRUE); + aTopLevelListBox.SelectEntryPos(nPos, sal_True); aTopLevelListBox.GetSelectHdl().Call(this); } @@ -3977,7 +3976,7 @@ SvxEntries* ToolbarSaveInData::GetEntries() { pRootEntry = new SvxConfigEntry( - String::CreateFromAscii("MainToolbars"), String(), TRUE ); + String::CreateFromAscii("MainToolbars"), String(), sal_True ); uno::Sequence< uno::Sequence < beans::PropertyValue > > info = GetConfigManager()->getUIElementsInfo( @@ -4021,9 +4020,9 @@ SvxEntries* ToolbarSaveInData::GetEntries() } SvxConfigEntry* pEntry = new SvxConfigEntry( - uiname, url, TRUE ); + uiname, url, sal_True ); - pEntry->SetMain( TRUE ); + pEntry->SetMain( sal_True ); pEntry->SetStyle( GetSystemStyle( url ) ); @@ -4033,11 +4032,11 @@ SvxEntries* ToolbarSaveInData::GetEntries() OUString custom = OUString::createFromAscii(CUSTOM_TOOLBAR_STR); if ( systemname.indexOf( custom ) == 0 ) { - pEntry->SetUserDefined( TRUE ); + pEntry->SetUserDefined( sal_True ); } else { - pEntry->SetUserDefined( FALSE ); + pEntry->SetUserDefined( sal_False ); } pRootEntry->GetEntries()->push_back( pEntry ); @@ -4109,18 +4108,18 @@ SvxEntries* ToolbarSaveInData::GetEntries() } SvxConfigEntry* pEntry = new SvxConfigEntry( - uiname, url, TRUE, TRUE ); + uiname, url, sal_True, sal_True ); - pEntry->SetMain( TRUE ); + pEntry->SetMain( sal_True ); pEntry->SetStyle( GetSystemStyle( url ) ); if ( systemname.indexOf( custom ) == 0 ) { - pEntry->SetUserDefined( TRUE ); + pEntry->SetUserDefined( sal_True ); } else { - pEntry->SetUserDefined( FALSE ); + pEntry->SetUserDefined( sal_False ); } pRootEntry->GetEntries()->push_back( pEntry ); @@ -4167,14 +4166,14 @@ ToolbarSaveInData::HasURL( const OUString& rURL ) if ( pEntry->GetCommand().equals( rURL ) ) { if ( pEntry->IsParentData() ) - return FALSE; + return sal_False; else - return TRUE; + return sal_True; } iter++; } - return FALSE; + return sal_False; } bool ToolbarSaveInData::HasSettings() @@ -4182,9 +4181,9 @@ bool ToolbarSaveInData::HasSettings() // return true if there is at least one toolbar entry if ( GetEntries()->size() > 0 ) { - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void ToolbarSaveInData::Reset() @@ -4232,7 +4231,7 @@ void ToolbarSaveInData::Reset() bool ToolbarSaveInData::Apply() { // toolbar changes are instantly applied - return FALSE; + return sal_False; } void ToolbarSaveInData::ApplyToolbar( @@ -4477,7 +4476,7 @@ bool ToolbarSaveInData::LoadToolbar( uno::Reference< container::XIndexAccess > xSubMenu; OUString aCommandURL; OUString aLabel; - bool bIsUserDefined = TRUE; + bool bIsUserDefined = sal_True; sal_Bool bIsVisible; sal_Int32 nStyle; @@ -4494,11 +4493,11 @@ bool ToolbarSaveInData::LoadToolbar( try { a = m_xCommandToLabelMap->getByName( aCommandURL ); - bIsUserDefined = FALSE; + bIsUserDefined = sal_False; } catch ( container::NoSuchElementException& ) { - bIsUserDefined = TRUE; + bIsUserDefined = sal_True; } // If custom label not set retrieve it from the command @@ -4522,7 +4521,7 @@ bool ToolbarSaveInData::LoadToolbar( if ( xSubMenu.is() ) { SvxConfigEntry* pEntry = new SvxConfigEntry( - aLabel, aCommandURL, TRUE ); + aLabel, aCommandURL, sal_True ); pEntry->SetUserDefined( bIsUserDefined ); pEntry->SetVisible( bIsVisible ); @@ -4534,7 +4533,7 @@ bool ToolbarSaveInData::LoadToolbar( else { SvxConfigEntry* pEntry = new SvxConfigEntry( - aLabel, aCommandURL, FALSE ); + aLabel, aCommandURL, sal_False ); pEntry->SetUserDefined( bIsUserDefined ); pEntry->SetVisible( bIsVisible ); pEntry->SetStyle( nStyle ); @@ -4563,15 +4562,15 @@ IMPL_LINK( SvxToolbarConfigPage, SelectToolbarEntry, Control *, pBox ) void SvxToolbarConfigPage::UpdateButtonStates() { PopupMenu* pPopup = aModifyCommandButton.GetPopupMenu(); - pPopup->EnableItem( ID_RENAME, FALSE ); - pPopup->EnableItem( ID_DELETE, FALSE ); - pPopup->EnableItem( ID_BEGIN_GROUP, FALSE ); - pPopup->EnableItem( ID_DEFAULT_COMMAND, FALSE ); - pPopup->EnableItem( ID_ICON_ONLY, FALSE ); - pPopup->EnableItem( ID_ICON_AND_TEXT, FALSE ); - pPopup->EnableItem( ID_TEXT_ONLY, FALSE ); - pPopup->EnableItem( ID_CHANGE_SYMBOL, FALSE ); - pPopup->EnableItem( ID_RESET_SYMBOL, FALSE ); + pPopup->EnableItem( ID_RENAME, sal_False ); + pPopup->EnableItem( ID_DELETE, sal_False ); + pPopup->EnableItem( ID_BEGIN_GROUP, sal_False ); + pPopup->EnableItem( ID_DEFAULT_COMMAND, sal_False ); + pPopup->EnableItem( ID_ICON_ONLY, sal_False ); + pPopup->EnableItem( ID_ICON_AND_TEXT, sal_False ); + pPopup->EnableItem( ID_TEXT_ONLY, sal_False ); + pPopup->EnableItem( ID_CHANGE_SYMBOL, sal_False ); + pPopup->EnableItem( ID_RESET_SYMBOL, sal_False ); aDescriptionField.Clear(); @@ -4583,22 +4582,22 @@ void SvxToolbarConfigPage::UpdateButtonStates() SvxConfigEntry* pEntryData = (SvxConfigEntry*) selection->GetUserData(); if ( pEntryData->IsSeparator() ) - pPopup->EnableItem( ID_DELETE, TRUE ); + pPopup->EnableItem( ID_DELETE, sal_True ); else { - pPopup->EnableItem( ID_BEGIN_GROUP, TRUE ); - pPopup->EnableItem( ID_DELETE, TRUE ); - pPopup->EnableItem( ID_RENAME, TRUE ); - pPopup->EnableItem( ID_ICON_ONLY, TRUE ); - pPopup->EnableItem( ID_ICON_AND_TEXT, TRUE ); - pPopup->EnableItem( ID_TEXT_ONLY, TRUE ); - pPopup->EnableItem( ID_CHANGE_SYMBOL, TRUE ); + pPopup->EnableItem( ID_BEGIN_GROUP, sal_True ); + pPopup->EnableItem( ID_DELETE, sal_True ); + pPopup->EnableItem( ID_RENAME, sal_True ); + pPopup->EnableItem( ID_ICON_ONLY, sal_True ); + pPopup->EnableItem( ID_ICON_AND_TEXT, sal_True ); + pPopup->EnableItem( ID_TEXT_ONLY, sal_True ); + pPopup->EnableItem( ID_CHANGE_SYMBOL, sal_True ); if ( !pEntryData->IsUserDefined() ) - pPopup->EnableItem( ID_DEFAULT_COMMAND, TRUE ); + pPopup->EnableItem( ID_DEFAULT_COMMAND, sal_True ); if ( pEntryData->IsIconModified() ) - pPopup->EnableItem( ID_RESET_SYMBOL, TRUE ); + pPopup->EnableItem( ID_RESET_SYMBOL, sal_True ); aDescriptionField.SetNewText( pEntryData->GetHelpText() ); } @@ -4628,16 +4627,16 @@ IMPL_LINK( SvxToolbarConfigPage, SelectToolbar, ListBox *, pBox ) SvxConfigEntry* pToolbar = GetTopLevelSelection(); if ( pToolbar == NULL ) { - aModifyTopLevelButton.Enable( FALSE ); - aModifyCommandButton.Enable( FALSE ); - aAddCommandsButton.Enable( FALSE ); + aModifyTopLevelButton.Enable( sal_False ); + aModifyCommandButton.Enable( sal_False ); + aAddCommandsButton.Enable( sal_False ); return 0; } - aModifyTopLevelButton.Enable( TRUE ); - aModifyCommandButton.Enable( TRUE ); - aAddCommandsButton.Enable( TRUE ); + aModifyTopLevelButton.Enable( sal_True ); + aModifyCommandButton.Enable( sal_True ); + aAddCommandsButton.Enable( sal_True ); PopupMenu* pPopup = aModifyTopLevelButton.GetPopupMenu(); @@ -4705,8 +4704,8 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton ) SvxNewToolbarDialog* pNameDialog = new SvxNewToolbarDialog( 0, aNewName ); - USHORT nInsertPos; - for ( USHORT i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) + sal_uInt16 nInsertPos; + for ( sal_uInt16 i = 0 ; i < aSaveInListBox.GetEntryCount(); i++ ) { SaveInData* pData = (SaveInData*) aSaveInListBox.GetEntryData( i ); @@ -4718,7 +4717,7 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton ) } pNameDialog->aSaveInListBox.SelectEntryPos( - aSaveInListBox.GetSelectEntryPos(), TRUE ); + aSaveInListBox.GetSelectEntryPos(), sal_True ); bool ret = pNameDialog->Execute(); if ( ret == RET_OK ) @@ -4732,24 +4731,24 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton ) if ( GetSaveInData() != pData ) { - aSaveInListBox.SelectEntryPos( nInsertPos, TRUE ); + aSaveInListBox.SelectEntryPos( nInsertPos, sal_True ); aSaveInListBox.GetSelectHdl().Call(this); } SvxConfigEntry* pToolbar = - new SvxConfigEntry( aNewName, aNewURL, TRUE ); + new SvxConfigEntry( aNewName, aNewURL, sal_True ); - pToolbar->SetUserDefined( TRUE ); - pToolbar->SetMain( TRUE ); + pToolbar->SetUserDefined( sal_True ); + pToolbar->SetMain( sal_True ); pData->CreateToolbar( pToolbar ); nInsertPos = aTopLevelListBox.InsertEntry( pToolbar->GetName() ); aTopLevelListBox.SetEntryData( nInsertPos, pToolbar ); - aTopLevelListBox.SelectEntryPos( nInsertPos, TRUE ); + aTopLevelListBox.SelectEntryPos( nInsertPos, sal_True ); aTopLevelListBox.GetSelectHdl().Call(this); - pData->SetModified( TRUE ); + pData->SetModified( sal_True ); } delete pNameDialog; @@ -4764,7 +4763,7 @@ IMPL_LINK( SvxToolbarConfigPage, AddCommandsHdl, Button *, pButton ) if ( pSelectorDlg == NULL ) { // Create Script Selector which shows slot commands - pSelectorDlg = new SvxScriptSelectorDialog( this, TRUE, m_xFrame ); + pSelectorDlg = new SvxScriptSelectorDialog( this, sal_True, m_xFrame ); // Position the Script Selector over the Add button so it is // beside the menu contents list and does not obscure it @@ -4801,7 +4800,7 @@ SvLBoxEntry* SvxToolbarConfigPage::AddFunction( if ( pEntry->IsBinding() ) { - pEntry->SetVisible( TRUE ); + pEntry->SetVisible( sal_True ); aContentsListBox->SetCheckButtonState( pNewLBEntry, SV_BUTTON_CHECKED ); } @@ -4885,8 +4884,8 @@ Image SvxToolbarEntriesListBox::GetSizedImage( // Position image at the center of (width-2),(height) rectangle. // We need 2 pixels to have a bigger border to the next button image - USHORT nPosX = std::max( (USHORT) (((( aNewSize.Width() - 2 ) - aImage.GetSizePixel().Width() ) / 2 ) - 1), (USHORT) 0 ); - USHORT nPosY = std::max( (USHORT) (((( aNewSize.Height() - 2 ) - aImage.GetSizePixel().Height() ) / 2 ) + 1), (USHORT) 0 ); + sal_uInt16 nPosX = std::max( (sal_uInt16) (((( aNewSize.Width() - 2 ) - aImage.GetSizePixel().Width() ) / 2 ) - 1), (sal_uInt16) 0 ); + sal_uInt16 nPosY = std::max( (sal_uInt16) (((( aNewSize.Height() - 2 ) - aImage.GetSizePixel().Height() ) / 2 ) + 1), (sal_uInt16) 0 ); Point aPos( nPosX > 0 ? nPosX : 0, nPosY > 0 ? nPosY : 0 ); aDev.SetFillColor( aFillColor ); aDev.SetLineColor( aFillColor ); @@ -4962,14 +4961,14 @@ void SvxToolbarEntriesListBox::KeyInput( const KeyEvent& rKeyEvent ) } } -BOOL SvxToolbarEntriesListBox::NotifyMoving( +sal_Bool SvxToolbarEntriesListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pSource, - SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos) + SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos) { bool result = SvxMenuEntriesListBox::NotifyMoving( pTarget, pSource, rpNewParent, rNewChildPos ); - if ( result == TRUE ) + if ( result == sal_True ) { // Instant Apply changes to UI SvxConfigEntry* pToolbar = pPage->GetTopLevelSelection(); @@ -4984,11 +4983,11 @@ BOOL SvxToolbarEntriesListBox::NotifyMoving( return result; } -BOOL SvxToolbarEntriesListBox::NotifyCopying( +sal_Bool SvxToolbarEntriesListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pSource, SvLBoxEntry*& rpNewParent, - ULONG& rNewChildPos) + sal_uLong& rNewChildPos) { (void)pSource; (void)rpNewParent; @@ -5010,11 +5009,11 @@ BOOL SvxToolbarEntriesListBox::NotifyCopying( // AddFunction already adds the listbox entry so return FALSE // to stop another listbox entry being added - return FALSE; + return sal_False; } // Copying is only allowed from external controls, not within the listbox - return FALSE; + return sal_False; } SvxNewToolbarDialog::SvxNewToolbarDialog( @@ -5077,7 +5076,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ImageInfo; - aTbSymbol.SetPageScroll( TRUE ); + aTbSymbol.SetPageScroll( sal_True ); bool bLargeIcons = GetImageType() & css::ui::ImageType::SIZE_LARGE; m_nExpectedSize = bLargeIcons ? 26 : 16; @@ -5101,7 +5100,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, if ( !m_xGraphProvider.is() ) { - aBtnImport.Enable( FALSE ); + aBtnImport.Enable( sal_False ); } uno::Reference< beans::XPropertySet > xPropSet( @@ -5126,7 +5125,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, } else { - aBtnImport.Enable( FALSE ); + aBtnImport.Enable( sal_False ); } aDirectory += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "soffice.cfg/import" ) ); @@ -5167,7 +5166,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, for ( sal_Int32 n = 0; n < names.getLength(); n++ ) mImageInfo.insert( ImageInfo::value_type( names[n], false )); } - USHORT nId = 1; + sal_uInt16 nId = 1; ImageInfo::const_iterator pConstIter = mImageInfo.begin(); uno::Sequence< OUString > name( 1 ); while ( pConstIter != mImageInfo.end() ) @@ -5247,7 +5246,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, ++pConstIter; } - aBtnDelete.Enable( FALSE ); + aBtnDelete.Enable( sal_False ); aTbSymbol.SetSelectHdl( LINK(this, SvxIconSelectorDialog, SelectHdl) ); aBtnImport.SetClickHdl( LINK(this, SvxIconSelectorDialog, ImportHdl) ); aBtnDelete.SetClickHdl( LINK(this, SvxIconSelectorDialog, DeleteHdl) ); @@ -5257,11 +5256,11 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, SvxIconSelectorDialog::~SvxIconSelectorDialog() { - USHORT nCount = aTbSymbol.GetItemCount(); + sal_uInt16 nCount = aTbSymbol.GetItemCount(); - for (USHORT n = 0; n < nCount; n++ ) + for (sal_uInt16 n = 0; n < nCount; n++ ) { - USHORT nId = aTbSymbol.GetItemId(n); + sal_uInt16 nId = aTbSymbol.GetItemId(n); uno::XInterface* xi = static_cast< uno::XInterface* >( aTbSymbol.GetItemData( nId ) ); @@ -5277,8 +5276,8 @@ uno::Reference< graphic::XGraphic> SvxIconSelectorDialog::GetSelectedIcon() { uno::Reference< graphic::XGraphic > result; - USHORT nId; - for ( USHORT n = 0; n < aTbSymbol.GetItemCount(); n++ ) + sal_uInt16 nId; + for ( sal_uInt16 n = 0; n < aTbSymbol.GetItemCount(); n++ ) { nId = aTbSymbol.GetItemId( n ); if ( aTbSymbol.IsItemChecked( nId ) ) @@ -5296,29 +5295,29 @@ IMPL_LINK( SvxIconSelectorDialog, SelectHdl, ToolBox *, pToolBox ) { (void)pToolBox; - USHORT nCount = aTbSymbol.GetItemCount(); + sal_uInt16 nCount = aTbSymbol.GetItemCount(); - for (USHORT n = 0; n < nCount; n++ ) + for (sal_uInt16 n = 0; n < nCount; n++ ) { - USHORT nId = aTbSymbol.GetItemId( n ); + sal_uInt16 nId = aTbSymbol.GetItemId( n ); if ( aTbSymbol.IsItemChecked( nId ) ) { - aTbSymbol.CheckItem( nId, FALSE ); + aTbSymbol.CheckItem( nId, sal_False ); } } - USHORT nId = aTbSymbol.GetCurItemId(); + sal_uInt16 nId = aTbSymbol.GetCurItemId(); aTbSymbol.CheckItem( nId ); ::rtl::OUString aSelImageText = aTbSymbol.GetItemText( nId ); if ( m_xImportedImageManager->hasImage( GetImageType(), aSelImageText ) ) { - aBtnDelete.Enable( TRUE ); + aBtnDelete.Enable( sal_True ); } else { - aBtnDelete.Enable( FALSE ); + aBtnDelete.Enable( sal_False ); } return 0; @@ -5363,11 +5362,11 @@ IMPL_LINK( SvxIconSelectorDialog, DeleteHdl, PushButton *, pButton ) if ( ret == RET_OK ) { - USHORT nCount = aTbSymbol.GetItemCount(); + sal_uInt16 nCount = aTbSymbol.GetItemCount(); - for (USHORT n = 0; n < nCount; n++ ) + for (sal_uInt16 n = 0; n < nCount; n++ ) { - USHORT nId = aTbSymbol.GetItemId( n ); + sal_uInt16 nId = aTbSymbol.GetItemId( n ); if ( aTbSymbol.IsItemChecked( nId ) ) { @@ -5403,7 +5402,7 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem( aMediaProps[0].Value <<= aURL; com::sun::star::awt::Size aSize; - bool bOK = FALSE; + bool bOK = sal_False; try { xGraphic = m_xGraphProvider->queryGraphic( aMediaProps ); @@ -5414,9 +5413,9 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem( OUString::createFromAscii("SizePixel") ); a >>= aSize; if (0 == aSize.Width || 0 == aSize.Height) - return FALSE; + return sal_False; else - bOK = TRUE; + bOK = sal_True; } catch ( uno::Exception& ) { @@ -5424,10 +5423,10 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem( } bool bResult( false ); - USHORT nCount = aTbSymbol.GetItemCount(); - for (USHORT n = 0; n < nCount; n++ ) + sal_uInt16 nCount = aTbSymbol.GetItemCount(); + for (sal_uInt16 n = 0; n < nCount; n++ ) { - USHORT nId = aTbSymbol.GetItemId( n ); + sal_uInt16 nId = aTbSymbol.GetItemId( n ); if ( OUString( aTbSymbol.GetItemText( nId ) ) == aURL ) { @@ -5472,7 +5471,7 @@ void SvxIconSelectorDialog::ImportGraphics( uno::Sequence< OUString > rejected( rPaths.getLength() ); sal_Int32 rejectedCount = 0; - USHORT ret = 0; + sal_uInt16 ret = 0; sal_Int32 aIndex; OUString aIconName; uno::Sequence< OUString > URLs(1); @@ -5496,7 +5495,7 @@ void SvxIconSelectorDialog::ImportGraphics( } else { - if ( ImportGraphic( rPaths[0] ) == FALSE ) + if ( ImportGraphic( rPaths[0] ) == sal_False ) { rejected[0] = rPaths[0]; rejectedCount = 1; @@ -5516,7 +5515,7 @@ void SvxIconSelectorDialog::ImportGraphics( { aIndex = rPaths[i].lastIndexOf( '/' ); aIconName = rPaths[i].copy( aIndex+1 ); - ret = SvxIconReplacementDialog( this, aIconName, TRUE ).ShowDialog(); + ret = SvxIconReplacementDialog( this, aIconName, sal_True ).ShowDialog(); if ( ret == 2 ) { ReplaceGraphicItem( aPath ); @@ -5531,7 +5530,7 @@ void SvxIconSelectorDialog::ImportGraphics( if ( !bHasReplaced ) { bool result = ImportGraphic( aPath ); - if ( result == FALSE ) + if ( result == sal_False ) { rejected[ rejectedCount ] = rPaths[i]; rejectedCount++; @@ -5544,7 +5543,7 @@ void SvxIconSelectorDialog::ImportGraphics( else { bool result = ImportGraphic( aSourcePath + rPaths[i] ); - if ( result == FALSE ) + if ( result == sal_False ) { rejected[ rejectedCount ] = rPaths[i]; rejectedCount++; @@ -5573,9 +5572,9 @@ void SvxIconSelectorDialog::ImportGraphics( bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) { - bool result = FALSE; + bool result = sal_False; - USHORT nId = m_nNextId; + sal_uInt16 nId = m_nNextId; ++m_nNextId; uno::Sequence< beans::PropertyValue > aMediaProps( 1 ); @@ -5583,7 +5582,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) uno::Reference< graphic::XGraphic > xGraphic; com::sun::star::awt::Size aSize; - bool bOK = TRUE; + bool bOK = sal_True; aMediaProps[0].Value <<= aURL; try { @@ -5598,7 +5597,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) { a >>= aSize; if ( 0 == aSize.Width || 0 == aSize.Height ) - bOK = FALSE; + bOK = sal_False; Image aImage( xGraphic ); @@ -5630,7 +5629,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) xConfigPersistence->store(); } - result = TRUE; + result = sal_True; } else { @@ -5692,7 +5691,7 @@ rtl::OUString SvxIconReplacementDialog :: ReplaceIconName( const OUString& rMess return name; } -USHORT SvxIconReplacementDialog :: ShowDialog() +sal_uInt16 SvxIconReplacementDialog :: ShowDialog() { this->Execute(); return ( this->GetCurButtonId() ); @@ -5714,8 +5713,8 @@ SvxIconChangeDialog::SvxIconChangeDialog( FreeResource(); aFImageInfo.SetImage(InfoBox::GetStandardImage()); aLineEditDescription.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() ); - aLineEditDescription.SetAutoScroll( TRUE ); - aLineEditDescription.EnableCursor( FALSE ); + aLineEditDescription.SetAutoScroll( sal_True ); + aLineEditDescription.EnableCursor( sal_False ); aLineEditDescription.SetText(aMessage); } diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index b85ec24adee2..59fc088abe1e 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -59,7 +59,6 @@ #include <tools/urlobj.hxx> #include "cuires.hrc" #include <sfx2/app.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/minfitem.hxx> #include <unotools/processfactory.hxx> #include <comphelper/documentinfo.hxx> @@ -345,21 +344,18 @@ void SfxConfigFunctionListBox_Impl::ClearAll() vorhandenen MacroInfos. */ { - USHORT nCount = aArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = aArr.Count(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { SfxGroupInfo_Impl *pData = aArr[i]; - if ( pData->nKind == SFX_CFGFUNCTION_MACRO || - pData->nKind == SFX_CFGFUNCTION_SCRIPT ) + if ( pData->nKind == SFX_CFGFUNCTION_SCRIPT ) { - SfxMacroInfo *pInfo = (SfxMacroInfo*) pData->pObject; - SFX_APP()->GetMacroConfig()->ReleaseSlotId( pInfo->GetSlotId() ); - delete pInfo; + String* pScriptURI = (String*)pData->pObject; + delete pScriptURI; } if ( pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER - || pData->nKind == SFX_CFGGROUP_DOCBASICMGR ) { XInterface* xi = static_cast<XInterface *>(pData->pObject); @@ -376,21 +372,16 @@ void SfxConfigFunctionListBox_Impl::ClearAll() Clear(); } -SfxMacroInfo* SfxConfigFunctionListBox_Impl::GetMacroInfo() -/* Beschreibung - Gibt die MacroInfo des selektierten Entry zur"uck ( sofern vorhanden ). -*/ +String SfxConfigFunctionListBox_Impl::GetSelectedScriptURI() { SvLBoxEntry *pEntry = FirstSelected(); if ( pEntry ) { SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData(); - if ( pData && ( pData->nKind == SFX_CFGFUNCTION_MACRO || - pData->nKind == SFX_CFGFUNCTION_SCRIPT ) ) - return (SfxMacroInfo*) pData->pObject; + if ( pData && ( pData->nKind == SFX_CFGFUNCTION_SCRIPT ) ) + return *(String*)pData->pObject; } - - return 0; + return String(); } String SfxConfigFunctionListBox_Impl::GetCurCommand() @@ -449,7 +440,6 @@ struct SvxConfigGroupBoxResource_Impl : public Resource String m_sDlgMacros; String m_aHumanAppName; String m_aStrGroupStyles; - String m_aScriptType; Image m_collapsedImage; Image m_collapsedImage_hc; Image m_expandedImage; @@ -474,7 +464,6 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() : m_sDlgMacros(String(CUI_RES(STR_DLG_MACROS))), m_aHumanAppName(String(CUI_RES(STR_HUMAN_APPNAME))), m_aStrGroupStyles(String(CUI_RES(STR_GROUP_STYLES))), - m_aScriptType(String(CUI_RES(STR_BASICNAME))), m_collapsedImage(CUI_RES(BMP_COLLAPSED)), m_collapsedImage_hc(CUI_RES(BMP_COLLAPSED_HC)), m_expandedImage(CUI_RES(BMP_EXPANDED)), @@ -484,44 +473,13 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() : } SfxConfigGroupListBox_Impl::SfxConfigGroupListBox_Impl( - Window* pParent, const ResId& rResId, ULONG nConfigMode ) + Window* pParent, const ResId& rResId, sal_uLong nConfigMode ) : SvTreeListBox( pParent, rResId ) - , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), nMode( nConfigMode ), bShowSF( FALSE ), bShowBasic( TRUE ), pStylesInfo(0) + , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), nMode( nConfigMode ), pStylesInfo(0) { SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT ); SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage, BMP_COLOR_NORMAL ); SetNodeBitmaps( pImp->m_collapsedImage_hc, pImp->m_expandedImage_hc, BMP_COLOR_HIGHCONTRAST ); - - // Check configuration to see whether only Basic macros, - // only Scripting Framework scripts, or both should be listed - Any value; - sal_Bool tmp = false; - - value = ::utl::ConfigManager::GetConfigManager()->GetLocalProperty( - ::rtl::OUString::createFromAscii( - "Office.Scripting/ScriptDisplaySettings/ShowBasic" ) ); - - value >>= tmp; - - if (tmp == sal_True) { - bShowBasic = TRUE; - } - else { - bShowBasic = FALSE; - } - - value = ::utl::ConfigManager::GetConfigManager()->GetLocalProperty( - ::rtl::OUString::createFromAscii( - "Office.Scripting/ScriptDisplaySettings/ShowSF" ) ); - - value >>= tmp; - - if (tmp == sal_True) { - bShowSF = TRUE; - } - else { - bShowSF = FALSE; - } } @@ -532,12 +490,11 @@ SfxConfigGroupListBox_Impl::~SfxConfigGroupListBox_Impl() void SfxConfigGroupListBox_Impl::ClearAll() { - USHORT nCount = aArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = aArr.Count(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { SfxGroupInfo_Impl *pData = aArr[i]; if ( pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER - || pData->nKind == SFX_CFGGROUP_DOCBASICMGR ) { XInterface* xi = static_cast<XInterface *>(pData->pObject); @@ -553,31 +510,6 @@ void SfxConfigGroupListBox_Impl::ClearAll() Clear(); } -void SfxConfigGroupListBox_Impl::SetScriptType( const String& rScriptType ) -{ - pImp->m_aScriptType = rScriptType; - ULONG nPos=0; - SvLBoxEntry *pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ ); - while ( pEntry ) - { - SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData(); - if ( pInfo->nKind == SFX_CFGGROUP_BASICLIB && ( IsExpanded( pEntry ) || pInfo->bWasOpened ) ) - { - Collapse( pEntry ); - SvLBoxEntry *pChild = FirstChild( pEntry ); - while (pChild) - { - GetModel()->Remove( pChild ); - pChild = FirstChild( pEntry ); - } - - Expand( pEntry ); - } - - pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ ); - } -} - void SfxConfigGroupListBox_Impl::SetStylesInfo(SfxStylesInfo_Impl* pStyles) { pStylesInfo = pStyles; @@ -596,18 +528,6 @@ String SfxConfigGroupListBox_Impl::GetGroup() if ( pInfo->nKind == SFX_CFGGROUP_FUNCTION ) return GetEntryText( pEntry ); - if ( pInfo->nKind == SFX_CFGGROUP_BASICMGR ) - { - BasicManager *pMgr = (BasicManager*) pInfo->pObject; - return pMgr->GetName(); - } - - if ( pInfo->nKind == SFX_CFGGROUP_DOCBASICMGR ) - { - Reference< XModel > xDoc( static_cast< XModel* >( pInfo->pObject ) ); - return ::comphelper::DocumentInfo::getDocumentTitle( xDoc ); - } - pEntry = GetParent( pEntry ); } @@ -615,27 +535,6 @@ String SfxConfigGroupListBox_Impl::GetGroup() } //----------------------------------------------- -BasicManager* SfxConfigGroupListBox_Impl::GetBasicManager( const SvLBoxEntry& _rEntry ) -{ - BasicManager* pBasMgr = NULL; - - SfxGroupInfo_Impl* pInfo = (SfxGroupInfo_Impl*) _rEntry.GetUserData(); - switch ( pInfo->nKind ) - { - case SFX_CFGGROUP_BASICMGR : - pBasMgr = (BasicManager*) pInfo->pObject; - break; - case SFX_CFGGROUP_DOCBASICMGR : - { - Reference< XModel > xDoc( static_cast< XModel* >( pInfo->pObject ) ); - pBasMgr = ::basic::BasicManagerRepository::getDocumentBasicManager( xDoc ); - } - break; - } - return pBasMgr; -} - -//----------------------------------------------- void SfxConfigGroupListBox_Impl::InitModule() { try @@ -740,7 +639,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul const css::uno::Reference< css::frame::XFrame >& xFrame , const ::rtl::OUString& sModuleLongName) { - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); ClearAll(); // Remove all old entries from treelist box m_xFrame = xFrame; @@ -758,253 +657,144 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul InitStyles(); } - /* - - // Verwendet wird der aktuelle Slotpool - if ( nMode ) + OSL_TRACE("** ** About to initialise SF Scripts"); + // Add Scripting Framework entries + Reference< browse::XBrowseNode > rootNode; + Reference< XComponentContext > xCtx; + try { - pSlotPool = pPool ? pPool : &SFX_SLOTPOOL(); - for ( USHORT i=1; i<pSlotPool->GetGroupCount(); i++ ) - { - // Gruppe anw"ahlen ( Gruppe 0 ist intern ) - String aName = pSlotPool->SeekGroup( i ); - const SfxSlot *pSfxSlot = pSlotPool->FirstSlot(); - if ( pSfxSlot ) - { - // Check if all entries are not useable. Don't - // insert a group without any useable function. - sal_Bool bActiveEntries = sal_False; - while ( pSfxSlot ) - { - USHORT nId = pSfxSlot->GetSlotId(); - if ( pSfxSlot->GetMode() & nMode ) - { - bActiveEntries = sal_True; - break; - } - - pSfxSlot = pSlotPool->NextSlot(); - } - - if ( bActiveEntries ) - { - // Wenn Gruppe nicht leer - SvLBoxEntry *pEntry = InsertEntry( aName, NULL ); - SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_FUNCTION, i ); - aArr.Insert( pInfo, aArr.Count() ); - pEntry->SetUserData( pInfo ); - } - } - } + Reference < beans::XPropertySet > xProps( + ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); + xCtx.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY_THROW ); + Reference< browse::XBrowseNodeFactory > xFac( xCtx->getValueByName( + ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ), UNO_QUERY_THROW ); + rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) ); + //rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROORGANIZER ) ); } -*/ - SfxApplication *pSfxApp = SFX_APP(); - if ( bShowBasic ) + catch( Exception& e ) { - // Basics einsammeln - pSfxApp->EnterBasicCall(); - String aMacroName(' '); - aMacroName += pImp->m_sDlgMacros; - - // Zuerst AppBasic - BasicManager *pAppBasicMgr = pSfxApp->GetBasicManager(); - BOOL bInsert = TRUE; - /* - if ( pArr ) - { - bInsert = FALSE; - for ( USHORT n=0; n<pArr->Count(); n++ ) - { - if ( *(*pArr)[n] == pSfxApp->GetName() ) - { - bInsert = TRUE; - break; - } - } - } - */ - - if ( bInsert ) - { - pAppBasicMgr->SetName( pSfxApp->GetName() ); - if ( pAppBasicMgr->GetLibCount() ) - { - // Nur einf"ugen, wenn Bibliotheken vorhanden - String aAppBasTitle( pImp->m_aHumanAppName ); - aAppBasTitle += aMacroName; - SvLBoxEntry *pEntry = InsertEntry( aAppBasTitle, 0 ); - SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICMGR, 0, pAppBasicMgr ); - // aArr.Insert( pInfo, aArr.Count() ); - pEntry->SetUserData( pInfo ); - pEntry->EnableChildsOnDemand( TRUE ); - // Expand( pEntry ); - } - } - - Reference< XModel > xDoc( lcl_getScriptableDocument_nothrow( m_xFrame ) ); - if ( xDoc.is() ) - { - BasicManager* pBasicMgr = ::basic::BasicManagerRepository::getDocumentBasicManager( xDoc ); - if ( pBasicMgr != pAppBasicMgr && pBasicMgr->GetLibCount() ) - { - String sDocTitle( ::comphelper::DocumentInfo::getDocumentTitle( xDoc ) ); - pBasicMgr->SetName( sDocTitle ); - - // Nur einf"ugen, wenn eigenes Basic mit Bibliotheken - SvLBoxEntry *pEntry = InsertEntry( sDocTitle.Append( aMacroName ), NULL ); - xDoc->acquire(); - SfxGroupInfo_Impl *pInfo = - new SfxGroupInfo_Impl( SFX_CFGGROUP_DOCBASICMGR, 0, xDoc.get() ); - pEntry->SetUserData( pInfo ); - pEntry->EnableChildsOnDemand( TRUE ); - } - } - - pSfxApp->LeaveBasicCall(); + OSL_TRACE(" Caught some exception whilst retrieving browse nodes from factory... Exception: %s", + ::rtl::OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).pData->buffer ); + // TODO exception handling } - OSL_TRACE("** ** About to initialise SF Scripts"); - if ( bShowSF ) + + if ( rootNode.is() ) { - OSL_TRACE("** ** bShowSF"); - // Add Scripting Framework entries - Reference< browse::XBrowseNode > rootNode; - Reference< XComponentContext > xCtx; - try + if ( nMode ) { - Reference < beans::XPropertySet > xProps( - ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); - xCtx.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY_THROW ); - Reference< browse::XBrowseNodeFactory > xFac( xCtx->getValueByName( - ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ), UNO_QUERY_THROW ); - rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) ); - //rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROORGANIZER ) ); + //We call acquire on the XBrowseNode so that it does not + //get autodestructed and become invalid when accessed later. + rootNode->acquire(); + + SfxGroupInfo_Impl *pInfo = + new SfxGroupInfo_Impl( SFX_CFGGROUP_SCRIPTCONTAINER, 0, + static_cast<void *>(rootNode.get())); + + String aTitle(pImp->m_sDlgMacros); + SvLBoxEntry *pNewEntry = InsertEntry( aTitle, NULL ); + pNewEntry->SetUserData( pInfo ); + pNewEntry->EnableChildsOnDemand( sal_True ); + aArr.Insert( pInfo, aArr.Count() ); } - catch( Exception& e ) + else { - OSL_TRACE(" Caught some exception whilst retrieving browse nodes from factory... Exception: %s", - ::rtl::OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).pData->buffer ); - // TODO exception handling - } - + //We are only showing scripts not slot APIs so skip + //Root node and show location nodes + try { + if ( rootNode->hasChildNodes() ) + { + Sequence< Reference< browse::XBrowseNode > > children = + rootNode->getChildNodes(); + sal_Bool bIsRootNode = sal_False; - if ( rootNode.is() ) - { - if ( nMode ) - { - //We call acquire on the XBrowseNode so that it does not - //get autodestructed and become invalid when accessed later. - rootNode->acquire(); - - SfxGroupInfo_Impl *pInfo = - new SfxGroupInfo_Impl( SFX_CFGGROUP_SCRIPTCONTAINER, 0, - static_cast<void *>(rootNode.get())); - - String aTitle(pImp->m_sDlgMacros); - SvLBoxEntry *pNewEntry = InsertEntry( aTitle, NULL ); - pNewEntry->SetUserData( pInfo ); - pNewEntry->EnableChildsOnDemand( TRUE ); - aArr.Insert( pInfo, aArr.Count() ); - } - else - { - //We are only showing scripts not slot APIs so skip - //Root node and show location nodes - try { - if ( rootNode->hasChildNodes() ) + ::rtl::OUString user = ::rtl::OUString::createFromAscii("user"); + ::rtl::OUString share = ::rtl::OUString::createFromAscii("share"); + if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") )) { - Sequence< Reference< browse::XBrowseNode > > children = - rootNode->getChildNodes(); - BOOL bIsRootNode = FALSE; - - ::rtl::OUString user = ::rtl::OUString::createFromAscii("user"); - ::rtl::OUString share = ::rtl::OUString::createFromAscii("share"); - if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") )) - { - bIsRootNode = TRUE; - } + bIsRootNode = sal_True; + } - //To mimic current starbasic behaviour we - //need to make sure that only the current document - //is displayed in the config tree. Tests below - //set the bDisplay flag to FALSE if the current - //node is a first level child of the Root and is NOT - //either the current document, user or share - ::rtl::OUString currentDocTitle; - Reference< XModel > xDocument( lcl_getScriptableDocument_nothrow( m_xFrame ) ); - if ( xDocument.is() ) - { - currentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xDocument ); - } + //To mimic current starbasic behaviour we + //need to make sure that only the current document + //is displayed in the config tree. Tests below + //set the bDisplay flag to FALSE if the current + //node is a first level child of the Root and is NOT + //either the current document, user or share + ::rtl::OUString currentDocTitle; + Reference< XModel > xDocument( lcl_getScriptableDocument_nothrow( m_xFrame ) ); + if ( xDocument.is() ) + { + currentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xDocument ); + } - for ( sal_Int32 n = 0; n < children.getLength(); n++ ) + for ( sal_Int32 n = 0; n < children.getLength(); n++ ) + { + Reference< browse::XBrowseNode >& theChild = children[n]; + sal_Bool bDisplay = sal_True; + ::rtl::OUString uiName = theChild->getName(); + if ( bIsRootNode ) { - Reference< browse::XBrowseNode >& theChild = children[n]; - BOOL bDisplay = TRUE; - ::rtl::OUString uiName = theChild->getName(); - if ( bIsRootNode ) + if ( ! ((theChild->getName().equals( user ) || theChild->getName().equals( share ) || + theChild->getName().equals( currentDocTitle ) ) ) ) { - if ( ! ((theChild->getName().equals( user ) || theChild->getName().equals( share ) || - theChild->getName().equals( currentDocTitle ) ) ) ) + bDisplay=sal_False; + } + else + { + if ( uiName.equals( user ) ) { - bDisplay=FALSE; + uiName = pImp->m_sMyMacros; } - else + else if ( uiName.equals( share ) ) { - if ( uiName.equals( user ) ) - { - uiName = pImp->m_sMyMacros; - } - else if ( uiName.equals( share ) ) - { - uiName = pImp->m_sProdMacros; - } + uiName = pImp->m_sProdMacros; } } - if (children[n]->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay ) - { + } + if (children[n]->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay ) + { // We call acquire on the XBrowseNode so that it does not // get autodestructed and become invalid when accessed later. - theChild->acquire(); + theChild->acquire(); - SfxGroupInfo_Impl* pInfo = - new SfxGroupInfo_Impl(SFX_CFGGROUP_SCRIPTCONTAINER, - 0, static_cast<void *>( theChild.get())); + SfxGroupInfo_Impl* pInfo = + new SfxGroupInfo_Impl(SFX_CFGGROUP_SCRIPTCONTAINER, + 0, static_cast<void *>( theChild.get())); - Image aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_NORMAL ); - SvLBoxEntry* pNewEntry = - InsertEntry( uiName, NULL); - SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); - SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); - aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_HIGHCONTRAST ); - SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); - SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); + Image aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_NORMAL ); + SvLBoxEntry* pNewEntry = + InsertEntry( uiName, NULL); + SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); + SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL); + aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_HIGHCONTRAST ); + SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); + SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST); - pNewEntry->SetUserData( pInfo ); - aArr.Insert( pInfo, aArr.Count() ); + pNewEntry->SetUserData( pInfo ); + aArr.Insert( pInfo, aArr.Count() ); - if ( children[n]->hasChildNodes() ) - { - Sequence< Reference< browse::XBrowseNode > > grandchildren = - children[n]->getChildNodes(); + if ( children[n]->hasChildNodes() ) + { + Sequence< Reference< browse::XBrowseNode > > grandchildren = + children[n]->getChildNodes(); - for ( sal_Int32 m = 0; m < grandchildren.getLength(); m++ ) + for ( sal_Int32 m = 0; m < grandchildren.getLength(); m++ ) + { + if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) { - if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) - { - pNewEntry->EnableChildsOnDemand( TRUE ); - m = grandchildren.getLength(); - } + pNewEntry->EnableChildsOnDemand( sal_True ); + m = grandchildren.getLength(); } } } } } } - catch (RuntimeException&) { - // do nothing, the entry will not be displayed in the UI - } + } + catch (RuntimeException&) { + // do nothing, the entry will not be displayed in the UI } } } @@ -1017,19 +807,11 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_STYLES, 0, 0 ); // TODO last parameter should contain user data aArr.Insert( pInfo, aArr.Count() ); pEntry->SetUserData( pInfo ); - pEntry->EnableChildsOnDemand( TRUE ); + pEntry->EnableChildsOnDemand( sal_True ); } -/* { - String sSymbols( String::CreateFromAscii("Symbols") ); - SvLBoxEntry *pEntry = InsertEntry( sSymbols, 0 ); - SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_SPECIALCHARACTERS, 0, 0 ); // TODO last parameter should contain user data - aArr.Insert( pInfo, aArr.Count() ); - pEntry->SetUserData( pInfo ); - } */ - MakeVisible( GetEntry( 0,0 ) ); - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); } Image SfxConfigGroupListBox_Impl::GetImage( Reference< browse::XBrowseNode > node, Reference< XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast ) { @@ -1205,14 +987,13 @@ void SfxConfigGroupListBox_Impl::GroupSelected() { SvLBoxEntry *pEntry = FirstSelected(); SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData(); - pFunctionListBox->SetUpdateMode(FALSE); + pFunctionListBox->SetUpdateMode(sal_False); pFunctionListBox->ClearAll(); if ( pInfo->nKind != SFX_CFGGROUP_FUNCTION && - pInfo->nKind != SFX_CFGGROUP_BASICMOD && pInfo->nKind != SFX_CFGGROUP_SCRIPTCONTAINER && pInfo->nKind != SFX_CFGGROUP_STYLES ) { - pFunctionListBox->SetUpdateMode(TRUE); + pFunctionListBox->SetUpdateMode(sal_True); return; } @@ -1220,7 +1001,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected() { case SFX_CFGGROUP_FUNCTION : { - USHORT nGroup = pInfo->nOrd; + sal_uInt16 nGroup = pInfo->nUniqueID; css::uno::Reference< css::frame::XDispatchInformationProvider > xProvider (m_xFrame, css::uno::UNO_QUERY_THROW); css::uno::Sequence< css::frame::DispatchInformation > lCommands = xProvider->getConfigurableDispatchInformation(nGroup); sal_Int32 c = lCommands.getLength(); @@ -1240,45 +1021,6 @@ void SfxConfigGroupListBox_Impl::GroupSelected() break; } - case SFX_CFGGROUP_BASICMOD : - { - SvLBoxEntry *pLibEntry = GetParent( pEntry ); - SfxGroupInfo_Impl *pLibInfo = - (SfxGroupInfo_Impl*) pLibEntry->GetUserData(); - SvLBoxEntry *pBasEntry = GetParent( pLibEntry ); - SfxGroupInfo_Impl *pBasInfo = - (SfxGroupInfo_Impl*) pBasEntry->GetUserData(); - - StarBASIC *pLib = (StarBASIC*) pLibInfo->pObject; - Reference< XModel > xDoc; - if ( pBasInfo->nKind == SFX_CFGGROUP_DOCBASICMGR ) - xDoc = static_cast< XModel* >( pBasInfo->pObject ); - - SbModule *pMod = (SbModule*) pInfo->pObject; - for ( USHORT nMeth=0; nMeth < pMod->GetMethods()->Count(); nMeth++ ) - { - SbxMethod *pMeth = (SbxMethod*)pMod->GetMethods()->Get(nMeth); - SfxMacroInfoPtr pInf = new SfxMacroInfo( !xDoc.is(), - pLib->GetName(), - pMod->GetName(), - pMeth->GetName()); - if ( pMeth->GetInfo() ) - pInf->SetHelpText( pMeth->GetInfo()->GetComment() ); - USHORT nId = SFX_APP()->GetMacroConfig()->GetSlotId( pInf ); - if ( !nId ) - break; // Kein Slot mehr frei - - SvLBoxEntry* pFuncEntry = - pFunctionListBox->InsertEntry( pMeth->GetName(), NULL ); - SfxGroupInfo_Impl *pGrpInfo = - new SfxGroupInfo_Impl( SFX_CFGFUNCTION_MACRO, nId, pInf ); - pFunctionListBox->aArr.Insert( pGrpInfo, pFunctionListBox->aArr.Count() ); - pFuncEntry->SetUserData( pGrpInfo ); - } - - break; - } - case SFX_CFGGROUP_SCRIPTCONTAINER: { if ( !GetChildCount( pEntry ) ) @@ -1308,13 +1050,8 @@ void SfxConfigGroupListBox_Impl::GroupSelected() xPropSet->getPropertyValue( String::CreateFromAscii( "URI" ) ); value >>= uri; - SfxMacroInfo* aInfo = new SfxMacroInfo( (String)uri ); - aInfo->SetHelpText( uri ); - SFX_APP()->GetMacroConfig()->GetSlotId( aInfo ); - - SfxGroupInfo_Impl* pGrpInfo = - new SfxGroupInfo_Impl(SFX_CFGFUNCTION_SCRIPT, - aInfo->GetSlotId(), aInfo); + String* pScriptURI = new String( uri ); + SfxGroupInfo_Impl* pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGFUNCTION_SCRIPT, 0, pScriptURI ); Image aImage = GetImage( children[n], Reference< XComponentContext >(), sal_False, BMP_COLOR_NORMAL ); SvLBoxEntry* pNewEntry = @@ -1373,31 +1110,31 @@ void SfxConfigGroupListBox_Impl::GroupSelected() if ( pFunctionListBox->GetEntryCount() ) pFunctionListBox->Select( pFunctionListBox->GetEntry( 0, 0 ) ); - pFunctionListBox->SetUpdateMode(TRUE); + pFunctionListBox->SetUpdateMode(sal_True); } -BOOL SfxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) +sal_Bool SfxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) { - BOOL bRet = SvTreeListBox::Expand( pParent ); + sal_Bool bRet = SvTreeListBox::Expand( pParent ); if ( bRet ) { // Wieviele Entries k"onnen angezeigt werden ? - ULONG nEntries = GetOutputSizePixel().Height() / GetEntryHeight(); + sal_uLong nEntries = GetOutputSizePixel().Height() / GetEntryHeight(); // Wieviele Kinder sollen angezeigt werden ? - ULONG nChildCount = GetVisibleChildCount( pParent ); + sal_uLong nChildCount = GetVisibleChildCount( pParent ); // Passen alle Kinder und der parent gleichzeitig in die View ? if ( nChildCount+1 > nEntries ) { // Wenn nicht, wenigstens parent ganz nach oben schieben - MakeVisible( pParent, TRUE ); + MakeVisible( pParent, sal_True ); } else { // An welcher relativen ViewPosition steht der aufzuklappende parent SvLBoxEntry *pEntry = GetFirstEntryInView(); - ULONG nParentPos = 0; + sal_uLong nParentPos = 0; while ( pEntry && pEntry != pParent ) { nParentPos++; @@ -1419,69 +1156,9 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) */ { SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData(); - pInfo->bWasOpened = TRUE; + pInfo->bWasOpened = sal_True; switch ( pInfo->nKind ) { - case SFX_CFGGROUP_BASICMGR : - case SFX_CFGGROUP_DOCBASICMGR : - { - if ( !GetChildCount( pEntry ) ) - { - // Erstmaliges "Offnen - BasicManager* pMgr( GetBasicManager( *pEntry ) ); - - SvLBoxEntry *pLibEntry = 0; - for ( USHORT nLib=0; nLib<pMgr->GetLibCount(); nLib++) - { - StarBASIC* pLib = pMgr->GetLib( nLib ); - pLibEntry = InsertEntry( pMgr->GetLibName( nLib ), pEntry ); - SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICLIB, nLib, pLib ); - aArr.Insert( pGrpInfo, aArr.Count() ); - pLibEntry->SetUserData( pGrpInfo ); - pLibEntry->EnableChildsOnDemand( TRUE ); - } - } - - break; - } - - case SFX_CFGGROUP_BASICLIB : - { - if ( !GetChildCount( pEntry ) ) - { - // Erstmaliges "Offnen - StarBASIC *pLib = (StarBASIC*) pInfo->pObject; - if ( !pLib ) - { - // Lib mu\s nachgeladen werden - SvLBoxEntry *pParent = GetParent( pEntry ); - BasicManager *pMgr( GetBasicManager( *pParent ) ); - - if ( pMgr->LoadLib( pInfo->nOrd ) ) - pInfo->pObject = pLib = pMgr->GetLib( pInfo->nOrd ); - else - break; - } - - SvLBoxEntry *pModEntry = 0; - for ( USHORT nMod=0; nMod<pLib->GetModules()->Count(); nMod++ ) - { - SbModule* pMod = (SbModule*)pLib->GetModules()->Get( nMod ); - - BOOL bIsStarScript = FALSE; //pMod->ISA( SbJScriptModule ); - BOOL bWantsStarScript = pImp->m_aScriptType.EqualsAscii("StarScript"); - if ( bIsStarScript != bWantsStarScript ) - continue; - pModEntry = InsertEntry( pMod->GetName(), pEntry ); - SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICMOD, 0, pMod ); - aArr.Insert( pGrpInfo, aArr.Count() ); - pModEntry->SetUserData( pGrpInfo ); - } - } - - break; - } - case SFX_CFGGROUP_SCRIPTCONTAINER: { if ( !GetChildCount( pEntry ) ) @@ -1494,19 +1171,19 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) { Sequence< Reference< browse::XBrowseNode > > children = rootNode->getChildNodes(); - BOOL bIsRootNode = FALSE; + sal_Bool bIsRootNode = sal_False; ::rtl::OUString user = ::rtl::OUString::createFromAscii("user"); ::rtl::OUString share = ::rtl::OUString::createFromAscii("share"); if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") )) { - bIsRootNode = TRUE; + bIsRootNode = sal_True; } /* To mimic current starbasic behaviour we need to make sure that only the current document is displayed in the config tree. Tests below - set the bDisplay flag to FALSE if the current + set the bDisplay flag to sal_False if the current node is a first level child of the Root and is NOT either the current document, user or share */ ::rtl::OUString currentDocTitle; @@ -1521,11 +1198,11 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) { Reference< browse::XBrowseNode >& theChild = children[n]; ::rtl::OUString aName( theChild->getName() ); - BOOL bDisplay = TRUE; + sal_Bool bDisplay = sal_True; if ( bIsRootNode ) { if ( !( (aName.equals(user) || aName.equals(share) || aName.equals(currentDocTitle) ) ) ) - bDisplay=FALSE; + bDisplay=sal_False; } if ( children[n].is() && children[n]->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay ) { @@ -1561,7 +1238,7 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) { if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) { - pNewEntry->EnableChildsOnDemand( TRUE ); + pNewEntry->EnableChildsOnDemand( sal_True ); m = grandchildren.getLength(); } } @@ -1592,7 +1269,7 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_STYLES, 0, pFamily ); aArr.Insert( pGrpInfo, aArr.Count() ); pStyleEntry->SetUserData( pGrpInfo ); - pStyleEntry->EnableChildsOnDemand( FALSE ); + pStyleEntry->EnableChildsOnDemand( sal_False ); } } break; @@ -1604,25 +1281,6 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) } } -void SfxConfigGroupListBox_Impl::AddAndSelect( const SfxStringItem* , const SfxStringItem* ) -{ - /* - if ( pText ) - { - Select( GetEntry( GetEntryCount()-1) ); - SvLBoxEntry* pFuncEntry = pFunctionListBox->InsertEntry( pText->GetValue(), NULL ); - SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_SPECIALCHARACTERS, 0, 0 ); - String aCommand = String::CreateFromAscii(".uno:InsertSymbol?Symbols:string="); - aCommand += pText->GetValue(); - pFunctionListBox->aArr.Insert( pGrpInfo, pFunctionListBox->aArr.Count() ); - pGrpInfo->sCommand = aCommand; - pGrpInfo->sLabel = String::CreateFromAscii("Symbols: "); - pGrpInfo->sLabel += pText->GetValue(); - pFuncEntry->SetUserData( pGrpInfo ); - } - */ -} - void SfxConfigGroupListBox_Impl::SelectMacro( const SfxMacroInfoItem *pItem ) { SelectMacro( pItem->GetBasicManager()->GetName(), @@ -1636,7 +1294,7 @@ void SfxConfigGroupListBox_Impl::SelectMacro( const String& rBasic, aBasicName += ' '; aBasicName += pImp->m_sMacros; String aLib, aModule, aMethod; - USHORT nCount = rMacro.GetTokenCount('.'); + sal_uInt16 nCount = rMacro.GetTokenCount('.'); aMethod = rMacro.GetToken( nCount-1, '.' ); if ( nCount > 2 ) { diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index 8592dbaded5f..de4b8dcbf462 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -43,7 +43,6 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/evntconf.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/minfitem.hxx> #include <sfx2/app.hxx> #include <sfx2/objsh.hxx> @@ -71,7 +70,7 @@ SvxEventConfigPage::SvxEventConfigPage( Window *pParent, const SfxItemSet& rSet, _SvxMacroTabPage( pParent, CUI_RES(RID_SVXPAGE_EVENTS), rSet ), aSaveInText( this, CUI_RES( TXT_SAVEIN ) ), aSaveInListBox( this, CUI_RES( LB_SAVEIN ) ), - bAppConfig ( TRUE ) + bAppConfig ( sal_True ) { mpImpl->pStrEvent = new String( CUI_RES( STR_EVENT )); mpImpl->pAssignedMacro = new String( CUI_RES( STR_ASSMACRO )); @@ -103,7 +102,7 @@ SvxEventConfigPage::SvxEventConfigPage( Window *pParent, const SfxItemSet& rSet, "com.sun.star.frame.GlobalEventBroadcaster" ) ), uno::UNO_QUERY ); - USHORT nPos(0); + sal_uInt16 nPos(0); if ( xSupplier.is() ) { m_xAppEvents = xSupplier->getEvents(); @@ -112,7 +111,7 @@ SvxEventConfigPage::SvxEventConfigPage( Window *pParent, const SfxItemSet& rSet, utl::ConfigManager::PRODUCTNAME ) >>= label; nPos = aSaveInListBox.InsertEntry( label ); aSaveInListBox.SetEntryData( nPos, new bool(true) ); - aSaveInListBox.SelectEntryPos( nPos, TRUE ); + aSaveInListBox.SelectEntryPos( nPos, sal_True ); } } @@ -168,10 +167,10 @@ void SvxEventConfigPage::ImplInitDocument() m_xDocumentModifiable = m_xDocumentModifiable.query( xModel ); OUString aTitle = ::comphelper::DocumentInfo::getDocumentTitle( xModel ); - USHORT nPos = aSaveInListBox.InsertEntry( aTitle ); + sal_uInt16 nPos = aSaveInListBox.InsertEntry( aTitle ); aSaveInListBox.SetEntryData( nPos, new bool(false) ); - aSaveInListBox.SelectEntryPos( nPos, TRUE ); + aSaveInListBox.SelectEntryPos( nPos, sal_True ); bAppConfig = false; } @@ -191,16 +190,16 @@ IMPL_LINK( SvxEventConfigPage, SelectHdl_Impl, ListBox *, pBox ) bool* bApp = (bool*) aSaveInListBox.GetEntryData( aSaveInListBox.GetSelectEntryPos()); - mpImpl->pEventLB->SetUpdateMode( FALSE ); + mpImpl->pEventLB->SetUpdateMode( sal_False ); bAppConfig = *bApp; if ( *bApp ) { - SetReadOnly( FALSE ); + SetReadOnly( sal_False ); _SvxMacroTabPage::DisplayAppEvents( true ); } else { - bool isReadonly = FALSE; + bool isReadonly = sal_False; uno::Reference< frame::XFramesSupplier > xFramesSupplier( ::comphelper::getProcessServiceFactory()->createInstance( @@ -227,13 +226,13 @@ IMPL_LINK( SvxEventConfigPage, SelectHdl_Impl, ListBox *, pBox ) _SvxMacroTabPage::DisplayAppEvents( false ); } - mpImpl->pEventLB->SetUpdateMode( TRUE ); - return TRUE; + mpImpl->pEventLB->SetUpdateMode( sal_True ); + return sal_True; } // ----------------------------------------------------------------------- -BOOL SvxEventConfigPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxEventConfigPage::FillItemSet( SfxItemSet& rSet ) { return _SvxMacroTabPage::FillItemSet( rSet ); } diff --git a/cui/source/customize/eventdlg.hxx b/cui/source/customize/eventdlg.hxx index dc2e657d65fb..26e4f5848134 100644 --- a/cui/source/customize/eventdlg.hxx +++ b/cui/source/customize/eventdlg.hxx @@ -48,7 +48,7 @@ class SvxEventConfigPage : public _SvxMacroTabPage ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > m_xDocumentEvents; ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifiable > m_xDocumentModifiable; - BOOL bAppConfig; + sal_Bool bAppConfig; DECL_LINK( SelectHdl_Impl, ListBox* ); @@ -65,7 +65,7 @@ public: void LateInit( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame ); protected: - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet& ); using _SvxMacroTabPage::Reset; diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 9b5453553ef3..3d0763b8d378 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -38,7 +38,6 @@ #include <tools/diagnose_ex.h> #include <sfx2/app.hxx> #include <sfx2/objsh.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/sfxdefs.hxx> #include <com/sun/star/container/NoSuchElementException.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> @@ -76,11 +75,11 @@ _SvxMacroTabPage_Impl::_SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet ) : pStrEvent( NULL ), pAssignedMacro( NULL ), pEventLB( NULL ), - bReadOnly( FALSE ), - bIDEDialogMode( FALSE ) + bReadOnly( sal_False ), + bIDEDialogMode( sal_False ) { const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == rAttrSet.GetItemState( SID_ATTR_MACROITEM, FALSE, &pItem ) ) + if ( SFX_ITEM_SET == rAttrSet.GetItemState( SID_ATTR_MACROITEM, sal_False, &pItem ) ) bIDEDialogMode = ((const SfxBoolItem*)pItem)->GetValue(); } @@ -128,7 +127,7 @@ IMPL_LINK( _HeaderTabListBox, HeaderEndDrag_Impl, HeaderBar*, pBar ) if( !maHeaderBar.IsItemMode() ) { Size aSz; - USHORT _nTabs = maHeaderBar.GetItemCount(); + sal_uInt16 _nTabs = maHeaderBar.GetItemCount(); long nTmpSz = 0; long nWidth = maHeaderBar.GetItemSize( ITEMID_EVENT ); long nBarWidth = maHeaderBar.GetSizePixel().Width(); @@ -140,7 +139,7 @@ IMPL_LINK( _HeaderTabListBox, HeaderEndDrag_Impl, HeaderBar*, pBar ) { long _nWidth; - for( USHORT i = 1 ; i < _nTabs ; ++i ) + for( sal_uInt16 i = 1 ; i < _nTabs ; ++i ) { _nWidth = maHeaderBar.GetItemSize( i ); aSz.Width() = _nWidth + nTmpSz; @@ -197,7 +196,7 @@ void _HeaderTabListBox::ConnectElements( void ) maListBox.InitHeaderBar( &maHeaderBar ); } -void _HeaderTabListBox::Show( BOOL bVisible, USHORT nFlags ) +void _HeaderTabListBox::Show( sal_Bool bVisible, sal_uInt16 nFlags ) { maListBox.Show( bVisible, nFlags ); maHeaderBar.Show( bVisible, nFlags ); @@ -212,7 +211,7 @@ void _HeaderTabListBox::Enable( bool bEnable, bool bChild ) // assign button ("Add Command") is enabled only if it is not read only // delete button ("Remove Command") is enabled if a current binding exists // and it is not read only -void _SvxMacroTabPage::EnableButtons( const String& /*rLangName*/ ) +void _SvxMacroTabPage::EnableButtons() { const SvLBoxEntry* pE = mpImpl->pEventLB->GetListBox().FirstSelected(); if ( pE ) @@ -341,7 +340,7 @@ void _SvxMacroTabPage::InitResources() // the following method is called when the user clicks OK // We use the contents of the hashes to replace the settings -BOOL _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) +sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) { try { @@ -392,7 +391,7 @@ BOOL _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ ) { } // what is the return value about?? - return FALSE; + return sal_False; } // the following method clears the bindings in the hashes for both doc & app @@ -439,12 +438,12 @@ void _SvxMacroTabPage::Reset() DisplayAppEvents(bAppEvents); } -void _SvxMacroTabPage::SetReadOnly( BOOL bSet ) +void _SvxMacroTabPage::SetReadOnly( sal_Bool bSet ) { mpImpl->bReadOnly = bSet; } -BOOL _SvxMacroTabPage::IsReadOnly() const +sal_Bool _SvxMacroTabPage::IsReadOnly() const { return mpImpl->bReadOnly; } @@ -459,14 +458,14 @@ class IconLBoxString : public SvLBoxString int m_nxImageOffset; public: - IconLBoxString( SvLBoxEntry* pEntry, USHORT nFlags, const String& sText, + IconLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& sText, Image* pMacroImg, Image* pComponentImg, Image* pMacroImg_h, Image* pComponentImg_h ); - virtual void Paint(const Point& aPos, SvLBox& aDevice, USHORT nFlags, SvLBoxEntry* pEntry ); + virtual void Paint(const Point& aPos, SvLBox& aDevice, sal_uInt16 nFlags, SvLBoxEntry* pEntry ); }; -IconLBoxString::IconLBoxString( SvLBoxEntry* pEntry, USHORT nFlags, const String& sText, +IconLBoxString::IconLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& sText, Image* pMacroImg, Image* pComponentImg, Image* pMacroImg_h, Image* pComponentImg_h ) : SvLBoxString( pEntry, nFlags, sText ) , m_pMacroImg( pMacroImg ) @@ -479,7 +478,7 @@ IconLBoxString::IconLBoxString( SvLBoxEntry* pEntry, USHORT nFlags, const String //=============================================== void IconLBoxString::Paint( const Point& aPos, SvLBox& aDevice, - USHORT /*nFlags*/, SvLBoxEntry* /*pEntry*/ ) + sal_uInt16 /*nFlags*/, SvLBoxEntry* /*pEntry*/ ) { String aTxt( GetText() ); if( aTxt.Len() ) @@ -488,7 +487,7 @@ void IconLBoxString::Paint( const Point& aPos, SvLBox& aDevice, sal_Int32 nIndex = aURL.indexOf( aVndSunStarUNO ); bool bUNO = nIndex == 0; - BOOL bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode(); const Image* pImg; if( bHC ) pImg = bUNO ? m_pComponentImg_h : m_pMacroImg_h; @@ -522,7 +521,7 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents) bAppEvents = appEvents; SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); - mpImpl->pEventLB->SetUpdateMode( FALSE ); + mpImpl->pEventLB->SetUpdateMode( sal_False ); rListBox.Clear(); SvLBoxEntry* pE = rListBox.GetEntry( 0 ); EventsHash* eventsHash; @@ -591,8 +590,8 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents) rListBox.MakeVisible( pE ); } - rListBox.SetUpdateMode( TRUE ); - EnableButtons( String() ); + rListBox.SetUpdateMode( sal_True ); + EnableButtons(); } // select event handler on the listbox @@ -601,7 +600,7 @@ IMPL_STATIC_LINK( _SvxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG ) _SvxMacroTabPage_Impl* pImpl = pThis->mpImpl; SvHeaderTabListBox& rListBox = pImpl->pEventLB->GetListBox(); SvLBoxEntry* pE = rListBox.FirstSelected(); - ULONG nPos; + sal_uLong nPos; if( !pE || LISTBOX_ENTRY_NOTFOUND == ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) ) @@ -610,7 +609,7 @@ IMPL_STATIC_LINK( _SvxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG ) return 0; } - pThis->EnableButtons( String() ); + pThis->EnableButtons(); return 0; } @@ -630,7 +629,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* _SvxMacroTabPage_Impl* pImpl = pThis->mpImpl; SvHeaderTabListBox& rListBox = pImpl->pEventLB->GetListBox(); SvLBoxEntry* pE = rListBox.FirstSelected(); - ULONG nPos; + sal_uLong nPos; if( !pE || LISTBOX_ENTRY_NOTFOUND == ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) ) { @@ -638,7 +637,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* return 0; } - const BOOL bAssEnabled = pBtn != pImpl->pDeletePB && pImpl->pAssignPB->IsEnabled(); + const sal_Bool bAssEnabled = pBtn != pImpl->pDeletePB && pImpl->pAssignPB->IsEnabled(); ::rtl::OUString* pEventName = (::rtl::OUString*)pE->GetUserData(); @@ -696,7 +695,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* else if( bAssEnabled ) { // assign pressed - SvxScriptSelectorDialog* pDlg = new SvxScriptSelectorDialog( pThis, FALSE, pThis->GetFrame() ); + SvxScriptSelectorDialog* pDlg = new SvxScriptSelectorDialog( pThis, sal_False, pThis->GetFrame() ); if( pDlg ) { short ret = pDlg->Execute(); @@ -725,7 +724,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* } // update the listbox entry - pImpl->pEventLB->SetUpdateMode( FALSE ); + pImpl->pEventLB->SetUpdateMode( sal_False ); // pE->ReplaceItem( new SvLBoxString( pE, 0, sEventURL ), LB_MACROS_ITEMPOS ); pE->ReplaceItem( new IconLBoxString( pE, 0, sEventURL, pImpl->pMacroImg, pImpl->pComponentImg, @@ -734,9 +733,9 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* rListBox.GetModel()->InvalidateEntry( pE ); rListBox.Select( pE ); rListBox.MakeVisible( pE ); - rListBox.SetUpdateMode( TRUE ); + rListBox.SetUpdateMode( sal_True ); - pThis->EnableButtons( String() ); + pThis->EnableButtons(); return 0; } @@ -774,7 +773,7 @@ void _SvxMacroTabPage::InitAndSetHandler( Reference< container::XNameReplace> xA mpImpl->pEventLB->GetListBox().SetEntryHeight( sal::static_int_cast< short >(nMinLineHeight) ); - mpImpl->pEventLB->Enable( TRUE ); + mpImpl->pEventLB->Enable( sal_True ); if(!m_xAppEvents.is()) { @@ -884,7 +883,7 @@ SvxMacroTabPage::SvxMacroTabPage( Window* pParent, const Reference< frame::XFram InitAndSetHandler( xNameReplace, Reference< container::XNameReplace>(0), Reference< util::XModifiable >(0)); DisplayAppEvents(true); SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); - SvLBoxEntry* pE = rListBox.GetEntry( (ULONG)nSelectedIndex ); + SvLBoxEntry* pE = rListBox.GetEntry( (sal_uLong)nSelectedIndex ); if( pE ) rListBox.Select(pE); } diff --git a/cui/source/customize/macropg_impl.hxx b/cui/source/customize/macropg_impl.hxx index 63c977cf2422..3ecf625419a4 100644 --- a/cui/source/customize/macropg_impl.hxx +++ b/cui/source/customize/macropg_impl.hxx @@ -45,8 +45,8 @@ public: String* pStrEvent; String* pAssignedMacro; _HeaderTabListBox* pEventLB; - BOOL bReadOnly; - BOOL bIDEDialogMode; + sal_Bool bReadOnly; + sal_Bool bIDEDialogMode; }; class AssignComponentDialog : public ModalDialog diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 3defe910f5a5..5a1cc3b91e29 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -39,7 +39,6 @@ #include <sfx2/app.hxx> #include <sfx2/msg.hxx> #include <sfx2/msgpool.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/minfitem.hxx> #include <sfx2/objsh.hxx> #include <sfx2/dispatch.hxx> @@ -143,8 +142,8 @@ IMPL_LINK( SvxConfigFunctionListBox_Impl, TimerHdl, Timer*, EMPTYARG) void SvxConfigFunctionListBox_Impl::ClearAll() { - USHORT nCount = aArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = aArr.Count(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { SvxGroupInfo_Impl *pData = aArr[i]; delete pData; @@ -249,8 +248,8 @@ SvxConfigGroupListBox_Impl::~SvxConfigGroupListBox_Impl() void SvxConfigGroupListBox_Impl::ClearAll() { - USHORT nCount = aArr.Count(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = aArr.Count(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { SvxGroupInfo_Impl *pData = aArr[i]; delete pData; @@ -327,12 +326,12 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows Sequence< Reference< browse::XBrowseNode > > children = _rxRootNode->getChildNodes(); - BOOL bIsRootNode = _rxRootNode->getName().equalsAscii("Root"); + sal_Bool bIsRootNode = _rxRootNode->getName().equalsAscii("Root"); /* To mimic current starbasic behaviour we need to make sure that only the current document is displayed in the config tree. Tests below - set the bDisplay flag to FALSE if the current + set the bDisplay flag to sal_False if the current node is a first level child of the Root and is NOT either the current document, user or share */ OUString sCurrentDocTitle; @@ -349,7 +348,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows if ( !theChild.is() ) continue; ::rtl::OUString sUIName = theChild->getName(); - BOOL bDisplay = TRUE; + sal_Bool bDisplay = sal_True; if ( bIsRootNode || ( m_bShowSlots && _pParentEntry && ( GetModel()->GetDepth( _pParentEntry ) == 0 ) ) @@ -369,7 +368,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows } else if ( !sUIName.equals( sCurrentDocTitle ) ) { - bDisplay = FALSE; + bDisplay = sal_False; } } @@ -401,7 +400,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows * way to determine if a basic lib had children * without having to ask for them (which forces * the library to be loaded */ - pNewEntry->EnableChildsOnDemand( TRUE ); + pNewEntry->EnableChildsOnDemand( sal_True ); } else { @@ -414,7 +413,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows { if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER ) { - pNewEntry->EnableChildsOnDemand( TRUE ); + pNewEntry->EnableChildsOnDemand( sal_True ); break; } } @@ -430,7 +429,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows void SvxConfigGroupListBox_Impl::Init() { - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); ClearAll(); Reference< XComponentContext > xContext; @@ -580,7 +579,7 @@ void SvxConfigGroupListBox_Impl::Init() SvLBoxEntry *pNewEntry = InsertEntry( aTitle, NULL ); pNewEntry->SetUserData( pInfo ); - pNewEntry->EnableChildsOnDemand( TRUE ); + pNewEntry->EnableChildsOnDemand( sal_True ); aArr.Insert( pInfo, aArr.Count() ); } else @@ -590,7 +589,7 @@ void SvxConfigGroupListBox_Impl::Init() } } MakeVisible( GetEntry( 0,0 ) ); - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); } Image SvxConfigGroupListBox_Impl::GetImage( Reference< browse::XBrowseNode > node, Reference< XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast ) @@ -720,12 +719,12 @@ void SvxConfigGroupListBox_Impl::GroupSelected() { SvLBoxEntry *pEntry = FirstSelected(); SvxGroupInfo_Impl *pInfo = (SvxGroupInfo_Impl*) pEntry->GetUserData(); - pFunctionListBox->SetUpdateMode(FALSE); + pFunctionListBox->SetUpdateMode(sal_False); pFunctionListBox->ClearAll(); if ( pInfo->nKind != SVX_CFGGROUP_FUNCTION && pInfo->nKind != SVX_CFGGROUP_SCRIPTCONTAINER ) { - pFunctionListBox->SetUpdateMode(TRUE); + pFunctionListBox->SetUpdateMode(sal_True); return; } @@ -896,31 +895,31 @@ void SvxConfigGroupListBox_Impl::GroupSelected() if ( pFunctionListBox->GetEntryCount() ) pFunctionListBox->Select( pFunctionListBox->GetEntry( 0, 0 ) ); - pFunctionListBox->SetUpdateMode(TRUE); + pFunctionListBox->SetUpdateMode(sal_True); } -BOOL SvxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) +sal_Bool SvxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) { - BOOL bRet = SvTreeListBox::Expand( pParent ); + sal_Bool bRet = SvTreeListBox::Expand( pParent ); if ( bRet ) { // Wieviele Entries k"onnen angezeigt werden ? - ULONG nEntries = GetOutputSizePixel().Height() / GetEntryHeight(); + sal_uLong nEntries = GetOutputSizePixel().Height() / GetEntryHeight(); // Wieviele Kinder sollen angezeigt werden ? - ULONG nChildCount = GetVisibleChildCount( pParent ); + sal_uLong nChildCount = GetVisibleChildCount( pParent ); // Passen alle Kinder und der parent gleichzeitig in die View ? if ( nChildCount+1 > nEntries ) { // Wenn nicht, wenigstens parent ganz nach oben schieben - MakeVisible( pParent, TRUE ); + MakeVisible( pParent, sal_True ); } else { // An welcher relativen ViewPosition steht der aufzuklappende parent SvLBoxEntry *pEntry = GetFirstEntryInView(); - ULONG nParentPos = 0; + sal_uLong nParentPos = 0; while ( pEntry && pEntry != pParent ) { nParentPos++; @@ -939,7 +938,7 @@ BOOL SvxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent ) void SvxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) { SvxGroupInfo_Impl *pInfo = (SvxGroupInfo_Impl*) pEntry->GetUserData(); - pInfo->bWasOpened = TRUE; + pInfo->bWasOpened = sal_True; switch ( pInfo->nKind ) { case SVX_CFGGROUP_SCRIPTCONTAINER: @@ -966,7 +965,7 @@ void SvxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry ) */ SvxScriptSelectorDialog::SvxScriptSelectorDialog( - Window* pParent, BOOL bShowSlots, const Reference< frame::XFrame >& xFrame ) + Window* pParent, sal_Bool bShowSlots, const Reference< frame::XFrame >& xFrame ) : ModelessDialog( pParent, CUI_RES( RID_DLG_SCRIPTSELECTOR ) ), aDialogDescription( this, CUI_RES( TXT_SELECTOR_DIALOG_DESCRIPTION ) ), @@ -1023,7 +1022,7 @@ void SvxScriptSelectorDialog::ResizeControls() Size s, news; long gap; - USHORT style = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | + sal_uInt16 style = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT | TEXT_DRAW_WORDBREAK; // get dimensions of dialog instructions control @@ -1116,12 +1115,12 @@ SvxScriptSelectorDialog::UpdateUI() aCommands.GetHelpText( aCommands.FirstSelected() ); aDescriptionText.SetText( rMessage ); - aOKButton.Enable( TRUE ); + aOKButton.Enable( sal_True ); } else { aDescriptionText.SetText( String() ); - aOKButton.Enable( FALSE ); + aOKButton.Enable( sal_False ); } } @@ -1131,7 +1130,7 @@ IMPL_LINK( SvxScriptSelectorDialog, ClickHdl, Button *, pButton ) { // If we are displaying Slot API commands then the dialog is being // run from Tools/Configure and we should not close it, just hide it - if ( m_bShowSlots == FALSE ) + if ( m_bShowSlots == sal_False ) { EndDialog( RET_CANCEL ); } @@ -1146,7 +1145,7 @@ IMPL_LINK( SvxScriptSelectorDialog, ClickHdl, Button *, pButton ) // If we are displaying Slot API commands then this the dialog is being // run from Tools/Configure and we should not close it - if ( m_bShowSlots == FALSE ) + if ( m_bShowSlots == sal_False ) { EndDialog( RET_OK ); } diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 4fde01da986e..8ded7a2cc78b 100755 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -88,19 +88,21 @@ struct SpellDialog_Impl // ----------------------------------------------------------------------- //#define VENDOR_IMAGE_HEIGHT 44 //as specified -#define SPELLUNDO_CHANGE_LANGUAGE (TEXTUNDO_USER + 1) -#define SPELLUNDO_CHANGE_TEXTENGINE (TEXTUNDO_USER + 2) -#define SPELLUNDO_CHANGE_NEXTERROR (TEXTUNDO_USER + 3) -#define SPELLUNDO_CHANGE_ADD_TO_DICTIONARY (TEXTUNDO_USER + 4) -#define SPELLUNDO_CHANGE_GROUP (TEXTUNDO_USER + 5) //undo list -#define SPELLUNDO_MOVE_ERROREND (TEXTUNDO_USER + 6) -#define SPELLUNDO_UNDO_EDIT_MODE (TEXTUNDO_USER + 7) -#define SPELLUNDO_ADD_IGNORE_RULE (TEXTUNDO_USER + 8) +#define SPELLUNDO_START 200 + +#define SPELLUNDO_CHANGE_LANGUAGE (SPELLUNDO_START + 1) +#define SPELLUNDO_CHANGE_TEXTENGINE (SPELLUNDO_START + 2) +#define SPELLUNDO_CHANGE_NEXTERROR (SPELLUNDO_START + 3) +#define SPELLUNDO_CHANGE_ADD_TO_DICTIONARY (SPELLUNDO_START + 4) +#define SPELLUNDO_CHANGE_GROUP (SPELLUNDO_START + 5) //undo list +#define SPELLUNDO_MOVE_ERROREND (SPELLUNDO_START + 6) +#define SPELLUNDO_UNDO_EDIT_MODE (SPELLUNDO_START + 7) +#define SPELLUNDO_ADD_IGNORE_RULE (SPELLUNDO_START + 8) namespace svx{ class SpellUndoAction_Impl : public SfxUndoAction { - USHORT m_nId; + sal_uInt16 m_nId; const Link& m_rActionLink; //undo of button enabling bool m_bEnableChangePB; @@ -119,7 +121,7 @@ class SpellUndoAction_Impl : public SfxUndoAction long m_nOffset; public: - SpellUndoAction_Impl(USHORT nId, const Link& rActionLink) : + SpellUndoAction_Impl(sal_uInt16 nId, const Link& rActionLink) : m_nId(nId), m_rActionLink( rActionLink), m_bEnableChangePB(false), @@ -135,7 +137,7 @@ public: ~SpellUndoAction_Impl(); virtual void Undo(); - virtual USHORT GetId() const; + virtual sal_uInt16 GetId() const; void SetEnableChangePB(){m_bEnableChangePB = true;} bool IsEnableChangePB(){return m_bEnableChangePB;} @@ -189,7 +191,7 @@ void SpellUndoAction_Impl::Undo() /*-- 06.11.2003 12:16:02--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT SpellUndoAction_Impl::GetId()const +sal_uInt16 SpellUndoAction_Impl::GetId()const { return m_nId; } @@ -307,7 +309,7 @@ void SpellDialog::Init_Impl() aLanguageLB.SetSelectHdl(LINK( this, SpellDialog, LanguageSelectHdl ) ); // initialize language ListBox - aLanguageLB.SetLanguageList( LANG_LIST_SPELL_USED, FALSE, FALSE, TRUE ); + aLanguageLB.SetLanguageList( LANG_LIST_SPELL_USED, sal_False, sal_False, sal_True ); // get current language UpdateBoxes_Impl(); @@ -424,7 +426,7 @@ void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence, bool bIgnoreCurrent { //remove undo if a new sentence is active aSentenceED.ResetUndo(); - aUndoPB.Enable(FALSE); + aUndoPB.Enable(sal_False); } } } @@ -439,7 +441,7 @@ IMPL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog *, EMPTYARG ) pThis->aAutoCorrPB.Show(pThis->rParent.HasAutoCorrection()); pThis->SpellContinue_Impl(); pThis->aSentenceED.ResetUndo(); - pThis->aUndoPB.Enable(FALSE); + pThis->aUndoPB.Enable(sal_False); pThis->LockFocusChanges(true); if( pThis->aChangePB.IsEnabled() ) @@ -628,7 +630,7 @@ IMPL_LINK( SpellDialog, ChangeHdl, Button *, EMPTYARG ) aSentenceED.ChangeMarkedWord(aString, GetSelectedLang_Impl()); SpellContinue_Impl(); bModified = false; - aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP ); + aSentenceED.UndoActionEnd(); } if(!aChangePB.IsEnabled()) aIgnorePB.GrabFocus(); @@ -670,7 +672,7 @@ IMPL_LINK( SpellDialog, ChangeAllHdl, Button *, EMPTYARG ) aSentenceED.ChangeMarkedWord(aString, eLang); SpellContinue_Impl(); bModified = false; - aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP ); + aSentenceED.UndoActionEnd(); return 1; } // ----------------------------------------------------------------------- @@ -715,7 +717,7 @@ IMPL_LINK( SpellDialog, IgnoreAllHdl, Button *, pButton ) SpellContinue_Impl(); bModified = false; - aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP ); + aSentenceED.UndoActionEnd(); return 1; } /*-- 06.11.2003 11:24:08--------------------------------------------------- @@ -725,7 +727,7 @@ IMPL_LINK( SpellDialog, UndoHdl, Button*, EMPTYARG ) { aSentenceED.Undo(); if(!aSentenceED.GetUndoActionCount()) - aUndoPB.Enable(FALSE); + aUndoPB.Enable(sal_False); return 0; } /*-- 06.11.2003 12:19:15--------------------------------------------------- @@ -738,14 +740,14 @@ IMPL_LINK( SpellDialog, DialogUndoHdl, SpellUndoAction_Impl*, pAction ) case SPELLUNDO_CHANGE_TEXTENGINE: { if(pAction->IsEnableChangePB()) - aChangePB.Enable(FALSE); + aChangePB.Enable(sal_False); if(pAction->IsEnableChangeAllPB()) - aChangeAllPB.Enable(FALSE); + aChangeAllPB.Enable(sal_False); } break; case SPELLUNDO_CHANGE_NEXTERROR: { - aSentenceED.MoveErrorMarkTo((USHORT)pAction->GetOldErrorStart(), (USHORT)pAction->GetOldErrorEnd(), false); + aSentenceED.MoveErrorMarkTo((sal_uInt16)pAction->GetOldErrorStart(), (sal_uInt16)pAction->GetOldErrorEnd(), false); if(pAction->IsErrorLanguageSelected()) { UpdateBoxes_Impl(); @@ -828,7 +830,7 @@ void SpellDialog::SetSelectedLang_Impl( LanguageType nLang ) LanguageType SpellDialog::GetSelectedLang_Impl() const { - INT16 nLang = aLanguageLB.GetSelectLanguage(); + sal_Int16 nLang = aLanguageLB.GetSelectLanguage(); return nLang; } /* -----------------28.10.2003 14:27----------------- @@ -960,7 +962,7 @@ void SpellDialog::InitUserDicts() delete aAddToDictMB.GetPopupMenu(); PopupMenu* pMenu = new PopupMenu; pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); - USHORT nItemId = 1; // menu items should be enumerated from 1 and not 0 + sal_uInt16 nItemId = 1; // menu items should be enumerated from 1 and not 0 for (sal_Int32 i = 0; i < nSize; ++i) { uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY ); @@ -1006,7 +1008,7 @@ IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton ) //manually changed const String aNewWord= aSentenceED.GetErrorText(); - USHORT nItemId = pButton->GetCurItemId(); + sal_uInt16 nItemId = pButton->GetCurItemId(); PopupMenu *pMenu = pButton->GetPopupMenu(); String aDicName ( pMenu->GetItemText( nItemId ) ); @@ -1018,7 +1020,7 @@ IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton ) sal_Int16 nAddRes = DIC_ERR_UNKNOWN; if (xDic.is()) { - nAddRes = linguistic::AddEntryToDic( xDic, aNewWord, FALSE, OUString(), LANGUAGE_NONE ); + nAddRes = linguistic::AddEntryToDic( xDic, aNewWord, sal_False, OUString(), LANGUAGE_NONE ); // save modified user-dictionary if it is persistent uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY ); if (xSavDic.is()) @@ -1044,7 +1046,7 @@ IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton ) // go on SpellContinue_Impl(); - aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP ); + aSentenceED.UndoActionEnd(); return 0; } /*------------------------------------------------------------------------- @@ -1151,7 +1153,7 @@ void SpellDialog::InvalidateDialog() sal_Int16 i = 0; while(aDisableArr[i]) { - aDisableArr[i]->Enable(FALSE); + aDisableArr[i]->Enable(sal_False); i++; } SfxModelessDialog::Deactivate(); @@ -1218,7 +1220,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) sServiceName = xNamed->getName(); SpellErrorDescription aDesc( false, aStart->xAlternatives->getWord(), aStart->xAlternatives->getLocale(), aStart->xAlternatives->getAlternatives(), 0, sServiceName); - aSentenceED.SetAttrib( SpellErrorAttrib(aDesc), 0, (USHORT) nStartPosition, (USHORT) nEndPosition ); + aSentenceED.SetAttrib( SpellErrorAttrib(aDesc), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition ); } else if(aStart->bIsGrammarError ) { @@ -1232,11 +1234,11 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) &aStart->sDialogTitle, &aStart->aGrammarError.aFullComment, &aStart->aGrammarError.aRuleIdentifier ); - aSentenceED.SetAttrib( SpellErrorAttrib(aDesc), 0, (USHORT) nStartPosition, (USHORT) nEndPosition ); + aSentenceED.SetAttrib( SpellErrorAttrib(aDesc), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition ); } if(aStart->bIsField) - aSentenceED.SetAttrib( SpellBackgroundAttrib(COL_LIGHTGRAY), 0, (USHORT) nStartPosition, (USHORT) nEndPosition ); - aSentenceED.SetAttrib( SpellLanguageAttrib(aStart->eLanguage), 0, (USHORT) nStartPosition, (USHORT) nEndPosition ); + aSentenceED.SetAttrib( SpellBackgroundAttrib(COL_LIGHTGRAY), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition ); + aSentenceED.SetAttrib( SpellLanguageAttrib(aStart->eLanguage), 0, (sal_uInt16) nStartPosition, (sal_uInt16) nEndPosition ); nStartPosition = nEndPosition; } aStart++; @@ -1245,7 +1247,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) if(!bHasReplaced) aSentenceED.ClearModifyFlag(); aSentenceED.ResetUndo(); - aUndoPB.Enable(FALSE); + aUndoPB.Enable(sal_False); bRet = nStartPosition > 0; } return bRet; @@ -1543,7 +1545,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) break; } //save the current paragraph - USHORT nCurrentLen = GetText().Len(); + sal_uInt16 nCurrentLen = GetText().Len(); if(nAction != ACTION_SELECTFIELD) pTextView->GetWindow()->KeyInput(rKeyEvt); else @@ -1564,8 +1566,8 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) if(pErrorAttrLeft) { TextAttrib* pNewError = pErrorAttrLeft->GetAttr().Clone(); - USHORT nStart = pErrorAttrLeft->GetStart(); - USHORT nEnd = pErrorAttrLeft->GetEnd(); + sal_uInt16 nStart = pErrorAttrLeft->GetStart(); + sal_uInt16 nEnd = pErrorAttrLeft->GetEnd(); pTextEngine->RemoveAttrib( 0, *pErrorAttrLeft ); SetAttrib( *pNewError, 0, nStart, ++nEnd ); //only active errors move the mark @@ -1581,13 +1583,13 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) else if(pErrorAttr) { //determine the change - USHORT nAddedChars = GetText().Len() - nCurrentLen; + sal_uInt16 nAddedChars = GetText().Len() - nCurrentLen; TextAttrib* pNewError = pErrorAttr->GetAttr().Clone(); - USHORT nStart = pErrorAttr->GetStart(); - USHORT nEnd = pErrorAttr->GetEnd(); + sal_uInt16 nStart = pErrorAttr->GetStart(); + sal_uInt16 nEnd = pErrorAttr->GetEnd(); pTextEngine->RemoveAttrib( 0, *pErrorAttr ); - nStart = nStart - (USHORT)nAddedChars; + nStart = nStart - (sal_uInt16)nAddedChars; SetAttrib( *pNewError, 0, nStart - nAddedChars, nEnd ); //only if the error is active the mark is moved here if(bIsErrorActive) @@ -1600,8 +1602,8 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) if(pBackAttrLeft) { TextAttrib* pNewBack = pBackAttrLeft->GetAttr().Clone(); - USHORT _nStart = pBackAttrLeft->GetStart(); - USHORT _nEnd = pBackAttrLeft->GetEnd(); + sal_uInt16 _nStart = pBackAttrLeft->GetStart(); + sal_uInt16 _nEnd = pBackAttrLeft->GetEnd(); pTextEngine->RemoveAttrib( 0, *pBackAttrLeft ); SetAttrib( *pNewBack, 0, _nStart, _nEnd - nAddedChars); delete pNewBack; @@ -1651,14 +1653,14 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError ) if (bIgnoreCurrentError) m_aIgnoreErrorsAt.insert( m_nErrorStart ); ExtTextEngine* pTextEngine = GetTextEngine(); - USHORT nTextLen = pTextEngine->GetTextLen(0); + sal_uInt16 nTextLen = pTextEngine->GetTextLen(0); if(m_nErrorEnd >= nTextLen - 1) return false; //if it's not already modified the modified flag has to be reset at the and of the marking bool bModified = IsModified(); bool bRet = false; - const USHORT nOldErrorStart = m_nErrorStart; - const USHORT nOldErrorEnd = m_nErrorEnd; + const sal_uInt16 nOldErrorStart = m_nErrorStart; + const sal_uInt16 nOldErrorEnd = m_nErrorEnd; //create a cursor behind the end of the last error //- or at 0 at the start of the sentence @@ -1695,7 +1697,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError ) m_nErrorEnd = pNextError->GetEnd(); ChangeMarkedWord(xEntry->getReplacementText(), SvxLocaleToLanguage( pSpellErrorDescription->aLocale )); - aCursor.GetIndex() = aCursor.GetIndex() + (USHORT)(xEntry->getReplacementText().getLength()); + aCursor.GetIndex() = aCursor.GetIndex() + (sal_uInt16)(xEntry->getReplacementText().getLength()); } else break; @@ -1734,11 +1736,11 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError ) /*-- 06.11.2003 13:30:26--------------------------------------------------- -----------------------------------------------------------------------*/ -void SentenceEditWindow_Impl::MoveErrorMarkTo(USHORT nStart, USHORT nEnd, bool bGrammarError) +void SentenceEditWindow_Impl::MoveErrorMarkTo(sal_uInt16 nStart, sal_uInt16 nEnd, bool bGrammarError) { TextEngine* pTextEngine = GetTextEngine(); - pTextEngine->RemoveAttribs( 0, (USHORT)TEXTATTR_FONTCOLOR, TRUE ); - pTextEngine->RemoveAttribs( 0, (USHORT)TEXTATTR_FONTWEIGHT, TRUE ); + pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTCOLOR, sal_True ); + pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTWEIGHT, sal_True ); pTextEngine->SetAttrib( TextAttribFontWeight(WEIGHT_BOLD), 0, nStart, nEnd ); pTextEngine->SetAttrib( TextAttribFontColor(bGrammarError ? COL_LIGHTBLUE : COL_LIGHTRED), 0, nStart, nEnd ); m_nErrorStart = nStart; @@ -1755,7 +1757,7 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT TextSelection aSel(TextPaM(0, m_nErrorStart), TextPaM(0, m_nErrorEnd)); //Remove spell errror attribute ExtTextEngine* pTextEngine = GetTextEngine(); - pTextEngine->UndoActionStart( TEXTUNDO_INSERT ); + pTextEngine->UndoActionStart(); const TextCharAttrib* pErrorAttrib = pTextEngine->FindCharAttrib( TextPaM(0, m_nErrorStart), TEXTATTR_SPELL_ERROR ); DBG_ASSERT(pErrorAttrib, "no error attribute found"); // Reference <XSpellAlternatives> xAlternatives; @@ -1776,30 +1778,30 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT const TextCharAttrib* pLangAttrib = pTextEngine->FindCharAttrib( TextPaM(0, m_nErrorEnd), TEXTATTR_SPELL_LANGUAGE ); - USHORT nTextLen = pTextEngine->GetTextLen( 0 ); + sal_uInt16 nTextLen = pTextEngine->GetTextLen( 0 ); if(pLangAttrib && !pLangAttrib->GetStart() && pLangAttrib->GetEnd() == nTextLen) { SpellLanguageAttrib aNewLangAttrib( static_cast<const SpellLanguageAttrib&>(pLangAttrib->GetAttr()).GetLanguage()); pTextEngine->RemoveAttrib(0, *pLangAttrib); - pTextEngine->SetAttrib( aNewLangAttrib, 0, (USHORT)(m_nErrorEnd + nDiffLen) , nTextLen ); + pTextEngine->SetAttrib( aNewLangAttrib, 0, (sal_uInt16)(m_nErrorEnd + nDiffLen) , nTextLen ); } } // undo expanded attributes! if( pBackAttrib && pBackAttrib->GetStart() < m_nErrorStart && pBackAttrib->GetEnd() == m_nErrorEnd + nDiffLen) { TextAttrib* pNewBackground = pBackAttrib->GetAttr().Clone(); - USHORT nStart = pBackAttrib->GetStart(); + sal_uInt16 nStart = pBackAttrib->GetStart(); pTextEngine->RemoveAttrib(0, *pBackAttrib); pTextEngine->SetAttrib(*pNewBackground, 0, nStart, m_nErrorStart); delete pNewBackground; } - pTextEngine->SetModified(TRUE); + pTextEngine->SetModified(sal_True); //adjust end position long nEndTemp = m_nErrorEnd; nEndTemp += nDiffLen; - m_nErrorEnd = (USHORT)nEndTemp; + m_nErrorEnd = (sal_uInt16)nEndTemp; SpellUndoAction_Impl* pAction = new SpellUndoAction_Impl( SPELLUNDO_MOVE_ERROREND, GetSpellDialog()->aDialogUndoLink); @@ -1808,7 +1810,7 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT if(pSpellErrorDescription) SetAttrib( SpellErrorAttrib(*pSpellErrorDescription), 0, m_nErrorStart, m_nErrorEnd ); SetAttrib( SpellLanguageAttrib(eLanguage), 0, m_nErrorStart, m_nErrorEnd ); - pTextEngine->UndoActionEnd( TEXTUNDO_INSERT ); + pTextEngine->UndoActionEnd(); } /* -----------------08.10.2003 13:18----------------- @@ -1871,7 +1873,7 @@ void SentenceEditWindow_Impl::SetAlternatives( Reference< XSpellAlternatives> xA /*-- 10.09.2003 14:43:02--------------------------------------------------- -----------------------------------------------------------------------*/ -void SentenceEditWindow_Impl::SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd ) +void SentenceEditWindow_Impl::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd ) { GetTextEngine()->SetAttrib(rAttr, nPara, nStart, nEnd); } @@ -1889,10 +1891,10 @@ void SentenceEditWindow_Impl::SetText( const String& rStr ) -----------------------------------------------------------------------*/ struct LanguagePosition_Impl { - USHORT nPosition; + sal_uInt16 nPosition; LanguageType eLanguage; - LanguagePosition_Impl(USHORT nPos, LanguageType eLang) : + LanguagePosition_Impl(sal_uInt16 nPos, LanguageType eLang) : nPosition(nPos), eLanguage(eLang) {} @@ -1900,7 +1902,7 @@ struct LanguagePosition_Impl typedef std::vector<LanguagePosition_Impl> LanguagePositions_Impl; void lcl_InsertBreakPosition_Impl( - LanguagePositions_Impl& rBreakPositions, USHORT nInsert, LanguageType eLanguage) + LanguagePositions_Impl& rBreakPositions, sal_uInt16 nInsert, LanguageType eLanguage) { LanguagePositions_Impl::iterator aStart = rBreakPositions.begin(); while(aStart != rBreakPositions.end()) @@ -1931,7 +1933,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore { svx::SpellPortions aRet; ExtTextEngine* pTextEngine = GetTextEngine(); - const USHORT nTextLen = pTextEngine->GetTextLen(0); + const sal_uInt16 nTextLen = pTextEngine->GetTextLen(0); if(nTextLen) { TextPaM aCursor(0, 0); @@ -1977,7 +1979,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore LanguagePositions_Impl::iterator aStart = aBreakPositions.begin(); //start should always be Null eLang = aStart->eLanguage; - USHORT nStart = aStart->nPosition; + sal_uInt16 nStart = aStart->nPosition; DBG_ASSERT(!nStart, "invalid start position - language attribute missing?"); ++aStart; @@ -2002,11 +2004,11 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore // quick partly fix of #i71318. Correct fix needs to patch the TextEngine itself... // this one will only prevent text from disappearing. It may to not have the // correct language and will probably not spell checked... - ULONG nPara = pTextEngine->GetParagraphCount(); + sal_uLong nPara = pTextEngine->GetParagraphCount(); if (nPara > 1) { String aLeftOverText; - for (ULONG i = 1; i < nPara; ++i) + for (sal_uLong i = 1; i < nPara; ++i) { aLeftOverText.AppendAscii( "\x0a" ); // the manual line break... aLeftOverText += pTextEngine->GetText(i); @@ -2032,12 +2034,12 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore -----------------------------------------------------------------------*/ void SentenceEditWindow_Impl::Undo() { - SfxUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager(); + ::svl::IUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager(); DBG_ASSERT(GetUndoActionCount(), "no undo actions available" ); if(!GetUndoActionCount()) return; bool bSaveUndoEdit = IsUndoEditMode(); - USHORT nId; + sal_uInt16 nId; //if the undo edit mode is active then undo all changes until the UNDO_EDIT_MODE action has been found do { @@ -2058,16 +2060,16 @@ void SentenceEditWindow_Impl::ResetUndo() /*-- 06.11.2003 12:30:41--------------------------------------------------- -----------------------------------------------------------------------*/ -void SentenceEditWindow_Impl::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg ) +void SentenceEditWindow_Impl::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg ) { - SfxUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager(); + ::svl::IUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager(); rUndoMgr.AddUndoAction(pAction, bTryMerg); GetSpellDialog()->aUndoPB.Enable(); } /*-- 06.11.2003 12:38:44--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT SentenceEditWindow_Impl::GetUndoActionCount() +sal_uInt16 SentenceEditWindow_Impl::GetUndoActionCount() { return GetTextEngine()->GetUndoManager().GetUndoActionCount(); } @@ -2075,16 +2077,16 @@ USHORT SentenceEditWindow_Impl::GetUndoActionCount() /*-- 12.11.2003 12:12:38--------------------------------------------------- -----------------------------------------------------------------------*/ -void SentenceEditWindow_Impl::UndoActionStart( USHORT nId ) +void SentenceEditWindow_Impl::UndoActionStart( sal_uInt16 nId ) { GetTextEngine()->UndoActionStart(nId); } /*-- 12.11.2003 12:12:38--------------------------------------------------- -----------------------------------------------------------------------*/ -void SentenceEditWindow_Impl::UndoActionEnd( USHORT nId ) +void SentenceEditWindow_Impl::UndoActionEnd() { - GetTextEngine()->UndoActionEnd(nId); + GetTextEngine()->UndoActionEnd(); } /*-- 12.11.2003 12:12:38--------------------------------------------------- @@ -2092,9 +2094,9 @@ void SentenceEditWindow_Impl::UndoActionEnd( USHORT nId ) void SentenceEditWindow_Impl::MoveErrorEnd(long nOffset) { if(nOffset > 0) - m_nErrorEnd = m_nErrorEnd - (USHORT)nOffset; + m_nErrorEnd = m_nErrorEnd - (sal_uInt16)nOffset; else - m_nErrorEnd = m_nErrorEnd -(USHORT)- nOffset; + m_nErrorEnd = m_nErrorEnd -(sal_uInt16)- nOffset; } /*-- 13.11.2003 15:15:19--------------------------------------------------- @@ -2129,8 +2131,8 @@ void SentenceEditWindow_Impl::SetUndoEditMode(bool bSet) //remove error marks TextEngine* pTextEngine = GetTextEngine(); - pTextEngine->RemoveAttribs( 0, (USHORT)TEXTATTR_FONTCOLOR, TRUE ); - pTextEngine->RemoveAttribs( 0, (USHORT)TEXTATTR_FONTWEIGHT, TRUE ); + pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTCOLOR, sal_True ); + pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTWEIGHT, sal_True ); //put the appropriate action on the Undo-stack SpellUndoAction_Impl* pAction = new SpellUndoAction_Impl( diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx new file mode 100644 index 000000000000..b530005f32b8 --- /dev/null +++ b/cui/source/dialogs/about.cxx @@ -0,0 +1,424 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_cui.hxx" + +// include --------------------------------------------------------------- + +#include <vcl/svapp.hxx> +#include <vcl/msgbox.hxx> +#include <tools/stream.hxx> +#include <tools/urlobj.hxx> +#include <rtl/bootstrap.hxx> +#include <unotools/configmgr.hxx> +#include <unotools/bootstrap.hxx> +#include <com/sun/star/uno/Any.h> +#include <vcl/graph.hxx> +#include <svtools/filter.hxx> +#include <sfx2/sfxuno.hxx> +#include "about.hxx" +#include <sfx2/sfxdefs.hxx> +#include <sfx2/app.hxx> +#include <sfx2/sfxcommands.h> +#include "about.hrc" +#include <dialmgr.hxx> +#include <svtools/svtools.hrc> + +// defines --------------------------------------------------------------- + +#define SCROLL_OFFSET 1 +#define SPACE_OFFSET 5 +#define SCROLL_TIMER 30 + +#define WELCOME_URL DEFINE_CONST_UNICODE( "http://www.openoffice.org/welcome/credits.html" ) + +// class AboutDialog ----------------------------------------------------- +static void layoutText( FixedInfo &rText, long &nY, long nTextWidth, Size a6Size ) +{ + Point aTextPos = rText.GetPosPixel(); + aTextPos.X() = a6Size.Width() * 2; + aTextPos.Y() = nY; + rText.SetPosPixel( aTextPos ); + + Size aTxtSiz = rText.GetSizePixel(); + aTxtSiz.Width() = nTextWidth; + Size aCalcSize = rText.CalcMinimumSize( nTextWidth ); + aTxtSiz.Height() = aCalcSize.Height(); + rText.SetSizePixel( aTxtSiz ); + + nY += aTxtSiz.Height(); +} + +String InitDevVersionStr() +{ + const String sCWSSchema( String::CreateFromAscii( "[CWS:" ) ); + rtl::OUString sDefault; + String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) ); + OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" ); + if ( sBuildId.Len() > 0 && sBuildId.Search( sCWSSchema ) == STRING_NOTFOUND ) + { + // no cws part in brand buildid -> try basis buildid + rtl::OUString sBasisBuildId( DEFINE_CONST_OUSTRING( + "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":buildid}" ) ); + rtl::Bootstrap::expandMacros( sBasisBuildId ); + sal_Int32 nIndex = sBasisBuildId.indexOf( sCWSSchema ); + if ( nIndex != -1 ) + sBuildId += String( sBasisBuildId.copy( nIndex ) ); + } + + String sProductSource( utl::Bootstrap::getProductSource( sDefault ) ); + OSL_ENSURE( sProductSource.Len() > 0, "No ProductSource in bootstrap file" ); + + // the product source is something like "DEV300", where the + // build id is something like "300m12(Build:12345)". For better readability, + // strip the duplicate UPD ("300"). + if ( sProductSource.Len() ) + { + bool bMatchingUPD = + ( sProductSource.Len() >= 3 ) + && ( sBuildId.Len() >= 3 ) + && ( sProductSource.Copy( sProductSource.Len() - 3 ) == sBuildId.Copy( 0, 3 ) ); + OSL_ENSURE( bMatchingUPD, "BUILDID and ProductSource do not match in their UPD" ); + if ( bMatchingUPD ) + sProductSource = sProductSource.Copy( 0, sProductSource.Len() - 3 ); + + // prepend the product source + sBuildId.Insert( sProductSource, 0 ); + } + + // --> PB 2008-10-30 #i94693# + // if the build ids of the basis or ure layer are different from the build id + // of the brand layer then show them + rtl::OUString aBasisProductBuildId( DEFINE_CONST_OUSTRING( + "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) ); + rtl::Bootstrap::expandMacros( aBasisProductBuildId ); + rtl::OUString aUREProductBuildId( DEFINE_CONST_OUSTRING( + "${$URE_BIN_DIR/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) ); + rtl::Bootstrap::expandMacros( aUREProductBuildId ); + if ( sBuildId.Search( String( aBasisProductBuildId ) ) == STRING_NOTFOUND + || sBuildId.Search( String( aUREProductBuildId ) ) == STRING_NOTFOUND ) + { + String sTemp( '-' ); + sTemp += String( aBasisProductBuildId ); + sTemp += '-'; + sTemp += String( aUREProductBuildId ); + sBuildId.Insert( sTemp, sBuildId.Search( ')' ) ); + } + // <-- + + // the build id format is "milestone(build)[cwsname]". For readability, it would + // be nice to have some more spaces in there. + xub_StrLen nPos = 0; + if ( ( nPos = sBuildId.Search( sal_Unicode( '(' ) ) ) != STRING_NOTFOUND ) + sBuildId.Insert( sal_Unicode( ' ' ), nPos ); + if ( ( nPos = sBuildId.Search( sal_Unicode( '[' ) ) ) != STRING_NOTFOUND ) + sBuildId.Insert( sal_Unicode( ' ' ), nPos ); + return sBuildId; +} + +AboutDialog::AboutDialog( Window* pParent, const ResId& rId ) : + + SfxModalDialog ( pParent, rId ), + + aOKButton ( this, ResId( ABOUT_BTN_OK, *rId.GetResMgr() ) ), + aVersionText ( this, ResId( ABOUT_FTXT_VERSION, *rId.GetResMgr() ) ), + aCopyrightText ( this, ResId( ABOUT_FTXT_COPYRIGHT, *rId.GetResMgr() ) ), + aBuildData ( this ), + pDeveloperAry(0), + aAccelStr ( ResId( ABOUT_STR_ACCEL, *rId.GetResMgr() ) ), + aTimer (), + nOff ( 0 ), + m_nDeltaWidth ( 0 ), + m_nPendingScrolls( 0 ), + bNormal ( sal_True ) +{ + aDevVersionStr = InitDevVersionStr(); + + ::com::sun::star::lang::Locale aLocale; + ResMgr* pResMgr = ResMgr::SearchCreateResMgr( "about", aLocale ); + if ( pResMgr ) + { + aCopyrightTextStr = String( ResId( ABOUT_STR_COPYRIGHT, *pResMgr ) ); + pDeveloperAry = new ResStringArray( ResId( ABOUT_STR_DEVELOPER_ARY, *pResMgr ) ); + delete pResMgr; + } + + rtl::OUString sProduct; + utl::ConfigManager::GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME) >>= sProduct; + + // load image from module path + aAppLogo = SfxApplication::GetApplicationLogo(); + + // Transparenter Font + Font aFont = GetFont(); + aFont.SetTransparent( sal_True ); + SetFont( aFont ); + + // if necessary more info + String sVersion = aVersionText.GetText(); + sVersion.SearchAndReplaceAscii( "$(VER)", Application::GetDisplayName() ); + sVersion += '\n'; + sVersion += aDevVersionStr; + aVersionText.SetText( sVersion ); + + // Initialisierung fuer Aufruf Entwickler + if ( aAccelStr.Len() && ByteString(U2S(aAccelStr)).IsAlphaAscii() ) + { + Accelerator *pAccel = 0, *pPrevAccel = 0, *pFirstAccel = 0; + aAccelStr.ToUpperAscii(); + + for ( sal_uInt16 i = 0; i < aAccelStr.Len(); ++i ) + { + pPrevAccel = pAccel; + pAccel = new Accelerator; + aAccelList.Insert( pAccel, LIST_APPEND ); + sal_uInt16 nKey = aAccelStr.GetChar(i) - 'A' + KEY_A; + pAccel->InsertItem( 1, KeyCode( nKey, KEY_MOD1 ) ); + if ( i > 0 ) + pPrevAccel->SetAccel( 1, pAccel ); + if ( i == 0 ) + pFirstAccel = pAccel; + } + pAccel->SetSelectHdl( LINK( this, AboutDialog, AccelSelectHdl ) ); + GetpApp()->InsertAccel( pFirstAccel ); + } + + // set for background and text the correct system color + const StyleSettings& rSettings = GetSettings().GetStyleSettings(); + Color aWhiteCol( rSettings.GetWindowColor() ); + Wallpaper aWall( aWhiteCol ); + SetBackground( aWall ); + Font aNewFont( aCopyrightText.GetFont() ); + aNewFont.SetTransparent( sal_True ); + + aVersionText.SetFont( aNewFont ); + aCopyrightText.SetFont( aNewFont ); + + aVersionText.SetBackground(); + aCopyrightText.SetBackground(); + + Color aTextColor( rSettings.GetWindowTextColor() ); + aVersionText.SetControlForeground( aTextColor ); + aCopyrightText.SetControlForeground( aTextColor ); + aBuildData.SetBackground( aWall ); + + Font aSmallFont = rSettings.GetInfoFont(); + Size aSmaller = aNewFont.GetSize(); + aSmaller.Width() = (long) (aSmaller.Width() * 0.75); + aSmaller.Height() = (long) (aSmaller.Height() * 0.75); + aNewFont.SetSize( aSmaller ); + aBuildData.SetFont( aNewFont ); + aBuildData.SetBackground( aWall ); +#ifdef BUILD_VER_STRING + String aBuildString( DEFINE_CONST_UNICODE( BUILD_VER_STRING ) ); +#else + String aBuildString; +#endif + aBuildData.SetText( aBuildString ); + aBuildData.Show(); + + // determine size and position of the dialog & elements + Size aAppLogoSiz = aAppLogo.GetSizePixel(); + Size aOutSiz = GetOutputSizePixel(); + aOutSiz.Width() = aAppLogoSiz.Width(); + + Size a6Size = aVersionText.LogicToPixel( Size( 6, 6 ), MAP_APPFONT ); + long nY = aAppLogoSiz.Height() + ( a6Size.Height() * 2 ); + long nDlgMargin = a6Size.Width() * 4 ; + long nCtrlMargin = a6Size.Height() * 2; + long nTextWidth = aOutSiz.Width() - nDlgMargin; + + aCopyrightText.SetText( aCopyrightTextStr ); + + layoutText( aVersionText, nY, nTextWidth, a6Size ); + nY += nCtrlMargin; + + // OK-Button-Position (at the bottom and centered) + Size aOKSiz = aOKButton.GetSizePixel(); + Point aOKPnt = aOKButton.GetPosPixel(); + + // Multiline edit with Copyright-Text + Point aCopyPnt = aCopyrightText.GetPosPixel(); + Size aCopySize = aCopyrightText.GetSizePixel(); + aCopySize.Width() = nTextWidth; + aCopySize.Height() = aOutSiz.Height() - nY - ( aOKSiz.Height() * 2 ) - nCtrlMargin; + + aCopyPnt.X() = ( aOutSiz.Width() - aCopySize.Width() ) / 2; + aCopyPnt.Y() = nY; + aCopyrightText.SetPosSizePixel( aCopyPnt, aCopySize ); + + nY += aCopySize.Height() + nCtrlMargin; + aOKPnt.X() = ( aOutSiz.Width() - aOKSiz.Width() ) / 2; + aOKPnt.Y() = nY; + aOKButton.SetPosPixel( aOKPnt ); + + // Change the width of the dialog + SetOutputSizePixel( aOutSiz ); + + FreeResource(); + + SetHelpId( CMD_SID_ABOUT ); +} + +// ----------------------------------------------------------------------- + +AboutDialog::~AboutDialog() +{ + // L"oschen des Entwickleraufrufs + delete pDeveloperAry; + if ( aAccelList.Count() ) + { + GetpApp()->RemoveAccel( aAccelList.First() ); + Accelerator* pAccel = aAccelList.Last(); + + while ( pAccel ) + { + delete pAccel; + pAccel = aAccelList.Prev(); + } + } +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( AboutDialog, TimerHdl, Timer *, pTimer ) +{ + (void)pTimer; //unused + ++m_nPendingScrolls; + Invalidate( INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN ); + return 0; +} + +// ----------------------------------------------------------------------- + +IMPL_LINK( AboutDialog, AccelSelectHdl, Accelerator *, pAccelerator ) +{ +#ifdef YURI_DARIO + aCopyrightText.SetHelpText( DEFINE_CONST_UNICODE("Conoscere qualcuno ovunque egli sia, con cui comprendersi nonostante le distanze\n" + "e le differenze, puo' trasformare la terra in un giardino. baci Valeria") ); +#endif + + (void)pAccelerator; //unused + // init Timer + aTimer.SetTimeoutHdl( LINK( this, AboutDialog, TimerHdl ) ); + + // init scroll mode + nOff = GetOutputSizePixel().Height(); + MapMode aMapMode( MAP_PIXEL ); + SetMapMode( aMapMode ); + bNormal = sal_False; + + // start scroll Timer + aTimer.SetTimeout( SCROLL_TIMER ); + aTimer.Start(); + return 0; +} + +// ----------------------------------------------------------------------- + +sal_Bool AboutDialog::Close() +{ + // stop Timer and finish the dialog + aTimer.Stop(); + EndDialog( RET_OK ); + return( sal_False ); +} + +// ----------------------------------------------------------------------- + +void AboutDialog::Paint( const Rectangle& rRect ) +{ + SetClipRegion( rRect ); + + if ( bNormal ) // not in scroll mode + { + Point aPos( m_nDeltaWidth / 2, 0 ); + DrawImage( aPos, aAppLogo ); + return; + } + + // scroll the content + const int nDeltaY = -SCROLL_OFFSET * m_nPendingScrolls; + if( !nDeltaY ) + return; + nOff += nDeltaY; + Scroll( 0, nDeltaY, SCROLL_NOERASE ); + m_nPendingScrolls = 0; + + // draw the credits text + const Font aOrigFont = GetFont(); + const int nFullWidth = GetOutputSizePixel().Width(); + + int nY = nOff; + const int nDevCnt = static_cast<int>( pDeveloperAry->Count() ); + for( int i = 0; i < nDevCnt; ++i ) + { + if( nY >= rRect.Bottom() ) + break; + + int nPos2 = nY + GetTextHeight() + 3; + if( nPos2 >= rRect.Top() + nDeltaY ) + { + const String aStr = pDeveloperAry->GetString(i); + const long nVal = pDeveloperAry->GetValue(i); + + if ( nVal ) + { + // emphasize the headers + Font aFont = aOrigFont; + aFont.SetWeight( (FontWeight)nVal ); + SetFont( aFont ); + nPos2 = nY + GetTextHeight() + 3; + } + + // clear text background + Rectangle aEraseRect( Point(0,nY), Size( nFullWidth, nPos2-nY)); + Erase( aEraseRect ); + + // draw centered text + const long nTextWidth = GetTextWidth( aStr ); + long nX = (nFullWidth - 5 - nTextWidth) / 2; + if( nX < 0 ) + nX = SPACE_OFFSET; + const Point aPnt( nX, nY ); + DrawText( aPnt, aStr ); + + // restore the font if needed + if( nVal ) + SetFont( aOrigFont ); + } + nY = nPos2; + } + + // close dialog if the whole text has been scrolled + if ( nY <= 0 ) + { + bNormal = sal_True; + Close(); + } +} diff --git a/cui/source/dialogs/about.hrc b/cui/source/dialogs/about.hrc new file mode 100644 index 000000000000..9271e6c53faf --- /dev/null +++ b/cui/source/dialogs/about.hrc @@ -0,0 +1,34 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +#include <sfx2/sfx.hrc> + +#define ABOUT_BTN_OK 1 +#define ABOUT_FTXT_VERSION 1 +#define ABOUT_STR_ACCEL 3 +#define ABOUT_FTXT_COPYRIGHT 4 + diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src new file mode 100644 index 000000000000..18806c6ee76c --- /dev/null +++ b/cui/source/dialogs/about.src @@ -0,0 +1,67 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +#include "about.hrc" + +ModalDialog RID_DEFAULTABOUT +{ + HelpID = "cui:ModalDialog:RID_DEFAULTABOUT"; + OutputSize = TRUE ; + Size = MAP_APPFONT ( 245 , 260 ) ; + Moveable = TRUE ; + SVLook = TRUE ; + Text [ x-comment ] = "PB: ; PB: only %PRODUCTNAME"; + Text [ en-US ] = "About %PRODUCTNAME" ; + OKButton ABOUT_BTN_OK + { + DefButton = TRUE ; + Pos = MAP_APPFONT ( 174 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + }; + FixedText ABOUT_FTXT_VERSION + { + Pos = MAP_APPFONT ( 54 , 6 ) ; + Size = MAP_APPFONT ( 118 , 16 ) ; + WordBreak = TRUE ; + Text = "%PRODUCTNAME %ABOUTBOXPRODUCTVERSION %PRODUCTEXTENSION" ; + }; + MultiLineEdit ABOUT_FTXT_COPYRIGHT + { + HelpID = "cui:MultiLineEdit:RID_DEFAULTABOUT:ABOUT_FTXT_COPYRIGHT"; + Border = TRUE ; + Pos = MAP_APPFONT ( 54 , 25 ) ; + Size = MAP_APPFONT ( 168 , 51 ) ; + IgnoreTab = TRUE ; + ReadOnly = TRUE ; + AutoVScroll = TRUE ; + }; + String ABOUT_STR_ACCEL + { + Text = "SDT" ; + }; +}; + diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index b8b6d2567a47..6c6d7ed4b47a 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -59,26 +59,26 @@ // class SvxCharacterMap ================================================= -SvxCharacterMap::SvxCharacterMap( Window* pParent, BOOL bOne, const SfxItemSet* pSet ) : +SvxCharacterMap::SvxCharacterMap( Window* pParent, sal_Bool bOne, const SfxItemSet* pSet ) : SfxModalDialog( pParent, CUI_RES( RID_SVXDLG_CHARMAP ) ), mpCharMapData( 0 ) { - SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, FN_PARAM_1, FALSE ); + SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, FN_PARAM_1, sal_False ); if ( pItem ) bOne = pItem->GetValue(); mpCharMapData = new SvxCharMapData( this, bOne, &CUI_MGR() ); - SFX_ITEMSET_ARG( pSet, pCharItem, SfxInt32Item, SID_ATTR_CHAR, FALSE ); + SFX_ITEMSET_ARG( pSet, pCharItem, SfxInt32Item, SID_ATTR_CHAR, sal_False ); if ( pCharItem ) SetChar( pCharItem->GetValue() ); - SFX_ITEMSET_ARG( pSet, pDisableItem, SfxBoolItem, FN_PARAM_2, FALSE ); + SFX_ITEMSET_ARG( pSet, pDisableItem, SfxBoolItem, FN_PARAM_2, sal_False ); if ( pDisableItem && pDisableItem->GetValue() ) DisableFontSelection(); - SFX_ITEMSET_ARG( pSet, pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); - SFX_ITEMSET_ARG( pSet, pFontNameItem, SfxStringItem, SID_FONT_NAME, FALSE ); + SFX_ITEMSET_ARG( pSet, pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False ); + SFX_ITEMSET_ARG( pSet, pFontNameItem, SfxStringItem, SID_FONT_NAME, sal_False ); if ( pFontItem ) { Font aFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), GetCharFont().GetSize() ); @@ -170,7 +170,7 @@ short SvxCharacterMap::Execute() // class SvxShowText ===================================================== -SvxShowText::SvxShowText( Window* pParent, const ResId& rResId, BOOL bCenter ) +SvxShowText::SvxShowText( Window* pParent, const ResId& rResId, sal_Bool bCenter ) : Control( pParent, rResId ), mbCenter( bCenter) {} @@ -237,7 +237,7 @@ void SvxShowText::SetFont( const Font& rFont ) aFont.SetWeight( WEIGHT_NORMAL ); aFont.SetAlign( ALIGN_TOP ); aFont.SetSize( PixelToLogic( Size( 0, nWinHeight/2 ) ) ); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); Control::SetFont( aFont ); mnY = ( nWinHeight - GetTextHeight() ) / 2; @@ -259,7 +259,7 @@ SvxShowText::~SvxShowText() // class SvxCharacterMap ================================================= -SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pResContext ) +SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, sal_Bool bOne_, ResMgr* pResContext ) : mpDialog( pDialog ), aShowSet ( pDialog, ResId( CT_SHOWSET, *pResContext ) ), aShowText ( pDialog, ResId( CT_SHOWTEXT, *pResContext ) ), @@ -274,14 +274,14 @@ SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pRe aSubsetText ( pDialog, ResId( FT_SUBSET, *pResContext ) ), aSubsetLB ( pDialog, ResId( LB_SUBSET, *pResContext ) ), aSymbolText ( pDialog, ResId( FT_SYMBOLE, *pResContext ) ), - aShowChar ( pDialog, ResId( CT_SHOWCHAR, *pResContext ), TRUE ), + aShowChar ( pDialog, ResId( CT_SHOWCHAR, *pResContext ), sal_True ), aCharCodeText ( pDialog, ResId( FT_CHARCODE, *pResContext ) ), // aAssignText ( pDialog, ResId( FT_ASSIGN, *pResContext ) ), bOne( bOne_ ), pSubsetMap( NULL ) { aFont = pDialog->GetFont(); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aFont.SetFamily( FAMILY_DONTKNOW ); aFont.SetPitch( PITCH_DONTKNOW ); aFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW ); @@ -305,8 +305,8 @@ SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pRe if ( aFontName != aLastName ) { aLastName = aFontName; - USHORT nPos = aFontLB.InsertEntry( aFontName ); - aFontLB.SetEntryData( nPos, (void*)(ULONG)i ); + sal_uInt16 nPos = aFontLB.InsertEntry( aFontName ); + aFontLB.SetEntryData( nPos, (void*)(sal_uLong)i ); } } // the font may not be in the list => @@ -321,7 +321,7 @@ SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pRe if ( aFontLB.GetEntryPos( aToken ) != LISTBOX_ENTRY_NOTFOUND ) { aDefStr = aToken; - bFound = TRUE; + bFound = sal_True; break; } } @@ -387,7 +387,7 @@ IMPL_LINK( SvxCharMapData, OKHdl, OKButton *, EMPTYARG ) rtl::OUString aOUStr( &cChar, 1 ); aShowText.SetText( aOUStr ); } - mpDialog->EndDialog( TRUE ); + mpDialog->EndDialog( sal_True ); return 0; } @@ -395,8 +395,8 @@ IMPL_LINK( SvxCharMapData, OKHdl, OKButton *, EMPTYARG ) IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG ) { - USHORT nPos = aFontLB.GetSelectEntryPos(), - nFont = (USHORT)(ULONG)aFontLB.GetEntryData( nPos ); + sal_uInt16 nPos = aFontLB.GetSelectEntryPos(), + nFont = (sal_uInt16)(sal_uLong)aFontLB.GetEntryData( nPos ); aFont = mpDialog->GetDevFont( nFont ); aFont.SetWeight( WEIGHT_DONTKNOW ); aFont.SetItalic( ITALIC_NONE ); @@ -422,7 +422,7 @@ IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG ) delete pSubsetMap; pSubsetMap = NULL; - BOOL bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL); + sal_Bool bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL); if( bNeedSubset ) { FontCharMap aFontCharMap; @@ -436,7 +436,7 @@ IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG ) const Subset* s; while( NULL != (s = pSubsetMap->GetNextSubset( bFirst )) ) { - USHORT nPos_ = aSubsetLB.InsertEntry( s->GetName() ); + sal_uInt16 nPos_ = aSubsetLB.InsertEntry( s->GetName() ); aSubsetLB.SetEntryData( nPos_, (void*)s ); // NOTE: subset must live at least as long as the selected font if( bFirst ) @@ -444,7 +444,7 @@ IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG ) bFirst = false; } if( aSubsetLB.GetEntryCount() <= 1 ) - bNeedSubset = FALSE; + bNeedSubset = sal_False; } aSubsetText.Show( bNeedSubset); @@ -457,7 +457,7 @@ IMPL_LINK( SvxCharMapData, FontSelectHdl, ListBox *, EMPTYARG ) IMPL_LINK( SvxCharMapData, SubsetSelectHdl, ListBox *, EMPTYARG ) { - USHORT nPos = aSubsetLB.GetSelectEntryPos(); + sal_uInt16 nPos = aSubsetLB.GetSelectEntryPos(); const Subset* pSubset = reinterpret_cast<const Subset*> (aSubsetLB.GetEntryData(nPos)); if( pSubset ) { @@ -472,7 +472,7 @@ IMPL_LINK( SvxCharMapData, SubsetSelectHdl, ListBox *, EMPTYARG ) IMPL_LINK( SvxCharMapData, CharDoubleClickHdl, Control *, EMPTYARG ) { - mpDialog->EndDialog( TRUE ); + mpDialog->EndDialog( sal_True ); return 0; } @@ -577,7 +577,7 @@ IMPL_LINK( SvxCharMapData, AssignHdl, PushButton *, EMPTYARG ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pOutSet->GetItemState( SID_CHARMAP, FALSE, &pItem ) ) + if( SFX_ITEM_SET == pOutSet->GetItemState( SID_CHARMAP, sal_False, &pItem ) ) { // show assigned shortcut } diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index cd67d1ab5bb3..a761efcdca28 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -269,7 +269,7 @@ void FmSearchDialog::Init(const UniString& strVisibleFields, const UniString& sI // die Listboxen fuellen // die Methoden des Feldvergleiches - USHORT nResIds[] = { + sal_uInt16 nResIds[] = { RID_STR_SEARCH_ANYWHERE, RID_STR_SEARCH_BEGINNING, RID_STR_SEARCH_END, @@ -280,7 +280,7 @@ void FmSearchDialog::Init(const UniString& strVisibleFields, const UniString& sI m_lbPosition.SelectEntryPos(MATCHING_ANYWHERE); // die Feld-Listbox - for (USHORT i=0; i<strVisibleFields.GetTokenCount(';'); ++i) + for (sal_uInt16 i=0; i<strVisibleFields.GetTokenCount(';'); ++i) m_lbField.InsertEntry(strVisibleFields.GetToken(i, ';')); @@ -420,7 +420,7 @@ IMPL_LINK(FmSearchDialog, OnClickedSpecialSettings, Button*, pButton ) aDlg->Execute(); //CHINA001 aDlg.Execute(); - INT32 nFlags = aDlg->GetTransliterationFlags(); //CHINA001 INT32 nFlags = aDlg.GetTransliterationFlags(); + sal_Int32 nFlags = aDlg->GetTransliterationFlags(); //CHINA001 sal_Int32 nFlags = aDlg.GetTransliterationFlags(); m_pSearchEngine->SetTransliterationFlags(nFlags); m_cbCase.Check(m_pSearchEngine->GetCaseSensitive()); diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 4acfe2b8eec7..fcc4f002703d 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -132,7 +132,7 @@ void SAL_CALL SearchThread::onTerminated() void SearchThread::ImplSearch( const INetURLObject& rStartURL, const ::std::vector< String >& rFormats, - BOOL bRecursive ) + sal_Bool bRecursive ) { { ::vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -167,7 +167,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, bFolder = sal_False; if( bRecursive && bFolder ) - ImplSearch( aFoundURL, rFormats, TRUE ); + ImplSearch( aFoundURL, rFormats, sal_True ); else { sal_Bool bDocument = xRow->getBoolean( 2 ); // property "IsDocument" @@ -197,7 +197,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, LIST_APPEND ); mpBrowser->aLbxFound.InsertEntry( GetReducedString( aFoundURL, 50 ), - (USHORT) mpBrowser->aFoundList.Count() - 1 ); + (sal_uInt16) mpBrowser->aFoundList.Count() - 1 ); } } } @@ -297,9 +297,9 @@ void SAL_CALL TakeThread::run() { String aName; INetURLObject aURL; - USHORT nEntries; + sal_uInt16 nEntries; GalleryTheme* pThm = mpBrowser->GetXChgData()->pTheme; - USHORT nPos; + sal_uInt16 nPos; GalleryProgress* pStatusProgress; { @@ -309,7 +309,7 @@ void SAL_CALL TakeThread::run() pThm->LockBroadcaster(); } - for( USHORT i = 0; i < nEntries && schedule(); i++ ) + for( sal_uInt16 i = 0; i < nEntries && schedule(); i++ ) { // kompletten Filenamen aus FoundList holen if( mpBrowser->bTakeAll ) @@ -318,7 +318,7 @@ void SAL_CALL TakeThread::run() aURL = INetURLObject(*mpBrowser->aFoundList.GetObject( nPos = mpBrowser->aLbxFound.GetSelectEntryPos( i ) )); // Position in Taken-Liste uebernehmen - mrTakenList.Insert( (void*) (ULONG)nPos, LIST_APPEND ); + mrTakenList.Insert( (void*) (sal_uLong)nPos, LIST_APPEND ); { ::vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -387,12 +387,12 @@ IMPL_LINK( TakeProgress, CleanUpHdl, void*, EMPTYARG ) sal_uInt32 i, nCount; GetParent()->EnterWait(); - mpBrowser->aLbxFound.SetUpdateMode( FALSE ); + mpBrowser->aLbxFound.SetUpdateMode( sal_False ); mpBrowser->aLbxFound.SetNoSelection(); // mark all taken positions in aRemoveEntries for( i = 0UL, nCount = maTakenList.Count(); i < nCount; ++i ) - aRemoveEntries[ (ULONG) maTakenList.GetObject( i ) ] = true; + aRemoveEntries[ (sal_uLong) maTakenList.GetObject( i ) ] = true; maTakenList.Clear(); @@ -423,7 +423,7 @@ IMPL_LINK( TakeProgress, CleanUpHdl, void*, EMPTYARG ) aRemainingVector.clear(); - mpBrowser->aLbxFound.SetUpdateMode( TRUE ); + mpBrowser->aLbxFound.SetUpdateMode( sal_True ); mpBrowser->SelectFoundHdl( NULL ); GetParent()->LeaveWait(); @@ -566,7 +566,7 @@ GalleryIdDialog::GalleryIdDialog( Window* pParent, GalleryTheme* _pThm ) : GalleryTheme::InsertAllThemes( aLbResName ); - aLbResName.SelectEntryPos( (USHORT) pThm->GetId() ); + aLbResName.SelectEntryPos( (sal_uInt16) pThm->GetId() ); aLbResName.GrabFocus(); aBtnOk.SetClickHdl( LINK( this, GalleryIdDialog, ClickOkHdl ) ); @@ -577,10 +577,10 @@ GalleryIdDialog::GalleryIdDialog( Window* pParent, GalleryTheme* _pThm ) : IMPL_LINK( GalleryIdDialog, ClickOkHdl, void*, EMPTYARG ) { Gallery* pGal = pThm->GetParent(); - const ULONG nId = GetId(); - BOOL bDifferentThemeExists = FALSE; + const sal_uLong nId = GetId(); + sal_Bool bDifferentThemeExists = sal_False; - for( ULONG i = 0, nCount = pGal->GetThemeCount(); i < nCount && !bDifferentThemeExists; i++ ) + for( sal_uLong i = 0, nCount = pGal->GetThemeCount(); i < nCount && !bDifferentThemeExists; i++ ) { const GalleryThemeEntry* pInfo = pGal->GetThemeInfo( i ); @@ -595,7 +595,7 @@ IMPL_LINK( GalleryIdDialog, ClickOkHdl, void*, EMPTYARG ) InfoBox aBox( this, aStr ); aBox.Execute(); aLbResName.GrabFocus(); - bDifferentThemeExists = TRUE; + bDifferentThemeExists = sal_True; } } @@ -634,7 +634,7 @@ GalleryThemeProperties::GalleryThemeProperties( Window* pParent, ExchangeData* _ // ------------------------------------------------------------------------ -void GalleryThemeProperties::PageCreated( USHORT nId, SfxTabPage &rPage ) +void GalleryThemeProperties::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { if( RID_SVXTABPAGE_GALLERY_GENERAL == nId ) ( (TPGalleryThemeGeneral&) rPage ).SetXChgData( pData ); @@ -675,7 +675,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) String aObjStr( CUI_RES( RID_SVXSTR_GALLERYPROPS_OBJECT ) ); String aAccess; String aType( CUI_RES( RID_SVXSTR_GALLERYPROPS_GALTHEME ) ); - BOOL bReadOnly = pThm->IsReadOnly() && !pThm->IsImported(); + sal_Bool bReadOnly = pThm->IsReadOnly() && !pThm->IsImported(); aEdtMSName.SetHelpId( HID_GALLERY_EDIT_MSNAME ); aEdtMSName.SetText( pThm->GetName() ); @@ -713,7 +713,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) aFtMSShowChangeDate.SetText( aAccess ); // Image setzen - USHORT nId; + sal_uInt16 nId; if( pThm->IsImported() ) nId = RID_SVXBMP_THEME_IMPORTED_BIG; @@ -729,10 +729,10 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) // ------------------------------------------------------------------------ -BOOL TPGalleryThemeGeneral::FillItemSet( SfxItemSet& /*rSet*/ ) +sal_Bool TPGalleryThemeGeneral::FillItemSet( SfxItemSet& /*rSet*/ ) { pData->aEditedTitle = aEdtMSName.GetText(); - return TRUE; + return sal_True; } // ------------------------------------------------------------------------ @@ -758,9 +758,9 @@ TPGalleryThemeProperties::TPGalleryThemeProperties( Window* pWindow, const SfxIt aWndPreview ( this, CUI_RES( WND_BRSPRV ) ), nCurFilterPos (0), nFirstExtFilterPos (0), - bEntriesFound (FALSE), - bInputAllowed (TRUE), - bSearchRecursive (FALSE), + bEntriesFound (sal_False), + bInputAllowed (sal_True), + bSearchRecursive (sal_False), xDialogListener ( new ::svt::DialogClosedListener() ) { FreeResource(); @@ -858,7 +858,7 @@ void TPGalleryThemeProperties::FillFilterList() FilterEntry* pFilterEntry; FilterEntry* pTestEntry; sal_uInt16 i, nKeyCount; - BOOL bInList; + sal_Bool bInList; // graphic filters for( i = 0, nKeyCount = pFilter->GetImportFormatCount(); i < nKeyCount; i++ ) @@ -866,12 +866,12 @@ void TPGalleryThemeProperties::FillFilterList() aExt = pFilter->GetImportFormatShortName( i ); aName = pFilter->GetImportFormatName( i ); pTestEntry = (FilterEntry*) aFilterEntryList.First(); - bInList = FALSE; + bInList = sal_False; String aExtensions; int j = 0; String sWildcard; - while( TRUE ) + while( sal_True ) { sWildcard = pFilter->GetImportWildcard( i, j++ ); if ( !sWildcard.Len() ) @@ -889,7 +889,7 @@ void TPGalleryThemeProperties::FillFilterList() { if ( pTestEntry->aFilterName == aExt ) { - bInList = TRUE; + bInList = sal_True; break; } pTestEntry = (FilterEntry*) aFilterEntryList.Next(); @@ -932,7 +932,7 @@ void TPGalleryThemeProperties::FillFilterList() { int j = 0; String sWildcard; - while( TRUE ) + while( sal_True ) { sWildcard = pFilter->GetImportWildcard( i, j++ ); if ( !sWildcard.Len() ) @@ -1113,7 +1113,7 @@ void TPGalleryThemeProperties::DoPreview() if( aString != aPreviewString ) { INetURLObject _aURL( *aFoundList.GetObject( aLbxFound.GetEntryPos( aString ) ) ); - bInputAllowed = FALSE; + bInputAllowed = sal_False; if ( !aWndPreview.SetGraphic( _aURL ) ) { @@ -1128,7 +1128,7 @@ void TPGalleryThemeProperties::DoPreview() xMediaPlayer->start(); } - bInputAllowed = TRUE; + bInputAllowed = sal_True; aPreviewString = aString; } } @@ -1152,7 +1152,7 @@ IMPL_LINK( TPGalleryThemeProperties, ClickTakeHdl, void*, EMPTYARG ) } else { - bTakeAll = FALSE; + bTakeAll = sal_False; TakeFiles(); } } @@ -1167,7 +1167,7 @@ IMPL_LINK( TPGalleryThemeProperties, ClickTakeAllHdl, void *, EMPTYARG ) if( bInputAllowed ) { aPreviewTimer.Stop(); - bTakeAll = TRUE; + bTakeAll = sal_True; TakeFiles(); } @@ -1180,7 +1180,7 @@ IMPL_LINK( TPGalleryThemeProperties, SelectFoundHdl, void *, EMPTYARG ) { if( bInputAllowed ) { - BOOL bPreviewPossible = FALSE; + sal_Bool bPreviewPossible = sal_False; aPreviewTimer.Stop(); @@ -1189,7 +1189,7 @@ IMPL_LINK( TPGalleryThemeProperties, SelectFoundHdl, void *, EMPTYARG ) if( aLbxFound.GetSelectEntryCount() == 1 ) { aCbxPreview.Enable(); - bPreviewPossible = TRUE; + bPreviewPossible = sal_True; } else aCbxPreview.Disable(); @@ -1240,14 +1240,14 @@ IMPL_LINK( TPGalleryThemeProperties, EndSearchProgressHdl, SearchProgress *, EMP aLbxFound.SelectEntryPos( 0 ); aBtnTakeAll.Enable(); aCbxPreview.Enable(); - bEntriesFound = TRUE; + bEntriesFound = sal_True; } else { aLbxFound.InsertEntry( String( CUI_RES( RID_SVXSTR_GALLERY_NOFILES ) ) ); aBtnTakeAll.Disable(); aCbxPreview.Disable(); - bEntriesFound = FALSE; + bEntriesFound = sal_False; } return 0L; } diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 8bbbfb5f8df2..572cb56c4512 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -44,10 +44,10 @@ // - SvxGraphicFilter - // -------------------- /* -ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& rFilterObject ) +sal_uLong SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& rFilterObject ) { const Graphic& rGraphic = rFilterObject.GetGraphic(); - ULONG nRet; + sal_uLong nRet; if( rGraphic.GetType() == GRAPHIC_BITMAP ) { @@ -61,7 +61,7 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r case( SID_GRFFILTER_INVERT ): { if( pShell ) - pShell->SetWaitCursor( TRUE ); + pShell->SetWaitCursor( sal_True ); if( rGraphic.IsAnimated() ) { @@ -79,14 +79,14 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r } if( pShell ) - pShell->SetWaitCursor( FALSE ); + pShell->SetWaitCursor( sal_False ); } break; case( SID_GRFFILTER_SMOOTH ): { if( pShell ) - pShell->SetWaitCursor( TRUE ); + pShell->SetWaitCursor( sal_True ); if( rGraphic.IsAnimated() ) { @@ -104,14 +104,14 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r } if( pShell ) - pShell->SetWaitCursor( FALSE ); + pShell->SetWaitCursor( sal_False ); } break; case( SID_GRFFILTER_SHARPEN ): { if( pShell ) - pShell->SetWaitCursor( TRUE ); + pShell->SetWaitCursor( sal_True ); if( rGraphic.IsAnimated() ) { @@ -129,14 +129,14 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r } if( pShell ) - pShell->SetWaitCursor( FALSE ); + pShell->SetWaitCursor( sal_False ); } break; case( SID_GRFFILTER_REMOVENOISE ): { if( pShell ) - pShell->SetWaitCursor( TRUE ); + pShell->SetWaitCursor( sal_True ); if( rGraphic.IsAnimated() ) { @@ -154,14 +154,14 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r } if( pShell ) - pShell->SetWaitCursor( FALSE ); + pShell->SetWaitCursor( sal_False ); } break; case( SID_GRFFILTER_SOBEL ): { if( pShell ) - pShell->SetWaitCursor( TRUE ); + pShell->SetWaitCursor( sal_True ); if( rGraphic.IsAnimated() ) { @@ -179,13 +179,13 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r } if( pShell ) - pShell->SetWaitCursor( FALSE ); + pShell->SetWaitCursor( sal_False ); } break; case( SID_GRFFILTER_MOSAIC ): { - GraphicFilterMosaic aDlg( pWindow, rGraphic, 4, 4, FALSE ); + GraphicFilterMosaic aDlg( pWindow, rGraphic, 4, 4, sal_False ); if( aDlg.Execute() == RET_OK ) aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); @@ -213,7 +213,7 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r case( SID_GRFFILTER_POPART ): { if( pShell ) - pShell->SetWaitCursor( TRUE ); + pShell->SetWaitCursor( sal_True ); if( rGraphic.IsAnimated() ) { @@ -231,7 +231,7 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r } if( pShell ) - pShell->SetWaitCursor( FALSE ); + pShell->SetWaitCursor( sal_False ); } break; @@ -246,7 +246,7 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r case( SID_GRFFILTER_SOLARIZE ): { - GraphicFilterSolarize aDlg( pWindow, rGraphic, 128, FALSE ); + GraphicFilterSolarize aDlg( pWindow, rGraphic, 128, sal_False ); if( aDlg.Execute() == RET_OK ) aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); @@ -446,7 +446,7 @@ IMPL_LINK( GraphicFilterDialog, ImplModifyHdl, void*, EMPTYARG ) // ---------------- GraphicFilterMosaic::GraphicFilterMosaic( Window* pParent, const Graphic& rGraphic, - USHORT nTileWidth, USHORT nTileHeight, BOOL bEnhanceEdges ) : + sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges ) : GraphicFilterDialog( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_MOSAIC ), rGraphic ), maFtWidth ( this, CUI_RES( DLG_FILTERMOSAIC_FT_WIDTH ) ), maMtrWidth ( this, CUI_RES( DLG_FILTERMOSAIC_MTR_WIDTH ) ), @@ -519,7 +519,7 @@ Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic, // ------------------ GraphicFilterSolarize::GraphicFilterSolarize( Window* pParent, const Graphic& rGraphic, - BYTE cGreyThreshold, BOOL bInvert ) : + sal_uInt8 cGreyThreshold, sal_Bool bInvert ) : GraphicFilterDialog ( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_SOLARIZE ), rGraphic ), maFtThreshold ( this, CUI_RES( DLG_FILTERSOLARIZE_FT_THRESHOLD ) ), maMtrThreshold ( this, CUI_RES( DLG_FILTERSOLARIZE_MTR_THRESHOLD ) ), @@ -583,7 +583,7 @@ Graphic GraphicFilterSolarize::GetFilteredGraphic( const Graphic& rGraphic, // ---------------------- GraphicFilterSepia::GraphicFilterSepia( Window* pParent, const Graphic& rGraphic, - USHORT nSepiaPercent ) : + sal_uInt16 nSepiaPercent ) : GraphicFilterDialog ( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_SEPIA ), rGraphic ), maFtSepia ( this, CUI_RES( DLG_FILTERSEPIA_FT_SEPIA ) ), maMtrSepia ( this, CUI_RES( DLG_FILTERSEPIA_MTR_SEPIA ) ) @@ -633,7 +633,7 @@ Graphic GraphicFilterSepia::GetFilteredGraphic( const Graphic& rGraphic, // ----------------------- GraphicFilterPoster::GraphicFilterPoster( Window* pParent, const Graphic& rGraphic, - USHORT nPosterCount ) : + sal_uInt16 nPosterCount ) : GraphicFilterDialog ( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_POSTER ), rGraphic ), maFtPoster ( this, CUI_RES( DLG_FILTERPOSTER_FT_POSTER ) ), maNumPoster ( this, CUI_RES( DLG_FILTERPOSTER_NUM_POSTER ) ) @@ -659,7 +659,7 @@ Graphic GraphicFilterPoster::GetFilteredGraphic( const Graphic& rGraphic, double /*fScaleX*/, double /*fScaleY*/ ) { Graphic aRet; - const USHORT nPosterCount = GetPosterColorCount(); + const sal_uInt16 nPosterCount = GetPosterColorCount(); if( rGraphic.IsAnimated() ) { @@ -719,7 +719,7 @@ Graphic GraphicFilterEmboss::GetFilteredGraphic( const Graphic& rGraphic, double /*fScaleX*/, double /*fScaleY*/ ) { Graphic aRet; - USHORT nAzim, nElev; + sal_uInt16 nAzim, nElev; switch( maCtlLight.GetActualRP() ) { diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 94477b6ef3dc..f394ba629af2 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -48,7 +48,7 @@ using ::com::sun::star::frame::XFrame; //# # //######################################################################## -SvxHlinkCtrl::SvxHlinkCtrl( USHORT _nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg ) +SvxHlinkCtrl::SvxHlinkCtrl( sal_uInt16 _nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg ) : SfxControllerItem ( _nId, rBindings ) ,aOnlineForwarder ( SID_INTERNET_ONLINE , *this ) ,aRdOnlyForwarder ( SID_READONLY_MODE, *this ) @@ -56,7 +56,7 @@ SvxHlinkCtrl::SvxHlinkCtrl( USHORT _nId, SfxBindings & rBindings, SvxHpLinkDlg* pParent = pDlg; } -void SvxHlinkCtrl::StateChanged( USHORT nSID, SfxItemState eState, +void SvxHlinkCtrl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { if ( eState == SFX_ITEM_AVAILABLE ) @@ -75,7 +75,7 @@ void SvxHlinkCtrl::StateChanged( USHORT nSID, SfxItemState eState, break; case SID_READONLY_MODE : { - pParent->SetReadOnlyMode( ( (SfxBoolItem*)pState)->GetValue() == TRUE ); + pParent->SetReadOnlyMode( ( (SfxBoolItem*)pState)->GetValue() == sal_True ); } break; } @@ -146,7 +146,7 @@ SvxHpLinkDlg::SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings) SetInputSet (mpItemSet); // Init Dialog - Start (FALSE); + Start (sal_False); pBindings->Update( SID_READONLY_MODE ); @@ -173,12 +173,12 @@ SvxHpLinkDlg::~SvxHpLinkDlg () |* |************************************************************************/ -BOOL SvxHpLinkDlg::Close() +sal_Bool SvxHpLinkDlg::Close() { GetDispatcher()->Execute( SID_HYPERLINK_DIALOG, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD); - return TRUE; + return sal_True; } /************************************************************************* @@ -205,13 +205,13 @@ void SvxHpLinkDlg::Move() // Size of Extrawindow Size aExtraWndSize( pCurrentPage->GetSizeExtraWnd() ); - BOOL bDoInvalid ; + sal_Bool bDoInvalid ; if( aDlgPos.X()+(1.02*aDlgSize.Width())+aExtraWndSize.Width() > aWindowSize.Width() ) { if( aDlgPos.X() - ( 0.02*aDlgSize.Width() ) - aExtraWndSize.Width() < 0 ) { // Pos Extrawindow anywhere - bDoInvalid = pCurrentPage->MoveToExtraWnd( Point( 1, long(1.1*aDlgPos.Y()) ), TRUE ); + bDoInvalid = pCurrentPage->MoveToExtraWnd( Point( 1, long(1.1*aDlgPos.Y()) ), sal_True ); } else { @@ -305,9 +305,9 @@ IMPL_LINK ( SvxHpLinkDlg, ClickCloseHdl_Impl, void *, EMPTYARG ) |* |************************************************************************/ -USHORT SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem ) +sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem ) { - USHORT nPageId = RID_SVXPAGE_HYPERLINK_INTERNET; + sal_uInt16 nPageId = RID_SVXPAGE_HYPERLINK_INTERNET; String aStrURL ( pItem->GetURL() ); INetURLObject aURL ( aStrURL ); @@ -401,7 +401,7 @@ void SvxHpLinkDlg::SetReadOnlyMode( sal_Bool bRdOnly ) |* |************************************************************************/ -void SvxHpLinkDlg::PageCreated( USHORT /*nId*/, IconChoicePage& rPage ) +void SvxHpLinkDlg::PageCreated( sal_uInt16 /*nId*/, IconChoicePage& rPage ) { SvxHyperlinkTabPageBase& rHyperlinkPage = dynamic_cast< SvxHyperlinkTabPageBase& >( rPage ); Reference< XFrame > xDocumentFrame; diff --git a/cui/source/dialogs/cuitbxform.cxx b/cui/source/dialogs/cuitbxform.cxx index e3115875fab2..f7a30c9637e3 100644 --- a/cui/source/dialogs/cuitbxform.cxx +++ b/cui/source/dialogs/cuitbxform.cxx @@ -58,7 +58,7 @@ FmInputRecordNoDialog::FmInputRecordNoDialog(Window * pParent) { m_aRecordNo.SetMin(1); m_aRecordNo.SetMax(0x7FFFFFFF); - m_aRecordNo.SetStrictFormat(TRUE); + m_aRecordNo.SetStrictFormat(sal_True); m_aRecordNo.SetDecimalDigits(0); FreeResource(); diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index c5bf6d8ffa39..0fd1b4275eb4 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -216,7 +216,7 @@ IMPL_LINK_INLINE_END( SvxMessDialog, Button2Hdl, Button *, EMPTYARG ) /*************************************************************************/ -void SvxMessDialog::SetButtonText( USHORT nBtnId, const String& rNewTxt ) +void SvxMessDialog::SetButtonText( sal_uInt16 nBtnId, const String& rNewTxt ) { switch ( nBtnId ) { diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 169c88aebe71..5a7490b174ca 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -51,7 +51,7 @@ #include <comphelper/processfactory.hxx> #define HHC editeng::HangulHanjaConversion -#define LINE_CNT static_cast< USHORT >(2) +#define LINE_CNT static_cast< sal_uInt16 >(2) //............................................................................. namespace svx @@ -118,7 +118,7 @@ namespace svx PseudoRubyText( const String& _rPrimary, const String& _rSecondary, const RubyPosition _ePosition ); public: - void Paint( OutputDevice& _rDevice, const Rectangle& _rRect, USHORT _nTextStyle, + void Paint( OutputDevice& _rDevice, const Rectangle& _rRect, sal_uInt16 _nTextStyle, Rectangle* _pPrimaryLocation = NULL, Rectangle* _pSecondaryLocation = NULL, ::vcl::ControlLayoutData* _pLayoutData = NULL ); }; @@ -132,7 +132,7 @@ namespace svx } //------------------------------------------------------------------------- - void PseudoRubyText::Paint( OutputDevice& _rDevice, const Rectangle& _rRect, USHORT _nTextStyle, + void PseudoRubyText::Paint( OutputDevice& _rDevice, const Rectangle& _rRect, sal_uInt16 _nTextStyle, Rectangle* _pPrimaryLocation, Rectangle* _pSecondaryLocation, ::vcl::ControlLayoutData* _pLayoutData ) { bool bLayoutOnly = NULL != _pLayoutData; @@ -204,7 +204,7 @@ namespace svx // now draw the texts // as we already calculated the precise rectangles for the texts, we don't want to // use the alignment flags given - within it's rect, every text is centered - USHORT nDrawTextStyle( _nTextStyle ); + sal_uInt16 nDrawTextStyle( _nTextStyle ); nDrawTextStyle &= ~( TEXT_DRAW_RIGHT | TEXT_DRAW_LEFT | TEXT_DRAW_BOTTOM | TEXT_DRAW_TOP ); nDrawTextStyle |= TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER; @@ -267,7 +267,7 @@ namespace svx ++aTextRect.Top(); --aTextRect.Bottom(); // calculate the text flags for the painting - USHORT nTextStyle = TEXT_DRAW_MNEMONIC; + sal_uInt16 nTextStyle = TEXT_DRAW_MNEMONIC; WinBits nStyle = GetStyle( ); // the horizontal alignment @@ -337,7 +337,7 @@ namespace svx { OutputDevice* pDev = rUDEvt.GetDevice(); Rectangle aRect = rUDEvt.GetRect(); - USHORT nItemId = rUDEvt.GetItemId(); + sal_uInt16 nItemId = rUDEvt.GetItemId(); String sText = *static_cast< String* >( GetItemData( nItemId ) ); pDev->DrawText( aRect, sText, TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER ); @@ -345,7 +345,7 @@ namespace svx void SuggestionSet::ClearSet() { - USHORT i, nCount = GetItemCount(); + sal_uInt16 i, nCount = GetItemCount(); for ( i = 0; i < nCount; ++i ) delete static_cast< String* >( GetItemData(i) ); Clear(); @@ -441,7 +441,7 @@ namespace svx if( m_bDisplayListBox != bDisplayListBox ) { Control& rOldControl = implGetCurrentControl(); - BOOL bHasFocus = rOldControl.HasFocus(); + sal_Bool bHasFocus = rOldControl.HasFocus(); m_bDisplayListBox = bDisplayListBox; @@ -463,12 +463,12 @@ namespace svx m_bInSelectionUpdate = true; if(pControl==&m_aListBox) { - USHORT nPos = m_aListBox.GetSelectEntryPos(); + sal_uInt16 nPos = m_aListBox.GetSelectEntryPos(); m_aValueSet.SelectItem( nPos+1 ); //itemid == pos+1 (id 0 has special meaning) } else { - USHORT nPos = m_aValueSet.GetSelectItemId()-1; //itemid == pos+1 (id 0 has special meaning) + sal_uInt16 nPos = m_aValueSet.GetSelectItemId()-1; //itemid == pos+1 (id 0 has special meaning) m_aListBox.SelectEntryPos( nPos ); } m_bInSelectionUpdate = false; @@ -487,21 +487,21 @@ namespace svx } void SuggestionDisplay::InsertEntry( const XubString& rStr ) { - USHORT nItemId = m_aListBox.InsertEntry( rStr ) + 1; //itemid == pos+1 (id 0 has special meaning) + sal_uInt16 nItemId = m_aListBox.InsertEntry( rStr ) + 1; //itemid == pos+1 (id 0 has special meaning) m_aValueSet.InsertItem( nItemId ); String* pItemData = new String(rStr); m_aValueSet.SetItemData( nItemId, pItemData ); } - void SuggestionDisplay::SelectEntryPos( USHORT nPos ) + void SuggestionDisplay::SelectEntryPos( sal_uInt16 nPos ) { m_aListBox.SelectEntryPos( nPos ); m_aValueSet.SelectItem( nPos+1 ); //itemid == pos+1 (id 0 has special meaning) } - USHORT SuggestionDisplay::GetEntryCount() const + sal_uInt16 SuggestionDisplay::GetEntryCount() const { return m_aListBox.GetEntryCount(); } - XubString SuggestionDisplay::GetEntry( USHORT nPos ) const + XubString SuggestionDisplay::GetEntry( sal_uInt16 nPos ) const { return m_aListBox.GetEntry( nPos ); } @@ -754,9 +754,9 @@ namespace svx pOtherBox = &m_aHangulOnly; if (pBox && pOtherBox) { - BOOL bBoxChecked = pBox->IsChecked(); + sal_Bool bBoxChecked = pBox->IsChecked(); if (bBoxChecked) - pOtherBox->Check( FALSE ); + pOtherBox->Check( sal_False ); pOtherBox->Enable( !bBoxChecked ); } @@ -865,10 +865,10 @@ namespace svx HHC::ConversionDirection _ePrimaryConversionDirection ) { // default state: try both direction - m_aHangulOnly.Check( FALSE ); - m_aHangulOnly.Enable( TRUE ); - m_aHanjaOnly.Check( FALSE ); - m_aHanjaOnly.Enable( TRUE ); + m_aHangulOnly.Check( sal_False ); + m_aHangulOnly.Enable( sal_True ); + m_aHanjaOnly.Check( sal_False ); + m_aHanjaOnly.Enable( sal_True ); if (!_bTryBothDirections) { @@ -1109,7 +1109,7 @@ namespace svx IMPL_LINK( HangulHanjaOptionsDialog, DeleteDictHdl, void*, EMPTYARG ) { - USHORT nSelPos = m_aDictsLB.GetSelectEntryPos(); + sal_uInt16 nSelPos = m_aDictsLB.GetSelectEntryPos(); if( nSelPos != LISTBOX_ENTRY_NOTFOUND ) { Reference< XConversionDictionary > xDic( m_aDictList[ nSelPos ] ); @@ -1486,8 +1486,8 @@ namespace svx { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const KeyCode& rKeyCode = pKEvt->GetKeyCode(); - USHORT nMod = rKeyCode.GetModifier(); - USHORT nCode = rKeyCode.GetCode(); + sal_uInt16 nMod = rKeyCode.GetModifier(); + sal_uInt16 nCode = rKeyCode.GetCode(); if( nCode == KEY_TAB && ( !nMod || KEY_SHIFT == nMod ) ) { bool bUp = KEY_SHIFT == nMod; @@ -1870,7 +1870,7 @@ namespace svx aName = xDic->getName(); m_aBookLB.InsertEntry( aName ); } - m_aBookLB.SelectEntryPos( USHORT( _nSelDict ) ); + m_aBookLB.SelectEntryPos( sal_uInt16( _nSelDict ) ); FreeResource(); diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 1015063b05e3..483f36a9e199 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -96,7 +96,7 @@ sal_Bool SvxHyperlinkNewDocTp::ImplGetURLObject( const String& rPath, const Stri } if ( bIsValidURL ) { - USHORT nPos = maLbDocTypes.GetSelectEntryPos(); + sal_uInt16 nPos = maLbDocTypes.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) aURLObject.SetExtension( ((DocumentTypeData*)maLbDocTypes.GetEntryData( nPos ))->aStrExt ); } @@ -124,7 +124,7 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, const SfxItemSet& { // Set HC bitmaps and disable display of bitmap names. maBtCreate.SetModeImage( Image( CUI_RES( IMG_CREATE_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maBtCreate.EnableTextDisplay (FALSE); + maBtCreate.EnableTextDisplay (sal_False); InitStdControls(); FreeResource(); @@ -147,7 +147,7 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, const SfxItemSet& SvxHyperlinkNewDocTp::~SvxHyperlinkNewDocTp () { - for ( USHORT n=0; n<maLbDocTypes.GetEntryCount(); n++ ) + for ( sal_uInt16 n=0; n<maLbDocTypes.GetEntryCount(); n++ ) { DocumentTypeData* pTypeData = (DocumentTypeData*) maLbDocTypes.GetEntryData ( n ); @@ -279,7 +279,7 @@ void SvxHyperlinkNewDocTp::SetInitFocus() |* \************************************************************************/ -BOOL SvxHyperlinkNewDocTp::AskApply() +sal_Bool SvxHyperlinkNewDocTp::AskApply() { INetURLObject aINetURLObject; sal_Bool bRet = ImplGetURLObject( maCbbPath.GetText(), maCbbPath.GetBaseURL(), aINetURLObject ); @@ -348,7 +348,7 @@ void SvxHyperlinkNewDocTp::DoApply () if ( aStrNewName != aEmptyStr ) { // get private-url - USHORT nPos = maLbDocTypes.GetSelectEntryPos(); + sal_uInt16 nPos = maLbDocTypes.GetSelectEntryPos(); if( nPos == LISTBOX_ENTRY_NOTFOUND ) nPos=0; String aStrDocName ( ( ( DocumentTypeData* ) @@ -359,7 +359,7 @@ void SvxHyperlinkNewDocTp::DoApply () SfxStringItem aReferer( SID_REFERER, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "private:user" ) ) ); SfxStringItem aFrame( SID_TARGETNAME, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "_blank" ) ) ); - //SfxBoolItem aFrame( SID_OPEN_NEW_VIEW, TRUE ); + //SfxBoolItem aFrame( SID_OPEN_NEW_VIEW, sal_True ); String aStrFlags ( sal_Unicode('S') ); if ( maRbtEditLater.IsChecked() ) @@ -429,14 +429,14 @@ IMPL_LINK ( SvxHyperlinkNewDocTp, ClickNewHdl_Impl, void *, EMPTYARG ) utl::LocalFileHelper::ConvertSystemPathToURL( aTempStrURL, maCbbPath.GetBaseURL(), aStrURL ); String aStrPath = aStrURL; - BOOL bZeroPath = ( aStrPath.Len() == 0 ); - BOOL bHandleFileName = bZeroPath; // when path has length of 0, then the rest should always be handled + sal_Bool bZeroPath = ( aStrPath.Len() == 0 ); + sal_Bool bHandleFileName = bZeroPath; // when path has length of 0, then the rest should always be handled // as file name, otherwise we do not yet know if( bZeroPath ) aStrPath = SvtPathOptions().GetWorkPath(); else if( !::utl::UCBContentHelper::IsFolder( aStrURL ) ) - bHandleFileName = TRUE; + bHandleFileName = sal_True; xFolderPicker->setDisplayDirectory( aStrPath ); DisableClose( sal_True ); @@ -467,7 +467,7 @@ IMPL_LINK ( SvxHyperlinkNewDocTp, ClickNewHdl_Impl, void *, EMPTYARG ) maLbDocTypes.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ) { // get private-url - USHORT nPos = maLbDocTypes.GetSelectEntryPos(); + sal_uInt16 nPos = maLbDocTypes.GetSelectEntryPos(); aNewURL.setExtension( ( ( DocumentTypeData* ) maLbDocTypes.GetEntryData( nPos ) )->aStrExt ); } diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index a87d7710f484..526a44277e06 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -61,13 +61,13 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemS maFtURL ( this, CUI_RES (FT_URL) ), maFtFullURL ( this, CUI_RES (FT_FULL_URL) ), maBtBrowse ( this, CUI_RES (BTN_BROWSE) ), - mbMarkWndOpen ( FALSE ) + mbMarkWndOpen ( sal_False ) { // Set HC bitmaps and disable display of bitmap names. maBtBrowse.SetModeImage( Image( CUI_RES( IMG_BROWSE_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maBtBrowse.EnableTextDisplay (FALSE); + maBtBrowse.EnableTextDisplay (sal_False); maBtFileopen.SetModeImage( Image( CUI_RES( IMG_FILEOPEN_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maBtFileopen.EnableTextDisplay (FALSE); + maBtFileopen.EnableTextDisplay (sal_False); InitStdControls(); FreeResource(); diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 79fde6c7a64c..9aefda6b44bb 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -68,13 +68,13 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, maCbAnonymous ( this, CUI_RES (CBX_ANONYMOUS) ), maBtBrowse ( this, CUI_RES (BTN_BROWSE) ), maBtTarget ( this, CUI_RES (BTN_TARGET) ), - mbMarkWndOpen ( FALSE ) + mbMarkWndOpen ( sal_False ) { // Set HC bitmaps and display display of bitmap names. maBtBrowse.SetModeImage( Image( CUI_RES( IMG_BROWSE_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maBtBrowse.EnableTextDisplay (FALSE); + maBtBrowse.EnableTextDisplay (sal_False); maBtTarget.SetModeImage( Image( CUI_RES( IMG_TARGET_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maBtTarget.EnableTextDisplay (FALSE); + maBtTarget.EnableTextDisplay (sal_False); InitStdControls(); FreeResource(); @@ -103,12 +103,12 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, /////////////////////////////////////// // set defaults maRbtLinktypInternet.Check (); - maFtLogin.Show( FALSE ); - maFtPassword.Show( FALSE ); - maEdLogin.Show( FALSE ); - maEdPassword.Show( FALSE ); - maCbAnonymous.Show( FALSE ); - maBtTarget.Enable( FALSE ); + maFtLogin.Show( sal_False ); + maFtPassword.Show( sal_False ); + maEdLogin.Show( sal_False ); + maEdPassword.Show( sal_False ); + maCbAnonymous.Show( sal_False ); + maBtTarget.Enable( sal_False ); maBtBrowse.Enable( maStrStdDocURL != aEmptyStr ); /////////////////////////////////////// @@ -186,7 +186,7 @@ void SvxHyperlinkInternetTp::setFTPUser(const String& rUser, const String& rPass maFtPassword.Enable (); maEdLogin.Enable (); maEdPassword.Enable (); - maCbAnonymous.Check(FALSE); + maCbAnonymous.Check(sal_False); } /************************************************************************* @@ -304,11 +304,11 @@ void SvxHyperlinkInternetTp::SetScheme( const String& aScheme ) { //if aScheme is empty or unknown the default beaviour is like it where HTTP - BOOL bFTP = aScheme.SearchAscii( sFTPScheme ) == 0; - BOOL bTelnet = FALSE; + sal_Bool bFTP = aScheme.SearchAscii( sFTPScheme ) == 0; + sal_Bool bTelnet = sal_False; if( !bFTP ) bTelnet = aScheme.SearchAscii( sTelnetScheme ) == 0; - BOOL bInternet = !(bFTP || bTelnet); + sal_Bool bInternet = !(bFTP || bTelnet); //update protocol button selection: maRbtLinktypFTP.Check(bFTP); @@ -457,11 +457,11 @@ IMPL_LINK ( SvxHyperlinkInternetTp, ClickBrowseHdl_Impl, void *, EMPTYARG ) SfxStringItem aName( SID_FILE_NAME, maStrStdDocURL ); SfxStringItem aRefererItem( SID_REFERER, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "private:user" ) ) ); - SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, TRUE ); - SfxBoolItem aSilent( SID_SILENT, TRUE ); - SfxBoolItem aReadOnly( SID_DOC_READONLY, TRUE ); + SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_True ); + SfxBoolItem aSilent( SID_SILENT, sal_True ); + SfxBoolItem aReadOnly( SID_DOC_READONLY, sal_True ); - SfxBoolItem aBrowse( SID_BROWSE, TRUE ); + SfxBoolItem aBrowse( SID_BROWSE, sal_True ); const SfxPoolItem *ppItems[] = { &aName, &aNewView, &aSilent, &aReadOnly, &aRefererItem, &aBrowse, NULL }; (((SvxHpLinkDlg*)mpDialog)->GetBindings())->Execute( SID_OPENDOC, ppItems, 0, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD ); @@ -527,7 +527,7 @@ void SvxHyperlinkInternetTp::SetMarkStr ( String& aStrMark ) |* |************************************************************************/ -void SvxHyperlinkInternetTp::SetOnlineMode( BOOL /*bEnable*/ ) +void SvxHyperlinkInternetTp::SetOnlineMode( sal_Bool /*bEnable*/ ) { // State of target-button in subject to the current url-string // ( Can't display any targets in an document, if there is no @@ -538,7 +538,7 @@ void SvxHyperlinkInternetTp::SetOnlineMode( BOOL /*bEnable*/ ) if( aStrCurrentTarget == aEmptyStr || aStrCurrentTarget.EqualsIgnoreCaseAscii( sHTTPScheme ) || aStrCurrentTarget.EqualsIgnoreCaseAscii( sHTTPSScheme ) ) - maBtTarget.Enable( FALSE ); + maBtTarget.Enable( sal_False ); else - maBtTarget.Enable( TRUE ); + maBtTarget.Enable( sal_True ); } diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index 5ea43e165883..a7d34283face 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -64,7 +64,7 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( Window *pParent, const SfxItemSet& rIte { // Set HC bitmaps and disable display of bitmap names. maBtAdrBook.SetModeImage( Image( CUI_RES( IMG_ADRESSBOOK_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maBtAdrBook.EnableTextDisplay (FALSE); + maBtAdrBook.EnableTextDisplay (sal_False); InitStdControls(); FreeResource(); @@ -212,7 +212,7 @@ void SvxHyperlinkMailTp::SetScheme( const String& aScheme ) //if aScheme is empty or unknown the default beaviour is like it where MAIL const sal_Char sNewsScheme[] = INET_NEWS_SCHEME; - BOOL bMail = aScheme.SearchAscii( sNewsScheme ) != 0; + sal_Bool bMail = aScheme.SearchAscii( sNewsScheme ) != 0; //update protocol button selection: maRbtMail.Check(bMail); diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index 5d29e652a7d2..9898eff9f36b 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -63,9 +63,9 @@ using namespace ::rtl; struct TargetData { OUString aUStrLinkname; - BOOL bIsTarget; + sal_Bool bIsTarget; - TargetData ( OUString aUStrLName, BOOL bTarget ) + TargetData ( OUString aUStrLName, sal_Bool bTarget ) : bIsTarget ( bTarget ) { if ( bIsTarget ) @@ -133,8 +133,8 @@ SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd( SvxHyperlinkTabPageBase *pParent ) maBtApply( this, CUI_RES (BT_APPLY) ), maBtClose( this, CUI_RES (BT_CLOSE) ), maLbTree ( this, CUI_RES (TLB_MARK) ), - mbUserMoved ( FALSE ), - mbFirst ( TRUE ), + mbUserMoved ( sal_False ), + mbFirst ( sal_True ), mpParent ( pParent ), mnError ( LERR_NOERROR ) { @@ -161,9 +161,9 @@ SvxHlinkDlgMarkWnd::~SvxHlinkDlgMarkWnd() |* |************************************************************************/ -USHORT SvxHlinkDlgMarkWnd::SetError( USHORT nError) +sal_uInt16 SvxHlinkDlgMarkWnd::SetError( sal_uInt16 nError) { - USHORT nOldError = mnError; + sal_uInt16 nOldError = mnError; mnError = nError; if( mnError != LERR_NOERROR ) @@ -180,11 +180,11 @@ USHORT SvxHlinkDlgMarkWnd::SetError( USHORT nError) |* |************************************************************************/ -BOOL SvxHlinkDlgMarkWnd::MoveTo ( Point aNewPos ) +sal_Bool SvxHlinkDlgMarkWnd::MoveTo ( Point aNewPos ) { if ( !mbUserMoved ) { - BOOL bOldStatus = mbUserMoved; + sal_Bool bOldStatus = mbUserMoved; SetPosPixel ( aNewPos ); mbUserMoved = bOldStatus; } @@ -197,12 +197,12 @@ void SvxHlinkDlgMarkWnd::Move () Window::Move(); if ( IsReallyVisible() ) - mbUserMoved = TRUE; + mbUserMoved = sal_True; } -BOOL SvxHlinkDlgMarkWnd::ConnectToDialog( BOOL bDoit ) +sal_Bool SvxHlinkDlgMarkWnd::ConnectToDialog( sal_Bool bDoit ) { - BOOL bOldStatus = mbUserMoved; + sal_Bool bOldStatus = mbUserMoved; mbUserMoved = !bDoit; @@ -249,7 +249,7 @@ void SvxHlinkDlgMarkWnd::RefreshTree ( String aStrURL ) |* |************************************************************************/ -BOOL SvxHlinkDlgMarkWnd::RefreshFromDoc( OUString aURL ) +sal_Bool SvxHlinkDlgMarkWnd::RefreshFromDoc( OUString aURL ) { mnError = LERR_NOERROR; @@ -272,7 +272,7 @@ BOOL SvxHlinkDlgMarkWnd::RefreshFromDoc( OUString aURL ) { uno::Sequence< beans::PropertyValue > aArg(1); aArg.getArray()[0].Name = OUString::createFromAscii( "Hidden" ); - aArg.getArray()[0].Value <<= (sal_Bool) TRUE; + aArg.getArray()[0].Value <<= (sal_Bool) sal_True; xComp = xLoader->loadComponentFromURL( aURL, OUString::createFromAscii( "_blank" ), 0, aArg ); } catch( const io::IOException& ) @@ -346,19 +346,19 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink { int nEntries=0; const uno::Sequence< OUString > aNames( xLinks->getElementNames() ); - const ULONG nLinks = aNames.getLength(); + const sal_uLong nLinks = aNames.getLength(); const OUString* pNames = aNames.getConstArray(); Color aMaskColor( COL_LIGHTMAGENTA ); const OUString aProp_LinkDisplayName( RTL_CONSTASCII_USTRINGPARAM( "LinkDisplayName" ) ); const OUString aProp_LinkTarget( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.LinkTarget" ) ); const OUString aProp_LinkDisplayBitmap( RTL_CONSTASCII_USTRINGPARAM( "LinkDisplayBitmap" ) ); - for( ULONG i = 0; i < nLinks; i++ ) + for( sal_uLong i = 0; i < nLinks; i++ ) { uno::Any aAny; OUString aLink( *pNames++ ); - BOOL bError = FALSE; + sal_Bool bError = sal_False; try { aAny = xLinks->getByName( aLink ); @@ -367,7 +367,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink { // if the name of the target was invalid (like empty headings) // no object can be provided - bError = TRUE; + bError = sal_True; } if(bError) continue; @@ -386,7 +386,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink // is it a target ? uno::Reference< lang::XServiceInfo > xSI( xTarget, uno::UNO_QUERY ); - BOOL bIsTarget = xSI->supportsService( aProp_LinkTarget ); + sal_Bool bIsTarget = xSI->supportsService( aProp_LinkTarget ); // create userdata TargetData *pData = new TargetData ( aLink, bIsTarget ); @@ -404,7 +404,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink pEntry = maLbTree.InsertEntry ( aStrDisplayname, aBmp, aBmp, pParentEntry, - FALSE, LIST_APPEND, + sal_False, LIST_APPEND, (void*)pData ); maLbTree.SetExpandedEntryBmp( pEntry, aBmp, BMP_COLOR_HIGHCONTRAST ); maLbTree.SetCollapsedEntryBmp( pEntry, aBmp, BMP_COLOR_HIGHCONTRAST ); @@ -415,7 +415,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink // insert Displayname into treelist without bitmaps pEntry = maLbTree.InsertEntry ( aStrDisplayname, pParentEntry, - FALSE, LIST_APPEND, + sal_False, LIST_APPEND, (void*)pData ); nEntries++; } @@ -425,7 +425,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink // insert Displayname into treelist without bitmaps pEntry = maLbTree.InsertEntry ( aStrDisplayname, pParentEntry, - FALSE, LIST_APPEND, + sal_False, LIST_APPEND, (void*)pData ); nEntries++; } @@ -472,14 +472,14 @@ void SvxHlinkDlgMarkWnd::ClearTree() SvLBoxEntry* SvxHlinkDlgMarkWnd::FindEntry ( String aStrName ) { - BOOL bFound=FALSE; + sal_Bool bFound=sal_False; SvLBoxEntry* pEntry = maLbTree.First(); while ( pEntry && !bFound ) { TargetData* pUserData = ( TargetData * ) pEntry->GetUserData (); if ( aStrName == String( pUserData->aUStrLinkname ) ) - bFound = TRUE; + bFound = sal_True; else pEntry = maLbTree.Next( pEntry ); } diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index f9e2c3814552..28bf46ce241e 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -66,10 +66,10 @@ SvxFramesComboBox::SvxFramesComboBox ( Window* pParent, const ResId& rResId, if ( pFrame ) { pFrame->GetTargetList(*pList); - USHORT nCount = (USHORT)pList->Count(); + sal_uInt16 nCount = (sal_uInt16)pList->Count(); if( nCount ) { - USHORT i; + sal_uInt16 i; for ( i = 0; i < nCount; i++ ) { InsertEntry(*pList->GetObject(i)); @@ -98,7 +98,7 @@ SvxFramesComboBox::~SvxFramesComboBox () |* |************************************************************************/ -SvxHyperURLBox::SvxHyperURLBox( Window* pParent, INetProtocol eSmart, BOOL bAddresses ) +SvxHyperURLBox::SvxHyperURLBox( Window* pParent, INetProtocol eSmart, sal_Bool bAddresses ) : SvtURLBox ( pParent, eSmart ), DropTargetHelper ( this ), mbAccessAddress (bAddresses) @@ -140,17 +140,17 @@ Diese Methode parsed eine EMailadresse aus einem D&D-DataObjekt aus der Adre�d #define DB_DD_DELIM ((char)11) -String SvxHyperURLBox::GetAllEmailNamesFromDragItem( USHORT nItem ) +String SvxHyperURLBox::GetAllEmailNamesFromDragItem( sal_uInt16 nItem ) { #if !defined( ICC ) && !defined( SOLARIS ) String aAddress; if ( DragServer::HasFormat( nItem, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) ) { - ULONG nLen = DragServer::GetDataLen( nItem, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) - 1; - USHORT i = 0; + sal_uLong nLen = DragServer::GetDataLen( nItem, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) - 1; + sal_uInt16 i = 0; String aTxt; - char *pTxt = aTxt.AllocStrBuf( (USHORT)nLen ); + char *pTxt = aTxt.AllocStrBuf( (sal_uInt16)nLen ); DragServer::PasteData( nItem, pTxt, nLen, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ); String aDBName = aTxt.GetToken( i++, DB_DD_DELIM ); String aTableName = aTxt.GetToken( i++, DB_DD_DELIM ); @@ -171,14 +171,14 @@ String SvxHyperURLBox::GetAllEmailNamesFromDragItem( USHORT nItem ) SbaSelectionListRef pSelectionList; pSelectionList.Clear(); pSelectionList = new SbaSelectionList; - USHORT nTokCnt = aTxt.GetTokenCount( DB_DD_DELIM ); + sal_uInt16 nTokCnt = aTxt.GetTokenCount( DB_DD_DELIM ); for ( ; i < nTokCnt; ++i ) pSelectionList->Insert( - (void*)(USHORT)aTxt.GetToken( i, DB_DD_DELIM ), LIST_APPEND ); + (void*)(sal_uInt16)aTxt.GetToken( i, DB_DD_DELIM ), LIST_APPEND ); OfaDBMgr* pDBMgr = SFX_APP()->GetOfaDBMgr(); - BOOL bBasic = DBMGR_STD; + sal_Bool bBasic = DBMGR_STD; if ( !pDBMgr->OpenDB( bBasic, aDBName ) ) return aAddress; @@ -205,17 +205,17 @@ String SvxHyperURLBox::GetAllEmailNamesFromDragItem( USHORT nItem ) if ( aDBDef.Is() ) { SbaColumn* pCol = aDBDef->GetColumn("EMAIL"); - ULONG nPos = 0; + sal_uLong nPos = 0; if ( pCol ) nPos = aDBDef->GetOriginalColumns().GetPos( pCol ) + 1; for ( i = 0 ; nPos && i < pSelectionList->Count(); ++i ) { - ULONG nIndex = (ULONG)pSelectionList->GetObject(i); + sal_uLong nIndex = (sal_uLong)pSelectionList->GetObject(i); // N"achsten zu lesenden Datensatz ansteuern - BOOL bEnd = rParam.GetCursor()->IsOffRange(); + sal_Bool bEnd = rParam.GetCursor()->IsOffRange(); if ( !bEnd ) { @@ -225,7 +225,7 @@ String SvxHyperURLBox::GetAllEmailNamesFromDragItem( USHORT nItem ) if ( aRow.Is() ) { aAddress += pDBMgr-> - ImportDBField( (USHORT)nPos, &aDBDef, aRow.getBodyPtr() ); + ImportDBField( (sal_uInt16)nPos, &aDBDef, aRow.getBodyPtr() ); aAddress += ','; } else @@ -294,7 +294,7 @@ SvxHyperlinkTabPageBase::SvxHyperlinkTabPageBase ( Window *pParent, mpBtScript ( NULL ), mbIsCloseDisabled ( sal_False ), mpDialog ( pParent ), - mbStdControlsInit ( FALSE ), + mbStdControlsInit ( sal_False ), aEmptyStr() { // create bookmark-window @@ -355,10 +355,10 @@ void SvxHyperlinkTabPageBase::InitStdControls () mpBtScript->SetClickHdl ( LINK ( this, SvxHyperlinkTabPageBase, ClickScriptHdl_Impl ) ); mpBtScript->SetModeImage( Image( ResId( IMG_SCRIPT_HC, *m_pResMgr ) ), BMP_COLOR_HIGHCONTRAST ); - mpBtScript->EnableTextDisplay (FALSE); + mpBtScript->EnableTextDisplay (sal_False); } - mbStdControlsInit = TRUE; + mbStdControlsInit = sal_True; } /************************************************************************* @@ -367,12 +367,12 @@ void SvxHyperlinkTabPageBase::InitStdControls () |* \************************************************************************/ -BOOL SvxHyperlinkTabPageBase::MoveToExtraWnd( Point aNewPos, BOOL bDisConnectDlg ) +sal_Bool SvxHyperlinkTabPageBase::MoveToExtraWnd( Point aNewPos, sal_Bool bDisConnectDlg ) { - BOOL bReturn = mpMarkWnd->MoveTo ( aNewPos ); + sal_Bool bReturn = mpMarkWnd->MoveTo ( aNewPos ); if( bDisConnectDlg ) - mpMarkWnd->ConnectToDialog( FALSE ); + mpMarkWnd->ConnectToDialog( sal_False ); return ( !bReturn && IsMarkWndVisible() ); } @@ -405,7 +405,7 @@ void SvxHyperlinkTabPageBase::ShowMarkWnd () { // Pos Extrawindow anywhere MoveToExtraWnd( Point(10,10) ); // very unlikely - mpMarkWnd->ConnectToDialog( FALSE ); + mpMarkWnd->ConnectToDialog( sal_False ); } else { @@ -432,7 +432,7 @@ void SvxHyperlinkTabPageBase::ShowMarkWnd () void SvxHyperlinkTabPageBase::FillStandardDlgFields ( SvxHyperlinkItem* pHyperlinkItem ) { // Frame - USHORT nPos = mpCbbFrame->GetEntryPos ( pHyperlinkItem->GetTargetFrame() ); + sal_uInt16 nPos = mpCbbFrame->GetEntryPos ( pHyperlinkItem->GetTargetFrame() ); if ( nPos != LISTBOX_ENTRY_NOTFOUND) mpCbbFrame->SetText ( pHyperlinkItem->GetTargetFrame() ); @@ -484,10 +484,10 @@ void SvxHyperlinkTabPageBase::DoApply () |* \************************************************************************/ -BOOL SvxHyperlinkTabPageBase::AskApply () +sal_Bool SvxHyperlinkTabPageBase::AskApply () { // default-implementation - return TRUE; + return sal_True; } /************************************************************************* @@ -508,7 +508,7 @@ void SvxHyperlinkTabPageBase::SetMarkStr ( String& /*aStrMark*/ ) |* \************************************************************************/ -void SvxHyperlinkTabPageBase::SetOnlineMode( BOOL /*bEnable*/ ) +void SvxHyperlinkTabPageBase::SetOnlineMode( sal_Bool /*bEnable*/ ) { // default-implemtation : do nothing } @@ -530,7 +530,7 @@ void SvxHyperlinkTabPageBase::SetInitFocus() |* |************************************************************************/ -BOOL SvxHyperlinkTabPageBase::IsHTMLDoc() const +sal_Bool SvxHyperlinkTabPageBase::IsHTMLDoc() const { return ((SvxHpLinkDlg*)mpDialog)->IsHTMLDoc(); } @@ -576,9 +576,9 @@ IMPL_LINK ( SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, void *, EMPTYARG ) because if no JAVA is installed an error box occurs and then it is possible to close the HyperLinkDlg before its child (MacroAssignDlg) -> GPF */ - BOOL bIsInputEnabled = GetParent()->IsInputEnabled(); + sal_Bool bIsInputEnabled = GetParent()->IsInputEnabled(); if ( bIsInputEnabled ) - GetParent()->EnableInput( FALSE ); + GetParent()->EnableInput( sal_False ); // <-- SfxMacroAssignDlg aDlg( this, mxDocumentFrame, *pItemSet ); @@ -597,7 +597,7 @@ IMPL_LINK ( SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, void *, EMPTYARG ) // --> PB 2006-01-13 #123474# if ( bIsInputEnabled ) - GetParent()->EnableInput( TRUE ); + GetParent()->EnableInput( sal_True ); // <-- // execute dlg DisableClose( sal_True ); @@ -607,7 +607,7 @@ IMPL_LINK ( SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, void *, EMPTYARG ) { const SfxItemSet* pOutSet = aDlg.GetOutputItemSet(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, FALSE, &pItem )) + if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, sal_False, &pItem )) { pHyperlinkItem->SetMacroTable( ((SvxMacroItem*)pItem)->GetMacroTable() ); } @@ -624,7 +624,7 @@ IMPL_LINK ( SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, void *, EMPTYARG ) |* |************************************************************************/ -USHORT SvxHyperlinkTabPageBase::GetMacroEvents() +sal_uInt16 SvxHyperlinkTabPageBase::GetMacroEvents() { SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *) GetItemSet().GetItem (SID_HYPERLINK_GETLINK); @@ -646,9 +646,9 @@ SvxMacroTableDtor* SvxHyperlinkTabPageBase::GetMacroTable() |* |************************************************************************/ -BOOL SvxHyperlinkTabPageBase::FileExists( const INetURLObject& rURL ) +sal_Bool SvxHyperlinkTabPageBase::FileExists( const INetURLObject& rURL ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rURL.GetFull().getLength() > 0 ) { @@ -727,7 +727,7 @@ void SvxHyperlinkTabPageBase::GetDataFromCommonFields( String& aStrName, aStrFrame = mpCbbFrame->GetText(); eMode = (SvxLinkInsertMode) (mpLbForm->GetSelectEntryPos()+1); if( IsHTMLDoc() ) - eMode = (SvxLinkInsertMode) ( UINT16(eMode) | HLINK_HTMLMODE ); + eMode = (SvxLinkInsertMode) ( sal_uInt16(eMode) | HLINK_HTMLMODE ); } /************************************************************************* @@ -764,7 +764,7 @@ void SvxHyperlinkTabPageBase::Reset( const SfxItemSet& rItemSet) |* |************************************************************************/ -BOOL SvxHyperlinkTabPageBase::FillItemSet( SfxItemSet& rOut) +sal_Bool SvxHyperlinkTabPageBase::FillItemSet( SfxItemSet& rOut) { String aStrURL, aStrName, aStrIntName, aStrFrame; SvxLinkInsertMode eMode; @@ -773,14 +773,14 @@ BOOL SvxHyperlinkTabPageBase::FillItemSet( SfxItemSet& rOut) if ( !aStrName.Len() ) //automatically create a visible name if the link is created without name aStrName = CreateUiNameFromURL(aStrURL); - USHORT nEvents = GetMacroEvents(); + sal_uInt16 nEvents = GetMacroEvents(); SvxMacroTableDtor* pTable = GetMacroTable(); SvxHyperlinkItem aItem( SID_HYPERLINK_SETLINK, aStrName, aStrURL, aStrFrame, aStrIntName, eMode, nEvents, pTable ); rOut.Put (aItem); - return TRUE; + return sal_True; } String SvxHyperlinkTabPageBase::CreateUiNameFromURL( const String& aStrURL ) @@ -847,7 +847,7 @@ int SvxHyperlinkTabPageBase::DeactivatePage( SfxItemSet* _pSet) GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode); - USHORT nEvents = GetMacroEvents(); + sal_uInt16 nEvents = GetMacroEvents(); SvxMacroTableDtor* pTable = GetMacroTable(); if( _pSet ) @@ -860,11 +860,11 @@ int SvxHyperlinkTabPageBase::DeactivatePage( SfxItemSet* _pSet) return( LEAVE_PAGE ); } -BOOL SvxHyperlinkTabPageBase::ShouldOpenMarkWnd() +sal_Bool SvxHyperlinkTabPageBase::ShouldOpenMarkWnd() { - return FALSE; + return sal_False; } -void SvxHyperlinkTabPageBase::SetMarkWndShouldOpen(BOOL) +void SvxHyperlinkTabPageBase::SetMarkWndShouldOpen(sal_Bool) { } diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index a9356704e503..67fb03eaa5f3 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -55,7 +55,7 @@ int IconcDlgCmpUS_Impl( const void* p1, const void* p2 ) #endif #endif { - return *(USHORT*)p1 - *(USHORT*)p2; + return *(sal_uInt16*)p1 - *(sal_uInt16*)p2; } // some stuff for easier changes for SvtViewOptions @@ -93,9 +93,9 @@ IconChoicePage::IconChoicePage( Window *pParent, const ResId &rResId, const SfxItemSet &rAttrSet ) : TabPage ( pParent, rResId ), pSet ( &rAttrSet ), - bHasExchangeSupport ( FALSE ), + bHasExchangeSupport ( sal_False ), pDialog ( NULL ), - bStandard ( FALSE ) + bStandard ( sal_False ) { SetStyle ( GetStyle() | WB_DIALOGCONTROL | WB_HIDE ); } @@ -135,9 +135,9 @@ void IconChoicePage::FillUserData() // ----------------------------------------------------------------------- -BOOL IconChoicePage::IsReadOnly() const +sal_Bool IconChoicePage::IsReadOnly() const { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -158,16 +158,16 @@ void IconChoicePage::ImplInitSettings() Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { - EnableChildTransparentMode( TRUE ); + EnableChildTransparentMode( sal_True ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( TRUE ); + SetPaintTransparent( sal_True ); SetBackground(); } else { - EnableChildTransparentMode( FALSE ); + EnableChildTransparentMode( sal_False ); SetParentClipMode( 0 ); - SetPaintTransparent( FALSE ); + SetPaintTransparent( sal_False ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); @@ -217,7 +217,7 @@ void IconChoicePage::DataChanged( const DataChangedEvent& rDCEvt ) IconChoiceDialog::IconChoiceDialog ( Window* pParent, const ResId &rResId, const EIconChoicePos ePos, - const SfxItemSet *pItemSet )//, BOOL bEditFmt, const String *pUserButtonText = 0 ) + const SfxItemSet *pItemSet )//, sal_Bool bEditFmt, const String *pUserButtonText = 0 ) : ModalDialog ( pParent, rResId ), meChoicePos ( ePos ), maIconCtrl ( this, WB_3DLOOK | WB_ICON | WB_BORDER | @@ -235,11 +235,11 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const ResId &rResId, pRanges ( NULL ), nResId ( rResId.GetId() ), - bHideResetBtn ( FALSE ), - bModal ( FALSE ), - bInOK ( FALSE ), - bModified ( FALSE ), - bItemsReset ( FALSE ) + bHideResetBtn ( sal_False ), + bModal ( sal_False ), + bInOK ( sal_False ), + bModified ( sal_False ), + bItemsReset ( sal_False ) { // IconChoiceCtrl-Settings //maIconCtrl.SetBackground ( Wallpaper( Color (146, 146, 186) ) ); @@ -248,7 +248,7 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const ResId &rResId, SetCtrlPos ( meChoicePos ); maIconCtrl.SetClickHdl ( LINK ( this, IconChoiceDialog , ChosePageHdl_Impl ) ); maIconCtrl.Show(); - maIconCtrl.SetChoiceWithCursor ( TRUE ); + maIconCtrl.SetChoiceWithCursor ( sal_True ); maIconCtrl.SetSelectionMode( SINGLE_SELECTION ); maIconCtrl.SetHelpId( HID_ICCDIALOG_CHOICECTRL ); @@ -271,14 +271,14 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const ResId &rResId, aHelpBtn.Show(); aResetBtn.Show(); - SetPosSizeCtrls ( TRUE ); + SetPosSizeCtrls ( sal_True ); } // ----------------------------------------------------------------------- /* IconChoiceDialog ::IconChoiceDialog ( SfxViewFrame *pViewFrame, Window* pParent, const ResId &rResId, - const SfxItemSet * = 0, BOOL bEditFmt = FALSE, + const SfxItemSet * = 0, sal_Bool bEditFmt = sal_False, const String *pUserButtonText = 0 ) : meChoicePos ( PosLeft ), // Default erst ma Links maIconCtrl ( this, Die_Winbits ), @@ -298,7 +298,7 @@ IconChoiceDialog ::IconChoiceDialog ( SfxViewFrame *pViewFrame, Window* pParent, IconChoiceDialog ::~IconChoiceDialog () { - ULONG i; + sal_uLong i; // save configuration at INI-Manager // and remove pages @@ -306,7 +306,7 @@ IconChoiceDialog ::~IconChoiceDialog () aTabDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)).GetBuffer() ) ); aTabDlgOpt.SetPageID( mnCurrentPageId ); - const ULONG nCount = maPageList.Count(); + const sal_uLong nCount = maPageList.Count(); for ( i = 0; i < nCount; ++i ) { @@ -334,7 +334,7 @@ IconChoiceDialog ::~IconChoiceDialog () for ( i=0; i<maIconCtrl.GetEntryCount(); i++) { SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.GetEntry ( i ); - USHORT* pUserData = (USHORT*) pEntry->GetUserData(); + sal_uInt16* pUserData = (sal_uInt16*) pEntry->GetUserData(); delete pUserData; } @@ -351,12 +351,12 @@ IconChoiceDialog ::~IconChoiceDialog () | \**********************************************************************/ -SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( USHORT nId, const String& rIconText, +SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( sal_uInt16 nId, const String& rIconText, const Image& rChoiceIcon, const Image& rChoiceIconHC, CreatePage pCreateFunc /* != 0 */, GetPageRanges pRangesFunc /* darf 0 sein */, - BOOL bItemsOnDemand, ULONG /*nPos*/ ) + sal_Bool bItemsOnDemand, sal_uLong /*nPos*/ ) { IconChoicePageData* pData = new IconChoicePageData ( nId, pCreateFunc, pRangesFunc, @@ -366,7 +366,7 @@ SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( USHORT nId, const String& pData->fnGetRanges = pRangesFunc; pData->bOnDemand = bItemsOnDemand; - USHORT *pId = new USHORT ( nId ); + sal_uInt16 *pId = new sal_uInt16 ( nId ); SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.InsertEntry( rIconText, rChoiceIcon, rChoiceIconHC ); pEntry->SetUserData ( (void*) pId ); return pEntry; @@ -382,7 +382,7 @@ void IconChoiceDialog::Paint( const Rectangle& rRect ) { Dialog::Paint ( rRect ); - for ( ULONG i=0; i<maPageList.Count(); i++ ) + for ( sal_uLong i=0; i<maPageList.Count(); i++ ) { IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i ); @@ -453,7 +453,7 @@ void IconChoiceDialog::HidePageImpl ( IconChoicePageData* pData ) // ----------------------------------------------------------------------- -void IconChoiceDialog::ShowPage( USHORT nId ) +void IconChoiceDialog::ShowPage( sal_uInt16 nId ) { bool bInvalidate = GetCurPageId() != nId; SetCurPageId( nId ); @@ -483,7 +483,7 @@ void IconChoiceDialog::Resize() } } -void IconChoiceDialog::SetPosSizeCtrls ( BOOL bInit ) +void IconChoiceDialog::SetPosSizeCtrls ( sal_Bool bInit ) { const Point aCtrlOffset ( LogicToPixel( Point( CTRLS_OFFSET, CTRLS_OFFSET ), MAP_APPFONT ) ); Size aOutSize ( GetOutputSizePixel() ); @@ -539,7 +539,7 @@ void IconChoiceDialog::SetPosSizeCtrls ( BOOL bInit ) //////////////////////////////////////// // Pages resizen & positionieren // - for ( ULONG i=0; i<maPageList.Count(); i++ ) + for ( sal_uLong i=0; i<maPageList.Count(); i++ ) { IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i ); @@ -584,7 +584,7 @@ void IconChoiceDialog::SetPosSizeCtrls ( BOOL bInit ) //////////////////////////////////////// // Buttons positionieren // - ULONG nXOffset=0; + sal_uLong nXOffset=0; if ( meChoicePos == PosRight ) nXOffset = aNewIconCtrlSize.Width()+(2*aCtrlOffset.X()); @@ -622,7 +622,7 @@ void IconChoiceDialog::SetPosSizeCtrls ( BOOL bInit ) Invalidate(); } -void IconChoiceDialog::SetPosSizePages ( USHORT nId ) +void IconChoiceDialog::SetPosSizePages ( sal_uInt16 nId ) { const Point aCtrlOffset ( LogicToPixel( Point( CTRLS_OFFSET, CTRLS_OFFSET ), MAP_APPFONT ) ); IconChoicePageData* pData = GetPageData ( nId ); @@ -678,13 +678,13 @@ void IconChoiceDialog::SetPosSizePages ( USHORT nId ) IMPL_LINK ( IconChoiceDialog , ChosePageHdl_Impl, void *, EMPTYARG ) { - ULONG nPos; + sal_uLong nPos; SvxIconChoiceCtrlEntry *pEntry = maIconCtrl.GetSelectedEntry ( nPos ); if ( !pEntry ) pEntry = maIconCtrl.GetCursor( ); - USHORT *pId = (USHORT*)pEntry->GetUserData (); + sal_uInt16 *pId = (sal_uInt16*)pEntry->GetUserData (); if( *pId != mnCurrentPageId ) { @@ -709,7 +709,7 @@ IMPL_LINK ( IconChoiceDialog , ChosePageHdl_Impl, void *, EMPTYARG ) IMPL_LINK( IconChoiceDialog, OkHdl, Button *, EMPTYARG ) { - bInOK = TRUE; + bInOK = sal_True; if ( OK_Impl() ) { @@ -801,7 +801,7 @@ void IconChoiceDialog::ActivatePageImpl () pData->pPage->Reset( *pSet ); } - pData->bRefresh = FALSE; + pData->bRefresh = sal_False; if ( pExampleSet ) pData->pPage->ActivatePage( *pExampleSet ); @@ -809,7 +809,7 @@ void IconChoiceDialog::ActivatePageImpl () SetHelpId( pData->pPage->GetHelpId() ); - BOOL bReadOnly = pData->pPage->IsReadOnly(); + sal_Bool bReadOnly = pData->pPage->IsReadOnly(); if ( bReadOnly || bHideResetBtn ) aResetBtn.Hide(); else @@ -819,7 +819,7 @@ void IconChoiceDialog::ActivatePageImpl () // ----------------------------------------------------------------------- -BOOL IconChoiceDialog::DeActivatePageImpl () +sal_Bool IconChoiceDialog::DeActivatePageImpl () { IconChoicePageData *pData = GetPageData ( mnCurrentPageId ); @@ -867,24 +867,24 @@ BOOL IconChoiceDialog::DeActivatePageImpl () pSet = GetRefreshedSet(); DBG_ASSERT( pSet, "GetRefreshedSet() liefert NULL" ); // alle Pages als neu zu initialsieren flaggen - const ULONG nCount = maPageList.Count(); + const sal_uLong nCount = maPageList.Count(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { IconChoicePageData* pObj = (IconChoicePageData*)maPageList.GetObject(i); if ( pObj->pPage != pPage ) // eigene Page nicht mehr refreshen - pObj->bRefresh = TRUE; + pObj->bRefresh = sal_True; else - pObj->bRefresh = FALSE; + pObj->bRefresh = sal_False; } } } if ( nRet & IconChoicePage::LEAVE_PAGE ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -911,7 +911,7 @@ void IconChoiceDialog::ResetPageImpl () | \**********************************************************************/ -const USHORT* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool ) +const sal_uInt16* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool ) { if ( pSet ) { @@ -922,19 +922,19 @@ const USHORT* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool ) if ( pRanges ) return pRanges; SvUShorts aUS( 16, 16 ); - ULONG nCount = maPageList.Count(); + sal_uLong nCount = maPageList.Count(); - USHORT i; + sal_uInt16 i; for ( i = 0; i < nCount; ++i ) { IconChoicePageData* pData = maPageList.GetObject (i); if ( pData->fnGetRanges ) { - const USHORT* pTmpRanges = (pData->fnGetRanges)(); - const USHORT* pIter = pTmpRanges; + const sal_uInt16* pTmpRanges = (pData->fnGetRanges)(); + const sal_uInt16* pIter = pTmpRanges; - USHORT nLen; + sal_uInt16 nLen; for( nLen = 0; *pIter; ++nLen, ++pIter ) ; aUS.Insert( pTmpRanges, nLen, aUS.Count() ); @@ -958,14 +958,14 @@ const USHORT* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool ) #if defined __SUNPRO_CC #pragma disable_warn #endif - qsort( (void*)aUS.GetData(), aUS.Count(), sizeof(USHORT), IconcDlgCmpUS_Impl ); + qsort( (void*)aUS.GetData(), aUS.Count(), sizeof(sal_uInt16), IconcDlgCmpUS_Impl ); #if defined __SUNPRO_CC #pragma enable_warn #endif } - pRanges = new USHORT[aUS.Count() + 1]; - memcpy(pRanges, aUS.GetData(), sizeof(USHORT) * aUS.Count()); + pRanges = new sal_uInt16[aUS.Count() + 1]; + memcpy(pRanges, aUS.GetData(), sizeof(sal_uInt16) * aUS.Count()); pRanges[aUS.Count()] = 0; return pRanges; @@ -988,14 +988,14 @@ void IconChoiceDialog::SetInputSet( const SfxItemSet* pInSet ) // ----------------------------------------------------------------------- -void IconChoiceDialog::PageCreated( USHORT /*nId*/, IconChoicePage& /*rPage*/ ) +void IconChoiceDialog::PageCreated( sal_uInt16 /*nId*/, IconChoicePage& /*rPage*/ ) { // not interested in } // ----------------------------------------------------------------------- -SfxItemSet* IconChoiceDialog::CreateInputItemSet( USHORT ) +SfxItemSet* IconChoiceDialog::CreateInputItemSet( sal_uInt16 ) { DBG_WARNINGFILE( "CreateInputItemSet nicht implementiert" ); @@ -1020,11 +1020,11 @@ short IconChoiceDialog::Execute() // ----------------------------------------------------------------------- -void IconChoiceDialog::Start( BOOL bShow ) +void IconChoiceDialog::Start( sal_Bool bShow ) { aCancelBtn.SetClickHdl( LINK( this, IconChoiceDialog, CancelHdl ) ); - bModal = FALSE; + bModal = sal_False; Start_Impl(); @@ -1038,8 +1038,8 @@ void IconChoiceDialog::Start( BOOL bShow ) sal_Bool IconChoiceDialog::QueryClose() { sal_Bool bRet = sal_True; - const ULONG nCount = maPageList.Count(); - for ( ULONG i = 0; i < nCount; ++i ) + const sal_uLong nCount = maPageList.Count(); + for ( sal_uLong i = 0; i < nCount; ++i ) { IconChoicePageData* pData = maPageList.GetObject(i); if ( pData->pPage && !pData->pPage->QueryClose() ) @@ -1056,7 +1056,7 @@ sal_Bool IconChoiceDialog::QueryClose() void IconChoiceDialog::Start_Impl() { Point aPos; - USHORT nActPage; + sal_uInt16 nActPage; if ( mnCurrentPageId == 0 || mnCurrentPageId == USHRT_MAX ) nActPage = maPageList.GetObject(0)->nId;//First()->nId; @@ -1072,7 +1072,7 @@ void IconChoiceDialog::Start_Impl() SetWindowState( ByteString( aTabDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); // initiale TabPage aus Programm/Hilfe/Konfig - nActPage = (USHORT)aTabDlgOpt.GetPageID(); + nActPage = (sal_uInt16)aTabDlgOpt.GetPageID(); if ( USHRT_MAX != mnCurrentPageId ) nActPage = mnCurrentPageId; @@ -1104,12 +1104,12 @@ const SfxItemSet* IconChoiceDialog::GetRefreshedSet() | \**********************************************************************/ -IconChoicePageData* IconChoiceDialog::GetPageData ( USHORT nId ) +IconChoicePageData* IconChoiceDialog::GetPageData ( sal_uInt16 nId ) { IconChoicePageData *pRet = NULL; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; - for ( ULONG i=0; i<maPageList.Count() && !bFound; i++ ) + for ( sal_uLong i=0; i<maPageList.Count() && !bFound; i++ ) { IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i ); @@ -1128,7 +1128,7 @@ IconChoicePageData* IconChoiceDialog::GetPageData ( USHORT nId ) | \**********************************************************************/ -BOOL IconChoiceDialog::OK_Impl() +sal_Bool IconChoiceDialog::OK_Impl() { IconChoicePage* pPage = GetPageData ( mnCurrentPageId )->pPage; @@ -1139,7 +1139,7 @@ BOOL IconChoiceDialog::OK_Impl() if ( pSet ) { SfxItemSet aTmp( *pSet->GetPool(), pSet->GetRanges() ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( pPage->HasExchangeSupport() ) nRet = pPage->DeactivatePage( &aTmp ); @@ -1151,7 +1151,7 @@ BOOL IconChoiceDialog::OK_Impl() pOutSet->Put( aTmp ); } else if ( bRet ) - bModified |= TRUE; + bModified |= sal_True; } else nRet = pPage->DeactivatePage( NULL ); @@ -1165,20 +1165,20 @@ BOOL IconChoiceDialog::OK_Impl() short IconChoiceDialog::Ok() { - bInOK = TRUE; + bInOK = sal_True; if ( !pOutSet ) { if ( !pExampleSet && pSet ) - pOutSet = pSet->Clone( FALSE ); // ohne Items + pOutSet = pSet->Clone( sal_False ); // ohne Items else if ( pExampleSet ) pOutSet = new SfxItemSet( *pExampleSet ); } - BOOL _bModified = FALSE; + sal_Bool _bModified = sal_False; - const ULONG nCount = maPageList.Count(); + const sal_uLong nCount = maPageList.Count(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { IconChoicePageData* pData = GetPageData ( i ); @@ -1198,7 +1198,7 @@ short IconChoiceDialog::Ok() if ( pPage->FillItemSet( aTmp ) ) { - _bModified |= TRUE; + _bModified |= sal_True; pExampleSet->Put( aTmp ); pOutSet->Put( aTmp ); } @@ -1207,20 +1207,20 @@ short IconChoiceDialog::Ok() } if ( _bModified || ( pOutSet && pOutSet->Count() > 0 ) ) - _bModified |= TRUE; + _bModified |= sal_True; return _bModified ? RET_OK : RET_CANCEL; } // ----------------------------------------------------------------------- -void IconChoiceDialog::FocusOnIcon( USHORT nId ) +void IconChoiceDialog::FocusOnIcon( sal_uInt16 nId ) { // set focus to icon for the current visible page - for ( USHORT i=0; i<maIconCtrl.GetEntryCount(); i++) + for ( sal_uInt16 i=0; i<maIconCtrl.GetEntryCount(); i++) { SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.GetEntry ( i ); - USHORT* pUserData = (USHORT*) pEntry->GetUserData(); + sal_uInt16* pUserData = (sal_uInt16*) pEntry->GetUserData(); if ( pUserData && *pUserData == nId ) { diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 8cf21129f52c..0173eb22d75d 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -96,9 +96,9 @@ static String impl_getSvtResString( sal_uInt32 nId ) return aRet; } -BOOL InsertObjectDialog_Impl::IsCreateNew() const +sal_Bool InsertObjectDialog_Impl::IsCreateNew() const { - return FALSE; + return sal_False; } uno::Reference< io::XInputStream > InsertObjectDialog_Impl::GetIconIfIconified( ::rtl::OUString* /*pGraphicMediaType*/ ) @@ -224,7 +224,7 @@ SvInsertOleDlg::SvInsertOleDlg Link aLink( LINK( this, SvInsertOleDlg, RadioHdl ) ); aRbNewObject.SetClickHdl( aLink ); aRbObjectFromfile.SetClickHdl( aLink ); - aRbNewObject.Check( TRUE ); + aRbNewObject.Check( sal_True ); RadioHdl( NULL ); } @@ -241,10 +241,10 @@ short SvInsertOleDlg::Execute() // fill listbox and select default ListBox& rBox = GetObjectTypes(); - rBox.SetUpdateMode( FALSE ); - for ( ULONG i = 0; i < m_pServers->Count(); i++ ) + rBox.SetUpdateMode( sal_False ); + for ( sal_uLong i = 0; i < m_pServers->Count(); i++ ) rBox.InsertEntry( (*m_pServers)[i].GetHumanName() ); - rBox.SetUpdateMode( TRUE ); + rBox.SetUpdateMode( sal_True ); SelectDefault(); ::rtl::OUString aName; @@ -252,8 +252,8 @@ short SvInsertOleDlg::Execute() if ( m_xStorage.is() && ( nRet = Dialog::Execute() ) == RET_OK ) { String aFileName; - BOOL bLink = FALSE; - BOOL bCreateNew = IsCreateNew(); + sal_Bool bLink = sal_False; + sal_Bool bCreateNew = IsCreateNew(); if ( bCreateNew ) { // create and insert new embedded object @@ -472,7 +472,7 @@ SvInsertPlugInDialog::~SvInsertPlugInDialog() static void Plugin_ImplFillCommandSequence( const String& aCommands, uno::Sequence< beans::PropertyValue >& aCommandSequence ) { - USHORT nEaten; + sal_uInt16 nEaten; SvCommandList aLst; aLst.AppendCommands( aCommands, &nEaten ); @@ -642,7 +642,7 @@ short SvInsertAppletDialog::Execute() m_aClass.Erase(); m_aCommands.Erase(); - BOOL bOK = FALSE; + sal_Bool bOK = sal_False; uno::Reference < beans::XPropertySet > xSet; if ( m_xObj.is() ) { @@ -669,7 +669,7 @@ short SvInsertAppletDialog::Execute() String aText( CUI_RES( STR_EDIT_APPLET ) ); SetText( aText ); - bOK = TRUE; + bOK = sal_True; } catch ( uno::Exception& ) { @@ -698,7 +698,7 @@ short SvInsertAppletDialog::Execute() { try { - BOOL bIPActive = m_xObj->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE; + sal_Bool bIPActive = m_xObj->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE; if ( bIPActive ) m_xObj->changeState( embed::EmbedStates::RUNNING ); @@ -825,7 +825,7 @@ SfxInsertFloatingFrameDialog::SfxInsertFloatingFrameDialog( Window *pParent, con short SfxInsertFloatingFrameDialog::Execute() { short nRet = RET_OK; - BOOL bOK = FALSE; + sal_Bool bOK = sal_False; uno::Reference < beans::XPropertySet > xSet; if ( m_xObj.is() ) { @@ -848,10 +848,10 @@ short SfxInsertFloatingFrameDialog::Execute() if ( nSize == SIZE_NOT_SET ) { - aCBMarginWidthDefault.Check( TRUE ); + aCBMarginWidthDefault.Check( sal_True ); aNMMarginWidth.SetText( String::CreateFromInt32( DEFAULT_MARGIN_WIDTH ) ); - aFTMarginWidth.Enable( FALSE ); - aNMMarginWidth.Enable( FALSE ); + aFTMarginWidth.Enable( sal_False ); + aNMMarginWidth.Enable( sal_False ); } else aNMMarginWidth.SetText( String::CreateFromInt32( nSize ) ); @@ -861,17 +861,17 @@ short SfxInsertFloatingFrameDialog::Execute() if ( nSize == SIZE_NOT_SET ) { - aCBMarginHeightDefault.Check( TRUE ); + aCBMarginHeightDefault.Check( sal_True ); aNMMarginHeight.SetText( String::CreateFromInt32( DEFAULT_MARGIN_HEIGHT ) ); - aFTMarginHeight.Enable( FALSE ); - aNMMarginHeight.Enable( FALSE ); + aFTMarginHeight.Enable( sal_False ); + aNMMarginHeight.Enable( sal_False ); } else aNMMarginHeight.SetText( String::CreateFromInt32( nSize ) ); - BOOL bScrollOn = FALSE; - BOOL bScrollOff = FALSE; - BOOL bScrollAuto = FALSE; + sal_Bool bScrollOn = sal_False; + sal_Bool bScrollOff = sal_False; + sal_Bool bScrollAuto = sal_False; sal_Bool bSet = sal_False; aAny = xSet->getPropertyValue( ::rtl::OUString::createFromAscii("FrameIsAutoScroll") ); @@ -884,7 +884,7 @@ short SfxInsertFloatingFrameDialog::Execute() bScrollOff = !bSet; } else - bScrollAuto = TRUE; + bScrollAuto = sal_True; aRBScrollingOn.Check( bScrollOn ); aRBScrollingOff.Check( bScrollOff ); @@ -901,8 +901,8 @@ short SfxInsertFloatingFrameDialog::Execute() aRBFrameBorderOff.Check( !bSet ); } - SetUpdateMode( TRUE ); - bOK = TRUE; + SetUpdateMode( sal_True ); + bOK = sal_True; } catch ( uno::Exception& ) { @@ -942,7 +942,7 @@ short SfxInsertFloatingFrameDialog::Execute() { try { - BOOL bIPActive = m_xObj->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE; + sal_Bool bIPActive = m_xObj->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE; if ( bIPActive ) m_xObj->changeState( embed::EmbedStates::RUNNING ); diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 0193cefa2964..202e50134c9a 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -74,7 +74,7 @@ static long nTabs[] = }; -SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, BOOL bHtml ) +SvBaseLinksDlg::SvBaseLinksDlg( Window * pParent, LinkManager* pMgr, sal_Bool bHtml ) : ModalDialog( pParent, CUI_RES( MD_UPDATE_BASELINKS ) ), aFtFiles( this, CUI_RES( FT_FILES ) ), aFtLinks( this, CUI_RES( FT_LINKS ) ), @@ -148,8 +148,8 @@ SvBaseLinksDlg::~SvBaseLinksDlg() *************************************************************************/ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) { - USHORT nSelectionCount = pSvTabListBox ? - (USHORT)pSvTabListBox->GetSelectionCount() : 0; + sal_uInt16 nSelectionCount = pSvTabListBox ? + (sal_uInt16)pSvTabListBox->GetSelectionCount() : 0; if(nSelectionCount > 1) { //bei Mehrfachselektion ggf. alte Eintraege deselektieren @@ -157,16 +157,16 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) SvBaseLink* pLink = 0; pEntry = pSvTabListBox->GetHdlEntry(); pLink = (SvBaseLink*)pEntry->GetUserData(); - USHORT nObjectType = pLink->GetObjType(); + sal_uInt16 nObjectType = pLink->GetObjType(); if((OBJECT_CLIENT_FILE & nObjectType) != OBJECT_CLIENT_FILE) { - pSvTabListBox->SelectAll(FALSE); + pSvTabListBox->SelectAll(sal_False); pSvTabListBox->Select(pEntry); nSelectionCount = 1; } else { - for( USHORT i = 0; i < nSelectionCount; i++) + for( sal_uInt16 i = 0; i < nSelectionCount; i++) { pEntry = i == 0 ? pSvTabListBox->FirstSelected() : pSvTabListBox->NextSelected(pEntry); @@ -174,7 +174,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) pLink = (SvBaseLink*)pEntry->GetUserData(); DBG_ASSERT(pLink, "Wo ist der Link?"); if( (OBJECT_CLIENT_FILE & pLink->GetObjType()) != OBJECT_CLIENT_FILE ) - pSvTabListBox->Select( pEntry, FALSE ); + pSvTabListBox->Select( pEntry, sal_False ); } } @@ -187,7 +187,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) } else { - USHORT nPos; + sal_uInt16 nPos; SvBaseLink* pLink = GetSelEntry( &nPos ); if( !pLink ) return 0; @@ -239,7 +239,7 @@ IMPL_LINK_INLINE_START( SvBaseLinksDlg, AutomaticClickHdl, RadioButton *, pRadio { (void)pRadioButton; - USHORT nPos; + sal_uInt16 nPos; SvBaseLink* pLink = GetSelEntry( &nPos ); if( pLink && !( FILEOBJECT & pLink->GetObjType() ) && LINKUPDATE_ALWAYS != pLink->GetUpdateMode() ) @@ -252,7 +252,7 @@ IMPL_LINK_INLINE_START( SvBaseLinksDlg, ManualClickHdl, RadioButton *, pRadioBut { (void)pRadioButton; - USHORT nPos; + sal_uInt16 nPos; SvBaseLink* pLink = GetSelEntry( &nPos ); if( pLink && !( FILEOBJECT & pLink->GetObjType() ) && LINKUPDATE_ONCALL != pLink->GetUpdateMode()) @@ -264,17 +264,17 @@ IMPL_LINK_INLINE_END( SvBaseLinksDlg, ManualClickHdl, RadioButton *, pRadioButto IMPL_LINK( SvBaseLinksDlg, UpdateNowClickHdl, PushButton *, EMPTYARG ) { SvTabListBox& rListBox = Links(); - USHORT nSelCnt = (USHORT)rListBox.GetSelectionCount(); + sal_uInt16 nSelCnt = (sal_uInt16)rListBox.GetSelectionCount(); if( 255 < nSelCnt ) nSelCnt = 255; std::vector< SvBaseLink* > aLnkArr; - std::vector< USHORT > aPosArr; + std::vector< sal_uInt16 > aPosArr; SvLBoxEntry* pE = rListBox.FirstSelected(); while( pE ) { - USHORT nFndPos = (USHORT)rListBox.GetModel()->GetAbsPos( pE ); + sal_uInt16 nFndPos = (sal_uInt16)rListBox.GetModel()->GetAbsPos( pE ); if( LISTBOX_ENTRY_NOTFOUND != nFndPos ) { aLnkArr.push_back( static_cast< SvBaseLink* >( pE->GetUserData() ) ); @@ -285,17 +285,17 @@ IMPL_LINK( SvBaseLinksDlg, UpdateNowClickHdl, PushButton *, EMPTYARG ) if( !aLnkArr.empty() ) { - for( USHORT n = 0; n < aLnkArr.size(); ++n ) + for( sal_uInt16 n = 0; n < aLnkArr.size(); ++n ) { SvBaseLinkRef xLink = aLnkArr[ n ]; // suche erstmal im Array nach dem Eintrag - for( USHORT i = 0; i < pLinkMgr->GetLinks().Count(); ++i ) + for( sal_uInt16 i = 0; i < pLinkMgr->GetLinks().Count(); ++i ) if( &xLink == *pLinkMgr->GetLinks()[ i ] ) { - xLink->SetUseCache( FALSE ); + xLink->SetUseCache( sal_False ); SetType( *xLink, aPosArr[ n ], xLink->GetUpdateMode() ); - xLink->SetUseCache( TRUE ); + xLink->SetUseCache( sal_True ); break; } } @@ -326,7 +326,7 @@ IMPL_LINK( SvBaseLinksDlg, UpdateNowClickHdl, PushButton *, EMPTYARG ) { SvLBoxEntry* pSelEntry = rListBox.FirstSelected(); if( pE != pSelEntry ) - rListBox.Select( pSelEntry, FALSE ); + rListBox.Select( pSelEntry, sal_False ); rListBox.Select( pE ); rListBox.MakeVisible( pE ); } @@ -347,7 +347,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) { (void)pPushButton; - USHORT nSelectionCount = (USHORT)Links().GetSelectionCount(); + sal_uInt16 nSelectionCount = (sal_uInt16)Links().GetSelectionCount(); if(nSelectionCount > 1) { PathDialog aPathDlg( this ); @@ -368,7 +368,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) { String aPath = aPathDlg.GetPath(); - for( USHORT i = 0; i < nSelectionCount; i++) + for( sal_uInt16 i = 0; i < nSelectionCount; i++) { pEntry = i==0 ? Links().FirstSelected() : @@ -395,7 +395,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton ) } else { - USHORT nPos; + sal_uInt16 nPos; SvBaseLink* pLink = GetSelEntry( &nPos ); if ( pLink && (pLink->GetLinkSourceName().Len() != 0) ) pLink->Edit( this, LINK( this, SvBaseLinksDlg, EndEditHdl ) ); @@ -407,10 +407,10 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) { (void)pPushButton; - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if(Links().GetSelectionCount() <= 1) { - USHORT nPos; + sal_uInt16 nPos; SvBaseLinkRef xLink = GetSelEntry( &nPos ); if( !xLink.Is() ) return 0; @@ -422,7 +422,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) Links().GetModel()->Remove( Links().GetEntry( nPos ) ); // falls Object noch vorhanden, dann das schliessen - BOOL bNewLnkMgr = OBJECT_CLIENT_FILE == xLink->GetObjType(); + sal_Bool bNewLnkMgr = OBJECT_CLIENT_FILE == xLink->GetObjType(); // dem Link sagen, das er aufgeloest wird! xLink->Closed(); @@ -441,7 +441,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) if( pEntry ) Links().SetCurEntry( pEntry ); } - bModified = TRUE; + bModified = sal_True; } } else @@ -461,7 +461,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) pEntry = Links().NextSelected(pEntry); } Links().RemoveSelection(); - for( ULONG i = 0; i < aLinkList.Count(); i++ ) + for( sal_uLong i = 0; i < aLinkList.Count(); i++ ) { SvBaseLinkRef xLink = aLinkList.GetObject( i ); // dem Link sagen, das er aufgeloest wird! @@ -469,7 +469,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) // falls einer vergessen hat sich auszutragen pLinkMgr->Remove( &xLink ); - bModified = TRUE; + bModified = sal_True; } //Danach alle selektierten Eintraege entfernen } @@ -502,8 +502,8 @@ IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer ) // for( SvLBoxEntry* pBox = Links().First(); pBox; // pBox = Links().Next( pBox )) - Links().SetUpdateMode(FALSE); - for( ULONG nPos = Links().GetEntryCount(); nPos; ) + Links().SetUpdateMode(sal_False); + for( sal_uLong nPos = Links().GetEntryCount(); nPos; ) { SvLBoxEntry* pBox = Links().GetEntry( --nPos ); SvBaseLinkRef xLink( (SvBaseLink*)pBox->GetUserData() ); @@ -515,13 +515,13 @@ IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer ) Links().SetEntryText( sCur, pBox, 3 ); } } - Links().SetUpdateMode(TRUE); + Links().SetUpdateMode(sal_True); return 0; } IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) { - USHORT nPos; + sal_uInt16 nPos; GetSelEntry( &nPos ); if( _pLink && _pLink->WasLastEditOK() ) @@ -531,23 +531,23 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) // also suche den Link im Manager, wenn der nicht mehr existiert, // dann setze fuelle die Liste komplett neu. Ansonsten braucht // nur der editierte Linkt aktualisiert werden. - BOOL bLinkFnd = FALSE; - for( USHORT n = pLinkMgr->GetLinks().Count(); n; ) + sal_Bool bLinkFnd = sal_False; + for( sal_uInt16 n = pLinkMgr->GetLinks().Count(); n; ) if( _pLink == &(*pLinkMgr->GetLinks()[ --n ]) ) { - bLinkFnd = TRUE; + bLinkFnd = sal_True; break; } if( bLinkFnd ) { - Links().SetUpdateMode(FALSE); + Links().SetUpdateMode(sal_False); Links().GetModel()->Remove( Links().GetEntry( nPos ) ); SvLBoxEntry* pToUnselect = Links().FirstSelected(); InsertEntry( *_pLink, nPos, sal_True ); if(pToUnselect) - Links().Select(pToUnselect, FALSE); - Links().SetUpdateMode(TRUE); + Links().Select(pToUnselect, sal_False); + Links().SetUpdateMode(sal_True); } else { @@ -586,7 +586,7 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr ) if( pNewMgr ) // Update muss vor Clear gestoppt werden - Links().SetUpdateMode( FALSE ); + Links().SetUpdateMode( sal_False ); Links().Clear(); pLinkMgr = pNewMgr; @@ -594,7 +594,7 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr ) if( pLinkMgr ) { SvBaseLinks& rLnks = (SvBaseLinks&)pLinkMgr->GetLinks(); - for( USHORT n = 0; n < rLnks.Count(); ++n ) + for( sal_uInt16 n = 0; n < rLnks.Count(); ++n ) { SvBaseLinkRef* pLinkRef = rLnks[ n ]; if( !pLinkRef->Is() ) @@ -614,13 +614,13 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr ) Links().Select( pEntry ); LinksSelectHdl( 0 ); } - Links().SetUpdateMode( TRUE ); + Links().SetUpdateMode( sal_True ); Links().Invalidate(); } } -void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, USHORT nPos, sal_Bool bSelect ) +void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uInt16 nPos, sal_Bool bSelect ) { String aEntry, sFileNm, sLinkNm, sTypeNm, sFilter; @@ -658,12 +658,12 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, USHORT nPos, sal_Bool Links().Select(pE); } -SvBaseLink* SvBaseLinksDlg::GetSelEntry( USHORT* pPos ) +SvBaseLink* SvBaseLinksDlg::GetSelEntry( sal_uInt16* pPos ) { SvLBoxEntry* pE = Links().FirstSelected(); - USHORT nPos; + sal_uInt16 nPos; if( pE && LISTBOX_ENTRY_NOTFOUND != - ( nPos = (USHORT)Links().GetModel()->GetAbsPos( pE ) ) ) + ( nPos = (sal_uInt16)Links().GetModel()->GetAbsPos( pE ) ) ) { DBG_ASSERT( pE, "wo kommt der leere Eintrag her?" ); @@ -675,8 +675,8 @@ SvBaseLink* SvBaseLinksDlg::GetSelEntry( USHORT* pPos ) } void SvBaseLinksDlg::SetType( SvBaseLink& rLink, - USHORT nSelPos, - USHORT nType ) + sal_uInt16 nSelPos, + sal_uInt16 nType ) { rLink.SetUpdateMode( nType ); rLink.Update(); @@ -691,8 +691,8 @@ void SvBaseLinksDlg::SetActLink( SvBaseLink * pLink ) if( pLinkMgr ) { const SvBaseLinks& rLnks = pLinkMgr->GetLinks(); - USHORT nSelect = 0; - for( USHORT n = 0; n < rLnks.Count(); ++n ) + sal_uInt16 nSelect = 0; + for( sal_uInt16 n = 0; n < rLnks.Count(); ++n ) { SvBaseLinkRef* pLinkRef = rLnks[ n ]; // #109573# only visible links have been inserted into the TreeListBox, diff --git a/cui/source/dialogs/makefile.mk b/cui/source/dialogs/makefile.mk index 12239a1ac781..67bc5962cc10 100755..100644 --- a/cui/source/dialogs/makefile.mk +++ b/cui/source/dialogs/makefile.mk @@ -42,6 +42,7 @@ CFLAGS+= -DENABLE_LAYOUT=1 -I../$(PRJ)/layout/inc -I../$(PRJ)/layout/$(INPATH)/i SRS1NAME=dialogs SRC1FILES = \ + about.src \ charmap.src \ commonlingui.src \ cuiimapdlg.src \ @@ -72,6 +73,7 @@ SRC1FILES = \ SLOFILES+=\ + $(SLO)$/about.obj \ $(SLO)$/commonlingui.obj \ $(SLO)$/cuicharmap.obj \ $(SLO)$/cuifmsearch.obj \ diff --git a/cui/source/dialogs/multifil.cxx b/cui/source/dialogs/multifil.cxx index 40d62c0311bb..01a4857017da 100644 --- a/cui/source/dialogs/multifil.cxx +++ b/cui/source/dialogs/multifil.cxx @@ -76,13 +76,13 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) OSL_ENSURE( xID.is(), "AddHdl_Impl: invalid ID interface!" ); // ensure the content of files are valid - USHORT nCount = aPathLB.GetEntryCount(); - BOOL bDuplicated = FALSE; + sal_uInt16 nCount = aPathLB.GetEntryCount(); + sal_Bool bDuplicated = sal_False; try { if( nCount > 0 ) // start comparison { - USHORT i; + sal_uInt16 i; ::ucbhelper::Content & VContent = aContent; // temporary Content reference Reference< XContent > xVContent; Reference< XContentIdentifier > xVID; @@ -113,7 +113,7 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) { if ( 0 == xProvider->compareContentIds( xID, xVID ) ) { - bDuplicated = TRUE; + bDuplicated = sal_True; break; } } @@ -134,7 +134,7 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) } else { - USHORT nPos = aPathLB.InsertEntry( sInsFile, LISTBOX_APPEND ); + sal_uInt16 nPos = aPathLB.InsertEntry( sInsFile, LISTBOX_APPEND ); aPathLB.SetEntryData( nPos, (void*) new String( sInsFile ) ); } @@ -146,9 +146,9 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) IMPL_LINK( SvxMultiFileDialog, DelHdl_Impl, PushButton *, EMPTYARG ) { - USHORT nPos = aPathLB.GetSelectEntryPos(); + sal_uInt16 nPos = aPathLB.GetSelectEntryPos(); aPathLB.RemoveEntry( nPos ); - USHORT nCnt = aPathLB.GetEntryCount(); + sal_uInt16 nCnt = aPathLB.GetEntryCount(); if ( nCnt ) { @@ -163,7 +163,7 @@ IMPL_LINK( SvxMultiFileDialog, DelHdl_Impl, PushButton *, EMPTYARG ) // ----------------------------------------------------------------------- -SvxMultiFileDialog::SvxMultiFileDialog( Window* pParent, BOOL bEmptyAllowed ) : +SvxMultiFileDialog::SvxMultiFileDialog( Window* pParent, sal_Bool bEmptyAllowed ) : SvxMultiPathDialog( pParent, bEmptyAllowed ) diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 1d3af44facf6..c378cc40e1ad 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -55,23 +55,23 @@ using namespace ::com::sun::star::uno; struct MultiPath_Impl { - BOOL bEmptyAllowed; - BOOL bIsClassPathMode; + sal_Bool bEmptyAllowed; + sal_Bool bIsClassPathMode; bool bIsRadioButtonMode; - MultiPath_Impl( BOOL bAllowed ) : - bEmptyAllowed( bAllowed ), bIsClassPathMode( FALSE ), bIsRadioButtonMode( false ) {} + MultiPath_Impl( sal_Bool bAllowed ) : + bEmptyAllowed( bAllowed ), bIsClassPathMode( sal_False ), bIsRadioButtonMode( false ) {} }; // class SvxMultiPathDialog ---------------------------------------------- IMPL_LINK( SvxMultiPathDialog, SelectHdl_Impl, void *, EMPTYARG ) { - ULONG nCount = pImpl->bIsRadioButtonMode ? aRadioLB.GetEntryCount() : aPathLB.GetEntryCount(); + sal_uLong nCount = pImpl->bIsRadioButtonMode ? aRadioLB.GetEntryCount() : aPathLB.GetEntryCount(); bool bIsSelected = pImpl->bIsRadioButtonMode ? aRadioLB.FirstSelected() != NULL : aPathLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND; - BOOL bEnable = ( pImpl->bEmptyAllowed || nCount > 1 ); + sal_Bool bEnable = ( pImpl->bEmptyAllowed || nCount > 1 ); aDelBtn.Enable( bEnable && bIsSelected ); return 0; } @@ -105,7 +105,7 @@ IMPL_LINK( SvxMultiPathDialog, AddHdl_Impl, PushButton *, EMPTYARG ) if ( pImpl->bIsRadioButtonMode ) { - ULONG nPos = aRadioLB.GetEntryPos( sInsPath, 1 ); + sal_uLong nPos = aRadioLB.GetEntryPos( sInsPath, 1 ); if ( 0xffffffff == nPos ) //See svtools/source/contnr/svtabbx.cxx SvTabListBox::GetEntryPos { String sNewEntry( '\t' ); @@ -131,7 +131,7 @@ IMPL_LINK( SvxMultiPathDialog, AddHdl_Impl, PushButton *, EMPTYARG ) } else { - USHORT nPos = aPathLB.InsertEntry( sInsPath, LISTBOX_APPEND ); + sal_uInt16 nPos = aPathLB.InsertEntry( sInsPath, LISTBOX_APPEND ); aPathLB.SetEntryData( nPos, (void*)new String( aURL ) ); } } @@ -149,9 +149,9 @@ IMPL_LINK( SvxMultiPathDialog, DelHdl_Impl, PushButton *, EMPTYARG ) SvLBoxEntry* pEntry = aRadioLB.FirstSelected(); delete (String*)pEntry->GetUserData(); bool bChecked = aRadioLB.GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED; - ULONG nPos = aRadioLB.GetEntryPos( pEntry ); + sal_uLong nPos = aRadioLB.GetEntryPos( pEntry ); aRadioLB.RemoveEntry( pEntry ); - ULONG nCnt = aRadioLB.GetEntryCount(); + sal_uLong nCnt = aRadioLB.GetEntryCount(); if ( nCnt ) { nCnt--; @@ -169,9 +169,9 @@ IMPL_LINK( SvxMultiPathDialog, DelHdl_Impl, PushButton *, EMPTYARG ) } else { - USHORT nPos = aPathLB.GetSelectEntryPos(); + sal_uInt16 nPos = aPathLB.GetSelectEntryPos(); aPathLB.RemoveEntry( nPos ); - USHORT nCnt = aPathLB.GetEntryCount(); + sal_uInt16 nCnt = aPathLB.GetEntryCount(); if ( nCnt ) { @@ -188,7 +188,7 @@ IMPL_LINK( SvxMultiPathDialog, DelHdl_Impl, PushButton *, EMPTYARG ) // ----------------------------------------------------------------------- -SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, BOOL bEmptyAllowed ) : +SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed ) : ModalDialog( pParent, CUI_RES( RID_SVXDLG_MULTIPATH ) ), @@ -226,10 +226,10 @@ SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, BOOL bEmptyAllowed ) : SvxMultiPathDialog::~SvxMultiPathDialog() { - USHORT nPos = aPathLB.GetEntryCount(); + sal_uInt16 nPos = aPathLB.GetEntryCount(); while ( nPos-- ) delete (String*)aPathLB.GetEntryData(nPos); - nPos = (USHORT)aRadioLB.GetEntryCount(); + nPos = (sal_uInt16)aRadioLB.GetEntryCount(); while ( nPos-- ) { SvLBoxEntry* pEntry = aRadioLB.GetEntry( nPos ); @@ -248,7 +248,7 @@ String SvxMultiPathDialog::GetPath() const if ( pImpl->bIsRadioButtonMode ) { String sWritable; - for ( USHORT i = 0; i < aRadioLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aRadioLB.GetEntryCount(); ++i ) { SvLBoxEntry* pEntry = aRadioLB.GetEntry(i); if ( aRadioLB.GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) @@ -266,7 +266,7 @@ String SvxMultiPathDialog::GetPath() const } else { - for ( USHORT i = 0; i < aPathLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aPathLB.GetEntryCount(); ++i ) { if ( sNewPath.Len() > 0 ) sNewPath += cDelim; @@ -281,9 +281,9 @@ String SvxMultiPathDialog::GetPath() const void SvxMultiPathDialog::SetPath( const String& rPath ) { sal_Unicode cDelim = pImpl->bIsClassPathMode ? CLASSPATH_DELIMITER : SVT_SEARCHPATH_DELIMITER; - USHORT nPos, nCount = rPath.GetTokenCount( cDelim ); + sal_uInt16 nPos, nCount = rPath.GetTokenCount( cDelim ); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { String sPath = rPath.GetToken( i, cDelim ); String sSystemPath; @@ -325,7 +325,7 @@ void SvxMultiPathDialog::SetPath( const String& rPath ) void SvxMultiPathDialog::SetClassPathMode() { - pImpl->bIsClassPathMode = TRUE; + pImpl->bIsClassPathMode = sal_True; SetText( CUI_RES( RID_SVXSTR_ARCHIVE_TITLE )); aPathFL.SetText( CUI_RES( RID_SVXSTR_ARCHIVE_HEADLINE ) ); } diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index 5b768c756654..c81897011d36 100755..100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -194,7 +194,7 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( m_aOk.SetClickHdl( LINK( this, PasswordToOpenModifyDialog_Impl, OkBtnClickHdl ) ); -// m_aOk.Enable( FALSE ); +// m_aOk.Enable( sal_False ); if (nMaxPasswdLen) { @@ -212,7 +212,7 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( m_aMoreFewerOptionsBTN.Enable( bIsPasswordToModify ); if (!bIsPasswordToModify) - m_aMoreFewerOptionsBTN.Hide( TRUE ); + m_aMoreFewerOptionsBTN.Hide( sal_True ); } diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 2fe952b9197a..be2a7b4cfdbb 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -106,8 +106,8 @@ IMPL_LINK_INLINE_END( SvPasteObjectDialog, DoubleClickHdl, ListBox *, pListBox ) void SvPasteObjectDialog::SetDefault() { - bLink = FALSE; - nAspect = (USHORT)::com::sun::star::embed::Aspects::MSOLE_CONTENT; + bLink = sal_False; + nAspect = (sal_uInt16)::com::sun::star::embed::Aspects::MSOLE_CONTENT; } SvPasteObjectDialog::~SvPasteObjectDialog() @@ -134,7 +134,7 @@ void SvPasteObjectDialog::Insert( SotFormatStringId nFormat, const String& rForm delete pStr; } -ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, +sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, const DataFlavorExVector* pFormats, const TransferableObjectDescriptor* ) { @@ -148,10 +148,10 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, //Dialogbox erzeugen und fuellen String aSourceName, aTypeName; - ULONG nSelFormat = 0; + sal_uLong nSelFormat = 0; SvGlobalName aEmptyNm; - ObjectLB().SetUpdateMode( FALSE ); + ObjectLB().SetUpdateMode( sal_False ); DataFlavorExVector::iterator aIter( ((DataFlavorExVector&)*pFormats).begin() ), aEnd( ((DataFlavorExVector&)*pFormats).end() ); @@ -168,7 +168,7 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, if( !pName && ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE_OLE || nFormat == SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ) ) { - BOOL IsClipboardObject_Impl( SotDataObject * ); + sal_Bool IsClipboardObject_Impl( SotDataObject * ); if( IsClipboardObject_Impl( pDataObj ) ) { IDataObject * pDO = NULL; @@ -188,7 +188,7 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, LPOBJECTDESCRIPTOR pOD=(LPOBJECTDESCRIPTOR)GlobalLock(stm.hGlobal); if( pOD->dwFullUserTypeName ) { - OLECHAR * pN = (OLECHAR *)(((BYTE *)pOD) + pOD->dwFullUserTypeName); + OLECHAR * pN = (OLECHAR *)(((sal_uInt8 *)pOD) + pOD->dwFullUserTypeName); aName.Append( pN ); pName = &aName; // set format to ole object @@ -196,7 +196,7 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, } if( pOD->dwSrcOfCopy ) { - OLECHAR * pN = (OLECHAR *)(((BYTE *)pOD) + pOD->dwSrcOfCopy); + OLECHAR * pN = (OLECHAR *)(((sal_uInt8 *)pOD) + pOD->dwSrcOfCopy); aSourceName.Append( *pN++ ); } else @@ -270,7 +270,7 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, } } - ObjectLB().SetUpdateMode( TRUE ); + ObjectLB().SetUpdateMode( sal_True ); SelectObject(); if( aSourceName.Len() ) @@ -291,9 +291,9 @@ ULONG SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, bLink = PasteLink().IsChecked(); if( AsIconBox().IsChecked() ) - nAspect = (USHORT)com::sun::star::embed::Aspects::MSOLE_ICON; + nAspect = (sal_uInt16)com::sun::star::embed::Aspects::MSOLE_ICON; - nSelFormat = (ULONG)ObjectLB().GetEntryData( ObjectLB().GetSelectEntryPos() ); + nSelFormat = (sal_uLong)ObjectLB().GetEntryData( ObjectLB().GetSelectEntryPos() ); } return nSelFormat; diff --git a/cui/source/dialogs/plfilter.cxx b/cui/source/dialogs/plfilter.cxx index 4a90c54a277f..a0b1f2ef3126 100644 --- a/cui/source/dialogs/plfilter.cxx +++ b/cui/source/dialogs/plfilter.cxx @@ -71,14 +71,14 @@ void fillNetscapePluginFilters( Sequence< rtl::OUString >& rPluginNames, Sequenc Sequence<PluginDescription > aDescriptions( xPMgr->getPluginDescriptions() ); const PluginDescription * pDescriptions = aDescriptions.getConstArray(); - for ( UINT32 nPos = aDescriptions.getLength(); nPos--; ) + for ( sal_uInt32 nPos = aDescriptions.getLength(); nPos--; ) { const PluginDescription & rDescr = pDescriptions[nPos]; StrSet& rTypes = aMap[ rDescr.Description ]; String aExtension( rDescr.Extension ); - for ( USHORT nCnt = aExtension.GetTokenCount( ';' ); nCnt--; ) + for ( sal_uInt16 nCnt = aExtension.GetTokenCount( ';' ); nCnt--; ) { // no default plugins anymore String aExt( aExtension.GetToken( nCnt, ';' ) ); @@ -121,6 +121,6 @@ void fillNetscapePluginFilters( Sequence< rtl::OUString >& rPluginNames, Sequenc } else ShowServiceNotAvailableError( NULL, - String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.plugin.PluginManager" ) ), TRUE ); + String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.plugin.PluginManager" ) ), sal_True ); } diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index 8ff20084f591..b446be7118fc 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -54,7 +54,7 @@ // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_TEXT, @@ -65,8 +65,8 @@ static USHORT pRanges[] = SvxPostItDialog::SvxPostItDialog( Window* pParent, const SfxItemSet& rCoreSet, - BOOL bPrevNext, - BOOL bRedline ) : + sal_Bool bPrevNext, + sal_Bool bRedline ) : SfxModalDialog( pParent, CUI_RES( RID_SVXDLG_POSTIT ) ), @@ -104,8 +104,8 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, aFont.SetWeight( WEIGHT_LIGHT ); aEditED.SetFont( aFont ); - BOOL bNew = TRUE; - USHORT nWhich = 0; + sal_Bool bNew = sal_True; + sal_uInt16 nWhich = 0; if ( !bPrevNext ) { @@ -116,9 +116,9 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ); String aAuthorStr, aDateStr, aTextStr; - if ( rSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { - bNew = FALSE; + bNew = sal_False; const SvxPostItAuthorItem& rAuthor = (const SvxPostItAuthorItem&)rSet.Get( nWhich ); aAuthorStr = rAuthor.GetValue(); @@ -128,7 +128,7 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE ); - if ( rSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { const SvxPostItDateItem& rDate = (const SvxPostItDateItem&)rSet.Get( nWhich ); @@ -142,7 +142,7 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ); - if ( rSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { const SvxPostItTextItem& rText = (const SvxPostItTextItem&)rSet.Get( nWhich ); @@ -181,14 +181,14 @@ void SvxPostItDialog::ShowLastAuthor(const String& rAuthor, const String& rDate) // ----------------------------------------------------------------------- -USHORT* SvxPostItDialog::GetRanges() +sal_uInt16* SvxPostItDialog::GetRanges() { return pRanges; } // ----------------------------------------------------------------------- -void SvxPostItDialog::EnableTravel(BOOL bNext, BOOL bPrev) +void SvxPostItDialog::EnableTravel(sal_Bool bNext, sal_Bool bPrev) { aPrevBtn.Enable(bPrev); aNextBtn.Enable(bNext); @@ -230,7 +230,7 @@ IMPL_LINK( SvxPostItDialog, Stamp, Button *, EMPTYARG ) } aStr += aLocaleWrapper.getDate(aDate); aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) ); - aStr += aLocaleWrapper.getTime(aTime, FALSE, FALSE); + aStr += aLocaleWrapper.getTime(aTime, sal_False, sal_False); aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ----\n" ) ); diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 139ef0071d37..a2eb2cc9c001 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -166,7 +166,7 @@ void SFTreeListBox::deleteAllTree() void SFTreeListBox::Init( const ::rtl::OUString& language ) { - SetUpdateMode( FALSE ); + SetUpdateMode( sal_False ); deleteAllTree(); @@ -271,7 +271,7 @@ void SFTreeListBox::Init( const ::rtl::OUString& language ) 0, true, std::auto_ptr< SFEntry >(new SFEntry( OBJTYPE_SFROOT, langEntries, xDocumentModel )), factoryURL ); } - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); } Reference< XInterface > @@ -369,7 +369,7 @@ void SFTreeListBox:: RequestSubEntries( SvLBoxEntry* pRootEntry, Reference< ::co long SFTreeListBox::ExpandingHdl() { - return TRUE; + return sal_True; } void SFTreeListBox::ExpandAllTrees() @@ -377,7 +377,7 @@ void SFTreeListBox::ExpandAllTrees() } SvLBoxEntry * SFTreeListBox::insertEntry( - String const & rText, USHORT nBitmap, SvLBoxEntry * pParent, + String const & rText, sal_uInt16 nBitmap, SvLBoxEntry * pParent, bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData, ::rtl::OUString factoryURL ) { SvLBoxEntry * p; @@ -403,7 +403,7 @@ SvLBoxEntry * SFTreeListBox::insertEntry( } SvLBoxEntry * SFTreeListBox::insertEntry( - String const & rText, USHORT nBitmap, SvLBoxEntry * pParent, + String const & rText, sal_uInt16 nBitmap, SvLBoxEntry * pParent, bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData ) { Image aHCImage, aImage; @@ -474,7 +474,7 @@ void __EXPORT SFTreeListBox::ExpandedHdl() // ---------------------------------------------------------------------------- // InputDialog ------------------------------------------------------------ // ---------------------------------------------------------------------------- -InputDialog::InputDialog(Window * pParent, USHORT nMode ) +InputDialog::InputDialog(Window * pParent, sal_uInt16 nMode ) : ModalDialog( pParent, CUI_RES( RID_DLG_NEWLIB ) ), aText( this, CUI_RES( FT_NEWLIB ) ), aEdit( this, CUI_RES( ED_LIBNAME ) ), @@ -503,7 +503,7 @@ InputDialog::InputDialog(Window * pParent, USHORT nMode ) Size siz, newSiz; long gap; - USHORT style = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | + sal_uInt16 style = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT | TEXT_DRAW_WORDBREAK; // get dimensions of dialog instructions control @@ -919,7 +919,7 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) { ::rtl::OUString aNewName; ::rtl::OUString aNewStdName; - USHORT nMode = INPUTMODE_NEWLIB; + sal_uInt16 nMode = INPUTMODE_NEWLIB; if( aScriptsBox.GetModel()->GetDepth( pEntry ) == 0 ) { aNewStdName = ::rtl::OUString::createFromAscii( "Library" ) ; @@ -931,8 +931,8 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) } //do we need L10N for this? ie somethng like: //String aNewStdName( ResId( STR_STDMODULENAME ) ); - BOOL bValid = FALSE; - USHORT i = 1; + sal_Bool bValid = sal_False; + sal_uInt16 i = 1; Sequence< Reference< browse::XBrowseNode > > childNodes; // no children => ok to create Parcel1 or Script1 without checking @@ -942,7 +942,7 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) { aNewName = aNewStdName; aNewName += String::CreateFromInt32( i ); - bValid = TRUE; + bValid = sal_True; } else { @@ -959,7 +959,7 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) { aNewName = aNewStdName; aNewName += String::CreateFromInt32( i ); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if(childNodes.getLength() > 0 ) { ::rtl::OUString nodeName = childNodes[0]->getName(); @@ -971,7 +971,7 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) { if ( (aNewName+extn).equals( childNodes[index]->getName() ) ) { - bFound = TRUE; + bFound = sal_True; break; } } @@ -981,7 +981,7 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) } else { - bValid = TRUE; + bValid = sal_True; } } @@ -993,12 +993,12 @@ void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry ) if ( xNewDlg->Execute() && xNewDlg->GetObjectName().Len() ) { ::rtl::OUString aUserSuppliedName = xNewDlg->GetObjectName(); - bValid = TRUE; + bValid = sal_True; for( sal_Int32 index = 0; index < childNodes.getLength(); index++ ) { if ( (aUserSuppliedName+extn).equals( childNodes[index]->getName() ) ) { - bValid = FALSE; + bValid = sal_False; String aError( m_createErrStr ); aError.Append( m_createDupStr ); ErrorBox aErrorBox( static_cast<Window*>(this), WB_OK | RET_OK, aError ); @@ -1108,24 +1108,24 @@ void SvxScriptOrgDialog::renameEntry( SvLBoxEntry* pEntry ) extn = aNewName.copy(extnPos); aNewName = aNewName.copy(0,extnPos); } - USHORT nMode = INPUTMODE_RENAME; + sal_uInt16 nMode = INPUTMODE_RENAME; std::auto_ptr< InputDialog > xNewDlg( new InputDialog( static_cast<Window*>(this), nMode ) ); xNewDlg->SetObjectName( aNewName ); - BOOL bValid; + sal_Bool bValid; do { if ( xNewDlg->Execute() && xNewDlg->GetObjectName().Len() ) { ::rtl::OUString aUserSuppliedName = xNewDlg->GetObjectName(); - bValid = TRUE; + bValid = sal_True; /* for( sal_Int32 index = 0; index < childNodes.getLength(); index++ ) { if ( (aUserSuppliedName+extn).equals( childNodes[index]->getName() ) ) { - bValid = FALSE; + bValid = sal_False; String aError( m_createErrStr ); aError.Append( m_createDupStr ); ErrorBox aErrorBox( static_cast<Window*>(this), WB_OK | RET_OK, aError ); @@ -1230,10 +1230,10 @@ void SvxScriptOrgDialog::deleteEntry( SvLBoxEntry* pEntry ) } -BOOL SvxScriptOrgDialog::getBoolProperty( Reference< beans::XPropertySet >& xProps, +sal_Bool SvxScriptOrgDialog::getBoolProperty( Reference< beans::XPropertySet >& xProps, ::rtl::OUString& propName ) { - BOOL result = false; + sal_Bool result = false; try { sal_Bool bTemp = sal_False; @@ -1303,7 +1303,7 @@ void SvxScriptOrgDialog::RestorePreviousSelection() if( aStoredEntry.Len() <= 0 ) return; SvLBoxEntry* pEntry = 0; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while ( nIndex != STRING_NOTFOUND ) { String aTmp( aStoredEntry.GetToken( 0, ';', nIndex ) ); diff --git a/cui/source/dialogs/sdrcelldlg.cxx b/cui/source/dialogs/sdrcelldlg.cxx index 0018fe5ce410..de0393a3ca7b 100644 --- a/cui/source/dialogs/sdrcelldlg.cxx +++ b/cui/source/dialogs/sdrcelldlg.cxx @@ -67,7 +67,7 @@ SvxFormatCellsDialog::~SvxFormatCellsDialog() { } -void SvxFormatCellsDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx index 1025d53c5b1f..e10abfa475d7 100644 --- a/cui/source/dialogs/splitcelldlg.cxx +++ b/cui/source/dialogs/splitcelldlg.cxx @@ -59,7 +59,7 @@ SvxSplitTableDlg::SvxSplitTableDlg( Window *pParent, bool bIsTableVertical, long maVertBox.SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl )); if( mnMaxVertical < 2 ) - maVertBox.Enable(FALSE); + maVertBox.Enable(sal_False); //exchange the meaning of horizontal and vertical for vertical text if(bIsTableVertical) diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 6c670fc08e69..7bae8669cfb2 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -86,7 +86,7 @@ SvxSearchFormatDialog::~SvxSearchFormatDialog() // ----------------------------------------------------------------------- -void SvxSearchFormatDialog::PageCreated( USHORT nId, SfxTabPage& rPage ) +void SvxSearchFormatDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) { switch ( nId ) { @@ -127,7 +127,7 @@ void SvxSearchFormatDialog::PageCreated( USHORT nId, SfxTabPage& rPage ) ( (SvxParaAlignTabPage&)rPage ).EnableJustifyExt(); break; case RID_SVXPAGE_BACKGROUND : - ( (SvxBackgroundTabPage&)rPage ).ShowParaControl(TRUE); + ( (SvxBackgroundTabPage&)rPage ).ShowParaControl(sal_True); break; } } @@ -136,7 +136,7 @@ void SvxSearchFormatDialog::PageCreated( USHORT nId, SfxTabPage& rPage ) SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent, SearchAttrItemList& rLst, - const USHORT* pWhRanges ) : + const sal_uInt16* pWhRanges ) : ModalDialog( pParent, CUI_RES( RID_SVXDLG_SEARCHATTR ) ), @@ -163,21 +163,21 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent, SfxItemPool& rPool = pSh->GetPool(); SfxItemSet aSet( rPool, pWhRanges ); SfxWhichIter aIter( aSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { - USHORT nSlot = rPool.GetSlotId( nWhich ); + sal_uInt16 nSlot = rPool.GetSlotId( nWhich ); if ( nSlot >= SID_SVX_START ) { - BOOL bChecked = FALSE, bFound = FALSE; - for ( USHORT i = 0; !bFound && i < rList.Count(); ++i ) + sal_Bool bChecked = sal_False, bFound = sal_False; + for ( sal_uInt16 i = 0; !bFound && i < rList.Count(); ++i ) { if ( nSlot == rList[i].nSlot ) { - bFound = TRUE; + bFound = sal_True; if ( IsInvalidItem( rList[i].pItem ) ) - bChecked = TRUE; + bChecked = sal_True; } } @@ -196,7 +196,7 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent, if ( pEntry ) { aAttrLB.SetCheckButtonState( pEntry, bChecked ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED ); - pEntry->SetUserData( (void*)(ULONG)nSlot ); + pEntry->SetUserData( (void*)(sal_uLong)nSlot ); } } nWhich = aIter.NextWhich(); @@ -213,12 +213,12 @@ IMPL_LINK( SvxSearchAttributeDialog, OKHdl, Button *, EMPTYARG ) SearchAttrItem aInvalidItem; aInvalidItem.pItem = (SfxPoolItem*)-1; - for ( USHORT i = 0; i < aAttrLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aAttrLB.GetEntryCount(); ++i ) { - USHORT nSlot = (USHORT)(ULONG)aAttrLB.GetEntryData(i); - BOOL bChecked = aAttrLB.IsChecked(i); + sal_uInt16 nSlot = (sal_uInt16)(sal_uLong)aAttrLB.GetEntryData(i); + sal_Bool bChecked = aAttrLB.IsChecked(i); - USHORT j; + sal_uInt16 j; for ( j = rList.Count(); j; ) { SearchAttrItem& rItem = rList[ --j ]; @@ -245,7 +245,7 @@ IMPL_LINK( SvxSearchAttributeDialog, OKHdl, Button *, EMPTYARG ) } // remove invalid items (pItem == NULL) - for ( USHORT n = rList.Count(); n; ) + for ( sal_uInt16 n = rList.Count(); n; ) if ( !rList[ --n ].pItem ) rList.Remove( n ); @@ -258,10 +258,10 @@ IMPL_LINK( SvxSearchAttributeDialog, OKHdl, Button *, EMPTYARG ) SvxSearchSimilarityDialog::SvxSearchSimilarityDialog ( Window* pParent, - BOOL bRelax, - USHORT nOther, - USHORT nShorter, - USHORT nLonger + sal_Bool bRelax, + sal_uInt16 nOther, + sal_uInt16 nShorter, + sal_uInt16 nLonger ) : ModalDialog( pParent, CUI_RES( RID_SVXDLG_SEARCHSIMILARITY ) ), diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 5ad431567a72..fd8a6e56bf21 100755 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -84,7 +84,7 @@ LookUpComboBox_Impl::LookUpComboBox_Impl( m_aModifyTimer.SetTimeoutHdl( LINK( this, LookUpComboBox_Impl, ModifyTimer_Hdl ) ); m_aModifyTimer.SetTimeout( 500 ); - EnableAutocomplete( FALSE ); + EnableAutocomplete( sal_False ); } @@ -145,7 +145,7 @@ void ReplaceEdit_Impl::SetText( const XubString& rStr, const Selection& rNewSele AlternativesString_Impl::AlternativesString_Impl( ThesaurusAlternativesCtrl_Impl &rControl, - SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) : + SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : // SvLBoxString( pEntry, nFlags, rStr ), m_rControlImpl( rControl ) @@ -154,7 +154,7 @@ AlternativesString_Impl::AlternativesString_Impl( void AlternativesString_Impl::Paint( const Point& rPos, - SvLBox& rDev, USHORT, + SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) { AlternativesExtraData* pData = m_rControlImpl.GetExtraData( pEntry ); @@ -367,7 +367,7 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() const sal_Int32 nMeanings = aMeanings.getLength(); const uno::Reference< linguistic2::XMeaning > *pMeanings = aMeanings.getConstArray(); - m_pAlternativesCT->SetUpdateMode( FALSE ); + m_pAlternativesCT->SetUpdateMode( sal_False ); // clear old user data of control before creating new ones via AddEntry below m_pAlternativesCT->ClearExtraData(); @@ -387,7 +387,7 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl() m_pAlternativesCT->AddEntry( -1, pSynonyms[k], false ); } - m_pAlternativesCT->SetUpdateMode( TRUE ); + m_pAlternativesCT->SetUpdateMode( sal_True ); return nMeanings > 0; } @@ -419,7 +419,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, LanguageHdl_Impl, MenuButton *, pBtn ) PopupMenu *pMenu = aLangMBtn.GetPopupMenu(); if (pMenu && pBtn) { - USHORT nItem = pBtn->GetCurItemId(); + sal_uInt16 nItem = pBtn->GetCurItemId(); String aLangText( pMenu->GetItemText( nItem ) ); LanguageType nLang = SvtLanguageTable().GetType( aLangText ); DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); @@ -457,7 +457,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, WordSelectHdl_Impl, ComboBox *, pBox ) { if (pBox && !aWordCB.IsTravelSelect()) // act only upon return key and not when traveling with cursor keys { - USHORT nPos = pBox->GetSelectEntryPos(); + sal_uInt16 nPos = pBox->GetSelectEntryPos(); String aStr( pBox->GetEntry( nPos ) ); aStr = linguistic::GetThesaurusReplaceText( aStr ); aWordCB.SetText( aStr ); @@ -704,7 +704,7 @@ SvxThesaurusDialog::SvxThesaurusDialog( } std::sort( aLangVec.begin(), aLangVec.end() ); for (size_t i = 0; i < aLangVec.size(); ++i) - pMenu->InsertItem( (USHORT)i+1, aLangVec[i] ); // menu items should be enumerated from 1 and not 0 + pMenu->InsertItem( (sal_uInt16)i+1, aLangVec[i] ); // menu items should be enumerated from 1 and not 0 m_pImpl->aLangMBtn.SetPopupMenu( pMenu ); SetWindowTitle( nLanguage ); diff --git a/cui/source/dialogs/thesdlg_impl.hxx b/cui/source/dialogs/thesdlg_impl.hxx index b682c8d0c129..59de4406bf0d 100644..100755 --- a/cui/source/dialogs/thesdlg_impl.hxx +++ b/cui/source/dialogs/thesdlg_impl.hxx @@ -134,9 +134,9 @@ class AlternativesString_Impl : public SvLBoxString public: AlternativesString_Impl( ThesaurusAlternativesCtrl_Impl &rControl, - SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ); + SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ); - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry); + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); }; diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index e838e94c0db6..f537e6b152b3 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -58,23 +58,23 @@ // static ---------------------------------------------------------------- -#define SPECIAL_FACTOR ((USHORT)0xFFFF) +#define SPECIAL_FACTOR ((sal_uInt16)0xFFFF) // class SvxZoomDialog --------------------------------------------------- -USHORT SvxZoomDialog::GetFactor() const +sal_uInt16 SvxZoomDialog::GetFactor() const { if ( a100Btn.IsChecked() ) return 100; if ( aUserBtn.IsChecked() ) - return (USHORT)aUserEdit.GetValue(); + return (sal_uInt16)aUserEdit.GetValue(); else return SPECIAL_FACTOR; } // ----------------------------------------------------------------------- -void SvxZoomDialog::SetFactor( USHORT nNewFactor, USHORT nBtnId ) +void SvxZoomDialog::SetFactor( sal_uInt16 nNewFactor, sal_uInt16 nBtnId ) { aUserEdit.Disable(); @@ -117,7 +117,7 @@ void SvxZoomDialog::SetFactor( USHORT nNewFactor, USHORT nBtnId ) // ----------------------------------------------------------------------- -void SvxZoomDialog::HideButton( USHORT nBtnId ) +void SvxZoomDialog::HideButton( sal_uInt16 nBtnId ) { switch ( nBtnId ) { @@ -140,7 +140,7 @@ void SvxZoomDialog::HideButton( USHORT nBtnId ) // ----------------------------------------------------------------------- -void SvxZoomDialog::SetLimits( USHORT nMin, USHORT nMax ) +void SvxZoomDialog::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) { DBG_ASSERT( nMin < nMax, "invalid limits" ); aUserEdit.SetMin( nMin ); @@ -177,7 +177,7 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : rSet ( rCoreSet ), pOutSet ( NULL ), - bModified ( FALSE ) + bModified ( sal_False ) { #if ENABLE_LAYOUT @@ -205,9 +205,9 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : aUserEdit.SetModifyHdl( LINK( this, SvxZoomDialog, SpinHdl ) ); // Default-Werte - USHORT nValue = 100; - USHORT nMin = 10; - USHORT nMax = 1000; + sal_uInt16 nValue = 100; + sal_uInt16 nMin = 10; + sal_uInt16 nMax = 1000; // ggf. erst den alten Wert besorgen const SfxUInt16Item* pOldUserItem = 0; @@ -235,10 +235,10 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : if ( rItem.ISA(SvxZoomItem) ) { const SvxZoomItem& rZoomItem = (const SvxZoomItem&)rItem; - const USHORT nZoom = rZoomItem.GetValue(); + const sal_uInt16 nZoom = rZoomItem.GetValue(); const SvxZoomType eType = rZoomItem.GetType(); - const USHORT nValSet = rZoomItem.GetValueSet(); - USHORT nBtnId = 0; + const sal_uInt16 nValSet = rZoomItem.GetValueSet(); + sal_uInt16 nBtnId = 0; switch ( eType ) { @@ -269,14 +269,14 @@ SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) : } else { - const USHORT nZoom = ( (const SfxUInt16Item&)rItem ).GetValue(); + const sal_uInt16 nZoom = ( (const SfxUInt16Item&)rItem ).GetValue(); SetFactor( nZoom ); } const SfxPoolItem* pViewLayoutItem = 0; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_VIEWLAYOUT, FALSE, &pViewLayoutItem ) ) + if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_VIEWLAYOUT, sal_False, &pViewLayoutItem ) ) { - const USHORT nColumns = static_cast<const SvxViewLayoutItem*>(pViewLayoutItem)->GetValue(); + const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem*>(pViewLayoutItem)->GetValue(); const bool bBookMode = static_cast<const SvxViewLayoutItem*>(pViewLayoutItem)->IsBookMode(); if ( 0 == nColumns ) @@ -335,7 +335,7 @@ SvxZoomDialog::~SvxZoomDialog() IMPL_LINK( SvxZoomDialog, UserHdl, RadioButton *, pBtn ) { - bModified |= TRUE; + bModified |= sal_True; if ( pBtn == &aUserBtn ) { @@ -353,7 +353,7 @@ IMPL_LINK( SvxZoomDialog, SpinHdl, MetricField *, EMPTYARG ) { if ( !aUserBtn.IsChecked() ) return 0; - bModified |= TRUE; + bModified |= sal_True; return 0; } @@ -361,7 +361,7 @@ IMPL_LINK( SvxZoomDialog, SpinHdl, MetricField *, EMPTYARG ) IMPL_LINK( SvxZoomDialog, ViewLayoutUserHdl, RadioButton *, pBtn ) { - bModified |= TRUE; + bModified |= sal_True; if ( pBtn == &aAutomaticBtn ) { @@ -404,7 +404,7 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutSpinHdl, MetricField *, pEdt ) aBookModeChk.Disable(); } - bModified |= TRUE; + bModified |= sal_True; return 0; } @@ -416,7 +416,7 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutCheckHdl, CheckBox *, pChk ) if ( pChk == &aBookModeChk && !aColumnsBtn.IsChecked() ) return 0; - bModified |= TRUE; + bModified |= sal_True; return 0; } @@ -432,7 +432,7 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn ) if ( &aOKBtn == pBtn ) { - USHORT nFactor = GetFactor(); + sal_uInt16 nFactor = GetFactor(); if ( SPECIAL_FACTOR == nFactor ) { @@ -458,7 +458,7 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn ) } else if ( aColumnsBtn.IsChecked() ) { - aViewLayoutItem.SetValue( static_cast<USHORT>(aColumnsEdit.GetValue()) ); + aViewLayoutItem.SetValue( static_cast<sal_uInt16>(aColumnsEdit.GetValue()) ); aViewLayoutItem.SetBookMode( aBookModeChk.IsChecked() ); } } @@ -479,7 +479,7 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn ) if ( pSh ) pSh->PutItem( SfxUInt16Item( SID_ATTR_ZOOM_USER, - (UINT16)aUserEdit.GetValue() ) ); + (sal_uInt16)aUserEdit.GetValue() ) ); EndDialog( RET_OK ); } else diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 1f441d728d63..34e741ad983e 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -103,6 +103,8 @@ #include "passwdomdlg.hxx" #include "hyphen.hxx" #include "thesdlg.hxx" +#include "about.hxx" +#include "dialmgr.hxx" using namespace ::com::sun::star; using namespace ::com::sun::star::frame; @@ -204,7 +206,7 @@ IMPL_LINK( VclAbstractDialog2_Impl, EndDialogHdl, Dialog*, pDlg ) ////////////////////////////////////////////////////////////////////////// -void AbstractTabDialog_Impl::SetCurPageId( USHORT nId ) +void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } @@ -214,7 +216,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const return pDlg->GetOutputItemSet(); } -const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } @@ -394,7 +396,7 @@ Reference < com::sun::star::embed::XEmbeddedObject > AbstractInsertObjectDialog_ return pDlg->GetObject(); } -BOOL AbstractInsertObjectDialog_Impl::IsCreateNew() +sal_Bool AbstractInsertObjectDialog_Impl::IsCreateNew() { return pDlg->IsCreateNew(); } @@ -414,7 +416,7 @@ void AbstractPasteDialog_Impl::SetObjName( const SvGlobalName & rClass, const St pDlg->SetObjName( rClass, rObjName ); } -ULONG AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper& aHelper, +sal_uLong AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper& aHelper, const DataFlavorExVector* pFormats, const TransferableObjectDescriptor* pDesc ) { @@ -426,12 +428,12 @@ void AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference< ::com::sun::s pDlg->SetColumns(xCols); } -void AbstractSvxZoomDialog_Impl::SetLimits( USHORT nMin, USHORT nMax ) +void AbstractSvxZoomDialog_Impl::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) { pDlg->SetLimits( nMin, nMax ); } -void AbstractSvxZoomDialog_Impl::HideButton( USHORT nBtnId ) +void AbstractSvxZoomDialog_Impl::HideButton( sal_uInt16 nBtnId ) { pDlg->HideButton( nBtnId ); } @@ -515,7 +517,7 @@ String AbstractTitleDialog_Impl::GetTitle() const return pDlg->GetTitle(); } -ULONG AbstractGalleryIdDialog_Impl::GetId() const +sal_uLong AbstractGalleryIdDialog_Impl::GetId() const { return pDlg->GetId(); } @@ -555,7 +557,7 @@ String AbstractURLDlg_Impl::GetName() const return pDlg->GetName(); } -void AbstractSvxHlinkDlgMarkWnd_Impl::Hide( USHORT nFlags ) +void AbstractSvxHlinkDlgMarkWnd_Impl::Hide( sal_uInt16 nFlags ) { ((Window*)pDlg)->Hide( nFlags ); } @@ -570,22 +572,22 @@ Size AbstractSvxHlinkDlgMarkWnd_Impl::GetSizePixel() const return pDlg->GetSizePixel(); } -BOOL AbstractSvxHlinkDlgMarkWnd_Impl::IsVisible( ) const +sal_Bool AbstractSvxHlinkDlgMarkWnd_Impl::IsVisible( ) const { return (( Window* )pDlg)->IsVisible(); } -void AbstractSvxHlinkDlgMarkWnd_Impl::Invalidate( USHORT nFlags ) +void AbstractSvxHlinkDlgMarkWnd_Impl::Invalidate( sal_uInt16 nFlags ) { (( Window* )pDlg)->Invalidate(nFlags); } -BOOL AbstractSvxHlinkDlgMarkWnd_Impl::MoveTo( Point aNewPos )const +sal_Bool AbstractSvxHlinkDlgMarkWnd_Impl::MoveTo( Point aNewPos )const { return pDlg->MoveTo(aNewPos); } -BOOL AbstractSvxHlinkDlgMarkWnd_Impl::ConnectToDialog( BOOL bDoit )const +sal_Bool AbstractSvxHlinkDlgMarkWnd_Impl::ConnectToDialog( sal_Bool bDoit )const { return pDlg->ConnectToDialog(bDoit); } @@ -600,33 +602,33 @@ void AbstractSvxHlinkDlgMarkWnd_Impl::SelectEntry ( String aStrMark ) pDlg->SelectEntry(aStrMark); } -USHORT AbstractSvxHlinkDlgMarkWnd_Impl::SetError( USHORT nError) +sal_uInt16 AbstractSvxHlinkDlgMarkWnd_Impl::SetError( sal_uInt16 nError) { return pDlg->SetError(nError); } -USHORT AbstractSvxSearchSimilarityDialog_Impl::GetOther() +sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetOther() { return pDlg->GetOther(); } -USHORT AbstractSvxSearchSimilarityDialog_Impl::GetShorter() +sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetShorter() { return pDlg->GetShorter(); } -USHORT AbstractSvxSearchSimilarityDialog_Impl::GetLonger() +sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetLonger() { return pDlg-> GetLonger(); } -BOOL AbstractSvxSearchSimilarityDialog_Impl::IsRelaxed() +sal_Bool AbstractSvxSearchSimilarityDialog_Impl::IsRelaxed() { return pDlg-> IsRelaxed(); } // AbstractSvxTransformTabDialog implementations just forwards everything to the dialog -void AbstractSvxTransformTabDialog_Impl::SetCurPageId( USHORT nId ) +void AbstractSvxTransformTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } @@ -635,7 +637,7 @@ const SfxItemSet* AbstractSvxTransformTabDialog_Impl::GetOutputItemSet() const return pDlg->GetOutputItemSet(); } // -const USHORT* AbstractSvxTransformTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* AbstractSvxTransformTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } @@ -659,7 +661,7 @@ void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const Link& rL } // AbstractSvxCaptionDialog implementations just forwards everything to the dialog -void AbstractSvxCaptionDialog_Impl::SetCurPageId( USHORT nId ) +void AbstractSvxCaptionDialog_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } @@ -668,7 +670,7 @@ const SfxItemSet* AbstractSvxCaptionDialog_Impl::GetOutputItemSet() const return pDlg->GetOutputItemSet(); } // -const USHORT* AbstractSvxCaptionDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* AbstractSvxCaptionDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } @@ -691,7 +693,7 @@ void AbstractSvxCaptionDialog_Impl::SetValidateFramePosLink( const Link& rLink ) pDlg->SetValidateFramePosLink( rLink ); } -INT32 AbstractSvxJSearchOptionsDialog_Impl::GetTransliterationFlags() const +sal_Int32 AbstractSvxJSearchOptionsDialog_Impl::GetTransliterationFlags() const { return pDlg->GetTransliterationFlags(); } @@ -783,7 +785,7 @@ void AbstractSvxObjectTitleDescDialog_Impl::GetDescription(String& rDescription) pDlg->GetDescription(rDescription); } -void AbstractSvxMessDialog_Impl::SetButtonText( USHORT nBtnId, const String& rNewTxt ) +void AbstractSvxMessDialog_Impl::SetButtonText( sal_uInt16 nBtnId, const String& rNewTxt ) { pDlg->SetButtonText( nBtnId, rNewTxt ); } @@ -878,7 +880,7 @@ Graphic AbstractGraphicFilterDialog_Impl::GetFilteredGraphic( const Graphic& rGr } // AbstractSvxAreaTabDialog implementations just forwards everything to the dialog -void AbstractSvxAreaTabDialog_Impl::SetCurPageId( USHORT nId ) +void AbstractSvxAreaTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } @@ -888,7 +890,7 @@ const SfxItemSet* AbstractSvxAreaTabDialog_Impl::GetOutputItemSet() const return pDlg->GetOutputItemSet(); } -const USHORT* AbstractSvxAreaTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* AbstractSvxAreaTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } @@ -920,7 +922,7 @@ const SfxItemSet* AbstractSvxPostItDialog_Impl::GetOutputItemSet() const { return pDlg->GetOutputItemSet(); } -void AbstractSvxPostItDialog_Impl::EnableTravel(BOOL bNext, BOOL bPrev) +void AbstractSvxPostItDialog_Impl::EnableTravel(sal_Bool bNext, sal_Bool bPrev) { pDlg->EnableTravel( bNext, bPrev ); } @@ -944,11 +946,11 @@ void AbstractSvxPostItDialog_Impl::HideAuthor() { pDlg->HideAuthor(); } -void AbstractSvxPostItDialog_Impl::SetReadonlyPostIt(BOOL bDisable) +void AbstractSvxPostItDialog_Impl::SetReadonlyPostIt(sal_Bool bDisable) { pDlg->SetReadonlyPostIt( bDisable ); } -BOOL AbstractSvxPostItDialog_Impl::IsOkEnabled() const +sal_Bool AbstractSvxPostItDialog_Impl::IsOkEnabled() const { return pDlg->IsOkEnabled(); } @@ -1004,6 +1006,11 @@ VclAbstractDialog* AbstractDialogFactory_Impl::CreateVclDialog( Window* pParent, Dialog* pDlg=NULL; switch ( nResId ) { + case RID_DEFAULTABOUT: + { + pDlg = new AboutDialog( pParent, CUI_RES( (sal_uInt16) nResId ) ); + break; + } case SID_OPTIONS_TREEDIALOG : case SID_OPTIONS_DATABASES : case SID_LANGUAGE_OPTIONS : @@ -1131,7 +1138,7 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTextTabDialog( Window* p //TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog CHINA001 AbstractSvxCaptionDialog* AbstractDialogFactory_Impl::CreateCaptionDialog( Window* pParent, const SdrView* pView, - USHORT nAnchorTypes ) + sal_uInt16 nAnchorTypes ) { SvxCaptionTabDialog* pDlg = new SvxCaptionTabDialog( pParent, pView, nAnchorTypes ); return new AbstractSvxCaptionDialog_Impl( pDlg ); @@ -1219,7 +1226,7 @@ AbstractDialogFactory_Impl::CreateScriptErrorDialog( AbstractScriptSelectorDialog* AbstractDialogFactory_Impl::CreateScriptSelectorDialog( - Window* pParent, BOOL bShowSlots, const Reference< frame::XFrame >& _rxFrame ) + Window* pParent, sal_Bool bShowSlots, const Reference< frame::XFrame >& _rxFrame ) { SvxScriptSelectorDialog* pDlg = NULL; @@ -1315,7 +1322,7 @@ SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( sal_uInt32 nResI switch ( nResId ) { case RID_SVXDLG_CHARMAP : - pDlg = new SvxCharacterMap( pParent, TRUE, pAttrSet ); + pDlg = new SvxCharacterMap( pParent, sal_True, pAttrSet ); break; default: break; @@ -1347,17 +1354,17 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabItemDialog( Window* p VclAbstractDialog* AbstractDialogFactory_Impl::CreateSvxSearchAttributeDialog( Window* pParent, SearchAttrItemList& rLst, - const USHORT* pWhRanges ) + const sal_uInt16* pWhRanges ) { Dialog* pDlg = new SvxSearchAttributeDialog( pParent, rLst, pWhRanges); return new VclAbstractDialog_Impl( pDlg ); } AbstractSvxSearchSimilarityDialog * AbstractDialogFactory_Impl::CreateSvxSearchSimilarityDialog( Window* pParent, - BOOL bRelax, - USHORT nOther, - USHORT nShorter, - USHORT nLonger) + sal_Bool bRelax, + sal_uInt16 nOther, + sal_uInt16 nShorter, + sal_uInt16 nLonger) { SvxSearchSimilarityDialog* pDlg = new SvxSearchSimilarityDialog( pParent, bRelax, nOther, nShorter, nLonger ); if ( pDlg ) @@ -1367,7 +1374,7 @@ AbstractSvxSearchSimilarityDialog * AbstractDialogFactory_Impl::CreateSvxSearchS SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg( Window* pParent, const SfxItemSet& rCoreSet, - BOOL bEnableSelector) + sal_Bool bEnableSelector) { SfxTabDialog* pDlg = new SvxBorderBackgroundDlg( pParent, rCoreSet, bEnableSelector); return new AbstractTabDialog_Impl( pDlg ); @@ -1376,7 +1383,7 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg( AbstractSvxTransformTabDialog* AbstractDialogFactory_Impl::CreateSvxTransformTabDialog( Window* pParent, const SfxItemSet* pAttr, const SdrView* pView, - USHORT nAnchorTypes ) + sal_uInt16 nAnchorTypes ) { SvxTransformTabDialog* pDlg = new SvxTransformTabDialog( pParent, pAttr,pView, nAnchorTypes); return new AbstractSvxTransformTabDialog_Impl( pDlg ); @@ -1416,7 +1423,7 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSchTransformTabDialog( W AbstractSvxJSearchOptionsDialog * AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog( Window* pParent, const SfxItemSet& rOptionsSet, - INT32 nInitialFlags) + sal_Int32 nInitialFlags) { SvxJSearchOptionsDialog* pDlg = new SvxJSearchOptionsDialog( pParent, rOptionsSet, nInitialFlags ); return new AbstractSvxJSearchOptionsDialog_Impl( pDlg ); @@ -1502,13 +1509,13 @@ AbstractSvxMessDialog * AbstractDialogFactory_Impl::CreateSvxMessDialog( Window* return 0; } -AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxMultiPathDialog( Window* pParent, BOOL bEmptyAllowed ) +AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed ) { SvxMultiPathDialog* pDlg = new SvxMultiPathDialog( pParent, bEmptyAllowed ); return new AbstractSvxMultiPathDialog_Impl( pDlg ); } -AbstractSvxMultiFileDialog * AbstractDialogFactory_Impl::CreateSvxMultiFileDialog( Window* pParent, BOOL bEmptyAllowed ) +AbstractSvxMultiFileDialog * AbstractDialogFactory_Impl::CreateSvxMultiFileDialog( Window* pParent, sal_Bool bEmptyAllowed ) { SvxMultiFileDialog* pDlg = new SvxMultiFileDialog( pParent, bEmptyAllowed ); return new AbstractSvxMultiFileDialog_Impl( pDlg ); @@ -1556,7 +1563,7 @@ AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterEmb AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterPosterSepia (Window* pParent, const Graphic& rGraphic, - USHORT nCount, + sal_uInt16 nCount, sal_uInt32 nResId) { GraphicFilterDialog* pDlg=NULL; @@ -1580,7 +1587,7 @@ AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterPos AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSolarize (Window* pParent, //add for GraphicFilterSolarize const Graphic& rGraphic, - BYTE nGreyThreshold, BOOL bInvert, sal_uInt32 ) + sal_uInt8 nGreyThreshold, sal_Bool bInvert, sal_uInt32 ) { GraphicFilterDialog* pDlg = new GraphicFilterSolarize( pParent, rGraphic, nGreyThreshold, bInvert ); return new AbstractGraphicFilterDialog_Impl( pDlg ); @@ -1588,7 +1595,7 @@ AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSol AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterMosaic (Window* pParent, //add for GraphicFilterMosaic const Graphic& rGraphic, - USHORT nTileWidth, USHORT nTileHeight, BOOL bEnhanceEdges, + sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges, sal_uInt32 nResId) { GraphicFilterDialog* pDlg=NULL; @@ -1618,7 +1625,7 @@ AbstractSvxAreaTabDialog* AbstractDialogFactory_Impl::CreateSvxAreaTabDialog( Wi SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog SdrModel* pModel, const SdrObject* pObj , - BOOL bHasObj) + sal_Bool bHasObj) { SfxTabDialog* pDlg = new SvxLineTabDialog( pParent, pAttr, pModel,pObj,bHasObj ); return new AbstractTabDialog_Impl( pDlg ); @@ -1640,7 +1647,7 @@ SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent, pDlg = new SvxShortcutAssignDlg( pParent, _rxDocumentFrame, rAttr ); break; case RID_SVXDLG_CHARMAP : - pDlg = new SvxCharacterMap( pParent, TRUE, &rAttr ); + pDlg = new SvxCharacterMap( pParent, sal_True, &rAttr ); break; default: break; @@ -1688,7 +1695,7 @@ SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent, AbstractSvxPostItDialog* AbstractDialogFactory_Impl::CreateSvxPostItDialog( Window* pParent, const SfxItemSet& rCoreSet, - BOOL bPrevNext, BOOL bRedline ) + sal_Bool bPrevNext, sal_Bool bRedline ) { SvxPostItDialog* pDlg = new SvxPostItDialog( pParent, rCoreSet, bPrevNext, bRedline ); return new AbstractSvxPostItDialog_Impl( pDlg ); @@ -1730,7 +1737,7 @@ VclAbstractDialog * AbstractDialogFactory_Impl::CreateSvxMacroAssignDlg( } // Factories for TabPages -CreateTabPage AbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId ) +CreateTabPage AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId ) { switch ( nId ) { @@ -1816,7 +1823,7 @@ CreateSvxDistributePage AbstractDialogFactory_Impl::GetSvxDistributePageCreatorF return SvxDistributePage::Create; } -DialogGetRanges AbstractDialogFactory_Impl::GetDialogGetRangesFunc( USHORT nId ) +DialogGetRanges AbstractDialogFactory_Impl::GetDialogGetRangesFunc( sal_uInt16 nId ) { switch ( nId ) { @@ -1828,7 +1835,7 @@ DialogGetRanges AbstractDialogFactory_Impl::GetDialogGetRangesFunc( USHORT nId ) return 0; } -GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( USHORT nId ) +GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId ) { switch ( nId ) { @@ -1928,7 +1935,7 @@ SfxAbstractPasteDialog* AbstractDialogFactory_Impl::CreatePasteDialog( Window* p return new AbstractPasteDialog_Impl( new SvPasteObjectDialog( pParent ) ); } -SfxAbstractLinksDialog* AbstractDialogFactory_Impl::CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, BOOL bHTML, sfx2::SvBaseLink* p) +SfxAbstractLinksDialog* AbstractDialogFactory_Impl::CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, sal_Bool bHTML, sfx2::SvBaseLink* p) { SvBaseLinksDlg* pLinkDlg = new SvBaseLinksDlg( pParent, pMgr, bHTML ); if ( p ) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index b68e10c25cdd..e38b9af1113e 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -79,7 +79,7 @@ public: \ {} \ virtual ~Class(); \ virtual short Execute() ; -// virtual void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 ) +// virtual void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 ) #define IMPL_ABSTDLG_BASE(Class) \ Class::~Class() \ @@ -133,9 +133,9 @@ class AbstractSfxDialog_Impl : public SfxAbstractDialog class AbstractTabDialog_Impl : public SfxAbstractTabDialog { DECL_ABSTDLG_BASE(AbstractTabDialog_Impl,SfxTabDialog) - virtual void SetCurPageId( USHORT nId ); + virtual void SetCurPageId( sal_uInt16 nId ); virtual const SfxItemSet* GetOutputItemSet() const; - virtual const USHORT* GetInputRanges( const SfxItemPool& pItem ); //add by CHINA001 + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ); //add by CHINA001 virtual void SetInputSet( const SfxItemSet* pInSet ); //add by CHINA001 //From class Window. virtual void SetText( const XubString& rStr ); //add by CHINA001 @@ -215,8 +215,8 @@ class SvxZoomDialog; class AbstractSvxZoomDialog_Impl : public AbstractSvxZoomDialog { DECL_ABSTDLG_BASE(AbstractSvxZoomDialog_Impl,SvxZoomDialog) - virtual void SetLimits( USHORT nMin, USHORT nMax ); - virtual void HideButton( USHORT nBtnId ); + virtual void SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ); + virtual void HideButton( sal_uInt16 nBtnId ); virtual const SfxItemSet* GetOutputItemSet() const ; }; @@ -289,7 +289,7 @@ class GalleryIdDialog; class AbstractGalleryIdDialog_Impl : public AbstractGalleryIdDialog { DECL_ABSTDLG_BASE(AbstractGalleryIdDialog_Impl,GalleryIdDialog) - virtual ULONG GetId() const ; + virtual sal_uLong GetId() const ; }; //for GalleryIdDialog end @@ -312,16 +312,16 @@ class SvxHlinkDlgMarkWnd; class AbstractSvxHlinkDlgMarkWnd_Impl : public AbstractSvxHlinkDlgMarkWnd { DECL_ABSTDLG_BASE(AbstractSvxHlinkDlgMarkWnd_Impl,SvxHlinkDlgMarkWnd) - virtual void Hide( USHORT nFlags = 0 ); - virtual BOOL IsVisible() const ; - virtual void Invalidate( USHORT nFlags = 0 ); + virtual void Hide( sal_uInt16 nFlags = 0 ); + virtual sal_Bool IsVisible() const ; + virtual void Invalidate( sal_uInt16 nFlags = 0 ); virtual void SetSizePixel( const Size& rNewSize ); virtual Size GetSizePixel() const; - virtual BOOL MoveTo ( Point aNewPos )const; - virtual BOOL ConnectToDialog( BOOL bDoit = TRUE )const; + virtual sal_Bool MoveTo ( Point aNewPos )const; + virtual sal_Bool ConnectToDialog( sal_Bool bDoit = sal_True )const; virtual void RefreshTree ( String aStrURL ) ; virtual void SelectEntry ( String aStrMark ); - virtual USHORT SetError( USHORT nError) ; + virtual sal_uInt16 SetError( sal_uInt16 nError) ; }; //for SvxHlinkDlgMarkWnd end @@ -331,10 +331,10 @@ class SvxSearchSimilarityDialog; class AbstractSvxSearchSimilarityDialog_Impl :public AbstractSvxSearchSimilarityDialog { DECL_ABSTDLG_BASE(AbstractSvxSearchSimilarityDialog_Impl,SvxSearchSimilarityDialog) - virtual USHORT GetOther(); - virtual USHORT GetShorter(); - virtual USHORT GetLonger(); - virtual BOOL IsRelaxed(); + virtual sal_uInt16 GetOther(); + virtual sal_uInt16 GetShorter(); + virtual sal_uInt16 GetLonger(); + virtual sal_Bool IsRelaxed(); }; //for SvxSearchSimilarityDialog end @@ -343,7 +343,7 @@ class SvxJSearchOptionsDialog; class AbstractSvxJSearchOptionsDialog_Impl :public AbstractSvxJSearchOptionsDialog { DECL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl,SvxJSearchOptionsDialog) - virtual INT32 GetTransliterationFlags() const; + virtual sal_Int32 GetTransliterationFlags() const; }; //for SvxJSearchOptionsDialog end @@ -351,9 +351,9 @@ class AbstractSvxTransformTabDialog_Impl : public AbstractSvxTransformTabDialog { DECL_ABSTDLG_BASE(AbstractSvxTransformTabDialog_Impl,SvxTransformTabDialog) virtual void SetValidateFramePosLink( const Link& rLink ); - virtual void SetCurPageId( USHORT nId ); + virtual void SetCurPageId( sal_uInt16 nId ); virtual const SfxItemSet* GetOutputItemSet() const; - virtual const USHORT* GetInputRanges( const SfxItemPool& pItem ); + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ); virtual void SetInputSet( const SfxItemSet* pInSet ); virtual void SetText( const XubString& rStr ); virtual String GetText() const; @@ -362,9 +362,9 @@ class AbstractSvxCaptionDialog_Impl : public AbstractSvxCaptionDialog { DECL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl,SvxCaptionTabDialog) virtual void SetValidateFramePosLink( const Link& rLink ); - virtual void SetCurPageId( USHORT nId ); + virtual void SetCurPageId( sal_uInt16 nId ); virtual const SfxItemSet* GetOutputItemSet() const; - virtual const USHORT* GetInputRanges( const SfxItemPool& pItem ); + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ); virtual void SetInputSet( const SfxItemSet* pInSet ); virtual void SetText( const XubString& rStr ); virtual String GetText() const; @@ -438,7 +438,7 @@ class SvxMessDialog; class AbstractSvxMessDialog_Impl :public AbstractSvxMessDialog { DECL_ABSTDLG_BASE(AbstractSvxMessDialog_Impl,SvxMessDialog) - virtual void SetButtonText( USHORT nBtnId, const String& rNewTxt ); + virtual void SetButtonText( sal_uInt16 nBtnId, const String& rNewTxt ); }; //for SvxMessDialog end @@ -508,9 +508,9 @@ class SvxAreaTabDialog; class AbstractSvxAreaTabDialog_Impl :public AbstractSvxAreaTabDialog { DECL_ABSTDLG_BASE(AbstractSvxAreaTabDialog_Impl,SvxAreaTabDialog) - virtual void SetCurPageId( USHORT nId ); + virtual void SetCurPageId( sal_uInt16 nId ); virtual const SfxItemSet* GetOutputItemSet() const; - virtual const USHORT* GetInputRanges( const SfxItemPool& pItem ); + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ); virtual void SetInputSet( const SfxItemSet* pInSet ); //From class Window. virtual void SetText( const XubString& rStr ); @@ -524,7 +524,7 @@ class AbstractInsertObjectDialog_Impl : public SfxAbstractInsertObjectDialog DECL_ABSTDLG_BASE(AbstractInsertObjectDialog_Impl, InsertObjectDialog_Impl) virtual com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObject(); virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetIconIfIconified( ::rtl::OUString* pGraphicMediaType ); - virtual BOOL IsCreateNew(); + virtual sal_Bool IsCreateNew(); }; class AbstractPasteDialog_Impl : public SfxAbstractPasteDialog @@ -533,7 +533,7 @@ public: DECL_ABSTDLG_BASE(AbstractPasteDialog_Impl, SvPasteObjectDialog ) virtual void Insert( SotFormatStringId nFormat, const String & rFormatName ); virtual void SetObjName( const SvGlobalName & rClass, const String & rObjName ); - virtual ULONG GetFormat( const TransferableDataHelper& aHelper, + virtual sal_uLong GetFormat( const TransferableDataHelper& aHelper, const DataFlavorExVector* pFormats=0, const TransferableObjectDescriptor* pDesc=0 ); }; @@ -554,14 +554,14 @@ class AbstractSvxPostItDialog_Impl :public AbstractSvxPostItDialog virtual const SfxItemSet* GetOutputItemSet() const; virtual void SetPrevHdl( const Link& rLink ) ; virtual void SetNextHdl( const Link& rLink ) ; - virtual void EnableTravel(BOOL bNext, BOOL bPrev) ; + virtual void EnableTravel(sal_Bool bNext, sal_Bool bPrev) ; virtual String GetNote() ; virtual void SetNote(const String& rTxt) ; virtual void ShowLastAuthor(const String& rAuthor, const String& rDate) ; virtual void DontChangeAuthor() ; virtual void HideAuthor() ; - virtual void SetReadonlyPostIt(BOOL bDisable) ; - virtual BOOL IsOkEnabled() const ; + virtual void SetReadonlyPostIt(sal_Bool bDisable) ; + virtual sal_Bool IsOkEnabled() const ; virtual Window * GetWindow(); private: Link aNextHdl; @@ -626,7 +626,7 @@ public: sal_uInt32 nResId); //add by CHINA001 virtual AbstractSvxCaptionDialog* CreateCaptionDialog( Window* pParent, const SdrView* pView, - USHORT nAnchorTypes = 0 ); //add for SvxCaptionTabDialog CHINA001 + sal_uInt16 nAnchorTypes = 0 ); //add for SvxCaptionTabDialog CHINA001 virtual AbstractSvxDistributeDialog* CreateSvxDistributeDialog(Window* pParent, const SfxItemSet& rAttr, SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone, @@ -637,7 +637,7 @@ public: virtual VclAbstractDialog* CreateEditObjectDialog( Window* pParent, const rtl::OUString& rCommmand, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObj ); virtual SfxAbstractPasteDialog* CreatePasteDialog( Window* pParent ); - virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, BOOL bHTML, sfx2::SvBaseLink* p=0 ); + virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, sal_Bool bHTML, sfx2::SvBaseLink* p=0 ); virtual AbstractHangulHanjaConversionDialog * CreateHangulHanjaConversionDialog( Window* _pParent, //add for HangulHanjaConversionDialog CHINA001 editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ); @@ -654,11 +654,11 @@ public: const SfxItemSet& rCoreSet); virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg( Window* pParent, //add for SvxBorderBackgroundDlg const SfxItemSet& rCoreSet, - BOOL bEnableSelector = FALSE) ; + sal_Bool bEnableSelector = sal_False) ; virtual AbstractSvxTransformTabDialog* CreateSvxTransformTabDialog( Window* pParent, //add for SvxTransformTabDialog const SfxItemSet* pAttr, const SdrView* pView, - USHORT nAnchorTypes = 0) ; + sal_uInt16 nAnchorTypes = 0) ; virtual SfxAbstractTabDialog* CreateSchTransformTabDialog( Window* pParent, //add for SchTransformTabDialog const SfxItemSet* pAttr, const SdrView* pSdrView, @@ -694,15 +694,15 @@ public: virtual VclAbstractDialog* CreateSvxSearchAttributeDialog( Window* pParent, SearchAttrItemList& rLst, - const USHORT* pWhRanges); + const sal_uInt16* pWhRanges); virtual AbstractSvxSearchSimilarityDialog * CreateSvxSearchSimilarityDialog( Window* pParent, - BOOL bRelax, - USHORT nOther, - USHORT nShorter, - USHORT nLonger); //add for SvxSearchSimilarityDialog + sal_Bool bRelax, + sal_uInt16 nOther, + sal_uInt16 nShorter, + sal_uInt16 nLonger); //add for SvxSearchSimilarityDialog virtual AbstractSvxJSearchOptionsDialog * CreateSvxJSearchOptionsDialog( Window* pParent, const SfxItemSet& rOptionsSet, - INT32 nInitialFlags); + sal_Int32 nInitialFlags); virtual AbstractFmInputRecordNoDialog * CreateFmInputRecordNoDialog( Window* pParent ); virtual AbstractSvxNewDictionaryDialog* CreateSvxNewDictionaryDialog( Window* pParent, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl, @@ -720,8 +720,8 @@ public: virtual AbstractSvxMessDialog * CreateSvxMessDialog( Window* pParent, sal_uInt32 nResId, const String& rText, const String& rDesc, Image* pImg = NULL ); //add for SvxMessDialog - virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog( Window* pParent, BOOL bEmptyAllowed = FALSE ); //add for SvxMultiPathDialog - virtual AbstractSvxMultiFileDialog * CreateSvxMultiFileDialog( Window* pParent, BOOL bEmptyAllowed = FALSE ); //add for SvxMultiFileDialog + virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed = sal_False ); //add for SvxMultiPathDialog + virtual AbstractSvxMultiFileDialog * CreateSvxMultiFileDialog( Window* pParent, sal_Bool bEmptyAllowed = sal_False ); //add for SvxMultiFileDialog virtual AbstractSvxHpLinkDlg * CreateSvxHpLinkDlg (Window* pParent, //add for SvxHpLink SfxBindings* pBindings, sal_uInt32 nResId); @@ -735,14 +735,14 @@ public: RECT_POINT eLightSource, sal_uInt32 nResId); virtual AbstractGraphicFilterDialog * CreateGraphicFilterPosterSepia (Window* pParent, //add for GraphicFilterPoster & GraphicFilterSepia const Graphic& rGraphic, - USHORT nCount, + sal_uInt16 nCount, sal_uInt32 nResId); virtual AbstractGraphicFilterDialog * CreateGraphicFilterSolarize (Window* pParent, //add for GraphicFilterSolarize const Graphic& rGraphic, - BYTE nGreyThreshold, BOOL bInvert, sal_uInt32 nResId); + sal_uInt8 nGreyThreshold, sal_Bool bInvert, sal_uInt32 nResId); virtual AbstractGraphicFilterDialog * CreateGraphicFilterMosaic (Window* pParent, //add for GraphicFilterMosaic const Graphic& rGraphic, - USHORT nTileWidth, USHORT nTileHeight, BOOL bEnhanceEdges, sal_uInt32 nResId); + sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges, sal_uInt32 nResId); virtual AbstractSvxAreaTabDialog* CreateSvxAreaTabDialog( Window* pParent,//add for SvxAreaTabDialog const SfxItemSet* pAttr, SdrModel* pModel, @@ -750,23 +750,23 @@ public: virtual SfxAbstractTabDialog* CreateSvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr, //add for SvxLineTabDialog SdrModel* pModel, const SdrObject* pObj = NULL, - BOOL bHasObj = TRUE ); + sal_Bool bHasObj = sal_True ); virtual AbstractSvxPostItDialog* CreateSvxPostItDialog( Window* pParent, //add for SvxPostItDialog const SfxItemSet& rCoreSet, - BOOL bPrevNext = FALSE, BOOL bRedline = FALSE ); + sal_Bool bPrevNext = sal_False, sal_Bool bRedline = sal_False ); // For TabPage - virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ); + virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ); virtual CreateSvxDistributePage GetSvxDistributePageCreatorFunc(); - virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ); - virtual DialogGetRanges GetDialogGetRangesFunc( USHORT nId ); //add for SvxPostItDialog + virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ); + virtual DialogGetRanges GetDialogGetRangesFunc( sal_uInt16 nId ); //add for SvxPostItDialog virtual VclAbstractDialog* CreateSvxScriptOrgDialog( Window* pParent, const String& rLanguage ); virtual AbstractScriptSelectorDialog* CreateScriptSelectorDialog( Window* pParent, - BOOL bShowSlots, + sal_Bool bShowSlots, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame ); diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index 8d233b71e890..bb12f284d53d 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -74,9 +74,9 @@ class SentenceEditWindow_Impl : public MultiLineEdit/*, public SfxListener*/ using MultiLineEdit::SetText; private: - std::set< USHORT > m_aIgnoreErrorsAt; - USHORT m_nErrorStart; - USHORT m_nErrorEnd; + std::set< sal_uInt16 > m_aIgnoreErrorsAt; + sal_uInt16 m_nErrorStart; + sal_uInt16 m_nErrorEnd; bool m_bIsUndoEditMode; Link m_aModifyLink; @@ -93,12 +93,12 @@ public: void SetModifyHdl(const Link& rLink) { m_aModifyLink = rLink;} - void SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd ); + void SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd ); void SetText( const String& rStr ); bool MarkNextError( bool bIgnoreCurrentError ); void ChangeMarkedWord(const String& rNewWord, LanguageType eLanguage); - void MoveErrorMarkTo(USHORT nErrorStart, USHORT nErrorEnd, bool bGrammar); + void MoveErrorMarkTo(sal_uInt16 nErrorStart, sal_uInt16 nErrorEnd, bool bGrammar); String GetErrorText() const; void RestoreCurrentError(); @@ -108,8 +108,8 @@ public: const SpellErrorDescription* GetAlternatives(); - void ResetModified() { GetTextEngine()->SetModified(FALSE); m_bIsUndoEditMode = false;} - BOOL IsModified() const { return GetTextEngine()->IsModified(); } + void ResetModified() { GetTextEngine()->SetModified(sal_False); m_bIsUndoEditMode = false;} + sal_Bool IsModified() const { return GetTextEngine()->IsModified(); } bool IsUndoEditMode() const { return m_bIsUndoEditMode;} void SetUndoEditMode(bool bSet); @@ -118,10 +118,10 @@ public: void ResetUndo(); void Undo(); - void AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg=FALSE ); - USHORT GetUndoActionCount(); - void UndoActionStart( USHORT nId ); - void UndoActionEnd( USHORT nId ); + void AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg=sal_False ); + sal_uInt16 GetUndoActionCount(); + void UndoActionStart( sal_uInt16 nId ); + void UndoActionEnd(); void MoveErrorEnd(long nOffset); diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx new file mode 100644 index 000000000000..abf154c81ac5 --- /dev/null +++ b/cui/source/inc/about.hxx @@ -0,0 +1,83 @@ +/************************************************************************* + * + * 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 _ABOUT_HXX +#define _ABOUT_HXX + +// include --------------------------------------------------------------- + +#include <tools/resary.hxx> +#include <vcl/button.hxx> +#include <vcl/accel.hxx> +#include <svtools/svmedit.hxx> +#include <tools/list.hxx> +#include <svtools/stdctrl.hxx> +#include <sfx2/basedlgs.hxx> // SfxModalDialog + +DECLARE_LIST( AccelList, Accelerator* ) + +// class AboutDialog ----------------------------------------------------- + +class AboutDialog : public SfxModalDialog +{ +private: + OKButton aOKButton; + Image aAppLogo; + + FixedInfo aVersionText; + MultiLineEdit aCopyrightText; + FixedInfo aBuildData; + + ResStringArray* pDeveloperAry; + String aDevVersionStr; + String aAccelStr; + String aVersionData; + String aCopyrightTextStr; + + AccelList aAccelList; + + AutoTimer aTimer; + long nOff; + long m_nDeltaWidth; + int m_nPendingScrolls; + + sal_Bool bNormal; + +protected: + virtual sal_Bool Close(); + virtual void Paint( const Rectangle& ); + +public: + AboutDialog( Window* pParent, const ResId& nId ); + ~AboutDialog(); + + DECL_LINK( TimerHdl, Timer * ); + DECL_LINK( AccelSelectHdl, Accelerator * ); +}; + +#endif // #ifndef _ABOUT_HXX + + diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx index aa8224654c65..f44a60cc8040 100644 --- a/cui/source/inc/acccfg.hxx +++ b/cui/source/inc/acccfg.hxx @@ -90,7 +90,7 @@ public: m_pAccelConfigPage( pAccelConfigPage ) {} - void ReplaceEntry( USHORT nPos, const String &rStr ); + void ReplaceEntry( sal_uInt16 nPos, const String &rStr ); }; // class SfxAcceleratorConfigPage ---------------------------------------- @@ -107,7 +107,7 @@ struct TAccInfo , m_bIsConfigurable(sal_True ) , m_sCommand ( ) , m_aKey (aKey ) - // its important to set TRUE as default - + // its important to set sal_True as default - // because only fix entries will be disabled later ... {} @@ -184,7 +184,7 @@ private: String GetLabel4Command(const String& sCommand); void InitAccCfg(); - USHORT MapKeyCodeToPos( const KeyCode &rCode ) const; + sal_uInt16 MapKeyCodeToPos( const KeyCode &rCode ) const; css::uno::Reference< css::frame::XModel > SearchForAlreadyLoadedDoc(const String& sName); void StartFileDialog( WinBits nBits, const String& rTitle ); @@ -197,7 +197,7 @@ public: SfxAcceleratorConfigPage( Window *pParent, const SfxItemSet& rItemSet ); virtual ~SfxAcceleratorConfigPage(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet& ); void Apply(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& pAccMgr); @@ -214,8 +214,8 @@ public: SfxAcceleratorConfigListBox( Window *pParent, ResId &rResId ) : ListBox( pParent, rResId ) {} - void ReplaceEntry( USHORT nPos, const String &rStr ); - void ExpandEntry ( USHORT nPos, const String &rStr ); + void ReplaceEntry( sal_uInt16 nPos, const String &rStr ); + void ExpandEntry ( sal_uInt16 nPos, const String &rStr ); }; class SvxShortcutAssignDlg : public SfxSingleTabDialog diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx index aea3e5a16ffb..34fada956c86 100644 --- a/cui/source/inc/align.hxx +++ b/cui/source/inc/align.hxx @@ -52,7 +52,7 @@ public: virtual ~AlignmentTabPage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); virtual void Reset( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet ); diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx index c2ba66766292..7fe4483e5256 100644 --- a/cui/source/inc/autocdlg.hxx +++ b/cui/source/inc/autocdlg.hxx @@ -53,7 +53,7 @@ public: OfaAutoCorrDlg(Window* pParent, const SfxItemSet *pSet ); - void EnableLanguage(BOOL bEnable) + void EnableLanguage(sal_Bool bEnable) { aLanguageFT.Enable(bEnable); aLanguageLB.Enable(bEnable);} @@ -87,14 +87,14 @@ class OfaACorrCheckListBox : public SvxSimpleTable OfaACorrCheckListBox(Window* pParent, const ResId& rResId ) : SvxSimpleTable( pParent, rResId ){} - inline void *GetUserData(ULONG nPos) { return GetEntry(nPos)->GetUserData(); } - inline void SetUserData(ULONG nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); } - inline ULONG GetSelectEntryPos() { return GetModel()->GetAbsPos(FirstSelected()); } + inline void *GetUserData(sal_uLong nPos) { return GetEntry(nPos)->GetUserData(); } + inline void SetUserData(sal_uLong nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); } + inline sal_uLong GetSelectEntryPos() { return GetModel()->GetAbsPos(FirstSelected()); } - BOOL IsChecked(ULONG nPos, USHORT nCol = 0); - void CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked); - SvButtonState GetCheckButtonState( SvLBoxEntry*, USHORT nCol ) const; - void SetCheckButtonState( SvLBoxEntry*, USHORT nCol, SvButtonState ); + sal_Bool IsChecked(sal_uLong nPos, sal_uInt16 nCol = 0); + void CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked); + SvButtonState GetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol ) const; + void SetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol, SvButtonState ); }; // class OfaAutocorrOptionsPage ------------------------------------------ @@ -124,7 +124,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void ActivatePage( const SfxItemSet& ); @@ -171,13 +171,13 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage Font aBulletFont; Font aByInputBulletFont; - USHORT nPercent; + sal_uInt16 nPercent; SvLBoxButtonData* pCheckButtonData; DECL_LINK(SelectHdl, OfaACorrCheckListBox*); DECL_LINK(EditHdl, PushButton*); - SvLBoxEntry* CreateEntry(String& rTxt, USHORT nCol); + SvLBoxEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); OfaSwAutoFmtOptionsPage( Window* pParent, @@ -187,7 +187,7 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void ActivatePage( const SfxItemSet& ); }; @@ -197,16 +197,16 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage class AutoCorrEdit : public Edit { Link aActionLink; - BOOL bSpaces; + sal_Bool bSpaces; public: AutoCorrEdit(Window* pParent, const ResId& rResId) : - Edit(pParent, rResId), bSpaces(FALSE){} + Edit(pParent, rResId), bSpaces(sal_False){} void SetActionHdl( const Link& rLink ) { aActionLink = rLink;} - void SetSpaces(BOOL bSet) + void SetSpaces(sal_Bool bSet) {bSpaces = bSet;} virtual void KeyInput( const KeyEvent& rKEvent ); @@ -243,16 +243,16 @@ private: CharClass* pCharClass; LanguageType eLang; - BOOL bHasSelectionText; - BOOL bFirstSelect:1; - BOOL bReplaceEditChanged:1; - BOOL bSWriter:1; + sal_Bool bHasSelectionText; + sal_Bool bFirstSelect:1; + sal_Bool bReplaceEditChanged:1; + sal_Bool bSWriter:1; DECL_LINK(SelectHdl, SvTabListBox*); DECL_LINK(NewDelHdl, PushButton*); DECL_LINK(ModifyHdl, Edit*); - void RefillReplaceBox(BOOL bFromReset, //Box mit neuer Sprache fuellen + void RefillReplaceBox(sal_Bool bFromReset, //Box mit neuer Sprache fuellen LanguageType eOldLanguage, LanguageType eNewLanguage); @@ -263,7 +263,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void ActivatePage( const SfxItemSet& ); virtual int DeactivatePage( SfxItemSet* pSet = 0 ); @@ -305,7 +305,7 @@ private: DECL_LINK(SelectHdl, ListBox*); DECL_LINK(ModifyHdl, Edit*); - void RefillReplaceBoxes(BOOL bFromReset, //Box mit neuer Sprache fuellen + void RefillReplaceBoxes(sal_Bool bFromReset, //Box mit neuer Sprache fuellen LanguageType eOldLanguage, LanguageType eNewLanguage); public: @@ -315,7 +315,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void ActivatePage( const SfxItemSet& ); virtual int DeactivatePage( SfxItemSet* pSet = 0 ); @@ -380,7 +380,7 @@ private: String ChangeStringExt_Impl( sal_UCS4 ); - SvLBoxEntry* CreateEntry(String& rTxt, USHORT nCol); + SvLBoxEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ); public: @@ -389,7 +389,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void ActivatePage( const SfxItemSet& ); }; @@ -428,7 +428,7 @@ class OfaAutoCompleteTabPage : public SfxTabPage AutoCompleteMultiListBox aLBEntries; PushButton aPBEntries; SvStringsISortDtor* pAutoCmpltList; - USHORT nAutoCmpltListCnt; + sal_uInt16 nAutoCmpltListCnt; DECL_LINK( CheckHdl, CheckBox* ); @@ -440,7 +440,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void ActivatePage( const SfxItemSet& ); @@ -507,7 +507,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void ActivatePage( const SfxItemSet& ); }; diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx index 78e545e5e51a..01172af4a435 100644 --- a/cui/source/inc/backgrnd.hxx +++ b/cui/source/inc/backgrnd.hxx @@ -65,17 +65,17 @@ class SvxBackgroundTabPage : public SvxTabPage using TabPage::DeactivatePage; public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); void ShowSelector(); // Umschalt-ListBox aktivieren void ShowTblControl(); // fuer den Writer (Zellen/Zeilen/Tabelle) - void ShowParaControl(BOOL bCharOnly = FALSE); // fuer den Writer (Absatz/Zeichen) - void EnableTransparency(BOOL bColor, BOOL bGraphic); + void ShowParaControl(sal_Bool bCharOnly = sal_False); // fuer den Writer (Absatz/Zeichen) + void EnableTransparency(sal_Bool bColor, sal_Bool bGraphic); virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 protected: virtual int DeactivatePage( SfxItemSet* pSet = 0 ); @@ -122,13 +122,13 @@ private: //------------------------------------------------------ Color aBgdColor; - USHORT nHtmlMode; - BOOL bAllowShowSelector : 1; - BOOL bIsGraphicValid : 1; - BOOL bLinkOnly : 1; - BOOL bResized : 1; - BOOL bColTransparency : 1; - BOOL bGraphTransparency : 1; + sal_uInt16 nHtmlMode; + sal_Bool bAllowShowSelector : 1; + sal_Bool bIsGraphicValid : 1; + sal_Bool bLinkOnly : 1; + sal_Bool bResized : 1; + sal_Bool bColTransparency : 1; + sal_Bool bGraphTransparency : 1; Graphic aBgdGraphic; String aBgdGraphicPath; String aBgdGraphicFilter; @@ -145,13 +145,13 @@ private: void FillColorValueSets_Impl(); void ShowColorUI_Impl(); void ShowBitmapUI_Impl(); - BOOL LoadLinkedGraphic_Impl(); + sal_Bool LoadLinkedGraphic_Impl(); void RaiseLoadError_Impl(); void SetGraphicPosition_Impl( SvxGraphicPosition ePos ); SvxGraphicPosition GetGraphicPosition_Impl(); void FillControls_Impl(const SvxBrushItem& rBgdAttr, const String& rUserData); - BOOL FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, USHORT nSlot); + sal_Bool FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, sal_uInt16 nSlot); void ResetFromWallpaperItem( const SfxItemSet& rSet ); DECL_LINK( LoadTimerHdl_Impl, Timer* ); diff --git a/cui/source/inc/bbdlg.hxx b/cui/source/inc/bbdlg.hxx index 249c9c427485..575e744d8ddf 100644 --- a/cui/source/inc/bbdlg.hxx +++ b/cui/source/inc/bbdlg.hxx @@ -40,15 +40,15 @@ class SvxBorderBackgroundDlg: public SfxTabDialog public: SvxBorderBackgroundDlg( Window *pParent, const SfxItemSet& rCoreSet, - BOOL bEnableSelector = FALSE ); + sal_Bool bEnableSelector = sal_False ); ~SvxBorderBackgroundDlg(); protected: - virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage ); + virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ); private: - BOOL bEnableBackgroundSelector; // fuer Border/Background-Dlg + sal_Bool bEnableBackgroundSelector; // fuer Border/Background-Dlg }; diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx index 33ea94ff4478..d62083b37d77 100644 --- a/cui/source/inc/border.hxx +++ b/cui/source/inc/border.hxx @@ -52,9 +52,9 @@ class SvxBorderTabPage : public SfxTabPage public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rCoreAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& rCoreAttrs ); virtual void Reset( const SfxItemSet& ); void HideShadowControls(); @@ -122,7 +122,7 @@ private: bool mbBLTREnabled; /// true = Bottom-left to top-right border enabled. bool mbUseMarginItem; - static BOOL bSync; + static sal_Bool bSync; #ifdef _SVX_BORDER_CXX // Handler @@ -134,8 +134,8 @@ private: DECL_LINK( ModifyDistanceHdl_Impl, MetricField*); DECL_LINK( SyncHdl_Impl, CheckBox*); - USHORT GetPresetImageId( USHORT nValueSetIdx ) const; - USHORT GetPresetStringId( USHORT nValueSetIdx ) const; + sal_uInt16 GetPresetImageId( sal_uInt16 nValueSetIdx ) const; + sal_uInt16 GetPresetStringId( sal_uInt16 nValueSetIdx ) const; void FillPresetVS(); void FillShadowVS(); diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 8d63c5f8dd49..13c1289bda48 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -75,7 +75,7 @@ public: SvxConfigDialog( Window*, const SfxItemSet* ); ~SvxConfigDialog(); - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); virtual short Ok(); void SetFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame); @@ -121,7 +121,7 @@ public: const com::sun::star::uno::Reference < com::sun::star::uno::XInterface >& xManager ); - void SetModified( bool bValue = TRUE ) { bModified = bValue; } + void SetModified( bool bValue = sal_True ) { bModified = bValue; } bool IsModified( ) { return bModified; } bool IsReadOnly( ) { return bReadOnly; } @@ -220,7 +220,7 @@ public: // methods inherited from SaveInData SvxEntries* GetEntries(); void SetEntries( SvxEntries* ); - bool HasURL( const rtl::OUString& URL ) { (void)URL; return FALSE; } + bool HasURL( const rtl::OUString& URL ) { (void)URL; return sal_False; } bool HasSettings() { return m_xMenuSettings.is(); } void Reset(); bool Apply(); @@ -231,7 +231,7 @@ class SvxConfigEntry private: // common properties - USHORT nId; + sal_uInt16 nId; ::rtl::OUString aHelpText; ::rtl::OUString aLabel; ::rtl::OUString aCommand; @@ -258,18 +258,18 @@ public: SvxConfigEntry( const ::rtl::OUString& rDisplayName, const ::rtl::OUString& rCommandURL, - bool bPopup = FALSE, - bool bParentData = FALSE ); + bool bPopup = sal_False, + bool bParentData = sal_False ); SvxConfigEntry() : nId( 0 ), - bPopUp( FALSE ), - bStrEdited( FALSE ), - bIsUserDefined( FALSE ), - bIsMain( FALSE ), - bIsParentData( FALSE ), - bIsVisible( TRUE ), + bPopUp( sal_False ), + bStrEdited( sal_False ), + bIsUserDefined( sal_False ), + bIsMain( sal_False ), + bIsParentData( sal_False ), + bIsVisible( sal_True ), nStyle( 0 ), pEntries( 0 ) {} @@ -280,7 +280,7 @@ public: void SetCommand( const String& rCmd ) { aCommand = rCmd; } const ::rtl::OUString& GetName() const { return aLabel; } - void SetName( const String& rStr ) { aLabel = rStr; bStrEdited = TRUE; } + void SetName( const String& rStr ) { aLabel = rStr; bStrEdited = sal_True; } bool HasChangedName() const { return bStrEdited; } const ::rtl::OUString& GetHelpText() ; @@ -289,10 +289,10 @@ public: const ::rtl::OUString& GetHelpURL() const { return aHelpURL; } void SetHelpURL( const String& rStr ) { aHelpURL = rStr; } - void SetPopup( bool bOn = TRUE ) { bPopUp = bOn; } + void SetPopup( bool bOn = sal_True ) { bPopUp = bOn; } bool IsPopup() const { return bPopUp; } - void SetUserDefined( bool bOn = TRUE ) { bIsUserDefined = bOn; } + void SetUserDefined( bool bOn = sal_True ) { bIsUserDefined = bOn; } bool IsUserDefined() const { return bIsUserDefined; } bool IsBinding() const { return !bPopUp; } @@ -302,10 +302,10 @@ public: void SetEntries( SvxEntries* entries ) { pEntries = entries; } bool HasEntries() const { return pEntries != NULL; } - void SetMain( bool bValue = TRUE ) { bIsMain = bValue; } + void SetMain( bool bValue = sal_True ) { bIsMain = bValue; } bool IsMain() { return bIsMain; } - void SetParentData( bool bValue = TRUE ) { bIsParentData = bValue; } + void SetParentData( bool bValue = sal_True ) { bIsParentData = bValue; } bool IsParentData() { return bIsParentData; } bool IsMovable(); @@ -345,13 +345,13 @@ public: virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); - virtual BOOL NotifyAcceptDrop( SvLBoxEntry* pEntry ); + virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* pEntry ); - virtual BOOL NotifyMoving( SvLBoxEntry*, SvLBoxEntry*, - SvLBoxEntry*&, ULONG& ); + virtual sal_Bool NotifyMoving( SvLBoxEntry*, SvLBoxEntry*, + SvLBoxEntry*&, sal_uLong& ); - virtual BOOL NotifyCopying( SvLBoxEntry*, SvLBoxEntry*, - SvLBoxEntry*&, ULONG&); + virtual sal_Bool NotifyCopying( SvLBoxEntry*, SvLBoxEntry*, + SvLBoxEntry*&, sal_uLong&); virtual DragDropMode NotifyStartDrag( TransferDataContainer&, SvLBoxEntry* ); @@ -444,13 +444,13 @@ protected: SvLBoxEntry* InsertEntry( SvxConfigEntry* pNewEntryData, SvLBoxEntry* pTarget = NULL, - bool bFront = FALSE ); + bool bFront = sal_False ); void AddSubMenusToUI( const String& rBaseTitle, SvxConfigEntry* pParentData ); SvLBoxEntry* InsertEntryIntoUI ( SvxConfigEntry* pNewEntryData, - ULONG nPos = LIST_APPEND ); + sal_uLong nPos = LIST_APPEND ); SvxEntries* FindParentForChild( SvxEntries* pParentEntries, SvxConfigEntry* pChildData ); @@ -464,15 +464,15 @@ public: SaveInData* GetSaveInData() { return pCurrentSaveInData; } SvLBoxEntry* AddFunction( SvLBoxEntry* pTarget = NULL, - bool bFront = FALSE, - bool bAllowDuplicates = FALSE ); + bool bFront = sal_False, + bool bAllowDuplicates = sal_False ); virtual void MoveEntry( bool bMoveUp ); bool MoveEntryData( SvLBoxEntry* pSourceEntry, SvLBoxEntry* pTargetEntry ); - BOOL FillItemSet( SfxItemSet& ); + sal_Bool FillItemSet( SfxItemSet& ); void Reset( const SfxItemSet& ); virtual bool DeleteSelectedContent() = 0; @@ -554,7 +554,7 @@ class SvxMainMenuOrganizerDialog : public ModalDialog public: SvxMainMenuOrganizerDialog ( Window*, SvxEntries*, - SvxConfigEntry*, bool bCreateMenu = FALSE ); + SvxConfigEntry*, bool bCreateMenu = sal_False ); ~SvxMainMenuOrganizerDialog (); @@ -568,7 +568,7 @@ class SvxToolbarEntriesListBox : public SvxMenuEntriesListBox Size m_aCheckBoxImageSizePixel; Link m_aChangedListener; SvLBoxButtonData* m_pButtonData; - BOOL m_bHiContrastMode; + sal_Bool m_bHiContrastMode; SvxConfigPage* pPage; void ChangeVisibility( SvLBoxEntry* pEntry ); @@ -596,11 +596,11 @@ public: Size GetCheckBoxPixelSize() const { return m_aCheckBoxImageSizePixel; } - virtual BOOL NotifyMoving( - SvLBoxEntry*, SvLBoxEntry*, SvLBoxEntry*&, ULONG& ); + virtual sal_Bool NotifyMoving( + SvLBoxEntry*, SvLBoxEntry*, SvLBoxEntry*&, sal_uLong& ); - virtual BOOL NotifyCopying( - SvLBoxEntry*, SvLBoxEntry*, SvLBoxEntry*&, ULONG&); + virtual sal_Bool NotifyCopying( + SvLBoxEntry*, SvLBoxEntry*, SvLBoxEntry*&, sal_uLong&); void KeyInput( const KeyEvent& rKeyEvent ); }; @@ -629,8 +629,8 @@ public: ~SvxToolbarConfigPage(); SvLBoxEntry* AddFunction( SvLBoxEntry* pTarget = NULL, - bool bFront = FALSE, - bool bAllowDuplicates = TRUE ); + bool bFront = sal_False, + bool bAllowDuplicates = sal_True ); void MoveEntry( bool bMoveUp ); @@ -803,7 +803,7 @@ public: const rtl::OUString& aMessage ); rtl::OUString ReplaceIconName( const rtl::OUString& ); - USHORT ShowDialog(); + sal_uInt16 ShowDialog(); }; //added for issue83555 class SvxIconChangeDialog : public ModalDialog diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx index 944fca908b8a..8f80928c33ed 100644 --- a/cui/source/inc/cfgutil.hxx +++ b/cui/source/inc/cfgutil.hxx @@ -50,7 +50,6 @@ class SfxSlotPool; class SfxStringItem; class SfxFontItem; class SfxMacroInfoItem; -class SfxMacroInfo; struct SfxStyleInfo_Impl; struct SfxStylesInfo_Impl; @@ -95,29 +94,27 @@ struct SfxStylesInfo_Impl static ::rtl::OUString generateCommand(const ::rtl::OUString& sFamily, const ::rtl::OUString& sStyle); }; -#define SFX_CFGGROUP_FUNCTION 1 -#define SFX_CFGGROUP_BASICMGR 2 -#define SFX_CFGGROUP_DOCBASICMGR 3 -#define SFX_CFGGROUP_BASICLIB 4 -#define SFX_CFGGROUP_BASICMOD 5 -#define SFX_CFGFUNCTION_MACRO 6 -#define SFX_CFGFUNCTION_SLOT 7 -#define SFX_CFGGROUP_SCRIPTCONTAINER 8 -#define SFX_CFGFUNCTION_SCRIPT 9 -#define SFX_CFGGROUP_STYLES 10 -#define SFX_CFGGROUP_SPECIALCHARACTERS 11 +#define SFX_CFGGROUP_FUNCTION 1 +#define SFX_CFGFUNCTION_SLOT 2 +#define SFX_CFGGROUP_SCRIPTCONTAINER 3 +#define SFX_CFGFUNCTION_SCRIPT 4 +#define SFX_CFGGROUP_STYLES 5 struct SfxGroupInfo_Impl { - USHORT nKind; - USHORT nOrd; + sal_uInt16 nKind; + sal_uInt16 nUniqueID; void* pObject; - BOOL bWasOpened; + sal_Bool bWasOpened; String sCommand; String sLabel; - SfxGroupInfo_Impl( USHORT n, USHORT nr, void* pObj = 0 ) : - nKind( n ), nOrd( nr ), pObject( pObj ), bWasOpened(FALSE) {} + SfxGroupInfo_Impl( sal_uInt16 n, sal_uInt16 nr, void* pObj = 0 ) : + nKind( n ), nUniqueID( nr ), pObject( pObj ), bWasOpened(sal_False) {} +}; + +struct CuiMacroInfo +{ }; typedef SfxGroupInfo_Impl* SfxGroupInfoPtr; @@ -143,7 +140,7 @@ public: String GetHelpText( SvLBoxEntry *pEntry ); String GetCurCommand(); String GetCurLabel(); - SfxMacroInfo* GetMacroInfo(); + String GetSelectedScriptURI(); void FunctionSelected(); void SetStylesInfo(SfxStylesInfo_Impl* pStyles); }; @@ -155,9 +152,7 @@ class SfxConfigGroupListBox_Impl : public SvTreeListBox //SfxSlotPool* pSlotPool; SfxConfigFunctionListBox_Impl* pFunctionListBox; SfxGroupInfoArr_Impl aArr; - ULONG nMode; - BOOL bShowSF; // show Scripting Framework scripts - BOOL bShowBasic; // show Basic scripts + sal_uLong nMode; ::rtl::OUString m_sModuleLongName; css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR; @@ -181,12 +176,12 @@ class SfxConfigGroupListBox_Impl : public SvTreeListBox protected: virtual void RequestingChilds( SvLBoxEntry *pEntry); using SvListView::Expand; - virtual BOOL Expand( SvLBoxEntry* pParent ); + virtual sal_Bool Expand( SvLBoxEntry* pParent ); public: SfxConfigGroupListBox_Impl ( Window* pParent, const ResId&, - ULONG nConfigMode = 0 ); + sal_uLong nConfigMode = 0 ); ~SfxConfigGroupListBox_Impl(); void ClearAll(); @@ -195,14 +190,11 @@ public: const ::rtl::OUString& sModuleLongName); void SetFunctionListBox( SfxConfigFunctionListBox_Impl *pBox ) { pFunctionListBox = pBox; } - void Open( SvLBoxEntry*, BOOL ); + void Open( SvLBoxEntry*, sal_Bool ); void GroupSelected(); void SelectMacro( const SfxMacroInfoItem* ); - void AddAndSelect( const SfxStringItem*, const SfxStringItem* ); void SelectMacro( const String&, const String& ); String GetGroup(); - BasicManager* GetBasicManager( const SvLBoxEntry& _rEntry ); - void SetScriptType( const String& rScriptType ); void SetStylesInfo(SfxStylesInfo_Impl* pStyles); }; diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index 315a78e70a03..29fcdb13b63a 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -43,13 +43,13 @@ class FontList; // ----------------------------------------------------------------------- -#define DISABLE_CASEMAP ((USHORT)0x0001) -#define DISABLE_WORDLINE ((USHORT)0x0002) -#define DISABLE_BLINK ((USHORT)0x0004) -#define DISABLE_UNDERLINE_COLOR ((USHORT)0x0008) +#define DISABLE_CASEMAP ((sal_uInt16)0x0001) +#define DISABLE_WORDLINE ((sal_uInt16)0x0002) +#define DISABLE_BLINK ((sal_uInt16)0x0004) +#define DISABLE_UNDERLINE_COLOR ((sal_uInt16)0x0008) -#define DISABLE_LANGUAGE ((USHORT)0x0010) -#define DISABLE_HIDE_LANGUAGE ((USHORT)0x0020) +#define DISABLE_LANGUAGE ((sal_uInt16)0x0010) +#define DISABLE_HIDE_LANGUAGE ((sal_uInt16)0x0020) // class SvxCharBasePage ------------------------------------------------- @@ -59,18 +59,18 @@ protected: SvxFontPrevWindow m_aPreviewWin; FixedInfo m_aFontTypeFT; - BOOL m_bPreviewBackgroundToCharacter; + sal_Bool m_bPreviewBackgroundToCharacter; SvxCharBasePage( Window* pParent, const ResId& rResIdTabPage, const SfxItemSet&, - USHORT nResIdPrewievWin, USHORT nResIdFontTypeFT ); + sal_uInt16 nResIdPrewievWin, sal_uInt16 nResIdFontTypeFT ); virtual ~SvxCharBasePage(); - void SetPrevFontSize( const SfxItemSet& rSet, USHORT nSlot, SvxFont& rFont ); - void SetPrevFont( const SfxItemSet& rSet, USHORT nSlot, SvxFont& rFont ); - void SetPrevFontStyle( const SfxItemSet& rSet, USHORT nSlotPosture, USHORT nSlotWeight, SvxFont& rFont ); // posture/weight + void SetPrevFontSize( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont ); + void SetPrevFont( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont ); + void SetPrevFontStyle( const SfxItemSet& rSet, sal_uInt16 nSlotPosture, sal_uInt16 nSlotWeight, SvxFont& rFont ); // posture/weight void SetPrevFontWidthScale( const SfxItemSet& rSet ); - void SetPrevFontEscapement( BYTE nProp, BYTE nEscProp, short nEsc ); + void SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ); inline SvxFont& GetPreviewFont(); inline SvxFont& GetPreviewCJKFont(); @@ -153,7 +153,7 @@ private: }; void Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp ); - BOOL FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ); + sal_Bool FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ); void ResetColor_Impl( const SfxItemSet& rSet ); DECL_LINK( UpdateHdl_Impl, Timer* ); @@ -171,10 +171,10 @@ public: ~SvxCharNamePage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); virtual void Reset( const SfxItemSet& rSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); void SetFontList( const SvxFontListItem& rItem ); void EnableRelativeMode(); @@ -182,7 +182,7 @@ public: // the writer uses SID_ATTR_BRUSH as font background void SetPreviewBackgroundToCharacter(); - void DisableControls( USHORT nDisable ); + void DisableControls( sal_uInt16 nDisable ); virtual void PageCreated (SfxAllItemSet aSet); }; @@ -233,7 +233,7 @@ private: FixedText m_aPositionFT; ListBox m_aPositionLB; - USHORT m_nHtmlMode; + sal_uInt16 m_nHtmlMode; String m_aTransparentColorName; @@ -243,7 +243,7 @@ private: void UpdatePreview_Impl(); void SetCaseMap_Impl( SvxCaseMap eCaseMap ); void ResetColor_Impl( const SfxItemSet& rSet ); - BOOL FillItemSetColor_Impl( SfxItemSet& rSet ); + sal_Bool FillItemSetColor_Impl( SfxItemSet& rSet ); DECL_LINK( SelectHdl_Impl, ListBox* ); DECL_LINK( CbClickHdl_Impl, CheckBox* ); @@ -260,12 +260,12 @@ public: public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); virtual void Reset( const SfxItemSet& rSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); - void DisableControls( USHORT nDisable ); + void DisableControls( sal_uInt16 nDisable ); void EnableFlash(); // the writer uses SID_ATTR_BRUSH as font background void SetPreviewBackgroundToCharacter(); @@ -305,17 +305,17 @@ private: short m_nSuperEsc; short m_nSubEsc; - UINT16 m_nScaleWidthItemSetVal; - UINT16 m_nScaleWidthInitialVal; + sal_uInt16 m_nScaleWidthItemSetVal; + sal_uInt16 m_nScaleWidthInitialVal; - BYTE m_nSuperProp; - BYTE m_nSubProp; + sal_uInt8 m_nSuperProp; + sal_uInt8 m_nSubProp; SvxCharPositionPage( Window* pParent, const SfxItemSet& rSet ); void Initialize(); - void UpdatePreview_Impl( BYTE nProp, BYTE nEscProp, short nEsc ); - void SetEscapement_Impl( USHORT nEsc ); + void UpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ); + void SetEscapement_Impl( sal_uInt16 nEsc ); DECL_LINK( PositionHdl_Impl, RadioButton* ); DECL_LINK( RotationHdl_Impl, RadioButton* ); @@ -337,10 +337,10 @@ public: public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); virtual void Reset( const SfxItemSet& rSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void FillUserData(); // the writer uses SID_ATTR_BRUSH as font background void SetPreviewBackgroundToCharacter(); @@ -361,15 +361,15 @@ private: FixedText m_aEndBracketFT; ListBox m_aEndBracketLB; - USHORT m_nStartBracketPosition; - USHORT m_nEndBracketPosition; + sal_uInt16 m_nStartBracketPosition; + sal_uInt16 m_nEndBracketPosition; SvxCharTwoLinesPage( Window* pParent, const SfxItemSet& rSet ); void UpdatePreview_Impl(); void Initialize(); void SelectCharacter( ListBox* pBox ); - void SetBracket( sal_Unicode cBracket, BOOL bStart ); + void SetBracket( sal_Unicode cBracket, sal_Bool bStart ); DECL_LINK( TwoLinesHdl_Impl, CheckBox* ); DECL_LINK( CharacterMapHdl_Impl, ListBox* ); @@ -383,10 +383,10 @@ public: public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); virtual void Reset( const SfxItemSet& rSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); // the writer uses SID_ATTR_BRUSH as font background void SetPreviewBackgroundToCharacter(); virtual void PageCreated (SfxAllItemSet aSet); diff --git a/cui/source/inc/connect.hxx b/cui/source/inc/connect.hxx index 88e30ac7dd7a..75f6a11d2e52 100644 --- a/cui/source/inc/connect.hxx +++ b/cui/source/inc/connect.hxx @@ -88,9 +88,9 @@ public: ~SvxConnectionPage(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); void Construct(); diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx index 805f90313e29..eb9a9c91c0eb 100644 --- a/cui/source/inc/cuicharmap.hxx +++ b/cui/source/inc/cuicharmap.hxx @@ -60,7 +60,7 @@ class SvxShowText : public Control public: SvxShowText( Window* pParent, const ResId& rResId, - BOOL bCenter = FALSE ); + sal_Bool bCenter = sal_False ); ~SvxShowText(); void SetFont( const Font& rFont ); @@ -71,14 +71,14 @@ protected: private: long mnY; - BOOL mbCenter; + sal_Bool mbCenter; }; class SvxCharMapData { public: - SvxCharMapData( class SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pResContext ); + SvxCharMapData( class SfxModalDialog* pDialog, sal_Bool bOne_, ResMgr* pResContext ); void SetCharFont( const Font& rFont ); @@ -103,7 +103,7 @@ friend class SvxCharacterMap; FixedText aCharCodeText; // FixedText aAssignText; Font aFont; - BOOL bOne; + sal_Bool bOne; const SubsetMap* pSubsetMap; DECL_LINK( OKHdl, OKButton* ); @@ -123,7 +123,7 @@ private: SvxCharMapData* mpCharMapData; public: - SvxCharacterMap( Window* pParent, BOOL bOne=TRUE, const SfxItemSet* pSet=0 ); + SvxCharacterMap( Window* pParent, sal_Bool bOne=sal_True, const SfxItemSet* pSet=0 ); ~SvxCharacterMap(); void DisableFontSelection(); diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 954866383c4b..459e927eff3e 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -82,7 +82,7 @@ private: void ImplSearch( const INetURLObject& rStartURL, const ::std::vector< String >& rFormats, - BOOL bRecursive ); + sal_Bool bRecursive ); virtual void SAL_CALL run(); virtual void SAL_CALL onTerminated(); @@ -243,7 +243,7 @@ public: GalleryIdDialog( Window* pParent, GalleryTheme* pThm ); ~GalleryIdDialog() {} - ULONG GetId() const { return aLbResName.GetSelectEntryPos(); } + sal_uLong GetId() const { return aLbResName.GetSelectEntryPos(); } }; // -------------------------- @@ -254,7 +254,7 @@ class GalleryThemeProperties : public SfxTabDialog { ExchangeData* pData; - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); public: @@ -285,7 +285,7 @@ private: ExchangeData* pData; virtual void Reset( const SfxItemSet& ) {} - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); public: @@ -325,19 +325,19 @@ class TPGalleryThemeProperties : public SfxTabPage String aLastFilterName; String aPreviewString; INetURLObject aURL; - USHORT nCurFilterPos; - USHORT nFirstExtFilterPos; - BOOL bEntriesFound; - BOOL bInputAllowed; - BOOL bTakeAll; - BOOL bSearchRecursive; + sal_uInt16 nCurFilterPos; + sal_uInt16 nFirstExtFilterPos; + sal_Bool bEntriesFound; + sal_Bool bInputAllowed; + sal_Bool bTakeAll; + sal_Bool bSearchRecursive; ::com::sun::star::uno::Reference< ::svt::DialogClosedListener > xDialogListener; ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > xMediaPlayer; ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFolderPicker > xFolderPicker; virtual void Reset( const SfxItemSet& /*rSet*/ ) {} - virtual BOOL FillItemSet( SfxItemSet& /*rSet*/ ) { return TRUE; } + virtual sal_Bool FillItemSet( SfxItemSet& /*rSet*/ ) { return sal_True; } ::rtl::OUString addExtension( const ::rtl::OUString&, const ::rtl::OUString& ); void FillFilterList(); diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx index e7f9047af5ca..455ebd021f4c 100644 --- a/cui/source/inc/cuigrfflt.hxx +++ b/cui/source/inc/cuigrfflt.hxx @@ -61,7 +61,7 @@ class SvxGraphicFilter { public: - static ULONG ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& rFilterObject ); + static sal_uLong ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& rFilterObject ); static void DisableGraphicFilterSlots( SfxItemSet& rSet ); }; */ @@ -136,13 +136,13 @@ private: public: GraphicFilterMosaic( Window* pParent, const Graphic& rGraphic, - USHORT nTileWidth, USHORT nTileHeight, BOOL bEnhanceEdges ); + sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges ); ~GraphicFilterMosaic(); virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ); long GetTileWidth() const { return static_cast<long>(maMtrWidth.GetValue()); } long GetTileHeight() const { return static_cast<long>(maMtrHeight.GetValue()); } - BOOL IsEnhanceEdges() const { return maCbxEdges.IsChecked(); } + sal_Bool IsEnhanceEdges() const { return maCbxEdges.IsChecked(); } }; // ------------------------- @@ -160,12 +160,12 @@ private: public: GraphicFilterSolarize( Window* pParent, const Graphic& rGraphic, - BYTE nGreyThreshold, BOOL bInvert ); + sal_uInt8 nGreyThreshold, sal_Bool bInvert ); ~GraphicFilterSolarize(); virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ); - BYTE GetGreyThreshold() const { return( (BYTE) FRound( maMtrThreshold.GetValue() * 2.55 ) ); } - BOOL IsInvert() const { return maCbxInvert.IsChecked(); } + sal_uInt8 GetGreyThreshold() const { return( (sal_uInt8) FRound( maMtrThreshold.GetValue() * 2.55 ) ); } + sal_Bool IsInvert() const { return maCbxInvert.IsChecked(); } }; // ---------------------- @@ -182,12 +182,12 @@ private: public: GraphicFilterSepia( Window* pParent, const Graphic& rGraphic, - USHORT nSepiaPercent ); + sal_uInt16 nSepiaPercent ); ~GraphicFilterSepia(); virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ); - USHORT GetSepiaPercent() const - { return sal::static_int_cast< USHORT >(maMtrSepia.GetValue()); } + sal_uInt16 GetSepiaPercent() const + { return sal::static_int_cast< sal_uInt16 >(maMtrSepia.GetValue()); } }; // ----------------------- @@ -204,11 +204,11 @@ private: public: GraphicFilterPoster( Window* pParent, const Graphic& rGraphic, - USHORT nPosterColorCount ); + sal_uInt16 nPosterColorCount ); ~GraphicFilterPoster(); virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ); - USHORT GetPosterColorCount() const { return( (USHORT) maNumPoster.GetValue() ); } + sal_uInt16 GetPosterColorCount() const { return( (sal_uInt16) maNumPoster.GetValue() ); } }; // ----------------------- diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx index d7747385cce3..73aa971ef617 100644 --- a/cui/source/inc/cuihyperdlg.hxx +++ b/cui/source/inc/cuihyperdlg.hxx @@ -54,9 +54,9 @@ private : SfxStatusForwarder aRdOnlyForwarder; public : - SvxHlinkCtrl( USHORT nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg); + SvxHlinkCtrl( sal_uInt16 nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg); - virtual void StateChanged( USHORT nSID, SfxItemState eState, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); }; @@ -91,7 +91,7 @@ private: DECL_LINK (ClickCloseHdl_Impl, void * ); protected: - virtual BOOL Close(); + virtual sal_Bool Close(); virtual void Move(); // virtual long PreNotify( NotifyEvent& rNEvt ); @@ -99,12 +99,12 @@ public: SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings ); ~SvxHpLinkDlg (); - virtual void PageCreated( USHORT nId, IconChoicePage& rPage ); + virtual void PageCreated( sal_uInt16 nId, IconChoicePage& rPage ); - USHORT SetPage( SvxHyperlinkItem* pItem ); + sal_uInt16 SetPage( SvxHyperlinkItem* pItem ); void EnableInetBrowse( sal_Bool bEnable = sal_True ); void SetReadOnlyMode( sal_Bool bReadOnly = sal_False ); - inline BOOL IsHTMLDoc() const { return mbIsHTMLDoc; } + inline sal_Bool IsHTMLDoc() const { return mbIsHTMLDoc; } inline SfxBindings* GetBindings() const { return mpBindings; }; inline SfxDispatcher* GetDispatcher() const { return mpBindings->GetDispatcher(); } diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx index e978edbdc1af..4e275d1583db 100644 --- a/cui/source/inc/cuioptgenrl.hxx +++ b/cui/source/inc/cuioptgenrl.hxx @@ -118,7 +118,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/inc/cuisrchdlg.hxx b/cui/source/inc/cuisrchdlg.hxx index d1b835cd1966..76243b6a6046 100644 --- a/cui/source/inc/cuisrchdlg.hxx +++ b/cui/source/inc/cuisrchdlg.hxx @@ -50,7 +50,7 @@ class SvxJSearchOptionsPage; class SvxJSearchOptionsDialog : public SfxSingleTabDialog { - INT32 nInitialTlFlags; + sal_Int32 nInitialTlFlags; SvxJSearchOptionsPage *pPage; // disallow copy-constructor and assignment-operator for now @@ -60,13 +60,13 @@ class SvxJSearchOptionsDialog : public SfxSingleTabDialog public: SvxJSearchOptionsDialog( Window *pParent, const SfxItemSet& rOptionsSet, - INT32 nInitialFlags ); + sal_Int32 nInitialFlags ); virtual ~SvxJSearchOptionsDialog(); // Window virtual void Activate(); - INT32 GetTransliterationFlags() const; + sal_Int32 GetTransliterationFlags() const; }; #endif diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index c2ad3f7cc4a3..1c109923b147 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -59,13 +59,13 @@ private: ChangeType mnGradientListState; ChangeType mnHatchingListState; - USHORT mnPageType; - USHORT mnDlgType; - USHORT mnPos; - BOOL mbAreaTP; - BOOL mbDeleteColorTable; + sal_uInt16 mnPageType; + sal_uInt16 mnDlgType; + sal_uInt16 mnPos; + sal_Bool mbAreaTP; + sal_Bool mbDeleteColorTable; - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); protected: virtual short Ok(); @@ -102,7 +102,7 @@ public: XBitmapList* GetNewBitmapList() const { return mpNewBitmapList; } const XBitmapList* GetBitmapList() const { return mpBitmapList; } - void DontDeleteColorTable() { mbDeleteColorTable = FALSE; } + void DontDeleteColorTable() { mbDeleteColorTable = sal_False; } }; /************************************************************************* @@ -119,10 +119,10 @@ class SvxTransparenceTabPage : public SvxTabPage const SfxItemSet& rOutAttrs; RECT_POINT eRP; - //CHINA001 UINT16* pPageType; - //CHINA001 UINT16* pDlgType; - UINT16 nPageType; //add CHINA001 - UINT16 nDlgType; //add CHINA001 + //CHINA001 sal_uInt16* pPageType; + //CHINA001 sal_uInt16* pDlgType; + sal_uInt16 nPageType; //add CHINA001 + sal_uInt16 nDlgType; //add CHINA001 // main selection FixedLine aFlProp; @@ -152,7 +152,7 @@ class SvxTransparenceTabPage : public SvxTabPage // preview SvxXRectPreview aCtlBitmapPreview; SvxXRectPreview aCtlXRectPreview; - BOOL bBitmap; + sal_Bool bBitmap; XOutdevItemPool* pXPool; XFillAttrSetItem aXFillAttr; @@ -167,30 +167,30 @@ class SvxTransparenceTabPage : public SvxTabPage DECL_LINK(ModifiedTrgrHdl_Impl, void*); #endif - void ActivateLinear(BOOL bActivate); - void ActivateGradient(BOOL bActivate); + void ActivateLinear(sal_Bool bActivate); + void ActivateGradient(sal_Bool bActivate); void SetControlState_Impl(XGradientStyle eXGS); - BOOL InitPreview ( const SfxItemSet& rSet ); - void InvalidatePreview (BOOL bEnable = TRUE ); + sal_Bool InitPreview ( const SfxItemSet& rSet ); + void InvalidatePreview (sal_Bool bEnable = sal_True ); public: SvxTransparenceTabPage(Window* pParent, const SfxItemSet& rInAttrs); void Construct(); static SfxTabPage* Create(Window*, const SfxItemSet&); - static UINT16* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet(SfxItemSet&); + virtual sal_Bool FillItemSet(SfxItemSet&); virtual void Reset(const SfxItemSet&); virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet* pSet); virtual void PointChanged(Window* pWindow, RECT_POINT eRP); - //CHINA001 void SetPageType(UINT16 *pInType) { pPageType = pInType; } - //CHINA001 void SetDlgType(UINT16* pInType) { pDlgType = pInType; } - void SetPageType(UINT16 nInType) { nPageType = nInType; } //add CHINA001 - void SetDlgType(UINT16 nInType) { nDlgType = nInType; }//add CHINA001 + //CHINA001 void SetPageType(sal_uInt16 *pInType) { pPageType = pInType; } + //CHINA001 void SetDlgType(sal_uInt16* pInType) { pDlgType = pInType; } + void SetPageType(sal_uInt16 nInType) { nPageType = nInType; } //add CHINA001 + void SetDlgType(sal_uInt16 nInType) { nDlgType = nInType; }//add CHINA001 virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 }; @@ -257,14 +257,14 @@ private: ChangeType* pnGradientListState; ChangeType* pnHatchingListState; - //CHINA001 USHORT* pPageType; - //CHINA001 USHORT* pDlgType; - //CHINA001 USHORT* pPos; - UINT16 nPageType; //add CHINA001 - UINT16 nDlgType;//add CHINA001 - UINT16 nPos; //add CHINA001 + //CHINA001 sal_uInt16* pPageType; + //CHINA001 sal_uInt16* pDlgType; + //CHINA001 sal_uInt16* pPos; + sal_uInt16 nPageType; //add CHINA001 + sal_uInt16 nDlgType;//add CHINA001 + sal_uInt16 nPos; //add CHINA001 - BOOL* pbAreaTP; + sal_Bool* pbAreaTP; XOutdevItemPool* pXPool; XFillAttrSetItem aXFillAttr; @@ -298,9 +298,9 @@ public: void Construct(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet ); @@ -313,13 +313,13 @@ public: { pHatchingList = pHtchLst; } void SetBitmapList( XBitmapList* pBmpLst) { pBitmapList = pBmpLst; } - //CHINA001 void SetPageType( USHORT* pInType ) { pPageType = pInType; } - void SetPageType( UINT16 nInType ) { nPageType = nInType; } //add CHINA001 - //CHINA001 void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } - void SetDlgType( UINT16 nInType ) { nDlgType = nInType; }//add CHINA001 - //CHINA001 void SetPos( USHORT* pInPos ) { pPos = pInPos; } - void SetPos( UINT16 nInPos ) { nPos = nInPos; }//add CHINA001 - void SetAreaTP( BOOL* pIn ) { pbAreaTP = pIn; } + //CHINA001 void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } + void SetPageType( sal_uInt16 nInType ) { nPageType = nInType; } //add CHINA001 + //CHINA001 void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } + void SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }//add CHINA001 + //CHINA001 void SetPos( sal_uInt16* pInPos ) { pPos = pInPos; } + void SetPos( sal_uInt16 nInPos ) { nPos = nInPos; }//add CHINA001 + void SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; } virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } void SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; } @@ -356,12 +356,12 @@ private: XColorTable* pColorTab; ChangeType* pnColorTableState; - UINT16 nPageType; //add CHINA001 - UINT16 nDlgType; //add CHINA001 - USHORT* pPos; - BOOL* pbAreaTP; + sal_uInt16 nPageType; //add CHINA001 + sal_uInt16 nDlgType; //add CHINA001 + sal_uInt16* pPos; + sal_Bool* pbAreaTP; - BOOL bDisable; + sal_Bool bDisable; XOutdevItemPool* pXPool; XFillAttrSetItem aXFillAttr; @@ -378,23 +378,23 @@ public: void Construct(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet ); virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); void SetColorTable( XColorTable* pColTab ) { pColorTab = pColTab; } -//CHINA001 void SetPageType( USHORT* pInType ) { pPageType = pInType; } -//CHINA001 void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } - void SetPageType( UINT16 nInType ) { nPageType = nInType; } //add CHINA001 - void SetDlgType( UINT16 nInType ) { nDlgType = nInType; } //add CHINA001 - void SetAreaTP( BOOL* pIn ) { pbAreaTP = pIn; } +//CHINA001 void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } +//CHINA001 void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } + void SetPageType( sal_uInt16 nInType ) { nPageType = nInType; } //add CHINA001 + void SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; } //add CHINA001 + void SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; } void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 - void DisablePage( BOOL bIn ) { bDisable = bIn; } + void DisablePage( sal_Bool bIn ) { bDisable = bIn; } }; /************************************************************************* @@ -441,10 +441,10 @@ private: ChangeType* pnGradientListState; ChangeType* pnColorTableState; - USHORT* pPageType; - USHORT* pDlgType; - USHORT* pPos; - BOOL* pbAreaTP; + sal_uInt16* pPageType; + sal_uInt16* pDlgType; + sal_uInt16* pPos; + sal_Bool* pbAreaTP; XOutdevItemPool* pXPool; XFillStyleItem aXFStyleItem; @@ -471,7 +471,7 @@ public: void Construct(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void ActivatePage( const SfxItemSet& rSet ); @@ -481,10 +481,10 @@ public: void SetGradientList( XGradientList* pGrdLst) { pGradientList = pGrdLst; } - void SetPageType( USHORT* pInType ) { pPageType = pInType; } - void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } - void SetPos( USHORT* pInPos ) { pPos = pInPos; } - void SetAreaTP( BOOL* pIn ) { pbAreaTP = pIn; } + void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } + void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } + void SetPos( sal_uInt16* pInPos ) { pPos = pInPos; } + void SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; } void SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; } void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } @@ -528,10 +528,10 @@ private: ChangeType* pnHatchingListState; ChangeType* pnColorTableState; - USHORT* pPageType; - USHORT* pDlgType; - USHORT* pPos; - BOOL* pbAreaTP; + sal_uInt16* pPageType; + sal_uInt16* pDlgType; + sal_uInt16* pPos; + sal_Bool* pbAreaTP; XOutdevItemPool* pXPool; XFillStyleItem aXFStyleItem; @@ -559,7 +559,7 @@ public: void Construct(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void ActivatePage( const SfxItemSet& rSet ); @@ -571,10 +571,10 @@ public: void SetHatchingList( XHatchList* pHtchLst) { pHatchingList = pHtchLst; } - void SetPageType( USHORT* pInType ) { pPageType = pInType; } - void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } - void SetPos( USHORT* pInPos ) { pPos = pInPos; } - void SetAreaTP( BOOL* pIn ) { pbAreaTP = pIn; } + void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } + void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } + void SetPos( sal_uInt16* pInPos ) { pPos = pInPos; } + void SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; } void SetHtchChgd( ChangeType* pIn ) { pnHatchingListState = pIn; } void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } @@ -620,12 +620,12 @@ private: ChangeType* pnBitmapListState; ChangeType* pnColorTableState; - USHORT* pPageType; - USHORT* pDlgType; - USHORT* pPos; - BOOL* pbAreaTP; + sal_uInt16* pPageType; + sal_uInt16* pDlgType; + sal_uInt16* pPos; + sal_Bool* pbAreaTP; - BOOL bBmpChanged; + sal_Bool bBmpChanged; XOutdevItemPool* pXPool; XFillStyleItem aXFStyleItem; @@ -653,7 +653,7 @@ public: void Construct(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void ActivatePage( const SfxItemSet& rSet ); @@ -664,10 +664,10 @@ public: void SetColorTable( XColorTable* pColTab ) { pColorTab = pColTab; } void SetBitmapList( XBitmapList* pBmpLst) { pBitmapList = pBmpLst; } - void SetPageType( USHORT* pInType ) { pPageType = pInType; } - void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } - void SetPos( USHORT* pInPos ) { pPos = pInPos; } - void SetAreaTP( BOOL* pIn ) { pbAreaTP = pIn; } + void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } + void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } + void SetPos( sal_uInt16* pInPos ) { pPos = pInPos; } + void SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; } void SetBmpChgd( ChangeType* pIn ) { pnBitmapListState = pIn; } void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } @@ -730,11 +730,11 @@ private: XColorTable* pColorTab; ChangeType* pnColorTableState; - USHORT* pPageType; - USHORT* pDlgType; - USHORT* pPos; - BOOL* pbAreaTP; - BOOL bDeleteColorTable; + sal_uInt16* pPageType; + sal_uInt16* pDlgType; + sal_uInt16* pPos; + sal_Bool* pbAreaTP; + sal_Bool bDeleteColorTable; XOutdevItemPool* pXPool; XFillStyleItem aXFStyleItem; @@ -748,10 +748,10 @@ private: #ifdef _SVX_TPCOLOR_CXX void ConvertColorValues (Color& rColor, ColorModel eModell); - void RgbToCmyk_Impl( Color& rColor, USHORT& rK ); - void CmykToRgb_Impl( Color& rColor, const USHORT nKey ); - USHORT ColorToPercent_Impl( USHORT nColor ); - USHORT PercentToColor_Impl( USHORT nPercent ); + void RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK ); + void CmykToRgb_Impl( Color& rColor, const sal_uInt16 nKey ); + sal_uInt16 ColorToPercent_Impl( sal_uInt16 nColor ); + sal_uInt16 PercentToColor_Impl( sal_uInt16 nPercent ); void FillValueSet_Impl( ValueSet& rVs ); //----------------------------------------------------------------------------------------------------- @@ -777,7 +777,7 @@ public: void Construct(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void ActivatePage( const SfxItemSet& rSet ); @@ -785,14 +785,14 @@ public: void SetColorTable( XColorTable* pColTab ) { pColorTab = pColTab; } - void SetPageType( USHORT* pInType ) { pPageType = pInType; } - void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } - void SetPos( USHORT* pInPos ) { pPos = pInPos; } - void SetAreaTP( BOOL* pIn ) { pbAreaTP = pIn; } + void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } + void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } + void SetPos( sal_uInt16* pInPos ) { pPos = pInPos; } + void SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; } void SetColorChgd( ChangeType* pIn ) { pnColorTableState = pIn; } - void SetDeleteColorTable( BOOL bIn ) { bDeleteColorTable = bIn; } + void SetDeleteColorTable( sal_Bool bIn ) { bDeleteColorTable = bIn; } virtual void FillUserData(); }; diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index 933a71616039..360c2bc99750 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -49,21 +49,21 @@ private: XDashList* pNewDashList; XLineEndList* pLineEndList; XLineEndList* pNewLineEndList; - BOOL bObjSelected; + sal_Bool bObjSelected; ChangeType nLineEndListState; ChangeType nDashListState; ChangeType mnColorTableState; - USHORT nPageType; - USHORT nDlgType; - USHORT nPosDashLb; - USHORT nPosLineEndLb; - USHORT mnPos; - BOOL mbAreaTP; - BOOL mbDeleteColorTable; + sal_uInt16 nPageType; + sal_uInt16 nDlgType; + sal_uInt16 nPosDashLb; + sal_uInt16 nPosLineEndLb; + sal_uInt16 mnPos; + sal_Bool mbAreaTP; + sal_Bool mbDeleteColorTable; - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); protected: virtual short Ok(); @@ -75,7 +75,7 @@ protected: public: SvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pObj = NULL, - BOOL bHasObj = TRUE ); + sal_Bool bHasObj = sal_True ); ~SvxLineTabDialog(); void SetNewDashList( XDashList* pInLst) @@ -148,15 +148,15 @@ private: List aGrfNames; List aGrfBrushItems; String sNumCharFmtName; - BOOL bLastWidthModified; + sal_Bool bLastWidthModified; Size aSymbolLastSize; Graphic aSymbolGraphic; Size aSymbolSize; - BOOL bSymbols; + sal_Bool bSymbols; const SfxItemSet& rOutAttrs; RECT_POINT eRP; - BOOL bObjSelected; + sal_Bool bObjSelected; XOutdevItemPool* pXPool; XLineStyleItem aXLStyle; @@ -173,15 +173,15 @@ private: ChangeType* pnLineEndListState; ChangeType* pnDashListState; ChangeType* pnColorTableState; - UINT16 nPageType; //add CHINA001 - UINT16 nDlgType; //add CHINA001 - USHORT* pPosDashLb; - USHORT* pPosLineEndLb; + sal_uInt16 nPageType; //add CHINA001 + sal_uInt16 nDlgType; //add CHINA001 + sal_uInt16* pPosDashLb; + sal_uInt16* pPosLineEndLb; SfxMapUnit ePoolUnit; // #63083# - INT32 nActLineWidth; + sal_Int32 nActLineWidth; //Handler für Gallery-Popup-Menue-Button + Size DECL_LINK( GraphicHdl_Impl, MenuButton * ); @@ -201,13 +201,13 @@ private: // #116827# DECL_LINK( ChangeEdgeStyleHdl_Impl, void * ); - BOOL FillXLSet_Impl(); + sal_Bool FillXLSet_Impl(); #endif void FillListboxes(); public: - void ShowSymbolControls(BOOL bOn); + void ShowSymbolControls(sal_Bool bOn); SvxLineTabPage( Window* pParent, const SfxItemSet& rInAttrs ); virtual ~SvxLineTabPage(); @@ -216,9 +216,9 @@ public: static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet& ); virtual void ActivatePage( const SfxItemSet& rSet ); @@ -231,12 +231,12 @@ public: void SetColorTable( XColorTable* pColTab ) { pColorTab = pColTab; } void SetDashList( XDashList* pDshLst ) { pDashList = pDshLst; } void SetLineEndList( XLineEndList* pLneEndLst) { pLineEndList = pLneEndLst; } - void SetObjSelected( BOOL bHasObj ) { bObjSelected = bHasObj; } + void SetObjSelected( sal_Bool bHasObj ) { bObjSelected = bHasObj; } - void SetPageType( UINT16 nInType ) { nPageType = nInType; }//CHINA001 void SetPageType( USHORT* pInType ) { pPageType = pInType; } - void SetDlgType( UINT16 nInType ) { nDlgType = nInType; } //CHINA001 void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } - void SetPosDashLb( USHORT* pInPos ) { pPosDashLb = pInPos; } - void SetPosLineEndLb( USHORT* pInPos ) { pPosLineEndLb = pInPos; } + void SetPageType( sal_uInt16 nInType ) { nPageType = nInType; }//CHINA001 void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } + void SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; } //CHINA001 void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } + void SetPosDashLb( sal_uInt16* pInPos ) { pPosDashLb = pInPos; } + void SetPosLineEndLb( sal_uInt16* pInPos ) { pPosLineEndLb = pInPos; } void SetLineEndChgd( ChangeType* pIn ) { pnLineEndListState = pIn; } void SetDashChgd( ChangeType* pIn ) { pnDashListState = pIn; } @@ -281,7 +281,7 @@ private: const SfxItemSet& rOutAttrs; XDash aDash; - BOOL bObjSelected; + sal_Bool bObjSelected; XOutdevItemPool* pXPool; XLineStyleItem aXLStyle; @@ -294,9 +294,9 @@ private: XDashList* pDashList; ChangeType* pnDashListState; - USHORT* pPageType; - USHORT* pDlgType; - USHORT* pPosDashLb; + sal_uInt16* pPageType; + sal_uInt16* pDlgType; + sal_uInt16* pPosDashLb; SfxMapUnit ePoolUnit; FieldUnit eFUnit; @@ -326,18 +326,18 @@ public: void Construct(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet ); void SetDashList( XDashList* pDshLst ) { pDashList = pDshLst; } - void SetObjSelected( BOOL bHasObj ) { bObjSelected = bHasObj; } + void SetObjSelected( sal_Bool bHasObj ) { bObjSelected = bHasObj; } - void SetPageType( USHORT* pInType ) { pPageType = pInType; } - void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } - void SetPosDashLb( USHORT* pInPos ) { pPosDashLb = pInPos; } + void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } + void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } + void SetPosDashLb( sal_uInt16* pInPos ) { pPosDashLb = pInPos; } void SetDashChgd( ChangeType* pIn ) { pnDashListState = pIn; } @@ -371,7 +371,7 @@ private: const SfxItemSet& rOutAttrs; const SdrObject* pPolyObj; - BOOL bObjSelected; + sal_Bool bObjSelected; XOutdevItemPool* pXPool; XLineStyleItem aXLStyle; @@ -383,9 +383,9 @@ private: XLineEndList* pLineEndList; ChangeType* pnLineEndListState; - USHORT* pPageType; - USHORT* pDlgType; - USHORT* pPosLineEndLb; + sal_uInt16* pPageType; + sal_uInt16* pDlgType; + sal_uInt16* pPosLineEndLb; #ifdef _SVX_TPLNEEND_CXX DECL_LINK( ClickAddHdl_Impl, void * ); @@ -406,7 +406,7 @@ public: void Construct(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void ActivatePage( const SfxItemSet& rSet ); @@ -414,11 +414,11 @@ public: void SetLineEndList( XLineEndList* pInList ) { pLineEndList = pInList; } void SetPolyObj( const SdrObject* pObj ) { pPolyObj = pObj; } - void SetObjSelected( BOOL bHasObj ) { bObjSelected = bHasObj; } + void SetObjSelected( sal_Bool bHasObj ) { bObjSelected = bHasObj; } - void SetPageType( USHORT* pInType ) { pPageType = pInType; } - void SetDlgType( USHORT* pInType ) { pDlgType = pInType; } - void SetPosLineEndLb( USHORT* pInPos ) { pPosLineEndLb = pInPos; } + void SetPageType( sal_uInt16* pInType ) { pPageType = pInType; } + void SetDlgType( sal_uInt16* pInType ) { pDlgType = pInType; } + void SetPosLineEndLb( sal_uInt16* pInPos ) { pPosLineEndLb = pInPos; } void SetLineEndChgd( ChangeType* pIn ) { pnLineEndListState = pIn; } diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx index b89ec4e779a0..d069933f13ef 100644 --- a/cui/source/inc/dbregister.hxx +++ b/cui/source/inc/dbregister.hxx @@ -62,8 +62,8 @@ namespace svx HeaderBar* pHeaderBar; ::svx::OptHeaderTabListBox* pPathBox; SvLBoxEntry* m_pCurEntry; - ULONG m_nOldCount; - BOOL m_bModified; + sal_uLong m_nOldCount; + sal_Bool m_bModified; #ifdef SVX_DBREGISTER_HXX DECL_LINK( NewHdl, void * ); @@ -102,9 +102,9 @@ namespace svx virtual ~DbRegistrationOptionsPage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); }; diff --git a/cui/source/inc/defdlgname.hxx b/cui/source/inc/defdlgname.hxx index 3342d66968a2..273aabcdb3ff 100644 --- a/cui/source/inc/defdlgname.hxx +++ b/cui/source/inc/defdlgname.hxx @@ -29,8 +29,8 @@ // define ---------------------------------------------------------------- -#define MESS_BTN_1 ((USHORT)0) -#define MESS_BTN_2 ((USHORT)1) +#define MESS_BTN_1 ((sal_uInt16)0) +#define MESS_BTN_2 ((sal_uInt16)1) // const ----------------------------------------------------------------- diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx index 173ef8e45139..e0e0a05cc9d3 100644 --- a/cui/source/inc/dlgname.hxx +++ b/cui/source/inc/dlgname.hxx @@ -195,7 +195,7 @@ public: SvxMessDialog( Window* pWindow, const String& rText, const String& rDesc, Image* pImg = NULL ); ~SvxMessDialog(); - void SetButtonText( USHORT nBtnId, const String& rNewTxt ); + void SetButtonText( sal_uInt16 nBtnId, const String& rNewTxt ); }; diff --git a/cui/source/inc/dstribut.hxx b/cui/source/inc/dstribut.hxx index ef28d21c915e..1100f76ccbe6 100644 --- a/cui/source/inc/dstribut.hxx +++ b/cui/source/inc/dstribut.hxx @@ -93,8 +93,8 @@ public: static SfxTabPage* Create(Window*, const SfxItemSet&, SvxDistributeHorizontal eHor, SvxDistributeVertical eVer); - static UINT16* GetRanges(); - virtual BOOL FillItemSet(SfxItemSet&); + static sal_uInt16* GetRanges(); + virtual sal_Bool FillItemSet(SfxItemSet&); virtual void Reset(const SfxItemSet&); virtual void PointChanged(Window* pWindow, RECT_POINT eRP); diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx index 91d6e89e61dd..ab3ff52318a6 100644 --- a/cui/source/inc/grfpage.hxx +++ b/cui/source/inc/grfpage.hxx @@ -106,9 +106,9 @@ class SvxGrfCropPage : public SfxTabPage const MetricField* pLastCropField; long nOldWidth; long nOldHeight; - BOOL bReset; - BOOL bInitialized; - BOOL bSetOrigSize; + sal_Bool bReset; + sal_Bool bInitialized; + sal_Bool bSetOrigSize; SvxGrfCropPage( Window *pParent, const SfxItemSet &rSet ); @@ -124,14 +124,14 @@ class SvxGrfCropPage : public SfxTabPage void CalcZoom(); void CalcMinMaxBorder(); - void GraphicHasChanged(BOOL bFound); + void GraphicHasChanged(sal_Bool bFound); virtual void ActivatePage(const SfxItemSet& rSet); Size GetGrfOrigSize( const Graphic& ) const; public: static SfxTabPage *Create( Window *pParent, const SfxItemSet &rSet ); - virtual BOOL FillItemSet( SfxItemSet &rSet ); + virtual sal_Bool FillItemSet( SfxItemSet &rSet ); virtual void Reset( const SfxItemSet &rSet ); virtual int DeactivatePage( SfxItemSet *pSet ); }; diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx index 6c344cec81c5..ca8a2142764d 100644 --- a/cui/source/inc/hangulhanjadlg.hxx +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -75,11 +75,11 @@ namespace svx void Clear(); void InsertEntry( const XubString& rStr ); - void SelectEntryPos( USHORT nPos ); + void SelectEntryPos( sal_uInt16 nPos ); - USHORT GetEntryCount() const; + sal_uInt16 GetEntryCount() const; - XubString GetEntry( USHORT nPos ) const; + XubString GetEntry( sal_uInt16 nPos ) const; XubString GetSelectEntry() const; virtual void StateChanged( StateChangedType nStateChange ); diff --git a/cui/source/inc/headertablistbox.hxx b/cui/source/inc/headertablistbox.hxx index ecf59a426528..14eeb5c77933 100644..100755 --- a/cui/source/inc/headertablistbox.hxx +++ b/cui/source/inc/headertablistbox.hxx @@ -50,7 +50,7 @@ public: void ConnectElements( void ); // should be called after all manipulations on elements are done // calcs real sizes depending on sizes of this - void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 ); // same meaning as Windows::Show() + void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 ); // same meaning as Windows::Show() void Enable( bool bEnable = true, bool bChild = true ); // same meaning as Windows::Enable() }; diff --git a/cui/source/inc/hldocntp.hxx b/cui/source/inc/hldocntp.hxx index 9859fc9c0f80..81fbc89eee67 100644 --- a/cui/source/inc/hldocntp.hxx +++ b/cui/source/inc/hldocntp.hxx @@ -52,7 +52,7 @@ private: DECL_LINK (ClickNewHdl_Impl , void * ); // Button : New - Image GetImage( USHORT nId ); + Image GetImage( sal_uInt16 nId ); protected: void FillDlgFields ( String& aStrURL ); @@ -66,7 +66,7 @@ public: static IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet ); - virtual BOOL AskApply (); + virtual sal_Bool AskApply (); virtual void DoApply (); virtual void SetInitFocus(); diff --git a/cui/source/inc/hldoctp.hxx b/cui/source/inc/hldoctp.hxx index 08bfd4d9d308..7eae2afd6b7f 100644 --- a/cui/source/inc/hldoctp.hxx +++ b/cui/source/inc/hldoctp.hxx @@ -52,7 +52,7 @@ private: String maStrURL; - BOOL mbMarkWndOpen; + sal_Bool mbMarkWndOpen; DECL_LINK (ClickFileopenHdl_Impl , void * ); // Button : Fileopen DECL_LINK (ClickTargetHdl_Impl , void * ); // Button : Target @@ -74,8 +74,8 @@ protected: void GetCurentItemData ( String& aStrURL, String& aStrName, String& aStrIntName, String& aStrFrame, SvxLinkInsertMode& eMode ); - virtual BOOL ShouldOpenMarkWnd () {return mbMarkWndOpen;} - virtual void SetMarkWndShouldOpen (BOOL bOpen) {mbMarkWndOpen=bOpen;} + virtual sal_Bool ShouldOpenMarkWnd () {return mbMarkWndOpen;} + virtual void SetMarkWndShouldOpen (sal_Bool bOpen) {mbMarkWndOpen=bOpen;} String GetCurrentURL (); public: diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx index e39bb20900af..36f5919c02e7 100644 --- a/cui/source/inc/hlinettp.hxx +++ b/cui/source/inc/hlinettp.hxx @@ -57,7 +57,7 @@ private: String maStrOldUser; String maStrOldPassword; - BOOL mbMarkWndOpen; + sal_Bool mbMarkWndOpen; String maStrStdDocURL; @@ -88,8 +88,8 @@ protected: virtual void GetCurentItemData ( String& aStrURL, String& aStrName, String& aStrIntName, String& aStrFrame, SvxLinkInsertMode& eMode ); - virtual BOOL ShouldOpenMarkWnd () {return ( mbMarkWndOpen && maRbtLinktypInternet.IsChecked() );} - virtual void SetMarkWndShouldOpen (BOOL bOpen) {mbMarkWndOpen=bOpen;} + virtual sal_Bool ShouldOpenMarkWnd () {return ( mbMarkWndOpen && maRbtLinktypInternet.IsChecked() );} + virtual void SetMarkWndShouldOpen (sal_Bool bOpen) {mbMarkWndOpen=bOpen;} public: SvxHyperlinkInternetTp ( Window *pParent, const SfxItemSet& rItemSet); @@ -98,7 +98,7 @@ public: static IconChoicePage* Create( Window* pWindow, const SfxItemSet& rItemSet ); virtual void SetMarkStr ( String& aStrMark ); - virtual void SetOnlineMode( BOOL bEnable ); + virtual void SetOnlineMode( sal_Bool bEnable ); virtual void SetInitFocus(); }; diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx index 615e2e56bdc3..d466d145b2ee 100644 --- a/cui/source/inc/hlmarkwn.hxx +++ b/cui/source/inc/hlmarkwn.hxx @@ -73,17 +73,17 @@ private: //SvTreeListBox maLbTree; SvxHlmarkTreeLBox maLbTree; - BOOL mbUserMoved; - BOOL mbFirst; + sal_Bool mbUserMoved; + sal_Bool mbFirst; SvxHyperlinkTabPageBase* mpParent; String maStrLastURL; - USHORT mnError; + sal_uInt16 mnError; protected: - BOOL RefreshFromDoc( ::rtl::OUString aURL ); + sal_Bool RefreshFromDoc( ::rtl::OUString aURL ); SvLBoxEntry* FindEntry ( String aStrName ); void ClearTree(); @@ -98,13 +98,13 @@ public: SvxHlinkDlgMarkWnd (SvxHyperlinkTabPageBase *pParent); ~SvxHlinkDlgMarkWnd(); - BOOL MoveTo ( Point aNewPos ); + sal_Bool MoveTo ( Point aNewPos ); void RefreshTree ( String aStrURL ); void SelectEntry ( String aStrMark ); - BOOL ConnectToDialog( BOOL bDoit = TRUE ); + sal_Bool ConnectToDialog( sal_Bool bDoit = sal_True ); - USHORT SetError( USHORT nError); + sal_uInt16 SetError( sal_uInt16 nError); }; diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx index 2adb0dbdd920..94ad06053cb4 100644 --- a/cui/source/inc/hltpbase.hxx +++ b/cui/source/inc/hltpbase.hxx @@ -80,9 +80,9 @@ public: class SvxHyperURLBox : public SvtURLBox, public DropTargetHelper { private: - BOOL mbAccessAddress; + sal_Bool mbAccessAddress; -// String GetAllEmailNamesFromDragItem( USHORT nItem ); +// String GetAllEmailNamesFromDragItem( sal_uInt16 nItem ); protected: @@ -95,7 +95,7 @@ protected: virtual long PreNotify( NotifyEvent& rNEvt ); public: - SvxHyperURLBox( Window* pParent, INetProtocol eSmart = INET_PROT_FILE, BOOL bAddresses = FALSE ); + SvxHyperURLBox( Window* pParent, INetProtocol eSmart = INET_PROT_FILE, sal_Bool bAddresses = sal_False ); }; @@ -127,7 +127,7 @@ private: protected: Window* mpDialog; - BOOL mbStdControlsInit; + sal_Bool mbStdControlsInit; String maStrInitURL; @@ -151,7 +151,7 @@ protected: String aEmptyStr; - BOOL FileExists( const INetURLObject& rURL ); + sal_Bool FileExists( const INetURLObject& rURL ); static String GetSchemeFromURL( String aStrURL ); inline void DisableClose( sal_Bool _bDisable ) { mbIsCloseDisabled = _bDisable; } @@ -170,27 +170,27 @@ public: mxDocumentFrame = rxDocumentFrame; } - virtual BOOL AskApply (); + virtual sal_Bool AskApply (); virtual void DoApply (); - virtual void SetOnlineMode( BOOL bEnable ); + virtual void SetOnlineMode( sal_Bool bEnable ); virtual void SetInitFocus(); virtual void SetMarkStr ( String& aStrMark ); virtual void Reset( const SfxItemSet& ); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void ActivatePage( const SfxItemSet& rItemSet ); virtual int DeactivatePage( SfxItemSet* pSet = 0 ); - BOOL IsMarkWndVisible () { return ((Window*)mpMarkWnd)->IsVisible(); } + sal_Bool IsMarkWndVisible () { return ((Window*)mpMarkWnd)->IsVisible(); } Size GetSizeExtraWnd () { return ( mpMarkWnd->GetSizePixel() ); } - BOOL MoveToExtraWnd ( Point aNewPos, BOOL bDisConnectDlg = FALSE ); + sal_Bool MoveToExtraWnd ( Point aNewPos, sal_Bool bDisConnectDlg = sal_False ); virtual void ActivatePage(); virtual void DeactivatePage(); virtual sal_Bool QueryClose(); protected: - virtual BOOL ShouldOpenMarkWnd(); - virtual void SetMarkWndShouldOpen(BOOL bOpen); + virtual sal_Bool ShouldOpenMarkWnd(); + virtual void SetMarkWndShouldOpen(sal_Bool bOpen); void ShowMarkWnd (); void HideMarkWnd () { ( ( Window* ) mpMarkWnd )->Hide(); } @@ -198,10 +198,10 @@ protected: SfxDispatcher* GetDispatcher() const; - USHORT GetMacroEvents(); + sal_uInt16 GetMacroEvents(); SvxMacroTableDtor* GetMacroTable(); - BOOL IsHTMLDoc() const; + sal_Bool IsHTMLDoc() const; }; #endif // _SVX_TABBASE_HYPERLINK_HXX diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx index 35f010583fb9..6c2cb24c63fa 100644 --- a/cui/source/inc/iconcdlg.hxx +++ b/cui/source/inc/iconcdlg.hxx @@ -52,7 +52,7 @@ class IconChoicePage; // Create-Function typedef IconChoicePage* (*CreatePage)(Window *pParent, const SfxItemSet &rAttrSet); -typedef USHORT* (*GetPageRanges)(); // liefert internationale Which-Wert +typedef sal_uInt16* (*GetPageRanges)(); // liefert internationale Which-Wert // page-list DECLARE_LIST( IconChoicePageList, IconChoicePageData * ) @@ -68,21 +68,21 @@ enum EIconChoicePos { PosLeft, PosRight, PosTop, PosBottom }; struct IconChoicePageData { - USHORT nId; // Die ID + sal_uInt16 nId; // Die ID CreatePage fnCreatePage; // Pointer auf die Factory GetPageRanges fnGetRanges;// Pointer auf die Ranges-Funktion IconChoicePage* pPage; // die TabPage selber - BOOL bOnDemand; // Flag: ItemSet onDemand - BOOL bRefresh; // Flag: Seite mu\s neu initialisiert werden + sal_Bool bOnDemand; // Flag: ItemSet onDemand + sal_Bool bRefresh; // Flag: Seite mu\s neu initialisiert werden // Konstruktor - IconChoicePageData( USHORT Id, CreatePage fnPage, GetPageRanges fnRanges, BOOL bDemand ) + IconChoicePageData( sal_uInt16 Id, CreatePage fnPage, GetPageRanges fnRanges, sal_Bool bDemand ) : nId ( Id ), fnCreatePage ( fnPage ), fnGetRanges ( fnRanges ), pPage ( NULL ), bOnDemand ( bDemand ), - bRefresh ( FALSE ) + bRefresh ( sal_False ) {} }; @@ -100,9 +100,9 @@ class IconChoicePage : public TabPage private : const SfxItemSet* pSet; String aUserString; - BOOL bHasExchangeSupport; + sal_Bool bHasExchangeSupport; IconChoiceDialog* pDialog; - BOOL bStandard; + sal_Bool bStandard; void SetDialog( IconChoiceDialog* pNew ) { pDialog = pNew; } IconChoiceDialog* GetDialog() const { return pDialog; } @@ -114,19 +114,19 @@ private : protected : IconChoicePage( Window *pParent, const ResId &, const SfxItemSet &rAttrSet ); - USHORT GetSlot( USHORT nWhich ) const { return pSet->GetPool()->GetSlotId( nWhich ); } - USHORT GetWhich( USHORT nSlot ) const { return pSet->GetPool()->GetWhich( nSlot ); } + sal_uInt16 GetSlot( sal_uInt16 nWhich ) const { return pSet->GetPool()->GetSlotId( nWhich ); } + sal_uInt16 GetWhich( sal_uInt16 nSlot ) const { return pSet->GetPool()->GetWhich( nSlot ); } public : virtual ~IconChoicePage(); const SfxItemSet& GetItemSet() const { return *pSet; } - virtual BOOL FillItemSet( SfxItemSet& ) = 0; + virtual sal_Bool FillItemSet( SfxItemSet& ) = 0; virtual void Reset( const SfxItemSet& ) = 0; - BOOL HasExchangeSupport() const { return bHasExchangeSupport; } - void SetExchangeSupport( BOOL bNew = TRUE ) { bHasExchangeSupport = bNew; } + sal_Bool HasExchangeSupport() const { return bHasExchangeSupport; } + void SetExchangeSupport( sal_Bool bNew = sal_True ) { bHasExchangeSupport = bNew; } enum { KEEP_PAGE = 0x0000, // Fehlerbehandlung; Seite nicht wechseln @@ -143,7 +143,7 @@ public : void SetUserData(const String& rString) { aUserString = rString; } String GetUserData() { return aUserString; } virtual void FillUserData(); - virtual BOOL IsReadOnly() const; + virtual sal_Bool IsReadOnly() const; virtual sal_Bool QueryClose(); void StateChanged( StateChangedType nType ); @@ -166,7 +166,7 @@ private : SvtIconChoiceCtrl maIconCtrl; // DAS IconChoice-Control - USHORT mnCurrentPageId; // Id der aktuell sichtbaren Page + sal_uInt16 mnCurrentPageId; // Id der aktuell sichtbaren Page // Buttons OKButton aOKBtn; @@ -177,43 +177,43 @@ private : const SfxItemSet* pSet; SfxItemSet* pOutSet; SfxItemSet* pExampleSet; - USHORT* pRanges; + sal_uInt16* pRanges; sal_uInt32 nResId; - BOOL bHideResetBtn; - BOOL bModal; - BOOL bInOK; - BOOL bModified; - BOOL bItemsReset; + sal_Bool bHideResetBtn; + sal_Bool bModal; + sal_Bool bInOK; + sal_Bool bModified; + sal_Bool bItemsReset; DECL_LINK ( ChosePageHdl_Impl, void * ); DECL_LINK ( OkHdl, Button * ); DECL_LINK ( ResetHdl, Button * ); DECL_LINK ( CancelHdl, Button * ); - IconChoicePageData* GetPageData ( USHORT nId ); + IconChoicePageData* GetPageData ( sal_uInt16 nId ); void Start_Impl(); - BOOL OK_Impl(); + sal_Bool OK_Impl(); - void SetPosSizeCtrls ( BOOL bInit = FALSE ); - void SetPosSizePages ( USHORT nId ); + void SetPosSizeCtrls ( sal_Bool bInit = sal_False ); + void SetPosSizePages ( sal_uInt16 nId ); - void FocusOnIcon ( USHORT nId ); + void FocusOnIcon ( sal_uInt16 nId ); protected : void ShowPageImpl ( IconChoicePageData* pData ); void HidePageImpl ( IconChoicePageData* pData ); - virtual void PageCreated( USHORT nId, IconChoicePage& rPage ); - virtual SfxItemSet* CreateInputItemSet( USHORT nId ); + virtual void PageCreated( sal_uInt16 nId, IconChoicePage& rPage ); + virtual SfxItemSet* CreateInputItemSet( sal_uInt16 nId ); inline SfxItemSet* GetInputSetImpl() { return (SfxItemSet*)pSet; } - inline IconChoicePage* GetTabPage( USHORT nPageId ) + inline IconChoicePage* GetTabPage( sal_uInt16 nPageId ) { return ( GetPageData (nPageId)->pPage?GetPageData (nPageId)->pPage:NULL); } const SfxItemSet* GetRefreshedSet(); void ActivatePageImpl (); - BOOL DeActivatePageImpl (); + sal_Bool DeActivatePageImpl (); void ResetPageImpl (); short Ok(); @@ -237,16 +237,16 @@ public : // SvxIconChoiceCtrlEntry* AddTabPage( - USHORT nId, const String& rIconText, const Image& rChoiceIcon, const Image& rChoiceIconHC, + sal_uInt16 nId, const String& rIconText, const Image& rChoiceIcon, const Image& rChoiceIconHC, CreatePage pCreateFunc /* != NULL */, GetPageRanges pRangesFunc = NULL /* NULL allowed*/, - BOOL bItemsOnDemand = FALSE, ULONG nPos = LIST_APPEND ); + sal_Bool bItemsOnDemand = sal_False, sal_uLong nPos = LIST_APPEND ); - void SetCurPageId( USHORT nId ) { mnCurrentPageId = nId; FocusOnIcon( nId ); } - USHORT GetCurPageId() const { return mnCurrentPageId; } - void ShowPage( USHORT nId ); + void SetCurPageId( sal_uInt16 nId ) { mnCurrentPageId = nId; FocusOnIcon( nId ); } + sal_uInt16 GetCurPageId() const { return mnCurrentPageId; } + void ShowPage( sal_uInt16 nId ); // liefert ggf. per Map konvertierte lokale Slots - const USHORT* GetInputRanges( const SfxItemPool& ); + const sal_uInt16* GetInputRanges( const SfxItemPool& ); void SetInputSet( const SfxItemSet* pInSet ); const SfxItemSet* GetOutputItemSet() const { return pOutSet; } @@ -258,7 +258,7 @@ public : HelpButton& GetHelpButton() { return aHelpBtn; } short Execute(); - void Start( BOOL bShow = TRUE ); + void Start( sal_Bool bShow = sal_True ); sal_Bool QueryClose(); const SfxItemSet* GetExampleSet() const { return pExampleSet; } diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx index a93b93498d37..aeab4d94dbf8 100644 --- a/cui/source/inc/insdlg.hxx +++ b/cui/source/inc/insdlg.hxx @@ -56,7 +56,7 @@ public: com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObject() { return m_xObj; } virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetIconIfIconified( ::rtl::OUString* pGraphicMediaType ); - virtual BOOL IsCreateNew() const; + virtual sal_Bool IsCreateNew() const; }; class SvInsertOleDlg : public InsertObjectDialog_Impl @@ -85,8 +85,8 @@ class SvInsertOleDlg : public InsertObjectDialog_Impl ListBox& GetObjectTypes() { return aLbObjecttype; } String GetFilePath() const { return aEdFilepath.GetText(); } - BOOL IsLinked() const { return aCbFilelink.IsChecked(); } - BOOL IsCreateNew() const { return aRbNewObject.IsChecked(); } + sal_Bool IsLinked() const { return aCbFilelink.IsChecked(); } + sal_Bool IsCreateNew() const { return aRbNewObject.IsChecked(); } public: SvInsertOleDlg( Window* pParent, diff --git a/cui/source/inc/internationaloptions.hxx b/cui/source/inc/internationaloptions.hxx index f95be661f53c..f5c6e919fdac 100644 --- a/cui/source/inc/internationaloptions.hxx +++ b/cui/source/inc/internationaloptions.hxx @@ -42,7 +42,7 @@ namespace offapp protected: InternationalOptionsPage( Window* _pParent, const SfxItemSet& _rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& _rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& _rSet ); virtual void Reset( const SfxItemSet& _rSet ); public: diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx index 95e30d241467..ac1269062721 100644 --- a/cui/source/inc/labdlg.hxx +++ b/cui/source/inc/labdlg.hxx @@ -72,23 +72,23 @@ private: String aStrVertList; short nCaptionType; - BOOL bFixedAngle; - INT32 nFixedAngle; - INT32 nGap; + sal_Bool bFixedAngle; + sal_Int32 nFixedAngle; + sal_Int32 nGap; short nEscDir; - BOOL bEscRel; - INT32 nEscAbs; - INT32 nEscRel; - INT32 nLineLen; - BOOL bFitLineLen; + sal_Bool bEscRel; + sal_Int32 nEscAbs; + sal_Int32 nEscRel; + sal_Int32 nLineLen; + sal_Bool bFitLineLen; - USHORT nAnsatzRelPos; - USHORT nAnsatzTypePos; - USHORT nWinkelTypePos; + sal_uInt16 nAnsatzRelPos; + sal_uInt16 nAnsatzTypePos; + sal_uInt16 nWinkelTypePos; #ifdef _SVX_LABDLG_CXX - void SetupAnsatz_Impl( USHORT nType ); - void SetupType_Impl( USHORT nType ); + void SetupAnsatz_Impl( sal_uInt16 nType ); + void SetupType_Impl( sal_uInt16 nType ); DECL_LINK( AnsatzSelectHdl_Impl, ListBox * ); DECL_LINK( AnsatzRelSelectHdl_Impl, ListBox * ); DECL_LINK( LineOptHdl_Impl, Button * ); @@ -103,9 +103,9 @@ public: virtual ~SvxCaptionTabPage(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); void Construct(); void SetView( const SdrView* pSdrView ) @@ -122,16 +122,16 @@ class SvxCaptionTabDialog : public SfxTabDialog private: // const SfxItemSet& rOutAttrs; const SdrView* pView; - USHORT nAnchorCtrls; + sal_uInt16 nAnchorCtrls; Link aValidateLink; - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); public: SvxCaptionTabDialog(Window* pParent, const SdrView* pView, - USHORT nAnchorTypes = 0 ); + sal_uInt16 nAnchorTypes = 0 ); ~SvxCaptionTabDialog(); diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx index f6f75ddee89d..114e62679844 100644 --- a/cui/source/inc/linkdlg.hxx +++ b/cui/source/inc/linkdlg.hxx @@ -81,7 +81,7 @@ class SvBaseLinksDlg : public ModalDialog String aStrCloselinkmsgMulti; String aStrWaitinglink; sfx2::LinkManager* pLinkMgr; - BOOL bHtmlMode; + sal_Bool bHtmlMode; SvTabListBox aTbLinks; Timer aUpdateTimer; @@ -96,10 +96,10 @@ class SvBaseLinksDlg : public ModalDialog DECL_LINK( BreakLinkClickHdl, PushButton * ); DECL_LINK( UpdateWaitingHdl, Timer * ); DECL_LINK( EndEditHdl, sfx2::SvBaseLink* ); - sfx2::SvBaseLink* GetSelEntry( USHORT* pPos ); + sfx2::SvBaseLink* GetSelEntry( sal_uInt16* pPos ); String ImplGetStateStr( const sfx2::SvBaseLink& ); - void SetType( sfx2::SvBaseLink& rLink, USHORT nPos, USHORT nType ); - void InsertEntry( const sfx2::SvBaseLink& rLink, USHORT nPos = LISTBOX_APPEND, sal_Bool bSelect = sal_False); + void SetType( sfx2::SvBaseLink& rLink, sal_uInt16 nPos, sal_uInt16 nType ); + void InsertEntry( const sfx2::SvBaseLink& rLink, sal_uInt16 nPos = LISTBOX_APPEND, sal_Bool bSelect = sal_False); #endif void StartUpdateTimer() { aUpdateTimer.Start(); } @@ -126,7 +126,7 @@ class SvBaseLinksDlg : public ModalDialog void SetManager( sfx2::LinkManager* ); public: - SvBaseLinksDlg( Window * pParent, sfx2::LinkManager*, BOOL bHtml = FALSE ); + SvBaseLinksDlg( Window * pParent, sfx2::LinkManager*, sal_Bool bHtml = sal_False ); ~SvBaseLinksDlg(); void SetActLink( sfx2::SvBaseLink * pLink ); }; diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx index 45cf2fdbf79e..7ffd559680f3 100755..100644 --- a/cui/source/inc/macroass.hxx +++ b/cui/source/inc/macroass.hxx @@ -41,9 +41,6 @@ class SvTabListBox; class Edit; class String; -typedef SvStringsDtor* (*FNGetRangeHdl)( _SfxMacroTabPage*, const String& rLanguage ); -typedef SvStringsDtor* (*FNGetMacrosOfRangeHdl)( _SfxMacroTabPage*, const String& rLanguage, const String& rRange ); - class SfxConfigGroupListBox_Impl; class SfxConfigFunctionListBox_Impl; class _HeaderTabListBox; @@ -59,7 +56,6 @@ class _SfxMacroTabPage : public SfxTabPage DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, DoubleClickHdl_Impl, Control* ); DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * ); - DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton * ); DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* ); protected: @@ -70,26 +66,26 @@ protected: void InitAndSetHandler(); void FillEvents(); void FillMacroList(); - void EnableButtons( const String& rLanguage ); + void EnableButtons(); public: virtual ~_SfxMacroTabPage(); - void AddEvent( const String & rEventName, USHORT nEventId ); + void AddEvent( const String & rEventName, sal_uInt16 nEventId ); const SvxMacroTableDtor& GetMacroTbl() const; void SetMacroTbl( const SvxMacroTableDtor& rTbl ); void ClearMacroTbl(); - virtual void ScriptChanged( const String& rLanguage ); + virtual void ScriptChanged(); virtual void PageCreated (SfxAllItemSet aSet); // --------- Erben aus der Basis ------------- - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); - BOOL IsReadOnly() const; + sal_Bool IsReadOnly() const; }; inline const SvxMacroTableDtor& _SfxMacroTabPage::GetMacroTbl() const diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx index 0359a330c1f0..99614fd81172 100644 --- a/cui/source/inc/macropg.hxx +++ b/cui/source/inc/macropg.hxx @@ -48,9 +48,9 @@ typedef ::std::hash_map< ::rtl::OUString, ::std::pair< ::rtl::OUString, ::rtl::O struct EventDisplayName { const sal_Char* pAsciiEventName; - USHORT nEventResourceID; + sal_uInt16 nEventResourceID; EventDisplayName() : pAsciiEventName( NULL ), nEventResourceID(0) { } - EventDisplayName( const sal_Char* _pAsciiName, const USHORT _nResId ) + EventDisplayName( const sal_Char* _pAsciiName, const sal_uInt16 _nResId ) : pAsciiEventName( _pAsciiName ) , nEventResourceID( _nResId ) { @@ -90,7 +90,7 @@ protected: _SvxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet ); - void EnableButtons( const String& rLanguage ); + void EnableButtons(); ::com::sun::star::uno::Any GetPropsByName( const ::rtl::OUString& eventName, EventsHash& eventsHash ); ::std::pair< ::rtl::OUString, ::rtl::OUString > GetPairFromAny( ::com::sun::star::uno::Any aAny ); @@ -100,14 +100,14 @@ public: void InitResources(); void InitAndSetHandler( ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > xAppEvents, ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > xDocEvents, ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifiable > xModifiable ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); using SfxTabPage::Reset; virtual void Reset(); void DisplayAppEvents( bool appEvents); - void SetReadOnly( BOOL bSet ); - BOOL IsReadOnly() const; + void SetReadOnly( sal_Bool bSet ); + sal_Bool IsReadOnly() const; }; class SvxMacroTabPage : public _SvxMacroTabPage @@ -125,12 +125,12 @@ public: // class SvxMacroAssignDlg -------------------------------------------------- -typedef USHORT* (*GetTabPageRanges)(); // liefert internationale Which-Werte +typedef sal_uInt16* (*GetTabPageRanges)(); // liefert internationale Which-Werte class SvxMacroAssignSingleTabDialog : public SfxModalDialog { public: - SvxMacroAssignSingleTabDialog( Window* pParent, const SfxItemSet& rOptionsSet, USHORT nUniqueId ); + SvxMacroAssignSingleTabDialog( Window* pParent, const SfxItemSet& rOptionsSet, sal_uInt16 nUniqueId ); virtual ~SvxMacroAssignSingleTabDialog(); diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx index ddc6f62e6e8a..87129f34c222 100644 --- a/cui/source/inc/measure.hxx +++ b/cui/source/inc/measure.hxx @@ -80,7 +80,7 @@ private: const SdrView* pView; SfxMapUnit eUnit; - BOOL bPositionModified; + sal_Bool bPositionModified; #ifdef _SVX_MEASURE_CXX void FillUnitLB(); @@ -95,9 +95,9 @@ public: ~SvxMeasurePage(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); diff --git a/cui/source/inc/multifil.hxx b/cui/source/inc/multifil.hxx index 8d86e99b731c..1bb4e8c85ef1 100644 --- a/cui/source/inc/multifil.hxx +++ b/cui/source/inc/multifil.hxx @@ -47,7 +47,7 @@ private: DECL_LINK( DelHdl_Impl, PushButton * ); public: - SvxMultiFileDialog( Window* pParent, BOOL bEmptyAllowed = FALSE ); + SvxMultiFileDialog( Window* pParent, sal_Bool bEmptyAllowed = sal_False ); ~SvxMultiFileDialog(); String GetFiles() const { return SvxMultiPathDialog::GetPath(); } diff --git a/cui/source/inc/multipat.hxx b/cui/source/inc/multipat.hxx index 44e8f15435fc..6e9df2f3ba04 100644 --- a/cui/source/inc/multipat.hxx +++ b/cui/source/inc/multipat.hxx @@ -75,7 +75,7 @@ protected: DECL_LINK( CheckHdl_Impl, svx::SvxRadioButtonListBox * ); public: - SvxMultiPathDialog( Window* pParent, BOOL bEmptyAllowed = FALSE ); + SvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed = sal_False ); ~SvxMultiPathDialog(); String GetPath() const; diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx index 92cc494faac4..b6f092788116 100644 --- a/cui/source/inc/numfmt.hxx +++ b/cui/source/inc/numfmt.hxx @@ -61,7 +61,7 @@ private: String aPrevStr; Color aPrevCol; - void InitSettings( BOOL bForeground, BOOL bBackground ); + void InitSettings( sal_Bool bForeground, sal_Bool bBackground ); protected: virtual void Paint( const Rectangle& rRect ); @@ -91,9 +91,9 @@ public: #define SfxTabPage ::SfxTabPage static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual int DeactivatePage ( SfxItemSet* pSet = NULL ); @@ -102,7 +102,7 @@ public: { SetInfoItem( rItem ); } void SetOkHdl( const Link& rOkHandler ); - void HideLanguage(BOOL nFlag=TRUE); + void HideLanguage(sal_Bool nFlag=sal_True); virtual long PreNotify( NotifyEvent& rNEvt ); virtual void PageCreated (SfxAllItemSet aSet); //add CHINA001 private: @@ -139,11 +139,11 @@ private: SvxNumberInfoItem* pNumItem; SvxNumberFormatShell* pNumFmtShell; - ULONG nInitFormat; + sal_uLong nInitFormat; Link fnOkHdl; - BOOL bNumItemFlag; //Fuer Handling mit DocShell - BOOL bOneAreaFlag; + sal_Bool bNumItemFlag; //Fuer Handling mit DocShell + sal_Bool bOneAreaFlag; short nFixedCategory; long nCatHeight; @@ -160,16 +160,16 @@ private: void Init_Impl(); void FillCurrencyBox(); void FillFormatListBox_Impl( SvxDelStrgs& rEntries ); - void UpdateOptions_Impl( BOOL bCheckCatChange ); - void UpdateFormatListBox_Impl( USHORT bCat, BOOL bUpdateEdit ); + void UpdateOptions_Impl( sal_Bool bCheckCatChange ); + void UpdateFormatListBox_Impl( sal_uInt16 bCat, sal_Bool bUpdateEdit ); void DeleteEntryList_Impl( SvxDelStrgs& rEntries ); void Obstructing(); void EnableBySourceFormat_Impl(); - void SetCategory( USHORT nPos ); + void SetCategory( sal_uInt16 nPos ); String GetExpColorString( Color*& rpPreviewColor, const String& aFormatStr, short nTmpCatPos ); void MakePreviewText( const String& rFormat ); - void ChangePreviewText( USHORT nPos ); - void AddAutomaticLanguage_Impl(LanguageType eAutoLang, BOOL bSelect); + void ChangePreviewText( sal_uInt16 nPos ); + void AddAutomaticLanguage_Impl(LanguageType eAutoLang, sal_Bool bSelect); // Handler DECL_LINK( LostFocusHdl_Impl, Edit* pEd ); DECL_LINK( DoubleClickHdl_Impl, SvxFontListBox* pLb ); diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index 47decd0ad9c7..f2a551a247b6 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -84,12 +84,12 @@ class SvxSingleNumPickTabPage : public SfxTabPage SvxNumSettingsArr_Impl aNumSettingsArr; SvxNumRule* pActNum; SvxNumRule* pSaveNum; - USHORT nActNumLvl; - BOOL bModified : 1; - BOOL bPreset : 1; + sal_uInt16 nActNumLvl; + sal_Bool bModified : 1; + sal_Bool bPreset : 1; String sNumCharFmtName; - USHORT nNumItemId; + sal_uInt16 nNumItemId; protected: DECL_LINK( NumSelectHdl_Impl, ValueSet*); @@ -105,7 +105,7 @@ class SvxSingleNumPickTabPage : public SfxTabPage virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); void SetNumCharFmtName(const String& rName){sNumCharFmtName = rName;} @@ -124,10 +124,10 @@ class SvxBulletPickTabPage : public SfxTabPage SvxNumValueSet* pExamplesVS; SvxNumRule* pActNum; SvxNumRule* pSaveNum; - USHORT nActNumLvl; - BOOL bModified : 1; - BOOL bPreset : 1; - USHORT nNumItemId; + sal_uInt16 nActNumLvl; + sal_Bool bModified : 1; + sal_Bool bPreset : 1; + sal_uInt16 nNumItemId; String sBulletCharFmtName; protected: @@ -143,7 +143,7 @@ class SvxBulletPickTabPage : public SfxTabPage virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); void SetCharFmtName(const String& rName){sBulletCharFmtName = rName;} @@ -169,10 +169,10 @@ class SvxNumPickTabPage : public SfxTabPage SvxNumRule* pActNum; SvxNumRule* pSaveNum; - USHORT nActNumLvl; - USHORT nNumItemId; - BOOL bModified : 1; - BOOL bPreset : 1; + sal_uInt16 nActNumLvl; + sal_uInt16 nNumItemId; + sal_Bool bModified : 1; + sal_Bool bPreset : 1; protected: @@ -189,7 +189,7 @@ class SvxNumPickTabPage : public SfxTabPage virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); void SetCharFmtNames(const String& rCharName, const String& rBulName) @@ -216,11 +216,11 @@ class SvxBitmapPickTabPage : public SfxTabPage SvxNumRule* pActNum; SvxNumRule* pSaveNum; - USHORT nActNumLvl; - USHORT nNumItemId; + sal_uInt16 nActNumLvl; + sal_uInt16 nNumItemId; SfxMapUnit eCoreUnit; - BOOL bModified : 1; - BOOL bPreset : 1; + sal_Bool bModified : 1; + sal_Bool bPreset : 1; protected: DECL_LINK( NumSelectHdl_Impl, ValueSet*); @@ -237,7 +237,7 @@ class SvxBitmapPickTabPage : public SfxTabPage virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); void SetNumCharFmtName(const String& rName){sNumCharFmtName = rName;} @@ -299,25 +299,25 @@ class SvxNumOptionsTabPage : public SfxTabPage Size aInitSize[SVX_MAX_NUM]; - BOOL bLastWidthModified : 1; - BOOL bModified : 1; - BOOL bPreset : 1; - BOOL bAutomaticCharStyles: 1; - BOOL bHTMLMode : 1; - BOOL bMenuButtonInitialized : 1; + sal_Bool bLastWidthModified : 1; + sal_Bool bModified : 1; + sal_Bool bPreset : 1; + sal_Bool bAutomaticCharStyles: 1; + sal_Bool bHTMLMode : 1; + sal_Bool bMenuButtonInitialized : 1; List aGrfNames; Font aActBulletFont; String sBullet; String sStartWith; - BYTE nBullet; - USHORT nActNumLvl; - USHORT nNumItemId; + sal_uInt8 nBullet; + sal_uInt16 nActNumLvl; + sal_uInt16 nNumItemId; SfxMapUnit eCoreUnit; void InitControls(); - void SwitchNumberType( BYTE nType, BOOL bBmp = FALSE ); + void SwitchNumberType( sal_uInt8 nType, sal_Bool bBmp = sal_False ); void CheckForStartValue_Impl(sal_uInt16 nNumberingType); DECL_LINK( NumberTypeSelectHdl_Impl, ListBox * ); @@ -348,7 +348,7 @@ class SvxNumOptionsTabPage : public SfxTabPage virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); //??? void SetWrtShell(SwWrtShell* pSh); @@ -360,7 +360,7 @@ class SvxNumOptionsTabPage : public SfxTabPage void SetMetric(FieldUnit eSet); ListBox& GetCharFmtListBox() {return aCharFmtLB;} - void SetModified(BOOL bRepaint = TRUE); + void SetModified(sal_Bool bRepaint = sal_True); virtual void PageCreated(SfxAllItemSet aSet); // add CHINA001 }; @@ -415,13 +415,13 @@ class SvxNumPositionTabPage : public SfxTabPage SvxNumRule* pActNum; SvxNumRule* pSaveNum; - USHORT nActNumLvl; - USHORT nNumItemId; + sal_uInt16 nActNumLvl; + sal_uInt16 nNumItemId; SfxMapUnit eCoreUnit; - BOOL bModified : 1; - BOOL bPreset : 1; - BOOL bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein + sal_Bool bModified : 1; + sal_Bool bPreset : 1; + sal_Bool bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein // --> OD 2008-01-11 #newlistlevelattrs# bool bLabelAlignmentPosAndSpaceModeActive; // <-- @@ -451,14 +451,14 @@ public: virtual void ActivatePage(const SfxItemSet& rSet); virtual int DeactivatePage(SfxItemSet *pSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); void SetMetric(FieldUnit eSet); - void SetModified(BOOL bRepaint = TRUE); + void SetModified(sal_Bool bRepaint = sal_True); virtual void PageCreated(SfxAllItemSet aSet); // add CHINA001 }; diff --git a/cui/source/inc/optasian.hxx b/cui/source/inc/optasian.hxx index 3e13018398b5..6c18568b6292 100644 --- a/cui/source/inc/optasian.hxx +++ b/cui/source/inc/optasian.hxx @@ -72,8 +72,8 @@ public: virtual ~SvxAsianLayoutPage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - static UINT16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + static sal_uInt16* GetRanges(); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx index 345623c19cff..27627b96c9f3 100644 --- a/cui/source/inc/optdict.hxx +++ b/cui/source/inc/optdict.hxx @@ -148,7 +148,7 @@ private: long nWidth; sal_Bool bFirstSelect; sal_Bool bDoNothing; - BOOL bDicIsReadonly; + sal_Bool bDicIsReadonly; #ifdef _SVX_OPTDICT_CXX DECL_LINK( SelectBookHdl_Impl, ListBox * ); @@ -165,7 +165,7 @@ private: ::com::sun::star::linguistic2::XDictionary > &xDic ); void RemoveDictEntry(SvLBoxEntry* pEntry); - USHORT GetLBInsertPos(const String &rDicWord); + sal_uInt16 GetLBInsertPos(const String &rDicWord); #endif diff --git a/cui/source/inc/optimprove.hxx b/cui/source/inc/optimprove.hxx index 266c51944b09..c827417b669c 100644 --- a/cui/source/inc/optimprove.hxx +++ b/cui/source/inc/optimprove.hxx @@ -59,7 +59,7 @@ public: SvxImprovementPage( Window* pParent ); ~SvxImprovementPage(); - inline bool IsYesChecked() const { return m_aYesRB.IsChecked() != FALSE; } + inline bool IsYesChecked() const { return m_aYesRB.IsChecked() != sal_False; } inline String GetPageText() const { return GetText(); } inline String GetInvitationText() const { return m_aInvitationFT.GetText(); } diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx index 9220ed9bcfbc..26111e4bd0b0 100644 --- a/cui/source/inc/optlingu.hxx +++ b/cui/source/inc/optlingu.hxx @@ -86,7 +86,7 @@ class SvxEditModulesDlg : public ModalDialog SvLBoxButtonData* pCheckButtonData; - SvLBoxEntry* CreateEntry(String& rTxt, USHORT nCol); + SvLBoxEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); #ifdef _SVX_OPTLINGU_CXX DECL_LINK( SelectHdl_Impl, SvxCheckListBox * ); @@ -149,10 +149,10 @@ private: SvxLinguData_Impl* pLinguData; SvxLinguTabPage( Window* pParent, const SfxItemSet& rCoreSet ); - SvLBoxEntry* CreateEntry(String& rTxt, USHORT nCol); + SvLBoxEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); - void AddDicBoxEntry( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, USHORT nIdx ); - ULONG GetDicUserData( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, USHORT nIdx ); + void AddDicBoxEntry( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx ); + sal_uLong GetDicUserData( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx ); #ifdef _SVX_OPTLINGU_CXX DECL_LINK( SelectHdl_Impl, SvxCheckListBox * ); diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx index 2ac80aa64094..e73f390ad2f3 100644 --- a/cui/source/inc/optpath.hxx +++ b/cui/source/inc/optpath.hxx @@ -94,9 +94,9 @@ private: DECL_LINK( DialogClosedHdl, ::com::sun::star::ui::dialogs::DialogClosedEvent* ); - void GetPathList( USHORT _nPathHandle, String& _rInternalPath, + void GetPathList( sal_uInt16 _nPathHandle, String& _rInternalPath, String& _rUserPath, String& _rWritablePath, sal_Bool& _rReadOnly ); - void SetPathList( USHORT _nPathHandle, + void SetPathList( sal_uInt16 _nPathHandle, const String& _rUserPath, const String& _rWritablePath ); #endif @@ -105,9 +105,9 @@ public: ~SvxPathTabPage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); }; diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx index 9931d2d2cff1..053cbdcad8dc 100644 --- a/cui/source/inc/page.hxx +++ b/cui/source/inc/page.hxx @@ -85,7 +85,7 @@ */ struct SvxPage_Impl; -typedef USHORT MarginPosition; +typedef sal_uInt16 MarginPosition; class SvxPageDescPage : public SfxTabPage { @@ -165,7 +165,7 @@ class SvxPageDescPage : public SfxTabPage long nLastBottomMargin; Size aMaxSize; - BOOL bLandscape; + sal_Bool bLandscape; FASTBOOL bBorderModified; SvxModeType eMode; Paper ePaperStart; @@ -218,9 +218,9 @@ protected: public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rOutSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rOutSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index 64a926f5ef89..49778aec5e81 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -108,13 +108,13 @@ private: long nAbst; long nWidth; long nMinFixDist; - BOOL bRelativeMode; - BOOL bNegativeIndents; + sal_Bool bRelativeMode; + sal_Bool bNegativeIndents; #ifdef _SVX_PARAGRPH_CXX void SetLineSpacing_Impl( const SvxLineSpacingItem& rAttr ); void Init_Impl(); - void UpdateExample_Impl( BOOL bAll = FALSE ); + void UpdateExample_Impl( sal_Bool bAll = sal_False ); DECL_LINK( LineDistHdl_Impl, ListBox* ); DECL_LINK( ModifyHdl_Impl, SvxRelativeField* ); @@ -128,13 +128,13 @@ public: DECL_LINK( ELRLoseFocusHdl, Edit* ); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); - void SetPageWidth( USHORT nPageWidth ); + void SetPageWidth( sal_uInt16 nPageWidth ); void EnableRelativeMode(); void EnableRegisterMode(); void EnableAutoFirstLine(); @@ -178,7 +178,7 @@ class SvxParaAlignTabPage : public SfxTabPage DECL_LINK( LastLineHdl_Impl, ListBox* ); DECL_LINK( TextDirectionHdl_Impl, ListBox* ); - void UpdateExample_Impl( BOOL bAll = FALSE ); + void UpdateExample_Impl( sal_Bool bAll = sal_False ); #endif SvxParaAlignTabPage( Window* pParent, const SfxItemSet& rSet ); @@ -189,9 +189,9 @@ protected: public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); void EnableJustifyExt(); @@ -223,9 +223,9 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); void DisablePageBreak(); @@ -275,9 +275,9 @@ private: NumericField aWidowRowNo; FixedText aWidowRowLabel; - BOOL bPageBreak; - BOOL bHtmlMode; - USHORT nStdPos; + sal_Bool bPageBreak; + sal_Bool bHtmlMode; + sal_uInt16 nStdPos; #ifdef _SVX_PARAGRPH_CXX DECL_LINK( PageBreakHdl_Impl, TriStateBox* ); @@ -314,9 +314,9 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx index a1b71e2f751e..f59c3612dc91 100644 --- a/cui/source/inc/pastedlg.hxx +++ b/cui/source/inc/pastedlg.hxx @@ -65,8 +65,8 @@ class SvPasteObjectDialog : public ModalDialog Table aSupplementTable; SvGlobalName aObjClassName; String aObjName; - USHORT nAspect; - BOOL bLink; + sal_uInt16 nAspect; + sal_Bool bLink; ListBox& ObjectLB() { return aLbInsertList; } FixedText& ObjectSource() { return aFtObjectSource; } @@ -78,8 +78,8 @@ class SvPasteObjectDialog : public ModalDialog DECL_LINK( SelectHdl, ListBox * ); DECL_LINK( DoubleClickHdl, ListBox * ); void SetDefault(); - USHORT GetAspect() const { return nAspect; } - BOOL ShouldLink() const { return bLink; } + sal_uInt16 GetAspect() const { return nAspect; } + sal_Bool ShouldLink() const { return bLink; } public: SvPasteObjectDialog( Window* pParent ); @@ -87,7 +87,7 @@ public: void Insert( SotFormatStringId nFormat, const String & rFormatName ); void SetObjName( const SvGlobalName & rClass, const String & rObjName ); - ULONG GetFormat( const TransferableDataHelper& aHelper, + sal_uLong GetFormat( const TransferableDataHelper& aHelper, const DataFlavorExVector* pFormats=0, const TransferableObjectDescriptor* pDesc=0 ); }; diff --git a/cui/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx index 701546225bf4..8dedd612d27e 100644 --- a/cui/source/inc/postdlg.hxx +++ b/cui/source/inc/postdlg.hxx @@ -61,10 +61,10 @@ class SvxPostItDialog : public SfxModalDialog { public: SvxPostItDialog( Window* pParent, const SfxItemSet& rCoreSet, - BOOL bPrevNext = FALSE, BOOL bRedline = FALSE ); + sal_Bool bPrevNext = sal_False, sal_Bool bRedline = sal_False ); ~SvxPostItDialog(); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); const SfxItemSet* GetOutputItemSet() const { return pOutSet; } Link GetPrevHdl() const { return aPrevHdlLink; } @@ -74,20 +74,20 @@ public: void SetNextHdl( const Link& rLink ) { aNextHdlLink = rLink; } - void EnableTravel(BOOL bNext, BOOL bPrev); + void EnableTravel(sal_Bool bNext, sal_Bool bPrev); inline String GetNote() { return aEditED.GetText(); } inline void SetNote(const String& rTxt) { aEditED.SetText(rTxt); } void ShowLastAuthor(const String& rAuthor, const String& rDate); - inline void DontChangeAuthor() { aAuthorBtn.Enable(FALSE); } + inline void DontChangeAuthor() { aAuthorBtn.Enable(sal_False); } inline void HideAuthor() { aAuthorBtn.Hide(); } - inline void SetReadonlyPostIt(BOOL bDisable) + inline void SetReadonlyPostIt(sal_Bool bDisable) { aOKBtn.Enable( !bDisable ); aEditED.SetReadOnly( bDisable ); aAuthorBtn.Enable( !bDisable ); } - inline BOOL IsOkEnabled() const { return aOKBtn.IsEnabled(); } + inline sal_Bool IsOkEnabled() const { return aOKBtn.IsEnabled(); } private: FixedLine aPostItFL; diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx index 8ecdd93a5d2e..579a3756c447 100644 --- a/cui/source/inc/scriptdlg.hxx +++ b/cui/source/inc/scriptdlg.hxx @@ -75,7 +75,7 @@ class SFTreeListBox : public SvTreeListBox { friend class SvxScriptOrgDialog; private: - USHORT nMode; + sal_uInt16 nMode; Image m_hdImage; Image m_hdImage_hc; Image m_libImage; @@ -109,12 +109,12 @@ public: - SvLBoxEntry * insertEntry(String const & rText, USHORT nBitmap, + SvLBoxEntry * insertEntry(String const & rText, sal_uInt16 nBitmap, SvLBoxEntry * pParent, bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData, ::rtl::OUString factoryURL ); - SvLBoxEntry * insertEntry(String const & rText, USHORT nBitmap, + SvLBoxEntry * insertEntry(String const & rText, sal_uInt16 nBitmap, SvLBoxEntry * pParent, bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData ); @@ -131,7 +131,7 @@ private: CancelButton aCancelButton; public: - InputDialog( Window * pParent, USHORT nMode ); + InputDialog( Window * pParent, sal_uInt16 nMode ); ~InputDialog(); String GetObjectName() const { return aEdit.GetText(); } @@ -141,21 +141,21 @@ public: class SFEntry { private: - BYTE nType; + sal_uInt8 nType; bool loaded; ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > nodes; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > model; SFEntry(){} public: - SFEntry( BYTE nT ) { nType = nT; loaded=false; } - SFEntry( BYTE nT, + SFEntry( sal_uInt8 nT ) { nType = nT; loaded=false; } + SFEntry( sal_uInt8 nT, const ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& entryNodes , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& entryModel) { nType = nT; nodes = entryNodes; loaded=false; model = entryModel; } SFEntry( const SFEntry& r ) { nType = r.nType; nodes = r.nodes; loaded = r.loaded; } virtual ~SFEntry() {} ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > GetNode() { return nodes ;} ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetModel() { return model ;}; - BYTE GetType() const { return nType; } + sal_uInt8 GetType() const { return nType; } bool isLoaded() const { return loaded; } void setLoaded() { loaded=true; } }; @@ -191,7 +191,7 @@ protected: DECL_LINK( MacroDoubleClickHdl, SvTreeListBox * ); DECL_LINK( ScriptSelectHdl, SvTreeListBox * ); DECL_LINK( ButtonHdl, Button * ); - BOOL getBoolProperty( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xProps, ::rtl::OUString& propName ); + sal_Bool getBoolProperty( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xProps, ::rtl::OUString& propName ); void CheckButtons( ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& node ); void createEntry( SvLBoxEntry* pEntry ); diff --git a/cui/source/inc/sdrcelldlg.hxx b/cui/source/inc/sdrcelldlg.hxx index fec72bfc07b6..6fea545823b0 100644 --- a/cui/source/inc/sdrcelldlg.hxx +++ b/cui/source/inc/sdrcelldlg.hxx @@ -54,7 +54,7 @@ public: SvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel ); ~SvxFormatCellsDialog(); - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); }; diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx index 3c01b955a474..c59aa535c0d2 100644 --- a/cui/source/inc/selector.hxx +++ b/cui/source/inc/selector.hxx @@ -50,41 +50,41 @@ struct SvxGroupInfo_Impl { - USHORT nKind; - USHORT nOrd; + sal_uInt16 nKind; + sal_uInt16 nOrd; ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > xBrowseNode; ::rtl::OUString sURL; ::rtl::OUString sHelpText; - BOOL bWasOpened; + sal_Bool bWasOpened; - SvxGroupInfo_Impl( USHORT n, USHORT nr ) + SvxGroupInfo_Impl( sal_uInt16 n, sal_uInt16 nr ) :nKind( n ) ,nOrd( nr ) ,xBrowseNode() ,sURL() ,sHelpText() - ,bWasOpened(FALSE) + ,bWasOpened(sal_False) { } - SvxGroupInfo_Impl( USHORT n, USHORT nr, const ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& _rxNode ) + SvxGroupInfo_Impl( sal_uInt16 n, sal_uInt16 nr, const ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& _rxNode ) :nKind( n ) ,nOrd( nr ) ,xBrowseNode( _rxNode ) ,sURL() ,sHelpText() - ,bWasOpened(FALSE) + ,bWasOpened(sal_False) { } - SvxGroupInfo_Impl( USHORT n, USHORT nr, const ::rtl::OUString& _rURL, const ::rtl::OUString& _rHelpText ) + SvxGroupInfo_Impl( sal_uInt16 n, sal_uInt16 nr, const ::rtl::OUString& _rURL, const ::rtl::OUString& _rHelpText ) :nKind( n ) ,nOrd( nr ) ,xBrowseNode() ,sURL( _rURL ) ,sHelpText( _rHelpText ) - ,bWasOpened(FALSE) + ,bWasOpened(sal_False) { } }; @@ -165,7 +165,7 @@ private: protected: virtual void RequestingChilds( SvLBoxEntry *pEntry); - virtual BOOL Expand( SvLBoxEntry* pParent ); + virtual sal_Bool Expand( SvLBoxEntry* pParent ); using SvListView::Expand; public: @@ -179,7 +179,7 @@ public: ~SvxConfigGroupListBox_Impl(); void Init(); - void Open( SvLBoxEntry*, BOOL ); + void Open( SvLBoxEntry*, sal_Bool ); void ClearAll(); void GroupSelected(); @@ -203,7 +203,7 @@ class SvxScriptSelectorDialog : public ModelessDialog FixedLine aDescription; FixedText aDescriptionText; - BOOL m_bShowSlots; + sal_Bool m_bShowSlots; Link m_aAddHdl; DECL_LINK( ClickHdl, Button * ); @@ -217,7 +217,7 @@ public: SvxScriptSelectorDialog ( Window* pParent = NULL, - BOOL bShowSlots = FALSE, + sal_Bool bShowSlots = sal_False, const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >& xFrame = 0 ); diff --git a/cui/source/inc/srchxtra.hxx b/cui/source/inc/srchxtra.hxx index 1cf2e91e6511..200a7272d387 100644 --- a/cui/source/inc/srchxtra.hxx +++ b/cui/source/inc/srchxtra.hxx @@ -45,7 +45,7 @@ public: ~SvxSearchFormatDialog(); protected: - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); private: FontList* pFontList; @@ -57,7 +57,7 @@ class SvxSearchAttributeDialog : public ModalDialog { public: SvxSearchAttributeDialog( Window* pParent, SearchAttrItemList& rLst, - const USHORT* pWhRanges ); + const sal_uInt16* pWhRanges ); private: FixedText aAttrFL; @@ -92,15 +92,15 @@ private: public: SvxSearchSimilarityDialog( Window* pParent, - BOOL bRelax, - USHORT nOther, - USHORT nShorter, - USHORT nLonger ); - - USHORT GetOther() { return (USHORT)aOtherFld.GetValue(); } - USHORT GetShorter() { return (USHORT)aShorterFld.GetValue(); } - USHORT GetLonger() { return (USHORT)aLongerFld.GetValue(); } - BOOL IsRelaxed() { return aRelaxBox.IsChecked(); } + sal_Bool bRelax, + sal_uInt16 nOther, + sal_uInt16 nShorter, + sal_uInt16 nLonger ); + + sal_uInt16 GetOther() { return (sal_uInt16)aOtherFld.GetValue(); } + sal_uInt16 GetShorter() { return (sal_uInt16)aShorterFld.GetValue(); } + sal_uInt16 GetLonger() { return (sal_uInt16)aLongerFld.GetValue(); } + sal_Bool IsRelaxed() { return aRelaxBox.IsChecked(); } }; diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx index 80e22eff43b5..5aa7703862b2 100644 --- a/cui/source/inc/tabstpge.hxx +++ b/cui/source/inc/tabstpge.hxx @@ -80,12 +80,12 @@ public: ~SvxTabulatorTabPage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); - void DisableControls( const USHORT nFlag ); + void DisableControls( const sal_uInt16 nFlag ); protected: virtual int DeactivatePage( SfxItemSet* pSet = 0 ); @@ -132,10 +132,10 @@ private: SvxTabStopItem aNewTabs; long nDefDist; FieldUnit eDefUnit; - BOOL bCheck; + sal_Bool bCheck; #ifdef _SVX_TABSTPGE_CXX - void InitTabPos_Impl( USHORT nPos = 0 ); + void InitTabPos_Impl( sal_uInt16 nPos = 0 ); void SetFillAndTabType_Impl(); // Handler diff --git a/cui/source/inc/textanim.hxx b/cui/source/inc/textanim.hxx index 5f58258ea255..3c028d0949d1 100644 --- a/cui/source/inc/textanim.hxx +++ b/cui/source/inc/textanim.hxx @@ -86,7 +86,7 @@ private: DECL_LINK( ClickDirectionHdl_Impl, ImageButton * ); void SelectDirection( SdrTextAniDirection nValue ); - USHORT GetSelectedDirection(); + sal_uInt16 GetSelectedDirection(); #endif public: @@ -95,9 +95,9 @@ public: ~SvxTextAnimationPage(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); void Construct(); @@ -114,7 +114,7 @@ private: const SfxItemSet& rOutAttrs; const SdrView* pView; - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); public: diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx index e8ce016d7d6f..2716abcfb043 100644 --- a/cui/source/inc/textattr.hxx +++ b/cui/source/inc/textattr.hxx @@ -79,12 +79,12 @@ private: const SfxItemSet& rOutAttrs; const SdrView* pView; - BOOL bAutoGrowSizeEnabled; - BOOL bContourEnabled; - BOOL bAutoGrowWidthEnabled; - BOOL bAutoGrowHeightEnabled; - BOOL bWordWrapTextEnabled; - BOOL bFitToSizeEnabled; + sal_Bool bAutoGrowSizeEnabled; + sal_Bool bContourEnabled; + sal_Bool bAutoGrowWidthEnabled; + sal_Bool bAutoGrowHeightEnabled; + sal_Bool bWordWrapTextEnabled; + sal_Bool bFitToSizeEnabled; #ifdef _SVX_TEXTATTR_CXX @@ -92,8 +92,8 @@ private: DECL_LINK( ClickHdl_Impl, void * ); #endif - /** Return whether the text direction is from left to right (</TRUE>) or - top to bottom (</FALSE>). + /** Return whether the text direction is from left to right (</sal_True>) or + top to bottom (</sal_False>). */ bool IsTextDirectionLeftToRight (void) const; @@ -103,9 +103,9 @@ public: ~SvxTextAttrPage(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void PointChanged( Window* pWindow, RECT_POINT eRP ); diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx index d333237f55c7..b2298ddc5028 100644 --- a/cui/source/inc/transfrm.hxx +++ b/cui/source/inc/transfrm.hxx @@ -49,27 +49,27 @@ class SdrView; /** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor to disable the size controls */ -const USHORT SVX_OBJ_NORESIZE = 0x0100; +const sal_uInt16 SVX_OBJ_NORESIZE = 0x0100; /** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor to disable the protect controls */ -const USHORT SVX_OBJ_NOPROTECT = 0x0200; +const sal_uInt16 SVX_OBJ_NOPROTECT = 0x0200; class SvxTransformTabDialog : public SfxTabDialog { private: const SdrView* pView; - USHORT nAnchorCtrls; + sal_uInt16 nAnchorCtrls; Link aValidateLink; - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); public: SvxTransformTabDialog( Window* pParent, const SfxItemSet* pAttr, const SdrView* pView, - USHORT nAnchorTypes = 0); + sal_uInt16 nAnchorTypes = 0); ~SvxTransformTabDialog(); //link for the Writer to validate positions @@ -171,9 +171,9 @@ public: SvxPositionSizeTabPage( Window* pParent, const SfxItemSet& rInAttrs ); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void ActivatePage( const SfxItemSet& rSet ); @@ -184,7 +184,7 @@ public: void Construct(); void SetView( const SdrView* pSdrView ) { mpView = pSdrView; } -// void ShowAnchorCtrls(USHORT nAnchorCtrls); // Writer-spezifische Controls anzeigen +// void ShowAnchorCtrls(sal_uInt16 nAnchorCtrls); // Writer-spezifische Controls anzeigen virtual void FillUserData(); void DisableResize(); @@ -236,9 +236,9 @@ public: SvxAngleTabPage( Window* pParent, const SfxItemSet& rInAttrs ); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void ActivatePage( const SfxItemSet& rSet ); @@ -285,9 +285,9 @@ public: SvxSlantTabPage( Window* pParent, const SfxItemSet& rInAttrs ); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual void ActivatePage( const SfxItemSet& rSet ); diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index 72859aa70945..220968ac4534 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -38,7 +38,7 @@ // static ---------------------------------------------------------------- -BOOL EnableSSO(); +sal_Bool EnableSSO(); CreateTabPage GetSSOCreator( void ); // class OfaOptionsTreeListBox ------------------------------------------- @@ -53,14 +53,14 @@ class OfaOptionsTreeListBox : public SvTreeListBox using SvListView::Collapse; private: - BOOL bInCollapse; + sal_Bool bInCollapse; public: OfaOptionsTreeListBox(Window* pParent, const ResId& rResId) : - SvTreeListBox( pParent, rResId ), bInCollapse(FALSE) {} + SvTreeListBox( pParent, rResId ), bInCollapse(sal_False) {} - virtual BOOL Collapse( SvLBoxEntry* pParent ); - BOOL IsInCollapse()const {return bInCollapse;} + virtual sal_Bool Collapse( SvLBoxEntry* pParent ); + sal_Bool IsInCollapse()const {return bInCollapse;} }; // struct OrderedEntry --------------------------------------------------- @@ -154,7 +154,7 @@ typedef ::std::vector< OptionsNode* > VectorOfNodes; struct LastPageSaver { - USHORT m_nLastPageId; + sal_uInt16 m_nLastPageId; rtl::OUString m_sLastPageURL_Tools; rtl::OUString m_sLastPageURL_ExtMgr; @@ -202,14 +202,14 @@ private: // for the ColorTabPage SfxItemSet* pColorPageItemSet; XColorTable* pColorTab; - USHORT nChangeType; - USHORT nUnknownType; - USHORT nUnknownPos; - BOOL bIsAreaTP; - - BOOL bForgetSelection; - BOOL bExternBrowserActive; - BOOL bImageResized; + sal_uInt16 nChangeType; + sal_uInt16 nUnknownType; + sal_uInt16 nUnknownPos; + sal_Bool bIsAreaTP; + + sal_Bool bForgetSelection; + sal_Bool bExternBrowserActive; + sal_Bool bImageResized; bool bInSelectHdl_Impl; bool bIsFromExtensionManager; @@ -223,8 +223,8 @@ private: static LastPageSaver* pLastPageSaver; - SfxItemSet* CreateItemSet( USHORT nId ); - void ApplyItemSet( USHORT nId, const SfxItemSet& rSet ); + SfxItemSet* CreateItemSet( sal_uInt16 nId ); + void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ); void InitTreeAndHandler(); void Initialize( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& _xFrame ); void ResizeTreeLB( void ); // resizes dialog so that treelistbox has no horizontal scroll bar @@ -263,16 +263,16 @@ public: OfaTreeOptionsDialog( Window* pParent, const rtl::OUString& rExtensionId ); ~OfaTreeOptionsDialog(); - OptionsPageInfo* AddTabPage( USHORT nId, const String& rPageName, USHORT nGroup ); - USHORT AddGroup( const String& rGroupName, SfxShell* pCreateShell, - SfxModule* pCreateModule, USHORT nDialogId ); + OptionsPageInfo* AddTabPage( sal_uInt16 nId, const String& rPageName, sal_uInt16 nGroup ); + sal_uInt16 AddGroup( const String& rGroupName, SfxShell* pCreateShell, + SfxModule* pCreateModule, sal_uInt16 nDialogId ); void ActivateLastSelection(); - void ActivatePage( USHORT nResId ); + void ActivatePage( sal_uInt16 nResId ); void ActivatePage( const String& rPageURL ); void ApplyItemSets(); - USHORT GetColorChanged() const { return nChangeType; } + sal_uInt16 GetColorChanged() const { return nChangeType; } XColorTable* GetColorTable() { return pColorTab; } // helper functions to call the language settings TabPage from the SpellDialog diff --git a/cui/source/inc/zoom.hxx b/cui/source/inc/zoom.hxx index 9a8c9b03da1c..0d814d0e30ac 100644 --- a/cui/source/inc/zoom.hxx +++ b/cui/source/inc/zoom.hxx @@ -39,9 +39,9 @@ // define ---------------------------------------------------------------- /* CHINA001 -#define ZOOMBTN_OPTIMAL ((USHORT)0x0001) -#define ZOOMBTN_PAGEWIDTH ((USHORT)0x0002) -#define ZOOMBTN_WHOLEPAGE ((USHORT)0x0004) +#define ZOOMBTN_OPTIMAL ((sal_uInt16)0x0001) +#define ZOOMBTN_PAGEWIDTH ((sal_uInt16)0x0002) +#define ZOOMBTN_WHOLEPAGE ((sal_uInt16)0x0004) */ #ifndef _SVX_ZOOM_HXX #include "zoom_def.hxx" @@ -84,7 +84,7 @@ private: const SfxItemSet& rSet; SfxItemSet* pOutSet; - BOOL bModified; + sal_Bool bModified; #ifdef _SVX_ZOOM_CXX DECL_LINK( UserHdl, RadioButton* ); @@ -101,11 +101,11 @@ public: const SfxItemSet* GetOutputItemSet() const { return pOutSet; } - USHORT GetFactor() const; - void SetFactor( USHORT nNewFactor, USHORT nBtnId = 0 ); + sal_uInt16 GetFactor() const; + void SetFactor( sal_uInt16 nNewFactor, sal_uInt16 nBtnId = 0 ); - void HideButton( USHORT nBtnId ); - void SetLimits( USHORT nMin, USHORT nMax ); + void HideButton( sal_uInt16 nBtnId ); + void SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ); }; #include <layout/layout-post.hxx> diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx index ad4c8bc42b3f..64c631266e3f 100644 --- a/cui/source/options/cfgchart.cxx +++ b/cui/source/options/cfgchart.cxx @@ -171,7 +171,7 @@ bool SvxChartColorTable::operator==( const SvxChartColorTable & _rOther ) const SvxChartOptions::SvxChartOptions() : ::utl::ConfigItem( rtl::OUString::createFromAscii( "Office.Chart" )), - mbIsInitialized( FALSE ) + mbIsInitialized( sal_False ) { maPropertyNames.realloc( 1 ); maPropertyNames[ 0 ] = ::rtl::OUString::createFromAscii( "DefaultColor/Series" ); @@ -194,7 +194,7 @@ void SvxChartOptions::SetDefaultColors( const SvxChartColorTable& aCol ) SetModified(); } -BOOL SvxChartOptions::RetrieveOptions() +sal_Bool SvxChartOptions::RetrieveOptions() { // get sequence containing all properties @@ -235,9 +235,9 @@ BOOL SvxChartOptions::RetrieveOptions() maDefColors.append( XColorEntry( aCol, aName )); } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void SvxChartOptions::Commit() @@ -271,7 +271,7 @@ void SvxChartOptions::Notify( const com::sun::star::uno::Sequence< rtl::OUString // class SvxChartColorTableItem // -------------------- -SvxChartColorTableItem::SvxChartColorTableItem( USHORT nWhich_, const SvxChartColorTable& aTable ) : +SvxChartColorTableItem::SvxChartColorTableItem( sal_uInt16 nWhich_, const SvxChartColorTable& aTable ) : SfxPoolItem( nWhich_ ), m_aColorTable( aTable ) { diff --git a/cui/source/options/cfgchart.hxx b/cui/source/options/cfgchart.hxx index 2f7ff8b3df77..2ca899035192 100644 --- a/cui/source/options/cfgchart.hxx +++ b/cui/source/options/cfgchart.hxx @@ -70,14 +70,14 @@ class SvxChartOptions : public ::utl::ConfigItem { private: SvxChartColorTable maDefColors; - BOOL mbIsInitialized; + sal_Bool mbIsInitialized; ::com::sun::star::uno::Sequence< ::rtl::OUString > maPropertyNames; inline ::com::sun::star::uno::Sequence< ::rtl::OUString > GetPropertyNames() const { return maPropertyNames; } - BOOL RetrieveOptions(); + sal_Bool RetrieveOptions(); public: SvxChartOptions(); @@ -97,7 +97,7 @@ class SvxChartColorTableItem : public SfxPoolItem { public: TYPEINFO(); - SvxChartColorTableItem( USHORT nWhich, const SvxChartColorTable& ); + SvxChartColorTableItem( sal_uInt16 nWhich, const SvxChartColorTable& ); SvxChartColorTableItem( const SvxChartColorTableItem& ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index 76bbafa54faa..451b28af785d 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -65,7 +65,7 @@ namespace offapp virtual void Init(); void Update(const DriverPoolingSettings& _rSettings); - virtual String GetCellText( long nRow, USHORT nColId ) const; + virtual String GetCellText( long nRow, sal_uInt16 nColId ) const; // the handler will be called with a DriverPoolingSettings::const_iterator as parameter, // or NULL if no valid current row exists @@ -82,13 +82,13 @@ namespace offapp sal_Bool isModified() const; protected: - virtual void InitController( ::svt::CellControllerRef& rController, long nRow, USHORT nCol ); - virtual ::svt::CellController* GetController( long nRow, USHORT nCol ); + virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ); + virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ); - virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColId ) const; + virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const; - virtual BOOL SeekRow( long nRow ); - virtual BOOL SaveModified(); + virtual sal_Bool SeekRow( long nRow ); + virtual sal_Bool SaveModified(); virtual sal_Bool IsTabAllowed(sal_Bool _bForward) const; @@ -97,7 +97,7 @@ namespace offapp virtual void CursorMoved(); protected: - virtual sal_uInt32 GetTotalCellWidth(long nRow, USHORT nColId); + virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId); private: @@ -216,7 +216,7 @@ namespace offapp } //-------------------------------------------------------------------- - sal_uInt32 DriverListControl::GetTotalCellWidth(long nRow, USHORT nColId) + sal_uInt32 DriverListControl::GetTotalCellWidth(long nRow, sal_uInt16 nColId) { return GetDataWindow().GetTextWidth(GetCellText(nRow, nColId)); } @@ -254,7 +254,7 @@ namespace offapp } //-------------------------------------------------------------------- - String DriverListControl::GetCellText( long nRow, USHORT nColId ) const + String DriverListControl::GetCellText( long nRow, sal_uInt16 nColId ) const { String sReturn; if (nRow > m_aSettings.size()) @@ -269,25 +269,25 @@ namespace offapp } //-------------------------------------------------------------------- - void DriverListControl::InitController( ::svt::CellControllerRef& rController, long nRow, USHORT nCol ) + void DriverListControl::InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ) { rController->GetWindow().SetText(GetCellText(nRow, nCol)); } //-------------------------------------------------------------------- - ::svt::CellController* DriverListControl::GetController( long /*nRow*/, USHORT /*nCol*/ ) + ::svt::CellController* DriverListControl::GetController( long /*nRow*/, sal_uInt16 /*nCol*/ ) { return NULL; } //-------------------------------------------------------------------- - BOOL DriverListControl::SaveModified() + sal_Bool DriverListControl::SaveModified() { - return TRUE; + return sal_True; } //-------------------------------------------------------------------- - BOOL DriverListControl::SeekRow( long _nRow ) + sal_Bool DriverListControl::SeekRow( long _nRow ) { DriverListControl_Base::SeekRow(_nRow); @@ -300,7 +300,7 @@ namespace offapp } //-------------------------------------------------------------------- - void DriverListControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColId ) const + void DriverListControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const { OSL_ENSURE(m_aSeekRow != m_aSettings.end(), "DriverListControl::PaintCell: invalid row!"); @@ -399,7 +399,7 @@ namespace offapp } //-------------------------------------------------------------------- - BOOL ConnectionPoolOptionsPage::FillItemSet(SfxItemSet& _rSet) + sal_Bool ConnectionPoolOptionsPage::FillItemSet(SfxItemSet& _rSet) { commitTimeoutField(); diff --git a/cui/source/options/connpooloptions.hxx b/cui/source/options/connpooloptions.hxx index 2ceb7d66a06b..c2458cc08450 100644 --- a/cui/source/options/connpooloptions.hxx +++ b/cui/source/options/connpooloptions.hxx @@ -70,7 +70,7 @@ namespace offapp protected: virtual long Notify( NotifyEvent& _rNEvt ); - virtual BOOL FillItemSet(SfxItemSet& _rSet); + virtual sal_Bool FillItemSet(SfxItemSet& _rSet); virtual void Reset(const SfxItemSet& _rSet); virtual void ActivatePage( const SfxItemSet& _rSet); diff --git a/cui/source/options/cuisrchdlg.cxx b/cui/source/options/cuisrchdlg.cxx index ad34722ae246..93b9247366c1 100644 --- a/cui/source/options/cuisrchdlg.cxx +++ b/cui/source/options/cuisrchdlg.cxx @@ -64,14 +64,14 @@ SvxJSearchOptionsDialog::SvxJSearchOptionsDialog( Window *pParent, - const SfxItemSet& rOptionsSet, INT32 nInitialFlags ) : + const SfxItemSet& rOptionsSet, sal_Int32 nInitialFlags ) : SfxSingleTabDialog ( pParent, rOptionsSet, RID_SVXPAGE_JSEARCH_OPTIONS ), nInitialTlFlags( nInitialFlags ) { pPage = (SvxJSearchOptionsPage *) SvxJSearchOptionsPage::Create( this, rOptionsSet ); SetTabPage( pPage ); //! implicitly calls pPage->Reset(...)! - pPage->EnableSaveOptions( FALSE ); + pPage->EnableSaveOptions( sal_False ); } @@ -88,7 +88,7 @@ void SvxJSearchOptionsDialog::Activate() } -INT32 SvxJSearchOptionsDialog::GetTransliterationFlags() const +sal_Int32 SvxJSearchOptionsDialog::GetTransliterationFlags() const { return pPage->GetTransliterationFlags(); } diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index cc199054d131..b8892ffcbd3f 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -129,7 +129,7 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( Window* pParent, const Sfx pPathBox ( NULL ), m_pCurEntry ( NULL ), m_nOldCount ( 0 ), - m_bModified ( FALSE ) + m_bModified ( sal_False ) { m_aNew.SetClickHdl( LINK( this, DbRegistrationOptionsPage, NewHdl ) ); m_aEdit.SetClickHdl( LINK( this, DbRegistrationOptionsPage, EditHdl ) ); @@ -186,7 +186,7 @@ DbRegistrationOptionsPage::~DbRegistrationOptionsPage() aPathCtrl.SetFocusControl( NULL ); pHeaderBar->Hide(); - for ( USHORT i = 0; i < pPathBox->GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i ) delete static_cast< DatabaseRegistration* >( pPathBox->GetEntry(i)->GetUserData() ); delete pPathBox; delete pHeaderBar; @@ -202,13 +202,13 @@ SfxTabPage* DbRegistrationOptionsPage::Create( Window* pParent, // ----------------------------------------------------------------------- -BOOL DbRegistrationOptionsPage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool DbRegistrationOptionsPage::FillItemSet( SfxItemSet& rCoreSet ) { // the settings for the single drivers sal_Bool bModified = sal_False; DatabaseRegistrations aRegistrations; - ULONG nCount = pPathBox->GetEntryCount(); - for ( ULONG i = 0; i < nCount; ++i ) + sal_uLong nCount = pPathBox->GetEntryCount(); + for ( sal_uLong i = 0; i < nCount; ++i ) { SvLBoxEntry* pEntry = pPathBox->GetEntry(i); DatabaseRegistration* pRegistration = static_cast< DatabaseRegistration* >( pEntry->GetUserData() ); @@ -256,7 +256,7 @@ void DbRegistrationOptionsPage::Reset( const SfxItemSet& rSet ) pHeaderBar->SetItemSize( ITEMID_TYPE, aUserData.GetToken(0).ToInt32() ); HeaderEndDrag_Impl( NULL ); // Sortierrichtung restaurieren - BOOL bUp = (BOOL)(USHORT)aUserData.GetToken(1).ToInt32(); + sal_Bool bUp = (sal_Bool)(sal_uInt16)aUserData.GetToken(1).ToInt32(); HeaderBarItemBits nBits = pHeaderBar->GetItemBits(ITEMID_TYPE); if ( bUp ) @@ -281,7 +281,7 @@ void DbRegistrationOptionsPage::FillUserData() String aUserData = String::CreateFromInt32( pHeaderBar->GetItemSize( ITEMID_TYPE ) ); aUserData += ';'; HeaderBarItemBits nBits = pHeaderBar->GetItemBits( ITEMID_TYPE ); - BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); + sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); aUserData += bUp ? '1' : '0'; SetUserData( aUserData ); } @@ -334,7 +334,7 @@ IMPL_LINK( DbRegistrationOptionsPage, HeaderSelect_Impl, HeaderBar*, pBar ) return 0; HeaderBarItemBits nBits = pHeaderBar->GetItemBits(ITEMID_TYPE); - BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); + sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); SvSortMode eMode = SortAscending; if ( bUp ) @@ -365,7 +365,7 @@ IMPL_LINK( DbRegistrationOptionsPage, HeaderEndDrag_Impl, HeaderBar*, pBar ) if ( !pHeaderBar->IsItemMode() ) { Size aSz; - USHORT nTabs = pHeaderBar->GetItemCount(); + sal_uInt16 nTabs = pHeaderBar->GetItemCount(); long nTmpSz = 0; long nWidth = pHeaderBar->GetItemSize(ITEMID_TYPE); long nBarWidth = pHeaderBar->GetSizePixel().Width(); @@ -375,7 +375,7 @@ IMPL_LINK( DbRegistrationOptionsPage, HeaderEndDrag_Impl, HeaderBar*, pBar ) else if ( ( nBarWidth - nWidth ) < TAB_WIDTH_MIN ) pHeaderBar->SetItemSize( ITEMID_TYPE, nBarWidth - TAB_WIDTH_MIN ); - for ( USHORT i = 1; i <= nTabs; ++i ) + for ( sal_uInt16 i = 1; i <= nTabs; ++i ) { long _nWidth = pHeaderBar->GetItemSize(i); aSz.Width() = _nWidth + nTmpSz; @@ -453,8 +453,8 @@ IMPL_LINK( DbRegistrationOptionsPage, NameValidator, String*, _pName ) { if ( _pName ) { - ULONG nCount = pPathBox->GetEntryCount(); - for ( ULONG i = 0; i < nCount; ++i ) + sal_uLong nCount = pPathBox->GetEntryCount(); + for ( sal_uLong i = 0; i < nCount; ++i ) { SvLBoxEntry* pEntry = pPathBox->GetEntry(i); if ( (!m_pCurEntry || m_pCurEntry != pEntry) && pPathBox->GetEntryText(pEntry,0) == *_pName ) diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index 749b92ed54cc..e252e5763cf8 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -85,7 +85,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent, aTextColor = aCheckLB.GetTextColor(); - for(USHORT k = 0; k < aNewDelTBX.GetItemCount(); k++) + for(sal_uInt16 k = 0; k < aNewDelTBX.GetItemCount(); k++) aNewDelTBX.SetItemImage(aNewDelTBX.GetItemId(k), aImageList.GetImage(aNewDelTBX.GetItemId(k))); @@ -146,7 +146,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent, pBar->SetItemBits(1, nBits); pBar->SetItemBits(2, nBits); - USHORT nHeight; + sal_uInt16 nHeight; for(nHeight = 6; nHeight <= 16; nHeight++) aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight)); for(nHeight = 18; nHeight <= 28; nHeight+= 2) @@ -211,7 +211,7 @@ SfxTabPage* SvxFontSubstTabPage::Create( Window* pParent, /* */ /*********************************************************************/ -BOOL SvxFontSubstTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxFontSubstTabPage::FillItemSet( SfxItemSet& ) { pConfig->ClearSubstitutions();// remove all entries @@ -242,7 +242,7 @@ BOOL SvxFontSubstTabPage::FillItemSet( SfxItemSet& ) sFontName = aFontNameLB.GetSelectEntry(); pSourceViewConfig->SetFontName(sFontName); - return FALSE; + return sal_False; } /*********************************************************************/ @@ -252,7 +252,7 @@ BOOL SvxFontSubstTabPage::FillItemSet( SfxItemSet& ) void SvxFontSubstTabPage::Reset( const SfxItemSet& ) { - aCheckLB.SetUpdateMode(FALSE); + aCheckLB.SetUpdateMode(sal_False); aCheckLB.Clear(); FontList aFntLst( Application::GetDefaultDevice() ); @@ -275,7 +275,7 @@ void SvxFontSubstTabPage::Reset( const SfxItemSet& ) } CheckEnable(); - aCheckLB.SetUpdateMode(TRUE); + aCheckLB.SetUpdateMode(sal_True); //fill font name box first aNonPropFontsOnlyCB.Check(pSourceViewConfig->IsShowProportionalFontsOnly()); @@ -302,7 +302,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) SvLBoxEntry* pEntry; // nCol ist behaemmerterweise die nCol'te Textspalte, werden nicht gezaehlt! // Daher als Spalte "0". - ULONG nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0); + sal_uLong nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0); switch (aNewDelTBX.GetCurItemId()) { @@ -323,7 +323,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) pEntry = CreateEntry(sFont1, sFont2); aCheckLB.Insert(pEntry); } - aCheckLB.SelectAll(FALSE); + aCheckLB.SelectAll(sal_False); aCheckLB.Select(pEntry); } break; @@ -358,7 +358,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) if (pWin == &aFont1CB) { - ULONG nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0); + sal_uLong nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0); if (nPos != 0xffffffff) { @@ -366,7 +366,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) if (pEntry != aCheckLB.FirstSelected()) { - aCheckLB.SelectAll(FALSE); + aCheckLB.SelectAll(sal_False); aCheckLB.Select(pEntry); } } @@ -382,12 +382,12 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) IMPL_LINK(SvxFontSubstTabPage, NonPropFontsHdl, CheckBox*, pBox) { String sFontName = aFontNameLB.GetSelectEntry(); - BOOL bNonPropOnly = pBox->IsChecked(); + sal_Bool bNonPropOnly = pBox->IsChecked(); aFontNameLB.Clear(); FontList aFntLst( Application::GetDefaultDevice() ); aFontNameLB.InsertEntry(sAutomatic); - USHORT nFontCount = aFntLst.GetFontNameCount(); - for(USHORT nFont = 0; nFont < nFontCount; nFont++) + sal_uInt16 nFontCount = aFntLst.GetFontNameCount(); + for(sal_uInt16 nFont = 0; nFont < nFontCount; nFont++) { const FontInfo& rInfo = aFntLst.GetFontName( nFont ); if(!bNonPropOnly || rInfo.GetPitch() == PITCH_FIXED) @@ -402,11 +402,11 @@ IMPL_LINK(SvxFontSubstTabPage, NonPropFontsHdl, CheckBox*, pBox) void SvxFontSubstTabPage::CheckEnable() { - BOOL bEnableAll = aUseTableCB.IsChecked(); + sal_Bool bEnableAll = aUseTableCB.IsChecked(); if (bEnableAll) { - BOOL bApply, bDelete; + sal_Bool bApply, bDelete; SvLBoxEntry* pEntry = aCheckLB.FirstSelected(); @@ -418,21 +418,21 @@ void SvxFontSubstTabPage::CheckEnable() aFont1CB.GetText() == aFont2CB.GetText() || aCheckLB.GetEntryPos(sEntry) != 0xffffffff || (pEntry != 0 && aCheckLB.NextSelected(pEntry) != 0)) - bApply = FALSE; + bApply = sal_False; else - bApply = TRUE;*/ + bApply = sal_True;*/ // Wegen OS/2-Optimierungsfehler (Bug #56267) etwas umstaendlicher: if (!aFont1CB.GetText().Len() || !aFont2CB.GetText().Len()) - bApply = FALSE; + bApply = sal_False; else if(aFont1CB.GetText() == aFont2CB.GetText()) - bApply = FALSE; + bApply = sal_False; else if(aCheckLB.GetEntryPos(sEntry) != 0xffffffff) - bApply = FALSE; + bApply = sal_False; else if(pEntry != 0 && aCheckLB.NextSelected(pEntry) != 0) - bApply = FALSE; + bApply = sal_False; else - bApply = TRUE; + bApply = sal_True; bDelete = pEntry != 0; @@ -457,7 +457,7 @@ void SvxFontSubstTabPage::CheckEnable() aCheckLB.DisableTable(); aCheckLB.SetTextColor(Color(COL_GRAY)); aCheckLB.Invalidate(); - aCheckLB.SelectAll(FALSE); + aCheckLB.SelectAll(sal_False); } } aNewDelTBX.Enable(bEnableAll); @@ -474,7 +474,7 @@ void SvxFontSubstTabPage::CheckEnable() void SvxFontSubstCheckListBox::SetTabs() { SvxSimpleTable::SetTabs(); - USHORT nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; + sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(1); pTab->nFlags &= ~nAdjust; @@ -492,8 +492,8 @@ void SvxFontSubstCheckListBox::KeyInput( const KeyEvent& rKEvt ) if(!rKEvt.GetKeyCode().GetModifier() && KEY_SPACE == rKEvt.GetKeyCode().GetCode()) { - ULONG nSelPos = GetModel()->GetAbsPos(GetCurEntry()); - USHORT nCol = GetCurrentTabPos() - 1; + sal_uLong nSelPos = GetModel()->GetAbsPos(GetCurEntry()); + sal_uInt16 nCol = GetCurrentTabPos() - 1; if ( nCol < 2 ) { CheckEntryPos( nSelPos, nCol, !IsChecked( nSelPos, nCol ) ); @@ -501,7 +501,7 @@ void SvxFontSubstCheckListBox::KeyInput( const KeyEvent& rKEvt ) } else { - USHORT nCheck = IsChecked(nSelPos, 1) ? 1 : 0; + sal_uInt16 nCheck = IsChecked(nSelPos, 1) ? 1 : 0; if(IsChecked(nSelPos, 0)) nCheck += 2; nCheck--; @@ -518,7 +518,7 @@ void SvxFontSubstCheckListBox::KeyInput( const KeyEvent& rKEvt ) /* */ /*********************************************************************/ -void SvxFontSubstCheckListBox::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked) +void SvxFontSubstCheckListBox::CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked) { if ( nPos < GetEntryCount() ) SetCheckButtonState( @@ -532,7 +532,7 @@ void SvxFontSubstCheckListBox::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChec /* */ /*********************************************************************/ -void SvxFontSubstCheckListBox::CheckEntry(SvLBoxEntry* pEntry, USHORT nCol, BOOL bChecked) +void SvxFontSubstCheckListBox::CheckEntry(SvLBoxEntry* pEntry, sal_uInt16 nCol, sal_Bool bChecked) { if ( pEntry ) SetCheckButtonState( @@ -546,7 +546,7 @@ void SvxFontSubstCheckListBox::CheckEntry(SvLBoxEntry* pEntry, USHORT nCol, BOOL /* */ /*********************************************************************/ -BOOL SvxFontSubstCheckListBox::IsChecked(ULONG nPos, USHORT nCol) +sal_Bool SvxFontSubstCheckListBox::IsChecked(sal_uLong nPos, sal_uInt16 nCol) { return GetCheckButtonState( GetEntry(nPos), nCol ) == SV_BUTTON_CHECKED; } @@ -555,7 +555,7 @@ BOOL SvxFontSubstCheckListBox::IsChecked(ULONG nPos, USHORT nCol) /* */ /*********************************************************************/ -BOOL SvxFontSubstCheckListBox::IsChecked(SvLBoxEntry* pEntry, USHORT nCol) +sal_Bool SvxFontSubstCheckListBox::IsChecked(SvLBoxEntry* pEntry, sal_uInt16 nCol) { return GetCheckButtonState( pEntry, nCol ) == SV_BUTTON_CHECKED; } @@ -564,7 +564,7 @@ BOOL SvxFontSubstCheckListBox::IsChecked(SvLBoxEntry* pEntry, USHORT nCol) /* */ /*********************************************************************/ -void SvxFontSubstCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol, SvButtonState eState) +void SvxFontSubstCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, sal_uInt16 nCol, SvButtonState eState) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -593,7 +593,7 @@ void SvxFontSubstCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, USHORT /* */ /*********************************************************************/ -SvButtonState SvxFontSubstCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol ) const +SvButtonState SvxFontSubstCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const { SvButtonState eState = SV_BUTTON_UNCHECKED; SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -601,7 +601,7 @@ SvButtonState SvxFontSubstCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) { - USHORT nButtonFlags = pItem->GetButtonFlags(); + sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); } diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx index 6180c345cc35..91c6f1a73801 100644 --- a/cui/source/options/fontsubs.hxx +++ b/cui/source/options/fontsubs.hxx @@ -55,15 +55,15 @@ class SvxFontSubstCheckListBox : public SvxSimpleTable SvxFontSubstCheckListBox(Window* pParent, const ResId& rResId ) : SvxSimpleTable( pParent, rResId ){} - inline void *GetUserData(ULONG nPos) { return GetEntry(nPos)->GetUserData(); } - inline void SetUserData(ULONG nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); } - - BOOL IsChecked(ULONG nPos, USHORT nCol = 0); - BOOL IsChecked(SvLBoxEntry* pEntry, USHORT nCol = 0); - void CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked); - void CheckEntry(SvLBoxEntry* pEntry, USHORT nCol, BOOL bChecked); - SvButtonState GetCheckButtonState( SvLBoxEntry*, USHORT nCol ) const; - void SetCheckButtonState( SvLBoxEntry*, USHORT nCol, SvButtonState ); + inline void *GetUserData(sal_uLong nPos) { return GetEntry(nPos)->GetUserData(); } + inline void SetUserData(sal_uLong nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); } + + sal_Bool IsChecked(sal_uLong nPos, sal_uInt16 nCol = 0); + sal_Bool IsChecked(SvLBoxEntry* pEntry, sal_uInt16 nCol = 0); + void CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked); + void CheckEntry(SvLBoxEntry* pEntry, sal_uInt16 nCol, sal_Bool bChecked); + SvButtonState GetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol ) const; + void SetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol, SvButtonState ); }; // class SvxFontSubstTabPage ---------------------------------------------------- @@ -114,7 +114,7 @@ class SvxFontSubstTabPage : public SfxTabPage public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/internationaloptions.cxx b/cui/source/options/internationaloptions.cxx index 96c60fc1599e..57458759c9eb 100644 --- a/cui/source/options/internationaloptions.cxx +++ b/cui/source/options/internationaloptions.cxx @@ -48,14 +48,14 @@ namespace offapp CheckBox m_aCB_ShtVwRight2Left; CheckBox m_aCB_ShtVwCurrentDocOnly; - BOOL m_bEnable_SheetView_Opt : 1; + sal_Bool m_bEnable_SheetView_Opt : 1; inline IMPL( Window* _pParent ); - inline void EnableOption_SheetView( BOOL _bEnable = TRUE ); - void ShowOption_SheetView( BOOL _bShow = TRUE ); + inline void EnableOption_SheetView( sal_Bool _bEnable = sal_True ); + void ShowOption_SheetView( sal_Bool _bShow = sal_True ); - BOOL FillItemSet( SfxItemSet& _rSet ); + sal_Bool FillItemSet( SfxItemSet& _rSet ); void Reset( const SfxItemSet& _rSet ); }; @@ -67,12 +67,12 @@ namespace offapp ,m_aCB_ShtVwRight2Left ( _pParent, CUI_RES( CB_SHTVW_RIGHT2LEFT ) ) ,m_aCB_ShtVwCurrentDocOnly ( _pParent, CUI_RES( CB_SHTVW_CURRENTDOCONLY ) ) - ,m_bEnable_SheetView_Opt ( FALSE ) + ,m_bEnable_SheetView_Opt ( sal_False ) { ShowOption_SheetView( m_bEnable_SheetView_Opt ); } - inline void InternationalOptionsPage::IMPL::EnableOption_SheetView( BOOL _bEnable ) + inline void InternationalOptionsPage::IMPL::EnableOption_SheetView( sal_Bool _bEnable ) { if( m_bEnable_SheetView_Opt != _bEnable ) { @@ -82,14 +82,14 @@ namespace offapp } } - void InternationalOptionsPage::IMPL::ShowOption_SheetView( BOOL _bShow ) + void InternationalOptionsPage::IMPL::ShowOption_SheetView( sal_Bool _bShow ) { m_aFL_SheetView.Show( _bShow ); m_aCB_ShtVwRight2Left.Show( _bShow ); m_aCB_ShtVwCurrentDocOnly.Show( _bShow ); } - BOOL InternationalOptionsPage::IMPL::FillItemSet( SfxItemSet& _rSet ) + sal_Bool InternationalOptionsPage::IMPL::FillItemSet( SfxItemSet& _rSet ) { DBG_ASSERT( _rSet.GetPool(), "-InternationalOptionsPage::FillItemSet(): no pool gives rums!" ); @@ -103,7 +103,7 @@ namespace offapp // { // } - return TRUE; + return sal_True; } void InternationalOptionsPage::IMPL::Reset( const SfxItemSet& _rSet ) @@ -113,15 +113,15 @@ namespace offapp DBG_ASSERT( pLeft2RightItem, "+InternationalOptionsPage::Reset(): SID_ATTR_PARA_LEFT_TO_RIGHT not set!" ); - BOOL bLeft2Right = pLeft2RightItem? pLeft2RightItem->GetValue() : TRUE; + sal_Bool bLeft2Right = pLeft2RightItem? pLeft2RightItem->GetValue() : sal_True; m_aRB_TxtDirLeft2Right.Check( bLeft2Right ); // handling of SheetView stuff // if( m_bEnable_SheetView_Opt ) // { -// m_aCB_ShtVwRight2Left.Check( FALSE ); +// m_aCB_ShtVwRight2Left.Check( sal_False ); // -// m_aCB_ShtVwCurrentDocOnly.Check( FALSE ); +// m_aCB_ShtVwCurrentDocOnly.Check( sal_False ); // } } @@ -150,7 +150,7 @@ namespace offapp DELETEZ( m_pImpl ); } - BOOL InternationalOptionsPage::FillItemSet( SfxItemSet& _rSet ) + sal_Bool InternationalOptionsPage::FillItemSet( SfxItemSet& _rSet ) { return m_pImpl->FillItemSet( _rSet ); } diff --git a/cui/source/options/optHeaderTabListbox.cxx b/cui/source/options/optHeaderTabListbox.cxx index 3cafbf2c2f3d..5fd13b6bb623 100644 --- a/cui/source/options/optHeaderTabListbox.cxx +++ b/cui/source/options/optHeaderTabListbox.cxx @@ -40,15 +40,15 @@ namespace svx class OptLBoxString_Impl : public SvLBoxString { public: - OptLBoxString_Impl( SvLBoxEntry* pEntry, USHORT nFlags, const String& rTxt ) : + OptLBoxString_Impl( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rTxt ) : SvLBoxString( pEntry, nFlags, rTxt ) {} - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry ); + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry ); }; // ----------------------------------------------------------------------- -void OptLBoxString_Impl::Paint( const Point& rPos, SvLBox& rDev, USHORT, SvLBoxEntry* pEntry ) +void OptLBoxString_Impl::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) { Font aOldFont( rDev.GetFont() ); Font aFont( aOldFont ); @@ -73,9 +73,9 @@ void OptHeaderTabListBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt, SvLBoxButtonKind eButtonKind ) { SvTabListBox::InitEntry( pEntry, rTxt, rImg1, rImg2, eButtonKind ); - USHORT _nTabCount = TabCount(); + sal_uInt16 _nTabCount = TabCount(); - for ( USHORT nCol = 1; nCol < _nTabCount; ++nCol ) + for ( sal_uInt16 nCol = 1; nCol < _nTabCount; ++nCol ) { // alle Spalten mit eigener Klasse initialisieren (Spalte 0 == Bitmap) SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nCol ); diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx index a4fc84538834..3be5e2a8d927 100644 --- a/cui/source/options/optaccessibility.cxx +++ b/cui/source/options/optaccessibility.cxx @@ -123,7 +123,7 @@ SfxTabPage* SvxAccessibilityOptionsTabPage::Create( Window* pParent, const SfxIt return new SvxAccessibilityOptionsTabPage(pParent, rAttrSet); } -BOOL SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& ) { //aConfig.Set... from controls @@ -148,7 +148,7 @@ BOOL SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& ) Application::MergeSystemSettings( aAllSettings ); Application::SetSettings(aAllSettings); - return FALSE; + return sal_False; } void SvxAccessibilityOptionsTabPage::Reset( const SfxItemSet& ) diff --git a/cui/source/options/optaccessibility.hxx b/cui/source/options/optaccessibility.hxx index 88a472c23541..f816962f46b1 100644 --- a/cui/source/options/optaccessibility.hxx +++ b/cui/source/options/optaccessibility.hxx @@ -57,7 +57,7 @@ public: virtual ~SvxAccessibilityOptionsTabPage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx index f6fa4e45ca95..fb4c6e2e1352 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -175,7 +175,7 @@ SvxAsianLayoutPage::SvxAsianLayoutPage( Window* pParent, const SfxItemSet& rSet aStartED.SetModifyHdl(aLk); aEndED.SetModifyHdl(aLk); - aLanguageLB.SetLanguageList( LANG_LIST_FBD_CHARS, FALSE, FALSE ); + aLanguageLB.SetLanguageList( LANG_LIST_FBD_CHARS, sal_False, sal_False ); } /*-- 09.01.01 13:29:02--------------------------------------------------- @@ -194,7 +194,7 @@ SfxTabPage* SvxAsianLayoutPage::Create( Window* pParent, const SfxItemSet& rAttr /*-- 09.01.01 13:29:03--------------------------------------------------- -----------------------------------------------------------------------*/ -BOOL SvxAsianLayoutPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxAsianLayoutPage::FillItemSet( SfxItemSet& ) { if(aCharKerningRB.IsChecked() != aCharKerningRB.GetSavedValue()) { @@ -203,7 +203,7 @@ BOOL SvxAsianLayoutPage::FillItemSet( SfxItemSet& ) if(pImpl->xPrSetInfo.is() && pImpl->xPrSetInfo->hasPropertyByName(sPunct)) { Any aVal; - BOOL bVal = !aCharKerningRB.IsChecked(); + sal_Bool bVal = !aCharKerningRB.IsChecked(); aVal.setValue(&bVal, ::getBooleanCppuType()); pImpl->xPrSet->setPropertyValue(sPunct, aVal); } @@ -232,9 +232,9 @@ BOOL SvxAsianLayoutPage::FillItemSet( SfxItemSet& ) for( SvxForbiddenChars_Impl* pElem = pImpl->aChangedLanguagesTbl.First(); pElem; pElem = pImpl->aChangedLanguagesTbl.Next() ) { - ULONG nLang = pImpl->aChangedLanguagesTbl.GetKey( pElem ); + sal_uLong nLang = pImpl->aChangedLanguagesTbl.GetKey( pElem ); Locale aLocale; - SvxLanguageToLocale(aLocale, (USHORT)nLang ); + SvxLanguageToLocale(aLocale, (sal_uInt16)nLang ); if(pElem->bRemoved) pImpl->xForbidden->removeForbiddenCharacters( aLocale ); else if(pElem->pCharacters) @@ -248,7 +248,7 @@ BOOL SvxAsianLayoutPage::FillItemSet( SfxItemSet& ) } eLastUsedLanguageTypeForForbiddenCharacters = aLanguageLB.GetSelectLanguage(); - return FALSE; + return sal_False; } /*-- 09.01.01 13:29:03--------------------------------------------------- @@ -293,20 +293,20 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet& ) } else { - aStartEndGB.Enable(FALSE); - aLanguageFT.Enable(FALSE); - aLanguageLB.Enable(FALSE); - aStandardCB.Enable(FALSE); - aStartFT.Enable(FALSE); - aStartED.Enable(FALSE); - aEndFT.Enable(FALSE); - aEndED.Enable(FALSE); - aHintFT.Enable(FALSE); + aStartEndGB.Enable(sal_False); + aLanguageFT.Enable(sal_False); + aLanguageLB.Enable(sal_False); + aStandardCB.Enable(sal_False); + aStartFT.Enable(sal_False); + aStartED.Enable(sal_False); + aEndFT.Enable(sal_False); + aEndED.Enable(sal_False); + aHintFT.Enable(sal_False); } if(bKernWesternText) - aCharKerningRB.Check(TRUE); + aCharKerningRB.Check(sal_True); else - aCharPunctKerningRB.Check(TRUE); + aCharPunctKerningRB.Check(sal_True); switch(nCompress) { case 0 : aNoCompressionRB.Check(); break; @@ -359,7 +359,7 @@ IMPL_LINK(SvxAsianLayoutPage, LanguageHdl, SvxLanguageBox*, EMPTYARG ) SvxForbiddenChars_Impl* pElement = pImpl->getForbiddenCharacters(eSelectLanguage); if(pElement->bRemoved || !pElement->pCharacters) { - bAvail = FALSE; + bAvail = sal_False; } else { @@ -459,9 +459,9 @@ IMPL_LINK(SvxAsianLayoutPage, ModifyHdl, Edit*, pEdit) /*-- 07.09.2007 12:05:09--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT* SvxAsianLayoutPage::GetRanges() +sal_uInt16* SvxAsianLayoutPage::GetRanges() { //no items are used - static USHORT pAsianLayoutRanges[] = { 0 }; + static sal_uInt16 pAsianLayoutRanges[] = { 0 }; return pAsianLayoutRanges; } diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index 0fd27c60c039..cfec52f07a59 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -40,13 +40,13 @@ void ChartColorLB::FillBox( const SvxChartColorTable & rTab ) { long nCount = rTab.size(); - SetUpdateMode( FALSE ); + SetUpdateMode( sal_False ); for( long i = 0; i < nCount; i++ ) { Append( const_cast< XColorEntry * >( & rTab[ i ] )); } - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); } @@ -80,7 +80,7 @@ SvxDefaultColorOptPage::SvxDefaultColorOptPage( Window* pParent, const SfxItemSe pColorTab = new XColorTable( SvtPathOptions().GetPalettePath() ); const SfxPoolItem* pItem = NULL; - if ( rInAttrs.GetItemState( SID_SCH_EDITOPTIONS, FALSE, &pItem ) == SFX_ITEM_SET ) + if ( rInAttrs.GetItemState( SID_SCH_EDITOPTIONS, sal_False, &pItem ) == SFX_ITEM_SET ) { pColorConfig = SAL_STATIC_CAST( SvxChartColorTableItem*, pItem->Clone() ); } @@ -123,12 +123,12 @@ SfxTabPage* __EXPORT SvxDefaultColorOptPage::Create( Window* pParent, const SfxI return new SvxDefaultColorOptPage( pParent, rAttrs ); } -BOOL __EXPORT SvxDefaultColorOptPage::FillItemSet( SfxItemSet& rOutAttrs ) +sal_Bool __EXPORT SvxDefaultColorOptPage::FillItemSet( SfxItemSet& rOutAttrs ) { if( pColorConfig ) rOutAttrs.Put( *SAL_STATIC_CAST( SfxPoolItem*, pColorConfig )); - return TRUE; + return sal_True; } void __EXPORT SvxDefaultColorOptPage::Reset( const SfxItemSet& ) @@ -147,7 +147,7 @@ void SvxDefaultColorOptPage::FillColorBox() for( long i = 0; i < nCount; i++ ) { pColorEntry = pColorTab->GetColor( i ); - aValSetColorBox.InsertItem( (USHORT) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() ); + aValSetColorBox.InsertItem( (sal_uInt16) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() ); } } @@ -208,7 +208,7 @@ IMPL_LINK( SvxDefaultColorOptPage, ListClickedHdl, ChartColorLB*, pColorList ) } else { - aValSetColorBox.SelectItem( (USHORT)nIndex + 1 ); // ValueSet is 1-based + aValSetColorBox.SelectItem( (sal_uInt16)nIndex + 1 ); // ValueSet is 1-based } return 0L; @@ -219,7 +219,7 @@ IMPL_LINK( SvxDefaultColorOptPage, ListClickedHdl, ChartColorLB*, pColorList ) IMPL_LINK( SvxDefaultColorOptPage, BoxClickedHdl, ValueSet*, EMPTYARG ) { - USHORT nIdx = aLbChartColors.GetSelectEntryPos(); + sal_uInt16 nIdx = aLbChartColors.GetSelectEntryPos(); if( nIdx != LISTBOX_ENTRY_NOTFOUND ) { XColorEntry aEntry( aValSetColorBox.GetItemColor( aValSetColorBox.GetSelectItemId() ), diff --git a/cui/source/options/optchart.hxx b/cui/source/options/optchart.hxx index abf0cf45a2dd..969736079347 100644 --- a/cui/source/options/optchart.hxx +++ b/cui/source/options/optchart.hxx @@ -81,7 +81,7 @@ public: void Construct(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs ); - virtual BOOL FillItemSet( SfxItemSet& rOutAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& rOutAttrs ); virtual void Reset( const SfxItemSet& rInAttrs ); }; diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index bcc4dbf54dcb..6105391a72fe 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -866,13 +866,13 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe } } Color aTextColor; - BOOL bSetTextColor = FALSE; + sal_Bool bSetTextColor = sal_False; //#104195# when the window color is the same as the text color it has to be changed Color aWinCol = rStyleSettings.GetWindowColor(); Color aRCheckCol = rStyleSettings.GetRadioCheckTextColor(); if(aWinCol == aRCheckCol ) { - bSetTextColor = TRUE; + bSetTextColor = sal_True; aRCheckCol.Invert(); //if inversion didn't work (gray) then it's set to black if(aRCheckCol == aWinCol) @@ -1121,11 +1121,11 @@ ColorConfigCtrl_Impl::ColorConfigCtrl_Impl( sal_Int32 nThirdWidth = aScrollWindow.aWindows[0]->GetPosPixel().X() - nFirstWidth - nSecondWidth; const WinBits nHeadBits = HIB_VCENTER | HIB_FIXED| HIB_FIXEDPOS; - aHeaderHB.InsertItem( 1, sOn, nFirstWidth, (USHORT)nHeadBits|HIB_CENTER); - aHeaderHB.InsertItem( 2, sUIElem, nSecondWidth, (USHORT)nHeadBits|HIB_LEFT); - aHeaderHB.InsertItem( 3, sColSetting, nThirdWidth, (USHORT)nHeadBits|HIB_LEFT); + aHeaderHB.InsertItem( 1, sOn, nFirstWidth, (sal_uInt16)nHeadBits|HIB_CENTER); + aHeaderHB.InsertItem( 2, sUIElem, nSecondWidth, (sal_uInt16)nHeadBits|HIB_LEFT); + aHeaderHB.InsertItem( 3, sColSetting, nThirdWidth, (sal_uInt16)nHeadBits|HIB_LEFT); aHeaderHB.InsertItem( 4, sPreview, - aHeaderHB.GetSizePixel().Width() - nFirstWidth - nSecondWidth - nThirdWidth, (USHORT)nHeadBits|HIB_LEFT); + aHeaderHB.GetSizePixel().Width() - nFirstWidth - nSecondWidth - nThirdWidth, (sal_uInt16)nHeadBits|HIB_LEFT); aHeaderHB.Show(); aVScroll.SetRangeMin(0); @@ -1197,7 +1197,7 @@ void ColorConfigCtrl_Impl::Update() if(ANCHOR == i) continue; const ColorConfigValue& rColorEntry = pColorConfig->GetColorValue(ColorConfigEntry(i)); - if(COL_AUTO == (UINT32)rColorEntry.nColor) + if(COL_AUTO == (sal_uInt32)rColorEntry.nColor) { if(aScrollWindow.aColorBoxes[i]) aScrollWindow.aColorBoxes[i]->SelectEntryPos(0); @@ -1257,7 +1257,7 @@ void ColorConfigCtrl_Impl::Update() ---------------------------------------------------------------------------*/ sal_Bool lcl_MoveAndShow(Window* pWindow, long nOffset, long nMaxVisible, bool _bShow) { - BOOL bHide = TRUE; + sal_Bool bHide = sal_True; if(pWindow) { Point aPos = pWindow->GetPosPixel(); @@ -1271,7 +1271,7 @@ sal_Bool lcl_MoveAndShow(Window* pWindow, long nOffset, long nMaxVisible, bool _ } IMPL_LINK(ColorConfigCtrl_Impl, ScrollHdl, ScrollBar*, pScrollBar) { - aScrollWindow.SetUpdateMode(TRUE); + aScrollWindow.SetUpdateMode(sal_True); sal_Int16 i; long nOffset = aScrollWindow.aColorBoxes[1]->GetPosPixel().Y() - aScrollWindow.aColorBoxes[0]->GetPosPixel().Y(); nOffset *= (nScrollPos - pScrollBar->GetThumbPos()); @@ -1291,7 +1291,7 @@ IMPL_LINK(ColorConfigCtrl_Impl, ScrollHdl, ScrollBar*, pScrollBar) lcl_MoveAndShow(aScrollWindow.aCheckBoxes[i], nOffset, nWindowHeight, bShowCtrl); lcl_MoveAndShow(aScrollWindow.aFixedTexts[i], nOffset, nWindowHeight, bShowCtrl); lcl_MoveAndShow(aScrollWindow.aWindows[i] , nOffset, nWindowHeight, bShowCtrl); - BOOL bShow = lcl_MoveAndShow(aScrollWindow.aColorBoxes[i], nOffset, nWindowHeight, bShowCtrl); + sal_Bool bShow = lcl_MoveAndShow(aScrollWindow.aColorBoxes[i], nOffset, nWindowHeight, bShowCtrl); if(bShow) { if(nFirstVisible == -1) @@ -1345,7 +1345,7 @@ IMPL_LINK(ColorConfigCtrl_Impl, ScrollHdl, ScrollBar*, pScrollBar) Point aPos = aScrollWindow.aChapters[i]->GetPosPixel(); aPos.Y() += nOffset; aScrollWindow.aChapters[i]->SetPosPixel(aPos); aPos = aScrollWindow.aChapterWins[i]->GetPosPixel(); aPos.Y() += nOffset; aScrollWindow.aChapterWins[i]->SetPosPixel(aPos); } - aScrollWindow.SetUpdateMode(TRUE); + aScrollWindow.SetUpdateMode(sal_True); return 0; } /* -----------------------------29.04.2002 17:02------------------------------ @@ -1356,7 +1356,7 @@ long ColorConfigCtrl_Impl::PreNotify( NotifyEvent& rNEvt ) if(rNEvt.GetType() == EVENT_COMMAND) { const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); - USHORT nCmd = pCEvt->GetCommand(); + sal_uInt16 nCmd = pCEvt->GetCommand(); if( COMMAND_WHEEL == nCmd ) { Command(*pCEvt); @@ -1530,7 +1530,7 @@ SvxColorOptionsTabPage::SvxColorOptionsTabPage( aSaveSchemePB( this, CUI_RES( PB_SAVESCHEME) ), aDeleteSchemePB( this, CUI_RES( PB_DELETESCHEME ) ), aCustomColorsFL( this, CUI_RES( FL_CUSTOMCOLORS ) ), - bFillItemSetCalled(FALSE), + bFillItemSetCalled(sal_False), pColorConfig(0), pExtColorConfig(0), pColorConfigCT( new ColorConfigCtrl_Impl(this, CUI_RES( CT_COLORCONFIG ) )) @@ -1575,9 +1575,9 @@ SfxTabPage* SvxColorOptionsTabPage::Create( Window* pParent, const SfxItemSet& r /* -----------------------------25.03.2002 10:47------------------------------ ---------------------------------------------------------------------------*/ -BOOL SvxColorOptionsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxColorOptionsTabPage::FillItemSet( SfxItemSet& ) { - bFillItemSetCalled = TRUE; + bFillItemSetCalled = sal_True; if(aColorSchemeLB.GetSavedValue() != aColorSchemeLB.GetSelectEntryPos()) { pColorConfig->SetModified(); @@ -1587,7 +1587,7 @@ BOOL SvxColorOptionsTabPage::FillItemSet( SfxItemSet& ) pColorConfig->Commit(); if(pExtColorConfig->IsModified()) pExtColorConfig->Commit(); - return TRUE; + return sal_True; } /* -----------------------------25.03.2002 10:47------------------------------ diff --git a/cui/source/options/optcolor.hxx b/cui/source/options/optcolor.hxx index 795548e0ad3a..32d7799109e8 100644 --- a/cui/source/options/optcolor.hxx +++ b/cui/source/options/optcolor.hxx @@ -52,7 +52,7 @@ class SvxColorOptionsTabPage : public SfxTabPage FixedLine aCustomColorsFL; - BOOL bFillItemSetCalled; + sal_Bool bFillItemSetCalled; svtools::EditableColorConfig* pColorConfig; svtools::EditableExtendedColorConfig* pExtColorConfig; @@ -69,7 +69,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet ); diff --git a/cui/source/options/optctl.cxx b/cui/source/options/optctl.cxx index a22ce6bc6c36..ef2e959af80c 100644 --- a/cui/source/options/optctl.cxx +++ b/cui/source/options/optctl.cxx @@ -82,48 +82,48 @@ SfxTabPage* SvxCTLOptionsPage::Create( Window* pParent, const SfxItemSet& rAttrS return new SvxCTLOptionsPage( pParent, rAttrSet ); } // ----------------------------------------------------------------------------- -BOOL SvxCTLOptionsPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxCTLOptionsPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvtCTLOptions aCTLOptions; // Sequence checking - BOOL bChecked = m_aSequenceCheckingCB.IsChecked(); + sal_Bool bChecked = m_aSequenceCheckingCB.IsChecked(); if ( bChecked != m_aSequenceCheckingCB.GetSavedValue() ) { aCTLOptions.SetCTLSequenceChecking( bChecked ); - bModified = TRUE; + bModified = sal_True; } bChecked = m_aRestrictedCB.IsChecked(); if( bChecked != m_aRestrictedCB.GetSavedValue() ) { aCTLOptions.SetCTLSequenceCheckingRestricted( bChecked ); - bModified = TRUE; + bModified = sal_True; } bChecked = m_aTypeReplaceCB.IsChecked(); if( bChecked != m_aTypeReplaceCB.GetSavedValue()) { aCTLOptions.SetCTLSequenceCheckingTypeAndReplace(bChecked); - bModified = TRUE; + bModified = sal_True; } - BOOL bLogicalChecked = m_aMovementLogicalRB.IsChecked(); - BOOL bVisualChecked = m_aMovementVisualRB.IsChecked(); + sal_Bool bLogicalChecked = m_aMovementLogicalRB.IsChecked(); + sal_Bool bVisualChecked = m_aMovementVisualRB.IsChecked(); if ( bLogicalChecked != m_aMovementLogicalRB.GetSavedValue() || bVisualChecked != m_aMovementVisualRB.GetSavedValue() ) { SvtCTLOptions::CursorMovement eMovement = bLogicalChecked ? SvtCTLOptions::MOVEMENT_LOGICAL : SvtCTLOptions::MOVEMENT_VISUAL; aCTLOptions.SetCTLCursorMovement( eMovement ); - bModified = TRUE; + bModified = sal_True; } - USHORT nPos = m_aNumeralsLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aNumeralsLB.GetSelectEntryPos(); if ( nPos != m_aNumeralsLB.GetSavedValue() ) { aCTLOptions.SetCTLTextNumerals( (SvtCTLOptions::TextNumerals)nPos ); - bModified = TRUE; + bModified = sal_True; } return bModified; @@ -152,7 +152,7 @@ void SvxCTLOptionsPage::Reset( const SfxItemSet& ) DBG_ERRORFILE( "SvxCTLOptionsPage::Reset(): invalid movement enum" ); } - USHORT nPos = (USHORT)aCTLOptions.GetCTLTextNumerals(); + sal_uInt16 nPos = (sal_uInt16)aCTLOptions.GetCTLTextNumerals(); DBG_ASSERT( nPos < m_aNumeralsLB.GetEntryCount(), "SvxCTLOptionsPage::Reset(): invalid numerals enum" ); m_aNumeralsLB.SelectEntryPos( nPos ); diff --git a/cui/source/options/optctl.hxx b/cui/source/options/optctl.hxx index b18689d60bc9..6ac246b83c18 100644 --- a/cui/source/options/optctl.hxx +++ b/cui/source/options/optctl.hxx @@ -62,7 +62,7 @@ public: virtual ~SvxCTLOptionsPage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index 7867c5de68b0..be5750400b69 100755 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -118,7 +118,7 @@ SvxNewDictionaryDialog::SvxNewDictionaryDialog( Window* pParent, aOKBtn.SetClickHdl( LINK( this, SvxNewDictionaryDialog, OKHdl_Impl ) ); // Sprachen anzeigen - aLanguageLB.SetLanguageList( LANG_LIST_ALL, TRUE, TRUE ); + aLanguageLB.SetLanguageList( LANG_LIST_ALL, sal_True, sal_True ); aLanguageLB.SelectEntryPos(0); FreeResource(); @@ -298,7 +298,7 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog( } } - aLangLB.SetLanguageList( LANG_LIST_ALL, TRUE, TRUE ); + aLangLB.SetLanguageList( LANG_LIST_ALL, sal_True, sal_True ); aReplaceED.SetSpaces(sal_True); aWordED.SetSpaces(sal_True); @@ -382,13 +382,13 @@ void SvxEditDictionaryDialog::SetLanguage_Impl( util::Language nLanguage ) aLangLB.SelectLanguage( nLanguage ); } -USHORT SvxEditDictionaryDialog::GetLBInsertPos(const String &rDicWord) +sal_uInt16 SvxEditDictionaryDialog::GetLBInsertPos(const String &rDicWord) { - USHORT nPos = USHRT_MAX; + sal_uInt16 nPos = USHRT_MAX; IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ); const CollatorWrapper* pCollator = aIntlWrapper.getCollator(); - USHORT j; + sal_uInt16 j; for( j = 0; j < aWordsLB.GetEntryCount(); j++ ) { SvLBoxEntry* pEntry = aWordsLB.GetEntry(j); @@ -453,7 +453,7 @@ IMPL_LINK( SvxEditDictionaryDialog, SelectLangHdl_Impl, ListBox *, EMPTYARG ) sal_uInt16 nDicPos = aAllDictsLB.GetSelectEntryPos(); sal_uInt16 nLang = aLangLB.GetSelectLanguage(); Reference< XDictionary > xDic( aDics.getConstArray()[ nDicPos ], UNO_QUERY ); - INT16 nOldLang = SvxLocaleToLanguage( xDic->getLocale() ); + sal_Int16 nOldLang = SvxLocaleToLanguage( xDic->getLocale() ); if ( nLang != nOldLang ) { @@ -535,7 +535,7 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 nId ) for (sal_Int32 i = 0; i < nCount; i++) { aStr = String(pEntry[i]->getDictionaryWord()); - USHORT nPos = GetLBInsertPos( aStr ); + sal_uInt16 nPos = GetLBInsertPos( aStr ); if(pEntry[i]->isNegative()) { aStr += '\t'; @@ -689,8 +689,8 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) xub_StrLen nWordLen=rEntry.Len(); const String& rRepString = aReplaceED.GetText(); - BOOL bEnableNewReplace = FALSE; - BOOL bEnableDelete = FALSE; + sal_Bool bEnableNewReplace = sal_False; + sal_Bool bEnableDelete = sal_False; String aNewReplaceText = sNew; if(pEdt == &aWordED) @@ -719,7 +719,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) if (CDE_SIMILAR == eCmpRes) { aNewReplaceText = sModify; - bEnableNewReplace = TRUE; + bEnableNewReplace = sal_True; } bFound= sal_True; break; @@ -734,7 +734,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) bTmpSelEntry=sal_True; aNewReplaceText = sNew; - bEnableNewReplace = TRUE; + bEnableNewReplace = sal_True; } } @@ -744,7 +744,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) pFirstSel = 0; aNewReplaceText = sNew; - bEnableNewReplace = TRUE; + bEnableNewReplace = sal_True; } bEnableDelete = CDE_DIFFERENT != eCmpRes; } @@ -766,13 +766,13 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) aReplaceText = aWordsLB.GetEntryText( pFirstSel, 1 ); aNewReplaceText = sModify; - bEnableDelete = TRUE; + bEnableDelete = sal_True; } - BOOL bIsChange = + sal_Bool bIsChange = CDE_EQUAL != cmpDicEntry_Impl(aWordED.GetText(), aWordText) || CDE_EQUAL != cmpDicEntry_Impl(aReplaceED.GetText(), aReplaceText); if (aWordED.GetText().Len() && bIsChange) - bEnableNewReplace = TRUE; + bEnableNewReplace = sal_True; } aNewReplacePB.SetText( aNewReplaceText ); diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 811a421223e9..a41a4b82bf57 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -84,11 +84,11 @@ SfxTabPage* OfaMSFilterTabPage::Create( Window* pParent, return new OfaMSFilterTabPage( pParent, rAttrSet ); } -BOOL OfaMSFilterTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaMSFilterTabPage::FillItemSet( SfxItemSet& ) { SvtFilterOptions* pOpt = SvtFilterOptions::Get(); - BOOL bFlag; + sal_Bool bFlag; if( aWBasicCodeCB.GetSavedValue() != (bFlag = aWBasicCodeCB.IsChecked())) pOpt->SetLoadWordBasicCode( bFlag ); if( aWBasicStgCB.GetSavedValue() != (bFlag = aWBasicStgCB.IsChecked())) @@ -106,7 +106,7 @@ BOOL OfaMSFilterTabPage::FillItemSet( SfxItemSet& ) if( aPBasicStgCB.GetSavedValue() != (bFlag = aPBasicStgCB.IsChecked())) pOpt->SetLoadPPointBasicStorage( bFlag ); - return FALSE; + return sal_False; } /*-----------------02.09.96 13.47------------------- @@ -179,15 +179,15 @@ SfxTabPage* OfaMSFilterTabPage2::Create( Window* pParent, return new OfaMSFilterTabPage2( pParent, rAttrSet ); } -BOOL OfaMSFilterTabPage2::FillItemSet( SfxItemSet& ) +sal_Bool OfaMSFilterTabPage2::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvtFilterOptions* pOpt = SvtFilterOptions::Get(); static struct ChkCBoxEntries{ MSFltrPg2_CheckBoxEntries eType; - BOOL (SvtFilterOptions:: *FnIs)() const; - void (SvtFilterOptions:: *FnSet)( BOOL bFlag ); + sal_Bool (SvtFilterOptions:: *FnIs)() const; + void (SvtFilterOptions:: *FnSet)( sal_Bool bFlag ); } aChkArr[] = { { Math, &SvtFilterOptions::IsMathType2Math, &SvtFilterOptions::SetMathType2Math }, @@ -208,38 +208,38 @@ BOOL OfaMSFilterTabPage2::FillItemSet( SfxItemSet& ) { InvalidCBEntry, 0, 0 } }; - BOOL bCheck, bFirst = TRUE; + sal_Bool bCheck, bFirst = sal_True; for( const ChkCBoxEntries* pArr = aChkArr; InvalidCBEntry != pArr->eType; ++pArr, bFirst = !bFirst ) { - USHORT nCol = bFirst ? 1 : 2; + sal_uInt16 nCol = bFirst ? 1 : 2; SvLBoxEntry* pEntry = GetEntry4Type( pArr->eType ); if( pEntry ) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem( nCol )); if( pItem && ((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON ) { - USHORT nButtonFlags = pItem->GetButtonFlags(); + sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); bCheck = SV_BUTTON_CHECKED == pCheckButtonData->ConvertToButtonState( nButtonFlags ); if( bCheck != (pOpt->*pArr->FnIs)() ) { - bModified = TRUE; + bModified = sal_True; (pOpt->*pArr->FnSet)( bCheck ); } } } } - return TRUE; + return sal_True; } void OfaMSFilterTabPage2::Reset( const SfxItemSet& ) { SvtFilterOptions* pOpt = SvtFilterOptions::Get(); - aCheckLB.SetUpdateMode(FALSE); + aCheckLB.SetUpdateMode(sal_False); aCheckLB.Clear(); SvtModuleOptions aModuleOpt; @@ -256,7 +256,7 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet& ) static struct ChkCBoxEntries{ MSFltrPg2_CheckBoxEntries eType; - BOOL (SvtFilterOptions:: *FnIs)() const; + sal_Bool (SvtFilterOptions:: *FnIs)() const; } aChkArr[] = { { Math, &SvtFilterOptions::IsMathType2Math }, { Math, &SvtFilterOptions::IsMath2MathType }, @@ -269,11 +269,11 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet& ) { InvalidCBEntry, NULL } }; - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; for( const ChkCBoxEntries* pArr = aChkArr; InvalidCBEntry != pArr->eType; ++pArr, bFirst = !bFirst ) { - USHORT nCol = bFirst ? 1 : 2; + sal_uInt16 nCol = bFirst ? 1 : 2; SvLBoxEntry* pEntry = GetEntry4Type( static_cast< sal_IntPtr >( pArr->eType ) ); if( pEntry ) { @@ -288,7 +288,7 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet& ) } } } - aCheckLB.SetUpdateMode( TRUE ); + aCheckLB.SetUpdateMode( sal_True ); } void OfaMSFilterTabPage2::InsertEntry( const String& _rTxt, sal_IntPtr _nType ) @@ -324,7 +324,7 @@ SvLBoxEntry* OfaMSFilterTabPage2::GetEntry4Type( sal_IntPtr _nType ) const void OfaMSFilterTabPage2::MSFltrSimpleTable::SetTabs() { SvxSimpleTable::SetTabs(); - USHORT nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; + sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; if( aTabs.Count() > 1 ) { @@ -348,7 +348,7 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::HBarClick() ---------------------------------------------------------------------------*/ void OfaMSFilterTabPage2::MSFltrSimpleTable::SetCheckButtonState( - SvLBoxEntry* pEntry, USHORT nCol, SvButtonState eState) + SvLBoxEntry* pEntry, sal_uInt16 nCol, SvButtonState eState) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -376,7 +376,7 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::SetCheckButtonState( ---------------------------------------------------------------------------*/ SvButtonState OfaMSFilterTabPage2::MSFltrSimpleTable::GetCheckButtonState( - SvLBoxEntry* pEntry, USHORT nCol ) const + SvLBoxEntry* pEntry, sal_uInt16 nCol ) const { SvButtonState eState = SV_BUTTON_UNCHECKED; SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -384,7 +384,7 @@ SvButtonState OfaMSFilterTabPage2::MSFltrSimpleTable::GetCheckButtonState( if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) { - USHORT nButtonFlags = pItem->GetButtonFlags(); + sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); } @@ -393,7 +393,7 @@ SvButtonState OfaMSFilterTabPage2::MSFltrSimpleTable::GetCheckButtonState( /* -----------------------------2002/06/20 11:57------------------------------ ---------------------------------------------------------------------------*/ -void OfaMSFilterTabPage2::MSFltrSimpleTable::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked) +void OfaMSFilterTabPage2::MSFltrSimpleTable::CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked) { if ( nPos < GetEntryCount() ) SetCheckButtonState( @@ -410,8 +410,8 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::KeyInput( const KeyEvent& rKEvt ) if(!rKEvt.GetKeyCode().GetModifier() && KEY_SPACE == rKEvt.GetKeyCode().GetCode()) { - ULONG nSelPos = GetModel()->GetAbsPos(GetCurEntry()); - USHORT nCol = GetCurrentTabPos() - 1; + sal_uLong nSelPos = GetModel()->GetAbsPos(GetCurEntry()); + sal_uInt16 nCol = GetCurrentTabPos() - 1; if ( nCol < 2 ) { SvLBoxEntry* pEntry = GetEntry( nSelPos ); @@ -421,7 +421,7 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::KeyInput( const KeyEvent& rKEvt ) } else { - USHORT nCheck = GetCheckButtonState( GetEntry(nSelPos), 1 ) == SV_BUTTON_CHECKED ? 1 : 0; + sal_uInt16 nCheck = GetCheckButtonState( GetEntry(nSelPos), 1 ) == SV_BUTTON_CHECKED ? 1 : 0; if(GetCheckButtonState( GetEntry(nSelPos), 0 )) nCheck += 2; nCheck--; diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx index e2572e901124..608139fab42d 100644 --- a/cui/source/options/optfltr.hxx +++ b/cui/source/options/optfltr.hxx @@ -61,7 +61,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -73,9 +73,9 @@ class OfaMSFilterTabPage2 : public SfxTabPage using SvTreeListBox::SetCheckButtonState; using SvxSimpleTable::SetTabs; - void CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked); - SvButtonState GetCheckButtonState( SvLBoxEntry*, USHORT nCol ) const; - void SetCheckButtonState( SvLBoxEntry*, USHORT nCol, SvButtonState ); + void CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked); + SvButtonState GetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol ) const; + void SetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol, SvButtonState ); protected: virtual void SetTabs(); virtual void HBarClick(); @@ -105,7 +105,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 06d1c46af3df..8b6c0beda7ae 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -309,7 +309,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) : "HighContrastWhite" }; - for ( USHORT i = 0; i < aHelpFormatLB.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0; i < aHelpFormatLB.GetEntryCount(); i++ ) { String* pData = new String( String::CreateFromAscii( aHelpFormatNames[i] ) ); aHelpFormatLB.SetEntryData( i, pData ); @@ -320,7 +320,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) : OfaMiscTabPage::~OfaMiscTabPage() { - for(USHORT i = 0; i < aHelpFormatLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < aHelpFormatLB.GetEntryCount(); i++) { delete static_cast< String* >( aHelpFormatLB.GetEntryData(i) ); } @@ -335,12 +335,12 @@ SfxTabPage* OfaMiscTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet // ----------------------------------------------------------------------- -BOOL OfaMiscTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool OfaMiscTabPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvtHelpOptions aHelpOptions; - BOOL bChecked = aToolTipsCB.IsChecked(); + sal_Bool bChecked = aToolTipsCB.IsChecked(); if ( bChecked != aToolTipsCB.GetSavedValue() ) aHelpOptions.SetHelpTips( bChecked ); bChecked = ( aExtHelpCB.IsChecked() && aToolTipsCB.IsChecked() ); @@ -349,7 +349,7 @@ BOOL OfaMiscTabPage::FillItemSet( SfxItemSet& rSet ) bChecked = aHelpAgentCB.IsChecked(); if ( bChecked != aHelpAgentCB.GetSavedValue() ) aHelpOptions.SetHelpAgentAutoStartMode( bChecked ); - USHORT nHelpFormatPos = aHelpFormatLB.GetSelectEntryPos(); + sal_uInt16 nHelpFormatPos = aHelpFormatLB.GetSelectEntryPos(); if ( nHelpFormatPos != LISTBOX_ENTRY_NOTFOUND && nHelpFormatPos != aHelpFormatLB.GetSavedValue() ) { @@ -360,29 +360,29 @@ BOOL OfaMiscTabPage::FillItemSet( SfxItemSet& rSet ) { SvtMiscOptions aMiscOpt; aMiscOpt.SetUseSystemFileDialog( !aFileDlgCB.IsChecked() ); - bModified = TRUE; + bModified = sal_True; } if ( aPrintDlgCB.IsChecked() != aPrintDlgCB.GetSavedValue() ) { SvtMiscOptions aMiscOpt; aMiscOpt.SetUseSystemPrintDialog( !aPrintDlgCB.IsChecked() ); - bModified = TRUE; + bModified = sal_True; } if ( aDocStatusCB.IsChecked() != aDocStatusCB.GetSavedValue() ) { SvtPrintWarningOptions aPrintOptions; aPrintOptions.SetModifyDocumentOnPrintingAllowed( aDocStatusCB.IsChecked() ); - bModified = TRUE; + bModified = sal_True; } const SfxUInt16Item* pUInt16Item = PTR_CAST( SfxUInt16Item, GetOldItem( rSet, SID_ATTR_YEAR2000 ) ); - USHORT nNum = (USHORT)aYearValueField.GetText().ToInt32(); + sal_uInt16 nNum = (sal_uInt16)aYearValueField.GetText().ToInt32(); if ( pUInt16Item && pUInt16Item->GetValue() != nNum ) { - bModified = TRUE; + bModified = sal_True; rSet.Put( SfxUInt16Item( SID_ATTR_YEAR2000, nNum ) ); } @@ -398,7 +398,7 @@ void OfaMiscTabPage::Reset( const SfxItemSet& rSet ) aExtHelpCB.Check( aHelpOptions.IsHelpTips() && aHelpOptions.IsExtendedHelp() ); aHelpAgentCB.Check( aHelpOptions.IsHelpAgentAutoStartMode() ); String sStyleSheet = aHelpOptions.GetHelpStyleSheet(); - for ( USHORT i = 0; i < aHelpFormatLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aHelpFormatLB.GetEntryCount(); ++i ) { if ( *static_cast< String* >( aHelpFormatLB.GetEntryData(i) ) == sStyleSheet ) { @@ -424,17 +424,17 @@ void OfaMiscTabPage::Reset( const SfxItemSet& rSet ) aDocStatusCB.SaveValue(); const SfxPoolItem* pItem = NULL; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_YEAR2000, FALSE, &pItem ) ) + if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_YEAR2000, sal_False, &pItem ) ) { aYearValueField.SetValue( ((SfxUInt16Item*)pItem)->GetValue() ); TwoFigureConfigHdl( &aYearValueField ); } else { - aYearValueField.Enable(FALSE); - aTwoFigureFL.Enable(FALSE); - aInterpretFT.Enable(FALSE); - aToYearFT.Enable(FALSE); + aYearValueField.Enable(sal_False); + aTwoFigureFL.Enable(sal_False); + aInterpretFT.Enable(sal_False); + aToYearFT.Enable(sal_False); } } @@ -499,24 +499,24 @@ class CanvasSettings public: CanvasSettings(); - BOOL IsHardwareAccelerationEnabled() const; - BOOL IsHardwareAccelerationAvailable() const; - void EnabledHardwareAcceleration( BOOL _bEnabled ) const; + sal_Bool IsHardwareAccelerationEnabled() const; + sal_Bool IsHardwareAccelerationAvailable() const; + void EnabledHardwareAcceleration( sal_Bool _bEnabled ) const; private: typedef std::vector< std::pair<OUString,Sequence<OUString> > > ServiceVector; Reference<XNameAccess> mxForceFlagNameAccess; ServiceVector maAvailableImplementations; - mutable BOOL mbHWAccelAvailable; - mutable BOOL mbHWAccelChecked; + mutable sal_Bool mbHWAccelAvailable; + mutable sal_Bool mbHWAccelChecked; }; // ------------------------------------------------------------------- CanvasSettings::CanvasSettings() : mxForceFlagNameAccess(), - mbHWAccelAvailable(FALSE), - mbHWAccelChecked(FALSE) + mbHWAccelAvailable(sal_False), + mbHWAccelChecked(sal_False) { try { @@ -576,7 +576,7 @@ CanvasSettings::CanvasSettings() : } // ------------------------------------------------------------------- -BOOL CanvasSettings::IsHardwareAccelerationAvailable() const +sal_Bool CanvasSettings::IsHardwareAccelerationAvailable() const { if( !mbHWAccelChecked ) { @@ -622,7 +622,7 @@ BOOL CanvasSettings::IsHardwareAccelerationAvailable() const } // ------------------------------------------------------------------- -BOOL CanvasSettings::IsHardwareAccelerationEnabled() const +sal_Bool CanvasSettings::IsHardwareAccelerationEnabled() const { bool bForceLastEntry(false); if( !mxForceFlagNameAccess.is() ) @@ -635,7 +635,7 @@ BOOL CanvasSettings::IsHardwareAccelerationEnabled() const } // ------------------------------------------------------------------- -void CanvasSettings::EnabledHardwareAcceleration( BOOL _bEnabled ) const +void CanvasSettings::EnabledHardwareAcceleration( sal_Bool _bEnabled ) const { Reference< XNameReplace > xNameReplace( mxForceFlagNameAccess, UNO_QUERY ); @@ -763,8 +763,8 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) : if( ! Application::ValidateSystemFont() ) { - m_aSystemFont.Check( FALSE ); - m_aSystemFont.Enable( FALSE ); + m_aSystemFont.Check( sal_False ); + m_aSystemFont.Enable( sal_False ); } const StyleSettings& aStyleSettings = Application::GetSettings().GetStyleSettings(); @@ -774,8 +774,8 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) : { // do not check 0th item == auto; it is not a real theme aIconStyleItemId[0] = 0; - ULONG nItem = 1; - for ( ULONG n=0; ++n < STYLE_SYMBOLS_THEMES_MAX; ) + sal_uLong nItem = 1; + for ( sal_uLong n=0; ++n < STYLE_SYMBOLS_THEMES_MAX; ) { if ( aStyleSettings.CheckSymbolStyle( n ) ) { @@ -798,7 +798,7 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) : aAutoStr += ::rtl::OUString::createFromAscii( " (" ); - ULONG nAutoStyle = aStyleSettings.GetAutoSymbolsStyle(); + sal_uLong nAutoStyle = aStyleSettings.GetAutoSymbolsStyle(); if ( aIconStyleItemId[nAutoStyle] ) aAutoStr += aIconStyleLB.GetEntry( aIconStyleItemId[nAutoStyle] ); @@ -854,18 +854,18 @@ SfxTabPage* OfaViewTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet --------------------------------------------------*/ -BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaViewTabPage::FillItemSet( SfxItemSet& ) { SvtFontOptions aFontOpt; SvtMenuOptions aMenuOpt; SvtStartOptions aStartOpt; - BOOL bModified = FALSE; - BOOL bMenuOptModified = FALSE; + sal_Bool bModified = sal_False; + sal_Bool bMenuOptModified = sal_False; bool bRepaintWindows(false); SvtMiscOptions aMiscOptions; - UINT16 nSizeLB_NewSelection = aIconSizeLB.GetSelectEntryPos(); + sal_uInt16 nSizeLB_NewSelection = aIconSizeLB.GetSelectEntryPos(); if( nSizeLB_InitialSelection != nSizeLB_NewSelection ) { // from now on it's modified, even if via auto setting the same size was set as now selected in the LB @@ -881,12 +881,12 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) aMiscOptions.SetSymbolsSize( eSet ); } - UINT16 nStyleLB_NewSelection = aIconStyleLB.GetSelectEntryPos(); + sal_uInt16 nStyleLB_NewSelection = aIconStyleLB.GetSelectEntryPos(); if( nStyleLB_InitialSelection != nStyleLB_NewSelection ) { // find the style name in the aIconStyleItemId table // items from the non-installed icon themes were removed - for ( ULONG n=0; n < STYLE_SYMBOLS_THEMES_MAX; n++ ) + for ( sal_uLong n=0; n < STYLE_SYMBOLS_THEMES_MAX; n++ ) { if ( aIconStyleItemId[n] == nStyleLB_NewSelection ) { @@ -896,17 +896,17 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) } } - BOOL bAppearanceChanged = FALSE; + sal_Bool bAppearanceChanged = sal_False; // Screen Scaling - UINT16 nOldScale = pAppearanceCfg->GetScaleFactor(); - UINT16 nNewScale = (UINT16)aWindowSizeMF.GetValue(); + sal_uInt16 nOldScale = pAppearanceCfg->GetScaleFactor(); + sal_uInt16 nNewScale = (sal_uInt16)aWindowSizeMF.GetValue(); if ( nNewScale != nOldScale ) { pAppearanceCfg->SetScaleFactor(nNewScale); - bAppearanceChanged = TRUE; + bAppearanceChanged = sal_True; } // Mouse Snap Mode @@ -918,7 +918,7 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) if ( eNewSnap != eOldSnap ) { pAppearanceCfg->SetSnapMode(eNewSnap ); - bAppearanceChanged = TRUE; + bAppearanceChanged = sal_True; } // Middle Mouse Button @@ -930,41 +930,41 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) if ( eNewMiddleMouse != eOldMiddleMouse ) { pAppearanceCfg->SetMiddleMouseButton( eNewMiddleMouse ); - bAppearanceChanged = TRUE; + bAppearanceChanged = sal_True; } #if defined( UNX ) if ( aFontAntiAliasing.IsChecked() != aFontAntiAliasing.GetSavedValue() ) { pAppearanceCfg->SetFontAntiAliasing( aFontAntiAliasing.IsChecked() ); - bAppearanceChanged = TRUE; + bAppearanceChanged = sal_True; } if ( aAAPointLimit.GetValue() != aAAPointLimit.GetSavedValue().ToInt32() ) { pAppearanceCfg->SetFontAntialiasingMinPixelHeight( aAAPointLimit.GetValue() ); - bAppearanceChanged = TRUE; + bAppearanceChanged = sal_True; } #endif if ( aFontShowCB.IsChecked() != aFontShowCB.GetSavedValue() ) { aFontOpt.EnableFontWYSIWYG( aFontShowCB.IsChecked() ); - bModified = TRUE; + bModified = sal_True; } if(aMenuIconsLB.GetSelectEntryPos() != aMenuIconsLB.GetSavedValue()) { aMenuOpt.SetMenuIconsState( aMenuIconsLB.GetSelectEntryPos() == 0 ? 2 : aMenuIconsLB.GetSelectEntryPos() - 1); - bModified = TRUE; - bMenuOptModified = TRUE; - bAppearanceChanged = TRUE; + bModified = sal_True; + bMenuOptModified = sal_True; + bAppearanceChanged = sal_True; } if ( aFontHistoryCB.IsChecked() != aFontHistoryCB.GetSavedValue() ) { aFontOpt.EnableFontHistory( aFontHistoryCB.IsChecked() ); - bModified = TRUE; + bModified = sal_True; } // #i95644# if disabled, do not use value, see in ::Reset() @@ -973,7 +973,7 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) if(aUseHardwareAccell.IsChecked() != aUseHardwareAccell.GetSavedValue()) { pCanvasSettings->EnabledHardwareAcceleration(aUseHardwareAccell.IsChecked()); - bModified = TRUE; + bModified = sal_True; } } @@ -983,7 +983,7 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) if(aUseAntiAliase.IsChecked() != mpDrawinglayerOpt->IsAntiAliasing()) { mpDrawinglayerOpt->SetAntiAliasing(aUseAntiAliase.IsChecked()); - bModified = TRUE; + bModified = sal_True; bRepaintWindows = true; } } @@ -997,7 +997,7 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) if(bNewSelection != (bool)mpDrawinglayerOpt->IsTransparentSelection()) { mpDrawinglayerOpt->SetTransparentSelection(maSelectionCB.IsChecked()); - bModified = TRUE; + bModified = sal_True; bRepaintWindows = true; } @@ -1006,7 +1006,7 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) if(nNewTransparence != mpDrawinglayerOpt->GetTransparentSelectionPercent()) { mpDrawinglayerOpt->SetTransparentSelectionPercent(nNewTransparence); - bModified = TRUE; + bModified = sal_True; bRepaintWindows = true; } } @@ -1016,8 +1016,8 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) m_aSystemFont.IsEnabled() ) { aAccessibilityOptions.SetIsSystemFont( m_aSystemFont.IsChecked() ); - bModified = TRUE; - bMenuOptModified = TRUE; + bModified = sal_True; + bMenuOptModified = sal_True; } if( bMenuOptModified ) @@ -1255,9 +1255,9 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe aLang = MsLangId::convertIsoStringToLanguage(seqInstalledLanguages[i]); if (aLang != LANGUAGE_DONTKNOW) { - //USHORT p = aUserInterfaceLB.InsertLanguage(aLang); + //sal_uInt16 p = aUserInterfaceLB.InsertLanguage(aLang); String aLangStr( pLanguageTable->GetString( aLang ) ); - USHORT p = aUserInterfaceLB.InsertEntry(aLangStr); + sal_uInt16 p = aUserInterfaceLB.InsertEntry(aLangStr); aUserInterfaceLB.SetEntryData(p, (void*)(i+1)); } } @@ -1273,7 +1273,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe if (m_sUserLocaleValue.getLength() > 0) { sal_Int32 d = 0; - for (USHORT i=0; i < aUserInterfaceLB.GetEntryCount(); i++) + for (sal_uInt16 i=0; i < aUserInterfaceLB.GetEntryCount(); i++) { d = (sal_Int32)(sal_IntPtr)aUserInterfaceLB.GetEntryData(i); if ( d > 0 && seqInstalledLanguages.getLength() > d-1 && seqInstalledLanguages[d-1].equals(m_sUserLocaleValue)) @@ -1290,14 +1290,14 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe OSL_ENSURE(sal_False, aMsg.getStr()); } - aWesternLanguageLB.SetLanguageList( LANG_LIST_WESTERN | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE ); + aWesternLanguageLB.SetLanguageList( LANG_LIST_WESTERN | LANG_LIST_ONLY_KNOWN, sal_True, sal_False, sal_True ); aWesternLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::LATIN ); - aAsianLanguageLB.SetLanguageList( LANG_LIST_CJK | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE ); + aAsianLanguageLB.SetLanguageList( LANG_LIST_CJK | LANG_LIST_ONLY_KNOWN, sal_True, sal_False, sal_True ); aAsianLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::ASIAN ); - aComplexLanguageLB.SetLanguageList( LANG_LIST_CTL | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE ); + aComplexLanguageLB.SetLanguageList( LANG_LIST_CTL | LANG_LIST_ONLY_KNOWN, sal_True, sal_False, sal_True ); aComplexLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::COMPLEX ); - aLocaleSettingLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, FALSE, FALSE, FALSE); + aLocaleSettingLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, sal_False, sal_False, sal_False); aLocaleSettingLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::WEAK ); const NfCurrencyTable& rCurrTab = SvNumberFormatter::GetTheCurrencyTable(); @@ -1309,9 +1309,9 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe aCurrencyLB.InsertEntry( aDefaultCurr ); // all currencies String aTwoSpace( RTL_CONSTASCII_USTRINGPARAM( " " ) ); - USHORT nCurrCount = rCurrTab.Count(); + sal_uInt16 nCurrCount = rCurrTab.Count(); // first entry is SYSTEM, skip it - for ( USHORT j=1; j < nCurrCount; ++j ) + for ( sal_uInt16 j=1; j < nCurrCount; ++j ) { const NfCurrencyEntry* pCurr = rCurrTab[j]; String aStr_( pCurr->GetBankSymbol() ); @@ -1320,7 +1320,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe aStr_ = ApplyLreOrRleEmbedding( aStr_ ); aStr_ += aTwoSpace; aStr_ += ApplyLreOrRleEmbedding( pLanguageTable->GetString( pCurr->GetLanguage() ) ); - USHORT nPos = aCurrencyLB.InsertEntry( aStr_ ); + sal_uInt16 nPos = aCurrencyLB.InsertEntry( aStr_ ); aCurrencyLB.SetEntryData( nPos, (void*) pCurr ); } delete pLanguageTable; @@ -1403,12 +1403,12 @@ void lcl_UpdateAndDelete(SfxVoidItem* pInvalidItems[], SfxBoolItem* pBoolItems[] } } -BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) { // lock configuration broadcasters so that we can coordinate the notifications - pLangConfig->aSysLocaleOptions.BlockBroadcasts( TRUE ); - pLangConfig->aLanguageOptions.BlockBroadcasts( TRUE ); - pLangConfig->aLinguConfig.BlockBroadcasts( TRUE ); + pLangConfig->aSysLocaleOptions.BlockBroadcasts( sal_True ); + pLangConfig->aLanguageOptions.BlockBroadcasts( sal_True ); + pLangConfig->aLinguConfig.BlockBroadcasts( sal_True ); if(aCTLSupportCB.IsChecked() && (aCTLSupportCB.GetSavedValue() != aCTLSupportCB.IsChecked()) || @@ -1497,7 +1497,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) // this will happen after releasing the lock on the ConfigurationBroadcaster at // the end of this method pLangConfig->aSysLocaleOptions.SetLocaleConfigString( sNewLang ); - rSet.Put( SfxBoolItem( SID_OPT_LOCALE_CHANGED, TRUE ) ); + rSet.Put( SfxBoolItem( SID_OPT_LOCALE_CHANGED, sal_True ) ); } if(aDecimalSeparatorCB.GetSavedValue() != aDecimalSeparatorCB.IsChecked()) @@ -1505,7 +1505,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) // Configured currency, for example, USD-en-US or EUR-de-DE, or empty for locale default. OUString sOldCurr = pLangConfig->aSysLocaleOptions.GetCurrencyConfigString(); - USHORT nCurrPos = aCurrencyLB.GetSelectEntryPos(); + sal_uInt16 nCurrPos = aCurrencyLB.GetSelectEntryPos(); const NfCurrencyEntry* pCurr = (const NfCurrencyEntry*) aCurrencyLB.GetEntryData( nCurrPos ); OUString sNewCurr; @@ -1515,15 +1515,15 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) if ( sOldCurr != sNewCurr ) pLangConfig->aSysLocaleOptions.SetCurrencyConfigString( sNewCurr ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SfxObjectShell* pCurrentDocShell = SfxObjectShell::Current(); Reference< XPropertySet > xLinguProp( LinguMgr::GetLinguPropertySet(), UNO_QUERY ); - BOOL bCurrentDocCBChecked = aCurrentDocCB.IsChecked(); + sal_Bool bCurrentDocCBChecked = aCurrentDocCB.IsChecked(); if(aCurrentDocCB.IsEnabled()) bLanguageCurrentDoc_Impl = bCurrentDocCBChecked; - BOOL bCurrentDocCBChanged = bCurrentDocCBChecked != aCurrentDocCB.GetSavedValue(); + sal_Bool bCurrentDocCBChanged = bCurrentDocCBChecked != aCurrentDocCB.GetSavedValue(); - BOOL bValChanged = aWesternLanguageLB.GetSavedValue() != aWesternLanguageLB.GetSelectEntryPos(); + sal_Bool bValChanged = aWesternLanguageLB.GetSavedValue() != aWesternLanguageLB.GetSelectEntryPos(); if( (bCurrentDocCBChanged && !bCurrentDocCBChecked) || bValChanged) { LanguageType eSelectLang = aWesternLanguageLB.GetSelectLanguage(); @@ -1541,7 +1541,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) { rSet.Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, ::com::sun::star::i18n::ScriptType::LATIN), SID_ATTR_LANGUAGE)); - bRet = TRUE; + bRet = sal_True; } } bValChanged = aAsianLanguageLB.GetSavedValue() != aAsianLanguageLB.GetSelectEntryPos(); @@ -1562,7 +1562,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) { rSet.Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, ::com::sun::star::i18n::ScriptType::ASIAN), SID_ATTR_CHAR_CJK_LANGUAGE)); - bRet = TRUE; + bRet = sal_True; } } bValChanged = aComplexLanguageLB.GetSavedValue() != aComplexLanguageLB.GetSelectEntryPos(); @@ -1583,7 +1583,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) { rSet.Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, ::com::sun::star::i18n::ScriptType::COMPLEX), SID_ATTR_CHAR_CTL_LANGUAGE)); - bRet = TRUE; + bRet = sal_True; } } @@ -1596,8 +1596,8 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) const sal_uInt16 STATE_COUNT = 2; SfxBoolItem* pBoolItems[STATE_COUNT]; - pBoolItems[0] = new SfxBoolItem(SID_VERTICALTEXT_STATE, FALSE); - pBoolItems[1] = new SfxBoolItem(SID_TEXT_FITTOSIZE_VERTICAL, FALSE); + pBoolItems[0] = new SfxBoolItem(SID_VERTICALTEXT_STATE, sal_False); + pBoolItems[1] = new SfxBoolItem(SID_TEXT_FITTOSIZE_VERTICAL, sal_False); SfxVoidItem* pInvalidItems[STATE_COUNT]; pInvalidItems[0] = new SfxVoidItem(SID_VERTICALTEXT_STATE); @@ -1612,7 +1612,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) const sal_uInt16 STATE_COUNT = 1; SfxBoolItem* pBoolItems[STATE_COUNT]; - pBoolItems[0] = new SfxBoolItem(SID_CTLFONT_STATE, FALSE); + pBoolItems[0] = new SfxBoolItem(SID_CTLFONT_STATE, sal_False); SfxVoidItem* pInvalidItems[STATE_COUNT]; pInvalidItems[0] = new SfxVoidItem(SID_CTLFONT_STATE); lcl_UpdateAndDelete(pInvalidItems, pBoolItems, STATE_COUNT); @@ -1624,11 +1624,11 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) // first release the lock on the ConfigurationBroadcaster for Locale changes // it seems that our code relies on the fact that before other changes like e.g. currency // are broadcasted locale changes have been done - pLangConfig->aSysLocaleOptions.BlockBroadcasts( FALSE ); - pLangConfig->aLanguageOptions.BlockBroadcasts( FALSE ); - pLangConfig->aLinguConfig.BlockBroadcasts( FALSE ); + pLangConfig->aSysLocaleOptions.BlockBroadcasts( sal_False ); + pLangConfig->aLanguageOptions.BlockBroadcasts( sal_False ); + pLangConfig->aLinguConfig.BlockBroadcasts( sal_False ); - return FALSE; + return sal_False; } //----------------------------------------------------------------------------- void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) @@ -1663,7 +1663,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) pCurr = SvNumberFormatter::GetCurrencyEntry( aAbbrev, eLang ); } // if pCurr==NULL the SYSTEM entry is selected - USHORT nPos = aCurrencyLB.GetEntryPos( (void*) pCurr ); + sal_uInt16 nPos = aCurrencyLB.GetEntryPos( (void*) pCurr ); aCurrencyLB.SelectEntryPos( nPos ); bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::E_CURRENCY); aCurrencyLB.Enable(!bReadonly); @@ -1676,7 +1676,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) LanguageType eCurLangCTL = LANGUAGE_NONE; SfxObjectShell* pCurrentDocShell = SfxObjectShell::Current(); //collect the configuration values first - aCurrentDocCB.Enable(FALSE); + aCurrentDocCB.Enable(sal_False); // Any aWestLang; Any aCJKLang; @@ -1705,24 +1705,24 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) //overwrite them by the values provided by the DocShell if(pCurrentDocShell) { - aCurrentDocCB.Enable(TRUE); + aCurrentDocCB.Enable(sal_True); aCurrentDocCB.Check(bLanguageCurrentDoc_Impl); const SfxPoolItem* pLang; - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_LANGUAGE, FALSE, &pLang)) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_LANGUAGE, sal_False, &pLang)) { LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); if (MsLangId::resolveSystemLanguageByScriptType(eCurLang, ::com::sun::star::i18n::ScriptType::LATIN) != eTempCurLang) eCurLang = eTempCurLang; } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, FALSE, &pLang)) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, sal_False, &pLang)) { LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCJK, ::com::sun::star::i18n::ScriptType::ASIAN) != eTempCurLang) eCurLangCJK = eTempCurLang; } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, FALSE, &pLang)) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, sal_False, &pLang)) { LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCTL, ::com::sun::star::i18n::ScriptType::COMPLEX) != eTempCurLang) @@ -1771,11 +1771,11 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) set the focus to the Western Language box --------------------------------------------------------*/ const SfxPoolItem* pLang = 0; - if ( SFX_ITEM_SET == rSet.GetItemState(SID_SET_DOCUMENT_LANGUAGE, FALSE, &pLang ) &&( (const SfxBoolItem*)pLang)->GetValue() == TRUE ) + if ( SFX_ITEM_SET == rSet.GetItemState(SID_SET_DOCUMENT_LANGUAGE, sal_False, &pLang ) &&( (const SfxBoolItem*)pLang)->GetValue() == sal_True ) { aWesternLanguageLB.GrabFocus(); - aCurrentDocCB.Enable(TRUE); - aCurrentDocCB.Check(TRUE); + aCurrentDocCB.Enable(sal_True); + aCurrentDocCB.Check(sal_True); } } /* -----------------------------20.04.01 15:09-------------------------------- @@ -1819,7 +1819,7 @@ namespace void lcl_checkLanguageCheckBox(CheckBox& _rCB,sal_Bool _bNewValue,sal_Bool _bOldValue) { if ( _bNewValue ) - _rCB.Check(TRUE); + _rCB.Check(sal_True); else _rCB.Check( _bOldValue ); // #i15082# do not call SaveValue() in running dialog... @@ -1851,7 +1851,7 @@ IMPL_LINK( OfaLanguagesTabPage, LocaleSettingHdl, SvxLanguageBox*, pBox ) SupportHdl( &aAsianSupportCB ); } - USHORT nPos; + sal_uInt16 nPos; if ( eLang == LANGUAGE_SYSTEM ) nPos = aCurrencyLB.GetEntryPos( (void*) NULL ); else diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index 2b8f3d074216..3268cd43c51c 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -83,7 +83,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -131,13 +131,13 @@ private: CheckBox maSelectionCB; MetricField maSelectionMF; - UINT16 nSizeLB_InitialSelection; - UINT16 nStyleLB_InitialSelection; - BOOL bSfxSymbolsAuto; + sal_uInt16 nSizeLB_InitialSelection; + sal_uInt16 nStyleLB_InitialSelection; + sal_Bool bSfxSymbolsAuto; // item ID for the given icon theme // might be zero when the theme is not installed and the item is removed - ULONG aIconStyleItemId[STYLE_SYMBOLS_THEMES_MAX]; + sal_uLong aIconStyleItemId[STYLE_SYMBOLS_THEMES_MAX]; SvtTabAppearanceCfg* pAppearanceCfg; CanvasSettings* pCanvasSettings; SvtOptionsDrawinglayer* mpDrawinglayerOpt; @@ -154,7 +154,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; /* -----------------------------23.11.00 13:04-------------------------------- @@ -209,7 +209,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; #endif // #ifndef _OFA_OPTGDLG_HXX diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index d6fa0ec1fdf3..bba3b10fc846 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -52,20 +52,20 @@ struct GeneralTabPage_Impl { - BOOL mbStreetEnabled; - BOOL mbPLZEnabled; - BOOL mbCityEnabled; - BOOL mbUsCityEnabled; - BOOL mbUsZipEnabled; + sal_Bool mbStreetEnabled; + sal_Bool mbPLZEnabled; + sal_Bool mbCityEnabled; + sal_Bool mbUsCityEnabled; + sal_Bool mbUsZipEnabled; String maQueryStr; GeneralTabPage_Impl() : - mbStreetEnabled ( FALSE ), - mbPLZEnabled ( FALSE ), - mbCityEnabled ( FALSE ), - mbUsCityEnabled ( FALSE ), - mbUsZipEnabled ( FALSE ) {} + mbStreetEnabled ( sal_False ), + mbPLZEnabled ( sal_False ), + mbCityEnabled ( sal_False ), + mbUsCityEnabled ( sal_False ), + mbUsZipEnabled ( sal_False ) {} }; // ----------------------------------------------------------------------- @@ -243,7 +243,7 @@ SfxTabPage* SvxGeneralTabPage::Create( Window* pParent, const SfxItemSet& rAttrS //------------------------------------------------------------------------ -BOOL SvxGeneralTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxGeneralTabPage::FillItemSet( SfxItemSet& ) { // Eingaben trimmen (f"uhrende und nachfolgende Leerzeichen entfernen) aCompanyEdit.SetText( TRIM(aCompanyEdit.GetText()) ); @@ -264,13 +264,13 @@ BOOL SvxGeneralTabPage::FillItemSet( SfxItemSet& ) aFaxEdit.SetText( TRIM(aFaxEdit.GetText()) ); aEmailEdit.SetText( TRIM(aEmailEdit.GetText()) ); - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; bModified |= GetAddress_Impl(); SvtSaveOptions aSaveOpt; if ( aUseDataCB.IsChecked() != aSaveOpt.IsUseUserData() ) { aSaveOpt.SetUseUserData( aUseDataCB.IsChecked() ); - bModified |= TRUE; + bModified |= sal_True; } return bModified; } @@ -281,10 +281,10 @@ void SvxGeneralTabPage::Reset( const SfxItemSet& rSet ) { SetAddress_Impl(); - USHORT nWhich = GetWhich( SID_FIELD_GRABFOCUS ); + sal_uInt16 nWhich = GetWhich( SID_FIELD_GRABFOCUS ); if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) { - USHORT nField = ( (SfxUInt16Item&)rSet.Get( nWhich ) ).GetValue(); + sal_uInt16 nField = ( (SfxUInt16Item&)rSet.Get( nWhich ) ).GetValue(); switch ( nField ) { @@ -343,7 +343,7 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit ) break; } - USHORT nPos = ( pEdit == &aFirstName ) ? 0 : 1; + sal_uInt16 nPos = ( pEdit == &aFirstName ) ? 0 : 1; String aTxt = pEdit->GetText(); sal_Unicode cChar = ( aTxt.Len() > 0 ) ? aTxt.GetChar(0) : ' '; aShortStr.SetChar( nPos, cChar ); @@ -357,7 +357,7 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit ) sal_Bool SvxGeneralTabPage::GetAddress_Impl() { - BOOL bRet = + sal_Bool bRet = ( aCompanyEdit.GetSavedValue() != aCompanyEdit.GetText() || aFirstName.GetSavedValue() != aFirstName.GetText() || aFatherName.GetSavedValue() != aFatherName.GetText() || @@ -379,7 +379,7 @@ sal_Bool SvxGeneralTabPage::GetAddress_Impl() aEmailEdit.GetSavedValue() != aEmailEdit.GetText() ); LanguageType eLang = Application::GetSettings().GetUILanguage(); - BOOL bUS = ( LANGUAGE_ENGLISH_US == eLang ); + sal_Bool bUS = ( LANGUAGE_ENGLISH_US == eLang ); SvtUserOptions aUserOpt; aUserOpt.SetCompany(aCompanyEdit.GetText()); @@ -415,7 +415,7 @@ sal_Bool SvxGeneralTabPage::GetAddress_Impl() void SvxGeneralTabPage::SetAddress_Impl() { LanguageType eLang = Application::GetSettings().GetUILanguage(); - BOOL bUS = ( LANGUAGE_ENGLISH_US == eLang ); + sal_Bool bUS = ( LANGUAGE_ENGLISH_US == eLang ); SvtUserOptions aUserOpt; aCompanyEdit.SetText( aUserOpt.GetCompany() ); if ( aUserOpt.IsTokenReadonly( USER_OPT_COMPANY ) ) diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx index 28cd43fab8d6..aa32ce136386 100644 --- a/cui/source/options/opthtml.cxx +++ b/cui/source/options/opthtml.cxx @@ -39,7 +39,7 @@ #include <dialmgr.hxx> // Umwandlung der Modi zu den Positionen in der Listbox -const USHORT aPosToExportArr[] = +const sal_uInt16 aPosToExportArr[] = { HTML_CFG_HTML32, HTML_CFG_MSIE_40, @@ -49,7 +49,7 @@ const USHORT aPosToExportArr[] = //#define DEPRECATED_ENTRY 0xFFFF -const USHORT aExportToPosArr[] = +const sal_uInt16 aExportToPosArr[] = { 0, //HTML 3.2 1, //MS Internet Explorer 4.0 @@ -135,23 +135,23 @@ SfxTabPage* OfaHtmlTabPage::Create( Window* pParent, --------------------------------------------------*/ -BOOL OfaHtmlTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaHtmlTabPage::FillItemSet( SfxItemSet& ) { SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get(); if(aSize1NF.GetSavedValue() != aSize1NF.GetText()) - pHtmlOpt->SetFontSize(0, (USHORT)aSize1NF.GetValue()); + pHtmlOpt->SetFontSize(0, (sal_uInt16)aSize1NF.GetValue()); if(aSize2NF.GetSavedValue() != aSize2NF.GetText()) - pHtmlOpt->SetFontSize(1, (USHORT)aSize2NF.GetValue()); + pHtmlOpt->SetFontSize(1, (sal_uInt16)aSize2NF.GetValue()); if(aSize3NF.GetSavedValue() != aSize3NF.GetText()) - pHtmlOpt->SetFontSize(2, (USHORT)aSize3NF.GetValue()); + pHtmlOpt->SetFontSize(2, (sal_uInt16)aSize3NF.GetValue()); if(aSize4NF.GetSavedValue() != aSize4NF.GetText()) - pHtmlOpt->SetFontSize(3, (USHORT)aSize4NF.GetValue()); + pHtmlOpt->SetFontSize(3, (sal_uInt16)aSize4NF.GetValue()); if(aSize5NF.GetSavedValue() != aSize5NF.GetText()) - pHtmlOpt->SetFontSize(4, (USHORT)aSize5NF.GetValue()); + pHtmlOpt->SetFontSize(4, (sal_uInt16)aSize5NF.GetValue()); if(aSize6NF.GetSavedValue() != aSize6NF.GetText()) - pHtmlOpt->SetFontSize(5, (USHORT)aSize6NF.GetValue()); + pHtmlOpt->SetFontSize(5, (sal_uInt16)aSize6NF.GetValue()); if(aSize7NF.GetSavedValue() != aSize7NF.GetText()) - pHtmlOpt->SetFontSize(6, (USHORT)aSize7NF.GetValue()); + pHtmlOpt->SetFontSize(6, (sal_uInt16)aSize7NF.GetValue()); if(aNumbersEnglishUSCB.IsChecked() != aNumbersEnglishUSCB.GetSavedValue()) pHtmlOpt->SetNumbersEnglishUS(aNumbersEnglishUSCB.IsChecked()); @@ -180,7 +180,7 @@ BOOL OfaHtmlTabPage::FillItemSet( SfxItemSet& ) if( aCharSetLB.GetSelectTextEncoding() != pHtmlOpt->GetTextEncoding() ) pHtmlOpt->SetTextEncoding( aCharSetLB.GetSelectTextEncoding() ); - return FALSE; + return sal_False; } /*-----------------02.09.96 13.47------------------- @@ -200,10 +200,10 @@ void OfaHtmlTabPage::Reset( const SfxItemSet& ) aNumbersEnglishUSCB.Check(pHtmlOpt->IsNumbersEnglishUS()); aUnknownTagCB.Check(pHtmlOpt->IsImportUnknown()); aIgnoreFontNamesCB.Check(pHtmlOpt->IsIgnoreFontFamily()); - USHORT nExport = pHtmlOpt->GetExportMode(); - if( nExport >= ( sizeof( aExportToPosArr ) / sizeof( USHORT ) ) ) + sal_uInt16 nExport = pHtmlOpt->GetExportMode(); + if( nExport >= ( sizeof( aExportToPosArr ) / sizeof( sal_uInt16 ) ) ) nExport = 4; // default for bad config entry is NS 4.0 - USHORT nPosArr = aExportToPosArr[ nExport ]; + sal_uInt16 nPosArr = aExportToPosArr[ nExport ]; // if( nPosArr == DEPRECATED_ENTRY ) // nPosArr = aExportToPosArr[ 4 ]; // again: NS 4.0 is default aExportLB.SelectEntryPos( nPosArr ); @@ -242,15 +242,15 @@ void OfaHtmlTabPage::Reset( const SfxItemSet& ) --------------------------------------------------*/ IMPL_LINK(OfaHtmlTabPage, ExportHdl_Impl, ListBox*, pBox) { - USHORT nExport = aPosToExportArr[ pBox->GetSelectEntryPos() ]; + sal_uInt16 nExport = aPosToExportArr[ pBox->GetSelectEntryPos() ]; switch( nExport ) { case HTML_CFG_MSIE_40: case HTML_CFG_NS40 : case HTML_CFG_WRITER : - aPrintExtensionCB.Enable(TRUE); + aPrintExtensionCB.Enable(sal_True); break; - default: aPrintExtensionCB.Enable(FALSE); + default: aPrintExtensionCB.Enable(sal_False); } return 0; diff --git a/cui/source/options/opthtml.hxx b/cui/source/options/opthtml.hxx index 886267319ca9..dafe91c42fea 100644 --- a/cui/source/options/opthtml.hxx +++ b/cui/source/options/opthtml.hxx @@ -77,7 +77,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optimprove2.cxx b/cui/source/options/optimprove2.cxx index b2127d2680e8..1c08ec79f1de 100644 --- a/cui/source/options/optimprove2.cxx +++ b/cui/source/options/optimprove2.cxx @@ -183,7 +183,7 @@ sal_Bool SvxImprovementOptionsPage::FillItemSet( SfxItemSet& /*rSet*/ ) ::comphelper::ConfigurationHelper::writeRelativeKey( xConfig, C2S("Participation"), C2S("ShowedInvitation"), uno::makeAny( true ) ); ::comphelper::ConfigurationHelper::writeRelativeKey( - xConfig, C2S("Participation"), C2S("InvitationAccepted"), uno::makeAny( m_aYesRB.IsChecked() != FALSE ) ); + xConfig, C2S("Participation"), C2S("InvitationAccepted"), uno::makeAny( m_aYesRB.IsChecked() != sal_False ) ); ::comphelper::ConfigurationHelper::flush( xConfig ); // TODO: refactor ::comphelper::UiEventsLogger::reinit(); diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index c8fa0b9b5f48..b14312e4b997 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -141,14 +141,14 @@ void SvxNoSpaceEdit::KeyInput( const KeyEvent& rKEvent ) if ( bOnlyNumeric ) { const KeyCode& rKeyCode = rKEvent.GetKeyCode(); - USHORT nGroup = rKeyCode.GetGroup(); - USHORT nKey = rKeyCode.GetCode(); - BOOL bValid = ( KEYGROUP_NUM == nGroup || KEYGROUP_CURSOR == nGroup || + sal_uInt16 nGroup = rKeyCode.GetGroup(); + sal_uInt16 nKey = rKeyCode.GetCode(); + sal_Bool bValid = ( KEYGROUP_NUM == nGroup || KEYGROUP_CURSOR == nGroup || ( KEYGROUP_MISC == nGroup && ( nKey < KEY_ADD || nKey > KEY_EQUAL ) ) ); if ( !bValid && ( rKeyCode.IsMod1() && ( KEY_A == nKey || KEY_C == nKey || KEY_V == nKey || KEY_X == nKey || KEY_Z == nKey ) ) ) // Erase, Copy, Paste, Select All und Undo soll funktionieren - bValid = TRUE; + bValid = sal_True; if ( bValid ) Edit::KeyInput(rKEvent); @@ -192,17 +192,17 @@ SvxProxyTabPage::SvxProxyTabPage(Window* pParent, const SfxItemSet& rSet ) : aHttpProxyFT (this, CUI_RES( FT_HTTP_PROXY )), aHttpProxyED (this, CUI_RES( ED_HTTP_PROXY )), aHttpPortFT (this, CUI_RES( FT_HTTP_PORT )), - aHttpPortED (this, CUI_RES( ED_HTTP_PORT ), TRUE), + aHttpPortED (this, CUI_RES( ED_HTTP_PORT ), sal_True), aHttpsProxyFT (this, CUI_RES( FT_HTTPS_PROXY )), aHttpsProxyED (this, CUI_RES( ED_HTTPS_PROXY )), aHttpsPortFT (this, CUI_RES( FT_HTTPS_PORT )), - aHttpsPortED (this, CUI_RES( ED_HTTPS_PORT ), TRUE), + aHttpsPortED (this, CUI_RES( ED_HTTPS_PORT ), sal_True), aFtpProxyFT (this, CUI_RES( FT_FTP_PROXY )), aFtpProxyED (this, CUI_RES( ED_FTP_PROXY )), aFtpPortFT (this, CUI_RES( FT_FTP_PORT )), - aFtpPortED (this, CUI_RES( ED_FTP_PORT ), TRUE), + aFtpPortED (this, CUI_RES( ED_FTP_PORT ), sal_True), aNoProxyForFT (this, CUI_RES( FT_NOPROXYFOR )), aNoProxyForED (this, CUI_RES( ED_NOPROXYFOR )), @@ -293,7 +293,7 @@ void SvxProxyTabPage::ReadConfigData_Impl() if( xNameAccess->getByName(aProxyModePN) >>= nIntValue ) { - aProxyModeLB.SelectEntryPos( (USHORT) nIntValue ); + aProxyModeLB.SelectEntryPos( (sal_uInt16) nIntValue ); } if( xNameAccess->getByName(aHttpProxyPN) >>= aStringValue ) @@ -471,74 +471,74 @@ void SvxProxyTabPage::Reset(const SfxItemSet&) --------------------------------------------------*/ -BOOL SvxProxyTabPage::FillItemSet(SfxItemSet& ) +sal_Bool SvxProxyTabPage::FillItemSet(SfxItemSet& ) { - BOOL bModified=FALSE; + sal_Bool bModified=sal_False; try { Reference< beans::XPropertySet > xPropertySet(m_xConfigurationUpdateAccess, UNO_QUERY_THROW ); - USHORT nSelPos = aProxyModeLB.GetSelectEntryPos(); + sal_uInt16 nSelPos = aProxyModeLB.GetSelectEntryPos(); if(aProxyModeLB.GetSavedValue() != nSelPos) { if( nSelPos == 1 ) { RestoreConfigDefaults_Impl(); - return TRUE; + return sal_True; } xPropertySet->setPropertyValue(aProxyModePN, makeAny((sal_Int32) nSelPos)); - bModified = TRUE; + bModified = sal_True; } if(aHttpProxyED.GetSavedValue() != aHttpProxyED.GetText()) { xPropertySet->setPropertyValue( aHttpProxyPN, makeAny(rtl::OUString(aHttpProxyED.GetText()))); - bModified = TRUE; + bModified = sal_True; } if ( aHttpPortED.GetSavedValue() != aHttpPortED.GetText() ) { xPropertySet->setPropertyValue( aHttpPortPN, makeAny(aHttpPortED.GetText().ToInt32())); - bModified = TRUE; + bModified = sal_True; } if(aHttpsProxyED.GetSavedValue() != aHttpsProxyED.GetText()) { xPropertySet->setPropertyValue( aHttpsProxyPN, makeAny(rtl::OUString(aHttpsProxyED.GetText()))); - bModified = TRUE; + bModified = sal_True; } if ( aHttpsPortED.GetSavedValue() != aHttpsPortED.GetText() ) { xPropertySet->setPropertyValue( aHttpsPortPN, makeAny(aHttpsPortED.GetText().ToInt32())); - bModified = TRUE; + bModified = sal_True; } if(aFtpProxyED.GetSavedValue() != aFtpProxyED.GetText()) { xPropertySet->setPropertyValue( aFtpProxyPN, makeAny( rtl::OUString(aFtpProxyED.GetText()))); - bModified = TRUE; + bModified = sal_True; } if ( aFtpPortED.GetSavedValue() != aFtpPortED.GetText() ) { xPropertySet->setPropertyValue( aFtpPortPN, makeAny(aFtpPortED.GetText().ToInt32())); - bModified = TRUE; + bModified = sal_True; } if ( aNoProxyForED.GetSavedValue() != aNoProxyForED.GetText() ) { xPropertySet->setPropertyValue( aNoProxyDescPN, makeAny( rtl::OUString(aNoProxyForED.GetText()))); - bModified = TRUE; + bModified = sal_True; } Reference< util::XChangesBatch > xChangesBatch(m_xConfigurationUpdateAccess, UNO_QUERY_THROW); @@ -622,7 +622,7 @@ void SvxProxyTabPage::ArrangeControls_Impl() /*-----------------12.08.96 13.38------------------- --------------------------------------------------*/ -void SvxProxyTabPage::EnableControls_Impl(BOOL bEnable) +void SvxProxyTabPage::EnableControls_Impl(sal_Bool bEnable) { aHttpProxyFT.Enable(bEnable); aHttpProxyED.Enable(bEnable); @@ -648,7 +648,7 @@ void SvxProxyTabPage::EnableControls_Impl(BOOL bEnable) IMPL_LINK( SvxProxyTabPage, ProxyHdl_Impl, ListBox *, pBox ) { - USHORT nPos = pBox->GetSelectEntryPos(); + sal_uInt16 nPos = pBox->GetSelectEntryPos(); // Restore original system values if( nPos == 1 ) @@ -775,11 +775,11 @@ void SvxSearchTabPage::Reset( const SfxItemSet& ) // ----------------------------------------------------------------------- -BOOL SvxSearchTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxSearchTabPage::FillItemSet( SfxItemSet& ) { if(aSearchConfig.IsModified()) aSearchConfig.Commit(); - return TRUE; + return sal_True; } /*--------------------------------------------------------------------*/ @@ -803,21 +803,21 @@ int SvxSearchTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) -BOOL SvxSearchTabPage::ConfirmLeave( const String& rStringSelection) +sal_Bool SvxSearchTabPage::ConfirmLeave( const String& rStringSelection) { if(aChangePB.IsEnabled()) { QueryBox aQuery(this, WB_YES_NO_CANCEL|WB_DEF_YES, sModifyMsg); - USHORT nRet = aQuery.Execute(); + sal_uInt16 nRet = aQuery.Execute(); if(RET_CANCEL == nRet) { if(rStringSelection.Len()) aSearchLB.SelectEntry(sLastSelectedEntry); - return FALSE; + return sal_False; } else if(RET_YES == nRet) { - USHORT nEntryPos = aSearchLB.GetEntryPos( aSearchNameED.GetText() ); + sal_uInt16 nEntryPos = aSearchLB.GetEntryPos( aSearchNameED.GetText() ); if ( nEntryPos != LISTBOX_ENTRY_NOTFOUND ) aSearchLB.SelectEntryPos(nEntryPos); else @@ -828,19 +828,19 @@ BOOL SvxSearchTabPage::ConfirmLeave( const String& rStringSelection) } else if(RET_NO == nRet) { - aChangePB.Enable(FALSE); - aAddPB.Enable(FALSE); + aChangePB.Enable(sal_False); + aAddPB.Enable(sal_False); SearchEntryHdl_Impl(&aSearchLB); } } if(aAddPB.IsEnabled()) { QueryBox aQuery(this, WB_YES_NO_CANCEL|WB_DEF_YES, sModifyMsg); - USHORT nRet = aQuery.Execute(); + sal_uInt16 nRet = aQuery.Execute(); if(RET_CANCEL == nRet) { aSearchLB.SetNoSelection(); - return FALSE; + return sal_False; } else if(RET_YES == nRet) { @@ -851,13 +851,13 @@ BOOL SvxSearchTabPage::ConfirmLeave( const String& rStringSelection) } else if(RET_NO == nRet) { - aAddPB.Enable(FALSE); - aChangePB.Enable(FALSE); + aAddPB.Enable(sal_False); + aChangePB.Enable(sal_False); NewSearchHdl_Impl(0); } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -916,7 +916,7 @@ IMPL_LINK( SvxSearchTabPage, NewSearchHdl_Impl, PushButton *, EMPTYARG ) aSearchNameED.SetText( String() ); aSearchLB.SetNoSelection(); aCurrentSrchData = SvxSearchEngineData(); - aAndRB.Check( TRUE ); + aAndRB.Check( sal_True ); SearchEntryHdl_Impl( &aSearchLB ); SearchPartHdl_Impl( &aAndRB ); return 0; @@ -927,8 +927,8 @@ IMPL_LINK( SvxSearchTabPage, NewSearchHdl_Impl, PushButton *, EMPTYARG ) IMPL_LINK( SvxSearchTabPage, AddSearchHdl_Impl, PushButton *, EMPTYARG ) { //The following two lines is added by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) - aAddPB.Enable(FALSE); - aChangePB.Enable(FALSE); + aAddPB.Enable(sal_False); + aChangePB.Enable(sal_False); aCurrentSrchData.sEngineName = aSearchNameED.GetText(); aSearchConfig.SetData(aCurrentSrchData); aSearchLB.InsertEntry( aCurrentSrchData.sEngineName ); @@ -942,9 +942,9 @@ IMPL_LINK( SvxSearchTabPage, AddSearchHdl_Impl, PushButton *, EMPTYARG ) IMPL_LINK( SvxSearchTabPage, ChangeSearchHdl_Impl, PushButton *, EMPTYARG ) { //The following two lines is added by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) - aChangePB.Enable(FALSE); - aAddPB.Enable(FALSE); - USHORT nPos = aSearchLB.GetSelectEntryPos(); + aChangePB.Enable(sal_False); + aAddPB.Enable(sal_False); + sal_uInt16 nPos = aSearchLB.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { String sEngine = aSearchLB.GetSelectEntry(); @@ -955,7 +955,7 @@ IMPL_LINK( SvxSearchTabPage, ChangeSearchHdl_Impl, PushButton *, EMPTYARG ) } else { - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); String sEntry = aSearchNameED.GetText(); // im AddHdl wird sLastSelectedEntry umgesetzt String sTemp(sLastSelectedEntry); @@ -964,7 +964,7 @@ IMPL_LINK( SvxSearchTabPage, ChangeSearchHdl_Impl, PushButton *, EMPTYARG ) DeleteSearchHdl_Impl(0); aSearchLB.SelectEntry(sEntry); SearchEntryHdl_Impl(&aSearchLB); - SetUpdateMode(TRUE); + SetUpdateMode(sal_True); } return 0; } @@ -973,8 +973,8 @@ IMPL_LINK( SvxSearchTabPage, ChangeSearchHdl_Impl, PushButton *, EMPTYARG ) IMPL_LINK( SvxSearchTabPage, DeleteSearchHdl_Impl, PushButton *, EMPTYARG) { - aChangePB.Enable(FALSE); //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) - USHORT nPos = aSearchLB.GetSelectEntryPos(); + aChangePB.Enable(sal_False); //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) + sal_uInt16 nPos = aSearchLB.GetSelectEntryPos(); DBG_ASSERT(nPos != LISTBOX_ENTRY_NOTFOUND, "kein Eintrag selektiert!"); aSearchConfig.RemoveData(aSearchLB.GetSelectEntry()); aSearchLB.RemoveEntry(nPos); @@ -987,7 +987,7 @@ IMPL_LINK( SvxSearchTabPage, DeleteSearchHdl_Impl, PushButton *, EMPTYARG) IMPL_LINK( SvxSearchTabPage, SearchEntryHdl_Impl, ListBox*, pBox ) { - USHORT nEntryPos = pBox->GetSelectEntryPos(); + sal_uInt16 nEntryPos = pBox->GetSelectEntryPos(); if ( nEntryPos != LISTBOX_ENTRY_NOTFOUND ) { String sSelection(pBox->GetSelectEntry()); @@ -1008,18 +1008,18 @@ IMPL_LINK( SvxSearchTabPage, SearchEntryHdl_Impl, ListBox*, pBox ) aSeparatorED.SetText( bAnd ? pData->sAndSeparator : bOr ? pData->sOrSeparator : pData->sExactSeparator); aPostFixED.SetText(bAnd ? pData->sAndSuffix : bOr ? pData->sOrSuffix : pData->sExactSuffix ); sal_Int32 nCase = bAnd ? pData->nAndCaseMatch : bOr ? pData->nOrCaseMatch : pData->nExactCaseMatch; - aCaseED.SelectEntryPos( (USHORT)nCase ); + aCaseED.SelectEntryPos( (sal_uInt16)nCase ); aCurrentSrchData = *pData; } aDeletePB.Enable(); } else { - aDeletePB.Enable(FALSE); + aDeletePB.Enable(sal_False); sLastSelectedEntry.Erase(); } - aChangePB.Enable(FALSE); - aAddPB.Enable(FALSE); + aChangePB.Enable(sal_False); + aAddPB.Enable(sal_False); return 0; } @@ -1029,11 +1029,11 @@ IMPL_LINK( SvxSearchTabPage, SearchModifyHdl_Impl, SvxNoSpaceEdit*, pEdit ) { if ( pEdit == &aSearchNameED ) { - BOOL bTextLen = ( 0 != pEdit->GetText().Len() ); - BOOL bFound = FALSE; + sal_Bool bTextLen = ( 0 != pEdit->GetText().Len() ); + sal_Bool bFound = sal_False; if ( bTextLen ) { - USHORT nEntryPos = aSearchLB.GetEntryPos( pEdit->GetText() ); + sal_uInt16 nEntryPos = aSearchLB.GetEntryPos( pEdit->GetText() ); bFound = ( nEntryPos != LISTBOX_ENTRY_NOTFOUND ); if ( bFound ) aSearchLB.SelectEntryPos(nEntryPos); @@ -1085,16 +1085,16 @@ IMPL_LINK( SvxSearchTabPage, SearchPartHdl_Impl, RadioButton *, EMPTYARG ) aSeparatorED.SetText( bAnd ? aCurrentSrchData.sAndSeparator : bOr ? aCurrentSrchData.sOrSeparator : aCurrentSrchData.sExactSeparator); aPostFixED.SetText(bAnd ? aCurrentSrchData.sAndSuffix : bOr ? aCurrentSrchData.sOrSuffix : aCurrentSrchData.sExactSuffix ); sal_Int32 nCase = bAnd ? aCurrentSrchData.nAndCaseMatch : bOr ? aCurrentSrchData.nOrCaseMatch : aCurrentSrchData.nExactCaseMatch; - aCaseED.SelectEntryPos( (USHORT)nCase ); + aCaseED.SelectEntryPos( (sal_uInt16)nCase ); return 0; } //#98647#---------------------------------------------- void SvxScriptExecListBox::RequestHelp( const HelpEvent& rHEvt ) { // try to show tips just like as on toolbars - USHORT nPos=LISTBOX_ENTRY_NOTFOUND; - USHORT nTop = GetTopEntry(); - USHORT nCount = GetDisplayLineCount(); // Attention: Not GetLineCount() + sal_uInt16 nPos=LISTBOX_ENTRY_NOTFOUND; + sal_uInt16 nTop = GetTopEntry(); + sal_uInt16 nCount = GetDisplayLineCount(); // Attention: Not GetLineCount() Point aPt = ScreenToOutputPixel( rHEvt.GetMousePosPixel() ); Rectangle aItemRect; if( nCount > 0 ) // if there're some entries, find it. @@ -1198,37 +1198,37 @@ IMPL_LINK( SvxSecurityTabPage, SavePasswordHdl, void*, EMPTYARG ) xMasterPasswd->removeMasterPassword(); if ( xMasterPasswd->changeMasterPassword( Reference< task::XInteractionHandler >() ) ) { - maMasterPasswordPB.Enable( TRUE ); - maMasterPasswordCB.Check( TRUE ); - maMasterPasswordCB.Enable( TRUE ); - maMasterPasswordFI.Enable( TRUE ); - maShowConnectionsPB.Enable( TRUE ); + maMasterPasswordPB.Enable( sal_True ); + maMasterPasswordCB.Check( sal_True ); + maMasterPasswordCB.Enable( sal_True ); + maMasterPasswordFI.Enable( sal_True ); + maShowConnectionsPB.Enable( sal_True ); } else { xMasterPasswd->allowPersistentStoring( bOldValue ); - maSavePasswordsCB.Check( FALSE ); + maSavePasswordsCB.Check( sal_False ); } } else { QueryBox aQuery( this, WB_YES_NO|WB_DEF_NO, msPasswordStoringDeactivateStr ); - USHORT nRet = aQuery.Execute(); + sal_uInt16 nRet = aQuery.Execute(); if( RET_YES == nRet ) { xMasterPasswd->allowPersistentStoring( sal_False ); - maMasterPasswordCB.Check( TRUE ); - maMasterPasswordPB.Enable( FALSE ); - maMasterPasswordCB.Enable( FALSE ); - maMasterPasswordFI.Enable( FALSE ); - maShowConnectionsPB.Enable( FALSE ); + maMasterPasswordCB.Check( sal_True ); + maMasterPasswordPB.Enable( sal_False ); + maMasterPasswordCB.Enable( sal_False ); + maMasterPasswordFI.Enable( sal_False ); + maShowConnectionsPB.Enable( sal_False ); } else { - maSavePasswordsCB.Check( TRUE ); - maMasterPasswordPB.Enable( TRUE ); - maShowConnectionsPB.Enable( TRUE ); + maSavePasswordsCB.Check( sal_True ); + maMasterPasswordPB.Enable( sal_True ); + maShowConnectionsPB.Enable( sal_True ); } } } @@ -1271,28 +1271,28 @@ IMPL_LINK( SvxSecurityTabPage, MasterPasswordCBHdl, void*, EMPTYARG ) { if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->changeMasterPassword( Reference< task::XInteractionHandler >() ) ) { - maMasterPasswordPB.Enable( TRUE ); - maMasterPasswordFI.Enable( TRUE ); + maMasterPasswordPB.Enable( sal_True ); + maMasterPasswordFI.Enable( sal_True ); } else { - maMasterPasswordCB.Check( FALSE ); - maMasterPasswordPB.Enable( TRUE ); - maMasterPasswordFI.Enable( TRUE ); + maMasterPasswordCB.Check( sal_False ); + maMasterPasswordPB.Enable( sal_True ); + maMasterPasswordFI.Enable( sal_True ); } } else { if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->useDefaultMasterPassword( Reference< task::XInteractionHandler >() ) ) { - maMasterPasswordPB.Enable( FALSE ); - maMasterPasswordFI.Enable( FALSE ); + maMasterPasswordPB.Enable( sal_False ); + maMasterPasswordFI.Enable( sal_False ); } else { - maMasterPasswordCB.Check( TRUE ); - maMasterPasswordPB.Enable( TRUE ); - maShowConnectionsPB.Enable( TRUE ); + maMasterPasswordCB.Check( sal_True ); + maMasterPasswordPB.Enable( sal_True ); + maShowConnectionsPB.Enable( sal_True ); } } } @@ -1407,11 +1407,11 @@ void SvxSecurityTabPage::InitControls() } } - maMasterPasswordPB.Enable( FALSE ); - maMasterPasswordCB.Enable( FALSE ); - maMasterPasswordCB.Check( TRUE ); - maMasterPasswordFI.Enable( FALSE ); - maShowConnectionsPB.Enable( FALSE ); + maMasterPasswordPB.Enable( sal_False ); + maMasterPasswordCB.Enable( sal_False ); + maMasterPasswordCB.Check( sal_True ); + maMasterPasswordFI.Enable( sal_False ); + maShowConnectionsPB.Enable( sal_False ); // initialize the password saving checkbox try @@ -1423,24 +1423,24 @@ void SvxSecurityTabPage::InitControls() if ( xMasterPasswd->isPersistentStoringAllowed() ) { - maMasterPasswordCB.Enable( TRUE ); - maShowConnectionsPB.Enable( TRUE ); - maSavePasswordsCB.Check( TRUE ); + maMasterPasswordCB.Enable( sal_True ); + maShowConnectionsPB.Enable( sal_True ); + maSavePasswordsCB.Check( sal_True ); Reference< task::XMasterPasswordHandling2 > xMasterPasswd2( xMasterPasswd, UNO_QUERY ); if ( xMasterPasswd2.is() && xMasterPasswd2->isDefaultMasterPasswordUsed() ) - maMasterPasswordCB.Check( FALSE ); + maMasterPasswordCB.Check( sal_False ); else { - maMasterPasswordPB.Enable( TRUE ); - maMasterPasswordCB.Check( TRUE ); - maMasterPasswordFI.Enable( TRUE ); + maMasterPasswordPB.Enable( sal_True ); + maMasterPasswordCB.Check( sal_True ); + maMasterPasswordFI.Enable( sal_True ); } } } catch( Exception& ) { - maSavePasswordsCB.Enable( FALSE ); + maSavePasswordsCB.Enable( sal_False ); } @@ -1481,7 +1481,7 @@ namespace } } -BOOL SvxSecurityTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxSecurityTabPage::FillItemSet( SfxItemSet& ) { bool bModified = false; @@ -1527,10 +1527,10 @@ SfxTabPage* MozPluginTabPage::Create( Window* pParent, { return new MozPluginTabPage( pParent, rAttrSet ); } -BOOL MozPluginTabPage::FillItemSet( SfxItemSet& ) +sal_Bool MozPluginTabPage::FillItemSet( SfxItemSet& ) { - BOOL hasInstall = isInstalled(); - BOOL hasChecked = aWBasicCodeCB.IsChecked(); + sal_Bool hasInstall = isInstalled(); + sal_Bool hasChecked = aWBasicCodeCB.IsChecked(); if(hasInstall && (!hasChecked)){ //try to uninstall uninstallPlugin(); @@ -1542,7 +1542,7 @@ BOOL MozPluginTabPage::FillItemSet( SfxItemSet& ) else{ // do nothing } - return TRUE; + return sal_True; } void MozPluginTabPage::Reset( const SfxItemSet& ) { @@ -1574,7 +1574,7 @@ inline bool getDllURL(rtl::OString * path) return true; } -BOOL MozPluginTabPage::isInstalled() +sal_Bool MozPluginTabPage::isInstalled() { #ifdef UNIX // get the real file referred by .so lnk file @@ -1610,7 +1610,7 @@ BOOL MozPluginTabPage::isInstalled() #endif #ifdef WNT // get the value from registry - BOOL ret = true; + sal_Bool ret = true; ::rtl::OString tempString; char realFilePath[NPP_PATH_MAX] = {0}; if (!getDllURL(&tempString)){ @@ -1625,7 +1625,7 @@ BOOL MozPluginTabPage::isInstalled() #endif } -BOOL MozPluginTabPage::installPlugin() +sal_Bool MozPluginTabPage::installPlugin() { #ifdef UNIX // get the real file referred by .so lnk file @@ -1674,7 +1674,7 @@ BOOL MozPluginTabPage::installPlugin() #endif } -BOOL MozPluginTabPage::uninstallPlugin() +sal_Bool MozPluginTabPage::uninstallPlugin() { #ifdef UNIX // get the real file referred by .so lnk file @@ -1858,26 +1858,26 @@ SfxTabPage* SvxEMailTabPage::Create( Window* pParent, const SfxItemSet& rAttrSe /* -------------------------------------------------------------------------*/ -BOOL SvxEMailTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxEMailTabPage::FillItemSet( SfxItemSet& ) { - BOOL bMailModified = FALSE; + sal_Bool bMailModified = sal_False; if(!pImpl->aMailConfig.bROProgram && aMailerURLED.GetSavedValue() != aMailerURLED.GetText()) { pImpl->aMailConfig.sProgram = aMailerURLED.GetText(); - bMailModified = TRUE; + bMailModified = sal_True; } if ( bMailModified ) pImpl->aMailConfig.Commit(); - return FALSE; + return sal_False; } /* -------------------------------------------------------------------------*/ void SvxEMailTabPage::Reset( const SfxItemSet& ) { - aMailerURLED.Enable(TRUE ); - aMailerURLPB.Enable(TRUE ); + aMailerURLED.Enable(sal_True ); + aMailerURLPB.Enable(sal_True ); if(pImpl->aMailConfig.bROProgram) aMailerURLFI.Show(); diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx index f75ff7d05c44..b0d47efe6141 100755..100644 --- a/cui/source/options/optinet2.hxx +++ b/cui/source/options/optinet2.hxx @@ -70,10 +70,10 @@ namespace uno = ::com::sun::star::uno; class SvxNoSpaceEdit : public Edit { private: - BOOL bOnlyNumeric; + sal_Bool bOnlyNumeric; public: - SvxNoSpaceEdit(Window* pParent, ResId rResId, BOOL bNum = FALSE ) : + SvxNoSpaceEdit(Window* pParent, ResId rResId, sal_Bool bNum = sal_False ) : Edit( pParent, rResId ), bOnlyNumeric( bNum ) {} virtual void KeyInput( const KeyEvent& rKEvent ); @@ -128,7 +128,7 @@ private: #ifdef _SVX_OPTINET2_CXX void ArrangeControls_Impl(); - void EnableControls_Impl(BOOL bEnable); + void EnableControls_Impl(sal_Bool bEnable); void ReadConfigData_Impl(); void ReadConfigDefaults_Impl(); void RestoreConfigDefaults_Impl(); @@ -142,7 +142,7 @@ private: public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -199,14 +199,14 @@ private: virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet = 0 ); - BOOL ConfirmLeave( const String& rStringSelection ); //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) + sal_Bool ConfirmLeave( const String& rStringSelection ); //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) SvxSearchTabPage( Window* pParent, const SfxItemSet& rSet ); virtual ~SvxSearchTabPage(); public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -273,7 +273,7 @@ protected: public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -283,9 +283,9 @@ class MozPluginTabPage : public SfxTabPage FixedLine aMSWordGB; CheckBox aWBasicCodeCB; - BOOL isInstalled(void); - BOOL installPlugin(void); - BOOL uninstallPlugin(void); + sal_Bool isInstalled(void); + sal_Bool installPlugin(void); + sal_Bool uninstallPlugin(void); MozPluginTabPage( Window* pParent, const SfxItemSet& rSet ); virtual ~MozPluginTabPage(); @@ -295,7 +295,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -331,7 +331,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 2a043f6846a7..5c725bf14faf 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -206,7 +206,7 @@ SvxJavaOptionsPage::~SvxJavaOptionsPage() IMPL_LINK( SvxJavaOptionsPage, EnableHdl_Impl, CheckBox *, EMPTYARG ) { - BOOL bEnable = m_aJavaEnableCB.IsChecked(); + sal_Bool bEnable = m_aJavaEnableCB.IsChecked(); m_aJavaFoundLabel.Enable( bEnable ); m_aJavaPathText.Enable( bEnable ); m_aAddBtn.Enable( bEnable ); @@ -508,7 +508,7 @@ void SvxJavaOptionsPage::AddJRE( JavaInfo* _pInfo ) void SvxJavaOptionsPage::HandleCheckEntry( SvLBoxEntry* _pEntry ) { - m_aJavaList.Select( _pEntry, TRUE ); + m_aJavaList.Select( _pEntry, sal_True ); SvButtonState eState = m_aJavaList.GetCheckButtonState( _pEntry ); if ( SV_BUTTON_CHECKED == eState ) @@ -606,9 +606,9 @@ SfxTabPage* SvxJavaOptionsPage::Create( Window* pParent, const SfxItemSet& rAttr // ----------------------------------------------------------------------- -BOOL SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) +sal_Bool SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; javaFrameworkError eErr = JFW_E_NONE; if ( m_pParamDlg ) { @@ -624,7 +624,7 @@ BOOL SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) "SvxJavaOptionsPage::FillItemSet(): error in jfw_setVMParameters" ); pParamArrIter = pParamArr; rtl_freeMemory( pParamArr ); - bModified = TRUE; + bModified = sal_True; } if ( m_pPathDlg ) @@ -635,17 +635,17 @@ BOOL SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) eErr = jfw_setUserClassPath( sPath.pData ); DBG_ASSERT( JFW_E_NONE == eErr, "SvxJavaOptionsPage::FillItemSet(): error in jfw_setUserClassPath" ); - bModified = TRUE; + bModified = sal_True; } } - ULONG nCount = m_aJavaList.GetEntryCount(); - for ( ULONG i = 0; i < nCount; ++i ) + sal_uLong nCount = m_aJavaList.GetEntryCount(); + for ( sal_uLong i = 0; i < nCount; ++i ) { if ( m_aJavaList.GetCheckButtonState( m_aJavaList.GetEntry(i) ) == SV_BUTTON_CHECKED ) { JavaInfo* pInfo = NULL; - if ( i < static_cast< ULONG >( m_nInfoSize ) ) + if ( i < static_cast< sal_uLong >( m_nInfoSize ) ) pInfo = m_parJavaInfo[i]; else pInfo = m_aAddedInfos[ i - m_nInfoSize ]; @@ -670,7 +670,7 @@ BOOL SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) eErr = jfw_setSelectedJRE( pInfo ); DBG_ASSERT( JFW_E_NONE == eErr, "SvxJavaOptionsPage::FillItemSet(): error in jfw_setSelectedJRE" ); - bModified = TRUE; + bModified = sal_True; } } jfw_freeJavaInfo( pSelectedJava ); @@ -687,7 +687,7 @@ BOOL SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) eErr = jfw_setEnabled( m_aJavaEnableCB.IsChecked() ); DBG_ASSERT( JFW_E_NONE == eErr, "SvxJavaOptionsPage::FillItemSet(): error in jfw_setEnabled" ); - bModified = TRUE; + bModified = sal_True; } return bModified; @@ -772,7 +772,7 @@ IMPL_LINK( SvxJavaParameterDlg, AssignHdl_Impl, PushButton *, EMPTYARG ) String sParam = STRIM( m_aParameterEdit.GetText() ); if ( sParam.Len() > 0 ) { - USHORT nPos = m_aAssignedList.GetEntryPos( sParam ); + sal_uInt16 nPos = m_aAssignedList.GetEntryPos( sParam ); if ( LISTBOX_ENTRY_NOTFOUND == nPos ) nPos = m_aAssignedList.InsertEntry( sParam ); m_aAssignedList.SelectEntryPos( nPos ); @@ -796,7 +796,7 @@ IMPL_LINK( SvxJavaParameterDlg, SelectHdl_Impl, ListBox *, EMPTYARG ) IMPL_LINK( SvxJavaParameterDlg, DblClickHdl_Impl, ListBox *, EMPTYARG ) { - USHORT nPos = m_aAssignedList.GetSelectEntryPos(); + sal_uInt16 nPos = m_aAssignedList.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) m_aParameterEdit.SetText( m_aAssignedList.GetEntry( nPos ) ); return 0; @@ -806,11 +806,11 @@ IMPL_LINK( SvxJavaParameterDlg, DblClickHdl_Impl, ListBox *, EMPTYARG ) IMPL_LINK( SvxJavaParameterDlg, RemoveHdl_Impl, PushButton *, EMPTYARG ) { - USHORT nPos = m_aAssignedList.GetSelectEntryPos(); + sal_uInt16 nPos = m_aAssignedList.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { m_aAssignedList.RemoveEntry( nPos ); - USHORT nCount = m_aAssignedList.GetEntryCount(); + sal_uInt16 nCount = m_aAssignedList.GetEntryCount(); if ( nCount ) { if ( nPos >= nCount ) @@ -836,10 +836,10 @@ short SvxJavaParameterDlg::Execute() Sequence< ::rtl::OUString > SvxJavaParameterDlg::GetParameters() const { - USHORT nCount = m_aAssignedList.GetEntryCount(); + sal_uInt16 nCount = m_aAssignedList.GetEntryCount(); Sequence< ::rtl::OUString > aParamList( nCount ); ::rtl::OUString* pArray = aParamList.getArray(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) pArray[i] = ::rtl::OUString( m_aAssignedList.GetEntry(i) ); return aParamList; } @@ -849,7 +849,7 @@ Sequence< ::rtl::OUString > SvxJavaParameterDlg::GetParameters() const void SvxJavaParameterDlg::SetParameters( Sequence< ::rtl::OUString >& rParams ) { m_aAssignedList.Clear(); - ULONG i, nCount = rParams.getLength(); + sal_uLong i, nCount = rParams.getLength(); const ::rtl::OUString* pArray = rParams.getConstArray(); for ( i = 0; i < nCount; ++i ) { @@ -914,7 +914,7 @@ SvxJavaClassPathDlg::SvxJavaClassPathDlg( Window* pParent ) : SvxJavaClassPathDlg::~SvxJavaClassPathDlg() { - USHORT i, nCount = m_aPathList.GetEntryCount(); + sal_uInt16 i, nCount = m_aPathList.GetEntryCount(); for ( i = 0; i < nCount; ++i ) delete static_cast< String* >( m_aPathList.GetEntryData(i) ); } @@ -942,7 +942,7 @@ IMPL_LINK( SvxJavaClassPathDlg, AddArchiveHdl_Impl, PushButton *, EMPTYARG ) String sFile = aURL.getFSysPath( INetURLObject::FSYS_DETECT ); if ( !IsPathDuplicate( sURL ) ) { - USHORT nPos = m_aPathList.InsertEntry( sFile, SvFileInformationManager::GetImage( aURL ) ); + sal_uInt16 nPos = m_aPathList.InsertEntry( sFile, SvFileInformationManager::GetImage( aURL ) ); m_aPathList.SelectEntryPos( nPos ); } else @@ -980,7 +980,7 @@ IMPL_LINK( SvxJavaClassPathDlg, AddPathHdl_Impl, PushButton *, EMPTYARG ) String sNewFolder = aURL.getFSysPath( INetURLObject::FSYS_DETECT ); if ( !IsPathDuplicate( sFolderURL ) ) { - USHORT nPos = m_aPathList.InsertEntry( sNewFolder, SvFileInformationManager::GetImage( aURL ) ); + sal_uInt16 nPos = m_aPathList.InsertEntry( sNewFolder, SvFileInformationManager::GetImage( aURL ) ); m_aPathList.SelectEntryPos( nPos ); } else @@ -998,11 +998,11 @@ IMPL_LINK( SvxJavaClassPathDlg, AddPathHdl_Impl, PushButton *, EMPTYARG ) IMPL_LINK( SvxJavaClassPathDlg, RemoveHdl_Impl, PushButton *, EMPTYARG ) { - USHORT nPos = m_aPathList.GetSelectEntryPos(); + sal_uInt16 nPos = m_aPathList.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { m_aPathList.RemoveEntry( nPos ); - USHORT nCount = m_aPathList.GetEntryCount(); + sal_uInt16 nCount = m_aPathList.GetEntryCount(); if ( nCount ) { if ( nPos >= nCount ) @@ -1029,8 +1029,8 @@ bool SvxJavaClassPathDlg::IsPathDuplicate( const String& _rPath ) { bool bRet = false; INetURLObject aFileObj( _rPath ); - USHORT nCount = m_aPathList.GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = m_aPathList.GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { INetURLObject aOtherObj( m_aPathList.GetEntry(i), INetURLObject::FSYS_DETECT ); if ( aOtherObj == aFileObj ) @@ -1048,8 +1048,8 @@ bool SvxJavaClassPathDlg::IsPathDuplicate( const String& _rPath ) String SvxJavaClassPathDlg::GetClassPath() const { String sPath; - USHORT nCount = m_aPathList.GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = m_aPathList.GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { if ( sPath.Len() > 0 ) sPath += CLASSPATH_DELIMITER; diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx index 09eeb4ad9896..c804b32c1c69 100644 --- a/cui/source/options/optjava.hxx +++ b/cui/source/options/optjava.hxx @@ -104,7 +104,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); }; diff --git a/cui/source/options/optjsearch.cxx b/cui/source/options/optjsearch.cxx index e9a0a391211f..71d902719e55 100644 --- a/cui/source/options/optjsearch.cxx +++ b/cui/source/options/optjsearch.cxx @@ -66,7 +66,7 @@ SvxJSearchOptionsPage::SvxJSearchOptionsPage( Window* pParent, const SfxItemSet& aIgnoreMiddleDot ( this, CUI_RES( CB_IGNORE_MIDDLE_DOT ) ) { FreeResource(); - bSaveOptions = TRUE; + bSaveOptions = sal_True; nTransliterationFlags = 0x00000000; } @@ -82,9 +82,9 @@ SfxTabPage* SvxJSearchOptionsPage::Create( Window* pParent, const SfxItemSet& r } -void SvxJSearchOptionsPage::SetTransliterationFlags( INT32 nSettings ) +void SvxJSearchOptionsPage::SetTransliterationFlags( sal_Int32 nSettings ) { - BOOL bVal = 0 != (nSettings & TransliterationModules_IGNORE_CASE); + sal_Bool bVal = 0 != (nSettings & TransliterationModules_IGNORE_CASE); aMatchCase .Check( bVal ); //! treat as equal uppercase/lowercase bVal = 0 != (nSettings & TransliterationModules_IGNORE_WIDTH); aMatchFullHalfWidth .Check( bVal ); @@ -127,9 +127,9 @@ void SvxJSearchOptionsPage::SetTransliterationFlags( INT32 nSettings ) } -INT32 SvxJSearchOptionsPage::GetTransliterationFlags_Impl() +sal_Int32 SvxJSearchOptionsPage::GetTransliterationFlags_Impl() { - INT32 nTmp = 0; + sal_Int32 nTmp = 0; if (aMatchCase.IsChecked()) //! treat as equal uppercase/lowercase nTmp |= TransliterationModules_IGNORE_CASE; if (aMatchFullHalfWidth.IsChecked()) @@ -225,153 +225,153 @@ void SvxJSearchOptionsPage::Reset( const SfxItemSet& ) } -BOOL SvxJSearchOptionsPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxJSearchOptionsPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; - INT32 nOldVal = nTransliterationFlags; + sal_Int32 nOldVal = nTransliterationFlags; nTransliterationFlags = GetTransliterationFlags_Impl(); bModified = nOldVal != nTransliterationFlags; if (!IsSaveOptions()) return bModified; - bModified = FALSE; + bModified = sal_False; SvtSearchOptions aOpt; - BOOL bNewVal, bChanged; + sal_Bool bNewVal, bChanged; bNewVal = aMatchCase.IsChecked(); //! treat as equal uppercase/lowercase bChanged = bNewVal != aMatchCase.GetSavedValue(); if (bChanged) { aOpt.SetMatchCase(!bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchFullHalfWidth.IsChecked(); bChanged = bNewVal != aMatchFullHalfWidth.GetSavedValue(); if (bChanged) { aOpt.SetMatchFullHalfWidthForms( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchHiraganaKatakana.IsChecked(); bChanged = bNewVal != aMatchHiraganaKatakana.GetSavedValue(); if (bChanged) { aOpt.SetMatchHiraganaKatakana( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchContractions.IsChecked(); bChanged = bNewVal != aMatchContractions.GetSavedValue(); if (bChanged) { aOpt.SetMatchContractions( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchMinusDashChoon.IsChecked(); bChanged = bNewVal != aMatchMinusDashChoon.GetSavedValue(); if (bChanged) { aOpt.SetMatchMinusDashChoon( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchRepeatCharMarks.IsChecked(); bChanged = bNewVal != aMatchRepeatCharMarks.GetSavedValue(); if (bChanged) { aOpt.SetMatchRepeatCharMarks( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchVariantFormKanji.IsChecked(); bChanged = bNewVal != aMatchVariantFormKanji.GetSavedValue(); if (bChanged) { aOpt.SetMatchVariantFormKanji( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchOldKanaForms.IsChecked(); bChanged = bNewVal != aMatchOldKanaForms.GetSavedValue(); if (bChanged) { aOpt.SetMatchOldKanaForms( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchDiziDuzu.IsChecked(); bChanged = bNewVal != aMatchDiziDuzu.GetSavedValue(); if (bChanged) { aOpt.SetMatchDiziDuzu( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchBavaHafa.IsChecked(); bChanged = bNewVal != aMatchBavaHafa.GetSavedValue(); if (bChanged) { aOpt.SetMatchBavaHafa( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchTsithichiDhizi.IsChecked(); bChanged = bNewVal != aMatchTsithichiDhizi.GetSavedValue(); if (bChanged) { aOpt.SetMatchTsithichiDhizi( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchHyuiyuByuvyu.IsChecked(); bChanged = bNewVal != aMatchHyuiyuByuvyu.GetSavedValue(); if (bChanged) { aOpt.SetMatchHyuiyuByuvyu( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchSesheZeje.IsChecked(); bChanged = bNewVal != aMatchSesheZeje.GetSavedValue(); if (bChanged) { aOpt.SetMatchSesheZeje( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchIaiya.IsChecked(); bChanged = bNewVal != aMatchIaiya.GetSavedValue(); if (bChanged) { aOpt.SetMatchIaiya( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchKiku.IsChecked(); bChanged = bNewVal != aMatchKiku.GetSavedValue(); if (bChanged) { aOpt.SetMatchKiku( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aIgnorePunctuation.IsChecked(); bChanged = bNewVal != aIgnorePunctuation.GetSavedValue(); if (bChanged) { aOpt.SetIgnorePunctuation( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aIgnoreWhitespace.IsChecked(); bChanged = bNewVal != aIgnoreWhitespace.GetSavedValue(); if (bChanged) { aOpt.SetIgnoreWhitespace( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchProlongedSoundMark.IsChecked(); bChanged = bNewVal != aMatchProlongedSoundMark.GetSavedValue(); if (bChanged) { aOpt.SetIgnoreProlongedSoundMark( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aIgnoreMiddleDot.IsChecked(); bChanged = bNewVal != aIgnoreMiddleDot.GetSavedValue(); if (bChanged) { aOpt.SetIgnoreMiddleDot( bNewVal ); - bModified = TRUE; + bModified = sal_True; } return bModified; diff --git a/cui/source/options/optjsearch.hxx b/cui/source/options/optjsearch.hxx index 6a1c91d42ae9..85976b0d76dc 100644 --- a/cui/source/options/optjsearch.hxx +++ b/cui/source/options/optjsearch.hxx @@ -64,10 +64,10 @@ private: CheckBox aIgnoreWhitespace; CheckBox aIgnoreMiddleDot; - INT32 nTransliterationFlags; - BOOL bSaveOptions; + sal_Int32 nTransliterationFlags; + sal_Bool bSaveOptions; - INT32 GetTransliterationFlags_Impl(); + sal_Int32 GetTransliterationFlags_Impl(); protected: SvxJSearchOptionsPage( Window* pParent, const SfxItemSet& rSet ); @@ -78,13 +78,13 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); - BOOL IsSaveOptions() const { return bSaveOptions; } - void EnableSaveOptions( BOOL bVal ) { bSaveOptions = bVal; } + sal_Bool IsSaveOptions() const { return bSaveOptions; } + void EnableSaveOptions( sal_Bool bVal ) { bSaveOptions = bVal; } - INT32 GetTransliterationFlags() const { return nTransliterationFlags; } - void SetTransliterationFlags( INT32 nSettings ); + sal_Int32 GetTransliterationFlags() const { return nTransliterationFlags; } + void SetTransliterationFlags( sal_Int32 nSettings ); }; ////////////////////////////////////////////////////////////////////// diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index dd7f3ddb840f..f5fb40e917f6 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -104,13 +104,13 @@ static const sal_Char cThes[] = SN_THESAURUS; // static ---------------------------------------------------------------- -static Sequence< INT16 > lcl_LocaleSeqToLangSeq( const Sequence< Locale > &rSeq ) +static Sequence< sal_Int16 > lcl_LocaleSeqToLangSeq( const Sequence< Locale > &rSeq ) { - INT32 nLen = rSeq.getLength(); - Sequence< INT16 > aRes( nLen ); - INT16 *pRes = aRes.getArray(); + sal_Int32 nLen = rSeq.getLength(); + Sequence< sal_Int16 > aRes( nLen ); + sal_Int16 *pRes = aRes.getArray(); const Locale *pSeq = rSeq.getConstArray(); - for (INT32 i = 0; i < nLen; ++i) + for (sal_Int32 i = 0; i < nLen; ++i) { pRes[i] = SvxLocaleToLanguage( pSeq[i] ); } @@ -118,25 +118,25 @@ static Sequence< INT16 > lcl_LocaleSeqToLangSeq( const Sequence< Locale > &rSeq } -static BOOL lcl_SeqHasLang( const Sequence< INT16 > &rSeq, INT16 nLang ) +static sal_Bool lcl_SeqHasLang( const Sequence< sal_Int16 > &rSeq, sal_Int16 nLang ) { - INT32 nLen = rSeq.getLength(); - const INT16 *pLang = rSeq.getConstArray(); - INT32 nPos = -1; - for (INT32 i = 0; i < nLen && nPos < 0; ++i) + sal_Int32 nLen = rSeq.getLength(); + const sal_Int16 *pLang = rSeq.getConstArray(); + sal_Int32 nPos = -1; + for (sal_Int32 i = 0; i < nLen && nPos < 0; ++i) { if (nLang == pLang[i]) nPos = i; } - return nPos < 0 ? FALSE : TRUE; + return nPos < 0 ? sal_False : sal_True; } -static INT32 lcl_SeqGetEntryPos( +static sal_Int32 lcl_SeqGetEntryPos( const Sequence< OUString > &rSeq, const OUString &rEntry ) { - INT32 i; - INT32 nLen = rSeq.getLength(); + sal_Int32 i; + sal_Int32 nLen = rSeq.getLength(); const OUString *pItem = rSeq.getConstArray(); for (i = 0; i < nLen; ++i) { @@ -211,21 +211,21 @@ sal_Bool KillFile_Impl( const String& rURL ) // c: 1 -> checked 0 -> unchecked // n: index -#define TYPE_SPELL (BYTE)1 -#define TYPE_GRAMMAR (BYTE)2 -#define TYPE_HYPH (BYTE)3 -#define TYPE_THES (BYTE)4 +#define TYPE_SPELL (sal_uInt8)1 +#define TYPE_GRAMMAR (sal_uInt8)2 +#define TYPE_HYPH (sal_uInt8)3 +#define TYPE_THES (sal_uInt8)4 class ModuleUserData_Impl { - BOOL bParent; - BOOL bIsChecked; - BYTE nType; - BYTE nIndex; + sal_Bool bParent; + sal_Bool bIsChecked; + sal_uInt8 nType; + sal_uInt8 nIndex; String sImplName; public: - ModuleUserData_Impl( String sImpName, BOOL bIsParent, BOOL bChecked, BYTE nSetType, BYTE nSetIndex ) : + ModuleUserData_Impl( String sImpName, sal_Bool bIsParent, sal_Bool bChecked, sal_uInt8 nSetType, sal_uInt8 nSetIndex ) : bParent(bIsParent), bIsChecked(bChecked), nType(nSetType), @@ -233,11 +233,11 @@ public: sImplName(sImpName) { } - BOOL IsParent() const {return bParent;} - BYTE GetType() const {return nType;} - BOOL IsChecked() const {return bIsChecked;} - BYTE GetIndex() const {return nIndex;} - void SetIndex(BYTE nSet) {nIndex = nSet;} + sal_Bool IsParent() const {return bParent;} + sal_uInt8 GetType() const {return nType;} + sal_Bool IsChecked() const {return bIsChecked;} + sal_uInt8 GetIndex() const {return nIndex;} + void SetIndex(sal_uInt8 nSet) {nIndex = nSet;} const String& GetImplName() const {return sImplName;} }; @@ -249,45 +249,45 @@ public: // class DicUserData { - ULONG nVal; + sal_uLong nVal; public: - DicUserData( ULONG nUserData ) : nVal( nUserData ) {} - DicUserData( USHORT nEID, - BOOL bChecked, BOOL bEditable, BOOL bDeletable ); + DicUserData( sal_uLong nUserData ) : nVal( nUserData ) {} + DicUserData( sal_uInt16 nEID, + sal_Bool bChecked, sal_Bool bEditable, sal_Bool bDeletable ); - ULONG GetUserData() const { return nVal; } - USHORT GetEntryId() const { return (USHORT)(nVal >> 16); } - BOOL IsChecked() const { return (BOOL)(nVal >> 8) & 0x01; } - BOOL IsEditable() const { return (BOOL)(nVal >> 9) & 0x01; } - BOOL IsDeletable() const { return (BOOL)(nVal >> 10) & 0x01; } + sal_uLong GetUserData() const { return nVal; } + sal_uInt16 GetEntryId() const { return (sal_uInt16)(nVal >> 16); } + sal_Bool IsChecked() const { return (sal_Bool)(nVal >> 8) & 0x01; } + sal_Bool IsEditable() const { return (sal_Bool)(nVal >> 9) & 0x01; } + sal_Bool IsDeletable() const { return (sal_Bool)(nVal >> 10) & 0x01; } - void SetChecked( BOOL bVal ); + void SetChecked( sal_Bool bVal ); }; DicUserData::DicUserData( - USHORT nEID, - BOOL bChecked, BOOL bEditable, BOOL bDeletable ) + sal_uInt16 nEID, + sal_Bool bChecked, sal_Bool bEditable, sal_Bool bDeletable ) { DBG_ASSERT( nEID < 65000, "Entry Id out of range" ); - nVal = ((ULONG)(0xFFFF & nEID) << 16) | - ((ULONG)(bChecked ? 1 : 0) << 8) | - ((ULONG)(bEditable ? 1 : 0) << 9) | - ((ULONG)(bDeletable ? 1 : 0) << 10); + nVal = ((sal_uLong)(0xFFFF & nEID) << 16) | + ((sal_uLong)(bChecked ? 1 : 0) << 8) | + ((sal_uLong)(bEditable ? 1 : 0) << 9) | + ((sal_uLong)(bDeletable ? 1 : 0) << 10); } -void DicUserData::SetChecked( BOOL bVal ) +void DicUserData::SetChecked( sal_Bool bVal ) { nVal &= ~(1UL << 8); - nVal |= (ULONG)(bVal ? 1 : 0) << 8; + nVal |= (sal_uLong)(bVal ? 1 : 0) << 8; } // class BrwString_Impl ------------------------------------------------- -void lcl_SetCheckButton( SvLBoxEntry* pEntry, BOOL bCheck ) +void lcl_SetCheckButton( SvLBoxEntry* pEntry, sal_Bool bCheck ) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON)); @@ -307,14 +307,14 @@ class BrwStringDic_Impl : public SvLBoxString { public: - BrwStringDic_Impl( SvLBoxEntry* pEntry, USHORT nFlags, + BrwStringDic_Impl( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : SvLBoxString( pEntry, nFlags, rStr ) {} - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); }; -void BrwStringDic_Impl::Paint( const Point& rPos, SvLBox& rDev, USHORT, +void BrwStringDic_Impl::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) { ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData(); @@ -412,52 +412,52 @@ static inline String lcl_GetPropertyName( EID_OPTIONS eEntryId ) class OptionsUserData { - ULONG nVal; + sal_uLong nVal; void SetModified(); public: - OptionsUserData( ULONG nUserData ) : nVal( nUserData ) {} - OptionsUserData( USHORT nEID, - BOOL bHasNV, USHORT nNumVal, - BOOL bCheckable, BOOL bChecked ); - - ULONG GetUserData() const { return nVal; } - USHORT GetEntryId() const { return (USHORT)(nVal >> 16); } - BOOL HasNumericValue() const { return (BOOL)(nVal >> 10) & 0x01; } - USHORT GetNumericValue() const { return (USHORT)(nVal & 0xFF); } - BOOL IsChecked() const { return (BOOL)(nVal >> 8) & 0x01; } - BOOL IsCheckable() const { return (BOOL)(nVal >> 9) & 0x01; } - BOOL IsModified() const { return (BOOL)(nVal >> 11) & 0x01; } - - void SetChecked( BOOL bVal ); - void SetNumericValue( BYTE nNumVal ); + OptionsUserData( sal_uLong nUserData ) : nVal( nUserData ) {} + OptionsUserData( sal_uInt16 nEID, + sal_Bool bHasNV, sal_uInt16 nNumVal, + sal_Bool bCheckable, sal_Bool bChecked ); + + sal_uLong GetUserData() const { return nVal; } + sal_uInt16 GetEntryId() const { return (sal_uInt16)(nVal >> 16); } + sal_Bool HasNumericValue() const { return (sal_Bool)(nVal >> 10) & 0x01; } + sal_uInt16 GetNumericValue() const { return (sal_uInt16)(nVal & 0xFF); } + sal_Bool IsChecked() const { return (sal_Bool)(nVal >> 8) & 0x01; } + sal_Bool IsCheckable() const { return (sal_Bool)(nVal >> 9) & 0x01; } + sal_Bool IsModified() const { return (sal_Bool)(nVal >> 11) & 0x01; } + + void SetChecked( sal_Bool bVal ); + void SetNumericValue( sal_uInt8 nNumVal ); }; -OptionsUserData::OptionsUserData( USHORT nEID, - BOOL bHasNV, USHORT nNumVal, - BOOL bCheckable, BOOL bChecked ) +OptionsUserData::OptionsUserData( sal_uInt16 nEID, + sal_Bool bHasNV, sal_uInt16 nNumVal, + sal_Bool bCheckable, sal_Bool bChecked ) { DBG_ASSERT( nEID < 65000, "Entry Id out of range" ); DBG_ASSERT( nNumVal < 256, "value out of range" ); - nVal = ((ULONG)(0xFFFF & nEID) << 16) | - ((ULONG)(bHasNV ? 1 : 0) << 10) | - ((ULONG)(bCheckable ? 1 : 0) << 9) | - ((ULONG)(bChecked ? 1 : 0) << 8) | - ((ULONG)(0xFF & nNumVal)); + nVal = ((sal_uLong)(0xFFFF & nEID) << 16) | + ((sal_uLong)(bHasNV ? 1 : 0) << 10) | + ((sal_uLong)(bCheckable ? 1 : 0) << 9) | + ((sal_uLong)(bChecked ? 1 : 0) << 8) | + ((sal_uLong)(0xFF & nNumVal)); } -void OptionsUserData::SetChecked( BOOL bVal ) +void OptionsUserData::SetChecked( sal_Bool bVal ) { if (IsCheckable() && (IsChecked() != bVal)) { nVal &= ~(1UL << 8); - nVal |= (ULONG)(bVal ? 1 : 0) << 8; + nVal |= (sal_uLong)(bVal ? 1 : 0) << 8; SetModified(); } } -void OptionsUserData::SetNumericValue( BYTE nNumVal ) +void OptionsUserData::SetNumericValue( sal_uInt8 nNumVal ) { // DBG_ASSERT( nNumVal < 256, "value out of range" ); if (HasNumericValue() && (GetNumericValue() != nNumVal)) @@ -470,7 +470,7 @@ void OptionsUserData::SetNumericValue( BYTE nNumVal ) void OptionsUserData::SetModified() { - nVal |= (ULONG)1 << 11; + nVal |= (sal_uLong)1 << 11; } // class BrwString_Impl ------------------------------------------------- @@ -479,14 +479,14 @@ class BrwString_Impl : public SvLBoxString { public: - BrwString_Impl( SvLBoxEntry* pEntry, USHORT nFlags, + BrwString_Impl( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : SvLBoxString( pEntry, nFlags, rStr ) {} - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); }; -void BrwString_Impl::Paint( const Point& rPos, SvLBox& rDev, USHORT, +void BrwString_Impl::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) { Point aPos(rPos); @@ -500,10 +500,10 @@ void BrwString_Impl::Paint( const Point& rPos, SvLBox& rDev, USHORT, Font aFont( aOldFont ); aFont.SetWeight( WEIGHT_BOLD ); -// BOOL bFett = TRUE; -// USHORT nPos = 0; +// sal_Bool bFett = sal_True; +// sal_uInt16 nPos = 0; //??? das untere byte aus dem user data in string wandeln - OptionsUserData aData( (ULONG) pEntry->GetUserData() ); + OptionsUserData aData( (sal_uLong) pEntry->GetUserData() ); if(aData.HasNumericValue()) { String sTxt( ' ' ); @@ -532,13 +532,13 @@ struct ServiceInfo_Impl uno::Reference< XHyphenator > xHyph; uno::Reference< XThesaurus > xThes; uno::Reference< XProofreader > xGrammar; - BOOL bConfigured; + sal_Bool bConfigured; ServiceInfo_Impl() : bConfigured(sal_False) {} }; typedef std::vector< ServiceInfo_Impl > ServiceInfoArr; -typedef std::map< INT16 /*LanguageType*/, Sequence< OUString > > LangImplNameTable; +typedef std::map< sal_Int16 /*LanguageType*/, Sequence< OUString > > LangImplNameTable; // SvxLinguData_Impl ---------------------------------------------------- @@ -547,7 +547,7 @@ class SvxLinguData_Impl { //contains services and implementation names sorted by implementation names ServiceInfoArr aDisplayServiceArr; - ULONG nDisplayServices; + sal_uLong nDisplayServices; Sequence< Locale > aAllServiceLocales; LangImplNameTable aCfgSpellTable; @@ -559,7 +559,7 @@ class SvxLinguData_Impl sal_Bool AddRemove( Sequence< OUString > &rConfigured, - const OUString &rImplName, BOOL bAdd ); + const OUString &rImplName, sal_Bool bAdd ); public: SvxLinguData_Impl(); @@ -571,7 +571,7 @@ public: uno::Reference<XLinguServiceManager> & GetManager() { return xLinguSrvcMgr; } void SetChecked( const Sequence< OUString > &rConfiguredServices ); - void Reconfigure( const OUString &rDisplayName, BOOL bEnable ); + void Reconfigure( const OUString &rDisplayName, sal_Bool bEnable ); const Sequence<Locale> & GetAllSupportedLocales() { return aAllServiceLocales; } @@ -587,8 +587,8 @@ public: const ServiceInfoArr & GetDisplayServiceArray() const { return aDisplayServiceArr; } ServiceInfoArr & GetDisplayServiceArray() { return aDisplayServiceArr; } - const ULONG & GetDisplayServiceCount() const { return nDisplayServices; } - void SetDisplayServiceCount( ULONG nVal ) { nDisplayServices = nVal; } + const sal_uLong & GetDisplayServiceCount() const { return nDisplayServices; } + void SetDisplayServiceCount( sal_uLong nVal ) { nDisplayServices = nVal; } // returns the list of service implementation names for the specified // language and service (TYPE_SPELL, TYPE_HYPH, TYPE_THES) sorted in @@ -597,18 +597,18 @@ public: // I.e. the ones available but not configured in arbitrary order). // They available ones may contain names that do not(!) support that // language. - Sequence< OUString > GetSortedImplNames( INT16 nLang, BYTE nType ); + Sequence< OUString > GetSortedImplNames( sal_Int16 nLang, sal_uInt8 nType ); ServiceInfo_Impl * GetInfoByImplName( const OUString &rSvcImplName ); }; -INT32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, const OUString &rTxt ) +sal_Int32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, const OUString &rTxt ) { - INT32 nRes = -1; - INT32 nLen = rSeq.getLength(); + sal_Int32 nRes = -1; + sal_Int32 nLen = rSeq.getLength(); const OUString *pString = rSeq.getConstArray(); - for (INT32 i = 0; i < nLen && nRes == -1; ++i) + for (sal_Int32 i = 0; i < nLen && nRes == -1; ++i) { if (pString[i] == rTxt) nRes = i; @@ -617,7 +617,7 @@ INT32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, const OUString &rTxt ) } -Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( INT16 nLang, BYTE nType ) +Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( sal_Int16 nLang, sal_uInt8 nType ) { LangImplNameTable *pTable = 0; switch (nType) @@ -630,13 +630,13 @@ Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( INT16 nLang, BYTE nT Sequence< OUString > aRes; if (pTable->count( nLang )) aRes = (*pTable)[ nLang ]; // add configured services - INT32 nIdx = aRes.getLength(); - DBG_ASSERT( (INT32) nDisplayServices >= nIdx, "size mismatch" ); + sal_Int32 nIdx = aRes.getLength(); + DBG_ASSERT( (sal_Int32) nDisplayServices >= nIdx, "size mismatch" ); aRes.realloc( nDisplayServices ); OUString *pRes = aRes.getArray(); // add not configured services - for (INT32 i = 0; i < (INT32) nDisplayServices; ++i) + for (sal_Int32 i = 0; i < (sal_Int32) nDisplayServices; ++i) { const ServiceInfo_Impl &rInfo = aDisplayServiceArr[ i ]; OUString aImplName; @@ -666,7 +666,7 @@ Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( INT16 nLang, BYTE nT ServiceInfo_Impl * SvxLinguData_Impl::GetInfoByImplName( const OUString &rSvcImplName ) { ServiceInfo_Impl* pInfo = 0; - for (ULONG i = 0; i < nDisplayServices && !pInfo; ++i) + for (sal_uLong i = 0; i < nDisplayServices && !pInfo; ++i) { ServiceInfo_Impl &rTmp = aDisplayServiceArr[ i ]; if (rTmp.sSpellImplName == rSvcImplName || @@ -715,13 +715,13 @@ void lcl_MergeDisplayArray( SvxLinguData_Impl &rData, const ServiceInfo_Impl &rToAdd ) { - ULONG nCnt = 0; + sal_uLong nCnt = 0; ServiceInfoArr &rSvcInfoArr = rData.GetDisplayServiceArray(); - ULONG nEntries = rData.GetDisplayServiceCount(); + sal_uLong nEntries = rData.GetDisplayServiceCount(); ServiceInfo_Impl* pEntry; - for (ULONG i = 0; i < nEntries; ++i) + for (sal_uLong i = 0; i < nEntries; ++i) { pEntry = &rSvcInfoArr[i]; if (pEntry && pEntry->sDisplayName == rToAdd.sDisplayName) @@ -886,7 +886,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() : const Locale* pAllLocales = aAllServiceLocales.getConstArray(); for(sal_Int32 nLocale = 0; nLocale < aAllServiceLocales.getLength(); nLocale++) { - INT16 nLang = SvxLocaleToLanguage( pAllLocales[nLocale] ); + sal_Int16 nLang = SvxLocaleToLanguage( pAllLocales[nLocale] ); aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(C2U(cSpell), pAllLocales[nLocale]); SetChecked( aCfgSvcs ); @@ -956,7 +956,7 @@ void SvxLinguData_Impl::SetChecked(const Sequence<OUString>& rConfiguredServices for(sal_Int32 n = 0; n < rConfiguredServices.getLength(); n++) { ServiceInfo_Impl* pEntry; - for (ULONG i = 0; i < nDisplayServices; ++i) + for (sal_uLong i = 0; i < nDisplayServices; ++i) { pEntry = &aDisplayServiceArr[i]; if (pEntry && !pEntry->bConfigured) @@ -981,12 +981,12 @@ void SvxLinguData_Impl::SetChecked(const Sequence<OUString>& rConfiguredServices sal_Bool SvxLinguData_Impl::AddRemove( Sequence< OUString > &rConfigured, - const OUString &rImplName, BOOL bAdd ) + const OUString &rImplName, sal_Bool bAdd ) { sal_Bool bRet = sal_False; // modified? - INT32 nEntries = rConfigured.getLength(); - INT32 nPos = lcl_SeqGetEntryPos(rConfigured, rImplName); + sal_Int32 nEntries = rConfigured.getLength(); + sal_Int32 nPos = lcl_SeqGetEntryPos(rConfigured, rImplName); if (bAdd && nPos < 0) // add new entry { rConfigured.realloc( ++nEntries ); @@ -998,7 +998,7 @@ sal_Bool SvxLinguData_Impl::AddRemove( else if (!bAdd && nPos >= 0) // remove existing entry { OUString *pConfigured = rConfigured.getArray(); - for (INT32 i = nPos; i < nEntries - 1; ++i) + for (sal_Int32 i = nPos; i < nEntries - 1; ++i) pConfigured[i] = pConfigured[i + 1]; rConfigured.realloc(--nEntries); bRet = sal_True; @@ -1008,13 +1008,13 @@ sal_Bool SvxLinguData_Impl::AddRemove( } -void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, BOOL bEnable ) +void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, sal_Bool bEnable ) { DBG_ASSERT( rDisplayName.getLength(), "empty DisplayName" ); ServiceInfo_Impl *pInfo = 0; ServiceInfo_Impl *pTmp = 0; - for (ULONG i = 0; i < nDisplayServices; ++i) + for (sal_uLong i = 0; i < nDisplayServices; ++i) { pTmp = &aDisplayServiceArr[i]; if (pTmp && pTmp->sDisplayName == rDisplayName) @@ -1030,8 +1030,8 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, BOOL bEnable Sequence< Locale > aLocales; const Locale *pLocale = 0; - INT32 nLocales = 0; - INT32 i; + sal_Int32 nLocales = 0; + sal_Int32 i; // update configured spellchecker entries if (pInfo->xSpell.is()) @@ -1041,7 +1041,7 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, BOOL bEnable nLocales = aLocales.getLength(); for (i = 0; i < nLocales; ++i) { - INT16 nLang = SvxLocaleToLanguage( pLocale[i] ); + sal_Int16 nLang = SvxLocaleToLanguage( pLocale[i] ); if (!aCfgSpellTable.count( nLang ) && bEnable) aCfgSpellTable[ nLang ] = Sequence< OUString >(); if (aCfgSpellTable.count( nLang )) @@ -1057,7 +1057,7 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, BOOL bEnable nLocales = aLocales.getLength(); for (i = 0; i < nLocales; ++i) { - INT16 nLang = SvxLocaleToLanguage( pLocale[i] ); + sal_Int16 nLang = SvxLocaleToLanguage( pLocale[i] ); if (!aCfgGrammarTable.count( nLang ) && bEnable) aCfgGrammarTable[ nLang ] = Sequence< OUString >(); if (aCfgGrammarTable.count( nLang )) @@ -1073,7 +1073,7 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, BOOL bEnable nLocales = aLocales.getLength(); for (i = 0; i < nLocales; ++i) { - INT16 nLang = SvxLocaleToLanguage( pLocale[i] ); + sal_Int16 nLang = SvxLocaleToLanguage( pLocale[i] ); if (!aCfgHyphTable.count( nLang ) && bEnable) aCfgHyphTable[ nLang ] = Sequence< OUString >(); if (aCfgHyphTable.count( nLang )) @@ -1089,7 +1089,7 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, BOOL bEnable nLocales = aLocales.getLength(); for (i = 0; i < nLocales; ++i) { - INT16 nLang = SvxLocaleToLanguage( pLocale[i] ); + sal_Int16 nLang = SvxLocaleToLanguage( pLocale[i] ); if (!aCfgThesTable.count( nLang ) && bEnable) aCfgThesTable[ nLang ] = Sequence< OUString >(); if (aCfgThesTable.count( nLang )) @@ -1250,7 +1250,7 @@ SfxTabPage* SvxLinguTabPage::Create( Window* pParent, //------------------------------------------------------------------------ -Any lcl_Bool2Any(BOOL bVal) +Any lcl_Bool2Any(sal_Bool bVal) { Any aRet(&bVal, ::getBooleanCppuType()); return aRet; @@ -1280,7 +1280,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) const LangImplNameTable *pTable = &pLinguData->GetSpellTable(); for (aIt = pTable->begin(); aIt != pTable->end(); ++aIt) { - INT16 nLang = aIt->first; + sal_Int16 nLang = aIt->first; const Sequence< OUString > aImplNames( aIt->second ); #if OSL_DEBUG_LEVEL > 1 const OUString *pTmpStr; @@ -1296,7 +1296,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) pTable = &pLinguData->GetGrammarTable(); for (aIt = pTable->begin(); aIt != pTable->end(); ++aIt) { - INT16 nLang = aIt->first; + sal_Int16 nLang = aIt->first; const Sequence< OUString > aImplNames( aIt->second ); #if OSL_DEBUG_LEVEL > 1 const OUString *pTmpStr; @@ -1312,7 +1312,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) pTable = &pLinguData->GetHyphTable(); for (aIt = pTable->begin(); aIt != pTable->end(); ++aIt) { - INT16 nLang = aIt->first; + sal_Int16 nLang = aIt->first; const Sequence< OUString > aImplNames( aIt->second ); #if OSL_DEBUG_LEVEL > 1 const OUString *pTmpStr; @@ -1328,7 +1328,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) pTable = &pLinguData->GetThesTable(); for (aIt = pTable->begin(); aIt != pTable->end(); ++aIt) { - INT16 nLang = aIt->first; + sal_Int16 nLang = aIt->first; const Sequence< OUString > aImplNames( aIt->second ); #if OSL_DEBUG_LEVEL > 1 const OUString *pTmpStr; @@ -1346,11 +1346,11 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) // activate dictionaries according to checkbox state // Sequence< OUString > aActiveDics; - INT32 nActiveDics = 0; - ULONG nEntries = aLinguDicsCLB.GetEntryCount(); - for (ULONG i = 0; i < nEntries; ++i) + sal_Int32 nActiveDics = 0; + sal_uLong nEntries = aLinguDicsCLB.GetEntryCount(); + for (sal_uLong i = 0; i < nEntries; ++i) { - INT32 nDics = aDics.getLength(); + sal_Int32 nDics = aDics.getLength(); // const uno::Reference< XDictionary > *pDic = aDics.getConstArray(); aActiveDics.realloc( nDics ); @@ -1359,15 +1359,15 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) SvLBoxEntry *pEntry = aLinguDicsCLB.GetEntry( i ); if (pEntry) { - DicUserData aData( (ULONG)pEntry->GetUserData() ); + DicUserData aData( (sal_uLong)pEntry->GetUserData() ); if (aData.GetEntryId() < nDics) { - BOOL bChecked = aLinguDicsCLB.IsChecked( (USHORT) i ); + sal_Bool bChecked = aLinguDicsCLB.IsChecked( (sal_uInt16) i ); uno::Reference< XDictionary > xDic( aDics.getConstArray()[ i ] ); if (xDic.is()) { if (SvxGetIgnoreAllList() == xDic) - bChecked = TRUE; + bChecked = sal_True; xDic->setActive( bChecked ); if (bChecked) @@ -1388,22 +1388,22 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) nEntries = aLinguOptionsCLB.GetEntryCount(); - for (USHORT j = 0; j < nEntries; ++j) + for (sal_uInt16 j = 0; j < nEntries; ++j) { SvLBoxEntry *pEntry = aLinguOptionsCLB.GetEntry( j ); - OptionsUserData aData( (ULONG)pEntry->GetUserData() ); + OptionsUserData aData( (sal_uLong)pEntry->GetUserData() ); String aPropName( lcl_GetPropertyName( (EID_OPTIONS) aData.GetEntryId() ) ); Any aAny; if (aData.IsCheckable()) { - BOOL bChecked = aLinguOptionsCLB.IsChecked( j ); + sal_Bool bChecked = aLinguOptionsCLB.IsChecked( j ); aAny <<= bChecked; } else if (aData.HasNumericValue()) { - INT16 nVal = aData.GetNumericValue(); + sal_Int16 nVal = aData.GetNumericValue(); aAny <<= nVal; } @@ -1412,26 +1412,26 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) aLngCfg.SetProperty( aPropName, aAny ); } - SvLBoxEntry *pPreBreakEntry = aLinguOptionsCLB.GetEntry( (USHORT) EID_NUM_PRE_BREAK ); - SvLBoxEntry *pPostBreakEntry = aLinguOptionsCLB.GetEntry( (USHORT) EID_NUM_POST_BREAK ); + SvLBoxEntry *pPreBreakEntry = aLinguOptionsCLB.GetEntry( (sal_uInt16) EID_NUM_PRE_BREAK ); + SvLBoxEntry *pPostBreakEntry = aLinguOptionsCLB.GetEntry( (sal_uInt16) EID_NUM_POST_BREAK ); DBG_ASSERT( pPreBreakEntry, "NULL Pointer" ); DBG_ASSERT( pPostBreakEntry, "NULL Pointer" ); if (pPreBreakEntry && pPostBreakEntry) { - OptionsUserData aPreBreakData( (ULONG)pPreBreakEntry->GetUserData() ); - OptionsUserData aPostBreakData( (ULONG)pPostBreakEntry->GetUserData() ); + OptionsUserData aPreBreakData( (sal_uLong)pPreBreakEntry->GetUserData() ); + OptionsUserData aPostBreakData( (sal_uLong)pPostBreakEntry->GetUserData() ); if ( aPreBreakData.IsModified() || aPostBreakData.IsModified() ) { SfxHyphenRegionItem aHyp( GetWhich( SID_ATTR_HYPHENREGION ) ); - aHyp.GetMinLead() = (UINT8) aPreBreakData.GetNumericValue(); - aHyp.GetMinTrail() = (UINT8) aPostBreakData.GetNumericValue(); + aHyp.GetMinLead() = (sal_uInt8) aPreBreakData.GetNumericValue(); + aHyp.GetMinTrail() = (sal_uInt8) aPostBreakData.GetNumericValue(); rCoreSet.Put( aHyp ); } } // automatic spell checking - BOOL bNewAutoCheck = aLinguOptionsCLB.IsChecked( (USHORT) EID_SPELL_AUTO ); + sal_Bool bNewAutoCheck = aLinguOptionsCLB.IsChecked( (sal_uInt16) EID_SPELL_AUTO ); const SfxPoolItem* pOld = GetOldItem( rCoreSet, SID_AUTOSPELL_CHECK ); if ( !pOld || ( (SfxBoolItem*)pOld )->GetValue() != bNewAutoCheck ) { @@ -1445,19 +1445,19 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) // ---------------------------------------------------------------------- -ULONG SvxLinguTabPage::GetDicUserData( const uno::Reference< XDictionary > &rxDic, USHORT nIdx ) +sal_uLong SvxLinguTabPage::GetDicUserData( const uno::Reference< XDictionary > &rxDic, sal_uInt16 nIdx ) { - ULONG nRes = 0; + sal_uLong nRes = 0; DBG_ASSERT( rxDic.is(), "dictionary not supplied" ); if (rxDic.is()) { uno::Reference< frame::XStorable > xStor( rxDic, UNO_QUERY ); -// ULONG nUserData = 0; - BOOL bChecked = rxDic->isActive(); - BOOL bEditable = !xStor.is() || !xStor->isReadonly(); - BOOL bDeletable = bEditable; -// BOOL bNegativ = rxDic->getDictionaryType() == DictionaryType_NEGATIVE; +// sal_uLong nUserData = 0; + sal_Bool bChecked = rxDic->isActive(); + sal_Bool bEditable = !xStor.is() || !xStor->isReadonly(); + sal_Bool bDeletable = bEditable; +// sal_Bool bNegativ = rxDic->getDictionaryType() == DictionaryType_NEGATIVE; nRes = DicUserData( nIdx, bChecked, bEditable, bDeletable ).GetUserData(); @@ -1468,14 +1468,14 @@ ULONG SvxLinguTabPage::GetDicUserData( const uno::Reference< XDictionary > &rxDi void SvxLinguTabPage::AddDicBoxEntry( const uno::Reference< XDictionary > &rxDic, - USHORT nIdx ) + sal_uInt16 nIdx ) { - aLinguDicsCLB.SetUpdateMode(FALSE); + aLinguDicsCLB.SetUpdateMode(sal_False); String aTxt( ::GetDicInfoStr( rxDic->getName(), SvxLocaleToLanguage( rxDic->getLocale() ), DictionaryType_NEGATIVE == rxDic->getDictionaryType() ) ); - aLinguDicsCLB.InsertEntry( aTxt, (USHORT)LISTBOX_APPEND ); // append at end + aLinguDicsCLB.InsertEntry( aTxt, (sal_uInt16)LISTBOX_APPEND ); // append at end SvLBoxEntry* pEntry = aLinguDicsCLB.GetEntry( aLinguDicsCLB.GetEntryCount() - 1 ); DBG_ASSERT( pEntry, "failed to add entry" ); if (pEntry) @@ -1485,26 +1485,26 @@ void SvxLinguTabPage::AddDicBoxEntry( lcl_SetCheckButton( pEntry, aData.IsChecked() ); } - aLinguDicsCLB.SetUpdateMode(TRUE); + aLinguDicsCLB.SetUpdateMode(sal_True); } // ---------------------------------------------------------------------- void SvxLinguTabPage::UpdateDicBox_Impl() { - aLinguDicsCLB.SetUpdateMode(FALSE); + aLinguDicsCLB.SetUpdateMode(sal_False); aLinguDicsCLB.Clear(); - INT32 nDics = aDics.getLength(); + sal_Int32 nDics = aDics.getLength(); const uno::Reference< XDictionary > *pDic = aDics.getConstArray(); - for (INT32 i = 0; i < nDics; ++i) + for (sal_Int32 i = 0; i < nDics; ++i) { const uno::Reference< XDictionary > &rDic = pDic[i]; if (rDic.is()) - AddDicBoxEntry( rDic, (USHORT)i ); + AddDicBoxEntry( rDic, (sal_uInt16)i ); } - aLinguDicsCLB.SetUpdateMode(TRUE); + aLinguDicsCLB.SetUpdateMode(sal_True); } // ---------------------------------------------------------------------- @@ -1514,14 +1514,14 @@ void SvxLinguTabPage::UpdateModulesBox_Impl() if (pLinguData) { const ServiceInfoArr &rAllDispSrvcArr = pLinguData->GetDisplayServiceArray(); - const ULONG nDispSrvcCount = pLinguData->GetDisplayServiceCount(); + const sal_uLong nDispSrvcCount = pLinguData->GetDisplayServiceCount(); aLinguModulesCLB.Clear(); - for (USHORT i = 0; i < nDispSrvcCount; ++i) + for (sal_uInt16 i = 0; i < nDispSrvcCount; ++i) { const ServiceInfo_Impl &rInfo = rAllDispSrvcArr[i]; - aLinguModulesCLB.InsertEntry( rInfo.sDisplayName, (USHORT)LISTBOX_APPEND ); + aLinguModulesCLB.InsertEntry( rInfo.sDisplayName, (sal_uInt16)LISTBOX_APPEND ); SvLBoxEntry* pEntry = aLinguModulesCLB.GetEntry(i); pEntry->SetUserData( (void *) &rInfo ); aLinguModulesCLB.CheckEntryPos( i, rInfo.bConfigured ); @@ -1549,22 +1549,22 @@ void SvxLinguTabPage::Reset( const SfxItemSet& rSet ) SvtLinguConfig aLngCfg; - aLinguOptionsCLB.SetUpdateMode(FALSE); + aLinguOptionsCLB.SetUpdateMode(sal_False); aLinguOptionsCLB.Clear(); SvLBoxTreeList *pModel = aLinguOptionsCLB.GetModel(); SvLBoxEntry* pEntry = NULL; - INT16 nVal = 0; - BOOL bVal = FALSE; - ULONG nUserData = 0; + sal_Int16 nVal = 0; + sal_Bool bVal = sal_False; + sal_uLong nUserData = 0; pEntry = CreateEntry( sSpellAuto, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_SPELL_AUTO) ) >>= bVal; const SfxPoolItem* pItem = GetItem( rSet, SID_AUTOSPELL_CHECK ); if (pItem) bVal = ((SfxBoolItem *) pItem)->GetValue(); - nUserData = OptionsUserData( EID_SPELL_AUTO, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_SPELL_AUTO, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); @@ -1574,81 +1574,81 @@ void SvxLinguTabPage::Reset( const SfxItemSet& rSet ) // const SfxPoolItem* pItem = GetItem( rSet, SID_AUTOSPELL_CHECK ); // if (pItem) // bVal = ((SfxBoolItem *) pItem)->GetValue(); - nUserData = OptionsUserData( EID_GRAMMAR_AUTO, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_GRAMMAR_AUTO, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); pEntry = CreateEntry( sCapitalWords, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_SPELL_UPPER_CASE) ) >>= bVal; - nUserData = OptionsUserData( EID_CAPITAL_WORDS, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_CAPITAL_WORDS, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); pEntry = CreateEntry( sWordsWithDigits, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_SPELL_WITH_DIGITS) ) >>= bVal; - nUserData = OptionsUserData( EID_WORDS_WITH_DIGITS, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_WORDS_WITH_DIGITS, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); pEntry = CreateEntry( sCapitalization, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_SPELL_CAPITALIZATION) ) >>= bVal; - nUserData = OptionsUserData( EID_CAPITALIZATION, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_CAPITALIZATION, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); pEntry = CreateEntry( sSpellSpecial, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_SPELL_SPECIAL) ) >>= bVal; - nUserData = OptionsUserData( EID_SPELL_SPECIAL, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_SPELL_SPECIAL, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); pEntry = CreateEntry( sNumMinWordlen, CBCOL_SECOND ); aLngCfg.GetProperty( C2U(UPN_HYPH_MIN_WORD_LENGTH) ) >>= nVal; - nUserData = OptionsUserData( EID_NUM_MIN_WORDLEN, TRUE, (USHORT)nVal, FALSE, FALSE).GetUserData(); + nUserData = OptionsUserData( EID_NUM_MIN_WORDLEN, sal_True, (sal_uInt16)nVal, sal_False, sal_False).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); const SfxHyphenRegionItem *pHyp = NULL; - USHORT nWhich = GetWhich( SID_ATTR_HYPHENREGION ); - if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET ) + sal_uInt16 nWhich = GetWhich( SID_ATTR_HYPHENREGION ); + if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) pHyp = &( (const SfxHyphenRegionItem &) rSet.Get( nWhich ) ); pEntry = CreateEntry( sNumPreBreak, CBCOL_SECOND ); aLngCfg.GetProperty( C2U(UPN_HYPH_MIN_LEADING) ) >>= nVal; if (pHyp) - nVal = (INT16) pHyp->GetMinLead(); - nUserData = OptionsUserData( EID_NUM_PRE_BREAK, TRUE, (USHORT)nVal, FALSE, FALSE).GetUserData(); + nVal = (sal_Int16) pHyp->GetMinLead(); + nUserData = OptionsUserData( EID_NUM_PRE_BREAK, sal_True, (sal_uInt16)nVal, sal_False, sal_False).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); pEntry = CreateEntry( sNumPostBreak, CBCOL_SECOND ); aLngCfg.GetProperty( C2U(UPN_HYPH_MIN_TRAILING) ) >>= nVal; if (pHyp) - nVal = (INT16) pHyp->GetMinTrail(); - nUserData = OptionsUserData( EID_NUM_POST_BREAK, TRUE, (USHORT)nVal, FALSE, FALSE).GetUserData(); + nVal = (sal_Int16) pHyp->GetMinTrail(); + nUserData = OptionsUserData( EID_NUM_POST_BREAK, sal_True, (sal_uInt16)nVal, sal_False, sal_False).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); pEntry = CreateEntry( sHyphAuto, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_HYPH_AUTO) ) >>= bVal; - nUserData = OptionsUserData( EID_HYPH_AUTO, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_HYPH_AUTO, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); pEntry = CreateEntry( sHyphSpecial, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_HYPH_SPECIAL) ) >>= bVal; - nUserData = OptionsUserData( EID_HYPH_SPECIAL, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_HYPH_SPECIAL, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); - aLinguOptionsCLB.SetUpdateMode(TRUE); + aLinguOptionsCLB.SetUpdateMode(sal_True); } // ----------------------------------------------------------------------- @@ -1694,7 +1694,7 @@ IMPL_LINK( SvxLinguTabPage, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox ) if (pBox == &aLinguModulesCLB) { DBG_ASSERT( pLinguData, "NULL pointer, LinguData missing" ); - USHORT nPos = aLinguModulesCLB.GetSelectEntryPos(); + sal_uInt16 nPos = aLinguModulesCLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND && pLinguData) { pLinguData->Reconfigure( aLinguModulesCLB.GetText( nPos ), @@ -1703,7 +1703,7 @@ IMPL_LINK( SvxLinguTabPage, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox ) } else if (pBox == &aLinguDicsCLB) { - USHORT nPos = aLinguDicsCLB.GetSelectEntryPos(); + sal_uInt16 nPos = aLinguDicsCLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND) { const uno::Reference< XDictionary > &rDic = aDics.getConstArray()[ nPos ]; @@ -1711,7 +1711,7 @@ IMPL_LINK( SvxLinguTabPage, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox ) { SvLBoxEntry* pEntry = aLinguDicsCLB.GetEntry( nPos ); if (pEntry) - lcl_SetCheckButton( pEntry, TRUE ); + lcl_SetCheckButton( pEntry, sal_True ); } } } @@ -1733,14 +1733,14 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) *pLinguData = aOldLinguData; // evaluate new status of 'bConfigured' flag - ULONG nLen = pLinguData->GetDisplayServiceCount(); - for (ULONG i = 0; i < nLen; ++i) - pLinguData->GetDisplayServiceArray()[i].bConfigured = FALSE; + sal_uLong nLen = pLinguData->GetDisplayServiceCount(); + for (sal_uLong i = 0; i < nLen; ++i) + pLinguData->GetDisplayServiceArray()[i].bConfigured = sal_False; const Locale* pAllLocales = pLinguData->GetAllSupportedLocales().getConstArray(); - INT32 nLocales = pLinguData->GetAllSupportedLocales().getLength(); - for (INT32 k = 0; k < nLocales; ++k) + sal_Int32 nLocales = pLinguData->GetAllSupportedLocales().getLength(); + for (sal_Int32 k = 0; k < nLocales; ++k) { - INT16 nLang = SvxLocaleToLanguage( pAllLocales[k] ); + sal_Int16 nLang = SvxLocaleToLanguage( pAllLocales[k] ); if (pLinguData->GetSpellTable().count( nLang )) pLinguData->SetChecked( pLinguData->GetSpellTable()[ nLang ] ); if (pLinguData->GetGrammarTable().count( nLang )) @@ -1768,12 +1768,12 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) if ( xNewDic.is() ) { // add new dics to the end - INT32 nLen = aDics.getLength(); + sal_Int32 nLen = aDics.getLength(); aDics.realloc( nLen + 1 ); aDics.getArray()[ nLen ] = xNewDic; - AddDicBoxEntry( xNewDic, (USHORT) nLen ); + AddDicBoxEntry( xNewDic, (sal_uInt16) nLen ); } delete aDlg; //add by CHINA001 } @@ -1783,9 +1783,9 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) SvLBoxEntry *pEntry = aLinguDicsCLB.GetCurEntry(); if (pEntry) { - DicUserData aData( (ULONG) pEntry->GetUserData() ); - USHORT nDicPos = aData.GetEntryId(); - INT32 nDics = aDics.getLength(); + DicUserData aData( (sal_uLong) pEntry->GetUserData() ); + sal_uInt16 nDicPos = aData.GetEntryId(); + sal_Int32 nDics = aDics.getLength(); if (nDicPos < nDics) { uno::Reference< XDictionary > xDic; @@ -1814,9 +1814,9 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) SvLBoxEntry *pEntry = aLinguDicsCLB.GetCurEntry(); if (pEntry) { - DicUserData aData( (ULONG) pEntry->GetUserData() ); - USHORT nDicPos = aData.GetEntryId(); - INT32 nDics = aDics.getLength(); + DicUserData aData( (sal_uLong) pEntry->GetUserData() ); + sal_uInt16 nDicPos = aData.GetEntryId(); + sal_Int32 nDics = aDics.getLength(); if (nDicPos < nDics) { uno::Reference< XDictionary > xDic; @@ -1846,17 +1846,17 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) aDics.getArray()[ nDicPos ] = 0; // remove entry from checklistbox - ULONG nCnt = aLinguDicsCLB.GetEntryCount(); - for (ULONG i = 0; i < nCnt; ++i) + sal_uLong nCnt = aLinguDicsCLB.GetEntryCount(); + for (sal_uLong i = 0; i < nCnt; ++i) { SvLBoxEntry *pDicEntry = aLinguDicsCLB.GetEntry( i ); DBG_ASSERT( pDicEntry, "missing entry" ); if (pDicEntry) { - DicUserData aDicData( (ULONG) pDicEntry->GetUserData() ); + DicUserData aDicData( (sal_uLong) pDicEntry->GetUserData() ); if (aDicData.GetEntryId() == nDicPos ) { - aLinguDicsCLB.RemoveEntry( (USHORT) i ); + aLinguDicsCLB.RemoveEntry( (sal_uInt16) i ); break; } } @@ -1875,7 +1875,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) if (pEntry) { long nVal = -1; - OptionsUserData aData( (ULONG)pEntry->GetUserData() ); + OptionsUserData aData( (sal_uLong)pEntry->GetUserData() ); if(aData.HasNumericValue()) { int nRID = -1; @@ -1895,7 +1895,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) nVal = static_cast<long>(aDlg.GetNumericFld().GetValue()); if (-1 != nVal && aData.GetNumericValue() != nVal) { - aData.SetNumericValue( (BYTE)nVal ); //! sets IsModified ! + aData.SetNumericValue( (sal_uInt8)nVal ); //! sets IsModified ! pEntry->SetUserData( (void *) aData.GetUserData() ); aLinguOptionsCLB.Invalidate(); } @@ -1923,7 +1923,7 @@ IMPL_LINK( SvxLinguTabPage, SelectHdl_Impl, SvxCheckListBox *, pBox ) SvLBoxEntry *pEntry = pBox->GetCurEntry(); if (pEntry) { - DicUserData aData( (ULONG) pEntry->GetUserData() ); + DicUserData aData( (sal_uLong) pEntry->GetUserData() ); // always allow to edit (i.e. at least view the content of the dictionary) aLinguDicsEditPB.Enable( true/*aData.IsEditable()*/ ); @@ -1935,7 +1935,7 @@ IMPL_LINK( SvxLinguTabPage, SelectHdl_Impl, SvxCheckListBox *, pBox ) SvLBoxEntry *pEntry = pBox->GetCurEntry(); if (pEntry) { - OptionsUserData aData( (ULONG) pEntry->GetUserData() ); + OptionsUserData aData( (sal_uLong) pEntry->GetUserData() ); aLinguOptionsEditPB.Enable( aData.HasNumericValue() ); } } @@ -1949,7 +1949,7 @@ IMPL_LINK( SvxLinguTabPage, SelectHdl_Impl, SvxCheckListBox *, pBox ) // ----------------------------------------------------------------------- -SvLBoxEntry* SvxLinguTabPage::CreateEntry( String& rTxt, USHORT nCol ) +SvLBoxEntry* SvxLinguTabPage::CreateEntry( String& rTxt, sal_uInt16 nCol ) { SvLBoxEntry* pEntry = new SvLBoxEntry; @@ -2030,7 +2030,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData) ModalDialog( pParent, CUI_RES(RID_SVXDLG_EDIT_MODULES ) ), aModulesFL ( this, CUI_RES( FL_EDIT_MODULES_OPTIONS ) ), aLanguageFT ( this, CUI_RES( FT_EDIT_MODULES_LANGUAGE ) ), - aLanguageLB ( this, CUI_RES( LB_EDIT_MODULES_LANGUAGE ), FALSE ), + aLanguageLB ( this, CUI_RES( LB_EDIT_MODULES_LANGUAGE ), sal_False ), aModulesCLB ( this, CUI_RES( CLB_EDIT_MODULES_MODULES ) ), aPrioUpPB ( this, CUI_RES( PB_EDIT_MODULES_PRIO_UP ) ), aPrioDownPB ( this, CUI_RES( PB_EDIT_MODULES_PRIO_DOWN ) ), @@ -2061,8 +2061,8 @@ SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData) aPrioDownPB.SetClickHdl( LINK( this, SvxEditModulesDlg, UpDownHdl_Impl )); aBackPB .SetClickHdl( LINK( this, SvxEditModulesDlg, BackHdl_Impl )); // in case of not installed language modules - aPrioUpPB .Enable( FALSE ); - aPrioDownPB.Enable( FALSE ); + aPrioUpPB .Enable( sal_False ); + aPrioDownPB.Enable( sal_False ); if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode() != SvtExtendedSecurityOptions::OPEN_NEVER ) @@ -2083,7 +2083,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData) // //fill language box // - Sequence< INT16 > aAvailLang; + Sequence< sal_Int16 > aAvailLang; uno::Reference< XAvailableLocales > xAvail( rLinguData.GetManager(), UNO_QUERY ); if (xAvail.is()) { @@ -2095,7 +2095,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData) aLanguageLB.Clear(); for(long i = 0; i < rLoc.getLength(); i++) { - INT16 nLang = SvxLocaleToLanguage( pLocales[i] ); + sal_Int16 nLang = SvxLocaleToLanguage( pLocales[i] ); aLanguageLB.InsertLanguage( nLang, lcl_SeqHasLang( aAvailLang, nLang ) ); } LanguageType eSysLang = MsLangId::getSystemLanguage(); @@ -2114,7 +2114,7 @@ SvxEditModulesDlg::~SvxEditModulesDlg() } -SvLBoxEntry* SvxEditModulesDlg::CreateEntry( String& rTxt, USHORT nCol ) +SvLBoxEntry* SvxEditModulesDlg::CreateEntry( String& rTxt, sal_uInt16 nCol ) { SvLBoxEntry* pEntry = new SvLBoxEntry; if( !pCheckButtonData ) @@ -2149,7 +2149,7 @@ IMPL_LINK( SvxEditModulesDlg, SelectHdl_Impl, SvxCheckListBox *, pBox ) ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData(); if(!pData->IsParent() && pData->GetType() != TYPE_HYPH) { - USHORT nCurPos = pBox->GetSelectEntryPos(); + sal_uInt16 nCurPos = pBox->GetSelectEntryPos(); if(nCurPos < pBox->GetEntryCount() - 1) { bDisableDown = ((ModuleUserData_Impl*)pBox-> @@ -2197,7 +2197,7 @@ IMPL_LINK( SvxEditModulesDlg, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox ) pData->GetType() == TYPE_HYPH && pEntry != pCurEntry) { - lcl_SetCheckButton( pEntry, FALSE ); + lcl_SetCheckButton( pEntry, sal_False ); pBox->InvalidateEntry( pEntry ); } pEntry = pBox->Next( pEntry ); @@ -2210,7 +2210,7 @@ IMPL_LINK( SvxEditModulesDlg, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox ) /* -----------------------------27.11.00 14:00-------------------------------- ---------------------------------------------------------------------------*/ -OUString lcl_GetServiceName(BYTE nType) +OUString lcl_GetServiceName(sal_uInt8 nType) { switch(nType) { @@ -2237,12 +2237,12 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // save old probably changed settings // before switching to new language entries - INT16 nLang = SvxLocaleToLanguage( aLastLocale ); + sal_Int16 nLang = SvxLocaleToLanguage( aLastLocale ); sal_Int32 nStart = 0, nLocalIndex = 0; Sequence< OUString > aChange; - sal_Bool bChanged = FALSE; - for(USHORT i = 0; i < aModulesCLB.GetEntryCount(); i++) + sal_Bool bChanged = sal_False; + for(sal_uInt16 i = 0; i < aModulesCLB.GetEntryCount(); i++) { SvLBoxEntry *pEntry = aModulesCLB.GetEntry(i); ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData(); @@ -2251,7 +2251,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) if(bChanged) { LangImplNameTable *pTable = 0; - BYTE nType = pData->GetType(); + sal_uInt8 nType = pData->GetType(); switch (nType - 1) { case TYPE_SPELL : pTable = &rLinguData.GetSpellTable(); break; @@ -2267,7 +2267,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } nLocalIndex = nStart = 0; aChange.realloc(aModulesCLB.GetEntryCount()); - bChanged = FALSE; + bChanged = sal_False; } else { @@ -2287,7 +2287,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } } - for(ULONG i = 0; i < aModulesCLB.GetEntryCount(); i++) + for(sal_uLong i = 0; i < aModulesCLB.GetEntryCount(); i++) delete (ModuleUserData_Impl*)aModulesCLB.GetEntry(i)->GetUserData(); // @@ -2298,7 +2298,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) { // sal_Int32 nEntryPos = 1; - ULONG n; + sal_uLong n; ServiceInfo_Impl* pInfo; // @@ -2306,18 +2306,18 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // SvLBoxEntry* pEntry = CreateEntry( sSpell, CBCOL_SECOND ); ModuleUserData_Impl* pUserData = new ModuleUserData_Impl( - String(), TRUE, FALSE, TYPE_SPELL, 0 ); + String(), sal_True, sal_False, TYPE_SPELL, 0 ); pEntry->SetUserData( (void *)pUserData ); pModel->Insert( pEntry ); // Sequence< OUString > aNames( rLinguData.GetSortedImplNames( eCurLanguage, TYPE_SPELL ) ); const OUString *pName = aNames.getConstArray(); - ULONG nNames = (ULONG) aNames.getLength(); + sal_uLong nNames = (sal_uLong) aNames.getLength(); sal_Int32 nLocalIndex = 0; // index relative to parent for (n = 0; n < nNames; ++n) { OUString aImplName; - BOOL bIsSuppLang = FALSE; + sal_Bool bIsSuppLang = sal_False; pInfo = rLinguData.GetInfoByImplName( pName[n] ); if (pInfo) @@ -2339,8 +2339,8 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } const bool bCheck = bHasLang && lcl_SeqGetEntryPos( rTable[ eCurLanguage ], aImplName ) >= 0; lcl_SetCheckButton( pNewEntry, bCheck ); - pUserData = new ModuleUserData_Impl( aImplName, FALSE, - bCheck, TYPE_SPELL, (BYTE)nLocalIndex++ ); + pUserData = new ModuleUserData_Impl( aImplName, sal_False, + bCheck, TYPE_SPELL, (sal_uInt8)nLocalIndex++ ); pNewEntry->SetUserData( (void *)pUserData ); pModel->Insert( pNewEntry ); } @@ -2350,18 +2350,18 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // grammar checker entries // pEntry = CreateEntry( sGrammar, CBCOL_SECOND ); - pUserData = new ModuleUserData_Impl( String(), TRUE, FALSE, TYPE_GRAMMAR, 0 ); + pUserData = new ModuleUserData_Impl( String(), sal_True, sal_False, TYPE_GRAMMAR, 0 ); pEntry->SetUserData( (void *)pUserData ); pModel->Insert( pEntry ); // aNames = rLinguData.GetSortedImplNames( eCurLanguage, TYPE_GRAMMAR ); pName = aNames.getConstArray(); - nNames = (ULONG) aNames.getLength(); + nNames = (sal_uLong) aNames.getLength(); nLocalIndex = 0; for (n = 0; n < nNames; ++n) { OUString aImplName; - BOOL bIsSuppLang = FALSE; + sal_Bool bIsSuppLang = sal_False; pInfo = rLinguData.GetInfoByImplName( pName[n] ); if (pInfo) @@ -2383,8 +2383,8 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } const bool bCheck = bHasLang && lcl_SeqGetEntryPos( rTable[ eCurLanguage ], aImplName ) >= 0; lcl_SetCheckButton( pNewEntry, bCheck ); - pUserData = new ModuleUserData_Impl( aImplName, FALSE, - bCheck, TYPE_GRAMMAR, (BYTE)nLocalIndex++ ); + pUserData = new ModuleUserData_Impl( aImplName, sal_False, + bCheck, TYPE_GRAMMAR, (sal_uInt8)nLocalIndex++ ); pNewEntry->SetUserData( (void *)pUserData ); pModel->Insert( pNewEntry ); } @@ -2394,18 +2394,18 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // hyphenator entries // pEntry = CreateEntry( sHyph, CBCOL_SECOND ); - pUserData = new ModuleUserData_Impl( String(), TRUE, FALSE, TYPE_HYPH, 0 ); + pUserData = new ModuleUserData_Impl( String(), sal_True, sal_False, TYPE_HYPH, 0 ); pEntry->SetUserData( (void *)pUserData ); pModel->Insert( pEntry ); // aNames = rLinguData.GetSortedImplNames( eCurLanguage, TYPE_HYPH ); pName = aNames.getConstArray(); - nNames = (ULONG) aNames.getLength(); + nNames = (sal_uLong) aNames.getLength(); nLocalIndex = 0; for (n = 0; n < nNames; ++n) { OUString aImplName; - BOOL bIsSuppLang = FALSE; + sal_Bool bIsSuppLang = sal_False; pInfo = rLinguData.GetInfoByImplName( pName[n] ); if (pInfo) @@ -2427,8 +2427,8 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } const bool bCheck = bHasLang && lcl_SeqGetEntryPos( rTable[ eCurLanguage ], aImplName ) >= 0; lcl_SetCheckButton( pNewEntry, bCheck ); - pUserData = new ModuleUserData_Impl( aImplName, FALSE, - bCheck, TYPE_HYPH, (BYTE)nLocalIndex++ ); + pUserData = new ModuleUserData_Impl( aImplName, sal_False, + bCheck, TYPE_HYPH, (sal_uInt8)nLocalIndex++ ); pNewEntry->SetUserData( (void *)pUserData ); pModel->Insert( pNewEntry ); } @@ -2438,18 +2438,18 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // thesaurus entries // pEntry = CreateEntry( sThes, CBCOL_SECOND ); - pUserData = new ModuleUserData_Impl( String(), TRUE, FALSE, TYPE_THES, 0 ); + pUserData = new ModuleUserData_Impl( String(), sal_True, sal_False, TYPE_THES, 0 ); pEntry->SetUserData( (void *)pUserData ); pModel->Insert( pEntry ); // aNames = rLinguData.GetSortedImplNames( eCurLanguage, TYPE_THES ); pName = aNames.getConstArray(); - nNames = (ULONG) aNames.getLength(); + nNames = (sal_uLong) aNames.getLength(); nLocalIndex = 0; for (n = 0; n < nNames; ++n) { OUString aImplName; - BOOL bIsSuppLang = FALSE; + sal_Bool bIsSuppLang = sal_False; pInfo = rLinguData.GetInfoByImplName( pName[n] ); if (pInfo) @@ -2471,8 +2471,8 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } const bool bCheck = bHasLang && lcl_SeqGetEntryPos( rTable[ eCurLanguage ], aImplName ) >= 0; lcl_SetCheckButton( pNewEntry, bCheck ); - pUserData = new ModuleUserData_Impl( aImplName, FALSE, - bCheck, TYPE_THES, (BYTE)nLocalIndex++ ); + pUserData = new ModuleUserData_Impl( aImplName, sal_False, + bCheck, TYPE_THES, (sal_uInt8)nLocalIndex++ ); pNewEntry->SetUserData( (void *)pUserData ); pModel->Insert( pNewEntry ); } @@ -2488,28 +2488,28 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) IMPL_LINK( SvxEditModulesDlg, UpDownHdl_Impl, PushButton *, pBtn ) { sal_Bool bUp = &aPrioUpPB == pBtn; - USHORT nCurPos = aModulesCLB.GetSelectEntryPos(); + sal_uInt16 nCurPos = aModulesCLB.GetSelectEntryPos(); SvLBoxEntry* pEntry; if (nCurPos != LISTBOX_ENTRY_NOTFOUND && 0 != (pEntry = aModulesCLB.GetEntry(nCurPos))) { - aModulesCLB.SetUpdateMode(FALSE); + aModulesCLB.SetUpdateMode(sal_False); SvLBoxTreeList *pModel = aModulesCLB.GetModel(); ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData(); String aStr(aModulesCLB.GetEntryText(pEntry)); SvLBoxEntry* pToInsert = CreateEntry( aStr, CBCOL_FIRST ); pToInsert->SetUserData( (void *)pData); - BOOL bIsChecked = aModulesCLB.IsChecked(nCurPos); + sal_Bool bIsChecked = aModulesCLB.IsChecked(nCurPos); pModel->Remove(pEntry); - USHORT nDestPos = bUp ? nCurPos - 1 : nCurPos + 1; + sal_uInt16 nDestPos = bUp ? nCurPos - 1 : nCurPos + 1; pModel->Insert(pToInsert, nDestPos); aModulesCLB.CheckEntryPos(nDestPos, bIsChecked ); aModulesCLB.SelectEntryPos(nDestPos ); SelectHdl_Impl(&aModulesCLB); - aModulesCLB.SetUpdateMode(TRUE); + aModulesCLB.SetUpdateMode(sal_True); } return 0; } diff --git a/cui/source/options/optlingu.src b/cui/source/options/optlingu.src index ace1f8e193bf..12192ad8ac4b 100644..100755 --- a/cui/source/options/optlingu.src +++ b/cui/source/options/optlingu.src @@ -354,11 +354,4 @@ QueryBox RID_SFXQB_DELDICT DefButton = WB_DEF_NO ; Message [ en-US ] = "Do you want to delete the dictionary?" ; }; - // RID_SFXQB_DEL_IGNORELIST ---------------------------------------------- -QueryBox RID_SFXQB_DEL_IGNORELIST -{ - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Do you want to delete the ignore list?" ; -}; // ******************************************************************* EOF diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx index 42eed3b3daba..65e340b1fda6 100644 --- a/cui/source/options/optmemory.cxx +++ b/cui/source/options/optmemory.cxx @@ -179,15 +179,15 @@ SfxTabPage* OfaMemoryOptionsPage::Create( Window* pParent, const SfxItemSet& rAt // ----------------------------------------------------------------------- -BOOL OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvtCacheOptions aCacheOptions; // Undo-Schritte if ( aUndoEdit.GetText() != aUndoEdit.GetSavedValue() ) - SvtUndoOptions().SetUndoCount((UINT16)aUndoEdit.GetValue()); + SvtUndoOptions().SetUndoCount((sal_uInt16)aUndoEdit.GetValue()); // GraphicCache aCacheOptions.SetGraphicManagerTotalCacheSize( GetNfGraphicCacheVal() ); @@ -201,7 +201,7 @@ BOOL OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet ) GraphicManager& rGrfMgr = aDummyObject.GetGraphicManager(); rGrfMgr.SetMaxCacheSize( aCacheOptions.GetGraphicManagerTotalCacheSize() ); - rGrfMgr.SetMaxObjCacheSize( aCacheOptions.GetGraphicManagerObjectCacheSize(), TRUE ); + rGrfMgr.SetMaxObjCacheSize( aCacheOptions.GetGraphicManagerObjectCacheSize(), sal_True ); rGrfMgr.SetCacheTimeout( aCacheOptions.GetGraphicManagerObjectReleaseTime() ); // OLECache @@ -211,7 +211,7 @@ BOOL OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet ) if( aQuickLaunchCB.IsChecked() != aQuickLaunchCB.GetSavedValue()) { rSet.Put(SfxBoolItem(SID_ATTR_QUICKLAUNCHER, aQuickLaunchCB.IsChecked())); - bModified = TRUE; + bModified = sal_True; } return bModified; @@ -234,7 +234,7 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet& rSet ) SetNfGraphicObjectCacheVal( Min( static_cast<sal_Int32>(GetNfGraphicCacheVal()), aCacheOptions.GetGraphicManagerObjectCacheSize() ) ); sal_Int32 nTime = aCacheOptions.GetGraphicManagerObjectReleaseTime(); - Time aTime( (USHORT)( nTime / 3600 ), (USHORT)( ( nTime % 3600 ) / 60 ), (USHORT)( ( nTime % 3600 ) % 60 ) ); + Time aTime( (sal_uInt16)( nTime / 3600 ), (sal_uInt16)( ( nTime % 3600 ) / 60 ), (sal_uInt16)( ( nTime % 3600 ) % 60 ) ); aTfGraphicObjectTime.SetTime( aTime ); GraphicCacheConfigHdl( &aNfGraphicCache ); @@ -242,7 +242,7 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet& rSet ) // OLECache aNfOLECache.SetValue( Max( aCacheOptions.GetWriterOLE_Objects(), aCacheOptions.GetDrawingEngineOLE_Objects() ) ); - SfxItemState eState = rSet.GetItemState( SID_ATTR_QUICKLAUNCHER, FALSE, &pItem ); + SfxItemState eState = rSet.GetItemState( SID_ATTR_QUICKLAUNCHER, sal_False, &pItem ); if ( SFX_ITEM_SET == eState ) aQuickLaunchCB.Check( ( (SfxBoolItem*)pItem )->GetValue() ); else if ( SFX_ITEM_DISABLED == eState ) diff --git a/cui/source/options/optmemory.hxx b/cui/source/options/optmemory.hxx index 83690c9c8c3f..d93c2fa98042 100644 --- a/cui/source/options/optmemory.hxx +++ b/cui/source/options/optmemory.hxx @@ -81,7 +81,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 3a7bb6328bdf..bc2bd9ef55b4 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -106,18 +106,18 @@ struct OptPath_Impl struct PathUserData_Impl { - USHORT nRealId; + sal_uInt16 nRealId; SfxItemState eState; String sUserPath; String sWritablePath; - PathUserData_Impl( USHORT nId ) : + PathUserData_Impl( sal_uInt16 nId ) : nRealId( nId ), eState( SFX_ITEM_UNKNOWN ) {} }; struct Handle2CfgNameMapping_Impl { - USHORT m_nHandle; + sal_uInt16 m_nHandle; const char* m_pCfgName; }; @@ -138,10 +138,10 @@ static Handle2CfgNameMapping_Impl __READONLY_DATA Hdl2CfgMap_Impl[] = { USHRT_MAX, NULL } }; -static String getCfgName_Impl( USHORT _nHandle ) +static String getCfgName_Impl( sal_uInt16 _nHandle ) { String sCfgName; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while ( Hdl2CfgMap_Impl[ nIndex ].m_nHandle != USHRT_MAX ) { if ( Hdl2CfgMap_Impl[ nIndex ].m_nHandle == _nHandle ) @@ -161,9 +161,9 @@ static String getCfgName_Impl( USHORT _nHandle ) String Convert_Impl( const String& rValue ) { char cDelim = MULTIPATH_DELIMITER; - USHORT nCount = rValue.GetTokenCount( cDelim ); + sal_uInt16 nCount = rValue.GetTokenCount( cDelim ); String aReturn; - for ( USHORT i=0; i<nCount ; ++i ) + for ( sal_uInt16 i=0; i<nCount ; ++i ) { String aValue = rValue.GetToken( i, cDelim ); INetURLObject aObj( aValue ); @@ -191,7 +191,7 @@ long SvxControlFocusHelper::Notify( NotifyEvent& rNEvt ) // functions ------------------------------------------------------------- -BOOL IsMultiPath_Impl( const USHORT nIndex ) +sal_Bool IsMultiPath_Impl( const sal_uInt16 nIndex ) { #if OSL_DEBUG_LEVEL > 1 return ( SvtPathOptions::PATH_AUTOCORRECT == nIndex || @@ -279,7 +279,7 @@ SvxPathTabPage::~SvxPathTabPage() aPathCtrl.SetFocusControl( NULL ); pHeaderBar->Hide(); - for ( USHORT i = 0; i < pPathBox->GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i ) delete (PathUserData_Impl*)pPathBox->GetEntry(i)->GetUserData(); delete pPathBox; delete pHeaderBar; @@ -296,17 +296,17 @@ SfxTabPage* SvxPathTabPage::Create( Window* pParent, // ----------------------------------------------------------------------- -BOOL SvxPathTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxPathTabPage::FillItemSet( SfxItemSet& ) { SvtPathOptions aPathOpt; - for ( USHORT i = 0; i < pPathBox->GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i ) { PathUserData_Impl* pPathImpl = (PathUserData_Impl*)pPathBox->GetEntry(i)->GetUserData(); - USHORT nRealId = pPathImpl->nRealId; + sal_uInt16 nRealId = pPathImpl->nRealId; if ( pPathImpl->eState == SFX_ITEM_SET ) SetPathList( nRealId, pPathImpl->sUserPath, pPathImpl->sWritablePath ); } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -316,7 +316,7 @@ void SvxPathTabPage::Reset( const SfxItemSet& ) pPathBox->Clear(); SvtPathOptions aPathOpt; //! deprecated - for( USHORT i = 0; i <= (USHORT)SvtPathOptions::PATH_WORK; ++i ) + for( sal_uInt16 i = 0; i <= (sal_uInt16)SvtPathOptions::PATH_WORK; ++i ) { // only writer uses autotext if ( i == SvtPathOptions::PATH_AUTOTEXT @@ -370,7 +370,7 @@ void SvxPathTabPage::Reset( const SfxItemSet& ) pHeaderBar->SetItemSize( ITEMID_TYPE, aUserData.GetToken(0).ToInt32() ); HeaderEndDrag_Impl( NULL ); // Sortierrichtung restaurieren - BOOL bUp = (BOOL)(USHORT)aUserData.GetToken(1).ToInt32(); + sal_Bool bUp = (sal_Bool)(sal_uInt16)aUserData.GetToken(1).ToInt32(); HeaderBarItemBits nBits = pHeaderBar->GetItemBits(ITEMID_TYPE); if ( bUp ) @@ -396,7 +396,7 @@ void SvxPathTabPage::FillUserData() String aUserData = String::CreateFromInt32( pHeaderBar->GetItemSize( ITEMID_TYPE ) ); aUserData += ';'; HeaderBarItemBits nBits = pHeaderBar->GetItemBits( ITEMID_TYPE ); - BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); + sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); aUserData += bUp ? '1' : '0'; SetUserData( aUserData ); } @@ -410,14 +410,14 @@ IMPL_LINK( SvxPathTabPage, PathSelect_Impl, svx::OptHeaderTabListBox *, EMPTYARG */ { - USHORT nSelCount = 0; + sal_uInt16 nSelCount = 0; SvLBoxEntry* pEntry = pPathBox->FirstSelected(); //the entry image indicates whether the path is write protected Image aEntryImage; if(pEntry) aEntryImage = pPathBox->GetCollapsedEntryBmp( pEntry ); - BOOL bEnable = !aEntryImage; + sal_Bool bEnable = !aEntryImage; while ( pEntry && ( nSelCount < 2 ) ) { nSelCount++; @@ -445,14 +445,14 @@ IMPL_LINK( SvxPathTabPage, StandardHdl_Impl, PushButton *, EMPTYARG ) sal_Bool bReadOnly = sal_False; GetPathList( pPathImpl->nRealId, sInternal, sUser, sWritable, bReadOnly ); - USHORT i; - USHORT nOldCount = aOldPath.GetTokenCount( MULTIPATH_DELIMITER ); - USHORT nIntCount = sInternal.GetTokenCount( MULTIPATH_DELIMITER ); + sal_uInt16 i; + sal_uInt16 nOldCount = aOldPath.GetTokenCount( MULTIPATH_DELIMITER ); + sal_uInt16 nIntCount = sInternal.GetTokenCount( MULTIPATH_DELIMITER ); for ( i = 0; i < nOldCount; ++i ) { bool bFound = false; String sOnePath = aOldPath.GetToken( i, MULTIPATH_DELIMITER ); - for ( USHORT j = 0; !bFound && j < nIntCount; ++j ) + for ( sal_uInt16 j = 0; !bFound && j < nIntCount; ++j ) { if ( sInternal.GetToken( i, MULTIPATH_DELIMITER ) == sOnePath ) bFound = true; @@ -502,7 +502,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder ) GetPathList( pPathImpl->nRealId, sInternal, sUser, sWritable, bReadOnly ); sUser = pPathImpl->sUserPath; sWritable = pPathImpl->sWritablePath; - USHORT nPos = pPathImpl->nRealId; + sal_uInt16 nPos = pPathImpl->nRealId; // old path is an URL? INetURLObject aObj( sWritable ); @@ -525,7 +525,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder ) if ( bChanged ) { pPathBox->SetEntryText( Convert_Impl( sNewPathStr ), pEntry, 1 ); - nPos = (USHORT)pPathBox->GetModel()->GetAbsPos( pEntry ); + nPos = (sal_uInt16)pPathBox->GetModel()->GetAbsPos( pEntry ); pPathImpl = (PathUserData_Impl*)pPathBox->GetEntry(nPos)->GetUserData(); pPathImpl->eState = SFX_ITEM_SET; pPathImpl->sWritablePath = sNewPathStr; @@ -557,7 +557,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder ) IMPL_LINK( SvxPathTabPage, PathHdl_Impl, PushButton *, EMPTYARG ) { SvLBoxEntry* pEntry = pPathBox->GetCurEntry(); - USHORT nPos = ( pEntry != NULL ) ? ( (PathUserData_Impl*)pEntry->GetUserData() )->nRealId : 0; + sal_uInt16 nPos = ( pEntry != NULL ) ? ( (PathUserData_Impl*)pEntry->GetUserData() )->nRealId : 0; String sInternal, sUser, sWritable; if ( pEntry ) { @@ -599,10 +599,10 @@ IMPL_LINK( SvxPathTabPage, PathHdl_Impl, PushButton *, EMPTYARG ) String sFullPath; String sNewPath = pMultiDlg->GetPath(); char cDelim = MULTIPATH_DELIMITER; - USHORT nCount = sNewPath.GetTokenCount( cDelim ); + sal_uInt16 nCount = sNewPath.GetTokenCount( cDelim ); if ( nCount > 0 ) { - USHORT i = 0; + sal_uInt16 i = 0; for ( ; i < nCount - 1; ++i ) { if ( sUser.Len() > 0 ) @@ -669,7 +669,7 @@ IMPL_LINK( SvxPathTabPage, HeaderSelect_Impl, HeaderBar*, pBar ) return 0; HeaderBarItemBits nBits = pHeaderBar->GetItemBits(ITEMID_TYPE); - BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); + sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); SvSortMode eMode = SortAscending; if ( bUp ) @@ -700,7 +700,7 @@ IMPL_LINK( SvxPathTabPage, HeaderEndDrag_Impl, HeaderBar*, pBar ) if ( !pHeaderBar->IsItemMode() ) { Size aSz; - USHORT nTabs = pHeaderBar->GetItemCount(); + sal_uInt16 nTabs = pHeaderBar->GetItemCount(); long nTmpSz = 0; long nWidth = pHeaderBar->GetItemSize(ITEMID_TYPE); long nBarWidth = pHeaderBar->GetSizePixel().Width(); @@ -710,7 +710,7 @@ IMPL_LINK( SvxPathTabPage, HeaderEndDrag_Impl, HeaderBar*, pBar ) else if ( ( nBarWidth - nWidth ) < TAB_WIDTH_MIN ) pHeaderBar->SetItemSize( ITEMID_TYPE, nBarWidth - TAB_WIDTH_MIN ); - for ( USHORT i = 1; i <= nTabs; ++i ) + for ( sal_uInt16 i = 1; i <= nTabs; ++i ) { long _nWidth = pHeaderBar->GetItemSize(i); aSz.Width() = _nWidth + nTmpSz; @@ -738,7 +738,7 @@ IMPL_LINK( SvxPathTabPage, DialogClosedHdl, DialogClosedEvent*, pEvt ) // ----------------------------------------------------------------------- void SvxPathTabPage::GetPathList( - USHORT _nPathHandle, String& _rInternalPath, + sal_uInt16 _nPathHandle, String& _rInternalPath, String& _rUserPath, String& _rWritablePath, sal_Bool& _rReadOnly ) { String sCfgName = getCfgName_Impl( _nPathHandle ); @@ -814,7 +814,7 @@ void SvxPathTabPage::GetPathList( // ----------------------------------------------------------------------- void SvxPathTabPage::SetPathList( - USHORT _nPathHandle, const String& _rUserPath, const String& _rWritablePath ) + sal_uInt16 _nPathHandle, const String& _rUserPath, const String& _rWritablePath ) { String sCfgName = getCfgName_Impl( _nPathHandle ); @@ -833,10 +833,10 @@ void SvxPathTabPage::SetPathList( { // save user paths char cDelim = MULTIPATH_DELIMITER; - USHORT nCount = _rUserPath.GetTokenCount( cDelim ); + sal_uInt16 nCount = _rUserPath.GetTokenCount( cDelim ); Sequence< ::rtl::OUString > aPathSeq( nCount ); ::rtl::OUString* pArray = aPathSeq.getArray(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) pArray[i] = ::rtl::OUString( _rUserPath.GetToken( i, cDelim ) ); String sProp( sCfgName ); sProp += POSTFIX_USER; diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index d9849050247e..c8282edf0157 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -75,8 +75,8 @@ using rtl::OUString; #define C2S(cChar) String( RTL_CONSTASCII_STRINGPARAM(cChar) ) #define CFG_PAGE_AND_GROUP C2S("General"), C2S("LoadSave") // !! you have to update these index, if you changed the list of the child windows !! -#define WININDEX_AUTOSAVE ((USHORT)6) -#define WININDEX_SAVEURL_RELFSYS ((USHORT)9) +#define WININDEX_AUTOSAVE ((sal_uInt16)6) +#define WININDEX_SAVEURL_RELFSYS ((sal_uInt16)9) // ---------------------------------------------------------------------- #ifdef FILTER_WARNING_ENABLED @@ -294,7 +294,7 @@ SfxTabPage* SfxSaveTabPage::Create( Window* pParent, } // ----------------------------------------------------------------------- -bool SfxSaveTabPage::AcceptFilter( USHORT nPos ) +bool SfxSaveTabPage::AcceptFilter( sal_uInt16 nPos ) { const OUString* pFilters = pImpl->aFilterArr[nPos].getConstArray(); sal_Bool bAlien = sal_False, bODF = sal_False; @@ -318,7 +318,7 @@ void SfxSaveTabPage::DetectHiddenControls() { long nDelta = 0; // the index of the first child window which perhaps have to move upwards - USHORT nWinIndex = WININDEX_SAVEURL_RELFSYS; + sal_uInt16 nWinIndex = WININDEX_SAVEURL_RELFSYS; SvtOptionsDialogOptions aOptionsDlgOpt; if ( aOptionsDlgOpt.IsOptionHidden( C2S("Backup"), CFG_PAGE_AND_GROUP ) ) @@ -345,7 +345,7 @@ void SfxSaveTabPage::DetectHiddenControls() if ( nDelta > 0 ) { - USHORT i, nChildCount = GetChildCount(); + sal_uInt16 i, nChildCount = GetChildCount(); for ( i = nWinIndex; i < nChildCount; ++i ) { Window* pWin = GetChild(i); @@ -356,9 +356,9 @@ void SfxSaveTabPage::DetectHiddenControls() } } // ----------------------------------------------------------------------- -BOOL SfxSaveTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SfxSaveTabPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvtSaveOptions aSaveOpt; if(aLoadUserSettingsCB.IsChecked() != aLoadUserSettingsCB.GetSavedValue()) { @@ -378,54 +378,54 @@ BOOL SfxSaveTabPage::FillItemSet( SfxItemSet& rSet ) { rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_DOCINFO ), aDocInfoCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } if ( aBackupCB.IsEnabled() && aBackupCB.IsChecked() != aBackupCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_BACKUP ), aBackupCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } if ( aSizeOptimizationCB.IsChecked() != aSizeOptimizationCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_PRETTYPRINTING ), !aSizeOptimizationCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } if ( aAutoSaveCB.IsChecked() != aAutoSaveCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_AUTOSAVE ), aAutoSaveCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } if ( aWarnAlienFormatCB.IsChecked() != aWarnAlienFormatCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_WARNALIENFORMAT ), aWarnAlienFormatCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } if ( aAutoSaveEdit.GetText() != aAutoSaveEdit.GetSavedValue() ) { rSet.Put( SfxUInt16Item( GetWhich( SID_ATTR_AUTOSAVEMINUTE ), - (UINT16)aAutoSaveEdit.GetValue() ) ); - bModified |= TRUE; + (sal_uInt16)aAutoSaveEdit.GetValue() ) ); + bModified |= sal_True; } // relativ speichern if ( aRelativeFsysCB.IsChecked() != aRelativeFsysCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_SAVEREL_FSYS ), aRelativeFsysCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } if ( aRelativeInetCB.IsChecked() != aRelativeInetCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_SAVEREL_INET ), aRelativeInetCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } SvtModuleOptions aModuleOpt; @@ -523,7 +523,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet& ) Reference< XContainerQuery > xQuery(pImpl->xFact, UNO_QUERY); if(xQuery.is()) { - for(USHORT n = 0; n < aDocTypeLB.GetEntryCount(); n++) + for(sal_uInt16 n = 0; n < aDocTypeLB.GetEntryCount(); n++) { long nData = (long) aDocTypeLB.GetEntryData(n); OUString sCommand; @@ -591,7 +591,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet& ) // aDocInfoCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_DOCINFSAVE)); aBackupCB.Check(aSaveOpt.IsBackup()); - BOOL bBackupRO = aSaveOpt.IsReadOnly(SvtSaveOptions::E_BACKUP); + sal_Bool bBackupRO = aSaveOpt.IsReadOnly(SvtSaveOptions::E_BACKUP); aBackupCB.Enable(!bBackupRO); aBackupFI.Show(bBackupRO); @@ -690,7 +690,7 @@ OUString lcl_ExtracUIName(const Sequence<PropertyValue> rProperties) ---------------------------------------------------------------------------*/ IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox ) { - USHORT nCurPos = aDocTypeLB.GetSelectEntryPos(); + sal_uInt16 nCurPos = aDocTypeLB.GetSelectEntryPos(); long nData = -1; if(nCurPos < APP_COUNT) @@ -718,7 +718,7 @@ IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox ) OUString sSelect; for(int i = 0; i < pImpl->aUIFilterArr[nData].getLength(); i++) { - USHORT nEntryPos = aSaveAsLB.InsertEntry(pUIFilters[i]); + sal_uInt16 nEntryPos = aSaveAsLB.InsertEntry(pUIFilters[i]); if ( pImpl->aODFArr[nData][i] ) aSaveAsLB.SetEntryData( nEntryPos, (void*)pImpl ); if(pFilters[i] == pImpl->aDefaultArr[nData]) @@ -757,7 +757,7 @@ IMPL_LINK( SfxSaveTabPage, ODFVersionHdl_Impl, ListBox *, EMPTYARG ) if ( bShown ) { bool bHasODFFormat = false; - USHORT i = 0, nCount = aSaveAsLB.GetEntryCount(); + sal_uInt16 i = 0, nCount = aSaveAsLB.GetEntryCount(); for ( ; i < nCount; ++ i ) { if ( aSaveAsLB.GetEntryData(i) != NULL ) diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx index 3713117aebad..94f246ac0102 100644 --- a/cui/source/options/optsave.hxx +++ b/cui/source/options/optsave.hxx @@ -87,7 +87,7 @@ private: DECL_LINK( FilterHdl_Impl, ListBox * ); DECL_LINK( ODFVersionHdl_Impl, ListBox * ); - bool AcceptFilter( USHORT nPos ); + bool AcceptFilter( sal_uInt16 nPos ); void DetectHiddenControls(); #endif @@ -97,7 +97,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index 304e0763b83e..064199a5d929 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -187,48 +187,48 @@ SvxOnlineUpdateTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet ) // ----------------------------------------------------------------------- -BOOL SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; sal_Bool bValue; sal_Int64 nValue; if( m_aAutoCheckCheckBox.GetSavedValue() != m_aAutoCheckCheckBox.IsChecked() ) { - bValue = (TRUE == m_aAutoCheckCheckBox.IsChecked()); + bValue = (sal_True == m_aAutoCheckCheckBox.IsChecked()); m_xUpdateAccess->replaceByName( UNISTRING("AutoCheckEnabled"), uno::makeAny( bValue ) ); - bModified = TRUE; + bModified = sal_True; } nValue = 0; - if( TRUE == m_aEveryDayButton.IsChecked() ) + if( sal_True == m_aEveryDayButton.IsChecked() ) { - if( FALSE == m_aEveryDayButton.GetSavedValue() ) + if( sal_False == m_aEveryDayButton.GetSavedValue() ) nValue = 86400; } - else if( TRUE == m_aEveryWeekButton.IsChecked() ) + else if( sal_True == m_aEveryWeekButton.IsChecked() ) { - if( FALSE == m_aEveryWeekButton.GetSavedValue() ) + if( sal_False == m_aEveryWeekButton.GetSavedValue() ) nValue = 604800; } - else if( TRUE == m_aEveryMonthButton.IsChecked() ) + else if( sal_True == m_aEveryMonthButton.IsChecked() ) { - if( FALSE == m_aEveryMonthButton.GetSavedValue() ) + if( sal_False == m_aEveryMonthButton.GetSavedValue() ) nValue = 2592000; } if( nValue > 0 ) { m_xUpdateAccess->replaceByName( UNISTRING("CheckInterval"), uno::makeAny( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( m_aAutoDownloadCheckBox.GetSavedValue() != m_aAutoDownloadCheckBox.IsChecked() ) { - bValue = (TRUE == m_aAutoDownloadCheckBox.IsChecked()); + bValue = (sal_True == m_aAutoDownloadCheckBox.IsChecked()); m_xUpdateAccess->replaceByName( UNISTRING("AutoDownloadEnabled"), uno::makeAny( bValue ) ); - bModified = TRUE; + bModified = sal_True; } rtl::OUString sValue, aURL; @@ -238,7 +238,7 @@ BOOL SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet& ) ( ! aURL.equals( sValue ) ) ) { m_xUpdateAccess->replaceByName( UNISTRING("DownloadDestination"), uno::makeAny( aURL ) ); - bModified = TRUE; + bModified = sal_True; } uno::Reference< util::XChangesBatch > xChangesBatch(m_xUpdateAccess, uno::UNO_QUERY); @@ -277,9 +277,9 @@ void SvxOnlineUpdateTabPage::Reset( const SfxItemSet& ) m_xUpdateAccess->getByName( UNISTRING("AutoDownloadEnabled") ) >>= bValue; m_aAutoDownloadCheckBox.Check(bValue); - m_aDestPathLabel.Enable(TRUE); - m_aDestPath.Enable(TRUE); - m_aChangePathButton.Enable(TRUE); + m_aDestPathLabel.Enable(sal_True); + m_aDestPath.Enable(sal_True); + m_aChangePathButton.Enable(sal_True); rtl::OUString sValue, aPath; m_xUpdateAccess->getByName( UNISTRING("DownloadDestination") ) >>= sValue; @@ -300,7 +300,7 @@ void SvxOnlineUpdateTabPage::FillUserData() IMPL_LINK( SvxOnlineUpdateTabPage, AutoCheckHdl_Impl, CheckBox *, pBox ) { - BOOL bEnabled = pBox->IsChecked(); + sal_Bool bEnabled = pBox->IsChecked(); m_aEveryDayButton.Enable(bEnabled); m_aEveryWeekButton.Enable(bEnabled); diff --git a/cui/source/options/optupdt.hxx b/cui/source/options/optupdt.hxx index 14e42935667b..ca75c921890f 100644 --- a/cui/source/options/optupdt.hxx +++ b/cui/source/options/optupdt.hxx @@ -71,7 +71,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); }; diff --git a/cui/source/options/radiobtnbox.cxx b/cui/source/options/radiobtnbox.cxx index d6dc500f1965..b7ec9164c3d8 100644 --- a/cui/source/options/radiobtnbox.cxx +++ b/cui/source/options/radiobtnbox.cxx @@ -53,7 +53,7 @@ void SvxRadioButtonListBox::SetTabs() { SvxSimpleTable::SetTabs(); /* - USHORT nAdjust = SV_LBOXTAB_ADJUST_RIGHT | SV_LBOXTAB_ADJUST_LEFT | + sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT | SV_LBOXTAB_ADJUST_LEFT | SV_LBOXTAB_ADJUST_CENTER | SV_LBOXTAB_ADJUST_NUMERIC | SV_LBOXTAB_FORCE; if ( aTabs.Count() > 0 ) { @@ -88,7 +88,7 @@ void SvxRadioButtonListBox::KeyInput( const KeyEvent& rKEvt ) void SvxRadioButtonListBox::HandleEntryChecked( SvLBoxEntry* _pEntry ) { - Select( _pEntry, TRUE ); + Select( _pEntry, sal_True ); SvButtonState eState = GetCheckButtonState( _pEntry ); if ( SV_BUTTON_CHECKED == eState ) diff --git a/cui/source/options/securityoptions.hxx b/cui/source/options/securityoptions.hxx index aa2c189c6764..ac3bfe69e913 100644 --- a/cui/source/options/securityoptions.hxx +++ b/cui/source/options/securityoptions.hxx @@ -74,13 +74,13 @@ namespace svx SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions ); ~SecurityOptionsDialog(); - inline bool IsSaveOrSendDocsChecked() const { return m_aSaveOrSendDocsCB.IsChecked() != FALSE; } - inline bool IsSignDocsChecked() const { return m_aSignDocsCB.IsChecked() != FALSE; } - inline bool IsPrintDocsChecked() const { return m_aPrintDocsCB.IsChecked() != FALSE; } - inline bool IsCreatePdfChecked() const { return m_aCreatePdfCB.IsChecked() != FALSE; } - inline bool IsRemovePersInfoChecked() const { return m_aRemovePersInfoCB.IsChecked() != FALSE; } - inline bool IsRecommPasswdChecked() const { return m_aRecommPasswdCB.IsChecked() != FALSE; } - inline bool IsCtrlHyperlinkChecked() const { return m_aCtrlHyperlinkCB.IsChecked() != FALSE; } + inline bool IsSaveOrSendDocsChecked() const { return m_aSaveOrSendDocsCB.IsChecked() != sal_False; } + inline bool IsSignDocsChecked() const { return m_aSignDocsCB.IsChecked() != sal_False; } + inline bool IsPrintDocsChecked() const { return m_aPrintDocsCB.IsChecked() != sal_False; } + inline bool IsCreatePdfChecked() const { return m_aCreatePdfCB.IsChecked() != sal_False; } + inline bool IsRemovePersInfoChecked() const { return m_aRemovePersInfoCB.IsChecked() != sal_False; } + inline bool IsRecommPasswdChecked() const { return m_aRecommPasswdCB.IsChecked() != sal_False; } + inline bool IsCtrlHyperlinkChecked() const { return m_aCtrlHyperlinkCB.IsChecked() != sal_False; } }; //........................................................................ diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index ee82e89b93b3..49228356ef17 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -184,7 +184,7 @@ struct ModuleToGroupNameMap_Impl { const char* m_pModule; String m_sGroupName; - USHORT m_nNodeId; + sal_uInt16 m_nNodeId; }; static OfaPageResource* pPageRes = NULL; @@ -209,7 +209,7 @@ static ModuleToGroupNameMap_Impl ModuleMap[] = static void setGroupName( const rtl::OUString& rModule, const String& rGroupName ) { - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while ( ModuleMap[ nIndex ].m_pModule ) { rtl::OUString sTemp = @@ -226,7 +226,7 @@ static void setGroupName( const rtl::OUString& rModule, const String& rGroupName static String getGroupName( const rtl::OUString& rModule, bool bForced ) { String sGroupName; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while ( ModuleMap[ nIndex ].m_pModule ) { rtl::OUString sTemp = @@ -264,14 +264,14 @@ static String getGroupName( const rtl::OUString& rModule, bool bForced ) static void deleteGroupNames() { - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while ( ModuleMap[ nIndex ].m_pModule ) ModuleMap[ nIndex++ ].m_sGroupName = String::EmptyString(); } -static USHORT getGroupNodeId( const rtl::OUString& rModule ) +static sal_uInt16 getGroupNodeId( const rtl::OUString& rModule ) { - USHORT nNodeId = 0xFFFF, nIndex = 0; + sal_uInt16 nNodeId = 0xFFFF, nIndex = 0; while ( ModuleMap[ nIndex ].m_pModule ) { rtl::OUString sTemp = @@ -385,7 +385,7 @@ struct OptionsMapping_Impl { const char* m_pGroupName; const char* m_pPageName; - USHORT m_nPageId; + sal_uInt16 m_nPageId; }; static OptionsMapping_Impl __READONLY_DATA OptionsMap_Impl[] = @@ -473,11 +473,11 @@ static OptionsMapping_Impl __READONLY_DATA OptionsMap_Impl[] = { NULL, NULL, 0 } }; -static sal_Bool lcl_getStringFromID( USHORT _nPageId, String& _rGroupName, String& _rPageName ) +static sal_Bool lcl_getStringFromID( sal_uInt16 _nPageId, String& _rGroupName, String& _rPageName ) { sal_Bool bRet = sal_False; - USHORT nIdx = 0; + sal_uInt16 nIdx = 0; while ( OptionsMap_Impl[nIdx].m_pGroupName != NULL ) { if ( _nPageId == OptionsMap_Impl[nIdx].m_nPageId ) @@ -494,7 +494,7 @@ static sal_Bool lcl_getStringFromID( USHORT _nPageId, String& _rGroupName, Strin return bRet; } -static sal_Bool lcl_isOptionHidden( USHORT _nPageId, const SvtOptionsDialogOptions& _rOptOptions ) +static sal_Bool lcl_isOptionHidden( sal_uInt16 _nPageId, const SvtOptionsDialogOptions& _rOptOptions ) { sal_Bool bIsHidden = sal_False; String sGroupName, sPageName; @@ -869,26 +869,8 @@ void OfaTreeOptionsDialog::ApplyItemSets() void OfaTreeOptionsDialog::InitTreeAndHandler() { aTreeLB.SetNodeDefaultImages(); - - String sResName = String::CreateFromAscii( "iso" ); - ResMgr* pIsoRes = ResMgr::CreateResMgr( ::rtl::OUStringToOString( sResName, RTL_TEXTENCODING_UTF8 ) ); - if ( !pIsoRes ) - { - // Fallback: Use ooo resource file - String sOOoName = String::CreateFromAscii( "ooo" ); - pIsoRes = ResMgr::CreateResMgr( ::rtl::OUStringToOString( sOOoName, RTL_TEXTENCODING_UTF8 ) ); - } - - //! ResMgr* pIsoRes = SFX_APP()->GetLabelResManager(); - ResId aImgLstRes( RID_IMGLIST_TREEOPT, *pIsoRes ); - aImgLstRes.SetRT( RSC_IMAGELIST ); - if ( pIsoRes->IsAvailable( aImgLstRes ) ) - aPageImages = ImageList( ResId( RID_IMGLIST_TREEOPT, *pIsoRes ) ); - ResId aImgLstHCRes( RID_IMGLIST_TREEOPT_HC, *pIsoRes ); - aImgLstHCRes.SetRT( RSC_IMAGELIST ); - if ( pIsoRes->IsAvailable( aImgLstHCRes ) ) - aPageImagesHC = ImageList( ResId( RID_IMGLIST_TREEOPT_HC, *pIsoRes ) ); - delete pIsoRes; + aPageImages = ImageList( CUI_RES( RID_IMGLIST_TREEOPT ) ); + aPageImagesHC = ImageList( CUI_RES( RID_IMGLIST_TREEOPT_HC ) ); aTreeLB.SetHelpId( HID_OFADLG_TREELISTBOX ); aTreeLB.SetStyle( aTreeLB.GetStyle()|WB_HASBUTTONS | WB_HASBUTTONSATROOT | @@ -896,7 +878,7 @@ void OfaTreeOptionsDialog::InitTreeAndHandler() WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE | WB_QUICK_SEARCH ); aTreeLB.SetSpaceBetweenEntries( 0 ); aTreeLB.SetSelectionMode( SINGLE_SELECTION ); - aTreeLB.SetSublistOpenWithLeftRight( TRUE ); + aTreeLB.SetSublistOpenWithLeftRight( sal_True ); aTreeLB.SetExpandedHdl( LINK( this, OfaTreeOptionsDialog, ExpandedHdl_Impl ) ); aTreeLB.SetSelectHdl( LINK( this, OfaTreeOptionsDialog, ShowPageHdl_Impl ) ); aBackPB.SetClickHdl( LINK( this, OfaTreeOptionsDialog, BackHdl_Impl ) ); @@ -1461,7 +1443,7 @@ OfaPageResource::OfaPageResource() : FreeResource(); } -BOOL EnableSSO( void ) +sal_Bool EnableSSO( void ) { // SSO must be enabled if the configuration manager bootstrap settings // are configured as follows ... @@ -1490,7 +1472,7 @@ BOOL EnableSSO( void ) theBootstrap.getFrom( rtl::OUString::createFromAscii( "CFG_BackendService" ), theBackendServiceTypeValue ); - BOOL bSSOEnabled = + sal_Bool bSSOEnabled = ( theOfflineValue == theDefaultOfflineValue && ( theServerTypeValue.getLength() == 0 || theServerTypeValue == rtl::OUString::createFromAscii( "uno" ) ) && @@ -1499,7 +1481,7 @@ BOOL EnableSSO( void ) "com.sun.star.comp.configuration.backend.LdapSingleBackend" ) ); if ( bSSOEnabled && GetSSOCreator() == 0 ) { - bSSOEnabled = FALSE; + bSSOEnabled = sal_False; } return bSSOEnabled; } @@ -1556,10 +1538,10 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) if( SFX_ITEM_AVAILABLE <= pDispatch->QueryState( SID_ATTR_YEAR2000, pItem ) ) pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, ((const SfxUInt16Item*)pItem)->GetValue() ) ); else - pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, (USHORT)aMisc.GetYear2000() ) ); + pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, (sal_uInt16)aMisc.GetYear2000() ) ); } else - pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, (USHORT)aMisc.GetYear2000() ) ); + pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, (sal_uInt16)aMisc.GetYear2000() ) ); // Sonstiges - Tabulator @@ -1691,7 +1673,7 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet // ------------------------------------------------------------------------- // Year2000 auswerten // ------------------------------------------------------------------------- - USHORT nY2K = USHRT_MAX; + sal_uInt16 nY2K = USHRT_MAX; if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_YEAR2000, sal_False, &pItem ) ) nY2K = ((const SfxUInt16Item*)pItem)->GetValue(); if( USHRT_MAX != nY2K ) @@ -1878,7 +1860,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) sal_uInt16 i, nPageId; // %PRODUCTNAME options - BOOL isSSOEnabled = EnableSSO(); + sal_Bool isSSOEnabled = EnableSSO(); if ( !lcl_isOptionHidden( SID_GENERAL_OPTIONS, aOptionsDlgOpt ) ) { ResStringArray& rGeneralArray = aDlgResource.GetGeneralArray(); @@ -2063,7 +2045,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) SfxModule* pScMod = ( *( SfxModule** ) GetAppData( SHL_CALC ) ); setGroupName( C2U("Calc"), rCalcArray.GetString(0) ); nGroup = AddGroup( rCalcArray.GetString( 0 ), pScMod, pScMod, SID_SC_EDITOPTIONS ); - const USHORT nCount = static_cast< const USHORT >( rCalcArray.Count() ); + const sal_uInt16 nCount = static_cast< const sal_uInt16 >( rCalcArray.Count() ); for ( i = 1; i < nCount; ++i ) { nPageId = (sal_uInt16)rCalcArray.GetValue(i); @@ -2091,7 +2073,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) setGroupName( C2U("Impress"), rImpressArray.GetString(0) ); nGroup = AddGroup( rImpressArray.GetString( 0 ), pSdMod, pSdMod, SID_SD_EDITOPTIONS ); const sal_Bool bCTL = aLanguageOptions.IsCTLFontEnabled(); - const USHORT nCount = static_cast< const USHORT >( rImpressArray.Count() ); + const sal_uInt16 nCount = static_cast< const sal_uInt16 >( rImpressArray.Count() ); for ( i = 1; i < nCount; ++i ) { nPageId = (sal_uInt16)rImpressArray.GetValue(i); @@ -2115,7 +2097,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) setGroupName( C2U("Draw"), rDrawArray.GetString(0) ); nGroup = AddGroup( rDrawArray.GetString( 0 ), pSdMod, pSdMod, SID_SD_GRAPHIC_OPTIONS ); const sal_Bool bCTL = aLanguageOptions.IsCTLFontEnabled(); - const USHORT nCount = static_cast< const USHORT >( rDrawArray.Count() ); + const sal_uInt16 nCount = static_cast< const sal_uInt16 >( rDrawArray.Count() ); for ( i = 1; i < nCount; ++i ) { nPageId = (sal_uInt16)rDrawArray.GetValue(i); @@ -2250,7 +2232,7 @@ void OfaTreeOptionsDialog::ResizeTreeLB( void ) const long nMax = aHiddenGB.GetSizePixel().Width() * 42 / 100; // don't ask where 42 comes from... but it looks / feels ok ;-) long nDelta = 50; // min. - USHORT nDepth = 0; + sal_uInt16 nDepth = 0; const long nIndent0 = PixelToLogic( Size( 28, 0 ) ).Width(); const long nIndent1 = PixelToLogic( Size( 52, 0 ) ).Width(); @@ -2595,10 +2577,10 @@ void OfaTreeOptionsDialog::LoadNodes( } } -USHORT lcl_getGroupId( const rtl::OUString& rGroupName, const SvTreeListBox& rTreeLB ) +sal_uInt16 lcl_getGroupId( const rtl::OUString& rGroupName, const SvTreeListBox& rTreeLB ) { String sGroupName( rGroupName ); - USHORT nRet = 0; + sal_uInt16 nRet = 0; SvLBoxEntry* pEntry = rTreeLB.First(); while( pEntry ) { @@ -2618,10 +2600,10 @@ USHORT lcl_getGroupId( const rtl::OUString& rGroupName, const SvTreeListBox& rTr void lcl_insertLeaf( OfaTreeOptionsDialog* pDlg, OptionsNode* pNode, OptionsLeaf* pLeaf, const SvTreeListBox& rTreeLB ) { - USHORT nGrpId = lcl_getGroupId( pNode->m_sLabel, rTreeLB ); + sal_uInt16 nGrpId = lcl_getGroupId( pNode->m_sLabel, rTreeLB ); if ( USHRT_MAX == nGrpId ) { - USHORT nNodeGrpId = getGroupNodeId( pNode->m_sId ); + sal_uInt16 nNodeGrpId = getGroupNodeId( pNode->m_sId ); nGrpId = pDlg->AddGroup( pNode->m_sLabel, NULL, NULL, nNodeGrpId ); if ( pNode->m_sPageURL.getLength() > 0 ) { diff --git a/cui/source/options/treeopt.src b/cui/source/options/treeopt.src index b845bf29316d..a01237ee9844 100644 --- a/cui/source/options/treeopt.src +++ b/cui/source/options/treeopt.src @@ -306,47 +306,37 @@ String RID_RIDER_SLL_PERSONAL Text [ en-US ] = "Personal certificates" ; }; -// ******************************************************************* EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +#define MASK_COL MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; } ; +#define IMGLST_IDLST \ + IdList = { \ + SID_GENERAL_OPTIONS; \ + SID_LANGUAGE_OPTIONS; \ + SID_INET_DLG; \ + SID_SW_EDITOPTIONS; \ + SID_SW_ONLINEOPTIONS; \ + SID_SC_EDITOPTIONS; \ + SID_SD_EDITOPTIONS; \ + SID_SD_GRAPHIC_OPTIONS; \ + SID_SM_EDITOPTIONS; \ + SID_SCH_EDITOPTIONS; \ + SID_SB_STARBASEOPTIONS; \ + SID_FILTER_DLG; \ + }; \ + IdCount = { \ + 12; \ + }; +ImageList RID_IMGLIST_TREEOPT +{ + Prefix = "tr"; + MASK_COL + IMGLST_IDLST +}; +ImageList RID_IMGLIST_TREEOPT_HC +{ + Prefix = "trh"; + MASK_COL + IMGLST_IDLST +}; diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index dc59e4ce986d..892332a49b26 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -55,7 +55,7 @@ PasswordTable::PasswordTable( Window* pParent, const ResId& rResId ) : SetStyle( GetStyle() | WB_NOINITIALSELECTION ); } -void PasswordTable::InsertHeaderItem( USHORT nColumn, const String& rText, HeaderBarItemBits nBits ) +void PasswordTable::InsertHeaderItem( sal_uInt16 nColumn, const String& rText, HeaderBarItemBits nBits ) { GetTheHeaderBar()->InsertItem( nColumn, rText, 0, nBits ); } @@ -67,11 +67,11 @@ void PasswordTable::ResetTabs() void PasswordTable::Resort( bool bForced ) { - USHORT nColumn = GetSelectedCol(); + sal_uInt16 nColumn = GetSelectedCol(); if ( 0 == nColumn || bForced ) // only the first column is sorted { HeaderBarItemBits nBits = GetTheHeaderBar()->GetItemBits(1); - BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); + sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); SvSortMode eMode = SortAscending; if ( bUp ) @@ -161,8 +161,8 @@ WebConnectionInfoDialog::WebConnectionInfoDialog( Window* pParent ) : m_aChangeBtn.SetClickHdl( LINK( this, WebConnectionInfoDialog, ChangePasswordHdl ) ); m_aPasswordsLB.SetSelectHdl( LINK( this, WebConnectionInfoDialog, EntrySelectedHdl ) ); - m_aRemoveBtn.Enable( FALSE ); - m_aChangeBtn.Enable( FALSE ); + m_aRemoveBtn.Enable( sal_False ); + m_aChangeBtn.Enable( sal_False ); HeaderBarClickedHdl( NULL ); } @@ -350,12 +350,12 @@ IMPL_LINK( WebConnectionInfoDialog, EntrySelectedHdl, void*, EMPTYARG ) SvLBoxEntry* pEntry = m_aPasswordsLB.GetCurEntry(); if ( !pEntry ) { - m_aRemoveBtn.Enable( FALSE ); - m_aChangeBtn.Enable( FALSE ); + m_aRemoveBtn.Enable( sal_False ); + m_aChangeBtn.Enable( sal_False ); } else { - m_aRemoveBtn.Enable( TRUE ); + m_aRemoveBtn.Enable( sal_True ); // url container entries (-> use system credentials) have // no password diff --git a/cui/source/options/webconninfo.hxx b/cui/source/options/webconninfo.hxx index 569bb653d675..bf84cfd91835 100644 --- a/cui/source/options/webconninfo.hxx +++ b/cui/source/options/webconninfo.hxx @@ -43,7 +43,7 @@ namespace svx public: PasswordTable( Window* pParent, const ResId& rResId ); - void InsertHeaderItem( USHORT nColumn, const String& rText, HeaderBarItemBits nBits ); + void InsertHeaderItem( sal_uInt16 nColumn, const String& rText, HeaderBarItemBits nBits ); void ResetTabs(); void Resort( bool bForced ); }; diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 65d0cad3dfd1..bcf8dca6b7d1 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -59,7 +59,7 @@ namespace svx { // horizontal alignment ------------------------------------------------------- -typedef sfx::ValueItemWrapper< SvxHorJustifyItem, SvxCellHorJustify, USHORT > HorJustItemWrapper; +typedef sfx::ValueItemWrapper< SvxHorJustifyItem, SvxCellHorJustify, sal_uInt16 > HorJustItemWrapper; typedef sfx::ListBoxConnection< HorJustItemWrapper > HorJustConnection; static const HorJustConnection::MapEntryType s_pHorJustMap[] = @@ -75,7 +75,7 @@ static const HorJustConnection::MapEntryType s_pHorJustMap[] = // vertical alignment --------------------------------------------------------- -typedef sfx::ValueItemWrapper< SvxVerJustifyItem, SvxCellVerJustify, USHORT > VerJustItemWrapper; +typedef sfx::ValueItemWrapper< SvxVerJustifyItem, SvxCellVerJustify, sal_uInt16 > VerJustItemWrapper; typedef sfx::ListBoxConnection< VerJustItemWrapper > VerJustConnection; static const VerJustConnection::MapEntryType s_pVerJustMap[] = @@ -89,7 +89,7 @@ static const VerJustConnection::MapEntryType s_pVerJustMap[] = // cell rotate mode ----------------------------------------------------------- -typedef sfx::ValueItemWrapper< SvxRotateModeItem, SvxRotateMode, USHORT > RotateModeItemWrapper; +typedef sfx::ValueItemWrapper< SvxRotateModeItem, SvxRotateMode, sal_uInt16 > RotateModeItemWrapper; typedef sfx::ValueSetConnection< RotateModeItemWrapper > RotateModeConnection; static const RotateModeConnection::MapEntryType s_pRotateModeMap[] = @@ -102,7 +102,7 @@ static const RotateModeConnection::MapEntryType s_pRotateModeMap[] = // ============================================================================ -static USHORT s_pRanges[] = +static sal_uInt16 s_pRanges[] = { SID_ATTR_ALIGN_HOR_JUSTIFY,SID_ATTR_ALIGN_VER_JUSTIFY, SID_ATTR_ALIGN_STACKED,SID_ATTR_ALIGN_LINEBREAK, @@ -208,7 +208,7 @@ SfxTabPage* AlignmentTabPage::Create( Window* pParent, const SfxItemSet& rAttrSe return new AlignmentTabPage( pParent, rAttrSet ); } -USHORT* AlignmentTabPage::GetRanges() +sal_uInt16* AlignmentTabPage::GetRanges() { return s_pRanges; } @@ -239,7 +239,7 @@ void AlignmentTabPage::DataChanged( const DataChangedEvent& rDCEvt ) void AlignmentTabPage::InitVsRefEgde() { // remember selection - is deleted in call to ValueSet::Clear() - USHORT nSel = maVsRefEdge.GetSelectItemId(); + sal_uInt16 nSel = maVsRefEdge.GetSelectItemId(); ResId aResId( GetSettings().GetStyleSettings().GetHighContrastMode() ? IL_LOCK_BMPS_HC : IL_LOCK_BMPS, CUI_MGR() ); ImageList aImageList( aResId ); @@ -260,7 +260,7 @@ void AlignmentTabPage::InitVsRefEgde() void AlignmentTabPage::UpdateEnableControls() { - USHORT nHorAlign = maLbHorAlign.GetSelectEntryPos(); + sal_uInt16 nHorAlign = maLbHorAlign.GetSelectEntryPos(); bool bHorLeft = (nHorAlign == ALIGNDLG_HORALIGN_LEFT); bool bHorBlock = (nHorAlign == ALIGNDLG_HORALIGN_BLOCK); bool bHorFill = (nHorAlign == ALIGNDLG_HORALIGN_FILL); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 05ec88e5aa7f..420786ce52a2 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -89,18 +89,18 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) : aLanguageFT( this, CUI_RES(FT_LANG )), aLanguageLB( this, CUI_RES(LB_LANG )) { - BOOL bShowSWOptions = FALSE; - BOOL bOpenSmartTagOptions = FALSE; + sal_Bool bShowSWOptions = sal_False; + sal_Bool bOpenSmartTagOptions = sal_False; if ( _pSet ) { - SFX_ITEMSET_ARG( _pSet, pItem, SfxBoolItem, SID_AUTO_CORRECT_DLG, FALSE ); + SFX_ITEMSET_ARG( _pSet, pItem, SfxBoolItem, SID_AUTO_CORRECT_DLG, sal_False ); if ( pItem && pItem->GetValue() ) - bShowSWOptions = TRUE; + bShowSWOptions = sal_True; - SFX_ITEMSET_ARG( _pSet, pItem2, SfxBoolItem, SID_OPEN_SMARTTAGOPTIONS, FALSE ); + SFX_ITEMSET_ARG( _pSet, pItem2, SfxBoolItem, SID_OPEN_SMARTTAGOPTIONS, sal_False ); if ( pItem2 && pItem2->GetValue() ) - bOpenSmartTagOptions = TRUE; + bOpenSmartTagOptions = sal_True; } aLanguageFT.SetZOrder(0, WINDOW_ZORDER_FIRST); @@ -141,9 +141,9 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) : if( SvtLanguageOptions().IsCTLFontEnabled() ) nLangList |= LANG_LIST_CTL; - aLanguageLB.SetLanguageList( nLangList, TRUE, TRUE ); + aLanguageLB.SetLanguageList( nLangList, sal_True, sal_True ); aLanguageLB.SelectLanguage( LANGUAGE_NONE ); - USHORT nPos = aLanguageLB.GetSelectEntryPos(); + sal_uInt16 nPos = aLanguageLB.GetSelectEntryPos(); DBG_ASSERT( LISTBOX_ENTRY_NOTFOUND != nPos, "listbox entry missing" ); aLanguageLB.SetEntryData( nPos, (void*)(long) LANGUAGE_DONTKNOW ); @@ -171,23 +171,23 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) : --------------------------------------------------*/ -BOOL lcl_FindEntry( ListBox& rLB, const String& rEntry, +sal_Bool lcl_FindEntry( ListBox& rLB, const String& rEntry, CollatorWrapper& rCmpClass ) { - USHORT nCount = rLB.GetEntryCount(); - USHORT nSelPos = rLB.GetSelectEntryPos(); - USHORT i; + sal_uInt16 nCount = rLB.GetEntryCount(); + sal_uInt16 nSelPos = rLB.GetSelectEntryPos(); + sal_uInt16 i; for(i = 0; i < nCount; i++) { if( 0 == rCmpClass.compareString(rEntry, rLB.GetEntry(i) )) { - rLB.SelectEntryPos(i, TRUE); - return TRUE; + rLB.SelectEntryPos(i, sal_True); + return sal_True; } } if(LISTBOX_ENTRY_NOTFOUND != nSelPos) - rLB.SelectEntryPos(nSelPos, FALSE); - return FALSE; + rLB.SelectEntryPos(nSelPos, sal_False); + return sal_False; } /* -----------------23.11.98 10:46------------------- @@ -195,13 +195,13 @@ BOOL lcl_FindEntry( ListBox& rLB, const String& rEntry, * --------------------------------------------------*/ IMPL_LINK(OfaAutoCorrDlg, SelectLanguageHdl, ListBox*, pBox) { - USHORT nPos = pBox->GetSelectEntryPos(); + sal_uInt16 nPos = pBox->GetSelectEntryPos(); void* pVoid = pBox->GetEntryData(nPos); LanguageType eNewLang = (LanguageType)(long)pVoid; //alte Einstellungen speichern und neu fuellen if(eNewLang != eLastDialogLanguage) { - USHORT nPageId = GetCurPageId(); + sal_uInt16 nPageId = GetCurPageId(); if(RID_OFAPAGE_AUTOCORR_REPLACE == nPageId) ((OfaAutocorrReplacePage*)GetTabPage( nPageId ))->SetLanguage(eNewLang); else if(RID_OFAPAGE_AUTOCORR_EXCEPT == nPageId) @@ -255,12 +255,12 @@ SfxTabPage* OfaAutocorrOptionsPage::Create( Window* pParent, --------------------------------------------------*/ -BOOL OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); long nFlags = pAutoCorrect->GetFlags(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; pAutoCorrect->SetAutoCorrFlag(Autocorrect, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(CptlSttWrd, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(CptlSttSntnc, aCheckLB.IsChecked(nPos++)); @@ -269,7 +269,7 @@ BOOL OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) pAutoCorrect->SetAutoCorrFlag(ChgToEnEmDash, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(IgnoreDoubleSpace, aCheckLB.IsChecked(nPos++)); - BOOL bReturn = nFlags != pAutoCorrect->GetFlags(); + sal_Bool bReturn = nFlags != pAutoCorrect->GetFlags(); if(bReturn ) { SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get(); @@ -284,7 +284,7 @@ BOOL OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) * --------------------------------------------------*/ void OfaAutocorrOptionsPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(FALSE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_False); } /*-----------------14.10.96 15.58------------------- @@ -297,7 +297,7 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); const long nFlags = pAutoCorrect->GetFlags(); - aCheckLB.SetUpdateMode(FALSE); + aCheckLB.SetUpdateMode(sal_False); aCheckLB.Clear(); aCheckLB.InsertEntry(sInput); @@ -308,7 +308,7 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) aCheckLB.InsertEntry(sDash); aCheckLB.InsertEntry(sNoDblSpaces); - USHORT nPos = 0; + sal_uInt16 nPos = 0; aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & Autocorrect) ); aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CptlSttWrd) ); aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CptlSttSntnc) ); @@ -317,7 +317,7 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & ChgToEnEmDash) ); aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & IgnoreDoubleSpace) ); - aCheckLB.SetUpdateMode(TRUE); + aCheckLB.SetUpdateMode(sal_True); } /*********************************************************************/ @@ -373,10 +373,10 @@ class OfaImpBrwString : public SvLBoxString { public: - OfaImpBrwString( SvLBoxEntry* pEntry, USHORT nFlags, + OfaImpBrwString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr){} - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); }; @@ -385,7 +385,7 @@ public: /*********************************************************************/ -void __EXPORT OfaImpBrwString::Paint( const Point& rPos, SvLBox& rDev, USHORT /*nFlags*/, +void __EXPORT OfaImpBrwString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /*nFlags*/, SvLBoxEntry* pEntry ) { rDev.DrawText( rPos, GetText() ); @@ -404,8 +404,8 @@ void __EXPORT OfaImpBrwString::Paint( const Point& rPos, SvLBox& rDev, USHORT /* } aFont.SetWeight( WEIGHT_BOLD ); - BOOL bFett = TRUE; - USHORT nPos = 0; + sal_Bool bFett = sal_True; + sal_uInt16 nPos = 0; do { String sTxt( pUserData->pString->GetToken( 0, 1, nPos )); @@ -518,7 +518,7 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage( Window* pParent, /* */ /*********************************************************************/ -SvLBoxEntry* OfaSwAutoFmtOptionsPage::CreateEntry(String& rTxt, USHORT nCol) +SvLBoxEntry* OfaSwAutoFmtOptionsPage::CreateEntry(String& rTxt, sal_uInt16 nCol) { SvLBoxEntry* pEntry = new SvLBoxEntry; @@ -572,14 +572,14 @@ SfxTabPage* __EXPORT OfaSwAutoFmtOptionsPage::Create( Window* pParent, /* */ /*********************************************************************/ -BOOL OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); long nFlags = pAutoCorrect->GetFlags(); - BOOL bCheck = aCheckLB.IsChecked(USE_REPLACE_TABLE, CBCOL_FIRST); + sal_Bool bCheck = aCheckLB.IsChecked(USE_REPLACE_TABLE, CBCOL_FIRST); bModified |= pOpt->bAutoCorrect != bCheck; pOpt->bAutoCorrect = bCheck; pAutoCorrect->SetAutoCorrFlag(Autocorrect, @@ -637,7 +637,7 @@ BOOL OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) bModified |= pOpt->bRightMargin != bCheck; pOpt->bRightMargin = bCheck; bModified |= nPercent != pOpt->nRightMargin; - pOpt->nRightMargin = (BYTE)nPercent; + pOpt->nRightMargin = (sal_uInt8)nPercent; bCheck = aCheckLB.IsChecked(APPLY_NUMBERING, CBCOL_SECOND); bModified |= pOpt->bSetNumRule != bCheck; @@ -682,7 +682,7 @@ BOOL OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) pCfg->Commit(); } - return TRUE; + return sal_True; } /* -----------------23.11.98 16:15------------------- @@ -690,7 +690,7 @@ BOOL OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) * --------------------------------------------------*/ void OfaSwAutoFmtOptionsPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(FALSE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_False); } /*********************************************************************/ @@ -704,7 +704,7 @@ void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet& ) SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); const long nFlags = pAutoCorrect->GetFlags(); - aCheckLB.SetUpdateMode(FALSE); + aCheckLB.SetUpdateMode(sal_False); aCheckLB.Clear(); // Die folgenden Eintraege muessen in der selben Reihenfolge, wie im @@ -773,7 +773,7 @@ void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet& ) aCheckLB.CheckEntryPos( CREATE_TABLE, CBCOL_SECOND, pOpt->bCreateTable ); aCheckLB.CheckEntryPos( REPLACE_STYLES, CBCOL_SECOND, pOpt->bReplaceStyles ); - aCheckLB.SetUpdateMode(TRUE); + aCheckLB.SetUpdateMode(sal_True); } /*********************************************************************/ @@ -792,7 +792,7 @@ IMPL_LINK(OfaSwAutoFmtOptionsPage, SelectHdl, OfaACorrCheckListBox*, pBox) IMPL_LINK(OfaSwAutoFmtOptionsPage, EditHdl, PushButton*, EMPTYARG) { - ULONG nSelEntryPos = aCheckLB.GetSelectEntryPos(); + sal_uLong nSelEntryPos = aCheckLB.GetSelectEntryPos(); if( nSelEntryPos == REPLACE_BULLETS || nSelEntryPos == APPLY_NUMBERING) { @@ -818,7 +818,7 @@ IMPL_LINK(OfaSwAutoFmtOptionsPage, EditHdl, PushButton*, EMPTYARG) aDlg.GetPrcntFld().SetValue(nPercent); if(RET_OK == aDlg.Execute()) { - nPercent = (USHORT)aDlg.GetPrcntFld().GetValue(); + nPercent = (sal_uInt16)aDlg.GetPrcntFld().GetValue(); sMargin = ' '; sMargin += String::CreateFromInt32( nPercent ); sMargin += '%'; @@ -835,7 +835,7 @@ IMPL_LINK(OfaSwAutoFmtOptionsPage, EditHdl, PushButton*, EMPTYARG) void OfaACorrCheckListBox::SetTabs() { SvxSimpleTable::SetTabs(); - USHORT nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; + sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; if( aTabs.Count() > 1 ) { @@ -855,7 +855,7 @@ void OfaACorrCheckListBox::SetTabs() /* */ /*********************************************************************/ -void OfaACorrCheckListBox::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked) +void OfaACorrCheckListBox::CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked) { if ( nPos < GetEntryCount() ) SetCheckButtonState( @@ -869,7 +869,7 @@ void OfaACorrCheckListBox::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked) /* */ /*********************************************************************/ -BOOL OfaACorrCheckListBox::IsChecked(ULONG nPos, USHORT nCol) +sal_Bool OfaACorrCheckListBox::IsChecked(sal_uLong nPos, sal_uInt16 nCol) { return GetCheckButtonState( GetEntry(nPos), nCol ) == SV_BUTTON_CHECKED; } @@ -878,7 +878,7 @@ BOOL OfaACorrCheckListBox::IsChecked(ULONG nPos, USHORT nCol) /* */ /*********************************************************************/ -void OfaACorrCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol, SvButtonState eState) +void OfaACorrCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, sal_uInt16 nCol, SvButtonState eState) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -907,7 +907,7 @@ void OfaACorrCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol /* */ /*********************************************************************/ -SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol ) const +SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const { SvButtonState eState = SV_BUTTON_UNCHECKED; SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -915,7 +915,7 @@ SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, US if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) { - USHORT nButtonFlags = pItem->GetButtonFlags(); + sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); } @@ -934,8 +934,8 @@ void OfaACorrCheckListBox::KeyInput( const KeyEvent& rKEvt ) if(!rKEvt.GetKeyCode().GetModifier() && KEY_SPACE == rKEvt.GetKeyCode().GetCode()) { - ULONG nSelPos = GetSelectEntryPos(); - USHORT nCol = GetCurrentTabPos() - 1; + sal_uLong nSelPos = GetSelectEntryPos(); + sal_uInt16 nCol = GetCurrentTabPos() - 1; if ( nCol < 2 ) { CheckEntryPos( nSelPos, nCol, !IsChecked( nSelPos, nCol ) ); @@ -943,7 +943,7 @@ void OfaACorrCheckListBox::KeyInput( const KeyEvent& rKEvt ) } else { - USHORT nCheck = IsChecked(nSelPos, 1) ? 1 : 0; + sal_uInt16 nCheck = IsChecked(nSelPos, 1) ? 1 : 0; if(IsChecked(nSelPos, 0)) nCheck += 2; nCheck--; @@ -1002,10 +1002,10 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( Window* pParent, sNew(aNewReplacePB.GetText()), pFormatText(0), eLang(eLastDialogLanguage), - bHasSelectionText(FALSE), - bFirstSelect(TRUE), - bReplaceEditChanged(FALSE), - bSWriter(TRUE) + bHasSelectionText(sal_False), + bFirstSelect(sal_True), + bReplaceEditChanged(sal_False), + bSWriter(sal_True) { FreeResource(); SfxModule *pMod = *(SfxModule**)GetAppData(SHL_WRITER); @@ -1031,8 +1031,8 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( Window* pParent, aShortED.SetActionHdl(LINK(this, OfaAutocorrReplacePage, NewDelHdl)); aReplaceED.SetActionHdl(LINK(this, OfaAutocorrReplacePage, NewDelHdl)); - aReplaceED.SetSpaces(TRUE); - aShortED.SetSpaces(TRUE); + aReplaceED.SetSpaces(sal_True); + aShortED.SetSpaces(sal_True); aShortED.SetMaxTextLen(30); } @@ -1065,7 +1065,7 @@ void OfaAutocorrReplacePage::ActivatePage( const SfxItemSet& ) { if(eLang != eLastDialogLanguage) SetLanguage(eLastDialogLanguage); - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(TRUE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_True); } /* -----------------20.11.98 13:26------------------- * @@ -1078,7 +1078,7 @@ int OfaAutocorrReplacePage::DeactivatePage( SfxItemSet* ) --------------------------------------------------*/ -BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) +sal_Bool OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); DoubleStringArrayPtr pDoubleStringArray = aDoubleStringTable.Last(); @@ -1088,19 +1088,19 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) if(eCurLang != eLang) // die aktuelle Sprache wird weiter hinten behandelt { SvxAutocorrWordList* pWordList = pAutoCorrect->LoadAutocorrWordList(eCurLang); - USHORT nWordListCount = pWordList->Count(); - USHORT nDoubleStringArrayCount = pDoubleStringArray->Count(); - USHORT nPos = nDoubleStringArrayCount; - USHORT nLastPos = nPos; + sal_uInt16 nWordListCount = pWordList->Count(); + sal_uInt16 nDoubleStringArrayCount = pDoubleStringArray->Count(); + sal_uInt16 nPos = nDoubleStringArrayCount; + sal_uInt16 nLastPos = nPos; // 1. Durchlauf: Eintraege loeschen oder veraendern: - for( USHORT nWordListPos = nWordListCount; nWordListPos; nWordListPos-- ) + for( sal_uInt16 nWordListPos = nWordListCount; nWordListPos; nWordListPos-- ) { SvxAutocorrWordPtr pWordPtr = pWordList->GetObject(nWordListPos - 1); String sEntry(pWordPtr->GetShort()); // formatierter Text steht nur im Writer - BOOL bFound = !bSWriter && !pWordPtr->IsTextOnly(); + sal_Bool bFound = !bSWriter && !pWordPtr->IsTextOnly(); while(!bFound && nPos) { DoubleString* pDouble = pDoubleStringArray->GetObject( nPos - 1); @@ -1109,7 +1109,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) sEntry, pDouble->sShort )) { nLastPos = nPos - 1; - bFound = TRUE; + bFound = sal_True; if( !(pWordPtr->IsTextOnly() == (0 == pDouble->pUserData) && 0 == pCompareCaseClass->compareString( pWordPtr->GetLong(), pDouble->sLong ) ) ) @@ -1128,7 +1128,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) } } nDoubleStringArrayCount = pDoubleStringArray->Count(); - for(USHORT nDoubleStringArrayPos = 0; nDoubleStringArrayPos < nDoubleStringArrayCount; nDoubleStringArrayPos++ ) + for(sal_uInt16 nDoubleStringArrayPos = 0; nDoubleStringArrayPos < nDoubleStringArrayCount; nDoubleStringArrayPos++ ) { //jetzt sollte es nur noch neue Eintraege geben DoubleString* pDouble = pDoubleStringArray->GetObject( nDoubleStringArrayPos ); @@ -1149,21 +1149,21 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) aDoubleStringTable.Clear(); // jetzt noch die aktuelle Selektion SvxAutocorrWordList* pWordList = pAutoCorrect->LoadAutocorrWordList(eLang); - USHORT nWordListCount = pWordList->Count(); - USHORT nListBoxCount = (USHORT)aReplaceTLB.GetEntryCount(); + sal_uInt16 nWordListCount = pWordList->Count(); + sal_uInt16 nListBoxCount = (sal_uInt16)aReplaceTLB.GetEntryCount(); - aReplaceTLB.SetUpdateMode(FALSE); - USHORT nListBoxPos = nListBoxCount; - USHORT nLastListBoxPos = nListBoxPos; + aReplaceTLB.SetUpdateMode(sal_False); + sal_uInt16 nListBoxPos = nListBoxCount; + sal_uInt16 nLastListBoxPos = nListBoxPos; // 1. Durchlauf: Eintraege loeschen oder veraendern: - USHORT i; + sal_uInt16 i; for( i = nWordListCount; i; i-- ) { SvxAutocorrWordPtr pWordPtr = pWordList->GetObject(i- 1); String sEntry(pWordPtr->GetShort()); // formatierter Text steht nur im Writer - BOOL bFound = !bSWriter && !pWordPtr->IsTextOnly(); + sal_Bool bFound = !bSWriter && !pWordPtr->IsTextOnly(); while(!bFound && nListBoxPos) { SvLBoxEntry* pEntry = aReplaceTLB.GetEntry( nListBoxPos - 1); @@ -1171,7 +1171,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) aReplaceTLB.GetEntryText(pEntry, 0))) { nLastListBoxPos = nListBoxPos - 1; - bFound = TRUE; + bFound = sal_True; String sLong = aReplaceTLB.GetEntryText(pEntry, 1); if( !(pWordPtr->IsTextOnly() == (0 == pEntry->GetUserData()) && 0 == pCompareCaseClass->compareString( @@ -1192,7 +1192,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) } } - nListBoxCount = (USHORT)aReplaceTLB.GetEntryCount(); + nListBoxCount = (sal_uInt16)aReplaceTLB.GetEntryCount(); for(i = 0; i < nListBoxCount; i++ ) { //jetzt sollte es nur noch neue Eintraege geben @@ -1207,13 +1207,13 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) } } - return FALSE; + return sal_False; } /* -----------------19.11.98 13:16------------------- * * --------------------------------------------------*/ -void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, +void OfaAutocorrReplacePage::RefillReplaceBox(sal_Bool bFromReset, LanguageType eOldLanguage, LanguageType eNewLanguage) { @@ -1225,17 +1225,17 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, DoubleStringArray* pArray = 0; if(aDoubleStringTable.IsKeyValid(eOldLanguage)) { - pArray = aDoubleStringTable.Seek(ULONG(eOldLanguage)); + pArray = aDoubleStringTable.Seek(sal_uLong(eOldLanguage)); pArray->DeleteAndDestroy(0, pArray->Count()); } else { pArray = new DoubleStringArray; - aDoubleStringTable.Insert(ULONG(eOldLanguage), pArray); + aDoubleStringTable.Insert(sal_uLong(eOldLanguage), pArray); } - USHORT nListBoxCount = (USHORT)aReplaceTLB.GetEntryCount(); - USHORT i; + sal_uInt16 nListBoxCount = (sal_uInt16)aReplaceTLB.GetEntryCount(); + sal_uInt16 i; for(i = 0; i < nListBoxCount; i++) { DoubleString* pDouble = new DoubleString(); @@ -1258,11 +1258,11 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, if(aDoubleStringTable.IsKeyValid(eLang)) { - DoubleStringArray* pArray = aDoubleStringTable.Seek(ULONG(eNewLanguage)); - for(USHORT i = 0; i < pArray->Count(); i++) + DoubleStringArray* pArray = aDoubleStringTable.Seek(sal_uLong(eNewLanguage)); + for(sal_uInt16 i = 0; i < pArray->Count(); i++) { DoubleString* pDouble = pArray->GetObject(i); - BOOL bTextOnly = 0 == pDouble->pUserData; + sal_Bool bTextOnly = 0 == pDouble->pUserData; // formatierter Text wird nur im Writer angeboten if(bSWriter || bTextOnly) { @@ -1285,10 +1285,10 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SvxAutocorrWordList* pWordList = pAutoCorrect->LoadAutocorrWordList(eLang); - for(USHORT i = 0; i < pWordList->Count(); i++) + for(sal_uInt16 i = 0; i < pWordList->Count(); i++) { SvxAutocorrWordPtr pWordPtr = pWordList->GetObject(i); - BOOL bTextOnly = pWordPtr->IsTextOnly(); + sal_Bool bTextOnly = pWordPtr->IsTextOnly(); // formatierter Text wird nur im Writer angeboten if(bSWriter || bTextOnly) { @@ -1305,22 +1305,22 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, pFormatText->Insert(new String(pWordPtr->GetShort())); } } - aNewReplacePB.Enable(FALSE); - aDeleteReplacePB.Enable(FALSE); + aNewReplacePB.Enable(sal_False); + aDeleteReplacePB.Enable(sal_False); } SfxViewShell* pViewShell = SfxViewShell::Current(); - if( pViewShell && pViewShell->HasSelection( TRUE ) ) + if( pViewShell && pViewShell->HasSelection( sal_True ) ) { - bHasSelectionText = TRUE; + bHasSelectionText = sal_True; const String sSelection( pViewShell->GetSelectionText() ); aReplaceED.SetText( sSelection ); aTextOnlyCB.Check( !bSWriter ); aTextOnlyCB.Enable( bSWriter && sSelection.Len() ); } else - aTextOnlyCB.Enable( FALSE ); + aTextOnlyCB.Enable( sal_False ); } /*-----------------14.10.96 15.58------------------- @@ -1328,7 +1328,7 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, void OfaAutocorrReplacePage::Reset( const SfxItemSet& ) { - RefillReplaceBox(TRUE, eLang, eLang); + RefillReplaceBox(sal_True, eLang, eLang); aShortED.GrabFocus(); } @@ -1340,7 +1340,7 @@ void OfaAutocorrReplacePage::SetLanguage(LanguageType eSet) //save old settings an refill if(eSet != eLang) { - RefillReplaceBox(FALSE, eLang, eSet); + RefillReplaceBox(sal_False, eLang, eSet); eLastDialogLanguage = eSet; delete pCompareClass; delete pCompareCaseClass; @@ -1369,7 +1369,7 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, SvTabListBox*, pBox) String sTmpShort(pBox->GetEntryText(pEntry, 0)); // wird der Text ueber den ModifyHdl gesetzt, dann steht der Cursor sonst immer am Wortanfang, // obwohl man gerade hier editiert - BOOL bSameContent = 0 == pCompareClass->compareString( + sal_Bool bSameContent = 0 == pCompareClass->compareString( sTmpShort, aShortED.GetText() ); Selection aSel = aShortED.GetSelection(); if(aShortED.GetText() != sTmpShort) @@ -1384,9 +1384,9 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, SvTabListBox*, pBox) aTextOnlyCB.Check(0 == pEntry->GetUserData()); } else - bFirstSelect = FALSE; + bFirstSelect = sal_False; - aNewReplacePB.Enable(FALSE); + aNewReplacePB.Enable(sal_False); aDeleteReplacePB.Enable(); return 0; }; @@ -1416,18 +1416,18 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn) if(sEntry.Len() && ( aReplaceED.GetText().Len() || ( bHasSelectionText && bSWriter ) )) { - aReplaceTLB.SetUpdateMode(FALSE); - USHORT nPos = USHRT_MAX; + aReplaceTLB.SetUpdateMode(sal_False); + sal_uInt16 nPos = USHRT_MAX; sEntry += '\t'; sEntry += aReplaceED.GetText(); if(_pNewEntry) { - nPos = (USHORT)aReplaceTLB.GetModel()->GetAbsPos(_pNewEntry); + nPos = (sal_uInt16)aReplaceTLB.GetModel()->GetAbsPos(_pNewEntry); aReplaceTLB.GetModel()->Remove(_pNewEntry); } else { - USHORT j; + sal_uInt16 j; for( j = 0; j < aReplaceTLB.GetEntryCount(); j++ ) { SvLBoxEntry* pReplaceEntry = aReplaceTLB.GetEntry(j); @@ -1445,7 +1445,7 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn) pInsEntry->SetUserData(&bHasSelectionText); // neuer formatierter Text aReplaceTLB.MakeVisible( pInsEntry ); - aReplaceTLB.SetUpdateMode(TRUE); + aReplaceTLB.SetUpdateMode(sal_True); // falls der Request aus dem ReplaceEdit kam, dann Focus in das ShortEdit setzen if(aReplaceED.HasFocus()) aShortED.GrabFocus(); @@ -1468,7 +1468,7 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn) IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) { SvLBoxEntry* pFirstSel = aReplaceTLB.FirstSelected(); - BOOL bShort = pEdt == &aShortED; + sal_Bool bShort = pEdt == &aShortED; const String rEntry = pEdt->GetText(); const String rRepString = aReplaceED.GetText(); String aWordStr( pCharClass->lower( rEntry )); @@ -1477,21 +1477,21 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) { if(rEntry.Len()) { - BOOL bFound = FALSE; - BOOL bTmpSelEntry=FALSE; + sal_Bool bFound = sal_False; + sal_Bool bTmpSelEntry=sal_False; - for(USHORT i = 0; i < aReplaceTLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < aReplaceTLB.GetEntryCount(); i++) { SvLBoxEntry* pEntry = aReplaceTLB.GetEntry( i ); String aTestStr=aReplaceTLB.GetEntryText(pEntry, 0); if( 0 == pCompareClass->compareString(rEntry, aTestStr )) { if(rRepString.Len()) - bFirstSelect = TRUE; + bFirstSelect = sal_True; aReplaceTLB.SetCurEntry(pEntry); pFirstSel = pEntry; aNewReplacePB.SetText(sModify); - bFound= TRUE; + bFound= sal_True; break; } else @@ -1500,17 +1500,17 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) if(aTestStr.Search(aWordStr)==0 && !bTmpSelEntry) { aReplaceTLB.MakeVisible(pEntry); - bTmpSelEntry=TRUE; + bTmpSelEntry=sal_True; } } } if(!bFound) { - aReplaceTLB.SelectAll(FALSE); + aReplaceTLB.SelectAll(sal_False); pFirstSel = 0; aNewReplacePB.SetText(sNew); if(bReplaceEditChanged) - aTextOnlyCB.Enable(FALSE); + aTextOnlyCB.Enable(sal_False); } aDeleteReplacePB.Enable(bFound); } @@ -1523,7 +1523,7 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) } else if(!bShort) { - bReplaceEditChanged = TRUE; + bReplaceEditChanged = sal_True; if(pFirstSel) { aNewReplacePB.SetText(sModify); @@ -1531,17 +1531,17 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) } const String& rShortTxt = aShortED.GetText(); - BOOL bEnableNew = rShortTxt.Len() && + sal_Bool bEnableNew = rShortTxt.Len() && ( rRepString.Len() || ( bHasSelectionText && bSWriter )) && ( !pFirstSel || rRepString != aReplaceTLB.GetEntryText( pFirstSel, 1 ) ); if(bEnableNew && pFormatText) { - for(USHORT i = 0; i < pFormatText->Count(); i++) + for(sal_uInt16 i = 0; i < pFormatText->Count(); i++) if(*pFormatText->GetObject(i) == rShortTxt) { - bEnableNew = FALSE; + bEnableNew = sal_False; break; } } @@ -1567,12 +1567,12 @@ typedef StringsArrays* StringsArraysPtr; /* -----------------19.11.98 16:07------------------- * * --------------------------------------------------*/ -BOOL lcl_FindInArray(SvStringsDtor& rStrings, const String& rString) +sal_Bool lcl_FindInArray(SvStringsDtor& rStrings, const String& rString) { - for(USHORT i = 0; i < rStrings.Count(); i++) + for(sal_uInt16 i = 0; i < rStrings.Count(); i++) if(rString == *rStrings.GetObject(i)) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } void lcl_ClearTable(StringsTable& rTable) @@ -1655,7 +1655,7 @@ void OfaAutocorrExceptPage::ActivatePage( const SfxItemSet& ) { if(eLang != eLastDialogLanguage) SetLanguage(eLastDialogLanguage); - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(TRUE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_True); } /* -----------------20.11.98 13:26------------------- * @@ -1668,7 +1668,7 @@ int OfaAutocorrExceptPage::DeactivatePage( SfxItemSet* ) --------------------------------------------------*/ -BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); StringsArraysPtr pArrays = aStringsTable.Last(); @@ -1681,8 +1681,8 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) if(pWrdList) { - USHORT nCount = pWrdList->Count(); - USHORT i; + sal_uInt16 nCount = pWrdList->Count(); + sal_uInt16 i; for( i = nCount; i; ) { String* pString = pWrdList->GetObject( --i ); @@ -1704,8 +1704,8 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) if(pCplList) { - USHORT nCount = pCplList->Count(); - USHORT i; + sal_uInt16 nCount = pCplList->Count(); + sal_uInt16 i; for( i = nCount; i; ) { String* pString = pCplList->GetObject( --i ); @@ -1730,8 +1730,8 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) if(pWrdList) { - USHORT nCount = pWrdList->Count(); - USHORT i; + sal_uInt16 nCount = pWrdList->Count(); + sal_uInt16 i; for( i = nCount; i; ) { String* pString = pWrdList->GetObject( --i ); @@ -1752,8 +1752,8 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) if(pCplList) { - USHORT nCount = pCplList->Count(); - USHORT i; + sal_uInt16 nCount = pCplList->Count(); + sal_uInt16 i; for( i = nCount; i; ) { String* pString = pCplList->GetObject( --i ); @@ -1773,7 +1773,7 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) pAutoCorrect->SetAutoCorrFlag( SaveWordCplSttLst, aAutoAbbrevCB.IsChecked()); if(aAutoCapsCB.IsChecked() != aAutoCapsCB.GetSavedValue()) pAutoCorrect->SetAutoCorrFlag( SaveWordWrdSttLst, aAutoCapsCB.IsChecked()); - return FALSE; + return sal_False; } /* -----------------23.11.98 10:33------------------- @@ -1784,7 +1784,7 @@ void OfaAutocorrExceptPage::SetLanguage(LanguageType eSet) if(eLang != eSet) { //alte Einstellungen speichern und neu fuellen - RefillReplaceBoxes(FALSE, eLang, eSet); + RefillReplaceBoxes(sal_False, eLang, eSet); eLastDialogLanguage = eSet; delete pCompareClass; pCompareClass = new CollatorWrapper( GetProcessFact() ); @@ -1798,7 +1798,7 @@ void OfaAutocorrExceptPage::SetLanguage(LanguageType eSet) /* -----------------20.11.98 14:06------------------- * * --------------------------------------------------*/ -void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, +void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool bFromReset, LanguageType eOldLanguage, LanguageType eNewLanguage) { @@ -1810,7 +1810,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, StringsArraysPtr pArrays = 0; if(aStringsTable.IsKeyValid(eOldLanguage)) { - pArrays = aStringsTable.Seek(ULONG(eOldLanguage)); + pArrays = aStringsTable.Seek(sal_uLong(eOldLanguage)); pArrays->aAbbrevStrings.DeleteAndDestroy( 0, pArrays->aAbbrevStrings.Count()); pArrays->aDoubleCapsStrings.DeleteAndDestroy( @@ -1819,10 +1819,10 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, else { pArrays = new StringsArrays; - aStringsTable.Insert(ULONG(eOldLanguage), pArrays); + aStringsTable.Insert(sal_uLong(eOldLanguage), pArrays); } - USHORT i; + sal_uInt16 i; for(i = 0; i < aAbbrevLB.GetEntryCount(); i++) { pArrays->aAbbrevStrings.Insert( @@ -1843,8 +1843,8 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, if(aStringsTable.IsKeyValid(eLang)) { - StringsArraysPtr pArrays = aStringsTable.Seek(ULONG(eLang)); - USHORT i; + StringsArraysPtr pArrays = aStringsTable.Seek(sal_uLong(eLang)); + sal_uInt16 i; for(i = 0; i < pArrays->aAbbrevStrings.Count(); i++ ) { aAbbrevLB.InsertEntry(*pArrays->aAbbrevStrings.GetObject(i)); @@ -1859,7 +1859,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); const SvStringsISortDtor* pCplList = pAutoCorrect->GetCplSttExceptList(eLang); const SvStringsISortDtor* pWrdList = pAutoCorrect->GetWrdSttExceptList(eLang); - USHORT i; + sal_uInt16 i; for( i = 0; i < pCplList->Count(); i++ ) { aAbbrevLB.InsertEntry(*pCplList->GetObject(i)); @@ -1878,7 +1878,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, void OfaAutocorrExceptPage::Reset( const SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); - RefillReplaceBoxes(TRUE, eLang, eLang); + RefillReplaceBoxes(sal_True, eLang, eLang); aAutoAbbrevCB. Check( pAutoCorrect->IsAutoCorrFlag( SaveWordCplSttLst )); aAutoCapsCB. Check( pAutoCorrect->IsAutoCorrFlag( SaveWordWrdSttLst )); aAutoAbbrevCB.SaveValue(); @@ -1926,13 +1926,13 @@ IMPL_LINK(OfaAutocorrExceptPage, SelectHdl, ListBox*, pBox) if(pBox == &aAbbrevLB) { aAbbrevED.SetText(pBox->GetSelectEntry()); - aNewAbbrevPB.Enable(FALSE); + aNewAbbrevPB.Enable(sal_False); aDelAbbrevPB.Enable(); } else { aDoubleCapsED.SetText(pBox->GetSelectEntry()); - aNewDoublePB.Enable(FALSE); + aNewDoublePB.Enable(sal_False); aDelDoublePB.Enable(); } return 0; @@ -1944,12 +1944,12 @@ IMPL_LINK(OfaAutocorrExceptPage, SelectHdl, ListBox*, pBox) IMPL_LINK(OfaAutocorrExceptPage, ModifyHdl, Edit*, pEdt) { -// BOOL bSame = pEdt->GetText() == ->GetSelectEntry(); +// sal_Bool bSame = pEdt->GetText() == ->GetSelectEntry(); const String& sEntry = pEdt->GetText(); - BOOL bEntryLen = 0!= sEntry.Len(); + sal_Bool bEntryLen = 0!= sEntry.Len(); if(pEdt == &aAbbrevED) { - BOOL bSame = lcl_FindEntry(aAbbrevLB, sEntry, *pCompareClass); + sal_Bool bSame = lcl_FindEntry(aAbbrevLB, sEntry, *pCompareClass); if(bSame && sEntry != aAbbrevLB.GetSelectEntry()) pEdt->SetText(aAbbrevLB.GetSelectEntry()); aNewAbbrevPB.Enable(!bSame && bEntryLen); @@ -1957,7 +1957,7 @@ IMPL_LINK(OfaAutocorrExceptPage, ModifyHdl, Edit*, pEdt) } else { - BOOL bSame = lcl_FindEntry(aDoubleCapsLB, sEntry, *pCompareClass); + sal_Bool bSame = lcl_FindEntry(aDoubleCapsLB, sEntry, *pCompareClass); if(bSame && sEntry != aDoubleCapsLB.GetSelectEntry()) pEdt->SetText(aDoubleCapsLB.GetSelectEntry()); aNewDoublePB.Enable(!bSame && bEntryLen); @@ -1973,7 +1973,7 @@ IMPL_LINK(OfaAutocorrExceptPage, ModifyHdl, Edit*, pEdt) void AutoCorrEdit::KeyInput( const KeyEvent& rKEvt ) { const KeyCode aKeyCode = rKEvt.GetKeyCode(); - const USHORT nModifier = aKeyCode.GetModifier(); + const sal_uInt16 nModifier = aKeyCode.GetModifier(); if( aKeyCode.GetCode() == KEY_RETURN ) { //wird bei Enter nichts getan, dann doch die Basisklasse rufen @@ -1995,7 +1995,7 @@ enum OfaQuoteOptions REPLACE_1ST }; -SvLBoxEntry* OfaQuoteTabPage::CreateEntry(String& rTxt, USHORT nCol) +SvLBoxEntry* OfaQuoteTabPage::CreateEntry(String& rTxt, sal_uInt16 nCol) { SvLBoxEntry* pEntry = new SvLBoxEntry; @@ -2060,14 +2060,14 @@ OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) : { FreeResource(); - BOOL bShowSWOptions = FALSE; + sal_Bool bShowSWOptions = sal_False; aCheckLB.SetHelpId( HID_OFAPAGE_QUOTE_CLB ); aSwCheckLB.SetHelpId( HID_OFAPAGE_QUOTE_SW_CLB ); - SFX_ITEMSET_ARG( &rSet, pItem, SfxBoolItem, SID_AUTO_CORRECT_DLG, FALSE ); + SFX_ITEMSET_ARG( &rSet, pItem, SfxBoolItem, SID_AUTO_CORRECT_DLG, sal_False ); if ( pItem && pItem->GetValue() ) - bShowSWOptions = TRUE; + bShowSWOptions = sal_True; if ( bShowSWOptions ) { @@ -2085,7 +2085,7 @@ OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) : sHeader += '\t'; aSwCheckLB.InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HIB_CENTER | HIB_VCENTER | HIB_FIXEDPOS | HIB_FIXED); - aCheckLB.Hide( TRUE ); + aCheckLB.Hide( sal_True ); } else { @@ -2118,7 +2118,7 @@ SfxTabPage* OfaQuoteTabPage::Create( Window* pParent, /*-----------------03.07.97 13:18------------------- --------------------------------------------------*/ -BOOL OfaQuoteTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaQuoteTabPage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); @@ -2126,17 +2126,17 @@ BOOL OfaQuoteTabPage::FillItemSet( SfxItemSet& ) if ( aCheckLB.IsVisible( ) ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; pAutoCorrect->SetAutoCorrFlag(AddNonBrkSpace, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(ChgOrdinalNumber, aCheckLB.IsChecked(nPos++)); } - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if ( aSwCheckLB.IsVisible( ) ) { SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); - BOOL bCheck = aSwCheckLB.IsChecked(ADD_NONBRK_SPACE, CBCOL_FIRST); + sal_Bool bCheck = aSwCheckLB.IsChecked(ADD_NONBRK_SPACE, CBCOL_FIRST); bModified |= pOpt->bAddNonBrkSpace != bCheck; pOpt->bAddNonBrkSpace = bCheck; pAutoCorrect->SetAutoCorrFlag(AddNonBrkSpace, @@ -2151,28 +2151,28 @@ BOOL OfaQuoteTabPage::FillItemSet( SfxItemSet& ) pAutoCorrect->SetAutoCorrFlag(ChgQuotes, aTypoCB.IsChecked()); pAutoCorrect->SetAutoCorrFlag(ChgSglQuotes, aSingleTypoCB.IsChecked()); - BOOL bReturn = nFlags != pAutoCorrect->GetFlags(); + sal_Bool bReturn = nFlags != pAutoCorrect->GetFlags(); if(cStartQuote != pAutoCorrect->GetStartDoubleQuote()) { - bReturn = TRUE; + bReturn = sal_True; sal_Unicode cUCS2 = static_cast<sal_Unicode>(cStartQuote); //TODO pAutoCorrect->SetStartDoubleQuote(cUCS2); } if(cEndQuote != pAutoCorrect->GetEndDoubleQuote()) { - bReturn = TRUE; + bReturn = sal_True; sal_Unicode cUCS2 = static_cast<sal_Unicode>(cEndQuote); //TODO pAutoCorrect->SetEndDoubleQuote(cUCS2); } if(cSglStartQuote != pAutoCorrect->GetStartSingleQuote()) { - bReturn = TRUE; + bReturn = sal_True; sal_Unicode cUCS2 = static_cast<sal_Unicode>(cSglStartQuote); //TODO pAutoCorrect->SetStartSingleQuote(cUCS2); } if(cSglEndQuote != pAutoCorrect->GetEndSingleQuote()) { - bReturn = TRUE; + bReturn = sal_True; sal_Unicode cUCS2 = static_cast<sal_Unicode>(cSglEndQuote); //TODO pAutoCorrect->SetEndSingleQuote(cUCS2); } @@ -2190,7 +2190,7 @@ BOOL OfaQuoteTabPage::FillItemSet( SfxItemSet& ) * --------------------------------------------------*/ void OfaQuoteTabPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(FALSE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_False); } /*-----------------03.07.97 13:18------------------- @@ -2205,7 +2205,7 @@ void OfaQuoteTabPage::Reset( const SfxItemSet& ) { SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); - aSwCheckLB.SetUpdateMode( FALSE ); + aSwCheckLB.SetUpdateMode( sal_False ); aSwCheckLB.Clear(); aSwCheckLB.GetModel()->Insert(CreateEntry(sNonBrkSpace, CBCOL_BOTH )); @@ -2216,23 +2216,23 @@ void OfaQuoteTabPage::Reset( const SfxItemSet& ) aSwCheckLB.CheckEntryPos( REPLACE_1ST, CBCOL_FIRST, pOpt->bChgOrdinalNumber ); aSwCheckLB.CheckEntryPos( REPLACE_1ST, CBCOL_SECOND, 0 != (nFlags & ChgOrdinalNumber) ); - aSwCheckLB.SetUpdateMode( TRUE ); + aSwCheckLB.SetUpdateMode( sal_True ); } // Initialize the non Sw options if ( aCheckLB.IsVisible( ) ) { - aCheckLB.SetUpdateMode( FALSE ); + aCheckLB.SetUpdateMode( sal_False ); aCheckLB.Clear( ); aCheckLB.InsertEntry( sNonBrkSpace ); aCheckLB.InsertEntry( sOrdinal ); - USHORT nPos = 0; + sal_uInt16 nPos = 0; aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & AddNonBrkSpace) ); aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & ChgOrdinalNumber) ); - aCheckLB.SetUpdateMode( TRUE ); + aCheckLB.SetUpdateMode( sal_True ); } // Initialize the quote stuffs @@ -2264,7 +2264,7 @@ void OfaQuoteTabPage::Reset( const SfxItemSet& ) IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn ) { - USHORT nMode = SGL_START; + sal_uInt16 nMode = SGL_START; if(pBtn == &aSglEndQuotePB) nMode = SGL_END; else if(pBtn == &aStartQuotePB) @@ -2272,7 +2272,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn ) else if(pBtn == &aEndQuotePB) nMode = DBL_END; // Zeichenauswahl-Dialog starten - SvxCharacterMap* pMap = new SvxCharacterMap( this, TRUE ); + SvxCharacterMap* pMap = new SvxCharacterMap( this, sal_True ); pMap->SetCharFont( OutputDevice::GetDefaultFont(DEFAULTFONT_LATIN_TEXT, LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE, 0 )); pMap->SetText(nMode < SGL_END ? sStartQuoteDlg : sEndQuoteDlg ); @@ -2285,22 +2285,22 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn ) case SGL_START: cDlg = cSglStartQuote; if(cDlg == 0) - cDlg = pAutoCorrect->GetQuote('\'',TRUE,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 + cDlg = pAutoCorrect->GetQuote('\'',sal_True,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 break; case SGL_END: cDlg = cSglEndQuote; if(cDlg == 0) - cDlg = pAutoCorrect->GetQuote('\'',FALSE,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 + cDlg = pAutoCorrect->GetQuote('\'',sal_False,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 break; case DBL_START: cDlg = cStartQuote; if(cDlg == 0) - cDlg = pAutoCorrect->GetQuote('\"',TRUE,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 + cDlg = pAutoCorrect->GetQuote('\"',sal_True,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 break; case DBL_END: cDlg = cEndQuote; if(cDlg == 0) - cDlg = pAutoCorrect->GetQuote('\"',FALSE,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 + cDlg = pAutoCorrect->GetQuote('\"',sal_False,eLang); //add by BerryJia for Bug95846 Time:2002-8-13 15:50 break; default: DBG_ERROR("svx::OfaQuoteTabPage::QuoteHdl(), how to initialize cDlg?" ); @@ -2410,7 +2410,7 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent, FreeResource(); // the defined KEYs - static const USHORT aKeyCodes[] = { + static const sal_uInt16 aKeyCodes[] = { KEY_END, KEY_RETURN, KEY_SPACE, @@ -2419,11 +2419,11 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent, 0 }; - for( const USHORT* pKeys = aKeyCodes; *pKeys; ++pKeys ) + for( const sal_uInt16* pKeys = aKeyCodes; *pKeys; ++pKeys ) { KeyCode aKCode( *pKeys ); - USHORT nPos = aDCBExpandKey.InsertEntry( aKCode.GetName() ); - aDCBExpandKey.SetEntryData( nPos, (void*)(ULONG)*pKeys ); + sal_uInt16 nPos = aDCBExpandKey.InsertEntry( aKCode.GetName() ); + aDCBExpandKey.SetEntryData( nPos, (void*)(sal_uLong)*pKeys ); if( KEY_RETURN == *pKeys ) // default to RETURN aDCBExpandKey.SelectEntryPos( nPos ); } @@ -2443,12 +2443,12 @@ SfxTabPage* OfaAutoCompleteTabPage::Create( Window* pParent, return new OfaAutoCompleteTabPage( pParent, rSet ); } -BOOL OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE, bCheck; + sal_Bool bModified = sal_False, bCheck; SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); - USHORT nVal; + sal_uInt16 nVal; bCheck = aCBActiv.IsChecked(); bModified |= pOpt->bAutoCompleteWords != bCheck; @@ -2466,25 +2466,25 @@ BOOL OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) bModified |= pOpt->bAutoCmpltShowAsTip != bCheck; pOpt->bAutoCmpltShowAsTip = bCheck; - nVal = (USHORT)aNFMinWordlen.GetValue(); + nVal = (sal_uInt16)aNFMinWordlen.GetValue(); bModified |= nVal != pOpt->nAutoCmpltWordLen; pOpt->nAutoCmpltWordLen = nVal; - nVal = (USHORT)aNFMaxEntries.GetValue(); + nVal = (sal_uInt16)aNFMaxEntries.GetValue(); bModified |= nVal != pOpt->nAutoCmpltListLen; pOpt->nAutoCmpltListLen = nVal; nVal = aDCBExpandKey.GetSelectEntryPos(); if( nVal < aDCBExpandKey.GetEntryCount() ) { - ULONG nKey = (ULONG)aDCBExpandKey.GetEntryData( nVal ); + sal_uLong nKey = (sal_uLong)aDCBExpandKey.GetEntryData( nVal ); bModified |= nKey != pOpt->nAutoCmpltExpandKey; - pOpt->nAutoCmpltExpandKey = (USHORT)nKey; + pOpt->nAutoCmpltExpandKey = (sal_uInt16)nKey; } if( pAutoCmpltList && nAutoCmpltListCnt != aLBEntries.GetEntryCount() ) { - bModified = TRUE; + bModified = sal_True; pOpt->pAutoCmpltList = pAutoCmpltList; } if( bModified ) @@ -2493,7 +2493,7 @@ BOOL OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) pCfg->SetModified(); pCfg->Commit(); } - return TRUE; + return sal_True; } void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) @@ -2512,9 +2512,9 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) // select the specific KeyCode: { - ULONG nKey = pOpt->nAutoCmpltExpandKey; - for( USHORT n = 0, nCnt = aDCBExpandKey.GetEntryCount(); n < nCnt; ++n ) - if( nKey == (ULONG)aDCBExpandKey.GetEntryData( n )) + sal_uLong nKey = pOpt->nAutoCmpltExpandKey; + for( sal_uInt16 n = 0, nCnt = aDCBExpandKey.GetEntryCount(); n < nCnt; ++n ) + if( nKey == (sal_uLong)aDCBExpandKey.GetEntryData( n )) { aDCBExpandKey.SelectEntryPos( n ); break; @@ -2526,10 +2526,10 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) pAutoCmpltList = (SvStringsISortDtor*)pOpt->pAutoCmpltList; pOpt->pAutoCmpltList = 0; nAutoCmpltListCnt = pAutoCmpltList->Count(); - for( USHORT n = 0; n < nAutoCmpltListCnt; ++n ) + for( sal_uInt16 n = 0; n < nAutoCmpltListCnt; ++n ) { const StringPtr pStr = pAutoCmpltList->GetObject( n ); - USHORT nPos = aLBEntries.InsertEntry( *pStr ); + sal_uInt16 nPos = aLBEntries.InsertEntry( *pStr ); aLBEntries.SetEntryData( nPos, (void*)pStr ); } } @@ -2545,15 +2545,15 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) void OfaAutoCompleteTabPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage( FALSE ); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage( sal_False ); } IMPL_LINK( OfaAutoCompleteTabPage, DeleteHdl, PushButton*, EMPTYARG ) { - USHORT nSelCnt = pAutoCmpltList ? aLBEntries.GetSelectEntryCount() : 0; + sal_uInt16 nSelCnt = pAutoCmpltList ? aLBEntries.GetSelectEntryCount() : 0; while( nSelCnt ) { - USHORT nPos = aLBEntries.GetSelectEntryPos( --nSelCnt ); + sal_uInt16 nPos = aLBEntries.GetSelectEntryPos( --nSelCnt ); const StringPtr pStr = (StringPtr)aLBEntries.GetEntryData( nPos ); aLBEntries.RemoveEntry( nPos ); nPos = pAutoCmpltList->GetPos( pStr ); @@ -2565,7 +2565,7 @@ IMPL_LINK( OfaAutoCompleteTabPage, DeleteHdl, PushButton*, EMPTYARG ) IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox ) { - BOOL bEnable = pBox->IsChecked(); + sal_Bool bEnable = pBox->IsChecked(); if( pBox == &aCBActiv ) { aCBAppendSpace.Enable( bEnable ); @@ -2580,7 +2580,7 @@ IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox ) void OfaAutoCompleteTabPage::CopyToClipboard() const { - USHORT nSelCnt = aLBEntries.GetSelectEntryCount(); + sal_uInt16 nSelCnt = aLBEntries.GetSelectEntryCount(); if( pAutoCmpltList && nSelCnt ) { TransferDataContainer* pCntnr = new TransferDataContainer; @@ -2597,7 +2597,7 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const rtl_TextEncoding nEncode = gsl_getSystemTextEncoding(); - for( USHORT n = 0; n < nSelCnt; ++n ) + for( sal_uInt16 n = 0; n < nSelCnt; ++n ) { sData += ByteString( aLBEntries.GetSelectEntry( n ), nEncode ); sData += pLineEnd; @@ -2686,8 +2686,8 @@ struct ImplSmartTagLBUserData */ void OfaSmartTagOptionsTabPage::ClearListBox() { - const ULONG nCount = m_aSmartTagTypesLB.GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + const sal_uLong nCount = m_aSmartTagTypesLB.GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { const SvLBoxEntry* pEntry = m_aSmartTagTypesLB.GetEntry(i); const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData()); @@ -2745,7 +2745,7 @@ void OfaSmartTagOptionsTabPage::FillListBox( const SmartTagMgr& rSmartTagMgr ) */ IMPL_LINK( OfaSmartTagOptionsTabPage, ClickHdl, PushButton*, EMPTYARG ) { - const USHORT nPos = m_aSmartTagTypesLB.GetSelectEntryPos(); + const sal_uInt16 nPos = m_aSmartTagTypesLB.GetSelectEntryPos(); const SvLBoxEntry* pEntry = m_aSmartTagTypesLB.GetEntry(nPos); const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData()); uno::Reference< smarttags::XSmartTagRecognizer > xRec = pUserData->mxRec; @@ -2762,7 +2762,7 @@ IMPL_LINK( OfaSmartTagOptionsTabPage, ClickHdl, PushButton*, EMPTYARG ) */ IMPL_LINK( OfaSmartTagOptionsTabPage, CheckHdl, CheckBox*, EMPTYARG ) { - const BOOL bEnable = m_aMainCB.IsChecked(); + const sal_Bool bEnable = m_aMainCB.IsChecked(); m_aSmartTagTypesLB.Enable( bEnable ); m_aSmartTagTypesLB.Invalidate(); m_aPropertiesPB.Enable( false ); @@ -2784,7 +2784,7 @@ IMPL_LINK(OfaSmartTagOptionsTabPage, SelectHdl, SvxCheckListBox*, EMPTYARG) if ( m_aSmartTagTypesLB.GetEntryCount() < 1 ) return 0; - const USHORT nPos = m_aSmartTagTypesLB.GetSelectEntryPos(); + const sal_uInt16 nPos = m_aSmartTagTypesLB.GetSelectEntryPos(); const SvLBoxEntry* pEntry = m_aSmartTagTypesLB.GetEntry(nPos); const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData()); uno::Reference< smarttags::XSmartTagRecognizer > xRec = pUserData->mxRec; @@ -2801,7 +2801,7 @@ IMPL_LINK(OfaSmartTagOptionsTabPage, SelectHdl, SvxCheckListBox*, EMPTYARG) /** Propagates the current settings to the smart tag manager. */ -BOOL OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); @@ -2809,19 +2809,19 @@ BOOL OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) // robust! if ( !pSmartTagMgr ) - return FALSE; + return sal_False; - BOOL bModifiedSmartTagTypes = FALSE; + sal_Bool bModifiedSmartTagTypes = sal_False; std::vector< rtl::OUString > aDisabledSmartTagTypes; - const ULONG nCount = m_aSmartTagTypesLB.GetEntryCount(); + const sal_uLong nCount = m_aSmartTagTypesLB.GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { const SvLBoxEntry* pEntry = m_aSmartTagTypesLB.GetEntry(i); const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData()); - const BOOL bChecked = m_aSmartTagTypesLB.IsChecked(i); - const BOOL bIsCurrentlyEnabled = pSmartTagMgr->IsSmartTagTypeEnabled( pUserData->maSmartTagType ); + const sal_Bool bChecked = m_aSmartTagTypesLB.IsChecked(i); + const sal_Bool bIsCurrentlyEnabled = pSmartTagMgr->IsSmartTagTypeEnabled( pUserData->maSmartTagType ); bModifiedSmartTagTypes = bModifiedSmartTagTypes || ( !bChecked != !bIsCurrentlyEnabled ); @@ -2831,7 +2831,7 @@ BOOL OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) delete pUserData; } - const BOOL bModifiedRecognize = ( !m_aMainCB.IsChecked() != !pSmartTagMgr->IsLabelTextWithSmartTags() ); + const sal_Bool bModifiedRecognize = ( !m_aMainCB.IsChecked() != !pSmartTagMgr->IsLabelTextWithSmartTags() ); if ( bModifiedSmartTagTypes || bModifiedRecognize ) { bool bLabelTextWithSmartTags = m_aMainCB.IsChecked() ? true : false; @@ -2839,7 +2839,7 @@ BOOL OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) bModifiedSmartTagTypes ? &aDisabledSmartTagTypes : 0 ); } - return TRUE; + return sal_True; } /** Sets the controls based on the current settings at SmartTagMgr. @@ -2862,6 +2862,6 @@ void OfaSmartTagOptionsTabPage::Reset( const SfxItemSet& ) void OfaSmartTagOptionsTabPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage( FALSE ); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage( sal_False ); } diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index f9d2b9078824..e7639e34fe7d 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -70,7 +70,7 @@ using namespace ::com::sun::star; // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_VIEW_FLD_PIC, SID_VIEW_FLD_PIC, SID_ATTR_BRUSH, SID_ATTR_BRUSH, @@ -83,10 +83,10 @@ struct SvxBackgroundTable_Impl SvxBrushItem* pCellBrush; SvxBrushItem* pRowBrush; SvxBrushItem* pTableBrush; - USHORT nCellWhich; - USHORT nRowWhich; - USHORT nTableWhich; - USHORT nActPos; + sal_uInt16 nCellWhich; + sal_uInt16 nRowWhich; + sal_uInt16 nTableWhich; + sal_uInt16 nActPos; SvxBackgroundTable_Impl() : pCellBrush(NULL), pRowBrush(NULL), pTableBrush(NULL), @@ -98,7 +98,7 @@ struct SvxBackgroundPara_Impl SvxBrushItem* pParaBrush; SvxBrushItem* pCharBrush; - USHORT nActPos; + sal_uInt16 nActPos; SvxBackgroundPara_Impl() : pParaBrush(NULL), pCharBrush(NULL) {} @@ -107,20 +107,20 @@ struct SvxBackgroundPara_Impl struct SvxBackgroundPage_Impl { Timer* pLoadTimer; - BOOL bIsImportDlgInExecute; + sal_Bool bIsImportDlgInExecute; SvxBackgroundPage_Impl() : - pLoadTimer(NULL), bIsImportDlgInExecute(FALSE) {} + pLoadTimer(NULL), bIsImportDlgInExecute(sal_False) {} }; /* -----------------------------15.08.2002 12:21------------------------------ ---------------------------------------------------------------------------*/ -inline BYTE lcl_PercentToTransparency(long nPercent) +inline sal_uInt8 lcl_PercentToTransparency(long nPercent) { //0xff must not be returned! - return BYTE(nPercent ? (50 + 0xfe * nPercent) / 100 : 0); + return sal_uInt8(nPercent ? (50 + 0xfe * nPercent) / 100 : 0); } -inline BYTE lcl_TransparencyToPercent(BYTE nTrans) +inline sal_uInt8 lcl_TransparencyToPercent(sal_uInt8 nTrans) { return (nTrans * 100 + 127) / 254; } @@ -136,11 +136,11 @@ void lcl_SetTransparency(SvxBrushItem& rBrush, long nTransparency) */ -USHORT GetItemId_Impl( ValueSet& rValueSet, const Color& rCol ) +sal_uInt16 GetItemId_Impl( ValueSet& rValueSet, const Color& rCol ) { - BOOL bFound = FALSE; - USHORT nCount = rValueSet.GetItemCount(); - USHORT n = 1; + sal_Bool bFound = sal_False; + sal_uInt16 nCount = rValueSet.GetItemCount(); + sal_uInt16 n = 1; while ( !bFound && n <= nCount ) { @@ -167,7 +167,7 @@ class BackgroundPreviewImpl : public Window { public: BackgroundPreviewImpl( Window* pParent, - const ResId& rResId, BOOL bIsBmpPreview ); + const ResId& rResId, sal_Bool bIsBmpPreview ); ~BackgroundPreviewImpl(); void NotifyChange( const Color& rColor ); @@ -178,12 +178,12 @@ protected: virtual void DataChanged( const DataChangedEvent& rDCEvt ); private: - const BOOL bIsBmp; + const sal_Bool bIsBmp; Bitmap* pBitmap; Point aDrawPos; Size aDrawSize; Rectangle aDrawRect; - BYTE nTransparency; + sal_uInt8 nTransparency; }; //----------------------------------------------------------------------- @@ -192,7 +192,7 @@ BackgroundPreviewImpl::BackgroundPreviewImpl ( Window* pParent, const ResId& rResId, - BOOL bIsBmpPreview + sal_Bool bIsBmpPreview ) : /* [Beschreibung] @@ -347,7 +347,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, aBackgroundColorSet ( &aBorderWin, CUI_RES( SET_BGDCOLOR ) ), aBackgroundColorBox ( this, CUI_RES( GB_BGDCOLOR ) ), pPreviewWin1 ( new BackgroundPreviewImpl( - this, CUI_RES( WIN_PREVIEW1 ), FALSE ) ), + this, CUI_RES( WIN_PREVIEW1 ), sal_False ) ), aColTransFT ( this, CUI_RES( FT_COL_TRANS ) ), aColTransMF ( this, CUI_RES( MF_COL_TRANS ) ), aBtnBrowse ( this, CUI_RES( BTN_BROWSE ) ), @@ -363,7 +363,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, aGraphTransFL ( this, CUI_RES( FL_GRAPH_TRANS ) ), aGraphTransMF ( this, CUI_RES( MF_GRAPH_TRANS ) ), pPreviewWin2 ( new BackgroundPreviewImpl( - this, CUI_RES( WIN_PREVIEW2 ), TRUE ) ), + this, CUI_RES( WIN_PREVIEW2 ), sal_True ) ), aSelectTxt ( this, CUI_RES( FT_SELECTOR ) ), aLbSelect ( this, CUI_RES( LB_SELECTOR ) ), aStrBrowse ( CUI_RES( STR_BROWSE ) ), @@ -372,12 +372,12 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, aTblLBox ( this, CUI_RES( LB_TBL_BOX ) ), aParaLBox ( this, CUI_RES( LB_PARA_BOX ) ), nHtmlMode ( 0 ), - bAllowShowSelector ( TRUE ), - bIsGraphicValid ( FALSE ), - bLinkOnly ( FALSE ), - bResized ( FALSE ), - bColTransparency ( FALSE ), - bGraphTransparency ( FALSE ), + bAllowShowSelector ( sal_True ), + bIsGraphicValid ( sal_False ), + bLinkOnly ( sal_False ), + bResized ( sal_False ), + bColTransparency ( sal_False ), + bGraphTransparency ( sal_False ), pPageImpl ( new SvxBackgroundPage_Impl ), pImportDlg ( NULL ), @@ -391,7 +391,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, const SfxPoolItem* pItem; SfxObjectShell* pShell; - if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_HTML_MODE, FALSE, &pItem ) + if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_HTML_MODE, sal_False, &pItem ) || ( 0 != ( pShell = SfxObjectShell::Current()) && 0 != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) ) { @@ -437,7 +437,7 @@ SvxBackgroundTabPage::~SvxBackgroundTabPage() //------------------------------------------------------------------------ -USHORT* SvxBackgroundTabPage::GetRanges() +sal_uInt16* SvxBackgroundTabPage::GetRanges() /* [Beschreibung] @@ -475,7 +475,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) // es muss aber im rSet vorhanden sein! // const SfxPoolItem* pX = GetOldItem( rSet, SID_VIEW_FLD_PIC ); // if( pX && pX->ISA(SfxWallpaperItem)) - if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), FALSE)) + if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), sal_False)) { ResetFromWallpaperItem( rSet ); return; @@ -486,17 +486,17 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) aBtnPreview.Check( aUserData.Len() && sal_Unicode('1') == aUserData.GetChar( 0 ) ); // nach Reset kein ShowSelector() mehr aufrufen d"urfen - bAllowShowSelector = FALSE; + bAllowShowSelector = sal_False; // Input-BrushItem besorgen und auswerten const SvxBrushItem* pBgdAttr = NULL; - USHORT nSlot = SID_ATTR_BRUSH; + sal_uInt16 nSlot = SID_ATTR_BRUSH; const SfxPoolItem* pItem; - USHORT nDestValue = USHRT_MAX; + sal_uInt16 nDestValue = USHRT_MAX; if ( SFX_ITEM_SET == rSet.GetItemState( SID_BACKGRND_DESTINATION, - FALSE, &pItem ) ) + sal_False, &pItem ) ) { nDestValue = ((const SfxUInt16Item*)pItem)->GetValue(); aTblLBox.SelectEntryPos(nDestValue); @@ -515,11 +515,11 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) } } else if( SFX_ITEM_SET == rSet.GetItemState( - SID_PARA_BACKGRND_DESTINATION, FALSE, &pItem ) ) + SID_PARA_BACKGRND_DESTINATION, sal_False, &pItem ) ) { nDestValue = ((const SfxUInt16Item*)pItem)->GetValue(); // ist gerade Zeichen aktiviert? - USHORT nParaSel = aParaLBox.GetSelectEntryPos(); + sal_uInt16 nParaSel = aParaLBox.GetSelectEntryPos(); if(1 == nParaSel) { // dann war das ein "Standard" - Aufruf @@ -540,9 +540,9 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) //#111173# the destination item is missing when the parent style has been changed if(USHRT_MAX == nDestValue && (aParaLBox.IsVisible()||aTblLBox.IsVisible())) nDestValue = 0; - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); - if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE ) pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) ); aBtnTile.Check(); @@ -569,7 +569,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) { if(aTblLBox.IsVisible()) { - USHORT nValue = aTblLBox.GetSelectEntryPos(); + sal_uInt16 nValue = aTblLBox.GetSelectEntryPos(); if ( pTableBck_Impl ) { @@ -583,21 +583,21 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) pTableBck_Impl->nActPos = nValue; nWhich = GetWhich( SID_ATTR_BRUSH ); - if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) ); pTableBck_Impl->pCellBrush = new SvxBrushItem(*pBgdAttr); } pTableBck_Impl->nCellWhich = nWhich; - if ( rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False ) >= SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( SID_ATTR_BRUSH_ROW ) ); pTableBck_Impl->pRowBrush = new SvxBrushItem(*pBgdAttr); } pTableBck_Impl->nRowWhich = SID_ATTR_BRUSH_ROW; - if ( rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False ) >= SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( SID_ATTR_BRUSH_TABLE ) ); pTableBck_Impl->pTableBrush = new SvxBrushItem(*pBgdAttr); @@ -609,7 +609,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) } else { - USHORT nValue = aParaLBox.GetSelectEntryPos(); + sal_uInt16 nValue = aParaLBox.GetSelectEntryPos(); if ( pParaBck_Impl ) { @@ -622,16 +622,16 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) pParaBck_Impl->nActPos = nValue; nWhich = GetWhich( SID_ATTR_BRUSH ); - if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) ); pParaBck_Impl->pParaBrush = new SvxBrushItem(*pBgdAttr); } nWhich = GetWhich( SID_ATTR_BRUSH_CHAR ); - SfxItemState eState = rSet.GetItemState( nWhich, TRUE ); - eState = rSet.GetItemState( nWhich, FALSE ); - if ( rSet.GetItemState( nWhich, TRUE ) > SFX_ITEM_AVAILABLE ) + SfxItemState eState = rSet.GetItemState( nWhich, sal_True ); + eState = rSet.GetItemState( nWhich, sal_False ); + if ( rSet.GetItemState( nWhich, sal_True ) > SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) ); pParaBck_Impl->pCharBrush = new SvxBrushItem(*pBgdAttr); @@ -671,12 +671,12 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) // Input-BrushItem besorgen und auswerten const SvxBrushItem* pBgdAttr = NULL; - USHORT nSlot = SID_VIEW_FLD_PIC; - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nSlot = SID_VIEW_FLD_PIC; + sal_uInt16 nWhich = GetWhich( nSlot ); SvxBrushItem* pTemp = 0; const CntWallpaperItem* pItem = 0; - if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE ) { pItem = (const CntWallpaperItem*)&rSet.Get( nWhich ); pTemp = new SvxBrushItem( *pItem, nWhich ); @@ -692,7 +692,7 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) if( aBgdColor != pBgdAttr->GetColor() ) { aBgdColor = pBgdAttr->GetColor(); - USHORT nCol = GetItemId_Impl( aBackgroundColorSet, aBgdColor ); + sal_uInt16 nCol = GetItemId_Impl( aBackgroundColorSet, aBgdColor ); aBackgroundColorSet.SelectItem( nCol ); pPreviewWin1->NotifyChange( aBgdColor ); } @@ -708,10 +708,10 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) } // We now have always a link to the background - bLinkOnly = TRUE; - aBtnLink.Check( TRUE ); - aBtnLink.Show( FALSE ); -// if( !pItem || !pItem->GetWallpaper(FALSE).IsBitmap() ) + bLinkOnly = sal_True; + aBtnLink.Check( sal_True ); + aBtnLink.Show( sal_False ); +// if( !pItem || !pItem->GetWallpaper(sal_False).IsBitmap() ) // aBtnLink.Check(); delete pTemp; @@ -737,7 +737,7 @@ void SvxBackgroundTabPage::FillUserData() //------------------------------------------------------------------------ -BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) /* [Beschreibung] @@ -754,11 +754,11 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) // const SfxPoolItem* pX = GetOldItem( rCoreSet, SID_VIEW_FLD_PIC ); // if( pX && pX->ISA(SfxWallpaperItem)) - if(SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), FALSE)) + if(SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), sal_False)) return FillItemSetWithWallpaperItem( rCoreSet, SID_VIEW_FLD_PIC ); - BOOL bModified = FALSE; - USHORT nSlot = SID_ATTR_BRUSH; + sal_Bool bModified = sal_False; + sal_uInt16 nSlot = SID_ATTR_BRUSH; if ( aTblLBox.IsVisible() ) { @@ -787,18 +787,18 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) break; } } - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); const SfxPoolItem* pOld = GetOldItem( rCoreSet, nSlot ); - SfxItemState eOldItemState = rCoreSet.GetItemState(nSlot, FALSE); + SfxItemState eOldItemState = rCoreSet.GetItemState(nSlot, sal_False); const SfxItemSet& rOldSet = GetItemSet(); - BOOL bGraphTransparencyChanged = bGraphTransparency && (aGraphTransMF.GetText() != aGraphTransMF.GetSavedValue()); + sal_Bool bGraphTransparencyChanged = bGraphTransparency && (aGraphTransMF.GetText() != aGraphTransMF.GetSavedValue()); if ( pOld ) { const SvxBrushItem& rOldItem = (const SvxBrushItem&)*pOld; SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos(); - const BOOL bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() ); + const sal_Bool bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() ); // transparency has to be set if enabled, the color not already set to "No fill" and if( bColTransparency && @@ -817,10 +817,10 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( rOldItem.GetColor() != aBgdColor || (SFX_ITEM_AVAILABLE >= eOldItemState && !aBackgroundColorSet.IsNoSelection())) { - bModified = TRUE; + bModified = sal_True; rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) ); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rCoreSet.ClearItem( nWhich ); } else @@ -828,8 +828,8 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) // Bitmap-Behandlung: SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); - const BOOL bIsLink = aBtnLink.IsChecked(); - const BOOL bWasLink = (NULL != rOldItem.GetGraphicLink() ); + const sal_Bool bIsLink = aBtnLink.IsChecked(); + const sal_Bool bWasLink = (NULL != rOldItem.GetGraphicLink() ); if ( !bIsLink && !bIsGraphicValid ) @@ -844,7 +844,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) != aBgdGraphic.GetBitmap() ) ) { - bModified = TRUE; + bModified = sal_True; SvxBrushItem aTmpBrush(nWhich); if ( bIsLink ) @@ -862,7 +862,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) rCoreSet.Put(aTmpBrush); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rCoreSet.ClearItem( nWhich ); } } @@ -903,7 +903,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) else if ( SID_ATTR_BRUSH_CHAR == nSlot && aBgdColor != Color( COL_WHITE ) ) { rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) ); - bModified = TRUE; + bModified = sal_True; } if( aTblLBox.IsVisible() ) @@ -917,7 +917,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( *pTableBck_Impl->pCellBrush != *pOldCell ) { rCoreSet.Put( *pTableBck_Impl->pCellBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -929,7 +929,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( *pTableBck_Impl->pRowBrush != *pOldRow ) { rCoreSet.Put( *pTableBck_Impl->pRowBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -941,7 +941,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( *pTableBck_Impl->pTableBrush != *pOldTable ) { rCoreSet.Put( *pTableBck_Impl->pTableBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -949,7 +949,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) { rCoreSet.Put( SfxUInt16Item( SID_BACKGRND_DESTINATION, aTblLBox.GetSelectEntryPos() ) ); - bModified |= TRUE; + bModified |= sal_True; } } else if(aParaLBox.GetData() == &aParaLBox) @@ -963,7 +963,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( *pParaBck_Impl->pParaBrush != *pOldPara ) { rCoreSet.Put( *pParaBck_Impl->pParaBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -979,7 +979,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) *pParaBck_Impl->pCharBrush != SvxBrushItem(SID_ATTR_BRUSH_CHAR))) { rCoreSet.Put( *pParaBck_Impl->pCharBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -987,23 +987,23 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) { rCoreSet.Put( SfxUInt16Item( SID_BACKGRND_DESTINATION, aParaLBox.GetSelectEntryPos() ) ); - bModified |= TRUE; + bModified |= sal_True; } } return bModified; } -BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, USHORT nSlot) +sal_Bool SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, sal_uInt16 nSlot) { - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); const SfxPoolItem* pOld = GetOldItem( rCoreSet, nSlot ); const SfxItemSet& rOldSet = GetItemSet(); DBG_ASSERT(pOld,"FillItemSetWithWallpaperItem: Item not found"); SvxBrushItem rOldItem( (const CntWallpaperItem&)*pOld, nWhich ); SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos(); - const BOOL bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() ); - BOOL bModified = FALSE; + const sal_Bool bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() ); + sal_Bool bModified = sal_False; if ( ( (GPOS_NONE == eOldPos) && bIsBrush ) || ( (GPOS_NONE != eOldPos) && !bIsBrush ) ) // Brush <-> Bitmap gewechselt? @@ -1015,12 +1015,12 @@ BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, U // Brush-Behandlung: if ( rOldItem.GetColor() != aBgdColor ) { - bModified = TRUE; + bModified = sal_True; CntWallpaperItem aItem( nWhich ); aItem.SetColor( aBgdColor ); rCoreSet.Put( aItem ); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rCoreSet.ClearItem( nWhich ); } else @@ -1033,16 +1033,16 @@ BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, U int bBrushChanged = ( rOldItem.GetColor() != aBgdColor ); if( bBitmapChanged || bBrushChanged ) { - bModified = TRUE; + bModified = sal_True; CntWallpaperItem aItem( nWhich ); WallpaperStyle eWallStyle = SvxBrushItem::GraphicPos2WallpaperStyle(eNewPos); - aItem.SetStyle( sal::static_int_cast< USHORT >( eWallStyle ) ); + aItem.SetStyle( sal::static_int_cast< sal_uInt16 >( eWallStyle ) ); aItem.SetColor( aBgdColor ); aItem.SetBitmapURL( aBgdGraphicPath ); rCoreSet.Put( aItem ); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rCoreSet.ClearItem( nWhich ); } } @@ -1058,13 +1058,13 @@ BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, U { WallpaperStyle eWallStyle = SvxBrushItem::GraphicPos2WallpaperStyle( GetGraphicPosition_Impl() ); - aItem.SetStyle( sal::static_int_cast< USHORT >( eWallStyle ) ); + aItem.SetStyle( sal::static_int_cast< sal_uInt16 >( eWallStyle ) ); aItem.SetColor( aBgdColor ); aItem.SetBitmapURL( aBgdGraphicPath ); rCoreSet.Put( aItem ); } - bModified = TRUE; + bModified = sal_True; } return bModified; } @@ -1127,13 +1127,13 @@ void SvxBackgroundTabPage::ShowSelector() pPageImpl->pLoadTimer->SetTimeoutHdl( LINK( this, SvxBackgroundTabPage, LoadTimerHdl_Impl ) ); - bAllowShowSelector = FALSE; + bAllowShowSelector = sal_False; if(nHtmlMode & HTMLMODE_ON) { if(!(nHtmlMode & HTMLMODE_GRAPH_POS)) - aBtnPosition.Enable(FALSE); - aBtnArea.Enable(FALSE); + aBtnPosition.Enable(sal_False); + aBtnArea.Enable(sal_False); } } } @@ -1161,14 +1161,14 @@ void SvxBackgroundTabPage::RaiseLoadError_Impl() //------------------------------------------------------------------------ -BOOL SvxBackgroundTabPage::LoadLinkedGraphic_Impl() +sal_Bool SvxBackgroundTabPage::LoadLinkedGraphic_Impl() /* [Beschreibung] */ { - BOOL bResult = ( aBgdGraphicPath.Len() > 0 ) && + sal_Bool bResult = ( aBgdGraphicPath.Len() > 0 ) && ( GRFILTER_OK == GraphicFilter::LoadGraphic( aBgdGraphicPath, aBgdGraphicFilter, aBgdGraphic ) ); @@ -1190,14 +1190,14 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl() const SfxPoolItem* pItem = NULL; XColorTable* pColorTable = NULL; const Size aSize15x15 = Size( 15, 15 ); - FASTBOOL bOwn = FALSE; + FASTBOOL bOwn = sal_False; if ( pDocSh && ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) ) ) pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable(); if ( !pColorTable ) { - bOwn = TRUE; + bOwn = sal_True; pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() ); } @@ -1270,8 +1270,8 @@ void SvxBackgroundTabPage::ShowColorUI_Impl() aWndPosition.Hide(); aGbPosition.Hide(); pPreviewWin2->Hide(); - aGraphTransFL.Show(FALSE); - aGraphTransMF.Show(FALSE); + aGraphTransFL.Show(sal_False); + aGraphTransMF.Show(sal_False); if(bColTransparency) { aColTransFT.Show(); @@ -1318,8 +1318,8 @@ void SvxBackgroundTabPage::ShowBitmapUI_Impl() aGraphTransFL.Show(); aGraphTransMF.Show(); } - aColTransFT.Show(FALSE); - aColTransMF.Show(FALSE); + aColTransFT.Show(sal_False); + aColTransMF.Show(sal_False); } } @@ -1416,11 +1416,11 @@ IMPL_LINK( SvxBackgroundTabPage, BackgroundColorHdl_Impl, ValueSet*, EMPTYARG ) Handler, called when color selection is changed */ { - USHORT nItemId = aBackgroundColorSet.GetSelectItemId(); + sal_uInt16 nItemId = aBackgroundColorSet.GetSelectItemId(); Color aColor = nItemId ? ( aBackgroundColorSet.GetItemColor( nItemId ) ) : Color( COL_TRANSPARENT ); aBgdColor = aColor; pPreviewWin1->NotifyChange( aBgdColor ); - BOOL bEnableTransp = aBgdColor.GetTransparency() < 0xff; + sal_Bool bEnableTransp = aBgdColor.GetTransparency() < 0xff; aColTransFT.Enable(bEnableTransp); aColTransMF.Enable(bEnableTransp); return 0; @@ -1443,7 +1443,7 @@ IMPL_LINK( SvxBackgroundTabPage, SelectHdl_Impl, ListBox*, EMPTYARG ) else { ShowBitmapUI_Impl(); - aParaLBox.Enable(FALSE);// Zeichenhintergrund kann keine Bitmap sein + aParaLBox.Enable(sal_False);// Zeichenhintergrund kann keine Bitmap sein } return 0; } @@ -1535,16 +1535,16 @@ IMPL_LINK( SvxBackgroundTabPage, BrowseHdl_Impl, PushButton* , EMPTYARG ) { if ( pPageImpl->pLoadTimer->IsActive() ) return 0; - BOOL bHtml = 0 != ( nHtmlMode & HTMLMODE_ON ); + sal_Bool bHtml = 0 != ( nHtmlMode & HTMLMODE_ON ); pImportDlg = new SvxOpenGraphicDialog( aStrBrowse ); if ( bHtml || bLinkOnly ) pImportDlg->EnableLink(sal_False); pImportDlg->SetPath( aBgdGraphicPath, aBtnLink.IsChecked() ); - pPageImpl->bIsImportDlgInExecute = TRUE; + pPageImpl->bIsImportDlgInExecute = sal_True; short nErr = pImportDlg->Execute(); - pPageImpl->bIsImportDlgInExecute = FALSE; + pPageImpl->bIsImportDlgInExecute = sal_False; if( !nErr ) { @@ -1554,7 +1554,7 @@ IMPL_LINK( SvxBackgroundTabPage, BrowseHdl_Impl, PushButton* , EMPTYARG ) // dann die Vorschau aktivieren, damit der Anwender sieht, // welche Grafik er ausgew"ahlt hat if ( !aBtnLink.IsChecked() && !aBtnPreview.IsChecked() ) - aBtnPreview.Check( TRUE ); + aBtnPreview.Check( sal_True ); // timer-verz"ogertes Laden der Grafik pPageImpl->pLoadTimer->Start(); } @@ -1588,7 +1588,7 @@ IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, Timer* , pTimer ) // neue Datei gew"ahlt aBgdGraphicPath = pImportDlg->GetPath(); aBgdGraphicFilter = pImportDlg->GetCurrentFilter(); - BOOL bLink = ( nHtmlMode & HTMLMODE_ON ) || bLinkOnly ? TRUE : pImportDlg->IsAsLink(); + sal_Bool bLink = ( nHtmlMode & HTMLMODE_ON ) || bLinkOnly ? sal_True : pImportDlg->IsAsLink(); aBtnLink.Check( bLink ); aBtnLink.Enable(); @@ -1596,17 +1596,17 @@ IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, Timer* , pTimer ) { if( !pImportDlg->GetGraphic(aBgdGraphic) ) { - bIsGraphicValid = TRUE; + bIsGraphicValid = sal_True; } else { aBgdGraphicFilter.Erase(); aBgdGraphicPath.Erase(); - bIsGraphicValid = FALSE; + bIsGraphicValid = sal_False; } } else - bIsGraphicValid = FALSE; // Grafik erst beim Preview-Click laden + bIsGraphicValid = sal_False; // Grafik erst beim Preview-Click laden if ( aBtnPreview.IsChecked() && bIsGraphicValid ) { @@ -1641,7 +1641,7 @@ void SvxBackgroundTabPage::ShowTblControl() //----------------------------------------------------------------------- -void SvxBackgroundTabPage::ShowParaControl(BOOL bCharOnly) +void SvxBackgroundTabPage::ShowParaControl(sal_Bool bCharOnly) { aParaLBox.SetSelectHdl(HDL(ParaDestinationHdl_Impl)); aParaLBox.SelectEntryPos(0); @@ -1661,11 +1661,11 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) */ { - USHORT nSelPos = pBox->GetSelectEntryPos(); + sal_uInt16 nSelPos = pBox->GetSelectEntryPos(); if( pTableBck_Impl && pTableBck_Impl->nActPos != nSelPos) { SvxBrushItem** pActItem = new (SvxBrushItem*); - USHORT nWhich = 0; + sal_uInt16 nWhich = 0; switch(pTableBck_Impl->nActPos) { case TBL_DEST_CELL: @@ -1691,7 +1691,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) else { SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); - const BOOL bIsLink = aBtnLink.IsChecked(); + const sal_Bool bIsLink = aBtnLink.IsChecked(); if ( !bIsLink && !bIsGraphicValid ) bIsGraphicValid = LoadLinkedGraphic_Impl(); @@ -1740,7 +1740,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) { - USHORT nSelPos = pBox->GetSelectEntryPos(); + sal_uInt16 nSelPos = pBox->GetSelectEntryPos(); if( pParaBck_Impl && pParaBck_Impl->nActPos != nSelPos) { SvxBrushItem** pActItem = new (SvxBrushItem*); @@ -1756,13 +1756,13 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) pParaBck_Impl->nActPos = nSelPos; if(0 == aLbSelect.GetSelectEntryPos()) // Brush ausgewaehlt { - USHORT nWhich = (*pActItem)->Which(); + sal_uInt16 nWhich = (*pActItem)->Which(); **pActItem = SvxBrushItem( aBgdColor, nWhich ); } else { SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); - const BOOL bIsLink = aBtnLink.IsChecked(); + const sal_Bool bIsLink = aBtnLink.IsChecked(); if ( !bIsLink && !bIsGraphicValid ) bIsGraphicValid = LoadLinkedGraphic_Impl(); @@ -1786,7 +1786,7 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) case PARA_DEST_CHAR: { *pActItem = pParaBck_Impl->pCharBrush; - aLbSelect.Enable(FALSE); + aLbSelect.Enable(sal_False); } break; } @@ -1813,7 +1813,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, { aColTransMF.SetValue(lcl_TransparencyToPercent(rColor.GetTransparency())); aColTransMF.SaveValue(); - BOOL bEnableTransp = rColor.GetTransparency() < 0xff; + sal_Bool bEnableTransp = rColor.GetTransparency() < 0xff; aColTransFT.Enable(bEnableTransp); aColTransMF.Enable(bEnableTransp); //the default setting should be "no transparency" @@ -1828,7 +1828,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, Color aTrColor( COL_TRANSPARENT ); aBgdColor = rColor; - USHORT nCol = ( aTrColor != aBgdColor ) ? + sal_uInt16 nCol = ( aTrColor != aBgdColor ) ? GetItemId_Impl( aBackgroundColorSet, aBgdColor ) : 0; if( aTrColor != aBgdColor && nCol == 0) @@ -1847,8 +1847,8 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, aBgdGraphicPath.Erase(); if ( !rUserData.Len() ) - aBtnPreview.Check( FALSE ); - aBtnLink.Check( FALSE ); + aBtnPreview.Check( sal_False ); + aBtnLink.Check( sal_False ); aBtnLink.Disable(); pPreviewWin2->NotifyChange( NULL ); SetGraphicPosition_Impl( GPOS_TILED ); // Kacheln als Default @@ -1869,13 +1869,13 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" ); #endif aBgdGraphicPath = *pStrLink; - aBtnLink.Check( TRUE ); + aBtnLink.Check( sal_True ); aBtnLink.Enable(); } else { aBgdGraphicPath.Erase(); - aBtnLink.Check( FALSE ); + aBtnLink.Check( sal_False ); aBtnLink.Disable(); } @@ -1908,7 +1908,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, else if ( pGraphic ) { aBgdGraphic = *pGraphic; - bIsGraphicValid = TRUE; + bIsGraphicValid = sal_True; if ( !rUserData.Len() ) aBtnPreview.Check(); @@ -1916,10 +1916,10 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, else { RaiseLoadError_Impl(); - bIsGraphicValid = FALSE; + bIsGraphicValid = sal_False; if ( !rUserData.Len() ) - aBtnPreview.Check( FALSE ); + aBtnPreview.Check( sal_False ); } } @@ -1937,7 +1937,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, /* -----------------------------09.08.2002 14:04------------------------------ ---------------------------------------------------------------------------*/ -void SvxBackgroundTabPage::EnableTransparency(BOOL bColor, BOOL bGraphic) +void SvxBackgroundTabPage::EnableTransparency(sal_Bool bColor, sal_Bool bGraphic) { bColTransparency = bColor; bGraphTransparency = bGraphic; @@ -1964,7 +1964,7 @@ void SvxBackgroundTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,sal_False); if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_SHOW_TBLCTL ) == SVX_SHOW_TBLCTL ) ShowTblControl(); if ( ( nFlags & SVX_SHOW_PARACTL ) == SVX_SHOW_PARACTL ) @@ -1972,6 +1972,6 @@ void SvxBackgroundTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 if ( ( nFlags & SVX_SHOW_SELECTOR ) == SVX_SHOW_SELECTOR ) ShowSelector(); if ( ( nFlags & SVX_ENABLE_TRANSPARENCY ) == SVX_ENABLE_TRANSPARENCY ) - EnableTransparency(TRUE, TRUE); + EnableTransparency(sal_True, sal_True); } } diff --git a/cui/source/tabpages/bbdlg.cxx b/cui/source/tabpages/bbdlg.cxx index 8cae4b77cc62..79bf90a5606c 100644 --- a/cui/source/tabpages/bbdlg.cxx +++ b/cui/source/tabpages/bbdlg.cxx @@ -43,7 +43,7 @@ SvxBorderBackgroundDlg::SvxBorderBackgroundDlg( Window *pParent, const SfxItemSet& rCoreSet, - BOOL bEnableSelector ) : + sal_Bool bEnableSelector ) : SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_BBDLG ), &rCoreSet ), bEnableBackgroundSelector( bEnableSelector ) @@ -61,7 +61,7 @@ SvxBorderBackgroundDlg::~SvxBorderBackgroundDlg() // ----------------------------------------------------------------------- -void SvxBorderBackgroundDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage ) +void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) { // Umschalten zwischen Farbe/Grafik ermoeglichen: diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 0c1c1c7b269c..9140a2f0e4c2 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -75,7 +75,7 @@ // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_SHADOW, SID_ATTR_ALIGN_MARGIN, SID_ATTR_ALIGN_MARGIN, @@ -85,7 +85,7 @@ static USHORT pRanges[] = 0 }; -BOOL SvxBorderTabPage::bSync = TRUE; +sal_Bool SvxBorderTabPage::bSync = sal_True; //------------------------------------------------------------------------ @@ -222,7 +222,7 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent, /* Use SvxMarginItem instead of margins from SvxBoxItem, if present. -> Remember this state in mbUseMarginItem, because other special handling is needed across various functions... */ - mbUseMarginItem = rCoreAttrs.GetItemState(GetWhich(SID_ATTR_ALIGN_MARGIN),TRUE) != SFX_ITEM_UNKNOWN; + mbUseMarginItem = rCoreAttrs.GetItemState(GetWhich(SID_ATTR_ALIGN_MARGIN),sal_True) != SFX_ITEM_UNKNOWN; // Metrik einstellen FieldUnit eFUnit = GetModuleFieldUnit( rCoreAttrs ); @@ -263,10 +263,10 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent, SetFieldUnit( aEdShadowSize, eFUnit ); - USHORT nWhich = GetWhich( SID_ATTR_BORDER_INNER, sal_False ); - BOOL bIsDontCare = TRUE; + sal_uInt16 nWhich = GetWhich( SID_ATTR_BORDER_INNER, sal_False ); + sal_Bool bIsDontCare = sal_True; - if ( rCoreAttrs.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE ) + if ( rCoreAttrs.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { // Absatz oder Tabelle const SvxBoxInfoItem* pBoxInfo = @@ -358,14 +358,14 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent, if ( pColorTable ) { // fuellen der Linienfarben-Box - aLbLineColor.SetUpdateMode( FALSE ); + aLbLineColor.SetUpdateMode( sal_False ); for ( long i = 0; i < pColorTable->Count(); ++i ) { XColorEntry* pEntry = pColorTable->GetColor(i); aLbLineColor.InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - aLbLineColor.SetUpdateMode( TRUE ); + aLbLineColor.SetUpdateMode( sal_True ); // dann nur noch in die Schattenfarben-Box kopieren aLbShadowColor.CopyEntries( aLbLineColor ); } @@ -404,7 +404,7 @@ SvxBorderTabPage::~SvxBorderTabPage() // ----------------------------------------------------------------------- -USHORT* SvxBorderTabPage::GetRanges() +sal_uInt16* SvxBorderTabPage::GetRanges() { return pRanges; } @@ -438,7 +438,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) const SvxBoxItem* pBoxItem; const SvxBoxInfoItem* pBoxInfoItem; - USHORT nWhichBox = GetWhich(SID_ATTR_BORDER_OUTER); + sal_uInt16 nWhichBox = GetWhich(SID_ATTR_BORDER_OUTER); SfxMapUnit eCoreUnit; const Color aColBlack = RGBCOL(COL_BLACK); @@ -482,9 +482,9 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) if ( pBoxInfoItem->IsDist() ) { - if( rSet.GetItemState( nWhichBox, TRUE ) >= SFX_ITEM_DEFAULT ) + if( rSet.GetItemState( nWhichBox, sal_True ) >= SFX_ITEM_DEFAULT ) { - BOOL bIsAnyBorderVisible = aFrameSel.IsAnyBorderVisible(); + sal_Bool bIsAnyBorderVisible = aFrameSel.IsAnyBorderVisible(); if( !bIsAnyBorderVisible || !pBoxInfoItem->IsMinDist() ) { aLeftMF.SetMin( 0 ); @@ -513,7 +513,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) // or it is null with an active border line // no automatic changes should be made const long nDefDist = bIsAnyBorderVisible ? pBoxInfoItem->GetDefDist() : 0; - BOOL bDiffDist = (nDefDist != nLeftDist || + sal_Bool bDiffDist = (nDefDist != nLeftDist || nDefDist != nRightDist || nDefDist != nTopDist || nDefDist != nBottomDist); @@ -553,7 +553,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) //------------------------------------------------------------- { // Do all visible lines show the same line widths? - USHORT nPrim, nDist, nSecn; + sal_uInt16 nPrim, nDist, nSecn; bool bWidthEq = aFrameSel.GetVisibleWidth( nPrim, nDist, nSecn ); if( bWidthEq ) aLbLineStyle.SelectEntry( nPrim * 100, nSecn * 100, nDist * 100 ); @@ -566,7 +566,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) if( !bColorEq ) aColor.SetColor( COL_BLACK ); - USHORT nSelPos = aLbLineColor.GetEntryPos( aColor ); + sal_uInt16 nSelPos = aLbLineColor.GetEntryPos( aColor ); if( nSelPos == LISTBOX_ENTRY_NOTFOUND ) nSelPos = aLbLineColor.InsertEntry( aColor, SVX_RESSTR( RID_SVXSTR_COLOR_USER ) ); @@ -582,7 +582,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) SelColHdl_Impl( &aLbLineColor ); } - BOOL bEnable = aWndShadows.GetSelectItemId() > 1 ; + sal_Bool bEnable = aWndShadows.GetSelectItemId() > 1 ; aFtShadowSize.Enable(bEnable); aEdShadowSize.Enable(bEnable); aFtShadowColor.Enable(bEnable); @@ -600,11 +600,11 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) const SfxPoolItem* pItem; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) || + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) { - USHORT nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue(); if(nHtmlMode & HTMLMODE_ON) { //Im Html-Mode gibt es keinen Schatten und nur komplette Umrandungen @@ -616,14 +616,14 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) aLbShadowColor.Disable(); aFlShadow .Disable(); - USHORT nLBCount = aLbLineStyle.GetEntryCount(); + sal_uInt16 nLBCount = aLbLineStyle.GetEntryCount(); // ist es ein Absatzdialog, dann alle Linien fuer // Sw-Export, sonst ist die Page nicht da if(!(mbHorEnabled || mbVerEnabled) && 0 == (nHtmlMode & HTMLMODE_FULL_ABS_POS) && SFX_ITEM_AVAILABLE > rSet.GetItemState(GetWhich( SID_ATTR_PARA_LINESPACE ))) { - for( USHORT i = nLBCount - 1; i > LINESTYLE_HTML_MAX; --i) + for( sal_uInt16 i = nLBCount - 1; i > LINESTYLE_HTML_MAX; --i) aLbLineStyle.RemoveEntry(i); } @@ -655,13 +655,13 @@ int SvxBorderTabPage::DeactivatePage( SfxItemSet* _pSet ) #define IS_DONT_CARE(a) ((a).GetState() == svx::FRAMESTATE_DONTCARE ) -BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) +sal_Bool SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) { bool bAttrsChanged = SfxTabPage::FillItemSet( rCoreAttrs ); - BOOL bPut = TRUE; - USHORT nBoxWhich = GetWhich( SID_ATTR_BORDER_OUTER ); - USHORT nBoxInfoWhich = rCoreAttrs.GetPool()->GetWhich( SID_ATTR_BORDER_INNER, sal_False ); + sal_Bool bPut = sal_True; + sal_uInt16 nBoxWhich = GetWhich( SID_ATTR_BORDER_OUTER ); + sal_uInt16 nBoxInfoWhich = rCoreAttrs.GetPool()->GetWhich( SID_ATTR_BORDER_INNER, sal_False ); const SfxItemSet& rOldSet = GetItemSet(); SvxBoxItem aBoxItem ( nBoxWhich ); SvxBoxInfoItem aBoxInfoItem ( nBoxInfoWhich ); @@ -673,7 +673,7 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) //------------------ // Umrandung aussen: //------------------ - typedef ::std::pair<svx::FrameBorderType,USHORT> TBorderPair; + typedef ::std::pair<svx::FrameBorderType,sal_uInt16> TBorderPair; TBorderPair eTypes1[] = { TBorderPair(svx::FRAMEBORDER_TOP,BOX_LINE_TOP), TBorderPair(svx::FRAMEBORDER_BOTTOM,BOX_LINE_BOTTOM), @@ -703,7 +703,7 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) if( aLeftMF.IsVisible() ) { // #i40405# enable distance controls for next dialog call - aBoxInfoItem.SetDist( TRUE ); + aBoxInfoItem.SetDist( sal_True ); if( !mbUseMarginItem ) { @@ -734,10 +734,10 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) (pOldBoxInfoItem && !pOldBoxInfoItem->IsValid(VALID_DISTANCE)) ) { - aBoxItem.SetDistance( (USHORT)GetCoreValue( aLeftMF, eCoreUnit ), BOX_LINE_LEFT ); - aBoxItem.SetDistance( (USHORT)GetCoreValue( aRightMF, eCoreUnit ), BOX_LINE_RIGHT ); - aBoxItem.SetDistance( (USHORT)GetCoreValue( aTopMF, eCoreUnit ), BOX_LINE_TOP ); - aBoxItem.SetDistance( (USHORT)GetCoreValue( aBottomMF, eCoreUnit ), BOX_LINE_BOTTOM); + aBoxItem.SetDistance( (sal_uInt16)GetCoreValue( aLeftMF, eCoreUnit ), BOX_LINE_LEFT ); + aBoxItem.SetDistance( (sal_uInt16)GetCoreValue( aRightMF, eCoreUnit ), BOX_LINE_RIGHT ); + aBoxItem.SetDistance( (sal_uInt16)GetCoreValue( aTopMF, eCoreUnit ), BOX_LINE_TOP ); + aBoxItem.SetDistance( (sal_uInt16)GetCoreValue( aBottomMF, eCoreUnit ), BOX_LINE_BOTTOM); } else { @@ -746,10 +746,10 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) aBoxItem.SetDistance(pOldBoxItem->GetDistance(BOX_LINE_TOP ), BOX_LINE_TOP); aBoxItem.SetDistance(pOldBoxItem->GetDistance(BOX_LINE_BOTTOM), BOX_LINE_BOTTOM); } - aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE ); + aBoxInfoItem.SetValid( VALID_DISTANCE, sal_True ); } else - aBoxInfoItem.SetValid( VALID_DISTANCE, FALSE ); + aBoxInfoItem.SetValid( VALID_DISTANCE, sal_False ); } } } @@ -767,13 +767,13 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) // // Put oder Clear der Umrandung? // - bPut = TRUE; + bPut = sal_True; - if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxWhich, FALSE )) + if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxWhich, sal_False )) { bPut = aBoxItem != (const SvxBoxItem&)(rOldSet.Get(nBoxWhich)) ? sal_True : sal_False; } - if( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxInfoWhich, FALSE ) ) + if( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxInfoWhich, sal_False ) ) { const SvxBoxInfoItem& rOldBoxInfo = (const SvxBoxInfoItem&) rOldSet.Get(nBoxInfoWhich); @@ -788,14 +788,14 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) if ( !pOldBoxItem || !( *pOldBoxItem == aBoxItem ) ) { rCoreAttrs.Put( aBoxItem ); - bAttrsChanged |= TRUE; + bAttrsChanged |= sal_True; } pOld = GetOldItem( rCoreAttrs, SID_ATTR_BORDER_INNER, sal_False ); if ( !pOld || !( *(const SvxBoxInfoItem*)pOld == aBoxInfoItem ) ) { rCoreAttrs.Put( aBoxInfoItem ); - bAttrsChanged |= TRUE; + bAttrsChanged |= sal_True; } } else @@ -859,7 +859,7 @@ IMPL_LINK( SvxBorderTabPage, SelPreHdl_Impl, void *, EMPTYARG ) aFrameSel.DeselectAllBorders(); // Using image ID to find correct line in table above. - USHORT nLine = GetPresetImageId( aWndPresets.GetSelectItemId() ) - 1; + sal_uInt16 nLine = GetPresetImageId( aWndPresets.GetSelectItemId() ) - 1; // Apply all styles from the table for( int nBorder = 0; nBorder < svx::FRAMEBORDERTYPE_COUNT; ++nBorder ) @@ -896,7 +896,7 @@ IMPL_LINK( SvxBorderTabPage, SelPreHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxBorderTabPage, SelSdwHdl_Impl, void *, EMPTYARG ) { - BOOL bEnable = aWndShadows.GetSelectItemId() > 1; + sal_Bool bEnable = aWndShadows.GetSelectItemId() > 1; aFtShadowSize.Enable(bEnable); aEdShadowSize.Enable(bEnable); aFtShadowColor.Enable(bEnable); @@ -925,9 +925,9 @@ IMPL_LINK( SvxBorderTabPage, SelStyleHdl_Impl, ListBox *, pLb ) { if ( pLb == &aLbLineStyle ) aFrameSel.SetStyleToSelection( - static_cast< USHORT >( aLbLineStyle.GetSelectEntryLine1() / 100 ), - static_cast< USHORT >( aLbLineStyle.GetSelectEntryDistance() / 100 ), - static_cast< USHORT >( aLbLineStyle.GetSelectEntryLine2() / 100 ) ); + static_cast< sal_uInt16 >( aLbLineStyle.GetSelectEntryLine1() / 100 ), + static_cast< sal_uInt16 >( aLbLineStyle.GetSelectEntryDistance() / 100 ), + static_cast< sal_uInt16 >( aLbLineStyle.GetSelectEntryLine2() / 100 ) ); return 0; } @@ -937,17 +937,17 @@ IMPL_LINK( SvxBorderTabPage, SelStyleHdl_Impl, ListBox *, pLb ) // ============================================================================ // number of preset images to show -const USHORT SVX_BORDER_PRESET_COUNT = 5; +const sal_uInt16 SVX_BORDER_PRESET_COUNT = 5; // number of shadow images to show -const USHORT SVX_BORDER_SHADOW_COUNT = 5; +const sal_uInt16 SVX_BORDER_SHADOW_COUNT = 5; // ---------------------------------------------------------------------------- -USHORT SvxBorderTabPage::GetPresetImageId( USHORT nValueSetIdx ) const +sal_uInt16 SvxBorderTabPage::GetPresetImageId( sal_uInt16 nValueSetIdx ) const { // table with all sets of predefined border styles - static const USHORT ppnImgIds[][ SVX_BORDER_PRESET_COUNT ] = + static const sal_uInt16 ppnImgIds[][ SVX_BORDER_PRESET_COUNT ] = { // simple cell without diagonal frame borders { IID_PRE_CELL_NONE, IID_PRE_CELL_ALL, IID_PRE_CELL_LR, IID_PRE_CELL_TB, IID_PRE_CELL_L }, @@ -977,10 +977,10 @@ USHORT SvxBorderTabPage::GetPresetImageId( USHORT nValueSetIdx ) const return ppnImgIds[ nLine ][ nValueSetIdx - 1 ]; } -USHORT SvxBorderTabPage::GetPresetStringId( USHORT nValueSetIdx ) const +sal_uInt16 SvxBorderTabPage::GetPresetStringId( sal_uInt16 nValueSetIdx ) const { // string resource IDs for each image (in order of the IID_PRE_* image IDs) - static const USHORT pnStrIds[] = + static const sal_uInt16 pnStrIds[] = { RID_SVXSTR_TABLE_PRESET_NONE, RID_SVXSTR_PARA_PRESET_ALL, @@ -1025,7 +1025,7 @@ void SvxBorderTabPage::FillPresetVS() aWndPresets.SetSizePixel( aWndPresets.CalcWindowSizePixel( aImgSize ) ); // insert images and help texts - for( USHORT nVSIdx = 1; nVSIdx <= SVX_BORDER_PRESET_COUNT; ++nVSIdx ) + for( sal_uInt16 nVSIdx = 1; nVSIdx <= SVX_BORDER_PRESET_COUNT; ++nVSIdx ) { aWndPresets.InsertItem( nVSIdx ); aWndPresets.SetItemImage( nVSIdx, rImgList.GetImage( GetPresetImageId( nVSIdx ) ) ); @@ -1052,14 +1052,14 @@ void SvxBorderTabPage::FillShadowVS() aWndShadows.SetSizePixel( aWndShadows.CalcWindowSizePixel( aImgSize ) ); // image resource IDs - static const USHORT pnImgIds[ SVX_BORDER_SHADOW_COUNT ] = + static const sal_uInt16 pnImgIds[ SVX_BORDER_SHADOW_COUNT ] = { IID_SHADOWNONE, IID_SHADOW_BOT_RIGHT, IID_SHADOW_TOP_RIGHT, IID_SHADOW_BOT_LEFT, IID_SHADOW_TOP_LEFT }; // string resource IDs for each image - static const USHORT pnStrIds[ SVX_BORDER_SHADOW_COUNT ] = + static const sal_uInt16 pnStrIds[ SVX_BORDER_SHADOW_COUNT ] = { RID_SVXSTR_SHADOW_STYLE_NONE, RID_SVXSTR_SHADOW_STYLE_BOTTOMRIGHT, RID_SVXSTR_SHADOW_STYLE_TOPRIGHT, RID_SVXSTR_SHADOW_STYLE_BOTTOMLEFT, RID_SVXSTR_SHADOW_STYLE_TOPLEFT }; // insert images and help texts - for( USHORT nVSIdx = 1; nVSIdx <= SVX_BORDER_SHADOW_COUNT; ++nVSIdx ) + for( sal_uInt16 nVSIdx = 1; nVSIdx <= SVX_BORDER_SHADOW_COUNT; ++nVSIdx ) { aWndShadows.InsertItem( nVSIdx ); aWndShadows.SetItemImage( nVSIdx, rImgList.GetImage( pnImgIds[ nVSIdx - 1 ] ) ); @@ -1117,9 +1117,9 @@ IMPL_LINK( SvxBorderTabPage, LinesChanged_Impl, void*, EMPTYARG ) { if(!mbUseMarginItem && aLeftMF.IsVisible()) { - BOOL bLineSet = aFrameSel.IsAnyBorderVisible(); - BOOL bMinAllowed = 0 != (nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_TABLE)); - BOOL bSpaceModified = aLeftMF .IsModified()|| + sal_Bool bLineSet = aFrameSel.IsAnyBorderVisible(); + sal_Bool bMinAllowed = 0 != (nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_TABLE)); + sal_Bool bSpaceModified = aLeftMF .IsModified()|| aRightMF .IsModified()|| aTopMF .IsModified()|| aBottomMF.IsModified(); @@ -1160,7 +1160,7 @@ IMPL_LINK( SvxBorderTabPage, LinesChanged_Impl, void*, EMPTYARG ) } } //fuer Tabellen ist alles erlaubt - USHORT nValid = VALID_TOP|VALID_BOTTOM|VALID_LEFT|VALID_RIGHT; + sal_uInt16 nValid = VALID_TOP|VALID_BOTTOM|VALID_LEFT|VALID_RIGHT; //fuer Rahmen und Absatz wird das Edit disabled, wenn keine Border gesetzt ist if(nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_PARA)) diff --git a/cui/source/tabpages/borderconn.cxx b/cui/source/tabpages/borderconn.cxx index 0e9039b0d5b1..b46f24d5cbfd 100644 --- a/cui/source/tabpages/borderconn.cxx +++ b/cui/source/tabpages/borderconn.cxx @@ -51,7 +51,7 @@ of the tab page. class LineItemWrapper : public sfx::SingleItemWrapper< SvxLineItem, const SvxBorderLine* > { public: - inline explicit LineItemWrapper( USHORT nSlot ) : SingleItemWrapperType( nSlot ) {} + inline explicit LineItemWrapper( sal_uInt16 nSlot ) : SingleItemWrapperType( nSlot ) {} virtual const SvxBorderLine* GetItemValue( const SvxLineItem& rItem ) const { return rItem.GetLine(); } @@ -277,7 +277,7 @@ ShadowConnection::ShadowConnection( const SfxItemSet& rItemSet, // ============================================================================ // ============================================================================ -sfx::ItemConnectionBase* CreateFrameLineConnection( USHORT nSlot, +sfx::ItemConnectionBase* CreateFrameLineConnection( sal_uInt16 nSlot, FrameSelector& rFrameSel, FrameBorderType eBorder, sfx::ItemConnFlags nFlags ) { return new FrameLineConnection( nSlot, new FrameSelectorWrapper( rFrameSel, eBorder ), nFlags ); diff --git a/cui/source/tabpages/borderconn.hxx b/cui/source/tabpages/borderconn.hxx index 873a56e4fd3b..7ea7289d8ee4 100644 --- a/cui/source/tabpages/borderconn.hxx +++ b/cui/source/tabpages/borderconn.hxx @@ -44,7 +44,7 @@ class FrameSelector; /** Creates an item connection object that connects an SvxLineItem with an svx::FrameSelector control. */ -sfx::ItemConnectionBase* CreateFrameLineConnection( USHORT nSlot, +sfx::ItemConnectionBase* CreateFrameLineConnection( sal_uInt16 nSlot, FrameSelector& rFrameSel, FrameBorderType eBorder, sfx::ItemConnFlags nFlags = sfx::ITEMCONN_DEFAULT ); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 560074c4e80f..a3dc52bd43ad 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -104,7 +104,7 @@ using namespace ::com::sun::star; // static ---------------------------------------------------------------- -static USHORT pNameRanges[] = +static sal_uInt16 pNameRanges[] = { SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_WEIGHT, @@ -121,7 +121,7 @@ static USHORT pNameRanges[] = 0 }; -static USHORT pEffectsRanges[] = +static sal_uInt16 pEffectsRanges[] = { SID_ATTR_CHAR_SHADOWED, SID_ATTR_CHAR_UNDERLINE, @@ -142,7 +142,7 @@ static USHORT pEffectsRanges[] = 0 }; -static USHORT pPositionRanges[] = +static sal_uInt16 pPositionRanges[] = { SID_ATTR_CHAR_KERNING, SID_ATTR_CHAR_KERNING, @@ -157,7 +157,7 @@ static USHORT pPositionRanges[] = 0 }; -static USHORT pTwoLinesRanges[] = +static sal_uInt16 pTwoLinesRanges[] = { SID_ATTR_CHAR_TWO_LINES, SID_ATTR_CHAR_TWO_LINES, @@ -166,7 +166,7 @@ static USHORT pTwoLinesRanges[] = // C-Funktion ------------------------------------------------------------ -inline BOOL StateToAttr( TriState aState ) +inline sal_Bool StateToAttr( TriState aState ) { return ( STATE_CHECK == aState ); } @@ -194,11 +194,11 @@ inline SvxFont& SvxCharBasePage::GetPreviewCTLFont() // ----------------------------------------------------------------------- SvxCharBasePage::SvxCharBasePage( Window* pParent, const ResId& rResId, const SfxItemSet& rItemset, - USHORT nResIdPrewievWin, USHORT nResIdFontTypeFT ): + sal_uInt16 nResIdPrewievWin, sal_uInt16 nResIdFontTypeFT ): SfxTabPage( pParent, rResId, rItemset ), m_aPreviewWin( this, ResId( nResIdPrewievWin, *rResId.GetResMgr() ) ), m_aFontTypeFT( this, ResId( nResIdFontTypeFT, *rResId.GetResMgr() ) ), - m_bPreviewBackgroundToCharacter( FALSE ) + m_bPreviewBackgroundToCharacter( sal_False ) { } @@ -216,7 +216,7 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) SvxFont& rFont = GetPreviewFont(); SvxFont& rCJKFont = GetPreviewCJKFont(); SvxFont& rCTLFont = GetPreviewCTLFont(); - USHORT nWhich; + sal_uInt16 nWhich; nWhich = GetWhich( SID_CHAR_DLG_PREVIEW_STRING ); if( ISITEMSET ) @@ -325,7 +325,7 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) if( ISITEMSET ) { const SvxContourItem& rItem = ( SvxContourItem& ) rSet.Get( nWhich ); - BOOL bOutline = rItem.GetValue(); + sal_Bool bOutline = rItem.GetValue(); rFont.SetOutline( bOutline ); rCJKFont.SetOutline( bOutline ); rCTLFont.SetOutline( bOutline ); @@ -336,14 +336,14 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) if( ISITEMSET ) { const SvxShadowedItem& rItem = ( SvxShadowedItem& ) rSet.Get( nWhich ); - BOOL bShadow = rItem.GetValue(); + sal_Bool bShadow = rItem.GetValue(); rFont.SetShadow( bShadow ); rCJKFont.SetShadow( bShadow ); rCTLFont.SetShadow( bShadow ); } // Background - BOOL bTransparent; + sal_Bool bTransparent; nWhich = GetWhich( m_bPreviewBackgroundToCharacter ? SID_ATTR_BRUSH : SID_ATTR_BRUSH_CHAR ); if( ISITEMSET ) { @@ -355,7 +355,7 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) rCTLFont.SetFillColor( rColor ); } else - bTransparent = TRUE; + bTransparent = sal_True; rFont.SetTransparent( bTransparent ); rCJKFont.SetTransparent( bTransparent ); @@ -416,9 +416,9 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) // Escapement nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); - const BYTE nProp = 100; + const sal_uInt8 nProp = 100; short nEsc; - BYTE nEscProp; + sal_uInt8 nEscProp; if( ISITEMSET ) { const SvxEscapementItem& rItem = ( SvxEscapementItem& ) rSet.Get( nWhich ); @@ -446,9 +446,9 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -void SvxCharBasePage::SetPrevFontSize( const SfxItemSet& rSet, USHORT nSlot, SvxFont& rFont ) +void SvxCharBasePage::SetPrevFontSize( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont ) { - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); long nH; if( rSet.GetItemState( nWhich ) >= SFX_ITEM_SET ) { @@ -464,9 +464,9 @@ void SvxCharBasePage::SetPrevFontSize( const SfxItemSet& rSet, USHORT nSlot, Svx // ----------------------------------------------------------------------- -void SvxCharBasePage::SetPrevFont( const SfxItemSet& rSet, USHORT nSlot, SvxFont& rFont ) +void SvxCharBasePage::SetPrevFont( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont ) { - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); if( ISITEMSET ) { const SvxFontItem& rFontItem = ( SvxFontItem& ) rSet.Get( nWhich ); @@ -480,9 +480,9 @@ void SvxCharBasePage::SetPrevFont( const SfxItemSet& rSet, USHORT nSlot, SvxFont // ----------------------------------------------------------------------- -void SvxCharBasePage::SetPrevFontStyle( const SfxItemSet& rSet, USHORT nPosture, USHORT nWeight, SvxFont& rFont ) +void SvxCharBasePage::SetPrevFontStyle( const SfxItemSet& rSet, sal_uInt16 nPosture, sal_uInt16 nWeight, SvxFont& rFont ) { - USHORT nWhich = GetWhich( nPosture ); + sal_uInt16 nWhich = GetWhich( nPosture ); if( ISITEMSET ) { const SvxPostureItem& rItem = ( SvxPostureItem& ) rSet.Get( nWhich ); @@ -501,7 +501,7 @@ void SvxCharBasePage::SetPrevFontStyle( const SfxItemSet& rSet, USHORT nPosture, void SvxCharBasePage::SetPrevFontWidthScale( const SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); if( ISITEMSET ) { const SvxCharScaleWidthItem& rItem = ( SvxCharScaleWidthItem& ) rSet.Get( nWhich ); @@ -514,7 +514,7 @@ void SvxCharBasePage::SetPrevFontWidthScale( const SfxItemSet& rSet ) namespace { // ----------------------------------------------------------------------- - void setPrevFontEscapement(SvxFont& _rFont,BYTE nProp, BYTE nEscProp, short nEsc ) + void setPrevFontEscapement(SvxFont& _rFont,sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ) { _rFont.SetPropr( nProp ); _rFont.SetProprRel( nEscProp ); @@ -525,7 +525,7 @@ namespace } // ----------------------------------------------------------------------- -void SvxCharBasePage::SetPrevFontEscapement( BYTE nProp, BYTE nEscProp, short nEsc ) +void SvxCharBasePage::SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ) { setPrevFontEscapement(GetPreviewFont(),nProp,nEscProp,nEsc); setPrevFontEscapement(GetPreviewCJKFont(),nProp,nEscProp,nEsc); @@ -541,16 +541,16 @@ struct SvxCharNamePage_Impl String m_aNoStyleText; String m_aTransparentText; const FontList* m_pFontList; - USHORT m_nExtraEntryPos; - BOOL m_bMustDelete; - BOOL m_bInSearchMode; + sal_uInt16 m_nExtraEntryPos; + sal_Bool m_bMustDelete; + sal_Bool m_bInSearchMode; SvxCharNamePage_Impl() : m_pFontList ( NULL ), m_nExtraEntryPos( LISTBOX_ENTRY_NOTFOUND ), - m_bMustDelete ( FALSE ), - m_bInSearchMode ( FALSE ) + m_bMustDelete ( sal_False ), + m_bInSearchMode ( sal_False ) { m_aUpdateTimer.SetTimeout( 350 ); @@ -661,9 +661,9 @@ SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet ) : FreeResource(); - m_pWestFontLanguageLB->SetLanguageList( LANG_LIST_WESTERN, TRUE, FALSE, TRUE ); - m_pEastFontLanguageLB->SetLanguageList( LANG_LIST_CJK, TRUE, FALSE, TRUE ); - m_pCTLFontLanguageLB->SetLanguageList( LANG_LIST_CTL, TRUE, FALSE, TRUE ); + m_pWestFontLanguageLB->SetLanguageList( LANG_LIST_WESTERN, sal_True, sal_False, sal_True ); + m_pEastFontLanguageLB->SetLanguageList( LANG_LIST_CJK, sal_True, sal_False, sal_True ); + m_pCTLFontLanguageLB->SetLanguageList( LANG_LIST_CTL, sal_True, sal_False, sal_True ); Initialize(); } @@ -720,7 +720,7 @@ void SvxCharNamePage::Initialize() SfxObjectShell* pDocSh = SfxObjectShell::Current(); //DBG_ASSERT( pDocSh, "DocShell not found!" ); XColorTable* pColorTable = NULL; - FASTBOOL bKillTable = FALSE; + FASTBOOL bKillTable = sal_False; const SfxPoolItem* pItem = NULL; if ( pDocSh ) @@ -733,10 +733,10 @@ void SvxCharNamePage::Initialize() if ( !pColorTable ) { pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() ); - bKillTable = TRUE; + bKillTable = sal_True; } - m_pColorLB->SetUpdateMode( FALSE ); + m_pColorLB->SetUpdateMode( sal_False ); { SfxPoolItem* pDummy; @@ -752,7 +752,7 @@ void SvxCharNamePage::Initialize() m_pColorLB->InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - m_pColorLB->SetUpdateMode( TRUE ); + m_pColorLB->SetUpdateMode( sal_True ); if ( bKillTable ) delete pColorTable; @@ -795,14 +795,14 @@ const FontList* SvxCharNamePage::GetFontList() const DBG_ASSERT(NULL != ( (SvxFontListItem*)pItem )->GetFontList(), "Where is the font list?"); m_pImpl->m_pFontList = static_cast<const SvxFontListItem*>(pItem )->GetFontList()->Clone(); - m_pImpl->m_bMustDelete = TRUE; + m_pImpl->m_bMustDelete = sal_True; } } if(!m_pImpl->m_pFontList) { m_pImpl->m_pFontList = new FontList( Application::GetDefaultDevice() ); - m_pImpl->m_bMustDelete = TRUE; + m_pImpl->m_bMustDelete = sal_True; } } @@ -818,14 +818,14 @@ namespace const FontStyleBox* _pFontStyleLB, const FontSizeBox* _pFontSizeLB, const FontList* _pFontList, - USHORT _nFontWhich, - USHORT _nFontHeightWhich) + sal_uInt16 _nFontWhich, + sal_uInt16 _nFontHeightWhich) { Size aSize = _rFont.GetSize(); aSize.Width() = 0; FontInfo aFontInfo; String sFontName(_pFontNameLB->GetText()); - BOOL bFontAvailable = _pFontList->IsAvailable( sFontName ); + sal_Bool bFontAvailable = _pFontList->IsAvailable( sFontName ); if(bFontAvailable || _pFontNameLB->GetSavedValue() != sFontName) aFontInfo = _pFontList->Get( sFontName, _pFontStyleLB->GetText() ); else @@ -986,7 +986,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp FontSizeBox* pSizeBox = NULL; FixedText* pLangFT = NULL; SvxLanguageBox* pLangBox = NULL; - USHORT nWhich = 0; + sal_uInt16 nWhich = 0; switch ( eLangGrp ) { @@ -1047,8 +1047,8 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp FillStyleBox_Impl( pNameBox ); - FASTBOOL bStyle = FALSE; - FASTBOOL bStyleAvailable = TRUE; + FASTBOOL bStyle = sal_False; + FASTBOOL bStyleAvailable = sal_True; FontItalic eItalic = ITALIC_NONE; FontWeight eWeight = WEIGHT_NORMAL; switch ( eLangGrp ) @@ -1063,7 +1063,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp { const SvxPostureItem& rItem = (SvxPostureItem&)rSet.Get( nWhich ); eItalic = (FontItalic)rItem.GetValue(); - bStyle = TRUE; + bStyle = sal_True; } bStyleAvailable = bStyleAvailable && (eState >= SFX_ITEM_DONTCARE); @@ -1081,7 +1081,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp eWeight = (FontWeight)rItem.GetValue(); } else - bStyle = FALSE; + bStyle = sal_False; bStyleAvailable = bStyleAvailable && (eState >= SFX_ITEM_DONTCARE); // Aktuell eingestellter Font @@ -1122,7 +1122,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp if( rItem.GetProp() != 100 || SFX_MAPUNIT_RELATIVE != rItem.GetPropUnit() ) { - BOOL bPtRel = SFX_MAPUNIT_POINT == rItem.GetPropUnit(); + sal_Bool bPtRel = SFX_MAPUNIT_POINT == rItem.GetPropUnit(); pSizeBox->SetPtRelative( bPtRel ); pSizeBox->SetValue( bPtRel ? ((short)rItem.GetProp()) * 10 : rItem.GetProp() ); } @@ -1195,16 +1195,16 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp // ----------------------------------------------------------------------- -BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ) +sal_Bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; FontNameBox* pNameBox = NULL; FontStyleBox* pStyleBox = NULL; FontSizeBox* pSizeBox = NULL; SvxLanguageBox* pLangBox = NULL; - USHORT nWhich = 0; - USHORT nSlot = 0; + sal_uInt16 nWhich = 0; + sal_uInt16 nSlot = 0; switch ( eLangGrp ) { @@ -1240,11 +1240,11 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp const SfxItemSet* pExampleSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL; - FASTBOOL bChanged = TRUE; + FASTBOOL bChanged = sal_True; const String& rFontName = pNameBox->GetText(); const FontList* pFontList = GetFontList(); String aStyleBoxText =pStyleBox->GetText(); - USHORT nEntryPos = pStyleBox->GetEntryPos( aStyleBoxText ); + sal_uInt16 nEntryPos = pStyleBox->GetEntryPos( aStyleBoxText ); if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) aStyleBoxText.Erase(); FontInfo aInfo( pFontList->Get( rFontName, aStyleBoxText ) ); @@ -1257,27 +1257,27 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp const SvxFontItem& rItem = *( (const SvxFontItem*)pOld ); if ( rItem.GetFamilyName() == aFontItem.GetFamilyName() ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged ) bChanged = !pNameBox->GetSavedValue().Len(); if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && ( (SvxFontItem*)pItem )->GetFamilyName() != aFontItem.GetFamilyName() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && rFontName.Len() ) { rSet.Put( aFontItem ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rSet.ClearItem( nWhich ); - bChanged = TRUE; + bChanged = sal_True; switch ( eLangGrp ) { case Western : nSlot = SID_ATTR_CHAR_WEIGHT; break; @@ -1296,7 +1296,7 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp const SvxWeightItem& rItem = *( (const SvxWeightItem*)pOld ); if ( rItem.GetValue() == aWeightItem.GetValue() ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged ) @@ -1305,13 +1305,13 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( m_pImpl->m_bInSearchMode && bChanged && aInfo.GetWeight() == WEIGHT_NORMAL && aInfo.GetItalic() != ITALIC_NONE ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && ( (SvxWeightItem*)pItem )->GetValue() != aWeightItem.GetValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) bChanged = ( nEntryPos == m_pImpl->m_nExtraEntryPos ); @@ -1321,12 +1321,12 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( bChanged && aText.Len() ) { rSet.Put( aWeightItem ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; switch ( eLangGrp ) { case Western : nSlot = SID_ATTR_CHAR_POSTURE; break; @@ -1345,7 +1345,7 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp const SvxPostureItem& rItem = *( (const SvxPostureItem*)pOld ); if ( rItem.GetValue() == aPostureItem.GetValue() ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged ) @@ -1354,13 +1354,13 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( m_pImpl->m_bInSearchMode && bChanged && aInfo.GetItalic() == ITALIC_NONE && aInfo.GetWeight() != WEIGHT_NORMAL ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && ( (SvxPostureItem*)pItem )->GetValue() != aPostureItem.GetValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) bChanged = ( nEntryPos == ( m_pImpl->m_nExtraEntryPos + 1 ) ); @@ -1368,9 +1368,9 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( bChanged && aText.Len() ) { rSet.Put( aPostureItem ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; // FontSize @@ -1379,12 +1379,12 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( !pSizeBox->GetText().Len() ) // GetValue() gibt dann Min-Wert zurueck nSize = 0; long nSavedSize = pSizeBox->GetSavedValue().ToInt32(); - FASTBOOL bRel = TRUE; + FASTBOOL bRel = sal_True; if ( !pSizeBox->IsRelative() ) { nSavedSize *= 10; - bRel = FALSE; + bRel = sal_False; } switch ( eLangGrp ) @@ -1398,12 +1398,12 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp bChanged = ( nSize != nSavedSize ); if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET ) + pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET ) { float fSize = (float)nSize / 10; long nVal = CalcToUnit( fSize, rSet.GetPool()->GetMetric( nWhich ) ); - if ( ( (SvxFontHeightItem*)pItem )->GetHeight() != (UINT32)nVal ) - bChanged = TRUE; + if ( ( (SvxFontHeightItem*)pItem )->GetHeight() != (sal_uInt32)nVal ) + bChanged = sal_True; } if ( bChanged || !pOldHeight || @@ -1418,9 +1418,9 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp SvxFontHeightItem aHeight( 240, 100, nWhich ); if ( pSizeBox->IsPtRelative() ) - aHeight.SetHeight( rOldItem.GetHeight(), (USHORT)( nSize / 10 ), SFX_MAPUNIT_POINT, eUnit ); + aHeight.SetHeight( rOldItem.GetHeight(), (sal_uInt16)( nSize / 10 ), SFX_MAPUNIT_POINT, eUnit ); else - aHeight.SetHeight( rOldItem.GetHeight(), (USHORT)nSize, SFX_MAPUNIT_RELATIVE ); + aHeight.SetHeight( rOldItem.GetHeight(), (sal_uInt16)nSize, SFX_MAPUNIT_RELATIVE ); rSet.Put( aHeight ); } else @@ -1428,12 +1428,12 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp float fSize = (float)nSize / 10; rSet.Put( SvxFontHeightItem( CalcToUnit( fSize, eUnit ), 100, nWhich ) ); } - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; switch ( eLangGrp ) { case Western : nSlot = SID_ATTR_CHAR_LANGUAGE; break; @@ -1442,15 +1442,15 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp } nWhich = GetWhich( nSlot ); pOld = GetOldItem( rSet, nSlot ); - USHORT nLangPos = pLangBox->GetSelectEntryPos(); - LanguageType eLangType = (LanguageType)(ULONG)pLangBox->GetEntryData( nLangPos ); + sal_uInt16 nLangPos = pLangBox->GetSelectEntryPos(); + LanguageType eLangType = (LanguageType)(sal_uLong)pLangBox->GetEntryData( nLangPos ); if ( pOld ) { const SvxLanguageItem& rItem = *( (const SvxLanguageItem*)pOld ); if ( nLangPos == LISTBOX_ENTRY_NOTFOUND || eLangType == (LanguageType)rItem.GetValue() ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged ) @@ -1459,9 +1459,9 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( bChanged && nLangPos != LISTBOX_ENTRY_NOTFOUND ) { rSet.Put( SvxLanguageItem( eLangType, nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; return bModified; @@ -1471,7 +1471,7 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp void SvxCharNamePage::ResetColor_Impl( const SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); SfxItemState eState = rSet.GetItemState( nWhich ); switch ( eState ) @@ -1501,7 +1501,7 @@ void SvxCharNamePage::ResetColor_Impl( const SfxItemSet& rSet ) rCJKFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor ); rCTLFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor ); m_aPreviewWin.Invalidate(); - USHORT nSelPos = m_pColorLB->GetEntryPos( aColor ); + sal_uInt16 nSelPos = m_pColorLB->GetEntryPos( aColor ); if ( nSelPos == LISTBOX_ENTRY_NOTFOUND && aColor == Color( COL_TRANSPARENT ) ) nSelPos = m_pColorLB->GetEntryPos( m_pImpl->m_aTransparentText ); @@ -1589,7 +1589,7 @@ SfxTabPage* SvxCharNamePage::Create( Window* pParent, const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -USHORT* SvxCharNamePage::GetRanges() +sal_uInt16* SvxCharNamePage::GetRanges() { return pNameRanges; } @@ -1610,9 +1610,9 @@ void SvxCharNamePage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharNamePage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxCharNamePage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FillItemSet_Impl( rSet, Western ); + sal_Bool bModified = FillItemSet_Impl( rSet, Western ); bModified |= FillItemSet_Impl( rSet, Asian ); bModified |= FillItemSet_Impl( rSet, Ctl ); return bModified; @@ -1627,13 +1627,13 @@ void SvxCharNamePage::SetFontList( const SvxFontListItem& rItem ) delete m_pImpl->m_pFontList; } m_pImpl->m_pFontList = rItem.GetFontList()->Clone(); - m_pImpl->m_bMustDelete = TRUE; + m_pImpl->m_bMustDelete = sal_True; } // ----------------------------------------------------------------------- namespace { - void enableRelativeMode( SvxCharNamePage* _pPage, FontSizeBox* _pFontSizeLB, USHORT _nHeightWhich ) + void enableRelativeMode( SvxCharNamePage* _pPage, FontSizeBox* _pFontSizeLB, sal_uInt16 _nHeightWhich ) { _pFontSizeLB->EnableRelativeMode( 5, 995, 5 ); // min 5%, max 995%, step 5 @@ -1663,10 +1663,10 @@ void SvxCharNamePage::EnableRelativeMode() void SvxCharNamePage::EnableSearchMode() { - m_pImpl->m_bInSearchMode = TRUE; + m_pImpl->m_bInSearchMode = sal_True; } // ----------------------------------------------------------------------- -void SvxCharNamePage::DisableControls( USHORT nDisable ) +void SvxCharNamePage::DisableControls( sal_uInt16 nDisable ) { if ( DISABLE_LANGUAGE & nDisable ) { @@ -1707,7 +1707,7 @@ void SvxCharNamePage::PageCreated (SfxAllItemSet aSet) //add CHINA001 if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_RELATIVE_MODE ) == SVX_RELATIVE_MODE ) EnableRelativeMode(); if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) @@ -1777,7 +1777,7 @@ void SvxCharEffectsPage::Initialize() // HTML-Mode const SfxPoolItem* pItem; SfxObjectShell* pShell; - if ( SFX_ITEM_SET == GetItemSet().GetItemState( SID_HTML_MODE, FALSE, &pItem ) || + if ( SFX_ITEM_SET == GetItemSet().GetItemState( SID_HTML_MODE, sal_False, &pItem ) || ( NULL != ( pShell = SfxObjectShell::Current() ) && NULL != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) ) { @@ -1792,7 +1792,7 @@ void SvxCharEffectsPage::Initialize() SfxObjectShell* pDocSh = SfxObjectShell::Current(); DBG_ASSERT( pDocSh, "DocShell not found!" ); XColorTable* pColorTable = NULL; - FASTBOOL bKillTable = FALSE; + FASTBOOL bKillTable = sal_False; if ( pDocSh ) { @@ -1804,12 +1804,12 @@ void SvxCharEffectsPage::Initialize() if ( !pColorTable ) { pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() ); - bKillTable = TRUE; + bKillTable = sal_True; } - m_aUnderlineColorLB.SetUpdateMode( FALSE ); - m_aOverlineColorLB.SetUpdateMode( FALSE ); - m_aFontColorLB.SetUpdateMode( FALSE ); + m_aUnderlineColorLB.SetUpdateMode( sal_False ); + m_aOverlineColorLB.SetUpdateMode( sal_False ); + m_aFontColorLB.SetUpdateMode( sal_False ); { SfxPoolItem* pDummy; @@ -1830,9 +1830,9 @@ void SvxCharEffectsPage::Initialize() m_aFontColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - m_aUnderlineColorLB.SetUpdateMode( TRUE ); - m_aOverlineColorLB.SetUpdateMode( TRUE ); - m_aFontColorLB.SetUpdateMode( TRUE ); + m_aUnderlineColorLB.SetUpdateMode( sal_True ); + m_aOverlineColorLB.SetUpdateMode( sal_True ); + m_aFontColorLB.SetUpdateMode( sal_True ); m_aFontColorLB.SetSelectHdl( LINK( this, SvxCharEffectsPage, ColorBoxSelectHdl_Impl ) ); if ( bKillTable ) @@ -1884,12 +1884,12 @@ void SvxCharEffectsPage::UpdatePreview_Impl() SvxFont& rCJKFont = GetPreviewCJKFont(); SvxFont& rCTLFont = GetPreviewCTLFont(); - USHORT nPos = m_aUnderlineLB.GetSelectEntryPos(); - FontUnderline eUnderline = (FontUnderline)(ULONG)m_aUnderlineLB.GetEntryData( nPos ); + sal_uInt16 nPos = m_aUnderlineLB.GetSelectEntryPos(); + FontUnderline eUnderline = (FontUnderline)(sal_uLong)m_aUnderlineLB.GetEntryData( nPos ); nPos = m_aOverlineLB.GetSelectEntryPos(); - FontUnderline eOverline = (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData( nPos ); + FontUnderline eOverline = (FontUnderline)(sal_uLong)m_aOverlineLB.GetEntryData( nPos ); nPos = m_aStrikeoutLB.GetSelectEntryPos(); - FontStrikeout eStrikeout = (FontStrikeout)(ULONG)m_aStrikeoutLB.GetEntryData( nPos ); + FontStrikeout eStrikeout = (FontStrikeout)(sal_uLong)m_aStrikeoutLB.GetEntryData( nPos ); rFont.SetUnderline( eUnderline ); rCJKFont.SetUnderline( eUnderline ); rCTLFont.SetUnderline( eUnderline ); @@ -1903,14 +1903,14 @@ void SvxCharEffectsPage::UpdatePreview_Impl() rCTLFont.SetStrikeout( eStrikeout ); nPos = m_aPositionLB.GetSelectEntryPos(); - BOOL bUnder = ( CHRDLG_POSITION_UNDER == (ULONG)m_aPositionLB.GetEntryData( nPos ) ); + sal_Bool bUnder = ( CHRDLG_POSITION_UNDER == (sal_uLong)m_aPositionLB.GetEntryData( nPos ) ); FontEmphasisMark eMark = (FontEmphasisMark)m_aEmphasisLB.GetSelectEntryPos(); eMark |= bUnder ? EMPHASISMARK_POS_BELOW : EMPHASISMARK_POS_ABOVE; rFont.SetEmphasisMark( eMark ); rCJKFont.SetEmphasisMark( eMark ); rCTLFont.SetEmphasisMark( eMark ); - USHORT nRelief = m_aReliefLB.GetSelectEntryPos(); + sal_uInt16 nRelief = m_aReliefLB.GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nRelief) { rFont.SetRelief( (FontRelief)nRelief ); @@ -1926,7 +1926,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl() rCJKFont.SetShadow( rFont.IsShadow() ); rCTLFont.SetShadow( rFont.IsShadow() ); - USHORT nCapsPos = m_aEffects2LB.GetSelectEntryPos(); + sal_uInt16 nCapsPos = m_aEffects2LB.GetSelectEntryPos(); if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND ) { rFont.SetCaseMap( (SvxCaseMap)nCapsPos ); @@ -1935,7 +1935,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl() rCTLFont.SetCaseMap( static_cast<SvxCaseMap>( nCapsPos == SVX_CASEMAP_KAPITAELCHEN ? SVX_CASEMAP_NOT_MAPPED : (SvxCaseMap)nCapsPos) ); } - BOOL bWordLine = m_aIndividualWordsBtn.IsChecked(); + sal_Bool bWordLine = m_aIndividualWordsBtn.IsChecked(); rFont.SetWordLineMode( bWordLine ); rCJKFont.SetWordLineMode( bWordLine ); rCTLFont.SetWordLineMode( bWordLine ); @@ -1949,7 +1949,7 @@ void SvxCharEffectsPage::SetCaseMap_Impl( SvxCaseMap eCaseMap ) { if ( SVX_CASEMAP_END > eCaseMap ) m_aEffects2LB.SelectEntryPos( - sal::static_int_cast< USHORT >( eCaseMap ) ); + sal::static_int_cast< sal_uInt16 >( eCaseMap ) ); else { m_aEffects2LB.SetNoSelection(); @@ -1963,7 +1963,7 @@ void SvxCharEffectsPage::SetCaseMap_Impl( SvxCaseMap eCaseMap ) void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); SfxItemState eState = rSet.GetItemState( nWhich ); switch ( eState ) @@ -1997,7 +1997,7 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet ) rCTLFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor ); m_aPreviewWin.Invalidate(); - USHORT nSelPos = m_aFontColorLB.GetEntryPos( aColor ); + sal_uInt16 nSelPos = m_aFontColorLB.GetEntryPos( aColor ); if ( nSelPos == LISTBOX_ENTRY_NOTFOUND && aColor == Color( COL_TRANSPARENT ) ) nSelPos = m_aFontColorLB.GetEntryPos( m_aTransparentColorName ); @@ -2019,12 +2019,12 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) +sal_Bool SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); const SvxColorItem* pOld = (const SvxColorItem*)GetOldItem( rSet, SID_ATTR_CHAR_COLOR ); const SvxColorItem* pItem = NULL; - BOOL bChanged = TRUE; + sal_Bool bChanged = sal_True; const SfxItemSet* pExampleSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL; const SfxItemSet& rOldSet = GetItemSet(); @@ -2035,24 +2035,24 @@ BOOL SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) aSelectedColor = m_aFontColorLB.GetSelectEntryColor(); if ( pOld && pOld->GetValue() == aSelectedColor ) - bChanged = FALSE; + bChanged = sal_False; if ( !bChanged ) bChanged = ( m_aFontColorLB.GetSavedValue() == LISTBOX_ENTRY_NOTFOUND ); if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, (const SfxPoolItem**)&pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, sal_False, (const SfxPoolItem**)&pItem ) == SFX_ITEM_SET && ( (SvxColorItem*)pItem )->GetValue() != aSelectedColor ) - bChanged = TRUE; + bChanged = sal_True; - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if ( bChanged && m_aFontColorLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ) { rSet.Put( SvxColorItem( aSelectedColor, nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; return bModified; @@ -2064,24 +2064,24 @@ IMPL_LINK( SvxCharEffectsPage, SelectHdl_Impl, ListBox*, pBox ) { if ( &m_aEmphasisLB == pBox ) { - USHORT nEPos = m_aEmphasisLB.GetSelectEntryPos(); - BOOL bEnable = ( nEPos > 0 && nEPos != LISTBOX_ENTRY_NOTFOUND ); + sal_uInt16 nEPos = m_aEmphasisLB.GetSelectEntryPos(); + sal_Bool bEnable = ( nEPos > 0 && nEPos != LISTBOX_ENTRY_NOTFOUND ); m_aPositionFT.Enable( bEnable ); m_aPositionLB.Enable( bEnable ); } else if( &m_aReliefLB == pBox) { - BOOL bEnable = ( pBox->GetSelectEntryPos() == 0 ); + sal_Bool bEnable = ( pBox->GetSelectEntryPos() == 0 ); m_aOutlineBtn.Enable( bEnable ); m_aShadowBtn.Enable( bEnable ); } else if ( &m_aPositionLB != pBox ) { - USHORT nUPos = m_aUnderlineLB.GetSelectEntryPos(), + sal_uInt16 nUPos = m_aUnderlineLB.GetSelectEntryPos(), nOPos = m_aOverlineLB.GetSelectEntryPos(), nSPos = m_aStrikeoutLB.GetSelectEntryPos(); - BOOL bUEnable = ( nUPos > 0 && nUPos != LISTBOX_ENTRY_NOTFOUND ); - BOOL bOEnable = ( nOPos > 0 && nOPos != LISTBOX_ENTRY_NOTFOUND ); + sal_Bool bUEnable = ( nUPos > 0 && nUPos != LISTBOX_ENTRY_NOTFOUND ); + sal_Bool bOEnable = ( nOPos > 0 && nOPos != LISTBOX_ENTRY_NOTFOUND ); m_aUnderlineColorFT.Enable( bUEnable ); m_aUnderlineColorLB.Enable( bUEnable ); m_aOverlineColorFT.Enable( bOEnable ); @@ -2159,7 +2159,7 @@ SfxTabPage* SvxCharEffectsPage::Create( Window* pParent, const SfxItemSet& rSet // ----------------------------------------------------------------------- -USHORT* SvxCharEffectsPage::GetRanges() +sal_uInt16* SvxCharEffectsPage::GetRanges() { return pEffectsRanges; } @@ -2172,10 +2172,10 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) SvxFont& rCJKFont = GetPreviewCJKFont(); SvxFont& rCTLFont = GetPreviewCTLFont(); - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; // Underline - USHORT nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); rFont.SetUnderline( UNDERLINE_NONE ); rCJKFont.SetUnderline( UNDERLINE_NONE ); rCTLFont.SetUnderline( UNDERLINE_NONE ); @@ -2197,18 +2197,18 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) if ( eUnderline != UNDERLINE_NONE ) { - for ( USHORT i = 0; i < m_aUnderlineLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < m_aUnderlineLB.GetEntryCount(); ++i ) { - if ( (FontUnderline)(ULONG)m_aUnderlineLB.GetEntryData(i) == eUnderline ) + if ( (FontUnderline)(sal_uLong)m_aUnderlineLB.GetEntryData(i) == eUnderline ) { m_aUnderlineLB.SelectEntryPos(i); - bEnable |= TRUE; + bEnable |= sal_True; break; } } Color aColor = rItem.GetColor(); - USHORT nPos = m_aUnderlineColorLB.GetEntryPos( aColor ); + sal_uInt16 nPos = m_aUnderlineColorLB.GetEntryPos( aColor ); if ( LISTBOX_ENTRY_NOTFOUND != nPos ) m_aUnderlineColorLB.SelectEntryPos( nPos ); @@ -2254,18 +2254,18 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) if ( eOverline != UNDERLINE_NONE ) { - for ( USHORT i = 0; i < m_aOverlineLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < m_aOverlineLB.GetEntryCount(); ++i ) { - if ( (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData(i) == eOverline ) + if ( (FontUnderline)(sal_uLong)m_aOverlineLB.GetEntryData(i) == eOverline ) { m_aOverlineLB.SelectEntryPos(i); - bEnable |= TRUE; + bEnable |= sal_True; break; } } Color aColor = rItem.GetColor(); - USHORT nPos = m_aOverlineColorLB.GetEntryPos( aColor ); + sal_uInt16 nPos = m_aOverlineColorLB.GetEntryPos( aColor ); if ( LISTBOX_ENTRY_NOTFOUND != nPos ) m_aOverlineColorLB.SelectEntryPos( nPos ); @@ -2311,12 +2311,12 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) if ( eStrikeout != STRIKEOUT_NONE ) { - for ( USHORT i = 0; i < m_aStrikeoutLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < m_aStrikeoutLB.GetEntryCount(); ++i ) { - if ( (FontStrikeout)(ULONG)m_aStrikeoutLB.GetEntryData(i) == eStrikeout ) + if ( (FontStrikeout)(sal_uLong)m_aStrikeoutLB.GetEntryData(i) == eStrikeout ) { m_aStrikeoutLB.SelectEntryPos(i); - bEnable |= TRUE; + bEnable |= sal_True; break; } } @@ -2367,15 +2367,15 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) rCJKFont.SetEmphasisMark( eMark ); rCTLFont.SetEmphasisMark( eMark ); - m_aEmphasisLB.SelectEntryPos( (USHORT)( eMark & EMPHASISMARK_STYLE ) ); + m_aEmphasisLB.SelectEntryPos( (sal_uInt16)( eMark & EMPHASISMARK_STYLE ) ); eMark &= ~EMPHASISMARK_STYLE; - ULONG nEntryData = ( eMark == EMPHASISMARK_POS_ABOVE ) + sal_uLong nEntryData = ( eMark == EMPHASISMARK_POS_ABOVE ) ? CHRDLG_POSITION_OVER : ( eMark == EMPHASISMARK_POS_BELOW ) ? CHRDLG_POSITION_UNDER : 0; - for ( USHORT i = 0; i < m_aPositionLB.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0; i < m_aPositionLB.GetEntryCount(); i++ ) { - if ( nEntryData == (ULONG)m_aPositionLB.GetEntryData(i) ) + if ( nEntryData == (sal_uLong)m_aPositionLB.GetEntryData(i) ) { m_aPositionLB.SelectEntryPos(i); break; @@ -2497,7 +2497,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxContourItem& rItem = (SvxContourItem&)rSet.Get( nWhich ); m_aOutlineBtn.SetState( (TriState)rItem.GetValue() ); - m_aOutlineBtn.EnableTriState( FALSE ); + m_aOutlineBtn.EnableTriState( sal_False ); break; } } @@ -2526,7 +2526,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxShadowedItem& rItem = (SvxShadowedItem&)rSet.Get( nWhich ); m_aShadowBtn.SetState( (TriState)rItem.GetValue() ); - m_aShadowBtn.EnableTriState( FALSE ); + m_aShadowBtn.EnableTriState( sal_False ); break; } } @@ -2555,7 +2555,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxBlinkItem& rItem = (SvxBlinkItem&)rSet.Get( nWhich ); m_aBlinkingBtn.SetState( (TriState)rItem.GetValue() ); - m_aBlinkingBtn.EnableTriState( FALSE ); + m_aBlinkingBtn.EnableTriState( sal_False ); break; } } @@ -2583,7 +2583,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxCharHiddenItem& rItem = (SvxCharHiddenItem&)rSet.Get( nWhich ); m_aHiddenBtn.SetState( (TriState)rItem.GetValue() ); - m_aHiddenBtn.EnableTriState( FALSE ); + m_aHiddenBtn.EnableTriState( sal_False ); break; } } @@ -2614,18 +2614,18 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SfxPoolItem* pOld = 0; const SfxItemSet& rOldSet = GetItemSet(); - BOOL bModified = FALSE; - FASTBOOL bChanged = TRUE; + sal_Bool bModified = sal_False; + FASTBOOL bChanged = sal_True; // Underline - USHORT nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_UNDERLINE ); - USHORT nPos = m_aUnderlineLB.GetSelectEntryPos(); - FontUnderline eUnder = (FontUnderline)(ULONG)m_aUnderlineLB.GetEntryData( nPos ); + sal_uInt16 nPos = m_aUnderlineLB.GetSelectEntryPos(); + FontUnderline eUnder = (FontUnderline)(sal_uLong)m_aUnderlineLB.GetEntryData( nPos ); if ( pOld ) { @@ -2633,14 +2633,14 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) //! item-state in the 'rOldSet' will be invalid. In this case //! changing the underline style will be allowed if a style is //! selected in the listbox. - BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE ); + sal_Bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && + SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, sal_True ); const SvxUnderlineItem& rItem = *( (const SvxUnderlineItem*)pOld ); if ( (FontUnderline)rItem.GetValue() == eUnder && ( UNDERLINE_NONE == eUnder || rItem.GetColor() == m_aUnderlineColorLB.GetSelectEntryColor() ) && ! bAllowChg ) - bChanged = FALSE; + bChanged = sal_False; } if ( bChanged ) @@ -2648,18 +2648,18 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) SvxUnderlineItem aNewItem( eUnder, nWhich ); aNewItem.SetColor( m_aUnderlineColorLB.GetSelectEntryColor() ); rSet.Put( aNewItem ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Overline nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_OVERLINE ); nPos = m_aOverlineLB.GetSelectEntryPos(); - FontUnderline eOver = (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData( nPos ); + FontUnderline eOver = (FontUnderline)(sal_uLong)m_aOverlineLB.GetEntryData( nPos ); if ( pOld ) { @@ -2667,14 +2667,14 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) //! item-state in the 'rOldSet' will be invalid. In this case //! changing the underline style will be allowed if a style is //! selected in the listbox. - BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE ); + sal_Bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && + SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, sal_True ); const SvxOverlineItem& rItem = *( (const SvxOverlineItem*)pOld ); if ( (FontUnderline)rItem.GetValue() == eOver && ( UNDERLINE_NONE == eOver || rItem.GetColor() == m_aOverlineColorLB.GetSelectEntryColor() ) && ! bAllowChg ) - bChanged = FALSE; + bChanged = sal_False; } if ( bChanged ) @@ -2682,18 +2682,18 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) SvxOverlineItem aNewItem( eOver, nWhich ); aNewItem.SetColor( m_aOverlineColorLB.GetSelectEntryColor() ); rSet.Put( aNewItem ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Strikeout nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_STRIKEOUT ); nPos = m_aStrikeoutLB.GetSelectEntryPos(); - FontStrikeout eStrike = (FontStrikeout)(ULONG)m_aStrikeoutLB.GetEntryData( nPos ); + FontStrikeout eStrike = (FontStrikeout)(sal_uLong)m_aStrikeoutLB.GetEntryData( nPos ); if ( pOld ) { @@ -2701,24 +2701,24 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) //! item-state in the 'rOldSet' will be invalid. In this case //! changing the strikeout style will be allowed if a style is //! selected in the listbox. - BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE ); + sal_Bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && + SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, sal_True ); const SvxCrossedOutItem& rItem = *( (const SvxCrossedOutItem*)pOld ); if ( !m_aStrikeoutLB.IsEnabled() || ((FontStrikeout)rItem.GetValue() == eStrike && !bAllowChg) ) - bChanged = FALSE; + bChanged = sal_False; } if ( bChanged ) { rSet.Put( SvxCrossedOutItem( eStrike, nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Individual words nWhich = GetWhich( SID_ATTR_CHAR_WORDLINEMODE ); @@ -2728,32 +2728,32 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SvxWordLineModeItem& rItem = *( (const SvxWordLineModeItem*)pOld ); if ( rItem.GetValue() == m_aIndividualWordsBtn.IsChecked() ) - bChanged = FALSE; + bChanged = sal_False; } if ( rOldSet.GetItemState( nWhich ) == SFX_ITEM_DONTCARE && m_aIndividualWordsBtn.IsChecked() == m_aIndividualWordsBtn.GetSavedValue() ) - bChanged = FALSE; + bChanged = sal_False; if ( bChanged ) { rSet.Put( SvxWordLineModeItem( m_aIndividualWordsBtn.IsChecked(), nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Emphasis nWhich = GetWhich( SID_ATTR_CHAR_EMPHASISMARK ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_EMPHASISMARK ); - USHORT nMarkPos = m_aEmphasisLB.GetSelectEntryPos(); - USHORT nPosPos = m_aPositionLB.GetSelectEntryPos(); + sal_uInt16 nMarkPos = m_aEmphasisLB.GetSelectEntryPos(); + sal_uInt16 nPosPos = m_aPositionLB.GetSelectEntryPos(); FontEmphasisMark eMark = (FontEmphasisMark)nMarkPos; if ( m_aPositionLB.IsEnabled() ) { - eMark |= ( CHRDLG_POSITION_UNDER == (ULONG)m_aPositionLB.GetEntryData( nPosPos ) ) + eMark |= ( CHRDLG_POSITION_UNDER == (sal_uLong)m_aPositionLB.GetEntryData( nPosPos ) ) ? EMPHASISMARK_POS_BELOW : EMPHASISMARK_POS_ABOVE; } @@ -2763,34 +2763,34 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SvxEmphasisMarkItem& rItem = *( (const SvxEmphasisMarkItem*)pOld ); if ( rItem.GetEmphasisMark() == eMark ) - bChanged = FALSE; + bChanged = sal_False; } } if ( rOldSet.GetItemState( nWhich ) == SFX_ITEM_DONTCARE && m_aEmphasisLB.GetSavedValue() == nMarkPos && m_aPositionLB.GetSavedValue() == nPosPos ) - bChanged = FALSE; + bChanged = sal_False; if ( bChanged ) { rSet.Put( SvxEmphasisMarkItem( eMark, nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Effects nWhich = GetWhich( SID_ATTR_CHAR_CASEMAP ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_CASEMAP ); SvxCaseMap eCaseMap = SVX_CASEMAP_NOT_MAPPED; - FASTBOOL bChecked = FALSE; - USHORT nCapsPos = m_aEffects2LB.GetSelectEntryPos(); + FASTBOOL bChecked = sal_False; + sal_uInt16 nCapsPos = m_aEffects2LB.GetSelectEntryPos(); if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND ) { eCaseMap = (SvxCaseMap)nCapsPos; - bChecked = TRUE; + bChecked = sal_True; } if ( pOld ) @@ -2799,23 +2799,23 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) //! item-state in the 'rOldSet' will be invalid. In this case //! changing the effect style will be allowed if a style is //! selected in the listbox. - BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE ); + sal_Bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && + SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, sal_True ); const SvxCaseMapItem& rItem = *( (const SvxCaseMapItem*)pOld ); if ( (SvxCaseMap)rItem.GetValue() == eCaseMap && !bAllowChg ) - bChanged = FALSE; + bChanged = sal_False; } if ( bChanged && bChecked ) { rSet.Put( SvxCaseMapItem( eCaseMap, nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; //Relief nWhich = GetWhich(SID_ATTR_CHAR_RELIEF); @@ -2837,22 +2837,22 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SvxContourItem& rItem = *( (const SvxContourItem*)pOld ); if ( rItem.GetValue() == StateToAttr( eState ) && m_aOutlineBtn.GetSavedValue() == eState ) - bChanged = FALSE; + bChanged = sal_False; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && !StateToAttr( eState ) && ( (SvxContourItem*)pItem )->GetValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && eState != STATE_DONTKNOW ) { rSet.Put( SvxContourItem( StateToAttr( eState ), nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Shadow nWhich = GetWhich( SID_ATTR_CHAR_SHADOWED ); @@ -2863,22 +2863,22 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SvxShadowedItem& rItem = *( (const SvxShadowedItem*)pOld ); if ( rItem.GetValue() == StateToAttr( eState ) && m_aShadowBtn.GetSavedValue() == eState ) - bChanged = FALSE; + bChanged = sal_False; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && !StateToAttr( eState ) && ( (SvxShadowedItem*)pItem )->GetValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && eState != STATE_DONTKNOW ) { rSet.Put( SvxShadowedItem( StateToAttr( eState ), nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Blinking nWhich = GetWhich( SID_ATTR_FLASH ); @@ -2889,44 +2889,44 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SvxBlinkItem& rItem = *( (const SvxBlinkItem*)pOld ); if ( rItem.GetValue() == StateToAttr( eState ) && m_aBlinkingBtn.GetSavedValue() == eState ) - bChanged = FALSE; + bChanged = sal_False; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && !StateToAttr( eState ) && ( (SvxBlinkItem*)pItem )->GetValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && eState != STATE_DONTKNOW ) { rSet.Put( SvxBlinkItem( StateToAttr( eState ), nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; // Hidden nWhich = GetWhich( SID_ATTR_CHAR_HIDDEN ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_HIDDEN ); eState = m_aHiddenBtn.GetState(); - bChanged = TRUE; + bChanged = sal_True; if ( pOld ) { const SvxCharHiddenItem& rItem = *( (const SvxCharHiddenItem*)pOld ); if ( rItem.GetValue() == StateToAttr( eState ) && m_aHiddenBtn.GetSavedValue() == eState ) - bChanged = FALSE; + bChanged = sal_False; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && !StateToAttr( eState ) && ( (SvxCharHiddenItem*)pItem )->GetValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && eState != STATE_DONTKNOW ) { rSet.Put( SvxCharHiddenItem( StateToAttr( eState ), nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bModified |= FillItemSetColor_Impl( rSet ); @@ -2934,7 +2934,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) return bModified; } -void SvxCharEffectsPage::DisableControls( USHORT nDisable ) +void SvxCharEffectsPage::DisableControls( sal_uInt16 nDisable ) { if ( ( DISABLE_CASEMAP & nDisable ) == DISABLE_CASEMAP ) { @@ -2968,7 +2968,7 @@ void SvxCharEffectsPage::EnableFlash() // ----------------------------------------------------------------------- void SvxCharEffectsPage::SetPreviewBackgroundToCharacter() { - m_bPreviewBackgroundToCharacter = TRUE; + m_bPreviewBackgroundToCharacter = sal_True; } // ----------------------------------------------------------------------- @@ -2981,7 +2981,7 @@ void SvxCharEffectsPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_ENABLE_FLASH ) == SVX_ENABLE_FLASH ) EnableFlash(); if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) @@ -3023,8 +3023,8 @@ SvxCharPositionPage::SvxCharPositionPage( Window* pParent, const SfxItemSet& rIn m_nSubEsc ( (short)DFLT_ESC_SUB ), m_nScaleWidthItemSetVal ( 100 ), m_nScaleWidthInitialVal ( 100 ), - m_nSuperProp ( (BYTE)DFLT_ESC_PROP ), - m_nSubProp ( (BYTE)DFLT_ESC_PROP ) + m_nSuperProp ( (sal_uInt8)DFLT_ESC_PROP ), + m_nSubProp ( (sal_uInt8)DFLT_ESC_PROP ) { FreeResource(); Initialize(); @@ -3074,14 +3074,14 @@ void SvxCharPositionPage::Initialize() // ----------------------------------------------------------------------- -void SvxCharPositionPage::UpdatePreview_Impl( BYTE nProp, BYTE nEscProp, short nEsc ) +void SvxCharPositionPage::UpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ) { SetPrevFontEscapement( nProp, nEscProp, nEsc ); } // ----------------------------------------------------------------------- -void SvxCharPositionPage::SetEscapement_Impl( USHORT nEsc ) +void SvxCharPositionPage::SetEscapement_Impl( sal_uInt16 nEsc ) { SvxEscapementItem aEscItm( (SvxEscapement)nEsc, SID_ATTR_CHAR_ESCAPEMENT ); @@ -3131,7 +3131,7 @@ void SvxCharPositionPage::SetEscapement_Impl( USHORT nEsc ) IMPL_LINK( SvxCharPositionPage, PositionHdl_Impl, RadioButton*, pBtn ) { - USHORT nEsc = SVX_ESCAPEMENT_OFF; // also when pBtn == NULL + sal_uInt16 nEsc = SVX_ESCAPEMENT_OFF; // also when pBtn == NULL if ( &m_aHighPosBtn == pBtn ) nEsc = SVX_ESCAPEMENT_SUPERSCRIPT; @@ -3146,9 +3146,9 @@ IMPL_LINK( SvxCharPositionPage, PositionHdl_Impl, RadioButton*, pBtn ) IMPL_LINK( SvxCharPositionPage, RotationHdl_Impl, RadioButton*, pBtn ) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if (&m_a90degRB == pBtn || &m_a270degRB == pBtn) - bEnable = TRUE; + bEnable = sal_True; else OSL_ENSURE( &m_a0degRB == pBtn, "unexpected button" ); m_aFitToLineCB.Enable( bEnable ); @@ -3159,7 +3159,7 @@ IMPL_LINK( SvxCharPositionPage, RotationHdl_Impl, RadioButton*, pBtn ) IMPL_LINK( SvxCharPositionPage, FontModifyHdl_Impl, MetricField*, EMPTYARG ) { - BYTE nEscProp = (BYTE)m_aFontSizeEdit.GetValue(); + sal_uInt8 nEscProp = (sal_uInt8)m_aFontSizeEdit.GetValue(); short nEsc = (short)m_aHighLowEdit.GetValue(); nEsc *= m_aLowPosBtn.IsChecked() ? -1 : 1; UpdatePreview_Impl( 100, nEscProp, nEsc ); @@ -3188,7 +3188,7 @@ IMPL_LINK( SvxCharPositionPage, FitToLineHdl_Impl, CheckBox*, pBox ) { if ( &m_aFitToLineCB == pBox) { - UINT16 nVal = m_nScaleWidthInitialVal; + sal_uInt16 nVal = m_nScaleWidthInitialVal; if (m_aFitToLineCB.IsChecked()) nVal = m_nScaleWidthItemSetVal; m_aScaleWidthMF.SetValue( nVal ); @@ -3283,9 +3283,9 @@ IMPL_LINK( SvxCharPositionPage, LoseFocusHdl_Impl, MetricField*, pField ) else if ( &m_aFontSizeEdit == pField ) { if ( bLow ) - m_nSubProp = (BYTE)m_aFontSizeEdit.GetValue(); + m_nSubProp = (sal_uInt8)m_aFontSizeEdit.GetValue(); else - m_nSuperProp = (BYTE)m_aFontSizeEdit.GetValue(); + m_nSuperProp = (sal_uInt8)m_aFontSizeEdit.GetValue(); } return 0; } @@ -3294,7 +3294,7 @@ IMPL_LINK( SvxCharPositionPage, LoseFocusHdl_Impl, MetricField*, pField ) IMPL_LINK( SvxCharPositionPage, ScaleWidthModifyHdl_Impl, MetricField*, EMPTYARG ) { - m_aPreviewWin.SetFontWidthScale( USHORT( m_aScaleWidthMF.GetValue() ) ); + m_aPreviewWin.SetFontWidthScale( sal_uInt16( m_aScaleWidthMF.GetValue() ) ); return 0; } @@ -3338,7 +3338,7 @@ SfxTabPage* SvxCharPositionPage::Create( Window* pParent, const SfxItemSet& rSet // ----------------------------------------------------------------------- -USHORT* SvxCharPositionPage::GetRanges() +sal_uInt16* SvxCharPositionPage::GetRanges() { return pPositionRanges; } @@ -3352,13 +3352,13 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) { m_nSuperEsc = (short)sUser.GetToken( 0 ).ToInt32(); m_nSubEsc = (short)sUser.GetToken( 1 ).ToInt32(); - m_nSuperProp = (BYTE)sUser.GetToken( 2 ).ToInt32(); - m_nSubProp = (BYTE)sUser.GetToken( 3 ).ToInt32(); + m_nSuperProp = (sal_uInt8)sUser.GetToken( 2 ).ToInt32(); + m_nSubProp = (sal_uInt8)sUser.GetToken( 3 ).ToInt32(); } short nEsc = 0; - BYTE nEscProp = 100; - BYTE nProp = 100; + sal_uInt8 nEscProp = 100; + sal_uInt8 nProp = 100; m_aHighLowFT.Disable(); m_aHighLowEdit.Disable(); @@ -3368,7 +3368,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) SvxFont& rFont = GetPreviewFont(); SvxFont& rCJKFont = GetPreviewCJKFont(); SvxFont& rCTLFont = GetPreviewCTLFont(); - USHORT nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) { @@ -3389,7 +3389,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) if ( nEsc > 0 ) { nFac = 1; - m_aHighPosBtn.Check( TRUE ); + m_aHighPosBtn.Check( sal_True ); if ( nEsc == DFLT_ESC_AUTO_SUPER ) { nEsc = DFLT_ESC_SUPER; @@ -3399,7 +3399,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) else { nFac = -1; - m_aLowPosBtn.Check( TRUE ); + m_aLowPosBtn.Check( sal_True ); if ( nEsc == DFLT_ESC_AUTO_SUB ) { nEsc = DFLT_ESC_SUB; @@ -3421,8 +3421,8 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) } else { - m_aNormalPosBtn.Check( TRUE ); - m_aHighLowRB.Check( TRUE ); + m_aNormalPosBtn.Check( sal_True ); + m_aHighLowRB.Check( sal_True ); PositionHdl_Impl( NULL ); } //the height has to be set after the handler is called to keep the value also if the escapement is zero @@ -3430,9 +3430,9 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) } else { - m_aHighPosBtn.Check( FALSE ); - m_aNormalPosBtn.Check( FALSE ); - m_aLowPosBtn.Check( FALSE ); + m_aHighPosBtn.Check( sal_False ); + m_aNormalPosBtn.Check( sal_False ); + m_aLowPosBtn.Check( sal_False ); } // BspFont setzen @@ -3490,7 +3490,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) m_aPairKerningBtn.Check( rItem.GetValue() ); } else - m_aPairKerningBtn.Check( FALSE ); + m_aPairKerningBtn.Check( sal_False ); // Scale Width nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); @@ -3548,13 +3548,13 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) const SvxCharRotateItem& rItem = (SvxCharRotateItem&) rSet.Get( nWhich ); if (rItem.IsBottomToTop()) - m_a90degRB.Check( TRUE ); + m_a90degRB.Check( sal_True ); else if (rItem.IsTopToBotton()) - m_a270degRB.Check( TRUE ); + m_a270degRB.Check( sal_True ); else { DBG_ASSERT( 0 == rItem.GetValue(), "incorrect value" ); - m_a0degRB.Check( TRUE ); + m_a0degRB.Check( sal_True ); } m_aFitToLineCB.Check( rItem.IsFitToLine() ); } @@ -3562,14 +3562,14 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) { if( eState == SFX_ITEM_DONTCARE ) { - m_a0degRB.Check( FALSE ); - m_a90degRB.Check( FALSE ); - m_a270degRB.Check( FALSE ); + m_a0degRB.Check( sal_False ); + m_a90degRB.Check( sal_False ); + m_a270degRB.Check( sal_False ); } else - m_a0degRB.Check( TRUE ); + m_a0degRB.Check( sal_True ); - m_aFitToLineCB.Check( FALSE ); + m_aFitToLineCB.Check( sal_False ); } m_aFitToLineCB.SetClickHdl( aOldLink ); m_aFitToLineCB.Enable( !m_a0degRB.IsChecked() ); @@ -3595,16 +3595,16 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) { // Position (hoch, normal oder tief) const SfxItemSet& rOldSet = GetItemSet(); - BOOL bModified = FALSE, bChanged = TRUE; - USHORT nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); + sal_Bool bModified = sal_False, bChanged = sal_True; + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); const SfxPoolItem* pOld = GetOldItem( rSet, SID_ATTR_CHAR_ESCAPEMENT ); const FASTBOOL bHigh = m_aHighPosBtn.IsChecked(); short nEsc; - BYTE nEscProp; + sal_uInt8 nEscProp; if ( bHigh || m_aLowPosBtn.IsChecked() ) { @@ -3615,7 +3615,7 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) nEsc = (short)m_aHighLowEdit.Denormalize( m_aHighLowEdit.GetValue() ); nEsc *= bHigh ? 1 : -1; } - nEscProp = (BYTE)m_aFontSizeEdit.Denormalize( m_aFontSizeEdit.GetValue() ); + nEscProp = (sal_uInt8)m_aFontSizeEdit.Denormalize( m_aFontSizeEdit.GetValue() ); } else { @@ -3627,28 +3627,28 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) { const SvxEscapementItem& rItem = *( (const SvxEscapementItem*)pOld ); if ( rItem.GetEsc() == nEsc && rItem.GetProp() == nEscProp ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged && !m_aHighPosBtn.GetSavedValue() && !m_aNormalPosBtn.GetSavedValue() && !m_aLowPosBtn.GetSavedValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && ( m_aHighPosBtn.IsChecked() || m_aNormalPosBtn.IsChecked() || m_aLowPosBtn.IsChecked() ) ) { rSet.Put( SvxEscapementItem( nEsc, nEscProp, nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Kerning nWhich = GetWhich( SID_ATTR_CHAR_KERNING ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_KERNING ); - USHORT nPos = m_aKerningLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aKerningLB.GetSelectEntryPos(); short nKerning = 0; SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich ); @@ -3666,23 +3666,23 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) { const SvxKerningItem& rItem = *( (const SvxKerningItem*)pOld ); if ( rItem.GetValue() == nKerning ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged && ( m_aKerningLB.GetSavedValue() == LISTBOX_ENTRY_NOTFOUND || ( !m_aKerningEdit.GetSavedValue().Len() && m_aKerningEdit.IsEnabled() ) ) ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && nPos != LISTBOX_ENTRY_NOTFOUND ) { rSet.Put( SvxKerningItem( nKerning, nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Pair-Kerning nWhich = GetWhich( SID_ATTR_CHAR_AUTOKERN ); @@ -3690,19 +3690,19 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) if ( m_aPairKerningBtn.IsChecked() != m_aPairKerningBtn.GetSavedValue() ) { rSet.Put( SvxAutoKernItem( m_aPairKerningBtn.IsChecked(), nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; // Scale Width nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); if ( m_aScaleWidthMF.GetText() != m_aScaleWidthMF.GetSavedValue() ) { - rSet.Put( SvxCharScaleWidthItem( (USHORT)m_aScaleWidthMF.GetValue(), nWhich ) ); - bModified |= TRUE; + rSet.Put( SvxCharScaleWidthItem( (sal_uInt16)m_aScaleWidthMF.GetValue(), nWhich ) ); + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; // Rotation @@ -3718,9 +3718,9 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) else if (m_a270degRB.IsChecked()) aItem.SetTopToBotton(); rSet.Put( aItem ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; return bModified; @@ -3745,7 +3745,7 @@ void SvxCharPositionPage::FillUserData() // ----------------------------------------------------------------------- void SvxCharPositionPage::SetPreviewBackgroundToCharacter() { - m_bPreviewBackgroundToCharacter = TRUE; + m_bPreviewBackgroundToCharacter = sal_True; } // ----------------------------------------------------------------------- void SvxCharPositionPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 @@ -3753,7 +3753,7 @@ void SvxCharPositionPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,sal_False); if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) SetPreviewBackgroundToCharacter(); } @@ -3790,7 +3790,7 @@ void SvxCharTwoLinesPage::Initialize() aSize.Height() = m_aEndBracketLB.CalcSize( 1, 6 ).Height(); m_aEndBracketLB.SetSizePixel( aSize ); - m_aTwoLinesBtn.Check( FALSE ); + m_aTwoLinesBtn.Check( sal_False ); TwoLinesHdl_Impl( NULL ); m_aTwoLinesBtn.SetClickHdl( LINK( this, SvxCharTwoLinesPage, TwoLinesHdl_Impl ) ); @@ -3835,25 +3835,25 @@ void SvxCharTwoLinesPage::SelectCharacter( ListBox* pBox ) // ----------------------------------------------------------------------- -void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, BOOL bStart ) +void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, sal_Bool bStart ) { - USHORT nEntryPos = 0; + sal_uInt16 nEntryPos = 0; ListBox* pBox = bStart ? &m_aStartBracketLB : &m_aEndBracketLB; if ( 0 == cBracket ) pBox->SelectEntryPos(0); else { - FASTBOOL bFound = FALSE; - for ( USHORT i = 1; i < pBox->GetEntryCount(); ++i ) + FASTBOOL bFound = sal_False; + for ( sal_uInt16 i = 1; i < pBox->GetEntryCount(); ++i ) { - if ( (ULONG)pBox->GetEntryData(i) != CHRDLG_ENCLOSE_SPECIAL_CHAR ) + if ( (sal_uLong)pBox->GetEntryData(i) != CHRDLG_ENCLOSE_SPECIAL_CHAR ) { const sal_Unicode cChar = pBox->GetEntry(i).GetChar(0); if ( cChar == cBracket ) { pBox->SelectEntryPos(i); nEntryPos = i; - bFound = TRUE; + bFound = sal_True; break; } } @@ -3875,7 +3875,7 @@ void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, BOOL bStart ) IMPL_LINK( SvxCharTwoLinesPage, TwoLinesHdl_Impl, CheckBox*, EMPTYARG ) { - BOOL bChecked = m_aTwoLinesBtn.IsChecked(); + sal_Bool bChecked = m_aTwoLinesBtn.IsChecked(); m_aStartBracketFT.Enable( bChecked ); m_aStartBracketLB.Enable( bChecked ); m_aEndBracketFT.Enable( bChecked ); @@ -3889,8 +3889,8 @@ IMPL_LINK( SvxCharTwoLinesPage, TwoLinesHdl_Impl, CheckBox*, EMPTYARG ) IMPL_LINK( SvxCharTwoLinesPage, CharacterMapHdl_Impl, ListBox*, pBox ) { - USHORT nPos = pBox->GetSelectEntryPos(); - if ( CHRDLG_ENCLOSE_SPECIAL_CHAR == (ULONG)pBox->GetEntryData( nPos ) ) + sal_uInt16 nPos = pBox->GetSelectEntryPos(); + if ( CHRDLG_ENCLOSE_SPECIAL_CHAR == (sal_uLong)pBox->GetEntryData( nPos ) ) SelectCharacter( pBox ); else { @@ -3929,7 +3929,7 @@ SfxTabPage* SvxCharTwoLinesPage::Create( Window* pParent, const SfxItemSet& rSet // ----------------------------------------------------------------------- -USHORT* SvxCharTwoLinesPage::GetRanges() +sal_uInt16* SvxCharTwoLinesPage::GetRanges() { return pTwoLinesRanges; } @@ -3938,8 +3938,8 @@ USHORT* SvxCharTwoLinesPage::GetRanges() void SvxCharTwoLinesPage::Reset( const SfxItemSet& rSet ) { - m_aTwoLinesBtn.Check( FALSE ); - USHORT nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); + m_aTwoLinesBtn.Check( sal_False ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); SfxItemState eState = rSet.GetItemState( nWhich ); if ( eState >= SFX_ITEM_DONTCARE ) @@ -3949,8 +3949,8 @@ void SvxCharTwoLinesPage::Reset( const SfxItemSet& rSet ) if ( rItem.GetValue() ) { - SetBracket( rItem.GetStartBracket(), TRUE ); - SetBracket( rItem.GetEndBracket(), FALSE ); + SetBracket( rItem.GetStartBracket(), sal_True ); + SetBracket( rItem.GetEndBracket(), sal_False ); } } TwoLinesHdl_Impl( NULL ); @@ -3960,11 +3960,11 @@ void SvxCharTwoLinesPage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharTwoLinesPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxCharTwoLinesPage::FillItemSet( SfxItemSet& rSet ) { const SfxItemSet& rOldSet = GetItemSet(); - BOOL bModified = FALSE, bChanged = TRUE; - USHORT nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); + sal_Bool bModified = sal_False, bChanged = sal_True; + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); const SfxPoolItem* pOld = GetOldItem( rSet, SID_ATTR_CHAR_TWO_LINES ); sal_Bool bOn = m_aTwoLinesBtn.IsChecked(); sal_Unicode cStart = ( bOn && m_aStartBracketLB.GetSelectEntryPos() > 0 ) @@ -3977,15 +3977,15 @@ BOOL SvxCharTwoLinesPage::FillItemSet( SfxItemSet& rSet ) const SvxTwoLinesItem& rItem = *( (const SvxTwoLinesItem*)pOld ); if ( rItem.GetValue() == bOn && ( !bOn || ( rItem.GetStartBracket() == cStart && rItem.GetEndBracket() == cEnd ) ) ) - bChanged = FALSE; + bChanged = sal_False; } if ( bChanged ) { rSet.Put( SvxTwoLinesItem( bOn, cStart, cEnd, nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; return bModified; @@ -4006,7 +4006,7 @@ void SvxCharTwoLinesPage::UpdatePreview_Impl() // ----------------------------------------------------------------------- void SvxCharTwoLinesPage::SetPreviewBackgroundToCharacter() { - m_bPreviewBackgroundToCharacter = TRUE; + m_bPreviewBackgroundToCharacter = sal_True; } // ----------------------------------------------------------------------- @@ -4015,7 +4015,7 @@ void SvxCharTwoLinesPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,sal_False); if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) SetPreviewBackgroundToCharacter(); } diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx index 2cc564c3c553..69e370be9f8b 100644 --- a/cui/source/tabpages/connect.cxx +++ b/cui/source/tabpages/connect.cxx @@ -51,7 +51,7 @@ #include <cuires.hrc> -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_EDGE_FIRST, SDRATTR_EDGE_LAST, @@ -287,23 +287,23 @@ void __EXPORT SvxConnectionPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINEDELTAANZ ); if( pItem ) { - UINT16 nValue = ( ( const SdrEdgeLineDeltaAnzItem* )pItem )->GetValue(); + sal_uInt16 nValue = ( ( const SdrEdgeLineDeltaAnzItem* )pItem )->GetValue(); if( nValue <= 2 ) { - aFtLine3.Enable( FALSE ); - aMtrFldLine3.Enable( FALSE ); + aFtLine3.Enable( sal_False ); + aMtrFldLine3.Enable( sal_False ); aMtrFldLine3.SetEmptyFieldValue(); } if( nValue <= 1 ) { - aFtLine2.Enable( FALSE ); - aMtrFldLine2.Enable( FALSE ); + aFtLine2.Enable( sal_False ); + aMtrFldLine2.Enable( sal_False ); aMtrFldLine2.SetEmptyFieldValue(); } if( nValue == 0 ) { - aFtLine1.Enable( FALSE ); - aMtrFldLine1.Enable( FALSE ); + aFtLine1.Enable( sal_False ); + aMtrFldLine1.Enable( sal_False ); aMtrFldLine1.SetEmptyFieldValue(); } } @@ -315,7 +315,7 @@ void __EXPORT SvxConnectionPage::Reset( const SfxItemSet& rAttrs ) if( pItem ) { SdrEdgeKind nValue = ( ( const SdrEdgeKindItem* )pItem )->GetValue(); - aLbType.SelectEntryPos( sal::static_int_cast< USHORT >(nValue) ); + aLbType.SelectEntryPos( sal::static_int_cast< sal_uInt16 >(nValue) ); } else aLbType.SetNoSelection(); @@ -328,68 +328,68 @@ void __EXPORT SvxConnectionPage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxConnectionPage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxConnectionPage::FillItemSet( SfxItemSet& rAttrs) { - BOOL bModified = FALSE; - INT32 nValue; + sal_Bool bModified = sal_False; + sal_Int32 nValue; if( aMtrFldHorz1.GetText() != aMtrFldHorz1.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHorz1, eUnit ); rAttrs.Put( SdrEdgeNode1HorzDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHorz2.GetText() != aMtrFldHorz2.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHorz2, eUnit ); rAttrs.Put( SdrEdgeNode2HorzDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldVert1.GetText() != aMtrFldVert1.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldVert1, eUnit ); rAttrs.Put( SdrEdgeNode1VertDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldVert2.GetText() != aMtrFldVert2.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldVert2, eUnit ); rAttrs.Put( SdrEdgeNode2VertDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldLine1.GetText() != aMtrFldLine1.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLine1, eUnit ); rAttrs.Put( SdrEdgeLine1DeltaItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldLine2.GetText() != aMtrFldLine2.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLine2, eUnit ); rAttrs.Put( SdrEdgeLine2DeltaItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldLine3.GetText() != aMtrFldLine3.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLine3, eUnit ); rAttrs.Put( SdrEdgeLine3DeltaItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } - USHORT nPos = aLbType.GetSelectEntryPos(); + sal_uInt16 nPos = aLbType.GetSelectEntryPos(); if( nPos != aLbType.GetSavedValue() ) { if( nPos != LISTBOX_ENTRY_NOTFOUND ) { rAttrs.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -428,7 +428,7 @@ SfxTabPage* SvxConnectionPage::Create( Window* pWindow, |* \************************************************************************/ -USHORT* SvxConnectionPage::GetRanges() +sal_uInt16* SvxConnectionPage::GetRanges() { return( pRanges ); } @@ -443,50 +443,50 @@ IMPL_LINK( SvxConnectionPage, ChangeAttrHdl_Impl, void *, p ) { if( p == &aMtrFldHorz1 ) { - INT32 nValue = GetCoreValue( aMtrFldHorz1, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHorz1, eUnit ); aAttrSet.Put( SdrEdgeNode1HorzDistItem( nValue ) ); } if( p == &aMtrFldHorz2 ) { - INT32 nValue = GetCoreValue( aMtrFldHorz2, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHorz2, eUnit ); aAttrSet.Put( SdrEdgeNode2HorzDistItem( nValue ) ); } if( p == &aMtrFldVert1 ) { - INT32 nValue = GetCoreValue( aMtrFldVert1, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldVert1, eUnit ); aAttrSet.Put( SdrEdgeNode1VertDistItem( nValue ) ); } if( p == &aMtrFldVert2 ) { - INT32 nValue = GetCoreValue( aMtrFldVert2, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldVert2, eUnit ); aAttrSet.Put( SdrEdgeNode2VertDistItem( nValue ) ); } if( p == &aMtrFldLine1 ) { - INT32 nValue = GetCoreValue( aMtrFldLine1, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLine1, eUnit ); aAttrSet.Put( SdrEdgeLine1DeltaItem( nValue ) ); } if( p == &aMtrFldLine2 ) { - INT32 nValue = GetCoreValue( aMtrFldLine2, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLine2, eUnit ); aAttrSet.Put( SdrEdgeLine2DeltaItem( nValue ) ); } if( p == &aMtrFldLine3 ) { - INT32 nValue = GetCoreValue( aMtrFldLine3, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLine3, eUnit ); aAttrSet.Put( SdrEdgeLine3DeltaItem( nValue ) ); } if( p == &aLbType ) { - USHORT nPos = aLbType.GetSelectEntryPos(); + sal_uInt16 nPos = aLbType.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aAttrSet.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) ); @@ -498,7 +498,7 @@ IMPL_LINK( SvxConnectionPage, ChangeAttrHdl_Impl, void *, p ) if( p == &aLbType ) { // Anzahl der Linienversaetze ermitteln - USHORT nCount = aCtlPreview.GetLineDeltaAnz(); + sal_uInt16 nCount = aCtlPreview.GetLineDeltaAnz(); aFtLine3.Enable( nCount > 2 ); aMtrFldLine3.Enable( nCount > 2 ); @@ -543,10 +543,10 @@ void SvxConnectionPage::FillTypeLB() if( pItem ) { const SdrEdgeKindItem* pEdgeKindItem = (const SdrEdgeKindItem*) pItem; - USHORT nCount = pEdgeKindItem->GetValueCount(); + sal_uInt16 nCount = pEdgeKindItem->GetValueCount(); String aStr; - for( USHORT i = 0; i < nCount; i++ ) + for( sal_uInt16 i = 0; i < nCount; i++ ) { aStr = pEdgeKindItem->GetValueTextByPos( i ); aLbType.InsertEntry( aStr ); diff --git a/cui/source/tabpages/dstribut.cxx b/cui/source/tabpages/dstribut.cxx index 0474f8c3ef82..8d30c4431e55 100644 --- a/cui/source/tabpages/dstribut.cxx +++ b/cui/source/tabpages/dstribut.cxx @@ -37,7 +37,7 @@ #include <dialmgr.hxx> #include <tools/shl.hxx> -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST, @@ -148,7 +148,7 @@ SfxTabPage* SvxDistributePage::Create(Window* pWindow, const SfxItemSet& rAttrs, |* \************************************************************************/ -UINT16* SvxDistributePage::GetRanges() +sal_uInt16* SvxDistributePage::GetRanges() { return(pRanges); } @@ -171,34 +171,34 @@ void SvxDistributePage::PointChanged(Window* /*pWindow*/, RECT_POINT /*eRP*/) void __EXPORT SvxDistributePage::Reset(const SfxItemSet& ) { - maBtnHorNone.SetState(FALSE); - maBtnHorLeft.SetState(FALSE); - maBtnHorCenter.SetState(FALSE); - maBtnHorDistance.SetState(FALSE); - maBtnHorRight.SetState(FALSE); + maBtnHorNone.SetState(sal_False); + maBtnHorLeft.SetState(sal_False); + maBtnHorCenter.SetState(sal_False); + maBtnHorDistance.SetState(sal_False); + maBtnHorRight.SetState(sal_False); switch(meDistributeHor) { - case SvxDistributeHorizontalNone : maBtnHorNone.SetState(TRUE); break; - case SvxDistributeHorizontalLeft : maBtnHorLeft.SetState(TRUE); break; - case SvxDistributeHorizontalCenter : maBtnHorCenter.SetState(TRUE); break; - case SvxDistributeHorizontalDistance : maBtnHorDistance.SetState(TRUE); break; - case SvxDistributeHorizontalRight : maBtnHorRight.SetState(TRUE); break; + case SvxDistributeHorizontalNone : maBtnHorNone.SetState(sal_True); break; + case SvxDistributeHorizontalLeft : maBtnHorLeft.SetState(sal_True); break; + case SvxDistributeHorizontalCenter : maBtnHorCenter.SetState(sal_True); break; + case SvxDistributeHorizontalDistance : maBtnHorDistance.SetState(sal_True); break; + case SvxDistributeHorizontalRight : maBtnHorRight.SetState(sal_True); break; } - maBtnVerNone.SetState(FALSE); - maBtnVerTop.SetState(FALSE); - maBtnVerCenter.SetState(FALSE); - maBtnVerDistance.SetState(FALSE); - maBtnVerBottom.SetState(FALSE); + maBtnVerNone.SetState(sal_False); + maBtnVerTop.SetState(sal_False); + maBtnVerCenter.SetState(sal_False); + maBtnVerDistance.SetState(sal_False); + maBtnVerBottom.SetState(sal_False); switch(meDistributeVer) { - case SvxDistributeVerticalNone : maBtnVerNone.SetState(TRUE); break; - case SvxDistributeVerticalTop : maBtnVerTop.SetState(TRUE); break; - case SvxDistributeVerticalCenter : maBtnVerCenter.SetState(TRUE); break; - case SvxDistributeVerticalDistance : maBtnVerDistance.SetState(TRUE); break; - case SvxDistributeVerticalBottom : maBtnVerBottom.SetState(TRUE); break; + case SvxDistributeVerticalNone : maBtnVerNone.SetState(sal_True); break; + case SvxDistributeVerticalTop : maBtnVerTop.SetState(sal_True); break; + case SvxDistributeVerticalCenter : maBtnVerCenter.SetState(sal_True); break; + case SvxDistributeVerticalDistance : maBtnVerDistance.SetState(sal_True); break; + case SvxDistributeVerticalBottom : maBtnVerBottom.SetState(sal_True); break; } } @@ -208,7 +208,7 @@ void __EXPORT SvxDistributePage::Reset(const SfxItemSet& ) |* \************************************************************************/ -BOOL SvxDistributePage::FillItemSet( SfxItemSet& ) +sal_Bool SvxDistributePage::FillItemSet( SfxItemSet& ) { SvxDistributeHorizontal eDistributeHor(SvxDistributeHorizontalNone); SvxDistributeVertical eDistributeVer(SvxDistributeVerticalNone); @@ -235,10 +235,10 @@ BOOL SvxDistributePage::FillItemSet( SfxItemSet& ) { meDistributeHor = eDistributeHor; meDistributeVer = eDistributeVer; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 6fb538a76947..c06d564e45dd 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -82,8 +82,8 @@ SvxGrfCropPage::SvxGrfCropPage ( Window *pParent, const SfxItemSet &rSet ) aOrigSizePB( this, CUI_RES( PB_ORGSIZE )), aExampleWN( this, CUI_RES( WN_BSP )), pLastCropField(0), - bInitialized(FALSE), - bSetOrigSize(FALSE) + bInitialized(sal_False), + bSetOrigSize(sal_False) { FreeResource(); @@ -163,7 +163,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) const SfxItemPool& rPool = *rSet.GetPool(); if(SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( - SID_ATTR_GRAF_KEEP_ZOOM ), TRUE, &pItem )) + SID_ATTR_GRAF_KEEP_ZOOM ), sal_True, &pItem )) { if( ((const SfxBoolItem*)pItem)->GetValue() ) aZoomConstRB.Check(); @@ -172,8 +172,8 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) aZoomConstRB.SaveValue(); } - USHORT nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); - if( SFX_ITEM_SET == rSet.GetItemState( nW, TRUE, &pItem)) + sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); + if( SFX_ITEM_SET == rSet.GetItemState( nW, sal_True, &pItem)) { FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW )); @@ -198,7 +198,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) } nW = rPool.GetWhich( SID_ATTR_PAGE_SIZE ); - if ( SFX_ITEM_SET == rSet.GetItemState( nW, FALSE, &pItem ) ) + if ( SFX_ITEM_SET == rSet.GetItemState( nW, sal_False, &pItem ) ) { // Orientation und Size aus dem PageItem FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW )); @@ -221,8 +221,8 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) MapMode( (MapUnit)rSet.GetPool()->GetMetric( nW ) ) ); } - BOOL bFound = FALSE; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) ) + sal_Bool bFound = sal_False; + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) ) { const Graphic* pGrf = ((SvxBrushItem*)pItem)->GetGraphic(); if( pGrf ) @@ -234,30 +234,30 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) aExampleWN.SetGraphic( *pGrf ); aExampleWN.SetFrameSize( aOrigSize ); - bFound = TRUE; + bFound = sal_True; if( ((SvxBrushItem*)pItem)->GetGraphicLink() ) aGraphicName = *((SvxBrushItem*)pItem)->GetGraphicLink(); } } GraphicHasChanged( bFound ); - bReset = TRUE; + bReset = sal_True; ActivatePage( rSet ); - bReset = FALSE; + bReset = sal_False; } /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ -BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) { const SfxItemPool& rPool = *rSet.GetPool(); - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if( aWidthMF.GetSavedValue() != aWidthMF.GetText() || aHeightMF.GetSavedValue() != aHeightMF.GetText() ) { - USHORT nW = rPool.GetWhich( SID_ATTR_GRAF_FRMSIZE ); + sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_FRMSIZE ); FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW )); SvxSizeItem aSz( nW ); @@ -267,7 +267,7 @@ BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) const SfxItemSet* pExSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL; const SfxPoolItem* pItem = 0; if( pExSet && SFX_ITEM_SET == - pExSet->GetItemState( nW, FALSE, &pItem ) ) + pExSet->GetItemState( nW, sal_False, &pItem ) ) aSz = *(const SvxSizeItem*)pItem; else aSz = (const SvxSizeItem&)GetItemSet().Get( nW ); @@ -292,7 +292,7 @@ BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) if( aLeftMF.IsModified() || aRightMF.IsModified() || aTopMF.IsModified() || aBottomMF.IsModified() ) { - USHORT nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); + sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW )); SvxGrfCrop* pNew = (SvxGrfCrop*)rSet.Get( nW ).Clone(); @@ -310,7 +310,7 @@ BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) SID_ATTR_GRAF_KEEP_ZOOM), aZoomConstRB.IsChecked() ) ); } - bInitialized = FALSE; + bInitialized = sal_False; return bModified; } @@ -326,12 +326,12 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) DBG_ASSERT( pPool, "Wo ist der Pool" ); #endif - bSetOrigSize = FALSE; + bSetOrigSize = sal_False; // Size Size aSize; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_FRMSIZE, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_FRMSIZE, sal_False, &pItem ) ) aSize = ((const SvxSizeItem*)pItem)->GetSize(); nOldWidth = aSize.Width(); @@ -365,9 +365,9 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) aHeightMF.SetValue(nHeight, FUNIT_TWIP); } aHeightMF.SaveValue(); - bInitialized = TRUE; + bInitialized = sal_True; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) ) { const SvxBrushItem& rBrush = *(SvxBrushItem*)pItem; if( rBrush.GetGraphicLink() && @@ -384,7 +384,7 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) CalcMinMaxBorder(); } else - GraphicHasChanged( FALSE ); + GraphicHasChanged( sal_False ); } CalcZoom(); @@ -398,7 +398,7 @@ int SvxGrfCropPage::DeactivatePage(SfxItemSet *_pSet) { if ( _pSet ) FillItemSet( *_pSet ); - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -453,7 +453,7 @@ IMPL_LINK( SvxGrfCropPage, SizeHdl, MetricField *, pField ) lcl_GetValue(aRightMF, eUnit) ); if(!nWidth) nWidth++; - USHORT nZoom = (USHORT)( aSize.Width() * 100L / nWidth); + sal_uInt16 nZoom = (sal_uInt16)( aSize.Width() * 100L / nWidth); aWidthZoomMF.SetValue(nZoom); } else @@ -463,7 +463,7 @@ IMPL_LINK( SvxGrfCropPage, SizeHdl, MetricField *, pField ) lcl_GetValue(aBottomMF, eUnit)); if(!nHeight) nHeight++; - USHORT nZoom = (USHORT)( aSize.Height() * 100L/ nHeight); + sal_uInt16 nZoom = (sal_uInt16)( aSize.Height() * 100L/ nHeight); aHeightZoomMF.SetValue(nZoom); } @@ -481,7 +481,7 @@ IMPL_LINK( SvxGrfCropPage, CropHdl, const MetricField *, pField ) FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich( SID_ATTR_GRAF_CROP ) ) ); - BOOL bZoom = aZoomConstRB.IsChecked(); + sal_Bool bZoom = aZoomConstRB.IsChecked(); if( pField == &aLeftMF || pField == &aRightMF ) { long nLeft = lcl_GetValue( aLeftMF, eUnit ); @@ -576,7 +576,7 @@ IMPL_LINK( SvxGrfCropPage, OrigSizeHdl, PushButton *, EMPTYARG ) aHeightMF.SetValue( aHeightMF.Normalize( nHeight ), eUnit ); aWidthZoomMF.SetValue(100); aHeightZoomMF.SetValue(100); - bSetOrigSize = TRUE; + bSetOrigSize = sal_True; return 0; } /*-------------------------------------------------------------------- @@ -596,13 +596,13 @@ void SvxGrfCropPage::CalcZoom() lcl_GetValue( aRightMF, eUnit ); long nULBorders = lcl_GetValue( aTopMF, eUnit ) + lcl_GetValue( aBottomMF, eUnit ); - USHORT nZoom = 0; + sal_uInt16 nZoom = 0; long nDen; if( (nDen = aOrigSize.Width() - nLRBorders) > 0) - nZoom = (USHORT)((( nWidth * 1000L / nDen )+5)/10); + nZoom = (sal_uInt16)((( nWidth * 1000L / nDen )+5)/10); aWidthZoomMF.SetValue(nZoom); if( (nDen = aOrigSize.Height() - nULBorders) > 0) - nZoom = (USHORT)((( nHeight * 1000L / nDen )+5)/10); + nZoom = (sal_uInt16)((( nHeight * 1000L / nDen )+5)/10); else nZoom = 0; aHeightZoomMF.SetValue(nZoom); @@ -651,7 +651,7 @@ void SvxGrfCropPage::CalcMinMaxBorder() FixedText mit der Originalgroesse fuellen --------------------------------------------------------------------*/ -void SvxGrfCropPage::GraphicHasChanged( BOOL bFound ) +void SvxGrfCropPage::GraphicHasChanged( sal_Bool bFound ) { if( bFound ) { diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index becc29e468bc..e4ef79b4f1f9 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -65,7 +65,7 @@ // static ---------------------------------------------------------------- -static USHORT pCaptionRanges[] = +static sal_uInt16 pCaptionRanges[] = { SDRATTR_CAPTIONTYPE, SDRATTR_CAPTIONFIXEDANGLE, @@ -172,7 +172,7 @@ void SvxCaptionTabPage::Construct() // ----------------------------------------------------------------------- -BOOL SvxCaptionTabPage::FillItemSet( SfxItemSet& _rOutAttrs) +sal_Bool SvxCaptionTabPage::FillItemSet( SfxItemSet& _rOutAttrs) { SfxItemPool* pPool = _rOutAttrs.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); @@ -239,7 +239,7 @@ BOOL SvxCaptionTabPage::FillItemSet( SfxItemSet& _rOutAttrs) //NYI-------------die Winkel muessen noch hier rein!!! XXX---------------------- - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- @@ -267,7 +267,7 @@ void SvxCaptionTabPage::Reset( const SfxItemSet& ) SfxItemPool* pPool = rOutAttrs.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); - USHORT nWhich; + sal_uInt16 nWhich; SfxMapUnit eUnit; //------- Winkel ---------- @@ -391,14 +391,14 @@ SfxTabPage* SvxCaptionTabPage::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SvxCaptionTabPage::GetRanges() +sal_uInt16* SvxCaptionTabPage::GetRanges() { return( pCaptionRanges ); } //------------------------------------------------------------------------ -void SvxCaptionTabPage::SetupAnsatz_Impl( USHORT nType ) +void SvxCaptionTabPage::SetupAnsatz_Impl( sal_uInt16 nType ) { xub_StrLen nCnt=0, nIdx=0; @@ -515,7 +515,7 @@ IMPL_LINK_INLINE_END( SvxCaptionTabPage, SelectCaptTypeHdl_Impl, void *, EMPTYAR //------------------------------------------------------------------------ -void SvxCaptionTabPage::SetupType_Impl( USHORT nType ) +void SvxCaptionTabPage::SetupType_Impl( sal_uInt16 nType ) { switch( nType-1 ) { @@ -578,7 +578,7 @@ void SvxCaptionTabPage::FillValueSet() //======================================================================== -SvxCaptionTabDialog::SvxCaptionTabDialog(Window* pParent, const SdrView* pSdrView, USHORT nAnchorTypes) +SvxCaptionTabDialog::SvxCaptionTabDialog(Window* pParent, const SdrView* pSdrView, sal_uInt16 nAnchorTypes) : SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_CAPTION ) ), pView ( pSdrView ), nAnchorCtrls(nAnchorTypes) @@ -612,7 +612,7 @@ SvxCaptionTabDialog::~SvxCaptionTabDialog() // ----------------------------------------------------------------------- -void SvxCaptionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SvxCaptionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index c18ebf6f2a68..339559ba6d92 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -43,10 +43,11 @@ #include <svtools/svmedit.hxx> #include "cfgutil.hxx" #include <sfx2/app.hxx> +#include <sfx2/evntconf.hxx> #include <sfx2/objsh.hxx> #include "macroass.hrc" #include "cuires.hrc" -#include <sfx2/macrconf.hxx> +#include <vcl/fixed.hxx> #include "headertablistbox.hxx" using ::com::sun::star::uno::Reference; @@ -63,7 +64,6 @@ public: PushButton* pDeletePB; String* pStrEvent; String* pAssignedMacro; - ListBox* pScriptTypeLB; _HeaderTabListBox* pEventLB; SfxConfigGroupListBox_Impl* pGroupLB; FixedText* pFT_MacroLBLabel; @@ -71,12 +71,10 @@ public: FixedText* pMacroFT; String* pMacroStr; - FNGetRangeHdl fnGetRange; - FNGetMacrosOfRangeHdl fnGetMacroOfRange; - BOOL bReadOnly; + sal_Bool bReadOnly; Timer maFillGroupTimer; - BOOL bGotEvents; + sal_Bool bGotEvents; }; _SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) : @@ -84,17 +82,14 @@ _SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) : pDeletePB( NULL ), pStrEvent( NULL ), pAssignedMacro( NULL ), - pScriptTypeLB( NULL ), pEventLB( NULL ), pGroupLB( NULL ), pFT_MacroLBLabel( NULL ), pMacroLB( NULL ), pMacroFT( NULL ), pMacroStr( NULL ), - fnGetRange( NULL ), - fnGetMacroOfRange( NULL ), - bReadOnly( FALSE ), - bGotEvents( FALSE ) + bReadOnly( sal_False ), + bGotEvents( sal_False ) { } @@ -104,7 +99,6 @@ _SfxMacroTabPage_Impl::~_SfxMacroTabPage_Impl() delete pDeletePB; delete pStrEvent; delete pAssignedMacro; - delete pScriptTypeLB; delete pEventLB; delete pGroupLB; delete pMacroLB; @@ -114,10 +108,7 @@ _SfxMacroTabPage_Impl::~_SfxMacroTabPage_Impl() } -SvStringsDtor* _ImpGetRangeHdl( _SfxMacroTabPage*, const String& rLanguage ); -SvStringsDtor* _ImpGetMacrosOfRangeHdl( _SfxMacroTabPage*, const String& rLanguage, const String& rRange ); - -static USHORT __FAR_DATA aPageRg[] = { +static sal_uInt16 __FAR_DATA aPageRg[] = { SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, 0 }; @@ -139,13 +130,13 @@ static long nTabs[] = #define LB_EVENTS_ITEMPOS 1 #define LB_MACROS_ITEMPOS 2 -String ConvertToUIName_Impl( SvxMacro *pMacro, const String& /*rLanguage*/ ) +String ConvertToUIName_Impl( SvxMacro *pMacro ) { String aName( pMacro->GetMacName() ); String aEntry; if ( ! pMacro->GetLanguage().EqualsAscii("JavaScript") ) { - USHORT nCount = aName.GetTokenCount('.'); + sal_uInt16 nCount = aName.GetTokenCount('.'); aEntry = aName.GetToken( nCount-1, '.' ); if ( nCount > 2 ) { @@ -161,36 +152,24 @@ String ConvertToUIName_Impl( SvxMacro *pMacro, const String& /*rLanguage*/ ) return aName; } -void _SfxMacroTabPage::EnableButtons( const String& rLangName ) +void _SfxMacroTabPage::EnableButtons() { // Solange die Eventbox leer ist, nichts tun const SvLBoxEntry* pE = mpImpl->pEventLB->GetListBox().FirstSelected(); if ( pE ) { // Gebundenes Macro holen - const SvxMacro* pM = aTbl.Get( (USHORT)(ULONG) pE->GetUserData() ); + const SvxMacro* pM = aTbl.Get( (sal_uInt16)(sal_uLong) pE->GetUserData() ); mpImpl->pDeletePB->Enable( 0 != pM && !mpImpl->bReadOnly ); - // Bei gleichem ScriptType Zuweisung nur, wenn Macro sich - // ge"andert hat; bei verschiedenem ScriptType, wenn Script nicht leer String sEventMacro; sEventMacro = ((SvLBoxString*)pE->GetItem( LB_MACROS_ITEMPOS ))->GetText(); - if ( rLangName.EqualsAscii("JavaScript") ) - { - DBG_ERROR( "_SfxMacroTabPage::EnableButtons(): this is not an up to date usage!" ); - } - else - { - SfxMacroInfo* pInfo = mpImpl->pMacroLB->GetMacroInfo(); - String sSelMacro; - if ( pInfo ) - sSelMacro = pInfo->GetMacroName(); - if( pM && rLangName != pM->GetLanguage() ) - mpImpl->pAssignPB->Enable( pInfo != 0 && !mpImpl->bReadOnly ); - else - mpImpl->pAssignPB->Enable( pInfo && !mpImpl->bReadOnly && !sSelMacro.EqualsIgnoreCaseAscii( sEventMacro ) ); - } + + String sScriptURI = mpImpl->pMacroLB->GetSelectedScriptURI(); + mpImpl->pAssignPB->Enable( !mpImpl->bReadOnly && !sScriptURI.EqualsIgnoreCaseAscii( sEventMacro ) ); } + else + mpImpl->pAssignPB->Enable( sal_False ); } _SfxMacroTabPage::_SfxMacroTabPage( Window* pParent, const ResId& rResId, const SfxItemSet& rAttrSet ) @@ -198,8 +177,6 @@ _SfxMacroTabPage::_SfxMacroTabPage( Window* pParent, const ResId& rResId, const { mpImpl = new _SfxMacroTabPage_Impl; - mpImpl->fnGetRange = &_ImpGetRangeHdl; - mpImpl->fnGetMacroOfRange = &_ImpGetMacrosOfRangeHdl; } _SfxMacroTabPage::~_SfxMacroTabPage() @@ -207,7 +184,7 @@ _SfxMacroTabPage::~_SfxMacroTabPage() DELETEZ( mpImpl ); } -void _SfxMacroTabPage::AddEvent( const String & rEventName, USHORT nEventId ) +void _SfxMacroTabPage::AddEvent( const String & rEventName, sal_uInt16 nEventId ) { String sTmp( rEventName ); sTmp += '\t'; @@ -216,7 +193,7 @@ void _SfxMacroTabPage::AddEvent( const String & rEventName, USHORT nEventId ) SvxMacro* pM = aTbl.Get( nEventId ); if( pM ) { - String sNew( ConvertToUIName_Impl( pM, mpImpl->pScriptTypeLB->GetSelectEntry() ) ); + String sNew( ConvertToUIName_Impl( pM ) ); sTmp += sNew; } @@ -224,42 +201,41 @@ void _SfxMacroTabPage::AddEvent( const String & rEventName, USHORT nEventId ) pE->SetUserData( reinterpret_cast< void* >( sal::static_int_cast< sal_IntPtr >( nEventId )) ); } -void _SfxMacroTabPage::ScriptChanged( const String& aLangName ) +void _SfxMacroTabPage::ScriptChanged() { // neue Bereiche und deren Funktionen besorgen { - mpImpl->pGroupLB->SetScriptType( aLangName ); mpImpl->pGroupLB->Show(); mpImpl->pMacroLB->Show(); mpImpl->pMacroFT->SetText( *mpImpl->pMacroStr ); } - EnableButtons( aLangName ); + EnableButtons(); } -BOOL _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet ) { SvxMacroItem aItem( GetWhich( aPageRg[0] ) ); ((SvxMacroTableDtor&)aItem.GetMacroTable()) = aTbl; const SfxPoolItem* pItem; - if( SFX_ITEM_SET != GetItemSet().GetItemState( aItem.Which(), TRUE, &pItem ) + if( SFX_ITEM_SET != GetItemSet().GetItemState( aItem.Which(), sal_True, &pItem ) || aItem != *(SvxMacroItem*)pItem ) { rSet.Put( aItem ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void _SfxMacroTabPage::PageCreated (SfxAllItemSet aSet) { const SfxPoolItem* pEventsItem; - if( !mpImpl->bGotEvents && SFX_ITEM_SET == aSet.GetItemState( SID_EVENTCONFIG, TRUE, &pEventsItem ) ) + if( !mpImpl->bGotEvents && SFX_ITEM_SET == aSet.GetItemState( SID_EVENTCONFIG, sal_True, &pEventsItem ) ) { - mpImpl->bGotEvents = TRUE; + mpImpl->bGotEvents = sal_True; const SfxEventNamesList& rList = ((SfxEventNamesItem*)pEventsItem)->GetEvents(); - for ( USHORT nNo = 0; nNo < rList.Count(); ++nNo ) + for ( sal_uInt16 nNo = 0; nNo < rList.Count(); ++nNo ) { const SfxEventName *pOwn = rList.GetObject(nNo); AddEvent( pOwn->maUIName, pOwn->mnId ); @@ -270,15 +246,15 @@ void _SfxMacroTabPage::PageCreated (SfxAllItemSet aSet) void _SfxMacroTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( aPageRg[0] ), TRUE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( aPageRg[0] ), sal_True, &pItem )) aTbl = ((SvxMacroItem*)pItem)->GetMacroTable(); const SfxPoolItem* pEventsItem; - if( !mpImpl->bGotEvents && SFX_ITEM_SET == rSet.GetItemState( SID_EVENTCONFIG, TRUE, &pEventsItem ) ) + if( !mpImpl->bGotEvents && SFX_ITEM_SET == rSet.GetItemState( SID_EVENTCONFIG, sal_True, &pEventsItem ) ) { - mpImpl->bGotEvents = TRUE; + mpImpl->bGotEvents = sal_True; const SfxEventNamesList& rList = ((SfxEventNamesItem*)pEventsItem)->GetEvents(); - for ( USHORT nNo = 0; nNo < rList.Count(); ++nNo ) + for ( sal_uInt16 nNo = 0; nNo < rList.Count(); ++nNo ) { const SfxEventName *pOwn = rList.GetObject(nNo); AddEvent( pOwn->maUIName, pOwn->mnId ); @@ -293,7 +269,7 @@ void _SfxMacroTabPage::Reset( const SfxItemSet& rSet ) rListBox.SetCurEntry( pE ); } -BOOL _SfxMacroTabPage::IsReadOnly() const +sal_Bool _SfxMacroTabPage::IsReadOnly() const { return mpImpl->bReadOnly; } @@ -303,7 +279,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG ) _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; SvHeaderTabListBox& rListBox = pImpl->pEventLB->GetListBox(); SvLBoxEntry* pE = rListBox.FirstSelected(); - ULONG nPos; + sal_uLong nPos; if( !pE || LISTBOX_ENTRY_NOTFOUND == ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) ) { @@ -311,24 +287,8 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG ) return 0; } - USHORT nEventId = (USHORT)(ULONG)pE->GetUserData(); - String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); - - const SvxMacro* pM = pThis->aTbl.Get( nEventId ); - if( pM ) - { - if( aLanguage != pM->GetLanguage() ) - { - pImpl->pScriptTypeLB->SelectEntry( pM->GetLanguage() ); - pThis->ScriptChanged( pM->GetLanguage() ); - } - else - { - DBG_ASSERT( !aLanguage.EqualsAscii("JavaScript"), "_SfxMacroTabPage, SelectEvent_Impl(): outdated use!" ); - } - } - - pThis->EnableButtons( aLanguage ); + pThis->ScriptChanged(); + pThis->EnableButtons(); return 0; } @@ -336,26 +296,14 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox*, EMPTYARG ) { _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; String sSel( pImpl->pGroupLB->GetGroup() ); - String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); - if( !aLanguage.EqualsAscii( "JavaScript" ) ) - { - pImpl->pGroupLB->GroupSelected(); - SfxMacroInfo* pMacro = pImpl->pMacroLB->GetMacroInfo(); - String aLabelText; - if( pMacro ) - { - aLabelText = pImpl->maStaticMacroLBLabel; - aLabelText += pMacro->GetModuleName(); - } - else - { - // Wenn dort ein Macro drin ist, wurde es selektiert und der - // AssignButton schon in SelectMacro richtig enabled - pImpl->pAssignPB->Enable( FALSE ); - } - - pImpl->pFT_MacroLBLabel->SetText( aLabelText ); - } + pImpl->pGroupLB->GroupSelected(); + const String sScriptURI = pImpl->pMacroLB->GetSelectedScriptURI(); + String aLabelText; + if( sScriptURI.Len() > 0 ) + aLabelText = pImpl->maStaticMacroLBLabel; + pImpl->pFT_MacroLBLabel->SetText( aLabelText ); + + pThis->EnableButtons(); return 0; } @@ -363,7 +311,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox*, EMPTYARG ) { _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; pImpl->pMacroLB->FunctionSelected(); - pThis->EnableButtons( pImpl->pScriptTypeLB->GetSelectEntry() ); + pThis->EnableButtons(); return 0; } @@ -372,7 +320,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; SvHeaderTabListBox& rListBox = pImpl->pEventLB->GetListBox(); SvLBoxEntry* pE = rListBox.FirstSelected(); - ULONG nPos; + sal_uLong nPos; if( !pE || LISTBOX_ENTRY_NOTFOUND == ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) ) { @@ -380,58 +328,38 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) return 0; } - const BOOL bAssEnabled = pBtn != pImpl->pDeletePB && pImpl->pAssignPB->IsEnabled(); + const sal_Bool bAssEnabled = pBtn != pImpl->pDeletePB && pImpl->pAssignPB->IsEnabled(); // aus der Tabelle entfernen - USHORT nEvent = (USHORT)(ULONG)pE->GetUserData(); + sal_uInt16 nEvent = (sal_uInt16)(sal_uLong)pE->GetUserData(); SvxMacro *pRemoveMacro = pThis->aTbl.Remove( nEvent ); delete pRemoveMacro; - String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); - String sNew; + String sScriptURI; if( bAssEnabled ) { - String sGroup; - String sMacro; - String aEntryText( sNew ); - DBG_ASSERT( !aLanguage.EqualsAscii("JavaScript"), "_SfxMacroTabPage, AssignDeleteHdl_Impl(): outdated use!" ); - - SfxMacroInfo* pMacro = pImpl->pMacroLB->GetMacroInfo(); - sMacro = pMacro->GetQualifiedName(); - sGroup = pImpl->pGroupLB->GetGroup(); - sNew = pMacro->GetMacroName(); - - if( sMacro.CompareToAscii( "vnd.sun.star.script:", 20 ) == COMPARE_EQUAL ) + sScriptURI = pImpl->pMacroLB->GetSelectedScriptURI(); + if( sScriptURI.CompareToAscii( "vnd.sun.star.script:", 20 ) == COMPARE_EQUAL ) { - OSL_TRACE("ASSIGN_DELETE: Its a script"); pThis->aTbl.Insert( - nEvent, new SvxMacro( sMacro, String::CreateFromAscii("Script") ) ); + nEvent, new SvxMacro( sScriptURI, String::CreateFromAscii( SVX_MACRO_LANGUAGE_SF ) ) ); } else { - OSL_TRACE("ASSIGN_DELETE: Its a basic macro"); - String sBasicName/*(SfxResId(STR_BASICNAME))*/; - if ( aLanguage == sBasicName ) - pThis->aTbl.Insert( nEvent, new SvxMacro( sMacro, sGroup, STARBASIC ) ); - else - pThis->aTbl.Insert( nEvent, new SvxMacro( sMacro, aLanguage ) ); + OSL_ENSURE( false, "_SfxMacroTabPage::AssignDeleteHdl_Impl: this branch is *not* dead? (out of interest: tell fs, please!)" ); + pThis->aTbl.Insert( + nEvent, new SvxMacro( sScriptURI, String::CreateFromAscii( SVX_MACRO_LANGUAGE_STARBASIC ) ) ); } } - pImpl->pEventLB->SetUpdateMode( FALSE ); - pE->ReplaceItem( new SvLBoxString( pE, 0, sNew ), LB_MACROS_ITEMPOS ); + pImpl->pEventLB->SetUpdateMode( sal_False ); + pE->ReplaceItem( new SvLBoxString( pE, 0, sScriptURI ), LB_MACROS_ITEMPOS ); rListBox.GetModel()->InvalidateEntry( pE ); rListBox.Select( pE ); rListBox.MakeVisible( pE ); - rListBox.SetUpdateMode( TRUE ); + rListBox.SetUpdateMode( sal_True ); - pThis->EnableButtons( aLanguage ); - return 0; -} - -IMPL_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton*, EMPTYARG ) -{ - pThis->ScriptChanged( pThis->mpImpl->pScriptTypeLB->GetSelectEntry() ); + pThis->EnableButtons(); return 0; } @@ -443,12 +371,12 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer*, EMPTYARG ) if ( pTabDlg ) { pTabDlg->EnterWait(); - pTabDlg->EnableInput( FALSE ); + pTabDlg->EnableInput( sal_False ); } pThis->FillMacroList(); if ( pTabDlg ) { - pTabDlg->EnableInput( TRUE ); + pTabDlg->EnableInput( sal_True ); pTabDlg->LeaveWait(); } return 0; @@ -469,8 +397,6 @@ void _SfxMacroTabPage::InitAndSetHandler() mpImpl->pGroupLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectGroup_Impl )); mpImpl->pMacroLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectMacro_Impl )); - mpImpl->pScriptTypeLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, ChangeScriptHdl_Impl )); - rListBox.SetSelectionMode( SINGLE_SELECTION ); rListBox.SetTabs( &nTabs[0], MAP_APPFONT ); Size aSize( nTabs[ 2 ], 0 ); @@ -482,14 +408,9 @@ void _SfxMacroTabPage::InitAndSetHandler() mpImpl->pEventLB->Show(); mpImpl->pEventLB->ConnectElements(); - mpImpl->pEventLB->Enable( TRUE ); - mpImpl->pGroupLB->Enable( TRUE ); - mpImpl->pMacroLB->Enable( TRUE ); - - mpImpl->pScriptTypeLB->SetDropDownLineCount( 3 ); - String sBasicName/*(SfxResId(STR_BASICNAME))*/; - mpImpl->pScriptTypeLB->InsertEntry( sBasicName ); - mpImpl->pScriptTypeLB->SelectEntry( sBasicName ); + mpImpl->pEventLB->Enable( sal_True ); + mpImpl->pGroupLB->Enable( sal_True ); + mpImpl->pMacroLB->Enable( sal_True ); mpImpl->pGroupLB->SetFunctionListBox( mpImpl->pMacroLB ); @@ -500,33 +421,21 @@ void _SfxMacroTabPage::InitAndSetHandler() void _SfxMacroTabPage::FillMacroList() { - String aLanguage = mpImpl->pScriptTypeLB->GetSelectEntry(); - if( ! aLanguage.EqualsAscii("JavaScript") ) - { - // 2 Listboxen - SvStringsDtor* pArr = (*mpImpl->fnGetRange)( this, String(/*SfxResId(STR_BASICNAME)*/) ); - if( pArr ) - { - mpImpl->pGroupLB->Init( - ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory >(), - GetFrame(), - ::rtl::OUString() ); - - delete pArr; - } - } + mpImpl->pGroupLB->Init( + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory >(), + GetFrame(), + ::rtl::OUString() ); } void _SfxMacroTabPage::FillEvents() { SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); - String aLanguage = mpImpl->pScriptTypeLB->GetSelectEntry(); - ULONG nEntryCnt = rListBox.GetEntryCount(); + sal_uLong nEntryCnt = rListBox.GetEntryCount(); // Events aus der Tabelle holen und die EventListBox entsprechen fuellen - for( ULONG n = 0 ; n < nEntryCnt ; ++n ) + for( sal_uLong n = 0 ; n < nEntryCnt ; ++n ) { SvLBoxEntry* pE = rListBox.GetEntry( n ); if( pE ) @@ -536,9 +445,9 @@ void _SfxMacroTabPage::FillEvents() String sOld( pLItem->GetText() ); String sNew; - USHORT nEventId = ( USHORT ) ( ULONG ) pE->GetUserData(); + sal_uInt16 nEventId = ( sal_uInt16 ) ( sal_uLong ) pE->GetUserData(); if( aTbl.IsKeyValid( nEventId ) ) - sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ), aLanguage ); + sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ) ); if( sOld != sNew ) { @@ -549,78 +458,6 @@ void _SfxMacroTabPage::FillEvents() } } -SvStringsDtor* __EXPORT _ImpGetRangeHdl( _SfxMacroTabPage* /*pTbPg*/, const String& rLanguage ) -{ - SvStringsDtor* pNew = new SvStringsDtor; - SfxApplication* pSfxApp = SFX_APP(); - - if ( !rLanguage.EqualsAscii("JavaScript") ) - { - pSfxApp->EnterBasicCall(); - - // AppBasic einf"ugen - String* pNewEntry = new String( pSfxApp->GetName() ); - pNew->Insert( pNewEntry, pNew->Count() ); - - // Aktuelles Dokument - SfxObjectShell* pDoc = SfxObjectShell::Current(); - if ( pDoc ) - { - String aTitle = pDoc->GetTitle(); - - // Hack f"ur Aufruf aus der Basic-IDE : das Basic ermitteln, das - // gerade bearbeitet wird - - String aAppName(DEFINE_CONST_UNICODE("BASIC - ")); - USHORT nLen = aAppName.Len(); - if ( aTitle.CompareIgnoreCaseToAscii( aAppName, nLen ) == COMPARE_EQUAL ) - { - // Basic-Namensprefix entfernen - aTitle.Erase( 0, nLen ); - USHORT nIndex=0, nCount=aTitle.GetTokenCount('.'); - if ( nCount > 1 ) - { - // Namen der Library entfernen - aTitle.GetToken( nCount-2, '.', nIndex ); - aTitle.Erase( nIndex-1 ); - } - - // Wenn das App-Basic gerade in der Basic-IDE bearbeitet wird, kein - // Dokument verwenden - pDoc = SfxObjectShell::GetFirst(); - while( pDoc ) - { - if ( aTitle == pDoc->GetTitle() ) - break; - pDoc = SfxObjectShell::GetNext( *pDoc ); - } - } - - if ( pDoc && pDoc->GetBasicManager() != SFX_APP()->GetBasicManager() && - pDoc->GetBasicManager()->GetLibCount() ) - { - pNewEntry = new String( aTitle ); - pNew->Insert( pNewEntry, pNew->Count() ); - } - } - - pSfxApp->LeaveBasicCall(); - } - - return pNew; -} - -// besorgen der Funktionen eines Bereiches -SvStringsDtor* __EXPORT _ImpGetMacrosOfRangeHdl( - _SfxMacroTabPage* /*pTbPg*/, - const String& /*rLanguage*/, - const String& /*rRange*/ ) -{ - SvStringsDtor* pNew = new SvStringsDtor; - return pNew; -} - - SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet ) : _SfxMacroTabPage( pParent, rResId, rSet ) { @@ -629,8 +466,6 @@ SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Re mpImpl->pEventLB = new _HeaderTabListBox( this, CUI_RES( LB_EVENT ) ); mpImpl->pAssignPB = new PushButton( this, CUI_RES( PB_ASSIGN ) ); mpImpl->pDeletePB = new PushButton( this, CUI_RES( PB_DELETE ) ); - mpImpl->pScriptTypeLB = new ListBox(this, CUI_RES( LB_SCRIPTTYPE ) ); - mpImpl->pScriptTypeLB->Hide(); mpImpl->pMacroFT = new FixedText( this, CUI_RES( FT_MACRO ) ); mpImpl->pGroupLB = new SfxConfigGroupListBox_Impl( this, CUI_RES( LB_GROUP ) ); mpImpl->pFT_MacroLBLabel = new FixedText( this, CUI_RES( FT_LABEL4LB_MACROS ) ); @@ -644,7 +479,7 @@ SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Re InitAndSetHandler(); - ScriptChanged( String( /*SfxResId(STR_BASICNAME)*/ ) ); + ScriptChanged(); } SfxTabPage* SfxMacroTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet ) diff --git a/cui/source/tabpages/macroass.hrc b/cui/source/tabpages/macroass.hrc index 614711e1981e..73292a7f1b0e 100644 --- a/cui/source/tabpages/macroass.hrc +++ b/cui/source/tabpages/macroass.hrc @@ -38,7 +38,7 @@ #define FT_MACRO 5 #define LB_GROUP 6 #define LB_MACROS 7 -#define LB_SCRIPTTYPE 8 + // FREE #define FT_LABEL4LB_MACROS 9 #define STR_JAVASCRIPT 10 #define STR_MACROS 11 diff --git a/cui/source/tabpages/macroass.src b/cui/source/tabpages/macroass.src index 9a5bb519d460..05e81658b8a3 100644 --- a/cui/source/tabpages/macroass.src +++ b/cui/source/tabpages/macroass.src @@ -78,7 +78,7 @@ TabPage RID_SVXPAGE_EVENTASSIGN Pos = MAP_APPFONT ( COL2 , ROW7 ) ; Size = MAP_APPFONT ( WIDTH1 , RSC_CD_FIXEDTEXT_HEIGHT + HEIGHT_EXTRA7 ) ; WordBreak = TRUE; - Text [ en-US ] = "~Existing macros in:\n" ; + Text [ en-US ] = "~Existing macros\n" ; }; Control LB_MACROS { @@ -107,17 +107,6 @@ TabPage RID_SVXPAGE_EVENTASSIGN TabStop = TRUE ; Text [ en-US ] = "~Remove" ; }; - ListBox LB_SCRIPTTYPE - { - HelpID = "cui:ListBox:RID_SVXPAGE_EVENTASSIGN:LB_SCRIPTTYPE"; - Pos = MAP_APPFONT ( COL4 , ROW4 ) ; - Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , 60 ) ; - // en-US was missing - Text [ en-US ] = "~Scripting Language" ; - TabStop = TRUE ; - Disable = FALSE ; - DropDown = TRUE ; - }; String STR_MACROS { Text [ en-US ] = "Macros" ; diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index c370b5183ebd..2c90310dbf67 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -52,7 +52,7 @@ #include <sfx2/request.hxx> //add CHINA001 #include "svx/ofaitem.hxx" //add CHINA001 -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST, @@ -128,7 +128,7 @@ SvxMeasurePage::SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs ) : aAttrSet ( *rInAttrs.GetPool() ), pView( 0 ), - bPositionModified ( FALSE ) + bPositionModified ( sal_False ) { FillUnitLB(); @@ -273,7 +273,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { aTsbBelowRefEdge.SetState( ( ( const SdrMeasureBelowRefEdgeItem& )rAttrs.Get( SDRATTR_MEASUREBELOWREFEDGE ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbBelowRefEdge.EnableTriState( FALSE ); + aTsbBelowRefEdge.EnableTriState( sal_False ); } else { @@ -287,7 +287,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREDECIMALPLACES ); if( pItem ) { - INT16 nValue = ( ( const SdrMeasureDecimalPlacesItem* )pItem )->GetValue(); + sal_Int16 nValue = ( ( const SdrMeasureDecimalPlacesItem* )pItem )->GetValue(); aMtrFldDecimalPlaces.SetValue( nValue ); } else @@ -302,7 +302,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { aTsbParallel.SetState( ( ( const SdrMeasureTextRota90Item& )rAttrs.Get( SDRATTR_MEASURETEXTROTA90 ) ). GetValue() ? STATE_NOCHECK : STATE_CHECK ); - aTsbParallel.EnableTriState( FALSE ); + aTsbParallel.EnableTriState( sal_False ); } else { @@ -315,7 +315,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { aTsbShowUnit.SetState( ( ( const SdrMeasureShowUnitItem& )rAttrs.Get( SDRATTR_MEASURESHOWUNIT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbShowUnit.EnableTriState( FALSE ); + aTsbShowUnit.EnableTriState( sal_False ); } else { @@ -329,7 +329,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) long nFieldUnit = (long) ( ( const SdrMeasureUnitItem& )rAttrs. Get( SDRATTR_MEASUREUNIT ) ).GetValue(); - for( USHORT i = 0; i < aLbUnit.GetEntryCount(); ++i ) + for( sal_uInt16 i = 0; i < aLbUnit.GetEntryCount(); ++i ) { if ( (long)aLbUnit.GetEntryData( i ) == nFieldUnit ) { @@ -352,8 +352,8 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE ) { - aTsbAutoPosV.EnableTriState( FALSE ); - aTsbAutoPosH.EnableTriState( FALSE ); + aTsbAutoPosV.EnableTriState( sal_False ); + aTsbAutoPosH.EnableTriState( sal_False ); SdrMeasureTextHPos eHPos = (SdrMeasureTextHPos) ( ( const SdrMeasureTextHPosItem& )rAttrs.Get( SDRATTR_MEASURETEXTHPOS ) ).GetValue(); @@ -431,7 +431,7 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) ChangeAttrHdl_Impl( &aTsbShowUnit ); aCtlPreview.SetAttributes( rAttrs ); - bPositionModified = FALSE; + bPositionModified = sal_False; } /************************************************************************* @@ -440,86 +440,86 @@ void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) { - BOOL bModified = FALSE; - INT32 nValue; + sal_Bool bModified = sal_False; + sal_Int32 nValue; TriState eState; if( aMtrFldLineDist.GetText() != aMtrFldLineDist.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLineDist, eUnit ); rAttrs.Put( SdrMeasureLineDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelplineOverhang.GetText() != aMtrFldHelplineOverhang.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit ); rAttrs.Put( SdrMeasureHelplineOverhangItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelplineDist.GetText() != aMtrFldHelplineDist.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelplineDist, eUnit ); rAttrs.Put( SdrMeasureHelplineDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelpline1Len.GetText() != aMtrFldHelpline1Len.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit ); rAttrs.Put( SdrMeasureHelpline1LenItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelpline2Len.GetText() != aMtrFldHelpline2Len.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit ); rAttrs.Put( SdrMeasureHelpline2LenItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } eState = aTsbBelowRefEdge.GetState(); if( eState != aTsbBelowRefEdge.GetSavedValue() ) { - rAttrs.Put( SdrMeasureBelowRefEdgeItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrMeasureBelowRefEdgeItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } if( aMtrFldDecimalPlaces.GetText() != aMtrFldDecimalPlaces.GetSavedValue() ) { - nValue = static_cast<INT32>(aMtrFldDecimalPlaces.GetValue()); + nValue = static_cast<sal_Int32>(aMtrFldDecimalPlaces.GetValue()); rAttrs.Put( SdrMeasureDecimalPlacesItem( - sal::static_int_cast< INT16 >( nValue ) ) ); - bModified = TRUE; + sal::static_int_cast< sal_Int16 >( nValue ) ) ); + bModified = sal_True; } eState = aTsbParallel.GetState(); if( eState != aTsbParallel.GetSavedValue() ) { - rAttrs.Put( SdrMeasureTextRota90Item( (BOOL) STATE_NOCHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrMeasureTextRota90Item( (sal_Bool) STATE_NOCHECK == eState ) ); + bModified = sal_True; } eState = aTsbShowUnit.GetState(); if( eState != aTsbShowUnit.GetSavedValue() ) { - rAttrs.Put( SdrMeasureShowUnitItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrMeasureShowUnitItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } - USHORT nPos = aLbUnit.GetSelectEntryPos(); + sal_uInt16 nPos = aLbUnit.GetSelectEntryPos(); if( nPos != aLbUnit.GetSavedValue() ) { if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nFieldUnit = (USHORT)(long)aLbUnit.GetEntryData( nPos ); + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aLbUnit.GetEntryData( nPos ); FieldUnit _eUnit = (FieldUnit) nFieldUnit; rAttrs.Put( SdrMeasureUnitItem( _eUnit ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -568,13 +568,13 @@ BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) if( eOldVPos != eVPos ) { rAttrs.Put( SdrMeasureTextVPosItem( eVPos ) ); - bModified = TRUE; + bModified = sal_True; } } else { rAttrs.Put( SdrMeasureTextVPosItem( eVPos ) ); - bModified = TRUE; + bModified = sal_True; } if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE ) @@ -584,13 +584,13 @@ BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) if( eOldHPos != eHPos ) { rAttrs.Put( SdrMeasureTextHPosItem( eHPos ) ); - bModified = TRUE; + bModified = sal_True; } } else { rAttrs.Put( SdrMeasureTextHPosItem( eHPos ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -630,7 +630,7 @@ SfxTabPage* SvxMeasurePage::Create( Window* pWindow, |* \************************************************************************/ -USHORT* SvxMeasurePage::GetRanges() +sal_uInt16* SvxMeasurePage::GetRanges() { return( pRanges ); } @@ -712,31 +712,31 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) if( p == &aMtrFldLineDist ) { - INT32 nValue = GetCoreValue( aMtrFldLineDist, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLineDist, eUnit ); aAttrSet.Put( SdrMeasureLineDistItem( nValue ) ); } if( p == &aMtrFldHelplineOverhang ) { - INT32 nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit ); aAttrSet.Put( SdrMeasureHelplineOverhangItem( nValue) ); } if( p == &aMtrFldHelplineDist ) { - INT32 nValue = GetCoreValue( aMtrFldHelplineDist, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelplineDist, eUnit ); aAttrSet.Put( SdrMeasureHelplineDistItem( nValue) ); } if( p == &aMtrFldHelpline1Len ) { - INT32 nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit ); aAttrSet.Put( SdrMeasureHelpline1LenItem( nValue ) ); } if( p == &aMtrFldHelpline2Len ) { - INT32 nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit ); aAttrSet.Put( SdrMeasureHelpline2LenItem( nValue ) ); } @@ -744,12 +744,12 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) { TriState eState = aTsbBelowRefEdge.GetState(); if( eState != STATE_DONTKNOW ) - aAttrSet.Put( SdrMeasureBelowRefEdgeItem( (BOOL) STATE_CHECK == eState ) ); + aAttrSet.Put( SdrMeasureBelowRefEdgeItem( (sal_Bool) STATE_CHECK == eState ) ); } if( p == &aMtrFldDecimalPlaces ) { - INT16 nValue = sal::static_int_cast< INT16 >( + sal_Int16 nValue = sal::static_int_cast< sal_Int16 >( aMtrFldDecimalPlaces.GetValue() ); aAttrSet.Put( SdrMeasureDecimalPlacesItem( nValue ) ); } @@ -758,22 +758,22 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) { TriState eState = aTsbParallel.GetState(); if( eState != STATE_DONTKNOW ) - aAttrSet.Put( SdrMeasureTextRota90Item( (BOOL) !STATE_CHECK == eState ) ); + aAttrSet.Put( SdrMeasureTextRota90Item( (sal_Bool) !STATE_CHECK == eState ) ); } if( p == &aTsbShowUnit ) { TriState eState = aTsbShowUnit.GetState(); if( eState != STATE_DONTKNOW ) - aAttrSet.Put( SdrMeasureShowUnitItem( (BOOL) STATE_CHECK == eState ) ); + aAttrSet.Put( SdrMeasureShowUnitItem( (sal_Bool) STATE_CHECK == eState ) ); } if( p == &aLbUnit ) { - USHORT nPos = aLbUnit.GetSelectEntryPos(); + sal_uInt16 nPos = aLbUnit.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nFieldUnit = (USHORT)(long)aLbUnit.GetEntryData( nPos ); + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aLbUnit.GetEntryData( nPos ); FieldUnit _eUnit = (FieldUnit) nFieldUnit; aAttrSet.Put( SdrMeasureUnitItem( _eUnit ) ); } @@ -781,7 +781,7 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) if( p == &aTsbAutoPosV || p == &aTsbAutoPosH || p == &aCtlPosition ) { - bPositionModified = TRUE; + bPositionModified = sal_True; // Position RECT_POINT eRP = aCtlPosition.GetActualRP(); @@ -851,10 +851,10 @@ void SvxMeasurePage::FillUnitLB() long nUnit = FUNIT_NONE; String aStrMetric( CUI_RES( STR_MEASURE_AUTOMATIC ) ); - USHORT nPos = aLbUnit.InsertEntry( aStrMetric ); + sal_uInt16 nPos = aLbUnit.InsertEntry( aStrMetric ); aLbUnit.SetEntryData( nPos, (void*)nUnit ); - for( USHORT i = 0; i < aMetricArr.Count(); ++i ) + for( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i ) { aStrMetric = aMetricArr.GetStringByPos( i ); nUnit = aMetricArr.GetValue( i ); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 15ac78e9975e..4787f263657b 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -64,7 +64,7 @@ // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO, @@ -97,10 +97,10 @@ SvxNumberPreviewImpl::SvxNumberPreviewImpl( Window* pParent, const ResId& rResId { Font aFont( GetFont() ); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aFont.SetColor( Application::GetSettings().GetStyleSettings().GetFieldColor() ); SetFont( aFont ); - InitSettings( TRUE, TRUE ); + InitSettings( sal_True, sal_True ); SetBorderStyle( WINDOW_BORDER_MONO ); } @@ -175,7 +175,7 @@ void SvxNumberPreviewImpl::Paint( const Rectangle& ) // ----------------------------------------------------------------------- -void SvxNumberPreviewImpl::InitSettings( BOOL bForeground, BOOL bBackground ) +void SvxNumberPreviewImpl::InitSettings( sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); @@ -204,9 +204,9 @@ void SvxNumberPreviewImpl::InitSettings( BOOL bForeground, BOOL bBackground ) void SvxNumberPreviewImpl::StateChanged( StateChangedType nType ) { if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) - InitSettings( TRUE, FALSE ); + InitSettings( sal_True, sal_False ); else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) - InitSettings( FALSE, TRUE ); + InitSettings( sal_False, sal_True ); Window::StateChanged( nType ); } @@ -218,7 +218,7 @@ void SvxNumberPreviewImpl::DataChanged( const DataChangedEvent& rDCEvt ) Window::DataChanged( rDCEvt ); if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) - InitSettings( TRUE, TRUE ); + InitSettings( sal_True, sal_True ); } // class SvxNumberFormatTabPage ------------------------------------------ @@ -258,7 +258,7 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window* pParent, aLbCurrency ( this, CUI_RES( LB_CURRENCY) ), aLbFormat ( this, CUI_RES( LB_FORMAT ) ), aFtLanguage ( this, CUI_RES( FT_LANGUAGE ) ), - aLbLanguage ( this, CUI_RES( LB_LANGUAGE ), FALSE ), + aLbLanguage ( this, CUI_RES( LB_LANGUAGE ), sal_False ), aCbSourceFormat ( this, CUI_RES( CB_SOURCEFORMAT ) ), aFtDecimals ( this, CUI_RES( FT_DECIMALS ) ), aEdDecimals ( this, CUI_RES( ED_DECIMALS ) ), @@ -309,8 +309,8 @@ void SvxNumberFormatTabPage::Init_Impl() ImageList aIconList( CUI_RES_PLAIN ( IL_ICON ) ); ImageList aIconListHC( CUI_RES_PLAIN ( IL_ICON_HC ) ); - bNumItemFlag=TRUE; - bOneAreaFlag=FALSE; + bNumItemFlag=sal_True; + bOneAreaFlag=sal_False; nCatHeight=aLbCategory.GetSizePixel().Height(); @@ -328,15 +328,15 @@ void SvxNumberFormatTabPage::Init_Impl() aIbInfo. SetModeImage( aIconList.GetImage( IID_INFO ) ); aIbInfo. SetModeImage( aIconListHC.GetImage( IID_INFO ), BMP_COLOR_HIGHCONTRAST ); - aIbAdd.Enable(FALSE ); - aIbRemove.Enable(FALSE ); - aIbInfo.Enable(FALSE ); + aIbAdd.Enable(sal_False ); + aIbRemove.Enable(sal_False ); + aIbInfo.Enable(sal_False ); aEdComment.SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert //holen aEdComment.Hide(); - aCbSourceFormat.Check( FALSE ); + aCbSourceFormat.Check( sal_False ); aCbSourceFormat.Disable(); aCbSourceFormat.Hide(); @@ -396,7 +396,7 @@ void SvxNumberFormatTabPage::Init_Impl() #* #************************************************************************/ -USHORT* SvxNumberFormatTabPage::GetRanges() +sal_uInt16* SvxNumberFormatTabPage::GetRanges() { return pRanges; } @@ -444,8 +444,8 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) const SfxPoolItem* pItem = NULL; const SfxBoolItem* pAutoEntryAttr = NULL; - USHORT nCatLbSelPos = 0; - USHORT nFmtLbSelPos = 0; + sal_uInt16 nCatLbSelPos = 0; + sal_uInt16 nFmtLbSelPos = 0; LanguageType eLangType = LANGUAGE_DONTKNOW; SvxDelStrgs aFmtEntryList; SvxNumberValueType eValType = SVX_VALUE_TYPE_UNDEFINED; @@ -454,7 +454,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) SfxItemState eState = SFX_ITEM_DONTCARE; - eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_NOLANGUAGE ),TRUE,&pItem); + eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_NOLANGUAGE ),sal_True,&pItem); if(eState==SFX_ITEM_SET) { @@ -467,28 +467,28 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) } else { - HideLanguage(FALSE); + HideLanguage(sal_False); } } - eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_INFO ),TRUE,&pItem); + eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_INFO ),sal_True,&pItem); if(eState==SFX_ITEM_SET) { if(pNumItem==NULL) { - bNumItemFlag=TRUE; + bNumItemFlag=sal_True; pNumItem= (SvxNumberInfoItem *) pItem->Clone(); } else { - bNumItemFlag=FALSE; + bNumItemFlag=sal_False; } } else { - bNumItemFlag=FALSE; + bNumItemFlag=sal_False; } @@ -504,7 +504,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) bOneAreaFlag= pBoolItem->GetValue(); } } - //bOneAreaFlag=TRUE; //@@ Debug-Test + //bOneAreaFlag=sal_True; //@@ Debug-Test eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_SOURCE ) ); @@ -515,13 +515,13 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) if ( pBoolItem ) aCbSourceFormat.Check( pBoolItem->GetValue() ); else - aCbSourceFormat.Check( FALSE ); + aCbSourceFormat.Check( sal_False ); aCbSourceFormat.Enable(); aCbSourceFormat.Show(); } else { - BOOL bInit = FALSE; // set to TRUE for debug test + sal_Bool bInit = sal_False; // set to sal_True for debug test aCbSourceFormat.Check( bInit ); aCbSourceFormat.Enable( bInit ); aCbSourceFormat.Show( bInit ); @@ -585,7 +585,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) pNumFmtShell->GetInitSettings( nCatLbSelPos, eLangType, nFmtLbSelPos, aFmtEntryList, aPrevString, pDummy ); - aLbCurrency.SelectEntryPos((USHORT)pNumFmtShell->GetCurrencySymbol()); + aLbCurrency.SelectEntryPos((sal_uInt16)pNumFmtShell->GetCurrencySymbol()); nFixedCategory=nCatLbSelPos; if(bOneAreaFlag) @@ -614,7 +614,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) aLbLanguage.SelectLanguage( eLangType ); if(pAutoEntryAttr) AddAutomaticLanguage_Impl(eLangType, pAutoEntryAttr->GetValue()); - UpdateFormatListBox_Impl(FALSE,TRUE); + UpdateFormatListBox_Impl(sal_False,sal_True); //! erAck 26.01.01 //! This spoils everything because it rematches currency formats based on @@ -662,9 +662,9 @@ void SvxNumberFormatTabPage::Obstructing() aFtLanguage .Disable(); aLbLanguage .Disable(); - aIbAdd.Enable(FALSE ); - aIbRemove.Enable(FALSE ); - aIbInfo.Enable(FALSE ); + aIbAdd.Enable(sal_False ); + aIbRemove.Enable(sal_False ); + aIbInfo.Enable(sal_False ); aBtnNegRed .Disable(); aBtnThousand .Disable(); @@ -675,8 +675,8 @@ void SvxNumberFormatTabPage::Obstructing() aFlOptions .Disable(); aEdDecimals .SetText( String() ); aEdLeadZeroes .SetText( String() ); - aBtnNegRed .Check( FALSE ); - aBtnThousand .Check( FALSE ); + aBtnNegRed .Check( sal_False ); + aBtnThousand .Check( sal_False ); aWndPreview .NotifyChange( String() ); aLbCategory .SelectEntryPos( 0 ); @@ -695,7 +695,7 @@ void SvxNumberFormatTabPage::Obstructing() #************************************************************************/ void SvxNumberFormatTabPage::EnableBySourceFormat_Impl() { - BOOL bEnable = !aCbSourceFormat.IsChecked(); + sal_Bool bEnable = !aCbSourceFormat.IsChecked(); if ( !bEnable ) aCbSourceFormat.GrabFocus(); aFtCategory .Enable( bEnable ); @@ -731,13 +731,13 @@ void SvxNumberFormatTabPage::EnableBySourceFormat_Impl() #* #* Funktion: Versteckt die Spracheinstellung: #* -#* Input: BOOL nFlag +#* Input: sal_Bool nFlag #* #* Output: --- #* #************************************************************************/ -void SvxNumberFormatTabPage::HideLanguage(BOOL nFlag) +void SvxNumberFormatTabPage::HideLanguage(sal_Bool nFlag) { Size aSize=aLbCategory.GetSizePixel(); @@ -772,14 +772,14 @@ void SvxNumberFormatTabPage::HideLanguage(BOOL nFlag) #* #************************************************************************/ -BOOL SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) +sal_Bool SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) { - BOOL bDataChanged = aFtLanguage.IsEnabled() || aCbSourceFormat.IsEnabled(); + sal_Bool bDataChanged = aFtLanguage.IsEnabled() || aCbSourceFormat.IsEnabled(); if ( bDataChanged ) { const SfxItemSet& rMyItemSet = GetItemSet(); - USHORT nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ); - SfxItemState eItemState = rMyItemSet.GetItemState( nWhich, FALSE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ); + SfxItemState eItemState = rMyItemSet.GetItemState( nWhich, sal_False ); // OK chosen - Is format code input entered already taken over? // If not, simulate Add. Upon syntax error ignore input and prevent Put. @@ -828,7 +828,7 @@ BOOL SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) pNumFmtShell->GetUpdateData( pDelArr, nDelCount ); pNumItem->SetDelFormatArray( pDelArr, nDelCount ); - if(bNumItemFlag==TRUE) + if(bNumItemFlag==sal_True) { rCoreAttrs.Put( *pNumItem ); } @@ -850,14 +850,14 @@ BOOL SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) // -------------------------------------------- if ( aCbSourceFormat.IsEnabled() ) { - USHORT _nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_SOURCE ); - SfxItemState _eItemState = rMyItemSet.GetItemState( _nWhich, FALSE ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_SOURCE ); + SfxItemState _eItemState = rMyItemSet.GetItemState( _nWhich, sal_False ); const SfxBoolItem* pBoolItem = (const SfxBoolItem*) GetItem( rMyItemSet, SID_ATTR_NUMBERFORMAT_SOURCE ); - BOOL bOld = (pBoolItem ? pBoolItem->GetValue() : FALSE); + sal_Bool bOld = (pBoolItem ? pBoolItem->GetValue() : sal_False); rCoreAttrs.Put( SfxBoolItem( _nWhich, aCbSourceFormat.IsChecked() ) ); if ( !bDataChanged ) - bDataChanged = (bOld != (BOOL) aCbSourceFormat.IsChecked() || + bDataChanged = (bOld != (sal_Bool) aCbSourceFormat.IsChecked() || _eItemState != SFX_ITEM_SET); } @@ -878,9 +878,9 @@ int SvxNumberFormatTabPage::DeactivatePage( SfxItemSet* _pSet ) { /* if ( (ULONG_MAX != nInitFormat) && _pSet ) { - const ULONG nCurKey = pNumFmtShell->GetCurNumFmtKey(); - const USHORT nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ); - SfxItemState eItemState = GetItemSet().GetItemState( nWhich, FALSE ); + const sal_uLong nCurKey = pNumFmtShell->GetCurNumFmtKey(); + const sal_uInt16 nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ); + SfxItemState eItemState = GetItemSet().GetItemState( nWhich, sal_False ); if ( (nInitFormat == nCurKey) && (SFX_ITEM_DEFAULT == eItemState) ) _pSet->ClearItem( nWhich ); @@ -907,14 +907,14 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( SvxDelStrgs& rEntries ) String aTmpString; String aTmpCatString; Font aFont=aLbCategory.GetFont(); - USHORT i = 0; + sal_uInt16 i = 0; short nTmpCatPos; short aPrivCat; aLbFormat.Clear(); - aLbFormat.SetUpdateMode( FALSE ); + aLbFormat.SetUpdateMode( sal_False ); - USHORT nCount = rEntries.Count(); + sal_uInt16 nCount = rEntries.Count(); if(nCount<1) return; @@ -966,7 +966,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( SvxDelStrgs& rEntries ) } } } - aLbFormat.SetUpdateMode( TRUE ); + aLbFormat.SetUpdateMode( sal_True ); DeleteEntryList_Impl(rEntries); } @@ -987,7 +987,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( SvxDelStrgs& rEntries ) void SvxNumberFormatTabPage::DeleteEntryList_Impl( SvxDelStrgs& rEntries ) { - USHORT nCount = rEntries.Count(); + sal_uInt16 nCount = rEntries.Count(); rEntries.DeleteAndDestroy(0,nCount); } @@ -1007,18 +1007,18 @@ void SvxNumberFormatTabPage::DeleteEntryList_Impl( SvxDelStrgs& rEntries ) #* #***?********************************************************************/ -void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE*/ ) +void SvxNumberFormatTabPage::UpdateOptions_Impl( sal_Bool bCheckCatChange /*= sal_False*/ ) { SvxDelStrgs aEntryList; String theFormat = aEdFormat.GetText(); - USHORT nCurCategory = aLbCategory.GetSelectEntryPos(); - USHORT nCategory = nCurCategory; - USHORT nDecimals = 0; - USHORT nZeroes = 0; - BOOL bNegRed = FALSE; - BOOL bThousand = FALSE; + sal_uInt16 nCurCategory = aLbCategory.GetSelectEntryPos(); + sal_uInt16 nCategory = nCurCategory; + sal_uInt16 nDecimals = 0; + sal_uInt16 nZeroes = 0; + sal_Bool bNegRed = sal_False; + sal_Bool bThousand = sal_False; short nTmpCatPos; - USHORT nCurrencyPos =aLbCurrency.GetSelectEntryPos(); + sal_uInt16 nCurrencyPos =aLbCurrency.GetSelectEntryPos(); if(bOneAreaFlag) { @@ -1035,15 +1035,15 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE* bThousand, bNegRed, nDecimals, nZeroes, nCategory ); - BOOL bDoIt=FALSE; + sal_Bool bDoIt=sal_False; if(nCategory==CAT_CURRENCY) { - USHORT nTstPos=pNumFmtShell->FindCurrencyFormat(theFormat); - if(nCurrencyPos!=nTstPos && nTstPos!=(USHORT)-1) + sal_uInt16 nTstPos=pNumFmtShell->FindCurrencyFormat(theFormat); + if(nCurrencyPos!=nTstPos && nTstPos!=(sal_uInt16)-1) { aLbCurrency.SelectEntryPos(nTstPos); pNumFmtShell->SetCurrencySymbol(nTstPos); - bDoIt=TRUE; + bDoIt=sal_True; } } @@ -1058,7 +1058,7 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE* else SetCategory(nCategory ); - UpdateFormatListBox_Impl( TRUE, FALSE ); + UpdateFormatListBox_Impl( sal_True, sal_False ); } } else if ( aLbFormat.GetEntryCount() > 0 ) @@ -1114,8 +1114,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE* aBtnThousand .Disable(); aEdDecimals .SetText( UniString::CreateFromInt32( 0 ) ); aEdLeadZeroes .SetText( UniString::CreateFromInt32( 0 ) ); - aBtnNegRed .Check( FALSE ); - aBtnThousand .Check( FALSE ); + aBtnNegRed .Check( sal_False ); + aBtnThousand .Check( sal_False ); } } @@ -1138,8 +1138,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE* void SvxNumberFormatTabPage::UpdateFormatListBox_Impl ( - USHORT bCat, // Category oder Land/Sprache ListBox? - BOOL bUpdateEdit // Format-Edit aktualisieren? + sal_uInt16 bCat, // Category oder Land/Sprache ListBox? + sal_Bool bUpdateEdit // Format-Edit aktualisieren? ) { SvxDelStrgs aEntryList; @@ -1217,7 +1217,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl aFtComment.SetText(aLbCategory.GetEntry(1)); } } - ChangePreviewText( (USHORT)nFmtLbSelPos ); + ChangePreviewText( (sal_uInt16)nFmtLbSelPos ); } } @@ -1226,7 +1226,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl FillFormatListBox_Impl( aEntryList ); if(nFmtLbSelPos != SELPOS_NONE) { - aLbFormat.SelectEntryPos( (USHORT)nFmtLbSelPos ); + aLbFormat.SelectEntryPos( (sal_uInt16)nFmtLbSelPos ); aFtComment.SetText(pNumFmtShell->GetComment4Entry(nFmtLbSelPos)); if(pNumFmtShell->GetUserDefined4Entry(nFmtLbSelPos)) @@ -1319,9 +1319,9 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) if (aLbFormat.GetSelectEntryPos () == LISTBOX_ENTRY_NOTFOUND) #else /* !ENABLE_LAYOUT */ // Current category may be UserDefined with no format entries defined. - // And yes, aLbFormat is a SvxFontListBox with ULONG list positions, + // And yes, aLbFormat is a SvxFontListBox with sal_uLong list positions, // implementation returns a LIST_APPEND if empty, comparison with - // USHORT LISTBOX_ENTRY_NOTFOUND wouldn't match. + // sal_uInt16 LISTBOX_ENTRY_NOTFOUND wouldn't match. if ( aLbFormat.GetSelectEntryPos() == LIST_APPEND ) #endif /* !ENABLE_LAYOUT */ pLb = &aLbCategory; // continue with the current category selected @@ -1340,7 +1340,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) nTmpCatPos=aLbCategory.GetSelectEntryPos(); } - USHORT nCurrencyPos=LISTBOX_ENTRY_NOTFOUND ; + sal_uInt16 nCurrencyPos=LISTBOX_ENTRY_NOTFOUND ; if(nTmpCatPos==CAT_CURRENCY && (ListBox *)pLb == &aLbCurrency ) { @@ -1352,7 +1352,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) // Format-ListBox ---------------------------------------------------- if ( (SvxFontListBox *)pLb == &aLbFormat ) { - USHORT nSelPos = (USHORT) aLbFormat.GetSelectEntryPos(); + sal_uInt16 nSelPos = (sal_uInt16) aLbFormat.GetSelectEntryPos(); String aFormat = aLbFormat.GetSelectEntry(); String aComment; SvxDelStrgs aEntryList; @@ -1380,21 +1380,21 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) if ( pNumFmtShell->FindEntry( aFormat) ) { - aIbAdd.Enable(FALSE ); - BOOL bIsUserDef=pNumFmtShell->IsUserDefined( aFormat ); + aIbAdd.Enable(sal_False ); + sal_Bool bIsUserDef=pNumFmtShell->IsUserDefined( aFormat ); aIbRemove.Enable(bIsUserDef); aIbInfo.Enable(bIsUserDef); } else { - aIbAdd.Enable(TRUE ); - aIbInfo.Enable(TRUE ); - aIbRemove.Enable(FALSE ); + aIbAdd.Enable(sal_True ); + aIbInfo.Enable(sal_True ); + aIbRemove.Enable(sal_False ); aFtComment.SetText(aEdComment.GetText()); } - UpdateOptions_Impl( FALSE ); + UpdateOptions_Impl( sal_False ); //------- return 0; @@ -1405,9 +1405,9 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) // Kategorie-ListBox ------------------------------------------------- if ( pLb == &aLbCategory || pLb == &aLbCurrency) { - UpdateFormatListBox_Impl( TRUE, TRUE ); + UpdateFormatListBox_Impl( sal_True, sal_True ); EditHdl_Impl( NULL ); - UpdateOptions_Impl( FALSE ); + UpdateOptions_Impl( sal_False ); //------- return 0; @@ -1418,7 +1418,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) // Sprache/Land-ListBox ---------------------------------------------- if ( pLb == &aLbLanguage ) { - UpdateFormatListBox_Impl( FALSE, TRUE ); + UpdateFormatListBox_Impl( sal_False, sal_True ); EditHdl_Impl( &aEdFormat ); //------- @@ -1447,12 +1447,12 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) { - BOOL bAdded = FALSE; - BOOL bDeleted = FALSE; - ULONG nReturn = 0; - const ULONG nReturnChanged = 0x1; // THE boolean return value - const ULONG nReturnAdded = 0x2; // temp: format added - const ULONG nReturnOneArea = 0x4; // temp: one area but category changed => ignored + sal_Bool bAdded = sal_False; + sal_Bool bDeleted = sal_False; + sal_uLong nReturn = 0; + const sal_uLong nReturnChanged = 0x1; // THE boolean return value + const sal_uLong nReturnAdded = 0x2; // temp: format added + const sal_uLong nReturnOneArea = 0x4; // temp: one area but category changed => ignored if(pIB==&aIbAdd) { // Also called from FillItemSet() if a temporary currency format has @@ -1460,7 +1460,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) String aFormat = aEdFormat.GetText(); SvxDelStrgs aEntryList; SvxDelStrgs a2EntryList; - USHORT nCatLbSelPos = 0; + sal_uInt16 nCatLbSelPos = 0; short nFmtLbSelPos = SELPOS_NONE; xub_StrLen nErrPos=0; @@ -1483,7 +1483,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) { if(nCatLbSelPos==CAT_CURRENCY) { - aLbCurrency.SelectEntryPos((USHORT)pNumFmtShell->GetCurrencySymbol()); + aLbCurrency.SelectEntryPos((sal_uInt16)pNumFmtShell->GetCurrencySymbol()); } if(bOneAreaFlag && (nFixedCategory!=nCatLbSelPos)) @@ -1519,13 +1519,13 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) pNumFmtShell->SetComment4Entry(nFmtLbSelPos, String()); } - aLbFormat.SelectEntryPos( (USHORT)nFmtLbSelPos ); + aLbFormat.SelectEntryPos( (sal_uInt16)nFmtLbSelPos ); aEdFormat.SetText( aFormat ); //aEdComment.SetText(String()); //@@ ??? aEdComment.SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert //holen - ChangePreviewText( (USHORT)nFmtLbSelPos ); + ChangePreviewText( (sal_uInt16)nFmtLbSelPos ); } } } @@ -1541,7 +1541,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) { String aFormat = aEdFormat.GetText(); SvxDelStrgs aEntryList; - USHORT nCatLbSelPos = 0; + sal_uInt16 nCatLbSelPos = 0; short nFmtLbSelPos = SELPOS_NONE; bDeleted = pNumFmtShell->RemoveFormat( aFormat, @@ -1566,9 +1566,9 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) else SetCategory(nCatLbSelPos ); - aLbFormat.SelectEntryPos( (USHORT)nFmtLbSelPos ); + aLbFormat.SelectEntryPos( (sal_uInt16)nFmtLbSelPos ); aEdFormat.SetText( aFormat ); - ChangePreviewText( (USHORT)nFmtLbSelPos ); + ChangePreviewText( (sal_uInt16)nFmtLbSelPos ); } else { @@ -1621,9 +1621,9 @@ IMPL_LINK( SvxNumberFormatTabPage, EditHdl_Impl, Edit*, pEdFormat ) if ( aEdFormat.GetText().Len() == 0 ) { - aIbAdd.Enable(FALSE ); - aIbRemove.Enable(FALSE ); - aIbInfo.Enable(FALSE ); + aIbAdd.Enable(sal_False ); + aIbRemove.Enable(sal_False ); + aIbInfo.Enable(sal_False ); aFtComment.SetText(String()); } else @@ -1634,30 +1634,30 @@ IMPL_LINK( SvxNumberFormatTabPage, EditHdl_Impl, Edit*, pEdFormat ) if ( pNumFmtShell->FindEntry( aFormat, &nCurKey ) ) { - aIbAdd.Enable(FALSE ); - BOOL bUserDef=pNumFmtShell->IsUserDefined( aFormat ); + aIbAdd.Enable(sal_False ); + sal_Bool bUserDef=pNumFmtShell->IsUserDefined( aFormat ); aIbRemove.Enable(bUserDef); aIbInfo.Enable(bUserDef); if(bUserDef) { - USHORT nTmpCurPos=pNumFmtShell->FindCurrencyFormat(aFormat ); + sal_uInt16 nTmpCurPos=pNumFmtShell->FindCurrencyFormat(aFormat ); - if(nTmpCurPos!=(USHORT)-1) + if(nTmpCurPos!=(sal_uInt16)-1) aLbCurrency.SelectEntryPos(nTmpCurPos); } short nPosi=pNumFmtShell->GetListPos4Entry(aFormat); if(nPosi>=0) - aLbFormat.SelectEntryPos( (USHORT)nPosi); + aLbFormat.SelectEntryPos( (sal_uInt16)nPosi); } else { - aIbAdd.Enable(TRUE ); - aIbInfo.Enable(TRUE); - aIbRemove.Enable(FALSE ); + aIbAdd.Enable(sal_True ); + aIbInfo.Enable(sal_True); + aIbRemove.Enable(sal_False ); aFtComment.SetText(aEdComment.GetText()); @@ -1667,7 +1667,7 @@ IMPL_LINK( SvxNumberFormatTabPage, EditHdl_Impl, Edit*, pEdFormat ) if ( pEdFormat ) { pNumFmtShell->SetCurNumFmtKey( nCurKey ); - UpdateOptions_Impl( TRUE ); + UpdateOptions_Impl( sal_True ); } return 0; @@ -1696,21 +1696,21 @@ IMPL_LINK( SvxNumberFormatTabPage, OptHdl_Impl, void *, pOptCtrl ) || ((CheckBox*) pOptCtrl == &aBtnThousand) ) { String aFormat; - BOOL bThousand = aBtnThousand.IsEnabled() + sal_Bool bThousand = aBtnThousand.IsEnabled() && aBtnThousand.IsChecked(); - BOOL bNegRed = aBtnNegRed.IsEnabled() + sal_Bool bNegRed = aBtnNegRed.IsEnabled() && aBtnNegRed.IsChecked(); - USHORT nPrecision = (aEdDecimals.IsEnabled()) - ? (USHORT)aEdDecimals.GetValue() - : (USHORT)0; - USHORT nLeadZeroes = (aEdLeadZeroes.IsEnabled()) - ? (USHORT)aEdLeadZeroes.GetValue() - : (USHORT)0; + sal_uInt16 nPrecision = (aEdDecimals.IsEnabled()) + ? (sal_uInt16)aEdDecimals.GetValue() + : (sal_uInt16)0; + sal_uInt16 nLeadZeroes = (aEdLeadZeroes.IsEnabled()) + ? (sal_uInt16)aEdLeadZeroes.GetValue() + : (sal_uInt16)0; pNumFmtShell->MakeFormat( aFormat, bThousand, bNegRed, nPrecision, nLeadZeroes, - (USHORT)aLbFormat.GetSelectEntryPos() ); + (sal_uInt16)aLbFormat.GetSelectEntryPos() ); aEdFormat.SetText( aFormat ); //aFtComment.SetText(String()); @@ -1718,8 +1718,8 @@ IMPL_LINK( SvxNumberFormatTabPage, OptHdl_Impl, void *, pOptCtrl ) if ( pNumFmtShell->FindEntry( aFormat ) ) { - aIbAdd.Enable(FALSE ); - BOOL bUserDef=pNumFmtShell->IsUserDefined( aFormat ); + aIbAdd.Enable(sal_False ); + sal_Bool bUserDef=pNumFmtShell->IsUserDefined( aFormat ); aIbRemove.Enable(bUserDef); aIbInfo.Enable(bUserDef); EditHdl_Impl( &aEdFormat); @@ -1765,7 +1765,7 @@ IMPL_LINK( SvxNumberFormatTabPage, LostFocusHdl_Impl, Edit *, pEd) aFtComment.Show(); if(!aIbAdd.IsEnabled()) { - USHORT nSelPos = (USHORT) aLbFormat.GetSelectEntryPos(); + sal_uInt16 nSelPos = (sal_uInt16) aLbFormat.GetSelectEntryPos(); pNumFmtShell->SetComment4Entry(nSelPos, aEdComment.GetText()); aEdComment.SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert @@ -1828,7 +1828,7 @@ void SvxNumberFormatTabPage::MakePreviewText( const String& rFormat ) aWndPreview.NotifyChange( aPreviewString, pPreviewColor ); } -void SvxNumberFormatTabPage::ChangePreviewText( USHORT nPos ) +void SvxNumberFormatTabPage::ChangePreviewText( sal_uInt16 nPos ) { String aPreviewString; Color* pPreviewColor = NULL; @@ -1876,12 +1876,12 @@ void SvxNumberFormatTabPage::FillCurrencyBox() SvStringsDtor aList; NfShCurrencyEntries rEntries; XubString* pEntry = NULL; - USHORT nPos=0; - USHORT nSelPos=0; + sal_uInt16 nPos=0; + sal_uInt16 nSelPos=0; pNumFmtShell->GetCurrencySymbols( aList, &nSelPos); - for(USHORT i=1;i<aList.Count();i++) + for(sal_uInt16 i=1;i<aList.Count();i++) { pEntry=aList[i]; nPos=aLbCurrency.InsertEntry( *pEntry); @@ -1889,12 +1889,12 @@ void SvxNumberFormatTabPage::FillCurrencyBox() aLbCurrency.SelectEntryPos(nSelPos); } -void SvxNumberFormatTabPage::SetCategory(USHORT nPos) +void SvxNumberFormatTabPage::SetCategory(sal_uInt16 nPos) { - USHORT nCurCategory = aLbCategory.GetSelectEntryPos(); + sal_uInt16 nCurCategory = aLbCategory.GetSelectEntryPos(); Point aPos=aLbFormat.GetPosPixel(); Size aSize=aLbFormat.GetSizePixel(); - USHORT nTmpCatPos; + sal_uInt16 nTmpCatPos; if(bOneAreaFlag) { @@ -1930,11 +1930,11 @@ void SvxNumberFormatTabPage::SetCategory(USHORT nPos) * which marks a certain language as automatically detected * Additionally the "Default" language is removed * --------------------------------------------------*/ -void SvxNumberFormatTabPage::AddAutomaticLanguage_Impl(LanguageType eAutoLang, BOOL bSelect) +void SvxNumberFormatTabPage::AddAutomaticLanguage_Impl(LanguageType eAutoLang, sal_Bool bSelect) { aLbLanguage.RemoveLanguage(LANGUAGE_SYSTEM); - USHORT nPos = aLbLanguage.InsertEntry(sAutomaticEntry); - aLbLanguage.SetEntryData(nPos, (void*)(ULONG)eAutoLang); + sal_uInt16 nPos = aLbLanguage.InsertEntry(sAutomaticEntry); + aLbLanguage.SetEntryData(nPos, (void*)(sal_uLong)eAutoLang); if(bSelect) aLbLanguage.SelectEntryPos(nPos); } diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 5b2bb4474573..b624da8a509b 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -110,7 +110,7 @@ SV_IMPL_PTRARR(SvxNumSettingsArr_Impl,SvxNumSettings_ImplPtr); #define MAX_BMP_WIDTH 16 #define MAX_BMP_HEIGHT 16 -static BOOL bLastRelative = FALSE; +static sal_Bool bLastRelative = sal_False; static const sal_Char cNumberingType[] = "NumberingType"; static const sal_Char cValue[] = "Value"; static const sal_Char cParentNumbering[] = "ParentNumbering"; @@ -186,11 +186,11 @@ static sal_Char __READONLY_DATA aNumChar[] = /*-----------------18.03.98 08:35------------------- Ist eins der maskierten Formate gesetzt? --------------------------------------------------*/ -BOOL lcl_IsNumFmtSet(SvxNumRule* pNum, USHORT nLevelMask) +sal_Bool lcl_IsNumFmtSet(SvxNumRule* pNum, sal_uInt16 nLevelMask) { - BOOL bRet = FALSE; - USHORT nMask = 1; - for( USHORT i = 0; i < SVX_MAX_NUM && !bRet; i++ ) + sal_Bool bRet = sal_False; + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < SVX_MAX_NUM && !bRet; i++ ) { if(nLevelMask & nMask) bRet |= 0 != pNum->Get( i ); @@ -204,7 +204,7 @@ BOOL lcl_IsNumFmtSet(SvxNumRule* pNum, USHORT nLevelMask) Font& lcl_GetDefaultBulletFont() { - static BOOL bInit = 0; + static sal_Bool bInit = 0; static Font aDefBulletFont( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "StarSymbol" ) ), String(), Size( 0, 14 ) ); @@ -214,8 +214,8 @@ Font& lcl_GetDefaultBulletFont() aDefBulletFont.SetFamily( FAMILY_DONTKNOW ); aDefBulletFont.SetPitch( PITCH_DONTKNOW ); aDefBulletFont.SetWeight( WEIGHT_DONTKNOW ); - aDefBulletFont.SetTransparent( TRUE ); - bInit = TRUE; + aDefBulletFont.SetTransparent( sal_True ); + bInit = sal_True; } return aDefBulletFont; } @@ -235,8 +235,8 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent, pActNum(0), pSaveNum(0), nActNumLvl( USHRT_MAX ), - bModified(FALSE), - bPreset(FALSE), + bModified(sal_False), + bPreset(sal_False), nNumItemId(SID_ATTR_NUMBERING_RULE) { FreeResource(); @@ -300,7 +300,7 @@ SfxTabPage* SvxSingleNumPickTabPage::Create( Window* pParent, --------------------------------------------------*/ -BOOL SvxSingleNumPickTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxSingleNumPickTabPage::FillItemSet( SfxItemSet& rSet ) { if( (bPreset || bModified) && pSaveNum) { @@ -319,17 +319,17 @@ BOOL SvxSingleNumPickTabPage::FillItemSet( SfxItemSet& rSet ) void SvxSingleNumPickTabPage::ActivatePage(const SfxItemSet& rSet) { const SfxPoolItem* pItem; - bPreset = FALSE; - BOOL bIsPreset = FALSE; + bPreset = sal_False; + sal_Bool bIsPreset = sal_False; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem)) bIsPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem)) nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -344,11 +344,11 @@ void SvxSingleNumPickTabPage::ActivatePage(const SfxItemSet& rSet) { pExamplesVS->SelectItem(1); NumSelectHdl_Impl(pExamplesVS); - bPreset = TRUE; + bPreset = sal_True; } bPreset |= bIsPreset; - bModified = FALSE; + bModified = sal_False; } /*-----------------08.02.97 11.28------------------- @@ -359,7 +359,7 @@ int SvxSingleNumPickTabPage::DeactivatePage(SfxItemSet *_pSet) { if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } /*-----------------07.02.97 12.09------------------- @@ -372,15 +372,15 @@ void SvxSingleNumPickTabPage::Reset( const SfxItemSet& rSet ) const SfxPoolItem* pItem; // nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel(); //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); + SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem); if(eState != SFX_ITEM_SET) { nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); + eState = rSet.GetItemState(nNumItemId, sal_False, &pItem); if( eState != SFX_ITEM_SET ) { - pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) ); eState = SFX_ITEM_SET; } } @@ -401,9 +401,9 @@ IMPL_LINK(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) { if(pActNum) { - bPreset = FALSE; - bModified = TRUE; - USHORT nIdx = pExamplesVS->GetSelectItemId() - 1; + bPreset = sal_False; + bModified = sal_True; + sal_uInt16 nIdx = pExamplesVS->GetSelectItemId() - 1; DBG_ASSERT(aNumSettingsArr.Count() > nIdx, "wrong index"); if(aNumSettingsArr.Count() <= nIdx) return 0; @@ -412,8 +412,8 @@ IMPL_LINK(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) const sal_Unicode cLocalPrefix = _pSet->sPrefix.getLength() ? _pSet->sPrefix.getStr()[0] : 0; const sal_Unicode cLocalSuffix = _pSet->sSuffix.getLength() ? _pSet->sSuffix.getStr()[0] : 0; - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -464,8 +464,8 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(Window* pParent, pActNum(0), pSaveNum(0), nActNumLvl( USHRT_MAX ), - bModified(FALSE), - bPreset(FALSE), + bModified(sal_False), + bPreset(sal_False), nNumItemId(SID_ATTR_NUMBERING_RULE) { FreeResource(); @@ -502,7 +502,7 @@ SfxTabPage* SvxBulletPickTabPage::Create( Window* pParent, --------------------------------------------------*/ -BOOL SvxBulletPickTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxBulletPickTabPage::FillItemSet( SfxItemSet& rSet ) { if( (bPreset || bModified) && pActNum) { @@ -519,17 +519,17 @@ BOOL SvxBulletPickTabPage::FillItemSet( SfxItemSet& rSet ) void SvxBulletPickTabPage::ActivatePage(const SfxItemSet& rSet) { const SfxPoolItem* pItem; - bPreset = FALSE; - BOOL bIsPreset = FALSE; + bPreset = sal_False; + sal_Bool bIsPreset = sal_False; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem)) bIsPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem)) nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -544,10 +544,10 @@ void SvxBulletPickTabPage::ActivatePage(const SfxItemSet& rSet) { pExamplesVS->SelectItem(1); NumSelectHdl_Impl(pExamplesVS); - bPreset = TRUE; + bPreset = sal_True; } bPreset |= bIsPreset; - bModified = FALSE; + bModified = sal_False; } /*-----------------08.02.97 11.28------------------- @@ -557,7 +557,7 @@ int SvxBulletPickTabPage::DeactivatePage(SfxItemSet *_pSet) { if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } /*-----------------07.02.97 12.11------------------- @@ -569,15 +569,15 @@ void SvxBulletPickTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); + SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem); if(eState != SFX_ITEM_SET) { nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); + eState = rSet.GetItemState(nNumItemId, sal_False, &pItem); if( eState != SFX_ITEM_SET ) { - pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) ); eState = SFX_ITEM_SET; } @@ -601,13 +601,13 @@ IMPL_LINK(SvxBulletPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) { if(pActNum) { - bPreset = FALSE; - bModified = TRUE; + bPreset = sal_False; + bModified = sal_True; sal_Unicode cChar = aBulletTypes[pExamplesVS->GetSelectItemId() - 1]; Font& rActBulletFont = lcl_GetDefaultBulletFont(); - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -665,8 +665,8 @@ SvxNumPickTabPage::SvxNumPickTabPage(Window* pParent, pSaveNum(0), nActNumLvl( USHRT_MAX ), nNumItemId(SID_ATTR_NUMBERING_RULE), - bModified(FALSE), - bPreset(FALSE) + bModified(sal_False), + bPreset(sal_False) { FreeResource(); @@ -739,7 +739,7 @@ SfxTabPage* SvxNumPickTabPage::Create( Window* pParent, --------------------------------------------------*/ -BOOL SvxNumPickTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxNumPickTabPage::FillItemSet( SfxItemSet& rSet ) { if( (bPreset || bModified) && pActNum) { @@ -756,17 +756,17 @@ BOOL SvxNumPickTabPage::FillItemSet( SfxItemSet& rSet ) void SvxNumPickTabPage::ActivatePage(const SfxItemSet& rSet) { const SfxPoolItem* pItem; - bPreset = FALSE; - BOOL bIsPreset = FALSE; + bPreset = sal_False; + sal_Bool bIsPreset = sal_False; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem)) bIsPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem)) nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -781,10 +781,10 @@ void SvxNumPickTabPage::ActivatePage(const SfxItemSet& rSet) { pExamplesVS->SelectItem(1); NumSelectHdl_Impl(pExamplesVS); - bPreset = TRUE; + bPreset = sal_True; } bPreset |= bIsPreset; - bModified = FALSE; + bModified = sal_False; } /* -----------------08.02.97 11.29------------------- @@ -795,7 +795,7 @@ int SvxNumPickTabPage::DeactivatePage(SfxItemSet *_pSet) { if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } /*-----------------07.02.97 12.12------------------- @@ -806,15 +806,15 @@ void SvxNumPickTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); + SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem); if(eState != SFX_ITEM_SET) { nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); + eState = rSet.GetItemState(nNumItemId, sal_False, &pItem); if( eState != SFX_ITEM_SET ) { - pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) ); eState = SFX_ITEM_SET; } @@ -839,8 +839,8 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) { if(pActNum) { - bPreset = FALSE; - bModified = TRUE; + bPreset = sal_False; + bModified = sal_True; const FontList* pList = 0; @@ -848,7 +848,7 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) Font& rActBulletFont = lcl_GetDefaultBulletFont(); SvxNumSettings_ImplPtr pLevelSettings = 0; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(rItemArr.Count() > i) pLevelSettings = rItemArr[i]; @@ -856,7 +856,7 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) break; SvxNumberFormat aFmt(pActNum->GetLevel(i)); aFmt.SetNumberingType( pLevelSettings->nNumberType ); - USHORT nUpperLevelOrChar = (USHORT)pLevelSettings->nParentNumbering; + sal_uInt16 nUpperLevelOrChar = (sal_uInt16)pLevelSettings->nParentNumbering; if(aFmt.GetNumberingType() == SVX_NUM_CHAR_SPECIAL) { if( pLevelSettings->sBulletFont.getLength() && @@ -888,7 +888,7 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) aCreateFont.SetFamily( FAMILY_DONTKNOW ); aCreateFont.SetPitch( PITCH_DONTKNOW ); aCreateFont.SetWeight( WEIGHT_DONTKNOW ); - aCreateFont.SetTransparent( TRUE ); + aCreateFont.SetTransparent( sal_True ); aFmt.SetBulletFont( &aCreateFont ); } } @@ -904,7 +904,7 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) } else { - aFmt.SetIncludeUpperLevels(sal::static_int_cast< BYTE >(0 != nUpperLevelOrChar ? pActNum->GetLevelCount() : 0)); + aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? pActNum->GetLevelCount() : 0)); aFmt.SetCharFmtName(sNumCharFmtName); // #62069# // #92724# aFmt.SetBulletRelSize(100); @@ -956,8 +956,8 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent, pSaveNum(0), nActNumLvl( USHRT_MAX ), nNumItemId(SID_ATTR_NUMBERING_RULE), - bModified(FALSE), - bPreset(FALSE) + bModified(sal_False), + bPreset(sal_False) { FreeResource(); SetExchangeSupport(); @@ -970,7 +970,7 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent, GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames); pExamplesVS->SetHelpId(HID_VALUESET_NUMBMP ); - for(USHORT i = 0; i < aGrfNames.Count(); i++) + for(sal_uInt16 i = 0; i < aGrfNames.Count(); i++) { pExamplesVS->InsertItem( i + 1, i); String* pGrfNm = (String*) aGrfNames.GetObject(i); @@ -1025,18 +1025,18 @@ SfxTabPage* SvxBitmapPickTabPage::Create( Window* pParent, void SvxBitmapPickTabPage::ActivatePage(const SfxItemSet& rSet) { const SfxPoolItem* pItem; - bPreset = FALSE; - BOOL bIsPreset = FALSE; + bPreset = sal_False; + sal_Bool bIsPreset = sal_False; // nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel(); const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem)) bIsPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem)) nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -1052,10 +1052,10 @@ void SvxBitmapPickTabPage::ActivatePage(const SfxItemSet& rSet) { pExamplesVS->SelectItem(1); NumSelectHdl_Impl(pExamplesVS); - bPreset = TRUE; + bPreset = sal_True; } bPreset |= bIsPreset; - bModified = FALSE; + bModified = sal_False; } /*-----------------12.02.97 07.46------------------- @@ -1065,19 +1065,19 @@ int SvxBitmapPickTabPage::DeactivatePage(SfxItemSet *_pSet) { if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } /*-----------------12.02.97 07.46------------------- --------------------------------------------------*/ -BOOL SvxBitmapPickTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxBitmapPickTabPage::FillItemSet( SfxItemSet& rSet ) { if ( !aGrfNames.Count() ) { // das ist im SfxItemSet leider nicht zulaessig #52134# // rSet.DisableItem(SID_ATTR_NUMBERING_RULE); - return FALSE; + return sal_False; } if( (bPreset || bModified) && pActNum) { @@ -1096,15 +1096,15 @@ void SvxBitmapPickTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); + SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem); if(eState != SFX_ITEM_SET) { nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); + eState = rSet.GetItemState(nNumItemId, sal_False, &pItem); if( eState != SFX_ITEM_SET ) { - pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) ); eState = SFX_ITEM_SET; } @@ -1119,13 +1119,13 @@ void SvxBitmapPickTabPage::Reset( const SfxItemSet& rSet ) *pActNum = *pSaveNum; if(!pActNum->IsFeatureSupported(NUM_ENABLE_LINKED_BMP)) { - aLinkedCB.Check(FALSE); - aLinkedCB.Enable(FALSE); + aLinkedCB.Check(sal_False); + aLinkedCB.Enable(sal_False); } else if(!pActNum->IsFeatureSupported(NUM_ENABLE_EMBEDDED_BMP)) { - aLinkedCB.Check(TRUE); - aLinkedCB.Enable(FALSE); + aLinkedCB.Check(sal_True); + aLinkedCB.Enable(sal_False); } } @@ -1137,20 +1137,20 @@ IMPL_LINK(SvxBitmapPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) { if(pActNum) { - bPreset = FALSE; - bModified = TRUE; - USHORT nIdx = pExamplesVS->GetSelectItemId() - 1; + bPreset = sal_False; + bModified = sal_True; + sal_uInt16 nIdx = pExamplesVS->GetSelectItemId() - 1; String* pGrfName = 0; if(aGrfNames.Count() > nIdx) pGrfName = (String*)aGrfNames.GetObject(nIdx); - USHORT nMask = 1; + sal_uInt16 nMask = 1; String aEmptyStr; - USHORT nSetNumberingType = SVX_NUM_BITMAP; + sal_uInt16 nSetNumberingType = SVX_NUM_BITMAP; if(aLinkedCB.IsChecked()) nSetNumberingType |= LINK_TOKEN; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -1209,7 +1209,7 @@ IMPL_LINK(SvxBitmapPickTabPage, LinkBmpHdl_Impl, CheckBox*, EMPTYARG ) //CHINA001 //CHINA001 SvxNumValueSet( pParent, rResId, NUM_PAGETYPE_BMP ), //CHINA001 // rStrList ( rStrNames ), -//CHINA001 bGrfNotFound( FALSE ) +//CHINA001 bGrfNotFound( sal_False ) //CHINA001 //CHINA001 { //CHINA001 GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS); @@ -1238,7 +1238,7 @@ IMPL_LINK(SvxBitmapPickTabPage, LinkBmpHdl_Impl, CheckBox*, EMPTYARG ) //CHINA001 //CHINA001 Rectangle aRect = rUDEvt.GetRect(); //CHINA001 OutputDevice* pDev = rUDEvt.GetDevice(); -//CHINA001 USHORT nItemId = rUDEvt.GetItemId(); +//CHINA001 sal_uInt16 nItemId = rUDEvt.GetItemId(); //CHINA001 Point aBLPos = aRect.TopLeft(); //CHINA001 //CHINA001 int nRectHeight = aRect.GetHeight(); @@ -1248,14 +1248,14 @@ IMPL_LINK(SvxBitmapPickTabPage, LinkBmpHdl_Impl, CheckBox*, EMPTYARG ) //CHINA001 if(!GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, nItemId - 1, //CHINA001 &aGraphic, NULL)) //CHINA001 { -//CHINA001 bGrfNotFound = TRUE; +//CHINA001 bGrfNotFound = sal_True; //CHINA001 } //CHINA001 else //CHINA001 { //CHINA001 Point aPos(aBLPos.X() + 5, 0); -//CHINA001 for( USHORT i = 0; i < 3; i++ ) +//CHINA001 for( sal_uInt16 i = 0; i < 3; i++ ) //CHINA001 { -//CHINA001 USHORT nY = 11 + i * 33; +//CHINA001 sal_uInt16 nY = 11 + i * 33; //CHINA001 aPos.Y() = aBLPos.Y() + nRectHeight * nY / 100; //CHINA001 aGraphic.Draw( pDev, aPos, aSize ); //CHINA001 } @@ -1271,7 +1271,7 @@ IMPL_LINK(SvxBitmapPickTabPage, LinkBmpHdl_Impl, CheckBox*, EMPTYARG ) //CHINA001 // nur, wenn eine Grafik nicht da war, muss formatiert werden //CHINA001 if(bGrfNotFound) //CHINA001 { -//CHINA001 bGrfNotFound = FALSE; +//CHINA001 bGrfNotFound = sal_False; //CHINA001 Format(); //CHINA001 } //CHINA001 Invalidate(); @@ -1321,12 +1321,12 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, pPreviewWIN( new SvxNumberingPreview(this, CUI_RES(WIN_PREVIEW ))), pActNum(0), pSaveNum(0), - bLastWidthModified(FALSE), - bModified(FALSE), - bPreset(FALSE), - bAutomaticCharStyles(TRUE), - bHTMLMode(FALSE), - bMenuButtonInitialized(FALSE), + bLastWidthModified(sal_False), + bModified(sal_False), + bPreset(sal_False), + bAutomaticCharStyles(sal_True), + bHTMLMode(sal_False), + bMenuButtonInitialized(sal_False), sBullet(CUI_RES(STR_BULLET)), nBullet(0xff), nActNumLvl(USHRT_MAX), @@ -1361,7 +1361,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, aBitmapMB.GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup ); pPopup->InsertItem( NUM_NO_GRAPHIC, String(CUI_RES(ST_POPUP_EMPTY_ENTRY)) ); - pPopup->EnableItem( NUM_NO_GRAPHIC, FALSE ); + pPopup->EnableItem( NUM_NO_GRAPHIC, sal_False ); eCoreUnit = rSet.GetPool()->GetMetric(rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE)); @@ -1374,12 +1374,12 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, // Extended numbering schemes present in the resource but not offered by // the i18n framework per configuration must be removed from the listbox. // Watch out for the ugly 0x88/*SVX_NUM_BITMAP|0x80*/ to not remove that. - const USHORT nDontRemove = 0xffff; - ::std::vector< USHORT> aRemove( aFmtLB.GetEntryCount(), nDontRemove); + const sal_uInt16 nDontRemove = 0xffff; + ::std::vector< sal_uInt16> aRemove( aFmtLB.GetEntryCount(), nDontRemove); for (size_t i=0; i<aRemove.size(); ++i) { - USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData( - sal::static_int_cast< USHORT >(i)); + sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aFmtLB.GetEntryData( + sal::static_int_cast< sal_uInt16 >(i)); if (nEntryData > NumberingType::CHARS_LOWER_LETTER_N && nEntryData != (SVX_NUM_BITMAP | 0x80)) aRemove[i] = nEntryData; @@ -1394,10 +1394,10 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, if(nCurrent > NumberingType::CHARS_LOWER_LETTER_N) { sal_Bool bInsert = sal_True; - for(USHORT nEntry = 0; nEntry < aFmtLB.GetEntryCount(); nEntry++) + for(sal_uInt16 nEntry = 0; nEntry < aFmtLB.GetEntryCount(); nEntry++) { - USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData(nEntry); - if(nEntryData == (USHORT) nCurrent) + sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aFmtLB.GetEntryData(nEntry); + if(nEntryData == (sal_uInt16) nCurrent) { bInsert = sal_False; aRemove[nEntry] = nDontRemove; @@ -1407,8 +1407,8 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, if(bInsert) { OUString aIdent = xInfo->getNumberingIdentifier( nCurrent ); - USHORT nPos = aFmtLB.InsertEntry(aIdent); - aFmtLB.SetEntryData(nPos,(void*)(ULONG)nCurrent); + sal_uInt16 nPos = aFmtLB.InsertEntry(aIdent); + aFmtLB.SetEntryData(nPos,(void*)(sal_uLong)nCurrent); } } } @@ -1417,7 +1417,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, { if (aRemove[i] != nDontRemove) { - USHORT nPos = aFmtLB.GetEntryPos( (void*)(ULONG)aRemove[i]); + sal_uInt16 nPos = aFmtLB.GetEntryPos( (void*)(sal_uLong)aRemove[i]); aFmtLB.RemoveEntry( nPos); } } @@ -1469,15 +1469,15 @@ void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet) { const SfxPoolItem* pItem; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); - UINT16 nTmpNumLvl = USHRT_MAX; + sal_uInt16 nTmpNumLvl = USHRT_MAX; if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem)) bPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem)) nTmpNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -1488,18 +1488,18 @@ void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet) nActNumLvl != nTmpNumLvl) { nActNumLvl = nTmpNumLvl; - USHORT nMask = 1; - aLevelLB.SetUpdateMode(FALSE); + sal_uInt16 nMask = 1; + aLevelLB.SetUpdateMode(sal_False); aLevelLB.SetNoSelection(); aLevelLB.SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == USHRT_MAX); if(nActNumLvl != USHRT_MAX) - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) - aLevelLB.SelectEntryPos( i, TRUE); + aLevelLB.SelectEntryPos( i, sal_True); nMask <<= 1 ; } - aLevelLB.SetUpdateMode(TRUE); + aLevelLB.SetUpdateMode(sal_True); *pActNum = *pSaveNum; InitControls(); } @@ -1512,19 +1512,19 @@ int SvxNumOptionsTabPage::DeactivatePage(SfxItemSet * _pSet) { if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } /*-----------------01.12.97 16:29------------------- --------------------------------------------------*/ -BOOL SvxNumOptionsTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxNumOptionsTabPage::FillItemSet( SfxItemSet& rSet ) { rSet.Put(SfxUInt16Item(SID_PARAM_CUR_NUM_LEVEL, nActNumLvl)); if(bModified && pActNum) { *pSaveNum = *pActNum; rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); - rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, FALSE)); + rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, sal_False)); } return bModified; }; @@ -1535,15 +1535,15 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); + SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem); if(eState != SFX_ITEM_SET) { nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); + eState = rSet.GetItemState(nNumItemId, sal_False, &pItem); if( eState != SFX_ITEM_SET ) { - pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) ); eState = SFX_ITEM_SET; } @@ -1555,7 +1555,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) // Ebenen einfuegen if(!aLevelLB.GetEntryCount()) { - for(USHORT i = 1; i <= pSaveNum->GetLevelCount(); i++) + for(sal_uInt16 i = 1; i <= pSaveNum->GetLevelCount(); i++) aLevelLB.InsertEntry( UniString::CreateFromInt32(i)); if(pSaveNum->GetLevelCount() > 1) { @@ -1571,21 +1571,21 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) aLevelLB.SelectEntryPos(aLevelLB.GetEntryCount() - 1); // nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel(); - USHORT nMask = 1; - aLevelLB.SetUpdateMode(FALSE); + sal_uInt16 nMask = 1; + aLevelLB.SetUpdateMode(sal_False); aLevelLB.SetNoSelection(); if(nActNumLvl == USHRT_MAX) { - aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), TRUE); + aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), sal_True); } else - for(USHORT i = 0; i < pSaveNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pSaveNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) - aLevelLB.SelectEntryPos( i, TRUE); + aLevelLB.SelectEntryPos( i, sal_True); nMask <<= 1 ; } - aLevelLB.SetUpdateMode(TRUE); + aLevelLB.SetUpdateMode(sal_True); if(!pActNum) pActNum = new SvxNumRule(*pSaveNum); @@ -1600,7 +1600,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) SfxObjectShell* pDocSh = SfxObjectShell::Current(); DBG_ASSERT( pDocSh, "DocShell not found!" ); XColorTable* pColorTable = NULL; - FASTBOOL bKillTable = FALSE; + FASTBOOL bKillTable = sal_False; if ( pDocSh ) { pItem = pDocSh->GetItem( SID_COLOR_TABLE ); @@ -1611,7 +1611,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) if ( !pColorTable ) { pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() ); - bKillTable = TRUE; + bKillTable = sal_True; } aBulColLB.InsertEntry( Color( COL_AUTO ), SVX_RESSTR( RID_SVXSTR_AUTOMATIC )); @@ -1627,21 +1627,21 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) } SfxObjectShell* pShell; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE, &pItem ) + if ( SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, sal_False, &pItem ) || ( 0 != ( pShell = SfxObjectShell::Current()) && 0 != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) ) { - USHORT nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue(); bHTMLMode = 0 != (nHtmlMode&HTMLMODE_ON); } - BOOL bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE); + sal_Bool bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE); aCharFmtFT.Show(bCharFmt); aCharFmtLB.Show(bCharFmt); - BOOL bContinuous = pActNum->IsFeatureSupported(NUM_CONTINUOUS); + sal_Bool bContinuous = pActNum->IsFeatureSupported(NUM_CONTINUOUS); - BOOL bAllLevel = bContinuous && !bHTMLMode; + sal_Bool bAllLevel = bContinuous && !bHTMLMode; aAllLevelFT.Show(bAllLevel); aAllLevelNF.Show(bAllLevel); @@ -1652,10 +1652,10 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) //remove types that are unsupported by Draw/Impress if(!bContinuous) { - USHORT nFmtCount = aFmtLB.GetEntryCount(); - for(USHORT i = nFmtCount; i; i--) + sal_uInt16 nFmtCount = aFmtLB.GetEntryCount(); + for(sal_uInt16 i = nFmtCount; i; i--) { - USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData(i - 1); + sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aFmtLB.GetEntryData(i - 1); if(/*SVX_NUM_NUMBER_NONE == nEntryData ||*/ ((SVX_NUM_BITMAP|LINK_TOKEN) == nEntryData)) aFmtLB.RemoveEntry(i - 1); @@ -1665,14 +1665,14 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) if(!pActNum->IsFeatureSupported(NUM_ENABLE_LINKED_BMP)) { long nData = SVX_NUM_BITMAP|LINK_TOKEN; - USHORT nPos = aFmtLB.GetEntryPos((void*)nData); + sal_uInt16 nPos = aFmtLB.GetEntryPos((void*)nData); if(LISTBOX_ENTRY_NOTFOUND != nPos) aFmtLB.RemoveEntry(nPos); } else if(!pActNum->IsFeatureSupported(NUM_ENABLE_EMBEDDED_BMP)) { long nData = SVX_NUM_BITMAP; - USHORT nPos = aFmtLB.GetEntryPos((void*)nData); + sal_uInt16 nPos = aFmtLB.GetEntryPos((void*)nData); if(LISTBOX_ENTRY_NOTFOUND != nPos) aFmtLB.RemoveEntry(nPos); } @@ -1690,17 +1690,17 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) //Alle arten der numerischen Aufzaehlungen loeschen if(pActNum->IsFeatureSupported(NUM_NO_NUMBERS)) { - USHORT nFmtCount = aFmtLB.GetEntryCount(); - for(USHORT i = nFmtCount; i; i--) + sal_uInt16 nFmtCount = aFmtLB.GetEntryCount(); + for(sal_uInt16 i = nFmtCount; i; i--) { - USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData(i - 1); + sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aFmtLB.GetEntryData(i - 1); if( /*nEntryData >= SVX_NUM_CHARS_UPPER_LETTER &&*/ nEntryData <= SVX_NUM_NUMBER_NONE) aFmtLB.RemoveEntry(i - 1); } } InitControls(); - bModified = FALSE; + bModified = sal_False; } /*-----------------02.12.97 13:47------------------- @@ -1708,32 +1708,32 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) --------------------------------------------------*/ void SvxNumOptionsTabPage::InitControls() { - BOOL bShowBullet = TRUE; - BOOL bShowBitmap = TRUE; - BOOL bSameType = TRUE; - BOOL bSameStart = TRUE; - BOOL bSamePrefix = TRUE; - BOOL bSameSuffix = TRUE; - BOOL bAllLevel = TRUE; - BOOL bSameCharFmt = TRUE; - BOOL bSameVOrient = TRUE; - BOOL bSameSize = TRUE; - BOOL bSameBulColor = TRUE; - BOOL bSameBulRelSize= TRUE; - BOOL bSameAdjust = TRUE; + sal_Bool bShowBullet = sal_True; + sal_Bool bShowBitmap = sal_True; + sal_Bool bSameType = sal_True; + sal_Bool bSameStart = sal_True; + sal_Bool bSamePrefix = sal_True; + sal_Bool bSameSuffix = sal_True; + sal_Bool bAllLevel = sal_True; + sal_Bool bSameCharFmt = sal_True; + sal_Bool bSameVOrient = sal_True; + sal_Bool bSameSize = sal_True; + sal_Bool bSameBulColor = sal_True; + sal_Bool bSameBulRelSize= sal_True; + sal_Bool bSameAdjust = sal_True; const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM]; String sFirstCharFmt; sal_Int16 eFirstOrient = text::VertOrientation::NONE; Size aFirstSize(0,0); - USHORT nMask = 1; - USHORT nLvl = USHRT_MAX; - USHORT nHighestLevel = 0; + sal_uInt16 nMask = 1; + sal_uInt16 nLvl = USHRT_MAX; + sal_uInt16 nHighestLevel = 0; String aEmptyStr; - BOOL bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR); - BOOL bBullRelSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE); - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_Bool bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR); + sal_Bool bBullRelSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE); + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -1780,7 +1780,7 @@ void SvxNumOptionsTabPage::InitControls() aOrientLB.SetNoSelection(); else aOrientLB.SelectEntryPos( - sal::static_int_cast< USHORT >(eFirstOrient - 1)); + sal::static_int_cast< sal_uInt16 >(eFirstOrient - 1)); // kein text::VertOrientation::NONE if(bSameSize) @@ -1797,7 +1797,7 @@ void SvxNumOptionsTabPage::InitControls() if(bSameType) { - USHORT nLBData = (USHORT) aNumFmtArr[nLvl]->GetNumberingType(); + sal_uInt16 nLBData = (sal_uInt16) aNumFmtArr[nLvl]->GetNumberingType(); aFmtLB.SelectEntryPos(aFmtLB.GetEntryPos( (void*)sal::static_int_cast<sal_uIntPtr>( nLBData ) )); } else @@ -1815,7 +1815,7 @@ void SvxNumOptionsTabPage::InitControls() } if(bSameAdjust) { - USHORT nPos = 1; // zentriert + sal_uInt16 nPos = 1; // zentriert if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT) nPos = 0; else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT) @@ -1890,14 +1890,14 @@ void SvxNumOptionsTabPage::InitControls() 0 - Nummer; 1 - Bullet; 2 - Bitmap --------------------------------------------------*/ -void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL ) +void SvxNumOptionsTabPage::SwitchNumberType( sal_uInt8 nType, sal_Bool ) { if(nBullet == nType) return; nBullet = nType; - BOOL bBitmap = FALSE; - BOOL bBullet = FALSE; - BOOL bEnableBitmap = FALSE; + sal_Bool bBitmap = sal_False; + sal_Bool bBullet = sal_False; + sal_Bool bEnableBitmap = sal_False; if(nType == SHOW_NUMBERING) { // Label umschalten, alten Text merken @@ -1908,27 +1908,27 @@ void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL ) { // Label umschalten, alten Text merken aStartFT.SetText(sBullet); - bBullet = TRUE; + bBullet = sal_True; } else { - bBitmap = TRUE; - bEnableBitmap = TRUE; + bBitmap = sal_True; + bEnableBitmap = sal_True; } - BOOL bNumeric = !(bBitmap||bBullet); + sal_Bool bNumeric = !(bBitmap||bBullet); aPrefixFT.Show(bNumeric); aPrefixED.Show(bNumeric); aSuffixFT.Show(bNumeric); aSuffixED.Show(bNumeric); - BOOL bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE); + sal_Bool bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE); aCharFmtFT.Show(!bBitmap && bCharFmt); aCharFmtLB.Show(!bBitmap && bCharFmt); // das ist eigentlich Missbrauch, da fuer die vollst. Numerierung kein // eigenes Flag existiert - BOOL bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS); - BOOL bAllLevel = bNumeric && bAllLevelFeature && !bHTMLMode; + sal_Bool bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS); + sal_Bool bAllLevel = bNumeric && bAllLevelFeature && !bHTMLMode; aAllLevelFT.Show(bAllLevel); aAllLevelNF.Show(bAllLevel); @@ -1936,10 +1936,10 @@ void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL ) aStartED.Show(!(bBullet||bBitmap)); aBulletPB.Show(bBullet); - BOOL bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR); + sal_Bool bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR); aBulColorFT.Show( !bBitmap && bBullColor ); aBulColLB.Show( !bBitmap && bBullColor ); - BOOL bBullResSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE); + sal_Bool bBullResSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE); aBulRelSizeFT.Show( !bBitmap && bBullResSize ); aBulRelSizeMF.Show( !bBitmap && bBullResSize ); @@ -1969,33 +1969,33 @@ void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL ) --------------------------------------------------*/ IMPL_LINK( SvxNumOptionsTabPage, LevelHdl_Impl, ListBox *, pBox ) { - USHORT nSaveNumLvl = nActNumLvl; + sal_uInt16 nSaveNumLvl = nActNumLvl; nActNumLvl = 0; if(pBox->IsEntryPosSelected( pActNum->GetLevelCount() ) && (pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff)) { nActNumLvl = 0xFFFF; - pBox->SetUpdateMode(FALSE); - for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ ) - pBox->SelectEntryPos( i, FALSE ); - pBox->SetUpdateMode(TRUE); + pBox->SetUpdateMode(sal_False); + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) + pBox->SelectEntryPos( i, sal_False ); + pBox->SetUpdateMode(sal_True); } else if(pBox->GetSelectEntryCount()) { - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) { if(pBox->IsEntryPosSelected( i )) nActNumLvl |= nMask; nMask <<= 1; } - pBox->SelectEntryPos( pActNum->GetLevelCount(), FALSE ); + pBox->SelectEntryPos( pActNum->GetLevelCount(), sal_False ); } else { nActNumLvl = nSaveNumLvl; - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) { if(nActNumLvl & nMask) { @@ -2021,15 +2021,15 @@ IMPL_LINK( SvxNumOptionsTabPage, PreviewInvalidateHdl_Impl, Timer*, EMPTYARG ) --------------------------------------------------*/ IMPL_LINK( SvxNumOptionsTabPage, AllLevelHdl_Impl, NumericField*, pBox ) { - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { - USHORT nMask = 1; - for(USHORT e = 0; e < pActNum->GetLevelCount(); e++) + sal_uInt16 nMask = 1; + for(sal_uInt16 e = 0; e < pActNum->GetLevelCount(); e++) { if(nActNumLvl & nMask) { SvxNumberFormat aNumFmt(pActNum->GetLevel(e)); - aNumFmt.SetIncludeUpperLevels((BYTE) std::min(pBox->GetValue(), sal_Int64(e + 1)) ); + aNumFmt.SetIncludeUpperLevels((sal_uInt8) std::min(pBox->GetValue(), sal_Int64(e + 1)) ); pActNum->SetLevel(e, aNumFmt); } nMask <<= 1; @@ -2046,35 +2046,35 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox ) { String sSelectStyle; sal_Int16 eOldType; - BOOL bShowOrient = FALSE; - BOOL bBmp = FALSE; + sal_Bool bShowOrient = sal_False; + sal_Bool bBmp = sal_False; String aEmptyStr; - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); eOldType = aNumFmt.GetNumberingType(); // PAGEDESC gibt es nicht - USHORT nNumType = (USHORT)(ULONG)pBox->GetEntryData(pBox->GetSelectEntryPos()); + sal_uInt16 nNumType = (sal_uInt16)(sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos()); aNumFmt.SetNumberingType((sal_Int16)nNumType); sal_uInt16 nNumberingType = aNumFmt.GetNumberingType(); if(SVX_NUM_BITMAP == (nNumberingType&(~LINK_TOKEN))) { bBmp |= 0 != aNumFmt.GetBrush(); - aNumFmt.SetIncludeUpperLevels( FALSE ); + aNumFmt.SetIncludeUpperLevels( sal_False ); aNumFmt.SetSuffix( aEmptyStr ); aNumFmt.SetPrefix( aEmptyStr ); if(!bBmp) aNumFmt.SetGraphic(aEmptyStr); pActNum->SetLevel(i, aNumFmt); SwitchNumberType(SHOW_BITMAP, bBmp ); - bShowOrient = TRUE; + bShowOrient = sal_True; } else if( SVX_NUM_CHAR_SPECIAL == nNumberingType ) { - aNumFmt.SetIncludeUpperLevels( FALSE ); + aNumFmt.SetIncludeUpperLevels( sal_False ); aNumFmt.SetSuffix( aEmptyStr ); aNumFmt.SetPrefix( aEmptyStr ); if( !aNumFmt.GetBulletFont() ) @@ -2109,7 +2109,7 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox ) } nMask <<= 1; } - BOOL bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS); + sal_Bool bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS); if(bShowOrient && bAllLevelFeature) { aOrientFT.Show(); @@ -2126,7 +2126,7 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox ) aCharFmtLB.SelectEntry(sSelectStyle); CharFmtHdl_Impl(&aCharFmtLB); // bAutomaticCharStyles wird im CharFmtHdl_Impl zurueckgesetzt - bAutomaticCharStyles = TRUE; + bAutomaticCharStyles = sal_True; } return 0; } @@ -2135,8 +2135,8 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox ) * --------------------------------------------------*/ void SvxNumOptionsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType) { - BOOL bIsNull = aStartED.GetValue() == 0; - BOOL bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC || + sal_Bool bIsNull = aStartED.GetValue() == 0; + sal_Bool bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC || SVX_NUM_CHARS_UPPER_LETTER_N == nNumberingType || SVX_NUM_CHARS_LOWER_LETTER_N == nNumberingType; aStartED.SetMin(bNoZeroAllowed ? 1 : 0); @@ -2148,11 +2148,11 @@ void SvxNumOptionsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType) --------------------------------------------------*/ IMPL_LINK( SvxNumOptionsTabPage, OrientHdl_Impl, ListBox *, pBox ) { - USHORT nPos = pBox->GetSelectEntryPos(); + sal_uInt16 nPos = pBox->GetSelectEntryPos(); nPos ++; // kein VERT_NONE - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2168,7 +2168,7 @@ IMPL_LINK( SvxNumOptionsTabPage, OrientHdl_Impl, ListBox *, pBox ) } nMask <<= 1; } - SetModified(FALSE); + SetModified(sal_False); return 0; } @@ -2178,15 +2178,15 @@ IMPL_LINK( SvxNumOptionsTabPage, OrientHdl_Impl, ListBox *, pBox ) --------------------------------------------------*/ IMPL_LINK( SvxNumOptionsTabPage, SameLevelHdl_Impl, CheckBox *, pBox ) { - BOOL bSet = pBox->IsChecked(); + sal_Bool bSet = pBox->IsChecked(); pActNum->SetContinuousNumbering(bSet); - BOOL bRepaint = FALSE; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_Bool bRepaint = sal_False; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); if(aNumFmt.GetNumberingType() != SVX_NUM_NUMBER_NONE) { - bRepaint = TRUE; + bRepaint = sal_True; break; } } @@ -2201,8 +2201,8 @@ IMPL_LINK( SvxNumOptionsTabPage, BulColorHdl_Impl, ColorListBox*, pBox ) { Color nSetColor = pBox->GetSelectEntryColor(); - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2220,10 +2220,10 @@ IMPL_LINK( SvxNumOptionsTabPage, BulColorHdl_Impl, ColorListBox*, pBox ) * --------------------------------------------------*/ IMPL_LINK( SvxNumOptionsTabPage, BulRelSizeHdl_Impl, MetricField *, pField) { - USHORT nRelSize = (USHORT)pField->GetValue(); + sal_uInt16 nRelSize = (sal_uInt16)pField->GetValue(); - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2242,7 +2242,7 @@ IMPL_LINK( SvxNumOptionsTabPage, BulRelSizeHdl_Impl, MetricField *, pField) --------------------------------------------------*/ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { - USHORT nItemId = pButton->GetCurItemId(); + sal_uInt16 nItemId = pButton->GetCurItemId(); String aGrfName; Size aSize; sal_Bool bSucc(sal_False); @@ -2279,8 +2279,8 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { aSize = OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, (MapUnit)eCoreUnit); - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2321,7 +2321,7 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG ) { if(!bMenuButtonInitialized) { - bMenuButtonInitialized = TRUE; + bMenuButtonInitialized = sal_True; EnterWait(); PopupMenu* pPopup = aBitmapMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY ); GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames); @@ -2331,7 +2331,7 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG ) String aEmptyStr; GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS); - for(USHORT i = 0; i < aGrfNames.Count(); i++) + for(sal_uInt16 i = 0; i < aGrfNames.Count(); i++) { Graphic aGraphic; String sGrfName = *(const String*)aGrfNames.GetObject(i); @@ -2345,7 +2345,7 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG ) if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) { - BOOL bWidth = aSize.Width() > aSize.Height(); + sal_Bool bWidth = aSize.Width() > aSize.Height(); double nScale = bWidth ? (double)MAX_BMP_WIDTH / (double)aSize.Width(): (double)MAX_BMP_HEIGHT / (double)aSize.Height(); @@ -2374,14 +2374,14 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG ) --------------------------------------------------*/ IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG ) { - SvxCharacterMap* pMap = new SvxCharacterMap( this, TRUE ); + SvxCharacterMap* pMap = new SvxCharacterMap( this, sal_True ); - USHORT nMask = 1; + sal_uInt16 nMask = 1; const Font* pFmtFont = 0; - BOOL bSameBullet = TRUE; + sal_Bool bSameBullet = sal_True; sal_Unicode cBullet = 0; - BOOL bFirst = TRUE; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_Bool bFirst = sal_True; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2392,12 +2392,12 @@ IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG ) } else if(rCurFmt.GetBulletChar() != cBullet ) { - bSameBullet = FALSE; + bSameBullet = sal_False; break; } if(!pFmtFont) pFmtFont = rCurFmt.GetBulletFont(); - bFirst = FALSE; + bFirst = sal_False; } nMask <<= 1; @@ -2414,8 +2414,8 @@ IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG ) // Font Numrules umstellen aActBulletFont = pMap->GetCharFont(); - USHORT _nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 _nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & _nMask) { @@ -2439,9 +2439,9 @@ IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG ) IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, MetricField *, pField) { - BOOL bWidth = pField == &aWidthMF; + sal_Bool bWidth = pField == &aWidthMF; bLastWidthModified = bWidth; - BOOL bRatio = aRatioCB.IsChecked(); + sal_Bool bRatio = aRatioCB.IsChecked(); long nWidthVal = static_cast<long>(aWidthMF.Denormalize(aWidthMF.GetValue(FUNIT_100TH_MM))); long nHeightVal = static_cast<long>(aHeightMF.Denormalize(aHeightMF.GetValue(FUNIT_100TH_MM))); nWidthVal = OutputDevice::LogicToLogic( nWidthVal , @@ -2450,9 +2450,9 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, MetricField *, pField) MAP_100TH_MM, (MapUnit)eCoreUnit); double fSizeRatio; - BOOL bRepaint = FALSE; - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_Bool bRepaint = sal_False; + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2494,7 +2494,7 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, MetricField *, pField) const SvxBrushItem* pBrushItem = aNumFmt.GetBrush(); sal_Int16 eOrient = aNumFmt.GetVertOrient(); if(aSize != aSaveSize) - bRepaint = TRUE; + bRepaint = sal_True; aNumFmt.SetGraphicBrush( pBrushItem, &aSize, &eOrient ); pActNum->SetLevel(i, aNumFmt); } @@ -2526,12 +2526,12 @@ IMPL_LINK( SvxNumOptionsTabPage, RatioHdl_Impl, CheckBox *, pBox ) --------------------------------------------------*/ IMPL_LINK( SvxNumOptionsTabPage, CharFmtHdl_Impl, ListBox *, EMPTYARG ) { - bAutomaticCharStyles = FALSE; - USHORT nEntryPos = aCharFmtLB.GetSelectEntryPos(); + bAutomaticCharStyles = sal_False; + sal_uInt16 nEntryPos = aCharFmtLB.GetSelectEntryPos(); String sEntry = aCharFmtLB.GetSelectEntry(); - USHORT nMask = 1; + sal_uInt16 nMask = 1; String aEmptyStr; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2547,7 +2547,7 @@ IMPL_LINK( SvxNumOptionsTabPage, CharFmtHdl_Impl, ListBox *, EMPTYARG ) } nMask <<= 1; } - SetModified(FALSE); + SetModified(sal_False); return 0; }; @@ -2557,11 +2557,11 @@ IMPL_LINK( SvxNumOptionsTabPage, CharFmtHdl_Impl, ListBox *, EMPTYARG ) --------------------------------------------------*/ IMPL_LINK( SvxNumOptionsTabPage, EditModifyHdl_Impl, Edit *, pEdit ) { - BOOL bPrefix = pEdit == &aPrefixED; - BOOL bSuffix = pEdit == &aSuffixED; - BOOL bStart = pEdit == &aStartED; - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_Bool bPrefix = pEdit == &aPrefixED; + sal_Bool bSuffix = pEdit == &aSuffixED; + sal_Bool bStart = pEdit == &aStartED; + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2571,10 +2571,10 @@ IMPL_LINK( SvxNumOptionsTabPage, EditModifyHdl_Impl, Edit *, pEdit ) else if(bSuffix) aNumFmt.SetSuffix( aSuffixED.GetText() ); else if(bStart) - aNumFmt.SetStart( (USHORT)aStartED.GetValue() ); + aNumFmt.SetStart( (sal_uInt16)aStartED.GetValue() ); else //align { - USHORT nPos = aAlignLB.GetSelectEntryPos(); + sal_uInt16 nPos = aAlignLB.GetSelectEntryPos(); SvxAdjust eAdjust = SVX_ADJUST_CENTER; if(nPos == 0) eAdjust = SVX_ADJUST_LEFT; @@ -2594,11 +2594,11 @@ IMPL_LINK( SvxNumOptionsTabPage, EditModifyHdl_Impl, Edit *, pEdit ) /*-----------------09.12.97 11:49------------------- --------------------------------------------------*/ -USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, USHORT nXStart, - USHORT nYStart, USHORT nDivision) +sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, sal_uInt16 nXStart, + sal_uInt16 nYStart, sal_uInt16 nDivision) { const SvxBrushItem* pBrushItem = rFmt.GetBrush(); - USHORT nRet = 0; + sal_uInt16 nRet = 0; if(pBrushItem) { const Graphic* pGrf = pBrushItem->GetGraphic(); @@ -2606,7 +2606,7 @@ USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, USHORT { Size aGSize( rFmt.GetGraphicSize() ); aGSize.Width() /= nDivision; - nRet = (USHORT)aGSize.Width(); + nRet = (sal_uInt16)aGSize.Width(); aGSize.Height() /= nDivision; pGrf->Draw( pVDev, Point(nXStart,nYStart), pVDev->PixelToLogic( aGSize ) ); @@ -2619,9 +2619,9 @@ USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, USHORT /*-----------------09.12.97 11:54------------------- --------------------------------------------------*/ -USHORT lcl_DrawBullet(VirtualDevice* pVDev, - const SvxNumberFormat& rFmt, USHORT nXStart, - USHORT nYStart, const Size& rSize) +sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev, + const SvxNumberFormat& rFmt, sal_uInt16 nXStart, + sal_uInt16 nYStart, const Size& rSize) { Font aTmpFont(pVDev->GetFont()); @@ -2636,7 +2636,7 @@ USHORT lcl_DrawBullet(VirtualDevice* pVDev, if(!aTmpSize.Height()) aTmpSize.Height() = 1; aFont.SetSize(aTmpSize); - aFont.SetTransparent(TRUE); + aFont.SetTransparent(sal_True); Color aBulletColor = rFmt.GetBulletColor(); if(aBulletColor.GetColor() == COL_AUTO) aBulletColor = Color(pVDev->GetFillColor().IsDark() ? COL_WHITE : COL_BLACK); @@ -2648,7 +2648,7 @@ USHORT lcl_DrawBullet(VirtualDevice* pVDev, long nY = nYStart; nY -= ((aTmpSize.Height() - rSize.Height())/ 2); pVDev->DrawText( Point(nXStart, nY), aText ); - USHORT nRet = (USHORT)pVDev->GetTextWidth(aText); + sal_uInt16 nRet = (sal_uInt16)pVDev->GetTextWidth(aText); pVDev->SetFont(aTmpFont); return nRet; @@ -2679,10 +2679,10 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) if(pActNum) { - USHORT nWidthRelation; + sal_uInt16 nWidthRelation; if(nPageWidth) { - nWidthRelation = USHORT (nPageWidth / aSize.Width()); + nWidthRelation = sal_uInt16 (nPageWidth / aSize.Width()); if(bPosition) nWidthRelation = nWidthRelation * 2 / 3; else @@ -2692,52 +2692,52 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) nWidthRelation = 30; // Kapiteldialog //Hoehe pro Ebene - USHORT nXStep = sal::static_int_cast< USHORT >(aSize.Width() / (3 * pActNum->GetLevelCount())); + sal_uInt16 nXStep = sal::static_int_cast< sal_uInt16 >(aSize.Width() / (3 * pActNum->GetLevelCount())); if(pActNum->GetLevelCount() < 10) nXStep /= 2; - USHORT nYStart = 4; + sal_uInt16 nYStart = 4; // fuer ein einziges Level darf nicht die gesamte Hoehe benutzt werden - USHORT nYStep = sal::static_int_cast< USHORT >((aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5)); + sal_uInt16 nYStep = sal::static_int_cast< sal_uInt16 >((aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5)); aStdFont = OutputDevice::GetDefaultFont( DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE); aStdFont.SetColor(aTextColor); aStdFont.SetFillColor(aBackColor); // - USHORT nFontHeight = nYStep * 6 / 10; + sal_uInt16 nFontHeight = nYStep * 6 / 10; if(bPosition) nFontHeight = nYStep * 15 / 10; aStdFont.SetSize(Size( 0, nFontHeight )); - SvxNodeNum aNum( (BYTE)0 ); - USHORT nPreNum = pActNum->GetLevel(0).GetStart(); + SvxNodeNum aNum( (sal_uInt8)0 ); + sal_uInt16 nPreNum = pActNum->GetLevel(0).GetStart(); if(bPosition) { - USHORT nLineHeight = nFontHeight * 8 / 7; - BYTE nStart = 0; + sal_uInt16 nLineHeight = nFontHeight * 8 / 7; + sal_uInt8 nStart = 0; while( !(nActLevel & (1<<nStart)) ) { nStart++; } if(nStart) nStart--; - BYTE nEnd = std::min( (BYTE)(nStart + 3), (BYTE)pActNum->GetLevelCount() ); - for( BYTE nLevel = nStart; nLevel < nEnd; ++nLevel ) + sal_uInt8 nEnd = std::min( (sal_uInt8)(nStart + 3), (sal_uInt8)pActNum->GetLevelCount() ); + for( sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel ) { const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel); aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart(); // --> OD 2008-01-16 #newlistlevelattrs# - USHORT nXStart( 0 ); + sal_uInt16 nXStart( 0 ); short nTextOffset( 0 ); - USHORT nNumberXPos( 0 ); + sal_uInt16 nNumberXPos( 0 ); if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nXStart = rFmt.GetAbsLSpace() / nWidthRelation; nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation; nNumberXPos = nXStart; - USHORT nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation; + sal_uInt16 nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation; if(nFirstLineOffset <= nNumberXPos) nNumberXPos = nNumberXPos - nFirstLineOffset; @@ -2758,12 +2758,12 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) } else { - nNumberXPos = static_cast<USHORT>( nTmpNumberXPos ); + nNumberXPos = static_cast<sal_uInt16>( nTmpNumberXPos ); } } // <-- - USHORT nBulletWidth = 0; + sal_uInt16 nBulletWidth = 0; if( SVX_NUM_BITMAP == (rFmt.GetNumberingType() &(~LINK_TOKEN))) { nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev, rFmt, @@ -2793,7 +2793,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) pVDev->SetFont(aColorFont); pVDev->DrawText( Point(nNumberXPos, nYStart), aText ); pVDev->SetFont(aSaveFont); - nBulletWidth = (USHORT)pVDev->GetTextWidth(aText); + nBulletWidth = (sal_uInt16)pVDev->GetTextWidth(aText); nPreNum++; } // --> OD 2008-01-16 #newlistlevelattrs# @@ -2803,11 +2803,11 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) pVDev->SetFont(aStdFont); String aText(' '); pVDev->DrawText( Point(nNumberXPos, nYStart), aText ); - nBulletWidth = nBulletWidth + (USHORT)pVDev->GetTextWidth(aText); + nBulletWidth = nBulletWidth + (sal_uInt16)pVDev->GetTextWidth(aText); } // --> OD 2008-01-16 #newlistlevelattrs# - USHORT nTextXPos( 0 ); + sal_uInt16 nTextXPos( 0 ); if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nTextXPos = nXStart; @@ -2822,7 +2822,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) { case SvxNumberFormat::LISTTAB: { - nTextXPos = static_cast<USHORT>( + nTextXPos = static_cast<sal_uInt16>( rFmt.GetListtabPos() / nWidthRelation ); if ( nTextXPos < nNumberXPos + nBulletWidth ) { @@ -2838,7 +2838,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) break; } - nXStart = static_cast<USHORT>( rFmt.GetIndentAt() / nWidthRelation ); + nXStart = static_cast<sal_uInt16>( rFmt.GetIndentAt() / nWidthRelation ); } // <-- @@ -2863,13 +2863,13 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) if(aBlackColor == aBackColor) aBlackColor.Invert(); - for( BYTE nLevel = 0; nLevel < pActNum->GetLevelCount(); + for( sal_uInt8 nLevel = 0; nLevel < pActNum->GetLevelCount(); ++nLevel, nYStart = nYStart + nYStep ) { const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel); aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart(); // --> OD 2008-01-31 #newlistlevelattrs# - USHORT nXStart( 0 ); + sal_uInt16 nXStart( 0 ); if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nXStart = rFmt.GetAbsLSpace() / nWidthRelation; @@ -2885,13 +2885,13 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) } else { - nXStart = static_cast<USHORT>(nTmpXStart); + nXStart = static_cast<sal_uInt16>(nTmpXStart); } } nXStart /= 2; nXStart += 2; // <-- - USHORT nTextOffset = 2 * nXStep; + sal_uInt16 nTextOffset = 2 * nXStep; if( SVX_NUM_BITMAP == (rFmt.GetNumberingType()&(~LINK_TOKEN)) ) { if(rFmt.IsShowSymbol()) @@ -2924,7 +2924,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) String aText(pActNum->MakeNumString( aNum )); pVDev->DrawText( Point(nXStart, nYStart), aText ); pVDev->SetFont(aStdFont); - nTextOffset = (USHORT)pVDev->GetTextWidth(aText); + nTextOffset = (sal_uInt16)pVDev->GetTextWidth(aText); nTextOffset = nTextOffset + nXStep; nPreNum++; } @@ -3000,7 +3000,7 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(Window* pParent, nNumItemId(SID_ATTR_NUMBERING_RULE), bModified(false), bPreset(false), - bInInintControl(FALSE), + bInInintControl(sal_False), // --> OD 2008-01-11 #newlistlevelattrs# bLabelAlignmentPosAndSpaceModeActive( false ) // <-- @@ -3013,7 +3013,7 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(Window* pParent, aAlignLB.SetSelectHdl(LINK(this, SvxNumPositionTabPage, EditModifyHdl_Impl)); // --> OD 2008-01-10 #newlistlevelattrs# aAlign2LB.SetSelectHdl(LINK(this, SvxNumPositionTabPage, EditModifyHdl_Impl)); - for ( USHORT i = 0; i < aAlignLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aAlignLB.GetEntryCount(); ++i ) { aAlign2LB.InsertEntry( aAlignLB.GetEntry( i ) ); } @@ -3144,7 +3144,7 @@ void lcl_PrintDebugOutput(FixedText& rFixed, const SvxNumberFormat& rNumFmt) --------------------------------------------------*/ void SvxNumPositionTabPage::InitControls() { - bInInintControl = TRUE; + bInInintControl = sal_True; // --> OD 2008-01-11 #newlistlevelattrs# const bool bRelative = !bLabelAlignmentPosAndSpaceModeActive && aRelativeCB.IsEnabled() && aRelativeCB.IsChecked(); @@ -3171,11 +3171,11 @@ void SvxNumPositionTabPage::InitControls() // <-- const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM]; - USHORT nMask = 1; - USHORT nLvl = USHRT_MAX; + sal_uInt16 nMask = 1; + sal_uInt16 nLvl = USHRT_MAX; long nFirstBorderText = 0; long nFirstBorderTextRelative = -1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { aNumFmtArr[i] = &pActNum->GetLevel(i); if(nActNumLvl & nMask) @@ -3269,7 +3269,7 @@ void SvxNumPositionTabPage::InitControls() if(bSameAdjust) { - USHORT nPos = 1; // zentriert + sal_uInt16 nPos = 1; // zentriert if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT) nPos = 0; else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT) @@ -3290,7 +3290,7 @@ void SvxNumPositionTabPage::InitControls() // --> OD 2008-01-11 #newlistlevelattrs# if ( bSameLabelFollowedBy ) { - USHORT nPos = 0; // LISTTAB + sal_uInt16 nPos = 0; // LISTTAB if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE ) { nPos = 1; @@ -3350,7 +3350,7 @@ void SvxNumPositionTabPage::InitControls() if ( bSetDistEmpty ) aDistBorderMF.SetText(aEmptyStr); - bInInintControl = FALSE; + bInInintControl = sal_False; } /*-----------------03.12.97 10:02------------------- @@ -3359,17 +3359,17 @@ void SvxNumPositionTabPage::InitControls() void SvxNumPositionTabPage::ActivatePage(const SfxItemSet& rSet) { const SfxPoolItem* pItem; - UINT16 nTmpNumLvl = USHRT_MAX; + sal_uInt16 nTmpNumLvl = USHRT_MAX; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem)) bPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem)) nTmpNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } // - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -3380,19 +3380,19 @@ void SvxNumPositionTabPage::ActivatePage(const SfxItemSet& rSet) { *pActNum = *pSaveNum; nActNumLvl = nTmpNumLvl; - USHORT nMask = 1; - aLevelLB.SetUpdateMode(FALSE); + sal_uInt16 nMask = 1; + aLevelLB.SetUpdateMode(sal_False); aLevelLB.SetNoSelection(); aLevelLB.SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == USHRT_MAX); if(nActNumLvl != USHRT_MAX) - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) - aLevelLB.SelectEntryPos( i, TRUE); + aLevelLB.SelectEntryPos( i, sal_True); nMask <<= 1 ; } aRelativeCB.Enable(nActNumLvl != 1); - aLevelLB.SetUpdateMode(TRUE); + aLevelLB.SetUpdateMode(sal_True); // --> OD 2008-01-11 #newlistlevelattrs# InitPosAndSpaceMode(); @@ -3412,13 +3412,13 @@ int SvxNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet) { if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } /*-----------------03.12.97 10:02------------------- --------------------------------------------------*/ -BOOL SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) { rSet.Put(SfxUInt16Item(SID_PARAM_CUR_NUM_LEVEL, nActNumLvl)); @@ -3426,7 +3426,7 @@ BOOL SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) { *pSaveNum = *pActNum; rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); - rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, FALSE)); + rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, sal_False)); } return bModified; } @@ -3438,15 +3438,15 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); + SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem); if(eState != SFX_ITEM_SET) { nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); + eState = rSet.GetItemState(nNumItemId, sal_False, &pItem); if( eState != SFX_ITEM_SET ) { - pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) ); eState = SFX_ITEM_SET; } @@ -3458,7 +3458,7 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet ) // Ebenen einfuegen if(!aLevelLB.GetEntryCount()) { - for(USHORT i = 1; i <= pSaveNum->GetLevelCount(); i++) + for(sal_uInt16 i = 1; i <= pSaveNum->GetLevelCount(); i++) aLevelLB.InsertEntry(UniString::CreateFromInt32(i)); if(pSaveNum->GetLevelCount() > 1) { @@ -3472,21 +3472,21 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet ) } else aLevelLB.SelectEntryPos(aLevelLB.GetEntryCount() - 1); - USHORT nMask = 1; - aLevelLB.SetUpdateMode(FALSE); + sal_uInt16 nMask = 1; + aLevelLB.SetUpdateMode(sal_False); aLevelLB.SetNoSelection(); if(nActNumLvl == USHRT_MAX) { - aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), TRUE); + aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), sal_True); } else - for(USHORT i = 0; i < pSaveNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pSaveNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) - aLevelLB.SelectEntryPos( i, TRUE); + aLevelLB.SelectEntryPos( i, sal_True); nMask <<= 1; } - aLevelLB.SetUpdateMode(TRUE); + aLevelLB.SetUpdateMode(sal_True); if(!pActNum) pActNum = new SvxNumRule(*pSaveNum); @@ -3497,13 +3497,13 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet ) // --> OD 2008-01-11 #newlistlevelattrs# InitPosAndSpaceMode(); ShowControlsDependingOnPosAndSpaceMode(); -// const BOOL bDraw = pActNum->IsFeatureSupported(NUM_CONTINUOUS); +// const sal_Bool bDraw = pActNum->IsFeatureSupported(NUM_CONTINUOUS); // aDistNumFT.Show(bDraw); // aDistNumMF.Show(bDraw); // <-- InitControls(); - bModified = FALSE; + bModified = sal_False; } // --> OD 2008-01-11 #newlistlevelattrs# @@ -3518,8 +3518,8 @@ void SvxNumPositionTabPage::InitPosAndSpaceMode() SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode = SvxNumberFormat::LABEL_ALIGNMENT; - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i ) { if(nActNumLvl & nMask) { @@ -3604,15 +3604,15 @@ void SvxNumPositionTabPage::SetMetric(FieldUnit eMetric) --------------------------------------------------*/ IMPL_LINK( SvxNumPositionTabPage, EditModifyHdl_Impl, Edit *, EMPTYARG ) { - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); // --> OD 2008-01-11 #newlistlevelattrs# - const USHORT nPos = aAlignLB.IsVisible() + const sal_uInt16 nPos = aAlignLB.IsVisible() ? aAlignLB.GetSelectEntryPos() : aAlign2LB.GetSelectEntryPos(); // <-- @@ -3634,33 +3634,33 @@ IMPL_LINK( SvxNumPositionTabPage, EditModifyHdl_Impl, Edit *, EMPTYARG ) --------------------------------------------------*/ IMPL_LINK( SvxNumPositionTabPage, LevelHdl_Impl, ListBox *, pBox ) { - USHORT nSaveNumLvl = nActNumLvl; + sal_uInt16 nSaveNumLvl = nActNumLvl; nActNumLvl = 0; if(pBox->IsEntryPosSelected( pActNum->GetLevelCount() ) && (pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff)) { nActNumLvl = 0xFFFF; - pBox->SetUpdateMode(FALSE); - for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ ) - pBox->SelectEntryPos( i, FALSE ); - pBox->SetUpdateMode(TRUE); + pBox->SetUpdateMode(sal_False); + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) + pBox->SelectEntryPos( i, sal_False ); + pBox->SetUpdateMode(sal_True); } else if(pBox->GetSelectEntryCount()) { - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) { if(pBox->IsEntryPosSelected( i )) nActNumLvl |= nMask; nMask <<= 1; } - pBox->SelectEntryPos( pActNum->GetLevelCount(), FALSE ); + pBox->SelectEntryPos( pActNum->GetLevelCount(), sal_False ); } else { nActNumLvl = nSaveNumLvl; - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) { if(nActNumLvl & nMask) { @@ -3687,11 +3687,11 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld ) if(bInInintControl) return 0; long nValue = GetCoreValue(*pFld, eCoreUnit); - USHORT nMask = 1; + sal_uInt16 nMask = 1; #if OSL_DEBUG_LEVEL > 1 - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; #endif - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -3704,7 +3704,7 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld ) if(0 == i) { long nTmp = aNumFmt.GetFirstLineOffset(); - aNumFmt.SetAbsLSpace( USHORT(nValue - nTmp)); + aNumFmt.SetAbsLSpace( sal_uInt16(nValue - nTmp)); } else { @@ -3712,7 +3712,7 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld ) pActNum->GetLevel( i - 1 ).GetFirstLineOffset() - pActNum->GetLevel( i ).GetFirstLineOffset(); - aNumFmt.SetAbsLSpace( USHORT(nValue + nTmp)); + aNumFmt.SetAbsLSpace( sal_uInt16(nValue + nTmp)); } } else @@ -3729,14 +3729,14 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld ) //jetzt muss mit dem FirstLineOffset auch der AbsLSpace veraendert werden long nDiff = nValue + aNumFmt.GetFirstLineOffset(); long nAbsLSpace = aNumFmt.GetAbsLSpace(); - aNumFmt.SetAbsLSpace(USHORT(nAbsLSpace + nDiff)); + aNumFmt.SetAbsLSpace(sal_uInt16(nAbsLSpace + nDiff)); aNumFmt.SetFirstLineOffset( -(short)nValue ); } #if OSL_DEBUG_LEVEL > 1 if(bFirst) lcl_PrintDebugOutput(*pDebugFixedText, aNumFmt); - bFirst = FALSE; + bFirst = sal_False; #endif pActNum->SetLevel( i, aNumFmt ); } @@ -3758,16 +3758,16 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld ) --------------------------------------------------*/ IMPL_LINK( SvxNumPositionTabPage, RelativeHdl_Impl, CheckBox *, pBox ) { - BOOL bOn = pBox->IsChecked(); - BOOL bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl; - BOOL bSetValue = FALSE; + sal_Bool bOn = pBox->IsChecked(); + sal_Bool bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl; + sal_Bool bSetValue = sal_False; long nValue = 0; if(bOn || bSingleSelection) { - USHORT nMask = 1; - BOOL bFirst = TRUE; - bSetValue = TRUE; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + sal_Bool bFirst = sal_True; + bSetValue = sal_True; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -3782,7 +3782,7 @@ IMPL_LINK( SvxNumPositionTabPage, RelativeHdl_Impl, CheckBox *, pBox ) bSetValue = nValue == (rNumFmt.GetAbsLSpace() + rNumFmt.GetFirstLineOffset()) - (pActNum->GetLevel(i - 1).GetAbsLSpace() + pActNum->GetLevel(i - 1).GetFirstLineOffset()); - bFirst = FALSE; + bFirst = sal_False; } nMask <<= 1; } @@ -3806,7 +3806,7 @@ IMPL_LINK( SvxNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG ) SvxNumberFormat::SvxNumLabelFollowedBy eLabelFollowedBy = SvxNumberFormat::LISTTAB; { - const USHORT nPos = aLabelFollowedByLB.GetSelectEntryPos(); + const sal_uInt16 nPos = aLabelFollowedByLB.GetSelectEntryPos(); if ( nPos == 1 ) { eLabelFollowedBy = SvxNumberFormat::SPACE; @@ -3819,9 +3819,9 @@ IMPL_LINK( SvxNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG ) // set value at the chosen list levels bool bSameListtabPos = true; - USHORT nFirstLvl = USHRT_MAX; - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i ) + sal_uInt16 nFirstLvl = USHRT_MAX; + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i ) { if ( nActNumLvl & nMask ) { @@ -3868,8 +3868,8 @@ IMPL_LINK( SvxNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pFld ) const long nValue = GetCoreValue( *pFld, eCoreUnit ); // set value at the chosen list levels - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i ) { if ( nActNumLvl & nMask ) { @@ -3896,8 +3896,8 @@ IMPL_LINK( SvxNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pFld ) const long nValue = GetCoreValue( *pFld, eCoreUnit ); // set value at the chosen list levels - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i ) { if ( nActNumLvl & nMask ) { @@ -3925,8 +3925,8 @@ IMPL_LINK( SvxNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld ) const long nValue = GetCoreValue( *pFld, eCoreUnit ); // set value at the chosen list levels - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i ) { if ( nActNumLvl & nMask ) { @@ -3954,7 +3954,7 @@ IMPL_LINK( SvxNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld ) --------------------------------------------------*/ IMPL_LINK( SvxNumPositionTabPage, StandardHdl_Impl, PushButton *, EMPTYARG ) { - USHORT nMask = 1; + sal_uInt16 nMask = 1; // --> OD 2008-02-11 #newlistlevelattrs# SvxNumRule aTmpNumRule( pActNum->GetFeatureFlags(), pActNum->GetLevelCount(), @@ -3962,7 +3962,7 @@ IMPL_LINK( SvxNumPositionTabPage, StandardHdl_Impl, PushButton *, EMPTYARG ) SVX_RULETYPE_NUMBERING, pActNum->GetLevel( 0 ).GetPositionAndSpaceMode() ); // <-- - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -3996,9 +3996,9 @@ IMPL_LINK( SvxNumPositionTabPage, StandardHdl_Impl, PushButton *, EMPTYARG ) return 0; } -void SvxNumPositionTabPage::SetModified(BOOL bRepaint) +void SvxNumPositionTabPage::SetModified(sal_Bool bRepaint) { - bModified = TRUE; + bModified = sal_True; if(bRepaint) { pPreviewWIN->SetLevel(nActNumLvl); @@ -4006,9 +4006,9 @@ void SvxNumPositionTabPage::SetModified(BOOL bRepaint) } } -void SvxNumOptionsTabPage::SetModified(BOOL bRepaint) +void SvxNumOptionsTabPage::SetModified(sal_Bool bRepaint) { - bModified = TRUE; + bModified = sal_True; if(bRepaint) { pPreviewWIN->SetLevel(nActNumLvl); diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index e2ee5b11af8f..fc9c4f70e621 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -129,7 +129,7 @@ static const long MINBODY = 284; // 0,5cm in twips aufgerundet //static const long PRINT_OFFSET = 17; // 0,03cm in twips abgerundet static const long PRINT_OFFSET = 0; // why was this ever set to 17 ? it led to wrong right and bottom margins. -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_SHADOW, @@ -142,7 +142,7 @@ static USHORT pRanges[] = // ------- Mapping Seitenlayout ------------------------------------------ -USHORT aArr[] = +sal_uInt16 aArr[] = { SVX_PAGE_ALL, SVX_PAGE_MIRROR, @@ -152,11 +152,11 @@ USHORT aArr[] = // ----------------------------------------------------------------------- -USHORT PageUsageToPos_Impl( USHORT nUsage ) +sal_uInt16 PageUsageToPos_Impl( sal_uInt16 nUsage ) { - const USHORT nCount = sizeof(aArr) / sizeof(USHORT); + const sal_uInt16 nCount = sizeof(aArr) / sizeof(sal_uInt16); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) if ( aArr[i] == ( nUsage & 0x000f ) ) return i; return SVX_PAGE_ALL; @@ -164,9 +164,9 @@ USHORT PageUsageToPos_Impl( USHORT nUsage ) // ----------------------------------------------------------------------- -USHORT PosToPageUsage_Impl( USHORT nPos ) +sal_uInt16 PosToPageUsage_Impl( sal_uInt16 nPos ) { - const USHORT nCount = sizeof(aArr) / sizeof(USHORT); + const sal_uInt16 nCount = sizeof(aArr) / sizeof(sal_uInt16); if ( nPos >= nCount ) return 0; @@ -192,7 +192,7 @@ long ConvertLong_Impl( const long nIn, SfxMapUnit eUnit ) return OutputDevice::LogicToLogic( nIn, (MapUnit)eUnit, MAP_TWIP ); } -BOOL IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize ) +sal_Bool IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize ) { if ( pSize ) { @@ -202,7 +202,7 @@ BOOL IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize ) return ( nDiffW < 10 && nDiffH < 10 ); } else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -230,7 +230,7 @@ struct SvxPage_Impl // gibt den Bereich der Which-Werte zur"uck -USHORT* SvxPageDescPage::GetRanges() +sal_uInt16* SvxPageDescPage::GetRanges() { return pRanges; } @@ -291,16 +291,16 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : aOutsideText ( CUI_RES( STR_OUTSIDE ) ), aPrintRangeQueryText( CUI_RES( STR_QUERY_PRINTRANGE ) ), - bLandscape ( FALSE ), + bLandscape ( sal_False ), eMode ( SVX_PAGE_MODE_STANDARD ), ePaperStart ( PAPER_A3 ), ePaperEnd ( PAPER_ENV_DL ), pImpl ( new SvxPage_Impl ) { - bBorderModified = FALSE; + bBorderModified = sal_False; FreeResource(); - aBspWin.EnableRTL( FALSE ); + aBspWin.EnableRTL( sal_False ); // diese Page braucht ExchangeSupport SetExchangeSupport(); @@ -312,7 +312,7 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : const SfxPoolItem* pItem; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, FALSE, &pItem) || + if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, sal_False, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) bWeb = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); @@ -488,10 +488,10 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)*pItem; SetMetricValue( aLeftMarginEdit, rLRSpace.GetLeft(), eUnit ); aBspWin.SetLeft( - (USHORT)ConvertLong_Impl( (long)rLRSpace.GetLeft(), eUnit ) ); + (sal_uInt16)ConvertLong_Impl( (long)rLRSpace.GetLeft(), eUnit ) ); SetMetricValue( aRightMarginEdit, rLRSpace.GetRight(), eUnit ); aBspWin.SetRight( - (USHORT)ConvertLong_Impl( (long)rLRSpace.GetRight(), eUnit ) ); + (sal_uInt16)ConvertLong_Impl( (long)rLRSpace.GetRight(), eUnit ) ); } // R"ander (Oben/Unten) einstellen @@ -502,16 +502,16 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)*pItem; SetMetricValue( aTopMarginEdit, rULSpace.GetUpper(), eUnit ); aBspWin.SetTop( - (USHORT)ConvertLong_Impl( (long)rULSpace.GetUpper(), eUnit ) ); + (sal_uInt16)ConvertLong_Impl( (long)rULSpace.GetUpper(), eUnit ) ); SetMetricValue( aBottomMarginEdit, rULSpace.GetLower(), eUnit ); aBspWin.SetBottom( - (USHORT)ConvertLong_Impl( (long)rULSpace.GetLower(), eUnit ) ); + (sal_uInt16)ConvertLong_Impl( (long)rULSpace.GetLower(), eUnit ) ); } // allgemeine Seitendaten SvxNumType eNumType = SVX_ARABIC; bLandscape = ( pImpl->mpDefPrinter->GetOrientation() == ORIENTATION_LANDSCAPE ); - USHORT nUse = (USHORT)SVX_PAGE_ALL; + sal_uInt16 nUse = (sal_uInt16)SVX_PAGE_ALL; pItem = GetItem( rSet, SID_ATTR_PAGE ); if ( pItem ) @@ -528,11 +528,11 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) LayoutHdl_Impl( 0 ); // Numerierungsart der Seitenvorlage einstellen - aNumberFormatBox.SelectEntryPos( sal::static_int_cast< USHORT >(eNumType) ); + aNumberFormatBox.SelectEntryPos( sal::static_int_cast< sal_uInt16 >(eNumType) ); // Aktueller Papierschacht aPaperTrayBox.Clear(); - BYTE nPaperBin = PAPERBIN_PRINTER_SETTINGS; + sal_uInt8 nPaperBin = PAPERBIN_PRINTER_SETTINGS; pItem = GetItem( rSet, SID_ATTR_PAGE_PAPERBIN ); if ( pItem ) @@ -548,10 +548,10 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) if ( PAPERBIN_PRINTER_SETTINGS == nPaperBin ) aBinName = EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ); else - aBinName = pImpl->mpDefPrinter->GetPaperBinName( (USHORT)nPaperBin ); + aBinName = pImpl->mpDefPrinter->GetPaperBinName( (sal_uInt16)nPaperBin ); - USHORT nEntryPos = aPaperTrayBox.InsertEntry( aBinName ); - aPaperTrayBox.SetEntryData( nEntryPos, (void*)(ULONG)nPaperBin ); + sal_uInt16 nEntryPos = aPaperTrayBox.InsertEntry( aBinName ); + aPaperTrayBox.SetEntryData( nEntryPos, (void*)(sal_uLong)nPaperBin ); aPaperTrayBox.SelectEntry( aBinName ); // Size rausholen @@ -564,14 +564,14 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) FASTBOOL bOrientationSupport = pImpl->mpDefPrinter->HasSupport( SUPPORT_SET_ORIENTATION ); #ifdef OS2 - // unter OS/2 wird bei HasSupport() immer TRUE returned + // unter OS/2 wird bei HasSupport() immer sal_True returned // aber nur als Dummy, deshalb FALSE - bOrientationSupport = FALSE; + bOrientationSupport = sal_False; #endif if ( !bOrientationSupport && aPaperSize.Width() > aPaperSize.Height() ) - bLandscape = TRUE; + bLandscape = sal_True; aLandscapeBtn.Check( bLandscape ); aPortraitBtn.Check( !bLandscape ); @@ -584,7 +584,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) Swap( aPaperSize ); // Actual Paper Format - Paper ePaper = SvxPaperInfo::GetSvxPaper( aPaperSize, MAP_100TH_MM, TRUE ); + Paper ePaper = SvxPaperInfo::GetSvxPaper( aPaperSize, MAP_100TH_MM, sal_True ); if ( PAPER_USER != ePaper ) aPaperSize = SvxPaperInfo::GetPaperSize( ePaper, MAP_100TH_MM ); @@ -597,8 +597,8 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) SetMetricValue( aPaperWidthEdit, aPaperSize.Width(), SFX_MAPUNIT_100TH_MM ); aPaperSizeBox.Clear(); - USHORT nActPos = LISTBOX_ENTRY_NOTFOUND; - USHORT nAryId = RID_SVXSTRARY_PAPERSIZE_STD; + sal_uInt16 nActPos = LISTBOX_ENTRY_NOTFOUND; + sal_uInt16 nAryId = RID_SVXSTRARY_PAPERSIZE_STD; if ( ePaperStart != PAPER_A3 ) nAryId = RID_SVXSTRARY_PAPERSIZE_DRAW; @@ -609,8 +609,8 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) { String aStr = aPaperAry.GetString(i); Paper eSize = (Paper)aPaperAry.GetValue(i); - USHORT nPos = aPaperSizeBox.InsertEntry( aStr ); - aPaperSizeBox.SetEntryData( nPos, (void*)(ULONG)eSize ); + sal_uInt16 nPos = aPaperSizeBox.InsertEntry( aStr ); + aPaperSizeBox.SetEntryData( nPos, (void*)(sal_uLong)eSize ); if ( eSize == ePaper ) nActPos = nPos; @@ -632,15 +632,15 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) // Horizontale Ausrichtung pItem = GetItem( rSet, SID_ATTR_PAGE_EXT1 ); aHorzBox.Check( pItem ? ( (const SfxBoolItem*)pItem )->GetValue() - : FALSE ); + : sal_False ); // Vertikale Ausrichtung pItem = GetItem( rSet, SID_ATTR_PAGE_EXT2 ); aVertBox.Check( pItem ? ( (const SfxBoolItem*)pItem )->GetValue() - : FALSE ); + : sal_False ); // Beispiel-Fenster auf Tabelle setzen - aBspWin.SetTable( TRUE ); + aBspWin.SetTable( sal_True ); aBspWin.SetHorz( aHorzBox.IsChecked() ); aBspWin.SetVert( aVertBox.IsChecked() ); @@ -653,7 +653,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) aAdaptBox.Show(); pItem = GetItem( rSet, SID_ATTR_PAGE_EXT1 ); aAdaptBox.Check( pItem ? - ( (const SfxBoolItem*)pItem )->GetValue() : FALSE ); + ( (const SfxBoolItem*)pItem )->GetValue() : sal_False ); //!!! hidden, weil von StarDraw nicht implementiert aLayoutBox.Hide(); @@ -674,8 +674,8 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) InitHeadFoot_Impl( rSet ); // R"ander auf Hoch/Quer updaten, dann Beispiel updaten - bBorderModified = FALSE; - SwapFirstValues_Impl( FALSE ); + bBorderModified = sal_False; + SwapFirstValues_Impl( sal_False ); UpdateExample_Impl(); // Alte Werte sichern @@ -713,7 +713,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) } SfxItemState eState = rSet.GetItemState( GetWhich( SID_ATTR_FRAMEDIRECTION ), - TRUE, &pItem ); + sal_True, &pItem ); if( SFX_ITEM_UNKNOWN != eState ) { sal_uInt32 nVal = SFX_ITEM_SET == eState @@ -735,13 +735,13 @@ void SvxPageDescPage::FillUserData() // ----------------------------------------------------------------------- -BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; const SfxItemSet& rOldSet = GetItemSet(); SfxItemPool* pPool = rOldSet.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); - USHORT nWhich = GetWhich( SID_ATTR_LRSPACE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_LRSPACE ); SfxMapUnit eUnit = pPool->GetMetric( nWhich ); const SfxPoolItem* pOld = 0; @@ -754,14 +754,14 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( aLeftMarginEdit.GetText() != aLeftMarginEdit.GetSavedValue() ) { - aMargin.SetLeft( (USHORT)GetCoreValue( aLeftMarginEdit, eUnit ) ); - bModified |= TRUE; + aMargin.SetLeft( (sal_uInt16)GetCoreValue( aLeftMarginEdit, eUnit ) ); + bModified |= sal_True; } if ( aRightMarginEdit.GetText() != aRightMarginEdit.GetSavedValue() ) { - aMargin.SetRight( (USHORT)GetCoreValue( aRightMarginEdit, eUnit ) ); - bModified |= TRUE; + aMargin.SetRight( (sal_uInt16)GetCoreValue( aRightMarginEdit, eUnit ) ); + bModified |= sal_True; } // Linken und rechten Rand setzen @@ -772,21 +772,21 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || !( *(const SvxLRSpaceItem*)pOld == aMargin ) ) rSet.Put( aMargin ); else - bModified = FALSE; + bModified = sal_False; } - BOOL bMod = FALSE; + sal_Bool bMod = sal_False; if ( aTopMarginEdit.GetText() != aTopMarginEdit.GetSavedValue() ) { - aTopMargin.SetUpper( (USHORT)GetCoreValue( aTopMarginEdit, eUnit ) ); - bMod |= TRUE; + aTopMargin.SetUpper( (sal_uInt16)GetCoreValue( aTopMarginEdit, eUnit ) ); + bMod |= sal_True; } if ( aBottomMarginEdit.GetText() != aBottomMarginEdit.GetSavedValue() ) { - aTopMargin.SetLower( (USHORT)GetCoreValue( aBottomMarginEdit, eUnit ) ); - bMod |= TRUE; + aTopMargin.SetLower( (sal_uInt16)GetCoreValue( aBottomMarginEdit, eUnit ) ); + bMod |= sal_True; } // unteren oberen Rand setzen @@ -797,27 +797,27 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || !( *(const SvxULSpaceItem*)pOld == aTopMargin ) ) { - bModified |= TRUE; + bModified |= sal_True; rSet.Put( aTopMargin ); } } // Druckerschacht nWhich = GetWhich( SID_ATTR_PAGE_PAPERBIN ); - USHORT nPos = aPaperTrayBox.GetSelectEntryPos(); - USHORT nBin = (USHORT)(ULONG)aPaperTrayBox.GetEntryData( nPos ); + sal_uInt16 nPos = aPaperTrayBox.GetSelectEntryPos(); + sal_uInt16 nBin = (sal_uInt16)(sal_uLong)aPaperTrayBox.GetEntryData( nPos ); pOld = GetOldItem( rSet, SID_ATTR_PAGE_PAPERBIN ); if ( !pOld || ( (const SvxPaperBinItem*)pOld )->GetValue() != nBin ) { - rSet.Put( SvxPaperBinItem( nWhich, (BYTE)nBin ) ); - bModified |= TRUE; + rSet.Put( SvxPaperBinItem( nWhich, (sal_uInt8)nBin ) ); + bModified |= sal_True; } nPos = aPaperSizeBox.GetSelectEntryPos(); - Paper ePaper = (Paper)(ULONG)aPaperSizeBox.GetEntryData( nPos ); - const USHORT nOld = aPaperSizeBox.GetSavedValue(); - BOOL bChecked = aLandscapeBtn.IsChecked(); + Paper ePaper = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData( nPos ); + const sal_uInt16 nOld = aPaperSizeBox.GetSavedValue(); + sal_Bool bChecked = aLandscapeBtn.IsChecked(); if ( PAPER_USER == ePaper ) { @@ -833,7 +833,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || ( (const SvxSizeItem*)pOld )->GetSize() != aSize ) { rSet.Put( SvxSizeItem( GetWhich(SID_ATTR_PAGE_SIZE), aSize ) ); - bModified |= TRUE; + bModified |= sal_True; } } } @@ -851,7 +851,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || ( (const SvxSizeItem*)pOld )->GetSize() != aSize ) { rSet.Put( SvxSizeItem( GetWhich(SID_ATTR_PAGE_SIZE), aSize ) ); - bModified |= TRUE; + bModified |= sal_True; } } } @@ -868,7 +868,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( bChecked != aLandscapeBtn.GetSavedValue() ) { aPage.SetLandscape(bChecked); - bMod |= TRUE; + bMod |= sal_True; } // Einstellen der Numerierungsart der Seite @@ -877,7 +877,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( nPos != aNumberFormatBox.GetSavedValue() ) { aPage.SetNumType( (SvxNumType)nPos ); - bMod |= TRUE; + bMod |= sal_True; } if ( bMod ) @@ -887,7 +887,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || !( *(const SvxPageItem*)pOld == aPage ) ) { rSet.Put( aPage ); - bModified |= TRUE; + bModified |= sal_True; } } else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich ) ) @@ -906,7 +906,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) SfxBoolItem aHorz( GetWhich( SID_ATTR_PAGE_EXT1 ), aHorzBox.IsChecked() ); rSet.Put( aHorz ); - bModified |= TRUE; + bModified |= sal_True; } if ( aVertBox.IsChecked() != aVertBox.GetSavedValue() ) @@ -914,7 +914,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) SfxBoolItem aVert( GetWhich( SID_ATTR_PAGE_EXT2 ), aVertBox.IsChecked() ); rSet.Put( aVert ); - bModified |= TRUE; + bModified |= sal_True; } break; } @@ -924,7 +924,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) // immer putten, damit Draw das auswerten kann rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_PAGE_EXT1 ), aAdaptBox.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; break; } default: ;//prevent warning @@ -936,13 +936,13 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) { const SfxBoolItem& rRegItem = (const SfxBoolItem&)rOldSet.Get(SID_SWREGISTER_MODE); SfxBoolItem* pRegItem = (SfxBoolItem*)rRegItem.Clone(); - BOOL bCheck = aRegisterCB.IsChecked(); + sal_Bool bCheck = aRegisterCB.IsChecked(); pRegItem->SetValue(bCheck); rSet.Put(*pRegItem); - bModified |= TRUE; + bModified |= sal_True; if(bCheck) { - bModified |= TRUE; + bModified |= sal_True; rSet.Put(SfxStringItem(SID_SWREGISTER_COLLECTION, aRegisterLB.GetSelectEntry())); } @@ -953,7 +953,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if( aTextFlowBox.IsVisible() && (eDirection != aTextFlowBox.GetSavedValue()) ) { rSet.Put( SvxFrameDirectionItem( eDirection, GetWhich( SID_ATTR_FRAMEDIRECTION ) ) ); - bModified = TRUE; + bModified = sal_True; } return bModified; @@ -964,7 +964,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) IMPL_LINK( SvxPageDescPage, LayoutHdl_Impl, ListBox *, EMPTYARG ) { // innen au\sen umschalten - const USHORT nPos = PosToPageUsage_Impl( aLayoutBox.GetSelectEntryPos() ); + const sal_uInt16 nPos = PosToPageUsage_Impl( aLayoutBox.GetSelectEntryPos() ); if ( nPos == SVX_PAGE_MIRROR ) { @@ -996,16 +996,16 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG ) // Schacht-Box initialisieren String aOldName = aPaperTrayBox.GetSelectEntry(); - aPaperTrayBox.SetUpdateMode( FALSE ); + aPaperTrayBox.SetUpdateMode( sal_False ); aPaperTrayBox.Clear(); - USHORT nEntryPos = aPaperTrayBox.InsertEntry( + sal_uInt16 nEntryPos = aPaperTrayBox.InsertEntry( EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ) ); aPaperTrayBox.SetEntryData( nEntryPos, - (void*)(ULONG)PAPERBIN_PRINTER_SETTINGS ); + (void*)(sal_uLong)PAPERBIN_PRINTER_SETTINGS ); String aPaperBin( EditResId( RID_SVXSTR_PAPERBIN ) ); - USHORT nBinCount = pImpl->mpDefPrinter->GetPaperBinCount(); + sal_uInt16 nBinCount = pImpl->mpDefPrinter->GetPaperBinCount(); - for ( USHORT i = 0; i < nBinCount; ++i ) + for ( sal_uInt16 i = 0; i < nBinCount; ++i ) { String aName = pImpl->mpDefPrinter->GetPaperBinName(i); @@ -1016,10 +1016,10 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG ) aName.Append( UniString::CreateFromInt32( i+1 ) ); } nEntryPos = aPaperTrayBox.InsertEntry( aName ); - aPaperTrayBox.SetEntryData( nEntryPos, (void*)(ULONG)i ); + aPaperTrayBox.SetEntryData( nEntryPos, (void*)(sal_uLong)i ); } aPaperTrayBox.SelectEntry( aOldName ); - aPaperTrayBox.SetUpdateMode( TRUE ); + aPaperTrayBox.SetUpdateMode( sal_True ); return 0; } @@ -1028,8 +1028,8 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG ) IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox ) { - const USHORT nPos = pBox->GetSelectEntryPos(); - Paper ePaper = (Paper)(ULONG)aPaperSizeBox.GetEntryData( nPos ); + const sal_uInt16 nPos = pBox->GetSelectEntryPos(); + Paper ePaper = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData( nPos ); if ( ePaper != PAPER_USER ) { @@ -1057,7 +1057,7 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox ) { // Draw: bei Papierformat soll der Rand 1cm betragen long nTmp = 0; - BOOL bScreen = ( PAPER_SCREEN == ePaper ); + sal_Bool bScreen = ( PAPER_SCREEN == ePaper ); if ( !bScreen ) // bei Bildschirm keinen Rand @@ -1102,16 +1102,16 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox ) IMPL_LINK( SvxPageDescPage, PaperSizeModify_Impl, Edit *, EMPTYARG ) { - USHORT nWhich = GetWhich( SID_ATTR_LRSPACE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_LRSPACE ); SfxMapUnit eUnit = GetItemSet().GetPool()->GetMetric( nWhich ); Size aSize( GetCoreValue( aPaperWidthEdit, eUnit ), GetCoreValue( aPaperHeightEdit, eUnit ) ); - Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, (MapUnit)eUnit, TRUE ); - USHORT nEntryCount = aPaperSizeBox.GetEntryCount(); + Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, (MapUnit)eUnit, sal_True ); + sal_uInt16 nEntryCount = aPaperSizeBox.GetEntryCount(); - for ( USHORT i = 0; i < nEntryCount; ++i ) + for ( sal_uInt16 i = 0; i < nEntryCount; ++i ) { - Paper eTmp = (Paper)(ULONG)aPaperSizeBox.GetEntryData(i); + Paper eTmp = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData(i); if ( eTmp == ePaper ) { @@ -1227,7 +1227,7 @@ void SvxPageDescPage::SwapFirstValues_Impl( FASTBOOL bSet ) IMPL_LINK_INLINE_START( SvxPageDescPage, BorderModify_Impl, MetricField *, EMPTYARG ) { if ( !bBorderModified ) - bBorderModified = TRUE; + bBorderModified = sal_True; UpdateExample_Impl(); return 0; } @@ -1260,12 +1260,12 @@ void SvxPageDescPage::UpdateExample_Impl( bool bResetbackground ) void SvxPageDescPage::ResetBackground_Impl( const SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_PAGE_HEADERSET ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_PAGE_HEADERSET ); - if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) { const SvxSetItem& rSetItem = - (const SvxSetItem&)rSet.Get( nWhich, FALSE ); + (const SvxSetItem&)rSet.Get( nWhich, sal_False ); const SfxItemSet& rTmpSet = rSetItem.GetItemSet(); const SfxBoolItem& rOn = (const SfxBoolItem&)rTmpSet.Get( GetWhich( SID_ATTR_PAGE_ON ) ); @@ -1293,10 +1293,10 @@ void SvxPageDescPage::ResetBackground_Impl( const SfxItemSet& rSet ) nWhich = GetWhich( SID_ATTR_PAGE_FOOTERSET ); - if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) { const SvxSetItem& rSetItem = - (const SvxSetItem&)rSet.Get( nWhich, FALSE ); + (const SvxSetItem&)rSet.Get( nWhich, sal_False ); const SfxItemSet& rTmpSet = rSetItem.GetItemSet(); const SfxBoolItem& rOn = (const SfxBoolItem&)rTmpSet.Get( GetWhich( SID_ATTR_PAGE_ON ) ); @@ -1360,7 +1360,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) if ( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_HEADERSET ), - FALSE, (const SfxPoolItem**)&pSetItem ) ) + sal_False, (const SfxPoolItem**)&pSetItem ) ) { const SfxItemSet& rHeaderSet = pSetItem->GetItemSet(); const SfxBoolItem& rHeaderOn = @@ -1379,13 +1379,13 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) rHeaderSet.Get( GetWhich( SID_ATTR_LRSPACE ) ); aBspWin.SetHdLeft( rLR.GetLeft() ); aBspWin.SetHdRight( rLR.GetRight() ); - aBspWin.SetHeader( TRUE ); + aBspWin.SetHeader( sal_True ); } else - aBspWin.SetHeader( FALSE ); + aBspWin.SetHeader( sal_False ); // im Beispiel Hintergrund und Umrandung anzeigen - USHORT nWhich = GetWhich( SID_ATTR_BRUSH ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_BRUSH ); if ( rHeaderSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) { @@ -1407,7 +1407,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) if ( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_FOOTERSET ), - FALSE, (const SfxPoolItem**)&pSetItem ) ) + sal_False, (const SfxPoolItem**)&pSetItem ) ) { const SfxItemSet& rFooterSet = pSetItem->GetItemSet(); const SfxBoolItem& rFooterOn = @@ -1426,13 +1426,13 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) rFooterSet.Get( GetWhich( SID_ATTR_LRSPACE ) ); aBspWin.SetFtLeft( rLR.GetLeft() ); aBspWin.SetFtRight( rLR.GetRight() ); - aBspWin.SetFooter( TRUE ); + aBspWin.SetFooter( sal_True ); } else - aBspWin.SetFooter( FALSE ); + aBspWin.SetFooter( sal_False ); // im Beispiel Hintergrund und Umrandung anzeigen - USHORT nWhich = GetWhich( SID_ATTR_BRUSH ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_BRUSH ); if ( rFooterSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) { @@ -1467,8 +1467,8 @@ int SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet ) // Abfrage, ob die Seitenr"ander ausserhalb des Druckbereichs liegen // Wenn nicht, dann den Anwender fragen, ob sie "ubernommen werden sollen. // Wenn nicht, dann auf der TabPage bleiben. - USHORT nPos = aPaperSizeBox.GetSelectEntryPos(); - Paper ePaper = (Paper)(ULONG)aPaperSizeBox.GetEntryData( nPos ); + sal_uInt16 nPos = aPaperSizeBox.GetSelectEntryPos(); + Paper ePaper = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData( nPos ); if ( ePaper != PAPER_SCREEN && IsMarginOutOfRange() ) { @@ -1500,7 +1500,7 @@ int SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet ) FillItemSet( *_pSet ); // ggf. hoch/quer putten - USHORT nWh = GetWhich( SID_ATTR_PAGE_SIZE ); + sal_uInt16 nWh = GetWhich( SID_ATTR_PAGE_SIZE ); SfxMapUnit eUnit = GetItemSet().GetPool()->GetMetric( nWh ); Size aSize( GetCoreValue( aPaperWidthEdit, eUnit ), GetCoreValue( aPaperHeightEdit, eUnit ) ); @@ -1648,7 +1648,7 @@ IMPL_LINK_INLINE_END( SvxPageDescPage, CenterHdl_Impl, CheckBox *, EMPTYARG ) void SvxPageDescPage::SetCollectionList(const List* pList) { sStandardRegister = *(String*)pList->GetObject(0); - for( USHORT i = 1; i < pList->Count(); i++ ) + for( sal_uInt16 i = 1; i < pList->Count(); i++ ) { aRegisterLB.InsertEntry(*(String*)pList->GetObject(i)); } @@ -1663,10 +1663,10 @@ void SvxPageDescPage::SetCollectionList(const List* pList) IMPL_LINK( SvxPageDescPage, RegisterModify, CheckBox*, pBox ) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if(pBox->IsChecked()) { - bEnable = TRUE; + bEnable = sal_True; if(USHRT_MAX == aRegisterLB.GetSelectEntryPos()) aRegisterLB.SelectEntry(sStandardRegister); } diff --git a/cui/source/tabpages/page.h b/cui/source/tabpages/page.h index 2bc5583fe859..9de1ee21d3e5 100644 --- a/cui/source/tabpages/page.h +++ b/cui/source/tabpages/page.h @@ -29,6 +29,11 @@ // define ---------------------------------------------------------------- +//!! the values of the following defines must correspond to the array position +//!! of the respective paper size in the file i18npool/source/paper/paper.cxx +//!! There are enums for them in i18npool/inc/i18npool/paper.hxx but unfortunately +//!! the resource compiler does not understand enums, thus the enum values need +//!! to be duplicated here for use in the src file. #define PAPERSIZE_A0 0 #define PAPERSIZE_A1 1 #define PAPERSIZE_A2 2 @@ -66,6 +71,7 @@ #define PAPERSIZE_B4_JIS 34 #define PAPERSIZE_B5_JIS 35 #define PAPERSIZE_B6_JIS 36 +#define PAPERSIZE_A6 56 #endif diff --git a/cui/source/tabpages/page.src b/cui/source/tabpages/page.src index 5c919f1df17a..2618b0b9389a 100644 --- a/cui/source/tabpages/page.src +++ b/cui/source/tabpages/page.src @@ -389,6 +389,7 @@ StringArray RID_SVXSTRARY_PAPERSIZE_STD { ItemList [ en-US ] = { + < "A6" ; PAPERSIZE_A6 ; > ; < "A5" ; PAPERSIZE_A5 ; > ; < "A4" ; PAPERSIZE_A4 ; > ; < "A3" ; PAPERSIZE_A3 ; > ; @@ -423,6 +424,7 @@ StringArray RID_SVXSTRARY_PAPERSIZE_DRAW { ItemList [ en-US ] = { + < "A6" ; PAPERSIZE_A6 ; > ; < "A5" ; PAPERSIZE_A5 ; > ; < "A4" ; PAPERSIZE_A4 ; > ; < "A3" ; PAPERSIZE_A3 ; > ; diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 0359ef595a87..408a72d14765 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -65,7 +65,7 @@ // static ---------------------------------------------------------------- -static USHORT pStdRanges[] = +static sal_uInt16 pStdRanges[] = { SID_ATTR_PARA_LINESPACE, // 10033 SID_ATTR_PARA_LINESPACE, @@ -76,14 +76,14 @@ static USHORT pStdRanges[] = 0 }; -static USHORT pAlignRanges[] = +static sal_uInt16 pAlignRanges[] = { SID_ATTR_PARA_ADJUST, // 10027 SID_ATTR_PARA_ADJUST, 0 }; -static USHORT pExtRanges[] = +static sal_uInt16 pExtRanges[] = { SID_ATTR_PARA_PAGEBREAK, // 10037 - SID_ATTR_PARA_WIDOWS, // 10041 @@ -138,21 +138,21 @@ void SetLineSpace_Impl( SvxLineSpacingItem& rLineSpace, case LLINESPACE_PROP: rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO; - rLineSpace.SetPropLineSpace( (BYTE)lValue ); + rLineSpace.SetPropLineSpace( (sal_uInt8)lValue ); break; case LLINESPACE_MIN: - rLineSpace.SetLineHeight( (USHORT)lValue ); + rLineSpace.SetLineHeight( (sal_uInt16)lValue ); rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF; break; case LLINESPACE_DURCH: rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO; - rLineSpace.SetInterLineSpace( (USHORT)lValue ); + rLineSpace.SetInterLineSpace( (sal_uInt16)lValue ); break; case LLINESPACE_FIX: - rLineSpace.SetLineHeight((USHORT)lValue); + rLineSpace.SetLineHeight((sal_uInt16)lValue); rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_FIX; rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF; break; @@ -160,12 +160,12 @@ void SetLineSpace_Impl( SvxLineSpacingItem& rLineSpace, } -USHORT GetHtmlMode_Impl(const SfxItemSet& rSet) +sal_uInt16 GetHtmlMode_Impl(const SfxItemSet& rSet) { - USHORT nHtmlMode = 0; + sal_uInt16 nHtmlMode = 0; const SfxPoolItem* pItem = 0; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) || + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) { @@ -229,16 +229,16 @@ SfxTabPage* SvxStdParagraphTabPage::Create( Window* pParent, // ----------------------------------------------------------------------- -BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) +sal_Bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) { SfxItemState eState = SFX_ITEM_UNKNOWN; const SfxPoolItem* pOld = 0; SfxItemPool* pPool = rOutSet.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); - BOOL bModified = FALSE; - USHORT nWhich; - USHORT nPos = aLineDist.GetSelectEntryPos(); + sal_Bool bModified = sal_False; + sal_uInt16 nWhich; + sal_uInt16 nPos = aLineDist.GetSelectEntryPos(); if ( LISTBOX_ENTRY_NOTFOUND != nPos && ( nPos != aLineDist.GetSavedValue() || @@ -282,7 +282,7 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) SFX_ITEM_DONTCARE == eState ) { rOutSet.Put( aSpacing ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -302,21 +302,21 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( aTopDist.IsRelative() ) aMargin.SetUpper( rOldItem.GetUpper(), - (USHORT)aTopDist.GetValue() ); + (sal_uInt16)aTopDist.GetValue() ); else - aMargin.SetUpper( (USHORT)GetCoreValue( aTopDist, eUnit ) ); + aMargin.SetUpper( (sal_uInt16)GetCoreValue( aTopDist, eUnit ) ); if ( aBottomDist.IsRelative() ) aMargin.SetLower( rOldItem.GetLower(), - (USHORT)aBottomDist.GetValue() ); + (sal_uInt16)aBottomDist.GetValue() ); else - aMargin.SetLower( (USHORT)GetCoreValue( aBottomDist, eUnit ) ); + aMargin.SetLower( (sal_uInt16)GetCoreValue( aBottomDist, eUnit ) ); } else { - aMargin.SetUpper( (USHORT)GetCoreValue( aTopDist, eUnit ) ); - aMargin.SetLower( (USHORT)GetCoreValue( aBottomDist, eUnit ) ); + aMargin.SetUpper( (sal_uInt16)GetCoreValue( aTopDist, eUnit ) ); + aMargin.SetLower( (sal_uInt16)GetCoreValue( aBottomDist, eUnit ) ); } eState = GetItemSet().GetItemState( nWhich ); @@ -324,10 +324,10 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) SFX_ITEM_DONTCARE == eState ) { rOutSet.Put( aMargin ); - bModified |= TRUE; + bModified |= sal_True; } } - FASTBOOL bNullTab = FALSE; + FASTBOOL bNullTab = sal_False; if ( aLeftIndent.IsValueModified() || aFLineIndent.IsValueModified() || @@ -348,40 +348,40 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( aLeftIndent.IsRelative() ) aMargin.SetTxtLeft( rOldItem.GetTxtLeft(), - (USHORT)aLeftIndent.GetValue() ); + (sal_uInt16)aLeftIndent.GetValue() ); else aMargin.SetTxtLeft( GetCoreValue( aLeftIndent, eUnit ) ); if ( aRightIndent.IsRelative() ) aMargin.SetRight( rOldItem.GetRight(), - (USHORT)aRightIndent.GetValue() ); + (sal_uInt16)aRightIndent.GetValue() ); else aMargin.SetRight( GetCoreValue( aRightIndent, eUnit ) ); if ( aFLineIndent.IsRelative() ) aMargin.SetTxtFirstLineOfst( rOldItem.GetTxtFirstLineOfst(), - (USHORT)aFLineIndent.GetValue() ); + (sal_uInt16)aFLineIndent.GetValue() ); else aMargin.SetTxtFirstLineOfst( - (USHORT)GetCoreValue( aFLineIndent, eUnit ) ); + (sal_uInt16)GetCoreValue( aFLineIndent, eUnit ) ); } else { aMargin.SetTxtLeft( GetCoreValue( aLeftIndent, eUnit ) ); aMargin.SetRight( GetCoreValue( aRightIndent, eUnit ) ); aMargin.SetTxtFirstLineOfst( - (USHORT)GetCoreValue( aFLineIndent, eUnit ) ); + (sal_uInt16)GetCoreValue( aFLineIndent, eUnit ) ); } aMargin.SetAutoFirst(aAutoCB.IsChecked()); if ( aMargin.GetTxtFirstLineOfst() < 0 ) - bNullTab = TRUE; + bNullTab = sal_True; eState = GetItemSet().GetItemState( nWhich ); if ( !pOld || !( *(const SvxLRSpaceItem*)pOld == aMargin ) || SFX_ITEM_DONTCARE == eState ) { rOutSet.Put( aMargin ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -392,7 +392,7 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) { // negativer Erstzeileneinzug -> ggf. Null Default-Tabstop setzen - USHORT _nWhich = GetWhich( SID_ATTR_TABSTOP ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_TABSTOP ); const SfxItemSet& rInSet = GetItemSet(); if ( rInSet.GetItemState( _nWhich ) >= SFX_ITEM_AVAILABLE ) @@ -411,16 +411,16 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) const SfxBoolItem* pBoolItem = (SfxBoolItem*)GetOldItem( rOutSet, SID_ATTR_PARA_REGISTER); SfxBoolItem* pRegItem = (SfxBoolItem*)pBoolItem->Clone(); - USHORT _nWhich = GetWhich( SID_ATTR_PARA_REGISTER ); - BOOL bSet = pRegItem->GetValue(); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_REGISTER ); + sal_Bool bSet = pRegItem->GetValue(); if(aRegisterCB.IsChecked() != bSet ) { pRegItem->SetValue(!bSet); rOutSet.Put(*pRegItem); - bModified |= TRUE; + bModified |= sal_True; } - else if ( SFX_ITEM_DEFAULT == GetItemSet().GetItemState( _nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == GetItemSet().GetItemState( _nWhich, sal_False ) ) rOutSet.ClearItem(_nWhich); delete pRegItem; } @@ -445,7 +445,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) SetFieldUnit( aBottomDist, eFUnit ); SetFieldUnit( aLineDistAtMetricBox, eFUnit ); - USHORT _nWhich = GetWhich( SID_ATTR_LRSPACE ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_LRSPACE ); SfxItemState eItemState = rSet.GetItemState( _nWhich ); if ( eItemState >= SFX_ITEM_AVAILABLE ) @@ -459,7 +459,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropLeft() != 100 ) { - aLeftIndent.SetRelative( TRUE ); + aLeftIndent.SetRelative( sal_True ); aLeftIndent.SetValue( rOldItem.GetPropLeft() ); } else @@ -471,7 +471,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropRight() != 100 ) { - aRightIndent.SetRelative( TRUE ); + aRightIndent.SetRelative( sal_True ); aRightIndent.SetValue( rOldItem.GetPropRight() ); } else @@ -483,7 +483,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropTxtFirstLineOfst() != 100 ) { - aFLineIndent.SetRelative( TRUE ); + aFLineIndent.SetRelative( sal_True ); aFLineIndent.SetValue( rOldItem.GetPropTxtFirstLineOfst() ); } else @@ -529,7 +529,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropUpper() != 100 ) { - aTopDist.SetRelative( TRUE ); + aTopDist.SetRelative( sal_True ); aTopDist.SetValue( rOldItem.GetPropUpper() ); } else @@ -541,7 +541,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropLower() != 100 ) { - aBottomDist.SetRelative( TRUE ); + aBottomDist.SetRelative( sal_True ); aBottomDist.SetValue( rOldItem.GetPropLower() ); } else @@ -580,7 +580,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( eItemState >= SFX_ITEM_AVAILABLE ) aRegisterCB.Check( ((const SfxBoolItem &)rSet.Get( _nWhich )).GetValue()); aRegisterCB.SaveValue(); - USHORT nHtmlMode = GetHtmlMode_Impl(rSet); + sal_uInt16 nHtmlMode = GetHtmlMode_Impl(rSet); if(nHtmlMode & HTMLMODE_ON) { aRegisterCB.Hide(); @@ -616,7 +616,7 @@ void SvxStdParagraphTabPage::EnableRelativeMode() aRightIndent.EnableRelativeMode( 0, 999 ); aTopDist.EnableRelativeMode( 0, 999 ); aBottomDist.EnableRelativeMode( 0, 999 ); - bRelativeMode = TRUE; + bRelativeMode = sal_True; } // ----------------------------------------------------------------------- @@ -665,8 +665,8 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage( Window* pParent, nWidth ( 11905 /*567 * 50*/ ), nMinFixDist(0L), - bRelativeMode ( FALSE ), - bNegativeIndents(FALSE) + bRelativeMode ( sal_False ), + bNegativeIndents(sal_False) { // diese Page braucht ExchangeSupport @@ -687,12 +687,12 @@ void SvxStdParagraphTabPage::EnableNegativeMode() aRightIndent.SetMin(-9999); aRightIndent.EnableNegativeMode(); aLeftIndent.EnableNegativeMode(); - bNegativeIndents = TRUE; + bNegativeIndents = sal_True; } // ----------------------------------------------------------------------- -USHORT* SvxStdParagraphTabPage::GetRanges() +sal_uInt16* SvxStdParagraphTabPage::GetRanges() { return pStdRanges; } @@ -777,8 +777,8 @@ IMPL_LINK( SvxStdParagraphTabPage, LineDistHdl_Impl, ListBox *, pBox ) case LLINESPACE_1: case LLINESPACE_15: case LLINESPACE_2: - aLineDistAtLabel.Enable(FALSE); - pActLineDistFld->Enable(FALSE); + aLineDistAtLabel.Enable(sal_False); + pActLineDistFld->Enable(sal_False); pActLineDistFld->SetText( String() ); break; @@ -844,7 +844,7 @@ IMPL_LINK( SvxStdParagraphTabPage, LineDistHdl_Impl, ListBox *, pBox ) } break; } - UpdateExample_Impl( TRUE ); + UpdateExample_Impl( sal_True ); return 0; } @@ -890,7 +890,7 @@ void SvxStdParagraphTabPage::Init_Impl() // ----------------------------------------------------------------------- -void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll ) +void SvxStdParagraphTabPage::UpdateExample_Impl( sal_Bool bAll ) { aExampleWin.SetFirstLineOfst( (short)aFLineIndent.Denormalize( aFLineIndent.GetValue( FUNIT_TWIP ) ) ); @@ -899,13 +899,13 @@ void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll ) aExampleWin.SetRightMargin( static_cast<long>(aRightIndent.Denormalize( aRightIndent.GetValue( FUNIT_TWIP ) ) ) ); aExampleWin.SetUpper( - (USHORT)aTopDist.Denormalize( aTopDist.GetValue( FUNIT_TWIP ) ) ); + (sal_uInt16)aTopDist.Denormalize( aTopDist.GetValue( FUNIT_TWIP ) ) ); aExampleWin.SetLower( - (USHORT)aBottomDist.Denormalize( aBottomDist.GetValue( FUNIT_TWIP ) ) ); + (sal_uInt16)aBottomDist.Denormalize( aBottomDist.GetValue( FUNIT_TWIP ) ) ); - USHORT nPos = aLineDist.GetSelectEntryPos(); + sal_uInt16 nPos = aLineDist.GetSelectEntryPos(); switch ( nPos ) { @@ -917,7 +917,7 @@ void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll ) case LLINESPACE_PROP: aExampleWin.SetLineSpace( (SvxPrevLineSpace)nPos, - (USHORT)aLineDistAtPercentBox.Denormalize( + (sal_uInt16)aLineDistAtPercentBox.Denormalize( aLineDistAtPercentBox.GetValue() ) ); break; @@ -925,7 +925,7 @@ void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll ) case LLINESPACE_DURCH: case LLINESPACE_FIX: aExampleWin.SetLineSpace( (SvxPrevLineSpace)nPos, - (USHORT)GetCoreValue( aLineDistAtMetricBox, SFX_MAPUNIT_TWIP ) ); + (sal_uInt16)GetCoreValue( aLineDistAtMetricBox, SFX_MAPUNIT_TWIP ) ); break; } aExampleWin.Draw( bAll ); @@ -944,7 +944,7 @@ void SvxStdParagraphTabPage::EnableRegisterMode() --------------------------------------------------*/ IMPL_LINK( SvxStdParagraphTabPage, AutoHdl_Impl, CheckBox*, pBox ) { - BOOL bEnable = !pBox->IsChecked(); + sal_Bool bEnable = !pBox->IsChecked(); aFLineLabel .Enable(bEnable); aFLineIndent.Enable(bEnable); return 0; @@ -953,7 +953,7 @@ IMPL_LINK( SvxStdParagraphTabPage, AutoHdl_Impl, CheckBox*, pBox ) /*-----------------16.01.97 18.00------------------- --------------------------------------------------*/ -void SvxStdParagraphTabPage::SetPageWidth( USHORT nPageWidth ) +void SvxStdParagraphTabPage::SetPageWidth( sal_uInt16 nPageWidth ) { nWidth = nPageWidth; } @@ -1049,7 +1049,7 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( Window* pParent, const SfxItemSet& rSe aTextDirectionLB ( this, CUI_RES( LB_TEXTDIRECTION )) { SvtLanguageOptions aLangOptions; - USHORT nLastLinePos = LASTLINEPOS_DEFAULT; + sal_uInt16 nLastLinePos = LASTLINEPOS_DEFAULT; if ( aLangOptions.IsAsianTypographyEnabled() ) { @@ -1079,7 +1079,7 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( Window* pParent, const SfxItemSet& rSe aLastLineLB.SetSelectHdl( LINK( this, SvxParaAlignTabPage, LastLineHdl_Impl ) ); aTextDirectionLB.SetSelectHdl( LINK( this, SvxParaAlignTabPage, TextDirectionHdl_Impl ) ); - USHORT nHtmlMode = GetHtmlMode_Impl(rSet); + sal_uInt16 nHtmlMode = GetHtmlMode_Impl(rSet); if(!(nHtmlMode & HTMLMODE_ON) || (0 != (nHtmlMode & HTMLMODE_SOME_STYLES)) ) { if( aLangOptions.IsCTLFontEnabled() ) @@ -1123,7 +1123,7 @@ SfxTabPage* SvxParaAlignTabPage::Create( Window* pParent, const SfxItemSet& rSet /*-----------------16.01.97 19.33------------------- --------------------------------------------------*/ -USHORT* SvxParaAlignTabPage::GetRanges() +sal_uInt16* SvxParaAlignTabPage::GetRanges() { return pAlignRanges; @@ -1132,30 +1132,30 @@ USHORT* SvxParaAlignTabPage::GetRanges() /*-----------------16.01.97 19.33------------------- --------------------------------------------------*/ -BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) +sal_Bool SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; - FASTBOOL bAdj = FALSE, bChecked = FALSE; + FASTBOOL bAdj = sal_False, bChecked = sal_False; SvxAdjust eAdjust = SVX_ADJUST_LEFT; if ( aLeft.IsChecked() ) { eAdjust = SVX_ADJUST_LEFT; bAdj = !aLeft.GetSavedValue(); - bChecked = TRUE; + bChecked = sal_True; } else if ( aRight.IsChecked() ) { eAdjust = SVX_ADJUST_RIGHT; bAdj = !aRight.GetSavedValue(); - bChecked = TRUE; + bChecked = sal_True; } else if ( aCenter.IsChecked() ) { eAdjust = SVX_ADJUST_CENTER; bAdj = !aCenter.GetSavedValue(); - bChecked = TRUE; + bChecked = sal_True; } else if ( aJustify.IsChecked() ) { @@ -1163,9 +1163,9 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) bAdj = !aJustify.GetSavedValue() || aExpandCB.IsChecked() != aExpandCB.GetSavedValue() || aLastLineLB.GetSelectEntryPos() != aLastLineLB.GetSavedValue(); - bChecked = TRUE; + bChecked = sal_True; } - USHORT _nWhich = GetWhich( SID_ATTR_PARA_ADJUST ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_ADJUST ); if ( bAdj ) { @@ -1173,7 +1173,7 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) (const SvxAdjustItem*)GetOldItem( rOutSet, SID_ATTR_PARA_ADJUST ); SvxAdjust eOneWord = aExpandCB.IsChecked() ? SVX_ADJUST_BLOCK : SVX_ADJUST_LEFT; - USHORT nLBPos = aLastLineLB.GetSelectEntryPos(); + sal_uInt16 nLBPos = aLastLineLB.GetSelectEntryPos(); SvxAdjust eLastBlock = SVX_ADJUST_LEFT; if ( 1 == nLBPos ) @@ -1190,7 +1190,7 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) pOld->GetLastBlock() != eLastBlock || ( bChecked && bNothingWasChecked ) ) { - bModified |= TRUE; + bModified |= sal_True; SvxAdjustItem aAdj( (const SvxAdjustItem&)GetItemSet().Get( _nWhich ) ); aAdj.SetAdjust( eAdjust ); @@ -1202,12 +1202,12 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) if(aSnapToGridCB.IsChecked() != aSnapToGridCB.GetSavedValue()) { rOutSet.Put(SvxParaGridItem(aSnapToGridCB.IsChecked(), GetWhich( SID_ATTR_PARA_SNAPTOGRID ))); - bModified = TRUE; + bModified = sal_True; } if(aVertAlignLB.GetSavedValue() != aVertAlignLB.GetSelectEntryPos()) { rOutSet.Put(SvxParaVertAlignItem(aVertAlignLB.GetSelectEntryPos(), GetWhich( SID_PARA_VERTALIGN ))); - bModified = TRUE; + bModified = sal_True; } if( aTextDirectionLB.IsVisible() ) @@ -1216,7 +1216,7 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) if( eDir != aTextDirectionLB.GetSavedValue() ) { rOutSet.Put( SvxFrameDirectionItem( eDir, GetWhich( SID_ATTR_FRAMEDIRECTION ) ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -1228,10 +1228,10 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) --------------------------------------------------*/ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) { - USHORT _nWhich = GetWhich( SID_ATTR_PARA_ADJUST ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_ADJUST ); SfxItemState eItemState = rSet.GetItemState( _nWhich ); - USHORT nLBSelect = 0; + sal_uInt16 nLBSelect = 0; if ( eItemState >= SFX_ITEM_AVAILABLE ) { const SvxAdjustItem& rAdj = (const SvxAdjustItem&)rSet.Get( _nWhich ); @@ -1247,7 +1247,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) case SVX_ADJUST_BLOCK: aJustify.Check(); break; default: ; //prevent warning } - BOOL bEnable = aJustify.IsChecked(); + sal_Bool bEnable = aJustify.IsChecked(); aLastLineFT.Enable(bEnable); aLastLineLB.Enable(bEnable); aExpandCB .Enable(bEnable); @@ -1265,14 +1265,14 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) } else { - aLeft.Check( FALSE ); - aRight.Check( FALSE ); - aCenter.Check( FALSE ); - aJustify.Check( FALSE ); + aLeft.Check( sal_False ); + aRight.Check( sal_False ); + aCenter.Check( sal_False ); + aJustify.Check( sal_False ); } aLastLineLB.SelectEntryPos(nLBSelect); - USHORT nHtmlMode = GetHtmlMode_Impl(rSet); + sal_uInt16 nHtmlMode = GetHtmlMode_Impl(rSet); if(nHtmlMode & HTMLMODE_ON) { aLastLineLB.Hide(); @@ -1280,7 +1280,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) aExpandCB.Hide(); if(!(nHtmlMode & (HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE)) ) aJustify.Disable(); - aSnapToGridCB.Show(FALSE); + aSnapToGridCB.Show(sal_False); } _nWhich = GetWhich(SID_ATTR_PARA_SNAPTOGRID); eItemState = rSet.GetItemState( _nWhich ); @@ -1321,7 +1321,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) aLastLineLB.SaveValue(); aExpandCB.SaveValue(); - UpdateExample_Impl(TRUE); + UpdateExample_Impl(sal_True); } /*-----------------17.01.97 08.06------------------- @@ -1329,17 +1329,17 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) --------------------------------------------------*/ IMPL_LINK( SvxParaAlignTabPage, AlignHdl_Impl, RadioButton*, EMPTYARG ) { - BOOL bJustify = aJustify.IsChecked(); + sal_Bool bJustify = aJustify.IsChecked(); aLastLineFT.Enable(bJustify); aLastLineLB.Enable(bJustify); aExpandCB.Enable(bJustify); - UpdateExample_Impl(FALSE); + UpdateExample_Impl(sal_False); return 0; } IMPL_LINK( SvxParaAlignTabPage, LastLineHdl_Impl, ListBox*, EMPTYARG ) { - UpdateExample_Impl(FALSE); + UpdateExample_Impl(sal_False); return 0; } @@ -1349,8 +1349,8 @@ IMPL_LINK( SvxParaAlignTabPage, TextDirectionHdl_Impl, ListBox*, EMPTYARG ) switch ( eDir ) { // check the default alignment for this text direction - case FRMDIR_HORI_LEFT_TOP : aLeft.Check( TRUE ); break; - case FRMDIR_HORI_RIGHT_TOP : aRight.Check( TRUE ); break; + case FRMDIR_HORI_LEFT_TOP : aLeft.Check( sal_True ); break; + case FRMDIR_HORI_RIGHT_TOP : aRight.Check( sal_True ); break; case FRMDIR_ENVIRONMENT : /* do nothing */ break; default: { @@ -1364,7 +1364,7 @@ IMPL_LINK( SvxParaAlignTabPage, TextDirectionHdl_Impl, ListBox*, EMPTYARG ) /*-----------------16.01.97 19.34------------------- --------------------------------------------------*/ -void SvxParaAlignTabPage::UpdateExample_Impl( BOOL bAll ) +void SvxParaAlignTabPage::UpdateExample_Impl( sal_Bool bAll ) { if ( aLeft.IsChecked() ) aExampleWin.SetAdjust( SVX_ADJUST_LEFT ); @@ -1376,7 +1376,7 @@ void SvxParaAlignTabPage::UpdateExample_Impl( BOOL bAll ) { aExampleWin.SetAdjust( SVX_ADJUST_BLOCK ); SvxAdjust eLastBlock = SVX_ADJUST_LEFT; - USHORT nLBPos = aLastLineLB.GetSelectEntryPos(); + sal_uInt16 nLBPos = aLastLineLB.GetSelectEntryPos(); if(nLBPos == 1) eLastBlock = SVX_ADJUST_CENTER; else if(nLBPos == 2) @@ -1418,10 +1418,10 @@ SfxTabPage* SvxExtParagraphTabPage::Create( Window* pParent, // ----------------------------------------------------------------------- -BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) +sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) { - BOOL bModified = FALSE; - USHORT _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); + sal_Bool bModified = sal_False; + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); const TriState eHyphenState = aHyphenBox.GetState(); const SfxPoolItem* pOld = GetOldItem( rOutSet, SID_ATTR_PARA_HYPHENZONE ); @@ -1436,38 +1436,38 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( eHyphenState == STATE_CHECK ) { - aHyphen.GetMinLead() = (BYTE)aExtHyphenBeforeBox.GetValue(); - aHyphen.GetMinTrail() = (BYTE)aExtHyphenAfterBox.GetValue(); + aHyphen.GetMinLead() = (sal_uInt8)aExtHyphenBeforeBox.GetValue(); + aHyphen.GetMinTrail() = (sal_uInt8)aExtHyphenAfterBox.GetValue(); } - aHyphen.GetMaxHyphens() = (BYTE)aMaxHyphenEdit.GetValue(); + aHyphen.GetMaxHyphens() = (sal_uInt8)aMaxHyphenEdit.GetValue(); if ( !pOld || !( *(SvxHyphenZoneItem*)pOld == aHyphen ) || eHyphenState != aHyphenBox.GetSavedValue()) { rOutSet.Put( aHyphen ); - bModified |= TRUE; + bModified |= sal_True; } } if (aPagenumEdit.IsEnabled() && aPagenumEdit.IsValueModified()) { SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM, - (USHORT)aPagenumEdit.GetValue() ); + (sal_uInt16)aPagenumEdit.GetValue() ); pOld = GetOldItem( rOutSet, SID_ATTR_PARA_PAGENUM ); if ( !pOld || ( (const SfxUInt16Item*)pOld )->GetValue() != aPageNum.GetValue() ) { rOutSet.Put( aPageNum ); - bModified |= TRUE; + bModified |= sal_True; } } // Seitenumbruch TriState eState = aApplyCollBtn.GetState(); - FASTBOOL bIsPageModel = FALSE; + FASTBOOL bIsPageModel = sal_False; _nWhich = GetWhich( SID_ATTR_PARA_MODEL ); String sPage; @@ -1484,16 +1484,16 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( !pOld || ( (const SvxPageModelItem*)pOld )->GetValue() != sPage ) { - rOutSet.Put( SvxPageModelItem( sPage, FALSE, _nWhich ) ); - bModified |= TRUE; + rOutSet.Put( SvxPageModelItem( sPage, sal_False, _nWhich ) ); + bModified |= sal_True; } else - bIsPageModel = FALSE; + bIsPageModel = sal_False; } else if(STATE_CHECK == eState && aApplyCollBtn.IsEnabled()) - bIsPageModel = TRUE; + bIsPageModel = sal_True; else - rOutSet.Put( SvxPageModelItem( sPage, FALSE, _nWhich ) ); + rOutSet.Put( SvxPageModelItem( sPage, sal_False, _nWhich ) ); _nWhich = GetWhich( SID_ATTR_PARA_PAGEBREAK ); @@ -1503,7 +1503,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) else { eState = aPageBreakBox.GetState(); - SfxItemState eModelState = GetItemSet().GetItemState(SID_ATTR_PARA_MODEL, FALSE); + SfxItemState eModelState = GetItemSet().GetItemState(SID_ATTR_PARA_MODEL, sal_False); if ( (eModelState == SFX_ITEM_SET && STATE_CHECK == aPageBreakBox.GetState()) || eState != aPageBreakBox.GetSavedValue() || @@ -1518,7 +1518,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) { case STATE_CHECK: { - BOOL bBefore = aBreakPositionLB.GetSelectEntryPos() == 0; + sal_Bool bBefore = aBreakPositionLB.GetSelectEntryPos() == 0; if ( aBreakTypeLB.GetSelectEntryPos() == 0 ) { @@ -1547,7 +1547,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( eState != aPageBreakBox.GetSavedValue() || !pOld || !( *(const SvxFmtBreakItem*)pOld == aBreak ) ) { - bModified |= TRUE; + bModified |= sal_True; rOutSet.Put( aBreak ); } } @@ -1566,7 +1566,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) ( eState == STATE_NOCHECK ) ) { rOutSet.Put( SvxFmtSplitItem( eState == STATE_NOCHECK, _nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -1580,7 +1580,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) // hat sich der Status geaendert, muss immer geputtet werden rOutSet.Put( SvxFmtKeepItem( eState == STATE_CHECK, _nWhich ) ); - bModified |= TRUE; + bModified |= sal_True; } // Witwen und Waisen @@ -1591,13 +1591,13 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) aWidowRowNo.IsValueModified() ) { SvxWidowsItem rItem( eState == STATE_CHECK ? - (BYTE)aWidowRowNo.GetValue() : 0, _nWhich ); + (sal_uInt8)aWidowRowNo.GetValue() : 0, _nWhich ); pOld = GetOldItem( rOutSet, SID_ATTR_PARA_WIDOWS ); if ( eState != aWidowBox.GetSavedValue() || !pOld || !( *(const SvxWidowsItem*)pOld == rItem ) ) { rOutSet.Put( rItem ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -1608,7 +1608,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) aOrphanRowNo.IsValueModified() ) { SvxOrphansItem rItem( eState == STATE_CHECK ? - (BYTE)aOrphanRowNo.GetValue() : 0, _nWhich ); + (sal_uInt8)aOrphanRowNo.GetValue() : 0, _nWhich ); pOld = GetOldItem( rOutSet, SID_ATTR_PARA_ORPHANS ); if ( eState != aOrphanBox.GetSavedValue() || @@ -1616,7 +1616,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) !( *(const SvxOrphansItem*)pOld == rItem ) ) { rOutSet.Put( rItem ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -1627,16 +1627,16 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { - USHORT _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); SfxItemState eItemState = rSet.GetItemState( _nWhich ); - BOOL bItemAvailable = eItemState >= SFX_ITEM_AVAILABLE; - BOOL bIsHyphen = FALSE; + sal_Bool bItemAvailable = eItemState >= SFX_ITEM_AVAILABLE; + sal_Bool bIsHyphen = sal_False; if( !bHtmlMode && bItemAvailable ) { const SvxHyphenZoneItem& rHyphen = (const SvxHyphenZoneItem&)rSet.Get( _nWhich ); - aHyphenBox.EnableTriState( FALSE ); + aHyphenBox.EnableTriState( sal_False ); bIsHyphen = rHyphen.IsHyphen(); aHyphenBox.SetState( bIsHyphen ? STATE_CHECK : STATE_NOCHECK ); @@ -1649,7 +1649,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { aHyphenBox.SetState( STATE_DONTKNOW ); } - BOOL bEnable = bItemAvailable && bIsHyphen; + sal_Bool bEnable = bItemAvailable && bIsHyphen; aExtHyphenBeforeBox.Enable(bEnable); aExtHyphenAfterBox.Enable(bEnable); aBeforeText.Enable(bEnable); @@ -1661,7 +1661,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rSet.GetItemState(_nWhich) >= SFX_ITEM_AVAILABLE ) { - const USHORT nPageNum = + const sal_uInt16 nPageNum = ( (const SfxUInt16Item&)rSet.Get( _nWhich ) ).GetValue(); aPagenumEdit.SetValue( nPageNum ); } @@ -1670,12 +1670,12 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { // zuerst PageModel behandeln _nWhich = GetWhich( SID_ATTR_PARA_MODEL ); - BOOL bIsPageModel = FALSE; + sal_Bool bIsPageModel = sal_False; eItemState = rSet.GetItemState( _nWhich ); if ( eItemState >= SFX_ITEM_SET ) { - aApplyCollBtn.EnableTriState( FALSE ); + aApplyCollBtn.EnableTriState( sal_False ); const SvxPageModelItem& rModel = (const SvxPageModelItem&)rSet.Get( _nWhich ); @@ -1686,10 +1686,10 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { aApplyCollBox.SelectEntry( aStr ); aApplyCollBtn.SetState( STATE_CHECK ); - bIsPageModel = TRUE; + bIsPageModel = sal_True; aPageBreakBox.Enable(); - aPageBreakBox.EnableTriState( FALSE ); + aPageBreakBox.EnableTriState( sal_False ); aBreakTypeFT.Enable(); aBreakTypeLB.Enable(); aBreakPositionFT.Enable(); @@ -1710,16 +1710,16 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) } else if ( SFX_ITEM_DONTCARE == eItemState ) { - aApplyCollBtn.EnableTriState( TRUE ); + aApplyCollBtn.EnableTriState( sal_True ); aApplyCollBtn.SetState( STATE_DONTKNOW ); aApplyCollBox.SetNoSelection(); } else { - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumEdit.Enable(FALSE); - aPagenumText.Enable(FALSE); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumEdit.Enable(sal_False); + aPagenumText.Enable(sal_False); } //!!! ApplyCollClickHdl_Impl( &aApplyCollBtn ); @@ -1738,7 +1738,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) // PageBreak nicht ueber CTRL-RETURN, // dann kann CheckBox frei gegeben werden aPageBreakBox.Enable(); - aPageBreakBox.EnableTriState( FALSE ); + aPageBreakBox.EnableTriState( sal_False ); aBreakTypeFT.Enable(); aBreakTypeLB.Enable(); aBreakPositionFT.Enable(); @@ -1746,7 +1746,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) aPageBreakBox.SetState( STATE_CHECK ); - BOOL _bEnable = eBreak != SVX_BREAK_NONE && + sal_Bool _bEnable = eBreak != SVX_BREAK_NONE && eBreak != SVX_BREAK_COLUMN_BEFORE && eBreak != SVX_BREAK_COLUMN_AFTER; aApplyCollBtn.Enable(_bEnable); @@ -1759,8 +1759,8 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( eBreak == SVX_BREAK_NONE ) aPageBreakBox.SetState( STATE_NOCHECK ); - USHORT nType = 0; // selection position in break type ListBox : Page - USHORT nPosition = 0; // selection position in break position ListBox : Before + sal_uInt16 nType = 0; // selection position in break type ListBox : Page + sal_uInt16 nPosition = 0; // selection position in break position ListBox : Before switch ( eBreak ) { case SVX_BREAK_PAGE_BEFORE: @@ -1784,11 +1784,11 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) aPageBreakBox.SetState( STATE_DONTKNOW ); else { - aPageBreakBox.Enable(FALSE); - aBreakTypeFT.Enable(FALSE); - aBreakTypeLB.Enable(FALSE); - aBreakPositionFT.Enable(FALSE); - aBreakPositionLB.Enable(FALSE); + aPageBreakBox.Enable(sal_False); + aBreakTypeFT.Enable(sal_False); + aBreakTypeLB.Enable(sal_False); + aBreakPositionFT.Enable(sal_False); + aBreakPositionLB.Enable(sal_False); } } @@ -1801,7 +1801,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( eItemState >= SFX_ITEM_AVAILABLE ) { - aKeepParaBox.EnableTriState( FALSE ); + aKeepParaBox.EnableTriState( sal_False ); const SvxFmtKeepItem& rKeep = (const SvxFmtKeepItem&)rSet.Get( _nWhich ); @@ -1813,7 +1813,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) else if ( SFX_ITEM_DONTCARE == eItemState ) aKeepParaBox.SetState( STATE_DONTKNOW ); else - aKeepParaBox.Enable(FALSE); + aKeepParaBox.Enable(sal_False); _nWhich = GetWhich( SID_ATTR_PARA_SPLIT ); eItemState = rSet.GetItemState( _nWhich ); @@ -1822,7 +1822,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { const SvxFmtSplitItem& rSplit = (const SvxFmtSplitItem&)rSet.Get( _nWhich ); - aKeepTogetherBox.EnableTriState( FALSE ); + aKeepTogetherBox.EnableTriState( sal_False ); if ( !rSplit.GetValue() ) aKeepTogetherBox.SetState( STATE_CHECK ); @@ -1839,10 +1839,10 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { const SvxWidowsItem& rWidow = (const SvxWidowsItem&)rSet.Get( _nWhich ); - aWidowBox.EnableTriState( FALSE ); - const USHORT nLines = rWidow.GetValue(); + aWidowBox.EnableTriState( sal_False ); + const sal_uInt16 nLines = rWidow.GetValue(); - BOOL _bEnable = nLines > 0; + sal_Bool _bEnable = nLines > 0; aWidowRowNo.SetValue( aWidowRowNo.Normalize( nLines ) ); aWidowBox.SetState( _bEnable ? STATE_CHECK : STATE_NOCHECK); aWidowRowNo.Enable(_bEnable); @@ -1852,7 +1852,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) else if ( SFX_ITEM_DONTCARE == eTmpState ) aWidowBox.SetState( STATE_DONTKNOW ); else - aWidowBox.Enable(FALSE); + aWidowBox.Enable(sal_False); aOrphanBox.Enable(); _nWhich = GetWhich( SID_ATTR_PARA_ORPHANS ); @@ -1862,10 +1862,10 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { const SvxOrphansItem& rOrphan = (const SvxOrphansItem&)rSet.Get( _nWhich ); - const USHORT nLines = rOrphan.GetValue(); - aOrphanBox.EnableTriState( FALSE ); + const sal_uInt16 nLines = rOrphan.GetValue(); + aOrphanBox.EnableTriState( sal_False ); - BOOL _bEnable = nLines > 0; + sal_Bool _bEnable = nLines > 0; aOrphanBox.SetState( _bEnable ? STATE_CHECK : STATE_NOCHECK); aOrphanRowNo.SetValue( aOrphanRowNo.Normalize( nLines ) ); aOrphanRowNo.Enable(_bEnable); @@ -1875,13 +1875,13 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) else if ( SFX_ITEM_DONTCARE == eTmpState ) aOrphanBox.SetState( STATE_DONTKNOW ); else - aOrphanBox.Enable(FALSE); + aOrphanBox.Enable(sal_False); } } else if ( SFX_ITEM_DONTCARE == eItemState ) aKeepTogetherBox.SetState( STATE_DONTKNOW ); else - aKeepTogetherBox.Enable(FALSE); + aKeepTogetherBox.Enable(sal_False); // damit alles richt enabled wird KeepTogetherHdl_Impl( 0 ); @@ -1917,14 +1917,14 @@ int SvxExtParagraphTabPage::DeactivatePage( SfxItemSet* _pSet ) void SvxExtParagraphTabPage::DisablePageBreak() { - bPageBreak = FALSE; - aPageBreakBox.Enable(FALSE); + bPageBreak = sal_False; + aPageBreakBox.Enable(sal_False); aBreakTypeLB.RemoveEntry(0); - aBreakPositionFT.Enable(FALSE); - aBreakPositionLB.Enable(FALSE); - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumEdit.Enable(FALSE); + aBreakPositionFT.Enable(sal_False); + aBreakPositionLB.Enable(sal_False); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumEdit.Enable(sal_False); } // ----------------------------------------------------------------------- @@ -1964,8 +1964,8 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe aWidowBox ( this, CUI_RES( BTN_WIDOWS ) ), aWidowRowNo ( this, CUI_RES( ED_WIDOWS ) ), aWidowRowLabel ( this, CUI_RES( FT_WIDOWS ) ), - bPageBreak ( TRUE ), - bHtmlMode ( FALSE ), + bPageBreak ( sal_True ), + bHtmlMode ( sal_False ), nStdPos ( 0 ) { FreeResource(); @@ -2001,20 +2001,20 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe nStdPos = aApplyCollBox.GetEntryPos( aStdName ); } - USHORT nHtmlMode = GetHtmlMode_Impl( rAttr ); + sal_uInt16 nHtmlMode = GetHtmlMode_Impl( rAttr ); if ( nHtmlMode & HTMLMODE_ON ) { - bHtmlMode = TRUE; - aHyphenBox .Enable(FALSE); - aBeforeText .Enable(FALSE); - aExtHyphenBeforeBox .Enable(FALSE); - aAfterText .Enable(FALSE); - aExtHyphenAfterBox .Enable(FALSE); - aMaxHyphenLabel .Enable(FALSE); - aMaxHyphenEdit .Enable(FALSE); - aExtFL .Enable(FALSE); - aPagenumText .Enable(FALSE); - aPagenumEdit .Enable(FALSE); + bHtmlMode = sal_True; + aHyphenBox .Enable(sal_False); + aBeforeText .Enable(sal_False); + aExtHyphenBeforeBox .Enable(sal_False); + aAfterText .Enable(sal_False); + aExtHyphenAfterBox .Enable(sal_False); + aMaxHyphenLabel .Enable(sal_False); + aMaxHyphenEdit .Enable(sal_False); + aExtFL .Enable(sal_False); + aPagenumText .Enable(sal_False); + aPagenumEdit .Enable(sal_False); // no column break in HTML aBreakTypeLB.RemoveEntry(1); } @@ -2028,7 +2028,7 @@ __EXPORT SvxExtParagraphTabPage::~SvxExtParagraphTabPage() // ----------------------------------------------------------------------- -USHORT* SvxExtParagraphTabPage::GetRanges() +sal_uInt16* SvxExtParagraphTabPage::GetRanges() { return pExtRanges; } @@ -2050,7 +2050,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakHdl_Impl, TriStateBox *, EMPTYARG ) { aApplyCollBtn.Enable(); - BOOL bEnable = STATE_CHECK == aApplyCollBtn.GetState() && + sal_Bool bEnable = STATE_CHECK == aApplyCollBtn.GetState() && aApplyCollBox.GetEntryCount(); aApplyCollBox.Enable(bEnable); if(!bHtmlMode) @@ -2064,14 +2064,14 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakHdl_Impl, TriStateBox *, EMPTYARG ) case STATE_NOCHECK: case STATE_DONTKNOW: aApplyCollBtn.SetState( STATE_NOCHECK ); - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumText.Enable(FALSE); - aPagenumEdit.Enable(FALSE); - aBreakTypeFT.Enable(FALSE); - aBreakTypeLB.Enable(FALSE); - aBreakPositionFT.Enable(FALSE); - aBreakPositionLB.Enable(FALSE); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumText.Enable(sal_False); + aPagenumEdit.Enable(sal_False); + aBreakTypeFT.Enable(sal_False); + aBreakTypeLB.Enable(sal_False); + aBreakPositionFT.Enable(sal_False); + aBreakPositionLB.Enable(sal_False); break; } return 0; @@ -2081,7 +2081,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakHdl_Impl, TriStateBox *, EMPTYARG ) IMPL_LINK( SvxExtParagraphTabPage, KeepTogetherHdl_Impl, TriStateBox *, EMPTYARG ) { - BOOL bEnable = aKeepTogetherBox.GetState() == STATE_NOCHECK; + sal_Bool bEnable = aKeepTogetherBox.GetState() == STATE_NOCHECK; aWidowBox.Enable(bEnable); aOrphanBox.Enable(bEnable); @@ -2097,7 +2097,7 @@ IMPL_LINK( SvxExtParagraphTabPage, WidowHdl_Impl, TriStateBox *, EMPTYARG ) case STATE_CHECK: aWidowRowNo.Enable(); aWidowRowLabel.Enable(); - aKeepTogetherBox.Enable(FALSE); + aKeepTogetherBox.Enable(sal_False); break; case STATE_NOCHECK: @@ -2106,8 +2106,8 @@ IMPL_LINK( SvxExtParagraphTabPage, WidowHdl_Impl, TriStateBox *, EMPTYARG ) // kein break case STATE_DONTKNOW: - aWidowRowNo.Enable(FALSE); - aWidowRowLabel.Enable(FALSE); + aWidowRowNo.Enable(sal_False); + aWidowRowLabel.Enable(sal_False); break; } return 0; @@ -2122,7 +2122,7 @@ IMPL_LINK( SvxExtParagraphTabPage, OrphanHdl_Impl, TriStateBox *, EMPTYARG ) case STATE_CHECK: aOrphanRowNo.Enable(); aOrphanRowLabel.Enable(); - aKeepTogetherBox.Enable(FALSE); + aKeepTogetherBox.Enable(sal_False); break; case STATE_NOCHECK: @@ -2131,8 +2131,8 @@ IMPL_LINK( SvxExtParagraphTabPage, OrphanHdl_Impl, TriStateBox *, EMPTYARG ) // kein break case STATE_DONTKNOW: - aOrphanRowNo.Enable(FALSE); - aOrphanRowLabel.Enable(FALSE); + aOrphanRowNo.Enable(sal_False); + aOrphanRowLabel.Enable(sal_False); break; } return 0; @@ -2143,7 +2143,7 @@ IMPL_LINK( SvxExtParagraphTabPage, OrphanHdl_Impl, TriStateBox *, EMPTYARG ) IMPL_LINK( SvxExtParagraphTabPage, HyphenClickHdl_Impl, TriStateBox *, EMPTYARG ) { - BOOL bEnable = aHyphenBox.GetState() == STATE_CHECK; + sal_Bool bEnable = aHyphenBox.GetState() == STATE_CHECK; aBeforeText.Enable(bEnable); aExtHyphenBeforeBox.Enable(bEnable); aAfterText.Enable(bEnable); @@ -2159,11 +2159,11 @@ IMPL_LINK( SvxExtParagraphTabPage, HyphenClickHdl_Impl, TriStateBox *, EMPTYARG IMPL_LINK( SvxExtParagraphTabPage, ApplyCollClickHdl_Impl, TriStateBox *, EMPTYARG ) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if ( aApplyCollBtn.GetState() == STATE_CHECK && aApplyCollBox.GetEntryCount() ) { - bEnable = TRUE; + bEnable = sal_True; aApplyCollBox.SelectEntryPos( nStdPos ); } else @@ -2187,7 +2187,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, ListBox *, pListBox ) { aApplyCollBtn.Enable(); - BOOL bEnable = aApplyCollBtn.GetState() == STATE_CHECK && + sal_Bool bEnable = aApplyCollBtn.GetState() == STATE_CHECK && aApplyCollBox.GetEntryCount(); aApplyCollBox.Enable(bEnable); @@ -2200,10 +2200,10 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, ListBox *, pListBox ) else if ( 1 == pListBox->GetSelectEntryPos() ) { aApplyCollBtn.SetState( STATE_NOCHECK ); - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumText.Enable(FALSE); - aPagenumEdit.Enable(FALSE); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumText.Enable(sal_False); + aPagenumEdit.Enable(sal_False); } return 0; } @@ -2213,14 +2213,14 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, ListBox *, pListBox ) IMPL_LINK( SvxExtParagraphTabPage, PageBreakTypeHdl_Impl, ListBox *, pListBox ) { //column break or break break after - USHORT nBreakPos = aBreakPositionLB.GetSelectEntryPos(); + sal_uInt16 nBreakPos = aBreakPositionLB.GetSelectEntryPos(); if ( pListBox->GetSelectEntryPos() == 1 || 1 == nBreakPos) { aApplyCollBtn.SetState( STATE_NOCHECK ); - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumText.Enable(FALSE); - aPagenumEdit.Enable(FALSE); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumText.Enable(sal_False); + aPagenumEdit.Enable(sal_False); } else PageBreakPosHdl_Impl( &aBreakPositionLB ); @@ -2275,9 +2275,9 @@ SfxTabPage* SvxAsianTabPage::Create( Window* pParent, const SfxItemSet& rSet /*-- 29.11.00 11:36:24--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT* SvxAsianTabPage::GetRanges() +sal_uInt16* SvxAsianTabPage::GetRanges() { - static USHORT pRanges[] = + static sal_uInt16 pRanges[] = { SID_ATTR_PARA_SCRIPTSPACE, SID_ATTR_PARA_FORBIDDEN_RULES, 0 @@ -2287,9 +2287,9 @@ USHORT* SvxAsianTabPage::GetRanges() /*-- 29.11.00 11:36:24--------------------------------------------------- -----------------------------------------------------------------------*/ -BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SfxItemPool* pPool = rSet.GetPool(); if(aScriptSpaceCB.IsChecked() != aScriptSpaceCB.GetSavedValue()) { @@ -2298,7 +2298,7 @@ BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) pNewItem->SetValue(aScriptSpaceCB.IsChecked()); rSet.Put(*pNewItem); delete pNewItem; - bRet = TRUE; + bRet = sal_True; } if(aHangingPunctCB.IsChecked() != aHangingPunctCB.GetSavedValue()) { @@ -2307,7 +2307,7 @@ BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) pNewItem->SetValue(aHangingPunctCB.IsChecked()); rSet.Put(*pNewItem); delete pNewItem; - bRet = TRUE; + bRet = sal_True; } if(aForbiddenRulesCB.IsChecked() != aForbiddenRulesCB.GetSavedValue()) { @@ -2316,22 +2316,22 @@ BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) pNewItem->SetValue(aForbiddenRulesCB.IsChecked()); rSet.Put(*pNewItem); delete pNewItem; - bRet = TRUE; + bRet = sal_True; } return bRet; } /*-- 29.11.00 11:36:25--------------------------------------------------- -----------------------------------------------------------------------*/ -void lcl_SetBox(const SfxItemSet& rSet, USHORT nSlotId, TriStateBox& rBox) +void lcl_SetBox(const SfxItemSet& rSet, sal_uInt16 nSlotId, TriStateBox& rBox) { - USHORT _nWhich = rSet.GetPool()->GetWhich(nSlotId); - SfxItemState eState = rSet.GetItemState(_nWhich, TRUE); + sal_uInt16 _nWhich = rSet.GetPool()->GetWhich(nSlotId); + SfxItemState eState = rSet.GetItemState(_nWhich, sal_True); if(!eState || eState == SFX_ITEM_DISABLED ) - rBox.Enable(FALSE); + rBox.Enable(sal_False); else if(eState >= SFX_ITEM_AVAILABLE) { - rBox.EnableTriState( FALSE ); + rBox.EnableTriState( sal_False ); rBox.Check(((const SfxBoolItem&)rSet.Get(_nWhich)).GetValue()); } else @@ -2351,15 +2351,15 @@ void SvxAsianTabPage::Reset( const SfxItemSet& rSet ) // lcl_SetBox(rSet, , aPuntuationCB ); lcl_SetBox(rSet, SID_ATTR_PARA_SCRIPTSPACE, aScriptSpaceCB ); // lcl_SetBox(rSet, , aAdjustNumbersCB ); -// aAllowWordBreakCB .Enable(FALSE); -// aPuntuationCB .Enable(FALSE); -// aAdjustNumbersCB .Enable(FALSE); +// aAllowWordBreakCB .Enable(sal_False); +// aPuntuationCB .Enable(sal_False); +// aAdjustNumbersCB .Enable(sal_False); } /* -----------------------------19.12.00 12:59-------------------------------- ---------------------------------------------------------------------------*/ IMPL_LINK( SvxAsianTabPage, ClickHdl_Impl, TriStateBox*, pBox ) { - pBox->EnableTriState( FALSE ); + pBox->EnableTriState( sal_False ); return 0; } diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index a498a439c524..d231e3249cb4 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -56,14 +56,14 @@ struct FrmMap SvxSwFramePosString::StringId eStrId; SvxSwFramePosString::StringId eMirrorStrId; short nAlign; - ULONG nLBRelations; + sal_uLong nLBRelations; }; struct RelationMap { SvxSwFramePosString::StringId eStrId; SvxSwFramePosString::StringId eMirrorStrId; - ULONG nLBRelation; + sal_uLong nLBRelation; short nRelation; }; struct StringIdPair_Impl @@ -425,7 +425,7 @@ std::size_t lcl_GetFrmMapCount(const FrmMap* pMap) -----------------------------------------------------------------------*/ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( - SvxSwFramePosString::StringId eStringId, BOOL bVertical, BOOL bRTL) + SvxSwFramePosString::StringId eStringId, sal_Bool bVertical, sal_Bool bRTL) { //special handling of STR_FROMLEFT if(SwFPos::FROMLEFT == eStringId) @@ -460,7 +460,7 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( {SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT }, {SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT } }; - USHORT nIndex; + sal_uInt16 nIndex; for(nIndex = 0; nIndex < sizeof(aHoriIds) / sizeof(StringIdPair_Impl); ++nIndex) { if(aHoriIds[nIndex].eHori == eStringId) @@ -483,9 +483,9 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( } // OD 12.11.2003 #i22341# - helper method in order to determine all possible // listbox relations in a relation map for a given relation -ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel ) +sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel ) { - ULONG nLBRelations = 0L; + sal_uLong nLBRelations = 0L; sal_uInt16 nRelMapSize = sizeof(aRelationMap) / sizeof(RelationMap); for ( sal_uInt16 nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos ) @@ -501,11 +501,11 @@ ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel ) // OD 14.11.2003 #i22341# - helper method on order to determine all possible // listbox relations in a relation map for a given string ID -ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap, +sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap, const SvxSwFramePosString::StringId _eStrId, const bool _bUseMirrorStr ) { - ULONG nLBRelations = 0L; + sal_uLong nLBRelations = 0L; std::size_t nRelMapSize = lcl_GetFrmMapCount( _pMap ); for ( std::size_t nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos ) @@ -587,10 +587,10 @@ SvxSwPosSizeTabPage::SvxSwPosSizeTabPage( Window* pParent, const SfxItemSet& rIn { FreeResource(); FieldUnit eDlgUnit = GetModuleFieldUnit( rInAttrs ); - SetFieldUnit( m_aHoriByMF, eDlgUnit, TRUE ); - SetFieldUnit( m_aVertByMF, eDlgUnit, TRUE ); - SetFieldUnit( m_aWidthMF , eDlgUnit, TRUE ); - SetFieldUnit( m_aHeightMF, eDlgUnit, TRUE ); + SetFieldUnit( m_aHoriByMF, eDlgUnit, sal_True ); + SetFieldUnit( m_aVertByMF, eDlgUnit, sal_True ); + SetFieldUnit( m_aWidthMF , eDlgUnit, sal_True ); + SetFieldUnit( m_aHeightMF, eDlgUnit, sal_True ); SetExchangeSupport(); @@ -639,9 +639,9 @@ SfxTabPage* SvxSwPosSizeTabPage::Create( Window* pParent, const SfxItemSet& rSet /*-- 05.03.2004 17:27:42--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT* SvxSwPosSizeTabPage::GetRanges() +sal_uInt16* SvxSwPosSizeTabPage::GetRanges() { - static USHORT pSwPosRanges[] = + static sal_uInt16 pSwPosRanges[] = { SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_POS_Y, @@ -670,15 +670,15 @@ USHORT* SvxSwPosSizeTabPage::GetRanges() /*-- 03.03.2004 12:21:34--------------------------------------------------- -----------------------------------------------------------------------*/ -BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) +sal_Bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) { bool bAnchorChanged = false; short nAnchor = GetAnchorType(&bAnchorChanged); - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if(bAnchorChanged) { rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor)); - bModified |= TRUE; + bModified |= sal_True; } if ( m_aPositionCB.GetState() != m_aPositionCB.GetSavedValue() ) { @@ -687,8 +687,8 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) else rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ), - m_aPositionCB.GetState() == STATE_CHECK ? TRUE : FALSE ) ); - bModified |= TRUE; + m_aPositionCB.GetState() == STATE_CHECK ? sal_True : sal_False ) ); + bModified |= sal_True; } if ( m_aSizeCB.GetState() != m_aSizeCB.GetSavedValue() ) @@ -698,8 +698,8 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) else rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ), - m_aSizeCB.GetState() == STATE_CHECK ? TRUE : FALSE ) ); - bModified |= TRUE; + m_aSizeCB.GetState() == STATE_CHECK ? sal_True : sal_False ) ); + bModified |= sal_True; } const SfxItemSet& rOldSet = GetItemSet(); @@ -726,7 +726,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) rSet.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_POS_X ), nHoriByPos ) ); rSet.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_POS_Y ), nVertByPos ) ); - bModified |= TRUE; + bModified |= sal_True; } } else @@ -740,7 +740,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) const SfxInt32Item& rHoriPosition = static_cast<const SfxInt32Item&>(rOldSet.Get( SID_ATTR_TRANSFORM_HORI_POSITION)) ; - USHORT nMapPos = GetMapPos(m_pHMap, m_aHoriLB); + sal_uInt16 nMapPos = GetMapPos(m_pHMap, m_aHoriLB); short nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); short nRel = GetRelation(m_pHMap, m_aHoriToLB); const long nHoriByPos = @@ -755,7 +755,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_HORI_RELATION, nRel)); if(m_aHoriByMF.IsEnabled()) rSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_HORI_POSITION, nHoriByPos)); - bModified |= TRUE; + bModified |= sal_True; } } if(m_aHoriMirrorCB.IsEnabled() && m_aHoriMirrorCB.IsChecked() != m_aHoriMirrorCB.GetSavedValue()) @@ -770,7 +770,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) const SfxInt32Item& rVertPosition = static_cast<const SfxInt32Item&>(rOldSet.Get( SID_ATTR_TRANSFORM_VERT_POSITION)); - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); short nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); short nRel = GetRelation(m_pVMap, m_aVertToLB); // --> OD 2004-10-21 #i34055# - convert vertical position for @@ -791,7 +791,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_VERT_RELATION, nRel)); if(m_aVertByMF.IsEnabled()) rSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_VERT_POSITION, nVertByPos)); - bModified |= TRUE; + bModified |= sal_True; } } @@ -815,13 +815,13 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) sal_uInt32 nWidth = static_cast<sal_uInt32>(m_aWidthMF.Denormalize(m_aWidthMF.GetValue(FUNIT_TWIP))); sal_uInt32 nHeight = static_cast<sal_uInt32>(m_aHeightMF.Denormalize(m_aHeightMF.GetValue(FUNIT_TWIP))); rSet.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), - (UINT32) nWidth ) ); + (sal_uInt32) nWidth ) ); rSet.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ), - (UINT32) nHeight ) ); + (sal_uInt32) nHeight ) ); //this item is required by SdrEditView::SetGeoAttrToMarked() rSet.Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), RP_LT ) ); - bModified |= TRUE; + bModified |= sal_True; } return bModified; @@ -854,11 +854,11 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) } if(bInvalidateAnchor) { - m_aToPageRB.Enable( FALSE ); - m_aToParaRB.Enable( FALSE ); - m_aToCharRB.Enable( FALSE ); - m_aAsCharRB.Enable( FALSE ); - m_aToFrameRB.Enable( FALSE ); + m_aToPageRB.Enable( sal_False ); + m_aToParaRB.Enable( sal_False ); + m_aToCharRB.Enable( sal_False ); + m_aAsCharRB.Enable( sal_False ); + m_aToFrameRB.Enable( sal_False ); } pItem = GetItem( rSet, SID_ATTR_TRANSFORM_PROTECT_POS ); @@ -866,7 +866,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { sal_Bool bProtected = ( ( const SfxBoolItem* )pItem )->GetValue(); m_aPositionCB.SetState( bProtected ? STATE_CHECK : STATE_NOCHECK ); - m_aPositionCB.EnableTriState( FALSE ); + m_aPositionCB.EnableTriState( sal_False ); m_aSizeCB.Enable( !bProtected ); } else @@ -882,7 +882,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { m_aSizeCB.SetState( ( (const SfxBoolItem*)pItem )->GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_aSizeCB.EnableTriState( FALSE ); + m_aSizeCB.EnableTriState( sal_False ); } else m_aSizeCB.SetState( STATE_DONTKNOW ); @@ -918,8 +918,8 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { if( 0 == (m_nHtmlMode & HTMLMODE_FULL_ABS_POS)) { - m_aHeightFT .Enable( FALSE ); - m_aHeightMF .Enable( FALSE ); + m_aHeightFT .Enable( sal_False ); + m_aHeightMF .Enable( sal_False ); } if( 0 == (m_nHtmlMode & HTMLMODE_SOME_ABS_POS)) { @@ -927,12 +927,12 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { m_aToParaRB.Check(); } - m_aToPageRB.Enable(FALSE); + m_aToPageRB.Enable(sal_False); } - m_aHoriMirrorCB.Show(FALSE); - m_aKeepRatioCB.Enable(FALSE); + m_aHoriMirrorCB.Show(sal_False); + m_aKeepRatioCB.Enable(sal_False); // OD 19.09.2003 #i18732# - hide checkbox in HTML mode - m_aFollowCB.Show(FALSE); + m_aFollowCB.Show(sal_False); } else { @@ -945,12 +945,12 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) } pItem = GetItem( rSet, SID_ATTR_TRANSFORM_WIDTH ); - sal_Int32 nWidth = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (UINT32)1 ); + sal_Int32 nWidth = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (sal_uInt32)1 ); m_aWidthMF.SetValue(m_aWidthMF.Normalize(nWidth), FUNIT_TWIP); pItem = GetItem( rSet, SID_ATTR_TRANSFORM_HEIGHT ); - sal_Int32 nHeight = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (UINT32)1 ); + sal_Int32 nHeight = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (sal_uInt32)1 ); m_aHeightMF.SetValue(m_aHeightMF.Normalize(nHeight), FUNIT_TWIP); m_fWidthHeightRatio = nHeight ? double(nWidth) / double(nHeight) : 1.0; @@ -1015,12 +1015,12 @@ int SvxSwPosSizeTabPage::DeactivatePage( SfxItemSet* _pSet ) /*-- 04.03.2004 09:14:41--------------------------------------------------- -----------------------------------------------------------------------*/ -void SvxSwPosSizeTabPage::EnableAnchorTypes(USHORT nAnchorEnable) +void SvxSwPosSizeTabPage::EnableAnchorTypes(sal_uInt16 nAnchorEnable) { if((nAnchorEnable & SVX_OBJ_AT_FLY)) m_aToFrameRB.Show(); if(!(nAnchorEnable & SVX_OBJ_PAGE)) - m_aToPageRB.Enable(FALSE); + m_aToPageRB.Enable(sal_False); } /*-- 04.03.2004 09:33:33--------------------------------------------------- @@ -1085,9 +1085,9 @@ IMPL_LINK( SvxSwPosSizeTabPage, RangeModifyHdl, Edit *, EMPTYARG ) if ( m_pHMap ) { // Ausrichtung Horizontal - USHORT nMapPos = GetMapPos(m_pHMap, m_aHoriToLB); - USHORT nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); - USHORT nRel = GetRelation(m_pHMap, m_aHoriToLB); + sal_uInt16 nMapPos = GetMapPos(m_pHMap, m_aHoriToLB); + sal_uInt16 nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); + sal_uInt16 nRel = GetRelation(m_pHMap, m_aHoriToLB); aVal.nHoriOrient = (short)nAlign; aVal.nHRelOrient = (short)nRel; @@ -1098,9 +1098,9 @@ IMPL_LINK( SvxSwPosSizeTabPage, RangeModifyHdl, Edit *, EMPTYARG ) if ( m_pVMap ) { // Ausrichtung Vertikal - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); - USHORT nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); - USHORT nRel = GetRelation(m_pVMap, m_aVertToLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); + sal_uInt16 nRel = GetRelation(m_pVMap, m_aVertToLB); aVal.nVertOrient = (short)nAlign; aVal.nVRelOrient = (short)nRel; @@ -1190,14 +1190,14 @@ IMPL_LINK( SvxSwPosSizeTabPage, MirrorHdl, CheckBox *, EMPTYARG ) -----------------------------------------------------------------------*/ IMPL_LINK( SvxSwPosSizeTabPage, RelHdl, ListBox *, pLB ) { - BOOL bHori = pLB == &m_aHoriToLB; + sal_Bool bHori = pLB == &m_aHoriToLB; UpdateExample(); if (bHori) - m_bAtHoriPosModified = TRUE; + m_bAtHoriPosModified = sal_True; else - m_bAtVertPosModified = TRUE; + m_bAtVertPosModified = sal_True; // OD 12.11.2003 #i22341# - following special handling no longer needed /* @@ -1205,16 +1205,16 @@ IMPL_LINK( SvxSwPosSizeTabPage, RelHdl, ListBox *, pLB ) { // Ausrichtung Vertikal String sEntry; - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); - USHORT nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); - USHORT nRel = GetRelation(m_pVMap, m_aVertToLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); + sal_uInt16 nRel = GetRelation(m_pVMap, m_aVertToLB); if (nRel == SwFPos::REL_CHAR) sEntry = m_aFramePosString.GetString(SwFPos::FROMBOTTOM); else sEntry = m_aFramePosString.GetString(SwFPos::FROMTOP); - USHORT nOldPos = m_aVertLB.GetSelectEntryPos(); + sal_uInt16 nOldPos = m_aVertLB.GetSelectEntryPos(); String sName = m_aVertLB.GetEntry(m_aVertLB.GetEntryCount() - 1); if (sName != sEntry) @@ -1229,7 +1229,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, RelHdl, ListBox *, pLB ) { if(bHori) { - USHORT nRel = GetRelation(m_pHMap, m_aHoriToLB); + sal_uInt16 nRel = GetRelation(m_pHMap, m_aHoriToLB); if(RelOrientation::PRINT_AREA == nRel && 0 == m_aVertLB.GetSelectEntryPos()) { m_aVertLB.SelectEntryPos(1); @@ -1251,24 +1251,24 @@ IMPL_LINK( SvxSwPosSizeTabPage, RelHdl, ListBox *, pLB ) -----------------------------------------------------------------------*/ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) { - BOOL bHori = pLB == &m_aHoriLB; + sal_Bool bHori = pLB == &m_aHoriLB; ListBox *pRelLB = bHori ? &m_aHoriToLB : &m_aVertToLB; FixedText *pRelFT = bHori ? &m_aHoriToFT : &m_aVertToFT; FrmMap *pMap = bHori ? m_pHMap : m_pVMap; - USHORT nMapPos = GetMapPos(pMap, *pLB); - USHORT nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB); + sal_uInt16 nMapPos = GetMapPos(pMap, *pLB); + sal_uInt16 nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB); if (bHori) { - BOOL bEnable = HoriOrientation::NONE == nAlign; + sal_Bool bEnable = HoriOrientation::NONE == nAlign; m_aHoriByMF.Enable( bEnable ); m_aHoriByFT.Enable( bEnable ); } else { - BOOL bEnable = VertOrientation::NONE == nAlign; + sal_Bool bEnable = VertOrientation::NONE == nAlign; m_aVertByMF.Enable( bEnable ); m_aVertByFT.Enable( bEnable ); } @@ -1291,15 +1291,15 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) UpdateExample(); if (bHori) - m_bAtHoriPosModified = TRUE; + m_bAtHoriPosModified = sal_True; else - m_bAtVertPosModified = TRUE; + m_bAtVertPosModified = sal_True; // Sonderbehandlung fuer HTML-Mode mit horz-vert-Abhaengigkeiten if(m_bHtmlMode && m_nHtmlMode & HTMLMODE_SOME_ABS_POS && TextContentAnchorType_AT_CHARACTER == GetAnchorType()) { - BOOL bSet = FALSE; + sal_Bool bSet = sal_False; if(bHori) { // rechts ist nur unterhalb erlaubt - von links nur oben @@ -1311,17 +1311,17 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) m_aVertLB.SelectEntryPos(1); else m_aVertLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } else if(HoriOrientation::LEFT == nAlign && 1 == m_aVertLB.GetSelectEntryPos()) { m_aVertLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } else if(HoriOrientation::NONE == nAlign && 1 == m_aVertLB.GetSelectEntryPos()) { m_aVertLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } if(bSet) PosHdl(&m_aVertLB); @@ -1333,7 +1333,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) if(1 == m_aHoriLB.GetSelectEntryPos()) { m_aHoriLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } m_aHoriToLB.SelectEntryPos(1); } @@ -1342,7 +1342,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) if(2 == m_aHoriLB.GetSelectEntryPos()) { m_aHoriLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } m_aHoriToLB.SelectEntryPos(0) ; } @@ -1391,7 +1391,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, ProtectHdl, TriStateBox *, EMPTYARG) short SvxSwPosSizeTabPage::GetRelation(FrmMap *, ListBox &rRelationLB) { short nRel = 0; - USHORT nPos = rRelationLB.GetSelectEntryPos(); + sal_uInt16 nPos = rRelationLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND) { @@ -1404,7 +1404,7 @@ short SvxSwPosSizeTabPage::GetRelation(FrmMap *, ListBox &rRelationLB) /*-- 05.03.2004 14:20:19--------------------------------------------------- -----------------------------------------------------------------------*/ -short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/*rAlignLB*/, ListBox &rRelationLB) +short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &/*rAlignLB*/, ListBox &rRelationLB) { short nAlign = 0; @@ -1415,7 +1415,7 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/ { if (rRelationLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) { - ULONG nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation; + sal_uLong nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation; std::size_t nMapCount = ::lcl_GetFrmMapCount(pMap); SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId; @@ -1423,7 +1423,7 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/ { if (pMap[i].eStrId == eStrId) { - ULONG nLBRelations = pMap[i].nLBRelations; + sal_uLong nLBRelations = pMap[i].nLBRelations; if (nLBRelations & nRel) { nAlign = pMap[i].nAlign; @@ -1441,10 +1441,10 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/ /*-- 05.03.2004 14:20:19--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) +sal_uInt16 SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) { - USHORT nMapPos = 0; - USHORT nLBSelPos = rAlignLB.GetSelectEntryPos(); + sal_uInt16 nMapPos = 0; + sal_uInt16 nLBSelPos = rAlignLB.GetSelectEntryPos(); if (nLBSelPos != LISTBOX_ENTRY_NOTFOUND) { @@ -1461,7 +1461,7 @@ USHORT SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) if (sEntry == sSelEntry) { - nMapPos = sal::static_int_cast< USHORT >(i); + nMapPos = sal::static_int_cast< sal_uInt16 >(i); break; } } @@ -1476,14 +1476,14 @@ USHORT SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) -----------------------------------------------------------------------*/ void SvxSwPosSizeTabPage::InitPos(short nAnchor, - USHORT nH, - USHORT nHRel, - USHORT nV, - USHORT nVRel, + sal_uInt16 nH, + sal_uInt16 nHRel, + sal_uInt16 nV, + sal_uInt16 nVRel, long nX, long nY) { - USHORT nPos = m_aVertLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aVertLB.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND && m_pVMap ) { m_nOldV = m_pVMap[nPos].nAlign; @@ -1502,7 +1502,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, m_nOldHRel = ((RelationMap *)m_aHoriToLB.GetEntryData(nPos))->nRelation; } - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; if( m_bIsMultiSelection ) { m_pVMap = aVMultiSelectionMap; @@ -1550,7 +1550,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, { m_pVMap = m_bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap; m_pHMap = 0; - bEnable = FALSE; + bEnable = sal_False; } m_aHoriLB.Enable( bEnable ); m_aHoriFT.Enable( bEnable ); @@ -1563,7 +1563,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, nHRel = m_nOldHRel; } // OD 12.11.2003 #i22341# - pass <nHRel> as 3rd parameter to method <FillPosLB> - USHORT nMapPos = FillPosLB(m_pHMap, nH, nHRel, m_aHoriLB); + sal_uInt16 nMapPos = FillPosLB(m_pHMap, nH, nHRel, m_aHoriLB); FillRelLB(m_pHMap, nMapPos, nH, nHRel, m_aHoriToLB, m_aHoriToFT); // Vertikal @@ -1629,10 +1629,10 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, -----------------------------------------------------------------------*/ void SvxSwPosSizeTabPage::UpdateExample() { - USHORT nPos = m_aHoriLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aHoriLB.GetSelectEntryPos(); if ( m_pHMap && nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nMapPos = GetMapPos(m_pHMap, m_aHoriLB); + sal_uInt16 nMapPos = GetMapPos(m_pHMap, m_aHoriLB); short nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); short nRel = GetRelation(m_pHMap, m_aHoriToLB); @@ -1643,9 +1643,9 @@ void SvxSwPosSizeTabPage::UpdateExample() nPos = m_aVertLB.GetSelectEntryPos(); if ( m_pVMap && nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); - USHORT nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); - USHORT nRel = GetRelation(m_pVMap, m_aVertToLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); + sal_uInt16 nRel = GetRelation(m_pVMap, m_aVertToLB); m_aExampleWN.SetVAlign(nAlign); m_aExampleWN.SetVertRel(nRel); @@ -1662,11 +1662,11 @@ void SvxSwPosSizeTabPage::UpdateExample() /*-- 05.03.2004 14:20:19--------------------------------------------------- -----------------------------------------------------------------------*/ -ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign, - USHORT nRel, ListBox &rLB, FixedText &rFT) +sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_uInt16 nAlign, + sal_uInt16 nRel, ListBox &rLB, FixedText &rFT) { String sSelEntry; - ULONG nLBRelations = 0; + sal_uLong nLBRelations = 0; std::size_t nMapCount = ::lcl_GetFrmMapCount(pMap); rLB.Clear(); @@ -1676,7 +1676,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign if (pMap == aVAsCharHtmlMap || pMap == aVAsCharMap) { String sOldEntry(rLB.GetSelectEntry()); - USHORT nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap); + sal_uInt16 nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap); SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId; for (std::size_t _nMapPos = 0; _nMapPos < nMapCount; _nMapPos++) @@ -1684,7 +1684,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign if (pMap[_nMapPos].eStrId == eStrId) { nLBRelations = pMap[_nMapPos].nLBRelations; - for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++) + for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++) { if (nLBRelations & aAsCharRelationMap[nRelPos].nLBRelation) { @@ -1692,7 +1692,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft); String sEntry = m_aFramePosString.GetString(sStrId1); - USHORT nPos = rLB.InsertEntry(sEntry); + sal_uInt16 nPos = rLB.InsertEntry(sEntry); rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]); if (pMap[_nMapPos].nAlign == nAlign) sSelEntry = sEntry; @@ -1709,7 +1709,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign if (!rLB.GetSelectEntryCount()) { - for (USHORT i = 0; i < rLB.GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < rLB.GetEntryCount(); i++) { RelationMap *pEntry = (RelationMap *)rLB.GetEntryData(i); if (pEntry->nLBRelation == LB_REL_CHAR) // Default @@ -1723,7 +1723,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign } else { - USHORT nRelCount = sizeof(aRelationMap) / sizeof(RelationMap); + sal_uInt16 nRelCount = sizeof(aRelationMap) / sizeof(RelationMap); // OD 14.11.2003 #i22341# - special handling for map <aVCharMap>, // because its ambigous in its <eStrId>/<eMirrorStrId>. @@ -1740,18 +1740,18 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign nLBRelations = pMap[nMapPos].nLBRelations; } - for (ULONG nBit = 1; nBit < 0x80000000; nBit <<= 1) + for (sal_uLong nBit = 1; nBit < 0x80000000; nBit <<= 1) { if (nLBRelations & nBit) { - for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++) + for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++) { if (aRelationMap[nRelPos].nLBRelation == nBit) { SvxSwFramePosString::StringId sStrId1 = m_aHoriMirrorCB.IsChecked() ? aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId; sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft); String sEntry = m_aFramePosString.GetString(sStrId1); - USHORT nPos = rLB.InsertEntry(sEntry); + sal_uInt16 nPos = rLB.InsertEntry(sEntry); rLB.SetEntryData(nPos, &aRelationMap[nRelPos]); if (!sSelEntry.Len() && aRelationMap[nRelPos].nRelation == nRel) sSelEntry = sEntry; @@ -1784,7 +1784,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign break; } - for (USHORT i = 0; i < rLB.GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < rLB.GetEntryCount(); i++) { RelationMap *pEntry = (RelationMap *)rLB.GetEntryData(i); if (pEntry->nRelation == nRel) @@ -1810,9 +1810,9 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign /*-- 05.03.2004 14:20:19--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, - USHORT _nAlign, - const USHORT _nRel, +sal_uInt16 SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, + sal_uInt16 _nAlign, + const sal_uInt16 _nRel, ListBox &_rLB) { String sSelEntry, sOldEntry; @@ -1822,7 +1822,7 @@ USHORT SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, // OD 12.11.2003 #i22341# - determine all possible listbox relations for // given relation for map <aVCharMap> - const ULONG nLBRelations = (_pMap != aVCharMap) + const sal_uLong nLBRelations = (_pMap != aVCharMap) ? 0L : ::lcl_GetLBRelationsForRelations( _nRel ); @@ -1890,27 +1890,27 @@ void SvxSwPosSizeTabPage::SetView( const SdrView* pSdrView ) if( m_aAnchorPos != Point(0,0) ) // -> Writer { - for( USHORT i = 1; i < rMarkList.GetMarkCount(); i++ ) + for( sal_uInt16 i = 1; i < rMarkList.GetMarkCount(); i++ ) { pObj = rMarkList.GetMark( i )->GetMarkedSdrObj(); if( m_aAnchorPos != pObj->GetAnchorPos() ) { // different anchor positions -> disable positioning - m_aPositionFL.Enable(FALSE); - m_aHoriFT.Enable(FALSE); - m_aHoriLB.Enable(FALSE); - m_aHoriByFT.Enable(FALSE); - m_aHoriByMF.Enable(FALSE); - m_aHoriToFT.Enable(FALSE); - m_aHoriToLB.Enable(FALSE); - m_aHoriMirrorCB.Enable(FALSE); - m_aVertFT.Enable(FALSE); - m_aVertLB.Enable(FALSE); - m_aVertByFT.Enable(FALSE); - m_aVertByMF.Enable(FALSE); - m_aVertToFT.Enable(FALSE); - m_aVertToLB.Enable(FALSE); - m_aFollowCB.Enable(FALSE); + m_aPositionFL.Enable(sal_False); + m_aHoriFT.Enable(sal_False); + m_aHoriLB.Enable(sal_False); + m_aHoriByFT.Enable(sal_False); + m_aHoriByMF.Enable(sal_False); + m_aHoriToFT.Enable(sal_False); + m_aHoriToLB.Enable(sal_False); + m_aHoriMirrorCB.Enable(sal_False); + m_aVertFT.Enable(sal_False); + m_aVertLB.Enable(sal_False); + m_aVertByFT.Enable(sal_False); + m_aVertByMF.Enable(sal_False); + m_aVertToFT.Enable(sal_False); + m_aVertToLB.Enable(sal_False); + m_aFollowCB.Enable(sal_False); m_aHoriByMF.SetText(String()); m_aVertByMF.SetText(String()); diff --git a/cui/source/tabpages/swpossizetabpage.hxx b/cui/source/tabpages/swpossizetabpage.hxx index e27f243dc895..518d02535d87 100644 --- a/cui/source/tabpages/swpossizetabpage.hxx +++ b/cui/source/tabpages/swpossizetabpage.hxx @@ -104,7 +104,7 @@ class SvxSwPosSizeTabPage : public SfxTabPage short m_nOldVRel; double m_fWidthHeightRatio; //width-to-height ratio to support the KeepRatio button - USHORT m_nHtmlMode; + sal_uInt16 m_nHtmlMode; bool m_bHtmlMode; bool m_bAtHoriPosModified; bool m_bAtVertPosModified; @@ -123,15 +123,15 @@ class SvxSwPosSizeTabPage : public SfxTabPage DECL_LINK( ModifyHdl, Edit * ); DECL_LINK( ProtectHdl, TriStateBox *); - void InitPos(short nAnchorType, USHORT nH, USHORT nHRel, - USHORT nV, USHORT nVRel, + void InitPos(short nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel, + sal_uInt16 nV, sal_uInt16 nVRel, long nX, long nY); - USHORT GetMapPos(FrmMap *pMap, ListBox &rAlignLB); - short GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); + sal_uInt16 GetMapPos(FrmMap *pMap, ListBox &rAlignLB); + short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); short GetRelation(FrmMap *pMap, ListBox &rRelationLB); short GetAnchorType(bool* pbHasChanged = 0); - ULONG FillRelLB(FrmMap *pMap, USHORT nLBSelPos, USHORT nAlign, USHORT nRel, ListBox &rLB, FixedText &rFT); - USHORT FillPosLB(FrmMap *pMap, USHORT nAlign, const USHORT _nRel, ListBox &rLB); + sal_uLong FillRelLB(FrmMap *pMap, sal_uInt16 nLBSelPos, sal_uInt16 nAlign, sal_uInt16 nRel, ListBox &rLB, FixedText &rFT); + sal_uInt16 FillPosLB(FrmMap *pMap, sal_uInt16 nAlign, const sal_uInt16 _nRel, ListBox &rLB); void UpdateExample(); @@ -140,14 +140,14 @@ public: ~SvxSwPosSizeTabPage(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual int DeactivatePage( SfxItemSet* pSet ); - void EnableAnchorTypes(USHORT nAnchorEnable); + void EnableAnchorTypes(sal_uInt16 nAnchorEnable); void SetValidateFramePosLink( const Link& rLink ) {m_aValidateLink = rLink;} diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx index 115164bba772..4e873f4cb021 100644 --- a/cui/source/tabpages/tabarea.cxx +++ b/cui/source/tabpages/tabarea.cxx @@ -90,7 +90,7 @@ SvxAreaTabDialog::SvxAreaTabDialog mnDlgType( 0 ), mnPos( 0 ), mbAreaTP( sal_False ), - mbDeleteColorTable( TRUE ) + mbDeleteColorTable( sal_True ) { FreeResource(); @@ -253,7 +253,7 @@ short SvxAreaTabDialog::Ok() SavePalettes(); // Es wird RET_OK zurueckgeliefert, wenn wenigstens eine - // TabPage in FillItemSet() TRUE zurueckliefert. Dieses + // TabPage in FillItemSet() sal_True zurueckliefert. Dieses // geschieht z.Z. standardmaessig. return( SfxTabDialog::Ok() ); } @@ -271,7 +271,7 @@ IMPL_LINK_INLINE_END( SvxAreaTabDialog, CancelHdlImpl, void *, p ) // ----------------------------------------------------------------------- -void SvxAreaTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx index 02280cb587a8..8d0e287b86b5 100644 --- a/cui/source/tabpages/tabline.cxx +++ b/cui/source/tabpages/tabline.cxx @@ -67,7 +67,7 @@ SvxLineTabDialog::SvxLineTabDialog const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pSdrObj, - BOOL bHasObj + sal_Bool bHasObj ) : SfxTabDialog ( pParent, CUI_RES( RID_SVXDLG_LINE ), pAttr ), @@ -91,7 +91,7 @@ SvxLineTabDialog::SvxLineTabDialog nPosLineEndLb( 0 ), mnPos( 0 ), mbAreaTP( sal_False ), - mbDeleteColorTable( TRUE ) + mbDeleteColorTable( sal_True ) { FreeResource(); @@ -210,7 +210,7 @@ short SvxLineTabDialog::Ok() SavePalettes(); // Es wird RET_OK zurueckgeliefert, wenn wenigstens eine - // TabPage in FillItemSet() TRUE zurueckliefert. Dieses + // TabPage in FillItemSet() sal_True zurueckliefert. Dieses // geschieht z.Z. standardmaessig. return( SfxTabDialog::Ok() ); } @@ -228,7 +228,7 @@ IMPL_LINK_INLINE_END( SvxLineTabDialog, CancelHdlImpl, void *, EMPTYARG ) // ----------------------------------------------------------------------- -void SvxLineTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SvxLineTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index e1e65404b1a2..33e47e8c86ed 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -56,10 +56,10 @@ class TabWin_Impl : public Window { private: - USHORT nTabStyle; + sal_uInt16 nTabStyle; public: - TabWin_Impl( Window* pParent, const ResId& rId, USHORT nStyle ) : + TabWin_Impl( Window* pParent, const ResId& rId, sal_uInt16 nStyle ) : Window( pParent, rId ), nTabStyle( nStyle ) {} @@ -68,7 +68,7 @@ public: // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_TABSTOP, SID_ATTR_TABSTOP_OFFSET, @@ -113,10 +113,10 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, aRightTab ( this, CUI_RES( BTN_TABTYPE_RIGHT ) ), aCenterTab ( this, CUI_RES( BTN_TABTYPE_CENTER ) ), aDezTab ( this, CUI_RES( BTN_TABTYPE_DECIMAL ) ), - pLeftWin ( new TabWin_Impl( this, CUI_RES( WIN_TABLEFT ), (USHORT)(RULER_TAB_LEFT|WB_HORZ) ) ), - pRightWin ( new TabWin_Impl( this, CUI_RES( WIN_TABRIGHT ), (USHORT)(RULER_TAB_RIGHT|WB_HORZ) ) ), - pCenterWin ( new TabWin_Impl( this, CUI_RES( WIN_TABCENTER ), (USHORT)(RULER_TAB_CENTER|WB_HORZ) ) ), - pDezWin ( new TabWin_Impl( this, CUI_RES( WIN_TABDECIMAL ), (USHORT)(RULER_TAB_DECIMAL|WB_HORZ) ) ), + pLeftWin ( new TabWin_Impl( this, CUI_RES( WIN_TABLEFT ), (sal_uInt16)(RULER_TAB_LEFT|WB_HORZ) ) ), + pRightWin ( new TabWin_Impl( this, CUI_RES( WIN_TABRIGHT ), (sal_uInt16)(RULER_TAB_RIGHT|WB_HORZ) ) ), + pCenterWin ( new TabWin_Impl( this, CUI_RES( WIN_TABCENTER ), (sal_uInt16)(RULER_TAB_CENTER|WB_HORZ) ) ), + pDezWin ( new TabWin_Impl( this, CUI_RES( WIN_TABDECIMAL ), (sal_uInt16)(RULER_TAB_DECIMAL|WB_HORZ) ) ), aDezCharLabel ( this, CUI_RES( FT_TABTYPE_DECCHAR ) ), aDezChar ( this, CUI_RES( ED_TABTYPE_DECCHAR ) ), aTabTypeLabel ( this, CUI_RES( FL_TABTYPE ) ), @@ -135,7 +135,7 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, aNewTabs ( 0, 0, SVX_TAB_ADJUST_LEFT, GetWhich( SID_ATTR_TABSTOP ) ), nDefDist ( 0 ), eDefUnit( FUNIT_100TH_MM ), - bCheck ( FALSE ) + bCheck ( sal_False ) { SvtCJKOptions aCJKOptions; @@ -200,16 +200,16 @@ SvxTabulatorTabPage::~SvxTabulatorTabPage() // ----------------------------------------------------------------------- -USHORT* SvxTabulatorTabPage::GetRanges() +sal_uInt16* SvxTabulatorTabPage::GetRanges() { return pRanges; } // ----------------------------------------------------------------------- -BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; // Hier die Werte aus den Controls eintueten if ( aNewBtn.IsEnabled() ) @@ -231,7 +231,7 @@ BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) const SfxPoolItem* pLRSpace; // wenn nicht im neuen Set, dann vielleicht im alten if ( SFX_ITEM_SET != - rSet.GetItemState( GetWhich( SID_ATTR_LRSPACE ), TRUE, &pLRSpace ) ) + rSet.GetItemState( GetWhich( SID_ATTR_LRSPACE ), sal_True, &pLRSpace ) ) pLRSpace = GetOldItem( rSet, SID_ATTR_LRSPACE ); if ( pLRSpace && ( (SvxLRSpaceItem*)pLRSpace )->GetTxtFirstLineOfst() < 0 ) @@ -243,7 +243,7 @@ BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) SvxTabStopItem aTmp( aNewTabs ); aTmp.Remove( 0, aTmp.Count() ); - for ( USHORT i = 0; i < aNewTabs.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aNewTabs.Count(); ++i ) { SvxTabStop aTmpStop = aNewTabs[i]; aTmpStop.GetTabPos() = @@ -254,13 +254,13 @@ BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || !( *( (SvxTabStopItem*)pOld ) == aTmp ) ) { rSet.Put( aTmp ); - bModified = TRUE; + bModified = sal_True; } } else if ( !pOld || !( *( (SvxTabStopItem*)pOld ) == aNewTabs ) ) { rSet.Put( aNewTabs ); - bModified = TRUE; + bModified = sal_True; } return bModified; } @@ -290,7 +290,7 @@ void SvxTabulatorTabPage::Reset( const SfxItemSet& rSet ) SvxTabStopItem aTmp( *( (const SvxTabStopItem*)pItem ) ); aNewTabs.Remove( 0, aNewTabs.Count() ); - for ( USHORT i = 0; i < aTmp.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aTmp.Count(); ++i ) { SvxTabStop aTmpStop = aTmp[i]; aTmpStop.GetTabPos() = @@ -313,7 +313,7 @@ void SvxTabulatorTabPage::Reset( const SfxItemSet& rSet ) (long)((const SfxUInt16Item*)pItem)->GetValue(), eUnit, MAP_100TH_MM ); // Aktuell selektierte Tab-Pos - USHORT nTabPos = 0; + sal_uInt16 nTabPos = 0; pItem = GetItem( rSet, SID_ATTR_TABSTOP_POS ); if ( pItem ) @@ -324,7 +324,7 @@ void SvxTabulatorTabPage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -void SvxTabulatorTabPage::DisableControls( const USHORT nFlag ) +void SvxTabulatorTabPage::DisableControls( const sal_uInt16 nFlag ) { if ( ( TABTYPE_LEFT & nFlag ) == TABTYPE_LEFT ) { @@ -378,13 +378,13 @@ int SvxTabulatorTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- -void SvxTabulatorTabPage::InitTabPos_Impl( USHORT nTabPos ) +void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos ) { aTabBox.Clear(); long nOffset = 0; const SfxPoolItem* pItem = 0; - if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, TRUE, &pItem ) + if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, sal_True, &pItem ) == SFX_ITEM_SET ) { nOffset = ( (const SfxInt32Item*)pItem )->GetValue(); @@ -393,7 +393,7 @@ void SvxTabulatorTabPage::InitTabPos_Impl( USHORT nTabPos ) } // Aktuelle TabPos korrigieren und Defaults-Tabs - for ( USHORT i = 0; i < aNewTabs.Count(); i++ ) + for ( sal_uInt16 i = 0; i < aNewTabs.Count(); i++ ) { if ( aNewTabs[i].GetAdjustment() != SVX_TAB_ADJUST_DEFAULT ) { @@ -405,14 +405,14 @@ void SvxTabulatorTabPage::InitTabPos_Impl( USHORT nTabPos ) } // aktuellen Tabulator auswaehlen - const USHORT nSize = aNewTabs.Count(); + const sal_uInt16 nSize = aNewTabs.Count(); if ( nTabPos >= nSize ) nTabPos = 0; // alle RadioButtons erstmal ausschalten - aLeftTab.Check( TRUE ); - aNoFillChar.Check( TRUE ); + aLeftTab.Check( sal_True ); + aNoFillChar.Check( sal_True ); if( aTabBox.GetEntryCount() > 0 ) { @@ -495,7 +495,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) long nOffset = 0; const SfxPoolItem* pItem = 0; - if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, TRUE, &pItem ) == + if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, sal_True, &pItem ) == SFX_ITEM_SET ) { nOffset = ( (const SfxInt32Item*)pItem )->GetValue(); @@ -503,9 +503,9 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) nOffset = OutputDevice::LogicToLogic( nOffset, eUnit, MAP_100TH_MM ); } const long nReal = nVal - nOffset; - USHORT nSize = aTabBox.GetEntryCount(); + sal_uInt16 nSize = aTabBox.GetEntryCount(); - USHORT i; + sal_uInt16 i; for( i = 0; i < nSize; i++ ) { if ( nReal < aNewTabs[i].GetTabPos() ) @@ -533,7 +533,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) // falls kein RadioButton geclickt wurde, // muss trotzdem geputtet werden - bCheck |= TRUE; + bCheck |= sal_True; // set the selection into the position Edit aTabBox.SetSelection(Selection(0, aTabBox.GetText().Len())); return 0; @@ -543,7 +543,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) IMPL_LINK( SvxTabulatorTabPage, DelHdl_Impl, Button *, EMPTYARG ) { - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue() ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue() ); if ( nPos == COMBOBOX_ENTRY_NOTFOUND ) return 0; @@ -559,7 +559,7 @@ IMPL_LINK( SvxTabulatorTabPage, DelHdl_Impl, Button *, EMPTYARG ) aNewTabs.Remove( nPos ); // aAktTab neu setzen - const USHORT nSize = aNewTabs.Count(); + const sal_uInt16 nSize = aNewTabs.Count(); if ( nSize > 0 ) { @@ -579,7 +579,7 @@ IMPL_LINK( SvxTabulatorTabPage, DelHdl_Impl, Button *, EMPTYARG ) // falls kein RadioButton geclickt wurde, // muss trotzdem geputtet werden - bCheck |= TRUE; + bCheck |= sal_True; return 0; } @@ -593,7 +593,7 @@ IMPL_LINK( SvxTabulatorTabPage, DelAllHdl_Impl, Button *, EMPTYARG ) InitTabPos_Impl(); // damit in FillItemSet() geputtet wird - bCheck |= TRUE; + bCheck |= sal_True; } return 0; } @@ -602,7 +602,7 @@ IMPL_LINK( SvxTabulatorTabPage, DelAllHdl_Impl, Button *, EMPTYARG ) IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox ) { - bCheck |= TRUE; + bCheck |= sal_True; SvxTabAdjust eAdj; aDezChar.Disable(); aDezCharLabel.Disable(); @@ -623,7 +623,7 @@ IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox ) } aAktTab.GetAdjustment() = eAdj; - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { @@ -637,8 +637,8 @@ IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox ) IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox ) { - bCheck |= TRUE; - BYTE cFill = ' '; + bCheck |= sal_True; + sal_uInt8 cFill = ' '; aFillChar.SetText( String() ); aFillChar.Disable(); @@ -654,7 +654,7 @@ IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox ) cFill = '-'; aAktTab.GetFill() = cFill; - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { @@ -673,7 +673,7 @@ IMPL_LINK( SvxTabulatorTabPage, GetFillCharHdl_Impl, Edit *, pEdit ) if ( aChar.Len() > 0 ) aAktTab.GetFill() = aChar.GetChar( 0 ); - const USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit); + const sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { aNewTabs.Remove( nPos ); @@ -690,7 +690,7 @@ IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit ) if ( aChar.Len() > 0 && ( aChar.GetChar( 0 ) >= ' ')) aAktTab.GetDecimal() = aChar.GetChar( 0 ); - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { aNewTabs.Remove( nPos ); @@ -703,7 +703,7 @@ IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit ) IMPL_LINK( SvxTabulatorTabPage, SelectHdl_Impl, MetricBox *, EMPTYARG ) { - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { aAktTab = aNewTabs[nPos]; @@ -717,7 +717,7 @@ IMPL_LINK( SvxTabulatorTabPage, SelectHdl_Impl, MetricBox *, EMPTYARG ) IMPL_LINK( SvxTabulatorTabPage, ModifyHdl_Impl, MetricBox *, EMPTYARG ) { - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { aAktTab = aNewTabs[nPos]; diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index cfff61fd5009..c41f8f3f40bf 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -45,7 +45,7 @@ #include <dialmgr.hxx> #include "svx/dlgutil.hxx" -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_TEXT_ANIKIND, SDRATTR_TEXT_ANIAMOUNT, @@ -77,7 +77,7 @@ __EXPORT SvxTextTabDialog::SvxTextTabDialog( Window* pParent, |* \************************************************************************/ -void __EXPORT SvxTextTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void __EXPORT SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { @@ -188,7 +188,7 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) if( pItem ) { eAniKind = ( ( const SdrTextAniKindItem* )pItem )->GetValue(); - aLbEffect.SelectEntryPos( sal::static_int_cast< USHORT >(eAniKind) ); + aLbEffect.SelectEntryPos( sal::static_int_cast< sal_uInt16 >(eAniKind) ); } else aLbEffect.SetNoSelection(); @@ -205,10 +205,10 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) } else { - aBtnUp.Check( FALSE ); - aBtnLeft.Check( FALSE ); - aBtnRight.Check( FALSE ); - aBtnDown.Check( FALSE ); + aBtnUp.Check( sal_False ); + aBtnLeft.Check( sal_False ); + aBtnRight.Check( sal_False ); + aBtnDown.Check( sal_False ); } aBtnUp.SaveValue(); aBtnLeft.SaveValue(); @@ -221,8 +221,8 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTARTINSIDE ); if( pItem ) { - aTsbStartInside.EnableTriState( FALSE ); - BOOL bValue = ( ( const SdrTextAniStartInsideItem* )pItem )->GetValue(); + aTsbStartInside.EnableTriState( sal_False ); + sal_Bool bValue = ( ( const SdrTextAniStartInsideItem* )pItem )->GetValue(); if( bValue ) aTsbStartInside.SetState( STATE_CHECK ); else @@ -238,8 +238,8 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTOPINSIDE ); if( pItem ) { - aTsbStopInside.EnableTriState( FALSE ); - BOOL bValue = ( ( const SdrTextAniStopInsideItem* )pItem )->GetValue(); + aTsbStopInside.EnableTriState( sal_False ); + sal_Bool bValue = ( ( const SdrTextAniStopInsideItem* )pItem )->GetValue(); if( bValue ) aTsbStopInside.SetState( STATE_CHECK ); else @@ -255,7 +255,7 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANICOUNT ); if( pItem ) { - aTsbEndless.EnableTriState( FALSE ); + aTsbEndless.EnableTriState( sal_False ); long nValue = (long) ( ( const SdrTextAniCountItem* )pItem )->GetValue(); aNumFldCount.SetValue( nValue ); if( nValue == 0 ) @@ -263,7 +263,7 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) if( eAniKind == SDRTEXTANI_SLIDE ) { aTsbEndless.SetState( STATE_NOCHECK ); - aTsbEndless.Enable( FALSE ); + aTsbEndless.Enable( sal_False ); } else { @@ -288,7 +288,7 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDELAY ); if( pItem ) { - aTsbAuto.EnableTriState( FALSE ); + aTsbAuto.EnableTriState( sal_False ); long nValue = (long) ( ( const SdrTextAniDelayItem* )pItem )->GetValue(); aMtrFldDelay.SetValue( nValue ); if( nValue == 0 ) @@ -313,7 +313,7 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIAMOUNT ); if( pItem ) { - aTsbPixel.EnableTriState( FALSE ); + aTsbPixel.EnableTriState( sal_False ); long nValue = (long) ( ( const SdrTextAniAmountItem* )pItem )->GetValue(); if( nValue <= 0 ) { @@ -369,10 +369,10 @@ void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { - BOOL bModified = FALSE; - USHORT nPos; + sal_Bool bModified = sal_False; + sal_uInt16 nPos; TriState eState; // Animationstyp @@ -381,7 +381,7 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) nPos != aLbEffect.GetSavedValue() ) { rAttrs.Put( SdrTextAniKindItem( (SdrTextAniKind) nPos ) ); - bModified = TRUE; + bModified = sal_True; } // Animationsrichtung @@ -392,23 +392,23 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { SdrTextAniDirection eValue = (SdrTextAniDirection) GetSelectedDirection(); rAttrs.Put( SdrTextAniDirectionItem( eValue ) ); - bModified = TRUE; + bModified = sal_True; } // Start inside eState = aTsbStartInside.GetState(); if( eState != aTsbStartInside.GetSavedValue() ) { - rAttrs.Put( SdrTextAniStartInsideItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrTextAniStartInsideItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } // Stop inside eState = aTsbStopInside.GetState(); if( eState != aTsbStopInside.GetSavedValue() ) { - rAttrs.Put( SdrTextAniStopInsideItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrTextAniStopInsideItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } // Anzahl @@ -419,17 +419,17 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { sal_Int64 nValue = 0; if( eState == STATE_CHECK /*#89844#*/ && aTsbEndless.IsEnabled()) - bModified = TRUE; + bModified = sal_True; else { if( aStr != aNumFldCount.GetSavedValue() ) { nValue = aNumFldCount.GetValue(); - bModified = TRUE; + bModified = sal_True; } } if( bModified ) - rAttrs.Put( SdrTextAniCountItem( (UINT16) nValue ) ); + rAttrs.Put( SdrTextAniCountItem( (sal_uInt16) nValue ) ); } // Verzoegerung @@ -440,17 +440,17 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { sal_Int64 nValue = 0; if( eState == STATE_CHECK ) - bModified = TRUE; + bModified = sal_True; else { if( aStr != aMtrFldDelay.GetSavedValue() ) { nValue = aMtrFldDelay.GetValue(); - bModified = TRUE; + bModified = sal_True; } } if( bModified ) - rAttrs.Put( SdrTextAniDelayItem( (UINT16) nValue ) ); + rAttrs.Put( SdrTextAniDelayItem( (sal_uInt16) nValue ) ); } // Schrittweite @@ -469,9 +469,9 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { nValue = GetCoreValue( aMtrFldAmount, eUnit ); } - rAttrs.Put( SdrTextAniAmountItem( (INT16) nValue ) ); + rAttrs.Put( SdrTextAniAmountItem( (sal_Int16) nValue ) ); - bModified = TRUE; + bModified = sal_True; } return( bModified ); @@ -493,7 +493,7 @@ void SvxTextAnimationPage::Construct() |* \************************************************************************/ -USHORT* SvxTextAnimationPage::GetRanges() +sal_uInt16* SvxTextAnimationPage::GetRanges() { return( pRanges ); } @@ -518,7 +518,7 @@ SfxTabPage* SvxTextAnimationPage::Create( Window* pWindow, IMPL_LINK( SvxTextAnimationPage, SelectEffectHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbEffect.GetSelectEntryPos(); + sal_uInt16 nPos = aLbEffect.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { eAniKind = (SdrTextAniKind) nPos; @@ -738,9 +738,9 @@ void SvxTextAnimationPage::SelectDirection( SdrTextAniDirection nValue ) |* \************************************************************************/ -USHORT SvxTextAnimationPage::GetSelectedDirection() +sal_uInt16 SvxTextAnimationPage::GetSelectedDirection() { - USHORT nValue = 0; + sal_uInt16 nValue = 0; if( aBtnUp.IsChecked() ) nValue = SDRTEXTANI_UP; diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index 93330fbeb4dd..bb13af3703ab 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -56,7 +56,7 @@ #include <svx/ofaitem.hxx> //add CHINA001 #include <editeng/writingmodeitem.hxx> -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_MISC_FIRST, SDRATTR_TEXT_HORZADJUST, SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_AUTOGROWSIZE, @@ -226,7 +226,7 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { aTsbAutoGrowHeight.SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbAutoGrowHeight.EnableTriState( FALSE ); + aTsbAutoGrowHeight.EnableTriState( sal_False ); } else aTsbAutoGrowHeight.SetState( STATE_DONTKNOW ); @@ -237,7 +237,7 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { aTsbAutoGrowWidth.SetState( ( ( const SdrTextAutoGrowWidthItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWWIDTH ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbAutoGrowWidth.EnableTriState( FALSE ); + aTsbAutoGrowWidth.EnableTriState( sal_False ); } else aTsbAutoGrowWidth.SetState( STATE_DONTKNOW ); @@ -248,7 +248,7 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { aTsbAutoGrowSize.SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbAutoGrowSize.EnableTriState( FALSE ); + aTsbAutoGrowSize.EnableTriState( sal_False ); } else aTsbAutoGrowSize.SetState( STATE_DONTKNOW ); @@ -259,7 +259,7 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { aTsbWordWrapText.SetState( ( ( const SdrTextWordWrapItem& )rAttrs.Get( SDRATTR_TEXT_WORDWRAP ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbWordWrapText.EnableTriState( FALSE ); + aTsbWordWrapText.EnableTriState( sal_False ); } else aTsbWordWrapText.SetState( STATE_DONTKNOW ); @@ -278,7 +278,7 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) SdrTextHorzAdjust eTHA = (SdrTextHorzAdjust)((const SdrTextHorzAdjustItem&)rAttrs.Get(SDRATTR_TEXT_HORZADJUST)).GetValue(); RECT_POINT eRP = RP_LB; - aTsbFullWidth.EnableTriState( FALSE ); + aTsbFullWidth.EnableTriState( sal_False ); // Translate item values into local anchor position. switch (eTVA) @@ -352,7 +352,7 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) SdrFitToSizeType eFTS = (SdrFitToSizeType) ( ( const SdrTextFitToSizeTypeItem& )rAttrs.Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue(); aTsbFitToSize.SetState( eFTS == SDRTEXTFIT_NONE ? STATE_NOCHECK : STATE_CHECK ); - aTsbFitToSize.EnableTriState( FALSE ); + aTsbFitToSize.EnableTriState( sal_False ); } else aTsbFitToSize.SetState( STATE_DONTKNOW ); @@ -361,9 +361,9 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) // Konturfluss if( rAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME ) != SFX_ITEM_DONTCARE ) { - BOOL bContour = ( ( const SdrTextContourFrameItem& )rAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue(); + sal_Bool bContour = ( ( const SdrTextContourFrameItem& )rAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue(); aTsbContour.SetState( bContour ? STATE_CHECK : STATE_NOCHECK ); - aTsbContour.EnableTriState( FALSE ); + aTsbContour.EnableTriState( sal_False ); } else aTsbContour.SetState( STATE_DONTKNOW ); @@ -378,13 +378,13 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) { SfxItemPool* pPool = rAttrs.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); SfxMapUnit eUnit = pPool->GetMetric( SDRATTR_TEXT_LEFTDIST ); - INT32 nValue; + sal_Int32 nValue; TriState eState; if( aMtrFldLeft.GetText() != aMtrFldLeft.GetSavedValue() ) @@ -414,32 +414,32 @@ BOOL SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) eState = aTsbAutoGrowHeight.GetState(); if( eState != aTsbAutoGrowHeight.GetSavedValue() ) { - rAttrs.Put( SdrTextAutoGrowHeightItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextAutoGrowHeightItem( (sal_Bool) STATE_CHECK == eState ) ); } eState = aTsbAutoGrowWidth.GetState(); if( eState != aTsbAutoGrowWidth.GetSavedValue() ) { - rAttrs.Put( SdrTextAutoGrowWidthItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextAutoGrowWidthItem( (sal_Bool) STATE_CHECK == eState ) ); } eState = aTsbAutoGrowSize.GetState(); if( eState != aTsbAutoGrowSize.GetSavedValue() ) { - rAttrs.Put( SdrTextAutoGrowHeightItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextAutoGrowHeightItem( (sal_Bool) STATE_CHECK == eState ) ); } eState = aTsbWordWrapText.GetState(); if( eState != aTsbWordWrapText.GetSavedValue() ) { - rAttrs.Put( SdrTextWordWrapItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextWordWrapItem( (sal_Bool) STATE_CHECK == eState ) ); } // Konturfluss eState = aTsbContour.GetState(); if( eState != aTsbContour.GetSavedValue() ) { - rAttrs.Put( SdrTextContourFrameItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextContourFrameItem( (sal_Bool) STATE_CHECK == eState ) ); } eState = aTsbFitToSize.GetState(); @@ -519,7 +519,7 @@ BOOL SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) rAttrs.Put( SdrTextHorzAdjustItem( eTHA ) ); } - return( TRUE ); + return( sal_True ); } /************************************************************************* @@ -532,8 +532,8 @@ void SvxTextAttrPage::Construct() { DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" ); - bFitToSizeEnabled = bContourEnabled = TRUE; - bWordWrapTextEnabled = bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = FALSE; + bFitToSizeEnabled = bContourEnabled = sal_True; + bWordWrapTextEnabled = bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = sal_False; const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); if( rMarkList.GetMarkCount() == 1 ) @@ -552,18 +552,18 @@ void SvxTextAttrPage::Construct() if ( ((SdrTextObj*)pObj)->HasText() ) { // Konturfluss ist NICHT bei reinen Textobjekten m�glich - bContourEnabled = FALSE; + bContourEnabled = sal_False; // Breite und Hoehe anpassen ist NUR bei reinen Textobjekten m�glich - bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = TRUE; + bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = sal_True; } } break; case OBJ_CUSTOMSHAPE : { - bFitToSizeEnabled = bContourEnabled = FALSE; - bAutoGrowSizeEnabled = TRUE; - bWordWrapTextEnabled = TRUE; + bFitToSizeEnabled = bContourEnabled = sal_False; + bAutoGrowSizeEnabled = sal_True; + bWordWrapTextEnabled = sal_True; } break; default: ;//prevent warning @@ -596,7 +596,7 @@ SfxTabPage* SvxTextAttrPage::Create( Window* pWindow, |* \************************************************************************/ -USHORT* SvxTextAttrPage::GetRanges() +sal_uInt16* SvxTextAttrPage::GetRanges() { return( pRanges ); } @@ -714,10 +714,10 @@ IMPL_LINK( SvxTextAttrPage, ClickFullWidthHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxTextAttrPage, ClickHdl_Impl, void *, EMPTYARG ) { - BOOL bAutoGrowWidth = aTsbAutoGrowWidth.GetState() == STATE_CHECK; - BOOL bAutoGrowHeight = aTsbAutoGrowHeight.GetState() == STATE_CHECK; - BOOL bFitToSize = aTsbFitToSize.GetState() == STATE_CHECK; - BOOL bContour = aTsbContour.GetState() == STATE_CHECK; + sal_Bool bAutoGrowWidth = aTsbAutoGrowWidth.GetState() == STATE_CHECK; + sal_Bool bAutoGrowHeight = aTsbAutoGrowHeight.GetState() == STATE_CHECK; + sal_Bool bFitToSize = aTsbFitToSize.GetState() == STATE_CHECK; + sal_Bool bContour = aTsbContour.GetState() == STATE_CHECK; aTsbContour.Enable( !bFitToSize && !( ( bAutoGrowWidth && bAutoGrowWidthEnabled ) || ( bAutoGrowHeight && bAutoGrowHeightEnabled ) ) && diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 774a58b4a34d..45469938b099 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -62,7 +62,7 @@ // static ---------------------------------------------------------------- -static USHORT pAreaRanges[] = +static sal_uInt16 pAreaRanges[] = { XATTR_GRADIENTSTEPCOUNT, XATTR_GRADIENTSTEPCOUNT, @@ -71,7 +71,7 @@ static USHORT pAreaRanges[] = 0 }; -static USHORT pTransparenceRanges[] = +static sal_uInt16 pTransparenceRanges[] = { XATTR_FILLTRANSPARENCE, XATTR_FILLTRANSPARENCE, @@ -91,8 +91,8 @@ static USHORT pTransparenceRanges[] = IMPL_LINK(SvxTransparenceTabPage, ClickTransOffHdl_Impl, void *, EMPTYARG) { // disable all other controls - ActivateLinear(FALSE); - ActivateGradient(FALSE); + ActivateLinear(sal_False); + ActivateGradient(sal_False); // Preview rXFSet.ClearItem (XATTR_FILLTRANSPARENCE); @@ -100,7 +100,7 @@ IMPL_LINK(SvxTransparenceTabPage, ClickTransOffHdl_Impl, void *, EMPTYARG) aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() ); - InvalidatePreview( FALSE ); + InvalidatePreview( sal_False ); return( 0L ); } @@ -108,8 +108,8 @@ IMPL_LINK(SvxTransparenceTabPage, ClickTransOffHdl_Impl, void *, EMPTYARG) IMPL_LINK(SvxTransparenceTabPage, ClickTransLinearHdl_Impl, void *, EMPTYARG) { // enable linear, disable other - ActivateLinear(TRUE); - ActivateGradient(FALSE); + ActivateLinear(sal_True); + ActivateGradient(sal_False); // preview rXFSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE); @@ -121,8 +121,8 @@ IMPL_LINK(SvxTransparenceTabPage, ClickTransLinearHdl_Impl, void *, EMPTYARG) IMPL_LINK(SvxTransparenceTabPage, ClickTransGradientHdl_Impl, void *, EMPTYARG) { // enable gradient, disable other - ActivateLinear(FALSE); - ActivateGradient(TRUE); + ActivateLinear(sal_False); + ActivateGradient(sal_True); // preview rXFSet.ClearItem (XATTR_FILLTRANSPARENCE); @@ -131,14 +131,14 @@ IMPL_LINK(SvxTransparenceTabPage, ClickTransGradientHdl_Impl, void *, EMPTYARG) return( 0L ); } -void SvxTransparenceTabPage::ActivateLinear(BOOL bActivate) +void SvxTransparenceTabPage::ActivateLinear(sal_Bool bActivate) { aMtrTransparent.Enable(bActivate); } IMPL_LINK(SvxTransparenceTabPage, ModifyTransparentHdl_Impl, void*, EMPTYARG) { - UINT16 nPos = (UINT16)aMtrTransparent.GetValue(); + sal_uInt16 nPos = (sal_uInt16)aMtrTransparent.GetValue(); XFillTransparenceItem aItem(nPos); rXFSet.Put(XFillTransparenceItem(aItem)); @@ -157,16 +157,16 @@ IMPL_LINK(SvxTransparenceTabPage, ModifiedTrgrHdl_Impl, void *, pControl) } // preview - UINT8 nStartCol = (UINT8)(((UINT16)aMtrTrgrStartValue.GetValue() * 255) / 100); - UINT8 nEndCol = (UINT8)(((UINT16)aMtrTrgrEndValue.GetValue() * 255) / 100); + sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)aMtrTrgrStartValue.GetValue() * 255) / 100); + sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)aMtrTrgrEndValue.GetValue() * 255) / 100); XGradient aTmpGradient( Color(nStartCol, nStartCol, nStartCol), Color(nEndCol, nEndCol, nEndCol), (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos(), - (UINT16)aMtrTrgrAngle.GetValue() * 10, - (UINT16)aMtrTrgrCenterX.GetValue(), - (UINT16)aMtrTrgrCenterY.GetValue(), - (UINT16)aMtrTrgrBorder.GetValue(), + (sal_uInt16)aMtrTrgrAngle.GetValue() * 10, + (sal_uInt16)aMtrTrgrCenterX.GetValue(), + (sal_uInt16)aMtrTrgrCenterY.GetValue(), + (sal_uInt16)aMtrTrgrBorder.GetValue(), 100, 100); String aString; @@ -178,7 +178,7 @@ IMPL_LINK(SvxTransparenceTabPage, ModifiedTrgrHdl_Impl, void *, pControl) return( 0L ); } -void SvxTransparenceTabPage::ActivateGradient(BOOL bActivate) +void SvxTransparenceTabPage::ActivateGradient(sal_Bool bActivate) { aFtTrgrType.Enable(bActivate); aLbTrgrGradientType.Enable(bActivate); @@ -281,7 +281,7 @@ SvxTransparenceTabPage::SvxTransparenceTabPage(Window* pParent, const SfxItemSet aCtlBitmapPreview ( this, CUI_RES( CTL_BITMAP_PREVIEW ) ), aCtlXRectPreview ( this, CUI_RES( CTL_TRANS_PREVIEW ) ), - bBitmap ( FALSE ), + bBitmap ( sal_False ), pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFillAttr ( pXPool ), rXFSet ( aXFillAttr.GetItemSet() ) @@ -323,33 +323,33 @@ SfxTabPage* SvxTransparenceTabPage::Create(Window* pWindow, const SfxItemSet& rA return(new SvxTransparenceTabPage(pWindow, rAttrs)); } -UINT16* SvxTransparenceTabPage::GetRanges() +sal_uInt16* SvxTransparenceTabPage::GetRanges() { return(pTransparenceRanges); } -BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) +sal_Bool SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) { const SfxPoolItem* pGradientItem = NULL; const SfxPoolItem* pLinearItem = NULL; - SfxItemState eStateGradient(rOutAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, TRUE, &pGradientItem)); - SfxItemState eStateLinear(rOutAttrs.GetItemState(XATTR_FILLTRANSPARENCE, TRUE, &pLinearItem)); - BOOL bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); - BOOL bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); + SfxItemState eStateGradient(rOutAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, sal_True, &pGradientItem)); + SfxItemState eStateLinear(rOutAttrs.GetItemState(XATTR_FILLTRANSPARENCE, sal_True, &pLinearItem)); + sal_Bool bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); + sal_Bool bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); // #103765# - BOOL bGradUsed = (eStateGradient == SFX_ITEM_DONTCARE); - BOOL bLinearUsed = (eStateLinear == SFX_ITEM_DONTCARE); + sal_Bool bGradUsed = (eStateGradient == SFX_ITEM_DONTCARE); + sal_Bool bLinearUsed = (eStateLinear == SFX_ITEM_DONTCARE); - BOOL bModified(FALSE); - BOOL bSwitchOffLinear(FALSE); - BOOL bSwitchOffGradient(FALSE); + sal_Bool bModified(sal_False); + sal_Bool bSwitchOffLinear(sal_False); + sal_Bool bSwitchOffGradient(sal_False); if(aMtrTransparent.IsEnabled()) { // linear transparence - UINT16 nPos = (UINT16)aMtrTransparent.GetValue(); - if(nPos != (UINT16)aMtrTransparent.GetSavedValue().ToInt32() || !bLinearActive) + sal_uInt16 nPos = (sal_uInt16)aMtrTransparent.GetValue(); + if(nPos != (sal_uInt16)aMtrTransparent.GetSavedValue().ToInt32() || !bLinearActive) { XFillTransparenceItem aItem(nPos); SdrShadowTransparenceItem aShadowItem(nPos); @@ -358,8 +358,8 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) { rAttrs.Put(aItem); rAttrs.Put(aShadowItem); - bModified = TRUE; - bSwitchOffGradient = TRUE; + bModified = sal_True; + bSwitchOffGradient = sal_True; } } } @@ -368,23 +368,23 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) // transparence gradient, fill ItemSet from values if(!bGradActive || (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos() != (XGradientStyle)aLbTrgrGradientType.GetSavedValue() - || (UINT16)aMtrTrgrAngle.GetValue() != (UINT16)aMtrTrgrAngle.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrCenterX.GetValue() != (UINT16)aMtrTrgrCenterX.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrCenterY.GetValue() != (UINT16)aMtrTrgrCenterY.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrBorder.GetValue() != (UINT16)aMtrTrgrBorder.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrStartValue.GetValue() != (UINT16)aMtrTrgrStartValue.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrEndValue.GetValue() != (UINT16)aMtrTrgrEndValue.GetSavedValue().ToInt32() ) + || (sal_uInt16)aMtrTrgrAngle.GetValue() != (sal_uInt16)aMtrTrgrAngle.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrCenterX.GetValue() != (sal_uInt16)aMtrTrgrCenterX.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrCenterY.GetValue() != (sal_uInt16)aMtrTrgrCenterY.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrBorder.GetValue() != (sal_uInt16)aMtrTrgrBorder.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrStartValue.GetValue() != (sal_uInt16)aMtrTrgrStartValue.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrEndValue.GetValue() != (sal_uInt16)aMtrTrgrEndValue.GetSavedValue().ToInt32() ) { - UINT8 nStartCol = (UINT8)(((UINT16)aMtrTrgrStartValue.GetValue() * 255) / 100); - UINT8 nEndCol = (UINT8)(((UINT16)aMtrTrgrEndValue.GetValue() * 255) / 100); + sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)aMtrTrgrStartValue.GetValue() * 255) / 100); + sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)aMtrTrgrEndValue.GetValue() * 255) / 100); XGradient aTmpGradient( Color(nStartCol, nStartCol, nStartCol), Color(nEndCol, nEndCol, nEndCol), (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos(), - (UINT16)aMtrTrgrAngle.GetValue() * 10, - (UINT16)aMtrTrgrCenterX.GetValue(), - (UINT16)aMtrTrgrCenterY.GetValue(), - (UINT16)aMtrTrgrBorder.GetValue(), + (sal_uInt16)aMtrTrgrAngle.GetValue() * 10, + (sal_uInt16)aMtrTrgrCenterX.GetValue(), + (sal_uInt16)aMtrTrgrCenterY.GetValue(), + (sal_uInt16)aMtrTrgrBorder.GetValue(), 100, 100); String aString; @@ -394,16 +394,16 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) if(!pOld || !(*(const XFillFloatTransparenceItem*)pOld == aItem) || !bGradActive) { rAttrs.Put(aItem); - bModified = TRUE; - bSwitchOffLinear = TRUE; + bModified = sal_True; + bSwitchOffLinear = sal_True; } } } else { // no transparence - bSwitchOffGradient = TRUE; - bSwitchOffLinear = TRUE; + bSwitchOffGradient = sal_True; + bSwitchOffLinear = sal_True; } // disable unused XFillFloatTransparenceItem @@ -415,9 +415,9 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) aGrad.SetEndIntens(100); String aString; XFillFloatTransparenceItem aItem( rXFSet.GetPool()/*aString*/, aGrad); - aItem.SetEnabled(FALSE); + aItem.SetEnabled(sal_False); rAttrs.Put(aItem); - bModified = TRUE; + bModified = sal_True; } // disable unused XFillFloatTransparenceItem @@ -427,7 +427,7 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) SdrShadowTransparenceItem aShadowItem(0); rAttrs.Put(aItem); rAttrs.Put(aShadowItem); - bModified = TRUE; + bModified = sal_True; } //add CHINA001 begin rAttrs.Put (CntUInt16Item(SID_PAGE_TYPE,nPageType)); @@ -438,30 +438,30 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) void SvxTransparenceTabPage::Reset(const SfxItemSet& rAttrs) { const SfxPoolItem* pGradientItem = NULL; - SfxItemState eStateGradient(rAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, TRUE, &pGradientItem)); + SfxItemState eStateGradient(rAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, sal_True, &pGradientItem)); if(!pGradientItem) pGradientItem = &rAttrs.Get(XATTR_FILLFLOATTRANSPARENCE); - BOOL bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); + sal_Bool bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); const SfxPoolItem* pLinearItem = NULL; - SfxItemState eStateLinear(rAttrs.GetItemState(XATTR_FILLTRANSPARENCE, TRUE, &pLinearItem)); + SfxItemState eStateLinear(rAttrs.GetItemState(XATTR_FILLTRANSPARENCE, sal_True, &pLinearItem)); if(!pLinearItem) pLinearItem = &rAttrs.Get(XATTR_FILLTRANSPARENCE); - BOOL bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); + sal_Bool bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); // transparence gradient const XGradient& rGradient = ((XFillFloatTransparenceItem*)pGradientItem)->GetGradientValue(); XGradientStyle eXGS(rGradient.GetGradientStyle()); - aLbTrgrGradientType.SelectEntryPos(sal::static_int_cast< USHORT >(eXGS)); + aLbTrgrGradientType.SelectEntryPos(sal::static_int_cast< sal_uInt16 >(eXGS)); aMtrTrgrAngle.SetValue(rGradient.GetAngle() / 10); aMtrTrgrBorder.SetValue(rGradient.GetBorder()); aMtrTrgrCenterX.SetValue(rGradient.GetXOffset()); aMtrTrgrCenterY.SetValue(rGradient.GetYOffset()); - aMtrTrgrStartValue.SetValue((UINT16)((((UINT16)rGradient.GetStartColor().GetRed() + 1) * 100) / 255)); - aMtrTrgrEndValue.SetValue((UINT16)((((UINT16)rGradient.GetEndColor().GetRed() + 1) * 100) / 255)); + aMtrTrgrStartValue.SetValue((sal_uInt16)((((sal_uInt16)rGradient.GetStartColor().GetRed() + 1) * 100) / 255)); + aMtrTrgrEndValue.SetValue((sal_uInt16)((((sal_uInt16)rGradient.GetEndColor().GetRed() + 1) * 100) / 255)); // linear transparence - UINT16 nTransp = ((XFillTransparenceItem*)pLinearItem)->GetValue(); + sal_uInt16 nTransp = ((XFillTransparenceItem*)pLinearItem)->GetValue(); aMtrTransparent.SetValue(bLinearActive ? nTransp : 50); ModifyTransparentHdl_Impl(NULL); @@ -496,7 +496,7 @@ void SvxTransparenceTabPage::Reset(const SfxItemSet& rAttrs) aMtrTrgrStartValue.SaveValue(); aMtrTrgrEndValue.SaveValue(); - BOOL bActive = InitPreview ( rAttrs ); + sal_Bool bActive = InitPreview ( rAttrs ); InvalidatePreview ( bActive ); } @@ -530,7 +530,7 @@ void SvxTransparenceTabPage::PointChanged(Window* , RECT_POINT eRcPt) // // Preview-Methods // -BOOL SvxTransparenceTabPage::InitPreview ( const SfxItemSet& rSet ) +sal_Bool SvxTransparenceTabPage::InitPreview ( const SfxItemSet& rSet ) { // set transparencetyp for preview if ( aRbtTransOff.IsChecked() ) @@ -572,7 +572,7 @@ BOOL SvxTransparenceTabPage::InitPreview ( const SfxItemSet& rSet ) return !aRbtTransOff.IsChecked(); } -void SvxTransparenceTabPage::InvalidatePreview (BOOL bEnable) +void SvxTransparenceTabPage::InvalidatePreview (sal_Bool bEnable) { if ( bBitmap ) { @@ -702,7 +702,7 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : aLbHatchBckgrdColor.Hide(); - aTsbOriginal.EnableTriState( FALSE ); + aTsbOriginal.EnableTriState( sal_False ); // this page needs ExchangeSupport @@ -719,8 +719,8 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : break; default: ;//prevent warning } - SetFieldUnit( aMtrFldXSize, eFUnit, TRUE ); - SetFieldUnit( aMtrFldYSize, eFUnit, TRUE ); + SetFieldUnit( aMtrFldXSize, eFUnit, sal_True ); + SetFieldUnit( aMtrFldYSize, eFUnit, sal_True ); // get PoolUnit SfxItemPool* pPool = rOutAttrs.GetPool(); @@ -765,7 +765,7 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : aTypeLB.SetSelectHdl( LINK( this, SvxAreaTabPage, SelectDialogTypeHdl_Impl ) ); // #i76307# always paint the preview in LTR, because this is what the document does - aCtlXRectPreview.EnableRTL(FALSE); + aCtlXRectPreview.EnableRTL(sal_False); } // ----------------------------------------------------------------------- @@ -785,8 +785,8 @@ void SvxAreaTabPage::Construct() void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) { - USHORT _nPos = 0; - USHORT nCount; + sal_uInt16 _nPos = 0; + sal_uInt16 nCount; //add CHINA001 Begin SFX_ITEMSET_ARG (&rSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False); SFX_ITEMSET_ARG (&rSet,pPosItem,SfxUInt16Item,SID_TABPAGE_POS,sal_False); @@ -797,7 +797,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) //add CHINA001 end if( nDlgType == 0 )//CHINA001 if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = TRUE; + *pbAreaTP = sal_True; if( pColorTab ) { @@ -979,11 +979,11 @@ int SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- -BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) +sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) { const SfxPoolItem* pOld = NULL; - USHORT _nPos; - BOOL bModified = FALSE; + sal_uInt16 _nPos; + sal_Bool bModified = sal_False; if( nDlgType != 0 || *pbAreaTP )//CHINA001 if( *pDlgType != 0 || *pbAreaTP ) { @@ -1000,7 +1000,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1017,20 +1017,20 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillColorItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // NEU if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE ) ) ) + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True ) ) ) { XFillStyleItem aStyleItem( XFILL_SOLID ); pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1048,20 +1048,20 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillGradientItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // NEU if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE ) ) ) + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True ) ) ) { XFillStyleItem aStyleItem( XFILL_GRADIENT ); pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1079,7 +1079,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillHatchItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } XFillBackgroundItem aItem ( aCbxHatchBckgrd.IsChecked() ); @@ -1094,20 +1094,20 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillColorItem*)pOld == aFillColorItem ) ) { rAttrs.Put( aFillColorItem ); - bModified = TRUE; + bModified = sal_True; } } // NEU if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE ) ) ) + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), sal_True ) ) ) { XFillStyleItem aStyleItem( XFILL_HATCH ); pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1125,20 +1125,20 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBitmapItem*)pOld == aFillBitmapItem ) ) { rAttrs.Put( aFillBitmapItem ); - bModified = TRUE; + bModified = sal_True; } } // NEU if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), TRUE ) ) ) + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True ) ) ) { XFillStyleItem aStyleItem( XFILL_BITMAP ); pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1148,22 +1148,22 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) // Schrittweite if( aTsbStepCount.IsEnabled() ) { - UINT16 nValue = 0; - BOOL bValueModified = FALSE; + sal_uInt16 nValue = 0; + sal_Bool bValueModified = sal_False; TriState eState = aTsbStepCount.GetState(); if( eState == STATE_CHECK ) { if( eState != aTsbStepCount.GetSavedValue() ) - bValueModified = TRUE; + bValueModified = sal_True; } else { // Zustand != Disabled ? if( aNumFldStepCount.GetText().Len() > 0 ) { - nValue = (UINT16) aNumFldStepCount.GetValue(); - if( nValue != (UINT16) aNumFldStepCount.GetSavedValue().ToInt32() ) - bValueModified = TRUE; + nValue = (sal_uInt16) aNumFldStepCount.GetValue(); + if( nValue != (sal_uInt16) aNumFldStepCount.GetSavedValue().ToInt32() ) + bValueModified = sal_True; } } if( bValueModified ) @@ -1173,7 +1173,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XGradientStepCountItem*)pOld == aFillBitmapItem ) ) { rAttrs.Put( aFillBitmapItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1185,12 +1185,12 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( eState != aTsbTile.GetSavedValue() ) { XFillBmpTileItem aFillBmpTileItem( - sal::static_int_cast< BOOL >( eState ) ); + sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_TILE ); if ( !pOld || !( *(const XFillBmpTileItem*)pOld == aFillBmpTileItem ) ) { rAttrs.Put( aFillBmpTileItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1201,19 +1201,19 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( eState != aTsbStretch.GetSavedValue() ) { XFillBmpStretchItem aFillBmpStretchItem( - sal::static_int_cast< BOOL >( eState ) ); + sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_STRETCH ); if ( !pOld || !( *(const XFillBmpStretchItem*)pOld == aFillBmpStretchItem ) ) { rAttrs.Put( aFillBmpStretchItem ); - bModified = TRUE; + bModified = sal_True; } } } // Originalgroesse (im UI) wird wie folgt benutzt: // Controls sind disabled, muessen aber gesetzt werden. - // SizeX = 0; SizeY = 0; Log = TRUE + // SizeX = 0; SizeY = 0; Log = sal_True //aTsbScale TriState eState = aTsbScale.GetState(); @@ -1226,7 +1226,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( aTsbScale.IsEnabled() ) pItem = new XFillBmpSizeLogItem( eState == STATE_NOCHECK ); else if( aTsbOriginal.IsEnabled() && aTsbOriginal.GetState() == STATE_CHECK ) - pItem = new XFillBmpSizeLogItem( TRUE ); + pItem = new XFillBmpSizeLogItem( sal_True ); if( pItem ) { @@ -1234,7 +1234,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBmpSizeLogItem*)pOld == *pItem ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -1271,7 +1271,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBmpSizeXItem*)pOld == *pItem ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -1308,7 +1308,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBmpSizeYItem*)pOld == *pItem ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -1327,24 +1327,24 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) { if( aRbtRow.IsChecked() ) { - XFillBmpTileOffsetXItem aFillBmpTileOffsetXItem( (UINT16) aMtrFldOffset.GetValue() ); + XFillBmpTileOffsetXItem aFillBmpTileOffsetXItem( (sal_uInt16) aMtrFldOffset.GetValue() ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_TILEOFFSETX ); if ( !pOld || !( *(const XFillBmpTileOffsetXItem*)pOld == aFillBmpTileOffsetXItem ) ) { rAttrs.Put( aFillBmpTileOffsetXItem ); rAttrs.Put( XFillBmpTileOffsetYItem( 0 ) ); - bModified = TRUE; + bModified = sal_True; } } else if( aRbtColumn.IsChecked() ) { - XFillBmpTileOffsetYItem aFillBmpTileOffsetYItem( (UINT16) aMtrFldOffset.GetValue() ); + XFillBmpTileOffsetYItem aFillBmpTileOffsetYItem( (sal_uInt16) aMtrFldOffset.GetValue() ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_TILEOFFSETY ); if ( !pOld || !( *(const XFillBmpTileOffsetYItem*)pOld == aFillBmpTileOffsetYItem ) ) { rAttrs.Put( aFillBmpTileOffsetYItem ); rAttrs.Put( XFillBmpTileOffsetXItem( 0 ) ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1353,16 +1353,16 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) //aCtlPosition if( aCtlPosition.IsEnabled() ) { - BOOL bPut = FALSE; + sal_Bool bPut = sal_False; RECT_POINT _eRP = aCtlPosition.GetActualRP(); if( SFX_ITEM_DONTCARE == rOutAttrs.GetItemState( XATTR_FILLBMP_POS ) ) - bPut = TRUE; + bPut = sal_True; else { RECT_POINT eValue = ( ( const XFillBmpPosItem& ) rOutAttrs.Get( XATTR_FILLBMP_POS ) ).GetValue(); if( eValue != _eRP ) - bPut = TRUE; + bPut = sal_True; } if( bPut ) { @@ -1371,7 +1371,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBmpPosItem*)pOld == aFillBmpPosItem ) ) { rAttrs.Put( aFillBmpPosItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1383,12 +1383,12 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( sMtrXOffset.Len() > 0 && sMtrXOffset != aMtrFldXOffset.GetSavedValue() ) { - XFillBmpPosOffsetXItem aFillBmpPosOffsetXItem( (UINT16) aMtrFldXOffset.GetValue() ); + XFillBmpPosOffsetXItem aFillBmpPosOffsetXItem( (sal_uInt16) aMtrFldXOffset.GetValue() ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_POSOFFSETX ); if ( !pOld || !( *(const XFillBmpPosOffsetXItem*)pOld == aFillBmpPosOffsetXItem ) ) { rAttrs.Put( aFillBmpPosOffsetXItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1400,12 +1400,12 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( sMtrYOffset.Len() > 0 && sMtrYOffset != aMtrFldYOffset.GetSavedValue() ) { - XFillBmpPosOffsetYItem aFillBmpPosOffsetYItem( (UINT16) aMtrFldYOffset.GetValue() ); + XFillBmpPosOffsetYItem aFillBmpPosOffsetYItem( (sal_uInt16) aMtrFldYOffset.GetValue() ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_POSOFFSETY ); if ( !pOld || !( *(const XFillBmpPosOffsetYItem*)pOld == aFillBmpPosOffsetYItem ) ) { rAttrs.Put( aFillBmpPosOffsetYItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1429,7 +1429,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) { eXFS = (XFillStyle) ( ( ( const XFillStyleItem& ) rAttrs. Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue() ); - aTypeLB.SelectEntryPos( sal::static_int_cast< USHORT >( eXFS ) ); + aTypeLB.SelectEntryPos( sal::static_int_cast< sal_uInt16 >( eXFS ) ); switch( eXFS ) { case XFILL_NONE: @@ -1437,7 +1437,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) break; case XFILL_SOLID: - //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( XATTR_FILLCOLOR ) ) { XFillColorItem aColorItem( ( const XFillColorItem& ) @@ -1451,7 +1451,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) break; case XFILL_GRADIENT: - //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) ) + //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True, &pPoolItem ) ) if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( XATTR_FILLGRADIENT ) ) { XFillGradientItem aGradientItem( ( ( const XFillGradientItem& ) @@ -1465,7 +1465,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) break; case XFILL_HATCH: - //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE, &pPoolItem ) ) + //if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), sal_True, &pPoolItem ) ) if( SFX_ITEM_DONTCARE != rAttrs.GetItemState( XATTR_FILLHATCH ) ) { aLbHatching.SelectEntry( ( ( const XFillHatchItem& ) @@ -1527,8 +1527,8 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) if( ( rAttrs.GetItemState( XATTR_GRADIENTSTEPCOUNT ) != SFX_ITEM_DONTCARE ) || ( rAttrs.GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE ) ) { - aTsbStepCount.EnableTriState( FALSE ); - UINT16 nValue = ( ( const XGradientStepCountItem& ) rAttrs.Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue(); + aTsbStepCount.EnableTriState( sal_False ); + sal_uInt16 nValue = ( ( const XGradientStepCountItem& ) rAttrs.Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue(); if( nValue == 0 ) { aTsbStepCount.SetState( STATE_CHECK ); @@ -1552,7 +1552,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) // Ist Kacheln gesetzt? if( rAttrs.GetItemState( XATTR_FILLBMP_TILE ) != SFX_ITEM_DONTCARE ) { - aTsbTile.EnableTriState( FALSE ); + aTsbTile.EnableTriState( sal_False ); if( ( ( const XFillBmpTileItem& ) rAttrs.Get( XATTR_FILLBMP_TILE ) ).GetValue() ) aTsbTile.SetState( STATE_CHECK ); @@ -1565,7 +1565,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) // Ist Stretchen gesetzt? if( rAttrs.GetItemState( XATTR_FILLBMP_STRETCH ) != SFX_ITEM_DONTCARE ) { - aTsbStretch.EnableTriState( FALSE ); + aTsbStretch.EnableTriState( sal_False ); if( ( ( const XFillBmpStretchItem& ) rAttrs.Get( XATTR_FILLBMP_STRETCH ) ).GetValue() ) aTsbStretch.SetState( STATE_CHECK ); @@ -1579,7 +1579,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aTsbScale if( rAttrs.GetItemState( XATTR_FILLBMP_SIZELOG ) != SFX_ITEM_DONTCARE ) { - aTsbScale.EnableTriState( FALSE ); + aTsbScale.EnableTriState( sal_False ); if( ( ( const XFillBmpSizeLogItem& ) rAttrs.Get( XATTR_FILLBMP_SIZELOG ) ).GetValue() ) aTsbScale.SetState( STATE_NOCHECK ); @@ -1598,7 +1598,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldXSize if( rAttrs.GetItemState( XATTR_FILLBMP_SIZEX ) != SFX_ITEM_DONTCARE ) { - INT32 nValue = ( ( const XFillBmpSizeXItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEX ) ).GetValue(); + sal_Int32 nValue = ( ( const XFillBmpSizeXItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEX ) ).GetValue(); if( aTsbScale.GetState() == STATE_CHECK ) { // Wenn im Item eine Prozentangabe steckt, @@ -1626,7 +1626,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldYSize if( rAttrs.GetItemState( XATTR_FILLBMP_SIZEY ) != SFX_ITEM_DONTCARE ) { - INT32 nValue = ( ( const XFillBmpSizeYItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEY ) ).GetValue(); + sal_Int32 nValue = ( ( const XFillBmpSizeYItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEY ) ).GetValue(); if( aTsbScale.GetState() == STATE_CHECK ) { // Wenn im Item eine Prozentangabe steckt, @@ -1660,7 +1660,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldOffset if( rAttrs.GetItemState( XATTR_FILLBMP_TILEOFFSETX ) != SFX_ITEM_DONTCARE ) { - UINT16 nValue = ( ( const XFillBmpTileOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_TILEOFFSETX ) ).GetValue(); + sal_uInt16 nValue = ( ( const XFillBmpTileOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_TILEOFFSETX ) ).GetValue(); if( nValue > 0 ) { aMtrFldOffset.SetValue( nValue ); @@ -1694,7 +1694,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldXOffset if( rAttrs.GetItemState( XATTR_FILLBMP_POSOFFSETX ) != SFX_ITEM_DONTCARE ) { - INT32 nValue = ( ( const XFillBmpPosOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETX ) ).GetValue(); + sal_Int32 nValue = ( ( const XFillBmpPosOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETX ) ).GetValue(); aMtrFldXOffset.SetValue( nValue ); } else @@ -1703,7 +1703,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldYOffset if( rAttrs.GetItemState( XATTR_FILLBMP_POSOFFSETY ) != SFX_ITEM_DONTCARE ) { - INT32 nValue = ( ( const XFillBmpPosOffsetYItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETY ) ).GetValue(); + sal_Int32 nValue = ( ( const XFillBmpPosOffsetYItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETY ) ).GetValue(); aMtrFldYOffset.SetValue( nValue ); } else @@ -1746,7 +1746,7 @@ SfxTabPage* SvxAreaTabPage::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SvxAreaTabPage::GetRanges() +sal_uInt16* SvxAreaTabPage::GetRanges() { return( pAreaRanges ); } @@ -1878,7 +1878,7 @@ IMPL_LINK( SvxAreaTabPage, ClickColorHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyColorHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbColor.GetSelectEntryPos(); aLbHatchBckgrdColor.SelectEntryPos( _nPos ); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -1887,7 +1887,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyColorHdl_Impl, void *, EMPTYARG ) aLbColor.GetSelectEntryColor() ) ); } // NEU - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_SOLID ) ); Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetColorValue() ); @@ -1969,7 +1969,7 @@ IMPL_LINK( SvxAreaTabPage, ClickGradientHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyGradientHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbGradient.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbGradient.GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { // ItemSet fuellen und an aCtlXRectPreview weiterleiten @@ -1980,7 +1980,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyGradientHdl_Impl, void *, EMPTYARG ) pEntry->GetGradient() ) ); } // NEU - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_GRADIENT ) ); rXFSet.Put( XFillGradientItem( String(), ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() ) ); @@ -2066,7 +2066,7 @@ IMPL_LINK( SvxAreaTabPage, ClickHatchingHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyHatchingHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbHatching.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbHatching.GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { // ItemSet fuellen und an aCtlXRectPreview weiterleiten @@ -2076,7 +2076,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyHatchingHdl_Impl, void *, EMPTYARG ) rXFSet.Put( XFillHatchItem( String(), pEntry->GetHatch() ) ); } // NEU - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_HATCH ) ); rXFSet.Put( XFillHatchItem( String(), ( ( const XFillHatchItem* ) pPoolItem )->GetHatchValue() ) ); @@ -2095,7 +2095,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyHatchingHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbHatchBckgrdColor.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbHatchBckgrdColor.GetSelectEntryPos(); aLbColor.SelectEntryPos( _nPos ); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -2104,7 +2104,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl, void *, EMPTYARG ) aLbHatchBckgrdColor.GetSelectEntryColor() ) ); } // NEU - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { // rXFSet.Put( XFillStyleItem( XFILL_SOLID ) ); Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetColorValue() ); @@ -2232,7 +2232,7 @@ IMPL_LINK( SvxAreaTabPage, ClickBitmapHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyBitmapHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbBitmap.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbBitmap.GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { // ItemSet fuellen und an aCtlXRectPreview weiterleiten @@ -2242,7 +2242,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyBitmapHdl_Impl, void *, EMPTYARG ) rXFSet.Put( XFillBitmapItem( String(), pEntry->GetXBitmap() ) ); } // NEU - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_BITMAP ) ); rXFSet.Put( XFillBitmapItem( String(), ( ( const XFillBitmapItem* ) pPoolItem )->GetBitmapValue() ) ); @@ -2260,7 +2260,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyBitmapHdl_Impl, void *, EMPTYARG ) //IMPL_LINK( SvxAreaTabPage, ModifyTransparentHdl_Impl, void *, EMPTYARG ) //{ -// USHORT nPos = aLbTransparent.GetSelectEntryPos(); +// sal_uInt16 nPos = aLbTransparent.GetSelectEntryPos(); // if( nPos != LISTBOX_ENTRY_NOTFOUND ) // { // XFillTransparenceItem aItem( nPos * 25 ); @@ -2291,12 +2291,12 @@ IMPL_LINK( SvxAreaTabPage, ModifyStepCountHdl_Impl, void *, p ) aNumFldStepCount.Disable(); } - UINT16 nValue = 0; + sal_uInt16 nValue = 0; if( aTsbStepCount.GetState() != STATE_CHECK ) { // Zustand != Disabled ? if( aNumFldStepCount.GetText().Len() > 0 ) - nValue = (UINT16) aNumFldStepCount.GetValue(); + nValue = (sal_uInt16) aNumFldStepCount.GetValue(); } rXFSet.Put( XGradientStepCountItem( nValue ) ); aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() ); @@ -2421,12 +2421,12 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) */ } - rXFSet.Put( XFillBmpTileItem( sal::static_int_cast< BOOL >( eState ) ) ); + rXFSet.Put( XFillBmpTileItem( sal::static_int_cast< sal_Bool >( eState ) ) ); if( aTsbStretch.IsEnabled() ) rXFSet.Put( XFillBmpStretchItem( - sal::static_int_cast< BOOL >( aTsbStretch.GetState() ) ) ); + sal::static_int_cast< sal_Bool >( aTsbStretch.GetState() ) ) ); if( aTsbScale.IsEnabled() ) rXFSet.Put( XFillBmpSizeLogItem( aTsbScale.GetState() == STATE_NOCHECK ) ); @@ -2449,7 +2449,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) { // Originalgroesse -> Size == 0 rXFSet.Put( XFillBmpSizeXItem( 0 ) ); - rXFSet.Put( XFillBmpSizeLogItem( TRUE ) ); + rXFSet.Put( XFillBmpSizeLogItem( sal_True ) ); } if( aMtrFldYSize.IsEnabled() ) @@ -2470,20 +2470,20 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) { // Originalgroesse -> Size == 0 rXFSet.Put( XFillBmpSizeYItem( 0 ) ); - rXFSet.Put( XFillBmpSizeLogItem( TRUE ) ); + rXFSet.Put( XFillBmpSizeLogItem( sal_True ) ); } if( aMtrFldOffset.IsEnabled() ) { if( aRbtRow.IsChecked() ) { - rXFSet.Put( XFillBmpTileOffsetXItem( (UINT16) aMtrFldOffset.GetValue() ) ); - rXFSet.Put( XFillBmpTileOffsetYItem( (UINT16) 0 ) ); + rXFSet.Put( XFillBmpTileOffsetXItem( (sal_uInt16) aMtrFldOffset.GetValue() ) ); + rXFSet.Put( XFillBmpTileOffsetYItem( (sal_uInt16) 0 ) ); } else if( aRbtColumn.IsChecked() ) { - rXFSet.Put( XFillBmpTileOffsetXItem( (UINT16) 0 ) ); - rXFSet.Put( XFillBmpTileOffsetYItem( (UINT16) aMtrFldOffset.GetValue() ) ); + rXFSet.Put( XFillBmpTileOffsetXItem( (sal_uInt16) 0 ) ); + rXFSet.Put( XFillBmpTileOffsetYItem( (sal_uInt16) aMtrFldOffset.GetValue() ) ); } } @@ -2491,10 +2491,10 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) rXFSet.Put( XFillBmpPosItem( aCtlPosition.GetActualRP() ) ); if( aMtrFldXOffset.IsEnabled() ) - rXFSet.Put( XFillBmpPosOffsetXItem( (UINT16) aMtrFldXOffset.GetValue() ) ); + rXFSet.Put( XFillBmpPosOffsetXItem( (sal_uInt16) aMtrFldXOffset.GetValue() ) ); if( aMtrFldYOffset.IsEnabled() ) - rXFSet.Put( XFillBmpPosOffsetYItem( (UINT16) aMtrFldYOffset.GetValue() ) ); + rXFSet.Put( XFillBmpPosOffsetYItem( (sal_uInt16) aMtrFldYOffset.GetValue() ) ); aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() ); diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 9060b6fb013e..640df280f066 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -166,12 +166,12 @@ void SvxBitmapTabPage::Construct() void SvxBitmapTabPage::ActivatePage( const SfxItemSet& ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -254,9 +254,9 @@ int SvxBitmapTabPage::DeactivatePage( SfxItemSet* _pSet) // ----------------------------------------------------------------------- -BOOL SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) +sal_Bool SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) { - if( *pDlgType == 0 && *pbAreaTP == FALSE ) // Flaechen-Dialog + if( *pDlgType == 0 && *pbAreaTP == sal_False ) // Flaechen-Dialog { if( *pPageType == PT_BITMAP ) { @@ -264,7 +264,7 @@ BOOL SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) XOBitmap aXOBitmap; String aString; - USHORT nPos = aLbBitmaps.GetSelectEntryPos(); + sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aXOBitmap = pBitmapList->GetBitmap( nPos )->GetXBitmap(); @@ -284,7 +284,7 @@ BOOL SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) _rOutAttrs.Put( XFillBitmapItem( aString, aXOBitmap ) ); } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -342,11 +342,11 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) else { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), sal_True, &pPoolItem ) ) { XFillStyle eXFS = (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue(); if( ( XFILL_BITMAP == eXFS ) && - ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), TRUE, &pPoolItem ) ) ) + ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True, &pPoolItem ) ) ) { pXOBitmap = new XOBitmap( ( ( const XFillBitmapItem* ) pPoolItem )->GetBitmapValue() ); } @@ -363,11 +363,11 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) { //WorkWindow aTmpWW( DLGWIN ); //VirtualDevice aVD( aTmpWW ); - //USHORT nLines = aCtlPixel.GetLineCount(); + //sal_uInt16 nLines = aCtlPixel.GetLineCount(); //Color aPixelColor, aBackColor; - //BOOL bPixelColor = FALSE; - //USHORT nWidth = pBitmap->GetSizePixel().Width(); - //USHORT nHeight = pBitmap->GetSizePixel().Height(); + //sal_Bool bPixelColor = sal_False; + //sal_uInt16 nWidth = pBitmap->GetSizePixel().Width(); + //sal_uInt16 nHeight = pBitmap->GetSizePixel().Height(); // #85339# try to convert bitmapped item to array item. if(pXOBitmap->GetBitmapType() == XBITMAP_IMPORT) @@ -381,7 +381,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) sal_uInt32 nCol1(0xffffffff); // background sal_uInt32 nCol2(0xffffffff); // pixel BitmapReadAccess* pAccess = aBitmap.AcquireReadAccess(); - sal_Bool bValid(TRUE); + sal_Bool bValid(sal_True); if(pAccess) { @@ -414,7 +414,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) else { // Third color detected - bValid = FALSE; + bValid = sal_False; } } else @@ -437,7 +437,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) else { // no access -> no success - bValid = FALSE; + bValid = sal_False; } if(bValid) @@ -470,7 +470,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) if( pXOBitmap->GetBitmapType() == XBITMAP_IMPORT ) { aCtlPixel.Reset(); - aCtlPixel.SetPaintable( FALSE ); + aCtlPixel.SetPaintable( sal_False ); aCtlPixel.Disable(); aFtPixelEdit.Disable(); aFtColor.Disable(); @@ -482,7 +482,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) } else if( pXOBitmap->GetBitmapType() == XBITMAP_8X8 ) { - aCtlPixel.SetPaintable( TRUE ); + aCtlPixel.SetPaintable( sal_True ); aCtlPixel.Enable(); aFtPixelEdit.Enable(); aFtColor.Enable(); @@ -531,7 +531,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlPreview.Invalidate(); - bBmpChanged = FALSE; + bBmpChanged = sal_False; delete pXOBitmap; } return 0L; @@ -541,7 +541,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) long SvxBitmapTabPage::CheckChanges_Impl() { - USHORT nPos = aLbBitmaps.GetSelectEntryPos(); + sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { String aString = aLbBitmaps.GetSelectEntry(); @@ -582,7 +582,7 @@ long SvxBitmapTabPage::CheckChanges_Impl() case RET_CANCEL: // return( -1L ); break; - // return( TRUE ); // Abbruch + // return( sal_True ); // Abbruch } delete aMessDlg; //add by CHINA001 } @@ -604,18 +604,18 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pBitmapList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pBitmapList->GetBitmap( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -623,17 +623,17 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 WarningBox* pWarnBox = NULL; - USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE; + sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; while( pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pBitmapList->GetBitmap( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { nError = 0; @@ -671,7 +671,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) else // Es muss sich um eine nicht vorhandene importierte Bitmap handeln { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( XATTR_FILLBITMAP, TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( XATTR_FILLBITMAP, sal_True, &pPoolItem ) ) { XOBitmap aXOBitmap( ( ( const XFillBitmapItem* ) pPoolItem )->GetBitmapValue() ); pEntry = new XBitmapEntry( aXOBitmap, aName ); @@ -690,7 +690,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbBitmaps.GetPosPixel(), aLbBitmaps.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); //aLbBitmaps.Invalidate(); @@ -758,12 +758,12 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) { pDlg->GetName( aName ); - BOOL bDifferent = TRUE; + sal_Bool bDifferent = sal_True; long nCount = pBitmapList->Count(); for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pBitmapList->GetBitmap( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { nError = 0; @@ -799,7 +799,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbBitmaps.GetPosPixel(), aLbBitmaps.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); //aLbBitmaps.Invalidate(); @@ -830,7 +830,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbBitmaps.GetSelectEntryPos(); + sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -846,24 +846,24 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 long nCount = pBitmapList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pBitmapList->GetBitmap( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; XBitmapEntry* pEntry = pBitmapList->GetBitmap( nPos ); pEntry->SetName( aName ); @@ -882,7 +882,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) // Flag fuer modifiziert setzen *pnBitmapListState |= CT_MODIFIED; - bBmpChanged = FALSE; + bBmpChanged = sal_False; } else { @@ -900,7 +900,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxBitmapTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbBitmaps.GetSelectEntryPos(); + sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -936,7 +936,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxBitmapTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; ResMgr& rMgr = CUI_MGR(); if ( *pnBitmapListState & CT_MODIFIED ) @@ -1108,7 +1108,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangePixelColorHdl_Impl, void *, EMPTYARG ) aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlPreview.Invalidate(); - bBmpChanged = TRUE; + bBmpChanged = sal_True; return 0L; } @@ -1127,7 +1127,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl, void *, EMPTYARG ) aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlPreview.Invalidate(); - bBmpChanged = TRUE; + bBmpChanged = sal_True; return 0L; } @@ -1145,7 +1145,7 @@ void SvxBitmapTabPage::PointChanged( Window* pWindow, RECT_POINT ) aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlPreview.Invalidate(); - bBmpChanged = TRUE; + bBmpChanged = sal_True; } } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 5152bd0e9478..d1e39b9cd8a0 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -117,7 +117,7 @@ SvxColorTabPage::SvxColorTabPage rOutAttrs ( rInAttrs ), pColorTab( NULL ), - bDeleteColorTable ( TRUE ), + bDeleteColorTable ( sal_True ), pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFStyleItem ( XFILL_SOLID ), @@ -189,7 +189,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& ) { if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -204,7 +204,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& ) else if( *pPageType == PT_COLOR && *pPos == LISTBOX_ENTRY_NOTFOUND ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { aLbColorModel.SelectEntryPos( CM_RGB ); @@ -286,7 +286,7 @@ long SvxColorTabPage::CheckChanges_Impl() if (eCM != CM_RGB) ConvertColorValues (aTmpColor, CM_RGB); - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { Color aColor = pColorTab->GetColor( nPos )->GetColor(); @@ -336,7 +336,7 @@ long SvxColorTabPage::CheckChanges_Impl() case RET_CANCEL: // return( -1L ); <-- wuerde die Seite nicht verlassen break; - // return( TRUE ); // Abbruch + // return( sal_True ); // Abbruch } delete aMessDlg; //add by CHINA001 } @@ -354,17 +354,17 @@ long SvxColorTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxColorTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxColorTabPage::FillItemSet( SfxItemSet& rSet ) { if( ( *pDlgType != 0 ) || - ( *pPageType == PT_COLOR && *pbAreaTP == FALSE ) ) + ( *pPageType == PT_COLOR && *pbAreaTP == sal_False ) ) { String aString; Color aColor; // CheckChanges_Impl(); <-- doppelte Abfrage ? - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aColor = pColorTab->GetColor( nPos )->GetColor(); @@ -380,14 +380,14 @@ BOOL SvxColorTabPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( XFillStyleItem( XFILL_SOLID ) ); } - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- void SvxColorTabPage::Reset( const SfxItemSet& rSet ) { - USHORT nState = rSet.GetItemState( XATTR_FILLCOLOR ); + sal_uInt16 nState = rSet.GetItemState( XATTR_FILLCOLOR ); if ( nState >= SFX_ITEM_DEFAULT ) { @@ -399,7 +399,7 @@ void SvxColorTabPage::Reset( const SfxItemSet& rSet ) // Farbmodell setzen String aStr = GetUserData(); - aLbColorModel.SelectEntryPos( (USHORT) aStr.ToInt32() ); + aLbColorModel.SelectEntryPos( (sal_uInt16) aStr.ToInt32() ); ChangeColorHdl_Impl( this ); SelectColorModelHdl_Impl( this ); @@ -439,10 +439,10 @@ SfxTabPage* SvxColorTabPage::Create( Window* pWindow, IMPL_LINK( SvxColorTabPage, ModifiedHdl_Impl, void *, EMPTYARG ) { // lese aktuelle MtrFields aus, wenn cmyk, dann k-Wert als Trans.-Farbe - aAktuellColor.SetColor ( Color( (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel4.GetValue() ), - (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel1.GetValue() ), - (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel2.GetValue() ), - (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel3.GetValue() ) ).GetColor() ); + aAktuellColor.SetColor ( Color( (sal_uInt8)PercentToColor_Impl( (sal_uInt16) aMtrFldColorModel4.GetValue() ), + (sal_uInt8)PercentToColor_Impl( (sal_uInt16) aMtrFldColorModel1.GetValue() ), + (sal_uInt8)PercentToColor_Impl( (sal_uInt16) aMtrFldColorModel2.GetValue() ), + (sal_uInt8)PercentToColor_Impl( (sal_uInt16) aMtrFldColorModel3.GetValue() ) ).GetColor() ); Color aTmpColor(aAktuellColor); if (eCM != CM_RGB) @@ -476,12 +476,12 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) String aName( aEdtName.GetText() ); XColorEntry* pEntry; long nCount = pColorTab->Count(); - BOOL bDifferent = TRUE; + sal_Bool bDifferent = sal_True; // Pruefen, ob Name schon vorhanden ist for ( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pColorTab->GetColor( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; // Wenn ja, wird wiederholt ein neuer Name angefordert if ( !bDifferent ) @@ -495,21 +495,21 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while ( !bDifferent && bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pColorTab->GetColor( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) - bLoop = FALSE; + bLoop = sal_False; else aWarningBox.Execute(); } @@ -554,7 +554,7 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) // IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -562,12 +562,12 @@ IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) String aDesc( ResId( RID_SVXSTR_DESC_COLOR, rMgr ) ); String aName( aEdtName.GetText() ); long nCount = pColorTab->Count(); - BOOL bDifferent = TRUE; + sal_Bool bDifferent = sal_True; // Pruefen, ob Name schon vorhanden ist for ( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pColorTab->GetColor( i )->GetName() && nPos != i ) - bDifferent = FALSE; + bDifferent = sal_False; // Wenn ja, wird wiederholt ein neuer Name angefordert if ( !bDifferent ) @@ -581,19 +581,19 @@ IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while ( !bDifferent && bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for ( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pColorTab->GetColor( i )->GetName() && nPos != i ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) - bLoop = FALSE; + bLoop = sal_False; else aWarningBox.Execute(); } @@ -645,7 +645,7 @@ IMPL_LINK( SvxColorTabPage, ClickWorkOnHdl_Impl, void *, EMPTYARG ) if( pColorDlg->Execute() == RET_OK ) { - USHORT nK = 0; + sal_uInt16 nK = 0; Color aPreviewColor = pColorDlg->GetColor(); aAktuellColor = aPreviewColor; if (eCM != CM_RGB) @@ -675,7 +675,7 @@ IMPL_LINK( SvxColorTabPage, ClickWorkOnHdl_Impl, void *, EMPTYARG ) // IMPL_LINK( SvxColorTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -685,14 +685,14 @@ IMPL_LINK( SvxColorTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) if( aQueryBox.Execute() == RET_YES ) { // Jetzt wird richtig geloescht - ULONG nCount = pColorTab->Count() - 1; + sal_uLong nCount = pColorTab->Count() - 1; XColorEntry* pEntry; pEntry = pColorTab->Remove( nPos ); DBG_ASSERT( pEntry, "ColorEntry nicht vorhanden (1) !" ); delete pEntry; - for( ULONG i = nPos; i < nCount; i++ ) + for( sal_uLong i = nPos; i < nCount; i++ ) { pEntry = pColorTab->Remove( i + 1 ); DBG_ASSERT( pEntry, "ColorEntry nicht vorhanden (2) !" ); @@ -733,7 +733,7 @@ IMPL_LINK( SvxColorTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxColorTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if( *pnColorTableState & CT_MODIFIED ) { @@ -787,7 +787,7 @@ IMPL_LINK( SvxColorTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if( bDeleteColorTable ) delete pColorTab; else - bDeleteColorTable = TRUE; + bDeleteColorTable = sal_True; } pColorTab = pColTab; @@ -934,7 +934,7 @@ IMPL_LINK( SvxColorTabPage, ClickSaveHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxColorTabPage, SelectColorLBHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aValSetColorTable.SelectItem( nPos + 1 ); @@ -957,7 +957,7 @@ IMPL_LINK( SvxColorTabPage, SelectColorLBHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxColorTabPage, SelectValSetHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aValSetColorTable.GetSelectItemId(); + sal_uInt16 nPos = aValSetColorTable.GetSelectItemId(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aLbColor.SelectEntryPos( nPos - 1 ); @@ -987,16 +987,16 @@ void SvxColorTabPage::ConvertColorValues (Color& rColor, ColorModel eModell) { case CM_RGB: { - CmykToRgb_Impl (rColor, (USHORT)rColor.GetTransparency() ); - rColor.SetTransparency ((UINT8) 0); + CmykToRgb_Impl (rColor, (sal_uInt16)rColor.GetTransparency() ); + rColor.SetTransparency ((sal_uInt8) 0); } break; case CM_CMYK: { - USHORT nK; + sal_uInt16 nK; RgbToCmyk_Impl (rColor, nK ); - rColor.SetTransparency ((UINT8) nK); + rColor.SetTransparency ((sal_uInt8) nK); } break; } @@ -1162,7 +1162,7 @@ void SvxColorTabPage::FillValueSet_Impl( ValueSet& rVs ) for( long i = 0; i < nCount; i++ ) { pColorEntry = pColorTab->GetColor( i ); - rVs.InsertItem( (USHORT) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() ); + rVs.InsertItem( (sal_uInt16) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() ); } } @@ -1174,10 +1174,10 @@ void SvxColorTabPage::FillValueSet_Impl( ValueSet& rVs ) // Bei weiteren Farbmodellen sollte man hierfuer eigene Klassen entwickeln, // die dann auch entsprechende Casts enthalten. -void SvxColorTabPage::RgbToCmyk_Impl( Color& rColor, USHORT& rK ) +void SvxColorTabPage::RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK ) { - USHORT nColor1, nColor2, nColor3; - USHORT nProzent; // nur temporaer !!! + sal_uInt16 nColor1, nColor2, nColor3; + sal_uInt16 nProzent; // nur temporaer !!! nColor1 = 255 - rColor.GetRed(); nProzent = ColorToPercent_Impl( nColor1 ); @@ -1190,16 +1190,16 @@ void SvxColorTabPage::RgbToCmyk_Impl( Color& rColor, USHORT& rK ) rK = Min( Min( nColor1, nColor2 ), nColor3 ); - rColor.SetRed( sal::static_int_cast< UINT8 >( nColor1 - rK ) ); - rColor.SetGreen( sal::static_int_cast< UINT8 >( nColor2 - rK ) ); - rColor.SetBlue( sal::static_int_cast< UINT8 >( nColor3 - rK ) ); + rColor.SetRed( sal::static_int_cast< sal_uInt8 >( nColor1 - rK ) ); + rColor.SetGreen( sal::static_int_cast< sal_uInt8 >( nColor2 - rK ) ); + rColor.SetBlue( sal::static_int_cast< sal_uInt8 >( nColor3 - rK ) ); } //------------------------------------------------------------------------ // Umgekehrter Fall zu RgbToCmyk_Impl (s.o.) -void SvxColorTabPage::CmykToRgb_Impl( Color& rColor, const USHORT nK ) +void SvxColorTabPage::CmykToRgb_Impl( Color& rColor, const sal_uInt16 nK ) { long lTemp; @@ -1207,26 +1207,26 @@ void SvxColorTabPage::CmykToRgb_Impl( Color& rColor, const USHORT nK ) if( lTemp < 0L ) lTemp = 0L; - rColor.SetRed( (BYTE)lTemp ); + rColor.SetRed( (sal_uInt8)lTemp ); lTemp = 255 - ( rColor.GetGreen() + nK ); if( lTemp < 0L ) lTemp = 0L; - rColor.SetGreen( (BYTE)lTemp ); + rColor.SetGreen( (sal_uInt8)lTemp ); lTemp = 255 - ( rColor.GetBlue() + nK ); if( lTemp < 0L ) lTemp = 0L; - rColor.SetBlue( (BYTE)lTemp ); + rColor.SetBlue( (sal_uInt8)lTemp ); } //------------------------------------------------------------------------ -USHORT SvxColorTabPage::ColorToPercent_Impl( USHORT nColor ) +sal_uInt16 SvxColorTabPage::ColorToPercent_Impl( sal_uInt16 nColor ) { - USHORT nWert = 0; + sal_uInt16 nWert = 0; switch (eCM) { @@ -1235,7 +1235,7 @@ USHORT SvxColorTabPage::ColorToPercent_Impl( USHORT nColor ) break; case CM_CMYK: - nWert = (USHORT) ( (double) nColor * 100.0 / 255.0 + 0.5 ); + nWert = (sal_uInt16) ( (double) nColor * 100.0 / 255.0 + 0.5 ); break; } @@ -1244,9 +1244,9 @@ USHORT SvxColorTabPage::ColorToPercent_Impl( USHORT nColor ) //------------------------------------------------------------------------ -USHORT SvxColorTabPage::PercentToColor_Impl( USHORT nPercent ) +sal_uInt16 SvxColorTabPage::PercentToColor_Impl( sal_uInt16 nPercent ) { - USHORT nWert = 0; + sal_uInt16 nWert = 0; switch (eCM) { @@ -1255,7 +1255,7 @@ USHORT SvxColorTabPage::PercentToColor_Impl( USHORT nPercent ) break; case CM_CMYK: - nWert = (USHORT) ( (double) nPercent * 255.0 / 100.0 + 0.5 ); + nWert = (sal_uInt16) ( (double) nPercent * 255.0 / 100.0 + 0.5 ); break; } diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 1de256416b9d..63a2f3bbfd4e 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -155,7 +155,7 @@ SvxGradientTabPage::SvxGradientTabPage LINK( this, SvxGradientTabPage, ClickSaveHdl_Impl ) ); // #i76307# always paint the preview in LTR, because this is what the document does - aCtlPreview.EnableRTL( FALSE ); + aCtlPreview.EnableRTL( sal_False ); } // ----------------------------------------------------------------------- @@ -174,12 +174,12 @@ void SvxGradientTabPage::Construct() void SvxGradientTabPage::ActivatePage( const SfxItemSet& ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -268,13 +268,13 @@ long SvxGradientTabPage::CheckChanges_Impl() aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { XGradient aGradient = pGradientList->GetGradient( nPos )->GetGradient(); @@ -318,7 +318,7 @@ long SvxGradientTabPage::CheckChanges_Impl() case RET_CANCEL: // return( -1L ); <-- wuerde die Seite nicht verlassen break; - // return( TRUE ); // Abbruch + // return( sal_True ); // Abbruch } delete aMessDlg; //add by CHINA001 } @@ -333,15 +333,15 @@ long SvxGradientTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) { - if( *pDlgType == 0 && *pPageType == PT_GRADIENT && *pbAreaTP == FALSE ) + if( *pDlgType == 0 && *pPageType == PT_GRADIENT && *pbAreaTP == sal_False ) { // CheckChanges(); <-- doppelte Abfrage ? XGradient* pXGradient = NULL; String aString; - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { pXGradient = new XGradient( pGradientList->GetGradient( nPos )->GetGradient() ); @@ -355,11 +355,11 @@ BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); } DBG_ASSERT( pXGradient, "XGradient konnte nicht erzeugt werden" ); rSet.Put( XFillStyleItem( XFILL_GRADIENT ) ); @@ -367,7 +367,7 @@ BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) delete pXGradient; } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -410,11 +410,11 @@ IMPL_LINK( SvxGradientTabPage, ModifiedHdl_Impl, void *, pControl ) aLbColorTo.GetSelectEntryColor(), eXGS, static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); // Enablen/Disablen von Controls if( pControl == &aLbGradientType || pControl == this ) @@ -440,18 +440,18 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pGradientList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pGradientList->GetGradient( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -459,17 +459,17 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 WarningBox* pWarnBox = NULL; - USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE; + sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; while( pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pGradientList->GetGradient( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { @@ -498,11 +498,11 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); XGradientEntry* pEntry = new XGradientEntry( aXGradient, aName ); pGradientList->Insert( pEntry, nCount ); @@ -514,7 +514,7 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbGradients.GetPosPixel(), aLbGradients.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); //aLbGradients.Invalidate(); @@ -541,7 +541,7 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -557,33 +557,33 @@ IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 long nCount = pGradientList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pGradientList->GetGradient( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; XGradient aXGradient( aLbColorFrom.GetSelectEntryColor(), aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); XGradientEntry* pEntry = new XGradientEntry( aXGradient, aName ); @@ -613,7 +613,7 @@ IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxGradientTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -649,7 +649,7 @@ IMPL_LINK( SvxGradientTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxGradientTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnGradientListState & CT_MODIFIED ) { @@ -823,10 +823,10 @@ IMPL_LINK( SvxGradientTabPage, ChangeGradientHdl_Impl, void *, EMPTYARG ) else { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), sal_True, &pPoolItem ) ) { if( ( XFILL_GRADIENT == (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && - ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) ) ) + ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True, &pPoolItem ) ) ) { pGradient = new XGradient( ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() ); } @@ -845,7 +845,7 @@ IMPL_LINK( SvxGradientTabPage, ChangeGradientHdl_Impl, void *, EMPTYARG ) XGradientStyle eXGS = pGradient->GetGradientStyle(); aLbGradientType.SelectEntryPos( - sal::static_int_cast< USHORT >( eXGS ) ); + sal::static_int_cast< sal_uInt16 >( eXGS ) ); // Wenn der EIntrag nicht in der Listbox ist, werden die Farben // temporaer hinzugenommen aLbColorFrom.SetNoSelection(); diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 4fa65d95221a..556268f2e025 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -170,12 +170,12 @@ void SvxHatchTabPage::Construct() void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -291,12 +291,12 @@ long SvxHatchTabPage::CheckChanges_Impl() case RET_CANCEL: // return( -1L ); <-- wuerde die Seite nicht verlassen break; - // return( TRUE ); // Abbruch + // return( sal_True ); // Abbruch } delete aMessDlg; //add by CHINA001 } - USHORT nPos = aLbHatchings.GetSelectEntryPos(); + sal_uInt16 nPos = aLbHatchings.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) *pPos = nPos; return 0L; @@ -304,9 +304,9 @@ long SvxHatchTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) { - if( *pDlgType == 0 && *pbAreaTP == FALSE ) // Flaechen-Dialog + if( *pDlgType == 0 && *pbAreaTP == sal_False ) // Flaechen-Dialog { if( *pPageType == PT_HATCH ) { @@ -314,7 +314,7 @@ BOOL SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) XHatch* pXHatch = NULL; String aString; - USHORT nPos = aLbHatchings.GetSelectEntryPos(); + sal_uInt16 nPos = aLbHatchings.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { pXHatch = new XHatch( pHatchingList->GetHatch( nPos )->GetHatch() ); @@ -335,7 +335,7 @@ BOOL SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) delete pXHatch; } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -419,10 +419,10 @@ IMPL_LINK( SvxHatchTabPage, ChangeHatchHdl_Impl, void *, EMPTYARG ) else { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), sal_True, &pPoolItem ) ) { if( ( XFILL_HATCH == (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && - ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE, &pPoolItem ) ) ) + ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), sal_True, &pPoolItem ) ) ) { pHatch = new XHatch( ( ( const XFillHatchItem* ) pPoolItem )->GetHatchValue() ); } @@ -438,7 +438,7 @@ IMPL_LINK( SvxHatchTabPage, ChangeHatchHdl_Impl, void *, EMPTYARG ) if( pHatch ) { aLbLineType.SelectEntryPos( - sal::static_int_cast< USHORT >( pHatch->GetHatchStyle() ) ); + sal::static_int_cast< sal_uInt16 >( pHatch->GetHatchStyle() ) ); // Wenn der Eintrag nicht in der Listbox ist, wird die Farbe // temporaer hinzugenommen aLbLineColor.SetNoSelection(); @@ -468,10 +468,10 @@ IMPL_LINK( SvxHatchTabPage, ChangeHatchHdl_Impl, void *, EMPTYARG ) // Backgroundcolor /* const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBACKGROUND ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBACKGROUND ), sal_True, &pPoolItem ) ) { rXFSet.Put ( XFillBackgroundItem( ( ( XFillBackgroundItem* )pPoolItem)->GetValue() ) ); - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetValue() ); rXFSet.Put( XFillColorItem( String(), aColor ) ); @@ -505,18 +505,18 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pHatchingList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pHatchingList->GetHatch( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -524,17 +524,17 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 WarningBox* pWarnBox = NULL; - USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE; + sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; while( pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pHatchingList->GetHatch( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { nError = 0; @@ -573,7 +573,7 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbHatchings.GetPosPixel(), aLbHatchings.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); //aLbHatchings.Invalidate(); @@ -600,7 +600,7 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxHatchTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbHatchings.GetSelectEntryPos(); + sal_uInt16 nPos = aLbHatchings.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -616,23 +616,23 @@ IMPL_LINK( SvxHatchTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 long nCount = pHatchingList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pHatchingList->GetHatch( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; XHatch aXHatch( aLbLineColor.GetSelectEntryColor(), (XHatchStyle) aLbLineType.GetSelectEntryPos(), GetCoreValue( aMtrDistance, ePoolUnit ), @@ -672,7 +672,7 @@ IMPL_LINK( SvxHatchTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxHatchTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbHatchings.GetSelectEntryPos(); + sal_uInt16 nPos = aLbHatchings.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -708,7 +708,7 @@ IMPL_LINK( SvxHatchTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxHatchTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnHatchingListState & CT_MODIFIED ) { diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 2fee90d5871b..f4edeaa6d392 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -84,7 +84,7 @@ // static ---------------------------------------------------------------- -static USHORT pLineRanges[] = +static sal_uInt16 pLineRanges[] = { XATTR_LINETRANSPARENCE, XATTR_LINETRANSPARENCE, @@ -146,9 +146,9 @@ SvxLineTabPage::SvxLineTabPage aSymbolHeightMF ( this, CUI_RES(MF_SYMBOL_HEIGHT)), aSymbolRatioCB ( this, CUI_RES(CB_SYMBOL_RATIO)), - bLastWidthModified(FALSE), + bLastWidthModified(sal_False), aSymbolLastSize(Size(0,0)), - bSymbols(FALSE), + bSymbols(sal_False), rOutAttrs ( rInAttrs ), bObjSelected( sal_False ), @@ -234,14 +234,14 @@ SvxLineTabPage::SvxLineTabPage aSymbolHeightMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl)); aSymbolRatioCB.SetClickHdl(LINK(this, SvxLineTabPage, RatioHdl_Impl)); - aSymbolRatioCB.Check(TRUE); - ShowSymbolControls(FALSE); + aSymbolRatioCB.Check(sal_True); + ShowSymbolControls(sal_False); // #63083# nActLineWidth = -1; } //#58425# Symbole auf einer Linie (z.B. StarChart) , Symbol-Controls aktivieren -void SvxLineTabPage::ShowSymbolControls(BOOL bOn) +void SvxLineTabPage::ShowSymbolControls(sal_Bool bOn) { bSymbols=bOn; aSymbolWidthFT.Show(bOn); @@ -286,7 +286,7 @@ void SvxLineTabPage::Construct() void SvxLineTabPage::FillListboxes() { // Linienstile - USHORT nOldSelect = aLbLineStyle.GetSelectEntryPos(); + sal_uInt16 nOldSelect = aLbLineStyle.GetSelectEntryPos(); aLbLineStyle.FillStyles(); aLbLineStyle.Fill( pDashList ); aLbLineStyle.SelectEntryPos( nOldSelect ); @@ -301,7 +301,7 @@ void SvxLineTabPage::FillListboxes() nOldSelect = aLbEndStyle.GetSelectEntryPos(); aLbEndStyle.Clear(); aLbEndStyle.InsertEntry( sNone ); - aLbEndStyle.Fill( pLineEndList, FALSE ); + aLbEndStyle.Fill( pLineEndList, sal_False ); aLbEndStyle.SelectEntryPos( nOldSelect ); } @@ -314,8 +314,8 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) SetPageType(pPageTypeItem->GetValue()); //add CHINA001 end if( nDlgType == 0 && pDashList ) //CHINA001 if( *pDlgType == 0 && pDashList ) // Linien-Dialog { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; // Dashliste if( ( *pnDashListState & CT_MODIFIED ) || @@ -390,7 +390,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) aLbEndStyle.Clear(); aLbEndStyle.InsertEntry( sNone ); - aLbEndStyle.Fill( pLineEndList, FALSE ); + aLbEndStyle.Fill( pLineEndList, sal_False ); nCount = aLbEndStyle.GetEntryCount(); if( nCount == 0 ) @@ -488,7 +488,7 @@ int SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet ) { nPageType = 1; // evtl. fuer Erweiterungen//CHINA001 *pPageType = 1; // evtl. fuer Erweiterungen *pPosDashLb = aLbLineStyle.GetSelectEntryPos() - 2;// erster Eintrag SOLID !!! - USHORT nPos = aLbStartStyle.GetSelectEntryPos(); + sal_uInt16 nPos = aLbStartStyle.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) nPos--; *pPosLineEndLb = nPos; @@ -502,11 +502,11 @@ int SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- -BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) +sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) { const SfxPoolItem* pOld = NULL; - USHORT nPos; - BOOL bModified = FALSE; + sal_uInt16 nPos; + sal_Bool bModified = sal_False; // Um evtl. Modifikationen der Liste vorzubeugen // werden Items anderer Seiten nicht gesetzt @@ -535,7 +535,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineDashItem*)pOld == aDashItem ) ) { rAttrs.Put( aDashItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -543,7 +543,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineStyleItem*)pOld == *pStyleItem ) ) { rAttrs.Put( *pStyleItem ); - bModified = TRUE; + bModified = sal_True; } delete pStyleItem; } @@ -557,7 +557,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } //Breite Linienanfang @@ -568,7 +568,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } //Breite Linienende @@ -579,7 +579,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -592,7 +592,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineColorItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -614,7 +614,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -634,7 +634,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -644,23 +644,23 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) TriState eState = aTsbCenterStart.GetState(); if( eState != aTsbCenterStart.GetSavedValue() ) { - XLineStartCenterItem aItem( sal::static_int_cast< BOOL >( eState ) ); + XLineStartCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_LINESTARTCENTER ); if ( !pOld || !( *(const XLineStartCenterItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } eState = aTsbCenterEnd.GetState(); if( eState != aTsbCenterEnd.GetSavedValue() ) { - XLineEndCenterItem aItem( sal::static_int_cast< BOOL >( eState ) ); + XLineEndCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_LINEENDCENTER ); if ( !pOld || !( *(const XLineEndCenterItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -672,7 +672,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } //Breite Linienende @@ -683,20 +683,20 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // Transparenz - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); - if( nVal != (UINT16)aMtrTransparent.GetSavedValue().ToInt32() ) + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); + if( nVal != (sal_uInt16)aMtrTransparent.GetSavedValue().ToInt32() ) { XLineTransparenceItem aItem( nVal ); pOld = GetOldItem( rAttrs, XATTR_LINETRANSPARENCE ); if ( !pOld || !( *(const XLineTransparenceItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -737,7 +737,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if(!pOld || !(*(const XLineJointItem*)pOld == *pNew)) { rAttrs.Put( *pNew ); - bModified = TRUE; + bModified = sal_True; } delete pNew; @@ -753,7 +753,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if(bNewSize) { rAttrs.Put(aSItem); - bModified=TRUE; + bModified=sal_True; } SfxInt32Item aTItem(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),nSymbolType); @@ -764,7 +764,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if(bNewType) { rAttrs.Put(aTItem); - bModified=TRUE; + bModified=sal_True; } if(nSymbolType!=SVX_SYMBOLTYPE_NONE) @@ -776,7 +776,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if(bNewBrush) { rAttrs.Put(aBItem); - bModified=TRUE; + bModified=sal_True; } } } @@ -786,9 +786,9 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) // ----------------------------------------------------------------------- -BOOL SvxLineTabPage::FillXLSet_Impl() +sal_Bool SvxLineTabPage::FillXLSet_Impl() { - USHORT nPos; + sal_uInt16 nPos; if( aLbLineStyle.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND ) { @@ -868,23 +868,23 @@ BOOL SvxLineTabPage::FillXLSet_Impl() // Linienenden zentriert if( aTsbCenterStart.GetState() == STATE_CHECK ) - rXLSet.Put( XLineStartCenterItem( TRUE ) ); + rXLSet.Put( XLineStartCenterItem( sal_True ) ); else if( aTsbCenterStart.GetState() == STATE_NOCHECK ) - rXLSet.Put( XLineStartCenterItem( FALSE ) ); + rXLSet.Put( XLineStartCenterItem( sal_False ) ); if( aTsbCenterEnd.GetState() == STATE_CHECK ) - rXLSet.Put( XLineEndCenterItem( TRUE ) ); + rXLSet.Put( XLineEndCenterItem( sal_True ) ); else if( aTsbCenterEnd.GetState() == STATE_NOCHECK ) - rXLSet.Put( XLineEndCenterItem( FALSE ) ); + rXLSet.Put( XLineEndCenterItem( sal_False ) ); // Transparenz - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); rXLSet.Put( XLineTransparenceItem( nVal ) ); // #116827# aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet()); - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- @@ -904,11 +904,11 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) */ const SfxPoolItem *pPoolItem; long nSymType=SVX_SYMBOLTYPE_UNKNOWN; - BOOL bPrevSym=FALSE; - BOOL bEnable=TRUE; - BOOL bIgnoreGraphic=FALSE; - BOOL bIgnoreSize=FALSE; - if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),TRUE,&pPoolItem) == SFX_ITEM_SET) + sal_Bool bPrevSym=sal_False; + sal_Bool bEnable=sal_True; + sal_Bool bIgnoreGraphic=sal_False; + sal_Bool bIgnoreSize=sal_False; + if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),sal_True,&pPoolItem) == SFX_ITEM_SET) { nSymType=((const SfxInt32Item *)pPoolItem)->GetValue(); } @@ -917,13 +917,13 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) { aSymbolGraphic=aAutoSymbolGraphic; aSymbolSize=aSymbolLastSize=aAutoSymbolGraphic.GetPrefSize(); - bPrevSym=TRUE; + bPrevSym=sal_True; } else if(nSymType == SVX_SYMBOLTYPE_NONE) { - bEnable=FALSE; - bIgnoreGraphic=TRUE; - bIgnoreSize=TRUE; + bEnable=sal_False; + bIgnoreGraphic=sal_True; + bIgnoreSize=sal_True; } else if(nSymType >= 0) { @@ -932,7 +932,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) SdrModel* pModel = new SdrModel(NULL, NULL, LOADREFCOUNTS); pModel->GetItemPool().FreezeIdRanges(); - SdrPage* pPage = new SdrPage( *pModel, FALSE ); + SdrPage* pPage = new SdrPage( *pModel, sal_False ); pPage->SetSize(Size(1000,1000)); pModel->InsertPage( pPage, 0 ); SdrView* pView = new SdrView( pModel, &aVDev ); @@ -966,9 +966,9 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) aSymbolSize=pObj->GetSnapRect().GetSize(); aSymbolGraphic.SetPrefSize(aSymbolSize); aSymbolGraphic.SetPrefMapMode(MAP_100TH_MM); - bPrevSym=TRUE; - bEnable=TRUE; - bIgnoreGraphic=TRUE; + bPrevSym=sal_True; + bEnable=sal_True; + bIgnoreGraphic=sal_True; pView->UnmarkAll(); pObj=pPage->RemoveObject(0); @@ -979,7 +979,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) delete pView; delete pModel; } - if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH),TRUE,&pPoolItem) == SFX_ITEM_SET) + if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH),sal_True,&pPoolItem) == SFX_ITEM_SET) { const Graphic* pGraphic = ((const SvxBrushItem *)pPoolItem)->GetGraphic(); if( pGraphic ) @@ -994,10 +994,10 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) pGraphic->GetPrefMapMode(), MAP_100TH_MM ); } - bPrevSym=TRUE; + bPrevSym=sal_True; } } - if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),TRUE,&pPoolItem) == SFX_ITEM_SET) + if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),sal_True,&pPoolItem) == SFX_ITEM_SET) { aSymbolSize = ((const SvxSizeItem *)pPoolItem)->GetSize(); } @@ -1090,7 +1090,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) else if( rAttrs.GetItemState( XATTR_LINESTART ) != SFX_ITEM_DONTCARE ) { // #86265# select entry using list and polygon, not string - sal_Bool bSelected(FALSE); + sal_Bool bSelected(sal_False); const basegfx::B2DPolyPolygon& rItemPolygon = ((const XLineStartItem&)rAttrs.Get(XATTR_LINESTART)).GetLineStartValue(); for(sal_Int32 a(0);!bSelected && a < pLineEndList->Count(); a++) @@ -1102,7 +1102,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) { // select this entry aLbStartStyle.SelectEntryPos((sal_uInt16)a + 1); - bSelected = TRUE; + bSelected = sal_True; } } @@ -1123,7 +1123,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) else if( rAttrs.GetItemState( XATTR_LINEEND ) != SFX_ITEM_DONTCARE ) { // #86265# select entry using list and polygon, not string - sal_Bool bSelected(FALSE); + sal_Bool bSelected(sal_False); const basegfx::B2DPolyPolygon& rItemPolygon = ((const XLineEndItem&)rAttrs.Get(XATTR_LINEEND)).GetLineEndValue(); for(sal_Int32 a(0);!bSelected && a < pLineEndList->Count(); a++) @@ -1135,7 +1135,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) { // select this entry aLbEndStyle.SelectEntryPos((sal_uInt16)a + 1); - bSelected = TRUE; + bSelected = sal_True; } } @@ -1183,7 +1183,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) } else if( rAttrs.GetItemState( XATTR_LINESTARTCENTER ) != SFX_ITEM_DONTCARE ) { - aTsbCenterStart.EnableTriState( FALSE ); + aTsbCenterStart.EnableTriState( sal_False ); if( ( ( const XLineStartCenterItem& ) rAttrs.Get( XATTR_LINESTARTCENTER ) ).GetValue() ) aTsbCenterStart.SetState( STATE_CHECK ); @@ -1203,7 +1203,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) } else if( rAttrs.GetItemState( XATTR_LINEENDCENTER ) != SFX_ITEM_DONTCARE ) { - aTsbCenterEnd.EnableTriState( FALSE ); + aTsbCenterEnd.EnableTriState( sal_False ); if( ( ( const XLineEndCenterItem& ) rAttrs.Get( XATTR_LINEENDCENTER ) ).GetValue() ) aTsbCenterEnd.SetState( STATE_CHECK ); @@ -1218,7 +1218,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) // Transparenz if( rAttrs.GetItemState( XATTR_LINETRANSPARENCE ) != SFX_ITEM_DONTCARE ) { - USHORT nTransp = ( ( const XLineTransparenceItem& ) rAttrs. + sal_uInt16 nTransp = ( ( const XLineTransparenceItem& ) rAttrs. Get( XATTR_LINETRANSPARENCE ) ).GetValue(); aMtrTransparent.SetValue( nTransp ); ChangeTransparentHdl_Impl( NULL ); @@ -1242,7 +1242,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) // Synchronisieren // Jetzt wird der Wert aus der INI-Datei geholt (#42258#) String aStr = GetUserData(); - aCbxSynchronize.Check( (BOOL)aStr.ToInt32() ); + aCbxSynchronize.Check( (sal_Bool)aStr.ToInt32() ); // #116827# if(bObjSelected && SFX_ITEM_DEFAULT == rAttrs.GetItemState(XATTR_LINEJOINT)) @@ -1309,7 +1309,7 @@ SfxTabPage* SvxLineTabPage::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SvxLineTabPage::GetRanges() +sal_uInt16* SvxLineTabPage::GetRanges() { return( pLineRanges ); } @@ -1321,12 +1321,12 @@ IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl ) if(pCntrl == &aMtrLineWidth) { // Linienbreite und Start/EndBreite - INT32 nNewLineWidth = GetCoreValue( aMtrLineWidth, ePoolUnit ); + sal_Int32 nNewLineWidth = GetCoreValue( aMtrLineWidth, ePoolUnit ); if(nActLineWidth == -1) { // Noch nicht initialisiert, hole den Startwert const SfxPoolItem* pOld = GetOldItem( rXLSet, XATTR_LINEWIDTH ); - INT32 nStartLineWidth = 0; + sal_Int32 nStartLineWidth = 0; if(pOld) nStartLineWidth = (( const XLineWidthItem *)pOld)->GetValue(); nActLineWidth = nStartLineWidth; @@ -1335,8 +1335,8 @@ IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl ) if(nActLineWidth != nNewLineWidth) { // Anpassungen Start/EndWidth #63083# - INT32 nValAct = GetCoreValue( aMtrStartWidth, ePoolUnit ); - INT32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10); + sal_Int32 nValAct = GetCoreValue( aMtrStartWidth, ePoolUnit ); + sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10); if(nValNew < 0) nValNew = 0; SetMetricValue( aMtrStartWidth, nValNew, ePoolUnit ); @@ -1509,7 +1509,7 @@ long SvxLineTabPage::ClickMeasuringHdl_Impl( void* ) IMPL_LINK( SvxLineTabPage, ChangeTransparentHdl_Impl, void *, EMPTYARG ) { - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); XLineTransparenceItem aItem( nVal ); rXLSet.Put( XLineTransparenceItem( aItem ) ); @@ -1569,7 +1569,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) SvxBmpItemInfo* pInfo = new SvxBmpItemInfo(); pInfo->pBrushItem = pBrushItem; - pInfo->nItemId = (UINT16)(MN_GALLERY_ENTRY + i); + pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i); aGrfBrushItems.Insert(pInfo, i); const Graphic* pGraphic = pBrushItem->GetGraphic(); @@ -1580,7 +1580,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) { - BOOL bWidth = aSize.Width() > aSize.Height(); + sal_Bool bWidth = aSize.Width() > aSize.Height(); double nScale = bWidth ? (double)MAX_BMP_WIDTH / (double)aSize.Width(): (double)MAX_BMP_HEIGHT / (double)aSize.Height(); @@ -1598,7 +1598,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) } aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup ); if(!aGrfNames.Count()) - aSymbolMB.GetPopupMenu()->EnableItem(MN_GALLERY, FALSE); + aSymbolMB.GetPopupMenu()->EnableItem(MN_GALLERY, sal_False); } if(!pButton->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ) && pSymbolList) @@ -1608,7 +1608,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) SdrModel* pModel = new SdrModel(NULL, NULL, LOADREFCOUNTS); pModel->GetItemPool().FreezeIdRanges(); // Page - SdrPage* pPage = new SdrPage( *pModel, FALSE ); + SdrPage* pPage = new SdrPage( *pModel, sal_False ); pPage->SetSize(Size(1000,1000)); pModel->InsertPage( pPage, 0 ); // 3D View @@ -1651,13 +1651,13 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) SvxBmpItemInfo* pInfo = new SvxBmpItemInfo(); pInfo->pBrushItem = pBrushItem; - pInfo->nItemId = (UINT16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems); + pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems); aGrfBrushItems.Insert(pInfo, nNumMenuGalleryItems + i); Size aSize(aBitmap.GetSizePixel()); if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) { - BOOL bWidth = aSize.Width() > aSize.Height(); + sal_Bool bWidth = aSize.Width() > aSize.Height(); double nScale = bWidth ? (double)MAX_BMP_WIDTH / (double)aSize.Width(): (double)MAX_BMP_HEIGHT / (double)aSize.Height(); @@ -1668,7 +1668,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) } aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup ); if(!aGrfNames.Count()) - aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, FALSE); + aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False); delete pView; delete pModel; @@ -1683,7 +1683,7 @@ IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem) PopupMenu* pPopup = pThis->aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY ); SvxBmpItemInfo* pBmpInfo = 0; - for ( USHORT i = 0; i < pThis->aGrfBrushItems.Count(); i++ ) + for ( sal_uInt16 i = 0; i < pThis->aGrfBrushItems.Count(); i++ ) { SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)pThis->aGrfBrushItems.GetObject(i); if( pInfo->pBrushItem == pItem ) @@ -1700,7 +1700,7 @@ IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem) if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) { - BOOL bWidth = aSize.Width() > aSize.Height(); + sal_Bool bWidth = aSize.Width() > aSize.Height(); double nScale = bWidth ? (double)MAX_BMP_WIDTH / (double)aSize.Width(): (double)MAX_BMP_HEIGHT / (double)aSize.Height(); @@ -1718,12 +1718,12 @@ IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem) //Handler f�r Menuebutton IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { - USHORT nItemId = pButton->GetCurItemId(); + sal_uInt16 nItemId = pButton->GetCurItemId(); const Graphic* pGraphic = 0; Graphic aGraphic; String aGrfName; - BOOL bResetSize = FALSE; - BOOL bEnable=TRUE; + sal_Bool bResetSize = sal_False; + sal_Bool bEnable=sal_True; long nPreviousSymbolType = nSymbolType; if(nItemId >= MN_GALLERY_ENTRY) @@ -1735,7 +1735,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) else { nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM; - bResetSize = TRUE; + bResetSize = sal_True; } SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.GetObject(nItemId - MN_GALLERY_ENTRY); pGraphic = pInfo->pBrushItem->GetGraphic(); @@ -1754,7 +1754,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { nSymbolType=SVX_SYMBOLTYPE_NONE; pGraphic=NULL; - bEnable=FALSE; + bEnable=sal_False; } break; default: @@ -1770,7 +1770,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM; pGraphic = &aGraphic; - bResetSize = TRUE; + bResetSize = sal_True; } } if( !pGraphic ) @@ -1803,7 +1803,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { aSymbolGraphic=Graphic(); aCtlPreview.SetSymbol(NULL,aSymbolSize); - bEnable=FALSE; + bEnable=sal_False; } aSymbolLastSize=aSymbolSize; SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit); @@ -1820,9 +1820,9 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, MetricField *, pField) { bNewSize=true; - BOOL bWidth = (BOOL)(pField == &aSymbolWidthMF); + sal_Bool bWidth = (sal_Bool)(pField == &aSymbolWidthMF); bLastWidthModified = bWidth; - BOOL bRatio = aSymbolRatioCB.IsChecked(); + sal_Bool bRatio = aSymbolRatioCB.IsChecked(); long nWidthVal = static_cast<long>(aSymbolWidthMF.Denormalize(aSymbolWidthMF.GetValue(FUNIT_100TH_MM))); long nHeightVal= static_cast<long>(aSymbolHeightMF.Denormalize(aSymbolHeightMF.GetValue(FUNIT_100TH_MM))); nWidthVal = OutputDevice::LogicToLogic(nWidthVal,MAP_100TH_MM,(MapUnit)ePoolUnit ); @@ -1913,7 +1913,7 @@ void SvxLineTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 if(pSdrObjListItem) //symbols { - ShowSymbolControls(TRUE); + ShowSymbolControls(sal_True); pSymbolList = static_cast<SdrObjList*>(pSdrObjListItem->GetValue()); if (pSymbolAttrItem) pSymbolAttr = new SfxItemSet(pSymbolAttrItem->GetItemSet()); diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 5f1b385e8137..d70cb46fb1bc 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -289,14 +289,14 @@ void SvxLineDefTabPage::CheckChanges_Impl() case RET_CANCEL: break; - // return( TRUE ); // Abbruch + // return( sal_True ); // Abbruch } delete aMessDlg; //add by CHINA001 } - USHORT nPos = aLbLineStyles.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineStyles.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { *pPosDashLb = nPos; @@ -305,7 +305,7 @@ void SvxLineDefTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxLineDefTabPage::FillItemSet( SfxItemSet& rAttrs ) +sal_Bool SvxLineDefTabPage::FillItemSet( SfxItemSet& rAttrs ) { if( *pDlgType == 0 ) // Linien-Dialog { @@ -320,7 +320,7 @@ BOOL SvxLineDefTabPage::FillItemSet( SfxItemSet& rAttrs ) rAttrs.Put( XLineDashItem( aString, aDash ) ); } } - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- @@ -577,40 +577,40 @@ IMPL_LINK( SvxLineDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pDashList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while ( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for ( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pDashList->GetDash( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while ( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pDashList->GetDash( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; FillDash_Impl(); pEntry = new XDashEntry( aDash, aName ); @@ -659,7 +659,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbLineStyles.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineStyles.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -675,24 +675,24 @@ IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 long nCount = pDashList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while ( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pDashList->GetDash( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if ( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; FillDash_Impl(); XDashEntry* pEntry = new XDashEntry( aDash, aName ); @@ -733,7 +733,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbLineStyles.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineStyles.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -771,7 +771,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnDashListState & CT_MODIFIED ) { @@ -949,10 +949,10 @@ void SvxLineDefTabPage::FillDash_Impl() eXDS = XDASH_RECT; aDash.SetDashStyle( eXDS ); - aDash.SetDots( (BYTE) aNumFldNumber1.GetValue() ); + aDash.SetDots( (sal_uInt8) aNumFldNumber1.GetValue() ); aDash.SetDotLen( aLbType1.GetSelectEntryPos() == 0 ? 0 : GetCoreValue( aMtrLength1, ePoolUnit ) ); - aDash.SetDashes( (BYTE) aNumFldNumber2.GetValue() ); + aDash.SetDashes( (sal_uInt8) aNumFldNumber2.GetValue() ); aDash.SetDashLen( aLbType2.GetSelectEntryPos() == 0 ? 0 : GetCoreValue( aMtrLength2, ePoolUnit ) ); aDash.SetDistance( GetCoreValue( aMtrDistance, ePoolUnit ) ); @@ -971,7 +971,7 @@ void SvxLineDefTabPage::FillDialog_Impl() if( eXDS == XDASH_RECTRELATIVE ) aCbxSynchronize.Check(); else - aCbxSynchronize.Check( FALSE ); + aCbxSynchronize.Check( sal_False ); aNumFldNumber1.SetValue( aDash.GetDots() ); //aMtrLength1.SetValue( aDash.GetDotLen() ); @@ -1003,7 +1003,7 @@ void SvxLineDefTabPage::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - USHORT nOldSelect = aLbLineStyles.GetSelectEntryPos(); + sal_uInt16 nOldSelect = aLbLineStyles.GetSelectEntryPos(); aLbLineStyles.Clear(); aLbLineStyles.Fill( pDashList ); aLbLineStyles.SelectEntryPos( nOldSelect ); diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 4949ce4da6fa..4422d98247c1 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -161,7 +161,7 @@ void SvxLineEndDefTabPage::Construct() pPolyObj->TakeObjInfo( aInfoRec ); SdrObject* pNewObj = 0; if( aInfoRec.bCanConvToPath ) - pNewObj = pPolyObj->ConvertToPolyObj( TRUE, FALSE ); + pNewObj = pPolyObj->ConvertToPolyObj( sal_True, sal_False ); bCreateArrowPossible = pNewObj && pNewObj->ISA( SdrPathObj ); SdrObject::Free( pNewObj ); @@ -225,7 +225,7 @@ int SvxLineEndDefTabPage::DeactivatePage( SfxItemSet* _pSet ) void SvxLineEndDefTabPage::CheckChanges_Impl() { - USHORT nPos = aLbLineEnds.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineEnds.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -248,7 +248,7 @@ void SvxLineEndDefTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxLineEndDefTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxLineEndDefTabPage::FillItemSet( SfxItemSet& rSet ) { if( *pDlgType == 0 ) // Linien-Dialog { @@ -263,7 +263,7 @@ BOOL SvxLineEndDefTabPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( XLineEndItem( pEntry->GetName(), pEntry->GetLineEnd() ) ); } } - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- @@ -352,7 +352,7 @@ long SvxLineEndDefTabPage::ChangePreviewHdl_Impl( void* ) IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbLineEnds.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineEnds.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -360,12 +360,12 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) String aDesc( ResId( RID_SVXSTR_DESC_LINEEND, rMgr ) ); String aName( aEdtName.GetText() ); long nCount = pLineEndList->Count(); - BOOL bDifferent = TRUE; + sal_Bool bDifferent = sal_True; // Pruefen, ob Name schon vorhanden ist for ( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pLineEndList->GetLineEnd( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; // Wenn ja, wird wiederholt ein neuer Name angefordert if ( !bDifferent ) @@ -379,21 +379,21 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while( !bDifferent && bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pLineEndList->GetLineEnd( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) - bLoop = FALSE; + bLoop = sal_False; else aWarningBox.Execute(); } @@ -440,7 +440,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) if( aInfoRec.bCanConvToPath ) { - pNewObj = pConvPolyObj = pPolyObj->ConvertToPolyObj( TRUE, FALSE ); + pNewObj = pConvPolyObj = pPolyObj->ConvertToPolyObj( sal_True, sal_False ); if( !pNewObj || !pNewObj->ISA( SdrPathObj ) ) return( 0L ); // Abbruch, zusaetzliche Sicherheit, die bei @@ -468,40 +468,40 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pLineEndList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while ( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pLineEndList->GetLineEnd( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while ( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pLineEndList->GetLineEnd( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; pEntry = new XLineEndEntry( aNewPolyPolygon, aName ); long nLineEndCount = pLineEndList->Count(); @@ -543,7 +543,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineEndDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbLineEnds.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineEnds.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -580,7 +580,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineEndDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnLineEndListState & CT_MODIFIED ) { @@ -738,7 +738,7 @@ void SvxLineEndDefTabPage::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - USHORT nOldSelect = aLbLineEnds.GetSelectEntryPos(); + sal_uInt16 nOldSelect = aLbLineEnds.GetSelectEntryPos(); aLbLineEnds.Clear(); aLbLineEnds.Fill( pLineEndList ); aLbLineEnds.SelectEntryPos( nOldSelect ); diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 3accd144efcc..7681bca4956a 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -54,7 +54,7 @@ // static ---------------------------------------------------------------- -static USHORT pShadowRanges[] = +static sal_uInt16 pShadowRanges[] = { SDRATTR_SHADOWCOLOR, SDRATTR_SHADOWTRANSPARENCE, @@ -86,7 +86,7 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs aCtlXRectPreview ( this, CUI_RES( CTL_COLOR_PREVIEW ) ), rOutAttrs ( rInAttrs ), pColorTab( NULL ), - bDisable ( FALSE ), + bDisable ( sal_False ), pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFillAttr ( pXPool ), rXFSet ( aXFillAttr.GetItemSet() ) @@ -215,8 +215,8 @@ void SvxShadowTabPage::Construct() void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; //add CHINA001 Begin SFX_ITEMSET_ARG (&rSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False); if (pPageTypeItem) @@ -276,10 +276,10 @@ int SvxShadowTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- -BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) +sal_Bool SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) { const SfxPoolItem* pOld = NULL; - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if( !bDisable ) { @@ -287,20 +287,20 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) TriState eState = aTsbShowShadow.GetState(); if( eState != aTsbShowShadow.GetSavedValue() ) { - SdrShadowItem aItem( sal::static_int_cast< BOOL >( eState ) ); + SdrShadowItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, SDRATTR_SHADOW ); if ( !pOld || !( *(const SdrShadowItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // Schatten-Entfernung // Etwas umstaendliche Abfrage, ob etwas geaendert wurde, // da Items nicht direkt auf Controls abbildbar sind - INT32 nX = 0L, nY = 0L; - INT32 nXY = GetCoreValue( aMtrDistance, ePoolUnit ); + sal_Int32 nX = 0L, nY = 0L; + sal_Int32 nXY = GetCoreValue( aMtrDistance, ePoolUnit ); switch( aCtlPosition.GetActualRP() ) { @@ -323,8 +323,8 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE || rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) { - INT32 nOldX = 9876543; // Unmoeglicher Wert, entspr. DontCare - INT32 nOldY = 9876543; + sal_Int32 nOldX = 9876543; // Unmoeglicher Wert, entspr. DontCare + sal_Int32 nOldY = 9876543; if( rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE && rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) { @@ -339,7 +339,7 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) ( !pOld || !( *(const SdrShadowXDistItem*)pOld == aXItem ) ) ) { rAttrs.Put( aXItem ); - bModified = TRUE; + bModified = sal_True; } SdrShadowYDistItem aYItem( nY ); pOld = GetOldItem( rAttrs, SDRATTR_SHADOWYDIST ); @@ -347,12 +347,12 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) ( !pOld || !( *(const SdrShadowYDistItem*)pOld == aYItem ) ) ) { rAttrs.Put( aYItem ); - bModified = TRUE; + bModified = sal_True; } } // ShadowColor - USHORT nPos = aLbShadowColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbShadowColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND && nPos != aLbShadowColor.GetSavedValue() ) { @@ -362,20 +362,20 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const SdrShadowColorItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // Transparenz - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); - if( nVal != (UINT16)aMtrTransparent.GetSavedValue().ToInt32() ) + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); + if( nVal != (sal_uInt16)aMtrTransparent.GetSavedValue().ToInt32() ) { SdrShadowTransparenceItem aItem( nVal ); pOld = GetOldItem( rAttrs, SDRATTR_SHADOWTRANSPARENCE ); if ( !pOld || !( *(const SdrShadowTransparenceItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -397,7 +397,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) // Ist Schatten gesetzt? if( rAttrs.GetItemState( SDRATTR_SHADOW ) != SFX_ITEM_DONTCARE ) { - aTsbShowShadow.EnableTriState( FALSE ); + aTsbShowShadow.EnableTriState( sal_False ); if( ( ( const SdrShadowItem& ) rAttrs.Get( SDRATTR_SHADOW ) ).GetValue() ) aTsbShowShadow.SetState( STATE_CHECK ); @@ -415,8 +415,8 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) if( rAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE && rAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) { - INT32 nX = ( ( const SdrShadowXDistItem& ) rAttrs.Get( SDRATTR_SHADOWXDIST ) ).GetValue(); - INT32 nY = ( ( const SdrShadowYDistItem& ) rAttrs.Get( SDRATTR_SHADOWYDIST ) ).GetValue(); + sal_Int32 nX = ( ( const SdrShadowXDistItem& ) rAttrs.Get( SDRATTR_SHADOWXDIST ) ).GetValue(); + sal_Int32 nY = ( ( const SdrShadowYDistItem& ) rAttrs.Get( SDRATTR_SHADOWYDIST ) ).GetValue(); if( nX != 0 ) SetMetricValue( aMtrDistance, nX < 0L ? -nX : nX, ePoolUnit ); @@ -443,8 +443,8 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) SdrShadowYDistItem* pYDistItem = (SdrShadowYDistItem*)&pPool->GetDefaultItem (SDRATTR_SHADOWYDIST); if (pXDistItem && pYDistItem) { - INT32 nX = pXDistItem->GetValue(); - INT32 nY = pYDistItem->GetValue(); + sal_Int32 nX = pXDistItem->GetValue(); + sal_Int32 nY = pYDistItem->GetValue(); if( nX != 0 ) SetMetricValue( aMtrDistance, nX < 0L ? -nX : nX, ePoolUnit ); else @@ -469,7 +469,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) // Transparenz if( rAttrs.GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SFX_ITEM_DONTCARE ) { - USHORT nTransp = ( ( const SdrShadowTransparenceItem& ) rAttrs.Get( SDRATTR_SHADOWTRANSPARENCE ) ).GetValue(); + sal_uInt16 nTransp = ( ( const SdrShadowTransparenceItem& ) rAttrs.Get( SDRATTR_SHADOWTRANSPARENCE ) ).GetValue(); aMtrTransparent.SetValue( nTransp ); } else @@ -501,7 +501,7 @@ SfxTabPage* SvxShadowTabPage::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SvxShadowTabPage::GetRanges() +sal_uInt16* SvxShadowTabPage::GetRanges() { return( pShadowRanges ); } @@ -548,19 +548,19 @@ IMPL_LINK( SvxShadowTabPage, ModifyShadowHdl_Impl, void *, EMPTYARG ) else rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); - USHORT nPos = aLbShadowColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbShadowColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { rXFSet.Put( XFillColorItem( String(), aLbShadowColor.GetSelectEntryColor() ) ); } - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); XFillTransparenceItem aItem( nVal ); rXFSet.Put( XFillTransparenceItem( aItem ) ); // Schatten-Entfernung - INT32 nX = 0L, nY = 0L; - INT32 nXY = GetCoreValue( aMtrDistance, ePoolUnit ); + sal_Int32 nX = 0L, nY = 0L; + sal_Int32 nXY = GetCoreValue( aMtrDistance, ePoolUnit ); switch( aCtlPosition.GetActualRP() ) { case RP_LT: nX = nY = -nXY; break; diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index e42f85c811f1..ab73b6329e15 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -57,7 +57,7 @@ // static ---------------------------------------------------------------- -static USHORT pPosSizeRanges[] = +static sal_uInt16 pPosSizeRanges[] = { SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_POS_Y, @@ -76,7 +76,7 @@ static USHORT pPosSizeRanges[] = 0 }; -static USHORT pAngleRanges[] = +static sal_uInt16 pAngleRanges[] = { SID_ATTR_TRANSFORM_ROT_X, SID_ATTR_TRANSFORM_ANGLE, @@ -85,7 +85,7 @@ static USHORT pAngleRanges[] = 0 }; -static USHORT pSlantRanges[] = +static sal_uInt16 pSlantRanges[] = { SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS, @@ -121,7 +121,7 @@ void lcl_ScaleRect(basegfx::B2DRange& rRange, const Fraction aUIScale) \************************************************************************/ SvxTransformTabDialog::SvxTransformTabDialog( Window* pParent, const SfxItemSet* pAttr, - const SdrView* pSdrView, USHORT nAnchorTypes ) : + const SdrView* pSdrView, sal_uInt16 nAnchorTypes ) : SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_TRANSFORM ), pAttr ), pView ( pSdrView ), nAnchorCtrls(nAnchorTypes) @@ -153,7 +153,7 @@ SvxTransformTabDialog::~SvxTransformTabDialog() // ----------------------------------------------------------------------- -void SvxTransformTabDialog::PageCreated(USHORT nId, SfxTabPage &rPage) +void SvxTransformTabDialog::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) { switch(nId) { @@ -257,8 +257,8 @@ void SvxAngleTabPage::Construct() { DBG_ASSERT(pView, "No valid view (!)"); eDlgUnit = GetModuleFieldUnit(GetItemSet()); - SetFieldUnit(aMtrPosX, eDlgUnit, TRUE); - SetFieldUnit(aMtrPosY, eDlgUnit, TRUE); + SetFieldUnit(aMtrPosX, eDlgUnit, sal_True); + SetFieldUnit(aMtrPosY, eDlgUnit, sal_True); if(FUNIT_MILE == eDlgUnit || FUNIT_KM == eDlgUnit) { @@ -313,9 +313,9 @@ void SvxAngleTabPage::Construct() // ----------------------------------------------------------------------- -BOOL SvxAngleTabPage::FillItemSet(SfxItemSet& rSet) +sal_Bool SvxAngleTabPage::FillItemSet(SfxItemSet& rSet) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if(aMtrAngle.IsValueModified() || aMtrPosX.IsValueModified() || aMtrPosY.IsValueModified()) { @@ -327,7 +327,7 @@ BOOL SvxAngleTabPage::FillItemSet(SfxItemSet& rSet) rSet.Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ROT_X), basegfx::fround(fTmpX))); rSet.Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ROT_Y), basegfx::fround(fTmpY))); - bModified |= TRUE; + bModified |= sal_True; } return bModified; @@ -384,7 +384,7 @@ SfxTabPage* SvxAngleTabPage::Create( Window* pWindow, const SfxItemSet& rSet) //------------------------------------------------------------------------ -USHORT* SvxAngleTabPage::GetRanges() +sal_uInt16* SvxAngleTabPage::GetRanges() { return(pAngleRanges); } @@ -543,7 +543,7 @@ void SvxSlantTabPage::Construct() // get the range DBG_ASSERT(pView, "no valid view (!)"); eDlgUnit = GetModuleFieldUnit(GetItemSet()); - SetFieldUnit(aMtrRadius, eDlgUnit, TRUE); + SetFieldUnit(aMtrRadius, eDlgUnit, sal_True); { // #i75273# Rectangle aTempRect(pView->GetAllMarkedRect()); @@ -554,10 +554,10 @@ void SvxSlantTabPage::Construct() // ----------------------------------------------------------------------- -BOOL SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) +sal_Bool SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) { - BOOL bModified = FALSE; - INT32 nValue = 0L; + sal_Bool bModified = sal_False; + sal_Int32 nValue = 0L; String aStr = aMtrRadius.GetText(); if( aStr != aMtrRadius.GetSavedValue() ) @@ -567,16 +567,16 @@ BOOL SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) nTmp = Fraction( nTmp ) * aUIScale; rAttrs.Put( SdrEckenradiusItem( nTmp ) ); - bModified = TRUE; + bModified = sal_True; } aStr = aMtrAngle.GetText(); if( aStr != aMtrAngle.GetSavedValue() ) { - nValue = static_cast<INT32>(aMtrAngle.GetValue()); + nValue = static_cast<sal_Int32>(aMtrAngle.GetValue()); rAttrs.Put( SfxInt32Item( SID_ATTR_TRANSFORM_SHEAR, nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( bModified ) @@ -589,7 +589,7 @@ BOOL SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) rAttrs.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_X, aPt.X())); rAttrs.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_Y, aPt.Y())); - rAttrs.Put( SfxBoolItem( SID_ATTR_TRANSFORM_SHEAR_VERTICAL, FALSE ) ); + rAttrs.Put( SfxBoolItem( SID_ATTR_TRANSFORM_SHEAR_VERTICAL, sal_False ) ); } return( bModified ); @@ -662,7 +662,7 @@ SfxTabPage* SvxSlantTabPage::Create( Window* pWindow, const SfxItemSet& rOutAttr //------------------------------------------------------------------------ -USHORT* SvxSlantTabPage::GetRanges() +sal_uInt16* SvxSlantTabPage::GetRanges() { return( pSlantRanges ); } @@ -673,7 +673,7 @@ void SvxSlantTabPage::ActivatePage( const SfxItemSet& rSet ) { SfxRectangleItem* pRectItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , FALSE, (const SfxPoolItem**) &pRectItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , sal_False, (const SfxPoolItem**) &pRectItem ) ) { const Rectangle aTempRect(pRectItem->GetValue()); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); @@ -736,7 +736,7 @@ SvxPositionSizeTabPage::SvxPositionSizeTabPage( Window* pParent, const SfxItemSe mrOutAttrs ( rInAttrs ), mnProtectSizeState( STATE_NOCHECK ), - mbPageDisabled ( FALSE ), + mbPageDisabled ( sal_False ), mbProtectDisabled( false ), mbSizeDisabled( false ), mbAdjustDisabled( true ) @@ -774,10 +774,10 @@ void SvxPositionSizeTabPage::Construct() // get range and work area DBG_ASSERT( mpView, "no valid view (!)" ); meDlgUnit = GetModuleFieldUnit( GetItemSet() ); - SetFieldUnit( maMtrPosX, meDlgUnit, TRUE ); - SetFieldUnit( maMtrPosY, meDlgUnit, TRUE ); - SetFieldUnit( maMtrWidth, meDlgUnit, TRUE ); - SetFieldUnit( maMtrHeight, meDlgUnit, TRUE ); + SetFieldUnit( maMtrPosX, meDlgUnit, sal_True ); + SetFieldUnit( maMtrPosY, meDlgUnit, sal_True ); + SetFieldUnit( maMtrWidth, meDlgUnit, sal_True ); + SetFieldUnit( maMtrHeight, meDlgUnit, sal_True ); if(FUNIT_MILE == meDlgUnit || FUNIT_KM == meDlgUnit) { @@ -818,7 +818,7 @@ void SvxPositionSizeTabPage::Construct() // diferent anchor positions maMtrPosX.SetText( String() ); maMtrPosY.SetText( String() ); - mbPageDisabled = TRUE; + mbPageDisabled = sal_True; return; } } @@ -845,8 +845,8 @@ void SvxPositionSizeTabPage::Construct() maTsbAutoGrowHeight.SetClickHdl( LINK( this, SvxPositionSizeTabPage, ClickSizeProtectHdl ) ); // is used as flag to evaluate if its selectable - maTsbAutoGrowWidth.EnableTriState( FALSE ); - maTsbAutoGrowHeight.EnableTriState( FALSE ); + maTsbAutoGrowWidth.EnableTriState( sal_False ); + maTsbAutoGrowHeight.EnableTriState( sal_False ); } } @@ -865,9 +865,9 @@ void SvxPositionSizeTabPage::Construct() // ----------------------------------------------------------------------- -BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) +sal_Bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) { - BOOL bModified(FALSE); + sal_Bool bModified(sal_False); if ( maMtrWidth.HasFocus() ) { @@ -899,7 +899,7 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) rOutAttrs.Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_POS_X), basegfx::fround(fX))); rOutAttrs.Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_POS_Y), basegfx::fround(fY))); - bModified |= TRUE; + bModified |= sal_True; } if ( maTsbPosProtect.GetState() != maTsbPosProtect.GetSavedValue() ) @@ -912,10 +912,10 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) { rOutAttrs.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ), - maTsbPosProtect.GetState() == STATE_CHECK ? TRUE : FALSE ) ); + maTsbPosProtect.GetState() == STATE_CHECK ? sal_True : sal_False ) ); } - bModified |= TRUE; + bModified |= sal_True; } } @@ -939,11 +939,11 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) // put Width & Height to itemset rOutAttrs.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), - (UINT32) lWidth ) ); + (sal_uInt32) lWidth ) ); rOutAttrs.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ), - (UINT32) lHeight ) ); - rOutAttrs.Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), sal::static_int_cast< USHORT >( meRP ) ) ); - bModified |= TRUE; + (sal_uInt32) lHeight ) ); + rOutAttrs.Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), sal::static_int_cast< sal_uInt16 >( meRP ) ) ); + bModified |= sal_True; } if ( maTsbSizeProtect.GetState() != maTsbSizeProtect.GetSavedValue() ) @@ -953,8 +953,8 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) else rOutAttrs.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ), - maTsbSizeProtect.GetState() == STATE_CHECK ? TRUE : FALSE ) ); - bModified |= TRUE; + maTsbSizeProtect.GetState() == STATE_CHECK ? sal_True : sal_False ) ); + bModified |= sal_True; } if ( maTsbAutoGrowWidth.GetState() != maTsbAutoGrowWidth.GetSavedValue() ) @@ -966,9 +966,9 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) else rOutAttrs.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOWIDTH ), - maTsbAutoGrowWidth.GetState() == STATE_CHECK ? TRUE : FALSE ) ); + maTsbAutoGrowWidth.GetState() == STATE_CHECK ? sal_True : sal_False ) ); } - bModified |= TRUE; + bModified |= sal_True; } if ( maTsbAutoGrowHeight.GetState() != maTsbAutoGrowHeight.GetSavedValue() ) @@ -980,9 +980,9 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) else rOutAttrs.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOHEIGHT ), - maTsbAutoGrowHeight.GetState() == STATE_CHECK ? TRUE : FALSE ) ); + maTsbAutoGrowHeight.GetState() == STATE_CHECK ? sal_True : sal_False ) ); } - bModified |= TRUE; + bModified |= sal_True; } @@ -1017,7 +1017,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& ) { sal_Bool bProtected = ( ( const SfxBoolItem* )pItem )->GetValue(); maTsbPosProtect.SetState( bProtected ? STATE_CHECK : STATE_NOCHECK ); - maTsbPosProtect.EnableTriState( FALSE ); + maTsbPosProtect.EnableTriState( sal_False ); } else { @@ -1060,7 +1060,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& ) { maTsbSizeProtect.SetState( ( (const SfxBoolItem*)pItem )->GetValue() ? STATE_CHECK : STATE_NOCHECK ); - maTsbSizeProtect.EnableTriState( FALSE ); + maTsbSizeProtect.EnableTriState( sal_False ); } else maTsbSizeProtect.SetState( STATE_DONTKNOW ); @@ -1085,7 +1085,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& ) // Ist Abgleich gesetzt? String aStr = GetUserData(); - maCbxScale.Check( (BOOL)aStr.ToInt32() ); + maCbxScale.Check( (sal_Bool)aStr.ToInt32() ); maTsbSizeProtect.SaveValue(); maTsbAutoGrowWidth.SaveValue(); @@ -1105,7 +1105,7 @@ SfxTabPage* SvxPositionSizeTabPage::Create( Window* pWindow, const SfxItemSet& r //------------------------------------------------------------------------ -USHORT* SvxPositionSizeTabPage::GetRanges() +sal_uInt16* SvxPositionSizeTabPage::GetRanges() { return( pPosSizeRanges ); } @@ -1116,7 +1116,7 @@ void SvxPositionSizeTabPage::ActivatePage( const SfxItemSet& rSet ) { SfxRectangleItem* pRectItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , FALSE, (const SfxPoolItem**) &pRectItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , sal_False, (const SfxPoolItem**) &pRectItem ) ) { { // #i75273# const Rectangle aTempRect(pRectItem->GetValue()); diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index 2ffeb0d09739..ed7dde55290f 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -78,7 +78,7 @@ namespace abp m_aName.SetModifyHdl( LINK(this, FinalPage, OnNameModified) ); m_aLocation.SetModifyHdl( LINK(this, FinalPage, OnNameModified) ); m_aRegisterName.SetClickHdl( LINK( this, FinalPage, OnRegister ) ); - m_aRegisterName.Check(TRUE); + m_aRegisterName.Check(sal_True); } //--------------------------------------------------------------------- @@ -217,7 +217,7 @@ namespace abp // ----------------------------------------------------------------------------- IMPL_LINK( FinalPage, OnRegister, CheckBox*, EMPTYARG ) { - BOOL bEnable = m_aRegisterName.IsChecked(); + sal_Bool bEnable = m_aRegisterName.IsChecked(); m_aNameLabel.Enable(bEnable); m_aName.Enable(bEnable); implCheckName(); diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index d8007873a2c4..83200c373385 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -140,7 +140,7 @@ namespace abp //--------------------------------------------------------------------- String OAddessBookSourcePilot::getStateDisplayName( WizardState _nState ) const { - USHORT nResId = 0; + sal_uInt16 nResId = 0; switch ( _nState ) { case STATE_SELECT_ABTYPE: nResId = STR_SELECT_ABTYPE; break; @@ -205,7 +205,7 @@ namespace abp } //--------------------------------------------------------------------- - BOOL OAddessBookSourcePilot::Close() + sal_Bool OAddessBookSourcePilot::Close() { implCleanup(); diff --git a/extensions/source/abpilot/abspilot.hxx b/extensions/source/abpilot/abspilot.hxx index 0abdacd0281d..c87748a49da2 100644 --- a/extensions/source/abpilot/abspilot.hxx +++ b/extensions/source/abpilot/abspilot.hxx @@ -84,7 +84,7 @@ namespace abp // RoadmapWizard virtual String getStateDisplayName( WizardState _nState ) const; - virtual BOOL Close(); + virtual sal_Bool Close(); private: DECL_LINK( OnCancelClicked, void* ); diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx index 7020f9eec2ba..f0203607c219 100644 --- a/extensions/source/bibliography/bibbeam.cxx +++ b/extensions/source/bibliography/bibbeam.cxx @@ -65,7 +65,7 @@ namespace bib using namespace ::com::sun::star::uno; - void HandleTaskPaneList( Window* pWindow, BOOL bAddToList ) + void HandleTaskPaneList( Window* pWindow, sal_Bool bAddToList ) { Window* pParent = pWindow->GetParent(); diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx index 0515e4227b86..16ece4dc7411 100644 --- a/extensions/source/bibliography/bibconfig.cxx +++ b/extensions/source/bibliography/bibconfig.cxx @@ -279,7 +279,7 @@ void BibConfig::Commit() OUString sCommandType(C2U("CommandType")); for(sal_Int32 i = 0; i < pMappingsArr->Count(); i++) { - const Mapping* pMapping = pMappingsArr->GetObject((USHORT)i); + const Mapping* pMapping = pMappingsArr->GetObject((sal_uInt16)i); OUString sPrefix(C2U(cDataSourceHistory)); sPrefix += C2U("/_"); sPrefix += OUString::valueOf(i); diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx index 2666a1a69199..6309b635f386 100644 --- a/extensions/source/bibliography/bibcont.cxx +++ b/extensions/source/bibliography/bibcont.cxx @@ -233,8 +233,8 @@ long BibBookContainer::PreNotify( NotifyEvent& rNEvt ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); const KeyCode aKeyCode = pKEvt->GetKeyCode(); - USHORT nKey = aKeyCode.GetCode(); - const USHORT nModifier = aKeyCode.GetModifier(); + sal_uInt16 nKey = aKeyCode.GetCode(); + const sal_uInt16 nModifier = aKeyCode.GetModifier(); if( KEY_MOD2 == nModifier ) { @@ -242,8 +242,8 @@ long BibBookContainer::PreNotify( NotifyEvent& rNEvt ) { if(pTopWin && pBottomWin) { - USHORT nFirstWinId = KEY_UP == nKey ? TOP_WINDOW : BOTTOM_WINDOW; - USHORT nSecondWinId = KEY_UP == nKey ? BOTTOM_WINDOW : TOP_WINDOW; + sal_uInt16 nFirstWinId = KEY_UP == nKey ? TOP_WINDOW : BOTTOM_WINDOW; + sal_uInt16 nSecondWinId = KEY_UP == nKey ? BOTTOM_WINDOW : TOP_WINDOW; long nHeight = GetItemSize( nFirstWinId ); nHeight -= WIN_STEP_SIZE; if(nHeight < WIN_MIN_HEIGHT) diff --git a/extensions/source/bibliography/bibcont.hxx b/extensions/source/bibliography/bibcont.hxx index 12b1bf1748e8..931c4d3fb09b 100644 --- a/extensions/source/bibliography/bibcont.hxx +++ b/extensions/source/bibliography/bibcont.hxx @@ -57,7 +57,7 @@ class BibWindowContainer : public BibWindow //Window virtual void GetFocus(); - virtual BOOL HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled + virtual sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled using Window::GetChild; }; diff --git a/extensions/source/bibliography/bibresid.hxx b/extensions/source/bibliography/bibresid.hxx index 5fc3e06abb59..75b61129b96e 100644 --- a/extensions/source/bibliography/bibresid.hxx +++ b/extensions/source/bibliography/bibresid.hxx @@ -35,7 +35,7 @@ class BibResId : public ResId { public: - BibResId( USHORT nId ); + BibResId( sal_uInt16 nId ); }; diff --git a/extensions/source/bibliography/bibshortcuthandler.hxx b/extensions/source/bibliography/bibshortcuthandler.hxx index 3e9d152d5583..0ef8c6fcf9a2 100644 --- a/extensions/source/bibliography/bibshortcuthandler.hxx +++ b/extensions/source/bibliography/bibshortcuthandler.hxx @@ -46,7 +46,7 @@ protected: public: virtual ~BibShortCutHandler(); - virtual BOOL HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled + virtual sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled inline Window* GetWindow( void ); }; diff --git a/extensions/source/bibliography/bibtools.hxx b/extensions/source/bibliography/bibtools.hxx index 090fa280ad4d..22b9e07faac2 100644 --- a/extensions/source/bibliography/bibtools.hxx +++ b/extensions/source/bibliography/bibtools.hxx @@ -33,17 +33,17 @@ namespace bib { // source in bibbeam.cxx - void HandleTaskPaneList( Window* pWindow, BOOL bAddToList ); + void HandleTaskPaneList( Window* pWindow, sal_Bool bAddToList ); // pWindow: just an system window or something wich is child of a system window inline void AddToTaskPaneList( Window* pWindowToBeHandled ) { - HandleTaskPaneList( pWindowToBeHandled, TRUE ); + HandleTaskPaneList( pWindowToBeHandled, sal_True ); } inline void RemoveFromTaskPaneList( Window* pWindowToBeHandled ) { - HandleTaskPaneList( pWindowToBeHandled, FALSE ); + HandleTaskPaneList( pWindowToBeHandled, sal_False ); } } diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx index fee2610898f6..76f489f17bf5 100644 --- a/extensions/source/bibliography/bibview.cxx +++ b/extensions/source/bibliography/bibview.cxx @@ -222,9 +222,9 @@ namespace bib m_pGeneralPage->GrabFocus(); } - BOOL BibView::HandleShortCutKey( const KeyEvent& rKeyEvent ) + sal_Bool BibView::HandleShortCutKey( const KeyEvent& rKeyEvent ) { - return m_pGeneralPage? m_pGeneralPage->HandleShortCutKey( rKeyEvent ) : FALSE; + return m_pGeneralPage? m_pGeneralPage->HandleShortCutKey( rKeyEvent ) : sal_False; } //......................................................................... diff --git a/extensions/source/bibliography/bibview.hxx b/extensions/source/bibliography/bibview.hxx index ec165f9a7930..59c516874568 100644 --- a/extensions/source/bibliography/bibview.hxx +++ b/extensions/source/bibliography/bibview.hxx @@ -74,7 +74,7 @@ namespace bib virtual void GetFocus(); - virtual BOOL HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled + virtual sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled }; //......................................................................... diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index e903707a74ec..4d4092804879 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -329,7 +329,7 @@ public: MappingDialog_Impl(Window* pParent, BibDataManager* pDatMan); ~MappingDialog_Impl(); - void SetModified() {bModified = TRUE;} + void SetModified() {bModified = sal_True;} }; /* -----------------11.11.99 16:42------------------- diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index 4489fad70161..ca9996216f9b 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -422,8 +422,8 @@ sal_Bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::X Window* lcl_GetFocusChild( Window* pParent ) { - USHORT nChildren = pParent->GetChildCount(); - for( USHORT nChild = 0; nChild < nChildren; ++nChild) + sal_uInt16 nChildren = pParent->GetChildCount(); + for( sal_uInt16 nChild = 0; nChild < nChildren; ++nChild) { Window* pChild = pParent->GetChild( nChild ); if(pChild->HasFocus()) diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index 63c813fe2a99..36e7c825a8bf 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -278,8 +278,8 @@ BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan): aBasePos = aIdentifierFT.GetPosPixel(); - INT16* pMap = nFT2CtrlMap; - for( USHORT i = 0 ; i < FIELD_COUNT ; ++i, ++pMap ) + sal_Int16* pMap = nFT2CtrlMap; + for( sal_uInt16 i = 0 ; i < FIELD_COUNT ; ++i, ++pMap ) { aControls[ i ] = 0; *pMap = -1; @@ -437,7 +437,7 @@ BibGeneralPage::~BibGeneralPage() ---------------------------------------------------------------------------*/ void BibGeneralPage::RemoveListeners() { - for(USHORT i = 0; i < FIELD_COUNT; i++) + for(sal_uInt16 i = 0; i < FIELD_COUNT; i++) { if(aControls[i].is()) { @@ -468,7 +468,7 @@ void BibGeneralPage::AddControlWithError( const OUString& rColumnName, const ::P { // adds also the XControl and creates a map entry in nFT2CtrlMap[] for mapping between control and FT - INT16 nIndex = -1; + sal_Int16 nIndex = -1; uno::Reference< awt::XControlModel > xTmp = AddXControl(rColumnName, rPos, rSize, sHelpId, nIndex ); if( xTmp.is() ) { @@ -488,7 +488,7 @@ void BibGeneralPage::AddControlWithError( const OUString& rColumnName, const ::P //----------------------------------------------------------------------------- uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl( const String& rName, - ::Point rPos, ::Size rSize, const rtl::OString& sHelpId, INT16& rIndex ) + ::Point rPos, ::Size rSize, const rtl::OString& sHelpId, sal_Int16& rIndex ) { uno::Reference< awt::XControlModel > xCtrModel; try @@ -545,7 +545,7 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl( xPropSet->setPropertyValue(C2U("StringItemList"), aAny); - BOOL bTrue = sal_True; + sal_Bool bTrue = sal_True; aAny.setValue( &bTrue, ::getBooleanCppuType() ); xPropSet->setPropertyValue( C2U("Dropdown"), aAny ); @@ -564,11 +564,11 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl( uno::Reference< awt::XWindow > xCtrWin(xControl, UNO_QUERY ); xCtrWin->addFocusListener( this ); rIndex = -1; // -> implies, that not found - for(USHORT i = 0; i < FIELD_COUNT; i++) + for(sal_uInt16 i = 0; i < FIELD_COUNT; i++) if(!aControls[i].is()) { aControls[i] = xCtrWin; - rIndex = INT16( i ); + rIndex = sal_Int16( i ); break; } xCtrWin->setVisible( sal_True ); @@ -595,8 +595,8 @@ void BibGeneralPage::AdjustScrollbars() long nVertScrollWidth = aVertScroll.GetSizePixel().Width(); long nHoriScrollHeight = aHoriScroll.GetSizePixel().Height(); ::Size aOutSize(GetOutputSizePixel()); - BOOL bHoriVisible = aOutSize.Width() <= aStdSize.Width(); - BOOL bVertVisible = (aOutSize.Height()-(bHoriVisible ? nHoriScrollHeight : 0)) <= (aStdSize.Height()); + sal_Bool bHoriVisible = aOutSize.Width() <= aStdSize.Width(); + sal_Bool bVertVisible = (aOutSize.Height()-(bHoriVisible ? nHoriScrollHeight : 0)) <= (aStdSize.Height()); aHoriScroll.Show(bHoriVisible); aVertScroll.Show(bVertVisible); @@ -732,7 +732,7 @@ void BibGeneralPage::InitFixedTexts( void ) IMPL_LINK(BibGeneralPage, ScrollHdl, ScrollBar*, pScroll) { - BOOL bVertical = &aVertScroll == pScroll; + sal_Bool bVertical = &aVertScroll == pScroll; long nOffset = 0; long nCurrentOffset = 0; if(bVertical) @@ -741,7 +741,7 @@ IMPL_LINK(BibGeneralPage, ScrollHdl, ScrollBar*, pScroll) nCurrentOffset = aFixedTexts[0]->GetPosPixel().X() - aBasePos.X(); nOffset = pScroll->IsVisible() ? pScroll->GetThumbPos() + nCurrentOffset : nCurrentOffset;; - for(USHORT i = 0; i < FIELD_COUNT; i++) + for(sal_uInt16 i = 0; i < FIELD_COUNT; i++) { ::Point aPos = aFixedTexts[i]->GetPosPixel(); if(bVertical) @@ -826,13 +826,13 @@ void BibGeneralPage::GetFocus() aControlParentWin.GrabFocus(); } -BOOL BibGeneralPage::HandleShortCutKey( const KeyEvent& rKeyEvent ) +sal_Bool BibGeneralPage::HandleShortCutKey( const KeyEvent& rKeyEvent ) { DBG_ASSERT( KEY_MOD2 == rKeyEvent.GetKeyCode().GetModifier(), "+BibGeneralPage::HandleShortCutKey(): this is not for me!" ); const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); const xub_Unicode c = rKeyEvent.GetCharCode(); - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; sal_Int16 i; @@ -847,7 +847,7 @@ BOOL BibGeneralPage::HandleShortCutKey( const KeyEvent& rKeyEvent ) { if( rI18nHelper.MatchMnemonic( aFixedTexts[ i ]->GetText(), c ) ) { - bHandled = TRUE; + bHandled = sal_True; sal_Int16 nCtrlIndex = nFT2CtrlMap[ i ]; if( nCtrlIndex >= 0 ) diff --git a/extensions/source/bibliography/general.hxx b/extensions/source/bibliography/general.hxx index 27074404929a..b5519301131d 100644 --- a/extensions/source/bibliography/general.hxx +++ b/extensions/source/bibliography/general.hxx @@ -179,7 +179,7 @@ public: virtual void GetFocus(); - virtual BOOL HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled + virtual sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled }; diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 2af70ffcbffd..d320f175f0a3 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -389,7 +389,7 @@ void BibToolBar::Click() { if(pDatMan) pDatMan->CreateMappingDialog(GetParent()); - CheckItem( nId, FALSE ); + CheckItem( nId, sal_False ); } else if(nId == TBC_BT_CHANGESOURCE) { @@ -399,7 +399,7 @@ void BibToolBar::Click() if(sNew.getLength()) pDatMan->setActiveDataSource(sNew); } - CheckItem( nId, FALSE ); + CheckItem( nId, sal_False ); } } diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 88d8e2eb352e..dfadd4893cb6 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -147,7 +147,7 @@ namespace dbp // search the entry of the given type with the given name XubString sLookup( sCommand ); - for ( USHORT nLookup = 0; nLookup < m_aTable.GetEntryCount(); ++nLookup ) + for ( sal_uInt16 nLookup = 0; nLookup < m_aTable.GetEntryCount(); ++nLookup ) { if ( m_aTable.GetEntry( nLookup ) == sLookup ) if ( reinterpret_cast< sal_IntPtr >( m_aTable.GetEntryData( nLookup ) ) == nCommandType ) diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index 7606fc7bec65..c19f1d3245c0 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -372,12 +372,12 @@ namespace dbp return sal_False; OGridSettings& rSettings = getSettings(); - USHORT nSelected = m_aSelFields.GetEntryCount(); + sal_uInt16 nSelected = m_aSelFields.GetEntryCount(); rSettings.aSelectedFields.realloc(nSelected); ::rtl::OUString* pSelected = rSettings.aSelectedFields.getArray(); - for (USHORT i=0; i<nSelected; ++i, ++pSelected) + for (sal_uInt16 i=0; i<nSelected; ++i, ++pSelected) *pSelected = m_aSelFields.GetEntry(i); return sal_True; @@ -419,11 +419,11 @@ namespace dbp ListBox& rMoveTo = bMoveRight ? m_aSelFields : m_aExistFields; // the index of the selected entry - USHORT nSelected = bMoveRight ? m_aExistFields.GetSelectEntryPos() : m_aSelFields.GetSelectEntryPos(); + sal_uInt16 nSelected = bMoveRight ? m_aExistFields.GetSelectEntryPos() : m_aSelFields.GetSelectEntryPos(); // the (original) relative position of the entry sal_IntPtr nRelativeIndex = reinterpret_cast<sal_IntPtr>(bMoveRight ? m_aExistFields.GetEntryData(nSelected) : m_aSelFields.GetEntryData(nSelected)); - USHORT nInsertPos = LISTBOX_APPEND; + sal_uInt16 nInsertPos = LISTBOX_APPEND; if (!bMoveRight) { // need to determine an insert pos which reflects the original nInsertPos = 0; @@ -446,7 +446,7 @@ namespace dbp // remove the entry from it's old list if (bMoveRight) { - USHORT nSelectPos = m_aExistFields.GetSelectEntryPos(); + sal_uInt16 nSelectPos = m_aExistFields.GetSelectEntryPos(); m_aExistFields.RemoveEntry(nSelected); if ((LISTBOX_ENTRY_NOTFOUND != nSelectPos) && (nSelectPos < m_aExistFields.GetEntryCount())) m_aExistFields.SelectEntryPos(nSelectPos); @@ -455,7 +455,7 @@ namespace dbp } else { - USHORT nSelectPos = m_aSelFields.GetSelectEntryPos(); + sal_uInt16 nSelectPos = m_aSelFields.GetSelectEntryPos(); m_aSelFields.RemoveEntry(nSelected); if ((LISTBOX_ENTRY_NOTFOUND != nSelectPos) && (nSelectPos < m_aSelFields.GetEntryCount())) m_aSelFields.SelectEntryPos(nSelectPos); diff --git a/extensions/source/inc/componentmodule.hxx b/extensions/source/inc/componentmodule.hxx index 88d6e5cf99c0..70c416ac8d51 100644 --- a/extensions/source/inc/componentmodule.hxx +++ b/extensions/source/inc/componentmodule.hxx @@ -168,7 +168,7 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService class ModuleRes : public ::ResId { public: - ModuleRes(USHORT _nId) : ResId(_nId, *OModule::getResManager()) { } + ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { } }; //========================================================================== diff --git a/extensions/source/plugin/aqua/macmgr.cxx b/extensions/source/plugin/aqua/macmgr.cxx index b66963e420fb..e0bfe3ad5c01 100644 --- a/extensions/source/plugin/aqua/macmgr.cxx +++ b/extensions/source/plugin/aqua/macmgr.cxx @@ -580,7 +580,7 @@ static rtl::OUString FindFolderURL( FSVolumeRefNum vRefNum, OSType folderType ) Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() throw() { static Sequence<PluginDescription> aDescriptions; - static BOOL bHavePlugins = FALSE; + static sal_Bool bHavePlugins = sal_False; if( ! bHavePlugins ) { std::list<PluginDescription*> aPlugins; @@ -639,7 +639,7 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th delete *iter; } aPlugins.clear(); - bHavePlugins = TRUE; + bHavePlugins = sal_True; } return aDescriptions; } diff --git a/extensions/source/plugin/aqua/sysplug.cxx b/extensions/source/plugin/aqua/sysplug.cxx index 81637eb2d564..206204fa10a7 100644 --- a/extensions/source/plugin/aqua/sysplug.cxx +++ b/extensions/source/plugin/aqua/sysplug.cxx @@ -67,8 +67,8 @@ struct FakeEventRecord : public EventRecord } -(id)initWithInstance: (XPlugin_Impl*)i_pImpl pluginComm: (MacPluginComm*)i_pCom frame: (NSRect)i_aRect; -(void)drawRect: (NSRect)i_aRect; --(MacOSBOOL)isOpaque; --(MacOSBOOL)isFlipped; +-(BOOL)isOpaque; +-(BOOL)isFlipped; // NSResponder -(void)mouseMoved: (NSEvent*)i_pEvent; @@ -101,12 +101,12 @@ struct FakeEventRecord : public EventRecord m_pCom->drawView( m_pImpl ); } --(MacOSBOOL)isOpaque +-(BOOL)isOpaque { return NO; } --(MacOSBOOL)isFlipped +-(BOOL)isFlipped { return YES; } @@ -270,10 +270,10 @@ MacPluginComm::~MacPluginComm() } //-------------------------------------------------------------------------------------------------- -BOOL MacPluginComm::retrieveFunction( const char* i_pName, void** o_ppFunc ) const +sal_Bool MacPluginComm::retrieveFunction( const char* i_pName, void** o_ppFunc ) const { if( ! m_hPlugLib || ! o_ppFunc ) - return FALSE; + return sal_False; *o_ppFunc = (void*)osl_getAsciiFunctionSymbol( m_hPlugLib, i_pName ); diff --git a/extensions/source/plugin/base/manager.cxx b/extensions/source/plugin/base/manager.cxx index 0526f3ed881b..c40f599aad23 100644 --- a/extensions/source/plugin/base/manager.cxx +++ b/extensions/source/plugin/base/manager.cxx @@ -76,9 +76,9 @@ const Sequence< ::rtl::OUString >& PluginManager::getAdditionalSearchPaths() String aPluginPath( aOptions.GetPluginPath() ); if( aPluginPath.Len() ) { - USHORT nPaths = aPluginPath.GetTokenCount( ';' ); + sal_uInt16 nPaths = aPluginPath.GetTokenCount( ';' ); aPaths.realloc( nPaths ); - for( USHORT i = 0; i < nPaths; i++ ) + for( sal_uInt16 i = 0; i < nPaths; i++ ) aPaths.getArray()[i] = aPluginPath.GetToken( i, ';' ); } } @@ -176,7 +176,7 @@ Sequence<com::sun::star::plugin::PluginDescription> XPluginManager_Impl::getPlug return aRet; } -Reference< ::com::sun::star::plugin::XPlugin > XPluginManager_Impl::createPlugin( const Reference< ::com::sun::star::plugin::XPluginContext >& acontext, INT16 mode, const Sequence< ::rtl::OUString >& argn, const Sequence< ::rtl::OUString >& argv, const ::com::sun::star::plugin::PluginDescription& plugintype) +Reference< ::com::sun::star::plugin::XPlugin > XPluginManager_Impl::createPlugin( const Reference< ::com::sun::star::plugin::XPluginContext >& acontext, sal_Int16 mode, const Sequence< ::rtl::OUString >& argn, const Sequence< ::rtl::OUString >& argv, const ::com::sun::star::plugin::PluginDescription& plugintype) throw( RuntimeException,::com::sun::star::plugin::PluginException ) { XPlugin_Impl* pImpl = new XPlugin_Impl( m_xSMgr ); diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx index a501d23f269b..b031df45e2af 100644 --- a/extensions/source/plugin/base/xplugin.cxx +++ b/extensions/source/plugin/base/xplugin.cxx @@ -78,7 +78,7 @@ void PluginDisposer::onShot() { if( m_pPlugin->isDisposable() ) { - ULONG nEvent; + sal_uLong nEvent; Application::PostUserEvent( nEvent, LINK( m_pPlugin, XPlugin_Impl, secondLevelDispose ), (void*)m_pPlugin ); } } @@ -1026,7 +1026,7 @@ void PluginInputStream::load() aUrl.SetSmartProtocol( INET_PROT_FILE ); aUrl.SetSmartURL( String( getStream()->url, - ::sal::static_int_cast< USHORT, size_t >( strlen( getStream()->url ) ), + ::sal::static_int_cast< sal_uInt16, size_t >( strlen( getStream()->url ) ), RTL_TEXTENCODING_MS_1252 ) ); try @@ -1071,8 +1071,8 @@ void PluginInputStream::writeBytes( const Sequence<sal_Int8>& Buffer ) throw() if( m_nMode == -1 || !m_pPlugin->getPluginComm() ) return; - UINT32 nPos = m_aFileStream.Tell(); - UINT32 nBytes = 0; + sal_uInt32 nPos = m_aFileStream.Tell(); + sal_uInt32 nBytes = 0; while( m_nMode != NP_ASFILEONLY && m_nWritePos < nPos && (nBytes = m_pPlugin->getPluginComm()-> NPP_WriteReady( diff --git a/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx b/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx index 941725b1f53d..bd4fc5405822 100644 --- a/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx +++ b/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx @@ -136,7 +136,7 @@ public: void drawView( XPlugin_Impl* ); private: - BOOL retrieveFunction( const char* i_pName, void** i_ppFunc ) const; + sal_Bool retrieveFunction( const char* i_pName, void** i_ppFunc ) const; DECL_LINK( NullTimerHdl, void* ); private: diff --git a/extensions/source/plugin/inc/plugin/impl.hxx b/extensions/source/plugin/inc/plugin/impl.hxx index 6aa7ec7cca14..9b91c2fdeef1 100644 --- a/extensions/source/plugin/inc/plugin/impl.hxx +++ b/extensions/source/plugin/inc/plugin/impl.hxx @@ -340,7 +340,7 @@ class PluginInputStream : private: ::ucbhelper::Content* m_pContent; sal_Int32 m_nMode; - UINT32 m_nWritePos; + sal_uInt32 m_nWritePos; Reference< com::sun::star::io::XActiveDataSource > m_xSource; // hold a reference on input until closeOutput is called @@ -354,7 +354,7 @@ private: SvFileStream m_aFileStream; public: PluginInputStream( XPlugin_Impl* pPlugin, - const char* url, UINT32 len, UINT32 lastmod ); + const char* url, sal_uInt32 len, sal_uInt32 lastmod ); PluginInputStream() : PluginStream( NULL, NULL, 0, 0 ) {} @@ -363,7 +363,7 @@ public: virtual PluginStreamType getStreamType(); void setMode( sal_Int32 nMode ); - UINT32 read( UINT32 offset, sal_Int8* buffer, UINT32 size ); + sal_uInt32 read( sal_uInt32 offset, sal_Int8* buffer, sal_uInt32 size ); void setSource( const Reference< com::sun::star::io::XActiveDataSource >& xSource ) { m_xSource = xSource; } // get contents ot url via ucbhelper::Content void load(); diff --git a/extensions/source/plugin/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx index e1a7f59b5dee..ea068410d13e 100644 --- a/extensions/source/plugin/inc/plugin/unx/mediator.hxx +++ b/extensions/source/plugin/inc/plugin/unx/mediator.hxx @@ -43,14 +43,14 @@ struct MediatorMessage { - ULONG m_nID; - ULONG m_nBytes; + sal_uLong m_nID; + sal_uLong m_nBytes; char* m_pBytes; char* m_pRun; MediatorMessage() : m_nID( 0 ), m_nBytes( 0 ), m_pBytes( NULL ), m_pRun( NULL ) {} - MediatorMessage( ULONG nID, ULONG nBytes, char* pBytes ) : + MediatorMessage( sal_uLong nID, sal_uLong nBytes, char* pBytes ) : m_nID( nID ),m_nBytes( nBytes ), m_pRun( NULL ) { m_pBytes = new char[ m_nBytes ]; @@ -63,7 +63,7 @@ struct MediatorMessage delete [] m_pBytes; } - void Set( ULONG nBytes, char* pBytes ) + void Set( sal_uLong nBytes, char* pBytes ) { if( m_pBytes ) delete [] m_pBytes; @@ -72,11 +72,11 @@ struct MediatorMessage memcpy( m_pBytes, pBytes, (size_t)m_nBytes ); } - ULONG ExtractULONG(); + sal_uLong ExtractULONG(); char* GetString(); - UINT32 GetUINT32(); - void* GetBytes( ULONG& ); - void* GetBytes() { ULONG nBytes; return GetBytes( nBytes ); } + sal_uInt32 GetUINT32(); + void* GetBytes( sal_uLong& ); + void* GetBytes() { sal_uLong nBytes; return GetBytes( nBytes ); } void Rewind() { m_pRun = NULL; } }; @@ -97,7 +97,7 @@ protected: MediatorListener* m_pListener; // thread to fill the queue - ULONG m_nCurrentID; + sal_uLong m_nCurrentID; // will be constantly increased with each message sent bool m_bValid; @@ -112,27 +112,27 @@ public: // with error void invalidate() { m_bValid = false; } - ULONG SendMessage( ULONG nBytes, const char* pBytes, ULONG nMessageID = 0 ); - ULONG SendMessage( const ByteString& rMessage, ULONG nMessageID = 0 ) + sal_uLong SendMessage( sal_uLong nBytes, const char* pBytes, sal_uLong nMessageID = 0 ); + sal_uLong SendMessage( const ByteString& rMessage, sal_uLong nMessageID = 0 ) { return SendMessage( rMessage.Len(), rMessage.GetBuffer(), nMessageID ); } - BOOL WaitForMessage( ULONG nTimeOut = 5000 ); + sal_Bool WaitForMessage( sal_uLong nTimeOut = 5000 ); // timeout in ms // TRUE: Message came in // FALSE: timed out // if timeout is set, WaitForMessage will wait even if there are messages // in the queue - virtual MediatorMessage* WaitForAnswer( ULONG nMessageID ); + virtual MediatorMessage* WaitForAnswer( sal_uLong nMessageID ); // wait for an answer message ( ID >= 1 << 24 ) // the message will be removed from the queue and returned - MediatorMessage* TransactMessage( ULONG nBytes, char* pBytes ); + MediatorMessage* TransactMessage( sal_uLong nBytes, char* pBytes ); // sends a message and waits for an answer - MediatorMessage* GetNextMessage( BOOL bWait = FALSE ); + MediatorMessage* GetNextMessage( sal_Bool bWait = sal_False ); Link SetConnectionLostHdl( const Link& rLink ) diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx index 694fab30801a..d333d994e111 100644 --- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx +++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx @@ -157,9 +157,9 @@ public: NPSavedData aData; ConnectorInstance( NPP inst, char* type, - int args, char* pargnbuf, ULONG nargnbytes, - char* pargvbuf, ULONG nargvbytes, - char* savedata, ULONG savebytes ); + int args, char* pargnbuf, sal_uLong nargnbytes, + char* pargvbuf, sal_uLong nargvbytes, + char* savedata, sal_uLong savebytes ); ~ConnectorInstance(); }; @@ -176,22 +176,22 @@ protected: std::vector<NPStream*> m_aNPWrapStreams; std::vector<ConnectorInstance*> m_aInstances; - ULONG FillBuffer( char*&, const char*, ULONG, va_list ); + sal_uLong FillBuffer( char*&, const char*, sal_uLong, va_list ); public: PluginConnector( int nSocket ); ~PluginConnector(); - virtual MediatorMessage* WaitForAnswer( ULONG nMessageID ); - MediatorMessage* Transact( const char*, ULONG, ... ); - MediatorMessage* Transact( UINT32, ... ); - void Respond( ULONG nID, char*, ULONG, ... ); - ULONG Send( UINT32, ... ); + virtual MediatorMessage* WaitForAnswer( sal_uLong nMessageID ); + MediatorMessage* Transact( const char*, sal_uLong, ... ); + MediatorMessage* Transact( sal_uInt32, ... ); + void Respond( sal_uLong nID, char*, sal_uLong, ... ); + sal_uLong Send( sal_uInt32, ... ); - static const UINT32 UnknownStreamID = 0xffffffff; - static const UINT32 UnknownNPPID = 0xffffffff; + static const sal_uInt32 UnknownStreamID = 0xffffffff; + static const sal_uInt32 UnknownNPPID = 0xffffffff; - UINT32 GetStreamID( NPStream* pStream ); - UINT32 GetNPPID( NPP ); + sal_uInt32 GetStreamID( NPStream* pStream ); + sal_uInt32 GetNPPID( NPP ); std::vector<NPStream*>& getStreamList() { return m_aNPWrapStreams; } @@ -210,7 +210,7 @@ public: } ConnectorInstance* getInstance( NPP ); - ConnectorInstance* getInstanceById( UINT32 ); + ConnectorInstance* getInstanceById( sal_uInt32 ); }; enum CommandAtoms diff --git a/extensions/source/plugin/unx/mediator.cxx b/extensions/source/plugin/unx/mediator.cxx index 9ecf0f48d9f8..4d8fd64a8407 100644 --- a/extensions/source/plugin/unx/mediator.cxx +++ b/extensions/source/plugin/unx/mediator.cxx @@ -56,7 +56,7 @@ Mediator::~Mediator() m_pListener = NULL; if( m_bValid ) { - ULONG aHeader[3]; + sal_uLong aHeader[3]; aHeader[0] = 0; aHeader[1] = 0; aHeader[2] = MEDIATOR_MAGIC; @@ -75,7 +75,7 @@ Mediator::~Mediator() } -ULONG Mediator::SendMessage( ULONG nBytes, const char* pBytes, ULONG nMessageID ) +sal_uLong Mediator::SendMessage( sal_uLong nBytes, const char* pBytes, sal_uLong nMessageID ) { if( ! m_pListener ) return 0; @@ -91,26 +91,26 @@ ULONG Mediator::SendMessage( ULONG nBytes, const char* pBytes, ULONG nMessageID if( ! m_bValid ) return nMessageID; - ULONG* pBuffer = new ULONG[ (nBytes/sizeof(ULONG)) + 4 ]; + sal_uLong* pBuffer = new sal_uLong[ (nBytes/sizeof(sal_uLong)) + 4 ]; pBuffer[ 0 ] = nMessageID; pBuffer[ 1 ] = nBytes; pBuffer[ 2 ] = MEDIATOR_MAGIC; memcpy( &pBuffer[3], pBytes, (size_t)nBytes ); - write( m_nSocket, pBuffer, nBytes + 3*sizeof( ULONG ) ); + write( m_nSocket, pBuffer, nBytes + 3*sizeof( sal_uLong ) ); delete [] pBuffer; return nMessageID; } -BOOL Mediator::WaitForMessage( ULONG nTimeOut ) +sal_Bool Mediator::WaitForMessage( sal_uLong nTimeOut ) { if( ! m_pListener ) - return FALSE; + return sal_False; size_t nItems = m_aMessageQueue.size(); if( ! nTimeOut && nItems > 0 ) - return TRUE; + return sal_True; TimeValue aValue; aValue.Seconds = nTimeOut/1000; @@ -121,12 +121,12 @@ BOOL Mediator::WaitForMessage( ULONG nTimeOut ) m_aNewMessageCdtn.wait( & aValue ); m_aNewMessageCdtn.reset(); if( nTimeOut && m_aMessageQueue.size() == nItems ) - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } -MediatorMessage* Mediator::WaitForAnswer( ULONG nMessageID ) +MediatorMessage* Mediator::WaitForAnswer( sal_uLong nMessageID ) { nMessageID &= 0x00ffffff; while( m_pListener ) @@ -136,7 +136,7 @@ MediatorMessage* Mediator::WaitForAnswer( ULONG nMessageID ) for( size_t i = 0; i < m_aMessageQueue.size(); i++ ) { MediatorMessage* pMessage = m_aMessageQueue[ i ]; - ULONG nID = pMessage->m_nID; + sal_uLong nID = pMessage->m_nID; if( ( nID & 0xff000000 ) && ( ( nID & 0x00ffffff ) == nMessageID ) ) { @@ -150,7 +150,7 @@ MediatorMessage* Mediator::WaitForAnswer( ULONG nMessageID ) return NULL; } -MediatorMessage* Mediator::GetNextMessage( BOOL bWait ) +MediatorMessage* Mediator::GetNextMessage( sal_Bool bWait ) { while( m_pListener ) { @@ -175,9 +175,9 @@ MediatorMessage* Mediator::GetNextMessage( BOOL bWait ) return NULL; } -MediatorMessage* Mediator::TransactMessage( ULONG nBytes, char* pBytes ) +MediatorMessage* Mediator::TransactMessage( sal_uLong nBytes, char* pBytes ) { - ULONG nID = SendMessage( nBytes, pBytes ); + sal_uLong nID = SendMessage( nBytes, pBytes ); return WaitForAnswer( nID ); } @@ -195,7 +195,7 @@ void MediatorListener::run() bool bRun = true; while( schedule() && m_pMediator && bRun ) { - ULONG nHeader[ 3 ]; + sal_uLong nHeader[ 3 ]; int nBytes; if( m_pMediator && ( nBytes = read( m_pMediator->m_nSocket, nHeader, sizeof( nHeader ) ) ) == sizeof( nHeader ) && nHeader[2] == MEDIATOR_MAGIC) @@ -203,7 +203,7 @@ void MediatorListener::run() if( nHeader[ 0 ] == 0 && nHeader[ 1 ] == 0 ) return; char* pBuffer = new char[ nHeader[ 1 ] ]; - if( m_pMediator && (ULONG)read( m_pMediator->m_nSocket, pBuffer, nHeader[ 1 ] ) == nHeader[ 1 ] ) + if( m_pMediator && (sal_uLong)read( m_pMediator->m_nSocket, pBuffer, nHeader[ 1 ] ) == nHeader[ 1 ] ) { ::vos::OGuard aMyGuard( m_aMutex ); { @@ -243,30 +243,30 @@ void MediatorListener::onTerminated() delete this; } -ULONG MediatorMessage::ExtractULONG() +sal_uLong MediatorMessage::ExtractULONG() { if( ! m_pRun ) m_pRun = m_pBytes; - medDebug( (ULONG)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::ExtractULONG\n" ); - ULONG nCount; - memcpy( &nCount, m_pRun, sizeof( ULONG ) ); - m_pRun += sizeof( ULONG ); + medDebug( (sal_uLong)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::ExtractULONG\n" ); + sal_uLong nCount; + memcpy( &nCount, m_pRun, sizeof( sal_uLong ) ); + m_pRun += sizeof( sal_uLong ); return nCount; } -void* MediatorMessage::GetBytes( ULONG& rBytes ) +void* MediatorMessage::GetBytes( sal_uLong& rBytes ) { if( ! m_pRun ) m_pRun = m_pBytes; - medDebug( (ULONG)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::GetBytes\n" ); - ULONG nBytes = ExtractULONG(); + medDebug( (sal_uLong)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::GetBytes\n" ); + sal_uLong nBytes = ExtractULONG(); if( nBytes == 0 ) return NULL; - medDebug( (ULONG)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::GetBytes\n" ); + medDebug( (sal_uLong)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::GetBytes\n" ); char* pBuffer = new char[ nBytes ]; memcpy( pBuffer, m_pRun, nBytes ); m_pRun += nBytes; @@ -279,13 +279,13 @@ char* MediatorMessage::GetString() if( ! m_pRun ) m_pRun = m_pBytes; - medDebug( (ULONG)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::GetString\n" ); - ULONG nBytes = ExtractULONG(); + medDebug( (sal_uLong)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::GetString\n" ); + sal_uLong nBytes = ExtractULONG(); if( nBytes == 0 ) return NULL; - medDebug( (ULONG)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::GetString\n" ); + medDebug( (sal_uLong)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::GetString\n" ); char* pBuffer = new char[ nBytes+1 ]; memcpy( pBuffer, m_pRun, nBytes ); pBuffer[ nBytes ] = 0; @@ -293,17 +293,17 @@ char* MediatorMessage::GetString() return pBuffer; } -UINT32 MediatorMessage::GetUINT32() +sal_uInt32 MediatorMessage::GetUINT32() { if( ! m_pRun ) m_pRun = m_pBytes; - medDebug( (ULONG)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::GetUINT32\n" ); - ULONG nBytes = ExtractULONG(); - medDebug( nBytes != sizeof( UINT32 ), "No UINT32 in MediatorMessage::GetUINT32\n" ); - medDebug( (ULONG)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::GetUINT32\n" ); - UINT32 nRet; + medDebug( (sal_uLong)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::GetUINT32\n" ); + sal_uLong nBytes = ExtractULONG(); + medDebug( nBytes != sizeof( sal_uInt32 ), "No sal_uInt32 in MediatorMessage::GetUINT32\n" ); + medDebug( (sal_uLong)(m_pRun - m_pBytes) >= m_nBytes, "Overflow in MediatorMessage::GetUINT32\n" ); + sal_uInt32 nRet; memcpy( &nRet, m_pRun, sizeof( nRet ) ); - m_pRun += sizeof( UINT32 ); + m_pRun += sizeof( sal_uInt32 ); return nRet; } diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx index 4a88577c5b71..364ff05606bc 100644 --- a/extensions/source/plugin/unx/npnapi.cxx +++ b/extensions/source/plugin/unx/npnapi.cxx @@ -66,11 +66,11 @@ static uint32 l_NPN_MemFlush( uint32 /*nSize*/ ) static NPError l_NPN_DestroyStream( NPP instance, NPStream* stream, NPError reason ) { - UINT32 nInstance = pConnector->GetNPPID( instance ); + sal_uInt32 nInstance = pConnector->GetNPPID( instance ); if( nInstance == PluginConnector::UnknownNPPID ) return NPERR_GENERIC_ERROR; - UINT32 nFileID = pConnector->GetStreamID( stream ); + sal_uInt32 nFileID = pConnector->GetStreamID( stream ); MediatorMessage* pMes= pConnector-> Transact( eNPN_DestroyStream, @@ -117,7 +117,7 @@ static jref l_NPN_GetJavaPeer( NPP /*instance*/ ) static NPError l_NPN_GetURL( NPP instance, const char* url, const char* window ) { - UINT32 nInstance = pConnector->GetNPPID( instance ); + sal_uInt32 nInstance = pConnector->GetNPPID( instance ); if( nInstance == PluginConnector::UnknownNPPID ) return NPERR_GENERIC_ERROR; @@ -142,7 +142,7 @@ static NPError l_NPN_GetURL( NPP instance, const char* url, const char* window ) static NPError l_NPN_GetURLNotify( NPP instance, const char* url, const char* target, void* notifyData ) { - UINT32 nInstance = pConnector->GetNPPID( instance ); + sal_uInt32 nInstance = pConnector->GetNPPID( instance ); if( nInstance == PluginConnector::UnknownNPPID ) return NPERR_GENERIC_ERROR; @@ -169,7 +169,7 @@ static NPError l_NPN_NewStream( NPP instance, NPMIMEType type, const char* targe NPStream** stream ) // stream is a return value { - UINT32 nInstance = pConnector->GetNPPID( instance ); + sal_uInt32 nInstance = pConnector->GetNPPID( instance ); if( nInstance == PluginConnector::UnknownNPPID ) return NPERR_GENERIC_ERROR; @@ -203,7 +203,7 @@ static NPError l_NPN_NewStream( NPP instance, NPMIMEType type, const char* targe static NPError l_NPN_PostURLNotify( NPP instance, const char* url, const char* target, uint32 len, const char* buf, NPBool file, void* notifyData ) { - UINT32 nInstance = pConnector->GetNPPID( instance ); + sal_uInt32 nInstance = pConnector->GetNPPID( instance ); if( nInstance == PluginConnector::UnknownNPPID ) return NPERR_GENERIC_ERROR; @@ -228,7 +228,7 @@ static NPError l_NPN_PostURLNotify( NPP instance, const char* url, const char* t static NPError l_NPN_PostURL( NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file ) { - UINT32 nInstance = pConnector->GetNPPID( instance ); + sal_uInt32 nInstance = pConnector->GetNPPID( instance ); if( nInstance == PluginConnector::UnknownNPPID ) return NPERR_GENERIC_ERROR; @@ -254,29 +254,29 @@ static NPError l_NPN_RequestRead( NPStream* stream, NPByteRange* rangeList ) medDebug( 1, "pluginapp: NPN_RequestRead\n" ); NPByteRange* pRange = rangeList; - UINT32 nRanges = 0; + sal_uInt32 nRanges = 0; while( pRange ) { nRanges++; pRange = pRange->next; } - UINT32* pArray = new UINT32[ 2 * nRanges ]; + sal_uInt32* pArray = new sal_uInt32[ 2 * nRanges ]; pRange = rangeList; - UINT32 n = 0; + sal_uInt32 n = 0; while( pRange ) { - pArray[ 2*n ] = (UINT32)pRange->offset; - pArray[ 2*n + 1] = (UINT32)pRange->length; + pArray[ 2*n ] = (sal_uInt32)pRange->offset; + pArray[ 2*n + 1] = (sal_uInt32)pRange->length; n++; pRange = pRange->next; } - UINT32 nFileID = pConnector->GetStreamID( stream ); + sal_uInt32 nFileID = pConnector->GetStreamID( stream ); MediatorMessage* pMes = pConnector-> Transact( eNPN_RequestRead, &nFileID, sizeof( nFileID ), &nRanges, sizeof( nRanges ), - pArray, sizeof( UINT32 ) * 2 * nRanges, + pArray, sizeof( sal_uInt32 ) * 2 * nRanges, NULL ); if( ! pMes ) @@ -290,7 +290,7 @@ static NPError l_NPN_RequestRead( NPStream* stream, NPByteRange* rangeList ) static void l_NPN_Status( NPP instance, const char* message ) { - UINT32 nInstance = pConnector->GetNPPID( instance ); + sal_uInt32 nInstance = pConnector->GetNPPID( instance ); if( nInstance == PluginConnector::UnknownNPPID ) return; @@ -304,7 +304,7 @@ static const char* l_NPN_UserAgent( NPP instance ) { static char* pAgent = NULL; - UINT32 nInstance = pConnector->GetNPPID( instance ); + sal_uInt32 nInstance = pConnector->GetNPPID( instance ); if( nInstance == PluginConnector::UnknownNPPID ) { if( instance ) @@ -355,10 +355,10 @@ static void l_NPN_Version( int* major, int* minor, int* net_major, int* net_mino static int32 l_NPN_Write( NPP instance, NPStream* stream, int32 len, void* buffer ) { - UINT32 nFileID = pConnector->GetStreamID( stream ); + sal_uInt32 nFileID = pConnector->GetStreamID( stream ); if( nFileID == PluginConnector::UnknownStreamID ) return NPERR_GENERIC_ERROR; - UINT32 nInstance = pConnector->GetNPPID( instance ); + sal_uInt32 nInstance = pConnector->GetNPPID( instance ); if( nInstance == PluginConnector::UnknownNPPID ) return NPERR_GENERIC_ERROR; @@ -373,7 +373,7 @@ static int32 l_NPN_Write( NPP instance, NPStream* stream, int32 len, void* buffe if( ! pMes ) return 0; - INT32 nRet = pMes->GetUINT32(); + sal_Int32 nRet = pMes->GetUINT32(); return nRet; } @@ -531,7 +531,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) { MediatorMessage* pMessage; CommandAtoms nCommand; - while( (pMessage = GetNextMessage( FALSE )) ) + while( (pMessage = GetNextMessage( sal_False )) ) { nCommand = (CommandAtoms)pMessage->GetUINT32(); medDebug( 1, "pluginapp: %s\n", GetCommandName( nCommand ) ); @@ -539,9 +539,9 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) { case eNPP_DestroyStream: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; - UINT32 nFileID = pMessage->GetUINT32(); + sal_uInt32 nFileID = pMessage->GetUINT32(); NPStream* pStream = m_aNPWrapStreams[ nFileID ]; NPError aReason = GetNPError( pMessage ); m_aNPWrapStreams.erase( m_aNPWrapStreams.begin() + nFileID ); @@ -557,7 +557,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_Destroy: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); ConnectorInstance* pInst= m_aInstances[ nInstance ]; // some plugin rely on old netscapes behaviour @@ -576,7 +576,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) case eNPP_DestroyPhase2: { // now really destroy the instance - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); ConnectorInstance* pInst= m_aInstances[ nInstance ]; NPP instance = pInst->instance; NPSavedData* pSave = NULL; @@ -611,7 +611,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_NewStream: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; char* pType = pMessage->GetString(); NPStream* pStream = new NPStream; @@ -643,10 +643,10 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) int16* pArgc = (int16*)pMessage->GetBytes(); NPP instance = new NPP_t; instance->pdata = instance->ndata = NULL; - ULONG nArgnBytes, nArgvBytes; + sal_uLong nArgnBytes, nArgvBytes; char* pArgn = (char*)pMessage->GetBytes( nArgnBytes ); char* pArgv = (char*)pMessage->GetBytes( nArgvBytes ); - ULONG nSaveBytes; + sal_uLong nSaveBytes; char* pSavedData = (char*)pMessage->GetBytes( nSaveBytes ); ConnectorInstance* pInst = new ConnectorInstance( instance, pType, @@ -659,7 +659,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) aRet = aPluginFuncs.newp( pInst->pMimeType, instance, *pMode, *pArgc, pInst->nArg ? pInst->argn : NULL, pInst->nArg ? pInst->argv : NULL, - ( nSaveBytes == 4 && *(UINT32*)pSavedData == 0 ) ? + ( nSaveBytes == 4 && *(sal_uInt32*)pSavedData == 0 ) ? &(pInst->aData) : NULL ); medDebug( 1, "pluginapp: NPP_New( %s, %p, %d, %d, %p, %p, %p ) returns %d\n", pInst->pMimeType, @@ -695,7 +695,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_SetWindow: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); ConnectorInstance* pInst= m_aInstances[ nInstance ]; NPWindow* pWindow = (NPWindow*)pMessage->GetBytes(); @@ -795,9 +795,9 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_StreamAsFile: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; - UINT32 nFileID = pMessage->GetUINT32(); + sal_uInt32 nFileID = pMessage->GetUINT32(); NPStream* pStream = m_aNPWrapStreams[ nFileID ]; char* fname = pMessage->GetString(); medDebug( 1, "pluginapp: NPP_StreamAsFile %s\n", fname ); @@ -807,7 +807,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_URLNotify: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; char* url = pMessage->GetString(); NPReason* pReason = (NPReason*)pMessage->GetBytes(); @@ -820,9 +820,9 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_WriteReady: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; - UINT32 nFileID = pMessage->GetUINT32(); + sal_uInt32 nFileID = pMessage->GetUINT32(); NPStream* pStream = m_aNPWrapStreams[ nFileID ]; int32 nRet = aPluginFuncs.writeready( instance, pStream ); @@ -836,12 +836,12 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_Write: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; - UINT32 nFileID = pMessage->GetUINT32(); + sal_uInt32 nFileID = pMessage->GetUINT32(); NPStream* pStream = m_aNPWrapStreams[ nFileID ]; int32 offset = pMessage->GetUINT32(); - ULONG len; + sal_uLong len; char* buffer = (char*)pMessage->GetBytes( len ); int32 nRet = aPluginFuncs.write( instance, pStream, offset, len, buffer ); diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx index 82be7ae3c2df..640daba417ce 100644 --- a/extensions/source/plugin/unx/nppapi.cxx +++ b/extensions/source/plugin/unx/nppapi.cxx @@ -94,7 +94,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) MediatorMessage* pMessage; CommandAtoms nCommand; - while( (pMessage = GetNextMessage( FALSE )) ) + while( (pMessage = GetNextMessage( sal_False )) ) { nCommand = (CommandAtoms)pMessage->GetUINT32(); medDebug( 1, "%s\n", GetCommandName( nCommand ) ); @@ -102,7 +102,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) { case eNPN_GetURL: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; char* pUrl = pMessage->GetString(); char* pWindow = pMessage->GetString(); @@ -115,7 +115,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_GetURLNotify: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; char* pUrl = pMessage->GetString(); char* pWindow = pMessage->GetString(); @@ -131,13 +131,13 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_DestroyStream: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; - UINT32 nFileID = pMessage->GetUINT32(); + sal_uInt32 nFileID = pMessage->GetUINT32(); char* pUrl = pMessage->GetString(); NPError* pReason = (NPError*)pMessage->GetBytes(); NPError aRet = NPERR_FILE_NOT_FOUND; - if( nFileID < static_cast<UINT32>(m_aNPWrapStreams.size()) ) + if( nFileID < static_cast<sal_uInt32>(m_aNPWrapStreams.size()) ) { if( ! strcmp( m_aNPWrapStreams[ nFileID ]->url, pUrl ) ) { @@ -162,7 +162,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_NewStream: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; NPMIMEType pType = pMessage->GetString(); char* pTarget = pMessage->GetString(); @@ -173,24 +173,24 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) if( aRet != NPERR_NO_ERROR ) { - UINT32 nDummy = 0; + sal_uInt32 nDummy = 0; Respond( pMessage->m_nID, (char*)&aRet, sizeof( aRet ), "", 0, - &nDummy, sizeof(UINT32), - &nDummy, sizeof(UINT32), + &nDummy, sizeof(sal_uInt32), + &nDummy, sizeof(sal_uInt32), NULL ); } else { m_aNPWrapStreams.push_back( pStream ); - ULONG nLen = strlen( pStream->url ); + sal_uLong nLen = strlen( pStream->url ); Respond( pMessage->m_nID, (char*)&aRet, sizeof( aRet ), pStream->url, nLen, - &pStream->end, sizeof(UINT32), - &pStream->lastmodified, sizeof(UINT32), + &pStream->end, sizeof(sal_uInt32), + &pStream->lastmodified, sizeof(sal_uInt32), NULL ); } @@ -200,11 +200,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_PostURLNotify: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; char* pUrl = pMessage->GetString(); char* pTarget = pMessage->GetString(); - UINT32 nLen = pMessage->GetUINT32(); + sal_uInt32 nLen = pMessage->GetUINT32(); char* pBuf = (char*)pMessage->GetBytes(); NPBool* pFile = (NPBool*)pMessage->GetBytes(); void** pNData = (void**)pMessage->GetBytes(); @@ -220,11 +220,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_PostURL: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; char* pUrl = pMessage->GetString(); char* pWindow = pMessage->GetString(); - UINT32 nLen = pMessage->GetUINT32(); + sal_uInt32 nLen = pMessage->GetUINT32(); char* pBuf = (char*)pMessage->GetBytes(); NPBool* pFile = (NPBool*)pMessage->GetBytes(); NPError aRet = @@ -238,14 +238,14 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_RequestRead: { - UINT32 nFileID = pMessage->GetUINT32(); + sal_uInt32 nFileID = pMessage->GetUINT32(); NPStream* pStream = m_aNPWrapStreams[ nFileID ]; - UINT32 nRanges = pMessage->GetUINT32(); - UINT32* pArray = (UINT32*)pMessage->GetBytes(); + sal_uInt32 nRanges = pMessage->GetUINT32(); + sal_uInt32* pArray = (sal_uInt32*)pMessage->GetBytes(); // build ranges table NPByteRange* pFirst = new NPByteRange; NPByteRange* pRun = pFirst; - for( UINT32 n = 0; n < nRanges; n++ ) + for( sal_uInt32 n = 0; n < nRanges; n++ ) { pRun->offset = pArray[ 2*n ]; pRun->length = pArray[ 2*n+1 ]; @@ -265,7 +265,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_Status: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; char* pString = pMessage->GetString(); NPN_Status( instance, pString ); @@ -286,13 +286,13 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_Write: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; - UINT32 nFileID = pMessage->GetUINT32(); + sal_uInt32 nFileID = pMessage->GetUINT32(); NPStream* pStream = m_aNPWrapStreams[ nFileID ]; - INT32 nLen = pMessage->GetUINT32(); + sal_Int32 nLen = pMessage->GetUINT32(); void* pBuffer = pMessage->GetBytes(); - INT32 nRet = NPN_Write( instance, pStream, nLen, pBuffer ); + sal_Int32 nRet = NPN_Write( instance, pStream, nLen, pBuffer ); Respond( pMessage->m_nID, (char*)&nRet, sizeof( nRet ), NULL ); @@ -302,7 +302,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_UserAgent: { - UINT32 nInstance = pMessage->GetUINT32(); + sal_uInt32 nInstance = pMessage->GetUINT32(); NPP instance = m_aInstances[ nInstance ]->instance; const char* pAnswer = NPN_UserAgent( instance ); Respond( pMessage->m_nID, @@ -320,7 +320,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) } #define GET_INSTANCE() \ - UINT32 nInstance; \ + sal_uInt32 nInstance; \ nInstance = GetNPPID( instance ); #define GET_INSTANCE_RET( err ) \ @@ -350,9 +350,9 @@ NPError UnxPluginComm::NPP_Destroy( NPP instance, NPSavedData** save ) return NPERR_GENERIC_ERROR; aRet = GetNPError( pMes ); - ULONG nSaveBytes; + sal_uLong nSaveBytes; void* pSaveData = pMes->GetBytes( nSaveBytes ); - if( nSaveBytes == 4 && *(UINT32*)pSaveData == 0 ) + if( nSaveBytes == 4 && *(sal_uInt32*)pSaveData == 0 ) *save = NULL; else { @@ -369,7 +369,7 @@ NPError UnxPluginComm::NPP_DestroyStream( NPP instance, NPStream* stream, NPErro { NPError aRet = NPERR_GENERIC_ERROR; GET_INSTANCE_RET( aRet ); - UINT32 nFileID = GetStreamID( stream ); + sal_uInt32 nFileID = GetStreamID( stream ); if( nFileID == PluginConnector::UnknownStreamID ) return NPERR_GENERIC_ERROR; @@ -526,7 +526,7 @@ void UnxPluginComm::NPP_Shutdown() void UnxPluginComm::NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname ) { GET_INSTANCE(); - UINT32 nFileID = GetStreamID( stream ); + sal_uInt32 nFileID = GetStreamID( stream ); if( nFileID == PluginConnector::UnknownStreamID ) return; @@ -552,7 +552,7 @@ void UnxPluginComm::NPP_URLNotify( NPP instance, const char* url, NPReason reaso int32 UnxPluginComm::NPP_Write( NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer ) { GET_INSTANCE_RET( -1 ); - UINT32 nFileID = GetStreamID( stream ); + sal_uInt32 nFileID = GetStreamID( stream ); if( nFileID == PluginConnector::UnknownStreamID ) return -1; @@ -575,7 +575,7 @@ int32 UnxPluginComm::NPP_Write( NPP instance, NPStream* stream, int32 offset, in int32 UnxPluginComm::NPP_WriteReady( NPP instance, NPStream* stream ) { GET_INSTANCE_RET( -1 ); - UINT32 nFileID = GetStreamID( stream ); + sal_uInt32 nFileID = GetStreamID( stream ); if( nFileID == PluginConnector::UnknownStreamID ) return -1; diff --git a/extensions/source/plugin/unx/npwrap.cxx b/extensions/source/plugin/unx/npwrap.cxx index 387de8cde24d..98bb858ecc0f 100644 --- a/extensions/source/plugin/unx/npwrap.cxx +++ b/extensions/source/plugin/unx/npwrap.cxx @@ -227,7 +227,7 @@ static void signal_handler( int nSig ) static gboolean noClosure( gpointer ) { - return TRUE; + return sal_True; } // Xt events @@ -246,7 +246,7 @@ static gboolean checkXtEvent( GSource* ) static gboolean dispatchXtEvent( GSource*, GSourceFunc, gpointer ) { XtAppProcessEvent( app_context, XtIMAll ); - return TRUE; + return sal_True; } static GSourceFuncs aXtEventFuncs = @@ -267,7 +267,7 @@ static gboolean pollXtTimerCallback(gpointer) break; XtAppProcessEvent(app_context, XtIMAll & ~XtIMXEvent); } - return TRUE; + return sal_True; } static gboolean prepareWakeupEvent( GSource*, gint* ) @@ -302,7 +302,7 @@ static gboolean dispatchWakeupEvent( GSource*, GSourceFunc, gpointer ) pConnector = NULL; } - return TRUE; + return sal_True; } static GSourceFuncs aWakeupEventFuncs = { @@ -412,7 +412,7 @@ int main( int argc, char **argv) } g_source_set_priority( pXTSource, GDK_PRIORITY_EVENTS ); - g_source_set_can_recurse( pXTSource, TRUE ); + g_source_set_can_recurse( pXTSource, sal_True ); g_source_attach( pXTSource, NULL ); aXtPollDesc.fd = ConnectionNumber( pXtAppDisplay ); aXtPollDesc.events = G_IO_IN; @@ -474,7 +474,7 @@ int main( int argc, char **argv) do { #ifdef ENABLE_GTK - g_main_context_iteration( NULL, TRUE ); + g_main_context_iteration( NULL, sal_True ); #else XtAppProcessEvent( app_context, XtIMAll ); #endif diff --git a/extensions/source/plugin/unx/plugcon.cxx b/extensions/source/plugin/unx/plugcon.cxx index 8e0183ab8c81..c71738be3632 100644 --- a/extensions/source/plugin/unx/plugcon.cxx +++ b/extensions/source/plugin/unx/plugcon.cxx @@ -32,22 +32,22 @@ #include <cstdarg> #include <vector> -UINT32 PluginConnector::GetStreamID( NPStream* pStream ) +sal_uInt32 PluginConnector::GetStreamID( NPStream* pStream ) { size_t nLen = m_aNPWrapStreams.size(); for( size_t i = 0; i < nLen; i++ ) if( m_aNPWrapStreams[ i ] == pStream ) - return static_cast<UINT32>(i); + return static_cast<sal_uInt32>(i); medDebug( 1, "Error: NPStream has no ID\n" ); return UnknownStreamID; } -UINT32 PluginConnector::GetNPPID( NPP instance ) +sal_uInt32 PluginConnector::GetNPPID( NPP instance ) { size_t nLen = m_aInstances.size(); for( size_t i=0; i <nLen; i++ ) if( m_aInstances[ i ]->instance == instance ) - return static_cast<UINT32>(i); + return static_cast<sal_uInt32>(i); medDebug( 1, "Error: NPP has no ID\n" ); return UnknownNPPID; @@ -65,37 +65,37 @@ ConnectorInstance* PluginConnector::getInstance( NPP instance ) return NULL; } -ConnectorInstance* PluginConnector::getInstanceById( UINT32 nInstanceID ) +ConnectorInstance* PluginConnector::getInstanceById( sal_uInt32 nInstanceID ) { - return nInstanceID < static_cast<UINT32>(m_aInstances.size()) ? m_aInstances[ nInstanceID ] : NULL; + return nInstanceID < static_cast<sal_uInt32>(m_aInstances.size()) ? m_aInstances[ nInstanceID ] : NULL; } struct PtrStruct { char* pData; - ULONG nBytes; + sal_uLong nBytes; - PtrStruct( char* i_pData, ULONG i_nBytes ) + PtrStruct( char* i_pData, sal_uLong i_nBytes ) : pData( i_pData ), nBytes( i_nBytes ) {} }; -ULONG PluginConnector::FillBuffer( char*& rpBuffer, +sal_uLong PluginConnector::FillBuffer( char*& rpBuffer, const char* pFunction, - ULONG nFunctionLen, + sal_uLong nFunctionLen, va_list ap ) { std::vector< PtrStruct > aList; aList.reserve( 5 ); - ULONG nDataSize = nFunctionLen + sizeof( ULONG ); + sal_uLong nDataSize = nFunctionLen + sizeof( sal_uLong ); char* pNext; do { pNext = va_arg( ap, char* ); if( pNext ) { - aList.push_back( PtrStruct( pNext, va_arg( ap, ULONG ) ) ); - nDataSize += aList.back().nBytes + sizeof(ULONG); + aList.push_back( PtrStruct( pNext, va_arg( ap, sal_uLong ) ) ); + nDataSize += aList.back().nBytes + sizeof(sal_uLong); } } while( pNext ); @@ -108,8 +108,8 @@ ULONG PluginConnector::FillBuffer( char*& rpBuffer, for( std::vector<PtrStruct>::const_iterator it = aList.begin(); it != aList.end(); ++it ) { - memcpy( pRun, &it->nBytes, sizeof( ULONG ) ); - pRun += sizeof( ULONG ); + memcpy( pRun, &it->nBytes, sizeof( sal_uLong ) ); + pRun += sizeof( sal_uLong ); memcpy( pRun, it->pData, it->nBytes ); pRun += it->nBytes; } @@ -117,53 +117,53 @@ ULONG PluginConnector::FillBuffer( char*& rpBuffer, } MediatorMessage* PluginConnector::Transact( const char* pFunction, - ULONG nFunctionLen, ... ) + sal_uLong nFunctionLen, ... ) { va_list ap; char* pBuffer; va_start( ap, nFunctionLen ); - ULONG nSize = FillBuffer( pBuffer, pFunction, nFunctionLen, ap ); + sal_uLong nSize = FillBuffer( pBuffer, pFunction, nFunctionLen, ap ); va_end( ap ); return TransactMessage( nSize, pBuffer ); } -MediatorMessage* PluginConnector::Transact( UINT32 nFunction, ... ) +MediatorMessage* PluginConnector::Transact( sal_uInt32 nFunction, ... ) { va_list ap; char* pBuffer; va_start( ap, nFunction ); - ULONG nSize = FillBuffer( pBuffer, (char*)&nFunction, sizeof( nFunction ), ap ); + sal_uLong nSize = FillBuffer( pBuffer, (char*)&nFunction, sizeof( nFunction ), ap ); va_end( ap ); return TransactMessage( nSize, pBuffer ); } -ULONG PluginConnector::Send( UINT32 nFunction, ... ) +sal_uLong PluginConnector::Send( sal_uInt32 nFunction, ... ) { va_list ap; char* pBuffer; va_start( ap, nFunction ); - ULONG nSize = FillBuffer( pBuffer, (char*)&nFunction, sizeof( nFunction ), ap ); + sal_uLong nSize = FillBuffer( pBuffer, (char*)&nFunction, sizeof( nFunction ), ap ); va_end( ap ); return SendMessage( nSize, pBuffer ); } -void PluginConnector::Respond( ULONG nID, +void PluginConnector::Respond( sal_uLong nID, char* pFunction, - ULONG nFunctionLen, ... ) + sal_uLong nFunctionLen, ... ) { va_list ap; char* pBuffer; va_start( ap, nFunctionLen ); - ULONG nSize = FillBuffer( pBuffer, pFunction, nFunctionLen, ap ); + sal_uLong nSize = FillBuffer( pBuffer, pFunction, nFunctionLen, ap ); va_end( ap ); SendMessage( nSize, pBuffer, nID | ( 1 << 24 ) ); } -MediatorMessage* PluginConnector::WaitForAnswer( ULONG nMessageID ) +MediatorMessage* PluginConnector::WaitForAnswer( sal_uLong nMessageID ) { if( ! m_bValid ) return NULL; @@ -176,7 +176,7 @@ MediatorMessage* PluginConnector::WaitForAnswer( ULONG nMessageID ) for( size_t i = 0; i < m_aMessageQueue.size(); i++ ) { MediatorMessage* pMessage = m_aMessageQueue[ i ]; - ULONG nID = pMessage->m_nID; + sal_uLong nID = pMessage->m_nID; if( ( nID & 0xff000000 ) && ( ( nID & 0x00ffffff ) == nMessageID ) ) { @@ -193,9 +193,9 @@ MediatorMessage* PluginConnector::WaitForAnswer( ULONG nMessageID ) } ConnectorInstance::ConnectorInstance( NPP inst, char* type, - int args, char* pargnbuf, ULONG nargnbytes, - char* pargvbuf, ULONG nargvbytes, - char* savedata, ULONG savebytes ) : + int args, char* pargnbuf, sal_uLong nargnbytes, + char* pargvbuf, sal_uLong nargvbytes, + char* savedata, sal_uLong savebytes ) : instance( inst ), pShell( NULL ), pWidget( NULL ), @@ -219,18 +219,18 @@ ConnectorInstance::ConnectorInstance( NPP inst, char* type, for( i = 0; i < nArg; i++ ) { argn[i] = pRun; - while( *pRun != 0 && (ULONG)(pRun - pArgnBuf) < nargnbytes ) + while( *pRun != 0 && (sal_uLong)(pRun - pArgnBuf) < nargnbytes ) pRun++; - if( (ULONG)(pRun - pArgnBuf) < nargnbytes ) + if( (sal_uLong)(pRun - pArgnBuf) < nargnbytes ) pRun++; } pRun = pArgvBuf; for( i = 0; i < nArg; i++ ) { argv[i] = pRun; - while( *pRun != 0 && (ULONG)(pRun - pArgvBuf) < nargvbytes ) + while( *pRun != 0 && (sal_uLong)(pRun - pArgvBuf) < nargvbytes ) pRun++; - if( (ULONG)(pRun - pArgvBuf) < nargvbytes ) + if( (sal_uLong)(pRun - pArgvBuf) < nargvbytes ) pRun++; } } diff --git a/extensions/source/plugin/unx/sysplug.cxx b/extensions/source/plugin/unx/sysplug.cxx index fbcf9b7497eb..be5879bf238d 100644 --- a/extensions/source/plugin/unx/sysplug.cxx +++ b/extensions/source/plugin/unx/sysplug.cxx @@ -91,7 +91,7 @@ UnxPluginComm::UnxPluginComm( } else { - MediatorMessage* pMessage = GetNextMessage( TRUE ); + MediatorMessage* pMessage = GetNextMessage( sal_True ); Respond( pMessage->m_nID, const_cast<char*>("init ack"),8, NULL ); diff --git a/extensions/source/plugin/unx/unxmgr.cxx b/extensions/source/plugin/unx/unxmgr.cxx index 1a3736e87e0b..5c02910ada33 100644 --- a/extensions/source/plugin/unx/unxmgr.cxx +++ b/extensions/source/plugin/unx/unxmgr.cxx @@ -231,7 +231,7 @@ static void CheckPluginRegistryFiles( const rtl::OString& rPath, list< PluginDes Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() throw() { static Sequence<PluginDescription> aDescriptions; - static BOOL bHavePlugins = FALSE; + static sal_Bool bHavePlugins = sal_False; if( ! bHavePlugins ) { rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); @@ -309,7 +309,7 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th delete *iter; } aPlugins.clear(); - bHavePlugins = TRUE; + bHavePlugins = sal_True; } return aDescriptions; } diff --git a/extensions/source/preload/oemwiz.cxx b/extensions/source/preload/oemwiz.cxx index a073e71c7c7c..c3b7af8e7426 100644 --- a/extensions/source/preload/oemwiz.cxx +++ b/extensions/source/preload/oemwiz.cxx @@ -126,7 +126,7 @@ namespace preload { FreeResource(); aDlgTitle = GetText(); - aPrevPB.Enable(FALSE); + aPrevPB.Enable(sal_False); aNextST = aNextPB.GetText(); aPrevPB.SetClickHdl(LINK(this, OEMPreloadDialog, NextPrevPageHdl)); aNextPB.SetClickHdl(LINK(this, OEMPreloadDialog, NextPrevPageHdl)); @@ -178,7 +178,7 @@ namespace preload { case OEM_WELCOME: aNextPB.SetText(aNextST); - aNextPB.Enable(TRUE); + aNextPB.Enable(sal_True); break; case OEM_LICENSE: sTitle += aLicense; @@ -208,7 +208,7 @@ namespace preload sFileName = aURLObject.GetMainURL(INetURLObject::DECODE_TO_IURI); sFileName += rFileName; - SfxMedium aMedium( sFileName,STREAM_READ, TRUE ); + SfxMedium aMedium( sFileName,STREAM_READ, sal_True ); SvStream* pInStream = aMedium.GetInStream(); if( !pInStream ) return sal_False; @@ -258,7 +258,7 @@ namespace preload aArrow(this, ModuleRes(IMG_ARROW)), aStrAccept( ModuleRes(LICENCE_ACCEPT) ), aStrNotAccept( ModuleRes(LICENCE_NOTACCEPT) ), - bEndReached(FALSE), + bEndReached(sal_False), pPreloadDialog(pParent) { FreeResource(); @@ -324,7 +324,7 @@ namespace preload //------------------------------------------------------------------------ IMPL_LINK( OEMLicenseTabPage, EndReachedHdl, LicenceView *, EMPTYARG ) { - bEndReached = TRUE; + bEndReached = sal_True; EnableControls(); aCBAccept.GrabFocus(); @@ -345,7 +345,7 @@ namespace preload { if( !bEndReached && ( aLicenseML.IsEndReached() || !aLicenseML.GetText().Len() ) ) - bEndReached = TRUE; + bEndReached = sal_True; if ( bEndReached ) { @@ -371,7 +371,7 @@ namespace preload if ( ! pNext->IsEnabled() ) { pPreloadDialog->SetCancelString( aOldCancelText ); - pNext->Enable(TRUE); + pNext->Enable(sal_True); } } else @@ -380,7 +380,7 @@ namespace preload if ( pNext->IsEnabled() ) { pPreloadDialog->SetCancelString( aStrNotAccept ); - pNext->Enable(FALSE); + pNext->Enable(sal_False); } } } @@ -417,20 +417,20 @@ namespace preload } //------------------------------------------------------------------------ - BOOL LicenceView::IsEndReached() const + sal_Bool LicenceView::IsEndReached() const { - BOOL bEndReached; + sal_Bool bEndReached; ExtTextView* pView = GetTextView(); ExtTextEngine* pEdit = GetTextEngine(); - ULONG nHeight = pEdit->GetTextHeight(); + sal_uLong nHeight = pEdit->GetTextHeight(); Size aOutSize = pView->GetWindow()->GetOutputSizePixel(); Point aBottom( 0, aOutSize.Height() ); - if ( (ULONG) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) - bEndReached = TRUE; + if ( (sal_uLong) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) + bEndReached = sal_True; else - bEndReached = FALSE; + bEndReached = sal_False; return bEndReached; } @@ -440,8 +440,8 @@ namespace preload { if ( rHint.IsA( TYPE(TextHint) ) ) { - BOOL bLastVal = EndReached(); - ULONG nId = ((const TextHint&)rHint).GetId(); + sal_Bool bLastVal = EndReached(); + sal_uLong nId = ((const TextHint&)rHint).GetId(); if ( nId == TEXT_HINT_PARAINSERTED ) { diff --git a/extensions/source/preload/oemwiz.hxx b/extensions/source/preload/oemwiz.hxx index d6e8b9f276c6..1f7ae953010b 100644 --- a/extensions/source/preload/oemwiz.hxx +++ b/extensions/source/preload/oemwiz.hxx @@ -92,7 +92,7 @@ namespace preload }; class LicenceView : public MultiLineEdit, public SfxListener { - BOOL mbEndReached; + sal_Bool mbEndReached; Link maEndReachedHdl; Link maScrolledHdl; @@ -102,9 +102,9 @@ namespace preload void ScrollDown( ScrollType eScroll ); - BOOL IsEndReached() const; - BOOL EndReached() const { return mbEndReached; } - void SetEndReached( BOOL bEnd ) { mbEndReached = bEnd; } + sal_Bool IsEndReached() const; + sal_Bool EndReached() const { return mbEndReached; } + void SetEndReached( sal_Bool bEnd ) { mbEndReached = bEnd; } void SetEndReachedHdl( const Link& rHdl ) { maEndReachedHdl = rHdl; } const Link& GetAutocompleteHdl() const { return maEndReachedHdl; } @@ -130,7 +130,7 @@ namespace preload String aStrAccept; String aStrNotAccept; String aOldCancelText; - BOOL bEndReached; + sal_Bool bEndReached; OEMPreloadDialog* pPreloadDialog; diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 27d97868bcf2..8682d9e701bb 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -1213,9 +1213,9 @@ namespace pcr { Edit* pControlWindowAsEdit = dynamic_cast< Edit* >( rLine.pLine->getControlWindow() ); if ( pControlWindowAsEdit ) - pControlWindowAsEdit->SetReadOnly( TRUE ); + pControlWindowAsEdit->SetReadOnly( sal_True ); else - pControlWindowAsEdit->Enable( FALSE ); + pControlWindowAsEdit->Enable( sal_False ); } } } diff --git a/extensions/source/propctrlr/browserpage.cxx b/extensions/source/propctrlr/browserpage.cxx index 1065da18f6cc..131a3587a038 100644 --- a/extensions/source/propctrlr/browserpage.cxx +++ b/extensions/source/propctrlr/browserpage.cxx @@ -48,7 +48,7 @@ namespace pcr ,m_aListBox(this) { m_aListBox.SetBackground(GetBackground()); - m_aListBox.SetPaintTransparent( TRUE ); + m_aListBox.SetPaintTransparent( sal_True ); m_aListBox.Show(); } diff --git a/extensions/source/propctrlr/defaultforminspection.cxx b/extensions/source/propctrlr/defaultforminspection.cxx index ace7be265fb1..f3014d7d2e57 100644 --- a/extensions/source/propctrlr/defaultforminspection.cxx +++ b/extensions/source/propctrlr/defaultforminspection.cxx @@ -186,7 +186,7 @@ namespace pcr struct { const sal_Char* programmaticName; - USHORT uiNameResId; + sal_uInt16 uiNameResId; const sal_Char* helpId; } aCategories[] = { { "General", RID_STR_PROPPAGE_DEFAULT, HID_FM_PROPDLG_TAB_GENERAL }, diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index c7c52b60a910..e1fe31c56bb8 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -396,7 +396,7 @@ namespace pcr sal_Int32 nColor = rUnderlineItem.GetColor().GetColor(); Any aUnoColor; - if (COL_AUTO != (UINT32)nColor) + if (COL_AUTO != (sal_uInt32)nColor) aUnoColor <<= nColor; lcl_pushBackPropertyValue( _out_properties, PROPERTY_TEXTLINECOLOR, aUnoColor ); @@ -441,7 +441,7 @@ namespace pcr sal_Int32 nColor = rColorItem.GetValue().GetColor(); Any aUnoColor; - if (COL_AUTO != (UINT32)nColor) + if (COL_AUTO != (sal_uInt32)nColor) aUnoColor <<= nColor; lcl_pushBackPropertyValue( _out_properties, PROPERTY_TEXTCOLOR, aUnoColor ); diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 7ad5d944ce43..bc83c820e909 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -779,7 +779,7 @@ namespace pcr // font style ::FontWeight eWeight = VCLUnoHelper::ConvertFontWeight( aFont.Weight ); - USHORT nStyleResID = RID_STR_FONTSTYLE_REGULAR; + sal_uInt16 nStyleResID = RID_STR_FONTSTYLE_REGULAR; if ( aFont.Slant == FontSlant_ITALIC ) { if ( eWeight > WEIGHT_NORMAL ) @@ -1256,7 +1256,7 @@ namespace pcr // boolean values if ( eType == TypeClass_BOOLEAN ) { - USHORT nResId = RID_RSC_ENUM_YESNO; + sal_uInt16 nResId = RID_RSC_ENUM_YESNO; if ( ( nPropId == PROPERTY_ID_SHOW_POSITION ) || ( nPropId == PROPERTY_ID_SHOW_NAVIGATION ) || ( nPropId == PROPERTY_ID_SHOW_RECORDACTIONS ) @@ -1418,7 +1418,7 @@ namespace pcr if ( aDescriptor.PrimaryButtonId.getLength() ) aDescriptor.HasPrimaryButton = sal_True; - if ( aDescriptor.SecondaryButtonId ) + if ( aDescriptor.SecondaryButtonId.getLength() ) aDescriptor.HasSecondaryButton = sal_True; bool bIsDataProperty = ( nPropertyUIFlags & PROP_FLAG_DATA_PROPERTY ) != 0; diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index 85d3cb8e10b9..7010c9102188 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -356,7 +356,7 @@ namespace pcr // in all rows, there must be either two valid selections, or none at all // If there is at least one row with exactly one valid selection, then the // OKButton needs to be disabled - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; const FieldLinkRow* aRows[] = { m_aRow1.get(), m_aRow2.get(), m_aRow3.get(), m_aRow4.get() @@ -368,7 +368,7 @@ namespace pcr if ( aRows[ i ]->GetFieldName( FieldLinkRow::eDetailField, sNotInterestedInRightNow ) != aRows[ i ]->GetFieldName( FieldLinkRow::eMasterField, sNotInterestedInRightNow ) ) - bEnable = FALSE; + bEnable = sal_False; } m_aOK.Enable( bEnable ); diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx index d9fe180c1ac7..d5dea0841c54 100644 --- a/extensions/source/propctrlr/formmetadata.cxx +++ b/extensions/source/propctrlr/formmetadata.cxx @@ -38,7 +38,7 @@ #include "propctrlr.hrc" #include <svtools/localresaccess.hxx> #include <tools/debug.hxx> -#include <cppuhelper/extract.hxx> +#include <comphelper/extract.hxx> #include <algorithm> #include <functional> diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index 3c6bf717ffab..65514038181d 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -42,7 +42,7 @@ #include <com/sun/star/frame/XDispatchProvider.hpp> /** === end UNO includes === **/ #include <tools/debug.hxx> -#include <cppuhelper/extract.hxx> +#include <comphelper/extract.hxx> #include <algorithm> diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx index 1498bb072649..dbf562a7536c 100644 --- a/extensions/source/propctrlr/inspectorhelpwindow.cxx +++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx @@ -55,14 +55,14 @@ namespace pcr ,m_nMaxLines( 8 ) { SetBackground(); - SetPaintTransparent(TRUE); + SetPaintTransparent(sal_True); m_aSeparator.SetText( String( PcrRes( RID_STR_HELP_SECTION_LABEL ) ) ); m_aSeparator.SetBackground(); m_aSeparator.Show(); m_aHelpText.SetControlBackground( /*m_aSeparator.GetBackground().GetColor() */); m_aHelpText.SetBackground(); - m_aHelpText.SetPaintTransparent(TRUE); + m_aHelpText.SetPaintTransparent(sal_True); m_aHelpText.Show(); } diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx index 2d81566d8fbb..64be3ae20e9f 100644 --- a/extensions/source/propctrlr/propertyeditor.cxx +++ b/extensions/source/propctrlr/propertyeditor.cxx @@ -481,7 +481,7 @@ namespace pcr //------------------------------------------------------------------ void OPropertyEditor::EnablePropertyControls( const ::rtl::OUString& _rEntryName, sal_Int16 _nControls, bool _bEnable ) { - for ( USHORT i = 0; i < m_aTabControl.GetPageCount(); ++i ) + for ( sal_uInt16 i = 0; i < m_aTabControl.GetPageCount(); ++i ) { OBrowserPage* pPage = static_cast< OBrowserPage* >( m_aTabControl.GetTabPage( m_aTabControl.GetPageId( i ) ) ); if ( pPage ) @@ -492,7 +492,7 @@ namespace pcr //------------------------------------------------------------------ void OPropertyEditor::EnablePropertyLine( const ::rtl::OUString& _rEntryName, bool _bEnable ) { - for ( USHORT i = 0; i < m_aTabControl.GetPageCount(); ++i ) + for ( sal_uInt16 i = 0; i < m_aTabControl.GetPageCount(); ++i ) { OBrowserPage* pPage = static_cast< OBrowserPage* >( m_aTabControl.GetTabPage( m_aTabControl.GetPageId( i ) ) ); if ( pPage ) diff --git a/extensions/source/propctrlr/pushbuttonnavigation.cxx b/extensions/source/propctrlr/pushbuttonnavigation.cxx index 0390e1c927fd..3894825d603d 100644 --- a/extensions/source/propctrlr/pushbuttonnavigation.cxx +++ b/extensions/source/propctrlr/pushbuttonnavigation.cxx @@ -31,7 +31,7 @@ #include <com/sun/star/form/FormButtonType.hpp> #include <com/sun/star/beans/XPropertyState.hpp> #include "formstrings.hxx" -#include <cppuhelper/extract.hxx> +#include <comphelper/extract.hxx> #include <comphelper/property.hxx> #include <osl/diagnose.h> #include <tools/diagnose_ex.h> diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index b0dc9536d0e2..cd38db9c9944 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -281,7 +281,7 @@ namespace pcr getTypedControlWindow()->SetFormatter( getTypedControlWindow()->StandardFormatter() ); SvNumberFormatter* pFormatter = getTypedControlWindow()->GetFormatter(); - ULONG nStandardDateTimeFormat = pFormatter->GetStandardFormat( NUMBERFORMAT_DATETIME, eSysLanguage ); + sal_uLong nStandardDateTimeFormat = pFormatter->GetStandardFormat( NUMBERFORMAT_DATETIME, eSysLanguage ); getTypedControlWindow()->SetFormatKey( nStandardDateTimeFormat ); } @@ -715,8 +715,8 @@ namespace pcr getTypedControlWindow()->SetDropDownLineCount( LB_DEFAULT_COUNT ); if ( ( nWinStyle & WB_READONLY ) != 0 ) { - getTypedControlWindow()->SetReadOnly( TRUE ); - getTypedControlWindow()->Enable( TRUE ); + getTypedControlWindow()->SetReadOnly( sal_True ); + getTypedControlWindow()->Enable( sal_True ); } } @@ -824,8 +824,8 @@ namespace pcr getTypedControlWindow()->SetDropDownLineCount( LB_DEFAULT_COUNT ); if ( ( nWinStyle & WB_READONLY ) != 0 ) { - getTypedControlWindow()->SetReadOnly( TRUE ); - getTypedControlWindow()->Enable( TRUE ); + getTypedControlWindow()->SetReadOnly( sal_True ); + getTypedControlWindow()->Enable( sal_True ); } } @@ -887,10 +887,10 @@ namespace pcr //------------------------------------------------------------------ Sequence< ::rtl::OUString > SAL_CALL OListboxControl::getListEntries( ) throw (RuntimeException) { - const USHORT nCount = getTypedControlWindow()->GetEntryCount(); + const sal_uInt16 nCount = getTypedControlWindow()->GetEntryCount(); Sequence< ::rtl::OUString > aRet(nCount); ::rtl::OUString* pIter = aRet.getArray(); - for (USHORT i = 0; i < nCount ; ++i,++pIter) + for (sal_uInt16 i = 0; i < nCount ; ++i,++pIter) *pIter = getTypedControlWindow()->GetEntry(i); return aRet; @@ -957,10 +957,10 @@ namespace pcr //------------------------------------------------------------------ Sequence< ::rtl::OUString > SAL_CALL OComboboxControl::getListEntries( ) throw (RuntimeException) { - const USHORT nCount = getTypedControlWindow()->GetEntryCount(); + const sal_uInt16 nCount = getTypedControlWindow()->GetEntryCount(); Sequence< ::rtl::OUString > aRet(nCount); ::rtl::OUString* pIter = aRet.getArray(); - for (USHORT i = 0; i < nCount ; ++i,++pIter) + for (sal_uInt16 i = 0; i < nCount ; ++i,++pIter) *pIter = getTypedControlWindow()->GetEntry(i); return aRet; @@ -1050,7 +1050,7 @@ namespace pcr ,m_nOperationMode( eStringList ) ,m_bDropdown( sal_False ) { - SetCompoundControl( TRUE ); + SetCompoundControl( sal_True ); m_pImplEdit = new MultiLineEdit( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) ); SetSubEdit( m_pImplEdit ); diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx index 3ed3dff35081..c3e0268bbc7a 100644 --- a/extensions/source/propctrlr/taborder.cxx +++ b/extensions/source/propctrlr/taborder.cxx @@ -285,13 +285,13 @@ namespace pcr //------------------------------------------------------------------------ IMPL_LINK( TabOrderDialog, OKClickHdl, Button*, /*pButton*/ ) { - ULONG nEntryCount = aLB_Controls.GetEntryCount(); + sal_uLong nEntryCount = aLB_Controls.GetEntryCount(); Sequence< Reference< XControlModel > > aSortedControlModelSeq( nEntryCount ); Sequence< Reference< XControlModel > > aControlModels( m_xTempModel->getControlModels()); Reference< XControlModel > * pSortedControlModels = aSortedControlModelSeq.getArray(); const Reference< XControlModel > * pControlModels = aControlModels.getConstArray(); - for (ULONG i=0; i < nEntryCount; i++) + for (sal_uLong i=0; i < nEntryCount; i++) { SvLBoxEntry* pEntry = aLB_Controls.GetEntry(i); @@ -359,13 +359,13 @@ namespace pcr { SvLBoxEntry* pFirstSelected = FirstSelected(); if( !pFirstSelected ) return; - ULONG nFirstSelPos = GetModel()->GetAbsPos( pFirstSelected ); + sal_uLong nFirstSelPos = GetModel()->GetAbsPos( pFirstSelected ); if( nFirstSelPos == 0 ) return; SvLBoxEntry* pSelEntry = pFirstSelected; while( pSelEntry ) { - ULONG nSelEntryPos = GetModel()->GetAbsPos( pSelEntry ); + sal_uLong nSelEntryPos = GetModel()->GetAbsPos( pSelEntry ); SvLBoxEntry* pSelEntryPrev = GetEntry( nSelEntryPos-1 ); aSelEntryPrevText = GetEntryText( pSelEntryPrev ); aImage = GetExpandedEntryBmp(pSelEntryPrev); @@ -382,12 +382,12 @@ namespace pcr { SvLBoxEntry* pLastSelected = LastSelected(); if( !pLastSelected ) return; - ULONG nLastSelPos = GetModel()->GetAbsPos( pLastSelected ); + sal_uLong nLastSelPos = GetModel()->GetAbsPos( pLastSelected ); if( (nLastSelPos + nRelPos - i) > (GetEntryCount()-1) ) return; #if OSL_DEBUG_LEVEL > 0 - ULONG nSelCount = GetSelectionCount(); + sal_uLong nSelCount = GetSelectionCount(); (void)nSelCount; #endif @@ -395,7 +395,7 @@ namespace pcr SvLBoxEntry* pSelEntry = pLastSelected; while( pSelEntry ) { - ULONG nSelEntryPos = GetModel()->GetAbsPos( pSelEntry ); + sal_uLong nSelEntryPos = GetModel()->GetAbsPos( pSelEntry ); SvLBoxEntry* pSelEntryNext = GetEntry( nSelEntryPos+1 ); void* pData = pSelEntryNext->GetUserData(); diff --git a/extensions/source/resource/resource.cxx b/extensions/source/resource/resource.cxx index 73cb48d479a9..c939baf668c5 100644 --- a/extensions/source/resource/resource.cxx +++ b/extensions/source/resource/resource.cxx @@ -70,7 +70,7 @@ public: // XServiceInfo OUString SAL_CALL getImplementationName() throw(); - BOOL SAL_CALL supportsService(const OUString& ServiceName) throw(); + sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(); Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw(); static Sequence< OUString > getSupportedServiceNames_Static(void) throw(); @@ -88,8 +88,8 @@ public: Any SAL_CALL invoke(const OUString& FunctionName, const Sequence< Any >& Params, Sequence< sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam) throw(IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException); void SAL_CALL setValue(const OUString& PropertyName, const Any& Value) throw(UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException); Any SAL_CALL getValue(const OUString& PropertyName) throw(UnknownPropertyException, RuntimeException); - BOOL SAL_CALL hasMethod(const OUString& Name) throw(RuntimeException); - BOOL SAL_CALL hasProperty(const OUString& Name) throw(RuntimeException); + sal_Bool SAL_CALL hasMethod(const OUString& Name) throw(RuntimeException); + sal_Bool SAL_CALL hasProperty(const OUString& Name) throw(RuntimeException); private: Reference< XTypeConverter > getTypeConverter() const; Reference< XInvocation > getDefaultInvocation() const; @@ -129,14 +129,14 @@ OUString ResourceService::getImplementationName() throw() } // XServiceInfo -BOOL SAL_CALL ResourceService::supportsService(const OUString& ServiceName) throw() +sal_Bool SAL_CALL ResourceService::supportsService(const OUString& ServiceName) throw() { Sequence< OUString > aSNL = getSupportedServiceNames(); const OUString * pArray = aSNL.getConstArray(); for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) if( pArray[i] == ServiceName ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } // XServiceInfo @@ -273,7 +273,7 @@ Any SAL_CALL ResourceService::invoke if( bGetBranch ) { - ResId aId( (USHORT)nId, *pResMgr ); + ResId aId( (sal_uInt16)nId, *pResMgr ); aId.SetRT( RSC_STRING ); if( pResMgr->IsAvailable( aId ) ) { @@ -288,7 +288,7 @@ Any SAL_CALL ResourceService::invoke sal_Bool bRet = sal_False; if( pResMgr ) { - ResId aId( (USHORT)nId, *pResMgr ); + ResId aId( (sal_uInt16)nId, *pResMgr ); aId.SetRT( RSC_STRING ); bRet = pResMgr->IsAvailable( aId ); } @@ -324,7 +324,7 @@ Any SAL_CALL ResourceService::invoke if( FunctionName.equalsAscii("getStringList") ) { - ResId aId( (USHORT)nId, *pResMgr ); + ResId aId( (sal_uInt16)nId, *pResMgr ); aId.SetRT( RSC_STRINGARRAY ); if( pResMgr->IsAvailable( aId ) ) { @@ -349,7 +349,7 @@ Any SAL_CALL ResourceService::invoke sal_Bool bRet = sal_False; if( pResMgr ) { - ResId aId( (USHORT)nId, *pResMgr ); + ResId aId( (sal_uInt16)nId, *pResMgr ); aId.SetRT( RSC_STRINGARRAY ); bRet = pResMgr->IsAvailable( aId ); } @@ -420,7 +420,7 @@ Any SAL_CALL ResourceService::getValue(const OUString& PropertyName) } // XInvokation -BOOL SAL_CALL ResourceService::hasMethod(const OUString& Name) +sal_Bool SAL_CALL ResourceService::hasMethod(const OUString& Name) throw(RuntimeException) { if( Name.equalsAscii("getString") || @@ -430,30 +430,30 @@ BOOL SAL_CALL ResourceService::hasMethod(const OUString& Name) Name.equalsAscii("getStringList") || Name.equalsAscii("hasStringList") ) - return TRUE; + return sal_True; else { Reference< XInvocation > xI = getDefaultInvocation(); if( xI.is() ) return xI->hasMethod( Name ); else - return FALSE; + return sal_False; } } // XInvokation -BOOL SAL_CALL ResourceService::hasProperty(const OUString& Name) +sal_Bool SAL_CALL ResourceService::hasProperty(const OUString& Name) throw(RuntimeException) { if( Name.equalsAscii("FileName") ) - return TRUE; + return sal_True; else { Reference< XInvocation > xI = getDefaultInvocation(); if( xI.is() ) return xI->hasProperty( Name ); else - return FALSE; + return sal_False; } } diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index ac3e322bc258..6079d153cffc 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -50,7 +50,7 @@ ResId SaneResId( sal_uInt32 ); // --------------------------------------------------------------------- -GridWindow::GridWindow(double* pXValues, double* pYValues, int nValues, Window* pParent, BOOL bCutValues ) +GridWindow::GridWindow(double* pXValues, double* pYValues, int nValues, Window* pParent, sal_Bool bCutValues ) : ModalDialog( pParent, SaneResId( GRID_DIALOG ) ), m_aGridArea( 50, 15, 100, 100 ), m_pXValues( pXValues ), @@ -66,7 +66,7 @@ GridWindow::GridWindow(double* pXValues, double* pYValues, int nValues, Window* m_aResetTypeBox( this, SaneResId( GRID_DIALOG_TYPE_BOX ) ), m_aResetButton( this, SaneResId( GRID_DIALOG_RESET_BTN ) ) { - USHORT nPos = m_aResetTypeBox.InsertEntry( String( SaneResId( RESET_TYPE_LINEAR_ASCENDING ) ) ); + sal_uInt16 nPos = m_aResetTypeBox.InsertEntry( String( SaneResId( RESET_TYPE_LINEAR_ASCENDING ) ) ); m_aResetTypeBox.SetEntryData( nPos, (void *)RESET_TYPE_LINEAR_ASCENDING ); nPos = m_aResetTypeBox.InsertEntry( String( SaneResId( RESET_TYPE_LINEAR_DESCENDING ) ) ); diff --git a/extensions/source/scanner/grid.hxx b/extensions/source/scanner/grid.hxx index 42791f355493..c5d4a14ed4e9 100644 --- a/extensions/source/scanner/grid.hxx +++ b/extensions/source/scanner/grid.hxx @@ -87,7 +87,7 @@ class GridWindow : public ModalDialog sal_uInt16 m_BmOffX; sal_uInt16 m_BmOffY; - BOOL m_bCutValues; + sal_Bool m_bCutValues; // stuff for handles std::vector< impHandle > m_aHandles; @@ -127,7 +127,7 @@ class GridWindow : public ModalDialog virtual void MouseButtonUp( const MouseEvent& ); public: GridWindow( double* pXValues, double* pYValues, int nValues, - Window* pParent, BOOL bCutValues = TRUE ); + Window* pParent, sal_Bool bCutValues = sal_True ); ~GridWindow(); void setBoundings( double fMinX, double fMinY, double fMaxX, double fMaxY ); diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 43c50e6f8451..0ca6884e8202 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -117,7 +117,7 @@ SANE_Status (*Sane::p_set_io_mode)( SANE_Handle, SANE_Bool ) = 0; SANE_Status (*Sane::p_get_select_fd)( SANE_Handle, SANE_Int* ) = 0; SANE_String_Const (*Sane::p_strstatus)( SANE_Status ) = 0; -static BOOL bSaneSymbolLoadFailed = FALSE; +static sal_Bool bSaneSymbolLoadFailed = sal_False; inline oslGenericFunction Sane::LoadSymbol( const char* pSymbolname ) { @@ -126,7 +126,7 @@ inline oslGenericFunction Sane::LoadSymbol( const char* pSymbolname ) { fprintf( stderr, "Could not load symbol %s\n", pSymbolname ); - bSaneSymbolLoadFailed = TRUE; + bSaneSymbolLoadFailed = sal_True; } return pFunction; } @@ -203,7 +203,7 @@ void Sane::Init() if( pSaneLib ) { - bSaneSymbolLoadFailed = FALSE; + bSaneSymbolLoadFailed = sal_False; p_init = (SANE_Status(*)(SANE_Int*, SANE_Auth_Callback )) LoadSymbol( "sane_init" ); p_exit = (void(*)()) @@ -297,17 +297,17 @@ void Sane::ReloadOptions() mppOptions[ i ] = (SANE_Option_Descriptor*) p_get_option_descriptor( maHandle, i ); - CheckConsistency( NULL, TRUE ); + CheckConsistency( NULL, sal_True ); maReloadOptionsLink.Call( this ); } -BOOL Sane::Open( const char* name ) +sal_Bool Sane::Open( const char* name ) { int i; SANE_Status nStatus = p_open( (SANE_String_Const)name, &maHandle ); - FAIL_STATE( nStatus, "sane_open", FALSE ); + FAIL_STATE( nStatus, "sane_open", sal_False ); ReloadOptions(); @@ -324,17 +324,17 @@ BOOL Sane::Open( const char* name ) } } - return TRUE; + return sal_True; } -BOOL Sane::Open( int n ) +sal_Bool Sane::Open( int n ) { if( n >= 0 && n < nDevices ) { mnDevice = n; return Open( (char*)ppDevices[n]->name ); } - return FALSE; + return sal_False; } void Sane::Close() @@ -361,48 +361,48 @@ int Sane::GetOptionByName( const char* rName ) return -1; } -BOOL Sane::GetOptionValue( int n, BOOL& rRet ) +sal_Bool Sane::GetOptionValue( int n, sal_Bool& rRet ) { if( ! maHandle || mppOptions[n]->type != SANE_TYPE_BOOL ) - return FALSE; + return sal_False; SANE_Word nRet; SANE_Status nStatus = ControlOption( n, SANE_ACTION_GET_VALUE, &nRet ); if( nStatus != SANE_STATUS_GOOD ) - return FALSE; + return sal_False; rRet = nRet; - return TRUE; + return sal_True; } -BOOL Sane::GetOptionValue( int n, ByteString& rRet ) +sal_Bool Sane::GetOptionValue( int n, ByteString& rRet ) { - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; if( ! maHandle || mppOptions[n]->type != SANE_TYPE_STRING ) - return FALSE; + return sal_False; char* pRet = new char[mppOptions[n]->size+1]; SANE_Status nStatus = ControlOption( n, SANE_ACTION_GET_VALUE, pRet ); if( nStatus == SANE_STATUS_GOOD ) { - bSuccess = TRUE; + bSuccess = sal_True; rRet = pRet; } delete [] pRet; return bSuccess; } -BOOL Sane::GetOptionValue( int n, double& rRet, int nElement ) +sal_Bool Sane::GetOptionValue( int n, double& rRet, int nElement ) { - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; if( ! maHandle || ( mppOptions[n]->type != SANE_TYPE_INT && mppOptions[n]->type != SANE_TYPE_FIXED ) ) - return FALSE; + return sal_False; SANE_Word* pRet = new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]; SANE_Status nStatus = ControlOption( n, SANE_ACTION_GET_VALUE, pRet ); if( nStatus == SANE_STATUS_GOOD ) { - bSuccess = TRUE; + bSuccess = sal_True; if( mppOptions[n]->type == SANE_TYPE_INT ) rRet = (double)pRet[ nElement ]; else @@ -412,18 +412,18 @@ BOOL Sane::GetOptionValue( int n, double& rRet, int nElement ) return bSuccess; } -BOOL Sane::GetOptionValue( int n, double* pSet ) +sal_Bool Sane::GetOptionValue( int n, double* pSet ) { if( ! maHandle || ! ( mppOptions[n]->type == SANE_TYPE_FIXED || mppOptions[n]->type == SANE_TYPE_INT ) ) - return FALSE; + return sal_False; SANE_Word* pFixedSet = new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]; SANE_Status nStatus = ControlOption( n, SANE_ACTION_GET_VALUE, pFixedSet ); if( nStatus != SANE_STATUS_GOOD ) { delete [] pFixedSet; - return FALSE; + return sal_False; } for( size_t i = 0; i <mppOptions[n]->size/sizeof(SANE_Word); i++ ) { @@ -433,38 +433,38 @@ BOOL Sane::GetOptionValue( int n, double* pSet ) pSet[i] = (double) pFixedSet[i]; } delete [] pFixedSet; - return TRUE; + return sal_True; } -BOOL Sane::SetOptionValue( int n, BOOL bSet ) +sal_Bool Sane::SetOptionValue( int n, sal_Bool bSet ) { if( ! maHandle || mppOptions[n]->type != SANE_TYPE_BOOL ) - return FALSE; + return sal_False; SANE_Word nRet = bSet ? SANE_TRUE : SANE_FALSE; SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, &nRet ); if( nStatus != SANE_STATUS_GOOD ) - return FALSE; - return TRUE; + return sal_False; + return sal_True; } -BOOL Sane::SetOptionValue( int n, const String& rSet ) +sal_Bool Sane::SetOptionValue( int n, const String& rSet ) { if( ! maHandle || mppOptions[n]->type != SANE_TYPE_STRING ) - return FALSE; + return sal_False; ByteString aSet( rSet, gsl_getSystemTextEncoding() ); SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, (void*)aSet.GetBuffer() ); if( nStatus != SANE_STATUS_GOOD ) - return FALSE; - return TRUE; + return sal_False; + return sal_True; } -BOOL Sane::SetOptionValue( int n, double fSet, int nElement ) +sal_Bool Sane::SetOptionValue( int n, double fSet, int nElement ) { - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; if( ! maHandle || ( mppOptions[n]->type != SANE_TYPE_INT && mppOptions[n]->type != SANE_TYPE_FIXED ) ) - return FALSE; + return sal_False; SANE_Status nStatus; if( mppOptions[n]->size/sizeof(SANE_Word) > 1 ) @@ -487,16 +487,16 @@ BOOL Sane::SetOptionValue( int n, double fSet, int nElement ) nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, &nSetTo ); if( nStatus == SANE_STATUS_GOOD ) - bSuccess = TRUE; + bSuccess = sal_True; } return bSuccess; } -BOOL Sane::SetOptionValue( int n, double* pSet ) +sal_Bool Sane::SetOptionValue( int n, double* pSet ) { if( ! maHandle || ( mppOptions[n]->type != SANE_TYPE_INT && mppOptions[n]->type != SANE_TYPE_FIXED ) ) - return FALSE; + return sal_False; SANE_Word* pFixedSet = new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]; for( size_t i = 0; i < mppOptions[n]->size/sizeof(SANE_Word); i++ ) { @@ -508,8 +508,8 @@ BOOL Sane::SetOptionValue( int n, double* pSet ) SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, pFixedSet ); delete [] pFixedSet; if( nStatus != SANE_STATUS_GOOD ) - return FALSE; - return TRUE; + return sal_False; + return sal_True; } enum FrameStyleType { @@ -518,25 +518,25 @@ enum FrameStyleType { #define BYTE_BUFFER_SIZE 32768 -static inline UINT8 _ReadValue( FILE* fp, int depth ) +static inline sal_uInt8 _ReadValue( FILE* fp, int depth ) { if( depth == 16 ) { - UINT16 nWord; + sal_uInt16 nWord; // data always come in native byte order ! // 16 bits is not really supported by backends as of now // e.g. UMAX Astra 1200S delivers 16 bit but in BIGENDIAN // against SANE documentation (xscanimage gets the same result // as we do fread( &nWord, 1, 2, fp ); - return (UINT8)( nWord / 256 ); + return (sal_uInt8)( nWord / 256 ); } - UINT8 nByte; + sal_uInt8 nByte; fread( &nByte, 1, 1, fp ); return nByte; } -BOOL Sane::CheckConsistency( const char* pMes, BOOL bInit ) +sal_Bool Sane::CheckConsistency( const char* pMes, sal_Bool bInit ) { static SANE_Option_Descriptor** pDescArray = NULL; static SANE_Option_Descriptor* pZero = NULL; @@ -546,15 +546,15 @@ BOOL Sane::CheckConsistency( const char* pMes, BOOL bInit ) pDescArray = (SANE_Option_Descriptor**)mppOptions; if( mppOptions ) pZero = (SANE_Option_Descriptor*)mppOptions[0]; - return TRUE; + return sal_True; } - BOOL bConsistent = TRUE; + sal_Bool bConsistent = sal_True; if( pDescArray != mppOptions ) - bConsistent = FALSE; + bConsistent = sal_False; if( pZero != mppOptions[0] ) - bConsistent = FALSE; + bConsistent = sal_False; if( ! bConsistent ) dbg_msg( "Sane is not consistent. (%s)\n", pMes ); @@ -562,16 +562,16 @@ BOOL Sane::CheckConsistency( const char* pMes, BOOL bInit ) return bConsistent; } -BOOL Sane::Start( BitmapTransporter& rBitmap ) +sal_Bool Sane::Start( BitmapTransporter& rBitmap ) { int nStream = 0, nLine = 0, i = 0; SANE_Parameters aParams; FrameStyleType eType = FrameStyle_Gray; - BOOL bSuccess = TRUE; - BOOL bWidthSet = FALSE; + sal_Bool bSuccess = sal_True; + sal_Bool bWidthSet = sal_False; if( ! maHandle ) - return FALSE; + return sal_False; int nWidthMM = 0; int nHeightMM = 0; @@ -602,7 +602,7 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) if( ( nOption = GetOptionByName( "resolution" ) ) != -1 ) GetOptionValue( nOption, fResl ); - BYTE* pBuffer = NULL; + sal_uInt8* pBuffer = NULL; SANE_Status nStatus = SANE_STATUS_GOOD; @@ -618,19 +618,19 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) aConverter << (sal_uInt32) 60; // write BITMAPINFOHEADER - aConverter << (UINT32)40; - aConverter << (UINT32)0; // fill in width later - aConverter << (UINT32)0; // fill in height later - aConverter << (UINT16)1; + aConverter << (sal_uInt32)40; + aConverter << (sal_uInt32)0; // fill in width later + aConverter << (sal_uInt32)0; // fill in height later + aConverter << (sal_uInt16)1; // create header for 24 bits // correct later if necessary - aConverter << (UINT16)24; - aConverter << (UINT32)0; - aConverter << (UINT32)0; - aConverter << (UINT32)0; - aConverter << (UINT32)0; - aConverter << (UINT32)0; - aConverter << (UINT32)0; + aConverter << (sal_uInt16)24; + aConverter << (sal_uInt32)0; + aConverter << (sal_uInt32)0; + aConverter << (sal_uInt32)0; + aConverter << (sal_uInt32)0; + aConverter << (sal_uInt32)0; + aConverter << (sal_uInt32)0; for( nStream=0; nStream < 3 && bSuccess ; nStream++ ) { @@ -644,7 +644,7 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) CheckConsistency( "sane_get_parameters" ); if (nStatus != SANE_STATUS_GOOD || aParams.bytes_per_line == 0) { - bSuccess = FALSE; + bSuccess = sal_False; break; } #if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL @@ -662,7 +662,7 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) #endif if( ! pBuffer ) { - pBuffer = new BYTE[ BYTE_BUFFER_SIZE < 4*aParams.bytes_per_line ? 4*aParams.bytes_per_line : BYTE_BUFFER_SIZE ]; + pBuffer = new sal_uInt8[ BYTE_BUFFER_SIZE < 4*aParams.bytes_per_line ? 4*aParams.bytes_per_line : BYTE_BUFFER_SIZE ]; } if( aParams.last_frame ) @@ -687,14 +687,14 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) fprintf( stderr, "Warning: unknown frame style !!!\n" ); } - BOOL bSynchronousRead = TRUE; + sal_Bool bSynchronousRead = sal_True; // should be fail safe, but ... ?? nStatus = p_set_io_mode( maHandle, SANE_FALSE ); CheckConsistency( "sane_set_io_mode" ); if( nStatus != SANE_STATUS_GOOD ) { - bSynchronousRead = FALSE; + bSynchronousRead = sal_False; nStatus = p_set_io_mode( maHandle, SANE_TRUE ); CheckConsistency( "sane_set_io_mode" ); #if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL @@ -713,12 +713,12 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) DUMP_STATE( nStatus, "sane_get_select_fd" ); CheckConsistency( "sane_get_select_fd" ); if( nStatus != SANE_STATUS_GOOD ) - bSynchronousRead = TRUE; + bSynchronousRead = sal_True; } FILE* pFrame = tmpfile(); if( ! pFrame ) { - bSuccess = FALSE; + bSuccess = sal_False; break; } do { @@ -748,14 +748,14 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) if( nStatus != SANE_STATUS_EOF ) { fclose( pFrame ); - bSuccess = FALSE; + bSuccess = sal_False; break; } int nFrameLength = ftell( pFrame ); fseek( pFrame, 0, SEEK_SET ); - UINT32 nWidth = (UINT32) aParams.pixels_per_line; - UINT32 nHeight = (UINT32) (nFrameLength / aParams.bytes_per_line); + sal_uInt32 nWidth = (sal_uInt32) aParams.pixels_per_line; + sal_uInt32 nHeight = (sal_uInt32) (nFrameLength / aParams.bytes_per_line); if( ! bWidthSet ) { if( ! fResl ) @@ -769,12 +769,12 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) #endif aConverter.Seek( 18 ); - aConverter << (UINT32)nWidth; - aConverter << (UINT32)nHeight; + aConverter << (sal_uInt32)nWidth; + aConverter << (sal_uInt32)nHeight; aConverter.Seek( 38 ); - aConverter << (UINT32)(1000*nWidth/nWidthMM); - aConverter << (UINT32)(1000*nHeight/nHeightMM); - bWidthSet = TRUE; + aConverter << (sal_uInt32)(1000*nWidth/nWidthMM); + aConverter << (sal_uInt32)(1000*nHeight/nHeightMM); + bWidthSet = sal_True; } aConverter.Seek(60); @@ -783,13 +783,13 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) aConverter.Seek( 10 ); aConverter << (sal_uInt32)64; aConverter.Seek( 28 ); - aConverter << (UINT16) 1; + aConverter << (sal_uInt16) 1; aConverter.Seek( 54 ); // write color table - aConverter << (UINT16)0xffff; - aConverter << (UINT8)0xff; - aConverter << (UINT8)0; - aConverter << (UINT32)0; + aConverter << (sal_uInt16)0xffff; + aConverter << (sal_uInt8)0xff; + aConverter << (sal_uInt8)0; + aConverter << (sal_uInt32)0; aConverter.Seek( 64 ); } else if( eType == FrameStyle_Gray ) @@ -797,15 +797,15 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) aConverter.Seek( 10 ); aConverter << (sal_uInt32)1084; aConverter.Seek( 28 ); - aConverter << (UINT16) 8; + aConverter << (sal_uInt16) 8; aConverter.Seek( 54 ); // write color table for( nLine = 0; nLine < 256; nLine++ ) { - aConverter << (UINT8)nLine; - aConverter << (UINT8)nLine; - aConverter << (UINT8)nLine; - aConverter << (UINT8)0; + aConverter << (sal_uInt8)nLine; + aConverter << (sal_uInt8)nLine; + aConverter << (sal_uInt8)nLine; + aConverter << (sal_uInt8)0; } aConverter.Seek( 1084 ); } @@ -825,7 +825,7 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) { for( i = 0; i < (aParams.pixels_per_line); i++ ) { - UINT8 nGray = _ReadValue( pFrame, aParams.depth ); + sal_uInt8 nGray = _ReadValue( pFrame, aParams.depth ); aConverter << nGray; } } @@ -833,7 +833,7 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) { for( i = 0; i < (aParams.pixels_per_line); i++ ) { - UINT8 nRed, nGreen, nBlue; + sal_uInt8 nRed, nGreen, nBlue; nRed = _ReadValue( pFrame, aParams.depth ); nGreen = _ReadValue( pFrame, aParams.depth ); nBlue = _ReadValue( pFrame, aParams.depth ); @@ -846,7 +846,7 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) { for( i = 0; i < (aParams.pixels_per_line); i++ ) { - UINT8 nValue = _ReadValue( pFrame, aParams.depth ); + sal_uInt8 nValue = _ReadValue( pFrame, aParams.depth ); switch( aParams.format ) { case SANE_FRAME_RED: @@ -877,7 +877,7 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) break; } else - bSuccess = FALSE; + bSuccess = sal_False; } // get stream length aConverter.Seek( STREAM_SEEK_TO_END ); @@ -917,7 +917,7 @@ int Sane::GetRange( int n, double*& rpDouble ) rpDouble = 0; int nItems, i; - BOOL bIsFixed = mppOptions[n]->type == SANE_TYPE_FIXED ? TRUE : FALSE; + sal_Bool bIsFixed = mppOptions[n]->type == SANE_TYPE_FIXED ? sal_True : sal_False; dbg_msg( "Sane::GetRange of option %s ", mppOptions[n]->name ); if(mppOptions[n]->constraint_type == SANE_CONSTRAINT_RANGE ) @@ -995,10 +995,10 @@ String Sane::GetOptionUnitName( int n ) return aText; } -BOOL Sane::ActivateButtonOption( int n ) +sal_Bool Sane::ActivateButtonOption( int n ) { SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, NULL ); if( nStatus != SANE_STATUS_GOOD ) - return FALSE; - return TRUE; + return sal_False; + return sal_True; } diff --git a/extensions/source/scanner/sane.hxx b/extensions/source/scanner/sane.hxx index 44ce0d295f42..2b6683477b56 100644 --- a/extensions/source/scanner/sane.hxx +++ b/extensions/source/scanner/sane.hxx @@ -114,16 +114,16 @@ private: SANE_Status ControlOption( int, SANE_Action, void* ); - BOOL CheckConsistency( const char*, BOOL bInit = FALSE ); + sal_Bool CheckConsistency( const char*, sal_Bool bInit = sal_False ); public: Sane(); ~Sane(); - static BOOL IsSane() - { return pSaneLib ? TRUE : FALSE; } - BOOL IsOpen() - { return maHandle ? TRUE : FALSE; } + static sal_Bool IsSane() + { return pSaneLib ? sal_True : sal_False; } + sal_Bool IsOpen() + { return maHandle ? sal_True : sal_False; } static int CountDevices() { return nDevices; } static String GetName( int n ) @@ -154,28 +154,28 @@ public: inline int GetOptionElements( int n ); int GetOptionByName( const char* ); - BOOL GetOptionValue( int, BOOL& ); - BOOL GetOptionValue( int, ByteString& ); - BOOL GetOptionValue( int, double&, int nElement = 0 ); - BOOL GetOptionValue( int, double* ); + sal_Bool GetOptionValue( int, sal_Bool& ); + sal_Bool GetOptionValue( int, ByteString& ); + sal_Bool GetOptionValue( int, double&, int nElement = 0 ); + sal_Bool GetOptionValue( int, double* ); - BOOL SetOptionValue( int, BOOL ); - BOOL SetOptionValue( int, const String& ); - BOOL SetOptionValue( int, double, int nElement = 0 ); - BOOL SetOptionValue( int, double* ); + sal_Bool SetOptionValue( int, sal_Bool ); + sal_Bool SetOptionValue( int, const String& ); + sal_Bool SetOptionValue( int, double, int nElement = 0 ); + sal_Bool SetOptionValue( int, double* ); - BOOL ActivateButtonOption( int ); + sal_Bool ActivateButtonOption( int ); int CountOptions() { return mnOptions; } int GetDeviceNumber() { return mnDevice; } - BOOL Open( const char* ); - BOOL Open( int ); + sal_Bool Open( const char* ); + sal_Bool Open( int ); void Close(); void ReloadDevices(); void ReloadOptions(); - BOOL Start( BitmapTransporter& ); + sal_Bool Start( BitmapTransporter& ); inline Link SetReloadOptionsHdl( const Link& rLink ); }; diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 7b4b258ea43f..fc8119c07b4c 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -50,8 +50,8 @@ ResId SaneResId( sal_uInt32 nID ) SaneDlg::SaneDlg( Window* pParent, Sane& rSane ) : ModalDialog( pParent, SaneResId( RID_SANE_DIALOG ) ), mrSane( rSane ), - mbIsDragging( FALSE ), - mbDragDrawn( FALSE ), + mbIsDragging( sal_False ), + mbDragDrawn( sal_False ), maMapMode( MAP_APPFONT ), maOKButton( this, SaneResId( RID_SCAN_OK ) ), maCancelButton( this, SaneResId( RID_SCAN_CANCEL ) ), @@ -141,7 +141,7 @@ short SaneDlg::Execute() ErrorBox aErrorBox( NULL, WB_OK | WB_DEF_OK, String( SaneResId( RID_SANE_NOSANELIB_TXT ) ) ); aErrorBox.Execute(); - return FALSE; + return sal_False; } LoadState(); return ModalDialog::Execute(); @@ -173,7 +173,7 @@ void SaneDlg::InitFields() int nOption, i, nValue; double fValue; - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; const char *ppSpecialOptions[] = { "resolution", "tl-x", @@ -183,7 +183,7 @@ void SaneDlg::InitFields() "preview" }; - mbDragEnable = TRUE; + mbDragEnable = sal_True; maReslBox.Clear(); maMinTopLeft = Point( 0, 0 ); maMaxBottomRight = Point( PREVIEW_WIDTH, PREVIEW_HEIGHT ); @@ -200,7 +200,7 @@ void SaneDlg::InitFields() bSuccess = mrSane.GetOptionValue( nOption, fRes ); if( bSuccess ) { - maReslBox.Enable( TRUE ); + maReslBox.Enable( sal_True ); maReslBox.SetValue( (long)fRes ); double *pDouble = NULL; @@ -241,11 +241,11 @@ void SaneDlg::InitFields() delete [] pDouble; } else - maReslBox.Enable( FALSE ); + maReslBox.Enable( sal_False ); } } else - maReslBox.Enable( FALSE ); + maReslBox.Enable( sal_False ); // set scan area for( i = 0; i < 4; i++ ) @@ -271,7 +271,7 @@ void SaneDlg::InitFields() pField = &maBottomField; } nOption = pOptionName ? mrSane.GetOptionByName( pOptionName ) : -1; - bSuccess = FALSE; + bSuccess = sal_False; if( nOption != -1 ) { bSuccess = mrSane.GetOptionValue( nOption, fValue, 0 ); @@ -323,11 +323,11 @@ void SaneDlg::InitFields() case 3: maMaxBottomRight.Y() = (int)fValue;break; } } - pField->Enable( TRUE ); + pField->Enable( sal_True ); } else { - mbDragEnable = FALSE; + mbDragEnable = sal_False; pField->SetMin( 0 ); switch( i ) { case 0: @@ -355,7 +355,7 @@ void SaneDlg::InitFields() pField->SetValue( PREVIEW_HEIGHT ); break; } - pField->Enable( FALSE ); + pField->Enable( sal_False ); } } maTopLeft = GetPixelPos( maTopLeft ); @@ -367,23 +367,23 @@ void SaneDlg::InitFields() // fill OptionBox maOptionBox.Clear(); SvLBoxEntry* pParentEntry = 0; - BOOL bGroupRejected = FALSE; + sal_Bool bGroupRejected = sal_False; for( i = 1; i < mrSane.CountOptions(); i++ ) { String aOption=mrSane.GetOptionName( i ); - BOOL bInsertAdvanced = + sal_Bool bInsertAdvanced = mrSane.GetOptionCap( i ) & SANE_CAP_ADVANCED && - ! maAdvancedBox.IsChecked() ? FALSE : TRUE; + ! maAdvancedBox.IsChecked() ? sal_False : sal_True; if( mrSane.GetOptionType( i ) == SANE_TYPE_GROUP ) { if( bInsertAdvanced ) { aOption = mrSane.GetOptionTitle( i ); pParentEntry = maOptionBox.InsertEntry( aOption ); - bGroupRejected = FALSE; + bGroupRejected = sal_False; } else - bGroupRejected = TRUE; + bGroupRejected = sal_True; } else if( aOption.Len() && ! ( mrSane.GetOptionCap( i ) & @@ -393,12 +393,12 @@ void SaneDlg::InitFields() ) ) && bInsertAdvanced && ! bGroupRejected ) { - BOOL bIsSpecial = FALSE; + sal_Bool bIsSpecial = sal_False; for( size_t n = 0; !bIsSpecial && n < sizeof(ppSpecialOptions)/sizeof(ppSpecialOptions[0]); n++ ) { if( aOption.EqualsAscii( ppSpecialOptions[n] ) ) - bIsSpecial=TRUE; + bIsSpecial=sal_True; } if( ! bIsSpecial ) { @@ -432,7 +432,7 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton ) { mrSane.SetOptionValue( mnCurrentOption, maBoolCheckBox.IsChecked() ? - (BOOL)TRUE : (BOOL)FALSE ); + (sal_Bool)sal_True : (sal_Bool)sal_False ); } else if( pButton == &maButtonOption ) { @@ -479,7 +479,7 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton ) double fRes = (double)maReslBox.GetValue(); SetAdjustedNumericalValue( "resolution", fRes ); mrSane.SetReloadOptionsHdl( maOldLink ); - UpdateScanArea( TRUE ); + UpdateScanArea( sal_True ); SaveState(); EndDialog( mrSane.IsOpen() ? 1 : 0 ); } @@ -567,8 +567,8 @@ IMPL_LINK( SaneDlg, OptionsBoxSelectHdl, SvTreeListBox*, pBox ) maVectorBox.SetMin( 1 ); maVectorBox.SetMax( mrSane.GetOptionElements( mnCurrentOption ) ); - maVectorBox.Show( TRUE ); - maVectorTxt.Show( TRUE ); + maVectorBox.Show( sal_True ); + maVectorTxt.Show( sal_True ); } else { @@ -623,7 +623,7 @@ IMPL_LINK( SaneDlg, ModifyHdl, Edit*, pEdit ) if( fRes > pDouble[ 1 ] ) fRes = pDouble[ 1 ]; } - maReslBox.SetValue( (ULONG)fRes ); + maReslBox.SetValue( (sal_uLong)fRes ); } } else if( pEdit == &maNumericEdit ) @@ -706,7 +706,7 @@ void SaneDlg::AcquirePreview() if( ! mrSane.IsOpen() ) return; - UpdateScanArea( TRUE ); + UpdateScanArea( sal_True ); // set small resolution for preview double fResl = (double)maReslBox.GetValue(); SetAdjustedNumericalValue( "resolution", 30.0 ); @@ -720,7 +720,7 @@ void SaneDlg::AcquirePreview() return; } else - mrSane.SetOptionValue( nOption, (BOOL)TRUE ); + mrSane.SetOptionValue( nOption, (sal_Bool)sal_True ); BitmapTransporter aTransporter; if( ! mrSane.Start( aTransporter ) ) @@ -736,11 +736,11 @@ void SaneDlg::AcquirePreview() fprintf( stderr, "Previewbitmapstream contains %d bytes\n", (int)aTransporter.getStream().Tell() ); #endif aTransporter.getStream().Seek( STREAM_SEEK_TO_BEGIN ); - maPreviewBitmap.Read( aTransporter.getStream(), TRUE ); + maPreviewBitmap.Read( aTransporter.getStream(), sal_True ); } SetAdjustedNumericalValue( "resolution", fResl ); - maReslBox.SetValue( (ULONG)fResl ); + maReslBox.SetValue( (sal_uLong)fResl ); if( mbDragEnable ) maPreviewRect = Rectangle( maTopLeft, @@ -781,7 +781,7 @@ void SaneDlg::Paint( const Rectangle& rRect ) DrawBitmap( maPreviewRect.TopLeft(), maPreviewRect.GetSize(), maPreviewBitmap ); - mbDragDrawn = FALSE; + mbDragDrawn = sal_False; DrawDrag(); ModalDialog::Paint( rRect ); @@ -789,43 +789,43 @@ void SaneDlg::Paint( const Rectangle& rRect ) void SaneDlg::DisableOption() { - maBoolCheckBox.Show( FALSE ); - maStringEdit.Show( FALSE ); - maNumericEdit.Show( FALSE ); - maQuantumRangeBox.Show( FALSE ); - maStringRangeBox.Show( FALSE ); - maButtonOption.Show( FALSE ); - maVectorBox.Show( FALSE ); - maVectorTxt.Show( FALSE ); - maOptionDescTxt.Show( FALSE ); + maBoolCheckBox.Show( sal_False ); + maStringEdit.Show( sal_False ); + maNumericEdit.Show( sal_False ); + maQuantumRangeBox.Show( sal_False ); + maStringRangeBox.Show( sal_False ); + maButtonOption.Show( sal_False ); + maVectorBox.Show( sal_False ); + maVectorTxt.Show( sal_False ); + maOptionDescTxt.Show( sal_False ); } void SaneDlg::EstablishBoolOption() { - BOOL bSuccess, bValue; + sal_Bool bSuccess, bValue; bSuccess = mrSane.GetOptionValue( mnCurrentOption, bValue ); if( bSuccess ) { maOptionDescTxt.SetText( mrSane.GetOptionName( mnCurrentOption ) ); - maOptionDescTxt.Show( TRUE ); + maOptionDescTxt.Show( sal_True ); maBoolCheckBox.Check( bValue ); - maBoolCheckBox.Show( TRUE ); + maBoolCheckBox.Show( sal_True ); } } void SaneDlg::EstablishStringOption() { - BOOL bSuccess; + sal_Bool bSuccess; ByteString aValue; bSuccess = mrSane.GetOptionValue( mnCurrentOption, aValue ); if( bSuccess ) { maOptionDescTxt.SetText( mrSane.GetOptionName( mnCurrentOption ) ); - maOptionDescTxt.Show( TRUE ); + maOptionDescTxt.Show( sal_True ); maStringEdit.SetText( String( aValue, osl_getThreadTextEncoding() ) ); - maStringEdit.Show( TRUE ); + maStringEdit.Show( sal_True ); } } @@ -838,9 +838,9 @@ void SaneDlg::EstablishStringRange() ByteString aValue; mrSane.GetOptionValue( mnCurrentOption, aValue ); maStringRangeBox.SelectEntry( String( aValue, osl_getThreadTextEncoding() ) ); - maStringRangeBox.Show( TRUE ); + maStringRangeBox.Show( sal_True ); maOptionDescTxt.SetText( mrSane.GetOptionName( mnCurrentOption ) ); - maOptionDescTxt.Show( TRUE ); + maOptionDescTxt.Show( sal_True ); } void SaneDlg::EstablishQuantumRange() @@ -876,18 +876,18 @@ void SaneDlg::EstablishQuantumRange() sprintf( pBuf, "%g", fValue ); maQuantumRangeBox.SelectEntry( String( pBuf, osl_getThreadTextEncoding() ) ); } - maQuantumRangeBox.Show( TRUE ); + maQuantumRangeBox.Show( sal_True ); String aText( mrSane.GetOptionName( mnCurrentOption ) ); aText += ' '; aText += mrSane.GetOptionUnitName( mnCurrentOption ); maOptionDescTxt.SetText( aText ); - maOptionDescTxt.Show( TRUE ); + maOptionDescTxt.Show( sal_True ); } } void SaneDlg::EstablishNumericOption() { - BOOL bSuccess; + sal_Bool bSuccess; double fValue; bSuccess = mrSane.GetOptionValue( mnCurrentOption, fValue ); @@ -904,17 +904,17 @@ void SaneDlg::EstablishNumericOption() aText += String( pBuf, osl_getThreadTextEncoding() ); } maOptionDescTxt.SetText( aText ); - maOptionDescTxt.Show( TRUE ); + maOptionDescTxt.Show( sal_True ); sprintf( pBuf, "%g", fValue ); maNumericEdit.SetText( String( pBuf, osl_getThreadTextEncoding() ) ); - maNumericEdit.Show( TRUE ); + maNumericEdit.Show( sal_True ); } void SaneDlg::EstablishButtonOption() { maOptionDescTxt.SetText( mrSane.GetOptionName( mnCurrentOption ) ); - maOptionDescTxt.Show( TRUE ); - maButtonOption.Show( TRUE ); + maOptionDescTxt.Show( sal_True ); + maButtonOption.Show( sal_True ); } #define RECT_SIZE_PIX 7 @@ -959,7 +959,7 @@ void SaneDlg::MouseMove( const MouseEvent& rMEvt ) maBottomRight.Y() = nSwap; } DrawDrag(); - UpdateScanArea( FALSE ); + UpdateScanArea( sal_False ); } ModalDialog::MouseMove( rMEvt ); } @@ -980,21 +980,21 @@ void SaneDlg::MouseButtonDown( const MouseEvent& rMEvt ) { meDragDirection = TopLeft; aMousePixel = maTopLeft; - mbIsDragging = TRUE; + mbIsDragging = sal_True; } else if( aMousePixel.X() >= nMiddleX && aMousePixel.X() < nMiddleX + RECT_SIZE_PIX ) { meDragDirection = Top; aMousePixel.Y() = maTopLeft.Y(); - mbIsDragging = TRUE; + mbIsDragging = sal_True; } else if( aMousePixel.X() > maBottomRight.X() - RECT_SIZE_PIX && aMousePixel.X() <= maBottomRight.X() ) { meDragDirection = TopRight; aMousePixel = Point( maBottomRight.X(), maTopLeft.Y() ); - mbIsDragging = TRUE; + mbIsDragging = sal_True; } } else if( aMousePixel.Y() >= nMiddleY && @@ -1005,14 +1005,14 @@ void SaneDlg::MouseButtonDown( const MouseEvent& rMEvt ) { meDragDirection = Left; aMousePixel.X() = maTopLeft.X(); - mbIsDragging = TRUE; + mbIsDragging = sal_True; } else if( aMousePixel.X() > maBottomRight.X() - RECT_SIZE_PIX && aMousePixel.X() <= maBottomRight.X() ) { meDragDirection = Right; aMousePixel.X() = maBottomRight.X(); - mbIsDragging = TRUE; + mbIsDragging = sal_True; } } else if( aMousePixel.Y() <= maBottomRight.Y() && @@ -1023,21 +1023,21 @@ void SaneDlg::MouseButtonDown( const MouseEvent& rMEvt ) { meDragDirection = BottomLeft; aMousePixel = Point( maTopLeft.X(), maBottomRight.Y() ); - mbIsDragging = TRUE; + mbIsDragging = sal_True; } else if( aMousePixel.X() >= nMiddleX && aMousePixel.X() < nMiddleX + RECT_SIZE_PIX ) { meDragDirection = Bottom; aMousePixel.Y() = maBottomRight.Y(); - mbIsDragging = TRUE; + mbIsDragging = sal_True; } else if( aMousePixel.X() > maBottomRight.X() - RECT_SIZE_PIX && aMousePixel.X() <= maBottomRight.X() ) { meDragDirection = BottomRight; aMousePixel = maBottomRight; - mbIsDragging = TRUE; + mbIsDragging = sal_True; } } } @@ -1053,9 +1053,9 @@ void SaneDlg::MouseButtonUp( const MouseEvent& rMEvt ) { if( mbIsDragging ) { - UpdateScanArea( TRUE ); + UpdateScanArea( sal_True ); } - mbIsDragging = FALSE; + mbIsDragging = sal_False; ModalDialog::MouseButtonUp( rMEvt ); } @@ -1102,7 +1102,7 @@ void SaneDlg::DrawDrag() aLastBR = maBottomRight; DrawRectangles( maTopLeft, maBottomRight ); - mbDragDrawn = TRUE; + mbDragDrawn = sal_True; SetRasterOp( eROP ); SetMapMode( maMapMode ); } @@ -1141,7 +1141,7 @@ Point SaneDlg::GetLogicPos( const Point& rIn ) return aConvert; } -void SaneDlg::UpdateScanArea( BOOL bSend ) +void SaneDlg::UpdateScanArea( sal_Bool bSend ) { if( ! mbDragEnable ) return; @@ -1166,26 +1166,26 @@ void SaneDlg::UpdateScanArea( BOOL bSend ) } } -BOOL SaneDlg::LoadState() +sal_Bool SaneDlg::LoadState() { #ifdef USE_SAVE_STATE int i; if( ! Sane::IsSane() ) - return FALSE; + return sal_False; const char* pEnv = getenv("HOME"); String aFileName( pEnv ? pEnv : "", osl_getThreadTextEncoding() ); aFileName += String( RTL_CONSTASCII_USTRINGPARAM( "/.so_sane_state" ) ); Config aConfig( aFileName ); if( ! aConfig.HasGroup( "SANE" ) ) - return FALSE; + return sal_False; aConfig.SetGroup( "SANE" ); ByteString aString = aConfig.ReadKey( "SO_LastSaneDevice" ); for( i = 0; i < Sane::CountDevices() && ! aString.Equals( ByteString( Sane::GetName( i ), osl_getThreadTextEncoding() ) ); i++ ) ; if( i == Sane::CountDevices() ) - return FALSE; + return sal_False; mrSane.Close(); mrSane.Open( aString.GetBuffer() ); @@ -1206,7 +1206,7 @@ BOOL SaneDlg::LoadState() if( aValue.CompareTo( "BOOL=", 5 ) == COMPARE_EQUAL ) { aValue.Erase( 0, 5 ); - BOOL aBOOL = (BOOL)aValue.ToInt32(); + sal_Bool aBOOL = (sal_Bool)aValue.ToInt32(); mrSane.SetOptionValue( nOption, aBOOL ); } else if( aValue.CompareTo( "STRING=", 7 ) == COMPARE_EQUAL ) @@ -1233,9 +1233,9 @@ BOOL SaneDlg::LoadState() DisableOption(); InitFields(); - return TRUE; + return sal_True; #else - return FALSE; + return sal_False; #endif } @@ -1263,11 +1263,11 @@ void SaneDlg::SaveState() { case SANE_TYPE_BOOL: { - BOOL bValue; + sal_Bool bValue; if( mrSane.GetOptionValue( i, bValue ) ) { ByteString aString( "BOOL=" ); - aString += (ULONG)bValue; + aString += (sal_uLong)bValue; aConfig.WriteKey( aOption, aString ); } } @@ -1327,7 +1327,7 @@ void SaneDlg::SaveState() { case SANE_TYPE_BOOL: { - BOOL bValue; + sal_Bool bValue; if( mrSane.GetOptionValue( nOption, bValue ) ) { ByteString aString( "BOOL=" ); @@ -1377,22 +1377,22 @@ void SaneDlg::SaveState() #endif } -BOOL SaneDlg::SetAdjustedNumericalValue( +sal_Bool SaneDlg::SetAdjustedNumericalValue( const char* pOption, double fValue, int nElement ) { int nOption; if( ! Sane::IsSane() || ! mrSane.IsOpen() || ( nOption = mrSane.GetOptionByName( pOption ) ) == -1 ) - return FALSE; + return sal_False; if( nElement < 0 || nElement >= mrSane.GetOptionElements( nOption ) ) - return FALSE; + return sal_False; double* pValues = NULL; int nValues; if( ( nValues = mrSane.GetRange( nOption, pValues ) ) < 0 ) - return FALSE; + return sal_False; #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "SaneDlg::SetAdjustedNumericalValue( \"%s\", %lg ) ", @@ -1427,5 +1427,5 @@ BOOL SaneDlg::SetAdjustedNumericalValue( #endif - return TRUE; + return sal_True; } diff --git a/extensions/source/scanner/sanedlg.hxx b/extensions/source/scanner/sanedlg.hxx index 2ea35ca33c83..5fc112732ef8 100644 --- a/extensions/source/scanner/sanedlg.hxx +++ b/extensions/source/scanner/sanedlg.hxx @@ -52,10 +52,10 @@ private: Rectangle maPreviewRect; Point maTopLeft, maBottomRight; Point maMinTopLeft, maMaxBottomRight; - BOOL mbDragEnable; - BOOL mbIsDragging; + sal_Bool mbDragEnable; + sal_Bool mbIsDragging; int mnDragMode; - BOOL mbDragDrawn; + sal_Bool mbDragDrawn; DragDirection meDragDirection; MapMode maMapMode; @@ -115,7 +115,7 @@ private: DECL_LINK( OptionsBoxSelectHdl, SvTreeListBox* ); void SaveState(); - BOOL LoadState(); + sal_Bool LoadState(); void InitDevices(); void InitFields(); @@ -132,10 +132,10 @@ private: void DrawDrag(); Point GetPixelPos( const Point& ); Point GetLogicPos( const Point& ); - void UpdateScanArea( BOOL ); + void UpdateScanArea( sal_Bool ); // helper - BOOL SetAdjustedNumericalValue( const char* pOption, double fValue, int nElement = 0 ); + sal_Bool SetAdjustedNumericalValue( const char* pOption, double fValue, int nElement = 0 ); virtual void Paint( const Rectangle& ); virtual void MouseMove( const MouseEvent& rMEvt ); diff --git a/extensions/source/scanner/scanner.hxx b/extensions/source/scanner/scanner.hxx index 3453598974a7..374c2adc3a25 100644 --- a/extensions/source/scanner/scanner.hxx +++ b/extensions/source/scanner/scanner.hxx @@ -88,7 +88,7 @@ public: // XScannerManager virtual SEQ( ScannerContext ) SAL_CALL getAvailableScanners() throw(); - virtual BOOL SAL_CALL configureScanner( ScannerContext& scanner_context ) throw( ScannerException ); + virtual sal_Bool SAL_CALL configureScanner( ScannerContext& scanner_context ) throw( ScannerException ); virtual void SAL_CALL startScan( const ScannerContext& scanner_context, const REF( com::sun::star::lang::XEventListener )& rxListener ) throw( ScannerException ); virtual ScanError SAL_CALL getError( const ScannerContext& scanner_context ) throw( ScannerException ); virtual REF( AWT::XBitmap ) SAL_CALL getBitmap( const ScannerContext& scanner_context ) throw( ScannerException ); diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx index 0a477a9dae7d..5307ac148487 100644 --- a/extensions/source/scanner/scanunx.cxx +++ b/extensions/source/scanner/scanunx.cxx @@ -203,7 +203,7 @@ void ScannerThread::run() { int nOption = m_pHolder->m_aSane.GetOptionByName( "preview" ); if( nOption != -1 ) - m_pHolder->m_aSane.SetOptionValue( nOption, (BOOL)FALSE ); + m_pHolder->m_aSane.SetOptionValue( nOption, (sal_Bool)sal_False ); m_pHolder->m_nError = m_pHolder->m_aSane.Start( *pTransporter ) ? @@ -277,7 +277,7 @@ SEQ( ScannerContext ) ScannerManager::getAvailableScanners() throw() // ----------------------------------------------------------------------------- -BOOL ScannerManager::configureScanner( ScannerContext& scanner_context ) throw( ScannerException ) +sal_Bool ScannerManager::configureScanner( ScannerContext& scanner_context ) throw( ScannerException ) { vos::OGuard aGuard( theSaneProtector::get() ); sanevec &rSanes = theSanes::get().m_aSanes; @@ -286,7 +286,7 @@ BOOL ScannerManager::configureScanner( ScannerContext& scanner_context ) throw( fprintf( stderr, "ScannerManager::configureScanner\n" ); #endif - if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= rSanes.size() ) + if( scanner_context.InternalData < 0 || (sal_uLong)scanner_context.InternalData >= rSanes.size() ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner does not exist" ), REF( XScannerManager )( this ), @@ -303,7 +303,7 @@ BOOL ScannerManager::configureScanner( ScannerContext& scanner_context ) throw( pHolder->m_bBusy = true; SaneDlg aDlg( NULL, pHolder->m_aSane ); - BOOL bRet = (BOOL)aDlg.Execute(); + sal_Bool bRet = (sal_Bool)aDlg.Execute(); pHolder->m_bBusy = false; return bRet; @@ -321,7 +321,7 @@ void ScannerManager::startScan( const ScannerContext& scanner_context, fprintf( stderr, "ScannerManager::startScan\n" ); #endif - if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= rSanes.size() ) + if( scanner_context.InternalData < 0 || (sal_uLong)scanner_context.InternalData >= rSanes.size() ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner does not exist" ), REF( XScannerManager )( this ), @@ -347,7 +347,7 @@ ScanError ScannerManager::getError( const ScannerContext& scanner_context ) thro vos::OGuard aGuard( theSaneProtector::get() ); sanevec &rSanes = theSanes::get().m_aSanes; - if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= rSanes.size() ) + if( scanner_context.InternalData < 0 || (sal_uLong)scanner_context.InternalData >= rSanes.size() ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner does not exist" ), REF( XScannerManager )( this ), @@ -366,7 +366,7 @@ REF( AWT::XBitmap ) ScannerManager::getBitmap( const ScannerContext& scanner_con vos::OGuard aGuard( theSaneProtector::get() ); sanevec &rSanes = theSanes::get().m_aSanes; - if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= rSanes.size() ) + if( scanner_context.InternalData < 0 || (sal_uLong)scanner_context.InternalData >= rSanes.size() ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner does not exist" ), REF( XScannerManager )( this ), diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx index f245cc95d1f6..e910da58cc8a 100644 --- a/extensions/source/scanner/scanwin.cxx +++ b/extensions/source/scanner/scanwin.cxx @@ -1001,7 +1001,7 @@ SEQ( ScannerContext ) SAL_CALL ScannerManager::getAvailableScanners() throw() // ----------------------------------------------------------------------------- -BOOL SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext ) +sal_Bool SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext ) throw( ScannerException ) { vos::OGuard aGuard( maProtector ); diff --git a/extensions/source/scanner/twain.cxx b/extensions/source/scanner/twain.cxx index d0fcaf411d6a..bd17f1e56117 100644 --- a/extensions/source/scanner/twain.cxx +++ b/extensions/source/scanner/twain.cxx @@ -176,7 +176,7 @@ void ImpTwain::Destroy() // ----------------------------------------------------------------------------- -BOOL ImpTwain::SelectSource() +sal_Bool ImpTwain::SelectSource() { TW_UINT16 nRet = TWRC_FAILURE; @@ -201,9 +201,9 @@ BOOL ImpTwain::SelectSource() // ----------------------------------------------------------------------------- -BOOL ImpTwain::InitXfer() +sal_Bool ImpTwain::InitXfer() { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( !!aBitmap ) aBitmap = Bitmap(); @@ -435,7 +435,7 @@ void ImpTwain::ImplFallback( ULONG nEvent ) IMPL_LINK( ImpTwain, ImplFallbackHdl, void*, pData ) { const ULONG nEvent = (ULONG) pData; - BOOL bFallback = TRUE; + sal_Bool bFallback = sal_True; switch( nCurState ) { @@ -490,7 +490,7 @@ IMPL_LINK( ImpTwain, ImplFallbackHdl, void*, pData ) if( nEvent != TWAIN_EVENT_NONE ) aNotifyLink.Call( (void*) nEvent ); - bFallback = FALSE; + bFallback = sal_False; } break; } diff --git a/extensions/source/scanner/twain.hxx b/extensions/source/scanner/twain.hxx index 6f4605f5f796..bb9fa44b6cf6 100644 --- a/extensions/source/scanner/twain.hxx +++ b/extensions/source/scanner/twain.hxx @@ -58,21 +58,21 @@ class ImpTwain Bitmap aBitmap; DSMENTRYPROC pDSM; vos:: OModule * pMod; - ULONG nCurState; + sal_uLong nCurState; void ImplCreate(); void ImplOpenSourceManager(); void ImplOpenSource(); - BOOL ImplEnableSource(); + sal_Bool ImplEnableSource(); void ImplXfer(); - void ImplFallback( ULONG nEvent ); + void ImplFallback( sal_uLong nEvent ); DECL_LINK( ImplFallbackHdl, void* ); DECL_LINK( ImplDestroyHdl, void* ); public: - BOOL ImplHandleMsg( void* pMsg ); + sal_Bool ImplHandleMsg( void* pMsg ); #ifdef OS2 HAB hAB; @@ -90,8 +90,8 @@ public: void Destroy(); - BOOL SelectSource(); - BOOL InitXfer(); + sal_Bool SelectSource(); + sal_Bool InitXfer(); Bitmap GetXferBitmap(); }; diff --git a/extensions/source/svg/svgaction.cxx b/extensions/source/svg/svgaction.cxx index dc2c47ecb937..fbe5badb17e6 100644 --- a/extensions/source/svg/svgaction.cxx +++ b/extensions/source/svg/svgaction.cxx @@ -401,7 +401,7 @@ void SVGAttributeWriter::SetFontAttr( const Font& rFont ) delete mpElemPaint, mpElemPaint = NULL; delete mpElemFont; mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, GetFontStyle( maCurFont = rFont ) ); - mpElemFont = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); + mpElemFont = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True ); } } @@ -413,7 +413,7 @@ void SVGAttributeWriter::SetPaintAttr( const Color& rLineColor, const Color& rFi { delete mpElemPaint; mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, GetPaintStyle( maCurLineColor = rLineColor, maCurFillColor = rFillColor ) ); - mpElemPaint = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); + mpElemPaint = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True ); } } @@ -522,7 +522,7 @@ void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2, const } { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemLine, TRUE, TRUE ); + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemLine, sal_True, sal_True ); } } @@ -549,7 +549,7 @@ void SVGActionWriter::ImplWriteRect( const Rectangle& rRect, long nRadX, long nR mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle ); { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemRect, TRUE, TRUE ); + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemRect, sal_True, sal_True ); } } @@ -570,7 +570,7 @@ void SVGActionWriter::ImplWriteEllipse( const Point& rCenter, long nRadX, long n mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, *pStyle ); { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemEllipse, TRUE, TRUE ); + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemEllipse, sal_True, sal_True ); } } @@ -587,7 +587,7 @@ void SVGActionWriter::ImplWritePolygon( const Polygon& rPoly, sal_Bool bLineOnly { FastString aStyle; FastString aPoints; - USHORT i = 0, nSize = rPoly.GetSize(); + sal_uInt16 i = 0, nSize = rPoly.GetSize(); const NMSP_RTL::OUString aBlank( B2UCONST( " " ) ); // points @@ -626,7 +626,7 @@ void SVGActionWriter::ImplWritePolygon( const Polygon& rPoly, sal_Bool bLineOnly { // write polyline/polygon element - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, bLineOnly ? aXMLElemPolyLine : aXMLElemPolygon, TRUE, TRUE ); + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, bLineOnly ? aXMLElemPolyLine : aXMLElemPolygon, sal_True, sal_True ); } } } @@ -651,8 +651,8 @@ void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bo for( long i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ ) { - const Polygon& rPoly = rPolyPoly[ (USHORT) i ]; - USHORT n = 1, nSize = rPoly.GetSize(); + const Polygon& rPoly = rPolyPoly[ (sal_uInt16) i ]; + sal_uInt16 n = 1, nSize = rPoly.GetSize(); if( nSize > 1 ) { @@ -716,7 +716,7 @@ void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bo mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrD, aPathData.GetString() ); { // write polyline/polygon element - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemPath, TRUE, TRUE ); + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemPath, sal_True, sal_True ); } } } @@ -729,7 +729,7 @@ void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const G { if( rPolyPoly.Count() ) { - SvXMLElementExport aElemG( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); + SvXMLElementExport aElemG( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True ); FastString aClipId; FastString aClipStyle; @@ -737,12 +737,12 @@ void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const G aClipId += NMSP_RTL::OUString::valueOf( ImplGetNextClipId() ); { - SvXMLElementExport aElemDefs( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, TRUE, TRUE ); + SvXMLElementExport aElemDefs( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, sal_True, sal_True ); mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, aClipId.GetString() ); { - SvXMLElementExport aElemClipPath( mrExport, XML_NAMESPACE_NONE, aXMLElemClipPath, TRUE, TRUE ); + SvXMLElementExport aElemClipPath( mrExport, XML_NAMESPACE_NONE, aXMLElemClipPath, sal_True, sal_True ); ImplWritePolyPolygon( rPolyPoly, sal_False ); } } @@ -756,7 +756,7 @@ void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const G { GDIMetaFile aTmpMtf; - SvXMLElementExport aElemG2( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); + SvXMLElementExport aElemG2( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True ); mpVDev->AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf ); ImplWriteActions( aTmpMtf, pStyle ); @@ -771,7 +771,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, const NMSP_RTL::OUString* pStyle ) { String aText( rText ); aText.EraseLeadingChars( ' ' ); - UINT32 nLen = aText.Len(), i; + sal_uInt32 nLen = aText.Len(), i; if( nLen ) { @@ -795,7 +795,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, if( nLen > 1 ) { - aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( aText.GetChar( (USHORT) nLen - 1 ) ); + aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( aText.GetChar( (sal_uInt16) nLen - 1 ) ); if( nWidth && aNormSize.Width() && ( nWidth != aNormSize.Width() ) ) { @@ -861,7 +861,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, aTransform += ')'; mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform ); - pTransform = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); + pTransform = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, sal_True, sal_True ); } // add additional style if requested @@ -872,7 +872,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, #ifdef _SVG_USE_TSPANS if( pDXArray ) { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, TRUE, TRUE ); + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, sal_True, sal_True ); FastString aTSpanX; const NMSP_RTL::OUString aSpace( ' ' ); long i, nX, nCount; @@ -894,7 +894,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, { try { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemTSpan, TRUE, TRUE ); + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemTSpan, sal_True, sal_True ); mrExport.GetDocHandler()->characters( NMSP_RTL::OUString( UniString( aText ) ) ); } catch( ::com::sun::star::xml::sax::SAXException& ) @@ -912,7 +912,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, try { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, TRUE, TRUE ); + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, sal_True, sal_True ); mrExport.GetDocHandler()->characters( NMSP_RTL::OUString( UniString( aText ) ) ); } catch( ::com::sun::star::xml::sax::SAXException& ) @@ -938,7 +938,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, aPoly[ 2 ].X() = aPoly[ 1 ].X(); aPoly[ 2 ].Y() = aPoly[ 0 ].Y() + nLineHeight - 1; aPoly[ 3 ].X() = aPoly[ 0 ].X(); aPoly[ 3 ].Y() = aPoly[ 2 ].Y(); - ImplWritePolygon( aPoly, FALSE ); + ImplWritePolygon( aPoly, sal_False ); } if( rFont.GetUnderline() ) @@ -950,7 +950,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, aPoly[ 2 ].X() = aPoly[ 1 ].X(); aPoly[ 2 ].Y() = aPoly[ 0 ].Y() + nLineHeight - 1; aPoly[ 3 ].X() = aPoly[ 0 ].X(); aPoly[ 3 ].Y() = aPoly[ 2 ].Y(); - ImplWritePolygon( aPoly, FALSE ); + ImplWritePolygon( aPoly, sal_False ); } } @@ -1049,10 +1049,10 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: { ImplAcquireContext(); - for( ULONG i = 0, nCount = rMtf.GetActionCount(); i < nCount; i++ ) + for( sal_uLong i = 0, nCount = rMtf.GetActionCount(); i < nCount; i++ ) { const MetaAction* pAction = rMtf.GetAction( i ); - const USHORT nType = pAction->GetType(); + const sal_uInt16 nType = pAction->GetType(); switch( nType ) { @@ -1253,7 +1253,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() ); sal_Bool bFound = sal_False; - for( ULONG j = 0, nCount2 = aGDIMetaFile.GetActionCount(); ( j < nCount2 ) && !bFound; j++ ) + for( sal_uLong j = 0, nCount2 = aGDIMetaFile.GetActionCount(); ( j < nCount2 ) && !bFound; j++ ) { const MetaAction* pSubstAct = aGDIMetaFile.GetAction( j ); diff --git a/extensions/source/svg/svgaction.hxx b/extensions/source/svg/svgaction.hxx index 8e7bececb87d..b73fba3e95c5 100644 --- a/extensions/source/svg/svgaction.hxx +++ b/extensions/source/svg/svgaction.hxx @@ -158,7 +158,7 @@ public: virtual ~SVGActionWriter(); const VirtualDevice& GetVDev() const { return *mpVDev; } - BOOL HasDoublePoints() const { return mbDoublePoints; } + sal_Bool HasDoublePoints() const { return mbDoublePoints; } }; #endif diff --git a/extensions/source/svg/svgprinter.cxx b/extensions/source/svg/svgprinter.cxx index c7605a8af16d..24a6244d0b79 100644 --- a/extensions/source/svg/svgprinter.cxx +++ b/extensions/source/svg/svgprinter.cxx @@ -71,7 +71,7 @@ private: protected: virtual void _ExportMeta() {} - virtual void _ExportStyles( BOOL /*bUsed*/ ) {} + virtual void _ExportStyles( sal_Bool /*bUsed*/ ) {} virtual void _ExportAutoStyles() {} virtual void _ExportContent() {} virtual void _ExportMasterStyles() {} @@ -139,14 +139,14 @@ SVGPrinterExport::SVGPrinterExport( mpOuterElement = ImplCreateSVGElement( rSetup, aOutputSize ); // write description - SvXMLElementExport* pDescElem = new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemDesc, TRUE, TRUE ); + SvXMLElementExport* pDescElem = new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemDesc, sal_True, sal_True ); NMSP_RTL::OUString aDesc( B2UCONST( "document name: " ) ); GetDocHandler()->characters( aDesc += rJobName ); delete pDescElem; // write meta attributes - ImplWriteMetaAttr( TRUE, FALSE ); + ImplWriteMetaAttr( sal_True, sal_False ); } // ----------------------------------------------------------------------------- @@ -166,7 +166,7 @@ SvXMLElementExport* SVGPrinterExport::ImplCreateSVGElement( const JobSetup& rSet delete mpVDev; mpVDev = new VirtualDevice; - mpVDev->EnableOutput( FALSE ); + mpVDev->EnableOutput( sal_False ); mpVDev->SetMapMode( MAP_100TH_MM ); maPrinter.SetJobSetup( rSetup ); @@ -184,14 +184,14 @@ SvXMLElementExport* SVGPrinterExport::ImplCreateSVGElement( const JobSetup& rSet aAttr += SVGActionWriter::GetValueString( rOutputSize.Height(), sal_True ); AddAttribute( XML_NAMESPACE_NONE, aXMLAttrViewBox, aAttr ); - return( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemSVG, TRUE, TRUE ) ); + return( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemSVG, sal_True, sal_True ) ); } // ----------------------------------------------------------------------------- void SVGPrinterExport::ImplWriteMetaAttr( sal_Bool bOuter, sal_Bool bPage ) { - SvXMLElementExport aMetaData( *this, XML_NAMESPACE_NONE, aXMLElemMeta, TRUE, TRUE ); + SvXMLElementExport aMetaData( *this, XML_NAMESPACE_NONE, aXMLElemMeta, sal_True, sal_True ); NMSP_RTL::OUString aAttr; aAttr = bOuter ? B2UCONST( "true" ) : B2UCONST( "false" ); @@ -201,7 +201,7 @@ void SVGPrinterExport::ImplWriteMetaAttr( sal_Bool bOuter, sal_Bool bPage ) AddAttribute( XML_NAMESPACE_NONE, aXMLAttrMetaSVGPage, aAttr ); { - delete( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemMetaSVG, TRUE, TRUE ) ); + delete( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemMetaSVG, sal_True, sal_True ) ); } } @@ -214,14 +214,14 @@ void SVGPrinterExport::writePage( const JobSetup& rSetup, const GDIMetaFile& rMt SvXMLElementExport* pPageElem = ImplCreateSVGElement( rSetup, aOutputSize ); // write description - SvXMLElementExport* pDescElem = new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemDesc, TRUE, TRUE ); + SvXMLElementExport* pDescElem = new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemDesc, sal_True, sal_True ); NMSP_RTL::OUString aDesc( B2UCONST( "page: " ) ); GetDocHandler()->characters( aDesc += NMSP_RTL::OUString::valueOf( (sal_Int32) ++mnPage ) ); delete pDescElem; // write meta attributes - ImplWriteMetaAttr( FALSE, TRUE ); + ImplWriteMetaAttr( sal_False, sal_True ); // write dummy rect element aAttr = B2UCONST( "0.0" ); @@ -234,8 +234,8 @@ void SVGPrinterExport::writePage( const JobSetup& rSetup, const GDIMetaFile& rMt aAttr = SVGActionWriter::GetValueString( aOutputSize.Height(), sal_True ); AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, aAttr ); - delete( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemRect, TRUE, TRUE ) ); - delete( new SVGActionWriter( *this, rMtf, mpVDev, TRUE ) ); + delete( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemRect, sal_True, sal_True ) ); + delete( new SVGActionWriter( *this, rMtf, mpVDev, sal_True ) ); delete pPageElem; } diff --git a/extensions/source/svg/svgwriter.cxx b/extensions/source/svg/svgwriter.cxx index 0a2ae22242ff..341891cc9003 100644 --- a/extensions/source/svg/svgwriter.cxx +++ b/extensions/source/svg/svgwriter.cxx @@ -45,7 +45,7 @@ private: protected: virtual void _ExportMeta() {} - virtual void _ExportStyles( BOOL /*bUsed*/ ) {} + virtual void _ExportStyles( sal_Bool /*bUsed*/ ) {} virtual void _ExportAutoStyles() {} virtual void _ExportContent() {} virtual void _ExportMasterStyles() {} @@ -107,7 +107,7 @@ void SVGMtfExport::writeMtf( const GDIMetaFile& rMtf ) AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr ); { - SvXMLElementExport aSVG( *this, XML_NAMESPACE_NONE, "svg", TRUE, TRUE ); + SvXMLElementExport aSVG( *this, XML_NAMESPACE_NONE, "svg", sal_True, sal_True ); SVGActionWriter* pWriter = new SVGActionWriter( *this, rMtf ); delete pWriter; diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 8419569bd949..8419569bd949 100755..100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 581c6d81c6fa..ab6260bd804b 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -49,7 +49,7 @@ #include "com/sun/star/awt/XControl.hpp" #include "com/sun/star/awt/XControlContainer.hpp" #include "com/sun/star/awt/XMessageBox.hpp" -#include "com/sun/star/awt/XThrobber.hpp" +#include "com/sun/star/awt/XAnimation.hpp" #include "com/sun/star/awt/XTopWindow.hpp" #include "com/sun/star/awt/XVclWindowPeer.hpp" #include "com/sun/star/awt/XVclContainer.hpp" @@ -759,14 +759,14 @@ void UpdateHandler::loadStrings() void UpdateHandler::startThrobber( bool bStart ) { uno::Reference< awt::XControlContainer > xContainer( mxUpdDlg, uno::UNO_QUERY ); - uno::Reference< awt::XThrobber > xThrobber( xContainer->getControl( CTRL_THROBBER ), uno::UNO_QUERY ); + uno::Reference< awt::XAnimation > xThrobber( xContainer->getControl( CTRL_THROBBER ), uno::UNO_QUERY ); if ( xThrobber.is() ) { if ( bStart ) - xThrobber->start(); + xThrobber->startAnimation(); else - xThrobber->stop(); + xThrobber->stopAnimation(); } uno::Reference< awt::XWindow > xWindow( xContainer->getControl( CTRL_THROBBER ), uno::UNO_QUERY ); @@ -1084,8 +1084,8 @@ bool UpdateHandler::showOverwriteWarning() const #define EDIT_WIDTH ( DIALOG_WIDTH - 2 * DIALOG_BORDER ) #define BOX1_BTN_X ( DIALOG_BORDER + EDIT_WIDTH - BUTTON_WIDTH - INNER_BORDER ) #define BOX1_BTN_Y ( DIALOG_BORDER + LABEL_HEIGHT + INNER_BORDER) -#define THROBBER_WIDTH 14 -#define THROBBER_HEIGHT 14 +#define THROBBER_WIDTH 16 +#define THROBBER_HEIGHT 16 #define THROBBER_X_POS ( DIALOG_BORDER + 8 ) #define THROBBER_Y_POS ( DIALOG_BORDER + 23 ) #define BUTTON_BAR_HEIGHT 24 @@ -1372,7 +1372,7 @@ void UpdateHandler::createDialog() { // @see awt/UnoControlThrobberModel.idl uno::Sequence< beans::NamedValue > aProps; - insertControlModel( xControlModel, UNISTRING("com.sun.star.awt.UnoThrobberControlModel"), CTRL_THROBBER, + insertControlModel( xControlModel, UNISTRING("com.sun.star.awt.SpinningProgressControlModel"), CTRL_THROBBER, awt::Rectangle( THROBBER_X_POS, THROBBER_Y_POS, THROBBER_WIDTH, THROBBER_HEIGHT), aProps ); } diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 3456b58c778e..b0b5f684bcc0 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -123,7 +123,7 @@ public: virtual void MouseButtonDown( const MouseEvent& rMEvt ); virtual void Paint( const Rectangle& rRect ); void Resize(); - void Show( BOOL bVisible = TRUE, USHORT nFlags = SHOW_NOACTIVATE ); + void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = SHOW_NOACTIVATE ); void SetTipPosPixel( const Point& rTipPos ) { maTipPos = rTipPos; } void SetTitleAndText( const XubString& rTitle, const XubString& rText, const Image& rImage ); @@ -151,10 +151,10 @@ class UpdateCheckUI : public ::cppu::WeakImplHelper3 bool mbShowBubble; bool mbShowMenuIcon; bool mbBubbleChanged; - USHORT mnIconID; + sal_uInt16 mnIconID; private: - DECL_LINK( ClickHdl, USHORT* ); + DECL_LINK( ClickHdl, sal_uInt16* ); DECL_LINK( HighlightHdl, MenuBar::MenuBarButtonCallbackArg* ); DECL_LINK( WaitTimeOutHdl, Timer* ); DECL_LINK( TimeOutHdl, Timer* ); @@ -416,7 +416,7 @@ void UpdateCheckUI::AddMenuBarIcon( SystemWindow *pSysWin, bool bAddEventHdl ) mpBubbleWin = GetBubbleWindow(); if ( mpBubbleWin ) { - mpBubbleWin->Show( TRUE ); + mpBubbleWin->Show( sal_True ); maTimeoutTimer.Start(); } mbShowBubble = false; @@ -485,7 +485,7 @@ void UpdateCheckUI::setPropertyValue(const rtl::OUString& rPropertyName, if ( mbShowBubble ) Application::PostUserEvent( LINK( this, UpdateCheckUI, UserEventHdl ) ); else if ( mpBubbleWin ) - mpBubbleWin->Show( FALSE ); + mpBubbleWin->Show( sal_False ); } else if( rPropertyName.compareToAscii( PROPERTY_CLICK_HDL ) == 0 ) { uno::Reference< task::XJob > aJob; @@ -511,7 +511,7 @@ void UpdateCheckUI::setPropertyValue(const rtl::OUString& rPropertyName, throw beans::UnknownPropertyException(); if ( mbBubbleChanged && mpBubbleWin ) - mpBubbleWin->Show( FALSE ); + mpBubbleWin->Show( sal_False ); } //------------------------------------------------------------------------------ @@ -642,13 +642,13 @@ void UpdateCheckUI::RemoveBubbleWindow( bool bRemoveIcon ) } // ----------------------------------------------------------------------- -IMPL_LINK( UpdateCheckUI, ClickHdl, USHORT*, EMPTYARG ) +IMPL_LINK( UpdateCheckUI, ClickHdl, sal_uInt16*, EMPTYARG ) { vos::OGuard aGuard( Application::GetSolarMutex() ); maWaitTimer.Stop(); if ( mpBubbleWin ) - mpBubbleWin->Show( FALSE ); + mpBubbleWin->Show( sal_False ); if ( mrJob.is() ) { @@ -734,7 +734,7 @@ IMPL_LINK( UpdateCheckUI, UserEventHdl, UpdateCheckUI*, EMPTYARG ) // ----------------------------------------------------------------------- IMPL_LINK( UpdateCheckUI, WindowEventHdl, VclWindowEvent*, pEvent ) { - ULONG nEventID = pEvent->GetId(); + sal_uLong nEventID = pEvent->GetId(); if ( VCLEVENT_OBJECT_DYING == nEventID ) { @@ -927,11 +927,11 @@ void BubbleWindow::Paint( const Rectangle& ) //------------------------------------------------------------------------------ void BubbleWindow::MouseButtonDown( const MouseEvent& ) { - Show( FALSE ); + Show( sal_False ); } //------------------------------------------------------------------------------ -void BubbleWindow::Show( BOOL bVisible, USHORT nFlags ) +void BubbleWindow::Show( sal_Bool bVisible, sal_uInt16 nFlags ) { vos::OGuard aGuard( Application::GetSolarMutex() ); @@ -983,7 +983,7 @@ void BubbleWindow::Show( BOOL bVisible, USHORT nFlags ) void BubbleWindow::RecalcTextRects() { Size aTotalSize; - BOOL bFinished = FALSE; + sal_Bool bFinished = sal_False; Font aOldFont = GetFont(); Font aBoldFont = aOldFont; @@ -1015,7 +1015,7 @@ void BubbleWindow::RecalcTextRects() maMaxTextSize.Height() = maMaxTextSize.Height() * 3 / 2; } else - bFinished = TRUE; + bFinished = sal_True; } maTitleRect.Move( 2*BUBBLE_BORDER, BUBBLE_BORDER + TIP_HEIGHT ); maTextRect.Move( 2*BUBBLE_BORDER, BUBBLE_BORDER + TIP_HEIGHT + maTitleRect.GetHeight() + aBoldFont.GetHeight() * 3 / 4 ); diff --git a/extensions/source/xmlextract/xmxtrct.cxx b/extensions/source/xmlextract/xmxtrct.cxx index a50c1816bd02..8ffa0530700d 100644 --- a/extensions/source/xmlextract/xmxtrct.cxx +++ b/extensions/source/xmlextract/xmxtrct.cxx @@ -188,7 +188,7 @@ REF( NMSP_IO::XInputStream ) SAL_CALL XMLExtractor::extract( const REF( NMSP_IO: aCodec.Decompress( *xStream, *pMemStm ); aCodec.EndCompression(); - xRet = new ::utl::OInputStreamHelper( new SvLockBytes( pMemStm, TRUE ), 65535 ); + xRet = new ::utl::OInputStreamHelper( new SvLockBytes( pMemStm, sal_True ), 65535 ); } } } diff --git a/forms/qa/makefile.mk b/forms/qa/makefile.mk index afafcca427aa..693183d47e2d 100644 --- a/forms/qa/makefile.mk +++ b/forms/qa/makefile.mk @@ -37,15 +37,10 @@ PRJNAME = forms JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar ConnectivityTools.jar JAVAFILES := $(shell @$(FIND) org -name "*.java") \ $(shell @$(FIND) integration -name "*.java") -JAVACLASSFILES := $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(i:d)$/$(i:b).class) #----- make a jar from compiled files ------------------------------ -MAXLINELENGTH = 100000 - -#JARCLASSDIRS = JARTARGET = $(TARGET).jar -JARCOMPRESS = TRUE # --- Runner Settings ---------------------------------------------- @@ -66,14 +61,11 @@ ALL: ALLDEP .INCLUDE : target.mk -test: - echo $(SOLARBINDIR) - -show_targets: +show_targets: $(CLASSDIR)$/$(JARTARGET) +@$(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) complexlib.ShowTargets $(foreach,i,$(JAVAFILES) $(i:s/.\$///:s/.java//)) -run: - +$(COPY) integration$/forms$/*.props $(CLASSDIR)$/$(PACKAGE) && $(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -sce forms_all.sce +run: $(CLASSDIR)$/$(JARTARGET) + +$(COPY) integration$/forms$/*.props $(CLASSDIR) && $(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -sce forms_all.sce -run_%: - +$(COPY) integration$/forms$/*.props $(CLASSDIR)$/$(PACKAGE) && $(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -o integration.$(PRJNAME).$(@:s/run_//) +run_%: $(CLASSDIR)$/$(JARTARGET) + +$(COPY) integration$/forms$/*.props $(CLASSDIR) && $(AUGMENT_LIBRARY_PATH) java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -o integration.$(PRJNAME).$(@:s/run_//) diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index fcc4693fec22..69bde000d955 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -439,7 +439,7 @@ void SAL_CALL OButtonControl::disposing( const EventObject& _rSource ) throw( Ru void OButtonControl::actionPerformed(const ActionEvent& /*rEvent*/) throw ( ::com::sun::star::uno::RuntimeException) { // Asynchron fuer starutil::URL-Button - ULONG n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) ); + sal_uLong n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) ); { ::osl::MutexGuard aGuard( m_aMutex ); m_nClickEvent = n; diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx index 72d53e6a1b0c..641af4a20d64 100644 --- a/forms/source/component/Button.hxx +++ b/forms/source/component/Button.hxx @@ -127,7 +127,7 @@ class OButtonControl :public OButtonControl_BASE ,public OFormNavigationHelper { private: - ULONG m_nClickEvent; + sal_uLong m_nClickEvent; sal_Int16 m_nTargetUrlFeatureId; /// caches the value of the "Enabled" property of our model sal_Bool m_bEnabledByPropertyValue; diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 154ed4b00272..d7c56b293523 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1500,8 +1500,8 @@ Reference< XCloneable > SAL_CALL ODatabaseForm::createClone( ) throw (RuntimeEx //------------------------------------------------------------------------------ void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any* pOldValues, sal_Int32 nCount, sal_Bool bVetoable ) { - // same as in getFastPropertyValue(INT32) : if we're resetting currently don't fire any changes of the - // IsModified property from FALSE to TRUE, as this is only temporary 'til the reset is done + // same as in getFastPropertyValue(sal_Int32) : if we're resetting currently don't fire any changes of the + // IsModified property from sal_False to sal_True, as this is only temporary 'til the reset is done if (m_nResetsPending > 0) { // look for the PROPERTY_ID_ISMODIFIED diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index af506aa305d2..e18586fb309d 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -201,7 +201,7 @@ class ODatabaseForm :public OFormComponents // will be used as additional context information // when an exception is catched and forwarded to the listeners - INT32 m_nResetsPending; + sal_Int32 m_nResetsPending; // <overwritten_properties> sal_Int32 m_nPrivileges; sal_Bool m_bInsertOnly; diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index de2dda9ca388..984e9b324b30 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -920,7 +920,7 @@ void OControlModel::read(const Reference<stario::XObjectInputStream>& InStream) } // 2. Lesen des Versionsnummer - UINT16 nVersion = InStream->readShort(); + sal_uInt16 nVersion = InStream->readShort(); // 3. Lesen der allgemeinen Properties ::comphelper::operator>>( InStream, m_aName); @@ -1758,7 +1758,7 @@ void SAL_CALL OBoundControlModel::read( const Reference< stario::XObjectInputStr OControlModel::read(_rxInStream); osl::MutexGuard aGuard(m_aMutex); - UINT16 nVersion = _rxInStream->readShort(); (void)nVersion; + sal_uInt16 nVersion = _rxInStream->readShort(); (void)nVersion; ::comphelper::operator>>( _rxInStream, m_aControlSource); } @@ -2128,7 +2128,7 @@ sal_Bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm) m_xColumnUpdate = Reference< XColumnUpdate >( m_xField, UNO_QUERY ); m_xColumn = Reference< XColumn >( m_xField, UNO_QUERY ); - INT32 nNullableFlag = ColumnValue::NO_NULLS; + sal_Int32 nNullableFlag = ColumnValue::NO_NULLS; m_xField->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullableFlag; m_bRequired = (ColumnValue::NO_NULLS == nNullableFlag); // we're optimistic : in case of ColumnValue_NULLABLE_UNKNOWN we assume nullability .... diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 654a2e5a19b4..63195bf74af0 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -1199,7 +1199,7 @@ Any OFormattedModel::translateControlValueToExternalValue( ) const Any OFormattedModel::translateDbColumnToControlValue() { if ( m_bNumeric ) - m_aSaveValue <<= DBTypeConversion::getValue( m_xColumn, m_aNullDate, m_nKeyType ); // #100056# OJ + m_aSaveValue <<= DBTypeConversion::getValue( m_xColumn, m_aNullDate ); // #100056# OJ else m_aSaveValue <<= m_xColumn->getString(); diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx index 9c20de263d80..6094839a99b7 100644 --- a/forms/source/component/Hidden.cxx +++ b/forms/source/component/Hidden.cxx @@ -171,7 +171,7 @@ void SAL_CALL OHiddenModel::write(const Reference<XObjectOutputStream>& _rxOutSt void SAL_CALL OHiddenModel::read(const Reference<XObjectInputStream>& _rxInStream) throw(IOException, RuntimeException) { // Version - UINT16 nVersion = _rxInStream->readShort(); + sal_uInt16 nVersion = _rxInStream->readShort(); // Name DBG_ASSERT(nVersion != 1, "OHiddenModel::read : this version is obsolete !"); diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 3a7e05404d75..a2ad111a79b7 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -857,7 +857,7 @@ bool OImageControlControl::implInsertGraphics() implClearGraphics( sal_False ); sal_Bool bIsLink = sal_False; xController->getValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bIsLink; - // Force bIsLink to be TRUE if we're bound to a field. Though we initialized the file picker with IsLink=TRUE + // Force bIsLink to be sal_True if we're bound to a field. Though we initialized the file picker with IsLink=TRUE // in this case, and disabled the respective control, there might be picker implementations which do not // respect this, and return IsLink=FALSE here. In this case, "normalize" the flag. // #i112659# / 2010-08-26 / frank.schoenheit@oracle.com diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx index c4a1216ad76c..48a2499381a9 100644 --- a/forms/source/component/RadioButton.cxx +++ b/forms/source/component/RadioButton.cxx @@ -310,7 +310,7 @@ void SAL_CALL ORadioButtonModel::read(const Reference<XObjectInputStream>& _rxIn ::osl::MutexGuard aGuard(m_aMutex); // Version - UINT16 nVersion = _rxInStream->readShort(); + sal_uInt16 nVersion = _rxInStream->readShort(); ::rtl::OUString sReferenceValue; sal_Int16 nDefaultChecked( 0 ); diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx index 0c8b421008a3..dead24b09835 100644 --- a/forms/source/inc/FormComponent.hxx +++ b/forms/source/inc/FormComponent.hxx @@ -383,13 +383,13 @@ protected: const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rFactory, // factory to create the aggregate with const ::rtl::OUString& _rUnoControlModelTypeName, // service name of te model to aggregate const ::rtl::OUString& rDefault = ::rtl::OUString(), // service name of the default control - const sal_Bool _bSetDelegator = sal_True // set to FALSE if you want to call setDelegator later (after returning from this ctor) + const sal_Bool _bSetDelegator = sal_True // set to sal_False if you want to call setDelegator later (after returning from this ctor) ); OControlModel( const OControlModel* _pOriginal, // the original object to clone const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rFactory, // factory to create the aggregate with const sal_Bool _bCloneAggregate = sal_True, // should the aggregate of the original be cloned, too? - const sal_Bool _bSetDelegator = sal_True // set to FALSE if you want to call setDelegator later (after returning from this ctor) + const sal_Bool _bSetDelegator = sal_True // set to sal_False if you want to call setDelegator later (after returning from this ctor) ); virtual ~OControlModel(); @@ -710,8 +710,8 @@ protected: const ::rtl::OUString& _rUnoControlModelTypeName, // service name of te model to aggregate const ::rtl::OUString& _rDefault, // service name of the default control const sal_Bool _bCommitable, // is the control (model) commitable ? - const sal_Bool _bSupportExternalBinding, // set to TRUE if you want to support XBindableValue - const sal_Bool _bSupportsValidation // set to TRUE if you want to support XValidatable + const sal_Bool _bSupportExternalBinding, // set to sal_True if you want to support XBindableValue + const sal_Bool _bSupportsValidation // set to sal_True if you want to support XValidatable ); OBoundControlModel( const OBoundControlModel* _pOriginal, // the original object to clone diff --git a/forms/source/richtext/clipboarddispatcher.cxx b/forms/source/richtext/clipboarddispatcher.cxx index 97b2ec1cba84..1f021d9ad0ea 100644 --- a/forms/source/richtext/clipboarddispatcher.cxx +++ b/forms/source/richtext/clipboarddispatcher.cxx @@ -155,7 +155,7 @@ namespace frm { m_pClipListener = new TransferableClipboardListener( LINK( this, OPasteClipboardDispatcher, OnClipboardChanged ) ); m_pClipListener->acquire(); - m_pClipListener->AddRemoveListener( _rView.GetWindow(), TRUE ); + m_pClipListener->AddRemoveListener( _rView.GetWindow(), sal_True ); // initial state TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( _rView.GetWindow() ) ); @@ -189,7 +189,7 @@ namespace frm { OSL_ENSURE( getEditView() && getEditView()->GetWindow(), "OPasteClipboardDispatcher::disposing: EditView should not (yet) be disfunctional here!" ); if ( getEditView() && getEditView()->GetWindow() && m_pClipListener ) - m_pClipListener->AddRemoveListener( getEditView()->GetWindow(), FALSE ); + m_pClipListener->AddRemoveListener( getEditView()->GetWindow(), sal_False ); m_pClipListener->release(); m_pClipListener = NULL; diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index 7aac8918c877..8fa944ea943f 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -89,7 +89,7 @@ namespace frm m_pEngine->registerEngineStatusListener( this ); { - ULONG nViewControlWord = m_pView->GetControlWord(); + sal_uLong nViewControlWord = m_pView->GetControlWord(); nViewControlWord |= EV_CNTRL_AUTOSCROLL; m_pView->SetControlWord( nViewControlWord ); } @@ -236,7 +236,7 @@ namespace frm //-------------------------------------------------------------------- void RichTextControlImpl::normalizeScriptDependentAttribute( SvxScriptSetItem& _rScriptSetItem ) { - _rScriptSetItem.GetItemSet().Put( m_pView->GetAttribs(), FALSE ); + _rScriptSetItem.GetItemSet().Put( m_pView->GetAttribs(), sal_False ); const SfxPoolItem* pNormalizedItem = _rScriptSetItem.GetItemOfScript( getSelectedScriptType() ); WhichId nNormalizedWhichId = _rScriptSetItem.GetItemSet().GetPool()->GetWhich( _rScriptSetItem.Which() ); @@ -291,7 +291,7 @@ namespace frm //-------------------------------------------------------------------- void RichTextControlImpl::EditEngineStatusChanged( const EditStatus& _rStatus ) { - ULONG nStatusWord( _rStatus.GetStatusWord() ); + sal_uLong nStatusWord( _rStatus.GetStatusWord() ); if ( ( nStatusWord & EE_STAT_TEXTWIDTHCHANGED ) || ( nStatusWord & EE_STAT_TEXTHEIGHTCHANGED ) ) @@ -589,7 +589,7 @@ namespace frm } //-------------------------------------------------------------------- - void RichTextControlImpl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, ULONG /*_nFlags*/ ) + void RichTextControlImpl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong /*_nFlags*/ ) { // need to normalize the map mode of the device - every paint operation on any device needs // to use the same map mode @@ -643,7 +643,7 @@ namespace frm lcl_inflate( aPlayground, -aOnePixel.Width(), -aOnePixel.Height() ); // actually draw the content - m_pEngine->Draw( _pDev, aPlayground, Point(), TRUE ); + m_pEngine->Draw( _pDev, aPlayground, Point(), sal_True ); _pDev->Pop(); } diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx index 619766bbfc4e..52341905087f 100644 --- a/forms/source/richtext/richtextimplcontrol.hxx +++ b/forms/source/richtext/richtextimplcontrol.hxx @@ -152,7 +152,7 @@ namespace frm bool GetHideInactiveSelection() const; /// draws the control onto a given output device - void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, ULONG _nFlags ); + void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags ); /// handles command events arrived at the anti-impl control long HandleCommand( const CommandEvent& _rEvent ); diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index 46a77c6dd791..91c6100f1817 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -157,7 +157,7 @@ namespace frm { m_pEngine->SetModifyHdl( LINK( this, ORichTextModel, OnEngineContentModified ) ); - ULONG nEngineControlWord = m_pEngine->GetControlWord(); + sal_uLong nEngineControlWord = m_pEngine->GetControlWord(); nEngineControlWord = nEngineControlWord & ~EE_CNTRL_AUTOPAGESIZE; m_pEngine->SetControlWord( nEngineControlWord ); diff --git a/forms/source/richtext/richtextunowrapper.cxx b/forms/source/richtext/richtextunowrapper.cxx index 1d3f98467aa7..d08f04f5c0ae 100644 --- a/forms/source/richtext/richtextunowrapper.cxx +++ b/forms/source/richtext/richtextunowrapper.cxx @@ -118,8 +118,8 @@ namespace frm { // this means that the content of the EditEngine changed via the UNO API // to reflect this in the views, we need to update them - USHORT viewCount = m_rEngine.GetViewCount(); - for ( USHORT view = 0; view < viewCount; ++view ) + sal_uInt16 viewCount = m_rEngine.GetViewCount(); + for ( sal_uInt16 view = 0; view < viewCount; ++view ) { EditView* pView = m_rEngine.GetView( view ); if ( pView ) diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index 48d458288d40..ed2ca6aef521 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -83,7 +83,7 @@ namespace frm void RichTextControl::implInit( RichTextEngine* _pEngine, ITextAttributeListener* _pTextAttribListener, ITextSelectionListener* _pSelectionListener ) { m_pImpl = new RichTextControlImpl( this, _pEngine, _pTextAttribListener, _pSelectionListener ); - SetCompoundControl( TRUE ); + SetCompoundControl( sal_True ); } //-------------------------------------------------------------------- @@ -118,8 +118,8 @@ namespace frm if ( HasChildPathFocus() ) getView().HideCursor(); - BOOL bOldUpdateMode = getEngine().GetUpdateMode(); // TODO: guard? - getEngine().SetUpdateMode( FALSE ); + sal_Bool bOldUpdateMode = getEngine().GetUpdateMode(); // TODO: guard? + getEngine().SetUpdateMode( sal_False ); getView().SetAttribs( _rAttributesToApply ); @@ -320,7 +320,7 @@ namespace frm } //-------------------------------------------------------------------- - void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, ULONG _nFlags ) + void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags ) { m_pImpl->Draw( _pDev, _rPos, _rSize, _nFlags ); } diff --git a/forms/source/richtext/richtextvclcontrol.hxx b/forms/source/richtext/richtextvclcontrol.hxx index 54f59569984f..254665f9b873 100644 --- a/forms/source/richtext/richtextvclcontrol.hxx +++ b/forms/source/richtext/richtextvclcontrol.hxx @@ -115,7 +115,7 @@ namespace frm EditView& getView(); // Window overridables - virtual void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, ULONG _nFlags ); + virtual void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags ); protected: // Window overridables diff --git a/forms/source/richtext/richtextviewport.cxx b/forms/source/richtext/richtextviewport.cxx index ffeda61e6b0c..295f83248a9f 100644 --- a/forms/source/richtext/richtextviewport.cxx +++ b/forms/source/richtext/richtextviewport.cxx @@ -63,7 +63,7 @@ namespace frm { Control::GetFocus(); m_pView->SetSelectionMode( EE_SELMODE_STD ); - m_pView->ShowCursor( TRUE ); + m_pView->ShowCursor( sal_True ); } //-------------------------------------------------------------------- diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx index b56319f33dee..16b98bff7efa 100644 --- a/forms/source/richtext/rtattributehandler.cxx +++ b/forms/source/richtext/rtattributehandler.cxx @@ -122,7 +122,7 @@ namespace frm { SvxScriptSetItem aSetItem( (WhichId)getAttributeId(), *_rAttribs.GetPool() ); aSetItem.PutItemForScriptType( _nForScriptType, _rItem ); - _rAttribs.Put( aSetItem.GetItemSet(), FALSE ); + _rAttribs.Put( aSetItem.GetItemSet(), sal_False ); } //-------------------------------------------------------------------- @@ -276,7 +276,7 @@ namespace frm AttributeCheckState LineSpacingHandler::implGetCheckState( const SfxPoolItem& _rItem ) const { OSL_ENSURE( _rItem.ISA( SvxLineSpacingItem ), "LineSpacingHandler::implGetCheckState: invalid pool item!" ); - USHORT nLineSpace = static_cast< const SvxLineSpacingItem& >( _rItem ).GetPropLineSpace(); + sal_uInt16 nLineSpace = static_cast< const SvxLineSpacingItem& >( _rItem ).GetPropLineSpace(); return ( nLineSpace == m_nLineSpace ) ? eChecked : eUnchecked; } @@ -291,7 +291,7 @@ namespace frm if ( 100 == m_nLineSpace ) aLineSpacing.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF; else - aLineSpacing.SetPropLineSpace( (BYTE)m_nLineSpace ); + aLineSpacing.SetPropLineSpace( (sal_uInt8)m_nLineSpace ); _rNewAttribs.Put( aLineSpacing ); } @@ -399,7 +399,7 @@ namespace frm if ( pFontHeightItem ) { // by definition, the item should have the unit twip - ULONG nHeight = pFontHeightItem->GetHeight(); + sal_uLong nHeight = pFontHeightItem->GetHeight(); if ( _rAttribs.GetPool()->GetMetric( getWhich() ) != SFX_MAPUNIT_TWIP ) { nHeight = OutputDevice::LogicToLogic( @@ -427,7 +427,7 @@ namespace frm { // corect measurement units SfxMapUnit eItemMapUnit = pFontHeightItem->GetPropUnit(); (void)eItemMapUnit; - ULONG nHeight = pFontHeightItem->GetHeight(); + sal_uLong nHeight = pFontHeightItem->GetHeight(); if ( _rNewAttribs.GetPool()->GetMetric( getWhich() ) != SFX_MAPUNIT_TWIP ) { nHeight = OutputDevice::LogicToLogic( @@ -488,7 +488,7 @@ namespace frm // then we toggle the adjustment, too SvxAdjust eCurrentAdjustment = SVX_ADJUST_LEFT; const SfxPoolItem* pCurrentAdjustment = NULL; - if ( SFX_ITEM_ON == _rCurrentAttribs.GetItemState( EE_PARA_JUST, TRUE, &pCurrentAdjustment ) ) + if ( SFX_ITEM_ON == _rCurrentAttribs.GetItemState( EE_PARA_JUST, sal_True, &pCurrentAdjustment ) ) eCurrentAdjustment = static_cast< const SvxAdjustItem* >( pCurrentAdjustment )->GetAdjust(); if ( eCurrentAdjustment == m_eOppositeDefaultAdjustment ) diff --git a/forms/source/richtext/rtattributehandler.hxx b/forms/source/richtext/rtattributehandler.hxx index 4e15cbc44050..f15fd5d5c49b 100644 --- a/forms/source/richtext/rtattributehandler.hxx +++ b/forms/source/richtext/rtattributehandler.hxx @@ -146,7 +146,7 @@ namespace frm class LineSpacingHandler : public AttributeHandler { private: - USHORT m_nLineSpace; + sal_uInt16 m_nLineSpace; public: LineSpacingHandler( AttributeId _nAttributeId ); diff --git a/forms/source/richtext/rtattributes.hxx b/forms/source/richtext/rtattributes.hxx index 2506dbcb5186..29baa5b8d355 100644 --- a/forms/source/richtext/rtattributes.hxx +++ b/forms/source/richtext/rtattributes.hxx @@ -43,11 +43,11 @@ namespace frm /// the id of an attribute typedef sal_Int32 AttributeId; /// the "which id" of an item in an SfxItemSet - typedef USHORT WhichId; + typedef sal_uInt16 WhichId; /// a SFX slot id - typedef USHORT SfxSlotId; + typedef sal_uInt16 SfxSlotId; /// a script type - typedef USHORT ScriptType; + typedef sal_uInt16 ScriptType; //==================================================================== //= AttributeCheckState diff --git a/forms/source/richtext/specialdispatchers.cxx b/forms/source/richtext/specialdispatchers.cxx index 2540c9d797f2..c7f2005eb7df 100644 --- a/forms/source/richtext/specialdispatchers.cxx +++ b/forms/source/richtext/specialdispatchers.cxx @@ -80,10 +80,10 @@ namespace frm if ( !pEngine ) return; - USHORT nParagraphs = pEngine->GetParagraphCount(); + sal_uInt16 nParagraphs = pEngine->GetParagraphCount(); if ( nParagraphs ) { - USHORT nLastParaNumber = nParagraphs - 1; + sal_uInt16 nLastParaNumber = nParagraphs - 1; xub_StrLen nParaLen = pEngine->GetTextLen( nLastParaNumber ); getEditView()->SetSelection( ESelection( 0, 0, nLastParaNumber, nParaLen ) ); } diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx index d31727cff125..36b1f12eb6b2 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -300,7 +300,7 @@ namespace frm MouseSettings aMouseSettings = aSettings.GetMouseSettings(); aMouseSettings.SetButtonRepeat( 10 ); aSettings.SetMouseSettings( aMouseSettings ); - pNavBar->SetSettings( aSettings, TRUE ); + pNavBar->SetSettings( aSettings, sal_True ); // outta here return pPeer; diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index 128bc112adee..a24d07e28ba5 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -64,7 +64,7 @@ namespace frm || ( _nFeatureId == LID_RECORD_FILLER ); } - static String getLabelString( USHORT _nResId ) + static String getLabelString( sal_uInt16 _nResId ) { String sLabel = String::CreateFromAscii( " " ); sLabel += String( FRM_RES_STRING( _nResId ) ); @@ -195,9 +195,9 @@ namespace frm //--------------------------------------------------------------------- void NavigationToolBar::updateFeatureStates( ) { - for ( USHORT nPos = 0; nPos < m_pToolbar->GetItemCount(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < m_pToolbar->GetItemCount(); ++nPos ) { - USHORT nItemId = m_pToolbar->GetItemId( nPos ); + sal_uInt16 nItemId = m_pToolbar->GetItemId( nPos ); if ( ( nItemId == LID_RECORD_LABEL ) || ( nItemId == LID_RECORD_FILLER ) ) continue; @@ -209,7 +209,7 @@ namespace frm } //--------------------------------------------------------------------- - void NavigationToolBar::implEnableItem( USHORT _nItemId, bool _bEnabled ) + void NavigationToolBar::implEnableItem( sal_uInt16 _nItemId, bool _bEnabled ) { m_pToolbar->EnableItem( _nItemId, _bEnabled ); @@ -223,32 +223,32 @@ namespace frm //--------------------------------------------------------------------- void NavigationToolBar::enableFeature( sal_Int16 _nFeatureId, bool _bEnabled ) { - DBG_ASSERT( m_pToolbar->GetItemPos( (USHORT)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, + DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, "NavigationToolBar::enableFeature: invalid id!" ); - implEnableItem( (USHORT)_nFeatureId, _bEnabled ); + implEnableItem( (sal_uInt16)_nFeatureId, _bEnabled ); } //--------------------------------------------------------------------- void NavigationToolBar::checkFeature( sal_Int16 _nFeatureId, bool _bEnabled ) { - DBG_ASSERT( m_pToolbar->GetItemPos( (USHORT)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, + DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, "NavigationToolBar::checkFeature: invalid id!" ); - m_pToolbar->CheckItem( (USHORT)_nFeatureId, _bEnabled ); + m_pToolbar->CheckItem( (sal_uInt16)_nFeatureId, _bEnabled ); } //--------------------------------------------------------------------- void NavigationToolBar::setFeatureText( sal_Int16 _nFeatureId, const ::rtl::OUString& _rText ) { - DBG_ASSERT( m_pToolbar->GetItemPos( (USHORT)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, + DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND, "NavigationToolBar::checkFeature: invalid id!" ); - Window* pItemWindow = m_pToolbar->GetItemWindow( (USHORT)_nFeatureId ); + Window* pItemWindow = m_pToolbar->GetItemWindow( (sal_uInt16)_nFeatureId ); if ( pItemWindow ) pItemWindow->SetText( _rText ); else - m_pToolbar->SetItemText( (USHORT)_nFeatureId, _rText ); + m_pToolbar->SetItemText( (sal_uInt16)_nFeatureId, _rText ); } //--------------------------------------------------------------------- @@ -264,7 +264,7 @@ namespace frm struct FeatureDescription { - USHORT nId; + sal_uInt16 nId; bool bRepeat; bool bItemWindow; } aSupportedFeatures[] = @@ -331,7 +331,7 @@ namespace frm { pItemWindow = new FixedText( m_pToolbar, WB_VCENTER ); pItemWindow->SetBackground(); - pItemWindow->SetPaintTransparent(TRUE); + pItemWindow->SetPaintTransparent(sal_True); } m_aChildWins.push_back( pItemWindow ); @@ -369,16 +369,16 @@ namespace frm const bool bIsHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - const USHORT nItemCount = m_pToolbar->GetItemCount(); + const sal_uInt16 nItemCount = m_pToolbar->GetItemCount(); // collect the FormFeatures in the toolbar typedef ::std::vector< sal_Int16 > FormFeatures; FormFeatures aFormFeatures; aFormFeatures.reserve( nItemCount ); - for ( USHORT i=0; i<nItemCount; ++i ) + for ( sal_uInt16 i=0; i<nItemCount; ++i ) { - USHORT nId = m_pToolbar->GetItemId( i ); + sal_uInt16 nId = m_pToolbar->GetItemId( i ); if ( ( TOOLBOXITEM_BUTTON == m_pToolbar->GetItemType( i ) ) && !isArtificialItem( nId ) ) aFormFeatures.push_back( nId ); } @@ -429,13 +429,13 @@ namespace frm //--------------------------------------------------------------------- void NavigationToolBar::ShowFunctionGroup( FunctionGroup _eGroup, bool _bShow ) { - const USHORT* pGroupIds = NULL; + const sal_uInt16* pGroupIds = NULL; switch ( _eGroup ) { case ePosition: { - static const USHORT aPositionIds[] = { + static const sal_uInt16 aPositionIds[] = { LID_RECORD_LABEL, FormFeature::MoveAbsolute, LID_RECORD_FILLER, FormFeature::TotalRecords, 0 }; pGroupIds = aPositionIds; @@ -443,7 +443,7 @@ namespace frm break; case eNavigation: { - static const USHORT aNavigationIds[] = { + static const sal_uInt16 aNavigationIds[] = { FormFeature::MoveToFirst, FormFeature::MoveToPrevious, FormFeature::MoveToNext, FormFeature::MoveToLast, FormFeature::MoveToInsertRow, 0 }; pGroupIds = aNavigationIds; @@ -451,7 +451,7 @@ namespace frm break; case eRecordActions: { - static const USHORT aActionIds[] = { + static const sal_uInt16 aActionIds[] = { FormFeature::SaveRecordChanges, FormFeature::UndoRecordChanges, FormFeature::DeleteRecord, FormFeature::ReloadForm, FormFeature::RefreshCurrentControl, 0 }; pGroupIds = aActionIds; @@ -459,7 +459,7 @@ namespace frm break; case eFilterSort: { - static const USHORT aFilterSortIds[] = { + static const sal_uInt16 aFilterSortIds[] = { FormFeature::SortAscending, FormFeature::SortDescending, FormFeature::InteractiveSort, FormFeature::AutoFilter, FormFeature::InteractiveFilter, FormFeature::ToggleApplyFilter, FormFeature::RemoveFilterAndSort, 0 }; pGroupIds = aFilterSortIds; @@ -477,7 +477,7 @@ namespace frm //--------------------------------------------------------------------- bool NavigationToolBar::IsFunctionGroupVisible( FunctionGroup _eGroup ) { - USHORT nIndicatorItem = 0; + sal_uInt16 nIndicatorItem = 0; switch ( _eGroup ) { case ePosition : nIndicatorItem = LID_RECORD_LABEL; break; @@ -516,7 +516,7 @@ namespace frm case STATE_CHANGE_MIRRORING: { - BOOL bIsRTLEnabled( IsRTLEnabled() ); + sal_Bool bIsRTLEnabled( IsRTLEnabled() ); m_pToolbar->EnableRTL( bIsRTLEnabled ); forEachItemWindow( &NavigationToolBar::enableItemRTL, &bIsRTLEnabled ); Resize(); @@ -583,9 +583,9 @@ namespace frm //--------------------------------------------------------------------- void NavigationToolBar::forEachItemWindow( ItemWindowHandler _handler, const void* _pParam ) { - for ( USHORT item = 0; item < m_pToolbar->GetItemCount(); ++item ) + for ( sal_uInt16 item = 0; item < m_pToolbar->GetItemCount(); ++item ) { - USHORT nItemId = m_pToolbar->GetItemId( item ); + sal_uInt16 nItemId = m_pToolbar->GetItemId( item ); Window* pItemWindow = m_pToolbar->GetItemWindow( nItemId ); if ( pItemWindow ) (this->*_handler)( nItemId, pItemWindow, _pParam ); @@ -593,7 +593,7 @@ namespace frm } //--------------------------------------------------------------------- - void NavigationToolBar::setItemBackground( USHORT /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const + void NavigationToolBar::setItemBackground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const { if ( _pColor ) _pItemWindow->SetControlBackground( *static_cast< const Color* >( _pColor ) ); @@ -602,7 +602,7 @@ namespace frm } //--------------------------------------------------------------------- - void NavigationToolBar::setTextLineColor( USHORT /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const + void NavigationToolBar::setTextLineColor( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const { if ( _pColor ) _pItemWindow->SetTextLineColor( *static_cast< const Color* >( _pColor ) ); @@ -611,14 +611,14 @@ namespace frm } #if 0 //--------------------------------------------------------------------- - void NavigationToolBar::setItemWindowZoom( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const + void NavigationToolBar::setItemWindowZoom( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const { _pItemWindow->SetZoom( GetZoom() ); _pItemWindow->SetZoomedPointFont( IsControlFont() ? GetControlFont() : GetPointFont() ); } #endif //--------------------------------------------------------------------- - void NavigationToolBar::setItemControlFont( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const + void NavigationToolBar::setItemControlFont( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const { if ( IsControlFont() ) _pItemWindow->SetControlFont( GetControlFont() ); @@ -627,7 +627,7 @@ namespace frm } //--------------------------------------------------------------------- - void NavigationToolBar::setItemControlForeground( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const + void NavigationToolBar::setItemControlForeground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const { if ( IsControlForeground() ) _pItemWindow->SetControlForeground( GetControlForeground() ); @@ -637,7 +637,7 @@ namespace frm } //--------------------------------------------------------------------- - void NavigationToolBar::adjustItemWindowWidth( USHORT _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const + void NavigationToolBar::adjustItemWindowWidth( sal_uInt16 _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const { String sItemText; switch ( _nItemId ) @@ -667,9 +667,9 @@ namespace frm } //--------------------------------------------------------------------- - void NavigationToolBar::enableItemRTL( USHORT /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const + void NavigationToolBar::enableItemRTL( sal_uInt16 /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const { - _pItemWindow->EnableRTL( *static_cast< const BOOL* >( _pIsRTLEnabled ) ); + _pItemWindow->EnableRTL( *static_cast< const sal_Bool* >( _pIsRTLEnabled ) ); } //===================================================================== @@ -684,7 +684,7 @@ namespace frm SetFirst( 1 ); SetSpinSize( 1 ); SetDecimalDigits( 0 ); - SetStrictFormat( TRUE ); + SetStrictFormat( sal_True ); SetBorderStyle( WINDOW_BORDER_MONO ); } diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx index 5ace33765262..a6147a60b0e4 100644 --- a/forms/source/solar/inc/navtoolbar.hxx +++ b/forms/source/solar/inc/navtoolbar.hxx @@ -141,25 +141,25 @@ namespace frm void implUpdateImages(); /// enables or disables an item, plus possible dependent items - void implEnableItem( USHORT _nItemId, bool _bEnabled ); + void implEnableItem( sal_uInt16 _nItemId, bool _bEnabled ); /** update the states of all features, using the callback */ void updateFeatureStates( ); // iterating through item windows - typedef void (NavigationToolBar::*ItemWindowHandler) (USHORT, Window*, const void*) const; + typedef void (NavigationToolBar::*ItemWindowHandler) (sal_uInt16, Window*, const void*) const; void forEachItemWindow( ItemWindowHandler _handler, const void* _pParam ); - void setItemBackground( USHORT /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const; - void setTextLineColor( USHORT /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const; + void setItemBackground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const; + void setTextLineColor( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const; #if 0 - void setItemWindowZoom( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const; + void setItemWindowZoom( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const; #endif - void setItemControlFont( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const; - void setItemControlForeground( USHORT /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const; - void adjustItemWindowWidth( USHORT _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const; - void enableItemRTL( USHORT /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const; + void setItemControlFont( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const; + void setItemControlForeground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const; + void adjustItemWindowWidth( sal_uInt16 _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const; + void enableItemRTL( sal_uInt16 /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const; }; //===================================================================== diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx index 2fd6a93b614a..40b75bfda10b 100644 --- a/forms/source/xforms/xpathlib/xpathlib.cxx +++ b/forms/source/xforms/xpathlib/xpathlib.cxx @@ -327,7 +327,7 @@ static sal_Bool parseDateTime(const ::rtl::OUString& aString, DateTime& aDateTim sal_Int32 nMinute = aTimeString.getToken(0, ':', nIndex).toInt32(); sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32(); - Date tmpDate((USHORT)nDay, (USHORT)nMonth, (USHORT)nYear); + Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear); Time tmpTime(nHour, nMinute, nSecond); DateTime tmpDateTime(tmpDate, tmpTime); if (aString.indexOf(aUTCString) < 0) diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx index 5d040be72cb9..219e3758064e 100755 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx @@ -91,7 +91,7 @@ using namespace linguistic; Hyphenator::Hyphenator() : aEvtListeners ( GetLinguMutex() ) { - bDisposing = FALSE; + bDisposing = sal_False; pPropHelper = NULL; aDicts = NULL; numdict = 0; @@ -261,17 +261,17 @@ sal_Bool SAL_CALL Hyphenator::hasLocale(const Locale& rLocale) { MutexGuard aGuard( GetLinguMutex() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (!aSuppLocales.getLength()) getLocales(); const Locale *pLocale = aSuppLocales.getConstArray(); - INT32 nLen = aSuppLocales.getLength(); - for (INT32 i = 0; i < nLen; ++i) + sal_Int32 nLen = aSuppLocales.getLength(); + for (sal_Int32 i = 0; i < nLen; ++i) { if (rLocale == pLocale[i]) { - bRes = TRUE; + bRes = sal_True; break; } } @@ -422,12 +422,12 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const ::rtl::OUStri for (int c = n; c < wordlen; c++) hyphens[c] = '0'; hyphens[wordlen] = '\0'; - INT32 Leading = GetPosInWordToCheck( aWord, nMaxLeading ); + sal_Int32 Leading = GetPosInWordToCheck( aWord, nMaxLeading ); - for (INT32 i = 0; i < n; i++) + for (sal_Int32 i = 0; i < n; i++) { int leftrep = 0; - BOOL hit = (n >= minLen); + sal_Bool hit = (n >= minLen); if (!rep || !rep[i] || (i >= n)) { hit = hit && (hyphens[i]&1) && (i < Leading); @@ -503,17 +503,17 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const ::rtl::OUStri } // handle shortening - INT16 nPos = (INT16) ((nHyphenationPosAltHyph < nHyphenationPos) ? + sal_Int16 nPos = (sal_Int16) ((nHyphenationPosAltHyph < nHyphenationPos) ? nHyphenationPosAltHyph : nHyphenationPos); // dicretionary hyphenation xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ), nPos, aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph), - (INT16) nHyphenationPosAltHyph); + (sal_Int16) nHyphenationPosAltHyph); } else { xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ), - (INT16)nHyphenationPos, aWord, (INT16) nHyphenationPos); + (sal_Int16)nHyphenationPos, aWord, (sal_Int16) nHyphenationPos); } } @@ -684,8 +684,8 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const hyphens[wordlen] = '\0'; // fprintf(stderr,"... %s\n",hyphens); fflush(stderr); - INT16 nHyphCount = 0; - INT16 i; + sal_Int16 nHyphCount = 0; + sal_Int16 i; for ( i = 0; i < encWord.getLength(); i++) { @@ -693,8 +693,8 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const nHyphCount++; } - Sequence< INT16 > aHyphPos(nHyphCount); - INT16 *pPos = aHyphPos.getArray(); + Sequence< sal_Int16 > aHyphPos(nHyphCount); + sal_Int16 *pPos = aHyphPos.getArray(); OUStringBuffer hyphenatedWordBuffer; OUString hyphenatedWord; nHyphCount = 0; @@ -808,7 +808,7 @@ sal_Bool SAL_CALL Hyphenator::addLinguServiceEventListener( { MutexGuard aGuard( GetLinguMutex() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (!bDisposing && rxLstnr.is()) { bRes = GetPropHelper().addLinguServiceEventListener( rxLstnr ); @@ -823,7 +823,7 @@ sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener( { MutexGuard aGuard( GetLinguMutex() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (!bDisposing && rxLstnr.is()) { DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" ); @@ -848,7 +848,7 @@ void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments ) if (!pPropHelper) { - INT32 nLen = rArguments.getLength(); + sal_Int32 nLen = rArguments.getLength(); if (2 == nLen) { Reference< XPropertySet > xPropSet; @@ -878,7 +878,7 @@ void SAL_CALL Hyphenator::dispose() if (!bDisposing) { - bDisposing = TRUE; + bDisposing = sal_True; EventObject aEvtObj( (XHyphenator *) this ); aEvtListeners.disposeAndClear( aEvtObj ); } @@ -925,10 +925,10 @@ sal_Bool SAL_CALL Hyphenator::supportsService( const OUString& ServiceName ) Sequence< OUString > aSNL = getSupportedServiceNames(); const OUString * pArray = aSNL.getConstArray(); - for( INT32 i = 0; i < aSNL.getLength(); i++ ) + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) if( pArray[i] == ServiceName ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx index e20b4f58f589..6e350146ed9f 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx @@ -90,7 +90,7 @@ class Hyphenator : Reference< XPropertyChangeListener > xPropHelper; Reference< XMultiServiceFactory > rSMgr; linguistic::PropertyHelper_Hyphen * pPropHelper; - BOOL bDisposing; + sal_Bool bDisposing; // disallow copy-constructor and assignment-operator for now Hyphenator(const Hyphenator &); diff --git a/lingucomponent/source/lingutil/lingutil.hxx b/lingucomponent/source/lingutil/lingutil.hxx index 82d2e646edfc..6c53edfd9cf4 100644 --- a/lingucomponent/source/lingutil/lingutil.hxx +++ b/lingucomponent/source/lingutil/lingutil.hxx @@ -69,7 +69,7 @@ struct lt_rtl_OUString } }; -inline BOOL operator == ( const ::com::sun::star::lang::Locale &rL1, const ::com::sun::star::lang::Locale &rL2 ) +inline sal_Bool operator == ( const ::com::sun::star::lang::Locale &rL1, const ::com::sun::star::lang::Locale &rL2 ) { return rL1.Language == rL2.Language && rL1.Country == rL2.Country && diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx index 002f1dec0b36..9343ccb68d2b 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx @@ -98,7 +98,7 @@ MacSpellChecker::MacSpellChecker() : aDEncs = NULL; aDLocs = NULL; aDNames = NULL; - bDisposing = FALSE; + bDisposing = sal_False; pPropHelper = NULL; numdict = 0; NSApplicationLoad(); @@ -261,17 +261,17 @@ sal_Bool SAL_CALL MacSpellChecker::hasLocale(const Locale& rLocale) { MutexGuard aGuard( GetLinguMutex() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (!aSuppLocales.getLength()) getLocales(); - INT32 nLen = aSuppLocales.getLength(); - for (INT32 i = 0; i < nLen; ++i) + sal_Int32 nLen = aSuppLocales.getLength(); + for (sal_Int32 i = 0; i < nLen; ++i) { const Locale *pLocale = aSuppLocales.getConstArray(); if (rLocale == pLocale[i]) { - bRes = TRUE; + bRes = sal_True; break; } } @@ -279,7 +279,7 @@ sal_Bool SAL_CALL MacSpellChecker::hasLocale(const Locale& rLocale) } -INT16 MacSpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale ) +sal_Int16 MacSpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale ) { rtl_TextEncoding aEnc; @@ -287,7 +287,7 @@ INT16 MacSpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLo // (note: mutex is held higher up in isValid) - INT16 nRes = -1; + sal_Int16 nRes = -1; // first handle smart quotes both single and double OUStringBuffer rBuf(rWord); @@ -316,7 +316,7 @@ INT16 MacSpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLo } int aCount; - NSRange range = [macSpell checkSpellingOfString:aNSStr startingAt:0 language:aLang wrap:FALSE inSpellDocumentWithTag:macTag wordCount:&aCount]; + NSRange range = [macSpell checkSpellingOfString:aNSStr startingAt:0 language:aLang wrap:sal_False inSpellDocumentWithTag:macTag wordCount:&aCount]; int rVal = 0; if(range.length>0) { @@ -347,13 +347,13 @@ sal_Bool SAL_CALL MutexGuard aGuard( GetLinguMutex() ); if (rLocale == Locale() || !rWord.getLength()) - return TRUE; + return sal_True; if (!hasLocale( rLocale )) #ifdef LINGU_EXCEPTIONS throw( IllegalArgumentException() ); #else - return TRUE; + return sal_True; #endif // Get property values to be used. @@ -366,10 +366,10 @@ sal_Bool SAL_CALL PropertyHelper_Spell &rHelper = GetPropHelper(); rHelper.SetTmpPropVals( rProperties ); - INT16 nFailure = GetSpellFailure( rWord, rLocale ); + sal_Int16 nFailure = GetSpellFailure( rWord, rLocale ); if (nFailure != -1) { - INT16 nLang = LocaleToLanguage( rLocale ); + sal_Int16 nLang = LocaleToLanguage( rLocale ); // postprocess result for errors that should be ignored if ( (!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang )) || (!rHelper.IsSpellWithDigits() && HasDigits( rWord )) @@ -393,7 +393,7 @@ Reference< XSpellAlternatives > Reference< XSpellAlternatives > xRes; // note: mutex is held by higher up by spell which covers both - INT16 nLang = LocaleToLanguage( rLocale ); + sal_Int16 nLang = LocaleToLanguage( rLocale ); int count; Sequence< OUString > aStr( 0 ); @@ -496,7 +496,7 @@ sal_Bool SAL_CALL { MutexGuard aGuard( GetLinguMutex() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (!bDisposing && rxLstnr.is()) { bRes = GetPropHelper().addLinguServiceEventListener( rxLstnr ); @@ -512,7 +512,7 @@ sal_Bool SAL_CALL { MutexGuard aGuard( GetLinguMutex() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (!bDisposing && rxLstnr.is()) { DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" ); @@ -539,7 +539,7 @@ void SAL_CALL if (!pPropHelper) { - INT32 nLen = rArguments.getLength(); + sal_Int32 nLen = rArguments.getLength(); if (2 == nLen) { Reference< XPropertySet > xPropSet; @@ -569,7 +569,7 @@ void SAL_CALL if (!bDisposing) { - bDisposing = TRUE; + bDisposing = sal_True; EventObject aEvtObj( (XSpellChecker *) this ); aEvtListeners.disposeAndClear( aEvtObj ); } @@ -618,10 +618,10 @@ sal_Bool SAL_CALL MacSpellChecker::supportsService( const OUString& ServiceName Sequence< OUString > aSNL = getSupportedServiceNames(); const OUString * pArray = aSNL.getConstArray(); - for( INT32 i = 0; i < aSNL.getLength(); i++ ) + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) if( pArray[i] == ServiceName ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx index fc1906e18025..5384e5772169 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx @@ -87,7 +87,7 @@ class MacSpellChecker : ::cppu::OInterfaceContainerHelper aEvtListeners; Reference< XPropertyChangeListener > xPropHelper; linguistic::PropertyHelper_Spell * pPropHelper; - BOOL bDisposing; + sal_Bool bDisposing; // disallow copy-constructor and assignment-operator for now MacSpellChecker(const MacSpellChecker &); @@ -99,7 +99,7 @@ class MacSpellChecker : return pPropHelper ? *pPropHelper : GetPropHelper_Impl(); } - INT16 GetSpellFailure( const OUString &rWord, const Locale &rLocale ); + sal_Int16 GetSpellFailure( const OUString &rWord, const Locale &rLocale ); Reference< XSpellAlternatives > GetProposals( const OUString &rWord, const Locale &rLocale ); public: diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 577d105afcde..bd608ffda972 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -79,7 +79,7 @@ SpellChecker::SpellChecker() : aDEncs = NULL; aDLocs = NULL; aDNames = NULL; - bDisposing = FALSE; + bDisposing = sal_False; pPropHelper = NULL; numdict = 0; } @@ -255,17 +255,17 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale) { MutexGuard aGuard( GetLinguMutex() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (!aSuppLocales.getLength()) getLocales(); - INT32 nLen = aSuppLocales.getLength(); - for (INT32 i = 0; i < nLen; ++i) + sal_Int32 nLen = aSuppLocales.getLength(); + for (sal_Int32 i = 0; i < nLen; ++i) { const Locale *pLocale = aSuppLocales.getConstArray(); if (rLocale == pLocale[i]) { - bRes = TRUE; + bRes = sal_True; break; } } @@ -273,7 +273,7 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale) } -INT16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale ) +sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale ) { Hunspell * pMS = NULL; rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW; @@ -281,7 +281,7 @@ INT16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocal // initialize a myspell object for each dictionary once // (note: mutex is held higher up in isValid) - INT16 nRes = -1; + sal_Int16 nRes = -1; // first handle smart quotes both single and double OUStringBuffer rBuf(rWord); @@ -367,17 +367,17 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL MutexGuard aGuard( GetLinguMutex() ); if (rLocale == Locale() || !rWord.getLength()) - return TRUE; + return sal_True; if (!hasLocale( rLocale )) #ifdef LINGU_EXCEPTIONS throw( IllegalArgumentException() ); #else - return TRUE; + return sal_True; #endif - // return FALSE to process SPELLML requests (they are longer than the header) - if (rWord.match(A2OU(SPELLML_HEADER), 0) && (rWord.getLength() > 10)) return FALSE; + // return sal_False to process SPELLML requests (they are longer than the header) + if (rWord.match(A2OU(SPELLML_HEADER), 0) && (rWord.getLength() > 10)) return sal_False; // Get property values to be used. // These are be the default values set in the SN_LINGU_PROPERTIES @@ -389,10 +389,10 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL PropertyHelper_Spell &rHelper = GetPropHelper(); rHelper.SetTmpPropVals( rProperties ); - INT16 nFailure = GetSpellFailure( rWord, rLocale ); + sal_Int16 nFailure = GetSpellFailure( rWord, rLocale ); if (nFailure != -1 && !rWord.match(A2OU(SPELLML_HEADER), 0)) { - INT16 nLang = LocaleToLanguage( rLocale ); + sal_Int16 nLang = LocaleToLanguage( rLocale ); // postprocess result for errors that should be ignored const bool bIgnoreError = (!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang )) || @@ -437,7 +437,7 @@ Reference< XSpellAlternatives > if (n) { - INT16 nLang = LocaleToLanguage( rLocale ); + sal_Int16 nLang = LocaleToLanguage( rLocale ); Sequence< OUString > aStr( 0 ); @@ -529,7 +529,7 @@ sal_Bool SAL_CALL SpellChecker::addLinguServiceEventListener( { MutexGuard aGuard( GetLinguMutex() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (!bDisposing && rxLstnr.is()) { bRes = GetPropHelper().addLinguServiceEventListener( rxLstnr ); @@ -544,7 +544,7 @@ sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener( { MutexGuard aGuard( GetLinguMutex() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (!bDisposing && rxLstnr.is()) { DBG_ASSERT( xPropHelper.is(), "xPropHelper non existent" ); @@ -569,7 +569,7 @@ void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments ) if (!pPropHelper) { - INT32 nLen = rArguments.getLength(); + sal_Int32 nLen = rArguments.getLength(); if (2 == nLen) { Reference< XPropertySet > xPropSet; @@ -599,7 +599,7 @@ void SAL_CALL SpellChecker::dispose() if (!bDisposing) { - bDisposing = TRUE; + bDisposing = sal_True; EventObject aEvtObj( (XSpellChecker *) this ); aEvtListeners.disposeAndClear( aEvtObj ); } @@ -646,10 +646,10 @@ sal_Bool SAL_CALL SpellChecker::supportsService( const OUString& ServiceName ) Sequence< OUString > aSNL = getSupportedServiceNames(); const OUString * pArray = aSNL.getConstArray(); - for( INT32 i = 0; i < aSNL.getLength(); i++ ) + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) if( pArray[i] == ServiceName ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.hxx b/lingucomponent/source/spellcheck/spell/sspellimp.hxx index 9bcbdec5250b..8a42d98f0f60 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.hxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.hxx @@ -78,7 +78,7 @@ class SpellChecker : ::cppu::OInterfaceContainerHelper aEvtListeners; Reference< XPropertyChangeListener > xPropHelper; linguistic::PropertyHelper_Spell * pPropHelper; - BOOL bDisposing; + sal_Bool bDisposing; // disallow copy-constructor and assignment-operator for now SpellChecker(const SpellChecker &); @@ -90,7 +90,7 @@ class SpellChecker : return pPropHelper ? *pPropHelper : GetPropHelper_Impl(); } - INT16 GetSpellFailure( const OUString &rWord, const Locale &rLocale ); + sal_Int16 GetSpellFailure( const OUString &rWord, const Locale &rLocale ); Reference< XSpellAlternatives > GetProposals( const OUString &rWord, const Locale &rLocale ); public: diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.cxx b/lingucomponent/source/thesaurus/libnth/nthesdta.cxx index 0c071a4eeb1f..7d140438886a 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesdta.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesdta.cxx @@ -54,10 +54,10 @@ namespace linguistic Meaning::Meaning( #if 0 - const OUString &rTerm, INT16 nLang, + const OUString &rTerm, sal_Int16 nLang, const PropertyHelper_Thes &rHelper ) : #else - const OUString &rTerm, INT16 nLang) : + const OUString &rTerm, sal_Int16 nLang) : #endif aSyn ( Sequence< OUString >(1) ), diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx index 23804d54f60f..77f6473277db 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx +++ b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx @@ -48,11 +48,11 @@ class Meaning : { ::com::sun::star::uno::Sequence< ::rtl::OUString > aSyn; // list of synonyms, may be empty. ::rtl::OUString aTerm; - INT16 nLanguage; + sal_Int16 nLanguage; #if 0 // this is for future use by a German thesaurus - BOOL bIsGermanPreReform; + sal_Bool bIsGermanPreReform; #endif // disallow copy-constructor and assignment-operator for now @@ -61,9 +61,9 @@ class Meaning : public: #if 0 - Meaning(const ::rtl::OUString &rTerm, INT16 nLang, const PropertyHelper_Thes &rHelper); + Meaning(const ::rtl::OUString &rTerm, sal_Int16 nLang, const PropertyHelper_Thes &rHelper); #else - Meaning(const ::rtl::OUString &rTerm, INT16 nLang); + Meaning(const ::rtl::OUString &rTerm, sal_Int16 nLang); #endif virtual ~Meaning(); diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 02d469514593..efbe43359474 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -93,7 +93,7 @@ static uno::Reference< XLinguServiceManager > GetLngSvcMgr_Impl() Thesaurus::Thesaurus() : aEvtListeners ( GetLinguMutex() ) { - bDisposing = FALSE; + bDisposing = sal_False; pPropHelper = NULL; aThes = NULL; aCharSetInfo = NULL; @@ -289,16 +289,16 @@ sal_Bool SAL_CALL Thesaurus::hasLocale(const Locale& rLocale) { MutexGuard aGuard( GetLinguMutex() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; if (!aSuppLocales.getLength()) getLocales(); - INT32 nLen = aSuppLocales.getLength(); - for (INT32 i = 0; i < nLen; ++i) + sal_Int32 nLen = aSuppLocales.getLength(); + for (sal_Int32 i = 0; i < nLen; ++i) { const Locale *pLocale = aSuppLocales.getConstArray(); if (rLocale == pLocale[i]) { - bRes = TRUE; + bRes = sal_True; break; } } @@ -324,7 +324,7 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes sal_Int32 stem = 0; sal_Int32 stem2 = 0; - INT16 nLanguage = LocaleToLanguage( rLocale ); + sal_Int16 nLanguage = LocaleToLanguage( rLocale ); if (nLanguage == LANGUAGE_NONE || !rTerm.getLength()) return noMeanings; @@ -591,7 +591,7 @@ void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments ) if (!pPropHelper) { - INT32 nLen = rArguments.getLength(); + sal_Int32 nLen = rArguments.getLength(); if (1 == nLen) { Reference< XPropertySet > xPropSet; @@ -619,7 +619,7 @@ sal_uInt16 SAL_CALL Thesaurus::capitalType(const OUString& aTerm, CharClass * pC { String aStr(aTerm); sal_Int32 nc = 0; - for (USHORT tindex = 0; tindex < tlen; tindex++) + for (sal_uInt16 tindex = 0; tindex < tlen; tindex++) { if (pCC->getCharacterType(aStr,tindex) & ::com::sun::star::i18n::KCharacterType::UPPER) nc++; @@ -682,7 +682,7 @@ void SAL_CALL Thesaurus::dispose() if (!bDisposing) { - bDisposing = TRUE; + bDisposing = sal_True; EventObject aEvtObj( (XThesaurus *) this ); aEvtListeners.disposeAndClear( aEvtObj ); } @@ -728,10 +728,10 @@ sal_Bool SAL_CALL Thesaurus::supportsService( const OUString& ServiceName ) Sequence< OUString > aSNL = getSupportedServiceNames(); const OUString * pArray = aSNL.getConstArray(); - for( INT32 i = 0; i < aSNL.getLength(); i++ ) + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) if( pArray[i] == ServiceName ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx index e6d447879701..b0595ad4286c 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx @@ -87,7 +87,7 @@ class Thesaurus : ::cppu::OInterfaceContainerHelper aEvtListeners; Reference< XPropertyChangeListener > xPropHelper; linguistic::PropertyHelper_Thes * pPropHelper; - BOOL bDisposing; + sal_Bool bDisposing; CharClass ** aCharSetInfo; MyThes ** aThes; rtl_TextEncoding * aTEncs; @@ -98,7 +98,7 @@ class Thesaurus : // cache for the Thesaurus dialog Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > prevMeanings; OUString prevTerm; - INT16 prevLocale; + sal_Int16 prevLocale; // disallow copy-constructor and assignment-operator for now Thesaurus(const Thesaurus &); diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index f01b7ce06f4b..dcd5669897e3 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -836,13 +836,18 @@ sal_Int32 ZipFile::recover() aGrabber.seek( 0 ); - for( sal_Int32 nGenPos = 0; aGrabber.readBytes( aBuffer, 32000 ) && aBuffer.getLength() > 30; ) + const sal_Int32 nToRead = 32000; + for( sal_Int32 nGenPos = 0; aGrabber.readBytes( aBuffer, nToRead ) && aBuffer.getLength() > 16; ) { const sal_Int8 *pBuffer = aBuffer.getConstArray(); sal_Int32 nBufSize = aBuffer.getLength(); sal_Int32 nPos = 0; - while( nPos < nBufSize - 16 ) + // the buffer should contain at least one header, + // or if it is end of the file, at least the postheader with sizes and hash + while( nPos < nBufSize - 30 + || ( aBuffer.getLength() < nToRead && nPos < nBufSize - 16 ) ) + { if ( nPos < nBufSize - 30 && pBuffer[nPos] == 'P' && pBuffer[nPos+1] == 'K' && pBuffer[nPos+2] == 3 && pBuffer[nPos+3] == 4 ) { diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java index 422f4c8134f9..2d7174bdb69f 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java +++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java @@ -58,6 +58,7 @@ import com.sun.star.wizards.common.FileAccess; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.NumberFormatter; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.document.OfficeDocument; import com.sun.star.wizards.text.TextDocument; import com.sun.star.wizards.text.TextSectionHandler; @@ -633,7 +634,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data TextEvent te = (TextEvent) param; String controlName = (String) Helper.getUnoPropertyValue( UnoDialog2.getModel(te.Source), - "Name"); + PropertyNames.PROPERTY_NAME); redrawTitle(controlName); } diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java index 86567277da1d..219125b64bd2 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java +++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.java @@ -26,7 +26,6 @@ ************************************************************************/ package com.sun.star.wizards.agenda; -import com.sun.star.wizards.common.HelpIds; import com.sun.star.awt.FontDescriptor; import com.sun.star.awt.XButton; import com.sun.star.awt.XCheckBox; @@ -39,6 +38,7 @@ import com.sun.star.awt.XTextComponent; import com.sun.star.awt.XTimeField; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.WizardDialog; @@ -116,14 +116,14 @@ public abstract class AgendaWizardDialog extends WizardDialog implements Agenda //Resources Object AgendaWizardDialogResources resources; - private String[] PROPS_LIST = new String[] {"Dropdown", "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width"}; - private String[] PROPS_LABEL_B = new String[] {"FontDescriptor", "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width"}; - private String[] PROPS_CHECK = new String[] {"Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width"}; - private String[] PROPS_BUTTON = new String[] {"Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width"}; - private String[] PROPS_X = new String[] {"Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width"}; - private String[] PROPS_TEXTAREA = new String[] {"Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width"}; - private String[] PROPS_TEXT = new String[] {"Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width"}; - private String[] PROPS_IMAGE = new String[] {"Border", "Height", "HelpURL", "ImageURL", "PositionX", "PositionY", "ScaleImage", "Step", "TabIndex", "Width"}; + private String[] PROPS_LIST = new String[] {"Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; + private String[] PROPS_LABEL_B = new String[] {"FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; + private String[] PROPS_CHECK = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; + private String[] PROPS_BUTTON = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; + private String[] PROPS_X = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; + private String[] PROPS_TEXTAREA = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; + private String[] PROPS_TEXT = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; + private String[] PROPS_IMAGE = new String[] {"Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}; private static final Short NO_BORDER = new Short((short)0); @@ -134,7 +134,7 @@ public abstract class AgendaWizardDialog extends WizardDialog implements Agenda //set dialog properties... Helper.setUnoPropertyValues(xDialogModel, - new String[] { "Closeable","Height","Moveable","PositionX","PositionY","Step","TabIndex","Title","Width"}, + new String[] { "Closeable",PropertyNames.PROPERTY_HEIGHT,"Moveable",PropertyNames.PROPERTY_POSITION_X,PropertyNames.PROPERTY_POSITION_Y,PropertyNames.PROPERTY_STEP,PropertyNames.PROPERTY_TABINDEX,"Title",PropertyNames.PROPERTY_WIDTH}, new Object[] { Boolean.TRUE,new Integer(210),Boolean.TRUE,new Integer(200),new Integer(52),INTEGERS[1],new Short((short)1),resources.resAgendaWizardDialog_title,new Integer(310)} ); @@ -192,7 +192,7 @@ public abstract class AgendaWizardDialog extends WizardDialog implements Agenda new Object[] { INTEGERS[8],resources.reslblTime_value,new Integer(97),new Integer(50),INTEGERS[2],new Short((short)203),new Integer(66)} ); txtTime = insertTimeField("txtTime", null, - new String[] {"Height", "HelpURL", "PositionX", "PositionY", "Step", "StrictFormat", "TabIndex", "Width"}, + new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}, new Object[] { INTEGER_12,TXTTIME_HID,new Integer(166),new Integer(48),INTEGERS[2],Boolean.TRUE,new Short((short)204),new Integer(70)} ); @@ -201,7 +201,7 @@ public abstract class AgendaWizardDialog extends WizardDialog implements Agenda new Object[] { INTEGERS[8],resources.reslblTitle_value,new Integer(97),new Integer(68),INTEGERS[2],new Short((short)205),new Integer(66)} ); txtTitle = insertTextField("txtTitle", null, - new String[] {"Height", "HelpURL", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width"}, + new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}, new Object[] { new Integer(26),TXTTITLE_HID,Boolean.TRUE,new Integer(166),new Integer(66),INTEGERS[2],new Short((short)206),new Integer(138)} ); lblLocation = insertLabel("lblLocation", @@ -209,7 +209,7 @@ public abstract class AgendaWizardDialog extends WizardDialog implements Agenda new Object[] { INTEGERS[8],resources.reslblLocation_value,new Integer(97),new Integer(100),INTEGERS[2],new Short((short)207),new Integer(66)} ); cbLocation = insertTextField("cbLocation", null,null, - new String[] { "Height", "HelpURL", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width"}, + new String[] { PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}, new Object[] { new Integer(34),CBLOCATION_HID,Boolean.TRUE,new Integer(166),new Integer(98),INTEGERS[2],new Short((short)208),new Integer(138)} ); diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.java b/wizards/com/sun/star/wizards/agenda/TopicsControl.java index 3cd1e550e874..0e3678139378 100644 --- a/wizards/com/sun/star/wizards/agenda/TopicsControl.java +++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.java @@ -45,6 +45,7 @@ import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.ControlScroller; import com.sun.star.wizards.ui.UnoDialog2; import com.sun.star.wizards.ui.event.EventNames; @@ -328,7 +329,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener try { //calculate in which row we are... - String name = (String) Helper.getUnoPropertyValue(UnoDialog2.getModel(control), "Name"); + String name = (String) Helper.getUnoPropertyValue(UnoDialog2.getModel(control), PropertyNames.PROPERTY_NAME); int i = name.indexOf("_"); String num = name.substring(i + 1); lastFocusRow = Integer.valueOf(num).intValue() + nscrollvalue; @@ -943,7 +944,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener */ private int getColumn(Object control) { - String name = (String) Helper.getUnoPropertyValue(UnoDialog2.getModel(control), "Name"); + String name = (String) Helper.getUnoPropertyValue(UnoDialog2.getModel(control), PropertyNames.PROPERTY_NAME); if (name.startsWith(TOPIC)) { return 1; @@ -1047,14 +1048,14 @@ public class TopicsControl extends ControlScroller implements XFocusListener */ private static final String[] LABEL_PROPS = new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; /** * A static member used for the child-class ControlRow (GUI Constant) */ private static final String[] TEXT_PROPS = new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; /** diff --git a/wizards/com/sun/star/wizards/common/Configuration.java b/wizards/com/sun/star/wizards/common/Configuration.java index cbe724335cf8..04dd385ddf60 100644 --- a/wizards/com/sun/star/wizards/common/Configuration.java +++ b/wizards/com/sun/star/wizards/common/Configuration.java @@ -334,7 +334,7 @@ public abstract class Configuration public static String[] getNodeDisplayNames(XNameAccess _xNameAccessNode) { String[] snames = null; - return getNodeChildNames(_xNameAccessNode, "Name"); + return getNodeChildNames(_xNameAccessNode, PropertyNames.PROPERTY_NAME); } public static String[] getNodeChildNames(XNameAccess xNameAccessNode, String _schildname) @@ -400,7 +400,7 @@ public abstract class Configuration public static XNameAccess getChildNodebyDisplayName(XNameAccess _xNameAccessNode, String _displayname) { String[] snames = null; - return getChildNodebyDisplayName(_xNameAccessNode, _displayname, "Name"); + return getChildNodebyDisplayName(_xNameAccessNode, _displayname, PropertyNames.PROPERTY_NAME); } public static XNameAccess getChildNodebyDisplayName(XNameAccess _xNameAccessNode, String _displayname, String _nodename) diff --git a/wizards/com/sun/star/wizards/common/PropertyNames.java b/wizards/com/sun/star/wizards/common/PropertyNames.java new file mode 100644 index 000000000000..791f1da3a2fe --- /dev/null +++ b/wizards/com/sun/star/wizards/common/PropertyNames.java @@ -0,0 +1,49 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ +package com.sun.star.wizards.common; + +/** + * + * @author Ocke Janssen + */ +public class PropertyNames +{ + + public static String PROPERTY_ENABLED = "Enabled"; + public static String PROPERTY_HEIGHT = "Height"; + public static String PROPERTY_HELPURL = "HelpURL"; + public static String PROPERTY_POSITION_X = "PositionX"; + public static String PROPERTY_POSITION_Y = "PositionY"; + public static String PROPERTY_LABEL = "Label"; + public static String PROPERTY_MULTILINE = "MultiLine"; + public static String PROPERTY_NAME = "Name"; + public static String PROPERTY_STEP = "Step"; + public static String PROPERTY_WIDTH = "Width"; + public static String PROPERTY_TABINDEX = "TabIndex"; + public static String PROPERTY_STATE = "State"; + public static String PROPERTY_IMAGEURL = "ImageURL"; +} diff --git a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java index 204ba2328321..a3ff8c12b712 100644 --- a/wizards/com/sun/star/wizards/db/ColumnPropertySet.java +++ b/wizards/com/sun/star/wizards/db/ColumnPropertySet.java @@ -31,6 +31,7 @@ import com.sun.star.beans.PropertyValue; import com.sun.star.beans.XPropertySet; import com.sun.star.sdbc.DataType; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; // import com.sun.star.wizards.db.TypeInspector; public class ColumnPropertySet @@ -89,9 +90,9 @@ public class ColumnPropertySet for (int i = 0; i < _aNewColPropertyValues.length; i++) { String sPropName = _aNewColPropertyValues[i].Name; - if (_sNewName != null && sPropName.equals("Name")) + if (_sNewName != null && sPropName.equals(PropertyNames.PROPERTY_NAME)) { - xPropertySet.setPropertyValue("Name", _sNewName); + xPropertySet.setPropertyValue(PropertyNames.PROPERTY_NAME, _sNewName); } else if (sPropName.equals("Precision")) { @@ -170,12 +171,12 @@ public class ColumnPropertySet nType = ((Integer) _oValue).intValue(); xPropertySet.setPropertyValue("Type", new Integer(nType)); } - else if (_spropname.equals("Name")) + else if (_spropname.equals(PropertyNames.PROPERTY_NAME)) { String sName = (String) _oValue; if (!sName.equals("")) { - xPropertySet.setPropertyValue("Name", sName); + xPropertySet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); } } else if (_spropname.equals("Scale")) diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index 323ded34385a..5a151937d73f 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -83,6 +83,7 @@ import com.sun.star.wizards.common.Properties; import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.common.SystemDialog; import com.sun.star.uno.Any; +import com.sun.star.wizards.common.PropertyNames; import java.util.Vector; import java.util.logging.Level; import java.util.logging.Logger; @@ -102,7 +103,7 @@ public class DBMetaData public int[] CommandTypes; public String DataSourceName; public com.sun.star.sdbc.XConnection DBConnection; - public com.sun.star.sdb.tools.XConnectionTools ConnectionTools; + private com.sun.star.sdb.tools.XConnectionTools m_connectionTools; public com.sun.star.lang.XMultiServiceFactory xMSF; public XComponent xConnectionComponent; @@ -611,7 +612,7 @@ public class DBMetaData XPropertySet xPSet = UnoRuntime.queryInterface( XPropertySet.class, m_dataSource ); if (xPSet != null) { - DataSourceName = AnyConverter.toString(xPSet.getPropertyValue("Name")); + DataSourceName = AnyConverter.toString(xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME)); } return getConnection(xConnection); } @@ -677,7 +678,7 @@ public class DBMetaData try { this.DBConnection = _DBConnection; - this.ConnectionTools = UnoRuntime.queryInterface( XConnectionTools.class, this.DBConnection ); + this.m_connectionTools = UnoRuntime.queryInterface( XConnectionTools.class, this.DBConnection ); getDataSourceObjects(); return true; } @@ -740,7 +741,7 @@ public class DBMetaData else { xConnectionComponent = UnoRuntime.queryInterface( XComponent.class, DBConnection ); - ConnectionTools = UnoRuntime.queryInterface( XConnectionTools.class, DBConnection ); + m_connectionTools = UnoRuntime.queryInterface( XConnectionTools.class, DBConnection ); getDataSourceObjects(); } return bgetConnection; @@ -825,6 +826,16 @@ public class DBMetaData return false; } + public boolean supportsQueriesInFrom() + { + return m_connectionTools.getDataSourceMetaData().supportsQueriesInFrom(); + } + + public String suggestName( final int i_objectType, final String i_baseName ) throws IllegalArgumentException + { + return m_connectionTools.getObjectNames().suggestName( i_objectType, i_baseName ); + } + /** * inserts a Query to a datasource; There is no validation if the queryname is already existing in the datasource * @param oQuery @@ -844,7 +855,7 @@ public class DBMetaData xPSet.setPropertyValue("Command", s); XNameContainer xNameCont = UnoRuntime.queryInterface( XNameContainer.class, xQueryDefs ); - ConnectionTools.getObjectNames().checkNameForCreate(com.sun.star.sdb.CommandType.QUERY, _QueryName); + m_connectionTools.getObjectNames().checkNameForCreate(com.sun.star.sdb.CommandType.QUERY, _QueryName); xNameCont.insertByName(_QueryName, oQuery); return true; } @@ -937,7 +948,7 @@ public class DBMetaData xCloseable.close(false); NamedValueCollection creationArgs = new NamedValueCollection(); - creationArgs.put( "Name", basename ); + creationArgs.put( PropertyNames.PROPERTY_NAME, basename ); creationArgs.put( "URL", documentURL ); creationArgs.put( "AsTemplate", i_createTemplate ); XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface( XMultiServiceFactory.class, _xDocNameAccess ); @@ -1080,7 +1091,7 @@ public class DBMetaData } catch (com.sun.star.uno.Exception ex) { - ex.printStackTrace(); + Logger.getLogger( getClass().getName() ).log( Level.SEVERE, "error calling the error dialog", ex ); } } @@ -1095,7 +1106,7 @@ public class DBMetaData xDataSourcePropertySet = null; xWindowPeer = null; DBConnection = null; - ConnectionTools = null; + m_connectionTools = null; xMSF = null; xConnectionComponent = null; CommandObjects = null; diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index 235da2d7c04a..461a256ce1c3 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -183,7 +183,7 @@ public class SQLQueryComposer try { XPropertySet xColumnPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xColumnIndexAccess.getByIndex(i)); - String sName = (String) xColumnPropertySet.getPropertyValue("Name"); + String sName = (String) xColumnPropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME); if (JavaTools.FieldInTable(CurDBMetaData.getSortFieldNames(), sName) == -1) { boolean bascend = AnyConverter.toBoolean(xColumnPropertySet.getPropertyValue("IsAscending")); diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java index 8e3b740417c4..c7f728648467 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -57,6 +57,7 @@ import com.sun.star.uno.AnyConverter; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; public class TableDescriptor extends CommandMetaData implements XContainerListener { @@ -169,7 +170,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen for (int i = 0; i < _fieldnames.length; i++) { XPropertySet xKeyColPropertySet = xKeyColFac.createDataDescriptor(); - xKeyColPropertySet.setPropertyValue("Name", _fieldnames[i]); + xKeyColPropertySet.setPropertyValue(PropertyNames.PROPERTY_NAME, _fieldnames[i]); keycolumncontainer.add(xKeyColPropertySet); XPropertySet xColPropertySet = null; if (hasByName(_fieldnames[i])) @@ -221,7 +222,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { try { - String sColumnName = (String) AnyConverter.toString(_xToBeAppendedPropertySet.getPropertyValue("Name")); + String sColumnName = (String) AnyConverter.toString(_xToBeAppendedPropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME)); if (_xColumns.hasByName(sColumnName)) { String sMessage = JavaTools.replaceSubString(sColumnAlreadyExistsMessage, sColumnName, "%FIELDNAME"); @@ -265,7 +266,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen } if (breturn) { - assignTableProperty("Name", _tablename); + assignTableProperty(PropertyNames.PROPERTY_NAME, _tablename); assignTableProperty("CatalogName", _catalogname); assignTableProperty("SchemaName", _schemaname); xTableContainer = (XContainer) UnoRuntime.queryInterface(XContainer.class, getTableNamesAsNameAccess()); @@ -318,7 +319,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { try { - xPropTableDataDescriptor.setPropertyValue("Name", ""); + xPropTableDataDescriptor.setPropertyValue(PropertyNames.PROPERTY_NAME, ""); if ((xKeyDrop != null) && (xIndexAccessKeys != null)) { int icount = xIndexAccessKeys.getCount(); @@ -391,7 +392,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { try { - return modifyColumn(_soldname, "Name", _snewname); + return modifyColumn(_soldname, PropertyNames.PROPERTY_NAME, _snewname); } catch (Exception e) { @@ -413,7 +414,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen if (oColumnDescriptor.Name.equals(_sname)) { oColumnDescriptor.xColPropertySet.setPropertyValue(_spropname, _oValue); - if (_spropname.equals("Name")) + if (_spropname.equals(PropertyNames.PROPERTY_NAME)) { oColumnDescriptor.Name = (String) _oValue; } @@ -455,7 +456,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen if (oColumnDescriptor.Name.equals(_sname)) { oColumnDescriptor.xColPropertySet = _xColPropertySet; - oColumnDescriptor.Name = (String) _xColPropertySet.getPropertyValue("Name"); + oColumnDescriptor.Name = (String) _xColPropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME); columncontainer.remove(i); columncontainer.insertElementAt(oColumnDescriptor, i); return true; @@ -624,7 +625,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { try { - String sname = (String) Properties.getPropertyValue(_aNewPropertyValues, "Name"); + String sname = (String) Properties.getPropertyValue(_aNewPropertyValues, PropertyNames.PROPERTY_NAME); if (!hasByName(sname)) { ColumnPropertySet oPropertySet = new ColumnPropertySet(oTypeInspector, xColumnDataDescriptorFactory.createDataDescriptor()); @@ -694,7 +695,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen { XPropertySet xColPropertySet = xColumnDataDescriptorFactory.createDataDescriptor(); IDFieldName = Desktop.getUniqueName(getColumnNames(), _columnname, ""); - xColPropertySet.setPropertyValue("Name", IDFieldName); + xColPropertySet.setPropertyValue(PropertyNames.PROPERTY_NAME, IDFieldName); int nDataType = oTypeInspector.convertDataType(com.sun.star.sdbc.DataType.INTEGER); xColPropertySet.setPropertyValue("Type", new Integer(nDataType)); @@ -777,7 +778,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen try { XPropertySet xTablePropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, arg0.Element); - String stablename = AnyConverter.toString(xTablePropertySet.getPropertyValue("Name")); + String stablename = AnyConverter.toString(xTablePropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME)); String sschemaname = AnyConverter.toString(xPropTableDataDescriptor.getPropertyValue("SchemaName")); String scatalogname = AnyConverter.toString(xPropTableDataDescriptor.getPropertyValue("CatalogName")); ComposedTableName = new CommandName(this, scatalogname, sschemaname, stablename, false); diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java index fb4191277b8c..96485cdf84ce 100644 --- a/wizards/com/sun/star/wizards/document/Control.java +++ b/wizards/com/sun/star/wizards/document/Control.java @@ -133,7 +133,7 @@ public class Control extends Shape { XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xFormName); String sControlName = Desktop.getUniqueName(xNameAccess, getControlName(_fieldname)); - xPropertySet.setPropertyValue("Name", sControlName); + xPropertySet.setPropertyValue(PropertyNames.PROPERTY_NAME, sControlName); xFormName.insertByName(sControlName, xControlModel); } } @@ -248,9 +248,9 @@ public class Control extends Shape { xPropertySet.setPropertyValue("Text", sText); } - else if (xPropertySet.getPropertySetInfo().hasPropertyByName("Label")) + else if (xPropertySet.getPropertySetInfo().hasPropertyByName(PropertyNames.PROPERTY_LABEL)) { - xPropertySet.setPropertyValue("Label", sText); + xPropertySet.setPropertyValue(PropertyNames.PROPERTY_LABEL, sText); } else { diff --git a/wizards/com/sun/star/wizards/document/DatabaseControl.java b/wizards/com/sun/star/wizards/document/DatabaseControl.java index b0b1523840a9..67a85c436f6f 100644 --- a/wizards/com/sun/star/wizards/document/DatabaseControl.java +++ b/wizards/com/sun/star/wizards/document/DatabaseControl.java @@ -35,6 +35,7 @@ import com.sun.star.drawing.XShapes; import com.sun.star.sdbc.DataType; import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.db.FieldColumn; /** @@ -83,7 +84,7 @@ public class DatabaseControl extends Control String sGridColumnName = getGridColumnName(); XPropertySet xPropColumn = _oGridControl.xGridColumnFactory.createColumn(sGridColumnName); - xPropColumn.setPropertyValue("Name", sUniqueName); + xPropColumn.setPropertyValue(PropertyNames.PROPERTY_NAME, sUniqueName); boolean bHidden = false; if (_fieldtype == DataType.LONGVARBINARY) //TODO CONTROLType abfragen!!!!!! { @@ -91,8 +92,8 @@ public class DatabaseControl extends Control } xPropColumn.setPropertyValue("Hidden", new Boolean(bHidden)); xPropColumn.setPropertyValue("DataField", sFieldName); - xPropColumn.setPropertyValue("Label", _columntitle); - xPropColumn.setPropertyValue("Width", new Integer(0)); // Width of column is adjusted to Columname + xPropColumn.setPropertyValue(PropertyNames.PROPERTY_LABEL, _columntitle); + xPropColumn.setPropertyValue(PropertyNames.PROPERTY_WIDTH, new Integer(0)); // Width of column is adjusted to Columname XPropertySetInfo xPSI = xPropColumn.getPropertySetInfo(); if ( xPSI.hasPropertyByName( "MouseWheelBehavior" ) ) @@ -166,7 +167,7 @@ public class DatabaseControl extends Control { if (getFieldType() == DataType.LONGVARCHAR) { - // Helper.setUnoPropertyValue(xControlModel, "MultiLine", Boolean.TRUE); + // Helper.setUnoPropertyValue(xControlModel, PropertyNames.PROPERTY_MULTILINE, Boolean.TRUE); final int nMemofieldheight = oFormHandler.getControlReferenceHeight() * 4; return nMemofieldheight; } diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java b/wizards/com/sun/star/wizards/document/FormHandler.java index 7b558d67cd9f..17dece81a03e 100644 --- a/wizards/com/sun/star/wizards/document/FormHandler.java +++ b/wizards/com/sun/star/wizards/document/FormHandler.java @@ -466,7 +466,7 @@ public class FormHandler // this.xDrawPage.remove(ControlList[i].xShape); { ControlList[i].setPosition(new Point(this.iXNirwanaPos, this.iYNirwanaPos)); -// String sControlName = (String) ControlList[i].xPropertySet.getPropertyValue("Name"); +// String sControlName = (String) ControlList[i].xPropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME); // // if (_xNamedForm.hasByName(sControlName)) // _xNamedForm.removeByName(sControlName); diff --git a/wizards/com/sun/star/wizards/document/GridControl.java b/wizards/com/sun/star/wizards/document/GridControl.java index 66bae37e1ed3..ef13d5c12a66 100644 --- a/wizards/com/sun/star/wizards/document/GridControl.java +++ b/wizards/com/sun/star/wizards/document/GridControl.java @@ -70,7 +70,7 @@ public class GridControl extends Shape xGridColumnFactory = UnoRuntime.queryInterface( XGridColumnFactory.class, oGridModel ); xComponent = UnoRuntime.queryInterface( XComponent.class, oGridModel ); -// Helper.setUnoPropertyValue(oGridModel, "Name", _sname); +// Helper.setUnoPropertyValue(oGridModel, PropertyNames.PROPERTY_NAME, _sname); for (int i = 0; i < fieldcolumns.length; i++) { FieldColumn curfieldcolumn = fieldcolumns[i]; diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.java b/wizards/com/sun/star/wizards/fax/FaxDocument.java index 8eafbed257d1..7cb8178d3264 100644 --- a/wizards/com/sun/star/wizards/fax/FaxDocument.java +++ b/wizards/com/sun/star/wizards/fax/FaxDocument.java @@ -166,7 +166,7 @@ public class FaxDocument extends TextDocument myFieldHandler.changeUserFieldContent("Company", (String) Helper.getUnoObjectbyName(oUserDataAccess, "o")); myFieldHandler.changeUserFieldContent("Street", (String) Helper.getUnoObjectbyName(oUserDataAccess, "street")); myFieldHandler.changeUserFieldContent("PostCode", (String) Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")); - myFieldHandler.changeUserFieldContent("State", (String) Helper.getUnoObjectbyName(oUserDataAccess, "st")); + myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, (String) Helper.getUnoObjectbyName(oUserDataAccess, "st")); myFieldHandler.changeUserFieldContent("City", (String) Helper.getUnoObjectbyName(oUserDataAccess, "l")); myFieldHandler.changeUserFieldContent("Fax", (String) Helper.getUnoObjectbyName(oUserDataAccess, "facsimiletelephonenumber")); } diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java index 8c81ba5e5fec..fc095af0d337 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java @@ -112,7 +112,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD Helper.setUnoPropertyValues(xDialogModel, new String[] { - "Closeable", "Height", "Moveable", "PositionX", "PositionY", "Step", "TabIndex", "Title", "Width" + "Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -134,7 +134,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD optBusinessFax = insertRadioButton("optBusinessFax", OPTBUSINESSFAX_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -143,7 +143,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lstBusinessStyle = insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -152,7 +152,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD optPrivateFax = insertRadioButton("optPrivateFax", OPTPRIVATEFAX_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -161,7 +161,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lstPrivateStyle = insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -170,7 +170,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblBusinessStyle = insertLabel("lblBusinessStyle", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -179,7 +179,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblTitle1 = insertLabel("lblTitle1", new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -188,7 +188,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblPrivateStyle = insertLabel("lblPrivateStyle", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -197,7 +197,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblIntroduction = insertLabel("lblIntroduction", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -205,7 +205,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD }); ImageControl3 = insertInfoImage(92, 145, 1); // ImageControl3 = insertImage("ImageControl3", -// new String[] {"Border", "Height", "ImageURL", "PositionX", "PositionY", "ScaleImage", "Step", "TabIndex", "Width"}, +// new String[] {"Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}, // new Object[] { new Short((short)0),INTEGERS[10],"private:resource/dbu/image/19205",new Integer(92),new Integer(145),Boolean.FALSE,INTEGERS[1],new Short((short)56),INTEGERS[10]} // ); } @@ -215,7 +215,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD chkUseLogo = insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -224,7 +224,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD chkUseDate = insertCheckBox("chkUseDate", CHKUSEDATE_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -233,7 +233,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD chkUseCommunicationType = insertCheckBox("chkUseCommunicationType", CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -242,7 +242,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lstCommunicationType = insertComboBox("lstCommunicationType", LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, LSTCOMMUNICATIONTYPE_ITEM_CHANGED, LSTCOMMUNICATIONTYPE_TEXT_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -251,7 +251,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD chkUseSubject = insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -260,7 +260,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD chkUseSalutation = insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -269,7 +269,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lstSalutation = insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -278,7 +278,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD chkUseGreeting = insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -287,7 +287,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lstGreeting = insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -296,7 +296,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD chkUseFooter = insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -305,7 +305,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblTitle3 = insertLabel("lblTitle3", new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -318,7 +318,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD optSenderPlaceholder = insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -327,7 +327,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD optSenderDefine = insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -336,7 +336,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD txtSenderName = insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -345,7 +345,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD txtSenderStreet = insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -354,7 +354,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD txtSenderPostCode = insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -363,7 +363,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD txtSenderState = insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -372,7 +372,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD txtSenderCity = insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -381,7 +381,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD txtSenderFax = insertTextField("txtSenderFax", TXTSENDERFAX_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -390,7 +390,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD optReceiverPlaceholder = insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -399,7 +399,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD optReceiverDatabase = insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -408,7 +408,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblSenderAddress = insertLabel("lblSenderAddress", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -417,7 +417,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD FixedLine2 = insertFixedLine("FixedLine2", new String[] { - "Height", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -426,7 +426,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblSenderName = insertLabel("lblSenderName", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -435,7 +435,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblSenderStreet = insertLabel("lblSenderStreet", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -444,7 +444,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblPostCodeCity = insertLabel("lblPostCodeCity", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -453,7 +453,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblTitle4 = insertLabel("lblTitle4", new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -462,7 +462,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD Label1 = insertLabel("lblSenderFax", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -471,7 +471,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD Label2 = insertLabel("Label2", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -484,7 +484,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD txtFooter = insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -493,7 +493,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD chkFooterNextPages = insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -502,7 +502,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD chkFooterPageNumbers = insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -511,7 +511,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblFooter = insertLabel("lblFooter", new String[] { - "FontDescriptor", "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -520,7 +520,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblTitle5 = insertLabel("lblTitle5", new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -533,7 +533,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD txtTemplateName = insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Text", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -541,14 +541,14 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD }); /* fileTemplatePath = insertFileControl("fileTemplatePath", FILETEMPLATEPATH_TEXT_CHANGED, - new String[] {"Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width"}, + new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}, new Object[] { INTEGER_12,FILETEMPLATEPATH_HID,new Integer(172),new Integer(74),INTEGERS[5],new Short((short)29),new Integer(130)} ); */ optCreateFax = insertRadioButton("optCreateFax", OPTCREATEFAX_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -557,7 +557,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD optMakeChanges = insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -566,7 +566,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblFinalExplanation1 = insertLabel("lblFinalExplanation1", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -575,7 +575,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblProceed = insertLabel("lblProceed", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -584,7 +584,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblFinalExplanation2 = insertLabel("lblFinalExplanation2", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -593,7 +593,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD ImageControl2 = insertImage("ImageControl2", new String[] { - "Border", "Height", "ImageURL", "PositionX", "PositionY", "ScaleImage", "Step", "TabIndex", "Width" + "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -602,7 +602,7 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD lblTemplateName = insertLabel("lblTemplateName", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -610,14 +610,14 @@ public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardD }); /* lblTemplatePath = insertLabel("lblTemplatePath", - new String[] {"Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width"}, + new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}, new Object[] { INTEGERS[8],resources.reslblTemplatePath_value,new Integer(97),new Integer(77),INTEGERS[5],new Short((short)58),new Integer(71)} ); */ lblTitle6 = insertLabel("lblTitle6", new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java index 892505baa85b..8ee9f0472c57 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java @@ -424,9 +424,9 @@ public class FaxWizardDialogImpl extends FaxWizardDialog public void initializeElements() { - setControlProperty("chkUseLogo", "Enabled", new Boolean(myFaxDoc.hasElement("Company Logo"))); - setControlProperty("chkUseSubject", "Enabled", new Boolean(myFaxDoc.hasElement("Subject Line"))); - setControlProperty("chkUseDate", "Enabled", new Boolean(myFaxDoc.hasElement("Date"))); + setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, new Boolean(myFaxDoc.hasElement("Company Logo"))); + setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, new Boolean(myFaxDoc.hasElement("Subject Line"))); + setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED, new Boolean(myFaxDoc.hasElement("Date"))); myFaxDoc.updateDateFields(); } @@ -553,10 +553,10 @@ public class FaxWizardDialogImpl extends FaxWizardDialog public void optBusinessFaxItemChanged() { DataAware.setDataObject(faxDA, myConfig.cp_BusinessFax, true); - setControlProperty("lblBusinessStyle", "Enabled", Boolean.TRUE); - setControlProperty("lstBusinessStyle", "Enabled", Boolean.TRUE); - setControlProperty("lblPrivateStyle", "Enabled", Boolean.FALSE); - setControlProperty("lstPrivateStyle", "Enabled", Boolean.FALSE); + setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); lstBusinessStyleItemChanged(); enableSenderReceiver(); setPossibleFooter(true); @@ -572,10 +572,10 @@ public class FaxWizardDialogImpl extends FaxWizardDialog public void optPrivateFaxItemChanged() { DataAware.setDataObject(faxDA, myConfig.cp_PrivateFax, true); - setControlProperty("lblBusinessStyle", "Enabled", Boolean.FALSE); - setControlProperty("lstBusinessStyle", "Enabled", Boolean.FALSE); - setControlProperty("lblPrivateStyle", "Enabled", Boolean.TRUE); - setControlProperty("lstPrivateStyle", "Enabled", Boolean.TRUE); + setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); lstPrivateStyleItemChanged(); disableSenderReceiver(); setPossibleFooter(false); @@ -598,31 +598,31 @@ public class FaxWizardDialogImpl extends FaxWizardDialog public void optSenderPlaceholderItemChanged() { - setControlProperty("lblSenderName", "Enabled", Boolean.FALSE); - setControlProperty("lblSenderStreet", "Enabled", Boolean.FALSE); - setControlProperty("lblPostCodeCity", "Enabled", Boolean.FALSE); - setControlProperty("lblSenderFax", "Enabled", Boolean.FALSE); - setControlProperty("txtSenderName", "Enabled", Boolean.FALSE); - setControlProperty("txtSenderStreet", "Enabled", Boolean.FALSE); - setControlProperty("txtSenderPostCode", "Enabled", Boolean.FALSE); - setControlProperty("txtSenderState", "Enabled", Boolean.FALSE); - setControlProperty("txtSenderCity", "Enabled", Boolean.FALSE); - setControlProperty("txtSenderFax", "Enabled", Boolean.FALSE); + setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblSenderFax", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); myFaxDoc.fillSenderWithUserData(); } public void optSenderDefineItemChanged() { - setControlProperty("lblSenderName", "Enabled", Boolean.TRUE); - setControlProperty("lblSenderStreet", "Enabled", Boolean.TRUE); - setControlProperty("lblPostCodeCity", "Enabled", Boolean.TRUE); - setControlProperty("lblSenderFax", "Enabled", Boolean.TRUE); - setControlProperty("txtSenderName", "Enabled", Boolean.TRUE); - setControlProperty("txtSenderStreet", "Enabled", Boolean.TRUE); - setControlProperty("txtSenderPostCode", "Enabled", Boolean.TRUE); - setControlProperty("txtSenderState", "Enabled", Boolean.TRUE); - setControlProperty("txtSenderCity", "Enabled", Boolean.TRUE); - setControlProperty("txtSenderFax", "Enabled", Boolean.TRUE); + setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblSenderFax", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); txtSenderNameTextChanged(); txtSenderStreetTextChanged(); txtSenderPostCodeTextChanged(); @@ -678,7 +678,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog public void txtSenderStateTextChanged() { TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument); - myFieldHandler.changeUserFieldContent("State", txtSenderState.getText()); + myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, txtSenderState.getText()); } public void txtSenderFaxTextChanged() @@ -754,7 +754,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog { try { - boolean bFooterPossible = (chkUseFooter.getState() != 0) && AnyConverter.toBoolean(getControlProperty("chkUseFooter", "Enabled")); + boolean bFooterPossible = (chkUseFooter.getState() != 0) && AnyConverter.toBoolean(getControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED)); if (chkFooterNextPages.getState() != 0) { @@ -769,7 +769,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog //enable/disable roadmap item for footer page XInterface BPaperItem = getRoadmapItemByID(RM_FOOTER); - Helper.setUnoPropertyValue(BPaperItem, "Enabled", new Boolean(bFooterPossible)); + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bFooterPossible)); } catch (Exception exception) @@ -797,7 +797,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog { XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); myFaxDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0)); - setControlProperty("lstSalutation", "Enabled", new Boolean(chkUseSalutation.getState() != 0)); + setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseSalutation.getState() != 0)); } public void lstSalutationItemChanged() @@ -814,7 +814,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog { XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType); myFaxDoc.switchUserField("CommunicationType", xTextComponent.getText(), (chkUseCommunicationType.getState() != 0)); - setControlProperty("lstCommunicationType", "Enabled", new Boolean(chkUseCommunicationType.getState() != 0)); + setControlProperty("lstCommunicationType", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseCommunicationType.getState() != 0)); } public void lstCommunicationItemChanged() @@ -831,7 +831,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog { XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); myFaxDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0)); - setControlProperty("lstGreeting", "Enabled", new Boolean(chkUseGreeting.getState() != 0)); + setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseGreeting.getState() != 0)); } public void lstGreetingItemChanged() @@ -846,7 +846,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog private void setPossibleFooter(boolean bState) { - setControlProperty("chkUseFooter", "Enabled", new Boolean(bState)); + setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); if (!bState) { chkUseFooter.setState((short) 0); @@ -857,13 +857,13 @@ public class FaxWizardDialogImpl extends FaxWizardDialog private void enableSenderReceiver() { XInterface BPaperItem = getRoadmapItemByID(RM_SENDERRECEIVER); - Helper.setUnoPropertyValue(BPaperItem, "Enabled", Boolean.TRUE); + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); } private void disableSenderReceiver() { XInterface BPaperItem = getRoadmapItemByID(RM_SENDERRECEIVER); - Helper.setUnoPropertyValue(BPaperItem, "Enabled", Boolean.FALSE); + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); } } diff --git a/wizards/com/sun/star/wizards/form/DataEntrySetter.java b/wizards/com/sun/star/wizards/form/DataEntrySetter.java index 7fab3dcdd5b1..ae042fa7de76 100644 --- a/wizards/com/sun/star/wizards/form/DataEntrySetter.java +++ b/wizards/com/sun/star/wizards/form/DataEntrySetter.java @@ -34,6 +34,7 @@ import com.sun.star.wizards.common.Properties; import com.sun.star.wizards.ui.UnoDialog; import com.sun.star.wizards.ui.WizardDialog; import com.sun.star.wizards.ui.UIConsts; +import com.sun.star.wizards.common.PropertyNames; public class DataEntrySetter { @@ -61,7 +62,7 @@ public class DataEntrySetter optNewDataOnly = CurUnoDialog.insertRadioButton("optNewDataOnly", "toggleCheckBoxes", this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -71,7 +72,7 @@ public class DataEntrySetter optDisplayAllData = CurUnoDialog.insertRadioButton("optDisplayAllData", "toggleCheckBoxes", this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -80,7 +81,7 @@ public class DataEntrySetter chknomodification = CurUnoDialog.insertCheckBox("chknomodification", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -89,7 +90,7 @@ public class DataEntrySetter chknodeletion = CurUnoDialog.insertCheckBox("chknodeletion", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -98,7 +99,7 @@ public class DataEntrySetter chknoaddition = CurUnoDialog.insertCheckBox("chknoaddition", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -107,7 +108,7 @@ public class DataEntrySetter CurUnoDialog.insertLabel("lbldontdisplayExistingData", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -121,9 +122,9 @@ public class DataEntrySetter if (optDisplayAllData.getState()) { retProperties = new PropertyValue[3]; - boolean bAllowUpdates = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknomodification), "State")).shortValue()) != 1; - boolean bAllowDeletes = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknodeletion), "State")).shortValue()) != 1; - boolean bAllowInserts = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknoaddition), "State")).shortValue()) != 1; + boolean bAllowUpdates = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_STATE)).shortValue()) != 1; + boolean bAllowDeletes = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknodeletion), PropertyNames.PROPERTY_STATE)).shortValue()) != 1; + boolean bAllowInserts = (((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(chknoaddition), PropertyNames.PROPERTY_STATE)).shortValue()) != 1; retProperties[0] = Properties.createProperty("AllowUpdates", new Boolean(bAllowUpdates)); retProperties[1] = Properties.createProperty("AllowDeletes", new Boolean(bAllowDeletes)); retProperties[2] = Properties.createProperty("AllowInserts", new Boolean(bAllowInserts)); @@ -140,8 +141,8 @@ public class DataEntrySetter public void toggleCheckBoxes() { boolean bdisplayalldata = optDisplayAllData.getState(); - Helper.setUnoPropertyValue(UnoDialog.getModel(chknomodification), "Enabled", new Boolean(bdisplayalldata)); - Helper.setUnoPropertyValue(UnoDialog.getModel(chknodeletion), "Enabled", new Boolean(bdisplayalldata)); - Helper.setUnoPropertyValue(UnoDialog.getModel(chknoaddition), "Enabled", new Boolean(bdisplayalldata)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chknomodification), PropertyNames.PROPERTY_ENABLED, new Boolean(bdisplayalldata)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chknodeletion), PropertyNames.PROPERTY_ENABLED, new Boolean(bdisplayalldata)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chknoaddition), PropertyNames.PROPERTY_ENABLED, new Boolean(bdisplayalldata)); } } diff --git a/wizards/com/sun/star/wizards/form/FieldLinker.java b/wizards/com/sun/star/wizards/form/FieldLinker.java index a3b4b7f5b70a..b0fecf192bb8 100644 --- a/wizards/com/sun/star/wizards/form/FieldLinker.java +++ b/wizards/com/sun/star/wizards/form/FieldLinker.java @@ -39,6 +39,7 @@ import com.sun.star.wizards.ui.UnoDialog; import com.sun.star.wizards.ui.WizardDialog; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.DBLimitedFieldSelection; +import com.sun.star.wizards.common.PropertyNames; public class FieldLinker extends DBLimitedFieldSelection { @@ -93,7 +94,7 @@ public class FieldLinker extends DBLimitedFieldSelection lblSlaveFields[i] = CurUnoDialog.insertLabel("lblSlaveFieldLink" + new Integer(i + 1).toString(), new String[] { - "Enabled", "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -103,15 +104,15 @@ public class FieldLinker extends DBLimitedFieldSelection new String[] { "Dropdown", - "Enabled", - "Height", - "HelpURL", + PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, "LineCount", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -130,7 +131,7 @@ public class FieldLinker extends DBLimitedFieldSelection lblMasterFields[i] = CurUnoDialog.insertLabel("lblMasterFieldLink" + new Integer(i + 1).toString(), new String[] { - "Enabled", "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -141,15 +142,15 @@ public class FieldLinker extends DBLimitedFieldSelection new String[] { "Dropdown", - "Enabled", - "Height", - "HelpURL", + PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, "LineCount", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -205,10 +206,10 @@ public class FieldLinker extends DBLimitedFieldSelection { if (i < rowcount) { - Helper.setUnoPropertyValue(UnoDialog.getModel(lblSlaveFields[i]), "Enabled", new Boolean(bDoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), "Enabled", new Boolean(bDoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lblMasterFields[i]), "Enabled", new Boolean(bDoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), "Enabled", new Boolean(bDoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lblSlaveFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lblMasterFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstMasterFields[i]), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); if (bDoEnable == false) { Helper.setUnoPropertyValue(UnoDialog.getModel(lstSlaveFields[i]), "SelectedItems", new short[] { 0 }); diff --git a/wizards/com/sun/star/wizards/form/Finalizer.java b/wizards/com/sun/star/wizards/form/Finalizer.java index d8ce6262731a..c5f12728e527 100644 --- a/wizards/com/sun/star/wizards/form/Finalizer.java +++ b/wizards/com/sun/star/wizards/form/Finalizer.java @@ -29,6 +29,7 @@ package com.sun.star.wizards.form; import com.sun.star.awt.XRadioButton; import com.sun.star.awt.XTextComponent; import com.sun.star.wizards.common.Desktop; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.*; /** @@ -59,7 +60,7 @@ public class Finalizer CurUnoDialog.insertLabel("lblFormName", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -68,7 +69,7 @@ public class Finalizer txtFormName = CurUnoDialog.insertTextField("txtFormName", "toggleFinishButton", this, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Text", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -77,7 +78,7 @@ public class Finalizer CurUnoDialog.insertLabel("lblProceed", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -86,7 +87,7 @@ public class Finalizer CurUnoDialog.insertRadioButton("optWorkWithForm", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -95,7 +96,7 @@ public class Finalizer optModifyForm = CurUnoDialog.insertRadioButton("optModifyForm", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/form/FormConfiguration.java b/wizards/com/sun/star/wizards/form/FormConfiguration.java index d1f1afdfac54..9c18ab47d79d 100644 --- a/wizards/com/sun/star/wizards/form/FormConfiguration.java +++ b/wizards/com/sun/star/wizards/form/FormConfiguration.java @@ -31,6 +31,7 @@ import com.sun.star.awt.XFixedText; import com.sun.star.awt.XListBox; import com.sun.star.awt.XRadioButton; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.CommandFieldSelection; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; @@ -78,7 +79,7 @@ public class FormConfiguration chkcreateSubForm = CurUnoDialog.insertCheckBox("chkcreateSubForm", SSUBFORMMODE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -87,7 +88,7 @@ public class FormConfiguration optOnExistingRelation = CurUnoDialog.insertRadioButton("optOnExistingRelation", STOGGLESTEPS, this, new String[] { - "Enabled", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -96,7 +97,7 @@ public class FormConfiguration optSelectManually = CurUnoDialog.insertRadioButton("optSelectManually", STOGGLESTEPS, this, new String[] { - "Enabled", "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -105,7 +106,7 @@ public class FormConfiguration lblRelations = CurUnoDialog.insertLabel("lblSelectRelation", new String[] { - "Enabled", "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -114,7 +115,7 @@ public class FormConfiguration lstRelations = CurUnoDialog.insertListBox("lstrelations", SONEXISTINGRELATIONSELECTION, SONEXISTINGRELATIONSELECTION, this, new String[] { - "Enabled", "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -123,7 +124,7 @@ public class FormConfiguration lblSubFormDescription = CurUnoDialog.insertLabel("lblSubFormDescription", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -134,7 +135,7 @@ public class FormConfiguration // public void disableSubFormCheckBox() // { - // Helper.setUnoPropertyValue(UnoDialog.getModel(chkcreateSubForm), "Enabled", Boolean.FALSE); + // Helper.setUnoPropertyValue(UnoDialog.getModel(chkcreateSubForm), PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); // } public RelationController getRelationController() @@ -150,8 +151,8 @@ public class FormConfiguration public void toggleSubFormMode() { boolean bdoEnable = (this.chkcreateSubForm.getState() == 1); - Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), "Enabled", new Boolean(bdoEnable && bsupportsRelations)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optSelectManually), "Enabled", new Boolean(bdoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable && bsupportsRelations)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optSelectManually), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable)); toggleSteps(); } @@ -163,7 +164,7 @@ public class FormConfiguration Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), "StringItemList", sreferencedTables); this.CurSubFormFieldSelection = _CurSubFormFieldSelection; toggleRelationsListbox(); - Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), "Enabled", new Boolean(bsupportsRelations && (chkcreateSubForm.getState() == 1))); + Helper.setUnoPropertyValue(UnoDialog.getModel(optOnExistingRelation), PropertyNames.PROPERTY_ENABLED, new Boolean(bsupportsRelations && (chkcreateSubForm.getState() == 1))); } public void toggleSteps() @@ -230,8 +231,8 @@ public class FormConfiguration private void toggleRelationsListbox() { boolean bdoenable = bsupportsRelations && this.optOnExistingRelation.getState() && (chkcreateSubForm.getState() == 1); - Helper.setUnoPropertyValue(UnoDialog.getModel(lblRelations), "Enabled", new Boolean(bdoenable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), "Enabled", new Boolean(bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lblRelations), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstRelations), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable)); } public boolean hasSubForm() diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java index 9a0c58fd41b8..f5478525eab1 100644 --- a/wizards/com/sun/star/wizards/form/FormControlArranger.java +++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java @@ -36,6 +36,7 @@ import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Exception; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.Resource; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.db.*; import com.sun.star.wizards.document.Control; import com.sun.star.wizards.document.DatabaseControl; @@ -643,7 +644,7 @@ public class FormControlArranger if (DBControlList[i].getControlType() == FormHandler.SOCHECKBOX) { // Checkboxes have no Label near by - DBControlList[i].setPropertyValue("Label", ""); + DBControlList[i].setPropertyValue(PropertyNames.PROPERTY_LABEL, ""); } } } @@ -662,7 +663,7 @@ public class FormControlArranger } if (nFieldType == DataType.LONGVARCHAR) /* memo */ { - Helper.setUnoPropertyValue(LabelControlList[i], "MultiLine", Boolean.TRUE); + Helper.setUnoPropertyValue(LabelControlList[i], PropertyNames.PROPERTY_MULTILINE, Boolean.TRUE); } checkOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, true); aDBControl.setPropertyValue("Border", NBorderType); diff --git a/wizards/com/sun/star/wizards/form/FormWizard.java b/wizards/com/sun/star/wizards/form/FormWizard.java index eb25fb65c78d..f75f3e1b84ab 100644 --- a/wizards/com/sun/star/wizards/form/FormWizard.java +++ b/wizards/com/sun/star/wizards/form/FormWizard.java @@ -32,6 +32,7 @@ import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XComponent; import com.sun.star.sdb.application.DatabaseObject; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.NoValidPathException; import com.sun.star.wizards.common.Properties; @@ -81,7 +82,7 @@ public class FormWizard extends DatabaseObjectWizard Helper.setUnoPropertyValues(xDialogModel, new String[] { - "Height", "Moveable", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Title", "Width" + PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -230,7 +231,7 @@ public class FormWizard extends DatabaseObjectWizard insertLabel("lblBinaryHelpText", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -245,7 +246,7 @@ public class FormWizard extends DatabaseObjectWizard insertLabel("lblSubFormBinaryHelpText", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -457,7 +458,7 @@ public class FormWizard extends DatabaseObjectWizard curDBCommandFieldSelection.setModified(true); boolean benable = curDBCommandFieldSelection.getSelectedFieldNames().length > 0; enablefromStep(SOSUBFORM_PAGE, benable); - setControlProperty("btnWizardNext", "Enabled", new Boolean(benable)); + setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, new Boolean(benable)); if (benable) { if (curFormConfiguration.hasSubForm()) @@ -470,7 +471,7 @@ public class FormWizard extends DatabaseObjectWizard setStepEnabled(SOFIELDLINKER_PAGE, false); } } - setControlProperty("btnWizardFinish", "Enabled", new Boolean(benable)); + setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, new Boolean(benable)); } } } diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index e1b27c05e7aa..5098a1ffbb74 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -43,6 +43,7 @@ import com.sun.star.wizards.common.FileAccess; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.NoValidPathException; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.document.Control; import com.sun.star.wizards.document.DatabaseControl; import com.sun.star.wizards.document.GridControl; @@ -111,7 +112,7 @@ public class StyleApplier CurUnoDialog.insertLabel("lblStyles", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -121,7 +122,7 @@ public class StyleApplier lstStyles = CurUnoDialog.insertListBox("lstStyles", null, SCHANGELAYOUT, this, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "SelectedItems", "Step", "StringItemList", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "SelectedItems", PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -131,7 +132,7 @@ public class StyleApplier optNoBorder = CurUnoDialog.insertRadioButton("otpNoBorder", SCHANGEBORDERTYPE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Tag", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -141,7 +142,7 @@ public class StyleApplier opt3DLook = CurUnoDialog.insertRadioButton("otp3DLook", SCHANGEBORDERTYPE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Tag", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -151,7 +152,7 @@ public class StyleApplier optFlat = CurUnoDialog.insertRadioButton("otpFlat", SCHANGEBORDERTYPE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Tag", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -161,7 +162,7 @@ public class StyleApplier CurUnoDialog.insertFixedLine("lnFieldBorder", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -193,7 +194,7 @@ public class StyleApplier for (int i = 0; i < StyleNodeNames.length; i++) { Object oStyleNode = xNameAccess.getByName(StyleNodeNames[i]); - StyleNames[i] = (String) Helper.getUnoPropertyValue(oStyleNode, "Name"); + StyleNames[i] = (String) Helper.getUnoPropertyValue(oStyleNode, PropertyNames.PROPERTY_NAME); FileNames[i] = (String) Helper.getUnoPropertyValue(oStyleNode, "CssHref"); } } diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java index 0add27db3625..d4cd1ccc7cb6 100644 --- a/wizards/com/sun/star/wizards/form/UIControlArranger.java +++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java @@ -34,6 +34,7 @@ import com.sun.star.awt.XItemListener; import com.sun.star.awt.XRadioButton; import com.sun.star.lang.EventObject; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.NoValidPathException; import com.sun.star.wizards.document.Control; // import com.sun.star.wizards.ui.ImageList; @@ -78,7 +79,7 @@ public class UIControlArranger flnLabelPlacement = CurUnoDialog.insertFixedLine("lnLabelPlacement", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -88,7 +89,7 @@ public class UIControlArranger optAlignLeft = CurUnoDialog.insertRadioButton("optAlignLeft", SOALIGNMETHOD, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -98,7 +99,7 @@ public class UIControlArranger optAlignRight = CurUnoDialog.insertRadioButton("optAlignRight", SOALIGNMETHOD, this, new String[] { - "Height", "HelpURL", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -114,7 +115,7 @@ public class UIControlArranger // flnLabelPlacement = CurUnoDialog.insertFixedLine("lnArrangementHeader1", // new String[] // { -// "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" +// PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH // }, // new Object[] // { @@ -128,15 +129,15 @@ public class UIControlArranger // CurUnoDialog.insertButton("btnLayout1", "btnLayout1", // new String[] // { -// "Enabled", -// "Height", -// "HelpURL", -// "Label", -// "PositionX", -// "PositionY", -// "Step", -// "TabIndex", -// "Width" +// PropertyNames.PROPERTY_ENABLED, +// PropertyNames.PROPERTY_HEIGHT, +// PropertyNames.PROPERTY_HELPURL, +// PropertyNames.PROPERTY_LABEL, +// PropertyNames.PROPERTY_POSITION_X, +// PropertyNames.PROPERTY_POSITION_Y, +// PropertyNames.PROPERTY_STEP, +// PropertyNames.PROPERTY_TABINDEX, +// PropertyNames.PROPERTY_WIDTH // }, // new Object[] // { @@ -200,7 +201,7 @@ public class UIControlArranger public void enableSubFormImageList(boolean _bdoEnable) { m_aArrangeList[1].m_aButtonList.setenabled(_bdoEnable); - CurUnoDialog.setControlProperty("lnLabelPlacment_2", "Enabled", new Boolean(_bdoEnable)); + CurUnoDialog.setControlProperty("lnLabelPlacment_2", PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoEnable)); } public short getAlignValue() @@ -243,9 +244,9 @@ public class UIControlArranger private void enableAlignControlGroup(boolean _bEnableAlignControlGroup) { - Helper.setUnoPropertyValue(UnoDialog.getModel(flnLabelPlacement), "Enabled", new Boolean(_bEnableAlignControlGroup)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), "Enabled", new Boolean(_bEnableAlignControlGroup)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignRight), "Enabled", new Boolean(_bEnableAlignControlGroup)); + Helper.setUnoPropertyValue(UnoDialog.getModel(flnLabelPlacement), PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnableAlignControlGroup)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnableAlignControlGroup)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignRight), PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnableAlignControlGroup)); } // private class ArrangeImageList implements XItemListener @@ -262,7 +263,7 @@ public class UIControlArranger // CurUnoDialog.insertFixedLine("lnLabelPlacment_" + (_formindex + 1), // new String[] // { -// "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" +// PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH // }, // new Object[] // { @@ -293,7 +294,7 @@ public class UIControlArranger // // public void setToLeftAlign() // { -// Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), "State", new Short((short) 1)); +// Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), PropertyNames.PROPERTY_STATE, new Short((short) 1)); // } // // /* (non-Javadoc) @@ -383,13 +384,13 @@ public class UIControlArranger CurUnoDialog.insertFixedLine("lnLabelPlacment_" + (_formindex + 1), new String[] { - "Height", - "Label", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -426,7 +427,7 @@ public class UIControlArranger public void setToLeftAlign() { - Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), "State", new Short((short) 1)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optAlignLeft), PropertyNames.PROPERTY_STATE, new Short((short) 1)); } /* (non-Javadoc) diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.java b/wizards/com/sun/star/wizards/letter/LetterDocument.java index 0c981c6e066e..b7b260e69e85 100644 --- a/wizards/com/sun/star/wizards/letter/LetterDocument.java +++ b/wizards/com/sun/star/wizards/letter/LetterDocument.java @@ -172,7 +172,7 @@ public class LetterDocument extends TextDocument myFieldHandler.changeUserFieldContent("Street", (String) Helper.getUnoObjectbyName(oUserDataAccess, "street")); myFieldHandler.changeUserFieldContent("PostCode", (String) Helper.getUnoObjectbyName(oUserDataAccess, "postalcode")); myFieldHandler.changeUserFieldContent("City", (String) Helper.getUnoObjectbyName(oUserDataAccess, "l")); - myFieldHandler.changeUserFieldContent("State", (String) Helper.getUnoObjectbyName(oUserDataAccess, "st")); + myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, (String) Helper.getUnoObjectbyName(oUserDataAccess, "st")); } catch (Exception exception) { @@ -304,8 +304,8 @@ public class LetterDocument extends TextDocument { Helper.setUnoPropertyValue(xFrame, "HoriOrient", new Short(HoriOrientation.NONE)); Helper.setUnoPropertyValue(xFrame, "VertOrient", new Short(VertOrientation.NONE)); - Helper.setUnoPropertyValue(xFrame, "Height", new Integer(iHeight)); - Helper.setUnoPropertyValue(xFrame, "Width", new Integer(iWidth)); + Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_HEIGHT, new Integer(iHeight)); + Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_WIDTH, new Integer(iWidth)); Helper.setUnoPropertyValue(xFrame, "HoriOrientPosition", new Integer(iXPos)); Helper.setUnoPropertyValue(xFrame, "VertOrientPosition", new Integer(iYPos)); Helper.setUnoPropertyValue(xFrame, "HoriOrientRelation", new Short(RelOrientation.PAGE_FRAME)); diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java index ffdec06942a6..619227d9f3ba 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java @@ -143,7 +143,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW Helper.setUnoPropertyValues(xDialogModel, new String[] { - "Closeable", "Height", "Moveable", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Title", "Width" + "Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -165,7 +165,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW optBusinessLetter = insertRadioButton("optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -174,7 +174,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW optPrivOfficialLetter = insertRadioButton("optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -183,7 +183,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW optPrivateLetter = insertRadioButton("optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -192,7 +192,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lstBusinessStyle = insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -201,7 +201,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkBusinessPaper = insertCheckBox("chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -210,7 +210,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lstPrivOfficialStyle = insertListBox("lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, LSTPRIVOFFICIALSTYLE_ITEM_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -219,7 +219,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lstPrivateStyle = insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -228,7 +228,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblBusinessStyle = insertLabel("lblBusinessStyle", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -237,7 +237,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblPrivOfficialStyle = insertLabel("lblPrivOfficialStyle", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -246,7 +246,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTitle1 = insertLabel("lblTitle1", new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -255,7 +255,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblPrivateStyle = insertLabel("lblPrivateStyle", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -264,7 +264,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblIntroduction = insertLabel("lblIntroduction", new String[] { - "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -273,7 +273,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW ImageControl3 = insertInfoImage(92, 145, 1); // ImageControl3 = insertImage("ImageControl3", -// new String[] {"Border", "Height", "ImageURL", "Name", "PositionX", "PositionY", "ScaleImage", "Step", "TabIndex", "Width"}, +// new String[] {"Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}, // new Object[] { new Short((short)0), INTEGERS[10],"private:resource/dbu/image/19205","ImageControl3",new Integer(92),new Integer(145),Boolean.FALSE,INTEGERS[1],new Short((short)81),INTEGERS[10]} // ); } @@ -283,7 +283,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkPaperCompanyLogo = insertCheckBox("chkPaperCompanyLogo", CHKPAPERCOMPANYLOGO_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -292,7 +292,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW numLogoHeight = insertNumericField("numLogoHeight", NUMLOGOHEIGHT_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "StrictFormat", "TabIndex", "Value", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -301,7 +301,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW numLogoX = insertNumericField("numLogoX", NUMLOGOX_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -310,7 +310,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW numLogoWidth = insertNumericField("numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -319,7 +319,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW numLogoY = insertNumericField("numLogoY", NUMLOGOY_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -328,7 +328,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkPaperCompanyAddress = insertCheckBox("chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -337,7 +337,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW numAddressHeight = insertNumericField("numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "StrictFormat", "TabIndex", "Value", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -346,7 +346,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW numAddressX = insertNumericField("numAddressX", NUMADDRESSX_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -355,7 +355,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW numAddressWidth = insertNumericField("numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -364,7 +364,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW numAddressY = insertNumericField("numAddressY", NUMADDRESSY_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -373,7 +373,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkCompanyReceiver = insertCheckBox("chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -382,7 +382,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkPaperFooter = insertCheckBox("chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -391,7 +391,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW numFooterHeight = insertNumericField("numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Spin", "Step", "TabIndex", "Value", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -400,7 +400,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblLogoHeight = insertLabel("lblLogoHeight", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -409,7 +409,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblLogoWidth = insertLabel("lblLogoWidth", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -418,7 +418,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW FixedLine5 = insertFixedLine("FixedLine5", new String[] { - "Height", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -427,7 +427,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW FixedLine6 = insertFixedLine("FixedLine6", new String[] { - "Height", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -436,7 +436,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblFooterHeight = insertLabel("lblFooterHeight", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -445,7 +445,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblLogoX = insertLabel("lblLogoX", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -454,7 +454,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblLogoY = insertLabel("lblLogoY", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -463,7 +463,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblAddressHeight = insertLabel("lblAddressHeight", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -472,7 +472,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblAddressWidth = insertLabel("lblAddressWidth", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -481,7 +481,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblAddressX = insertLabel("lblAddressX", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -490,7 +490,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblAddressY = insertLabel("lblAddressY", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -499,7 +499,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTitle2 = insertLabel("lblTitle2", new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -512,7 +512,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lstLetterNorm = insertListBox("lstLetterNorm", LSTLETTERNORM_ACTION_PERFORMED, LSTLETTERNORM_ITEM_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -521,7 +521,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkUseLogo = insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -530,7 +530,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkUseAddressReceiver = insertCheckBox("chkUseAddressReceiver", CHKUSEADDRESSRECEIVER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -539,7 +539,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkUseSigns = insertCheckBox("chkUseSigns", CHKUSESIGNS_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -548,7 +548,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkUseSubject = insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -557,7 +557,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkUseSalutation = insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -566,7 +566,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lstSalutation = insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -575,7 +575,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkUseBendMarks = insertCheckBox("chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -584,7 +584,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkUseGreeting = insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -593,7 +593,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lstGreeting = insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -602,7 +602,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkUseFooter = insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -611,7 +611,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblLetterNorm = insertLabel("lblLetterNorm", new String[] { - "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -620,7 +620,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTitle3 = insertLabel("lblTitle3", new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -633,7 +633,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW optSenderPlaceholder = insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -642,7 +642,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW optSenderDefine = insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -651,7 +651,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW txtSenderName = insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -660,7 +660,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW txtSenderStreet = insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -669,7 +669,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW txtSenderPostCode = insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -678,7 +678,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW txtSenderState = insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -687,7 +687,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW txtSenderCity = insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -696,7 +696,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW optReceiverPlaceholder = insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -705,7 +705,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW optReceiverDatabase = insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -714,7 +714,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblSenderAddress = insertLabel("lblSenderAddress", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -723,7 +723,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW FixedLine2 = insertFixedLine("FixedLine2", new String[] { - "Height", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -732,7 +732,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblReceiverAddress = insertLabel("lblReceiverAddress", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -741,7 +741,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblSenderName = insertLabel("lblSenderName", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -750,7 +750,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblSenderStreet = insertLabel("lblSenderStreet", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -759,7 +759,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblPostCodeCity = insertLabel("lblPostCodeCity", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -768,7 +768,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTitle4 = insertLabel("lblTitle4", new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -781,7 +781,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW txtFooter = insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -790,7 +790,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkFooterNextPages = insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -799,7 +799,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW chkFooterPageNumbers = insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -808,7 +808,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblFooter = insertLabel("lblFooter", new String[] { - "FontDescriptor", "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -817,7 +817,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTitle5 = insertLabel("lblTitle5", new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -830,7 +830,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW txtTemplateName = insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED, new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Text", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -839,7 +839,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW optCreateLetter = insertRadioButton("optCreateLetter", OPTCREATELETTER_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -848,7 +848,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW optMakeChanges = insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED, new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -857,7 +857,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblFinalExplanation1 = insertLabel("lblFinalExplanation1", new String[] { - "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -866,7 +866,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblProceed = insertLabel("lblProceed", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -875,7 +875,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblFinalExplanation2 = insertLabel("lblFinalExplanation2", new String[] { - "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -884,7 +884,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW ImageControl2 = insertImage("ImageControl2", new String[] { - "Border", "Height", "ImageURL", "Name", "PositionX", "PositionY", "ScaleImage", "Step", "TabIndex", "Width" + "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -893,7 +893,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTemplateName = insertLabel("lblTemplateName", new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -902,7 +902,7 @@ public abstract class LetterWizardDialog extends WizardDialog implements LetterW lblTitle6 = insertLabel("lblTitle6", new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java index 9fb6c2e4b2e7..295d900bdec6 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java @@ -35,6 +35,7 @@ import com.sun.star.wizards.common.Configuration; import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.NoValidPathException; import com.sun.star.wizards.common.SystemDialog; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XTextComponent; import com.sun.star.awt.XWindow; @@ -372,13 +373,13 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void optBusinessLetterItemChanged() { DataAware.setDataObject(letterDA, myConfig.cp_BusinessLetter, true); - setControlProperty("lblBusinessStyle", "Enabled", Boolean.TRUE); - setControlProperty("lstBusinessStyle", "Enabled", Boolean.TRUE); - setControlProperty("chkBusinessPaper", "Enabled", Boolean.TRUE); - setControlProperty("lblPrivOfficialStyle", "Enabled", Boolean.FALSE); - setControlProperty("lstPrivOfficialStyle", "Enabled", Boolean.FALSE); - setControlProperty("lblPrivateStyle", "Enabled", Boolean.FALSE); - setControlProperty("lstPrivateStyle", "Enabled", Boolean.FALSE); + setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); lstBusinessStyleItemChanged(); enableSenderReceiver(); setPossibleFooter(true); @@ -391,13 +392,13 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void optPrivOfficialLetterItemChanged() { DataAware.setDataObject(letterDA, myConfig.cp_PrivateOfficialLetter, true); - setControlProperty("lblBusinessStyle", "Enabled", Boolean.FALSE); - setControlProperty("lstBusinessStyle", "Enabled", Boolean.FALSE); - setControlProperty("chkBusinessPaper", "Enabled", Boolean.FALSE); - setControlProperty("lblPrivOfficialStyle", "Enabled", Boolean.TRUE); - setControlProperty("lstPrivOfficialStyle", "Enabled", Boolean.TRUE); - setControlProperty("lblPrivateStyle", "Enabled", Boolean.FALSE); - setControlProperty("lstPrivateStyle", "Enabled", Boolean.FALSE); + setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); lstPrivOfficialStyleItemChanged(); disableBusinessPaper(); enableSenderReceiver(); @@ -411,13 +412,13 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void optPrivateLetterItemChanged() { DataAware.setDataObject(letterDA, myConfig.cp_PrivateLetter, true); - setControlProperty("lblBusinessStyle", "Enabled", Boolean.FALSE); - setControlProperty("lstBusinessStyle", "Enabled", Boolean.FALSE); - setControlProperty("chkBusinessPaper", "Enabled", Boolean.FALSE); - setControlProperty("lblPrivOfficialStyle", "Enabled", Boolean.FALSE); - setControlProperty("lstPrivOfficialStyle", "Enabled", Boolean.FALSE); - setControlProperty("lblPrivateStyle", "Enabled", Boolean.TRUE); - setControlProperty("lstPrivateStyle", "Enabled", Boolean.TRUE); + setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); lstPrivateStyleItemChanged(); disableBusinessPaper(); disableSenderReceiver(); @@ -430,27 +431,27 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void optSenderPlaceholderItemChanged() { - setControlProperty("lblSenderName", "Enabled", Boolean.FALSE); - setControlProperty("lblSenderStreet", "Enabled", Boolean.FALSE); - setControlProperty("lblPostCodeCity", "Enabled", Boolean.FALSE); - setControlProperty("txtSenderName", "Enabled", Boolean.FALSE); - setControlProperty("txtSenderStreet", "Enabled", Boolean.FALSE); - setControlProperty("txtSenderPostCode", "Enabled", Boolean.FALSE); - setControlProperty("txtSenderState", "Enabled", Boolean.FALSE); - setControlProperty("txtSenderCity", "Enabled", Boolean.FALSE); + setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); myLetterDoc.fillSenderWithUserData(); } public void optSenderDefineItemChanged() { - setControlProperty("lblSenderName", "Enabled", Boolean.TRUE); - setControlProperty("lblSenderStreet", "Enabled", Boolean.TRUE); - setControlProperty("lblPostCodeCity", "Enabled", Boolean.TRUE); - setControlProperty("txtSenderName", "Enabled", Boolean.TRUE); - setControlProperty("txtSenderStreet", "Enabled", Boolean.TRUE); - setControlProperty("txtSenderPostCode", "Enabled", Boolean.TRUE); - setControlProperty("txtSenderState", "Enabled", Boolean.TRUE); - setControlProperty("txtSenderCity", "Enabled", Boolean.TRUE); + setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); txtSenderNameTextChanged(); txtSenderStreetTextChanged(); txtSenderPostCodeTextChanged(); @@ -579,14 +580,14 @@ public class LetterWizardDialogImpl extends LetterWizardDialog numLogoHeight.setValue(0.1); } BusCompanyLogo = myLetterDoc.new BusinessPaperObject("Company Logo", (int) (numLogoWidth.getValue() * 1000), (int) (numLogoHeight.getValue() * 1000), (int) (numLogoX.getValue() * 1000), (int) (numLogoY.getValue() * 1000)); - setControlProperty("numLogoHeight", "Enabled", Boolean.TRUE); - setControlProperty("lblCompanyLogoHeight", "Enabled", Boolean.TRUE); - setControlProperty("numLogoWidth", "Enabled", Boolean.TRUE); - setControlProperty("lblCompanyLogoWidth", "Enabled", Boolean.TRUE); - setControlProperty("numLogoX", "Enabled", Boolean.TRUE); - setControlProperty("lblCompanyLogoX", "Enabled", Boolean.TRUE); - setControlProperty("numLogoY", "Enabled", Boolean.TRUE); - setControlProperty("lblCompanyLogoY", "Enabled", Boolean.TRUE); + setControlProperty("numLogoHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("numLogoWidth", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("numLogoX", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("numLogoY", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); setPossibleLogo(false); } else @@ -595,14 +596,14 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { BusCompanyLogo.removeFrame(); } - setControlProperty("numLogoHeight", "Enabled", Boolean.FALSE); - setControlProperty("lblCompanyLogoHeight", "Enabled", Boolean.FALSE); - setControlProperty("numLogoWidth", "Enabled", Boolean.FALSE); - setControlProperty("lblCompanyLogoWidth", "Enabled", Boolean.FALSE); - setControlProperty("numLogoX", "Enabled", Boolean.FALSE); - setControlProperty("lblCompanyLogoX", "Enabled", Boolean.FALSE); - setControlProperty("numLogoY", "Enabled", Boolean.FALSE); - setControlProperty("lblCompanyLogoY", "Enabled", Boolean.FALSE); + setControlProperty("numLogoHeight", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("numLogoWidth", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("numLogoX", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("numLogoY", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); setPossibleLogo(true); } } @@ -621,14 +622,14 @@ public class LetterWizardDialogImpl extends LetterWizardDialog numAddressHeight.setValue(0.1); } BusCompanyAddress = myLetterDoc.new BusinessPaperObject("Company Address", (int) (numAddressWidth.getValue() * 1000), (int) (numAddressHeight.getValue() * 1000), (int) (numAddressX.getValue() * 1000), (int) (numAddressY.getValue() * 1000)); - setControlProperty("numAddressHeight", "Enabled", Boolean.TRUE); - setControlProperty("lblCompanyAddressHeight", "Enabled", Boolean.TRUE); - setControlProperty("numAddressWidth", "Enabled", Boolean.TRUE); - setControlProperty("lblCompanyAddressWidth", "Enabled", Boolean.TRUE); - setControlProperty("numAddressX", "Enabled", Boolean.TRUE); - setControlProperty("lblCompanyAddressX", "Enabled", Boolean.TRUE); - setControlProperty("numAddressY", "Enabled", Boolean.TRUE); - setControlProperty("lblCompanyAddressY", "Enabled", Boolean.TRUE); + setControlProperty("numAddressHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("numAddressWidth", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("numAddressX", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("numAddressY", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + setControlProperty("lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); if (myLetterDoc.hasElement("Sender Address")) { myLetterDoc.switchElement("Sender Address", (false)); @@ -644,14 +645,14 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { BusCompanyAddress.removeFrame(); } - setControlProperty("numAddressHeight", "Enabled", Boolean.FALSE); - setControlProperty("lblCompanyAddressHeight", "Enabled", Boolean.FALSE); - setControlProperty("numAddressWidth", "Enabled", Boolean.FALSE); - setControlProperty("lblCompanyAddressWidth", "Enabled", Boolean.FALSE); - setControlProperty("numAddressX", "Enabled", Boolean.FALSE); - setControlProperty("lblCompanyAddressX", "Enabled", Boolean.FALSE); - setControlProperty("numAddressY", "Enabled", Boolean.FALSE); - setControlProperty("lblCompanyAddressY", "Enabled", Boolean.FALSE); + setControlProperty("numAddressHeight", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("numAddressWidth", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("numAddressX", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("numAddressY", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); if (myLetterDoc.hasElement("Sender Address")) { myLetterDoc.switchElement("Sender Address", (true)); @@ -677,7 +678,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog try { xReceiverFrame = TextFrameHandler.getFrameByName("Receiver Address", xTextDocument); - Integer FrameWidth = (Integer) Helper.getUnoPropertyValue(xReceiverFrame, "Width"); + Integer FrameWidth = (Integer) Helper.getUnoPropertyValue(xReceiverFrame, PropertyNames.PROPERTY_WIDTH); int iFrameWidth = FrameWidth.intValue(); Integer FrameX = (Integer) Helper.getUnoPropertyValue(xReceiverFrame, "HoriOrientPosition"); int iFrameX = FrameX.intValue(); @@ -734,8 +735,8 @@ public class LetterWizardDialogImpl extends LetterWizardDialog numFooterHeight.setValue(0.1); } BusFooter = myLetterDoc.new BusinessPaperObject("Footer", (int) myLetterDoc.DocSize.Width, (int) (numFooterHeight.getValue() * 1000), (int) 0, (int) (myLetterDoc.DocSize.Height - (numFooterHeight.getValue() * 1000))); - this.setControlProperty("numFooterHeight", "Enabled", Boolean.TRUE); - this.setControlProperty("lblFooterHeight", "Enabled", Boolean.TRUE); + this.setControlProperty("numFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + this.setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); setPossibleFooter(false); } else @@ -744,8 +745,8 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { BusFooter.removeFrame(); } - setControlProperty("numFooterHeight", "Enabled", Boolean.FALSE); - setControlProperty("lblFooterHeight", "Enabled", Boolean.FALSE); + setControlProperty("numFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); setPossibleFooter(true); } } @@ -757,7 +758,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { if (myLetterDoc.hasElement("Company Logo")) { - boolean logostatus = AnyConverter.toBoolean(getControlProperty("chkUseLogo", "Enabled")) && (chkUseLogo.getState() != 0); + boolean logostatus = AnyConverter.toBoolean(getControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED)) && (chkUseLogo.getState() != 0); myLetterDoc.switchElement("Company Logo", logostatus); } } @@ -773,7 +774,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { if (myLetterDoc.hasElement("Sender Address Repeated")) { - boolean rstatus = AnyConverter.toBoolean(getControlProperty("chkUseAddressReceiver", "Enabled")) && (chkUseAddressReceiver.getState() != 0); + boolean rstatus = AnyConverter.toBoolean(getControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED)) && (chkUseAddressReceiver.getState() != 0); myLetterDoc.switchElement("Sender Address Repeated", rstatus); } } @@ -811,7 +812,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { try { - boolean bFooterPossible = (chkUseFooter.getState() != 0) && AnyConverter.toBoolean(getControlProperty("chkUseFooter", "Enabled")); + boolean bFooterPossible = (chkUseFooter.getState() != 0) && AnyConverter.toBoolean(getControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED)); if (chkFooterNextPages.getState() != 0) { @@ -826,7 +827,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog //enable/disable roadmap item for footer page XInterface BPaperItem = getRoadmapItemByID(RM_FOOTER); - Helper.setUnoPropertyValue(BPaperItem, "Enabled", new Boolean(bFooterPossible)); + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bFooterPossible)); } catch (Exception exception) @@ -847,7 +848,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog private void setPossibleFooter(boolean bState) { - setControlProperty("chkUseFooter", "Enabled", new Boolean(bState)); + setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); chkUseFooterItemChanged(); } @@ -855,7 +856,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { if (myLetterDoc.hasElement("Sender Address Repeated")) { - setControlProperty("chkUseAddressReceiver", "Enabled", new Boolean(bState)); + setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); chkUseAddressReceiverItemChanged(); } } @@ -864,7 +865,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { if (myLetterDoc.hasElement("Company Logo")) { - setControlProperty("chkUseLogo", "Enabled", new Boolean(bState)); + setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); chkUseLogoItemChanged(); } } @@ -901,7 +902,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void txtSenderStateTextChanged() { TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument); - myFieldHandler.changeUserFieldContent("State", txtSenderState.getText()); + myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, txtSenderState.getText()); } public void txtTemplateNameTextChanged() @@ -916,7 +917,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstSalutation); myLetterDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0)); - setControlProperty("lstSalutation", "Enabled", new Boolean(chkUseSalutation.getState() != 0)); + setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseSalutation.getState() != 0)); } public void lstSalutationItemChanged() @@ -933,7 +934,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, lstGreeting); myLetterDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0)); - setControlProperty("lstGreeting", "Enabled", new Boolean(chkUseGreeting.getState() != 0)); + setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, new Boolean(chkUseGreeting.getState() != 0)); } private void setDefaultForGreetingAndSalutation() @@ -1008,39 +1009,39 @@ public class LetterWizardDialogImpl extends LetterWizardDialog private void setPossibleSenderData(boolean bState) { - setControlProperty("optSenderDefine", "Enabled", new Boolean(bState)); - setControlProperty("optSenderPlaceholder", "Enabled", new Boolean(bState)); - setControlProperty("lblSenderAddress", "Enabled", new Boolean(bState)); + setControlProperty("optSenderDefine", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("lblSenderAddress", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); if (!bState) { - setControlProperty("txtSenderCity", "Enabled", new Boolean(bState)); - setControlProperty("txtSenderName", "Enabled", new Boolean(bState)); - setControlProperty("txtSenderPostCode", "Enabled", new Boolean(bState)); - setControlProperty("txtSenderStreet", "Enabled", new Boolean(bState)); - setControlProperty("txtSenderCity", "Enabled", new Boolean(bState)); - setControlProperty("txtSenderState", "Enabled", new Boolean(bState)); - setControlProperty("lblSenderName", "Enabled", new Boolean(bState)); - setControlProperty("lblSenderStreet", "Enabled", new Boolean(bState)); - setControlProperty("lblPostCodeCity", "Enabled", new Boolean(bState)); + setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); + setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, new Boolean(bState)); } } private void enableSenderReceiver() { XInterface BPaperItem = getRoadmapItemByID(RM_SENDERRECEIVER); - Helper.setUnoPropertyValue(BPaperItem, "Enabled", Boolean.TRUE); + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); } private void disableSenderReceiver() { XInterface BPaperItem = getRoadmapItemByID(RM_SENDERRECEIVER); - Helper.setUnoPropertyValue(BPaperItem, "Enabled", Boolean.FALSE); + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); } private void enableBusinessPaper() { XInterface BPaperItem = getRoadmapItemByID(RM_BUSINESSPAPER); - Helper.setUnoPropertyValue(BPaperItem, "Enabled", Boolean.TRUE); + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); chkPaperCompanyLogoItemChanged(); chkPaperCompanyAddressItemChanged(); chkPaperFooterItemChanged(); @@ -1050,7 +1051,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog private void disableBusinessPaper() { XInterface BPaperItem = getRoadmapItemByID(RM_BUSINESSPAPER); - Helper.setUnoPropertyValue(BPaperItem, "Enabled", Boolean.FALSE); + Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); if (BusCompanyLogo != null) { BusCompanyLogo.removeFrame(); @@ -1340,11 +1341,11 @@ public class LetterWizardDialogImpl extends LetterWizardDialog public void initializeElements() { - setControlProperty("chkUseLogo", "Enabled", new Boolean(myLetterDoc.hasElement("Company Logo"))); - setControlProperty("chkUseBendMarks", "Enabled", new Boolean(myLetterDoc.hasElement("Bend Marks"))); - setControlProperty("chkUseAddressReceiver", "Enabled", new Boolean(myLetterDoc.hasElement("Sender Address Repeated"))); - setControlProperty("chkUseSubject", "Enabled", new Boolean(myLetterDoc.hasElement("Subject Line"))); - setControlProperty("chkUseSigns", "Enabled", new Boolean(myLetterDoc.hasElement("Letter Signs"))); + setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Company Logo"))); + setControlProperty("chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Bend Marks"))); + setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Sender Address Repeated"))); + setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Subject Line"))); + setControlProperty("chkUseSigns", PropertyNames.PROPERTY_ENABLED, new Boolean(myLetterDoc.hasElement("Letter Signs"))); myLetterDoc.updateDateFields(); } diff --git a/wizards/com/sun/star/wizards/makefile.mk b/wizards/com/sun/star/wizards/makefile.mk index a9ec3e2d5735..b3fb389bb551 100644 --- a/wizards/com/sun/star/wizards/makefile.mk +++ b/wizards/com/sun/star/wizards/makefile.mk @@ -64,6 +64,7 @@ JAVAFILES= \ common$/JavaTools.java \ common$/NoValidPathException.java \ common$/Properties.java \ + common$/PropertyNames.java \ common$/Resource.java \ common$/SystemDialog.java \ common$/Configuration.java \ diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java index f60422503be3..1b528a749f36 100644 --- a/wizards/com/sun/star/wizards/query/Finalizer.java +++ b/wizards/com/sun/star/wizards/query/Finalizer.java @@ -26,15 +26,16 @@ ************************************************************************/ package com.sun.star.wizards.query; -import com.sun.star.wizards.common.*; import com.sun.star.awt.XRadioButton; import com.sun.star.awt.XTextComponent; -import com.sun.star.wizards.db.*; import com.sun.star.lang.IllegalArgumentException; -import com.sun.star.lang.XComponent; import com.sun.star.sdb.CommandType; -import com.sun.star.uno.*; -import com.sun.star.wizards.ui.*; +import com.sun.star.uno.AnyConverter; +import com.sun.star.wizards.common.HelpIds; +import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; +import com.sun.star.wizards.ui.UIConsts; +import com.sun.star.wizards.ui.UnoDialog; import java.util.logging.Level; import java.util.logging.Logger; @@ -66,7 +67,7 @@ public class Finalizer m_queryWizard.insertLabel("lblQueryTitle", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -74,7 +75,7 @@ public class Finalizer }); m_aTxtTitle = m_queryWizard.insertTextField("txtQueryTitle", "changeTitle", this, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -82,7 +83,7 @@ public class Finalizer }); m_queryWizard.insertLabel("lblHowGoOn", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -91,7 +92,7 @@ public class Finalizer this.xRadioDisplayQuery = m_queryWizard.insertRadioButton("optDisplayQuery", new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -101,7 +102,7 @@ public class Finalizer m_queryWizard.insertRadioButton("optModifyQuery", new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -109,7 +110,7 @@ public class Finalizer }); m_queryWizard.insertFixedLine("flnSummary", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -117,7 +118,7 @@ public class Finalizer }); m_queryWizard.insertTextField("txtSummary", 0, null, new String[] { - "Height", "HelpURL", "MultiLine", "PositionX", "PositionY", "ReadOnly", "Step", "VScroll", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ReadOnly", PropertyNames.PROPERTY_STEP, "VScroll", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -145,7 +146,7 @@ public class Finalizer { String[] sCommandNames = CurDBMetaData.getIncludedCommandNames(); sCurQueryName = resQuery + "_" + sCommandNames[0]; - sCurQueryName = CurDBMetaData.ConnectionTools.getObjectNames().suggestName(CommandType.QUERY, sCurQueryName); + sCurQueryName = CurDBMetaData.suggestName( CommandType.QUERY, sCurQueryName ); Helper.setUnoPropertyValue(UnoDialog.getModel(m_aTxtTitle), "Text", sCurQueryName); } } @@ -182,7 +183,7 @@ public class Finalizer { try { - final short state = AnyConverter.toShort( Helper.getUnoPropertyValue( UnoDialog.getModel( xRadioDisplayQuery ), "State" ) ); + final short state = AnyConverter.toShort( Helper.getUnoPropertyValue( UnoDialog.getModel( xRadioDisplayQuery ), PropertyNames.PROPERTY_STATE ) ); final boolean viewMode = state == (short)1; return !viewMode; } diff --git a/wizards/com/sun/star/wizards/query/QuerySummary.java b/wizards/com/sun/star/wizards/query/QuerySummary.java index f570970e0fe8..f246ef327db8 100644 --- a/wizards/com/sun/star/wizards/query/QuerySummary.java +++ b/wizards/com/sun/star/wizards/query/QuerySummary.java @@ -26,12 +26,13 @@ ************************************************************************/ package com.sun.star.wizards.query; +import com.sun.star.beans.PropertyValue; import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.wizards.common.*; -//import com.sun.star.wizards.ui.FilterComponent; -import com.sun.star.wizards.ui.*; -import com.sun.star.wizards.db.*; -import com.sun.star.beans.*; +import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.Resource; +import com.sun.star.wizards.db.FieldColumn; +import com.sun.star.wizards.db.QueryMetaData; +import com.sun.star.wizards.ui.FilterComponent; public class QuerySummary extends QueryMetaData { diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index a0970534d657..bca4e1a6fa5f 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -40,6 +40,7 @@ import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.db.DatabaseObjectWizard; import com.sun.star.wizards.db.QueryMetaData; @@ -185,7 +186,7 @@ public class QueryWizard extends DatabaseObjectWizard resmsgNonNumericAsGroupBy = m_oResource.getResText(UIConsts.RID_QUERY + 88); Helper.setUnoPropertyValues(xDialogModel, new String[] { - "Height", "Moveable", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Title", "Width" + PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -226,7 +227,7 @@ public class QueryWizard extends DatabaseObjectWizard try { Object oRoadmapItem; - int CurStep = AnyConverter.toInt(Helper.getUnoPropertyValue(xDialogModel, "Step")); + int CurStep = AnyConverter.toInt(Helper.getUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_STEP)); boolean bEnabled = false; int CurItemID; for (int i = 0; i < getRMItemCount(); i++) @@ -308,7 +309,9 @@ public class QueryWizard extends DatabaseObjectWizard { try { - m_DBCommandFieldSelectio = new CommandFieldSelection(this, m_DBMetaData, 120, reslblFields, reslblSelFields, reslblTables, true, 40850); + m_DBCommandFieldSelectio = new CommandFieldSelection( + this, m_DBMetaData, 120, reslblFields, reslblSelFields, reslblTables, + m_DBMetaData.supportsQueriesInFrom(), 40850); m_DBCommandFieldSelectio.setAppendMode(true); m_DBCommandFieldSelectio.addFieldSelectionListener(new FieldSelectionListener()); m_sortingComponent = new SortingComponent(this, SOSORTING_PAGE, 95, 27, 210, 40865); @@ -467,8 +470,8 @@ public class QueryWizard extends DatabaseObjectWizard private void enableWizardSteps(String[] NewItems) { boolean bEnabled = NewItems.length > 0; - setControlProperty("btnWizardNext", "Enabled", bEnabled); - setControlProperty("btnWizardFinish", "Enabled", bEnabled); + setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, bEnabled); + setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, bEnabled); enableRoadmapItems(NewItems, bEnabled); // Note: Performancewise this could be improved } @@ -508,7 +511,7 @@ public class QueryWizard extends DatabaseObjectWizard else { boolean bEnabled = (m_groupFieldSelection.getSelectedFieldNames().length > 0); - Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPFILTER_PAGE), "Enabled", bEnabled); + Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPFILTER_PAGE), PropertyNames.PROPERTY_ENABLED, bEnabled); } } @@ -541,7 +544,7 @@ public class QueryWizard extends DatabaseObjectWizard } else { - Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPFILTER_PAGE), "Enabled", bEnabled); + Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPFILTER_PAGE), PropertyNames.PROPERTY_ENABLED, bEnabled); } } } diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index eb6ce3229ac4..ee60f3744000 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -451,7 +451,7 @@ public class DBColumn { XDependentTextField xDependent = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, oTextField); XPropertySet xMaster = xDependent.getTextFieldMaster(); - String UserFieldName = (String) xMaster.getPropertyValue("Name"); + String UserFieldName = (String) xMaster.getPropertyValue(PropertyNames.PROPERTY_NAME); boolean bIsNameCell = false; if ((UserFieldName.startsWith(CompString)) || (UserFieldName.equals(CurFieldName))) { diff --git a/wizards/com/sun/star/wizards/report/Dataimport.java b/wizards/com/sun/star/wizards/report/Dataimport.java index 7c3aeaaab073..2081b655ae7e 100644 --- a/wizards/com/sun/star/wizards/report/Dataimport.java +++ b/wizards/com/sun/star/wizards/report/Dataimport.java @@ -119,7 +119,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi Helper.setUnoPropertyValues(xDialogModel, new String[] { - "Height", "Step", "Title", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_STEP, "Title", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -132,7 +132,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblProgressDBConnection", new String[] { - "FontDescriptor", "Height", "Label", "PositionX", "PositionY", "Step", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -142,7 +142,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblProgressDataImport", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -154,7 +154,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblProgressDataImport", new String[] { - "FontDescriptor", "Height", "Label", "PositionX", "PositionY", "Step", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -164,7 +164,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblCurProgress", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -174,7 +174,7 @@ public class Dataimport extends UnoDialog2 implements com.sun.star.awt.XActionLi insertButton("cmdCancel", 10000, this, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width", "Label" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH, PropertyNames.PROPERTY_LABEL }, new Object[] { diff --git a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java index 82e478bac781..bab8a4bb240e 100644 --- a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java +++ b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java @@ -27,6 +27,7 @@ package com.sun.star.wizards.report; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.*; import com.sun.star.wizards.db.*; @@ -59,7 +60,7 @@ public class GroupFieldHandler extends FieldSelection CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblBlindTextNote_1", new String[] { - "Enabled", "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -112,7 +113,7 @@ public class GroupFieldHandler extends FieldSelection { emptyFieldsListBoxes(); GroupFieldVector.removeAllElements(); - CurUnoDialog.setControlProperty("lblBlindTextNote_1", "Enabled", new Boolean(false)); + CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, new Boolean(false)); } public void getGroupFieldNames(CommandMetaData CurDBMetaData) @@ -128,7 +129,7 @@ public class GroupFieldHandler extends FieldSelection int iSelCount = xSelectedFieldsListBox.getItemCount(); if (iSelCount >= MAXSELFIELDS) { - CurUnoDialog.setControlProperty("cmdMoveSelected" + sIncSuffix, "Enabled", Boolean.FALSE); + CurUnoDialog.setControlProperty("cmdMoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); } } @@ -161,7 +162,7 @@ public class GroupFieldHandler extends FieldSelection int iSelCount = xSelectedFieldsListBox.getItemCount(); String[] CurGroupNames = xFieldsListBox.getItems(); CurReportDocument.liveupdate_addGroupNametoDocument(CurGroupNames, CurGroupTitle, GroupFieldVector, CurReportDocument.getReportPath(), iSelCount); - CurUnoDialog.setControlProperty("lblBlindTextNote_1", "Enabled", new Boolean(true)); + CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, new Boolean(true)); if (iSelCount >= MAXSELFIELDS) { toggleMoveButtons(false, false); @@ -177,7 +178,7 @@ public class GroupFieldHandler extends FieldSelection String[] NewSelList = xSelectedFieldsListBox.getItems(); CurReportDocument.liveupdate_removeGroupName(NewSelList, OldGroupTitle, GroupFieldVector); String[] NewSelGroupNames = xSelectedFieldsListBox.getItems(); - CurUnoDialog.setControlProperty("lblBlindTextNote_1", "Enabled", new Boolean(NewSelGroupNames.length == 0)); + CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, new Boolean(NewSelGroupNames.length == 0)); // CurReportDocument.refreshGroupFields(xSelectedFieldsListBox.getItems()); } diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index 7c40c01809d2..73a32f35c029 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -90,7 +90,7 @@ public class ReportFinalizer CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblTitle", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -100,7 +100,7 @@ public class ReportFinalizer xTitleTextBox = CurUnoDialog.insertTextField("txtTitle", CHANGEREPORTTITLE_FUNCNAME, this, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -110,7 +110,7 @@ public class ReportFinalizer CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblChooseReportKind", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -120,7 +120,7 @@ public class ReportFinalizer CurUnoDialog.insertRadioButton("optCreateDocument", TOGGLESUBTEMPLATECONTROLS_FUNCNAME, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -130,7 +130,7 @@ public class ReportFinalizer CurUnoDialog.insertRadioButton("optCreateReportTemplate", TOGGLESUBTEMPLATECONTROLS_FUNCNAME, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -141,7 +141,7 @@ public class ReportFinalizer CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblHowProceed", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -152,7 +152,7 @@ public class ReportFinalizer CurUnoDialog.insertRadioButton("optEditTemplate", TOGGLESUBTEMPLATECONTROLS_FUNCNAME, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -162,7 +162,7 @@ public class ReportFinalizer CurUnoDialog.insertRadioButton("optUseTemplate", TOGGLESUBTEMPLATECONTROLS_FUNCNAME, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -177,11 +177,11 @@ public class ReportFinalizer public void toggleSubTemplateControls() { // String sStorePath = ""; - Short iState = (Short) CurUnoDialog.getControlProperty("optCreateReportTemplate", "State"); + Short iState = (Short) CurUnoDialog.getControlProperty("optCreateReportTemplate", PropertyNames.PROPERTY_STATE); boolean bDoTemplateEnable = iState.shortValue() == 1; - CurUnoDialog.setControlProperty("optEditTemplate", "Enabled", new Boolean(bDoTemplateEnable)); - CurUnoDialog.setControlProperty("optUseTemplate", "Enabled", new Boolean(bDoTemplateEnable)); - CurUnoDialog.setControlProperty("lblHowProceed", "Enabled", new Boolean(bDoTemplateEnable)); + CurUnoDialog.setControlProperty("optEditTemplate", PropertyNames.PROPERTY_ENABLED, new Boolean(bDoTemplateEnable)); + CurUnoDialog.setControlProperty("optUseTemplate", PropertyNames.PROPERTY_ENABLED, new Boolean(bDoTemplateEnable)); + CurUnoDialog.setControlProperty("lblHowProceed", PropertyNames.PROPERTY_ENABLED, new Boolean(bDoTemplateEnable)); String sTitle = xTitleTextBox.getText(); boolean bDoEnable = sTitle.equals(""); @@ -248,17 +248,17 @@ public class ReportFinalizer public int getReportOpenMode() { int ReportMode = SOCREATEDOCUMENT; - boolean bcreateTemplate = ((Short) CurUnoDialog.getControlProperty("optCreateReportTemplate", "State")).shortValue() == (short) 1; + boolean bcreateTemplate = ((Short) CurUnoDialog.getControlProperty("optCreateReportTemplate", PropertyNames.PROPERTY_STATE)).shortValue() == (short) 1; if (bcreateTemplate) { ReportMode = SOCREATETEMPLATE; } - boolean buseTemplate = ((Short) CurUnoDialog.getControlProperty("optUseTemplate", "State")).shortValue() == (short) 1; + boolean buseTemplate = ((Short) CurUnoDialog.getControlProperty("optUseTemplate", PropertyNames.PROPERTY_STATE)).shortValue() == (short) 1; if (buseTemplate) { ReportMode = SOUSETEMPLATE; } - boolean buseDocument = ((Short) CurUnoDialog.getControlProperty("optCreateDocument", "State")).shortValue() == (short) 1; + boolean buseDocument = ((Short) CurUnoDialog.getControlProperty("optCreateDocument", PropertyNames.PROPERTY_STATE)).shortValue() == (short) 1; if (buseDocument) { ReportMode = SOCREATEDOCUMENT; diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java index 355188e7e675..16180f4df91c 100644 --- a/wizards/com/sun/star/wizards/report/ReportLayouter.java +++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java @@ -92,7 +92,7 @@ public class ReportLayouter CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblContent", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -111,7 +111,7 @@ public class ReportLayouter xContentListBox = CurUnoDialog.insertListBox("lstContent", SOCONTENTLST, new ActionListenerImpl(), new ItemListenerImpl(), new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "SelectedItems", "Step", "StringItemList", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "SelectedItems", PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -124,7 +124,7 @@ public class ReportLayouter CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblLayout", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -146,7 +146,7 @@ public class ReportLayouter xLayoutListBox = CurUnoDialog.insertListBox("lstLayout", SOLAYOUTLST, new ActionListenerImpl(), new ItemListenerImpl(), new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "SelectedItems", "Step", "StringItemList", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "SelectedItems", PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -159,7 +159,7 @@ public class ReportLayouter CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblOrientation", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -170,7 +170,7 @@ public class ReportLayouter CurUnoDialog.insertRadioButton("optLandscape", SOOPTLANDSCAPE, new ItemListenerImpl(), new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -181,7 +181,7 @@ public class ReportLayouter CurUnoDialog.insertRadioButton("optPortrait", SOOPTPORTRAIT, new ItemListenerImpl(), new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -191,7 +191,7 @@ public class ReportLayouter aOrientationImage = CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlImageControlModel", "imgOrientation", new String[] { - "Border", "Height", "PositionX", "PositionY", "ScaleImage", "Step", "Width" + "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -202,7 +202,7 @@ public class ReportLayouter CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblBlindTextNote_2", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -246,7 +246,7 @@ public class ReportLayouter try { int iPos; - Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, "Enabled", new Boolean(false)); + Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(false)); // LLA: should we lock controllers here? // CurReportDocument.getDoc().xTextDocument.lockControllers(); int iKey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList); @@ -279,7 +279,7 @@ public class ReportLayouter catch (com.sun.star.lang.IllegalArgumentException e) { } - Helper.setUnoPropertyValue(aOrientationImage, "ImageURL", CurUnoDialog.getWizardImageUrl(1002, 1003)); + Helper.setUnoPropertyValue(aOrientationImage, PropertyNames.PROPERTY_IMAGEURL, CurUnoDialog.getWizardImageUrl(1002, 1003)); break; @@ -293,8 +293,8 @@ public class ReportLayouter { } - CurUnoDialog.setControlProperty("imgOrientation", "ImageURL", Desktop.getBitmapPath(m_xMSF) + "/portrait.gif"); - Helper.setUnoPropertyValue(aOrientationImage, "ImageURL", CurUnoDialog.getWizardImageUrl(1000, 1001)); + CurUnoDialog.setControlProperty("imgOrientation", PropertyNames.PROPERTY_IMAGEURL, Desktop.getBitmapPath(m_xMSF) + "/portrait.gif"); + Helper.setUnoPropertyValue(aOrientationImage, PropertyNames.PROPERTY_IMAGEURL, CurUnoDialog.getWizardImageUrl(1000, 1001)); break; default: @@ -306,7 +306,7 @@ public class ReportLayouter e.printStackTrace(); } // CurReportDocument.getDoc().unlockallControllers(); - Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, "Enabled", new Boolean(true)); + Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(true)); } public void disposing(EventObject eventObject) @@ -325,9 +325,9 @@ public class ReportLayouter { try { - Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, "Enabled", new Boolean(false)); + Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(false)); // CurReportDocument.getDoc().xTextDocument.lockControllers(); - boolean blandscape = (((Short) CurUnoDialog.getControlProperty("optLandscape", "State")).shortValue() == 1); + boolean blandscape = (((Short) CurUnoDialog.getControlProperty("optLandscape", PropertyNames.PROPERTY_STATE)).shortValue() == 1); CurReportDocument.setPageOrientation((blandscape == true) ? SOOPTLANDSCAPE : SOOPTPORTRAIT); } catch (Exception exception) @@ -335,7 +335,7 @@ public class ReportLayouter exception.printStackTrace(System.out); } // CurReportDocument.getDoc().unlockallControllers(); - Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, "Enabled", new Boolean(true)); + Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(true)); } } } diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index 05f7ad2a6a5b..ceecaf28ba4f 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -441,7 +441,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme // if (iCounter % 10 == 0) // { // sProgressCurRecord = JavaTools.replaceSubString(sProgressBaseCurRecord, String.valueOf(iCounter), "<COUNT>"); -// setControlProperty("lblCurProgress", "Label", sProgressCurRecord); +// setControlProperty("lblCurProgress", PropertyNames.PROPERTY_LABEL, sProgressCurRecord); // super.xReschedule.reschedule(); // } // } diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java index 2bffd2b4bea3..46fe77fbee38 100644 --- a/wizards/com/sun/star/wizards/report/ReportWizard.java +++ b/wizards/com/sun/star/wizards/report/ReportWizard.java @@ -28,7 +28,6 @@ package com.sun.star.wizards.report; // import java.util.Vector; - import com.sun.star.awt.TextEvent; import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XTextListener; @@ -51,8 +50,10 @@ import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.common.SystemDialog; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.db.DBMetaData; import com.sun.star.wizards.db.DatabaseObjectWizard; +import com.sun.star.wizards.db.RecordParser; import com.sun.star.wizards.db.SQLQueryComposer; import com.sun.star.wizards.ui.CommandFieldSelection; import com.sun.star.wizards.ui.FieldSelection; @@ -69,6 +70,7 @@ import java.util.Map; public class ReportWizard extends DatabaseObjectWizard implements XTextListener, XCompletion { + protected FieldSelection CurGroupFieldSelection; private SortingComponent CurSortingComponent; private TitlesComponent CurTitlesComponent; @@ -85,7 +87,6 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, private static final int SOSORTPAGE = 4; protected static final int SOTEMPLATEPAGE = 5; protected static final int SOSTOREPAGE = 6; - private IReportDocument m_reportDocument; private static String sMsgWizardName; private static String slblFields; @@ -98,24 +99,24 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, protected static boolean bCloseDocument; private boolean bHasEscapeProcessing = true; - public ReportWizard( XMultiServiceFactory i_serviceFactory, final PropertyValue[] i_wizardContext ) + public ReportWizard(XMultiServiceFactory i_serviceFactory, final PropertyValue[] i_wizardContext) { - super(i_serviceFactory, 34320, i_wizardContext ); + super(i_serviceFactory, 34320, i_wizardContext); super.addResourceHandler("Report Wizard", "dbw"); if (getReportResources(false) == true) { Helper.setUnoPropertyValues(xDialogModel, new String[] { - "Height", + PropertyNames.PROPERTY_HEIGHT, "Moveable", - "Name", - "PositionX", - "PositionY", - "Step", - "TabIndex", + PropertyNames.PROPERTY_NAME, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, "Title", - "Width" + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -193,7 +194,9 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, { // cleanup document m_reportDocument.clearDocument(); - m_reportDocument.getRecordParser().setGroupFieldNames(new String[]{}); + m_reportDocument.getRecordParser().setGroupFieldNames(new String[] + { + }); CurGroupFieldHandler.removeGroupFieldNames(); } break; @@ -248,30 +251,30 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, return; } - if ( ( nReportMode == ReportFinalizer.SOCREATETEMPLATE ) - || ( nReportMode == ReportFinalizer.SOUSETEMPLATE ) - ) + if ((nReportMode == ReportFinalizer.SOCREATETEMPLATE) + || (nReportMode == ReportFinalizer.SOUSETEMPLATE)) { m_reportDocument.addReportToDBView(); boolean bOpenInDesign = (nReportMode == ReportFinalizer.SOCREATETEMPLATE); - m_reportDocument.createAndOpenReportDocument( m_sReportName, true, bOpenInDesign); + m_reportDocument.createAndOpenReportDocument(m_sReportName, true, bOpenInDesign); } else { m_reportDocument.importReportData(this); - m_reportDocument.createAndOpenReportDocument( m_sReportName, false, false ); + m_reportDocument.createAndOpenReportDocument(m_sReportName, false, false); } } private boolean executeQuery() { boolean bQueryCreated = false; + final RecordParser recordParser = m_reportDocument.getRecordParser(); + final SQLQueryComposer sqlQueryComposer = recordParser.getSQLQueryComposer(); if (this.CurDBCommandFieldSelection.getSelectedCommandType() == CommandType.TABLE) { - bQueryCreated = m_reportDocument.getRecordParser().getSQLQueryComposer().setQueryCommand(this.xWindow, false, false); - + bQueryCreated = sqlQueryComposer.setQueryCommand(this.xWindow, false, false); m_reportDocument.setCommandType(CommandType.COMMAND); - String sQuery = m_reportDocument.getRecordParser().getSQLQueryComposer().getQuery(); + String sQuery = sqlQueryComposer.getQuery(); m_reportDocument.setCommand(sQuery); } else @@ -279,18 +282,18 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, try { String sQueryName = CurDBCommandFieldSelection.getSelectedCommandName(); - DBMetaData.CommandObject oCommand = m_reportDocument.getRecordParser().getQueryByName(sQueryName); - bHasEscapeProcessing = m_reportDocument.getRecordParser().hasEscapeProcessing(oCommand.getPropertySet()); + DBMetaData.CommandObject oCommand = recordParser.getQueryByName(sQueryName); + bHasEscapeProcessing = recordParser.hasEscapeProcessing(oCommand.getPropertySet()); String sCommand = (String) oCommand.getPropertySet().getPropertyValue("Command"); if (bHasEscapeProcessing) { // String sCommand = (String) oCommand.xPropertySet.getPropertyValue("Command"); bQueryCreated = (!sCommand.equals("")); - m_reportDocument.getRecordParser().getSQLQueryComposer().m_xQueryAnalyzer.setQuery(sCommand); - m_reportDocument.getRecordParser().getSQLQueryComposer().prependSortingCriteria(); + sqlQueryComposer.m_xQueryAnalyzer.setQuery(sCommand); + sqlQueryComposer.prependSortingCriteria(); // TODO: check with query m_reportDocument.setCommandType(CommandType.COMMAND); - m_reportDocument.setCommand(m_reportDocument.getRecordParser().getSQLQueryComposer().getQuery()); + m_reportDocument.setCommand(sqlQueryComposer.getQuery()); bQueryCreated = true; } else @@ -311,17 +314,18 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, } return bQueryCreated; } + public void buildSteps() { // CurReportDocument.getDoc().xProgressBar.setValue(30); CurDBCommandFieldSelection = new CommandFieldSelection(this, m_reportDocument.getRecordParser(), 100, slblFields, slblSelFields, slblTables, true, 34330); CurDBCommandFieldSelection.addFieldSelectionListener(new FieldSelectionListener()); - if ( !isReportBuilderInstalled() ) + if (!isReportBuilderInstalled()) { insertLabel("lblBinaryFields", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -388,7 +392,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, private boolean isReportBuilderInstalled() { //! Check if the new Report Builder Extension is available - XContentEnumerationAccess a = com.sun.star.uno.UnoRuntime.queryInterface( XContentEnumerationAccess.class, xMSF ); + XContentEnumerationAccess a = com.sun.star.uno.UnoRuntime.queryInterface(XContentEnumerationAccess.class, xMSF); com.sun.star.container.XEnumeration e = a.createContentEnumeration("com.sun.star.report.pentaho.SOReportJobFactory"); if (e == null) { @@ -411,42 +415,41 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener, // Get the path to the extension and try to add the path to the class loader final XComponentContext xComponentContext = Helper.getComponentContext(_xMSF); final Object aSingleton = xComponentContext.getValueByName("/singletons/com.sun.star.deployment.PackageInformationProvider"); - XPackageInformationProvider xProvider = UnoRuntime.queryInterface( XPackageInformationProvider.class, aSingleton ); + XPackageInformationProvider xProvider = UnoRuntime.queryInterface(XPackageInformationProvider.class, aSingleton); final String sLocation = xProvider.getPackageLocation("com.sun.reportdesigner"); return sLocation; } + private static XLogger m_xLogger; -private static XLogger m_xLogger; + private static void initializeLogger(XMultiServiceFactory _xMSF) + { + XComponentContext xContext = Helper.getComponentContext(_xMSF); -private static void initializeLogger(XMultiServiceFactory _xMSF) -{ - XComponentContext xContext = Helper.getComponentContext(_xMSF); + final Object aLoggerPool = xContext.getValueByName("/singletons/com.sun.star.logging.LoggerPool"); + if (aLoggerPool == null) + { + System.out.println("Can't get singleton from logging"); + } + final XLoggerPool xLoggerPool = UnoRuntime.queryInterface(XLoggerPool.class, aLoggerPool); + m_xLogger = xLoggerPool.getNamedLogger("com.sun.star.wizards.ReportBuilder"); + } - final Object aLoggerPool = xContext.getValueByName("/singletons/com.sun.star.logging.LoggerPool"); - if (aLoggerPool == null) + public static XLogger getLogger() { - System.out.println("Can't get singleton from logging"); + return m_xLogger; } - final XLoggerPool xLoggerPool = UnoRuntime.queryInterface( XLoggerPool.class, aLoggerPool ); - m_xLogger = xLoggerPool.getNamedLogger("com.sun.star.wizards.ReportBuilder"); -} - -public static XLogger getLogger() -{ - return m_xLogger; -} public void startReportWizard() { initializeLogger(xMSF); getLogger().log(LogLevel.SEVERE, "Start Report Wizard"); - if ( isReportBuilderInstalled() ) + if (isReportBuilderInstalled()) { // Get the path to the extension and try to add the path to the class loader String sLocation = getPathToExtension(xMSF); // TODO: Umlaut in filename! - if ( sLocation.length() > 0 ) + if (sLocation.length() > 0) { try { @@ -456,8 +459,14 @@ public static XLogger getLogger() aURLs[0] = aLocationURI.toURL(); URLClassLoader aClassLoader = new URLClassLoader(aURLs, this.getClass().getClassLoader()); Class a = aClassLoader.loadClass("com.sun.star.wizards.reportbuilder.ReportBuilderImplementation"); - Method aMethod = a.getMethod("create", new Class[] { XMultiServiceFactory.class }); - m_reportDocument = (IReportDocument) aMethod.invoke(a, new Object[] { xMSF }); + Method aMethod = a.getMethod("create", new Class[] + { + XMultiServiceFactory.class + }); + m_reportDocument = (IReportDocument) aMethod.invoke(a, new Object[] + { + xMSF + }); } catch (Exception e) { @@ -472,26 +481,28 @@ public static XLogger getLogger() if (m_reportDocument == null) { // Fallback, if there is no reportbuilder wizard implementation, we use the old wizard - m_reportDocument = new ReportTextImplementation( xMSF ); + m_reportDocument = new ReportTextImplementation(xMSF); } - m_reportDocument.initialize( m_docUI, m_oResource ); + m_reportDocument.initialize(m_docUI, m_oResource); - if ( m_reportDocument.getRecordParser().getConnection( m_wizardContext ) ) + if (m_reportDocument.getRecordParser().getConnection(m_wizardContext)) { buildSteps(); m_reportDocument.checkInvariants(); - this.CurDBCommandFieldSelection.preselectCommand( m_wizardContext, false ); + this.CurDBCommandFieldSelection.preselectCommand(m_wizardContext, false); createWindowPeer(m_reportDocument.getWizardParent()); m_reportDocument.getRecordParser().setWindowPeer(this.xControl.getPeer()); insertQueryRelatedSteps(); short RetValue = executeDialog(m_reportDocument.getFrame().getComponentWindow().getPosSize()); - if ( RetValue == 0 ) + if (RetValue == 0) + { dialogFinish(); + } } m_reportDocument.getRecordParser().dispose(); } @@ -592,7 +603,7 @@ public static XLogger getLogger() try { Object oRoadmapItem = null; - int CurStep = AnyConverter.toInt(Helper.getUnoPropertyValue(xDialogModel, "Step")); + int CurStep = AnyConverter.toInt(Helper.getUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_STEP)); boolean bEnabled = false; int CurItemID; for (int i = 0; i < getRMItemCount(); i++) @@ -608,7 +619,7 @@ public static XLogger getLogger() bEnabled = true; } - Helper.setUnoPropertyValue(oRoadmapItem, "Enabled", new Boolean(bEnabled)); + Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled)); } } catch (com.sun.star.uno.Exception exception) @@ -620,8 +631,8 @@ public static XLogger getLogger() private void enableWizardSteps(String[] NewItems) { boolean bEnabled = NewItems.length > 0; - setControlProperty("btnWizardNext", "Enabled", new Boolean(bEnabled)); - setControlProperty("btnWizardFinish", "Enabled", new Boolean(bEnabled)); + setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled)); + setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled)); enableRoadmapItems(bEnabled); // Note: Performancewise this could be improved } @@ -668,8 +679,8 @@ public static XLogger getLogger() } super.setStepEnabled(SOSORTPAGE, bdoenable); - // int nCommandType = this.CurDBCommandFieldSelection.getSelectedCommandType(); - // super.setStepEnabled(SOSORTPAGE, (nCommandType == CommandType.TABLE)); + // int nCommandType = this.CurDBCommandFieldSelection.getSelectedCommandType(); + // super.setStepEnabled(SOSORTPAGE, (nCommandType == CommandType.TABLE)); } public class FieldSelectionListener implements com.sun.star.wizards.ui.XFieldSelectionListener @@ -706,7 +717,7 @@ public static XLogger getLogger() else { boolean bEnabled = (CurGroupFieldSelection.getSelectedFieldNames().length > 0); - Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), "Enabled", new Boolean(bEnabled)); + Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled)); } } @@ -721,7 +732,7 @@ public static XLogger getLogger() else { boolean bEnabled = (CurGroupFieldSelection.getSelectedFieldNames().length > 0); - Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), "Enabled", new Boolean(bEnabled)); + Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled)); } } diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java index a10affa9ea2c..0c2e5af3bd36 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java @@ -38,7 +38,6 @@ import com.sun.star.awt.XWindow; import com.sun.star.awt.XWindowPeer; import com.sun.star.beans.Property; import com.sun.star.beans.PropertyAttribute; -import com.sun.star.beans.UnknownPropertyException; import com.sun.star.beans.XPropertySet; import com.sun.star.beans.XPropertySetInfo; import com.sun.star.container.XEnumeration; @@ -65,6 +64,7 @@ import com.sun.star.util.XNumberFormatsSupplier; import com.sun.star.wizards.common.Configuration; import com.sun.star.wizards.common.FileAccess; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.PropertySetHelper; import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.report.IReportBuilderLayouter; @@ -347,7 +347,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter { if (m_nPageWidth < 0) { - m_nPageWidth = getFromPageStyles("Width", 21000); + m_nPageWidth = getFromPageStyles(PropertyNames.PROPERTY_WIDTH, 21000); } return m_nPageWidth; } @@ -1066,16 +1066,16 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter public void setPageOrientation(int _nOrientation) { - final int nWidth = getFromPageStyles("Width", 0); - final int nHeight = getFromPageStyles("Height", 0); + final int nWidth = getFromPageStyles(PropertyNames.PROPERTY_WIDTH, 0); + final int nHeight = getFromPageStyles(PropertyNames.PROPERTY_HEIGHT, 0); if (com.sun.star.wizards.report.ReportLayouter.SOOPTLANDSCAPE == _nOrientation) { setToPageStyles("IsLandscape", Boolean.TRUE); if (nWidth < nHeight) { - setToPageStyles("Width", new Integer(nHeight)); - setToPageStyles("Height", new Integer(nWidth)); + setToPageStyles(PropertyNames.PROPERTY_WIDTH, new Integer(nHeight)); + setToPageStyles(PropertyNames.PROPERTY_HEIGHT, new Integer(nWidth)); } } else @@ -1083,8 +1083,8 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter setToPageStyles("IsLandscape", Boolean.FALSE); if (nHeight < nWidth) { - setToPageStyles("Width", new Integer(nHeight)); - setToPageStyles("Height", new Integer(nWidth)); + setToPageStyles(PropertyNames.PROPERTY_WIDTH, new Integer(nHeight)); + setToPageStyles(PropertyNames.PROPERTY_HEIGHT, new Integer(nWidth)); } } // dirty the PageWidth diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java index fa33e85d39cb..797ac097f915 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/SectionObject.java @@ -29,6 +29,7 @@ package com.sun.star.wizards.reportbuilder.layout; import com.sun.star.awt.FontDescriptor; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.PropertySetHelper; /** @@ -64,7 +65,7 @@ abstract public class SectionObject public int getHeight(int _nDefault) { - final int nHeight = getPropertySetHelper().getPropertyValueAsInteger("Height", _nDefault); + final int nHeight = getPropertySetHelper().getPropertyValueAsInteger(PropertyNames.PROPERTY_HEIGHT, _nDefault); return nHeight; } diff --git a/wizards/com/sun/star/wizards/table/CGTable.java b/wizards/com/sun/star/wizards/table/CGTable.java index a1878bdeb02f..b3e509b5b0c1 100644 --- a/wizards/com/sun/star/wizards/table/CGTable.java +++ b/wizards/com/sun/star/wizards/table/CGTable.java @@ -30,6 +30,7 @@ import com.sun.star.container.XNameAccess; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.common.Configuration; import com.sun.star.wizards.common.Desktop; +import com.sun.star.wizards.common.PropertyNames; public class CGTable { @@ -78,7 +79,7 @@ public class CGTable } else { - fieldnames = Configuration.getNodeChildNames(xNameAccessFieldsNode, "Name"); + fieldnames = Configuration.getNodeChildNames(xNameAccessFieldsNode, PropertyNames.PROPERTY_NAME); } for (int i = 0; i < fieldnames.length; i++) { diff --git a/wizards/com/sun/star/wizards/table/FieldDescription.java b/wizards/com/sun/star/wizards/table/FieldDescription.java index d26e58783aba..f816b03e8f8c 100644 --- a/wizards/com/sun/star/wizards/table/FieldDescription.java +++ b/wizards/com/sun/star/wizards/table/FieldDescription.java @@ -36,6 +36,7 @@ import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Configuration; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; public class FieldDescription { @@ -70,7 +71,7 @@ public class FieldDescription } else { - xNameAccessFieldNode = Configuration.getChildNodebyDisplayName(xMSF, aLocale, xNameAccessTableNode, keyname, "Name", _nmaxcharCount); + xNameAccessFieldNode = Configuration.getChildNodebyDisplayName(xMSF, aLocale, xNameAccessTableNode, keyname, PropertyNames.PROPERTY_NAME, _nmaxcharCount); } setFieldProperties(xNameAccessFieldNode); } @@ -80,7 +81,7 @@ public class FieldDescription Name = _fieldname; aPropertyValues = new Vector(); Type = new Integer(com.sun.star.sdbc.DataType.VARCHAR); - aPropertyValues.addElement(Properties.createProperty("Name", _fieldname)); + aPropertyValues.addElement(Properties.createProperty(PropertyNames.PROPERTY_NAME, _fieldname)); aPropertyValues.addElement(Properties.createProperty("Type", Type)); } @@ -89,7 +90,7 @@ public class FieldDescription for (int i = 0; i < aPropertyValues.size(); i++) { PropertyValue aPropertyValue = (PropertyValue) aPropertyValues.get(i); - if (aPropertyValue.Name.equals("Name")) + if (aPropertyValue.Name.equals(PropertyNames.PROPERTY_NAME)) { aPropertyValue.Value = _newfieldname; aPropertyValues.set(i, aPropertyValue); @@ -133,9 +134,9 @@ public class FieldDescription { xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _xNameAccessFieldNode); // Integer Index = (Integer) xPropertySet.getPropertyValue("Index"); - if (propertyexists("Name")) + if (propertyexists(PropertyNames.PROPERTY_NAME)) { - aPropertyValues.addElement(Properties.createProperty("Name", Name)); + aPropertyValues.addElement(Properties.createProperty(PropertyNames.PROPERTY_NAME, Name)); } if (propertyexists("Type")) { diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java b/wizards/com/sun/star/wizards/table/FieldFormatter.java index 1c79b36cba58..43349d71376f 100644 --- a/wizards/com/sun/star/wizards/table/FieldFormatter.java +++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java @@ -38,6 +38,7 @@ import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.db.TableDescriptor; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; @@ -79,7 +80,7 @@ public class FieldFormatter implements XItemListener CurUnoDialog.insertLabel("lblFieldNames", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -91,7 +92,7 @@ public class FieldFormatter implements XItemListener xlstFieldNames = CurUnoDialog.insertListBox("lstfieldnames", 3, null, this, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -109,7 +110,7 @@ public class FieldFormatter implements XItemListener btnShiftUp = CurUnoDialog.insertButton("btnShiftUp", "shiftFieldNameUp", this, new String[] { - "Enabled", "FontDescriptor", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -119,7 +120,7 @@ public class FieldFormatter implements XItemListener btnShiftDown = CurUnoDialog.insertButton("btnShiftDown", "shiftFieldNameDown", this, new String[] { - "Enabled", "FontDescriptor", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -131,7 +132,7 @@ public class FieldFormatter implements XItemListener btnminus = CurUnoDialog.insertButton("btnminus", "removeFieldName", this, new String[] { - "FontDescriptor", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -141,7 +142,7 @@ public class FieldFormatter implements XItemListener btnplus = CurUnoDialog.insertButton("btnplus", "addFieldName", this, new String[] { - "FontDescriptor", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -151,7 +152,7 @@ public class FieldFormatter implements XItemListener CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "ColDescriptorHeader", new String[] { - "Height", "Label", "Orientation", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -162,7 +163,7 @@ public class FieldFormatter implements XItemListener CurUnoDialog.insertLabel("lblFieldName", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -172,7 +173,7 @@ public class FieldFormatter implements XItemListener txtfieldname = CurUnoDialog.insertTextField("txtfieldname", MODIFYFIELDNAME, this, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Text", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -190,8 +191,8 @@ public class FieldFormatter implements XItemListener oColumnDescriptorModel = CurUnoDialog.insertControlModel("com.sun.star.sdb.ColumnDescriptorControlModel", "oColumnDescriptor", new String[] { - "Height", "PositionX", "PositionY", "Step", "TabIndex", "Width", "EditWidth" - }, // "HelpURL" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH, "EditWidth" + }, // PropertyNames.PROPERTY_HELPURL new Object[] { new Integer(85), new Integer(158), new Integer(49), IFieldFormatStep, new Short(curtabindex++), new Integer(166), new Integer(50) @@ -202,10 +203,10 @@ public class FieldFormatter implements XItemListener } else { - int nStep = ((Integer) Helper.getUnoPropertyValue(oColumnDescriptorModel, "Step")).intValue(); + int nStep = ((Integer) Helper.getUnoPropertyValue(oColumnDescriptorModel, PropertyNames.PROPERTY_STEP)).intValue(); if (nStep > IFieldFormatStep.intValue()) { - Helper.setUnoPropertyValue(oColumnDescriptorModel, "Step", IFieldFormatStep); + Helper.setUnoPropertyValue(oColumnDescriptorModel, PropertyNames.PROPERTY_STEP, IFieldFormatStep); CurUnoDialog.repaintDialogStep(); } } @@ -232,9 +233,9 @@ public class FieldFormatter implements XItemListener benableShiftUpButton = (iselpos != 0); benableShiftDownButton = (iselpos != ilistcount - 1); } - Helper.setUnoPropertyValue(UnoDialog.getModel(btnShiftUp), "Enabled", new Boolean(benableShiftUpButton)); - Helper.setUnoPropertyValue(UnoDialog.getModel(btnShiftDown), "Enabled", new Boolean(benableShiftDownButton)); - Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), "Enabled", new Boolean(blistispopulated)); + Helper.setUnoPropertyValue(UnoDialog.getModel(btnShiftUp), PropertyNames.PROPERTY_ENABLED, new Boolean(benableShiftUpButton)); + Helper.setUnoPropertyValue(UnoDialog.getModel(btnShiftDown), PropertyNames.PROPERTY_ENABLED, new Boolean(benableShiftDownButton)); + Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, new Boolean(blistispopulated)); CurUnoDialog.setcompleted(TableWizard.SOFIELDSFORMATPAGE, blistispopulated); } @@ -297,10 +298,10 @@ public class FieldFormatter implements XItemListener else { Helper.setUnoPropertyValue(UnoDialog.getModel(txtfieldname), "Text", ""); - Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), "Enabled", new Boolean(benable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, new Boolean(benable)); CurUnoDialog.setcompleted(TableWizard.SOFIELDSFORMATPAGE, benable); } - Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), "Enabled", new Boolean(benable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(btnminus), PropertyNames.PROPERTY_ENABLED, new Boolean(benable)); CurUnoDialog.setControlVisible("oColumnDescriptor", benable); CurUnoDialog.repaintDialogStep(); } @@ -314,7 +315,7 @@ public class FieldFormatter implements XItemListener if (curTableDescriptor.modifyColumnName(oldfieldname, newfieldname)) { Object oColumn = Helper.getUnoPropertyValue(oColumnDescriptorModel, "Column"); - Helper.setUnoPropertyValue(oColumn, "Name", newfieldname); + Helper.setUnoPropertyValue(oColumn, PropertyNames.PROPERTY_NAME, newfieldname); FieldDescription curfielddescription = (FieldDescription) CurUnoDialog.fielditems.get(oldfieldname); CurUnoDialog.fielditems.remove(oldfieldname); curfielddescription.setName(newfieldname); diff --git a/wizards/com/sun/star/wizards/table/Finalizer.java b/wizards/com/sun/star/wizards/table/Finalizer.java index 17db2aea61a3..340dd5d2dc7b 100644 --- a/wizards/com/sun/star/wizards/table/Finalizer.java +++ b/wizards/com/sun/star/wizards/table/Finalizer.java @@ -32,6 +32,7 @@ import com.sun.star.awt.XTextComponent; import com.sun.star.sdbc.SQLException; import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.db.TableDescriptor; import com.sun.star.wizards.ui.*; @@ -78,7 +79,7 @@ public class Finalizer CurUnoDialog.insertLabel("lblTableName", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -87,7 +88,7 @@ public class Finalizer txtTableName = CurUnoDialog.insertTextField("txtTableName", SETCOMPLETIONFLAG, this, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Text", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -114,7 +115,7 @@ public class Finalizer CurUnoDialog.insertLabel("lblCatalog", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -126,7 +127,7 @@ public class Finalizer xCatalogListBox = CurUnoDialog.insertListBox("lstCatalog", null, null, new String[] { - "Dropdown", "Height", "HelpURL", "LineCount", "PositionX", "PositionY", "Step", "StringItemList", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -169,7 +170,7 @@ public class Finalizer CurUnoDialog.insertLabel("lblSchema", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -181,7 +182,7 @@ public class Finalizer xSchemaListBox = CurUnoDialog.insertListBox("lstSchema", null, null, new String[] { - "Dropdown", "Height", "HelpURL", "LineCount", "PositionX", "PositionY", "Step", "StringItemList", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -209,7 +210,7 @@ public class Finalizer CurUnoDialog.insertLabel("lblcongratulations", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -223,7 +224,7 @@ public class Finalizer CurUnoDialog.insertLabel("lblProceed", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -232,7 +233,7 @@ public class Finalizer optWorkWithTable = CurUnoDialog.insertRadioButton("optWorkWithTable", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -241,7 +242,7 @@ public class Finalizer optModifyTable = CurUnoDialog.insertRadioButton("optModifyTable", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -250,7 +251,7 @@ public class Finalizer optStartFormWizard = CurUnoDialog.insertRadioButton("optStartFormWizard", null, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java index 2a59ece3e5f1..a4a896752dd2 100644 --- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java +++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java @@ -35,6 +35,7 @@ import com.sun.star.lang.IllegalArgumentException; import com.sun.star.uno.AnyConverter; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.db.TableDescriptor; import com.sun.star.wizards.db.TypeInspector; import com.sun.star.wizards.ui.FieldSelection; @@ -85,7 +86,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener CurUnoDialog.insertLabel("lblExplanation", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -95,7 +96,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener chkcreatePrimaryKey = CurUnoDialog.insertCheckBox("chkcreatePrimaryKey", SPRIMEKEYMODE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -105,7 +106,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener optAddAutomatically = CurUnoDialog.insertRadioButton("optAddAutomatically", SPRIMEKEYMODE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -115,7 +116,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener optUseExisting = CurUnoDialog.insertRadioButton("optUseExisting", SPRIMEKEYMODE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, //94 new Object[] { @@ -125,7 +126,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener optUseSeveral = CurUnoDialog.insertRadioButton("optUseSeveral", SPRIMEKEYMODE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -135,7 +136,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener chkApplyAutoValueAutomatic = CurUnoDialog.insertCheckBox("chkApplyAutoValueAutomatic", SPRIMEKEYMODE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, //107 new Object[] { @@ -145,7 +146,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener lblPrimeFieldName = CurUnoDialog.insertLabel("lblPrimeFieldName", new String[] { - "Enabled", "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -156,15 +157,15 @@ public class PrimaryKeyHandler implements XFieldSelectionListener new String[] { "Dropdown", - "Enabled", - "Height", - "HelpURL", + PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, "LineCount", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -183,7 +184,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener chkApplyAutoValueExisting = CurUnoDialog.insertCheckBox("chkApplyAutoValueExisting", SPRIMEKEYMODE, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, //107 new Object[] { @@ -259,10 +260,10 @@ public class PrimaryKeyHandler implements XFieldSelectionListener public void togglePrimeKeyFields() { boolean bdoEnable = (this.chkcreatePrimaryKey.getState() == 1); - Helper.setUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), "Enabled", new Boolean(bdoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), "Enabled", new Boolean(bAutoPrimaryKeysupportsAutoIncrmentation && bdoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optUseExisting), "Enabled", new Boolean(bdoEnable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(optUseSeveral), "Enabled", new Boolean(bdoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), PropertyNames.PROPERTY_ENABLED, new Boolean(bAutoPrimaryKeysupportsAutoIncrmentation && bdoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optUseExisting), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(optUseSeveral), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoEnable)); //toggle subcontrols of the radiobuttons... toggleAutomaticAutoValueCheckBox(); boolean benableSinglePrimekeyControls = bdoEnable && optUseExisting.getState(); @@ -317,7 +318,7 @@ public class PrimaryKeyHandler implements XFieldSelectionListener boolean bisAutomaticMode = false; if (chkcreatePrimaryKey.getState() == 1) { - bisAutomaticMode = ((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), "State")).shortValue() == (short) 1; + bisAutomaticMode = ((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), PropertyNames.PROPERTY_STATE)).shortValue() == (short) 1; } return bisAutomaticMode; } @@ -332,8 +333,8 @@ public class PrimaryKeyHandler implements XFieldSelectionListener boolean bischecked = false; if (chkcreatePrimaryKey.getState() == 1) { - boolean bisAutomaticMode = ((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), "State")).shortValue() == (short) 1; - boolean bisExistingMode = ((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(optUseExisting), "State")).shortValue() == (short) 1; + boolean bisAutomaticMode = ((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), PropertyNames.PROPERTY_STATE)).shortValue() == (short) 1; + boolean bisExistingMode = ((Short) Helper.getUnoPropertyValue(UnoDialog.getModel(optUseExisting), PropertyNames.PROPERTY_STATE)).shortValue() == (short) 1; if (bisAutomaticMode) { bischecked = chkApplyAutoValueAutomatic.getState() == (short) 1; @@ -353,16 +354,16 @@ public class PrimaryKeyHandler implements XFieldSelectionListener String selfieldname = lstSinglePrimeKey.getSelectedItem(); boolean bdoenable = isAutoIncrementatable(selfieldname); CurUnoDialog.setcompleted(TableWizard.SOPRIMARYKEYPAGE, lstSinglePrimeKey.getSelectedItemPos() != -1); - Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), "Enabled", new Boolean(bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable)); XPropertySet xColPropertySet = curTableDescriptor.getByName(selfieldname); boolean bIsAutoIncremented = ((Boolean) xColPropertySet.getPropertyValue("IsAutoIncrement")).booleanValue(); if (bIsAutoIncremented) { - Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), "State", new Short((short) 1)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_STATE, new Short((short) 1)); } else { - Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), "State", new Short((short) 0)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_STATE, new Short((short) 0)); } } catch (Exception e) @@ -375,9 +376,9 @@ public class PrimaryKeyHandler implements XFieldSelectionListener { try { - boolean bisAutomaticMode = AnyConverter.toBoolean(Helper.getUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), "Enabled")); + boolean bisAutomaticMode = AnyConverter.toBoolean(Helper.getUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), PropertyNames.PROPERTY_ENABLED)); boolean bdoenable = bAutoPrimaryKeysupportsAutoIncrmentation && optAddAutomatically.getState() && bisAutomaticMode; - Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), "Enabled", new Boolean(bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable)); } catch (IllegalArgumentException e) { @@ -387,11 +388,11 @@ public class PrimaryKeyHandler implements XFieldSelectionListener private void toggleSinglePrimeKeyFields(boolean _bdoenable) { - Helper.setUnoPropertyValue(UnoDialog.getModel(lblPrimeFieldName), "Enabled", new Boolean(_bdoenable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(lstSinglePrimeKey), "Enabled", new Boolean(_bdoenable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), "Enabled", new Boolean(_bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lblPrimeFieldName), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(lstSinglePrimeKey), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable)); boolean bdoenableAutoValueCheckBox = (isAutoIncrementatable(lstSinglePrimeKey.getSelectedItem()) && _bdoenable); - Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), "Enabled", new Boolean(bdoenableAutoValueCheckBox)); + Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueExisting), PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenableAutoValueCheckBox)); } private void toggleSeveralPrimeKeyFields() diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java index 8936f43e3250..9ad0506064bb 100644 --- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java +++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java @@ -42,6 +42,7 @@ import com.sun.star.wizards.common.Configuration; import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.db.TableDescriptor; import com.sun.star.wizards.ui.FieldSelection; import com.sun.star.wizards.ui.UIConsts; @@ -99,7 +100,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X lblExplanation = CurUnoDialog.insertLabel("lblScenarioExplanation", new String[] { - "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -109,7 +110,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X lblCategories = CurUnoDialog.insertLabel("lblCategories", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -119,7 +120,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X optBusiness = CurTableWizardUnoDialog.insertRadioButton("optBusiness", SELECTCATEGORY, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -129,7 +130,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X optPrivate = CurTableWizardUnoDialog.insertRadioButton("optPrivate", SELECTCATEGORY, this, new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -139,7 +140,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X CurUnoDialog.insertLabel("lblTableNames", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -151,7 +152,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X xTableListBox = CurUnoDialog.insertListBox("lstTableNames", 3, null, this, new String[] { - "Dropdown", "Height", "HelpURL", "LineCount", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java b/wizards/com/sun/star/wizards/table/TableWizard.java index 1444cc946675..ebcb28ca48b1 100644 --- a/wizards/com/sun/star/wizards/table/TableWizard.java +++ b/wizards/com/sun/star/wizards/table/TableWizard.java @@ -79,7 +79,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener, Helper.setUnoPropertyValues(xDialogModel, new String[] { - "Height", "Moveable", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Title", "Width" + PropertyNames.PROPERTY_HEIGHT, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.java b/wizards/com/sun/star/wizards/text/TextFieldHandler.java index 5d8c677c621e..e25227516058 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.java +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.java @@ -49,6 +49,7 @@ import com.sun.star.util.DateTime; import com.sun.star.util.XRefreshable; import com.sun.star.util.XUpdatable; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; public class TextFieldHandler { @@ -118,7 +119,7 @@ public class TextFieldHandler // try // { // XPropertySet xTestProp = xDepField.getTextFieldMaster(); -// String UserFieldName = (String) xTestProp.getPropertyValue("Name"); +// String UserFieldName = (String) xTestProp.getPropertyValue(PropertyNames.PROPERTY_NAME); // // UserFieldName == FieldName? // int dummy = 0; // } @@ -138,11 +139,11 @@ public class TextFieldHandler { Object oMaster = xMSFDoc.createInstance("com.sun.star.text.FieldMaster.User"); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oMaster); - xPSet.setPropertyValue("Name", FieldName); + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, FieldName); xPSet.setPropertyValue("Content", FieldTitle); // DEBUG - // String sFieldName = (String)xPSet.getPropertyValue("Name"); + // String sFieldName = (String)xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME); return xPSet; } @@ -210,7 +211,7 @@ public class TextFieldHandler { try { - XDependentTextField[] xDependentTextFields = getTextFieldsByProperty("Name", _FieldName, "String"); + XDependentTextField[] xDependentTextFields = getTextFieldsByProperty(PropertyNames.PROPERTY_NAME, _FieldName, "String"); if (xDependentTextFields != null) { for (int i = 0; i < xDependentTextFields.length; i++) diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java index f59d06772a83..69583f14c8bd 100644 --- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java +++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java @@ -84,7 +84,7 @@ public class AggregateComponent extends ControlScroller optDetailQuery = CurUnoDialog.insertRadioButton("optDetailQuery", 0, new ActionListenerImpl(), new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -94,7 +94,7 @@ public class AggregateComponent extends ControlScroller optSummaryQuery = CurUnoDialog.insertRadioButton("optSummaryQuery", 0, new ActionListenerImpl(), new String[] { - "Height", "HelpURL", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -103,7 +103,7 @@ public class AggregateComponent extends ControlScroller CurUnoDialog.insertLabel("lblAggregate", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -112,7 +112,7 @@ public class AggregateComponent extends ControlScroller CurUnoDialog.insertLabel("lblFieldnames", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -127,7 +127,7 @@ public class AggregateComponent extends ControlScroller CurUnoDialog.insertButton("btnplus", SOADDROW, new ActionListenerImpl(), new String[] { - "FontDescriptor", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -136,7 +136,7 @@ public class AggregateComponent extends ControlScroller CurUnoDialog.insertButton("btnminus", SOREMOVEROW, new ActionListenerImpl(), new String[] { - "FontDescriptor", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -152,7 +152,7 @@ public class AggregateComponent extends ControlScroller public int getQueryType() { - if (((Short) CurUnoDialog.getControlProperty("optDetailQuery", "State")).intValue() == 1) + if (((Short) CurUnoDialog.getControlProperty("optDetailQuery", PropertyNames.PROPERTY_STATE)).intValue() == 1) { return QueryMetaData.QueryType.SODETAILQUERY; } @@ -280,14 +280,14 @@ public class AggregateComponent extends ControlScroller ControlRow curcontrolrow = null; boolean biscomplete = true; CurDBMetaData.Type = getQueryType(); - CurUnoDialog.setControlProperty("btnminus", "Enabled", new Boolean((super.getTotalFieldCount() > 0) && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY))); + CurUnoDialog.setControlProperty("btnminus", PropertyNames.PROPERTY_ENABLED, new Boolean((super.getTotalFieldCount() > 0) && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY))); int fieldcount = super.getCurFieldCount(); if (fieldcount > 0) { curcontrolrow = (ControlRow) ControlRowVector.elementAt(super.getCurFieldCount() - 1); biscomplete = curcontrolrow.isComplete(); } - CurUnoDialog.setControlProperty("btnplus", "Enabled", new Boolean(biscomplete && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY))); + CurUnoDialog.setControlProperty("btnplus", PropertyNames.PROPERTY_ENABLED, new Boolean(biscomplete && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY))); togglefollowingDialogSteps(); } @@ -295,8 +295,8 @@ public class AggregateComponent extends ControlScroller { CurDBMetaData.Type = getQueryType(); boolean benableComponent = isAggregateComponentEnabled(); - CurUnoDialog.setControlProperty("lblAggregate", "Enabled", new Boolean(benableComponent)); - CurUnoDialog.setControlProperty("lblFieldnames", "Enabled", new Boolean(benableComponent)); + CurUnoDialog.setControlProperty("lblAggregate", PropertyNames.PROPERTY_ENABLED, new Boolean(benableComponent)); + CurUnoDialog.setControlProperty("lblFieldnames", PropertyNames.PROPERTY_ENABLED, new Boolean(benableComponent)); toggleButtons(); super.toggleComponent(benableComponent); super.toggleControls(benableComponent); @@ -528,7 +528,7 @@ public class AggregateComponent extends ControlScroller xFunctionListBox = CurUnoDialog.insertListBox(getFunctionControlName(index), 1, null, new ItemListenerImpl(), new String[] { - "Dropdown", "Height", "HelpURL", "PositionX", "PositionY", "Step", "StringItemList", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "StringItemList", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -538,7 +538,7 @@ public class AggregateComponent extends ControlScroller xFieldListBox = CurUnoDialog.insertListBox(getFieldsControlName(index), 1, null, new ItemListenerImpl(), new String[] { - "Dropdown", "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java b/wizards/com/sun/star/wizards/ui/ButtonList.java index 770210e04706..41062757f0cf 100644 --- a/wizards/com/sun/star/wizards/ui/ButtonList.java +++ b/wizards/com/sun/star/wizards/ui/ButtonList.java @@ -40,9 +40,11 @@ import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.IRenderer; import com.sun.star.wizards.common.PropertySetHelper; +import com.sun.star.wizards.common.PropertyNames; import javax.swing.ListModel; import javax.swing.event.ListDataEvent; import com.sun.star.wizards.common.HelpIds; +import com.sun.star.wizards.common.PropertyNames; /** * @@ -120,15 +122,15 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener lblImageText = dialog.insertLabel(m_aControlName + "_imageText", new String[] { - "Height", - "HelpURL", - "Label", - "PositionX", - "PositionY", - "Step", - "TabIndex", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, "Tabstop", - "Width" + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -148,14 +150,14 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener { final String[] pNames1 = new String[] { - "Height", - "HelpURL", - "PositionX", - "PositionY", - "Step", - "TabIndex", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, "Tabstop", - "Width" + PropertyNames.PROPERTY_WIDTH }; final Integer btnSize = Integer.valueOf(14); @@ -198,8 +200,8 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener }); Helper.setUnoPropertyValue(getModel(lblCounter), "Align", new Short((short) 1)); - Helper.setUnoPropertyValue(getModel(btnBack), "Label", "<"); - Helper.setUnoPropertyValue(getModel(btnNext), "Label", ">"); + Helper.setUnoPropertyValue(getModel(btnBack), PropertyNames.PROPERTY_LABEL, "<"); + Helper.setUnoPropertyValue(getModel(btnNext), PropertyNames.PROPERTY_LABEL, ">"); } @@ -238,17 +240,17 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener { /* "Border", */ /* "BackgroundColor", */ - "Height", - "HelpURL", - /* "Label", */ - "PositionX", - "PositionY", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + /* PropertyNames.PROPERTY_LABEL, */ + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, /* "ScaleImage", */ - "Step", - "TabIndex", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, "Tabstop", "Toggle", - "Width" + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -306,16 +308,16 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener { if (oResources.length == 1) { - Helper.setUnoPropertyValue(m_aButtons[i].getModel(), "ImageURL", (String) oResources[0]); + Helper.setUnoPropertyValue(m_aButtons[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, (String) oResources[0]); } else if (oResources.length == 2) { oUnoDialog.getPeerConfiguration().setImageUrl(m_aButtons[i].getModel(), oResources[0], oResources[1]); -// Helper.setUnoPropertyValue(m_aButtons[i].getModel(), "ImageURL", oResources[0]); +// Helper.setUnoPropertyValue(m_aButtons[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, oResources[0]); } boolean bTabStop = Boolean.TRUE; // focusable ? Boolean.TRUE : Boolean.FALSE; Helper.setUnoPropertyValue(m_aButtons[i].getModel(), "Tabstop", bTabStop); - // Object aEnabled = Helper.getUnoPropertyValue(m_aButtons[i].getModel(), "Enabled"); + // Object aEnabled = Helper.getUnoPropertyValue(m_aButtons[i].getModel(), PropertyNames.PROPERTY_ENABLED); if (refreshOverNull) { setVisible(m_aButtons[i], true); @@ -328,7 +330,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener private void refreshCounterText() { - Helper.setUnoPropertyValue(getModel(lblCounter), "Label", counterRenderer.render(new Counter(pageStart + 1, pageEnd(), listModel.getSize()))); + Helper.setUnoPropertyValue(getModel(lblCounter), PropertyNames.PROPERTY_LABEL, counterRenderer.render(new Counter(pageStart + 1, pageEnd(), listModel.getSize()))); } private int pageEnd() @@ -674,7 +676,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener { Object item = m_nCurrentSelection >= 0 ? getListModel().getElementAt(m_nCurrentSelection) : null; final String sText = " " + renderer.render(item); - Helper.setUnoPropertyValue(getModel(lblImageText), "Label", sText); + Helper.setUnoPropertyValue(getModel(lblImageText), PropertyNames.PROPERTY_LABEL, sText); } /** @@ -723,7 +725,7 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener private void enable(Object control, Boolean enable) { - Helper.setUnoPropertyValue(getModel(control), "Enabled", enable); + Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_ENABLED, enable); } private Object getModel(Object control) @@ -858,12 +860,12 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener if (i == m_nCurrentSelection) { final short one = 1; - aHelper.setPropertyValueDontThrow("State", Short.valueOf(one)); + aHelper.setPropertyValueDontThrow(PropertyNames.PROPERTY_STATE, Short.valueOf(one)); } else { final short zero = 0; - aHelper.setPropertyValueDontThrow("State", Short.valueOf(zero)); + aHelper.setPropertyValueDontThrow(PropertyNames.PROPERTY_STATE, Short.valueOf(zero)); } } } @@ -881,15 +883,15 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener XControlModel xModel = (XControlModel)UnoDialog2.getModel(actionEvent.Source); PropertySetHelper aHelper = new PropertySetHelper(xModel); - int nState = aHelper.getPropertyValueAsInteger("State", -1); + int nState = aHelper.getPropertyValueAsInteger(PropertyNames.PROPERTY_STATE, -1); if (nState == 0) { // this will avoid a wrong state, if already pressed. - aHelper.setPropertyValueDontThrow("State", Short.valueOf((short)1)); + aHelper.setPropertyValueDontThrow(PropertyNames.PROPERTY_STATE, Short.valueOf((short)1)); } // check which Button is pressed. - String sControlName = aHelper.getPropertyValueAsString("Name", ""); + String sControlName = aHelper.getPropertyValueAsString(PropertyNames.PROPERTY_NAME, ""); final String sButton = sControlName.substring(7 + m_aControlName.length()); int nButton = new Integer(sButton).intValue(); diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java index c239c9fec4d2..5a2457a18d76 100644 --- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java @@ -138,7 +138,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator xlblTable = CurUnoDialog.insertLabel(sTableLabelName, new String[] { - "Enabled", "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -148,7 +148,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator xTableListBox = CurUnoDialog.insertListBox(sTableListBoxName, 0, null, new ItemListenerImpl(), new String[] { - "Dropdown", "Enabled", "Height", "HelpURL", "LineCount", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -366,8 +366,8 @@ public class CommandFieldSelection extends FieldSelection implements Comparator public void toggleCommandListBox(boolean _bdoenable) { - Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "Enabled", new Boolean(_bdoenable)); - Helper.setUnoPropertyValue(UnoDialog.getModel(xlblTable), "Enabled", new Boolean(_bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable)); + Helper.setUnoPropertyValue(UnoDialog.getModel(xlblTable), PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable)); } public String getSelectedCommandName() diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.java b/wizards/com/sun/star/wizards/ui/ControlScroller.java index aff4de7127c9..b2a736fcfb0a 100644 --- a/wizards/com/sun/star/wizards/ui/ControlScroller.java +++ b/wizards/com/sun/star/wizards/ui/ControlScroller.java @@ -118,7 +118,7 @@ public abstract class ControlScroller oImgControl = CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlImageControlModel", "imgBackground" + sIncSuffix, new String[] { - "Border", "Height", "PositionX", "PositionY", "Step", "Width" + "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -130,7 +130,7 @@ public abstract class ControlScroller new AdjustmentListenerImpl(), new String[] { - "Border", "Enabled", "Height", "HelpURL", "Orientation", "PositionX", "PositionY", "Step", "Width" + "Border", PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -178,7 +178,7 @@ public abstract class ControlScroller { Helper.setUnoPropertyValues(UnoDialog.getModel(xScrollBar), new String[] { - "Enabled", "BlockIncrement", "LineIncrement", "ScrollValue", "ScrollValueMax" + PropertyNames.PROPERTY_ENABLED, "BlockIncrement", "LineIncrement", "ScrollValue", "ScrollValueMax" }, new Object[] { Boolean.TRUE, new Integer(nblockincrement), new Integer(nlineincrement), new Integer(nscrollvalue), new Integer(ntotfieldcount - nblockincrement) @@ -188,7 +188,7 @@ public abstract class ControlScroller { Helper.setUnoPropertyValues(UnoDialog.getModel(xScrollBar), new String[] { - "Enabled", "ScrollValue" + PropertyNames.PROPERTY_ENABLED, "ScrollValue" }, new Object[] { Boolean.FALSE, new Integer(nscrollvalue) @@ -286,7 +286,7 @@ public abstract class ControlScroller { Helper.setUnoPropertyValues(UnoDialog.getModel(xScrollBar), new String[] { - "Enabled", "ScrollValueMax" + PropertyNames.PROPERTY_ENABLED, "ScrollValueMax" }, new Object[] { Boolean.TRUE, new Integer(ntotfieldcount - nblockincrement) @@ -294,14 +294,14 @@ public abstract class ControlScroller } else { - Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), "Enabled", Boolean.FALSE); + Helper.setUnoPropertyValue(UnoDialog.getModel(xScrollBar), PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); } } protected void toggleComponent(boolean _bdoenable) { boolean bdoenable = _bdoenable && (ntotfieldcount > nblockincrement); - CurUnoDialog.setControlProperty("TitleScrollBar" + sIncSuffix, "Enabled", new Boolean(bdoenable)); + CurUnoDialog.setControlProperty("TitleScrollBar" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(bdoenable)); } protected void toggleControls(boolean _bdoenable) @@ -312,7 +312,7 @@ public abstract class ControlScroller for (int m = 0; m < curproperties.length; m++) { PropertyValue curproperty = curproperties[m]; - CurUnoDialog.setControlProperty(curproperty.Name, "Enabled", new Boolean(_bdoenable)); + CurUnoDialog.setControlProperty(curproperty.Name, PropertyNames.PROPERTY_ENABLED, new Boolean(_bdoenable)); } } @@ -340,7 +340,7 @@ public abstract class ControlScroller this.nblockincrement = _nblockincrement; Helper.setUnoPropertyValues(UnoDialog.getModel(xScrollBar), new String[] { - "Enabled", "BlockIncrement", "ScrollValueMax" + PropertyNames.PROPERTY_ENABLED, "BlockIncrement", "ScrollValueMax" }, new Object[] { new Boolean(ntotfieldcount > nblockincrement), new Integer(nblockincrement), new Integer(ntotfieldcount - nblockincrement) diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java b/wizards/com/sun/star/wizards/ui/FieldSelection.java index ce3c7c8c4849..6ec242243adb 100644 --- a/wizards/com/sun/star/wizards/ui/FieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java @@ -78,7 +78,7 @@ public class FieldSelection public void itemStateChanged(com.sun.star.awt.ItemEvent EventObject) { // int iPos; - com.sun.star.wizards.common.Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, "Enabled", Boolean.FALSE); + com.sun.star.wizards.common.Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); int iKey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList); switch (iKey) { @@ -93,7 +93,7 @@ public class FieldSelection default: break; } - com.sun.star.wizards.common.Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, "Enabled", Boolean.TRUE); + com.sun.star.wizards.common.Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); } public void disposing(com.sun.star.lang.EventObject eventObject) @@ -226,7 +226,7 @@ public class FieldSelection CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblFields" + sIncSuffix, new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -237,7 +237,7 @@ public class FieldSelection xFieldsListBox = CurUnoDialog.insertListBox("lstFields" + sIncSuffix, SOFLDSLST, new ActionListenerImpl(), new ItemListenerImpl(), new String[] { - "Height", "HelpURL", "MultiSelection", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "MultiSelection", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -247,7 +247,7 @@ public class FieldSelection Object btnmoveselected = CurUnoDialog.insertButton("cmdMoveSelected" + sIncSuffix, SOCMDMOVESEL, new ActionListenerImpl(), new String[] { - "Enabled", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -259,7 +259,7 @@ public class FieldSelection btnmoveall = CurUnoDialog.insertButton("cmdMoveAll" + sIncSuffix, SOCMDMOVEALL, new ActionListenerImpl(), new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -269,7 +269,7 @@ public class FieldSelection Object btnremoveselected = CurUnoDialog.insertButton("cmdRemoveSelected" + sIncSuffix, SOCMDREMOVESEL, new ActionListenerImpl(), new String[] { - "Enabled", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -281,7 +281,7 @@ public class FieldSelection btnremoveall = CurUnoDialog.insertButton("cmdRemoveAll" + sIncSuffix, SOCMDREMOVEALL, new ActionListenerImpl(), new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -296,7 +296,7 @@ public class FieldSelection CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblSelFields" + sIncSuffix, new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -307,7 +307,7 @@ public class FieldSelection xSelectedFieldsListBox = CurUnoDialog.insertListBox("lstSelFields" + sIncSuffix, SOSELFLDSLST, new ActionListenerImpl(), new ItemListenerImpl(), new String[] { - "Height", "HelpURL", "MultiSelection", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "MultiSelection", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -317,7 +317,7 @@ public class FieldSelection Object btnmoveup = CurUnoDialog.insertButton("cmdMoveUp" + sIncSuffix, SOCMDMOVEUP, new ActionListenerImpl(), new String[] { - "Enabled", "FontDescriptor", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -327,7 +327,7 @@ public class FieldSelection Object btnmovedown = CurUnoDialog.insertButton("cmdMoveDown" + sIncSuffix, SOCMDMOVEDOWN, new ActionListenerImpl(), new String[] { - "Enabled", "FontDescriptor", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -422,10 +422,10 @@ public class FieldSelection { try { - CurUnoDialog.setControlProperty("lblFields" + sIncSuffix, "Enabled", BDoEnable); - CurUnoDialog.setControlProperty("lblSelFields" + sIncSuffix, "Enabled", BDoEnable); - CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, "Enabled", BDoEnable); - CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, "Enabled", BDoEnable); + CurUnoDialog.setControlProperty("lblFields" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, BDoEnable); + CurUnoDialog.setControlProperty("lblSelFields" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, BDoEnable); + CurUnoDialog.setControlProperty("lstFields" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, BDoEnable); + CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, BDoEnable); if (BDoEnable.booleanValue() == true) { @@ -433,8 +433,8 @@ public class FieldSelection } else { - CurUnoDialog.setControlProperty("cmdRemoveAll" + sIncSuffix, "Enabled", BDoEnable); - CurUnoDialog.setControlProperty("cmdRemoveSelected" + sIncSuffix, "Enabled", BDoEnable); + CurUnoDialog.setControlProperty("cmdRemoveAll" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, BDoEnable); + CurUnoDialog.setControlProperty("cmdRemoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, BDoEnable); toggleMoveButtons(BDoEnable.booleanValue(), BDoEnable.booleanValue()); } } @@ -466,11 +466,11 @@ public class FieldSelection bmoveUpenabled = ((iSelIndices[0] > 0) && (iSelIndices.length == 1)); bmoveDownenabled = (((iSelIndices[SelListBoxSelLength - 1]) < (short) (SelectCount - 1)) && (iSelIndices.length == 1)); } - CurUnoDialog.setControlProperty("cmdRemoveAll" + sIncSuffix, "Enabled", new Boolean(SelectCount >= 1)); - CurUnoDialog.setControlProperty("cmdRemoveSelected" + sIncSuffix, "Enabled", new Boolean(bSelectSelected)); + CurUnoDialog.setControlProperty("cmdRemoveAll" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(SelectCount >= 1)); + CurUnoDialog.setControlProperty("cmdRemoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(bSelectSelected)); toggleMoveButtons((FieldCount >= 1), bIsFieldSelected); - CurUnoDialog.setControlProperty("cmdMoveUp" + sIncSuffix, "Enabled", new Boolean(bmoveUpenabled)); - CurUnoDialog.setControlProperty("cmdMoveDown" + sIncSuffix, "Enabled", new Boolean(bmoveDownenabled)); + CurUnoDialog.setControlProperty("cmdMoveUp" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(bmoveUpenabled)); + CurUnoDialog.setControlProperty("cmdMoveDown" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(bmoveDownenabled)); } catch (Exception exception) { @@ -482,8 +482,8 @@ public class FieldSelection { boolean btoggleMoveAll = (((xFieldsListBox.getItemCount() + xSelectedFieldsListBox.getItemCount()) < maxfieldcount) && (_btoggleMoveAll)); boolean btoggleMoveSelected = (((xFieldsListBox.getSelectedItems().length + xSelectedFieldsListBox.getItemCount()) < maxfieldcount) && (_btoggleMoveSelected)); - CurUnoDialog.setControlProperty("cmdMoveAll" + sIncSuffix, "Enabled", new Boolean(btoggleMoveAll)); - CurUnoDialog.setControlProperty("cmdMoveSelected" + sIncSuffix, "Enabled", new Boolean(btoggleMoveSelected)); + CurUnoDialog.setControlProperty("cmdMoveAll" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(btoggleMoveAll)); + CurUnoDialog.setControlProperty("cmdMoveSelected" + sIncSuffix, PropertyNames.PROPERTY_ENABLED, new Boolean(btoggleMoveSelected)); } public void setMultipleMode(boolean _bisMultiple) diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index e53f0792e268..8dfc12e21fb3 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -52,6 +52,7 @@ import com.sun.star.wizards.common.NumberFormatter; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.HelpIds; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.db.FieldColumn; import com.sun.star.wizards.db.QueryMetaData; import com.sun.star.wizards.db.SQLQueryComposer; @@ -111,6 +112,7 @@ public class FilterComponent final int SO_THIRDBOOLFIELDNAME = 256 + 3; final int SO_FOURTHBOOLFIELDNAME = 256 + 4; int SO_BOOLEANLIST[] = + { SO_FIRSTBOOLFIELDNAME, SO_SECONDBOOLFIELDNAME, SO_THIRDBOOLFIELDNAME, SO_FOURTHBOOLFIELDNAME }; @@ -121,6 +123,7 @@ public class FilterComponent class ItemListenerImpl implements com.sun.star.awt.XItemListener { + public void itemStateChanged(com.sun.star.awt.ItemEvent EventObject) { int iKey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList); @@ -221,7 +224,7 @@ public class FilterComponent { XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, _oSourceevent); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControl.getModel()); - final String sName = AnyConverter.toString(xPSet.getPropertyValue("Name")); + final String sName = AnyConverter.toString(xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME)); return sName; } catch (Exception e) @@ -245,11 +248,11 @@ public class FilterComponent final XPropertyContainer column = (XPropertyContainer) UnoRuntime.queryInterface(XPropertyContainer.class, oQueryMetaData.xMSF.createInstance(serviceName)); column.addProperty("Type", PropertyAttribute.BOUND, DataType.VARCHAR); - column.addProperty("Name", PropertyAttribute.BOUND, ""); - column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), null ); + column.addProperty(PropertyNames.PROPERTY_NAME, PropertyAttribute.BOUND, ""); + column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), null); final XPropertySet columnSet = UnoRuntime.queryInterface(XPropertySet.class, column); - if ( composer.getQuery().length() == 0) + if (composer.getQuery().length() == 0) { final String fromClause = composer.getFromClause(); StringBuilder sql = new StringBuilder(); @@ -258,7 +261,9 @@ public class FilterComponent sql.append(fromClause); composer.getQueryComposer().setElementaryQuery(sql.toString()); } - composer.getQueryComposer().setStructuredFilter( new PropertyValue[][] {} ); + composer.getQueryComposer().setStructuredFilter(new PropertyValue[][] + { + }); for (int i = 0; i < RowCount; i++) { ControlRow currentControlRow = oControlRows[i]; @@ -269,30 +274,31 @@ public class FilterComponent String sFieldName = currentControlRow.getSelectedFieldName(); int nOperator = (int) currentControlRow.getSelectedOperator(); FieldColumn aFieldColumn = oQueryMetaData.getFieldColumnByDisplayName(sFieldName); - columnSet.setPropertyValue("Name", aFieldColumn.getFieldName()); + columnSet.setPropertyValue(PropertyNames.PROPERTY_NAME, aFieldColumn.getFieldName()); columnSet.setPropertyValue("Type", aFieldColumn.getXColumnPropertySet().getPropertyValue("Type")); Object value = currentControlRow.getValue(); - switch(aFieldColumn.getFieldType()) + switch (aFieldColumn.getFieldType()) { case DataType.TIMESTAMP: case DataType.DATE: - value = ((Double)value) - oQueryMetaData.getNullDateCorrection(); + value = ((Double) value) - oQueryMetaData.getNullDateCorrection(); break; } - column.removeProperty( "Value" ); + column.removeProperty("Value"); final short operator = currentControlRow.getSelectedOperator(); - if ( ( operator == SQLFilterOperator.SQLNULL ) - || ( operator == SQLFilterOperator.NOT_SQLNULL ) - || AnyConverter.isVoid( value ) - ) + if ((operator == SQLFilterOperator.SQLNULL) + || (operator == SQLFilterOperator.NOT_SQLNULL) + || AnyConverter.isVoid(value)) { - column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), new String() ); - value = new Any( new Type( TypeClass.VOID ), null ); + column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), new String()); + value = new Any(new Type(TypeClass.VOID), null); } else - column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), value ); + { + column.addProperty("Value", (short) (PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE), value); + } columnSet.setPropertyValue("Value", value); - composer.getQueryComposer().appendFilterByColumn(columnSet, getfilterstate() == this.SOI_MATCHALL,nOperator); + composer.getQueryComposer().appendFilterByColumn(columnSet, getfilterstate() == this.SOI_MATCHALL, nOperator); } } } @@ -304,7 +310,9 @@ public class FilterComponent String smsgDuplicateCondition = getDisplayCondition(sDuplicateCondition, aduplicatecondition, null); CurUnoDialog.showMessageBox("WarningBox", VclWindowPeerAttribute.OK, smsgDuplicateCondition); CurUnoDialog.vetoableChange(new java.beans.PropertyChangeEvent(CurUnoDialog, "Steps", Integer.valueOf(1), Integer.valueOf(2))); - return new PropertyValue[][]{}; + return new PropertyValue[][] + { + }; } } catch (Exception ex) @@ -334,10 +342,12 @@ public class FilterComponent FieldName = _filtercondition.Name; } String sreturn = JavaTools.replaceSubString(_BaseString, FieldName, "<FIELDNAME>"); - String soperator = sLogicOperators[_filtercondition.Handle - 1]; + String soperator = sLogicOperators[_filtercondition.Handle-1]; sreturn = JavaTools.replaceSubString(sreturn, soperator, "<LOGICOPERATOR>"); String sDisplayValue = ""; - if (!AnyConverter.isVoid(_filtercondition.Value)) + if ((_filtercondition.Handle != SQLFilterOperator.SQLNULL) + && (_filtercondition.Handle != SQLFilterOperator.NOT_SQLNULL) + && !AnyConverter.isVoid(_filtercondition.Value)) { sDisplayValue = AnyConverter.toString(_filtercondition.Value); } @@ -419,15 +429,15 @@ public class FilterComponent CurUnoDialog.insertRadioButton("optMatchAll" + sIncSuffix, SOOPTANDMODE, new ItemListenerImpl(), new String[] { - "Height", - "HelpURL", - "Label", - "PositionX", - "PositionY", - "State", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STATE, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -444,14 +454,14 @@ public class FilterComponent optMatchAny = CurUnoDialog.insertRadioButton("optMatchAny" + sIncSuffix, SOOPTORMODE, new ItemListenerImpl(), new String[] { - "Height", - "HelpURL", - "Label", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -531,6 +541,7 @@ public class FilterComponent // ------------------------------------------------------------------------- final class ControlRow { + private final static int SOLSTFIELDNAME = 3; private final static int SOLSTOPERATOR = 4; private final static int SOTXTVALUE = 5; @@ -558,14 +569,14 @@ public class FilterComponent ControlElements[0] = (XInterface) CurUnoDialog.insertLabel("lblFieldNames" + sCompSuffix, new String[] { - "Enabled", - "Height", - "Label", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -583,14 +594,14 @@ public class FilterComponent ControlElements[1] = (XInterface) CurUnoDialog.insertLabel("lblOperators" + sCompSuffix, new String[] { - "Enabled", - "Height", - "Label", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -608,14 +619,14 @@ public class FilterComponent ControlElements[2] = (XInterface) CurUnoDialog.insertLabel("lblValue" + sCompSuffix, new String[] { - "Enabled", - "Height", - "Label", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_LABEL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -633,16 +644,16 @@ public class FilterComponent ControlElements[SOLSTFIELDNAME] = (XInterface) CurUnoDialog.insertListBox("lstFieldName" + sCompSuffix, SO_FIELDNAMELIST[Index], null, new ItemListenerImpl(), new String[] { - "Enabled", + PropertyNames.PROPERTY_ENABLED, "Dropdown", - "Height", - "HelpURL", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, "LineCount", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -662,17 +673,17 @@ public class FilterComponent ControlElements[SOLSTOPERATOR] = (XInterface) CurUnoDialog.insertListBox("lstOperator" + sCompSuffix, SO_CONDITIONLIST[Index], null, new ItemListenerImpl(), new String[] { - "Enabled", + PropertyNames.PROPERTY_ENABLED, "Dropdown", - "Height", - "HelpURL", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, "LineCount", - "PositionX", - "PositionY", - "Step", + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, "StringItemList", - "TabIndex", - "Width" + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -691,14 +702,14 @@ public class FilterComponent ControlElements[SOTXTVALUE] = (XInterface) CurUnoDialog.insertFormattedField("txtValue" + sCompSuffix, SO_TEXTFIELDLIST[Index], new TextListenerImpl(), new String[] { - "Enabled", - "Height", - "HelpURL", - "PositionX", - "PositionY", - "Step", - "TabIndex", - "Width" + PropertyNames.PROPERTY_ENABLED, + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -736,16 +747,16 @@ public class FilterComponent { // disable value field - Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[2]), "Enabled", Boolean.FALSE); - Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "Enabled", Boolean.FALSE); + Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[2]), PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); + Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); return true; } else { // enable value field - Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[2]), "Enabled", Boolean.TRUE); - Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "Enabled", Boolean.TRUE); + Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[2]), PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); + Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), PropertyNames.PROPERTY_ENABLED, Boolean.TRUE); } if (nSelOperator != -1) { @@ -849,7 +860,7 @@ public class FilterComponent // enable all Controls Fieldname, operator, value for (int i = 0; i < ControlElements.length; i++) { - Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[i]), "Enabled", Boolean.valueOf(_bEnabled)); + Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[i]), PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(_bEnabled)); } m_bEnabled = _bEnabled; if (isEnabled()) diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java b/wizards/com/sun/star/wizards/ui/ImageList.java index 56e2edb3172f..9d42aa45599e 100644 --- a/wizards/com/sun/star/wizards/ui/ImageList.java +++ b/wizards/com/sun/star/wizards/ui/ImageList.java @@ -45,6 +45,7 @@ import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.HelpIds; import com.sun.star.wizards.common.IRenderer; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.event.*; @@ -163,11 +164,11 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener { "BackgroundColor", "Border", - "Height", - "PositionX", - "PositionY", - "Step", - "Width" + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -190,7 +191,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener //XWindow win = (XWindow)UnoRuntime.queryInterface(XWindow.class,lblContainer); /*dialog.xWindow.addWindowListener(uiEventListener); - String dName = (String)Helper.getUnoPropertyValue(dialog.xDialogModel,"Name"); + String dName = (String)Helper.getUnoPropertyValue(dialog.xDialogModel,PropertyNames.PROPERTY_NAME); uiEventListener.add(dName,EventNames.EVENT_WINDOW_SHOWN,"disableContainerMouseEvents",this); */ @@ -202,12 +203,12 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener { "BackgroundColor", "Border", - "Height", - "PositionX", - "PositionY", - "Step", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, "Tabstop", - "Width" + PropertyNames.PROPERTY_WIDTH }, new Object[] { TRANSPARENT, @@ -226,14 +227,14 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener final String[] pNames1 = new String[] { - "Height", - "HelpURL", - "PositionX", - "PositionY", - "Step", - "TabIndex", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, "Tabstop", - "Width" + PropertyNames.PROPERTY_WIDTH }; lblImageText = dialog.insertLabel(name + "_imageText", pNames1, new Object[] @@ -290,8 +291,8 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener }); Helper.setUnoPropertyValue(getModel(lblCounter), "Align", new Short((short) 1)); - Helper.setUnoPropertyValue(getModel(btnBack), "Label", "<"); - Helper.setUnoPropertyValue(getModel(btnNext), "Label", ">"); + Helper.setUnoPropertyValue(getModel(btnBack), PropertyNames.PROPERTY_LABEL, "<"); + Helper.setUnoPropertyValue(getModel(btnNext), PropertyNames.PROPERTY_LABEL, ">"); } @@ -332,15 +333,15 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener { "Border", "BackgroundColor", - "Height", - "HelpURL", - "PositionX", - "PositionY", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_HELPURL, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", - "Step", - "TabIndex", + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, "Tabstop", - "Width" + PropertyNames.PROPERTY_WIDTH }; //used for optimization private Short m_tabIndex; @@ -407,7 +408,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener { if (oResources.length == 1) { - Helper.setUnoPropertyValue(m_aImages[i].getModel(), "ImageURL", (String) oResources[0]); + Helper.setUnoPropertyValue(m_aImages[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, (String) oResources[0]); } else if (oResources.length == 2) { @@ -426,7 +427,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener private void refreshCounterText() { - Helper.setUnoPropertyValue(getModel(lblCounter), "Label", counterRenderer.render(new Counter(pageStart + 1, pageEnd(), listModel.getSize()))); + Helper.setUnoPropertyValue(getModel(lblCounter), PropertyNames.PROPERTY_LABEL, counterRenderer.render(new Counter(pageStart + 1, pageEnd(), listModel.getSize()))); } private int pageEnd() @@ -456,12 +457,12 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener private void hideSelection() { - Helper.setUnoPropertyValue(getModel(grbxSelectedImage), "Step", HIDE_PAGE); + Helper.setUnoPropertyValue(getModel(grbxSelectedImage), PropertyNames.PROPERTY_STEP, HIDE_PAGE); setVisible(grbxSelectedImage, false); } private final static String[] MOVE_SELECTION = new String[] { - "PositionX", "PositionY", "Step" + PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP }; private Object[] MOVE_SELECTION_VALS = new Object[3]; /** Utility field holding list of ItemListeners. */ @@ -480,7 +481,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener Helper.setUnoPropertyValues(getModel(grbxSelectedImage), MOVE_SELECTION, MOVE_SELECTION_VALS); - if (((Number) Helper.getUnoPropertyValue(dialogModel, "Step")).shortValue() == step.shortValue()) + if (((Number) Helper.getUnoPropertyValue(dialogModel, PropertyNames.PROPERTY_STEP)).shortValue() == step.shortValue()) { setVisible(grbxSelectedImage, true); //now focus... } @@ -817,7 +818,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener private void refreshImageText() { Object item = selected >= 0 ? getListModel().getElementAt(selected) : null; - Helper.setUnoPropertyValue(getModel(lblImageText), "Label", " " + renderer.render(item)); + Helper.setUnoPropertyValue(getModel(lblImageText), PropertyNames.PROPERTY_LABEL, " " + renderer.render(item)); } /** @@ -866,7 +867,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener private void enable(Object control, Boolean enable) { - Helper.setUnoPropertyValue(getModel(control), "Enabled", enable); + Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_ENABLED, enable); } private Object getModel(Object control) @@ -901,7 +902,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener private int getImageFromEvent(Object event) { Object image = ((EventObject) event).Source; - String controlName = (String) Helper.getUnoPropertyValue(getModel(image), "Name"); + String controlName = (String) Helper.getUnoPropertyValue(getModel(image), PropertyNames.PROPERTY_NAME); return Integer.valueOf(controlName.substring(6 + name.length())).intValue(); } diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.java b/wizards/com/sun/star/wizards/ui/PathSelection.java index 4cb101382c6d..6b50127017e1 100755 --- a/wizards/com/sun/star/wizards/ui/PathSelection.java +++ b/wizards/com/sun/star/wizards/ui/PathSelection.java @@ -31,6 +31,7 @@ import com.sun.star.awt.XTextComponent; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.Exception; import com.sun.star.wizards.common.FileAccess; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.SystemDialog; public class PathSelection @@ -77,7 +78,7 @@ public class PathSelection CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblSaveAs", new String[] { - "Enabled", "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { new Boolean(Enabled), new Integer(8), LabelText, new Integer(XPos), new Integer(YPos), new Integer(DialogStep), new Short(CurTabIndex), new Integer(Width) @@ -85,16 +86,16 @@ public class PathSelection xSaveTextBox = CurUnoDialog.insertTextField("txtSavePath", "callXPathSelectionListener", this, new String[] { - "Enabled", "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { new Boolean(Enabled), new Integer(12), TxtHelpURL, new Integer(XPos), new Integer(YPos + 10), new Integer(DialogStep), new Short((short) (CurTabIndex + 1)), new Integer(Width - 26) }); //CurUnoDialog.setControlProperty("txtSavePath", "ReadOnly", Boolean.TRUE); - CurUnoDialog.setControlProperty("txtSavePath", "Enabled", Boolean.FALSE); + CurUnoDialog.setControlProperty("txtSavePath", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker", this, new String[] { - "Enabled", "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { new Boolean(Enabled), new Integer(14), BtnHelpURL, "...", new Integer(XPos + Width - 16), new Integer(YPos + 9), new Integer(DialogStep), new Short((short) (CurTabIndex + 2)), new Integer(16) diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.java b/wizards/com/sun/star/wizards/ui/PeerConfig.java index d3871ee62a5b..19617b593bd6 100644 --- a/wizards/com/sun/star/wizards/ui/PeerConfig.java +++ b/wizards/com/sun/star/wizards/ui/PeerConfig.java @@ -33,6 +33,7 @@ import com.sun.star.lang.EventObject; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; /** * @author rpiterman @@ -139,7 +140,7 @@ public class PeerConfig implements XWindowListener } if (!sImageUrl.equals("")) { - Helper.setUnoPropertyValue(aImageUrlTask.oModel, "ImageURL", sImageUrl); + Helper.setUnoPropertyValue(aImageUrlTask.oModel, PropertyNames.PROPERTY_IMAGEURL, sImageUrl); } } diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java index 75194d21b199..3b57ca3f670a 100644 --- a/wizards/com/sun/star/wizards/ui/SortingComponent.java +++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java @@ -28,9 +28,9 @@ package com.sun.star.wizards.ui; import java.beans.PropertyChangeEvent; -import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.*; import com.sun.star.awt.*; +import java.util.ArrayList; public class SortingComponent { @@ -61,10 +61,10 @@ public class SortingComponent public void itemStateChanged(ItemEvent EventObject) { - Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, "Enabled", new Boolean(false)); + Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(false)); int ikey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList); enableNextSortListBox(ikey); - Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, "Enabled", new Boolean(true)); + Helper.setUnoPropertyValue(CurUnoDialog.xDialogModel, PropertyNames.PROPERTY_ENABLED, new Boolean(true)); } public void disposing(com.sun.star.lang.EventObject eventObject) @@ -99,7 +99,7 @@ public class SortingComponent bDoEnable = (i < 2); CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lblSort" + new Integer(i + 1).toString(), new String[] { - "Enabled", "Height", "Label", "Orientation", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { new Boolean(bDoEnable), new Integer(8), sSortHeader[i], new Integer(0), ICompPosX, new Integer(iCurPosY), IStep, new Short(curtabindex++), ICompWidth @@ -108,7 +108,7 @@ public class SortingComponent HIDString = HelpIds.getHelpIdString(FirstHelpIndex); xSortListBox[i] = CurUnoDialog.insertListBox("lstSort" + new Integer(i + 1).toString(), SOSORTLST[i], null, new ItemListenerImpl(), new String[] { - "Dropdown", "Enabled", "Height", "HelpURL", "LineCount", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { new Boolean(true), new Boolean(bDoEnable), new Integer(12), HIDString, new Short(UnoDialog.getListBoxLineCount()), "lstSort" + new Integer(i + 1), IListBoxPosX, new Integer(iCurPosY + 14), IStep, new Short(curtabindex++), IListBoxWidth @@ -117,7 +117,7 @@ public class SortingComponent HIDString = HelpIds.getHelpIdString(FirstHelpIndex + 1); XRadioButton xRadioButtonAsc = CurUnoDialog.insertRadioButton("optAscend" + Integer.toString(i + 1), 0, new String[] { - "Enabled", "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Tag", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] { new Boolean(bDoEnable), new Integer(10), HIDString, sSortAscend[i], IOptButtonPosX, new Integer(iCurPosY + 10), new Short((short) 1), IStep, new Short(curtabindex++), new String("ASC"), IOptButtonWidth @@ -126,7 +126,7 @@ public class SortingComponent HIDString = HelpIds.getHelpIdString(FirstHelpIndex + 2); XRadioButton xRadioButtonDesc = CurUnoDialog.insertRadioButton("optDescend" + Integer.toString(i + 1), 0, new String[] { - "Enabled", "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Tag", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Tag", PropertyNames.PROPERTY_WIDTH }, new Object[] { new Boolean(bDoEnable), new Integer(10), HIDString, sSortDescend[i], IOptButtonPosX, new Integer(iCurPosY + 24), new Short((short) 0), IStep, new Short(curtabindex++), new String("DESC"), IOptButtonWidth @@ -255,32 +255,26 @@ public class SortingComponent { short iCurState; String CurFieldName; - String CurFieldTitle; setMaxSortIndex(); - String[][] SortFieldNames = new String[MaxSortIndex + 1][2]; - String[] SortDescriptions = new String[MaxSortIndex + 1]; + // String[][] SortFieldNames = new String[MaxSortIndex + 1][2]; + ArrayList<String[]> SortFieldNames = new ArrayList<String[]>(); + ArrayList<String> SortDescriptions = new ArrayList<String>(); for (int i = 0; i <= MaxSortIndex; i++) { - CurFieldName = xSortListBox[i].getSelectedItem(); - SortFieldNames[i][0] = CurFieldName; - SortDescriptions[i] = CurFieldName; - iCurState = ((Short) CurUnoDialog.getControlProperty("optAscend" + new Integer(i + 1).toString(), "State")).shortValue(); - SortFieldNames[i][0] = CurFieldName; - if (iCurState == 1) + if (!((Boolean) CurUnoDialog.getControlProperty("lstSort" + (i + 1), "ReadOnly"))) { - SortFieldNames[i][1] = "ASC"; - } - else - { - SortFieldNames[i][1] = "DESC"; + CurFieldName = xSortListBox[i].getSelectedItem(); + SortDescriptions.add(CurFieldName); + iCurState = ((Short) CurUnoDialog.getControlProperty("optAscend" + new Integer(i + 1).toString(), PropertyNames.PROPERTY_STATE)).shortValue(); + SortFieldNames.add(new String[]{CurFieldName,iCurState == 1 ? "ASC" :"DESC" }); } } // When searching for a duplicate entry we can neglect wether the entries are to be sorted ascending or descending // TODO for the future we should deliver a messagebox when two different sorting modes have been applied to one field - int iduplicate = JavaTools.getDuplicateFieldIndex(SortDescriptions); + int iduplicate = JavaTools.getDuplicateFieldIndex(SortDescriptions.toArray(new String[SortDescriptions.size()])); if (iduplicate != -1) { - String sLocSortCriteriaisduplicate = JavaTools.replaceSubString(sSortCriteriaisduplicate, SortFieldNames[iduplicate][0], "<FIELDNAME>"); + String sLocSortCriteriaisduplicate = JavaTools.replaceSubString(sSortCriteriaisduplicate, SortFieldNames.get(iduplicate)[0], "<FIELDNAME>"); CurUnoDialog.showMessageBox("WarningBox", VclWindowPeerAttribute.OK, sLocSortCriteriaisduplicate); CurUnoDialog.vetoableChange(new PropertyChangeEvent(CurUnoDialog, "Steps", new Integer(1), new Integer(2))); CurUnoDialog.setFocus("lstSort" + (iduplicate + 1)); @@ -290,7 +284,7 @@ public class SortingComponent } else { - return SortFieldNames; + return SortFieldNames.toArray(new String[SortFieldNames.size()][2]); } } catch (Exception exception) @@ -314,7 +308,7 @@ public class SortingComponent 0 }); } - // xSortListBox[i+1].selectItemPos((short)0, true); + // xSortListBox[i+1].selectItemPos((short)0, true); } CurUnoDialog.setFocus("lblSort" + new Integer(CurIndex + 1)); MaxSortIndex = CurIndex - 1; @@ -363,10 +357,10 @@ public class SortingComponent { if (CurIndex < xSortListBox.length) { - CurUnoDialog.setControlProperty("lblSort" + new Integer(CurIndex + 1).toString(), "Enabled", new Boolean(bDoEnable)); - CurUnoDialog.setControlProperty("lstSort" + new Integer(CurIndex + 1).toString(), "Enabled", new Boolean(bDoEnable)); - CurUnoDialog.setControlProperty("optAscend" + new Integer(CurIndex + 1).toString(), "Enabled", new Boolean(bDoEnable)); - CurUnoDialog.setControlProperty("optDescend" + new Integer(CurIndex + 1).toString(), "Enabled", new Boolean(bDoEnable)); + CurUnoDialog.setControlProperty("lblSort" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); + CurUnoDialog.setControlProperty("lstSort" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); + CurUnoDialog.setControlProperty("optAscend" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); + CurUnoDialog.setControlProperty("optDescend" + new Integer(CurIndex + 1).toString(), PropertyNames.PROPERTY_ENABLED, new Boolean(bDoEnable)); if (bDoEnable == false) { CurUnoDialog.setControlProperty("lstSort" + new Integer(CurIndex + 1).toString(), "SelectedItems", new short[] diff --git a/wizards/com/sun/star/wizards/ui/TitlesComponent.java b/wizards/com/sun/star/wizards/ui/TitlesComponent.java index 892a59c669f8..ef9a568d2e01 100644 --- a/wizards/com/sun/star/wizards/ui/TitlesComponent.java +++ b/wizards/com/sun/star/wizards/ui/TitlesComponent.java @@ -52,14 +52,14 @@ public class TitlesComponent extends ControlScroller super(_CurUnoDialog, null, _iStep, _iCompPosX, _iCompPosY, _iCompWidth, _uitextfieldcount, 18, _firsthelpindex); CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblColumnNames", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { new Integer(8), _slblColumnNames, new Integer(iLabelPosX), new Integer(iCompPosY - 10), IStep, new Integer(60) }); CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblColumnTitles", new String[] { - "Height", "Label", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { new Integer(8), _slblColumnTitles, new Integer(90), new Integer(iCompPosY - 10), IStep, new Integer(152) @@ -107,7 +107,7 @@ public class TitlesComponent extends ControlScroller CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", slabelname, new String[] { - "Height", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -117,7 +117,7 @@ public class TitlesComponent extends ControlScroller xTextComponent = CurUnoDialog.insertTextField(stextfieldname, 0, null, new String[] { - "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -158,17 +158,17 @@ public class TitlesComponent extends ControlScroller Integer TitleWidth = new Integer(iCompPosX + iCompWidth - TitlePosX.intValue() - iScrollBarWidth - 6); for (short i = 0; i <= ncurfieldcount; i++) { - CurUnoDialog.setControlProperty(getColumnName(i), "Width", FieldNameWidth); + CurUnoDialog.setControlProperty(getColumnName(i), PropertyNames.PROPERTY_WIDTH, FieldNameWidth); CurUnoDialog.setControlProperties(getTitleName(i), new String[] { - "PositionX", "Width" + PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_WIDTH }, new Object[] { TitlePosX, TitleWidth }); } - CurUnoDialog.setControlProperty("lblColumnNames", "Width", FieldNameWidth); - CurUnoDialog.setControlProperty("lblColumnTitles", "PositionX", TitlePosX); + CurUnoDialog.setControlProperty("lblColumnNames", PropertyNames.PROPERTY_WIDTH, FieldNameWidth); + CurUnoDialog.setControlProperty("lblColumnTitles", PropertyNames.PROPERTY_POSITION_X, TitlePosX); } public void initialize(String[] _fieldnames, Map _fieldtitleset) @@ -208,9 +208,9 @@ public class TitlesComponent extends ControlScroller public String getFieldNameByTitleControl(Object _fieldtitlemodel) { - String sTitleModelName = (String) Helper.getUnoPropertyValue(_fieldtitlemodel, "Name"); + String sTitleModelName = (String) Helper.getUnoPropertyValue(_fieldtitlemodel, PropertyNames.PROPERTY_NAME); String sindex = JavaTools.getSuffixNumber(sTitleModelName); - return (String) CurUnoDialog.getControlProperty(this.SOLABELPREFIX + sindex, "Label"); + return (String) CurUnoDialog.getControlProperty(this.SOLABELPREFIX + sindex, PropertyNames.PROPERTY_LABEL); } public String[] getFieldTitles() diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 5a181b84c4b5..e372a843a56a 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -112,7 +112,7 @@ public class UnoDialog implements EventNames XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel); try { - String sName = (String) xPSet.getPropertyValue("Name"); + String sName = (String) xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME); Integer KeyObject = (Integer) ControlList.get(sName); iKey = KeyObject.intValue(); } @@ -245,7 +245,7 @@ public class UnoDialog implements EventNames XControl xControl2 = xDlgContainer.getControl(ControlName); XView xView = (XView) UnoRuntime.queryInterface(XView.class, xControl2); Size aSize = xView.getSize(); - double dblMAPWidth = (double) (((Integer) Helper.getUnoPropertyValue(xControl2.getModel(), "Width")).intValue()); + double dblMAPWidth = (double) (((Integer) Helper.getUnoPropertyValue(xControl2.getModel(), PropertyNames.PROPERTY_WIDTH)).intValue()); double dblFactor = (((double) (aSize.Width)) / dblMAPWidth); return dblFactor; } @@ -308,7 +308,7 @@ public class UnoDialog implements EventNames { Object oFixedText = insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", sName, sPropNames, oPropValues); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oFixedText); - xPSet.setPropertyValue("Name", sName); + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); Object oLabel = xDlgContainer.getControl(new String(sName)); return (XFixedText) UnoRuntime.queryInterface(XFixedText.class, oLabel); } @@ -322,7 +322,7 @@ public class UnoDialog implements EventNames /* public XButton insertButton(String sName, int iControlKey, XActionListener xActionListener, String[] sProperties, Object[] sValues) throws com.sun.star.uno.Exception{ Object oButtonModel = insertControlModel("com.sun.star.awt.UnoControlButtonModel", sName, sProperties, sValues); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oButtonModel); - xPSet.setPropertyValue("Name", sName); + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); Object objectButton = xDlgContainer.getControl( new String(sName)); XButton xButton = ( XButton ) UnoRuntime.queryInterface( XButton.class, objectButton ); xButton.addActionListener(xActionListener); @@ -335,7 +335,7 @@ public class UnoDialog implements EventNames { Object oButtonModel = insertControlModel("com.sun.star.awt.UnoControlButtonModel", sName, sProperties, sValues); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oButtonModel); - xPSet.setPropertyValue("Name", sName); + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); Object objectButton = xDlgContainer.getControl(new String(sName)); XButton xButton = (XButton) UnoRuntime.queryInterface(XButton.class, objectButton); if (xActionListener != null) @@ -354,7 +354,7 @@ public class UnoDialog implements EventNames { Object oButtonModel = insertControlModel("com.sun.star.awt.UnoControlCheckBoxModel", sName, sProperties, sValues); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oButtonModel); - xPSet.setPropertyValue("Name", sName); + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); Object objectCheckBox = xDlgContainer.getControl(new String(sName)); XCheckBox xCheckBox = (XCheckBox) UnoRuntime.queryInterface(XCheckBox.class, objectCheckBox); if (xItemListener != null) @@ -372,7 +372,7 @@ public class UnoDialog implements EventNames { Object oNumericFieldModel = insertControlModel("com.sun.star.awt.UnoControlNumericFieldModel", sName, sProperties, sValues); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oNumericFieldModel); - xPSet.setPropertyValue("Name", sName); + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); Object objectNumericField = xDlgContainer.getControl(new String(sName)); XTextComponent xNumericField = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, objectNumericField); if (xTextListener != null) @@ -392,7 +392,7 @@ public class UnoDialog implements EventNames { Object oScrollModel = insertControlModel("com.sun.star.awt.UnoControlScrollBarModel", sName, sProperties, sValues); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oScrollModel); - xPSet.setPropertyValue("Name", sName); + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); Object oScrollBar = xDlgContainer.getControl(new String(sName)); XScrollBar xScrollBar = (XScrollBar) UnoRuntime.queryInterface(XScrollBar.class, oScrollBar); if (xAdjustmentListener != null) @@ -431,7 +431,7 @@ public class UnoDialog implements EventNames { XInterface xTextModel = insertControlModel(ServiceName, sName, sProperties, sValues); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xTextModel); - xPSet.setPropertyValue("Name", sName); + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); XControl xTextField = xDlgContainer.getControl(new String(sName)); XTextComponent xTextBox = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, xTextField); if (xTextListener != null) @@ -453,7 +453,7 @@ public class UnoDialog implements EventNames { XInterface xListBoxModel = insertControlModel("com.sun.star.awt.UnoControlListBoxModel", sName, sProperties, sValues); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xListBoxModel); - xPSet.setPropertyValue("Name", sName); + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); XControl xControlListBox = xDlgContainer.getControl(new String(sName)); XListBox xListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, xControlListBox); if (xItemListener != null) @@ -473,7 +473,7 @@ public class UnoDialog implements EventNames { XInterface xComboBoxModel = insertControlModel("com.sun.star.awt.UnoControlComboBoxModel", sName, sProperties, sValues); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xComboBoxModel); - xPSet.setPropertyValue("Name", sName); + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); XControl xControlComboBox = xDlgContainer.getControl(new String(sName)); XComboBox xComboBox = (XComboBox) UnoRuntime.queryInterface(XComboBox.class, xControlComboBox); if (xItemListener != null) @@ -545,7 +545,7 @@ public class UnoDialog implements EventNames { XInterface oRadioButtonModel = insertControlModel("com.sun.star.awt.UnoControlRadioButtonModel", sName, sProperties, sValues); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRadioButtonModel); - xPSet.setPropertyValue("Name", sName); + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, sName); XControl xControlRadioButton = xDlgContainer.getControl(new String(sName)); XRadioButton xRadioButton = (XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlRadioButton); return xRadioButton; @@ -560,7 +560,7 @@ public class UnoDialog implements EventNames /** * @author bc93774 * The problem with setting the visibility of controls is that changing the current step - * of a dialog will automatically make all controls visible. The "Step" property always wins against + * of a dialog will automatically make all controls visible. The PropertyNames.PROPERTY_STEP property always wins against * the property "visible". Therfor a control meant to be invisible is placed on a step far far away. * @param the name of the control * @param iStep change the step if you want to make the control invisible @@ -569,8 +569,8 @@ public class UnoDialog implements EventNames { try { - int iCurStep = AnyConverter.toInt(getControlProperty(controlname, "Step")); - setControlProperty(controlname, "Step", new Integer(iStep)); + int iCurStep = AnyConverter.toInt(getControlProperty(controlname, PropertyNames.PROPERTY_STEP)); + setControlProperty(controlname, PropertyNames.PROPERTY_STEP, new Integer(iStep)); } catch (com.sun.star.uno.Exception exception) { @@ -581,7 +581,7 @@ public class UnoDialog implements EventNames /** * @author bc93774 * The problem with setting the visibility of controls is that changing the current step - * of a dialog will automatically make all controls visible. The "Step" property always wins against + * of a dialog will automatically make all controls visible. The PropertyNames.PROPERTY_STEP property always wins against * the property "visible". Therfor a control meant to be invisible is placed on a step far far away. * Afterwards the step property of the dialog has to be set with "repaintDialogStep". As the performance * of that method is very bad it should be used only once for all controls @@ -592,16 +592,16 @@ public class UnoDialog implements EventNames { try { - int iCurControlStep = AnyConverter.toInt(getControlProperty(controlname, "Step")); - int iCurDialogStep = AnyConverter.toInt(Helper.getUnoPropertyValue(this.xDialogModel, "Step")); + int iCurControlStep = AnyConverter.toInt(getControlProperty(controlname, PropertyNames.PROPERTY_STEP)); + int iCurDialogStep = AnyConverter.toInt(Helper.getUnoPropertyValue(this.xDialogModel, PropertyNames.PROPERTY_STEP)); int iNewStep; if (bIsVisible) { - setControlProperty(controlname, "Step", new Integer(iCurDialogStep)); + setControlProperty(controlname, PropertyNames.PROPERTY_STEP, new Integer(iCurDialogStep)); } else { - setControlProperty(controlname, "Step", UIConsts.INVISIBLESTEP); + setControlProperty(controlname, PropertyNames.PROPERTY_STEP, UIConsts.INVISIBLESTEP); } } catch (com.sun.star.uno.Exception exception) @@ -618,9 +618,9 @@ public class UnoDialog implements EventNames { try { - int ncurstep = AnyConverter.toInt(Helper.getUnoPropertyValue(this.xDialogModel, "Step")); - Helper.setUnoPropertyValue(xDialogModel, "Step", new Integer(99)); - Helper.setUnoPropertyValue(xDialogModel, "Step", new Integer(ncurstep)); + int ncurstep = AnyConverter.toInt(Helper.getUnoPropertyValue(this.xDialogModel, PropertyNames.PROPERTY_STEP)); + Helper.setUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_STEP, new Integer(99)); + Helper.setUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_STEP, new Integer(ncurstep)); } catch (com.sun.star.uno.Exception exception) { @@ -892,7 +892,7 @@ public class UnoDialog implements EventNames public static void setEnabled(Object control, Boolean enabled) { - Helper.setUnoPropertyValue(getModel(control), "Enabled", enabled); + Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_ENABLED, enabled); } /** @@ -1004,11 +1004,11 @@ public class UnoDialog implements EventNames switch (itype) { case UIConsts.CONTROLTYPE.FIXEDTEXT: - return "Label"; + return PropertyNames.PROPERTY_LABEL; case UIConsts.CONTROLTYPE.BUTTON: - return "Label"; + return PropertyNames.PROPERTY_LABEL; case UIConsts.CONTROLTYPE.FIXEDLINE: - return "Label"; + return PropertyNames.PROPERTY_LABEL; case UIConsts.CONTROLTYPE.NUMERICFIELD: return "Value"; case UIConsts.CONTROLTYPE.CURRENCYFIELD: @@ -1024,11 +1024,11 @@ public class UnoDialog implements EventNames case UIConsts.CONTROLTYPE.PROGRESSBAR: return "ProgressValue"; case UIConsts.CONTROLTYPE.IMAGECONTROL: - return "ImageURL"; + return PropertyNames.PROPERTY_IMAGEURL; case UIConsts.CONTROLTYPE.RADIOBUTTON: - return "State"; + return PropertyNames.PROPERTY_STATE; case UIConsts.CONTROLTYPE.CHECKBOX: - return "State"; + return PropertyNames.PROPERTY_STATE; case UIConsts.CONTROLTYPE.EDITCONTROL: return "Text"; case UIConsts.CONTROLTYPE.COMBOBOX: diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java index 184a4a354b0c..0769e1d23b38 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java @@ -32,6 +32,7 @@ import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.SystemDialog; import com.sun.star.wizards.ui.event.*; @@ -208,7 +209,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames XControl xImgControl = insertImage(Desktop.getUniqueName(getDlgNameAccess(), "imgHint"), new String[] { - "Border", "Height", "ImageURL", "PositionX", "PositionY", "ScaleImage", "Step", "Width" + "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -340,7 +341,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames Helper.setUnoPropertyValues(xControlModel, sPropNames, oPropValues); //setControlPropertiesDebug(xControlModel, sPropNames, oPropValues); //System.out.println(" Setting props successfull !"); - Helper.setUnoPropertyValue(xControlModel, "Name", componentName); + Helper.setUnoPropertyValue(xControlModel, PropertyNames.PROPERTY_NAME, componentName); } catch (Exception ex) { diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java index 50ff51c5bbd4..c03ceb2dc257 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.java +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java @@ -47,6 +47,7 @@ import com.sun.star.frame.TerminationVetoException; import com.sun.star.lang.IllegalArgumentException; import com.sun.star.beans.*; import com.sun.star.wizards.common.HelpIds; +import com.sun.star.wizards.common.PropertyNames; public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeListener, XTerminateListener, XCompletion { @@ -163,7 +164,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL try { nNewStep = itemEvent.ItemId; - nOldStep = AnyConverter.toInt(Helper.getUnoPropertyValue(xDialogModel, "Step")); + nOldStep = AnyConverter.toInt(Helper.getUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_STEP)); if (nNewStep != nOldStep) { switchToStep(); @@ -227,7 +228,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL { try { - int iDialogHeight = ((Integer) Helper.getUnoPropertyValue(this.xDialogModel, "Height")).intValue(); + int iDialogHeight = ((Integer) Helper.getUnoPropertyValue(this.xDialogModel, PropertyNames.PROPERTY_HEIGHT)).intValue(); // the roadmap control has got no real TabIndex ever // that is not correct, but changing this would need time, so it is used @@ -235,13 +236,13 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL oRoadmap = insertControlModel("com.sun.star.awt.UnoControlRoadmapModel", "rdmNavi", new String[] { - "Height", - "PositionX", - "PositionY", - "Step", - "TabIndex", + PropertyNames.PROPERTY_HEIGHT, + PropertyNames.PROPERTY_POSITION_X, + PropertyNames.PROPERTY_POSITION_Y, + PropertyNames.PROPERTY_STEP, + PropertyNames.PROPERTY_TABINDEX, "Tabstop", - "Width" + PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -254,7 +255,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL new Integer(85) }); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRoadmap); - xPSet.setPropertyValue("Name", "rdmNavi"); + xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, "rdmNavi"); xSSFRoadmap = (XSingleServiceFactory) UnoRuntime.queryInterface(XSingleServiceFactory.class, oRoadmap); xIndexContRoadmap = (XIndexContainer) UnoRuntime.queryInterface(XIndexContainer.class, oRoadmap); @@ -308,8 +309,8 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL try { Object oRoadmapItem = xSSFRoadmap.createInstance(); - Helper.setUnoPropertyValue(oRoadmapItem, "Label", _sLabel); - Helper.setUnoPropertyValue(oRoadmapItem, "Enabled", new Boolean(_bEnabled)); + Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_LABEL, _sLabel); + Helper.setUnoPropertyValue(oRoadmapItem, PropertyNames.PROPERTY_ENABLED, new Boolean(_bEnabled)); Helper.setUnoPropertyValue(oRoadmapItem, "ID", new Integer(_CurItemID)); xIndexContRoadmap.insertByIndex(Index, oRoadmapItem); int NextIndex = Index + 1; @@ -386,7 +387,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL protected void changeToStep(int nNewStep) { - Helper.setUnoPropertyValue(xDialogModel, "Step", new Integer(nNewStep)); + Helper.setUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_STEP, new Integer(nNewStep)); setCurrentRoadmapItemID((short) (nNewStep)); enableNextButton(getNextAvailableStep() > 0); enableBackButton(nNewStep != 1); @@ -454,8 +455,8 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL int iButtonHeight = 14; Integer IButtonHeight = new Integer(iButtonHeight); Integer ICurStep = new Integer(0); - int iDialogHeight = ((Integer) Helper.getUnoPropertyValue(this.xDialogModel, "Height")).intValue(); - int iDialogWidth = ((Integer) Helper.getUnoPropertyValue(this.xDialogModel, "Width")).intValue(); + int iDialogHeight = ((Integer) Helper.getUnoPropertyValue(this.xDialogModel, PropertyNames.PROPERTY_HEIGHT)).intValue(); + int iDialogWidth = ((Integer) Helper.getUnoPropertyValue(this.xDialogModel, PropertyNames.PROPERTY_WIDTH)).intValue(); int iHelpPosX = 8; int iBtnPosY = iDialogHeight - iButtonHeight - 6; int iCancelPosX = iDialogWidth - iButtonWidth - 6; @@ -466,7 +467,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnNaviSep", new String[] { - "Height", "Orientation", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -476,7 +477,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL insertControlModel("com.sun.star.awt.UnoControlFixedLineModel", "lnRoadSep", new String[] { - "Height", "Orientation", "PositionX", "PositionY", "Step", "Width" + PropertyNames.PROPERTY_HEIGHT, "Orientation", PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -485,13 +486,13 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL String[] propNames = new String[] { - "Enabled", "Height", "HelpURL", "Label", "PositionX", "PositionY", "PushButtonType", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; - Helper.setUnoPropertyValue(super.xDialogModel, "HelpURL", HelpIds.getHelpIdString(hid)); + Helper.setUnoPropertyValue(super.xDialogModel, PropertyNames.PROPERTY_HELPURL, HelpIds.getHelpIdString(hid)); insertButton("btnWizardHelp", HELP_ACTION_PERFORMED, new String[] { - "Enabled", "Height", "Label", "PositionX", "PositionY", "PushButtonType", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -527,7 +528,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL // close the dialog. MethodInvocation windowHidden = new MethodInvocation("windowHidden", this); xWindow.addWindowListener((CommonListener) getGuiEventListener()); - String dialogName = (String) Helper.getUnoPropertyValue(xDialogModel, "Name"); + String dialogName = (String) Helper.getUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_NAME); getGuiEventListener().add(dialogName, EVENT_ACTION_PERFORMED, windowHidden); } @@ -569,17 +570,17 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL public void enableBackButton(boolean enabled) { - setControlProperty("btnWizardBack", "Enabled", enabled ? Boolean.TRUE : Boolean.FALSE); + setControlProperty("btnWizardBack", PropertyNames.PROPERTY_ENABLED, enabled ? Boolean.TRUE : Boolean.FALSE); } public void enableNextButton(boolean enabled) { - setControlProperty("btnWizardNext", "Enabled", enabled ? Boolean.TRUE : Boolean.FALSE); + setControlProperty("btnWizardNext", PropertyNames.PROPERTY_ENABLED, enabled ? Boolean.TRUE : Boolean.FALSE); } public void enableFinishButton(boolean enabled) { - setControlProperty("btnWizardFinish", "Enabled", enabled ? Boolean.TRUE : Boolean.FALSE); + setControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED, enabled ? Boolean.TRUE : Boolean.FALSE); } public void setStepEnabled(int _nStep, boolean bEnabled) @@ -587,7 +588,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL XInterface xRoadmapItem = getRoadmapItemByID(_nStep); if (xRoadmapItem != null) { - Helper.setUnoPropertyValue(xRoadmapItem, "Enabled", new Boolean(bEnabled)); + Helper.setUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED, new Boolean(bEnabled)); } } @@ -622,7 +623,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL { return false; } - bIsEnabled = AnyConverter.toBoolean(Helper.getUnoPropertyValue(xRoadmapItem, "Enabled")); + bIsEnabled = AnyConverter.toBoolean(Helper.getUnoPropertyValue(xRoadmapItem, PropertyNames.PROPERTY_ENABLED)); return bIsEnabled; } catch (com.sun.star.uno.Exception exception) @@ -713,7 +714,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL { try { - return AnyConverter.toInt(Helper.getUnoPropertyValue(this.MSFDialogModel, "Step")); + return AnyConverter.toInt(Helper.getUnoPropertyValue(this.MSFDialogModel, PropertyNames.PROPERTY_STEP)); } catch (com.sun.star.uno.Exception exception) { @@ -746,7 +747,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL insertLabel("lblQueryTitle" + String.valueOf(i), new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java index ebbcba96f58c..bbe9cee2eb86 100644 --- a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java +++ b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java @@ -30,6 +30,7 @@ import com.sun.star.awt.XControl; import com.sun.star.lang.EventObject; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; import java.lang.reflect.InvocationTargetException; import java.util.Hashtable; @@ -128,6 +129,6 @@ public class AbstractListener public static String getEventSourceName(EventObject eventObject) { XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, eventObject.Source); - return (String) Helper.getUnoPropertyValue(xControl.getModel(), "Name", String.class); + return (String) Helper.getUnoPropertyValue(xControl.getModel(), PropertyNames.PROPERTY_NAME, String.class); } } diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.java b/wizards/com/sun/star/wizards/ui/event/DataAware.java index b81b8e71bcdb..62eaaf657447 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.java @@ -31,6 +31,7 @@ import java.lang.reflect.Method; import java.util.Arrays; import java.util.Collection; import java.util.Iterator; +import com.sun.star.wizards.common.PropertyNames; /** * @author rpiterman @@ -275,7 +276,7 @@ public abstract class DataAware { /** * creates a PropertyValue for the property with * the given name, of the given JavaBean object. - * @param propertyName the property to access. Must be a Cup letter (e.g. "Name" for getName() and setName("..."). ) + * @param propertyName the property to access. Must be a Cup letter (e.g. PropertyNames.PROPERTY_NAME for getName() and setName("..."). ) * @param propertyOwner the object which "own" or "contains" the property. */ public PropertyValue(String propertyName, Object propertyOwner) { diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java index 74881d7b1f23..119b2b6e1e51 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java @@ -27,7 +27,7 @@ package com.sun.star.wizards.ui.event; import java.lang.reflect.Field; - +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.uno.Any; /** diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java index c45a496c7849..86c50b13ce02 100644 --- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java +++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java @@ -28,6 +28,7 @@ package com.sun.star.wizards.ui.event; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import com.sun.star.wizards.common.PropertyNames; /** * Encapsulate a Method invocation. diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java index 632609d85f05..b8024fb4f9c9 100644 --- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.java @@ -30,6 +30,7 @@ import com.sun.star.awt.*; import com.sun.star.lang.EventObject; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; /** * @author rpiterman @@ -79,7 +80,7 @@ public class UnoDataAware extends DataAware protected void setToUI(Object value) { - //System.out.println("Settings uno property : "+ Helper.getUnoPropertyValue(this.unoModel,"Name") + "<-" +stringof(value)); + //System.out.println("Settings uno property : "+ Helper.getUnoPropertyValue(this.unoModel,PropertyNames.PROPERTY_NAME) + "<-" +stringof(value)); Helper.setUnoPropertyValue(unoModel, unoPropName, value); } @@ -203,7 +204,7 @@ public class UnoDataAware extends DataAware field ? DataAwareFields.getFieldValueFor(data, prop, new Short((short) 0)) : new DataAware.PropertyValue(prop, data), - checkBox, "State"); + checkBox, PropertyNames.PROPERTY_STATE); xcheckBox.addItemListener(itemListener(uda, listener)); return uda; } @@ -233,7 +234,7 @@ public class UnoDataAware extends DataAware return new UnoDataAware(data, field ? DataAwareFields.getFieldValueFor(data, prop, "") : new DataAware.PropertyValue(prop, data), - label, "Label"); + label, PropertyNames.PROPERTY_LABEL); } public static UnoDataAware attachListBox(Object data, String prop, Object listBox, final Listener listener, boolean field) @@ -260,6 +261,6 @@ public class UnoDataAware extends DataAware public static void setEnabled(Object control, Boolean enabled) { - Helper.setUnoPropertyValue(getModel(control), "Enabled", enabled); + Helper.setUnoPropertyValue(getModel(control), PropertyNames.PROPERTY_ENABLED, enabled); } } diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.java b/wizards/com/sun/star/wizards/web/FTPDialog.java index ca6f70add7b6..f958d9016833 100644 --- a/wizards/com/sun/star/wizards/web/FTPDialog.java +++ b/wizards/com/sun/star/wizards/web/FTPDialog.java @@ -45,6 +45,7 @@ import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.FileAccess; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.SystemDialog; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.UCB; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; @@ -197,7 +198,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID Helper.setUnoPropertyValues(xDialogModel, new String[] { - "Closeable", "Height", "HelpURL", "Moveable", "Name", "PositionX", "PositionY", "Title", "Width" + "Closeable", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Title", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -219,15 +220,15 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID { final String[] PROPNAMES_LABEL = new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; final String[] PROPNAMES_BUTTON = new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; final String[] PROPNAMES_BUTTON2 = new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "PushButtonType", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; ln1 = insertFixedLine("ln1", @@ -245,7 +246,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID txtHost = insertTextField("txtHost", "disconnect", new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -260,7 +261,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID txtUsername = insertTextField("txtUsername", "disconnect", new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -275,7 +276,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID txtPassword = insertTextField("txtPassword", "disconnect", new String[] { - "EchoChar", "Height", "HelpURL", "Name", "PositionX", "PositionY", "TabIndex", "Width" + "EchoChar", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -297,7 +298,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID imgStatus = insertImage("imgStatus", new String[] { - "Border", "Height", "PositionX", "PositionY", "ScaleImage", "Tabstop", "Width" + "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", "Tabstop", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -321,7 +322,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID txtDir = insertTextField("txtDir", null, new String[] { - "Enabled", "Height", "HelpURL", "Name", "PositionX", "PositionY", "TabIndex", "Text", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -701,8 +702,8 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID */ private void setLabel(String label, String image) { - Helper.setUnoPropertyValue(getModel(lblStatus), "Label", label); - Helper.setUnoPropertyValue(getModel(imgStatus), "ImageURL", imageUrl(image)); + Helper.setUnoPropertyValue(getModel(lblStatus), PropertyNames.PROPERTY_LABEL, label); + Helper.setUnoPropertyValue(getModel(imgStatus), PropertyNames.PROPERTY_IMAGEURL, imageUrl(image)); } private String imageUrl(String s) diff --git a/wizards/com/sun/star/wizards/web/ImageListDialog.java b/wizards/com/sun/star/wizards/web/ImageListDialog.java index c3ea98688c64..df4f4142f858 100644 --- a/wizards/com/sun/star/wizards/web/ImageListDialog.java +++ b/wizards/com/sun/star/wizards/web/ImageListDialog.java @@ -35,6 +35,7 @@ import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.HelpIds; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.IRenderer; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.ImageList; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog2; @@ -132,7 +133,7 @@ public abstract class ImageListDialog extends UnoDialog2 implements UIConsts Helper.setUnoPropertyValues(xDialogModel, new String[] { - "Closeable", "Height", "HelpURL", "Moveable", "Name", "PositionX", "PositionY", "Step", "Title", "Width" + "Closeable", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "Title", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -143,7 +144,7 @@ public abstract class ImageListDialog extends UnoDialog2 implements UIConsts final String[] PROPNAMES = new String[] { - "DefaultButton", "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "PushButtonType", "TabIndex", "Width" + "DefaultButton", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "PushButtonType", PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; Integer iButtonsX = new Integer(6 + ilWidth + 6); @@ -200,14 +201,14 @@ public abstract class ImageListDialog extends UnoDialog2 implements UIConsts il.create(this); /*lblContainer = insertLabel("lblContainer", - new String[] {"Height", "Name", "PositionX", "PositionY", "TabIndex", "Width"}, + new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH}, new Object[] { new Integer(176),"lblContainer",new Integer(6),new Integer(17),new Short((short)5),new Integer(214)} );*/ lblTitle = insertLabel("lblTitle", new String[] { - "FontDescriptor", "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { diff --git a/wizards/com/sun/star/wizards/web/StatusDialog.java b/wizards/com/sun/star/wizards/web/StatusDialog.java index ab1e7a0b6bc7..c765e2410312 100644 --- a/wizards/com/sun/star/wizards/web/StatusDialog.java +++ b/wizards/com/sun/star/wizards/web/StatusDialog.java @@ -32,6 +32,7 @@ import com.sun.star.awt.XProgressBar; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.IRenderer; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.UnoDialog; import com.sun.star.wizards.ui.UnoDialog2; import com.sun.star.wizards.ui.event.MethodInvocation; @@ -83,7 +84,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener Helper.setUnoPropertyValues(xDialogModel, new String[] { - "Closeable", "Height", "HelpURL", "Moveable", "Name", "PositionX", "PositionY", "Step", "Title", "Width" + "Closeable", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, "Title", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -95,7 +96,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener lblTaskName = insertLabel("lblTask", new String[] { - "Height", "Label", "PositionX", "PositionY", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -104,7 +105,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener lblCounter = insertLabel("lblCounter", new String[] { - "Height", "Label", "PositionX", "PositionY", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -113,7 +114,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener progressBar = insertProgressBar("progress", new String[] { - "Height", "PositionX", "PositionY", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -126,7 +127,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener btnCancel = insertButton("btnCancel", "performCancel", this, new String[] { - "Height", "Label", "PositionX", "PositionY", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -158,7 +159,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener public void setLabel(String s) { // lblTaskName.setText(s); - Helper.setUnoPropertyValue(UnoDialog.getModel(lblTaskName), "Label", s); + Helper.setUnoPropertyValue(UnoDialog.getModel(lblTaskName), PropertyNames.PROPERTY_LABEL, s); xReschedule.reschedule(); } @@ -208,7 +209,7 @@ public class StatusDialog extends UnoDialog2 implements TaskListener } else { - Helper.setUnoPropertyValue(getModel(btnCancel), "Label", res[2]); + Helper.setUnoPropertyValue(getModel(btnCancel), PropertyNames.PROPERTY_LABEL, res[2]); } } diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.java b/wizards/com/sun/star/wizards/web/WWD_Events.java index 6e8d0f2e614e..26f518c4e6c8 100644 --- a/wizards/com/sun/star/wizards/web/WWD_Events.java +++ b/wizards/com/sun/star/wizards/web/WWD_Events.java @@ -42,6 +42,7 @@ import com.sun.star.wizards.common.FileAccess; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.SystemDialog; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.UnoDialog; import com.sun.star.wizards.ui.event.DataAware; import com.sun.star.wizards.ui.event.ListModelBinder; @@ -251,7 +252,7 @@ public abstract class WWD_Events extends WWD_Startup } if (nextSelected[0] == 0) { - Helper.setUnoPropertyValue(getModel(btnDelSession), "Enabled", Boolean.FALSE); // select... + Helper.setUnoPropertyValue(getModel(btnDelSession), PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); // select... } Helper.setUnoPropertyValue(getModel(lstLoadSettings), "SelectedItems", nextSelected); @@ -1116,7 +1117,7 @@ public abstract class WWD_Events extends WWD_Startup } else if (ke.KeyChar == '%' && ((System.currentTimeMillis() - time) < 300)) { - Boolean b = (Boolean) getControlProperty("btnWizardFinish", "Enabled"); + Boolean b = (Boolean) getControlProperty("btnWizardFinish", PropertyNames.PROPERTY_ENABLED); if (b.booleanValue()) { finishWizard(false); diff --git a/wizards/com/sun/star/wizards/web/WWD_General.java b/wizards/com/sun/star/wizards/web/WWD_General.java index 551a4b1437f2..fd716e1b9c06 100644 --- a/wizards/com/sun/star/wizards/web/WWD_General.java +++ b/wizards/com/sun/star/wizards/web/WWD_General.java @@ -33,6 +33,7 @@ import com.sun.star.wizards.common.FileAccess; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.HelpIds; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.SystemDialog; import com.sun.star.wizards.ui.event.ListModelBinder; import com.sun.star.wizards.web.data.CGDocument; @@ -215,7 +216,7 @@ public abstract class WWD_General extends WebWizardDialog protected boolean isSaveSession() { return (((Number) Helper.getUnoPropertyValue( - getModel(chkSaveSettings), "State")).intValue() == 1); + getModel(chkSaveSettings), PropertyNames.PROPERTY_STATE)).intValue() == 1); } /** @@ -343,7 +344,7 @@ public abstract class WWD_General extends WebWizardDialog { try { - return (checkPublish(LOCAL_PUBLISHER, txtLocalDir, "Text") | (!proxies && checkPublish(FTP_PUBLISHER, lblFTP, "Label")) | checkPublish(ZIP_PUBLISHER, txtZip, "Text")) && checkSaveSession(); + return (checkPublish(LOCAL_PUBLISHER, txtLocalDir, "Text") | (!proxies && checkPublish(FTP_PUBLISHER, lblFTP, PropertyNames.PROPERTY_LABEL)) | checkPublish(ZIP_PUBLISHER, txtZip, "Text")) && checkSaveSession(); } catch (IllegalArgumentException ex) { diff --git a/wizards/com/sun/star/wizards/web/WWD_Startup.java b/wizards/com/sun/star/wizards/web/WWD_Startup.java index 200f70a32383..2a250c84c266 100644 --- a/wizards/com/sun/star/wizards/web/WWD_Startup.java +++ b/wizards/com/sun/star/wizards/web/WWD_Startup.java @@ -50,6 +50,7 @@ import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.FileAccess; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.SystemDialog; import com.sun.star.wizards.document.OfficeDocument; import com.sun.star.wizards.ui.DocumentPreview; @@ -727,7 +728,7 @@ public abstract class WWD_Startup extends WWD_General task.advance(true); sessionNameDA.setDataObject(session, true); - Helper.setUnoPropertyValue(getModel(chkSaveSettings), "State", new Short((short) 1)); + Helper.setUnoPropertyValue(getModel(chkSaveSettings), PropertyNames.PROPERTY_STATE, new Short((short) 1)); docListDA.updateUI(); task.advance(true); @@ -914,7 +915,7 @@ public abstract class WWD_Startup extends WWD_General { bg = FileAccess.getPathFilename(getFileAccess().getPath(bg, null)); } - Helper.setUnoPropertyValue(getModel(txtBackground), "Label", bg); + Helper.setUnoPropertyValue(getModel(txtBackground), PropertyNames.PROPERTY_LABEL, bg); } void updateIconsetText() @@ -938,7 +939,7 @@ public abstract class WWD_Startup extends WWD_General } } - Helper.setUnoPropertyValue(getModel(txtIconset), "Label", iconsetName); + Helper.setUnoPropertyValue(getModel(txtIconset), PropertyNames.PROPERTY_LABEL, iconsetName); } /** diff --git a/wizards/com/sun/star/wizards/web/WebWizardDialog.java b/wizards/com/sun/star/wizards/web/WebWizardDialog.java index 23adc86dfca1..e9d1d2fd7a87 100644 --- a/wizards/com/sun/star/wizards/web/WebWizardDialog.java +++ b/wizards/com/sun/star/wizards/web/WebWizardDialog.java @@ -40,6 +40,7 @@ import com.sun.star.awt.XTextComponent; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.HelpIds; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.ImageList; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.WizardDialog; @@ -176,30 +177,30 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC FontDescriptor fontDescriptor4 = new FontDescriptor(); FontDescriptor fontDescriptor5 = new FontDescriptor(); FontDescriptor fontDescriptor6 = new FontDescriptor(); - FontDescriptor fontDescriptor7 = new FontDescriptor(); //private static String[] PROPNAMES_LBL_NOFOCUS = new String[] {"Height", "Label", "Name", "PositionX", "PositionY", "Step", "Width"}; + FontDescriptor fontDescriptor7 = new FontDescriptor(); //private static String[] PROPNAMES_LBL_NOFOCUS = new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH}; private static String[] PROPNAMES_LBL = new String[] { - "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; private static String[] PROPNAMES_CHKBOX = new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; private static String[] PROPNAMES_BUTTON = new String[] { - "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; private static String[] PROPNAMES_TXT = new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; private static String[] PROPNAMES_TXT_2 = new String[] { - "Height", "HelpURL", "Name", "PositionX", "PositionY", "ReadOnly", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ReadOnly", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; private static String[] PROPNAMES_TITLE = new String[] { - "FontDescriptor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }; private static Integer INTEGER_91 = new Integer(91); private static Integer INTEGER_97 = new Integer(97); @@ -218,7 +219,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC Helper.setUnoPropertyValues(xDialogModel, new String[] { - "Closeable", "Height", "HelpURL", "Moveable", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Title", "Width" + "Closeable", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "Moveable", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Title", PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -258,7 +259,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC lblIntroduction = insertLabel("lblIntroduction", new String[] { - "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -274,7 +275,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC lblLoadSettings = insertLabel("lblLoadSettings", new String[] { - "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -283,7 +284,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC lstLoadSettings = insertListBox("lstLoadSettings", null, LSTLOADSETTINGS_ITEM_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "LineCount", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -292,7 +293,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC btnDelSession = insertButton("btnDelSession", BTNDELSESSION_ACTION_PERFORMED, new String[] { - "Enabled", "Height", "HelpURL", "ImageAlign", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "ImageAlign", PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -319,7 +320,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC lstDocuments = insertListBox("lstDocuments", null, null, new String[] { - "Height", "HelpURL", "LineCount", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -340,7 +341,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC btnDocUp = insertButton("btnDocUp", BTNDOCUP_ACTION_PERFORMED, new String[] { - "FontDescriptor", "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -349,7 +350,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC btnDocDown = insertButton("btnDocDown", BTNDOCDOWN_ACTION_PERFORMED, new String[] { - "FontDescriptor", "Height", "HelpURL", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "FontDescriptor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -365,7 +366,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC lstDocTargetType = insertListBox("lstDocTargetType", null, null, new String[] { - "Dropdown", "Height", "HelpURL", "LineCount", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -402,7 +403,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC txtDocInfo = insertTextField("txtDocInfo", null, new String[] { - "Height", "HelpURL", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -450,7 +451,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC lnDisplay = insertLabel("lblDisplay", new String[] { - "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -554,7 +555,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC lstStyles = insertListBox("lstStyles", null, LSTSTYLES_ITEM_CHANGED, new String[] { - "Dropdown", "Height", "HelpURL", "LineCount", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -569,7 +570,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC txtBackground = insertLabel("txtBackground", new String[] { - "Border", "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -589,7 +590,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC txtIconset = insertLabel("txtIconset", new String[] { - "Border", "Height", "Label", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -604,7 +605,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC insertLabel("lblIconsetInfo", new String[] { - "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -615,7 +616,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC imgPreview = insertImage("imgPreview", new String[] { - "BackgroundColor", "Enabled", "Height", "ImageURL", "Name", "PositionX", "PositionY", "ScaleImage", "Step", "TabIndex", "Width" + "BackgroundColor", PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -700,7 +701,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC dateSiteCreated = insertDateField("dateSiteCreated", null, new String[] { - "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -716,7 +717,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC dateSiteUpdate = insertDateField("dateSiteUpdate", null, new String[] { - "Dropdown", "Height", "HelpURL", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -809,7 +810,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC lblFTP = insertLabel("lblFTP", new String[] { - "Border", "Height", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -829,7 +830,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC insertImage("imgFTPDisabled", new String[] { - "BackgroundColor", "Border", "Enabled", "Height", "ImageURL", "Name", "PositionX", "PositionY", "ScaleImage", "Step", "TabIndex", "Width" + "BackgroundColor", "Border", PropertyNames.PROPERTY_ENABLED, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -838,7 +839,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC insertLabel("lblFTPDisabled", new String[] { - "BackgroundColor", "Height", "Label", "MultiLine", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "BackgroundColor", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -869,7 +870,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC cbSaveSettings = insertComboBox("txtSaveSettings", TXTSAVESETTINGS_TEXT_CHANGED, TXTSAVESETTINGS_TEXT_CHANGED, TXTSAVESETTINGS_TEXT_CHANGED, new String[] { - "Autocomplete", "Dropdown", "Height", "HelpURL", "LineCount", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Autocomplete", "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, "LineCount", PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH }, new Object[] { @@ -899,7 +900,7 @@ public abstract class WebWizardDialog extends WizardDialog implements WebWizardC /*for (int i = 0; i<8; i++) imgIconsPrev[i] = insertImage("imgIconPrev" + i, - new String[] { "BackgroundColor","Border","Height","ImageURL", "PositionX", "PositionY", "ScaleImage", "Step", "Tabstop", "Width"}, + new String[] { "BackgroundColor","Border",PropertyNames.PROPERTY_HEIGHT,PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, "Tabstop", PropertyNames.PROPERTY_WIDTH}, new Object[] { new Integer(-1), new Short((short)0),new Integer(14),"file:///c:/bludisk.gif", new Integer(97 + i * 20 + 7 ),new Integer(147),Boolean.FALSE,INTEGERS[5],Boolean.FALSE,new Integer(14)}); */ } diff --git a/wizards/com/sun/star/wizards/web/data/CGDocument.java b/wizards/com/sun/star/wizards/web/data/CGDocument.java index 177355612675..765e49d1f6ee 100644 --- a/wizards/com/sun/star/wizards/web/data/CGDocument.java +++ b/wizards/com/sun/star/wizards/web/data/CGDocument.java @@ -46,6 +46,7 @@ import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.FileAccess; import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.XMLHelper; import com.sun.star.wizards.common.XMLProvider; import com.sun.star.wizards.document.OfficeDocument; @@ -236,7 +237,7 @@ public class CGDocument extends ConfigSetItem implements XMLProvider } String media = (mediaDesc == null) - ? "" : (String) Properties.getPropertyValue(mediaDescriptor, "Name"); + ? "" : (String) Properties.getPropertyValue(mediaDescriptor, PropertyNames.PROPERTY_NAME); appType = getDocType(media); //System.out.println(appType); diff --git a/wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.java b/wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.java index 07a79e15040e..698bf7f44c53 100644 --- a/wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.java +++ b/wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.java @@ -28,6 +28,7 @@ package com.sun.star.wizards.web.export; import com.sun.star.io.IOException; import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.ui.event.Task; import com.sun.star.wizards.web.data.CGDocument; import com.sun.star.wizards.web.data.CGSession; @@ -61,7 +62,7 @@ public class ImpressHTMLExporter extends ConfiguredExporter props.put("HomepageURL", getHomepageURL(session)); props.put("UserText", source.cp_Title); - props.put("Width", getImageWidth(session)); + props.put(PropertyNames.PROPERTY_WIDTH, getImageWidth(session)); /* * props.put("BackColor",...); diff --git a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx index 1f822e8df096..fa259cadc647 100644 --- a/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx +++ b/xmlsecurity/inc/xmlsecurity/certificatechooser.hxx @@ -69,9 +69,9 @@ private: CancelButton maCancelBtn; HelpButton maHelpBtn; - BOOL mbInitialized; + sal_Bool mbInitialized; - USHORT GetSelectedEntryPos( void ) const; + sal_uInt16 GetSelectedEntryPos( void ) const; // DECL_LINK( Initialize, void* ); DECL_LINK( ViewButtonHdl, Button* ); DECL_LINK( CertificateHighlightHdl, void* ); diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx index 10727ad63d47..622a912e788e 100644 --- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx +++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx @@ -62,12 +62,12 @@ private: OKButton maOkBtn; HelpButton maHelpBtn; - BOOL mbCheckForPrivateKey; + sal_Bool mbCheckForPrivateKey; cssu::Reference< dcss::xml::crypto::XSecurityEnvironment > mxSecurityEnvironment; cssu::Reference< dcss::security::XCertificate > mxCert; public: - CertificateViewer( Window* pParent, const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment, const cssu::Reference< dcss::security::XCertificate >& rXCert, BOOL bCheckForPrivateKey ); + CertificateViewer( Window* pParent, const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment, const cssu::Reference< dcss::security::XCertificate >& rXCert, sal_Bool bCheckForPrivateKey ); virtual ~CertificateViewer(); }; diff --git a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx index 4d48aad47555..d40f2ebf4a12 100644 --- a/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx +++ b/xmlsecurity/inc/xmlsecurity/digitalsignaturesdialog.hxx @@ -132,8 +132,8 @@ public: sal_Bool bReadOnly, const ::rtl::OUString& sODFVersion, bool bHasDocumentSignature); ~DigitalSignaturesDialog(); - // Initialize the dialog and the security environment, returns TRUE on success - BOOL Init( const rtl::OUString& rTokenName ); + // Initialize the dialog and the security environment, returns sal_True on success + sal_Bool Init( const rtl::OUString& rTokenName ); // Set the storage which should be signed or verified void SetStorage( const cssu::Reference < css::embed::XStorage >& rxStore ); diff --git a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx index 2b4b57c00425..6ebab6d99265 100644 --- a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx +++ b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx @@ -120,7 +120,7 @@ private: RadioButton maMediumRB; RadioButton maLowRB; - USHORT mnCurLevel; + sal_uInt16 mnCurLevel; protected: DECL_LINK( RadioButtonHdl, RadioButton* ); diff --git a/xmlsecurity/inc/xmlsecurity/stbcontrl.hxx b/xmlsecurity/inc/xmlsecurity/stbcontrl.hxx index b10465db2208..8e99a393ace2 100644 --- a/xmlsecurity/inc/xmlsecurity/stbcontrl.hxx +++ b/xmlsecurity/inc/xmlsecurity/stbcontrl.hxx @@ -45,10 +45,10 @@ private: public: SFX_DECL_STATUSBAR_CONTROL(); - XmlSecStatusBarControl( USHORT _nId, StatusBar& _rStb, SfxBindings& _rBind ); + XmlSecStatusBarControl( sal_uInt16 _nId, StatusBar& _rStb, SfxBindings& _rBind ); ~XmlSecStatusBarControl(); - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual void Paint( const UserDrawEvent& rEvt ); virtual void Command( const CommandEvent& rCEvt ); }; diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index ff7de666036d..e8eddefb51cf 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -230,7 +230,7 @@ sal_Bool DocumentDigitalSignatures::ImplViewSignatures( { if ( aSignaturesDialog.SignaturesChanged() ) { - bChanges = TRUE; + bChanges = sal_True; // If we have a storage and no stream, we are responsible for commit if ( rxStorage.is() && !xSignStream.is() ) { @@ -397,7 +397,7 @@ void DocumentDigitalSignatures::showCertificate( if ( bInit ) { - CertificateViewer aViewer( NULL, aSignatureHelper.GetSecurityEnvironment(), _Certificate, FALSE ); + CertificateViewer aViewer( NULL, aSignatureHelper.GetSecurityEnvironment(), _Certificate, sal_False ); aViewer.Execute(); } diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index 5a34945c639b..9e934d4e04f8 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -52,15 +52,15 @@ using namespace ::com::sun::star; #define INVAL_SEL 0xFFFF -USHORT CertificateChooser::GetSelectedEntryPos( void ) const +sal_uInt16 CertificateChooser::GetSelectedEntryPos( void ) const { - USHORT nSel = INVAL_SEL; + sal_uInt16 nSel = INVAL_SEL; SvLBoxEntry* pSel = maCertLB.FirstSelected(); if( pSel ) - nSel = (USHORT) ( sal_uIntPtr ) pSel->GetUserData(); + nSel = (sal_uInt16) ( sal_uIntPtr ) pSel->GetUserData(); - return (USHORT) nSel; + return (sal_uInt16) nSel; } CertificateChooser::CertificateChooser( Window* _pParent, uno::Reference< uno::XComponentContext>& _rxCtx, uno::Reference< dcss::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment, const SignatureInformations& _rCertsToIgnore ) @@ -85,7 +85,7 @@ CertificateChooser::CertificateChooser( Window* _pParent, uno::Reference< uno::X mxCtx = _rxCtx; mxSecurityEnvironment = _rxSecurityEnvironment; - mbInitialized = FALSE; + mbInitialized = sal_False; // disable buttons CertificateHighlightHdl( NULL ); @@ -113,12 +113,12 @@ short CertificateChooser::Execute() Window* pMe = this; Window* pParent = GetParent(); if ( pParent ) - pParent->EnableInput( FALSE ); + pParent->EnableInput( sal_False ); pMe->Show(); pMe->Update(); ImplInitialize(); if ( pParent ) - pParent->EnableInput( TRUE ); + pParent->EnableInput( sal_True ); return ModalDialog::Execute(); } @@ -192,7 +192,7 @@ void CertificateChooser::ImplInitialize() // enable/disable buttons CertificateHighlightHdl( NULL ); - mbInitialized = TRUE; + mbInitialized = sal_True; } } @@ -200,7 +200,7 @@ void CertificateChooser::ImplInitialize() uno::Reference< dcss::security::XCertificate > CertificateChooser::GetSelectedCertificate() { uno::Reference< dcss::security::XCertificate > xCert; - USHORT nSelected = GetSelectedEntryPos(); + sal_uInt16 nSelected = GetSelectedEntryPos(); if ( nSelected < maCerts.getLength() ) xCert = maCerts[ nSelected ]; return xCert; @@ -231,7 +231,7 @@ void CertificateChooser::ImplShowCertificateDetails() uno::Reference< dcss::security::XCertificate > xCert = GetSelectedCertificate(); if( xCert.is() ) { - CertificateViewer aViewer( this, mxSecurityEnvironment, xCert, TRUE ); + CertificateViewer aViewer( this, mxSecurityEnvironment, xCert, sal_True ); aViewer.Execute(); } } diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index af2ffc4352ed..3b38045938f2 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -70,7 +70,7 @@ namespace CertificateViewer::CertificateViewer( Window* _pParent, const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment, - const cssu::Reference< dcss::security::XCertificate >& _rXCert, BOOL bCheckForPrivateKey ) + const cssu::Reference< dcss::security::XCertificate >& _rXCert, sal_Bool bCheckForPrivateKey ) :TabDialog ( _pParent, XMLSEC_RES( RID_XMLSECDLG_CERTVIEWER ) ) ,maTabCtrl ( this, XMLSEC_RES( 1 ) ) ,maOkBtn ( this, XMLSEC_RES( BTN_OK ) ) @@ -209,12 +209,12 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif XmlSec::AlignAfterImage( maKeyImg, maHintCorrespPrivKeyFI, 12 ); // Check if we have the private key... - BOOL bHasPrivateKey = FALSE; + sal_Bool bHasPrivateKey = sal_False; // #i41270# Check only if we have that certificate in our security environment if ( _pDlg->mbCheckForPrivateKey ) { long nCertificateCharacters = _pDlg->mxSecurityEnvironment->getCertificateCharacters( xCert ); - bHasPrivateKey = ( nCertificateCharacters & security::CertificateCharacters::HAS_PRIVATE_KEY ) ? TRUE : FALSE; + bHasPrivateKey = ( nCertificateCharacters & security::CertificateCharacters::HAS_PRIVATE_KEY ) ? sal_True : sal_False; } if ( !bHasPrivateKey ) { @@ -247,7 +247,7 @@ inline Details_UserDatat::Details_UserDatat( const String& _rTxt, bool _bFixedWi void CertificateViewerDetailsTP::Clear( void ) { maElementML.SetText( String() ); - ULONG i = 0; + sal_uLong i = 0; SvLBoxEntry* pEntry = maElementsLB.GetEntry( i ); while( pEntry ) { @@ -286,7 +286,7 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( Window* _pParent, Certif // fill list box Reference< security::XCertificate > xCert = mpDlg->mxCert; - UINT16 nLineBreak = 16; + sal_uInt16 nLineBreak = 16; const char* pHexSep = " "; String aLBEntry; String aDetails; @@ -499,7 +499,7 @@ IMPL_LINK( CertificateViewerCertPathTP, ViewCertHdl, void*, EMPTYARG ) SvLBoxEntry* pEntry = maCertPathLB.FirstSelected(); if( pEntry ) { - CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, ((CertPath_UserData*)pEntry->GetUserData())->mxCert, FALSE ); + CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, ((CertPath_UserData*)pEntry->GetUserData())->mxCert, sal_False ); aViewer.Execute(); } @@ -525,7 +525,7 @@ IMPL_LINK( CertificateViewerCertPathTP, CertSelectHdl, void*, EMPTYARG ) void CertificateViewerCertPathTP::Clear( void ) { maCertStatusML.SetText( String() ); - ULONG i = 0; + sal_uLong i = 0; SvLBoxEntry* pEntry = maCertPathLB.GetEntry( i ); while( pEntry ) { diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index df032dcbe5ef..15ac9b591c48 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -266,7 +266,7 @@ DigitalSignaturesDialog::~DigitalSignaturesDialog() { } -BOOL DigitalSignaturesDialog::Init( const rtl::OUString& rTokenName ) +sal_Bool DigitalSignaturesDialog::Init( const rtl::OUString& rTokenName ) { bool bInit = maSignatureHelper.Init( rTokenName ); @@ -543,7 +543,7 @@ IMPL_LINK( DigitalSignaturesDialog, RemoveButtonHdl, Button*, EMPTYARG ) { try { - USHORT nSelected = (USHORT) (sal_uIntPtr) maSignaturesLB.FirstSelected()->GetUserData(); + sal_uInt16 nSelected = (sal_uInt16) (sal_uIntPtr) maSignaturesLB.FirstSelected()->GetUserData(); maCurrentSignatureInformations.erase( maCurrentSignatureInformations.begin()+nSelected ); // Export all other signatures... @@ -752,7 +752,7 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails() { if( maSignaturesLB.FirstSelected() ) { - USHORT nSelected = (USHORT) (sal_uIntPtr) maSignaturesLB.FirstSelected()->GetUserData(); + sal_uInt16 nSelected = (sal_uInt16) (sal_uIntPtr) maSignaturesLB.FirstSelected()->GetUserData(); const SignatureInformation& rInfo = maCurrentSignatureInformations[ nSelected ]; css::uno::Reference<css::xml::crypto::XSecurityEnvironment > xSecEnv = maSignatureHelper.GetSecurityEnvironment(); @@ -769,7 +769,7 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails() DBG_ASSERT( xCert.is(), "Error getting cCertificate!" ); if ( xCert.is() ) { - CertificateViewer aViewer( this, maSignatureHelper.GetSecurityEnvironment(), xCert, FALSE ); + CertificateViewer aViewer( this, maSignatureHelper.GetSecurityEnvironment(), xCert, sal_False ); aViewer.Execute(); } } diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx index 9c554d023018..6e9498c264b5 100644 --- a/xmlsecurity/source/dialogs/macrosecurity.cxx +++ b/xmlsecurity/source/dialogs/macrosecurity.cxx @@ -123,7 +123,7 @@ MacroSecurityLevelTP::MacroSecurityLevelTP( Window* _pParent, MacroSecurity* _pD maHighRB.SetClickHdl( LINK( this, MacroSecurityLevelTP, RadioButtonHdl ) ); maVeryHighRB.SetClickHdl( LINK( this, MacroSecurityLevelTP, RadioButtonHdl ) ); - mnCurLevel = (USHORT) mpDlg->maSecOptions.GetMacroSecurityLevel(); + mnCurLevel = (sal_uInt16) mpDlg->maSecOptions.GetMacroSecurityLevel(); sal_Bool bReadonly = mpDlg->maSecOptions.IsReadOnly( SvtSecurityOptions::E_MACRO_SECLEVEL ); RadioButton* pCheck = 0; @@ -161,7 +161,7 @@ MacroSecurityLevelTP::MacroSecurityLevelTP( Window* _pParent, MacroSecurity* _pD IMPL_LINK( MacroSecurityLevelTP, RadioButtonHdl, RadioButton*, EMPTYARG ) { - USHORT nNewLevel = 0; + sal_uInt16 nNewLevel = 0; if( maVeryHighRB.IsChecked() ) nNewLevel = 3; else if( maHighRB.IsChecked() ) @@ -198,7 +198,7 @@ IMPL_LINK( MacroSecurityTrustedSourcesTP, ViewCertPBHdl, void*, EMPTYARG ) { if( maTrustCertLB.FirstSelected() ) { - USHORT nSelected = USHORT( sal_uIntPtr( maTrustCertLB.FirstSelected()->GetUserData() ) ); + sal_uInt16 nSelected = sal_uInt16( sal_uIntPtr( maTrustCertLB.FirstSelected()->GetUserData() ) ); uno::Reference< dcss::security::XSerialNumberAdapter > xSerialNumberAdapter = ::com::sun::star::security::SerialNumberAdapter::create(mpDlg->mxCtx); @@ -213,7 +213,7 @@ IMPL_LINK( MacroSecurityTrustedSourcesTP, ViewCertPBHdl, void*, EMPTYARG ) if ( xCert.is() ) { - CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, xCert, FALSE ); + CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, xCert, sal_False ); aViewer.Execute(); } } @@ -224,7 +224,7 @@ IMPL_LINK( MacroSecurityTrustedSourcesTP, RemoveCertPBHdl, void*, EMPTYARG ) { if( maTrustCertLB.FirstSelected() ) { - USHORT nAuthor = USHORT( sal_uIntPtr( maTrustCertLB.FirstSelected()->GetUserData() ) ); + sal_uInt16 nAuthor = sal_uInt16( sal_uIntPtr( maTrustCertLB.FirstSelected()->GetUserData() ) ); ::comphelper::removeElementAt( maTrustedAuthors, nAuthor ); FillCertLB(); @@ -277,13 +277,13 @@ IMPL_LINK( MacroSecurityTrustedSourcesTP, AddLocPBHdl, void*, EMPTYARG ) IMPL_LINK( MacroSecurityTrustedSourcesTP, RemoveLocPBHdl, void*, EMPTYARG ) { - USHORT nSel = maTrustFileLocLB.GetSelectEntryPos(); + sal_uInt16 nSel = maTrustFileLocLB.GetSelectEntryPos(); if( nSel != LISTBOX_ENTRY_NOTFOUND ) { maTrustFileLocLB.RemoveEntry( nSel ); // --> PB 2004-09-21 #i33584# // after remove an entry, select another one if exists - USHORT nNewCount = maTrustFileLocLB.GetEntryCount(); + sal_uInt16 nNewCount = maTrustFileLocLB.GetEntryCount(); if ( nNewCount > 0 ) { if ( nSel >= nNewCount ) @@ -398,11 +398,11 @@ void MacroSecurityTrustedSourcesTP::ActivatePage() void MacroSecurityTrustedSourcesTP::ClosePage( void ) { - USHORT nEntryCnt = maTrustFileLocLB.GetEntryCount(); + sal_uInt16 nEntryCnt = maTrustFileLocLB.GetEntryCount(); if( nEntryCnt ) { cssu::Sequence< rtl::OUString > aSecureURLs( nEntryCnt ); - for( USHORT i = 0 ; i < nEntryCnt ; ++i ) + for( sal_uInt16 i = 0 ; i < nEntryCnt ; ++i ) { ::rtl::OUString aURL( maTrustFileLocLB.GetEntry( i ) ); osl::FileBase::getFileURLFromSystemPath( aURL, aURL ); diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx index e41cf546f74f..25de43ac4566 100644 --- a/xmlsecurity/source/dialogs/resourcemanager.cxx +++ b/xmlsecurity/source/dialogs/resourcemanager.cxx @@ -98,7 +98,7 @@ namespace XmlSec String sSec( _rTime, 6, 2 ); - Date aDate( (USHORT)sDay.ToInt32(), (USHORT) sMonth.ToInt32(), (USHORT)sYear.ToInt32() ); + Date aDate( (sal_uInt16)sDay.ToInt32(), (sal_uInt16) sMonth.ToInt32(), (sal_uInt16)sYear.ToInt32() ); Time aTime( sHour.ToInt32(), sMin.ToInt32(), sSec.ToInt32(), 0 ); const LocaleDataWrapper& rLoDa = GetLocaleData(); String aStr( rLoDa.getDate( aDate ) ); @@ -357,19 +357,19 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) return retVal; } - String GetHexString( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep, UINT16 _nLineBreak ) + String GetHexString( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep, sal_uInt16 _nLineBreak ) { const sal_Int8* pSerNumSeq = _rSeq.getConstArray(); int nCnt = _rSeq.getLength(); String aStr; const char pHexDigs[ 17 ] = "0123456789ABCDEF"; char pBuffer[ 3 ] = " "; - UINT8 nNum; - UINT16 nBreakStart = _nLineBreak? _nLineBreak : 1; - UINT16 nBreak = nBreakStart; + sal_uInt8 nNum; + sal_uInt16 nBreakStart = _nLineBreak? _nLineBreak : 1; + sal_uInt16 nBreak = nBreakStart; for( int i = 0 ; i < nCnt ; ++i ) { - nNum = UINT8( pSerNumSeq[ i ] ); + nNum = sal_uInt8( pSerNumSeq[ i ] ); //MM : exchange the buffer[0] and buffer[1], which make it consistent with Mozilla and Windows pBuffer[ 1 ] = pHexDigs[ nNum & 0x0F ]; diff --git a/xmlsecurity/source/dialogs/resourcemanager.hxx b/xmlsecurity/source/dialogs/resourcemanager.hxx index 9ca06d17d0b5..0a0615871af3 100644 --- a/xmlsecurity/source/dialogs/resourcemanager.hxx +++ b/xmlsecurity/source/dialogs/resourcemanager.hxx @@ -56,7 +56,7 @@ namespace XmlSec const ::rtl::OUString & rRawString); String GetContentPart( const String& _rRawString ); - String GetHexString( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep = ":", UINT16 _nLineBreak = 0xFFFF ); + String GetHexString( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep = ":", sal_uInt16 _nLineBreak = 0xFFFF ); long ShrinkToFitWidth( Control& _rCtrl, long _nOffs = 0 ); // return = new width void AlignAfterImage( const FixedImage& _rImage, Control& _rCtrl, long _nXOffset = 0 ); diff --git a/xmlsecurity/source/dialogs/stbcontrl.cxx b/xmlsecurity/source/dialogs/stbcontrl.cxx index cc18373f04d8..44395ed5d328 100644 --- a/xmlsecurity/source/dialogs/stbcontrl.cxx +++ b/xmlsecurity/source/dialogs/stbcontrl.cxx @@ -74,19 +74,19 @@ SFX_IMPL_STATUSBAR_CONTROL( XmlSecStatusBarControl, SfxBoolItem ); class FunctionPopup_Impl : public PopupMenu { public: - FunctionPopup_Impl( USHORT nCheck ); + FunctionPopup_Impl( sal_uInt16 nCheck ); - USHORT GetSelected() const { return nSelected; } + sal_uInt16 GetSelected() const { return nSelected; } private: - USHORT nSelected; + sal_uInt16 nSelected; virtual void Select(); }; // ----------------------------------------------------------------------- -FunctionPopup_Impl::FunctionPopup_Impl( USHORT nCheck ) : +FunctionPopup_Impl::FunctionPopup_Impl( sal_uInt16 nCheck ) : PopupMenu( ResId( RID_SVXMNU_PSZ_FUNC, DIALOG_MGR() ) ), nSelected( 0 ) { @@ -113,7 +113,7 @@ struct XmlSecStatusBarControl::XmlSecStatusBarControl_Impl }; -XmlSecStatusBarControl::XmlSecStatusBarControl( USHORT _nId, StatusBar& _rStb, SfxBindings& _rBind ) +XmlSecStatusBarControl::XmlSecStatusBarControl( sal_uInt16 _nId, StatusBar& _rStb, SfxBindings& _rBind ) :SfxStatusBarControl( _nId, _rStb, _rBind ) ,mpImpl( new XmlSecStatusBarControl_Impl ) @@ -127,7 +127,7 @@ XmlSecStatusBarControl::~XmlSecStatusBarControl() delete mpImpl; } -void XmlSecStatusBarControl::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) +void XmlSecStatusBarControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { GetStatusBar().SetHelpText( GetId(), String() ); // necessary ? GetStatusBar().SetHelpId( GetId(), nSID ); // necessary ? diff --git a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx index 4c0c847b8d54..c701adefd445 100644 --- a/xmlsecurity/source/helper/xmlsignaturehelper2.cxx +++ b/xmlsecurity/source/helper/xmlsignaturehelper2.cxx @@ -183,9 +183,9 @@ uno::Reference< io::XInputStream > SAL_CALL UriBindingHelper::getUriBinding( con { SvFileStream* pStream = new SvFileStream( uri, STREAM_READ ); pStream->Seek( STREAM_SEEK_TO_END ); - ULONG nBytes = pStream->Tell(); + sal_uLong nBytes = pStream->Tell(); pStream->Seek( STREAM_SEEK_TO_BEGIN ); - SvLockBytesRef xLockBytes = new SvLockBytes( pStream, TRUE ); + SvLockBytesRef xLockBytes = new SvLockBytes( pStream, sal_True ); xInputStream = new utl::OInputStreamHelper( xLockBytes, nBytes ); } return xInputStream; diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx index 773c92e38c57..fd3f0aca0952 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx @@ -481,7 +481,7 @@ void X509Certificate_MSCryptImpl :: setRawCert( Sequence< sal_Int8 > rawCert ) t } if( rawCert.getLength() != 0 ) { - m_pCertContext = CertCreateCertificateContext( X509_ASN_ENCODING, ( const BYTE* )&rawCert[0], rawCert.getLength() ) ; + m_pCertContext = CertCreateCertificateContext( X509_ASN_ENCODING, ( const sal_uInt8* )&rawCert[0], rawCert.getLength() ) ; } } diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index 9458424afa7c..f004d0195f88 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -112,7 +112,7 @@ char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*arg*/ ) if ( pPasswordRequest->isPassword() ) { ByteString aPassword = ByteString( String( pPasswordRequest->getPassword() ), gsl_getSystemTextEncoding() ); - USHORT nLen = aPassword.Len(); + sal_uInt16 nLen = aPassword.Len(); char* pPassword = (char*) PORT_Alloc( nLen+1 ) ; pPassword[nLen] = 0; memcpy( pPassword, aPassword.GetBuffer(), nLen ); diff --git a/xmlsecurity/tools/demo/util.cxx b/xmlsecurity/tools/demo/util.cxx index a124edfd523b..5f9fccb9f7d9 100644 --- a/xmlsecurity/tools/demo/util.cxx +++ b/xmlsecurity/tools/demo/util.cxx @@ -92,9 +92,9 @@ cssu::Reference< cssl::XMultiServiceFactory > CreateDemoServiceFactory() { SvFileStream* pStream = new SvFileStream( rStreamName, STREAM_READ ); pStream->Seek( STREAM_SEEK_TO_END ); - ULONG nBytes = pStream->Tell(); + sal_uLong nBytes = pStream->Tell(); pStream->Seek( STREAM_SEEK_TO_BEGIN ); - SvLockBytesRef xLockBytes = new SvLockBytes( pStream, TRUE ); + SvLockBytesRef xLockBytes = new SvLockBytes( pStream, sal_True ); uno::Reference< io::XInputStream > xInputStream = new utl::OInputStreamHelper( xLockBytes, nBytes ); return xInputStream; @@ -104,7 +104,7 @@ cssu::Reference< cssl::XMultiServiceFactory > CreateDemoServiceFactory() ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > OpenOutputStream( const ::rtl::OUString& rStreamName ) { SvFileStream* pStream = new SvFileStream( rStreamName, STREAM_WRITE ); - SvLockBytesRef xLockBytes = new SvLockBytes( pStream, TRUE ); + SvLockBytesRef xLockBytes = new SvLockBytes( pStream, sal_True ); uno::Reference< io::XOutputStream > xOutputStream = new utl::OOutputStreamHelper( xLockBytes ); return xOutputStream; diff --git a/xmlsecurity/tools/demo/util.hxx b/xmlsecurity/tools/demo/util.hxx index 46abbc5b7e21..7ac5bb69a21a 100644 --- a/xmlsecurity/tools/demo/util.hxx +++ b/xmlsecurity/tools/demo/util.hxx @@ -47,4 +47,4 @@ long QueryVerifySignature(); ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > OpenOutputStream( const ::rtl::OUString& rStreamName ); ::rtl::OUString getSignatureInformations( const SignatureInformations& SignatureInformations, ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment ); -::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > getCertificateFromEnvironment( ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment, BOOL nType); +::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > getCertificateFromEnvironment( ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment, sal_Bool nType); diff --git a/xmlsecurity/tools/demo/util2.cxx b/xmlsecurity/tools/demo/util2.cxx index 0ec576d8d3f8..f0115c419aa8 100644 --- a/xmlsecurity/tools/demo/util2.cxx +++ b/xmlsecurity/tools/demo/util2.cxx @@ -331,7 +331,7 @@ void convertDateTime( ::rtl::OUStringBuffer& rBuffer, } ::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > - getCertificateFromEnvironment( ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment , BOOL nType) + getCertificateFromEnvironment( ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment , sal_Bool nType) { cssu::Sequence< cssu::Reference< ::com::sun::star::security::XCertificate > > xPersonalCerts ; int length = 0; @@ -344,7 +344,7 @@ void convertDateTime( ::rtl::OUStringBuffer& rBuffer, encoding = osl_getTextEncodingFromLocale( pLocale ) ; // CP end - if( nType != FALSE ) + if( nType != sal_False ) xPersonalCerts = xSecurityEnvironment->getPersonalCertificates() ; else return NULL; // not support then; diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx index 669d3e6705ea..005122b8cce7 100644 --- a/xmlsecurity/workben/signaturetest.cxx +++ b/xmlsecurity/workben/signaturetest.cxx @@ -226,7 +226,7 @@ MyWin::MyWin( Window* pParent, WinBits nWinStyle ) : maCryptoCheckBox.SetPosSizePixel( TEXTFIELDSTARTX, nY, aOutputSize.Width()-2*TEXTFIELDSTARTX, FIXEDLINEHEIGHT ); maCryptoCheckBox.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Use Default Token (NSS option only)" ) ) ); - maCryptoCheckBox.Check( TRUE ); + maCryptoCheckBox.Check( sal_True ); maEditTokenName.Disable(); maFixedTextTokenName.Disable(); maCryptoCheckBox.SetClickHdl( LINK( this, MyWin, CryptoCheckBoxHdl ) ); @@ -475,7 +475,7 @@ IMPL_LINK( MyWin, SignButtonHdl, Button*, EMPTYARG ) aSignatureHelper.AddForSigning( nSecurityId, aBINFileName, aBINFileName, sal_True ); SvFileStream* pStream = new SvFileStream( aSIGFileName, STREAM_WRITE ); - SvLockBytesRef xLockBytes = new SvLockBytes( pStream, TRUE ); + SvLockBytesRef xLockBytes = new SvLockBytes( pStream, sal_True ); uno::Reference< io::XOutputStream > xOutputStream = new utl::OOutputStreamHelper( xLockBytes ); bool bDone = aSignatureHelper.CreateAndWriteSignature( xOutputStream ); @@ -524,9 +524,9 @@ IMPL_LINK( MyWin, VerifyButtonHdl, Button*, EMPTYARG ) SvFileStream* pStream = new SvFileStream( aSIGFileName, STREAM_READ ); pStream->Seek( STREAM_SEEK_TO_END ); - ULONG nBytes = pStream->Tell(); + sal_uLong nBytes = pStream->Tell(); pStream->Seek( STREAM_SEEK_TO_BEGIN ); - SvLockBytesRef xLockBytes = new SvLockBytes( pStream, TRUE ); + SvLockBytesRef xLockBytes = new SvLockBytes( pStream, sal_True ); uno::Reference< io::XInputStream > xInputStream = new utl::OInputStreamHelper( xLockBytes, nBytes ); bool bDone = aSignatureHelper.ReadAndVerifySignature( xInputStream ); xInputStream->closeInput(); |