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 | 8 | ||||
-rw-r--r-- | sw/source/ui/config/cfgitems.cxx | 38 | ||||
-rw-r--r-- | sw/source/ui/config/fontcfg.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/config/mailconfigpage.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/config/mailconfigpage.src | 22 | ||||
-rw-r--r-- | sw/source/ui/config/makefile.mk | 87 | ||||
-rw-r--r-- | sw/source/ui/config/modcfg.cxx | 44 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.cxx | 82 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.src | 3 | ||||
-rw-r--r-- | sw/source/ui/config/optdlg.hrc | 15 | ||||
-rw-r--r-- | sw/source/ui/config/optdlg.src | 107 | ||||
-rw-r--r-- | sw/source/ui/config/optload.cxx | 112 | ||||
-rw-r--r-- | sw/source/ui/config/optload.src | 18 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 481 | ||||
-rw-r--r-- | sw/source/ui/config/prtopt.cxx | 5 | ||||
-rw-r--r-- | sw/source/ui/config/redlopt.src | 8 | ||||
-rw-r--r-- | sw/source/ui/config/uinums.cxx | 114 | ||||
-rw-r--r-- | sw/source/ui/config/usrpref.cxx | 186 | ||||
-rw-r--r-- | sw/source/ui/config/viewopt.cxx | 44 |
20 files changed, 716 insertions, 682 deletions
diff --git a/sw/source/ui/config/barcfg.cxx b/sw/source/ui/config/barcfg.cxx index 8c8ef22767..5a3d85a4d0 100644 --- a/sw/source/ui/config/barcfg.cxx +++ b/sw/source/ui/config/barcfg.cxx @@ -48,11 +48,11 @@ using namespace com::sun::star::uno; #define SEL_TYPE_BEZIER 3 #define SEL_TYPE_GRAPHIC 4 -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 3205a19539..8a8489b7ff 100644 --- a/sw/source/ui/config/caption.cxx +++ b/sw/source/ui/config/caption.cxx @@ -39,15 +39,15 @@ #define CAPTION_VERSION VERSION_01 InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleId) : - bUseCaption(FALSE), + bUseCaption(sal_False), eObjType(eType), nNumType(SVX_NUM_ARABIC), sNumberSeparator(RTL_CONSTASCII_USTRINGPARAM((". "))), nPos(1), nLevel(0), sSeparator( String::CreateFromAscii( ": " ) ), - bIgnoreSeqOpts(FALSE), - bCopyAttributes(FALSE) + bIgnoreSeqOpts(sal_False), + bCopyAttributes(sal_False) { if (pOleId) aOleId = *pOleId; @@ -81,7 +81,7 @@ InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt ) return *this; } -BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const +sal_Bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const { return (eObjType == rOpt.eObjType && aOleId == rOpt.aOleId); // So that identical Ole-IDs can't be added multiple diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx index 43cec7c2ce..abf7bba55e 100644 --- a/sw/source/ui/config/cfgitems.cxx +++ b/sw/source/ui/config/cfgitems.cxx @@ -48,7 +48,7 @@ TYPEINIT1_AUTOFACTORY(SwElemItem, SfxPoolItem) TYPEINIT1_AUTOFACTORY(SwAddPrinterItem, SfxPoolItem) TYPEINIT1_AUTOFACTORY(SwShadowCursorItem, SfxPoolItem) -SwDocDisplayItem::SwDocDisplayItem( USHORT _nWhich ) : +SwDocDisplayItem::SwDocDisplayItem( sal_uInt16 _nWhich ) : SfxPoolItem(_nWhich), aIndexBackgrndCol(COL_GRAY) { @@ -60,7 +60,7 @@ SwDocDisplayItem::SwDocDisplayItem( USHORT _nWhich ) : bFldHiddenText = bCharHiddenText = bManualBreak = - bShowHiddenPara = FALSE; + bShowHiddenPara = sal_False; }; @@ -73,17 +73,17 @@ SwDocDisplayItem::SwDocDisplayItem( const SwDocDisplayItem& rDocDisplayItem ): *this = 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(); } @@ -135,7 +135,7 @@ void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const rVOpt.SetShowHiddenPara(bShowHiddenPara ); } -SwElemItem::SwElemItem( USHORT _nWhich ) : +SwElemItem::SwElemItem( sal_uInt16 _nWhich ) : SfxPoolItem(_nWhich) { bHorzScrollbar = @@ -152,7 +152,7 @@ SwElemItem::SwElemItem( USHORT _nWhich ) : bGraphic = bDrawing = bFieldName = - bNotes = FALSE; + bNotes = sal_False; } SwElemItem::SwElemItem( const SwElemItem& rElemItem ): @@ -161,14 +161,14 @@ SwElemItem::SwElemItem( const SwElemItem& rElemItem ): *this = rElemItem; } -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(); @@ -261,7 +261,7 @@ SwAddPrinterItem::SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem ): /*-------------------------------------------------------------------- Description: CTOR for empty Item --------------------------------------------------------------------*/ -SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich): +SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich): SfxPoolItem(_nWhich) { } @@ -269,7 +269,7 @@ SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich): /*-------------------------------------------------------------------- Description: CTOR from SwPrintOptions --------------------------------------------------------------------*/ -SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich, const SwPrintData& rPrtData ) : +SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich, const SwPrintData& rPrtData ) : SfxPoolItem(_nWhich) { SwPrintData::operator=(rPrtData); @@ -292,10 +292,10 @@ int SwAddPrinterItem::operator==( const SfxPoolItem& rAttr ) const /*-------------------------------------------------- Item for Settings dialog, ShadowCursorPage --------------------------------------------------*/ -SwShadowCursorItem::SwShadowCursorItem( USHORT _nWhich ) +SwShadowCursorItem::SwShadowCursorItem( sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ), eMode( FILL_TAB ) - ,bOn( FALSE ) + ,bOn( sal_False ) { } @@ -307,7 +307,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() ) @@ -382,4 +382,4 @@ int SwTestItem::operator==( const SfxPoolItem& rAttr ) const -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx index 2290b219d0..0efa9a5995 100644 --- a/sw/source/ui/config/fontcfg.cxx +++ b/sw/source/ui/config/fontcfg.cxx @@ -179,9 +179,9 @@ SwStdFontConfig::~SwStdFontConfig() { } -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 ); @@ -221,7 +221,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; @@ -229,7 +229,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; @@ -237,10 +237,10 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const return bSame; } -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 : @@ -271,7 +271,7 @@ String SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang) return aFont.GetName(); } -sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eLang) +sal_Int32 SwStdFontConfig::GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang) { sal_Int32 nRet = FONTSIZE_DEFAULT; switch( nFontType ) @@ -292,7 +292,7 @@ sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eL return nRet; } -void SwStdFontConfig::ChangeInt( USHORT nFontType, sal_Int32 nHeight ) +void SwStdFontConfig::ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight ) { OSL_ENSURE( 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 3d88f6c84f..4e9d2c5fbe 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -184,7 +184,7 @@ SfxTabPage* SwMailConfigPage::Create( Window* pParent, const SfxItemSet& rAttrS return new SwMailConfigPage(pParent, rAttrSet); } -BOOL SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ ) +sal_Bool SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ ) { if(m_aDisplayNameED.GetText() != m_aDisplayNameED.GetSavedValue()) m_pConfigItem->SetMailDisplayName(m_aDisplayNameED.GetText()); @@ -306,7 +306,7 @@ SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare m_aStatusLB.SetHelpId(HID_MM_TESTACCOUNTSETTINGS_TLB); static long nTabs[] = {2, 0, aSz.Width()/2 }; - m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); + m_aStatusLB.SetStyle( m_aStatusLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); m_aStatusLB.SetSelectionMode( SINGLE_SELECTION ); m_aStatusLB.SetTabs(&nTabs[0], MAP_PIXEL); short nEntryHeight = m_aStatusLB.GetEntryHeight(); diff --git a/sw/source/ui/config/mailconfigpage.src b/sw/source/ui/config/mailconfigpage.src index 1c9f269d10..e5ffb3f73d 100644 --- a/sw/source/ui/config/mailconfigpage.src +++ b/sw/source/ui/config/mailconfigpage.src @@ -53,6 +53,7 @@ TabPage TP_MAILCONFIG }; Edit ED_DISPLAYNAME { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_DISPLAYNAME"; Pos = MAP_APPFONT ( 88 , 14 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; Border = TRUE; @@ -65,12 +66,14 @@ TabPage TP_MAILCONFIG }; Edit ED_ADDRESS { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_ADDRESS"; Pos = MAP_APPFONT ( 88 , 29 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; Border = TRUE; }; CheckBox CB_REPLYTO { + HelpID = "sw:CheckBox:TP_MAILCONFIG:CB_REPLYTO"; Pos = MAP_APPFONT ( 12 , 45 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "Send replies to ~different e-mail address"; @@ -83,6 +86,7 @@ TabPage TP_MAILCONFIG }; Edit ED_REPLYTO { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_REPLYTO"; Pos = MAP_APPFONT ( 88 , 58 ) ; Size = MAP_APPFONT ( 160 , 12 ) ; Border = TRUE; @@ -101,6 +105,7 @@ TabPage TP_MAILCONFIG }; Edit ED_SERVER { + HelpID = "sw:Edit:TP_MAILCONFIG:ED_SERVER"; Pos = MAP_APPFONT ( 88 , 87 ) ; Size = MAP_APPFONT ( 105 , 12 ) ; Border = TRUE; @@ -114,6 +119,7 @@ TabPage TP_MAILCONFIG }; NumericField NF_PORT { + HelpID = "sw:NumericField:TP_MAILCONFIG:NF_PORT"; Pos = MAP_APPFONT ( 223 , 87 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE; @@ -127,12 +133,14 @@ TabPage TP_MAILCONFIG }; CheckBox CB_SECURE { + HelpID = "sw:CheckBox:TP_MAILCONFIG:CB_SECURE"; Pos = MAP_APPFONT ( 12 , 104 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text[ en-US ] = "~Use secure connection (SSL)"; }; PushButton PB_AUTHENTICATION { + HelpID = "sw:PushButton:TP_MAILCONFIG:PB_AUTHENTICATION"; Pos = MAP_APPFONT ( 88 , 118 ) ; Size = MAP_APPFONT ( 105 , 14 ) ; Text[ en-US ] = "Server Au~thentication"; @@ -144,6 +152,7 @@ TabPage TP_MAILCONFIG }; PushButton PB_TEST { + HelpID = "sw:PushButton:TP_MAILCONFIG:PB_TEST"; Pos = MAP_APPFONT ( 88 , 164 ) ; Size = MAP_APPFONT ( 105 , 14 ) ; Text[ en-US ] = "Test S~ettings..."; @@ -179,6 +188,7 @@ ModalDialog DLG_MM_TESTACCOUNTSETTINGS }; MultiLineEdit ED_ERROR { + HelpID = "sw:MultiLineEdit:DLG_MM_TESTACCOUNTSETTINGS:ED_ERROR"; Pos = MAP_APPFONT ( 6 , 79 ) ; Size = MAP_APPFONT ( 238 , 60 ) ; Border = TRUE; @@ -191,6 +201,7 @@ ModalDialog DLG_MM_TESTACCOUNTSETTINGS }; PushButton PB_STOP { + HelpID = "sw:PushButton:DLG_MM_TESTACCOUNTSETTINGS:PB_STOP"; Pos = MAP_APPFONT ( 85 , 156 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text[ en-US ] = "~Stop"; @@ -261,12 +272,14 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION CheckBox CB_AUTHENTICATION { + HelpID = "sw:CheckBox:DLG_MM_SERVERAUTHENTICATION:CB_AUTHENTICATION"; Pos = MAP_APPFONT ( 6 , 3 ) ; Size = MAP_APPFONT ( 238 , 10 ) ; Text[ en-US ] = "The outgoing mail server (SMTP) requires au~thentication"; }; RadioButton RB_SEP_AUTHENTICATION { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_SEP_AUTHENTICATION"; Pos = MAP_APPFONT ( 12 , 17 ) ; Size = MAP_APPFONT ( 232 , 10 ) ; Text[ en-US ] = "The outgoing mail server (SMTP) requires ~separate authentication"; @@ -285,6 +298,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_USERNAME { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_USERNAME"; Pos = MAP_APPFONT ( 78 , 42 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -297,6 +311,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_OUTPASSWORD { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_OUTPASSWORD"; Pos = MAP_APPFONT ( 78 , 57 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -304,6 +319,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; RadioButton RB_SMPTAFTERPOP { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_SMPTAFTERPOP"; Pos = MAP_APPFONT ( 12 , 73 ) ; Size = MAP_APPFONT ( 232 , 20 ) ; WordBreak = TRUE; @@ -323,6 +339,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_SERVER { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_SERVER"; Pos = MAP_APPFONT ( 78 , 108 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -336,6 +353,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; NumericField NF_PORT { + HelpID = "sw:NumericField:DLG_MM_SERVERAUTHENTICATION:NF_PORT"; Pos = MAP_APPFONT ( 219 , 108 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; Border = TRUE; @@ -355,12 +373,14 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; RadioButton RB_POP3 { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_POP3"; Pos = MAP_APPFONT ( 78 , 125 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text[ en-US ] = "~POP 3"; }; RadioButton RB_IMAP { + HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_IMAP"; Pos = MAP_APPFONT ( 78 , 138 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text[ en-US ] = "~IMAP"; @@ -373,6 +393,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_INUSERNAME { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_INUSERNAME"; Pos = MAP_APPFONT ( 78 , 150 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; @@ -385,6 +406,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION }; Edit ED_INPASSWORD { + HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_INPASSWORD"; Pos = MAP_APPFONT ( 78 , 165 ) ; Size = MAP_APPFONT ( 115 , 12 ) ; Border = TRUE; diff --git a/sw/source/ui/config/makefile.mk b/sw/source/ui/config/makefile.mk deleted file mode 100644 index d624e466c8..0000000000 --- a/sw/source/ui/config/makefile.mk +++ /dev/null @@ -1,87 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=config -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- -IMGLST_SRS=$(SRS)$/config.srs -BMP_IN=$(PRJ)$/win/imglst - -SRS1NAME=$(TARGET) -SRC1FILES = \ - mailconfigpage.src \ - optdlg.src \ - optload.src \ - optcomp.src \ - redlopt.src - -EXCEPTIONSFILES = \ - $(SLO)$/barcfg.obj \ - $(SLO)$/cfgitems.obj \ - $(SLO)$/fontcfg.obj \ - $(SLO)$/mailconfigpage.obj \ - $(SLO)$/modcfg.obj \ - $(SLO)$/optcomp.obj \ - $(SLO)$/optload.obj \ - $(SLO)$/optpage.obj \ - $(SLO)$/prtopt.obj \ - $(SLO)$/uinums.obj \ - $(SLO)$/usrpref.obj \ - $(SLO)$/viewopt.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/caption.obj \ - $(SLO)$/dbconfig.obj - -LIB1TARGET= $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/barcfg.obj \ - $(SLO)$/caption.obj \ - $(SLO)$/cfgitems.obj \ - $(SLO)$/dbconfig.obj \ - $(SLO)$/fontcfg.obj \ - $(SLO)$/modcfg.obj \ - $(SLO)$/prtopt.obj \ - $(SLO)$/uinums.obj \ - $(SLO)$/usrpref.obj \ - $(SLO)$/viewopt.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx index e871161508..7cdca49357 100644 --- a/sw/source/ui/config/modcfg.cxx +++ b/sw/source/ui/config/modcfg.cxx @@ -64,7 +64,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 && @@ -78,7 +78,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) { @@ -87,10 +87,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; @@ -99,9 +99,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) { @@ -109,10 +109,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) { @@ -134,22 +134,22 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt) rArr.Insert(new InsCaptionOpt(*pOpt)); aInsertConfig.SetModified(); - bRet = TRUE; + bRet = sal_True; } return bRet; } 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) { } -String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI) +String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFromUI) { String sReturn; if(bFromUI) @@ -176,7 +176,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 ) { @@ -189,7 +189,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI) else { OSL_FAIL("wrong hex value" ); - bValidData = FALSE; + bValidData = sal_False; break; } @@ -930,7 +930,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()) @@ -1204,10 +1204,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 2de7b376d6..0dfcfc6329 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -136,7 +136,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 || @@ -148,10 +148,10 @@ 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.SetWindowBits( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); + m_aOptionsLB.SetStyle( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); m_aOptionsLB.SetHighlightRange(); FreeResource(); @@ -211,7 +211,7 @@ void SwCompatibilityOptPage::ReplaceFormatName( String& rEntry ) } } -ULONG convertBools2Ulong_Impl +sal_uLong convertBools2Ulong_Impl ( bool _bUsePrtMetrics, bool _bAddSpacing, @@ -226,8 +226,8 @@ ULONG convertBools2Ulong_Impl bool _bExpandWordSpace ) { - ULONG nRet = 0; - ULONG nSetBit = 1; + sal_uLong nRet = 0; + sal_uLong nSetBit = 1; if ( _bUsePrtMetrics ) nRet |= nSetBit; @@ -271,7 +271,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 ) { @@ -369,8 +369,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, @@ -399,8 +399,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; @@ -416,10 +416,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 ) { @@ -450,21 +450,21 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG ) return 0; } -void SwCompatibilityOptPage::SetCurrentOptions( ULONG nOptions ) +void SwCompatibilityOptPage::SetCurrentOptions( sal_uLong nOptions ) { - ULONG nCount = m_aOptionsLB.GetEntryCount(); + sal_uLong nCount = m_aOptionsLB.GetEntryCount(); OSL_ENSURE( 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; } } -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(); @@ -503,75 +503,75 @@ SfxTabPage* SwCompatibilityOptPage::Create( Window* pParent, const SfxItemSet& r return new SwCompatibilityOptPage( pParent, rAttrSet ); } -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(); OSL_ENSURE( 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; } } @@ -580,9 +580,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; } } @@ -596,7 +596,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/optcomp.src b/sw/source/ui/config/optcomp.src index 3682b49477..fee89d732d 100644 --- a/sw/source/ui/config/optcomp.src +++ b/sw/source/ui/config/optcomp.src @@ -50,6 +50,7 @@ TabPage TP_OPTCOMPATIBILITY_PAGE }; ListBox LB_FORMATTING { + HelpID = "sw:ListBox:TP_OPTCOMPATIBILITY_PAGE:LB_FORMATTING"; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 118 , 24 ) ; DropDown = TRUE; @@ -70,12 +71,14 @@ TabPage TP_OPTCOMPATIBILITY_PAGE }; PushButton PB_RESET { + HelpID = "sw:PushButton:TP_OPTCOMPATIBILITY_PAGE:PB_RESET"; Pos = MAP_APPFONT ( 125 , 165 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Reset"; }; PushButton PB_DEFAULT { + HelpID = "sw:PushButton:TP_OPTCOMPATIBILITY_PAGE:PB_DEFAULT"; Pos = MAP_APPFONT ( 188 , 165 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "Use as ~Default"; diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc index 8b0f1016d4..76054aea6a 100644 --- a/sw/source/ui/config/optdlg.hrc +++ b/sw/source/ui/config/optdlg.hrc @@ -30,7 +30,7 @@ #define FL_NOPRINT 2 #define FL_WINDOW 3 -#define CB_GRF 1 +#define CB_GRF 1 #define CB_TBL 2 #define CB_DRWFAST 3 #define CB_FIELD 4 @@ -39,10 +39,10 @@ #define CB_SPACE 7 #define CB_HSPACE 8 #define CB_SHYPH 9 -#define CB_FLD_HIDDEN 10 +#define CB_FLD_HIDDEN 10 #define CB_BREAK 11 #define CB_ANY_RULER 12 -#define CB_CROSS 14 +#define CB_CROSS 14 #define CB_HSCROLL 15 #define CB_VSCROLL 16 #define CB_HRULER 17 @@ -50,7 +50,7 @@ #define FL_LINE 22 #define CB_POSTIT 23 #define CB_VRULER_RIGHT 24 -#define CB_BIGHANDLE 25 +#define CB_BIGHANDLE 25 #define FL_SETTINGS 26 #define LB_METRIC 27 @@ -191,7 +191,7 @@ #define FL_TABLE_SEPARATOR 139 #define CB_PROSPECT_RTL 140 -#define FL_SHDWCRSFLAG 1 +#define FL_SHDWCRSFLAG 1 #define CB_SHDWCRSONOFF 2 #define FL_SHDWCRSMODE 3 #define FT_SHDWCRSFILLMODE 4 @@ -201,5 +201,8 @@ #define RB_SHDWCRSFILLSPACE 8 #define CB_ALLOW_IN_PROT 12 #define FL_CRSR_OPT 13 -#define FL_SEPARATOR_SHDW 14 +#define FL_SEPARATOR_SHDW 14 +#define FL_LAYOUT_OPTIONS 15 +#define CB_MATH_BASELINE_ALIGNMENT 16 + diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index 60c1387b0c..bd9566494e 100644 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -56,18 +56,21 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_CROSS { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_CROSS"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Guides ~while moving"; }; CheckBox CB_HANDLE { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HANDLE"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Sim~ple handles"; }; CheckBox CB_BIGHANDLE { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_BIGHANDLE"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Large handles"; @@ -81,54 +84,63 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_HSCROLL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HSCROLL"; Pos = MAP_APPFONT ( 136 , 14 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "H~orizontal scrollbar" ; }; CheckBox CB_VSCROLL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VSCROLL"; Pos = MAP_APPFONT ( 136 , 27 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Vertical scrollbar" ; }; CheckBox CB_ANY_RULER { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_ANY_RULER"; Pos = MAP_APPFONT ( 136 , 40 ) ; Size = MAP_APPFONT ( 65 , 10 ) ; Text [ en-US ] = "R~uler" ; }; CheckBox CB_HRULER { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HRULER"; Pos = MAP_APPFONT ( 142 , 53 ) ; Size = MAP_APPFONT ( 62 , 10 ) ; Text [ en-US ] = "Hori~zontal ruler" ; }; ListBox LB_HMETRIC { + HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_HMETRIC"; Pos = MAP_APPFONT ( 206 , 51 ) ; Size = MAP_APPFONT ( 45 , 60 ) ; DropDown = TRUE; }; CheckBox CB_VRULER { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VRULER"; Pos = MAP_APPFONT ( 142 , 66 ) ; Size = MAP_APPFONT ( 62 , 10 ) ; Text [ en-US ] = "Verti~cal ruler" ; }; CheckBox CB_VRULER_RIGHT { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VRULER_RIGHT"; Pos = MAP_APPFONT ( 148 , 79 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "Right-aligned"; }; ListBox LB_VMETRIC { + HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_VMETRIC"; Pos = MAP_APPFONT ( 206 , 64 ) ; Size = MAP_APPFONT ( 45 , 60 ) ; DropDown = TRUE; }; CheckBox CB_SMOOTH_SCROLL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_SMOOTH_SCROLL"; Pos = MAP_APPFONT ( 136 , 79 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "S~mooth scroll" ; @@ -142,6 +154,7 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_GRF { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_GRF"; Pos = MAP_APPFONT ( 12 , 67 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Graphics and objects" ; @@ -150,24 +163,28 @@ TabPage TP_CONTENT_OPT }; CheckBox CB_TBL { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_TBL"; Pos = MAP_APPFONT ( 12 , 80 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Tables " ; }; CheckBox CB_DRWFAST { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_DRWFAST"; Pos = MAP_APPFONT ( 12 , 93 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Dra~wings and controls" ; }; CheckBox CB_FIELD { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_FIELD"; Pos = MAP_APPFONT ( 12 , 106 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Field codes" ; }; CheckBox CB_POSTIT { + HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_POSTIT"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "~Comments" ; @@ -188,6 +205,7 @@ TabPage TP_CONTENT_OPT }; ListBox LB_METRIC { + HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_METRIC"; Pos = MAP_APPFONT ( 199, 133 ) ; Size = MAP_APPFONT ( 50 , 50 ) ; Border = TRUE ; @@ -214,6 +232,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_PGRF /*functionally merged with CB_PDRAW*/ { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PGRF"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Pictures and objects" ; @@ -224,6 +243,7 @@ TabPage TP_OPTPRINT_PAGE removed, tables now always get printed CheckBox CB_PTAB { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PTAB"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Tables" ; @@ -233,6 +253,7 @@ TabPage TP_OPTPRINT_PAGE functionally merged with CB_PGRF (pictures and graphics) CheckBox CB_PDRAW { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PDRAW"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Dra~wings" ; @@ -240,30 +261,35 @@ TabPage TP_OPTPRINT_PAGE */ CheckBox CB_CTRLFLD { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_CTRLFLD"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Form control~s" ; }; CheckBox CB_BACKGROUND { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_BACKGROUND"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Page ba~ckground" ; }; CheckBox CB_BLACK_FONT { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_BLACK_FONT"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Print text in blac~k" ; }; CheckBox CB_HIDDEN_TEXT { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_HIDDEN_TEXT"; Pos = MAP_APPFONT ( 12 , 66 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Hidden te~xt" ; }; CheckBox CB_TEXT_PLACEHOLDER { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_TEXT_PLACEHOLDER"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Text ~placeholder" ; @@ -283,6 +309,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_LEFTP { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_LEFTP"; Pos = MAP_APPFONT ( 96 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Left pages" ; @@ -291,6 +318,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_RIGHTP { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_RIGHTP"; Pos = MAP_APPFONT ( 96 , 27 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Right pages" ; @@ -299,6 +327,7 @@ TabPage TP_OPTPRINT_PAGE removed, noe handled by the new print dialog (i.e. vcl) itself CheckBox CB_REVERSE { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_REVERSE"; Pos = MAP_APPFONT ( 96 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Re~versed" ; @@ -306,12 +335,14 @@ TabPage TP_OPTPRINT_PAGE */ CheckBox CB_PROSPECT { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT"; Pos = MAP_APPFONT ( 96 , 40 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Broch~ure" ; }; CheckBox CB_PROSPECT_RTL { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT_RTL"; Pos = MAP_APPFONT ( 103 , 53 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Right to Left" ; @@ -319,6 +350,7 @@ TabPage TP_OPTPRINT_PAGE }; RadioButton RB_NO { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_NO"; Pos = MAP_APPFONT ( 180 , 14 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "~None" ; @@ -327,18 +359,21 @@ TabPage TP_OPTPRINT_PAGE }; RadioButton RB_ONLY { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_ONLY"; Pos = MAP_APPFONT ( 180 , 27 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "Comments ~only" ; }; RadioButton RB_END { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_END"; Pos = MAP_APPFONT ( 180 , 40 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "End of docu~ment" ; }; RadioButton RB_PAGEEND { + HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_PAGEEND"; Pos = MAP_APPFONT ( 180 , 53 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "~End of page" ; @@ -365,6 +400,7 @@ TabPage TP_OPTPRINT_PAGE }; CheckBox CB_PRINTEMPTYPAGES { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PRINTEMPTYPAGES"; Pos = MAP_APPFONT ( 12 , 106 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -373,6 +409,7 @@ TabPage TP_OPTPRINT_PAGE /* CheckBox CB_SINGLEJOBS { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_SINGLEJOBS"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -381,6 +418,7 @@ TabPage TP_OPTPRINT_PAGE */ CheckBox CB_PAPERFROMSETUP { + HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PAPERFROMSETUP"; Pos = MAP_APPFONT ( 12 , 119 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -395,6 +433,7 @@ TabPage TP_OPTPRINT_PAGE }; ListBox LB_FAX { + HelpID = "sw:ListBox:TP_OPTPRINT_PAGE:LB_FAX"; Border = TRUE ; Pos = MAP_APPFONT ( 70 , 132 ) ; Size = MAP_APPFONT ( 184 , 70 ) ; @@ -437,6 +476,7 @@ TabPage TP_STD_FONT }; MetricBox LB_STANDARD_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_STANDARD_SIZE"; Pos = MAP_APPFONT ( 204 , 25 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -444,6 +484,7 @@ TabPage TP_STD_FONT }; MetricBox LB_TITLE_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_TITLE_SIZE"; Pos = MAP_APPFONT ( 204 , 42 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -451,6 +492,7 @@ TabPage TP_STD_FONT }; MetricBox LB_LIST_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_LIST_SIZE"; Pos = MAP_APPFONT ( 204 , 59 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -458,6 +500,7 @@ TabPage TP_STD_FONT }; MetricBox LB_LABEL_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_LABEL_SIZE"; Pos = MAP_APPFONT ( 204 , 76 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -465,6 +508,7 @@ TabPage TP_STD_FONT }; MetricBox LB_INDEX_SIZE { + HelpID = "sw:MetricBox:TP_STD_FONT:LB_INDEX_SIZE"; Pos = MAP_APPFONT ( 204 , 93 ) ; Size = MAP_APPFONT ( 30 , 60 ) ; Border = TRUE ; @@ -507,6 +551,7 @@ TabPage TP_STD_FONT }; ComboBox LB_STANDARD { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_STANDARD"; Pos = MAP_APPFONT ( 63 , 25 ) ; Size = MAP_APPFONT ( 135 , 73 ) ; TabStop = TRUE ; @@ -515,6 +560,7 @@ TabPage TP_STD_FONT }; ComboBox LB_TITLE { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_TITLE"; Pos = MAP_APPFONT ( 63 , 42 ) ; Size = MAP_APPFONT ( 135, 73 ) ; TabStop = TRUE ; @@ -523,6 +569,7 @@ TabPage TP_STD_FONT }; ComboBox LB_LIST { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_LIST"; Pos = MAP_APPFONT ( 63 , 59 ) ; Size = MAP_APPFONT ( 135 , 73 ) ; TabStop = TRUE ; @@ -531,6 +578,7 @@ TabPage TP_STD_FONT }; ComboBox LB_LABEL { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_LABEL"; Pos = MAP_APPFONT ( 63 , 76 ) ; Size = MAP_APPFONT ( 135 , 73 ) ; TabStop = TRUE ; @@ -539,6 +587,7 @@ TabPage TP_STD_FONT }; ComboBox LB_IDX { + HelpID = "sw:ComboBox:TP_STD_FONT:LB_IDX"; Pos = MAP_APPFONT ( 63 , 94 ) ; Size = MAP_APPFONT ( 135, 73 ) ; TabStop = TRUE ; @@ -547,12 +596,14 @@ TabPage TP_STD_FONT }; CheckBox CB_DOCONLY { + HelpID = "sw:CheckBox:TP_STD_FONT:CB_DOCONLY"; Pos = MAP_APPFONT ( 12 , 111 ) ; Size = MAP_APPFONT ( 147 , 10 ) ; Text [ en-US ] = "C~urrent document only" ; }; PushButton PB_STANDARD { + HelpID = "sw:PushButton:TP_STD_FONT:PB_STANDARD"; Pos = MAP_APPFONT ( 204 , 165 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Default" ; @@ -588,6 +639,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_HEADER { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_HEADER"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 107 , 10 ) ; TabStop = TRUE ; @@ -595,6 +647,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_REPEAT_HEADER { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_REPEAT_HEADER"; Pos = MAP_APPFONT ( 21 , 27 ) ; Size = MAP_APPFONT ( 99 , 10 ) ; TabStop = TRUE ; @@ -602,6 +655,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_DONT_SPLIT { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_DONT_SPLIT"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 107 , 10 ) ; TabStop = TRUE ; @@ -609,6 +663,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_BORDER { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_BORDER"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 107 , 10 ) ; TabStop = TRUE ; @@ -628,6 +683,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_NUMFORMATTING { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMFORMATTING"; Pos = MAP_APPFONT ( 131 , 14 ) ; Size = MAP_APPFONT ( 118 , 10 ) ; TabStop = TRUE ; @@ -635,6 +691,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_NUMFMT_FORMATTING { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMFMT_FORMATTING"; Pos = MAP_APPFONT ( 140 , 27 ) ; Size = MAP_APPFONT ( 114 , 10 ) ; TabStop = TRUE ; @@ -642,6 +699,7 @@ TabPage TP_OPTTABLE_PAGE }; CheckBox CB_NUMALIGNMENT { + HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMALIGNMENT"; Pos = MAP_APPFONT ( 140 , 40 ) ; Size = MAP_APPFONT ( 114 , 10 ) ; TabStop = TRUE ; @@ -667,6 +725,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_ROWMOVE { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_ROWMOVE"; Border = TRUE ; Pos = MAP_APPFONT ( 83 , 91 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -689,6 +748,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_COLMOVE { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_COLMOVE"; Border = TRUE ; Pos = MAP_APPFONT ( 83 , 106 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -717,6 +777,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_ROWINSERT { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_ROWINSERT"; Border = TRUE ; Pos = MAP_APPFONT ( 211 , 91 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -739,6 +800,7 @@ TabPage TP_OPTTABLE_PAGE }; MetricField MF_COLINSERT { + HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_COLINSERT"; Border = TRUE ; Pos = MAP_APPFONT ( 211 , 106 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -761,6 +823,7 @@ TabPage TP_OPTTABLE_PAGE }; RadioButton RB_FIX { + HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_FIX"; Pos = MAP_APPFONT ( 21 , 133 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Fixed" ; @@ -774,6 +837,7 @@ TabPage TP_OPTTABLE_PAGE }; RadioButton RB_FIXPROP { + HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_FIXPROP"; Pos = MAP_APPFONT ( 21 , 151 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "Fi~xed, proportional" ; @@ -787,6 +851,7 @@ TabPage TP_OPTTABLE_PAGE }; RadioButton RB_VAR { + HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_VAR"; Pos = MAP_APPFONT ( 21 , 169 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~Variable" ; @@ -820,6 +885,7 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_PARA { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_PARA"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Pa~ragraph end" ; @@ -828,48 +894,56 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_SHYPH { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SHYPH"; Pos = MAP_APPFONT ( 12 , 27 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Custom h~yphens" ; }; CheckBox CB_SPACE { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SPACE"; Pos = MAP_APPFONT ( 12 , 40 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Spac~es" ; }; CheckBox CB_HSPACE { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_HSPACE"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Non-breaking s~paces" ; }; CheckBox CB_TAB { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_TAB"; Pos = MAP_APPFONT ( 12 , 66 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Ta~bs" ; }; CheckBox CB_BREAK { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_BREAK"; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Brea~ks" ; }; CheckBox CB_CHAR_HIDDEN { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_CHAR_HIDDEN"; Pos = MAP_APPFONT ( 12 , 92 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Hidden text" ; }; CheckBox CB_FLD_HIDDEN { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_FLD_HIDDEN"; Pos = MAP_APPFONT ( 12 , 105 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Fields: Hidden te~xt" ; }; CheckBox CB_FLD_HIDDEN_PARA { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_FLD_HIDDEN_PARA"; Pos = MAP_APPFONT ( 12 , 118 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; Text [ en-US ] = "Fields: Hidden p~aragraphs" ; @@ -888,6 +962,7 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_SHDWCRSONOFF { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SHDWCRSONOFF"; Pos = MAP_APPFONT ( 136 , 14 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -903,6 +978,7 @@ TabPage TP_OPTSHDWCRSR }; RadioButton RB_SHDWCRSFILLMARGIN { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLMARGIN"; Pos = MAP_APPFONT ( 145 , 39 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -911,18 +987,21 @@ TabPage TP_OPTSHDWCRSR }; RadioButton RB_SHDWCRSFILLINDENT { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLINDENT"; Pos = MAP_APPFONT ( 145 , 52 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Left paragraph margin" ; }; RadioButton RB_SHDWCRSFILLTAB { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLTAB"; Pos = MAP_APPFONT ( 145 , 66 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Tabs" ; }; RadioButton RB_SHDWCRSFILLSPACE { + HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLSPACE"; Pos = MAP_APPFONT ( 145 , 79 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "Tabs a~nd spaces" ; @@ -935,15 +1014,27 @@ TabPage TP_OPTSHDWCRSR }; CheckBox CB_ALLOW_IN_PROT { + HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_ALLOW_IN_PROT"; Pos = MAP_APPFONT ( 136 , 107 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; Group = TRUE ; Text [ en-US ] = "Enable"; }; + FixedLine FL_LAYOUT_OPTIONS + { + Pos = MAP_APPFONT ( 6 , 133 ) ; + Size = MAP_APPFONT ( 118 , 8 ) ; + Text [ en-US ] = "Layout assistance"; + }; + CheckBox CB_MATH_BASELINE_ALIGNMENT + { + Pos = MAP_APPFONT ( 12 , 144 ) ; + Size = MAP_APPFONT ( 236 , 10 ) ; + Text [ en-US ] = "Math baseline alignment"; + }; }; - StringArray STR_PRINTOPTUI { ItemList [en-US] = @@ -951,47 +1042,33 @@ StringArray STR_PRINTOPTUI < "%PRODUCTNAME %s"; >; < "Contents"; >; < "Page ba~ckground"; >; - < "Specifies whether to include colors and objects that are inserted to the background of the page (Format - Page - Background) in the printed document."; >; < "P~ictures and other graphic objects"; >; - < "Specifies whether the graphics and drawing or OLE objects of your text document are printed"; >; < "Hidden te~xt"; >; - < "Enable this option to print text that is marked as hidden."; >; < "~Text placeholders"; >; - < "Enable this option to print text placeholders. Disable this option to leave the text placeholders blank in the printout."; >; < "Form control~s"; >; - < "Specifies whether the form control fields of the text document are printed"; >; < "Color"; >; < "Print text in blac~k"; >; - < "Specifies whether to always print text in black."; >; < "Pages"; >; < "Print ~automatically inserted blank pages"; >; - < "If this option is enabled automatically inserted blank pages are printed. This is best if you are printing double-sided. For example, in a book, a \"chapter\" paragraph style has been set to always start with an odd numbered page. If the previous chapter ends on an odd page, %PRODUCTNAME inserts an even numbered blank page. This option controls whether to print that even numbered page or not"; >; < "~Use only paper tray from printer preferences"; >; - < "For printers with multiple trays this option specifies whether the paper tray used is specified by the system settings of the printer."; >; < "Print"; >; < "None (document only)"; >; < "Comments only"; >; < "Place at end of document"; >; < "Place at end of page"; >; - < "Specify where to print comments (if any)."; >; < "~Comments"; >; < "Page sides";>; < "All pages"; >; < "Back sides / left pages"; >; < "Front sides / right pages"; >; - < "Specify which pages to include in the output"; >; < "Include"; >; < "Broch~ure"; >; - < "Select the Brochure option to print the document in brochure format."; >; < "Left-to-right script"; >; < "Right-to-left script"; >; < "Range and copies"; >; < "~All pages"; >; - < "Print the whole document."; >; < "Pa~ges"; >; - < "Print a range of pages of the document."; >; < "~Selection"; >; - < "Print only the selected parts of the document"; >; }; }; diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 7e945424be..164186c5f7 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -97,7 +97,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) : aUseCharUnit ( this , SW_RES( CB_USE_CHAR_UNIT ) ), pWrtShell ( NULL ), - bHTMLMode ( FALSE ), + bHTMLMode ( sal_False ), nLastTab ( 0 ), nOldLinkMode( MANUAL ) @@ -105,7 +105,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 ); @@ -119,7 +119,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) : case FUNIT_INCH: { // use only these metrics - USHORT nPos = aMetricLB.InsertEntry( sMetric ); + sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric ); aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit ); } default:; //prevent warning @@ -128,7 +128,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(); @@ -153,12 +153,12 @@ SfxTabPage* SwLoadOptPage::Create( Window* pParent, return new SwLoadOptPage(pParent, rAttrSet ); } -BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool 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()) @@ -187,23 +187,23 @@ BOOL 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() ) { // Double-Cast for 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 bIsUseCharUnitFlag = aUseCharUnit.IsChecked(); @@ -212,7 +212,7 @@ BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) if( bIsUseCharUnitFlag != aUseCharUnit.GetSavedValue()) { rSet.Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bIsUseCharUnitFlag )); - bRet = TRUE; + bRet = sal_True; } sal_Bool bIsSquaredPageModeFlag = aUseSquaredPageMode.IsChecked(); @@ -225,7 +225,7 @@ BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) pDoc->SetDefaultPageMode( bIsSquaredPageModeFlag ); pWrtShell->SetModified(); } - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -233,18 +233,18 @@ BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet ) void 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(); @@ -269,7 +269,7 @@ void 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 ) { @@ -280,14 +280,14 @@ void 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); } @@ -300,9 +300,9 @@ void SwLoadOptPage::Reset( const SfxItemSet& rSet) aUseSquaredPageMode.SaveValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, sal_False, &pItem)) { - BOOL bUseCharUnit = ((const SfxBoolItem*)pItem)->GetValue(); + sal_Bool bUseCharUnit = ((const SfxBoolItem*)pItem)->GetValue(); aUseCharUnit.Check(bUseCharUnit); } else @@ -317,12 +317,12 @@ void 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) { // Double-Cast for 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; @@ -426,7 +426,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 ); @@ -436,11 +436,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(); @@ -449,19 +449,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 ); @@ -519,9 +519,9 @@ SfxTabPage* SwCaptionOptPage::Create( Window* pParent, return new SwCaptionOptPage(pParent, rAttrSet ); } -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()); // apply current entry @@ -535,7 +535,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(); @@ -547,7 +547,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); } @@ -556,7 +556,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); @@ -593,7 +593,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(); @@ -610,7 +610,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet) ModifyHdl(); } -void SwCaptionOptPage::SetOptions(const USHORT nPos, +void SwCaptionOptPage::SetOptions(const sal_uInt16 nPos, const SwCapObjType eObjType, const SvGlobalName *pOleId) { SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); @@ -643,7 +643,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 ); @@ -676,9 +676,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 && @@ -703,7 +703,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: @@ -714,9 +714,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; @@ -744,7 +744,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() ); @@ -778,7 +778,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); @@ -788,11 +788,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()); @@ -848,7 +848,7 @@ void SwCaptionOptPage::DrawSample() //#i61007# order of captions bool bOrderNumberingFirst = aLbCaptionOrder.GetSelectEntryPos() == 1; // number - USHORT nNumFmt = (USHORT)(ULONG)aFormatBox.GetEntryData( + sal_uInt16 nNumFmt = (sal_uInt16)(sal_uLong)aFormatBox.GetEntryData( aFormatBox.GetSelectEntryPos() ); if( SVX_NUM_NUMBER_NONE != nNumFmt ) { @@ -868,13 +868,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/optload.src b/sw/source/ui/config/optload.src index a20d578f47..aa8b311db0 100644 --- a/sw/source/ui/config/optload.src +++ b/sw/source/ui/config/optload.src @@ -53,6 +53,7 @@ TabPage TP_OPTLOAD_PAGE }; RadioButton RB_ALWAYS { + HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_ALWAYS"; Pos = MAP_APPFONT ( 18 , 26 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; TabStop = TRUE ; @@ -60,6 +61,7 @@ TabPage TP_OPTLOAD_PAGE }; RadioButton RB_REQUEST { + HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_REQUEST"; Pos = MAP_APPFONT ( 18 , 39 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; TabStop = TRUE ; @@ -67,6 +69,7 @@ TabPage TP_OPTLOAD_PAGE }; RadioButton RB_NEVER { + HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_NEVER"; Pos = MAP_APPFONT ( 18 , 52 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; TabStop = TRUE ; @@ -80,12 +83,14 @@ TabPage TP_OPTLOAD_PAGE }; CheckBox CB_AUTO_UPDATE_FIELDS { + HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_AUTO_UPDATE_FIELDS"; Pos = MAP_APPFONT ( 136 , 26) ; Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "~Fields"; }; CheckBox CB_AUTO_UPDATE_CHARTS { + HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_AUTO_UPDATE_CHARTS"; Pos = MAP_APPFONT ( 136 , 39) ; Size = MAP_APPFONT ( 109 , 10 ) ; Text [ en-US ] = "~Charts"; @@ -104,6 +109,7 @@ TabPage TP_OPTLOAD_PAGE }; ListBox LB_METRIC { + HelpID = "sw:ListBox:TP_OPTLOAD_PAGE:LB_METRIC"; Pos = MAP_APPFONT ( 130, 77 ) ; Size = MAP_APPFONT ( 50 , 50 ) ; Border = TRUE ; @@ -118,6 +124,7 @@ TabPage TP_OPTLOAD_PAGE }; MetricField MF_TAB { + HelpID = "sw:MetricField:TP_OPTLOAD_PAGE:MF_TAB"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 93 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; @@ -134,6 +141,7 @@ TabPage TP_OPTLOAD_PAGE }; CheckBox CB_USE_SQUARE_PAGE_MODE { + HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_USE_SQUARE_PAGE_MODE"; Pos = MAP_APPFONT ( 12 , 111) ; Size = MAP_APPFONT ( 248 , 10 ) ; Text [ en-US ] = "Use square page mode for text grid"; @@ -182,6 +190,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox LB_ORDER { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_ORDER"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 141 ) ; Size = MAP_APPFONT ( 106 , 60 ) ; @@ -231,6 +240,7 @@ TabPage TP_OPTCAPTION_PAGE }; ComboBox BOX_CATEGORY { + HelpID = "sw:ComboBox:TP_OPTCAPTION_PAGE:BOX_CATEGORY"; Pos = MAP_APPFONT ( 189 , 14 ) ; Size = MAP_APPFONT ( 59 , 61 ) ; DropDown = TRUE ; @@ -246,6 +256,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox BOX_FORMAT { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:BOX_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 29 ) ; Size = MAP_APPFONT ( 59 , 61 ) ; @@ -261,6 +272,7 @@ TabPage TP_OPTCAPTION_PAGE }; Edit ED_NUM_SEP { + HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:ED_NUM_SEP"; Pos = MAP_APPFONT ( 189 , 44 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -277,6 +289,7 @@ TabPage TP_OPTCAPTION_PAGE }; Edit EDT_TEXT { + HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:EDT_TEXT"; Pos = MAP_APPFONT ( 189 , 59 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -292,6 +305,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox BOX_POS { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:BOX_POS"; Pos = MAP_APPFONT ( 189 , 74 ) ; Size = MAP_APPFONT ( 59 , 61 ) ; DropDown = TRUE ; @@ -313,6 +327,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox LB_LEVEL { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 100 ) ; Size = MAP_APPFONT ( 59 , 60 ) ; @@ -331,6 +346,7 @@ TabPage TP_OPTCAPTION_PAGE }; Edit ED_SEPARATOR { + HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:ED_SEPARATOR"; Pos = MAP_APPFONT ( 189 , 115 ) ; Size = MAP_APPFONT ( 59 , 12 ) ; Border = TRUE ; @@ -351,6 +367,7 @@ TabPage TP_OPTCAPTION_PAGE }; ListBox LB_CHARSTYLE { + HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_CHARSTYLE"; Border = TRUE ; Pos = MAP_APPFONT ( 189 , 141 ) ; Size = MAP_APPFONT ( 59 , 60 ) ; @@ -363,6 +380,7 @@ TabPage TP_OPTCAPTION_PAGE }; CheckBox CB_APPLYBORDER { + HelpID = "sw:CheckBox:TP_OPTCAPTION_PAGE:CB_APPLYBORDER"; Pos = MAP_APPFONT ( 125 , 158 ) ; Size = MAP_APPFONT ( 124 , 10 ) ; Text [ en-US ] = "Apply border and shadow" ; diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 2568a64299..4602efe874 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -28,29 +28,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #ifdef SW_DLLIMPLEMENTATION #undef SW_DLLIMPLEMENTATION #endif - -#include <hintids.hxx> -#include <cmdid.h> -#include <vcl/svapp.hxx> #ifndef _SVSTDARR_HXX #define _SVSTDARR_STRINGSDTOR #include <svl/svstdarr.hxx> #endif -#include <svl/cjkoptions.hxx> -#include <svtools/ctrltool.hxx> -#include <svl/eitem.hxx> -#include <svx/htmlmode.hxx> -#include <sfx2/printer.hxx> -#include <sfx2/bindings.hxx> -#include <svx/xtable.hxx> -#include <editeng/fhgtitem.hxx> -#include <editeng/fontitem.hxx> -#include <editeng/langitem.hxx> -#include <svx/dlgutil.hxx> + +#include <optpage.hxx> +#include <doc.hxx> +#include <hintids.hxx> +#include <cmdid.h> #include <fmtcol.hxx> #include <charatr.hxx> #include <swtypes.hxx> @@ -64,8 +55,7 @@ #include <poolfmt.hxx> #include <uiitems.hxx> #include <initui.hxx> -#include <optpage.hxx> -#include <swprtopt.hxx> +#include <printdata.hxx> #include <modcfg.hxx> #include <srcview.hxx> #include <crstate.hxx> @@ -74,13 +64,26 @@ #include <config.hrc> #include <redlopt.hrc> #include <optdlg.hrc> -#include <svx/strarray.hxx> -#include <svl/slstitm.hxx> -#include <sfx2/request.hxx> #include <swwrtshitem.hxx> +#include <unomid.h> + +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/langitem.hxx> +#include <sfx2/request.hxx> +#include <sfx2/printer.hxx> +#include <sfx2/bindings.hxx> +#include <svl/slstitm.hxx> #include <svl/ctloptions.hxx> +#include <svl/eitem.hxx> +#include <svl/cjkoptions.hxx> +#include <svtools/ctrltool.hxx> +#include <svx/htmlmode.hxx> +#include <svx/xtable.hxx> +#include <svx/dlgutil.hxx> +#include <svx/strarray.hxx> +#include <vcl/svapp.hxx> -#include <unomid.h> using namespace ::com::sun::star; @@ -116,7 +119,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(); @@ -136,7 +139,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 ); @@ -156,7 +159,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, // there isn't 'line' unit in HTML format if ( eFUnit != FUNIT_LINE ) { - USHORT nPos = aMetricLB.InsertEntry( sMetric ); + sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric ); aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit ); aHMetric.InsertEntry( sMetric ); aHMetric.SetEntryData( nPos, (void*)(long)eFUnit ); @@ -164,7 +167,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, // a vertical ruler has not the 'character' unit if ( eFUnit != FUNIT_CHAR ) { - USHORT nPos = aVMetric.InsertEntry( sMetric ); + sal_uInt16 nPos = aVMetric.InsertEntry( sMetric ); aVMetric.SetEntryData( nPos, (void*)(long)eFUnit ); } } @@ -183,13 +186,13 @@ SfxTabPage* SwContentOptPage::Create( Window* pParent, return new SwContentOptPage(pParent, rAttrSet); } -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 ) { @@ -205,7 +208,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) { @@ -232,7 +235,7 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet) AnyRulerHdl(&aAnyRulerCB); } -BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet) +sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) { const SwElemItem* pOldAttr = (const SwElemItem*) GetOldItem(GetItemSet(), FN_PARAM_ELEM); @@ -257,34 +260,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() ) { // Double-Cast for 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 ) { // Double-Cast for 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 ) { // Double-Cast for 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; } @@ -297,7 +300,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); @@ -325,19 +328,19 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent, aProspectCB (this, SW_RES(CB_PROSPECT)), aProspectCB_RTL (this, SW_RES(CB_PROSPECT_RTL)), aSeparatorRFL (this, SW_RES(FL_SEP_PRT_RIGHT)), + aFL3 (this, SW_RES(FL_3)), aNoRB (this, SW_RES(RB_NO)), aOnlyRB (this, SW_RES(RB_ONLY)), aEndRB (this, SW_RES(RB_END)), aEndPageRB (this, SW_RES(RB_PAGEEND)), - aFL3 (this, SW_RES(FL_3)), aFL4 (this, SW_RES(FL_4)), aPrintEmptyPagesCB(this, SW_RES(CB_PRINTEMPTYPAGES)), aPaperFromSetupCB(this, SW_RES(CB_PAPERFROMSETUP)), 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(); @@ -361,7 +364,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) { aLeftPageCB .Hide(); @@ -391,7 +394,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent, aProspectCB_RTL.Show(aCTLOptions.IsCTLFontEnabled()); } -void SwAddPrinterTabPage::SetPreview(BOOL bPrev) +void SwAddPrinterTabPage::SetPreview(sal_Bool bPrev) { bPreview = bPrev; @@ -415,13 +418,13 @@ SfxTabPage* SwAddPrinterTabPage::Create( Window* pParent, return ( new SwAddPrinterTabPage( pParent, rAttrSet ) ); } -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(); @@ -431,12 +434,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; @@ -459,7 +462,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 ); @@ -483,14 +486,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 ); } void SwAddPrinterTabPage::Init() @@ -500,10 +503,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 ); @@ -516,14 +519,14 @@ 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); } IMPL_LINK_INLINE_START( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG ) { - bAttrModified=TRUE; + bAttrModified=sal_True; return 0; } IMPL_LINK_INLINE_END( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG ) @@ -590,20 +593,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), @@ -646,28 +649,20 @@ SfxTabPage* SwStdFontTabPage::Create( Window* pParent, return new SwStdFontTabPage(pParent, rAttrSet); } -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; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(rStyle): 0; - if(!pFnt) - { - pFnt = new SfxFont(FAMILY_DONTKNOW, rStyle); - bDelete = TRUE; - } + Font aFont( rStyle, Size( 0, 10 ) ); + if( pPrt ) + aFont = pPrt->GetFontMetric( aFont ); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType); - pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); - if(bDelete) - { - delete (SfxFont*) pFnt; - } + pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } -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 ); @@ -675,9 +670,9 @@ void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType, pColl->SetFmtAttr(SvxFontHeightItem(nHeight, 100, nFontHeightWhich)); } -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(); @@ -733,32 +728,23 @@ 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; - const SfxFont* pFnt = pPrinter ? pPrinter->GetFontByName(sStandard): 0; - if(!pFnt) - { - pFnt = new SfxFont(FAMILY_DONTKNOW, sStandard); - bDelete = TRUE; - } - pWrtShell->SetDefault(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); + Font aFont( sStandard, Size( 0, 10 ) ); + if( pPrinter ) + aFont = pPrinter->GetFontMetric( aFont ); + pWrtShell->SetDefault(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); pColl->ResetFmtAttr(nFontWhich); - if(bDelete) - { - delete (SfxFont*) pFnt; - bDelete = FALSE; - } - bMod = TRUE; + bMod = sal_True; } if(bStandardHeightChanged) { @@ -766,69 +752,69 @@ 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; } 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()); @@ -842,7 +828,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(); } @@ -853,29 +839,38 @@ 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) + // get the set of disctinct available family names + std::set< String > aFontNames; + int nFontNames = pPrt->GetDevFontCount(); + for( int i = 0; i < nFontNames; i++ ) { - const String &rString = pPrt->GetFont(i)->GetName(); - aStandardBox.InsertEntry( rString ); - aTitleBox .InsertEntry( rString ); - aListBox .InsertEntry( rString ); - aLabelBox .InsertEntry( rString ); - aIdxBox .InsertEntry( rString ); + FontInfo aInf( pPrt->GetDevFont( i ) ); + aFontNames.insert( aInf.GetName() ); + } + + // insert to listboxes + for( std::set< String >::const_iterator it = aFontNames.begin(); + it != aFontNames.end(); ++it ) + { + aStandardBox.InsertEntry( *it ); + aTitleBox .InsertEntry( *it ); + aListBox .InsertEntry( *it ); + aLabelBox .InsertEntry( *it ); + aIdxBox .InsertEntry( *it ); } } - 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(); } @@ -913,7 +908,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 { @@ -922,7 +917,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); @@ -936,37 +931,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 ); @@ -1052,15 +1047,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; } @@ -1079,15 +1074,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; } @@ -1166,7 +1161,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(); @@ -1186,22 +1181,22 @@ SfxTabPage* SwTableOptionsTabPage::Create( Window* pParent, return new SwTableOptionsTabPage(pParent, rAttrSet ); } -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()) @@ -1218,7 +1213,7 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) if(pWrtShell && nsSelectionType::SEL_TBL & pWrtShell->GetSelectionType()) { pWrtShell->SetTblChgMode(eMode); - static USHORT const aInva[] = + static sal_uInt16 aInva[] = { FN_TABLE_MODE_FIX, FN_TABLE_MODE_FIX_PROP, FN_TABLE_MODE_VARIABLE, @@ -1227,7 +1222,7 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& ) pWrtShell->GetView().GetViewFrame()->GetBindings().Invalidate( aInva ); } - bRet = TRUE; + bRet = sal_True; } SwInsertTableOptions aInsOpts( 0, 0 ); @@ -1255,19 +1250,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; @@ -1298,7 +1293,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); } @@ -1311,7 +1306,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); @@ -1373,24 +1368,26 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent, aFillTabRB( this, SW_RES( RB_SHDWCRSFILLTAB )), aFillSpaceRB( this, SW_RES( RB_SHDWCRSFILLSPACE )), aCrsrOptFL ( this, SW_RES( FL_CRSR_OPT)), - aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT )) + aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT )), + m_aLayoutOptionsFL( this, SW_RES( FL_LAYOUT_OPTIONS ) ), + m_aMathBaselineAlignmentCB( this, SW_RES( CB_MATH_BASELINE_ALIGNMENT ) ), + m_pWrtShell( NULL ) { FreeResource(); const SfxPoolItem* pItem = 0; - SwShadowCursorItem aOpt; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) + SwShadowCursorItem aOpt; + 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(); @@ -1425,12 +1422,21 @@ SfxTabPage* SwShdwCrsrOptionsTabPage::Create( Window* pParent, const SfxItemSet& return new SwShdwCrsrOptionsTabPage( pParent, rSet ); } -BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) + +void SwShdwCrsrOptionsTabPage::PageCreated( SfxAllItemSet aSet ) +{ + SFX_ITEMSET_ARG (&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL,sal_False); + if (pWrtSh) + SetWrtShell(pWrtSh->GetValue()); +} + + +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() ) @@ -1441,19 +1447,23 @@ 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, + m_aMathBaselineAlignmentCB.IsChecked() ); + bRet |= m_aMathBaselineAlignmentCB.IsChecked() != m_aMathBaselineAlignmentCB.GetSavedValue(); + 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*) @@ -1483,26 +1493,28 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet ) void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem = 0; - SwShadowCursorItem aOpt; - if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )) + SwShadowCursorItem aOpt; + 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( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem )) + 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, 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) { @@ -1523,8 +1535,8 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet ) --------------------------------------------------*/ struct CharAttr { - USHORT nItemId; - USHORT nAttr; + sal_uInt16 nItemId; + sal_uInt16 nAttr; }; // Edit corresponds to Paste-attributes @@ -1544,15 +1556,15 @@ static CharAttr 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 }; /*----------------------------------------------------------------------- Description: Preview of selection @@ -1573,18 +1585,18 @@ SwMarkPreview::SwMarkPreview( Window *pParent, const ResId& rResID ) : // Page 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; @@ -1602,7 +1614,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 ); @@ -1671,9 +1683,9 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect) DrawRect(rRect, m_aTransCol, m_aPrintAreaCol ); // draw Testparagraph - 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)); @@ -1682,13 +1694,13 @@ 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; // simulate text - 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())); @@ -1712,9 +1724,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); @@ -1766,7 +1778,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); @@ -1793,6 +1805,13 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent, aLk = LINK(this, SwRedlineOptionsTabPage, ChangedMaskPrevHdl); aMarkPosLB.SetSelectHdl( aLk ); aMarkColorLB.SetSelectHdl( aLk ); +//IAccessibility2 Impplementaton 2009----- + //solution: set different accessible name of four color box + aInsertColorLB.SetAccessibleName(::rtl::OUString( aInsertFT.GetDisplayText()) + ::rtl::OUString(aInsertColorFT.GetDisplayText())); + aDeletedColorLB.SetAccessibleName(::rtl::OUString( aDeletedFT.GetDisplayText()) + ::rtl::OUString( aDeletedColorFT.GetDisplayText())); + aChangedColorLB.SetAccessibleName(::rtl::OUString( aChangedFT.GetDisplayText()) + ::rtl::OUString( aChangedColorFT.GetDisplayText())); + aMarkColorLB.SetAccessibleName(::rtl::OUString( aMarkPosFT.GetDisplayText()) + ::rtl::OUString( aMarkColorFT.GetDisplayText())); +//-----IAccessibility2 Impplementaton 2009 } SwRedlineOptionsTabPage::~SwRedlineOptionsTabPage() @@ -1804,7 +1823,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(); @@ -1818,9 +1837,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); @@ -1928,7 +1947,7 @@ BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& ) } } - return FALSE; + return sal_False; } void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) @@ -1946,10 +1965,10 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) // initialise colour list box 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); @@ -1960,7 +1979,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 ); @@ -1972,10 +1991,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; @@ -2026,13 +2045,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; @@ -2089,7 +2108,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 ) { @@ -2184,7 +2203,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; @@ -2306,7 +2325,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)); @@ -2353,7 +2372,7 @@ SfxTabPage* SwTestTabPage::Create( Window* pParent, return ( new SwTestTabPage( pParent, rAttrSet ) ); } -BOOL SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet ) { if ( bAttrModified ) @@ -2379,7 +2398,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); @@ -2413,7 +2432,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 a29ea83833..1ee9e7e853 100644 --- a/sw/source/ui/config/prtopt.cxx +++ b/sw/source/ui/config/prtopt.cxx @@ -29,16 +29,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" - #include <unotools/configmgr.hxx> #include <prtopt.hxx> -#include <swprtopt.hxx> #include <osl/diagnose.h> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <unomid.h> + using namespace utl; using rtl::OUString; using namespace com::sun::star::uno; @@ -154,7 +153,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/redlopt.src b/sw/source/ui/config/redlopt.src index 2d5da19772..35211f60a7 100644 --- a/sw/source/ui/config/redlopt.src +++ b/sw/source/ui/config/redlopt.src @@ -65,6 +65,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_INS_ATTR { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_INS_ATTR"; Pos = MAP_APPFONT ( 90 , 25 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -92,6 +93,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_INS_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_INS_COL"; Pos = MAP_APPFONT ( 90 , 40 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -118,6 +120,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_DEL_ATTR { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_DEL_ATTR"; Pos = MAP_APPFONT ( 90 , 67 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -131,6 +134,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_DEL_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_DEL_COL"; Pos = MAP_APPFONT ( 90 , 82 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -157,6 +161,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_CHG_ATTR { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_CHG_ATTR"; Pos = MAP_APPFONT ( 90 , 111 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -170,6 +175,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_CHG_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_CHG_COL"; Pos = MAP_APPFONT ( 90 , 126 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -196,6 +202,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_MARKPOS { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_MARKPOS"; Pos = MAP_APPFONT ( 90 , 155 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -217,6 +224,7 @@ TabPage TP_REDLINE_OPT }; ListBox LB_LC_COL { + HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_LC_COL"; Pos = MAP_APPFONT ( 90 , 170 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx index d9dc302cdb..ae96f2ae6f 100644 --- a/sw/source/ui/config/uinums.cxx +++ b/sw/source/ui/config/uinums.cxx @@ -51,11 +51,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" @@ -77,7 +77,7 @@ SwBaseNumRules::SwBaseNumRules( const String& rFileName ) : sFileName( rFileName ), nVersion(0), - bModified( FALSE ) + bModified( sal_False ) { Init(); } @@ -93,29 +93,29 @@ 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]; } 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() ); } } -void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx) +void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx) { OSL_ENSURE(nIdx < nMaxRules, "Array der NumRules ueberindiziert."); if( !pNumRules[nIdx] ) @@ -125,22 +125,22 @@ void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx) } // PROTECTED METHODS ---------------------------------------------------- -BOOL SwBaseNumRules::Store(SvStream &rStream) +sal_Bool SwBaseNumRules::Store(SvStream &rStream) { rStream << ACT_NUM_VERSION; // Write, what positions are occupied by a rule // Then write each of the 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; } int SwBaseNumRules::Load(SvStream &rStream) @@ -158,8 +158,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) @@ -183,9 +183,9 @@ SwChapterNumRules::SwChapterNumRules() : { } -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); } @@ -193,7 +193,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 ) @@ -234,13 +234,13 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName return *this; } -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; @@ -262,9 +262,9 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const { // #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; @@ -278,7 +278,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 ) @@ -305,7 +305,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() ) @@ -324,19 +324,19 @@ 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() ); } 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; - BOOL bFlag; + sal_Bool bFlag; String sStr; rStream >> nUS; aFmt.SetNumberingType((sal_Int16)nUS ); @@ -354,7 +354,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 ); @@ -380,11 +380,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); @@ -409,14 +409,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() ); @@ -425,7 +425,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(); @@ -435,7 +435,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, { SvxBrushItem* pBrush = 0; SwFmtVertOrient* pVOrient = 0; - USHORT nVer; + sal_uInt16 nVer; if( cF & 1 ) { @@ -467,32 +467,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 @@ -504,10 +504,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 ); OSL_ENSURE( nIVers != USHRT_MAX, "Was'n das: Item-Version USHRT_MAX in der aktuellen Version" ); rStream << pItem->Which() @@ -519,21 +519,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 ); } @@ -547,8 +547,8 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh, if( sCharFmtName.Len() ) { // at first, look for the name - 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 )) @@ -562,13 +562,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() ) // set attributes - 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 921a845204..7c1eec9e89 100644 --- a/sw/source/ui/config/usrpref.cxx +++ b/sw/source/ui/config/usrpref.cxx @@ -59,7 +59,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), @@ -114,13 +114,13 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames() "NonprintingCharacter/Space", // 9 "NonprintingCharacter/Break", // 10 "NonprintingCharacter/ProtectedSpace", // 11 - "NonprintingCharacter/Tab", // 12 //not in Writer/Web - "NonprintingCharacter/HiddenText", // 13 - "NonprintingCharacter/HiddenParagraph", // 14 - "NonprintingCharacter/HiddenCharacter", // 15 - "Update/Link", // 16 - "Update/Field", // 17 - "Update/Chart" // 18 + "NonprintingCharacter/Tab", // 12 //not in Writer/Web + "NonprintingCharacter/HiddenText", // 13 + "NonprintingCharacter/HiddenParagraph", // 14 + "NonprintingCharacter/HiddenCharacter", // 15 + "Update/Link", // 16 + "Update/Field", // 17 + "Update/Chart" // 18 }; @@ -134,7 +134,7 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames() return aNames; } -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) @@ -161,7 +161,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", @@ -225,11 +225,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" } } } @@ -240,28 +240,30 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() { static const char* aPropNames[] = { - "Line/Guide", // 0 - "Line/SimpleControlPoint", // 1 - "Line/LargeControlPoint", // 2 - "Window/HorizontalScroll", // 3 - "Window/VerticalScroll", // 4 - "Window/ShowRulers", // 5 - "Window/HorizontalRuler", // 6 - "Window/VerticalRuler", // 7 - "Window/HorizontalRulerUnit", // 8 - "Window/VerticalRulerUnit", // 9 - "Window/SmoothScroll", //10 - "Zoom/Value", //11 - "Zoom/Type", //12 - "Other/MeasureUnit", //13 - "Other/TabStop", //14 - "Window/IsVerticalRulerRight", //15 - "ViewLayout/Columns", //16 - "ViewLayout/BookMode", //17 - "Other/IsSquaredPageMode", //18 - "Other/ApplyCharUnit" //19 + "Line/Guide", // 0 + "Line/SimpleControlPoint", // 1 + "Line/LargeControlPoint", // 2 + "Window/HorizontalScroll", // 3 + "Window/VerticalScroll", // 4 + "Window/ShowRulers", // 5 + "Window/HorizontalRuler", // 6 + "Window/VerticalRuler", // 7 + "Window/HorizontalRulerUnit", // 8 + "Window/VerticalRulerUnit", // 9 + "Window/SmoothScroll", //10 + "Zoom/Value", //11 + "Zoom/Type", //12 + "Other/IsAlignMathObjectsToBaseline", //13 + "Other/MeasureUnit", //14 + // below properties are not available in WriterWeb + "Other/TabStop", //15 + "Window/IsVerticalRulerRight", //16 + "ViewLayout/Columns", //17 + "ViewLayout/BookMode", //18 + "Other/IsSquaredPageMode" //19 + "Other/ApplyCharUnit" //20 }; - const int nCount = bWeb ? 14 : 20; + const int nCount = bWeb ? 15 : 21; Sequence<OUString> aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) @@ -271,7 +273,7 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() return aNames; } -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), @@ -292,40 +294,39 @@ void SwLayoutViewConfig::Commit() for(int nProp = 0; nProp < aNames.getLength(); nProp++) { - sal_Bool bSet; + Any &rVal = pValues[nProp]; switch(nProp) { - case 0: bSet = rParent.IsCrossHair(); break;// "Line/Guide", - case 1: bSet = rParent.IsSolidMarkHdl(); break;// "Line/SimpleControlPoint", - case 2: bSet = rParent.IsBigMarkHdl(); break;// "Line/LargeControlPoint", - case 3: bSet = rParent.IsViewHScrollBar(); break;// "Window/HorizontalScroll", - case 4: bSet = rParent.IsViewVScrollBar(); break;// "Window/VerticalScroll", - case 5: bSet = rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" - // #i14593# use IsView*Ruler(TRUE) instead of IsView*Ruler() + case 0: rVal <<= (sal_Bool) rParent.IsCrossHair(); break; // "Line/Guide", + case 1: rVal <<= (sal_Bool) rParent.IsSolidMarkHdl(); break; // "Line/SimpleControlPoint", + case 2: rVal <<= (sal_Bool) rParent.IsBigMarkHdl(); break; // "Line/LargeControlPoint", + 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(sal_True) instead of IsView*Ruler() // this preserves the single ruler states even if "Window/ShowRulers" is off - case 6: bSet = rParent.IsViewHRuler(TRUE); break;// "Window/HorizontalRuler", - case 7: bSet = 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) - pValues[nProp] <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" + rVal <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" break; case 9: if(rParent.bIsVScrollMetricSet) - pValues[nProp] <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" + rVal <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" break; - case 10: bSet = rParent.IsSmoothScroll(); break;// "Window/SmoothScroll", - case 11: pValues[nProp] <<= (sal_Int32)rParent.GetZoom(); break;// "Zoom/Value", - case 12: pValues[nProp] <<= (sal_Int32)rParent.GetZoomType(); break;// "Zoom/Type", - case 13: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break;// "Other/MeasureUnit", - case 14: pValues[nProp] <<= static_cast<sal_Int32>(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", - case 15: bSet = rParent.IsVRulerRight(); break;// "Window/IsVerticalRulerRight", - case 16: pValues[nProp] <<= (sal_Int32)rParent.GetViewLayoutColumns(); break;// "ViewLayout/Columns", - case 17: bSet = rParent.IsViewLayoutBookMode(); break;// "ViewLayout/BookMode", - case 18: bSet = rParent.IsSquaredPageMode(); break;// "Other/IsSquaredPageMode", - case 19: bSet = rParent.IsApplyCharUnit(); break;// "Other/ApplyCharUnit", + case 10: rVal <<= (sal_Bool) rParent.IsSmoothScroll(); break; // "Window/SmoothScroll", + case 11: rVal <<= (sal_Int32)rParent.GetZoom(); break; // "Zoom/Value", + case 12: rVal <<= (sal_Int32)rParent.GetZoomType(); break; // "Zoom/Type", + case 13: rVal <<= (sal_Bool) rParent.IsAlignMathObjectsToBaseline(); break; // "Other/IsAlignMathObjectsToBaseline" + case 14: rVal <<= (sal_Int32)rParent.GetMetric(); break; // "Other/MeasureUnit", + case 15: rVal <<= static_cast<sal_Int32>(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", + case 16: rVal <<= (sal_Bool) rParent.IsVRulerRight(); break; // "Window/IsVerticalRulerRight", + case 17: rVal <<= (sal_Int32)rParent.GetViewLayoutColumns(); break; // "ViewLayout/Columns", + case 18: rVal <<= (sal_Bool) rParent.IsViewLayoutBookMode(); break; // "ViewLayout/BookMode", + case 19: rVal <<= (sal_Bool) rParent.IsSquaredPageMode(); break; // "Other/IsSquaredPageMode", + case 20: rVal <<= (sal_Bool) rParent.IsApplyCharUnit(); break; // "Other/IsSquaredPageMode", } - if(nProp < 8 || nProp == 10 || nProp == 15 || nProp == 17 || nProp == 18 || nProp == 19 ) - pValues[nProp].setValue(&bSet, ::getBooleanCppuType()); } PutProperties(aNames, aValues); } @@ -342,7 +343,11 @@ void SwLayoutViewConfig::Load() { if(pValues[nProp].hasValue()) { - sal_Bool bSet = nProp < 8 || nProp == 10 || nProp == 17 || nProp == 18 || nProp == 19 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False; + sal_Int32 nInt32Val = 0; + sal_Bool bSet = sal_False; + pValues[nProp] >>= nInt32Val; + pValues[nProp] >>= bSet; + switch(nProp) { case 0: rParent.SetCrossHair(bSet); break;// "Line/Guide", @@ -356,59 +361,26 @@ void SwLayoutViewConfig::Load() case 8: { rParent.bIsHScrollMetricSet = sal_True; - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.eHScrollMetric = ((FieldUnit)nUnit); // "Window/HorizontalRulerUnit" + rParent.eHScrollMetric = ((FieldUnit)nInt32Val); // "Window/HorizontalRulerUnit" } break; case 9: { rParent.bIsVScrollMetricSet = sal_True; - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.eVScrollMetric = ((FieldUnit)nUnit); // "Window/VerticalRulerUnit" + rParent.eVScrollMetric = ((FieldUnit)nInt32Val); // "Window/VerticalRulerUnit" } break; case 10: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll", - case 11: - { - sal_Int32 nVal = 0; - pValues[nProp] >>= nVal; - rParent.SetZoom( static_cast< USHORT >(nVal) ); - } - break;// "Zoom/Value", - case 12: - { - sal_Int32 nVal = 0; - pValues[nProp] >>= nVal; - rParent.SetZoomType( static_cast< SvxZoomType >(nVal) ); - } - break;// "Zoom/Type", - case 13: - { - sal_Int32 nUnit = 0; - pValues[nProp] >>= nUnit; - rParent.SetMetric((FieldUnit)nUnit, TRUE); - } - break;// "Other/MeasureUnit", - case 14: - { - sal_Int32 nTab = 0; - pValues[nProp] >>= nTab; - rParent.SetDefTab(MM100_TO_TWIP(nTab), TRUE); - } - break;// "Other/TabStop", - case 15: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", - case 16: - { - sal_Int32 nColumns = 0; - pValues[nProp] >>= nColumns; - rParent.SetViewLayoutColumns( static_cast<USHORT>(nColumns) ); - } - break;// "ViewLayout/Columns", - case 17: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", - case 18: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode", - case 19: rParent.SetApplyCharUnit(bSet); break;// "Other/ApplyUserChar" + 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, 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<sal_uInt16>(nInt32Val) ); break;// "ViewLayout/Columns", + case 18: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", + case 19: rParent.SetDefaultPageMode(bSet,sal_True); break;// "Other/IsSquaredPageMode", + case 20: rParent.SetApplyCharUnit(bSet); break;// "Other/ApplyUserChar" } } } @@ -439,7 +411,7 @@ Sequence<OUString> SwGridConfig::GetPropertyNames() return aNames; } -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), @@ -583,7 +555,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 a0db43d368..2f36dc8618 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -53,7 +53,7 @@ #include <editeng/acorrcfg.hxx> #if OSL_DEBUG_LEVEL > 1 -BOOL SwViewOption::bTest9 = FALSE; //DrawingLayerNotLoading +sal_Bool SwViewOption::bTest9 = sal_False; //DrawingLayerNotLoading #endif Color SwViewOption::aDocBoundColor(COL_LIGHTGRAY); Color SwViewOption::aObjectBoundColor(COL_LIGHTGRAY); @@ -75,7 +75,7 @@ Color SwViewOption::aScriptIndicatorColor(COL_GREEN); Color SwViewOption::aShadowColor(COL_GRAY); sal_Int32 SwViewOption::nAppearanceFlags = VIEWOPT_DOC_BOUNDARIES|VIEWOPT_OBJECT_BOUNDARIES; -USHORT SwViewOption::nPixelTwips = 0; // one pixel on the screen +sal_uInt16 SwViewOption::nPixelTwips = 0; // one pixel on the screen #define LINEBREAK_SIZE 12, 8 @@ -88,7 +88,7 @@ USHORT SwViewOption::nPixelTwips = 0; // one pixel on the screen static const char aPostItStr[] = " "; -BOOL SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const +sal_Bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const { return nCoreOptions == rOpt.nCoreOptions && nCore2Options == rOpt.nCore2Options @@ -145,10 +145,10 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut, pOut->SetLineColor( aOldColor ); } -USHORT SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const +sal_uInt16 SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const { OSL_ENSURE( pOut, "no Outdev" ); - return USHORT(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr ))); + return sal_uInt16(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr ))); } void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, sal_Bool bIsScript ) const @@ -158,7 +158,7 @@ void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, sal_Bo Color aOldLineColor( pOut->GetLineColor() ); pOut->SetLineColor( Color(COL_GRAY ) ); // to make it look nice, we subtract two pixels everywhere - 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 ); @@ -176,14 +176,14 @@ 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), // #114856# Formular view - bFormView(FALSE), - bBookview(FALSE), - mbViewLayoutBookMode(FALSE), + bFormView(sal_False), + bBookview(sal_False), + mbViewLayoutBookMode(sal_False), bShowPlaceHolderFields( sal_True ), nZoom( 100 ), eZoom( SVX_ZOOM_PERCENT ), @@ -213,14 +213,14 @@ SwViewOption::SwViewOption() : #if OSL_DEBUG_LEVEL > 1 // correspond to the statements 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; // #114856# Formular view bFormView = rVOpt.bFormView; nZoom = rVOpt.nZoom ; @@ -308,11 +308,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.bAutoCmpltCollectWords; @@ -325,9 +325,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; @@ -512,7 +512,7 @@ void SwViewOption::ApplyColorConfigValues(const svtools::ColorConfig& rConfig ) aScriptIndicatorColor.SetColor(rConfig.GetColorValue(svtools::WRITERSCRIPTINDICATOR).nColor); } -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; @@ -554,7 +554,7 @@ void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInCon } } -BOOL SwViewOption::IsAppearanceFlag(sal_Int32 nFlag) +sal_Bool SwViewOption::IsAppearanceFlag(sal_Int32 nFlag) { return 0 != (nAppearanceFlags & nFlag); } |