diff options
Diffstat (limited to 'sw/source/ui/config')
-rw-r--r-- | sw/source/ui/config/barcfg.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/config/caption.cxx | 28 | ||||
-rw-r--r-- | sw/source/ui/config/cfgitems.cxx | 36 | ||||
-rw-r--r-- | sw/source/ui/config/fontcfg.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/config/mailconfigpage.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/config/modcfg.cxx | 44 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.cxx | 80 | ||||
-rw-r--r-- | sw/source/ui/config/optload.cxx | 106 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 350 | ||||
-rw-r--r-- | sw/source/ui/config/prtopt.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/config/uinums.cxx | 114 | ||||
-rw-r--r-- | sw/source/ui/config/usrpref.cxx | 34 | ||||
-rw-r--r-- | sw/source/ui/config/viewopt.cxx | 44 |
13 files changed, 430 insertions, 430 deletions
diff --git a/sw/source/ui/config/barcfg.cxx b/sw/source/ui/config/barcfg.cxx index 5fb403da58ce..a271d50fd6dd 100644 --- a/sw/source/ui/config/barcfg.cxx +++ b/sw/source/ui/config/barcfg.cxx @@ -50,11 +50,11 @@ using namespace com::sun::star::uno; /* --------------------------------------------------------------------------- ---------------------------------------------------------------------------*/ -SwToolbarConfigItem::SwToolbarConfigItem( BOOL bWeb ) : +SwToolbarConfigItem::SwToolbarConfigItem( sal_Bool bWeb ) : ConfigItem(bWeb ? C2U("Office.WriterWeb/ObjectBar") : C2U("Office.Writer/ObjectBar"), CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE) { - for(USHORT i = 0; i <= SEL_TYPE_GRAPHIC; i++ ) + for(sal_uInt16 i = 0; i <= SEL_TYPE_GRAPHIC; i++ ) aTbxIdArray[i] = -1; Sequence<OUString> aNames = GetPropertyNames(); diff --git a/sw/source/ui/config/caption.cxx b/sw/source/ui/config/caption.cxx index d60361e49453..25a3c85e1ee4 100644 --- a/sw/source/ui/config/caption.cxx +++ b/sw/source/ui/config/caption.cxx @@ -42,15 +42,15 @@ --------------------------------------------------------------------*/ InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleId) : - bUseCaption(FALSE), + bUseCaption(sal_False), eObjType(eType), nNumType(SVX_NUM_ARABIC), sNumberSeparator( ::rtl::OUString::createFromAscii(". ") ), nPos(1), nLevel(0), sSeparator( String::CreateFromAscii( ": " ) ), - bIgnoreSeqOpts(FALSE), - bCopyAttributes(FALSE) + bIgnoreSeqOpts(sal_False), + bCopyAttributes(sal_False) { if (pOleId) aOleId = *pOleId; @@ -100,7 +100,7 @@ InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt ) Beschreibung: --------------------------------------------------------------------*/ -BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const +sal_Bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const { return (eObjType == rOpt.eObjType && aOleId == rOpt.aOleId); // Damit gleiche Ole-IDs nicht mehrfach eingefuegt @@ -127,9 +127,9 @@ BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const /*SvStream& operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt ) { rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding(); - UINT16 nVal; - BYTE cVal; - BYTE nVersion; + sal_uInt16 nVal; + sal_uInt8 cVal; + sal_uInt8 nVersion; rIStream >> nVersion; rIStream >> cVal; rCapOpt.UseCaption() = cVal != 0; @@ -160,20 +160,20 @@ BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const /*SvStream& operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt ) { rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding(); - rOStream << (BYTE)CAPTION_VERSION - << (BYTE)rCapOpt.UseCaption() - << (UINT16)rCapOpt.eObjType + rOStream << (sal_uInt8)CAPTION_VERSION + << (sal_uInt8)rCapOpt.UseCaption() + << (sal_uInt16)rCapOpt.eObjType << rCapOpt.aOleId; rOStream.WriteByteString( rCapOpt.sCategory, eEncoding ); - rOStream << (UINT16)rCapOpt.nNumType; + rOStream << (sal_uInt16)rCapOpt.nNumType; rOStream.WriteByteString( rCapOpt.sCaption, eEncoding ); - BYTE cSep = ByteString(rCapOpt.sSeparator, eEncoding).GetChar(0); - rOStream << (UINT16)rCapOpt.nPos - << (UINT16)rCapOpt.nLevel + sal_uInt8 cSep = ByteString(rCapOpt.sSeparator, eEncoding).GetChar(0); + rOStream << (sal_uInt16)rCapOpt.nPos + << (sal_uInt16)rCapOpt.nLevel << cSep; return rOStream; diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx index 8652970d588f..8197190b6c83 100644 --- a/sw/source/ui/config/cfgitems.cxx +++ b/sw/source/ui/config/cfgitems.cxx @@ -54,7 +54,7 @@ TYPEINIT1_AUTOFACTORY(SwAddPrinterItem, SfxPoolItem) TYPEINIT1_AUTOFACTORY(SwShadowCursorItem, SfxPoolItem) -SwDocDisplayItem::SwDocDisplayItem( USHORT _nWhich ) : +SwDocDisplayItem::SwDocDisplayItem( sal_uInt16 _nWhich ) : SfxPoolItem(_nWhich), aIndexBackgrndCol(COL_GRAY) { @@ -66,7 +66,7 @@ SwDocDisplayItem::SwDocDisplayItem( USHORT _nWhich ) : bFldHiddenText = bCharHiddenText = bManualBreak = - bShowHiddenPara = FALSE; + bShowHiddenPara = sal_False; }; @@ -84,17 +84,17 @@ SwDocDisplayItem::SwDocDisplayItem( const SwDocDisplayItem& rDocDisplayItem ): --------------------------------------------------------------------*/ -SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, USHORT _nWhich ) : +SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) { - bParagraphEnd = rVOpt.IsParagraph(TRUE); - bTab = rVOpt.IsTab(TRUE); - bSpace = rVOpt.IsBlank(TRUE); + bParagraphEnd = rVOpt.IsParagraph(sal_True); + bTab = rVOpt.IsTab(sal_True); + bSpace = rVOpt.IsBlank(sal_True); bNonbreakingSpace = rVOpt.IsHardBlank(); bSoftHyphen = rVOpt.IsSoftHyph(); - bCharHiddenText = rVOpt.IsShowHiddenChar(TRUE); + bCharHiddenText = rVOpt.IsShowHiddenChar(sal_True); bFldHiddenText = rVOpt.IsShowHiddenField(); - bManualBreak = rVOpt.IsLineBreak(TRUE); + bManualBreak = rVOpt.IsLineBreak(sal_True); bShowHiddenPara = rVOpt.IsShowHiddenPara(); } @@ -167,7 +167,7 @@ void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ -SwElemItem::SwElemItem( USHORT _nWhich ) : +SwElemItem::SwElemItem( sal_uInt16 _nWhich ) : SfxPoolItem(_nWhich) { bHorzScrollbar = @@ -184,7 +184,7 @@ SwElemItem::SwElemItem( USHORT _nWhich ) : bGraphic = bDrawing = bFieldName = - bNotes = FALSE; + bNotes = sal_False; } /*-------------------------------------------------------------------- Beschreibung: @@ -199,14 +199,14 @@ SwElemItem::SwElemItem( const SwElemItem& rElemItem ): Beschreibung: --------------------------------------------------------------------*/ -SwElemItem::SwElemItem(const SwViewOption& rVOpt, USHORT _nWhich) : +SwElemItem::SwElemItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich) : SfxPoolItem( _nWhich ) { bHorzScrollbar = rVOpt.IsViewHScrollBar(); bVertScrollbar = rVOpt.IsViewVScrollBar(); bAnyRuler = rVOpt.IsViewAnyRuler(); - bHorzRuler = rVOpt.IsViewHRuler(TRUE); - bVertRuler = rVOpt.IsViewVRuler(TRUE); + bHorzRuler = rVOpt.IsViewHRuler(sal_True); + bVertRuler = rVOpt.IsViewVRuler(sal_True); bVertRulerRight = rVOpt.IsVRulerRight(); bCrosshair = rVOpt.IsCrossHair(); bHandles = rVOpt.IsSolidMarkHdl(); @@ -319,7 +319,7 @@ SwAddPrinterItem::SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem ): Beschreibung: CTOR fuer leeres Item --------------------------------------------------------------------*/ -SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich): +SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich): SfxPoolItem(_nWhich) { } @@ -327,7 +327,7 @@ SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich): Beschreibung: CTOR aus SwPrintOptions --------------------------------------------------------------------*/ -SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich, const SwPrintData& rPrtData ) : +SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich, const SwPrintData& rPrtData ) : SfxPoolItem(_nWhich) { SwPrintData::operator=(rPrtData); @@ -357,10 +357,10 @@ int SwAddPrinterItem::operator==( const SfxPoolItem& rAttr ) const Item fuer Einstellungsdialog, ShadowCursorSeite --------------------------------------------------*/ -SwShadowCursorItem::SwShadowCursorItem( USHORT _nWhich ) +SwShadowCursorItem::SwShadowCursorItem( sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ), eMode( FILL_TAB ) - ,bOn( FALSE ) + ,bOn( sal_False ) { } @@ -372,7 +372,7 @@ SwShadowCursorItem::SwShadowCursorItem( const SwShadowCursorItem& rCpy ) { } -SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, USHORT _nWhich ) +SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ), eMode( rVOpt.GetShdwCrsrFillMode() ) ,bOn( rVOpt.IsShadowCursor() ) diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx index e1b951c1c879..140b8da8c42c 100644 --- a/sw/source/ui/config/fontcfg.cxx +++ b/sw/source/ui/config/fontcfg.cxx @@ -192,9 +192,9 @@ SwStdFontConfig::~SwStdFontConfig() /*-----------------18.01.97 10.05------------------- --------------------------------------------------*/ -BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const +sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const { - BOOL bSame = sal_False; + sal_Bool bSame = sal_False; SvtLinguOptions aLinguOpt; SvtLinguConfig().GetOptions( aLinguOpt ); @@ -234,7 +234,7 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const case FONT_CAPTION_CJK : case FONT_INDEX_CJK : { - BOOL b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK; + sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK; bSame = b1 && sDefaultFonts[nFontType] == sDefFontCJK; } break; @@ -242,7 +242,7 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const case FONT_CAPTION_CTL : case FONT_INDEX_CTL : { - BOOL b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL; + sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL; bSame = b1 && sDefaultFonts[nFontType] == sDefFontCTL; } break; @@ -253,10 +253,10 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const /* -----------------11.01.99 13:16------------------- * Standards auslesen * --------------------------------------------------*/ -String SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang) +String SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang) { String sRet; - USHORT nFontId; + sal_uInt16 nFontId; switch( nFontType ) { case FONT_OUTLINE : @@ -294,7 +294,7 @@ String SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang) /*-- 11.10.2005 10:43:43--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eLang) +sal_Int32 SwStdFontConfig::GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang) { sal_Int32 nRet = FONTSIZE_DEFAULT; switch( nFontType ) @@ -315,7 +315,7 @@ sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eL /*-- 11.10.2005 10:50:06--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwStdFontConfig::ChangeInt( USHORT nFontType, sal_Int32 nHeight ) +void SwStdFontConfig::ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight ) { DBG_ASSERT( nFontType < DEF_FONT_COUNT, "invalid index in SwStdFontConfig::ChangInt()"); if( nFontType < DEF_FONT_COUNT && nDefaultFontHeight[nFontType] != nHeight) diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index 726d27b281d1..b8a34bad578b 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -198,7 +198,7 @@ SfxTabPage* SwMailConfigPage::Create( Window* pParent, const SfxItemSet& rAttrS /*-- 06.05.2004 10:59:41--------------------------------------------------- -----------------------------------------------------------------------*/ -BOOL SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ ) +sal_Bool SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ ) { if(m_aDisplayNameED.GetText() != m_aDisplayNameED.GetSavedValue()) m_pConfigItem->SetMailDisplayName(m_aDisplayNameED.GetText()); diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx index ec0e47393eb2..69414515a404 100644 --- a/sw/source/ui/config/modcfg.cxx +++ b/sw/source/ui/config/modcfg.cxx @@ -69,7 +69,7 @@ SV_IMPL_PTRARR_SORT(InsCapOptArr, InsCaptionOptPtr) * --------------------------------------------------*/ InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalName *pOleId) const { - for (USHORT i = 0; i < Count(); i++ ) + for (sal_uInt16 i = 0; i < Count(); i++ ) { InsCaptionOpt* pObj = GetObject(i); if (pObj->GetObjType() == eType && @@ -87,7 +87,7 @@ InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalNa * --------------------------------------------------*/ const InsCaptionOpt* SwModuleOptions::GetCapOption( - BOOL bHTML, const SwCapObjType eType, const SvGlobalName *pOleId) + sal_Bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId) { if(bHTML) { @@ -96,10 +96,10 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption( } else { - sal_Bool bFound = FALSE; + sal_Bool bFound = sal_False; if(eType == OLE_CAP && pOleId) { - for( USHORT nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++) + for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++) bFound = *pOleId == aInsertConfig.aGlobalNames[nId ]; if(!bFound) return aInsertConfig.pOLEMiscOpt; @@ -112,9 +112,9 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption( * * --------------------------------------------------*/ -BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt) +sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if(bHTML) { @@ -122,10 +122,10 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt) } else if (pOpt) { - sal_Bool bFound = FALSE; + sal_Bool bFound = sal_False; if(pOpt->GetObjType() == OLE_CAP && &pOpt->GetOleId()) { - for( USHORT nId = 0; nId <= GLOB_NAME_CHART; nId++) + for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++) bFound = pOpt->GetOleId() == aInsertConfig.aGlobalNames[nId ]; if(!bFound) { @@ -147,7 +147,7 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt) rArr.Insert(new InsCaptionOpt(*pOpt)); aInsertConfig.SetModified(); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -156,17 +156,17 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt) --------------------------------------------------*/ SwModuleOptions::SwModuleOptions() : - aInsertConfig(FALSE), - aWebInsertConfig(TRUE), - aTableConfig(FALSE), - aWebTableConfig(TRUE), - bHideFieldTips(FALSE) + aInsertConfig(sal_False), + aWebInsertConfig(sal_True), + aTableConfig(sal_False), + aWebTableConfig(sal_True), + bHideFieldTips(sal_False) { } /* -----------------------------19.01.01 12:26-------------------------------- ---------------------------------------------------------------------------*/ -String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI) +String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFromUI) { String sReturn; if(bFromUI) @@ -193,7 +193,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI) case 'x': { sal_Unicode nVal, nChar; - BOOL bValidData = TRUE; + sal_Bool bValidData = sal_True; xub_StrLen n; for( n = 0, nChar = 0; n < 2 && i < rDelim.Len(); ++n, ++i ) { @@ -206,7 +206,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI) else { DBG_ERROR( "ungueltiger Hex-Wert" ); - bValidData = FALSE; + bValidData = sal_False; break; } @@ -967,7 +967,7 @@ void SwInsertConfig::Load() else if(!bIsWeb) return; - USHORT nInsTblFlags = 0; + sal_uInt16 nInsTblFlags = 0; for(int nProp = 0; nProp < aNames.getLength(); nProp++) { if(pValues[nProp].hasValue()) @@ -1251,10 +1251,10 @@ void SwTableConfig::Load() sal_Int32 nTemp = 0; switch(nProp) { - case 0 : pValues[nProp] >>= nTemp; nTblHMove = (USHORT)MM100_TO_TWIP(nTemp); break; //"Shift/Row", - case 1 : pValues[nProp] >>= nTemp; nTblVMove = (USHORT)MM100_TO_TWIP(nTemp); break; //"Shift/Column", - case 2 : pValues[nProp] >>= nTemp; nTblHInsert = (USHORT)MM100_TO_TWIP(nTemp); break; //"Insert/Row", - case 3 : pValues[nProp] >>= nTemp; nTblVInsert = (USHORT)MM100_TO_TWIP(nTemp); break; //"Insert/Column", + case 0 : pValues[nProp] >>= nTemp; nTblHMove = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Shift/Row", + case 1 : pValues[nProp] >>= nTemp; nTblVMove = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Shift/Column", + case 2 : pValues[nProp] >>= nTemp; nTblHInsert = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Insert/Row", + case 3 : pValues[nProp] >>= nTemp; nTblVInsert = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Insert/Column", case 4 : pValues[nProp] >>= nTemp; eTblChgMode = (TblChgMode)nTemp; break; //"Change/Effect", case 5 : bInsTblFormatNum = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/NumberRecognition", case 6 : bInsTblChangeNumFormat = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/NumberFormatRecognition", diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 04b781982979..e54ef583d50c 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -137,7 +137,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe { // init options strings with local resource ids -> so do it before FreeResource() - for ( USHORT nResId = STR_COMP_OPTIONS_START; nResId < STR_COMP_OPTIONS_END; ++nResId ) + for ( sal_uInt16 nResId = STR_COMP_OPTIONS_START; nResId < STR_COMP_OPTIONS_END; ++nResId ) { String sEntry = String( SW_RES( nResId ) ); if ( STR_TAB_ALIGNMENT == nResId || @@ -149,7 +149,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe if ( pEntry ) { m_aOptionsLB.SetCheckButtonState( pEntry, SV_BUTTON_UNCHECKED ); - pEntry->SetUserData( (void*)(ULONG)nResId ); + pEntry->SetUserData( (void*)(sal_uLong)nResId ); } } m_aOptionsLB.SetStyle( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); @@ -218,7 +218,7 @@ void SwCompatibilityOptPage::ReplaceFormatName( String& rEntry ) // ----------------------------------------------------------------------- -ULONG convertBools2Ulong_Impl +sal_uLong convertBools2Ulong_Impl ( bool _bUsePrtMetrics, bool _bAddSpacing, @@ -233,8 +233,8 @@ ULONG convertBools2Ulong_Impl bool _bExpandWordSpace ) { - ULONG nRet = 0; - ULONG nSetBit = 1; + sal_uLong nRet = 0; + sal_uLong nSetBit = 1; if ( _bUsePrtMetrics ) nRet |= nSetBit; @@ -280,7 +280,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) String sDocTitle; const SfxPoolItem* pItem = NULL; SfxObjectShell* pObjShell = NULL; - if ( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_WRTSHELL, FALSE, &pItem ) ) + if ( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_WRTSHELL, sal_False, &pItem ) ) m_pWrtShell = (SwWrtShell*)( (const SwPtrItem*)pItem )->GetValue(); if ( m_pWrtShell ) { @@ -378,8 +378,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) if ( sNewEntry.Len() == 0 ) sNewEntry = sName; - USHORT nPos = m_aFormattingLB.InsertEntry( sNewEntry ); - ULONG nOptions = convertBools2Ulong_Impl( + sal_uInt16 nPos = m_aFormattingLB.InsertEntry( sNewEntry ); + sal_uLong nOptions = convertBools2Ulong_Impl( bUsePrtMetrics, bAddSpacing, bAddSpacingAtPages, bUseOurTabStops, bNoExtLeading, bUseLineSpacing, bAddTableSpacing, bUseObjPos, bUseOurTextWrapping, @@ -410,8 +410,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) IMPL_LINK( SwCompatibilityOptPage, SelectHdl, ListBox*, EMPTYARG ) { - USHORT nPos = m_aFormattingLB.GetSelectEntryPos(); - ULONG nOptions = (ULONG)(void*)m_aFormattingLB.GetEntryData( nPos ); + sal_uInt16 nPos = m_aFormattingLB.GetSelectEntryPos(); + sal_uLong nOptions = (sal_uLong)(void*)m_aFormattingLB.GetEntryData( nPos ); SetCurrentOptions( nOptions ); return 0; @@ -429,10 +429,10 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG ) { if ( pItem->m_bIsDefault ) { - USHORT nCount = static_cast< USHORT >( m_aOptionsLB.GetEntryCount() ); - for ( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = static_cast< sal_uInt16 >( m_aOptionsLB.GetEntryCount() ); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { - bool bChecked = ( m_aOptionsLB.IsChecked(i) != FALSE ); + bool bChecked = ( m_aOptionsLB.IsChecked(i) != sal_False ); CompatibilityOptions eOption = static_cast< CompatibilityOptions >(i); switch ( eOption ) { @@ -465,13 +465,13 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG ) // ----------------------------------------------------------------------- -void SwCompatibilityOptPage::SetCurrentOptions( ULONG nOptions ) +void SwCompatibilityOptPage::SetCurrentOptions( sal_uLong nOptions ) { - ULONG nCount = m_aOptionsLB.GetEntryCount(); + sal_uLong nCount = m_aOptionsLB.GetEntryCount(); DBG_ASSERT( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" ); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { - BOOL bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 ); + sal_Bool bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 ); m_aOptionsLB.CheckEntryPos( i, bChecked ); nOptions = nOptions >> 1; } @@ -479,9 +479,9 @@ void SwCompatibilityOptPage::SetCurrentOptions( ULONG nOptions ) // ----------------------------------------------------------------------- -ULONG SwCompatibilityOptPage::GetDocumentOptions() const +sal_uLong SwCompatibilityOptPage::GetDocumentOptions() const { - ULONG nRet = 0; + sal_uLong nRet = 0; if ( m_pWrtShell ) { const IDocumentSettingAccess& rIDocumentSettingAccess = *m_pWrtShell->getIDocumentSettingAccess(); @@ -526,75 +526,75 @@ SfxTabPage* SwCompatibilityOptPage::Create( Window* pParent, const SfxItemSet& r // ----------------------------------------------------------------------- -BOOL SwCompatibilityOptPage::FillItemSet( SfxItemSet& ) +sal_Bool SwCompatibilityOptPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if ( m_pWrtShell ) { - ULONG nSavedOptions = m_nSavedOptions; - ULONG nCount = m_aOptionsLB.GetEntryCount(); + sal_uLong nSavedOptions = m_nSavedOptions; + sal_uLong nCount = m_aOptionsLB.GetEntryCount(); DBG_ASSERT( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" ); bool bSetParaSpaceMax = false; - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { CompatibilityOptions nOption = static_cast< CompatibilityOptions >(i); - BOOL bChecked = m_aOptionsLB.IsChecked(i); - BOOL bSavedChecked = ( ( nSavedOptions & 0x00000001 ) == 0x00000001 ); + sal_Bool bChecked = m_aOptionsLB.IsChecked(i); + sal_Bool bSavedChecked = ( ( nSavedOptions & 0x00000001 ) == 0x00000001 ); if ( bChecked != bSavedChecked ) { if ( COPT_USE_PRINTERDEVICE == nOption ) { m_pWrtShell->SetUseVirDev( !bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( ( COPT_ADD_SPACING == nOption || COPT_ADD_SPACING_AT_PAGES == nOption ) && !bSetParaSpaceMax ) bSetParaSpaceMax = true; else if ( COPT_USE_OUR_TABSTOPS == nOption ) { m_pWrtShell->SetTabCompat( !bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_NO_EXTLEADING == nOption ) { m_pWrtShell->SetAddExtLeading( !bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_USE_LINESPACING == nOption ) { m_pWrtShell->SetUseFormerLineSpacing( bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_ADD_TABLESPACING == nOption ) { m_pWrtShell->SetAddParaSpacingToTableCells( bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_ADD_TABLESPACING == nOption ) { m_pWrtShell->SetAddParaSpacingToTableCells( bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_USE_OBJECTPOSITIONING == nOption ) { m_pWrtShell->SetUseFormerObjectPositioning( bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_USE_OUR_TEXTWRAPPING == nOption ) { m_pWrtShell->SetUseFormerTextWrapping( bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_CONSIDER_WRAPPINGSTYLE == nOption ) { m_pWrtShell->SetConsiderWrapOnObjPos( bChecked ); - bModified = TRUE; + bModified = sal_True; } else if ( COPT_EXPAND_WORDSPACE == nOption ) { m_pWrtShell->SetDoNotJustifyLinesWithManualBreak( !bChecked ); - bModified = TRUE; + bModified = sal_True; } } @@ -603,9 +603,9 @@ BOOL SwCompatibilityOptPage::FillItemSet( SfxItemSet& ) if ( bSetParaSpaceMax ) { - m_pWrtShell->SetParaSpaceMax( m_aOptionsLB.IsChecked( (USHORT)COPT_ADD_SPACING ) ); - m_pWrtShell->SetParaSpaceMaxAtPages( m_aOptionsLB.IsChecked( (USHORT)COPT_ADD_SPACING_AT_PAGES ) ); - bModified = TRUE; + m_pWrtShell->SetParaSpaceMax( m_aOptionsLB.IsChecked( (sal_uInt16)COPT_ADD_SPACING ) ); + m_pWrtShell->SetParaSpaceMaxAtPages( m_aOptionsLB.IsChecked( (sal_uInt16)COPT_ADD_SPACING_AT_PAGES ) ); + bModified = sal_True; } } @@ -621,7 +621,7 @@ void SwCompatibilityOptPage::Reset( const SfxItemSet& ) { m_aOptionsLB.SelectEntryPos( 0 ); - ULONG nOptions = GetDocumentOptions(); + sal_uLong nOptions = GetDocumentOptions(); SetCurrentOptions( nOptions ); m_nSavedOptions = nOptions; } diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 4a0c9c2a6b25..f3570d0d21ff 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -102,7 +102,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) : aUseSquaredPageMode ( this, SW_RES( CB_USE_SQUARE_PAGE_MODE ) ), pWrtShell ( NULL ), - bHTMLMode ( FALSE ), + bHTMLMode ( sal_False ), nLastTab ( 0 ), nOldLinkMode( MANUAL ) @@ -110,7 +110,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) : FreeResource(); SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) ); - for ( USHORT i = 0; i < aMetricArr.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i ) { String sMetric = aMetricArr.GetStringByPos( i ); FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i ); @@ -124,7 +124,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) : case FUNIT_INCH: { // nur diese Metriken benutzen - USHORT nPos = aMetricLB.InsertEntry( sMetric ); + sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric ); aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit ); } default:; //prevent warning @@ -133,7 +133,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) : aMetricLB.SetSelectHdl(LINK(this, SwLoadOptPage, MetricHdl)); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem ) + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { aTabFT.Hide(); @@ -167,12 +167,12 @@ SfxTabPage* __EXPORT SwLoadOptPage::Create( Window* pParent, --------------------------------------------------*/ -BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwModule* pMod = SW_MOD(); - USHORT nNewLinkMode = AUTOMATIC; + sal_uInt16 nNewLinkMode = AUTOMATIC; if (aNeverRB.IsChecked()) nNewLinkMode = NEVER; else if (aRequestRB.IsChecked()) @@ -201,23 +201,23 @@ BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) pWrtShell->SetModified(); } - bRet = TRUE; + bRet = sal_True; } - const USHORT nMPos = aMetricLB.GetSelectEntryPos(); + const sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos(); if ( nMPos != aMetricLB.GetSavedValue() ) { // Doppel-Cast fuer VA3.0 - USHORT nFieldUnit = (USHORT)(long)aMetricLB.GetEntryData( nMPos ); - rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nFieldUnit ) ); - bRet = TRUE; + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos ); + rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) ); + bRet = sal_True; } if(aTabMF.IsVisible() && aTabMF.GetText() != aTabMF.GetSavedValue()) { rSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP, - (USHORT)aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP)))); - bRet = TRUE; + (sal_uInt16)aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP)))); + bRet = sal_True; } sal_Bool bIsSquaredPageModeFlag = aUseSquaredPageMode.IsChecked(); @@ -230,7 +230,7 @@ BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) pDoc->SetDefaultPageMode( bIsSquaredPageModeFlag ); pWrtShell->SetModified(); } - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -240,18 +240,18 @@ BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) --------------------------------------------------*/ void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet) { - const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(FALSE); + const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(sal_False); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, sal_False, &pItem)) pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue(); SwFldUpdateFlags eFldFlags = AUTOUPD_GLOBALSETTING; nOldLinkMode = GLOBALSETTING; if (pWrtShell) { - eFldFlags = pWrtShell->GetFldUpdateFlags(TRUE); - nOldLinkMode = pWrtShell->GetLinkUpdMode(TRUE); + eFldFlags = pWrtShell->GetFldUpdateFlags(sal_True); + nOldLinkMode = pWrtShell->GetLinkUpdMode(sal_True); } if(GLOBALSETTING == nOldLinkMode) nOldLinkMode = pUsrPref->GetUpdateLinkMode(); @@ -276,7 +276,7 @@ void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet) const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet.Get( SID_ATTR_METRIC ); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); - for ( USHORT i = 0; i < aMetricLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aMetricLB.GetEntryCount(); ++i ) { if ( (int)(sal_IntPtr)aMetricLB.GetEntryData( i ) == (int)eFieldUnit ) { @@ -287,14 +287,14 @@ void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet) ::SetFieldUnit(aTabMF, eFieldUnit); } aMetricLB.SaveValue(); - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem)) { nLastTab = ((SfxUInt16Item*)pItem)->GetValue(); aTabMF.SetValue(aTabMF.Normalize(nLastTab), FUNIT_TWIP); } aTabMF.SaveValue(); - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem)) { bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); } @@ -313,12 +313,12 @@ void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet) IMPL_LINK(SwLoadOptPage, MetricHdl, ListBox*, EMPTYARG) { - const USHORT nMPos = aMetricLB.GetSelectEntryPos(); + const sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos(); if(nMPos != USHRT_MAX) { // Doppel-Cast fuer VA3.0 FieldUnit eFieldUnit = (FieldUnit)(long)aMetricLB.GetEntryData( nMPos ); - BOOL bModified = aTabMF.IsModified(); + sal_Bool bModified = aTabMF.IsModified(); long nVal = bModified ? sal::static_int_cast<sal_Int32, sal_Int64 >( aTabMF.Denormalize( aTabMF.GetValue( FUNIT_TWIP ) )) : nLastTab; @@ -438,7 +438,7 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet ) sNone (SW_RESSTR( STR_CATEGORY_NONE )), pMgr (new SwFldMgr()), - bHTMLMode(FALSE) + bHTMLMode(sal_False) { Wallpaper aBack( GetSettings().GetStyleSettings().GetWindowColor() ); aPreview.SetBackground( aBack ); @@ -448,11 +448,11 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet ) SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_FRAME, sText ); SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_DRAWING, sDrawing ); - USHORT i, nCount; + sal_uInt16 i, nCount; SwWrtShell *pSh = ::GetActiveWrtShell(); // aFormatBox - USHORT nSelFmt = SVX_NUM_ARABIC; + sal_uInt16 nSelFmt = SVX_NUM_ARABIC; if (pSh) { nCount = pMgr->GetFldTypeCount(); @@ -461,19 +461,19 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet ) if( ( pFldType = pMgr->GetFldType(USHRT_MAX, --i))->GetName() == aCategoryBox.GetText() ) { - nSelFmt = (USHORT)((SwSetExpFieldType*)pFldType)->GetSeqFormat(); + nSelFmt = (sal_uInt16)((SwSetExpFieldType*)pFldType)->GetSeqFormat(); break; } - ::FillCharStyleListBox( aCharStyleLB, pSh->GetView().GetDocShell(), TRUE, TRUE ); + ::FillCharStyleListBox( aCharStyleLB, pSh->GetView().GetDocShell(), sal_True, sal_True ); } - nCount = pMgr->GetFormatCount(TYP_SEQFLD, FALSE); + nCount = pMgr->GetFormatCount(TYP_SEQFLD, sal_False); for ( i = 0; i < nCount; ++i ) { aFormatBox.InsertEntry( pMgr->GetFormatStr(TYP_SEQFLD, i) ); - USHORT nFmtId = pMgr->GetFormatId(TYP_SEQFLD, i); + sal_uInt16 nFmtId = pMgr->GetFormatId(TYP_SEQFLD, i); aFormatBox.SetEntryData( i, reinterpret_cast<void*>(nFmtId) ); if( nFmtId == nSelFmt ) aFormatBox.SelectEntryPos( i ); @@ -543,9 +543,9 @@ SfxTabPage* SwCaptionOptPage::Create( Window* pParent, --------------------------------------------------*/ -BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& ) +sal_Bool SwCaptionOptPage::FillItemSet( SfxItemSet& ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); SaveEntry(aCheckLB.FirstSelected()); // Aktuellen Eintrag uebernehmen @@ -559,7 +559,7 @@ BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& ) pEntry = aCheckLB.Next(pEntry); } - USHORT nCheckCount = aCheckLB.GetCheckedEntryCount(); + sal_uInt16 nCheckCount = aCheckLB.GetCheckedEntryCount(); pModOpt->SetInsWithCaption( bHTMLMode, nCheckCount > 0 ); sal_Int32 nPos = aLbCaptionOrder.GetSelectEntryPos(); @@ -575,7 +575,7 @@ BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& ) void SwCaptionOptPage::Reset( const SfxItemSet& rSet) { const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem)) { bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); } @@ -584,7 +584,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet) aCheckLB.GetModel()->Clear(); // remove all entries // Writer objects - USHORT nPos = 0; + sal_uInt16 nPos = 0; aCheckLB.InsertEntry(sSWTable); SetOptions(nPos++, TABLE_CAP); aCheckLB.InsertEntry(sSWFrame); @@ -621,7 +621,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet) aObjS.FillInsertObjects(); aObjS.Remove( SvGlobalName( SO3_SW_CLASSID ) ); // remove Writer-ID - for ( ULONG i = 0; i < aObjS.Count(); ++i ) + for ( sal_uLong i = 0; i < aObjS.Count(); ++i ) { const SvGlobalName &rOleId = aObjS[i].GetClassName(); const String* pClassName = &aObjS[i].GetHumanName(); @@ -642,7 +642,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet) --------------------------------------------------*/ -void SwCaptionOptPage::SetOptions(const USHORT nPos, +void SwCaptionOptPage::SetOptions(const sal_uInt16 nPos, const SwCapObjType eObjType, const SvGlobalName *pOleId) { SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); @@ -683,7 +683,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG ) if (pSelEntry) { - sal_Bool bChecked = aCheckLB.IsChecked((USHORT)aCheckLB.GetModel()->GetAbsPos(pSelEntry)); + sal_Bool bChecked = aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pSelEntry)); aSettingsGroupFL.Enable( bChecked ); aCategoryText.Enable( bChecked ); @@ -716,9 +716,9 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG ) aCategoryBox.InsertEntry( sNone ); if (pSh) { - USHORT nCount = pMgr->GetFldTypeCount(); + sal_uInt16 nCount = pMgr->GetFldTypeCount(); - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { SwFieldType *pType = pMgr->GetFldType( USHRT_MAX, i ); if( pType->Which() == RES_SETEXPFLD && @@ -743,7 +743,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG ) aCategoryBox.InsertEntry(pOpt->GetCategory()); if (!aCategoryBox.GetText().Len()) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; switch(pOpt->GetObjType()) { case OLE_CAP: @@ -754,9 +754,9 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG ) aCategoryBox.SetText(aCategoryBox.GetEntry(nPos).GetName()); } - for (USHORT i = 0; i < aFormatBox.GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < aFormatBox.GetEntryCount(); i++) { - if (pOpt->GetNumType() == (USHORT)(ULONG)aFormatBox.GetEntryData(i)) + if (pOpt->GetNumType() == (sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(i)) { aFormatBox.SelectEntryPos(i); break; @@ -784,7 +784,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG ) aPosText.IsEnabled() ); aPosBox.SelectEntryPos(pOpt->GetPos()); - USHORT nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0; + sal_uInt16 nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0; aLbLevel.SelectEntryPos( nLevelPos ); aEdDelim.SetText(pOpt->GetSeparator()); aNumberingSeparatorED.SetText( pOpt->GetNumSeparator() ); @@ -826,7 +826,7 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry) { InsCaptionOpt* pOpt = (InsCaptionOpt*)pEntry->GetUserData(); - pOpt->UseCaption() = aCheckLB.IsChecked((USHORT)aCheckLB.GetModel()->GetAbsPos(pEntry)); + pOpt->UseCaption() = aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pEntry)); String aName( aCategoryBox.GetText() ); if(aName == sNone) pOpt->SetCategory(aEmptyStr); @@ -836,11 +836,11 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry) aName.EraseTrailingChars(' '); pOpt->SetCategory(aName); } - pOpt->SetNumType((USHORT)(ULONG)aFormatBox.GetEntryData(aFormatBox.GetSelectEntryPos())); + pOpt->SetNumType((sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(aFormatBox.GetSelectEntryPos())); pOpt->SetCaption(aTextEdit.IsEnabled() ? aTextEdit.GetText() : aEmptyStr ); pOpt->SetPos(aPosBox.GetSelectEntryPos()); - USHORT nPos = aLbLevel.GetSelectEntryPos(); - USHORT nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL; + sal_uInt16 nPos = aLbLevel.GetSelectEntryPos(); + sal_uInt16 nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL; pOpt->SetLevel(nLevel); pOpt->SetSeparator(aEdDelim.GetText()); pOpt->SetNumSeparator( aNumberingSeparatorED.GetText()); @@ -914,7 +914,7 @@ void SwCaptionOptPage::DrawSample() //#i61007# order of captions bool bOrderNumberingFirst = aLbCaptionOrder.GetSelectEntryPos() == 1; // Nummer - USHORT nNumFmt = (USHORT)(ULONG)aFormatBox.GetEntryData( + sal_uInt16 nNumFmt = (sal_uInt16)(sal_uLong)aFormatBox.GetEntryData( aFormatBox.GetSelectEntryPos() ); if( SVX_NUM_NUMBER_NONE != nNumFmt ) { @@ -934,13 +934,13 @@ void SwCaptionOptPage::DrawSample() RES_SETEXPFLD, sFldTypeName ); if( pFldType && pFldType->GetOutlineLvl() < MAXLEVEL ) { - BYTE nLvl = pFldType->GetOutlineLvl(); + sal_uInt8 nLvl = pFldType->GetOutlineLvl(); SwNumberTree::tNumberVector aNumVector; - for( BYTE i = 0; i <= nLvl; ++i ) + for( sal_uInt8 i = 0; i <= nLvl; ++i ) aNumVector.push_back(1); String sNumber( pSh->GetOutlineNumRule()->MakeNumString( - aNumVector, FALSE )); + aNumVector, sal_False )); if( sNumber.Len() ) (aStr += sNumber) += pFldType->GetDelimiter(); } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 6e6ed773a33d..285caa238731 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -127,7 +127,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, { FreeResource(); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem ) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { aMetricLB.Show(); @@ -147,7 +147,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, aAnyRulerCB.SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl)); SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) ); - for ( USHORT i = 0; i < aMetricArr.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i ) { String sMetric = aMetricArr.GetStringByPos( i ); FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i ); @@ -161,7 +161,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, case FUNIT_INCH: { // nur diese Metriken benutzen - USHORT nPos = aMetricLB.InsertEntry( sMetric ); + sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric ); aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit ); aVMetric.InsertEntry( sMetric ); aVMetric.SetEntryData( nPos, (void*)(long)eFUnit ); @@ -191,13 +191,13 @@ SfxTabPage* SwContentOptPage::Create( Window* pParent, /* -----------------------------07.04.01 16:57-------------------------------- ---------------------------------------------------------------------------*/ -static void lcl_SelectMetricLB(ListBox& rMetric, USHORT nSID, const SfxItemSet& rSet) +static void lcl_SelectMetricLB(ListBox& rMetric, sal_uInt16 nSID, const SfxItemSet& rSet) { const SfxPoolItem* pItem; - if( rSet.GetItemState( nSID, FALSE, &pItem ) >= SFX_ITEM_AVAILABLE ) + if( rSet.GetItemState( nSID, sal_False, &pItem ) >= SFX_ITEM_AVAILABLE ) { FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue(); - for ( USHORT i = 0; i < rMetric.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMetric.GetEntryCount(); ++i ) { if ( (int)(sal_IntPtr)rMetric.GetEntryData( i ) == (int)eFieldUnit ) { @@ -215,7 +215,7 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet) { const SwElemItem* pElemAttr = 0; - rSet.GetItemState( FN_PARAM_ELEM , FALSE, + rSet.GetItemState( FN_PARAM_ELEM , sal_False, (const SfxPoolItem**)&pElemAttr ); if(pElemAttr) { @@ -245,7 +245,7 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet) /*-----------------31.08.96 13.58------------------- --------------------------------------------------*/ -BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet) +sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) { const SwElemItem* pOldAttr = (const SwElemItem*) GetOldItem(GetItemSet(), FN_PARAM_ELEM); @@ -270,34 +270,34 @@ BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet) aElem.bSmoothScroll = aSmoothCBox.IsChecked(); - BOOL bRet = !pOldAttr || aElem != *pOldAttr; + sal_Bool bRet = !pOldAttr || aElem != *pOldAttr; if(bRet) bRet = 0 != rSet.Put(aElem); - USHORT nMPos = aMetricLB.GetSelectEntryPos(); - USHORT nGlobalMetricPos = nMPos; + sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos(); + sal_uInt16 nGlobalMetricPos = nMPos; if ( nMPos != aMetricLB.GetSavedValue() ) { // Doppel-Cast fuer VA3.0 - USHORT nFieldUnit = (USHORT)(long)aMetricLB.GetEntryData( nMPos ); - rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nFieldUnit ) ); - bRet = TRUE; + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos ); + rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) ); + bRet = sal_True; } nMPos = aHMetric.GetSelectEntryPos(); if ( nMPos != aHMetric.GetSavedValue() || nMPos != nGlobalMetricPos ) { // Doppel-Cast fuer VA3.0 - USHORT nFieldUnit = (USHORT)(long)aHMetric.GetEntryData( nMPos ); - rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (UINT16)nFieldUnit ) ); - bRet = TRUE; + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aHMetric.GetEntryData( nMPos ); + rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (sal_uInt16)nFieldUnit ) ); + bRet = sal_True; } nMPos = aVMetric.GetSelectEntryPos(); if ( nMPos != aVMetric.GetSavedValue() || nMPos != nGlobalMetricPos ) { // Doppel-Cast fuer VA3.0 - USHORT nFieldUnit = (USHORT)(long)aVMetric.GetEntryData( nMPos ); - rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (UINT16)nFieldUnit ) ); - bRet = TRUE; + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aVMetric.GetEntryData( nMPos ); + rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (sal_uInt16)nFieldUnit ) ); + bRet = sal_True; } return bRet; } @@ -314,7 +314,7 @@ IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox) * --------------------------------------------------*/ IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox) { - BOOL bChecked = pBox->IsChecked(); + sal_Bool bChecked = pBox->IsChecked(); aHRulerCBox .Enable(bChecked); aHMetric .Enable(bChecked); aVRulerCBox .Enable(bChecked); @@ -357,8 +357,8 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent, aFaxFT (this, SW_RES(FT_FAX)), aFaxLB (this, SW_RES(LB_FAX)), sNone(SW_RES(ST_NONE)), - bAttrModified( FALSE ), - bPreview ( FALSE ) + bAttrModified( sal_False ), + bPreview ( sal_False ) { Init(); FreeResource(); @@ -386,7 +386,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent, aFaxLB.SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) ); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem ) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { // aDrawCB .Hide(); @@ -424,7 +424,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent, //------------------------------------------------------------------------ -void SwAddPrinterTabPage::SetPreview(BOOL bPrev) +void SwAddPrinterTabPage::SetPreview(sal_Bool bPrev) { bPreview = bPrev; @@ -452,13 +452,13 @@ SfxTabPage* SwAddPrinterTabPage::Create( Window* pParent, //------------------------------------------------------------------------ -BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet ) { if ( bAttrModified ) { SwAddPrinterItem aAddPrinterAttr (FN_PARAM_ADDPRINTER); aAddPrinterAttr.bPrintGraphic = aGrfCB.IsChecked(); - aAddPrinterAttr.bPrintTable = TRUE; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/ + aAddPrinterAttr.bPrintTable = sal_True; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/ aAddPrinterAttr.bPrintDraw = aGrfCB.IsChecked(); // UI merged with aGrfCB in CWS printerpullgpages /*aDrawCB.IsChecked()*/; aAddPrinterAttr.bPrintControl = aCtrlFldCB.IsChecked(); aAddPrinterAttr.bPrintPageBackground = aBackgroundCB.IsChecked(); @@ -468,12 +468,12 @@ BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet ) aAddPrinterAttr.bPrintLeftPages = aLeftPageCB.IsChecked(); aAddPrinterAttr.bPrintRightPages = aRightPageCB.IsChecked(); - aAddPrinterAttr.bPrintReverse = FALSE; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/; + aAddPrinterAttr.bPrintReverse = sal_False; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/; aAddPrinterAttr.bPrintProspect = aProspectCB.IsChecked(); aAddPrinterAttr.bPrintProspectRTL = aProspectCB_RTL.IsChecked(); aAddPrinterAttr.bPaperFromSetup = aPaperFromSetupCB.IsChecked(); aAddPrinterAttr.bPrintEmptyPages = aPrintEmptyPagesCB.IsChecked(); - aAddPrinterAttr.bPrintSingleJobs = TRUE; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/; + aAddPrinterAttr.bPrintSingleJobs = sal_True; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/; if (aNoRB.IsChecked()) aAddPrinterAttr.nPrintPostIts = POSTITS_NONE; @@ -498,7 +498,7 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& ) const SfxItemSet& rSet = GetItemSet(); const SwAddPrinterItem* pAddPrinterAttr = 0; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , FALSE, + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , sal_False, (const SfxPoolItem**)&pAddPrinterAttr )) { aGrfCB.Check( pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw ); @@ -526,14 +526,14 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& ) } if (aProspectCB.IsChecked()) { - aProspectCB_RTL.Enable(TRUE); - aNoRB.Enable( FALSE ); - aOnlyRB.Enable( FALSE ); - aEndRB.Enable( FALSE ); - aEndPageRB.Enable( FALSE ); + aProspectCB_RTL.Enable(sal_True); + aNoRB.Enable( sal_False ); + aOnlyRB.Enable( sal_False ); + aEndRB.Enable( sal_False ); + aEndPageRB.Enable( sal_False ); } else - aProspectCB_RTL.Enable( FALSE ); + aProspectCB_RTL.Enable( sal_False ); } //----------------------------------------------------------------------- @@ -547,10 +547,10 @@ void SwAddPrinterTabPage::Init() IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) { - bAttrModified = TRUE; + bAttrModified = sal_True; bool bIsProspect = aProspectCB.IsChecked(); if (!bIsProspect) - aProspectCB_RTL.Check( FALSE ); + aProspectCB_RTL.Check( sal_False ); aProspectCB_RTL.Enable( bIsProspect ); aNoRB.Enable( !bIsProspect ); aOnlyRB.Enable( !bIsProspect ); @@ -566,7 +566,7 @@ IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst ) { aFaxLB.InsertEntry(sNone); - for ( USHORT i = 0; i < rFaxLst.Count(); ++i ) + for ( sal_uInt16 i = 0; i < rFaxLst.Count(); ++i ) aFaxLB.InsertEntry( *rFaxLst.GetObject(i) ); aFaxLB.SelectEntryPos(0); } @@ -576,7 +576,7 @@ void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst ) IMPL_LINK_INLINE_START( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG ) { - bAttrModified=TRUE; + bAttrModified=sal_True; return 0; } IMPL_LINK_INLINE_END( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG ) @@ -656,20 +656,20 @@ SwStdFontTabPage::SwStdFontTabPage( Window* pParent, pWrtShell(0), eLanguage( GetAppLanguage() ), - bListDefault(FALSE), - bSetListDefault(TRUE), - bLabelDefault(FALSE), - bSetLabelDefault(TRUE), - bIdxDefault(FALSE), - bSetIdxDefault(TRUE), - bDeletePrinter(FALSE), - - bListHeightDefault (FALSE), - bSetListHeightDefault (FALSE), - bLabelHeightDefault (FALSE), - bSetLabelHeightDefault(FALSE), - bIndexHeightDefault (FALSE), - bSetIndexHeightDefault (FALSE), + bListDefault(sal_False), + bSetListDefault(sal_True), + bLabelDefault(sal_False), + bSetLabelDefault(sal_True), + bIdxDefault(sal_False), + bSetIdxDefault(sal_True), + bDeletePrinter(sal_False), + + bListHeightDefault (sal_False), + bSetListHeightDefault (sal_False), + bLabelHeightDefault (sal_False), + bSetLabelHeightDefault(sal_False), + bIndexHeightDefault (sal_False), + bSetIndexHeightDefault (sal_False), nFontGroup(FONT_GROUP_DEFAULT), @@ -722,16 +722,16 @@ SfxTabPage* SwStdFontTabPage::Create( Window* pParent, /*-----------------03.09.96 11.53------------------- --------------------------------------------------*/ -void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType, +void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType, SfxPrinter* pPrt, const String& rStyle, - USHORT nFontWhich) + sal_uInt16 nFontWhich) { - BOOL bDelete = FALSE; + sal_Bool bDelete = sal_False; const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(rStyle): 0; if(!pFnt) { pFnt = new SfxFont(FAMILY_DONTKNOW, rStyle); - bDelete = TRUE; + bDelete = sal_True; } SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType); pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), @@ -744,8 +744,8 @@ void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType, /*-- 11.10.2005 15:47:52--------------------------------------------------- -----------------------------------------------------------------------*/ -void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType, - sal_Int32 nHeight, USHORT nFontHeightWhich) +void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType, + sal_Int32 nHeight, sal_uInt16 nFontHeightWhich) { float fSize = (float)nHeight / 10; nHeight = CalcToUnit( fSize, SFX_MAPUNIT_TWIP ); @@ -755,9 +755,9 @@ void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType, /*-----------------03.09.96 11.53------------------- --------------------------------------------------*/ -BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& ) { - BOOL bNotDocOnly = !aDocOnlyCB.IsChecked(); + sal_Bool bNotDocOnly = !aDocOnlyCB.IsChecked(); SW_MOD()->GetModuleConfig()->SetDefaultFontInCurrDocOnly(!bNotDocOnly); String sStandard = aStandardBox.GetText(); @@ -813,21 +813,21 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& ) { pWrtShell->StartAllAction(); SfxPrinter* pPrinter = pWrtShell->getIDocumentDeviceAccess()->getPrinter( false ); - BOOL bMod = FALSE; - USHORT nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( + sal_Bool bMod = sal_False; + sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT : FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT); - USHORT nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( + sal_uInt16 nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONTSIZE : FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE); if(sStandard != sShellStd) { - BOOL bDelete = FALSE; + sal_Bool bDelete = sal_False; const SfxFont* pFnt = pPrinter ? pPrinter->GetFontByName(sStandard): 0; if(!pFnt) { pFnt = new SfxFont(FAMILY_DONTKNOW, sStandard); - bDelete = TRUE; + bDelete = sal_True; } pWrtShell->SetDefault(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); @@ -836,10 +836,10 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& ) if(bDelete) { delete (SfxFont*) pFnt; - bDelete = FALSE; + bDelete = sal_False; } // lcl_SetColl(pWrtShell, RES_POOLCOLL_STANDARD, pPrinter, sStandard); - bMod = TRUE; + bMod = sal_True; } if(bStandardHeightChanged) { @@ -847,59 +847,59 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& ) pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), 100, nFontHeightWhich ) ); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); pColl->ResetFmtAttr(nFontHeightWhich); - bMod = TRUE; + bMod = sal_True; } if(sTitle != sShellTitle ) { lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, pPrinter, sTitle, nFontWhich); - bMod = TRUE; + bMod = sal_True; } if(bTitleHeightChanged) { lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, sal::static_int_cast< sal_uInt16, sal_Int64 >(aTitleHeightLB.GetValue()), nFontHeightWhich); - bMod = TRUE; + bMod = sal_True; } if(sList != sShellList && (!bListDefault || !bSetListDefault )) { lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, pPrinter, sList, nFontWhich); - bMod = TRUE; + bMod = sal_True; } if(bListHeightChanged) { lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, sal::static_int_cast< sal_uInt16, sal_Int64 >(aListHeightLB.GetValue()), nFontHeightWhich); - bMod = TRUE; + bMod = sal_True; } if(sLabel != sShellLabel && (!bLabelDefault || !bSetLabelDefault)) { lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, pPrinter, sLabel, nFontWhich); - bMod = TRUE; + bMod = sal_True; } if(bLabelHeightChanged) { lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, sal::static_int_cast< sal_uInt16, sal_Int64 >(aLabelHeightLB.GetValue()), nFontHeightWhich); - bMod = TRUE; + bMod = sal_True; } if(sIdx != sShellIndex && (!bIdxDefault || !bSetIdxDefault)) { lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, pPrinter, sIdx, nFontWhich); - bMod = TRUE; + bMod = sal_True; } if(bIndexHeightChanged) { lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, sal::static_int_cast< sal_uInt16, sal_Int64 >(aIndexHeightLB.GetValue()), nFontHeightWhich); - bMod = TRUE; + bMod = sal_True; } if ( bMod ) pWrtShell->SetModified(); pWrtShell->EndAllAction(); } - return FALSE; + return sal_False; } /*-----------------03.09.96 11.53------------------- @@ -908,11 +908,11 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& ) void SwStdFontTabPage::Reset( const SfxItemSet& rSet) { const SfxPoolItem* pLang; - USHORT nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE : + sal_uInt16 nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE : FONT_GROUP_CJK == nFontGroup ? SID_ATTR_CHAR_CJK_LANGUAGE : SID_ATTR_CHAR_CTL_LANGUAGE; - if( SFX_ITEM_SET == rSet.GetItemState(nLangSlot, FALSE, &pLang)) + if( SFX_ITEM_SET == rSet.GetItemState(nLangSlot, sal_False, &pLang)) eLanguage = ((const SvxLanguageItem*)pLang)->GetValue(); String sTmp(aStdChrFL.GetText()); @@ -926,7 +926,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) aStdChrFL.SetText(sTmp); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_PRINTER, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_PRINTER, sal_False, &pItem)) { pPrt = (SfxPrinter*)((const SwPtrItem*)pItem)->GetValue(); } @@ -937,14 +937,14 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC, 0 ); pPrt = new SfxPrinter(pPrinterSet); - bDeletePrinter = TRUE; + bDeletePrinter = sal_True; } pFontList = new FontList( pPrt ); // #i94536# prevent duplication of font entries when 'reset' button is pressed if( !aStandardBox.GetEntryCount() ) { - const USHORT nCount = pPrt->GetFontCount(); - for (USHORT i = 0; i < nCount; ++i) + const sal_uInt16 nCount = pPrt->GetFontCount(); + for (sal_uInt16 i = 0; i < nCount; ++i) { const String &rString = pPrt->GetFont(i)->GetName(); aStandardBox.InsertEntry( rString ); @@ -954,12 +954,12 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) aIdxBox .InsertEntry( rString ); } } - if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, sal_False, &pItem)) { pFontConfig = (SwStdFontConfig*)((const SwPtrItem*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, sal_False, &pItem)) { pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue(); } @@ -997,7 +997,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) if( nIndexHeight <= 0) nIndexHeight = pFontConfig->GetDefaultHeightFor( FONT_INDEX + nFontGroup * FONT_PER_GROUP, eLanguage); - aDocOnlyCB.Enable(FALSE); + aDocOnlyCB.Enable(sal_False); } else { @@ -1006,7 +1006,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellStd = sStdBackup = rFont.GetFamilyName(); - USHORT nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( + sal_uInt16 nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONTSIZE : FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE ); const SvxFontHeightItem& rFontHeightStandard = (const SvxFontHeightItem& )pColl->GetFmtAttr(nFontHeightWhich); @@ -1020,37 +1020,37 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) const SvxFontHeightItem& rFontHeightTitle = (const SvxFontHeightItem&)pColl->GetFmtAttr( nFontHeightWhich, sal_True ); nTitleHeight = (sal_Int32)rFontHeightTitle.GetHeight(); - USHORT nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( + sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT : FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT); pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_NUMBUL_BASE); const SvxFontItem& rFontLS = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); - bListDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE); + bListDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False); sShellList = sListBackup = rFontLS.GetFamilyName(); const SvxFontHeightItem& rFontHeightList = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True); nListHeight = (sal_Int32)rFontHeightList.GetHeight(); - bListHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE); + bListHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False); pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_LABEL); - bLabelDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE); + bLabelDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False); const SvxFontItem& rFontCP = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellLabel = sCapBackup = rFontCP.GetFamilyName(); const SvxFontHeightItem& rFontHeightLabel = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True); nLabelHeight = (sal_Int32)rFontHeightLabel.GetHeight(); - bLabelHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE); + bLabelHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False); pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_REGISTER_BASE); - bIdxDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE); + bIdxDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False); const SvxFontItem& rFontIDX = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellIndex = sIdxBackup = rFontIDX.GetFamilyName(); const SvxFontHeightItem& rFontHeightIndex = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True); nIndexHeight = (sal_Int32)rFontHeightIndex.GetHeight(); - bIndexHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE); + bIndexHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False); } aStandardBox.SetText(sStdBackup ); aTitleBox .SetText(sOutBackup ); @@ -1144,15 +1144,15 @@ IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox ) } else if(pBox == &aListBox) { - bSetListDefault = FALSE; + bSetListDefault = sal_False; } else if(pBox == &aLabelBox) { - bSetLabelDefault = FALSE; + bSetLabelDefault = sal_False; } else if(pBox == &aIdxBox) { - bSetIdxDefault = FALSE; + bSetIdxDefault = sal_False; } return 0; } @@ -1174,15 +1174,15 @@ IMPL_LINK( SwStdFontTabPage, ModifyHeightHdl, FontSizeBox*, pBox ) } else if(pBox == &aListHeightLB) { - bSetListHeightDefault = FALSE; + bSetListHeightDefault = sal_False; } else if(pBox == &aLabelHeightLB) { - bSetLabelHeightDefault = FALSE; + bSetLabelHeightDefault = sal_False; } else if(pBox == &aIndexHeightLB) { - bSetIndexHeightDefault = FALSE; + bSetIndexHeightDefault = sal_False; } return 0; } @@ -1267,7 +1267,7 @@ SwTableOptionsTabPage::SwTableOptionsTabPage( Window* pParent, const SfxItemSet& aFixPropFT( this, SW_RES(FT_FIXPROP )), aVarFT( this, SW_RES(FT_VAR )), pWrtShell(0), - bHTMLMode(FALSE) + bHTMLMode(sal_False) { FreeResource(); @@ -1299,22 +1299,22 @@ SfxTabPage* SwTableOptionsTabPage::Create( Window* pParent, --------------------------------------------------*/ -BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); if(aRowMoveMF.IsModified()) - pModOpt->SetTblHMove( (USHORT)aRowMoveMF.Denormalize( aRowMoveMF.GetValue(FUNIT_TWIP))); + pModOpt->SetTblHMove( (sal_uInt16)aRowMoveMF.Denormalize( aRowMoveMF.GetValue(FUNIT_TWIP))); if(aColMoveMF.IsModified()) - pModOpt->SetTblVMove( (USHORT)aColMoveMF.Denormalize( aColMoveMF.GetValue(FUNIT_TWIP))); + pModOpt->SetTblVMove( (sal_uInt16)aColMoveMF.Denormalize( aColMoveMF.GetValue(FUNIT_TWIP))); if(aRowInsertMF.IsModified()) - pModOpt->SetTblHInsert((USHORT)aRowInsertMF.Denormalize( aRowInsertMF.GetValue(FUNIT_TWIP))); + pModOpt->SetTblHInsert((sal_uInt16)aRowInsertMF.Denormalize( aRowInsertMF.GetValue(FUNIT_TWIP))); if(aColInsertMF.IsModified()) - pModOpt->SetTblVInsert((USHORT)aColInsertMF.Denormalize( aColInsertMF.GetValue(FUNIT_TWIP))); + pModOpt->SetTblVInsert((sal_uInt16)aColInsertMF.Denormalize( aColInsertMF.GetValue(FUNIT_TWIP))); TblChgMode eMode; if(aFixRB.IsChecked()) @@ -1331,7 +1331,7 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) if(pWrtShell && nsSelectionType::SEL_TBL & pWrtShell->GetSelectionType()) { pWrtShell->SetTblChgMode(eMode); - static USHORT __READONLY_DATA aInva[] = + static sal_uInt16 __READONLY_DATA aInva[] = { FN_TABLE_MODE_FIX, FN_TABLE_MODE_FIX_PROP, FN_TABLE_MODE_VARIABLE, @@ -1340,7 +1340,7 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) pWrtShell->GetView().GetViewFrame()->GetBindings().Invalidate( aInva ); } - bRet = TRUE; + bRet = sal_True; } SwInsertTableOptions aInsOpts( 0, 0 ); @@ -1368,19 +1368,19 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) if (aNumFormattingCB.GetSavedValue() != aNumFormattingCB.GetState()) { pModOpt->SetInsTblFormatNum(bHTMLMode, aNumFormattingCB.IsChecked()); - bRet = TRUE; + bRet = sal_True; } if (aNumFmtFormattingCB.GetSavedValue() != aNumFmtFormattingCB.GetState()) { pModOpt->SetInsTblChangeNumFormat(bHTMLMode, aNumFmtFormattingCB.IsChecked()); - bRet = TRUE; + bRet = sal_True; } if (aNumAlignmentCB.GetSavedValue() != aNumAlignmentCB.GetState()) { pModOpt->SetInsTblAlignNum(bHTMLMode, aNumAlignmentCB.IsChecked()); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -1413,7 +1413,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet) case TBLVAR_CHGABS: aVarRB.Check(); break; } const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem)) { bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); } @@ -1462,7 +1462,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet) } SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode); - USHORT nInsTblFlags = aInsOpts.mnInsMode; + sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode; aHeaderCB.Check(0 != (nInsTblFlags & tabopts::HEADLINE)); aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0); @@ -1540,17 +1540,17 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent, const SfxPoolItem* pItem = 0; SwShadowCursorItem aOpt; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; aOnOffCB.Check( aOpt.IsOn() ); - BYTE eMode = aOpt.GetMode(); + sal_uInt8 eMode = aOpt.GetMode(); aFillIndentRB.Check( FILL_INDENT == eMode ); aFillMarginRB.Check( FILL_MARGIN == eMode ); aFillTabRB.Check( FILL_TAB == eMode ); aFillSpaceRB.Check( FILL_SPACE == eMode ); - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem ) + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem ) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) { aTabCB .Hide(); @@ -1595,12 +1595,12 @@ void SwShdwCrsrOptionsTabPage::PageCreated( SfxAllItemSet aSet ) } -BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) { SwShadowCursorItem aOpt; aOpt.SetOn( aOnOffCB.IsChecked() ); - BYTE eMode; + sal_uInt8 eMode; if( aFillIndentRB.IsChecked() ) eMode= FILL_INDENT; else if( aFillMarginRB.IsChecked() ) @@ -1611,13 +1611,13 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) eMode = FILL_SPACE; aOpt.SetMode( eMode ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; const SfxPoolItem* pItem = 0; - if( SFX_ITEM_SET != rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ) + if( SFX_ITEM_SET != rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem ) || ((SwShadowCursorItem&)*pItem) != aOpt ) { rSet.Put( aOpt ); - bRet = TRUE; + bRet = sal_True; } m_pWrtShell->GetDoc()->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, @@ -1627,7 +1627,7 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) if( aCrsrInProtCB.IsChecked() != aCrsrInProtCB.GetSavedValue()) { rSet.Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, aCrsrInProtCB.IsChecked())); - bRet |= TRUE; + bRet |= sal_True; } const SwDocDisplayItem* pOldAttr = (const SwDocDisplayItem*) @@ -1659,11 +1659,11 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) const SfxPoolItem* pItem = 0; SwShadowCursorItem aOpt; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem )) aOpt = *(SwShadowCursorItem*)pItem; aOnOffCB.Check( aOpt.IsOn() ); - BYTE eMode = aOpt.GetMode(); + sal_uInt8 eMode = aOpt.GetMode(); aFillIndentRB.Check( FILL_INDENT == eMode ); aFillMarginRB.Check( FILL_MARGIN == eMode ); aFillTabRB.Check( FILL_TAB == eMode ); @@ -1672,13 +1672,13 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) m_aMathBaselineAlignmentCB.Check( m_pWrtShell->GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ); m_aMathBaselineAlignmentCB.SaveValue(); - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, sal_False, &pItem )) aCrsrInProtCB.Check(((const SfxBoolItem*)pItem)->GetValue()); aCrsrInProtCB.SaveValue(); const SwDocDisplayItem* pDocDisplayAttr = 0; - rSet.GetItemState( FN_PARAM_DOCDISP, FALSE, + rSet.GetItemState( FN_PARAM_DOCDISP, sal_False, (const SfxPoolItem**)&pDocDisplayAttr ); if(pDocDisplayAttr) { @@ -1700,8 +1700,8 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) struct CharAttr { - USHORT nItemId; - USHORT nAttr; + sal_uInt16 nItemId; + sal_uInt16 nAttr; }; // Editieren entspricht Einfuegen-Attributen @@ -1721,15 +1721,15 @@ static CharAttr __FAR_DATA aRedlineAttr[] = }; // Items from aRedlineAttr relevant for InsertAttr: strikethrough is // not used -static USHORT aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 }; +static sal_uInt16 aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 }; // Items from aRedlineAttr relevant for DeleteAttr: underline and // double underline is not used -static USHORT aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 }; +static sal_uInt16 aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 }; // Items from aRedlineAttr relevant for ChangeAttr: strikethrough is // not used -static USHORT aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 }; +static sal_uInt16 aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 }; /*----------------------------------------------------------------------- Beschreibung: Markierungsvorschau @@ -1751,18 +1751,18 @@ SwMarkPreview::SwMarkPreview( Window *pParent, const ResId& rResID ) : // Seite aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3)); - ULONG nOutWPix = aPage.GetWidth(); - ULONG nOutHPix = aPage.GetHeight(); + sal_uLong nOutWPix = aPage.GetWidth(); + sal_uLong nOutHPix = aPage.GetHeight(); // PrintArea - ULONG nLBorder = 8; - ULONG nRBorder = 8; - ULONG nTBorder = 4; - ULONG nBBorder = 4; + sal_uLong nLBorder = 8; + sal_uLong nRBorder = 8; + sal_uLong nTBorder = 4; + sal_uLong nBBorder = 4; aLeftPagePrtArea = Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder)); - USHORT nWidth = (USHORT)aLeftPagePrtArea.GetWidth(); - USHORT nKorr = (nWidth & 1) != 0 ? 0 : 1; + sal_uInt16 nWidth = (sal_uInt16)aLeftPagePrtArea.GetWidth(); + sal_uInt16 nKorr = (nWidth & 1) != 0 ? 0 : 1; aLeftPagePrtArea.SetSize(Size(nWidth / 2 - (nLBorder + nRBorder) / 2 + nKorr, aLeftPagePrtArea.GetHeight())); aRightPagePrtArea = aLeftPagePrtArea; @@ -1780,7 +1780,7 @@ void SwMarkPreview::InitColors( void ) const StyleSettings& rSettings = GetSettings().GetStyleSettings(); m_aBgCol = Color( rSettings.GetWindowColor() ); - BOOL bHC = rSettings.GetHighContrastMode(); + sal_Bool bHC = rSettings.GetHighContrastMode(); m_aLineCol = bHC? SwViewOption::GetFontColor() : Color( COL_BLACK ); m_aShadowCol = bHC? m_aBgCol : rSettings.GetShadowColor(); m_aTxtCol = bHC? SwViewOption::GetFontColor() : Color( COL_GRAY ); @@ -1849,9 +1849,9 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect) DrawRect(rRect, m_aTransCol, m_aPrintAreaCol ); // Testabsatz zeichnen - ULONG nLTxtBorder = 4; - ULONG nRTxtBorder = 4; - ULONG nTTxtBorder = 4; + sal_uLong nLTxtBorder = 4; + sal_uLong nRTxtBorder = 4; + sal_uLong nTTxtBorder = 4; Rectangle aTextLine = rRect; aTextLine.SetSize(Size(aTextLine.GetWidth(), 2)); @@ -1860,14 +1860,14 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect) aTextLine.Move(0, nTTxtBorder); sal_Int32 nStep; - USHORT nLines; + sal_uInt16 nLines; nStep = aTextLine.GetHeight() + 2; - nLines = (USHORT)(rRect.GetHeight() / (aTextLine.GetHeight() + 2)) - 1; + nLines = (sal_uInt16)(rRect.GetHeight() / (aTextLine.GetHeight() + 2)) - 1; // Text simulieren // - for (USHORT i = 0; i < nLines; ++i) + for (sal_uInt16 i = 0; i < nLines; ++i) { if (i == (nLines - 1)) aTextLine.SetSize(Size(aTextLine.GetWidth() / 2, aTextLine.GetHeight())); @@ -1891,9 +1891,9 @@ namespace { void lcl_FillRedlineAttrListBox( ListBox& rLB, const AuthorCharAttr& rAttrToSelect, - const USHORT* pAttrMap, const USHORT nAttrMapSize) + const sal_uInt16* pAttrMap, const sal_uInt16 nAttrMapSize) { - for (USHORT i = 0; i != nAttrMapSize; ++i) + for (sal_uInt16 i = 0; i != nAttrMapSize; ++i) { CharAttr& rAttr(aRedlineAttr[pAttrMap[i]]); rLB.SetEntryData(i, &rAttr); @@ -1945,7 +1945,7 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent, { FreeResource(); - for(USHORT i = 0; i < aInsertLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < aInsertLB.GetEntryCount(); i++) { String sEntry(aInsertLB.GetEntry(i)); aDeletedLB.InsertEntry(sEntry); @@ -1983,7 +1983,7 @@ SfxTabPage* SwRedlineOptionsTabPage::Create( Window* pParent, const SfxItemSet& return new SwRedlineOptionsTabPage( pParent, rSet ); } -BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& ) { CharAttr *pAttr; SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig(); @@ -1997,9 +1997,9 @@ BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& ) AuthorCharAttr aOldChangedAttr(pOpt->GetFormatAuthorAttr()); ColorData nOldMarkColor = pOpt->GetMarkAlignColor().GetColor(); - USHORT nOldMarkMode = pOpt->GetMarkAlignMode(); + sal_uInt16 nOldMarkMode = pOpt->GetMarkAlignMode(); - USHORT nPos = aInsertLB.GetSelectEntryPos(); + sal_uInt16 nPos = aInsertLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND) { pAttr = (CharAttr *)aInsertLB.GetEntryData(nPos); @@ -2107,7 +2107,7 @@ BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& ) } } - return FALSE; + return sal_False; } void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) @@ -2125,10 +2125,10 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) // Farblistboxen initialisieren String sColor; - aInsertColorLB.SetUpdateMode(FALSE); - aDeletedColorLB.SetUpdateMode(FALSE); - aChangedColorLB.SetUpdateMode(FALSE); - aMarkColorLB.SetUpdateMode(FALSE); + aInsertColorLB.SetUpdateMode(sal_False); + aDeletedColorLB.SetUpdateMode(sal_False); + aChangedColorLB.SetUpdateMode(sal_False); + aMarkColorLB.SetUpdateMode(sal_False); aInsertColorLB.InsertEntry(sNone); aDeletedColorLB.InsertEntry(sNone); @@ -2139,7 +2139,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) aChangedColorLB.InsertEntry(sAuthor); XColorTable* pColorTbl = XColorTable::GetStdColorTable(); - USHORT i; + sal_uInt16 i; for( i = 0; i < pColorTbl->Count(); ++i ) { XColorEntry* pEntry = pColorTbl->GetColor( i ); @@ -2151,10 +2151,10 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) aChangedColorLB.InsertEntry( aColor, sName ); aMarkColorLB.InsertEntry( aColor, sName ); } - aInsertColorLB.SetUpdateMode( TRUE ); - aDeletedColorLB.SetUpdateMode( TRUE ); - aChangedColorLB.SetUpdateMode( TRUE ); - aMarkColorLB.SetUpdateMode( TRUE ); + aInsertColorLB.SetUpdateMode( sal_True ); + aDeletedColorLB.SetUpdateMode( sal_True ); + aChangedColorLB.SetUpdateMode( sal_True ); + aMarkColorLB.SetUpdateMode( sal_True ); ColorData nColor = rInsertAttr.nColor; @@ -2205,13 +2205,13 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) aChangedLB.SelectEntryPos(0); lcl_FillRedlineAttrListBox(aInsertLB, rInsertAttr, aInsertAttrMap, - sizeof(aInsertAttrMap) / sizeof(USHORT)); + sizeof(aInsertAttrMap) / sizeof(sal_uInt16)); lcl_FillRedlineAttrListBox(aDeletedLB, rDeletedAttr, aDeletedAttrMap, - sizeof(aDeletedAttrMap) / sizeof(USHORT)); + sizeof(aDeletedAttrMap) / sizeof(sal_uInt16)); lcl_FillRedlineAttrListBox(aChangedLB, rChangedAttr, aChangedAttrMap, - sizeof(aChangedAttrMap) / sizeof(USHORT)); + sizeof(aChangedAttrMap) / sizeof(sal_uInt16)); - USHORT nPos = 0; + sal_uInt16 nPos = 0; switch (pOpt->GetMarkAlignMode()) { case text::HoriOrientation::NONE: nPos = 0; break; @@ -2268,7 +2268,7 @@ IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox *, pLB ) rFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED); rCJKFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED); - USHORT nPos = pColorLB->GetSelectEntryPos(); + sal_uInt16 nPos = pColorLB->GetSelectEntryPos(); switch( nPos ) { @@ -2363,7 +2363,7 @@ IMPL_LINK( SwRedlineOptionsTabPage, ColorHdl, ColorListBox *, pColorLB ) SvxFont& rFont = pPrev->GetFont(); SvxFont& rCJKFont = pPrev->GetCJKFont(); - USHORT nPos = pLB->GetSelectEntryPos(); + sal_uInt16 nPos = pLB->GetSelectEntryPos(); if( nPos == LISTBOX_ENTRY_NOTFOUND ) nPos = 0; @@ -2490,7 +2490,7 @@ SwTestTabPage::SwTestTabPage( Window* pParent, aTest8CBox ( this, 0 ), aTest9CBox ( this, 0 ), aTest10CBox ( this, 0 ), - bAttrModified( FALSE ) + bAttrModified( sal_False ) { lcl_SetPosSize(*this, Point(0,0), Size(260 , 135)); lcl_SetPosSize(aTestFL, Point(6,2), Size(209,8)); @@ -2543,7 +2543,7 @@ SfxTabPage* SwTestTabPage::Create( Window* pParent, //------------------------------------------------------------------------ -BOOL SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet ) { if ( bAttrModified ) @@ -2571,7 +2571,7 @@ void SwTestTabPage::Reset( const SfxItemSet& ) const SfxItemSet& rSet = GetItemSet(); const SwTestItem* pTestAttr = 0; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SWTEST , FALSE, + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SWTEST , sal_False, (const SfxPoolItem**)&pTestAttr )) { aTest1CBox.Check(pTestAttr->bTest1); @@ -2609,7 +2609,7 @@ void SwTestTabPage::Init() IMPL_LINK_INLINE_START( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) { - bAttrModified = TRUE; + bAttrModified = sal_True; return 0; } IMPL_LINK_INLINE_END( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx index d81c743604db..cc6f0a4368c0 100644 --- a/sw/source/ui/config/prtopt.cxx +++ b/sw/source/ui/config/prtopt.cxx @@ -158,7 +158,7 @@ void SwPrintOptions::Commit() Any* pValues = aValues.getArray(); const Type& rType = ::getBooleanCppuType(); - BOOL bVal; + sal_Bool bVal; for(int nProp = 0; nProp < aNames.getLength(); nProp++) { switch(nProp) diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx index 40d56b3b6507..640471e441f1 100644 --- a/sw/source/ui/config/uinums.cxx +++ b/sw/source/ui/config/uinums.cxx @@ -56,11 +56,11 @@ using namespace ::com::sun::star; -#define VERSION_30B ((USHORT)250) -#define VERSION_31B ((USHORT)326) -#define VERSION_40A ((USHORT)364) -#define VERSION_50A ((USHORT)373) -#define VERSION_53A ((USHORT)596) +#define VERSION_30B ((sal_uInt16)250) +#define VERSION_31B ((sal_uInt16)326) +#define VERSION_40A ((sal_uInt16)364) +#define VERSION_50A ((sal_uInt16)373) +#define VERSION_53A ((sal_uInt16)596) #define ACT_NUM_VERSION VERSION_53A #define NUMRULE_FILENAME "numrule.cfg" @@ -87,7 +87,7 @@ SwBaseNumRules::SwBaseNumRules( const String& rFileName ) : sFileName( rFileName ), nVersion(0), - bModified( FALSE ) + bModified( sal_False ) { Init(); } @@ -106,11 +106,11 @@ SwBaseNumRules::~SwBaseNumRules() INetURLObject aTempObj(sNm); sNm = aTempObj.GetFull(); SfxMedium aStrm( sNm, STREAM_WRITE | STREAM_TRUNC | - STREAM_SHARE_DENYALL, TRUE ); + STREAM_SHARE_DENYALL, sal_True ); Store( *aStrm.GetOutStream() ); } - for( USHORT i = 0; i < nMaxRules; ++i ) + for( sal_uInt16 i = 0; i < nMaxRules; ++i ) delete pNumRules[i]; } @@ -119,14 +119,14 @@ SwBaseNumRules::~SwBaseNumRules() ------------------------------------------------------------------------*/ void SwBaseNumRules::Init() { - for(USHORT i = 0; i < nMaxRules; ++i ) + for(sal_uInt16 i = 0; i < nMaxRules; ++i ) pNumRules[i] = 0; String sNm( sFileName ); SvtPathOptions aOpt; if( aOpt.SearchFile( sNm, SvtPathOptions::PATH_USERCONFIG )) { - SfxMedium aStrm( sNm, STREAM_STD_READ, TRUE ); + SfxMedium aStrm( sNm, STREAM_STD_READ, sal_True ); Load( *aStrm.GetInStream() ); } } @@ -135,7 +135,7 @@ void SwBaseNumRules::Init() --------------------------------------------------*/ -void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx) +void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx) { ASSERT(nIdx < nMaxRules, Array der NumRules ueberindiziert.); if( !pNumRules[nIdx] ) @@ -149,22 +149,22 @@ void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx) Beschreibung: Speichern ------------------------------------------------------------------------*/ -BOOL /**/ SwBaseNumRules::Store(SvStream &rStream) +sal_Bool /**/ SwBaseNumRules::Store(SvStream &rStream) { rStream << ACT_NUM_VERSION; // Schreiben, welche Positionen durch eine Regel belegt sind // Anschliessend Schreiben der einzelnen Rules - for(USHORT i = 0; i < nMaxRules; ++i) + for(sal_uInt16 i = 0; i < nMaxRules; ++i) { if(pNumRules[i]) { - rStream << (unsigned char) TRUE; + rStream << (unsigned char) sal_True; pNumRules[i]->Store( rStream ); } else - rStream << (unsigned char) FALSE; + rStream << (unsigned char) sal_False; } - return TRUE; + return sal_True; } @@ -189,8 +189,8 @@ int SwBaseNumRules::Load(SvStream &rStream) else if( VERSION_30B == nVersion || VERSION_31B == nVersion || ACT_NUM_VERSION >= nVersion ) { - unsigned char bRule = FALSE; - for(USHORT i = 0; i < nMaxRules; ++i) + unsigned char bRule = sal_False; + for(sal_uInt16 i = 0; i < nMaxRules; ++i) { rStream >> bRule; if(bRule) @@ -226,9 +226,9 @@ SwChapterNumRules::SwChapterNumRules() : /*-----------------26.06.97 08.23------------------- --------------------------------------------------*/ -void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx) +void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx) { - bModified = TRUE; + bModified = sal_True; SwBaseNumRules::ApplyNumRules(rCopy, nIdx); } @@ -238,7 +238,7 @@ SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy, const String &rName ) : aName(rName) { - for( USHORT n = 0; n < MAXLEVEL; ++n ) + for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) { const SwNumFmt* pFmt = rCopy.GetNumFmt( n ); if( pFmt ) @@ -292,13 +292,13 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName /*------------------------------------------------------------------------ Beschreibung: ------------------------------------------------------------------------*/ -SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, USHORT nVersion ) +SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion ) { CharSet eEncoding = gsl_getSystemTextEncoding(); rStream.ReadByteString(aName, eEncoding); char c; - for(USHORT n = 0; n < MAXLEVEL; ++n ) + for(sal_uInt16 n = 0; n < MAXLEVEL; ++n ) { if( VERSION_30B == nVersion ) c = 1; @@ -327,9 +327,9 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const // --> OD 2008-06-06 #i89178# rChg = SwNumRule( aName, numfunc::GetDefaultPositionAndSpaceMode() ); // <-- - rChg.SetAutoRule( FALSE ); + rChg.SetAutoRule( sal_False ); _SwNumFmtGlobal* pFmt; - for( USHORT n = 0; n < MAXLEVEL; ++n ) + for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) if( 0 != ( pFmt = aFmts[ n ] ) ) { SwNumFmt aNew; @@ -346,7 +346,7 @@ void SwNumRulesWithName::Store( SvStream &rStream ) CharSet eEncoding = gsl_getSystemTextEncoding(); rStream.WriteByteString(aName, eEncoding); - for( USHORT n = 0; n < MAXLEVEL; ++n ) + for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) { _SwNumFmtGlobal* pFmt = aFmts[ n ]; if( pFmt ) @@ -377,7 +377,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const SwNumFmt& rFmt ) { SfxItemIter aIter( pFmt->GetAttrSet() ); const SfxPoolItem *pCurr = aIter.GetCurItem(); - while( TRUE ) + while( sal_True ) { aItems.Insert( pCurr->Clone(), aItems.Count() ); if( aIter.IsAtEnd() ) @@ -400,7 +400,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFm sCharFmtName( rFmt.sCharFmtName ), nCharPoolId( rFmt.nCharPoolId ) { - for( USHORT n = rFmt.aItems.Count(); n; ) + for( sal_uInt16 n = rFmt.aItems.Count(); n; ) aItems.Insert( rFmt.aItems[ --n ]->Clone(), aItems.Count() ); } @@ -409,15 +409,15 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFm ------------------------------------------------------------------------*/ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, - USHORT nVersion ) + sal_uInt16 nVersion ) : nCharPoolId( USHRT_MAX ) { CharSet eEncoding = gsl_getSystemTextEncoding(); { - USHORT nUS; + sal_uInt16 nUS; sal_Char cChar; short nShort; - BOOL bFlag; + sal_Bool bFlag; String sStr; rStream >> nUS; aFmt.SetNumberingType((sal_Int16)nUS ); @@ -435,7 +435,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, if( VERSION_30B == nVersion ) { long nL; - rStream >> cChar; aFmt.SetStart( (USHORT)cChar ); + rStream >> cChar; aFmt.SetStart( (sal_uInt16)cChar ); rStream.ReadByteString(sStr, eEncoding); aFmt.SetPrefix( sStr ); @@ -460,11 +460,11 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, rStream >> bFlag; } - USHORT nFamily; - USHORT nCharSet; + sal_uInt16 nFamily; + sal_uInt16 nCharSet; short nWidth; short nHeight; - USHORT nPitch; + sal_uInt16 nPitch; String aName; rStream.ReadByteString(aName, eEncoding); @@ -489,14 +489,14 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, if( VERSION_30B != nVersion ) { - USHORT nItemCount; + sal_uInt16 nItemCount; rStream >> nCharPoolId; rStream.ReadByteString(sCharFmtName, eEncoding); rStream >> nItemCount; while( nItemCount-- ) { - USHORT nWhich, nVers; + sal_uInt16 nWhich, nVers; rStream >> nWhich >> nVers; aItems.Insert( GetDfltAttr( nWhich )->Create( rStream, nVers ), aItems.Count() ); @@ -505,7 +505,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, if( VERSION_40A == nVersion && SVX_NUM_BITMAP == aFmt.GetNumberingType() ) { - BYTE cF; + sal_uInt8 cF; Size aSz; rStream >> aSz.Width() >> aSz.Height(); @@ -515,7 +515,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, { SvxBrushItem* pBrush = 0; SwFmtVertOrient* pVOrient = 0; - USHORT nVer; + sal_uInt16 nVer; if( cF & 1 ) { @@ -556,32 +556,32 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream ) CharSet eEncoding = gsl_getSystemTextEncoding(); { String aName; - USHORT nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0; + sal_uInt16 nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0; short nWidth = 0, nHeight = 0; const Font* pFnt = aFmt.GetBulletFont(); if( pFnt ) { aName = pFnt->GetName(); - nFamily = (USHORT)pFnt->GetFamily(); - nCharSet = (USHORT)pFnt->GetCharSet(); + nFamily = (sal_uInt16)pFnt->GetFamily(); + nCharSet = (sal_uInt16)pFnt->GetCharSet(); nWidth = (short)pFnt->GetSize().Width(); nHeight = (short)pFnt->GetSize().Height(); - nPitch = (USHORT)pFnt->GetPitch(); + nPitch = (sal_uInt16)pFnt->GetPitch(); } - rStream << USHORT(aFmt.GetNumberingType()) + rStream << sal_uInt16(aFmt.GetNumberingType()) << aFmt.GetBulletChar() << (aFmt.GetIncludeUpperLevels() > 0) << aFmt.GetStart(); rStream.WriteByteString( aFmt.GetPrefix(), eEncoding ); rStream.WriteByteString( aFmt.GetSuffix(), eEncoding ); - rStream << USHORT( aFmt.GetNumAdjust() ) + rStream << sal_uInt16( aFmt.GetNumAdjust() ) << aFmt.GetAbsLSpace() << aFmt.GetFirstLineOffset() << aFmt.GetCharTextDistance() << aFmt.GetLSpace() - << FALSE;//aFmt.IsRelLSpace(); + << sal_False;//aFmt.IsRelLSpace(); rStream.WriteByteString( aName, eEncoding ); rStream << nFamily << nCharSet @@ -593,10 +593,10 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream ) rStream.WriteByteString( sCharFmtName, eEncoding ); rStream << aItems.Count(); - for( USHORT n = aItems.Count(); n; ) + for( sal_uInt16 n = aItems.Count(); n; ) { SfxPoolItem* pItem = aItems[ --n ]; - USHORT nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 ); + sal_uInt16 nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 ); ASSERT( nIVers != USHRT_MAX, "Was'n das: Item-Version USHRT_MAX in der aktuellen Version" ); rStream << pItem->Which() @@ -608,21 +608,21 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream ) if( SVX_NUM_BITMAP == aFmt.GetNumberingType() ) { - rStream << (INT32)aFmt.GetGraphicSize().Width() - << (INT32)aFmt.GetGraphicSize().Height(); - BYTE cFlg = ( 0 != aFmt.GetBrush() ? 1 : 0 ) + + rStream << (sal_Int32)aFmt.GetGraphicSize().Width() + << (sal_Int32)aFmt.GetGraphicSize().Height(); + sal_uInt8 cFlg = ( 0 != aFmt.GetBrush() ? 1 : 0 ) + ( 0 != aFmt.GetGraphicOrientation() ? 2 : 0 ); rStream << cFlg; if( aFmt.GetBrush() ) { - USHORT nVersion = aFmt.GetBrush()->GetVersion( SOFFICE_FILEFORMAT_50 ); + sal_uInt16 nVersion = aFmt.GetBrush()->GetVersion( SOFFICE_FILEFORMAT_50 ); rStream << nVersion; aFmt.GetBrush()->Store( rStream, nVersion ); } if( aFmt.GetGraphicOrientation() ) { - USHORT nVersion = aFmt.GetGraphicOrientation()->GetVersion( SOFFICE_FILEFORMAT_50 ); + sal_uInt16 nVersion = aFmt.GetGraphicOrientation()->GetVersion( SOFFICE_FILEFORMAT_50 ); rStream << nVersion; aFmt.GetGraphicOrientation()->Store( rStream, nVersion ); } @@ -640,8 +640,8 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh, if( sCharFmtName.Len() ) { // suche erstmal ueber den Namen - USHORT nArrLen = rSh.GetCharFmtCount(); - for( USHORT i = 1; i < nArrLen; ++i ) + sal_uInt16 nArrLen = rSh.GetCharFmtCount(); + for( sal_uInt16 i = 1; i < nArrLen; ++i ) { pFmt = &rSh.GetCharFmt( i ); if( COMPARE_EQUAL == pFmt->GetName().CompareTo( sCharFmtName )) @@ -655,13 +655,13 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh, if( IsPoolUserFmt( nCharPoolId ) ) { pFmt = rSh.MakeCharFmt( sCharFmtName ); - pFmt->SetAuto( FALSE ); + pFmt->SetAuto( sal_False ); } else pFmt = rSh.GetCharFmtFromPool( nCharPoolId ); if( !pFmt->GetDepends() ) // Attribute setzen - for( USHORT n = aItems.Count(); n; ) + for( sal_uInt16 n = aItems.Count(); n; ) pFmt->SetFmtAttr( *aItems[ --n ] ); } } diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx index 8d79abfb6244..c8b6bd7d3ab1 100644 --- a/sw/source/ui/config/usrpref.cxx +++ b/sw/source/ui/config/usrpref.cxx @@ -56,7 +56,7 @@ void SwMasterUsrPref::SetUsrPref(const SwViewOption &rCopy) *((SwViewOption*)this) = rCopy; } -SwMasterUsrPref::SwMasterUsrPref(BOOL bWeb) : +SwMasterUsrPref::SwMasterUsrPref(sal_Bool bWeb) : eFldUpdateFlags(AUTOUPD_OFF), nLinkUpdateMode(0), bIsHScrollMetricSet(sal_False), @@ -129,7 +129,7 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames() /*-- 28.09.00 09:55:33--------------------------------------------------- -----------------------------------------------------------------------*/ -SwContentViewConfig::SwContentViewConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) : +SwContentViewConfig::SwContentViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) : ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Content") : C2U("Office.Writer/Content")), rParent(rPar), bWeb(bIsWeb) @@ -162,7 +162,7 @@ void SwContentViewConfig::Commit() for(int nProp = 0; nProp < aNames.getLength(); nProp++) { - sal_Bool bVal = FALSE; + sal_Bool bVal = sal_False; switch(nProp) { case 0: bVal = rParent.IsGraphic(); break;// "Display/GraphicObject", @@ -228,11 +228,11 @@ void SwContentViewConfig::Load() { sal_Int32 nSet = 0; pValues[nProp] >>= nSet; - rParent.SetUpdateLinkMode(nSet, TRUE); + rParent.SetUpdateLinkMode(nSet, sal_True); } break;// "Update/Link", - case 17: rParent.SetUpdateFields(bSet, TRUE); break;// "Update/Field", - case 18: rParent.SetUpdateCharts(bSet, TRUE); break;// "Update/Chart" + case 17: rParent.SetUpdateFields(bSet, sal_True); break;// "Update/Field", + case 18: rParent.SetUpdateCharts(bSet, sal_True); break;// "Update/Chart" } } } @@ -279,7 +279,7 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() /*-- 28.09.00 09:55:34--------------------------------------------------- -----------------------------------------------------------------------*/ -SwLayoutViewConfig::SwLayoutViewConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) : +SwLayoutViewConfig::SwLayoutViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) : ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Layout") : C2U("Office.Writer/Layout"), CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), rParent(rPar), @@ -313,10 +313,10 @@ void SwLayoutViewConfig::Commit() case 3: rVal <<= (sal_Bool) rParent.IsViewHScrollBar(); break; // "Window/HorizontalScroll", case 4: rVal <<= (sal_Bool) rParent.IsViewVScrollBar(); break; // "Window/VerticalScroll", case 5: rVal <<= (sal_Bool) rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" - // #i14593# use IsView*Ruler(TRUE) instead of IsView*Ruler() + // #i14593# use IsView*Ruler(sal_True) instead of IsView*Ruler() // this preserves the single ruler states even if "Window/ShowRulers" is off - case 6: rVal <<= (sal_Bool) rParent.IsViewHRuler(TRUE); break; // "Window/HorizontalRuler", - case 7: rVal <<= (sal_Bool) rParent.IsViewVRuler(TRUE); break; // "Window/VerticalRuler", + case 6: rVal <<= (sal_Bool) rParent.IsViewHRuler(sal_True); break; // "Window/HorizontalRuler", + case 7: rVal <<= (sal_Bool) rParent.IsViewVRuler(sal_True); break; // "Window/VerticalRuler", case 8: if(rParent.bIsHScrollMetricSet) rVal <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" @@ -382,15 +382,15 @@ void SwLayoutViewConfig::Load() } break; case 10: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll", - case 11: rParent.SetZoom( static_cast< USHORT >(nInt32Val) ); break;// "Zoom/Value", + case 11: rParent.SetZoom( static_cast< sal_uInt16 >(nInt32Val) ); break;// "Zoom/Value", case 12: rParent.SetZoomType( static_cast< SvxZoomType >(nInt32Val) ); break;// "Zoom/Type", case 13: rParent.SetAlignMathObjectsToBaseline(bSet); break;// "Other/IsAlignMathObjectsToBaseline" - case 14: rParent.SetMetric((FieldUnit)nInt32Val, TRUE); break;// "Other/MeasureUnit", - case 15: rParent.SetDefTab(MM100_TO_TWIP(nInt32Val), TRUE); break;// "Other/TabStop", + case 14: rParent.SetMetric((FieldUnit)nInt32Val, sal_True); break;// "Other/MeasureUnit", + case 15: rParent.SetDefTab(MM100_TO_TWIP(nInt32Val), sal_True); break;// "Other/TabStop", case 16: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", - case 17: rParent.SetViewLayoutColumns( static_cast<USHORT>(nInt32Val) ); break;// "ViewLayout/Columns", + case 17: rParent.SetViewLayoutColumns( static_cast<sal_uInt16>(nInt32Val) ); break;// "ViewLayout/Columns", case 18: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", - case 19: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode", + case 19: rParent.SetDefaultPageMode(bSet,sal_True); break;// "Other/IsSquaredPageMode", } } } @@ -426,7 +426,7 @@ Sequence<OUString> SwGridConfig::GetPropertyNames() /* -----------------------------19.01.01 13:07-------------------------------- ---------------------------------------------------------------------------*/ -SwGridConfig::SwGridConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) : +SwGridConfig::SwGridConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) : ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Grid") : C2U("Office.Writer/Grid"), CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), rParent(rPar), @@ -587,7 +587,7 @@ void SwCursorConfig::Load() switch(nProp) { case 0: rParent.SetShadowCursor(bSet); break;// "DirectCursor/UseDirectCursor", - case 1: rParent.SetShdwCrsrFillMode((BYTE)nSet); break;// "DirectCursor/Insert", + case 1: rParent.SetShdwCrsrFillMode((sal_uInt8)nSet); break;// "DirectCursor/Insert", case 2: rParent.SetCursorInProtectedArea(bSet); break;// "Option/ProtectedArea" } } diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx index 13cec2b93bb5..7a2304f1a4f7 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -60,7 +60,7 @@ #include <editeng/acorrcfg.hxx> #ifdef DBG_UTIL -BOOL SwViewOption::bTest9 = FALSE; //DrawingLayerNotLoading +sal_Bool SwViewOption::bTest9 = sal_False; //DrawingLayerNotLoading #endif Color SwViewOption::aDocBoundColor(COL_LIGHTGRAY); Color SwViewOption::aObjectBoundColor(COL_LIGHTGRAY); @@ -81,7 +81,7 @@ Color SwViewOption::aPageBreakColor(COL_BLUE); Color SwViewOption::aScriptIndicatorColor(COL_GREEN); sal_Int32 SwViewOption::nAppearanceFlags = VIEWOPT_DOC_BOUNDARIES|VIEWOPT_OBJECT_BOUNDARIES; -USHORT SwViewOption::nPixelTwips = 0; //ein Pixel auf dem Bildschirm +sal_uInt16 SwViewOption::nPixelTwips = 0; //ein Pixel auf dem Bildschirm #define LINEBREAK_SIZE 12, 8 @@ -98,7 +98,7 @@ static const char __FAR_DATA aPostItStr[] = " "; * SwViewOption::IsEqualFlags() *************************************************************************/ -BOOL SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const +sal_Bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const { return nCoreOptions == rOpt.nCoreOptions && nCore2Options == rOpt.nCore2Options @@ -167,10 +167,10 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut, * SwViewOption::GetPostItsWidth() *************************************************************************/ -USHORT SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const +sal_uInt16 SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const { ASSERT( pOut, "no Outdev" ); - return USHORT(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr ))); + return sal_uInt16(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr ))); } /************************************************************************* @@ -184,7 +184,7 @@ void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, sal_Bo Color aOldLineColor( pOut->GetLineColor() ); pOut->SetLineColor( Color(COL_GRAY ) ); // Wir ziehen ueberall zwei Pixel ab, damit es schick aussieht - USHORT nPix = GetPixelTwips() * 2; + sal_uInt16 nPix = GetPixelTwips() * 2; if( rRect.Width() <= 2 * nPix || rRect.Height() <= 2 * nPix ) nPix = 0; const Point aTopLeft( rRect.Left() + nPix, rRect.Top() + nPix ); @@ -210,15 +210,15 @@ SwViewOption::SwViewOption() : nPagePrevRow( 1 ), nPagePrevCol( 2 ), nShdwCrsrFillMode( FILL_TAB ), - bReadonly(FALSE), - bStarOneSetting(FALSE), - bIsPagePreview(FALSE), - bSelectionInReadonly(FALSE), + bReadonly(sal_False), + bStarOneSetting(sal_False), + bIsPagePreview(sal_False), + bSelectionInReadonly(sal_False), // --> FME 2004-06-29 #114856# Formular view - bFormView(FALSE), + bFormView(sal_False), // <-- - bBookview(FALSE), - mbViewLayoutBookMode(FALSE), + bBookview(sal_False), + mbViewLayoutBookMode(sal_False), bShowPlaceHolderFields( sal_True ), nZoom( 100 ), @@ -249,14 +249,14 @@ SwViewOption::SwViewOption() : #ifdef DBG_UTIL // korrespondieren zu den Angaben in ui/config/cfgvw.src bTest1 = bTest2 = bTest3 = bTest4 = - bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = FALSE; + bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = sal_False; #endif } SwViewOption::SwViewOption(const SwViewOption& rVOpt) { - bReadonly = FALSE; - bSelectionInReadonly = FALSE; + bReadonly = sal_False; + bSelectionInReadonly = sal_False; // --> FME 2004-06-29 #114856# Formular view bFormView = rVOpt.bFormView; // <-- @@ -354,11 +354,11 @@ void SwViewOption::Init( Window *pWin ) { if( !nPixelTwips && pWin ) { - nPixelTwips = (USHORT)pWin->PixelToLogic( Size(1,1) ).Height(); + nPixelTwips = (sal_uInt16)pWin->PixelToLogic( Size(1,1) ).Height(); } } -BOOL SwViewOption::IsAutoCompleteWords() const +sal_Bool SwViewOption::IsAutoCompleteWords() const { const SvxSwAutoFmtFlags& rFlags = SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags(); return /*rFlags.bAutoCompleteWords &&*/ rFlags.bAutoCmpltCollectWords; @@ -379,9 +379,9 @@ AuthorCharAttr::AuthorCharAttr() : --------------------------------------------------*/ -USHORT GetHtmlMode(const SwDocShell* pShell) +sal_uInt16 GetHtmlMode(const SwDocShell* pShell) { - USHORT nRet = 0; + sal_uInt16 nRet = 0; if(!pShell || PTR_CAST(SwWebDocShell, pShell)) { nRet = HTMLMODE_ON; @@ -593,7 +593,7 @@ void SwViewOption::ApplyColorConfigValues(const svtools::ColorConfig& rConfig ) /* -----------------------------23.04.2002 17:48------------------------------ ---------------------------------------------------------------------------*/ -void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInConfig ) +void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig ) { if(bSet) nAppearanceFlags |= nFlag; @@ -636,7 +636,7 @@ void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInCon /* -----------------------------24.04.2002 10:42------------------------------ ---------------------------------------------------------------------------*/ -BOOL SwViewOption::IsAppearanceFlag(sal_Int32 nFlag) +sal_Bool SwViewOption::IsAppearanceFlag(sal_Int32 nFlag) { return 0 != (nAppearanceFlags & nFlag); } |