diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-03-09 16:20:50 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-03-09 16:20:50 -0600 |
commit | ab1deb45e8bdfcb406ed40cc279412bfb8ebb7da (patch) | |
tree | 4fabc6cfb877b36a045647e22ab9afb895a0c6e2 /cui/source/tabpages | |
parent | 8d39bcae009afc1022974a6b0efdbbdb5b057ad4 (diff) | |
parent | e887a292fa3a7662fea0fc682d41f55e9e170a33 (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
* commit 'ooo/DEV300_m101': (185 commits)
masterfix DEV300: #i10000# usage of L10N build_type
masterfix: #i10000# INT16 -> sal_Int16
fixed compile errors after resync to m100, part2
gridsort: post-rebase fixes
CWS gnumake3: found another tools integer type
removetooltypes01: Fix build problems after rebase to DEV300m99 in basctl, cui, reportdesign, sw
native359: #i114398# changing mac langpack icon
native359: #i115669# fixing package description for solaris packages
gnumake3: remove comphelper version; fix including extract.hxx
locales34: #i106785# add Haitian_Haiti [ht-HT] to language list and locale data; locale data contributed by <jcpoulard>
sb138: #i116659# timely termination of OnLogRotateThread
accfixes: removed include of obsolete header file
accfixes: removed obsolete file
removetooltypes01: #i112600# Fix build problems on non-pro
accfixes: moved some shared strings to svx part2
accfixes: moved some shared strings to svx
accfixes: added more accessibility information and fixed tab orders in multiple dialogs (cui module)
removetooltypes01: #i112600# Remove tools types for Mac specific parts
fixed tab order in BasicIDE, Library dialog tab page
added some accessible names in BasicIDE
...
Conflicts:
UnoControls/source/base/registercontrols.cxx
accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx
automation/inc/automation/communi.hxx
automation/inc/automation/simplecm.hxx
automation/source/communi/communi.cxx
automation/source/inc/rcontrol.hxx
automation/source/miniapp/servuid.hxx
automation/source/server/XMLParser.cxx
automation/source/server/cmdbasestream.cxx
automation/source/server/profiler.hxx
automation/source/server/recorder.cxx
automation/source/server/retstrm.hxx
automation/source/server/server.cxx
automation/source/server/sta_list.cxx
automation/source/server/statemnt.cxx
automation/source/server/statemnt.hxx
automation/source/simplecm/packethandler.cxx
automation/source/simplecm/simplecm.cxx
automation/source/simplecm/tcpio.cxx
automation/source/simplecm/tcpio.hxx
automation/source/testtool/comm_bas.hxx
automation/source/testtool/cretstrm.hxx
automation/source/testtool/httprequest.cxx
automation/source/testtool/httprequest.hxx
automation/source/testtool/objtest.cxx
automation/source/testtool/objtest.hxx
basctl/source/basicide/baside2.cxx
basctl/source/basicide/baside2.hxx
basctl/source/basicide/baside2b.cxx
basctl/source/basicide/baside3.cxx
basctl/source/basicide/basides1.cxx
basctl/source/basicide/basides2.cxx
basctl/source/basicide/basidesh.cxx
basctl/source/basicide/basidesh.src
basctl/source/basicide/basobj3.cxx
basctl/source/basicide/bastype2.cxx
basctl/source/basicide/bastype3.cxx
basctl/source/basicide/bastypes.cxx
basctl/source/basicide/brkdlg.cxx
basctl/source/basicide/iderdll.cxx
basctl/source/basicide/macrodlg.cxx
basctl/source/basicide/moduldl2.cxx
basctl/source/basicide/moduldlg.cxx
basctl/source/basicide/objdlg.cxx
basctl/source/basicide/scriptdocument.cxx
basctl/source/basicide/tbxctl.cxx
basctl/source/basicide/tbxctl.hxx
basctl/source/basicide/tbxctl.src
basctl/source/dlged/dlged.cxx
basctl/source/dlged/dlgedfunc.cxx
basctl/source/dlged/dlgedobj.cxx
basctl/source/inc/basidesh.hxx
basctl/source/inc/bastypes.hxx
basctl/source/inc/dlgedmod.hxx
basctl/source/inc/dlgedpage.hxx
crashrep/prj/build.lst
cui/inc/pch/precompiled_cui.hxx
cui/source/customize/acccfg.cxx
cui/source/customize/acccfg.hrc
cui/source/customize/acccfg.src
cui/source/customize/cfg.cxx
cui/source/customize/cfgutil.cxx
cui/source/customize/macropg.cxx
cui/source/customize/macropg.src
cui/source/customize/selector.cxx
cui/source/dialogs/SpellDialog.cxx
cui/source/dialogs/commonlingui.cxx
cui/source/dialogs/cuicharmap.cxx
cui/source/dialogs/cuifmsearch.cxx
cui/source/dialogs/cuigaldlg.cxx
cui/source/dialogs/cuigrfflt.cxx
cui/source/dialogs/hldocntp.cxx
cui/source/dialogs/hldoctp.cxx
cui/source/dialogs/hlinettp.cxx
cui/source/dialogs/hlmailtp.cxx
cui/source/dialogs/hlmarkwn.cxx
cui/source/dialogs/hlmarkwn.src
cui/source/dialogs/hltpbase.cxx
cui/source/dialogs/iconcdlg.cxx
cui/source/dialogs/passwdomdlg.cxx
cui/source/dialogs/pastedlg.cxx
cui/source/dialogs/scriptdlg.cxx
cui/source/dialogs/thesdlg.cxx
cui/source/dialogs/zoom.cxx
cui/source/factory/dlgfact.hxx
cui/source/inc/SpellDialog.hxx
cui/source/inc/autocdlg.hxx
cui/source/inc/backgrnd.hxx
cui/source/inc/bbdlg.hxx
cui/source/inc/cfg.hxx
cui/source/inc/cfgutil.hxx
cui/source/inc/cuigaldlg.hxx
cui/source/inc/cuigrfflt.hxx
cui/source/inc/cuitabarea.hxx
cui/source/inc/cuitabline.hxx
cui/source/inc/hldocntp.hxx
cui/source/inc/hltpbase.hxx
cui/source/inc/iconcdlg.hxx
cui/source/inc/numpages.hxx
cui/source/inc/page.hxx
cui/source/inc/postdlg.hxx
cui/source/inc/scriptdlg.hxx
cui/source/inc/transfrm.hxx
cui/source/inc/zoom.hxx
cui/source/options/cfgchart.cxx
cui/source/options/cuisrchdlg.cxx
cui/source/options/dbregister.cxx
cui/source/options/dbregister.src
cui/source/options/fontsubs.cxx
cui/source/options/internationaloptions.cxx
cui/source/options/optasian.cxx
cui/source/options/optchart.cxx
cui/source/options/optcolor.cxx
cui/source/options/optcolor.src
cui/source/options/optfltr.cxx
cui/source/options/optfltr.src
cui/source/options/optgdlg.cxx
cui/source/options/optgdlg.src
cui/source/options/optgenrl.cxx
cui/source/options/opthtml.cxx
cui/source/options/optimprove.cxx
cui/source/options/optinet2.cxx
cui/source/options/optinet2.hxx
cui/source/options/optjava.cxx
cui/source/options/optlingu.cxx
cui/source/options/optsave.cxx
cui/source/options/optsave.hxx
cui/source/options/treeopt.cxx
cui/source/options/webconninfo.cxx
cui/source/tabpages/autocdlg.cxx
cui/source/tabpages/backgrnd.cxx
cui/source/tabpages/border.cxx
cui/source/tabpages/chardlg.cxx
cui/source/tabpages/dstribut.cxx
cui/source/tabpages/grfpage.cxx
cui/source/tabpages/macroass.cxx
cui/source/tabpages/measure.cxx
cui/source/tabpages/numfmt.cxx
cui/source/tabpages/numpages.cxx
cui/source/tabpages/page.cxx
cui/source/tabpages/paragrph.cxx
cui/source/tabpages/swpossizetabpage.cxx
cui/source/tabpages/tabarea.src
cui/source/tabpages/textanim.cxx
cui/source/tabpages/textattr.cxx
cui/source/tabpages/tparea.cxx
cui/source/tabpages/tpbitmap.cxx
cui/source/tabpages/tpcolor.cxx
cui/source/tabpages/tpgradnt.cxx
cui/source/tabpages/tphatch.cxx
cui/source/tabpages/tpline.cxx
cui/source/tabpages/tplnedef.cxx
cui/source/tabpages/tplneend.cxx
cui/source/tabpages/tpshadow.cxx
cui/source/tabpages/transfrm.cxx
embedserv/source/embed/register.cxx
extensions/inc/pch/precompiled_extensions.hxx
extensions/inc/propctrlr.hrc
extensions/source/abpilot/abpservices.cxx
extensions/source/bibliography/bibload.cxx
extensions/source/bibliography/datman.cxx
extensions/source/bibliography/general.cxx
extensions/source/dbpilots/dbpservices.cxx
extensions/source/inc/componentmodule.cxx
extensions/source/nsplugin/source/so_env.cxx
extensions/source/ole/oleobjw.cxx
extensions/source/ole/oleobjw.hxx
extensions/source/oooimprovement/invite_job.cxx
extensions/source/oooimprovement/onlogrotate_job.cxx
extensions/source/plugin/base/service.cxx
extensions/source/plugin/inc/plugin/unx/mediator.hxx
extensions/source/plugin/inc/plugin/unx/plugcon.hxx
extensions/source/plugin/unx/mediator.cxx
extensions/source/plugin/unx/nppapi.cxx
extensions/source/plugin/unx/plugcon.cxx
extensions/source/preload/services.cxx
extensions/source/propctrlr/formmetadata.cxx
extensions/source/propctrlr/pcrservices.cxx
extensions/source/resource/resource.cxx
extensions/source/scanner/sane.hxx
extensions/source/scanner/sanedlg.cxx
extensions/source/scanner/scanunx.cxx
extensions/source/scanner/scanwin.cxx
extensions/source/scanner/twain.cxx
extensions/source/scanner/twain.hxx
extensions/source/update/check/updatecheckconfig.cxx
extensions/test/stm/datatest.cxx
extensions/test/stm/marktest.cxx
extensions/test/stm/pipetest.cxx
extensions/test/stm/testfactreg.cxx
extensions/workben/testpgp.cxx
forms/qa/complex/forms/CheckOGroupBoxModel.java
forms/qa/makefile.mk
forms/source/component/Button.cxx
forms/source/component/Button.hxx
forms/source/component/ListBox.cxx
forms/source/inc/forms_module_impl.hxx
forms/source/misc/services.cxx
forms/source/solar/control/navtoolbar.cxx
javainstaller2/prj/build.lst
javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java
lingucomponent/prj/build.lst
lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
lingucomponent/source/spellcheck/spell/sreg.cxx
lingucomponent/source/spellcheck/spell/sspellimp.cxx
package/source/manifest/ManifestExport.cxx
package/source/manifest/UnoRegister.cxx
package/source/xstor/owriteablestream.cxx
package/source/xstor/owriteablestream.hxx
package/source/xstor/xstorage.hxx
package/source/zippackage/ZipPackageFolder.cxx
package/source/zippackage/ZipPackageStream.cxx
setup_native/source/mac/ooo/DS_Store
setup_native/source/win32/customactions/shellextensions/registerextensions.cxx
xmlsecurity/prj/build.lst
xmlsecurity/source/component/registerservices.cxx
xmlsecurity/source/dialogs/stbcontrl.cxx
xmlsecurity/source/framework/xsec_framework.cxx
xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
xmlsecurity/tools/demo/util.hxx
xmlsecurity/workben/signaturetest.cxx
Diffstat (limited to 'cui/source/tabpages')
64 files changed, 3343 insertions, 2888 deletions
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 1dd8ad177..be1deaafa 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -58,7 +58,7 @@ namespace svx { // horizontal alignment ------------------------------------------------------- -typedef sfx::ValueItemWrapper< SvxHorJustifyItem, SvxCellHorJustify, USHORT > HorJustItemWrapper; +typedef sfx::ValueItemWrapper< SvxHorJustifyItem, SvxCellHorJustify, sal_uInt16 > HorJustItemWrapper; typedef sfx::ListBoxConnection< HorJustItemWrapper > HorJustConnection; static const HorJustConnection::MapEntryType s_pHorJustMap[] = @@ -75,7 +75,7 @@ static const HorJustConnection::MapEntryType s_pHorJustMap[] = // vertical alignment --------------------------------------------------------- -typedef sfx::ValueItemWrapper< SvxVerJustifyItem, SvxCellVerJustify, USHORT > VerJustItemWrapper; +typedef sfx::ValueItemWrapper< SvxVerJustifyItem, SvxCellVerJustify, sal_uInt16 > VerJustItemWrapper; typedef sfx::ListBoxConnection< VerJustItemWrapper > VerJustConnection; static const VerJustConnection::MapEntryType s_pVerJustMap[] = @@ -91,7 +91,7 @@ static const VerJustConnection::MapEntryType s_pVerJustMap[] = // cell rotate mode ----------------------------------------------------------- -typedef sfx::ValueItemWrapper< SvxRotateModeItem, SvxRotateMode, USHORT > RotateModeItemWrapper; +typedef sfx::ValueItemWrapper< SvxRotateModeItem, SvxRotateMode, sal_uInt16 > RotateModeItemWrapper; typedef sfx::ValueSetConnection< RotateModeItemWrapper > RotateModeConnection; static const RotateModeConnection::MapEntryType s_pRotateModeMap[] = @@ -104,7 +104,7 @@ static const RotateModeConnection::MapEntryType s_pRotateModeMap[] = // ============================================================================ -static USHORT s_pRanges[] = +static sal_uInt16 s_pRanges[] = { SID_ATTR_ALIGN_HOR_JUSTIFY,SID_ATTR_ALIGN_VER_JUSTIFY, SID_ATTR_ALIGN_STACKED,SID_ATTR_ALIGN_LINEBREAK, @@ -241,6 +241,10 @@ AlignmentTabPage::AlignmentTabPage( Window* pParent, const SfxItemSet& rCoreAttr AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_SHRINKTOFIT, maBtnShrink, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_FRAMEDIRECTION, maFtFrameDir, sfx::ITEMCONN_HIDE_UNKNOWN ) ); AddItemConnection( new FrameDirListBoxConnection( SID_ATTR_FRAMEDIRECTION, maLbFrameDir, sfx::ITEMCONN_HIDE_UNKNOWN ) ); + + maLbHorAlign.SetAccessibleRelationMemberOf( &maFlAlignment ); + maEdIndent.SetAccessibleRelationMemberOf( &maFlAlignment ); + maLbVerAlign.SetAccessibleRelationMemberOf( &maFlAlignment ); } AlignmentTabPage::~AlignmentTabPage() @@ -252,7 +256,7 @@ SfxTabPage* AlignmentTabPage::Create( Window* pParent, const SfxItemSet& rAttrSe return new AlignmentTabPage( pParent, rAttrSet ); } -USHORT* AlignmentTabPage::GetRanges() +sal_uInt16* AlignmentTabPage::GetRanges() { return s_pRanges; } @@ -317,7 +321,7 @@ void AlignmentTabPage::DataChanged( const DataChangedEvent& rDCEvt ) void AlignmentTabPage::InitVsRefEgde() { // remember selection - is deleted in call to ValueSet::Clear() - USHORT nSel = maVsRefEdge.GetSelectItemId(); + sal_uInt16 nSel = maVsRefEdge.GetSelectItemId(); ResId aResId( IL_LOCK_BMPS, CUI_MGR() ); ImageList aImageList( aResId ); @@ -338,7 +342,7 @@ void AlignmentTabPage::InitVsRefEgde() void AlignmentTabPage::UpdateEnableControls() { - USHORT nHorAlign = maLbHorAlign.GetSelectEntryPos(); + sal_uInt16 nHorAlign = maLbHorAlign.GetSelectEntryPos(); bool bHorLeft = (nHorAlign == ALIGNDLG_HORALIGN_LEFT); bool bHorBlock = (nHorAlign == ALIGNDLG_HORALIGN_BLOCK); bool bHorFill = (nHorAlign == ALIGNDLG_HORALIGN_FILL); diff --git a/cui/source/tabpages/align.src b/cui/source/tabpages/align.src index 87f6593b5..f4e966f39 100644 --- a/cui/source/tabpages/align.src +++ b/cui/source/tabpages/align.src @@ -57,6 +57,7 @@ TabPage RID_SVXPAGE_ALIGNMENT }; ListBox LB_HORALIGN { + HelpID = "cui:ListBox:RID_SVXPAGE_ALIGNMENT:LB_HORALIGN"; Border = TRUE; Pos = MAP_APPFONT ( 12 , 25 ); Size = MAP_APPFONT ( 100 , 60 ); @@ -81,6 +82,7 @@ TabPage RID_SVXPAGE_ALIGNMENT }; MetricField ED_INDENT { + HelpID = "cui:MetricField:RID_SVXPAGE_ALIGNMENT:ED_INDENT"; Border = TRUE ; Pos = MAP_APPFONT ( 118 , 25 ) ; Size = MAP_APPFONT ( 36 , 12 ) ; @@ -99,6 +101,7 @@ TabPage RID_SVXPAGE_ALIGNMENT }; ListBox LB_VERALIGN { + HelpID = "cui:ListBox:RID_SVXPAGE_ALIGNMENT:LB_VERALIGN"; Border = TRUE; Pos = MAP_APPFONT ( 160 , 25 ); Size = MAP_APPFONT ( 88 , 60 ); @@ -122,6 +125,7 @@ TabPage RID_SVXPAGE_ALIGNMENT }; TriStateBox BTN_TXTSTACKED { + HelpID = "cui:TriStateBox:RID_SVXPAGE_ALIGNMENT:BTN_TXTSTACKED"; Pos = MAP_APPFONT ( 133 , 54 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; TabStop = TRUE ; @@ -142,6 +146,7 @@ TabPage RID_SVXPAGE_ALIGNMENT }; NumericField NF_DEGREES { + HelpID = "cui:NumericField:RID_SVXPAGE_ALIGNMENT:NF_DEGREES"; Border = TRUE ; Pos = MAP_APPFONT ( 72 , 65 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -168,6 +173,7 @@ TabPage RID_SVXPAGE_ALIGNMENT }; TriStateBox BTN_ASIAN_VERTICAL { + HelpID = "cui:TriStateBox:RID_SVXPAGE_ALIGNMENT:BTN_ASIAN_VERTICAL"; Pos = MAP_APPFONT ( 143 , 68 ) ; Size = MAP_APPFONT ( 105 , 10 ) ; TabStop = TRUE ; @@ -181,18 +187,21 @@ TabPage RID_SVXPAGE_ALIGNMENT }; TriStateBox BTN_WRAP { + HelpID = "cui:TriStateBox:RID_SVXPAGE_ALIGNMENT:BTN_WRAP"; Pos = MAP_APPFONT ( 12 , 126 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~Wrap text automatically" ; }; TriStateBox BTN_HYPH { + HelpID = "cui:TriStateBox:RID_SVXPAGE_ALIGNMENT:BTN_HYPH"; Pos = MAP_APPFONT ( 22 , 139 ) ; Size = MAP_APPFONT ( 226 , 10 ) ; Text [ en-US ] = "Hyphenation ~active"; }; TriStateBox BTN_SHRINK { + HelpID = "cui:TriStateBox:RID_SVXPAGE_ALIGNMENT:BTN_SHRINK"; Pos = MAP_APPFONT( 12, 152 ); Size = MAP_APPFONT( 236, 10 ); Text [ en-US ] = "~Shrink to fit cell size"; @@ -205,6 +214,7 @@ TabPage RID_SVXPAGE_ALIGNMENT }; ListBox LB_FRAMEDIR { + HelpID = "cui:ListBox:RID_SVXPAGE_ALIGNMENT:LB_FRAMEDIR"; Pos = MAP_APPFONT( 78 , 168 ); Size = MAP_APPFONT( 170 , 50 ); Border = TRUE; diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 2f61da761..886fc9457 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -84,18 +84,18 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) : aLanguageFT( this, CUI_RES(FT_LANG )), aLanguageLB( this, CUI_RES(LB_LANG )) { - BOOL bShowSWOptions = FALSE; - BOOL bOpenSmartTagOptions = FALSE; + sal_Bool bShowSWOptions = sal_False; + sal_Bool bOpenSmartTagOptions = sal_False; if ( _pSet ) { - SFX_ITEMSET_ARG( _pSet, pItem, SfxBoolItem, SID_AUTO_CORRECT_DLG, FALSE ); + SFX_ITEMSET_ARG( _pSet, pItem, SfxBoolItem, SID_AUTO_CORRECT_DLG, sal_False ); if ( pItem && pItem->GetValue() ) - bShowSWOptions = TRUE; + bShowSWOptions = sal_True; - SFX_ITEMSET_ARG( _pSet, pItem2, SfxBoolItem, SID_OPEN_SMARTTAGOPTIONS, FALSE ); + SFX_ITEMSET_ARG( _pSet, pItem2, SfxBoolItem, SID_OPEN_SMARTTAGOPTIONS, sal_False ); if ( pItem2 && pItem2->GetValue() ) - bOpenSmartTagOptions = TRUE; + bOpenSmartTagOptions = sal_True; } aLanguageFT.SetZOrder(0, WINDOW_ZORDER_FIRST); @@ -136,9 +136,9 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) : if( SvtLanguageOptions().IsCTLFontEnabled() ) nLangList |= LANG_LIST_CTL; - aLanguageLB.SetLanguageList( nLangList, TRUE, TRUE ); + aLanguageLB.SetLanguageList( nLangList, sal_True, sal_True ); aLanguageLB.SelectLanguage( LANGUAGE_NONE ); - USHORT nPos = aLanguageLB.GetSelectEntryPos(); + sal_uInt16 nPos = aLanguageLB.GetSelectEntryPos(); DBG_ASSERT( LISTBOX_ENTRY_NOTFOUND != nPos, "listbox entry missing" ); aLanguageLB.SetEntryData( nPos, (void*)(long) LANGUAGE_DONTKNOW ); @@ -163,34 +163,34 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) : SetCurPageId( RID_OFAPAGE_SMARTTAG_OPTIONS ); } -BOOL lcl_FindEntry( ListBox& rLB, const String& rEntry, +sal_Bool lcl_FindEntry( ListBox& rLB, const String& rEntry, CollatorWrapper& rCmpClass ) { - USHORT nCount = rLB.GetEntryCount(); - USHORT nSelPos = rLB.GetSelectEntryPos(); - USHORT i; + sal_uInt16 nCount = rLB.GetEntryCount(); + sal_uInt16 nSelPos = rLB.GetSelectEntryPos(); + sal_uInt16 i; for(i = 0; i < nCount; i++) { if( 0 == rCmpClass.compareString(rEntry, rLB.GetEntry(i) )) { - rLB.SelectEntryPos(i, TRUE); - return TRUE; + rLB.SelectEntryPos(i, sal_True); + return sal_True; } } if(LISTBOX_ENTRY_NOTFOUND != nSelPos) - rLB.SelectEntryPos(nSelPos, FALSE); - return FALSE; + rLB.SelectEntryPos(nSelPos, sal_False); + return sal_False; } IMPL_LINK(OfaAutoCorrDlg, SelectLanguageHdl, ListBox*, pBox) { - USHORT nPos = pBox->GetSelectEntryPos(); + sal_uInt16 nPos = pBox->GetSelectEntryPos(); void* pVoid = pBox->GetEntryData(nPos); LanguageType eNewLang = (LanguageType)(long)pVoid; //alte Einstellungen speichern und neu fuellen if(eNewLang != eLastDialogLanguage) { - USHORT nPageId = GetCurPageId(); + sal_uInt16 nPageId = GetCurPageId(); if(RID_OFAPAGE_AUTOCORR_REPLACE == nPageId) ((OfaAutocorrReplacePage*)GetTabPage( nPageId ))->SetLanguage(eNewLang); else if(RID_OFAPAGE_AUTOCORR_EXCEPT == nPageId) @@ -228,12 +228,12 @@ SfxTabPage* OfaAutocorrOptionsPage::Create( Window* pParent, return new OfaAutocorrOptionsPage(pParent, rSet); } -BOOL OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); long nFlags = pAutoCorrect->GetFlags(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; pAutoCorrect->SetAutoCorrFlag(Autocorrect, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(CptlSttWrd, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(CptlSttSntnc, aCheckLB.IsChecked(nPos++)); @@ -243,7 +243,7 @@ BOOL OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) pAutoCorrect->SetAutoCorrFlag(IgnoreDoubleSpace, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(CorrectCapsLock, aCheckLB.IsChecked(nPos++)); - BOOL bReturn = nFlags != pAutoCorrect->GetFlags(); + sal_Bool bReturn = nFlags != pAutoCorrect->GetFlags(); if(bReturn ) { SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get(); @@ -255,7 +255,7 @@ BOOL OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) void OfaAutocorrOptionsPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(FALSE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_False); } void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) @@ -263,7 +263,7 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); const long nFlags = pAutoCorrect->GetFlags(); - aCheckLB.SetUpdateMode(FALSE); + aCheckLB.SetUpdateMode(sal_False); aCheckLB.Clear(); aCheckLB.InsertEntry(sInput); @@ -275,7 +275,7 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) aCheckLB.InsertEntry(sNoDblSpaces); aCheckLB.InsertEntry(sAccidentalCaps); - USHORT nPos = 0; + sal_uInt16 nPos = 0; aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & Autocorrect) ); aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CptlSttWrd) ); aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CptlSttSntnc) ); @@ -285,7 +285,7 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & IgnoreDoubleSpace) ); aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CorrectCapsLock) ); - aCheckLB.SetUpdateMode(TRUE); + aCheckLB.SetUpdateMode(sal_True); } /*********************************************************************/ @@ -341,10 +341,10 @@ class OfaImpBrwString : public SvLBoxString { public: - OfaImpBrwString( SvLBoxEntry* pEntry, USHORT nFlags, + OfaImpBrwString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr){} - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); }; @@ -353,7 +353,7 @@ public: /*********************************************************************/ -void OfaImpBrwString::Paint( const Point& rPos, SvLBox& rDev, USHORT /*nFlags*/, +void OfaImpBrwString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /*nFlags*/, SvLBoxEntry* pEntry ) { rDev.DrawText( rPos, GetText() ); @@ -372,8 +372,8 @@ void OfaImpBrwString::Paint( const Point& rPos, SvLBox& rDev, USHORT /*nFlags*/, } aFont.SetWeight( WEIGHT_BOLD ); - BOOL bFett = TRUE; - USHORT nPos = 0; + sal_Bool bFett = sal_True; + sal_uInt16 nPos = 0; do { String sTxt( pUserData->pString->GetToken( 0, 1, nPos )); @@ -463,7 +463,7 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage( Window* pParent, SvtSysLocale aSysLcl; aCheckLB.SetHelpId(HID_OFAPAGE_AUTOFORMAT_CLB); - aCheckLB.SetWindowBits(WB_HSCROLL| WB_VSCROLL); + aCheckLB.SetStyle(aCheckLB.GetStyle()|WB_HSCROLL| WB_VSCROLL); aCheckLB.SetSelectHdl(LINK(this, OfaSwAutoFmtOptionsPage, SelectHdl)); aCheckLB.SetDoubleClickHdl(LINK(this, OfaSwAutoFmtOptionsPage, EditHdl)); @@ -488,7 +488,7 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage( Window* pParent, /* */ /*********************************************************************/ -SvLBoxEntry* OfaSwAutoFmtOptionsPage::CreateEntry(String& rTxt, USHORT nCol) +SvLBoxEntry* OfaSwAutoFmtOptionsPage::CreateEntry(String& rTxt, sal_uInt16 nCol) { SvLBoxEntry* pEntry = new SvLBoxEntry; @@ -542,14 +542,14 @@ SfxTabPage* OfaSwAutoFmtOptionsPage::Create( Window* pParent, /* */ /*********************************************************************/ -BOOL OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); long nFlags = pAutoCorrect->GetFlags(); - BOOL bCheck = aCheckLB.IsChecked(USE_REPLACE_TABLE, CBCOL_FIRST); + sal_Bool bCheck = aCheckLB.IsChecked(USE_REPLACE_TABLE, CBCOL_FIRST); bModified |= pOpt->bAutoCorrect != bCheck; pOpt->bAutoCorrect = bCheck; pAutoCorrect->SetAutoCorrFlag(Autocorrect, @@ -610,7 +610,7 @@ BOOL OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) bModified |= pOpt->bRightMargin != bCheck; pOpt->bRightMargin = bCheck; bModified |= nPercent != pOpt->nRightMargin; - pOpt->nRightMargin = (BYTE)nPercent; + pOpt->nRightMargin = (sal_uInt8)nPercent; bCheck = aCheckLB.IsChecked(APPLY_NUMBERING, CBCOL_SECOND); bModified |= pOpt->bSetNumRule != bCheck; @@ -655,12 +655,12 @@ BOOL OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) pCfg->Commit(); } - return TRUE; + return sal_True; } void OfaSwAutoFmtOptionsPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(FALSE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_False); } /*********************************************************************/ @@ -674,7 +674,7 @@ void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet& ) SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); const long nFlags = pAutoCorrect->GetFlags(); - aCheckLB.SetUpdateMode(FALSE); + aCheckLB.SetUpdateMode(sal_False); aCheckLB.Clear(); // Die folgenden Eintraege muessen in der selben Reihenfolge, wie im @@ -745,7 +745,7 @@ void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet& ) aCheckLB.CheckEntryPos( CREATE_TABLE, CBCOL_SECOND, pOpt->bCreateTable ); aCheckLB.CheckEntryPos( REPLACE_STYLES, CBCOL_SECOND, pOpt->bReplaceStyles ); - aCheckLB.SetUpdateMode(TRUE); + aCheckLB.SetUpdateMode(sal_True); } /*********************************************************************/ @@ -764,7 +764,7 @@ IMPL_LINK(OfaSwAutoFmtOptionsPage, SelectHdl, OfaACorrCheckListBox*, pBox) IMPL_LINK(OfaSwAutoFmtOptionsPage, EditHdl, PushButton*, EMPTYARG) { - ULONG nSelEntryPos = aCheckLB.GetSelectEntryPos(); + sal_uLong nSelEntryPos = aCheckLB.GetSelectEntryPos(); if( nSelEntryPos == REPLACE_BULLETS || nSelEntryPos == APPLY_NUMBERING) { @@ -790,7 +790,7 @@ IMPL_LINK(OfaSwAutoFmtOptionsPage, EditHdl, PushButton*, EMPTYARG) aDlg.GetPrcntFld().SetValue(nPercent); if(RET_OK == aDlg.Execute()) { - nPercent = (USHORT)aDlg.GetPrcntFld().GetValue(); + nPercent = (sal_uInt16)aDlg.GetPrcntFld().GetValue(); sMargin = ' '; sMargin += String::CreateFromInt32( nPercent ); sMargin += '%'; @@ -807,7 +807,7 @@ IMPL_LINK(OfaSwAutoFmtOptionsPage, EditHdl, PushButton*, EMPTYARG) void OfaACorrCheckListBox::SetTabs() { SvxSimpleTable::SetTabs(); - USHORT nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; + sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; if( aTabs.Count() > 1 ) { @@ -827,7 +827,7 @@ void OfaACorrCheckListBox::SetTabs() /* */ /*********************************************************************/ -void OfaACorrCheckListBox::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked) +void OfaACorrCheckListBox::CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked) { if ( nPos < GetEntryCount() ) SetCheckButtonState( @@ -841,7 +841,7 @@ void OfaACorrCheckListBox::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked) /* */ /*********************************************************************/ -BOOL OfaACorrCheckListBox::IsChecked(ULONG nPos, USHORT nCol) +sal_Bool OfaACorrCheckListBox::IsChecked(sal_uLong nPos, sal_uInt16 nCol) { return GetCheckButtonState( GetEntry(nPos), nCol ) == SV_BUTTON_CHECKED; } @@ -850,7 +850,7 @@ BOOL OfaACorrCheckListBox::IsChecked(ULONG nPos, USHORT nCol) /* */ /*********************************************************************/ -void OfaACorrCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol, SvButtonState eState) +void OfaACorrCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, sal_uInt16 nCol, SvButtonState eState) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -879,7 +879,7 @@ void OfaACorrCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol /* */ /*********************************************************************/ -SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol ) const +SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const { SvButtonState eState = SV_BUTTON_UNCHECKED; SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -887,7 +887,7 @@ SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, US if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) { - USHORT nButtonFlags = pItem->GetButtonFlags(); + sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); } @@ -904,8 +904,8 @@ void OfaACorrCheckListBox::KeyInput( const KeyEvent& rKEvt ) if(!rKEvt.GetKeyCode().GetModifier() && KEY_SPACE == rKEvt.GetKeyCode().GetCode()) { - ULONG nSelPos = GetSelectEntryPos(); - USHORT nCol = GetCurrentTabPos() - 1; + sal_uLong nSelPos = GetSelectEntryPos(); + sal_uInt16 nCol = GetCurrentTabPos() - 1; if ( nCol < 2 ) { CheckEntryPos( nSelPos, nCol, !IsChecked( nSelPos, nCol ) ); @@ -913,7 +913,7 @@ void OfaACorrCheckListBox::KeyInput( const KeyEvent& rKEvt ) } else { - USHORT nCheck = IsChecked(nSelPos, 1) ? 1 : 0; + sal_uInt16 nCheck = IsChecked(nSelPos, 1) ? 1 : 0; if(IsChecked(nSelPos, 0)) nCheck += 2; nCheck--; @@ -963,10 +963,10 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( Window* pParent, sNew(aNewReplacePB.GetText()), pFormatText(0), eLang(eLastDialogLanguage), - bHasSelectionText(FALSE), - bFirstSelect(TRUE), - bReplaceEditChanged(FALSE), - bSWriter(TRUE) + bHasSelectionText(sal_False), + bFirstSelect(sal_True), + bReplaceEditChanged(sal_False), + bSWriter(sal_True) { FreeResource(); SfxModule *pMod = *(SfxModule**)GetAppData(SHL_WRITER); @@ -980,7 +980,7 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( Window* pParent, static long nTabs[] = { 2 /* Tab-Count */, 1, 61 }; aReplaceTLB.SetTabs( &nTabs[0], MAP_APPFONT ); - aReplaceTLB.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN); + aReplaceTLB.SetStyle(aReplaceTLB.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN); aReplaceTLB.SetSelectHdl(LINK(this, OfaAutocorrReplacePage, SelectHdl)); aNewReplacePB.SetClickHdl( LINK(this, OfaAutocorrReplacePage, NewDelHdl)); aDeleteReplacePB.SetClickHdl(LINK(this, OfaAutocorrReplacePage, NewDelHdl)); @@ -989,8 +989,8 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( Window* pParent, aShortED.SetActionHdl(LINK(this, OfaAutocorrReplacePage, NewDelHdl)); aReplaceED.SetActionHdl(LINK(this, OfaAutocorrReplacePage, NewDelHdl)); - aReplaceED.SetSpaces(TRUE); - aShortED.SetSpaces(TRUE); + aReplaceED.SetSpaces(sal_True); + aShortED.SetSpaces(sal_True); aShortED.SetMaxTextLen(30); } @@ -1012,7 +1012,7 @@ void OfaAutocorrReplacePage::ActivatePage( const SfxItemSet& ) { if(eLang != eLastDialogLanguage) SetLanguage(eLastDialogLanguage); - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(TRUE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_True); } int OfaAutocorrReplacePage::DeactivatePage( SfxItemSet* ) @@ -1020,7 +1020,7 @@ int OfaAutocorrReplacePage::DeactivatePage( SfxItemSet* ) return LEAVE_PAGE; } -BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) +sal_Bool OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); DoubleStringArrayPtr pDoubleStringArray = aDoubleStringTable.Last(); @@ -1030,19 +1030,19 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) if(eCurLang != eLang) // die aktuelle Sprache wird weiter hinten behandelt { SvxAutocorrWordList* pWordList = pAutoCorrect->LoadAutocorrWordList(eCurLang); - USHORT nWordListCount = pWordList->Count(); - USHORT nDoubleStringArrayCount = pDoubleStringArray->Count(); - USHORT nPos = nDoubleStringArrayCount; - USHORT nLastPos = nPos; + sal_uInt16 nWordListCount = pWordList->Count(); + sal_uInt16 nDoubleStringArrayCount = pDoubleStringArray->Count(); + sal_uInt16 nPos = nDoubleStringArrayCount; + sal_uInt16 nLastPos = nPos; // 1. Durchlauf: Eintraege loeschen oder veraendern: - for( USHORT nWordListPos = nWordListCount; nWordListPos; nWordListPos-- ) + for( sal_uInt16 nWordListPos = nWordListCount; nWordListPos; nWordListPos-- ) { SvxAutocorrWordPtr pWordPtr = pWordList->GetObject(nWordListPos - 1); String sEntry(pWordPtr->GetShort()); // formatierter Text steht nur im Writer - BOOL bFound = !bSWriter && !pWordPtr->IsTextOnly(); + sal_Bool bFound = !bSWriter && !pWordPtr->IsTextOnly(); while(!bFound && nPos) { DoubleString* pDouble = pDoubleStringArray->GetObject( nPos - 1); @@ -1051,7 +1051,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) sEntry, pDouble->sShort )) { nLastPos = nPos - 1; - bFound = TRUE; + bFound = sal_True; if( !(pWordPtr->IsTextOnly() == (0 == pDouble->pUserData) && 0 == pCompareClass->compareString( pWordPtr->GetLong(), pDouble->sLong ) ) ) @@ -1070,7 +1070,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) } } nDoubleStringArrayCount = pDoubleStringArray->Count(); - for(USHORT nDoubleStringArrayPos = 0; nDoubleStringArrayPos < nDoubleStringArrayCount; nDoubleStringArrayPos++ ) + for(sal_uInt16 nDoubleStringArrayPos = 0; nDoubleStringArrayPos < nDoubleStringArrayCount; nDoubleStringArrayPos++ ) { //jetzt sollte es nur noch neue Eintraege geben DoubleString* pDouble = pDoubleStringArray->GetObject( nDoubleStringArrayPos ); @@ -1091,21 +1091,21 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) aDoubleStringTable.Clear(); // jetzt noch die aktuelle Selektion SvxAutocorrWordList* pWordList = pAutoCorrect->LoadAutocorrWordList(eLang); - USHORT nWordListCount = pWordList->Count(); - USHORT nListBoxCount = (USHORT)aReplaceTLB.GetEntryCount(); + sal_uInt16 nWordListCount = pWordList->Count(); + sal_uInt16 nListBoxCount = (sal_uInt16)aReplaceTLB.GetEntryCount(); - aReplaceTLB.SetUpdateMode(FALSE); - USHORT nListBoxPos = nListBoxCount; - USHORT nLastListBoxPos = nListBoxPos; + aReplaceTLB.SetUpdateMode(sal_False); + sal_uInt16 nListBoxPos = nListBoxCount; + sal_uInt16 nLastListBoxPos = nListBoxPos; // 1. Durchlauf: Eintraege loeschen oder veraendern: - USHORT i; + sal_uInt16 i; for( i = nWordListCount; i; i-- ) { SvxAutocorrWordPtr pWordPtr = pWordList->GetObject(i- 1); String sEntry(pWordPtr->GetShort()); // formatierter Text steht nur im Writer - BOOL bFound = !bSWriter && !pWordPtr->IsTextOnly(); + sal_Bool bFound = !bSWriter && !pWordPtr->IsTextOnly(); while(!bFound && nListBoxPos) { SvLBoxEntry* pEntry = aReplaceTLB.GetEntry( nListBoxPos - 1); @@ -1113,7 +1113,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) aReplaceTLB.GetEntryText(pEntry, 0))) { nLastListBoxPos = nListBoxPos - 1; - bFound = TRUE; + bFound = sal_True; String sLong = aReplaceTLB.GetEntryText(pEntry, 1); if( !(pWordPtr->IsTextOnly() == (0 == pEntry->GetUserData()) && 0 == pCompareClass->compareString( @@ -1134,7 +1134,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) } } - nListBoxCount = (USHORT)aReplaceTLB.GetEntryCount(); + nListBoxCount = (sal_uInt16)aReplaceTLB.GetEntryCount(); for(i = 0; i < nListBoxCount; i++ ) { //jetzt sollte es nur noch neue Eintraege geben @@ -1149,10 +1149,10 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) } } - return FALSE; + return sal_False; } -void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, +void OfaAutocorrReplacePage::RefillReplaceBox(sal_Bool bFromReset, LanguageType eOldLanguage, LanguageType eNewLanguage) { @@ -1164,17 +1164,17 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, DoubleStringArray* pArray = 0; if(aDoubleStringTable.IsKeyValid(eOldLanguage)) { - pArray = aDoubleStringTable.Seek(ULONG(eOldLanguage)); + pArray = aDoubleStringTable.Seek(sal_uLong(eOldLanguage)); pArray->DeleteAndDestroy(0, pArray->Count()); } else { pArray = new DoubleStringArray; - aDoubleStringTable.Insert(ULONG(eOldLanguage), pArray); + aDoubleStringTable.Insert(sal_uLong(eOldLanguage), pArray); } - USHORT nListBoxCount = (USHORT)aReplaceTLB.GetEntryCount(); - USHORT i; + sal_uInt16 nListBoxCount = (sal_uInt16)aReplaceTLB.GetEntryCount(); + sal_uInt16 i; for(i = 0; i < nListBoxCount; i++) { DoubleString* pDouble = new DoubleString(); @@ -1197,11 +1197,11 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, if(aDoubleStringTable.IsKeyValid(eLang)) { - DoubleStringArray* pArray = aDoubleStringTable.Seek(ULONG(eNewLanguage)); - for(USHORT i = 0; i < pArray->Count(); i++) + DoubleStringArray* pArray = aDoubleStringTable.Seek(sal_uLong(eNewLanguage)); + for(sal_uInt16 i = 0; i < pArray->Count(); i++) { DoubleString* pDouble = pArray->GetObject(i); - BOOL bTextOnly = 0 == pDouble->pUserData; + sal_Bool bTextOnly = 0 == pDouble->pUserData; // formatierter Text wird nur im Writer angeboten if(bSWriter || bTextOnly) { @@ -1224,10 +1224,10 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SvxAutocorrWordList* pWordList = pAutoCorrect->LoadAutocorrWordList(eLang); - for(USHORT i = 0; i < pWordList->Count(); i++) + for(sal_uInt16 i = 0; i < pWordList->Count(); i++) { SvxAutocorrWordPtr pWordPtr = pWordList->GetObject(i); - BOOL bTextOnly = pWordPtr->IsTextOnly(); + sal_Bool bTextOnly = pWordPtr->IsTextOnly(); // formatierter Text wird nur im Writer angeboten if(bSWriter || bTextOnly) { @@ -1244,27 +1244,27 @@ void OfaAutocorrReplacePage::RefillReplaceBox(BOOL bFromReset, pFormatText->Insert(new String(pWordPtr->GetShort())); } } - aNewReplacePB.Enable(FALSE); - aDeleteReplacePB.Enable(FALSE); + aNewReplacePB.Enable(sal_False); + aDeleteReplacePB.Enable(sal_False); } SfxViewShell* pViewShell = SfxViewShell::Current(); - if( pViewShell && pViewShell->HasSelection( TRUE ) ) + if( pViewShell && pViewShell->HasSelection( sal_True ) ) { - bHasSelectionText = TRUE; + bHasSelectionText = sal_True; const String sSelection( pViewShell->GetSelectionText() ); aReplaceED.SetText( sSelection ); aTextOnlyCB.Check( !bSWriter ); aTextOnlyCB.Enable( bSWriter && sSelection.Len() ); } else - aTextOnlyCB.Enable( FALSE ); + aTextOnlyCB.Enable( sal_False ); } void OfaAutocorrReplacePage::Reset( const SfxItemSet& ) { - RefillReplaceBox(TRUE, eLang, eLang); + RefillReplaceBox(sal_True, eLang, eLang); aShortED.GrabFocus(); } @@ -1273,7 +1273,7 @@ void OfaAutocorrReplacePage::SetLanguage(LanguageType eSet) //save old settings an refill if(eSet != eLang) { - RefillReplaceBox(FALSE, eLang, eSet); + RefillReplaceBox(sal_False, eLang, eSet); eLastDialogLanguage = eSet; delete pCompareClass; delete pCharClass; @@ -1294,7 +1294,7 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, SvTabListBox*, pBox) String sTmpShort(pBox->GetEntryText(pEntry, 0)); // wird der Text ueber den ModifyHdl gesetzt, dann steht der Cursor sonst immer am Wortanfang, // obwohl man gerade hier editiert - BOOL bSameContent = 0 == pCompareClass->compareString( + sal_Bool bSameContent = 0 == pCompareClass->compareString( sTmpShort, aShortED.GetText() ); Selection aSel = aShortED.GetSelection(); if(aShortED.GetText() != sTmpShort) @@ -1309,9 +1309,9 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, SvTabListBox*, pBox) aTextOnlyCB.Check(0 == pEntry->GetUserData()); } else - bFirstSelect = FALSE; + bFirstSelect = sal_False; - aNewReplacePB.Enable(FALSE); + aNewReplacePB.Enable(sal_False); aDeleteReplacePB.Enable(); return 0; }; @@ -1336,18 +1336,18 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn) if(sEntry.Len() && ( aReplaceED.GetText().Len() || ( bHasSelectionText && bSWriter ) )) { - aReplaceTLB.SetUpdateMode(FALSE); - USHORT nPos = USHRT_MAX; + aReplaceTLB.SetUpdateMode(sal_False); + sal_uInt16 nPos = USHRT_MAX; sEntry += '\t'; sEntry += aReplaceED.GetText(); if(_pNewEntry) { - nPos = (USHORT)aReplaceTLB.GetModel()->GetAbsPos(_pNewEntry); + nPos = (sal_uInt16)aReplaceTLB.GetModel()->GetAbsPos(_pNewEntry); aReplaceTLB.GetModel()->Remove(_pNewEntry); } else { - USHORT j; + sal_uInt16 j; for( j = 0; j < aReplaceTLB.GetEntryCount(); j++ ) { SvLBoxEntry* pReplaceEntry = aReplaceTLB.GetEntry(j); @@ -1365,7 +1365,7 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn) pInsEntry->SetUserData(&bHasSelectionText); // neuer formatierter Text aReplaceTLB.MakeVisible( pInsEntry ); - aReplaceTLB.SetUpdateMode(TRUE); + aReplaceTLB.SetUpdateMode(sal_True); // falls der Request aus dem ReplaceEdit kam, dann Focus in das ShortEdit setzen if(aReplaceED.HasFocus()) aShortED.GrabFocus(); @@ -1385,7 +1385,7 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn) IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) { SvLBoxEntry* pFirstSel = aReplaceTLB.FirstSelected(); - BOOL bShort = pEdt == &aShortED; + sal_Bool bShort = pEdt == &aShortED; const String rEntry = pEdt->GetText(); const String rRepString = aReplaceED.GetText(); String aWordStr( pCharClass->lower( rEntry )); @@ -1394,21 +1394,21 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) { if(rEntry.Len()) { - BOOL bFound = FALSE; - BOOL bTmpSelEntry=FALSE; + sal_Bool bFound = sal_False; + sal_Bool bTmpSelEntry=sal_False; - for(USHORT i = 0; i < aReplaceTLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < aReplaceTLB.GetEntryCount(); i++) { SvLBoxEntry* pEntry = aReplaceTLB.GetEntry( i ); String aTestStr=aReplaceTLB.GetEntryText(pEntry, 0); if( 0 == pCompareClass->compareString(rEntry, aTestStr )) { if(rRepString.Len()) - bFirstSelect = TRUE; + bFirstSelect = sal_True; aReplaceTLB.SetCurEntry(pEntry); pFirstSel = pEntry; aNewReplacePB.SetText(sModify); - bFound= TRUE; + bFound= sal_True; break; } else @@ -1417,17 +1417,17 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) if(aTestStr.Search(aWordStr)==0 && !bTmpSelEntry) { aReplaceTLB.MakeVisible(pEntry); - bTmpSelEntry=TRUE; + bTmpSelEntry=sal_True; } } } if(!bFound) { - aReplaceTLB.SelectAll(FALSE); + aReplaceTLB.SelectAll(sal_False); pFirstSel = 0; aNewReplacePB.SetText(sNew); if(bReplaceEditChanged) - aTextOnlyCB.Enable(FALSE); + aTextOnlyCB.Enable(sal_False); } aDeleteReplacePB.Enable(bFound); } @@ -1440,7 +1440,7 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) } else if(!bShort) { - bReplaceEditChanged = TRUE; + bReplaceEditChanged = sal_True; if(pFirstSel) { aNewReplacePB.SetText(sModify); @@ -1448,17 +1448,17 @@ IMPL_LINK(OfaAutocorrReplacePage, ModifyHdl, Edit*, pEdt) } const String& rShortTxt = aShortED.GetText(); - BOOL bEnableNew = rShortTxt.Len() && + sal_Bool bEnableNew = rShortTxt.Len() && ( rRepString.Len() || ( bHasSelectionText && bSWriter )) && ( !pFirstSel || rRepString != aReplaceTLB.GetEntryText( pFirstSel, 1 ) ); if(bEnableNew && pFormatText) { - for(USHORT i = 0; i < pFormatText->Count(); i++) + for(sal_uInt16 i = 0; i < pFormatText->Count(); i++) if(*pFormatText->GetObject(i) == rShortTxt) { - bEnableNew = FALSE; + bEnableNew = sal_False; break; } } @@ -1478,12 +1478,12 @@ struct StringsArrays }; typedef StringsArrays* StringsArraysPtr; -BOOL lcl_FindInArray(SvStringsDtor& rStrings, const String& rString) +sal_Bool lcl_FindInArray(SvStringsDtor& rStrings, const String& rString) { - for(USHORT i = 0; i < rStrings.Count(); i++) + for(sal_uInt16 i = 0; i < rStrings.Count(); i++) if(rString == *rStrings.GetObject(i)) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } void lcl_ClearTable(StringsTable& rTable) @@ -1514,6 +1514,11 @@ OfaAutocorrExceptPage::OfaAutocorrExceptPage( Window* pParent, aAutoCapsCB (this, CUI_RES(CB_AUTOCAPS )), eLang(eLastDialogLanguage) { + aNewAbbrevPB.SetAccessibleName(String(CUI_RES(STR_PB_NEWABBREV) ) ); + aDelAbbrevPB.SetAccessibleName(String(CUI_RES(STR_PB_DELABBREV) ) ); + aNewDoublePB.SetAccessibleName(String(CUI_RES(STR_PB_NEWDOUBLECAPS) ) ); + aDelDoublePB.SetAccessibleName(String(CUI_RES(STR_PB_DELDOUBLECAPS) ) ); + FreeResource(); ::com::sun::star::lang::Locale aLcl( SvxCreateLocale(eLastDialogLanguage )); @@ -1534,6 +1539,10 @@ OfaAutocorrExceptPage::OfaAutocorrExceptPage( Window* pParent, aAbbrevED.SetActionHdl(LINK(this, OfaAutocorrExceptPage, NewDelHdl)); aDoubleCapsED.SetActionHdl(LINK(this, OfaAutocorrExceptPage, NewDelHdl)); + aNewAbbrevPB.SetAccessibleRelationMemberOf(&aAbbrevFL); + aDelAbbrevPB.SetAccessibleRelationMemberOf(&aAbbrevFL); + aNewDoublePB.SetAccessibleRelationMemberOf(&aDoubleCapsFL); + aDelDoublePB.SetAccessibleRelationMemberOf(&aDoubleCapsFL); } OfaAutocorrExceptPage::~OfaAutocorrExceptPage() @@ -1552,7 +1561,7 @@ void OfaAutocorrExceptPage::ActivatePage( const SfxItemSet& ) { if(eLang != eLastDialogLanguage) SetLanguage(eLastDialogLanguage); - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(TRUE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_True); } int OfaAutocorrExceptPage::DeactivatePage( SfxItemSet* ) @@ -1560,7 +1569,7 @@ int OfaAutocorrExceptPage::DeactivatePage( SfxItemSet* ) return LEAVE_PAGE; } -BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); StringsArraysPtr pArrays = aStringsTable.Last(); @@ -1573,8 +1582,8 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) if(pWrdList) { - USHORT nCount = pWrdList->Count(); - USHORT i; + sal_uInt16 nCount = pWrdList->Count(); + sal_uInt16 i; for( i = nCount; i; ) { String* pString = pWrdList->GetObject( --i ); @@ -1596,8 +1605,8 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) if(pCplList) { - USHORT nCount = pCplList->Count(); - USHORT i; + sal_uInt16 nCount = pCplList->Count(); + sal_uInt16 i; for( i = nCount; i; ) { String* pString = pCplList->GetObject( --i ); @@ -1622,8 +1631,8 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) if(pWrdList) { - USHORT nCount = pWrdList->Count(); - USHORT i; + sal_uInt16 nCount = pWrdList->Count(); + sal_uInt16 i; for( i = nCount; i; ) { String* pString = pWrdList->GetObject( --i ); @@ -1644,8 +1653,8 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) if(pCplList) { - USHORT nCount = pCplList->Count(); - USHORT i; + sal_uInt16 nCount = pCplList->Count(); + sal_uInt16 i; for( i = nCount; i; ) { String* pString = pCplList->GetObject( --i ); @@ -1665,7 +1674,7 @@ BOOL OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) pAutoCorrect->SetAutoCorrFlag( SaveWordCplSttLst, aAutoAbbrevCB.IsChecked()); if(aAutoCapsCB.IsChecked() != aAutoCapsCB.GetSavedValue()) pAutoCorrect->SetAutoCorrFlag( SaveWordWrdSttLst, aAutoCapsCB.IsChecked()); - return FALSE; + return sal_False; } void OfaAutocorrExceptPage::SetLanguage(LanguageType eSet) @@ -1673,7 +1682,7 @@ void OfaAutocorrExceptPage::SetLanguage(LanguageType eSet) if(eLang != eSet) { //alte Einstellungen speichern und neu fuellen - RefillReplaceBoxes(FALSE, eLang, eSet); + RefillReplaceBoxes(sal_False, eLang, eSet); eLastDialogLanguage = eSet; delete pCompareClass; pCompareClass = new CollatorWrapper( GetProcessFact() ); @@ -1685,7 +1694,7 @@ void OfaAutocorrExceptPage::SetLanguage(LanguageType eSet) } } -void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, +void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool bFromReset, LanguageType eOldLanguage, LanguageType eNewLanguage) { @@ -1697,7 +1706,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, StringsArraysPtr pArrays = 0; if(aStringsTable.IsKeyValid(eOldLanguage)) { - pArrays = aStringsTable.Seek(ULONG(eOldLanguage)); + pArrays = aStringsTable.Seek(sal_uLong(eOldLanguage)); pArrays->aAbbrevStrings.DeleteAndDestroy( 0, pArrays->aAbbrevStrings.Count()); pArrays->aDoubleCapsStrings.DeleteAndDestroy( @@ -1706,10 +1715,10 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, else { pArrays = new StringsArrays; - aStringsTable.Insert(ULONG(eOldLanguage), pArrays); + aStringsTable.Insert(sal_uLong(eOldLanguage), pArrays); } - USHORT i; + sal_uInt16 i; for(i = 0; i < aAbbrevLB.GetEntryCount(); i++) { pArrays->aAbbrevStrings.Insert( @@ -1730,8 +1739,8 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, if(aStringsTable.IsKeyValid(eLang)) { - StringsArraysPtr pArrays = aStringsTable.Seek(ULONG(eLang)); - USHORT i; + StringsArraysPtr pArrays = aStringsTable.Seek(sal_uLong(eLang)); + sal_uInt16 i; for(i = 0; i < pArrays->aAbbrevStrings.Count(); i++ ) { aAbbrevLB.InsertEntry(*pArrays->aAbbrevStrings.GetObject(i)); @@ -1746,7 +1755,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); const SvStringsISortDtor* pCplList = pAutoCorrect->GetCplSttExceptList(eLang); const SvStringsISortDtor* pWrdList = pAutoCorrect->GetWrdSttExceptList(eLang); - USHORT i; + sal_uInt16 i; for( i = 0; i < pCplList->Count(); i++ ) { aAbbrevLB.InsertEntry(*pCplList->GetObject(i)); @@ -1761,7 +1770,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(BOOL bFromReset, void OfaAutocorrExceptPage::Reset( const SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); - RefillReplaceBoxes(TRUE, eLang, eLang); + RefillReplaceBoxes(sal_True, eLang, eLang); aAutoAbbrevCB. Check( pAutoCorrect->IsAutoCorrFlag( SaveWordCplSttLst )); aAutoCapsCB. Check( pAutoCorrect->IsAutoCorrFlag( SaveWordWrdSttLst )); aAutoAbbrevCB.SaveValue(); @@ -1800,13 +1809,13 @@ IMPL_LINK(OfaAutocorrExceptPage, SelectHdl, ListBox*, pBox) if(pBox == &aAbbrevLB) { aAbbrevED.SetText(pBox->GetSelectEntry()); - aNewAbbrevPB.Enable(FALSE); + aNewAbbrevPB.Enable(sal_False); aDelAbbrevPB.Enable(); } else { aDoubleCapsED.SetText(pBox->GetSelectEntry()); - aNewDoublePB.Enable(FALSE); + aNewDoublePB.Enable(sal_False); aDelDoublePB.Enable(); } return 0; @@ -1814,12 +1823,12 @@ IMPL_LINK(OfaAutocorrExceptPage, SelectHdl, ListBox*, pBox) IMPL_LINK(OfaAutocorrExceptPage, ModifyHdl, Edit*, pEdt) { -// BOOL bSame = pEdt->GetText() == ->GetSelectEntry(); +// sal_Bool bSame = pEdt->GetText() == ->GetSelectEntry(); const String& sEntry = pEdt->GetText(); - BOOL bEntryLen = 0!= sEntry.Len(); + sal_Bool bEntryLen = 0!= sEntry.Len(); if(pEdt == &aAbbrevED) { - BOOL bSame = lcl_FindEntry(aAbbrevLB, sEntry, *pCompareClass); + sal_Bool bSame = lcl_FindEntry(aAbbrevLB, sEntry, *pCompareClass); if(bSame && sEntry != aAbbrevLB.GetSelectEntry()) pEdt->SetText(aAbbrevLB.GetSelectEntry()); aNewAbbrevPB.Enable(!bSame && bEntryLen); @@ -1827,7 +1836,7 @@ IMPL_LINK(OfaAutocorrExceptPage, ModifyHdl, Edit*, pEdt) } else { - BOOL bSame = lcl_FindEntry(aDoubleCapsLB, sEntry, *pCompareClass); + sal_Bool bSame = lcl_FindEntry(aDoubleCapsLB, sEntry, *pCompareClass); if(bSame && sEntry != aDoubleCapsLB.GetSelectEntry()) pEdt->SetText(aDoubleCapsLB.GetSelectEntry()); aNewDoublePB.Enable(!bSame && bEntryLen); @@ -1839,7 +1848,7 @@ IMPL_LINK(OfaAutocorrExceptPage, ModifyHdl, Edit*, pEdt) void AutoCorrEdit::KeyInput( const KeyEvent& rKEvt ) { const KeyCode aKeyCode = rKEvt.GetKeyCode(); - const USHORT nModifier = aKeyCode.GetModifier(); + const sal_uInt16 nModifier = aKeyCode.GetModifier(); if( aKeyCode.GetCode() == KEY_RETURN ) { //wird bei Enter nichts getan, dann doch die Basisklasse rufen @@ -1857,7 +1866,7 @@ enum OfaQuoteOptions REPLACE_1ST }; -SvLBoxEntry* OfaQuoteTabPage::CreateEntry(String& rTxt, USHORT nCol) +SvLBoxEntry* OfaQuoteTabPage::CreateEntry(String& rTxt, sal_uInt16 nCol) { SvLBoxEntry* pEntry = new SvLBoxEntry; @@ -1920,16 +1929,23 @@ OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) : sStandard(CUI_RES(ST_STANDARD)) { + aSglStandardPB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_STD) ) ); + aDblStandardPB.SetAccessibleName(String(CUI_RES(STR_PB_DBL_STD) ) ); + aStartQuotePB.SetAccessibleName( String(CUI_RES(STR_PB_DBL_START) )); + aEndQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_DBL_END) )); + aSglStartQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_START) )); + aSglEndQuotePB.SetAccessibleName(String(CUI_RES(STR_PB_SGL_END) ) ); + FreeResource(); - BOOL bShowSWOptions = FALSE; + sal_Bool bShowSWOptions = sal_False; aCheckLB.SetHelpId( HID_OFAPAGE_QUOTE_CLB ); aSwCheckLB.SetHelpId( HID_OFAPAGE_QUOTE_SW_CLB ); - SFX_ITEMSET_ARG( &rSet, pItem, SfxBoolItem, SID_AUTO_CORRECT_DLG, FALSE ); + SFX_ITEMSET_ARG( &rSet, pItem, SfxBoolItem, SID_AUTO_CORRECT_DLG, sal_False ); if ( pItem && pItem->GetValue() ) - bShowSWOptions = TRUE; + bShowSWOptions = sal_True; if ( bShowSWOptions ) { @@ -1938,7 +1954,7 @@ OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) : 3, 0, 20, 40 }; - aSwCheckLB.SetWindowBits(WB_HSCROLL| WB_VSCROLL); + aSwCheckLB.SetStyle(aSwCheckLB.GetStyle() | WB_HSCROLL| WB_VSCROLL); aSwCheckLB.SvxSimpleTable::SetTabs(aStaticTabs); String sHeader( sHeader1 ); @@ -1947,7 +1963,7 @@ OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) : sHeader += '\t'; aSwCheckLB.InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HIB_CENTER | HIB_VCENTER | HIB_FIXEDPOS | HIB_FIXED); - aCheckLB.Hide( TRUE ); + aCheckLB.Hide( sal_True ); } else { @@ -1961,6 +1977,16 @@ OfaQuoteTabPage::OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet ) : aDblStandardPB.SetClickHdl(LINK(this, OfaQuoteTabPage, StdQuoteHdl)); aSglStandardPB.SetClickHdl(LINK(this, OfaQuoteTabPage, StdQuoteHdl)); + aSglStartQuotePB.SetAccessibleRelationLabeledBy( &aSglStartQuoteFT ); + aSglEndQuotePB.SetAccessibleRelationLabeledBy( &aSglEndQuoteFT ); + aSglStartQuotePB.SetAccessibleRelationMemberOf( &aSingleFL ); + aSglEndQuotePB.SetAccessibleRelationMemberOf( &aSingleFL ); + aStartQuotePB.SetAccessibleRelationLabeledBy( &aStartQuoteFT ); + aEndQuotePB.SetAccessibleRelationLabeledBy( &aEndQuoteFT ); + aStartQuotePB.SetAccessibleRelationMemberOf( &aDoubleFL ); + aEndQuotePB.SetAccessibleRelationMemberOf( &aDoubleFL ); + aSglStandardPB.SetAccessibleRelationMemberOf(&aSingleFL); + aDblStandardPB.SetAccessibleRelationMemberOf(&aDoubleFL); } OfaQuoteTabPage::~OfaQuoteTabPage() @@ -1974,7 +2000,7 @@ SfxTabPage* OfaQuoteTabPage::Create( Window* pParent, return new OfaQuoteTabPage(pParent, rAttrSet); } -BOOL OfaQuoteTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaQuoteTabPage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); @@ -1982,17 +2008,17 @@ BOOL OfaQuoteTabPage::FillItemSet( SfxItemSet& ) if ( aCheckLB.IsVisible( ) ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; pAutoCorrect->SetAutoCorrFlag(AddNonBrkSpace, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(ChgOrdinalNumber, aCheckLB.IsChecked(nPos++)); } - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if ( aSwCheckLB.IsVisible( ) ) { SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); - BOOL bCheck = aSwCheckLB.IsChecked(ADD_NONBRK_SPACE, CBCOL_FIRST); + sal_Bool bCheck = aSwCheckLB.IsChecked(ADD_NONBRK_SPACE, CBCOL_FIRST); bModified |= pOpt->bAddNonBrkSpace != bCheck; pOpt->bAddNonBrkSpace = bCheck; pAutoCorrect->SetAutoCorrFlag(AddNonBrkSpace, @@ -2007,28 +2033,28 @@ BOOL OfaQuoteTabPage::FillItemSet( SfxItemSet& ) pAutoCorrect->SetAutoCorrFlag(ChgQuotes, aTypoCB.IsChecked()); pAutoCorrect->SetAutoCorrFlag(ChgSglQuotes, aSingleTypoCB.IsChecked()); - BOOL bReturn = nFlags != pAutoCorrect->GetFlags(); + sal_Bool bReturn = nFlags != pAutoCorrect->GetFlags(); if(cStartQuote != pAutoCorrect->GetStartDoubleQuote()) { - bReturn = TRUE; + bReturn = sal_True; sal_Unicode cUCS2 = static_cast<sal_Unicode>(cStartQuote); //TODO pAutoCorrect->SetStartDoubleQuote(cUCS2); } if(cEndQuote != pAutoCorrect->GetEndDoubleQuote()) { - bReturn = TRUE; + bReturn = sal_True; sal_Unicode cUCS2 = static_cast<sal_Unicode>(cEndQuote); //TODO pAutoCorrect->SetEndDoubleQuote(cUCS2); } if(cSglStartQuote != pAutoCorrect->GetStartSingleQuote()) { - bReturn = TRUE; + bReturn = sal_True; sal_Unicode cUCS2 = static_cast<sal_Unicode>(cSglStartQuote); //TODO pAutoCorrect->SetStartSingleQuote(cUCS2); } if(cSglEndQuote != pAutoCorrect->GetEndSingleQuote()) { - bReturn = TRUE; + bReturn = sal_True; sal_Unicode cUCS2 = static_cast<sal_Unicode>(cSglEndQuote); //TODO pAutoCorrect->SetEndSingleQuote(cUCS2); } @@ -2044,7 +2070,7 @@ BOOL OfaQuoteTabPage::FillItemSet( SfxItemSet& ) void OfaQuoteTabPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(FALSE); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage(sal_False); } void OfaQuoteTabPage::Reset( const SfxItemSet& ) @@ -2057,7 +2083,7 @@ void OfaQuoteTabPage::Reset( const SfxItemSet& ) { SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); - aSwCheckLB.SetUpdateMode( FALSE ); + aSwCheckLB.SetUpdateMode( sal_False ); aSwCheckLB.Clear(); aSwCheckLB.GetModel()->Insert(CreateEntry(sNonBrkSpace, CBCOL_BOTH )); @@ -2068,23 +2094,23 @@ void OfaQuoteTabPage::Reset( const SfxItemSet& ) aSwCheckLB.CheckEntryPos( REPLACE_1ST, CBCOL_FIRST, pOpt->bChgOrdinalNumber ); aSwCheckLB.CheckEntryPos( REPLACE_1ST, CBCOL_SECOND, 0 != (nFlags & ChgOrdinalNumber) ); - aSwCheckLB.SetUpdateMode( TRUE ); + aSwCheckLB.SetUpdateMode( sal_True ); } // Initialize the non Sw options if ( aCheckLB.IsVisible( ) ) { - aCheckLB.SetUpdateMode( FALSE ); + aCheckLB.SetUpdateMode( sal_False ); aCheckLB.Clear( ); aCheckLB.InsertEntry( sNonBrkSpace ); aCheckLB.InsertEntry( sOrdinal ); - USHORT nPos = 0; + sal_uInt16 nPos = 0; aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & AddNonBrkSpace) ); aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & ChgOrdinalNumber) ); - aCheckLB.SetUpdateMode( TRUE ); + aCheckLB.SetUpdateMode( sal_True ); } // Initialize the quote stuffs @@ -2112,7 +2138,7 @@ void OfaQuoteTabPage::Reset( const SfxItemSet& ) IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn ) { - USHORT nMode = SGL_START; + sal_uInt16 nMode = SGL_START; if(pBtn == &aSglEndQuotePB) nMode = SGL_END; else if(pBtn == &aStartQuotePB) @@ -2120,7 +2146,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn ) else if(pBtn == &aEndQuotePB) nMode = DBL_END; // Zeichenauswahl-Dialog starten - SvxCharacterMap* pMap = new SvxCharacterMap( this, TRUE ); + SvxCharacterMap* pMap = new SvxCharacterMap( this, sal_True ); pMap->SetCharFont( OutputDevice::GetDefaultFont(DEFAULTFONT_LATIN_TEXT, LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE, 0 )); pMap->SetText(nMode < SGL_END ? sStartQuoteDlg : sEndQuoteDlg ); @@ -2132,22 +2158,22 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn ) case SGL_START: cDlg = cSglStartQuote; if(cDlg == 0) - cDlg = pAutoCorrect->GetQuote('\'',TRUE,eLang); + cDlg = pAutoCorrect->GetQuote('\'', sal_True, eLang); break; case SGL_END: cDlg = cSglEndQuote; if(cDlg == 0) - cDlg = pAutoCorrect->GetQuote('\'',FALSE,eLang); + cDlg = pAutoCorrect->GetQuote('\'', sal_False, eLang); break; case DBL_START: cDlg = cStartQuote; if(cDlg == 0) - cDlg = pAutoCorrect->GetQuote('\"',TRUE,eLang); + cDlg = pAutoCorrect->GetQuote('\"', sal_True, eLang); break; case DBL_END: cDlg = cEndQuote; if(cDlg == 0) - cDlg = pAutoCorrect->GetQuote('\"',FALSE,eLang); + cDlg = pAutoCorrect->GetQuote('\"', sal_False, eLang); break; default: OSL_FAIL("svx::OfaQuoteTabPage::QuoteHdl(), how to initialize cDlg?" ); @@ -2254,7 +2280,7 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent, FreeResource(); // the defined KEYs - static const USHORT aKeyCodes[] = { + static const sal_uInt16 aKeyCodes[] = { KEY_END, KEY_RETURN, KEY_SPACE, @@ -2263,11 +2289,11 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent, 0 }; - for( const USHORT* pKeys = aKeyCodes; *pKeys; ++pKeys ) + for( const sal_uInt16* pKeys = aKeyCodes; *pKeys; ++pKeys ) { KeyCode aKCode( *pKeys ); - USHORT nPos = aDCBExpandKey.InsertEntry( aKCode.GetName() ); - aDCBExpandKey.SetEntryData( nPos, (void*)(ULONG)*pKeys ); + sal_uInt16 nPos = aDCBExpandKey.InsertEntry( aKCode.GetName() ); + aDCBExpandKey.SetEntryData( nPos, (void*)(sal_uLong)*pKeys ); if( KEY_RETURN == *pKeys ) // default to RETURN aDCBExpandKey.SelectEntryPos( nPos ); } @@ -2275,6 +2301,7 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent, aPBEntries.SetClickHdl(LINK(this, OfaAutoCompleteTabPage, DeleteHdl)); aCBActiv.SetToggleHdl(LINK(this, OfaAutoCompleteTabPage, CheckHdl)); aCBCollect.SetToggleHdl(LINK(this, OfaAutoCompleteTabPage, CheckHdl)); + aLBEntries.SetAccessibleRelationLabeledBy(&aLBEntries); } OfaAutoCompleteTabPage::~OfaAutoCompleteTabPage() @@ -2287,12 +2314,12 @@ SfxTabPage* OfaAutoCompleteTabPage::Create( Window* pParent, return new OfaAutoCompleteTabPage( pParent, rSet ); } -BOOL OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE, bCheck; + sal_Bool bModified = sal_False, bCheck; SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); - USHORT nVal; + sal_uInt16 nVal; bCheck = aCBActiv.IsChecked(); bModified |= pOpt->bAutoCompleteWords != bCheck; @@ -2310,25 +2337,25 @@ BOOL OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) bModified |= pOpt->bAutoCmpltShowAsTip != bCheck; pOpt->bAutoCmpltShowAsTip = bCheck; - nVal = (USHORT)aNFMinWordlen.GetValue(); + nVal = (sal_uInt16)aNFMinWordlen.GetValue(); bModified |= nVal != pOpt->nAutoCmpltWordLen; pOpt->nAutoCmpltWordLen = nVal; - nVal = (USHORT)aNFMaxEntries.GetValue(); + nVal = (sal_uInt16)aNFMaxEntries.GetValue(); bModified |= nVal != pOpt->nAutoCmpltListLen; pOpt->nAutoCmpltListLen = nVal; nVal = aDCBExpandKey.GetSelectEntryPos(); if( nVal < aDCBExpandKey.GetEntryCount() ) { - ULONG nKey = (ULONG)aDCBExpandKey.GetEntryData( nVal ); + sal_uLong nKey = (sal_uLong)aDCBExpandKey.GetEntryData( nVal ); bModified |= nKey != pOpt->nAutoCmpltExpandKey; - pOpt->nAutoCmpltExpandKey = (USHORT)nKey; + pOpt->nAutoCmpltExpandKey = (sal_uInt16)nKey; } if( pAutoCmpltList && nAutoCmpltListCnt != aLBEntries.GetEntryCount() ) { - bModified = TRUE; + bModified = sal_True; pOpt->pAutoCmpltList = pAutoCmpltList; } if( bModified ) @@ -2337,7 +2364,7 @@ BOOL OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) pCfg->SetModified(); pCfg->Commit(); } - return TRUE; + return sal_True; } void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) @@ -2356,9 +2383,9 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) // select the specific KeyCode: { - ULONG nKey = pOpt->nAutoCmpltExpandKey; - for( USHORT n = 0, nCnt = aDCBExpandKey.GetEntryCount(); n < nCnt; ++n ) - if( nKey == (ULONG)aDCBExpandKey.GetEntryData( n )) + sal_uLong nKey = pOpt->nAutoCmpltExpandKey; + for( sal_uInt16 n = 0, nCnt = aDCBExpandKey.GetEntryCount(); n < nCnt; ++n ) + if( nKey == (sal_uLong)aDCBExpandKey.GetEntryData( n )) { aDCBExpandKey.SelectEntryPos( n ); break; @@ -2370,10 +2397,10 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) pAutoCmpltList = (SvStringsISortDtor*)pOpt->pAutoCmpltList; pOpt->pAutoCmpltList = 0; nAutoCmpltListCnt = pAutoCmpltList->Count(); - for( USHORT n = 0; n < nAutoCmpltListCnt; ++n ) + for( sal_uInt16 n = 0; n < nAutoCmpltListCnt; ++n ) { const StringPtr pStr = pAutoCmpltList->GetObject( n ); - USHORT nPos = aLBEntries.InsertEntry( *pStr ); + sal_uInt16 nPos = aLBEntries.InsertEntry( *pStr ); aLBEntries.SetEntryData( nPos, (void*)pStr ); } } @@ -2389,15 +2416,15 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) void OfaAutoCompleteTabPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage( FALSE ); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage( sal_False ); } IMPL_LINK( OfaAutoCompleteTabPage, DeleteHdl, PushButton*, EMPTYARG ) { - USHORT nSelCnt = pAutoCmpltList ? aLBEntries.GetSelectEntryCount() : 0; + sal_uInt16 nSelCnt = pAutoCmpltList ? aLBEntries.GetSelectEntryCount() : 0; while( nSelCnt ) { - USHORT nPos = aLBEntries.GetSelectEntryPos( --nSelCnt ); + sal_uInt16 nPos = aLBEntries.GetSelectEntryPos( --nSelCnt ); const StringPtr pStr = (StringPtr)aLBEntries.GetEntryData( nPos ); aLBEntries.RemoveEntry( nPos ); nPos = pAutoCmpltList->GetPos( pStr ); @@ -2409,7 +2436,7 @@ IMPL_LINK( OfaAutoCompleteTabPage, DeleteHdl, PushButton*, EMPTYARG ) IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox ) { - BOOL bEnable = pBox->IsChecked(); + sal_Bool bEnable = pBox->IsChecked(); if( pBox == &aCBActiv ) { aCBAppendSpace.Enable( bEnable ); @@ -2424,7 +2451,7 @@ IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox ) void OfaAutoCompleteTabPage::CopyToClipboard() const { - USHORT nSelCnt = aLBEntries.GetSelectEntryCount(); + sal_uInt16 nSelCnt = aLBEntries.GetSelectEntryCount(); if( pAutoCmpltList && nSelCnt ) { TransferDataContainer* pCntnr = new TransferDataContainer; @@ -2441,7 +2468,7 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const rtl_TextEncoding nEncode = gsl_getSystemTextEncoding(); - for( USHORT n = 0; n < nSelCnt; ++n ) + for( sal_uInt16 n = 0; n < nSelCnt; ++n ) { sData += ByteString( aLBEntries.GetSelectEntry( n ), nEncode ); sData += pLineEnd; @@ -2491,7 +2518,7 @@ OfaSmartTagOptionsTabPage::OfaSmartTagOptionsTabPage( Window* pParent, FreeResource(); // some options for the list box: - m_aSmartTagTypesLB.SetWindowBits( m_aSmartTagTypesLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); + m_aSmartTagTypesLB.SetStyle( m_aSmartTagTypesLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION ); m_aSmartTagTypesLB.SetHighlightRange(); // set the handlers: @@ -2530,8 +2557,8 @@ struct ImplSmartTagLBUserData */ void OfaSmartTagOptionsTabPage::ClearListBox() { - const ULONG nCount = m_aSmartTagTypesLB.GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + const sal_uLong nCount = m_aSmartTagTypesLB.GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { const SvLBoxEntry* pEntry = m_aSmartTagTypesLB.GetEntry(i); const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData()); @@ -2589,7 +2616,7 @@ void OfaSmartTagOptionsTabPage::FillListBox( const SmartTagMgr& rSmartTagMgr ) */ IMPL_LINK( OfaSmartTagOptionsTabPage, ClickHdl, PushButton*, EMPTYARG ) { - const USHORT nPos = m_aSmartTagTypesLB.GetSelectEntryPos(); + const sal_uInt16 nPos = m_aSmartTagTypesLB.GetSelectEntryPos(); const SvLBoxEntry* pEntry = m_aSmartTagTypesLB.GetEntry(nPos); const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData()); uno::Reference< smarttags::XSmartTagRecognizer > xRec = pUserData->mxRec; @@ -2606,7 +2633,7 @@ IMPL_LINK( OfaSmartTagOptionsTabPage, ClickHdl, PushButton*, EMPTYARG ) */ IMPL_LINK( OfaSmartTagOptionsTabPage, CheckHdl, CheckBox*, EMPTYARG ) { - const BOOL bEnable = m_aMainCB.IsChecked(); + const sal_Bool bEnable = m_aMainCB.IsChecked(); m_aSmartTagTypesLB.Enable( bEnable ); m_aSmartTagTypesLB.Invalidate(); m_aPropertiesPB.Enable( false ); @@ -2628,7 +2655,7 @@ IMPL_LINK(OfaSmartTagOptionsTabPage, SelectHdl, SvxCheckListBox*, EMPTYARG) if ( m_aSmartTagTypesLB.GetEntryCount() < 1 ) return 0; - const USHORT nPos = m_aSmartTagTypesLB.GetSelectEntryPos(); + const sal_uInt16 nPos = m_aSmartTagTypesLB.GetSelectEntryPos(); const SvLBoxEntry* pEntry = m_aSmartTagTypesLB.GetEntry(nPos); const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData()); uno::Reference< smarttags::XSmartTagRecognizer > xRec = pUserData->mxRec; @@ -2645,7 +2672,7 @@ IMPL_LINK(OfaSmartTagOptionsTabPage, SelectHdl, SvxCheckListBox*, EMPTYARG) /** Propagates the current settings to the smart tag manager. */ -BOOL OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) { SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); @@ -2653,19 +2680,19 @@ BOOL OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) // robust! if ( !pSmartTagMgr ) - return FALSE; + return sal_False; - BOOL bModifiedSmartTagTypes = FALSE; + sal_Bool bModifiedSmartTagTypes = sal_False; std::vector< rtl::OUString > aDisabledSmartTagTypes; - const ULONG nCount = m_aSmartTagTypesLB.GetEntryCount(); + const sal_uLong nCount = m_aSmartTagTypesLB.GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { const SvLBoxEntry* pEntry = m_aSmartTagTypesLB.GetEntry(i); const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData()); - const BOOL bChecked = m_aSmartTagTypesLB.IsChecked(i); - const BOOL bIsCurrentlyEnabled = pSmartTagMgr->IsSmartTagTypeEnabled( pUserData->maSmartTagType ); + const sal_Bool bChecked = m_aSmartTagTypesLB.IsChecked(i); + const sal_Bool bIsCurrentlyEnabled = pSmartTagMgr->IsSmartTagTypeEnabled( pUserData->maSmartTagType ); bModifiedSmartTagTypes = bModifiedSmartTagTypes || ( !bChecked != !bIsCurrentlyEnabled ); @@ -2675,7 +2702,7 @@ BOOL OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) delete pUserData; } - const BOOL bModifiedRecognize = ( !m_aMainCB.IsChecked() != !pSmartTagMgr->IsLabelTextWithSmartTags() ); + const sal_Bool bModifiedRecognize = ( !m_aMainCB.IsChecked() != !pSmartTagMgr->IsLabelTextWithSmartTags() ); if ( bModifiedSmartTagTypes || bModifiedRecognize ) { bool bLabelTextWithSmartTags = m_aMainCB.IsChecked() ? true : false; @@ -2683,7 +2710,7 @@ BOOL OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) bModifiedSmartTagTypes ? &aDisabledSmartTagTypes : 0 ); } - return TRUE; + return sal_True; } /** Sets the controls based on the current settings at SmartTagMgr. @@ -2706,7 +2733,7 @@ void OfaSmartTagOptionsTabPage::Reset( const SfxItemSet& ) void OfaSmartTagOptionsTabPage::ActivatePage( const SfxItemSet& ) { - ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage( FALSE ); + ((OfaAutoCorrDlg*)GetTabDialog())->EnableLanguage( sal_False ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/tabpages/autocdlg.hrc b/cui/source/tabpages/autocdlg.hrc index e63684c96..d58f65b1a 100644 --- a/cui/source/tabpages/autocdlg.hrc +++ b/cui/source/tabpages/autocdlg.hrc @@ -155,6 +155,18 @@ #define FT_SMARTTAGS 221 #define LB_SMARTTAGS 222 #define PB_SMARTTAGS 223 +//IAccessibility2 Implementation 2009----- +#define STR_PB_NEWABBREV 224 +#define STR_PB_DELABBREV 225 +#define STR_PB_NEWDOUBLECAPS 226 +#define STR_PB_DELDOUBLECAPS 227 +#define STR_PB_SGL_STD 228 +#define STR_PB_DBL_STD 229 +#define STR_PB_SGL_START 230 +#define STR_PB_DBL_START 231 +#define STR_PB_SGL_END 232 +#define STR_PB_DBL_END 233 +//-----IAccessibility2 Implementation 2009 #endif diff --git a/cui/source/tabpages/autocdlg.src b/cui/source/tabpages/autocdlg.src index 3d7e9eb05..e483e1ad4 100644 --- a/cui/source/tabpages/autocdlg.src +++ b/cui/source/tabpages/autocdlg.src @@ -177,6 +177,7 @@ TabPage RID_OFAPAGE_AUTOFMT_APPLY }; PushButton PB_EDIT { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOFMT_APPLY:PB_EDIT"; Pos = MAP_APPFONT ( 6 , 162 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Edit..." ; @@ -249,7 +250,7 @@ TabPage RID_OFAPAGE_AUTOFMT_APPLY ModalDialog RID_OFADLG_PRCNT_SET { - HelpID = SID_AUTOFORMAT ; + HelpID = CMD_SID_AUTOFORMAT ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 155 , 43 ) ; @@ -275,6 +276,7 @@ ModalDialog RID_OFADLG_PRCNT_SET }; MetricField ED_RIGHT_MARGIN { + HelpID = "cui:MetricField:RID_OFADLG_PRCNT_SET:ED_RIGHT_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 7 , 14 ) ; Size = MAP_APPFONT ( 31 , 12 ) ; @@ -314,6 +316,7 @@ TabPage RID_OFAPAGE_AUTOCORR_REPLACE }; Edit ED_SHORT { + HelpID = "cui:Edit:RID_OFAPAGE_AUTOCORR_REPLACE:ED_SHORT"; Pos = MAP_APPFONT ( 7 , 13 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; Border = TRUE ; @@ -328,6 +331,7 @@ TabPage RID_OFAPAGE_AUTOCORR_REPLACE }; Edit ED_REPLACE { + HelpID = "cui:Edit:RID_OFAPAGE_AUTOCORR_REPLACE:ED_REPLACE"; Pos = MAP_APPFONT ( 71 , 13 ) ; Size = MAP_APPFONT ( 123 , 12 ) ; Border = TRUE ; @@ -335,6 +339,7 @@ TabPage RID_OFAPAGE_AUTOCORR_REPLACE }; CheckBox CB_TEXT_ONLY { + HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCORR_REPLACE:CB_TEXT_ONLY"; Pos = MAP_APPFONT ( 140 , 3 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; TabStop = TRUE ; @@ -342,6 +347,7 @@ TabPage RID_OFAPAGE_AUTOCORR_REPLACE }; PushButton PB_NEW_REPLACE { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCORR_REPLACE:PB_NEW_REPLACE"; Pos = MAP_APPFONT ( 198 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -349,6 +355,7 @@ TabPage RID_OFAPAGE_AUTOCORR_REPLACE }; PushButton PB_DELETE_REPLACE { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCORR_REPLACE:PB_DELETE_REPLACE"; Pos = MAP_APPFONT ( 198 , 32 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -387,6 +394,7 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT }; Edit ED_ABBREV { + HelpID = "cui:Edit:RID_OFAPAGE_AUTOCORR_EXCEPT:ED_ABBREV"; Pos = MAP_APPFONT ( 7 , 14 ) ; Size = MAP_APPFONT ( 123 , 12 ) ; TabStop = TRUE ; @@ -394,6 +402,7 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT }; ListBox LB_ABBREV { + HelpID = "cui:ListBox:RID_OFAPAGE_AUTOCORR_EXCEPT:LB_ABBREV"; Pos = MAP_APPFONT ( 7 , 30 ) ; Size = MAP_APPFONT ( 123 , 58 ) ; TabStop = TRUE ; @@ -403,6 +412,7 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT }; PushButton PB_NEWABBREV { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCORR_EXCEPT:PB_NEWABBREV"; Pos = MAP_APPFONT ( 198 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -411,6 +421,7 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT }; PushButton PB_DELABBREV { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCORR_EXCEPT:PB_DELABBREV"; Pos = MAP_APPFONT ( 198 , 31 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -419,6 +430,7 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT }; CheckBox CB_AUTOABBREV { + HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCORR_EXCEPT:CB_AUTOABBREV"; Pos = MAP_APPFONT ( 137 , 78 ) ; Size = MAP_APPFONT ( 111 , 10 ) ; Text [ en-US ] = "~AutoInclude"; @@ -433,6 +445,7 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT }; Edit ED_DOUBLE_CAPS { + HelpID = "cui:Edit:RID_OFAPAGE_AUTOCORR_EXCEPT:ED_DOUBLE_CAPS"; Pos = MAP_APPFONT ( 7 , 105 ) ; Size = MAP_APPFONT ( 123 , 12 ) ; TabStop = TRUE ; @@ -440,6 +453,7 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT }; ListBox LB_DOUBLE_CAPS { + HelpID = "cui:ListBox:RID_OFAPAGE_AUTOCORR_EXCEPT:LB_DOUBLE_CAPS"; Pos = MAP_APPFONT ( 7 , 120 ) ; Size = MAP_APPFONT ( 123 , 59 ) ; TabStop = TRUE ; @@ -449,6 +463,7 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT }; PushButton PB_NEWDOUBLECAPS { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCORR_EXCEPT:PB_NEWDOUBLECAPS"; Pos = MAP_APPFONT ( 198 , 105 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Disable = TRUE ; @@ -456,6 +471,7 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT }; PushButton PB_DELDOUBLECAPS { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCORR_EXCEPT:PB_DELDOUBLECAPS"; Pos = MAP_APPFONT ( 198 , 122 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Disable = TRUE ; @@ -463,11 +479,52 @@ TabPage RID_OFAPAGE_AUTOCORR_EXCEPT }; CheckBox CB_AUTOCAPS { + HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCORR_EXCEPT:CB_AUTOCAPS"; Pos = MAP_APPFONT ( 137 , 169 ) ; Size = MAP_APPFONT ( 111 , 10 ) ; Text [ en-US ] = "A~utoInclude"; Text [ en-US ] = "A~utoInclude" ; }; + String STR_PB_NEWABBREV + { + Text [ en-US ] = "New abbreviations" ; + }; + String STR_PB_DELABBREV + { + Text [ en-US ] = "Delete abbreviations" ; + }; + String STR_PB_NEWDOUBLECAPS + { + Text [ en-US ] = "New words with two initial capitals" ; + }; + String STR_PB_DELDOUBLECAPS + { + Text [ en-US ] = "Delete words with two initial capitals" ; + }; + String STR_PB_SGL_STD + { + Text [ en-US ] = "Single quotes default" ; + }; + String STR_PB_DBL_STD + { + Text [ en-US ] = "Double quotes default" ; + }; + String STR_PB_SGL_START + { + Text [ en-US ] = "Start quote of single quotes" ; + }; + String STR_PB_DBL_START + { + Text [ en-US ] = "Start quote of double quotes" ; + }; + String STR_PB_SGL_END + { + Text [ en-US ] = "End quote of single quotes" ; + }; + String STR_PB_DBL_END + { + Text [ en-US ] = "End quote of double quotes" ; + }; }; /**************************************************************************/ /* */ @@ -511,8 +568,9 @@ TabPage RID_OFAPAGE_AUTOCORR_QUOTE Size = MAP_APPFONT ( 122 , 8 ) ; Text [ en-US ] = "Single quotes" ; }; - Checkbox CB_SGL_TYPO + CheckBox CB_SGL_TYPO { + HelpId = "cui:CheckBox:RID_OFAPAGE_AUTOCORR_QUOTE:CB_SGL_TYPO"; Pos = MAP_APPFONT ( 7 , 101 ) ; Size = MAP_APPFONT ( 86 , 10 ) ; Text [ en-US ] = "Repla~ce" ; @@ -525,6 +583,7 @@ TabPage RID_OFAPAGE_AUTOCORR_QUOTE }; PushButton PB_SGL_STARTQUOTE { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCORR_QUOTE:PB_SGL_STARTQUOTE"; Pos = MAP_APPFONT ( 10 , 125 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Text = "\'" ; @@ -543,6 +602,7 @@ TabPage RID_OFAPAGE_AUTOCORR_QUOTE }; PushButton PB_SGL_ENDQUOTE { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCORR_QUOTE:PB_SGL_ENDQUOTE"; Pos = MAP_APPFONT ( 10 , 151 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Text = "\'" ; @@ -555,6 +615,7 @@ TabPage RID_OFAPAGE_AUTOCORR_QUOTE }; PushButton PB_SGL_STD { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCORR_QUOTE:PB_SGL_STD"; Pos = MAP_APPFONT ( 7 , 167 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -568,6 +629,7 @@ TabPage RID_OFAPAGE_AUTOCORR_QUOTE }; CheckBox CB_TYPO { + HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCORR_QUOTE:CB_TYPO"; Pos = MAP_APPFONT ( 137 , 101 ) ; Size = MAP_APPFONT ( 86 , 10 ) ; TabStop = TRUE ; @@ -581,6 +643,7 @@ TabPage RID_OFAPAGE_AUTOCORR_QUOTE }; PushButton PB_STARTQUOTE { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCORR_QUOTE:PB_STARTQUOTE"; Pos = MAP_APPFONT ( 140 , 125 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Text = "\"" ; @@ -599,6 +662,7 @@ TabPage RID_OFAPAGE_AUTOCORR_QUOTE }; PushButton PB_ENDQUOTE { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCORR_QUOTE:PB_ENDQUOTE"; Pos = MAP_APPFONT ( 140 , 151 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Text = "\"" ; @@ -611,6 +675,7 @@ TabPage RID_OFAPAGE_AUTOCORR_QUOTE }; PushButton PB_DBL_STD { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCORR_QUOTE:PB_DBL_STD"; Pos = MAP_APPFONT ( 137 , 167 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -644,30 +709,35 @@ TabPage RID_OFAPAGE_AUTOCOMPLETE_OPTIONS Hide = TRUE ; CheckBox CB_ACTIV { + HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:CB_ACTIV"; Pos = MAP_APPFONT( 4, 3 ); Size = MAP_APPFONT( 116, 10 ); Text [ en-US ] = "Enable word ~completion"; }; CheckBox CB_APPEND_SPACE { + HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:CB_APPEND_SPACE"; Pos = MAP_APPFONT( 10, 17 ); Size = MAP_APPFONT( 110, 10 ); Text [ en-US ] = "~Append space"; }; CheckBox CB_AS_TIP { + HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:CB_AS_TIP"; Pos = MAP_APPFONT( 10, 31 ); Size = MAP_APPFONT( 110, 10 ); Text [ en-US ] = "~Show as tip"; }; CheckBox CB_COLLECT { + HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:CB_COLLECT"; Pos = MAP_APPFONT( 4, 45 ); Size = MAP_APPFONT( 116, 10 ); Text [ en-US ] = "C~ollect words"; }; CheckBox CB_REMOVE_LIST { + HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:CB_REMOVE_LIST"; Pos = MAP_APPFONT( 10, 59 ); Size = MAP_APPFONT( 110, 40 ); WordBreak = TRUE; @@ -681,6 +751,7 @@ TabPage RID_OFAPAGE_AUTOCOMPLETE_OPTIONS }; ListBox DCB_EXPAND_KEY { + HelpID = "cui:ListBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:DCB_EXPAND_KEY"; Pos = MAP_APPFONT( 4, 113 ); Size = MAP_APPFONT( 116, 60 ); TabStop = TRUE; @@ -696,6 +767,7 @@ TabPage RID_OFAPAGE_AUTOCOMPLETE_OPTIONS }; NumericField NF_MIN_WORDLEN { + HelpID = "cui:NumericField:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:NF_MIN_WORDLEN"; Border = TRUE; Pos = MAP_APPFONT( 4, 140 ); Size = MAP_APPFONT( 30, 12 ); @@ -718,6 +790,7 @@ TabPage RID_OFAPAGE_AUTOCOMPLETE_OPTIONS }; NumericField NF_MAX_ENTRIES { + HelpID = "cui:NumericField:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:NF_MAX_ENTRIES"; Border = TRUE; Pos = MAP_APPFONT( 4, 167 ); Size = MAP_APPFONT( 30, 12 ); @@ -734,6 +807,7 @@ TabPage RID_OFAPAGE_AUTOCOMPLETE_OPTIONS }; MultiListBox LB_ENTRIES { + HelpID = "cui:MultiListBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:LB_ENTRIES"; Pos = MAP_APPFONT( 127, 3 ); Size = MAP_APPFONT( 121, 158 ); TabStop = TRUE; @@ -744,6 +818,7 @@ TabPage RID_OFAPAGE_AUTOCOMPLETE_OPTIONS }; PushButton PB_ENTRIES { + HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:PB_ENTRIES"; Pos = MAP_APPFONT( 127, 165 ); Size = MAP_APPFONT( 121, 14 ); TabStop = TRUE ; @@ -769,6 +844,7 @@ TabPage RID_OFAPAGE_SMARTTAG_OPTIONS CheckBox CB_SMARTTAGS { + HelpID = "cui:CheckBox:RID_OFAPAGE_SMARTTAG_OPTIONS:CB_SMARTTAGS"; Pos = MAP_APPFONT( 4, 3 ); Size = MAP_APPFONT( 116, 10 ); Text [ en-US ] = "Label text with smart tags"; @@ -791,6 +867,7 @@ TabPage RID_OFAPAGE_SMARTTAG_OPTIONS PushButton PB_SMARTTAGS { + HelpID = "cui:PushButton:RID_OFAPAGE_SMARTTAG_OPTIONS:PB_SMARTTAGS"; Pos = MAP_APPFONT ( 188 , 25 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "Properties..."; diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 9aabee49f..0dd1ac604 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -67,7 +67,7 @@ using namespace ::com::sun::star; // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_VIEW_FLD_PIC, SID_VIEW_FLD_PIC, SID_ATTR_BRUSH, SID_ATTR_BRUSH, @@ -80,10 +80,10 @@ struct SvxBackgroundTable_Impl SvxBrushItem* pCellBrush; SvxBrushItem* pRowBrush; SvxBrushItem* pTableBrush; - USHORT nCellWhich; - USHORT nRowWhich; - USHORT nTableWhich; - USHORT nActPos; + sal_uInt16 nCellWhich; + sal_uInt16 nRowWhich; + sal_uInt16 nTableWhich; + sal_uInt16 nActPos; SvxBackgroundTable_Impl() : pCellBrush(NULL), pRowBrush(NULL), pTableBrush(NULL), @@ -95,7 +95,7 @@ struct SvxBackgroundPara_Impl SvxBrushItem* pParaBrush; SvxBrushItem* pCharBrush; - USHORT nActPos; + sal_uInt16 nActPos; SvxBackgroundPara_Impl() : pParaBrush(NULL), pCharBrush(NULL) {} @@ -104,18 +104,18 @@ struct SvxBackgroundPara_Impl struct SvxBackgroundPage_Impl { Timer* pLoadTimer; - BOOL bIsImportDlgInExecute; + sal_Bool bIsImportDlgInExecute; SvxBackgroundPage_Impl() : - pLoadTimer(NULL), bIsImportDlgInExecute(FALSE) {} + pLoadTimer(NULL), bIsImportDlgInExecute(sal_False) {} }; -inline BYTE lcl_PercentToTransparency(long nPercent) +inline sal_uInt8 lcl_PercentToTransparency(long nPercent) { //0xff must not be returned! - return BYTE(nPercent ? (50 + 0xfe * nPercent) / 100 : 0); + return sal_uInt8(nPercent ? (50 + 0xfe * nPercent) / 100 : 0); } -inline BYTE lcl_TransparencyToPercent(BYTE nTrans) +inline sal_uInt8 lcl_TransparencyToPercent(sal_uInt8 nTrans) { return (nTrans * 100 + 127) / 254; } @@ -127,11 +127,11 @@ void lcl_SetTransparency(SvxBrushItem& rBrush, long nTransparency) } //------------------------------------------------------------------------- -USHORT GetItemId_Impl( ValueSet& rValueSet, const Color& rCol ) +sal_uInt16 GetItemId_Impl( ValueSet& rValueSet, const Color& rCol ) { - BOOL bFound = FALSE; - USHORT nCount = rValueSet.GetItemCount(); - USHORT n = 1; + sal_Bool bFound = sal_False; + sal_uInt16 nCount = rValueSet.GetItemCount(); + sal_uInt16 n = 1; while ( !bFound && n <= nCount ) { @@ -158,7 +158,7 @@ class BackgroundPreviewImpl : public Window { public: BackgroundPreviewImpl( Window* pParent, - const ResId& rResId, BOOL bIsBmpPreview ); + const ResId& rResId, sal_Bool bIsBmpPreview ); ~BackgroundPreviewImpl(); void NotifyChange( const Color& rColor ); @@ -169,12 +169,12 @@ protected: virtual void DataChanged( const DataChangedEvent& rDCEvt ); private: - const BOOL bIsBmp; + const sal_Bool bIsBmp; Bitmap* pBitmap; Point aDrawPos; Size aDrawSize; Rectangle aDrawRect; - BYTE nTransparency; + sal_uInt8 nTransparency; }; //----------------------------------------------------------------------- @@ -183,7 +183,7 @@ BackgroundPreviewImpl::BackgroundPreviewImpl ( Window* pParent, const ResId& rResId, - BOOL bIsBmpPreview + sal_Bool bIsBmpPreview ) : Window( pParent, rResId ), @@ -315,41 +315,43 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, SvxTabPage( pParent, CUI_RES( RID_SVXPAGE_BACKGROUND ), rCoreSet ), + aSelectTxt ( this, CUI_RES( FT_SELECTOR ) ), + aLbSelect ( this, CUI_RES( LB_SELECTOR ) ), + aStrBrowse ( CUI_RES( STR_BROWSE ) ), + aStrUnlinked ( CUI_RES( STR_UNLINKED ) ), + aTblDesc ( this, CUI_RES( FT_TBL_DESC ) ), + aTblLBox ( this, CUI_RES( LB_TBL_BOX ) ), + aParaLBox ( this, CUI_RES( LB_PARA_BOX ) ), + aBorderWin ( this, CUI_RES(CT_BORDER) ), aBackgroundColorSet ( &aBorderWin, CUI_RES( SET_BGDCOLOR ) ), aBackgroundColorBox ( this, CUI_RES( GB_BGDCOLOR ) ), - pPreviewWin1 ( new BackgroundPreviewImpl( - this, CUI_RES( WIN_PREVIEW1 ), FALSE ) ), + pPreviewWin1 ( new BackgroundPreviewImpl( this, CUI_RES( WIN_PREVIEW1 ), sal_False ) ), + aColTransFT ( this, CUI_RES( FT_COL_TRANS ) ), aColTransMF ( this, CUI_RES( MF_COL_TRANS ) ), - aBtnBrowse ( this, CUI_RES( BTN_BROWSE ) ), - aBtnLink ( this, CUI_RES( BTN_LINK ) ), aBtnPreview ( this, CUI_RES( BTN_PREVIEW ) ), - aFtFile ( this, CUI_RES( FT_FILE ) ), aGbFile ( this, CUI_RES( GB_FILE ) ), + aBtnBrowse ( this, CUI_RES( BTN_BROWSE ) ), + aBtnLink ( this, CUI_RES( BTN_LINK ) ), + aGbPosition ( this, CUI_RES( GB_POSITION ) ), aBtnPosition ( this, CUI_RES( BTN_POSITION ) ), aBtnArea ( this, CUI_RES( BTN_AREA ) ), aBtnTile ( this, CUI_RES( BTN_TILE ) ), aWndPosition ( this, CUI_RES( WND_POSITION ), RP_MM ), - aGbPosition ( this, CUI_RES( GB_POSITION ) ), + aFtFile ( this, CUI_RES( FT_FILE ) ), aGraphTransFL ( this, CUI_RES( FL_GRAPH_TRANS ) ), aGraphTransMF ( this, CUI_RES( MF_GRAPH_TRANS ) ), pPreviewWin2 ( new BackgroundPreviewImpl( - this, CUI_RES( WIN_PREVIEW2 ), TRUE ) ), - aSelectTxt ( this, CUI_RES( FT_SELECTOR ) ), - aLbSelect ( this, CUI_RES( LB_SELECTOR ) ), - aStrBrowse ( CUI_RES( STR_BROWSE ) ), - aStrUnlinked ( CUI_RES( STR_UNLINKED ) ), - aTblDesc ( this, CUI_RES( FT_TBL_DESC ) ), - aTblLBox ( this, CUI_RES( LB_TBL_BOX ) ), - aParaLBox ( this, CUI_RES( LB_PARA_BOX ) ), + this, CUI_RES( WIN_PREVIEW2 ), sal_True ) ), + nHtmlMode ( 0 ), - bAllowShowSelector ( TRUE ), - bIsGraphicValid ( FALSE ), - bLinkOnly ( FALSE ), - bResized ( FALSE ), - bColTransparency ( FALSE ), - bGraphTransparency ( FALSE ), + bAllowShowSelector ( sal_True ), + bIsGraphicValid ( sal_False ), + bLinkOnly ( sal_False ), + bResized ( sal_False ), + bColTransparency ( sal_False ), + bGraphTransparency ( sal_False ), pPageImpl ( new SvxBackgroundPage_Impl ), pImportDlg ( NULL ), @@ -363,7 +365,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, const SfxPoolItem* pItem; SfxObjectShell* pShell; - if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_HTML_MODE, FALSE, &pItem ) + if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_HTML_MODE, sal_False, &pItem ) || ( 0 != ( pShell = SfxObjectShell::Current()) && 0 != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) ) { @@ -374,6 +376,11 @@ SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent, aBackgroundColorSet.SetSelectHdl( HDL(BackgroundColorHdl_Impl) ); FreeResource(); + + aBtnBrowse.SetAccessibleRelationMemberOf(&aGbFile); + aWndPosition.SetAccessibleRelationMemberOf(&aGbPosition); + aWndPosition.SetAccessibleRelationLabeledBy(&aBtnPosition); + aBackgroundColorSet.SetAccessibleRelationLabeledBy(&aBackgroundColorBox); } //------------------------------------------------------------------------ @@ -404,7 +411,7 @@ SvxBackgroundTabPage::~SvxBackgroundTabPage() //------------------------------------------------------------------------ -USHORT* SvxBackgroundTabPage::GetRanges() +sal_uInt16* SvxBackgroundTabPage::GetRanges() /* [Beschreibung] @@ -437,7 +444,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) // es muss aber im rSet vorhanden sein! // const SfxPoolItem* pX = GetOldItem( rSet, SID_VIEW_FLD_PIC ); // if( pX && pX->ISA(SfxWallpaperItem)) - if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), FALSE)) + if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), sal_False)) { ResetFromWallpaperItem( rSet ); return; @@ -448,17 +455,17 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) aBtnPreview.Check( aUserData.Len() && sal_Unicode('1') == aUserData.GetChar( 0 ) ); // nach Reset kein ShowSelector() mehr aufrufen d"urfen - bAllowShowSelector = FALSE; + bAllowShowSelector = sal_False; // Input-BrushItem besorgen und auswerten const SvxBrushItem* pBgdAttr = NULL; - USHORT nSlot = SID_ATTR_BRUSH; + sal_uInt16 nSlot = SID_ATTR_BRUSH; const SfxPoolItem* pItem; - USHORT nDestValue = USHRT_MAX; + sal_uInt16 nDestValue = USHRT_MAX; if ( SFX_ITEM_SET == rSet.GetItemState( SID_BACKGRND_DESTINATION, - FALSE, &pItem ) ) + sal_False, &pItem ) ) { nDestValue = ((const SfxUInt16Item*)pItem)->GetValue(); aTblLBox.SelectEntryPos(nDestValue); @@ -477,11 +484,11 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) } } else if( SFX_ITEM_SET == rSet.GetItemState( - SID_PARA_BACKGRND_DESTINATION, FALSE, &pItem ) ) + SID_PARA_BACKGRND_DESTINATION, sal_False, &pItem ) ) { nDestValue = ((const SfxUInt16Item*)pItem)->GetValue(); // ist gerade Zeichen aktiviert? - USHORT nParaSel = aParaLBox.GetSelectEntryPos(); + sal_uInt16 nParaSel = aParaLBox.GetSelectEntryPos(); if(1 == nParaSel) { // dann war das ein "Standard" - Aufruf @@ -502,9 +509,9 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) //#111173# the destination item is missing when the parent style has been changed if(USHRT_MAX == nDestValue && (aParaLBox.IsVisible()||aTblLBox.IsVisible())) nDestValue = 0; - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); - if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE ) pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) ); aBtnTile.Check(); @@ -531,7 +538,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) { if(aTblLBox.IsVisible()) { - USHORT nValue = aTblLBox.GetSelectEntryPos(); + sal_uInt16 nValue = aTblLBox.GetSelectEntryPos(); if ( pTableBck_Impl ) { @@ -545,21 +552,21 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) pTableBck_Impl->nActPos = nValue; nWhich = GetWhich( SID_ATTR_BRUSH ); - if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) ); pTableBck_Impl->pCellBrush = new SvxBrushItem(*pBgdAttr); } pTableBck_Impl->nCellWhich = nWhich; - if ( rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False ) >= SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( SID_ATTR_BRUSH_ROW ) ); pTableBck_Impl->pRowBrush = new SvxBrushItem(*pBgdAttr); } pTableBck_Impl->nRowWhich = SID_ATTR_BRUSH_ROW; - if ( rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False ) >= SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( SID_ATTR_BRUSH_TABLE ) ); pTableBck_Impl->pTableBrush = new SvxBrushItem(*pBgdAttr); @@ -571,7 +578,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) } else { - USHORT nValue = aParaLBox.GetSelectEntryPos(); + sal_uInt16 nValue = aParaLBox.GetSelectEntryPos(); if ( pParaBck_Impl ) { @@ -584,16 +591,16 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) pParaBck_Impl->nActPos = nValue; nWhich = GetWhich( SID_ATTR_BRUSH ); - if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) ); pParaBck_Impl->pParaBrush = new SvxBrushItem(*pBgdAttr); } nWhich = GetWhich( SID_ATTR_BRUSH_CHAR ); - rSet.GetItemState( nWhich, TRUE ); - rSet.GetItemState( nWhich, FALSE ); - if ( rSet.GetItemState( nWhich, TRUE ) > SFX_ITEM_AVAILABLE ) + rSet.GetItemState( nWhich, sal_True ); + rSet.GetItemState( nWhich, sal_False ); + if ( rSet.GetItemState( nWhich, sal_True ) > SFX_ITEM_AVAILABLE ) { pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) ); pParaBck_Impl->pCharBrush = new SvxBrushItem(*pBgdAttr); @@ -619,6 +626,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet ) aPos.Y() = nY; pPreviewWin1->SetPosPixel(aPos); aBackgroundColorBox.Hide(); + aBackgroundColorSet.SetAccessibleRelationLabeledBy(&aBackgroundColorSet); } } } @@ -633,12 +641,12 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) // Input-BrushItem besorgen und auswerten const SvxBrushItem* pBgdAttr = NULL; - USHORT nSlot = SID_VIEW_FLD_PIC; - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nSlot = SID_VIEW_FLD_PIC; + sal_uInt16 nWhich = GetWhich( nSlot ); SvxBrushItem* pTemp = 0; const CntWallpaperItem* pItem = 0; - if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE ) + if ( rSet.GetItemState( nWhich, sal_False ) >= SFX_ITEM_AVAILABLE ) { pItem = (const CntWallpaperItem*)&rSet.Get( nWhich ); pTemp = new SvxBrushItem( *pItem, nWhich ); @@ -654,7 +662,7 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) if( aBgdColor != pBgdAttr->GetColor() ) { aBgdColor = pBgdAttr->GetColor(); - USHORT nCol = GetItemId_Impl( aBackgroundColorSet, aBgdColor ); + sal_uInt16 nCol = GetItemId_Impl( aBackgroundColorSet, aBgdColor ); aBackgroundColorSet.SelectItem( nCol ); pPreviewWin1->NotifyChange( aBgdColor ); } @@ -670,10 +678,10 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) } // We now have always a link to the background - bLinkOnly = TRUE; - aBtnLink.Check( TRUE ); - aBtnLink.Show( FALSE ); -// if( !pItem || !pItem->GetWallpaper(FALSE).IsBitmap() ) + bLinkOnly = sal_True; + aBtnLink.Check( sal_True ); + aBtnLink.Show( sal_False ); +// if( !pItem || !pItem->GetWallpaper(sal_False).IsBitmap() ) // aBtnLink.Check(); delete pTemp; @@ -699,7 +707,7 @@ void SvxBackgroundTabPage::FillUserData() //------------------------------------------------------------------------ -BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) { if ( pPageImpl->pLoadTimer && pPageImpl->pLoadTimer->IsActive() ) { @@ -711,11 +719,11 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) // const SfxPoolItem* pX = GetOldItem( rCoreSet, SID_VIEW_FLD_PIC ); // if( pX && pX->ISA(SfxWallpaperItem)) - if(SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), FALSE)) + if(SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), sal_False)) return FillItemSetWithWallpaperItem( rCoreSet, SID_VIEW_FLD_PIC ); - BOOL bModified = FALSE; - USHORT nSlot = SID_ATTR_BRUSH; + sal_Bool bModified = sal_False; + sal_uInt16 nSlot = SID_ATTR_BRUSH; if ( aTblLBox.IsVisible() ) { @@ -744,18 +752,18 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) break; } } - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); const SfxPoolItem* pOld = GetOldItem( rCoreSet, nSlot ); - SfxItemState eOldItemState = rCoreSet.GetItemState(nSlot, FALSE); + SfxItemState eOldItemState = rCoreSet.GetItemState(nSlot, sal_False); const SfxItemSet& rOldSet = GetItemSet(); - BOOL bGraphTransparencyChanged = bGraphTransparency && (aGraphTransMF.GetText() != aGraphTransMF.GetSavedValue()); + sal_Bool bGraphTransparencyChanged = bGraphTransparency && (aGraphTransMF.GetText() != aGraphTransMF.GetSavedValue()); if ( pOld ) { const SvxBrushItem& rOldItem = (const SvxBrushItem&)*pOld; SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos(); - const BOOL bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() ); + const sal_Bool bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() ); // transparency has to be set if enabled, the color not already set to "No fill" and if( bColTransparency && @@ -774,10 +782,10 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( rOldItem.GetColor() != aBgdColor || (SFX_ITEM_AVAILABLE >= eOldItemState && !aBackgroundColorSet.IsNoSelection())) { - bModified = TRUE; + bModified = sal_True; rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) ); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rCoreSet.ClearItem( nWhich ); } else @@ -785,8 +793,8 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) // Bitmap-Behandlung: SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); - const BOOL bIsLink = aBtnLink.IsChecked(); - const BOOL bWasLink = (NULL != rOldItem.GetGraphicLink() ); + const sal_Bool bIsLink = aBtnLink.IsChecked(); + const sal_Bool bWasLink = (NULL != rOldItem.GetGraphicLink() ); if ( !bIsLink && !bIsGraphicValid ) @@ -801,7 +809,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) != aBgdGraphic.GetBitmap() ) ) { - bModified = TRUE; + bModified = sal_True; SvxBrushItem aTmpBrush(nWhich); if ( bIsLink ) @@ -819,7 +827,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) rCoreSet.Put(aTmpBrush); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rCoreSet.ClearItem( nWhich ); } } @@ -860,7 +868,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) else if ( SID_ATTR_BRUSH_CHAR == nSlot && aBgdColor != Color( COL_WHITE ) ) { rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) ); - bModified = TRUE; + bModified = sal_True; } if( aTblLBox.IsVisible() ) @@ -874,7 +882,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( *pTableBck_Impl->pCellBrush != *pOldCell ) { rCoreSet.Put( *pTableBck_Impl->pCellBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -886,7 +894,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( *pTableBck_Impl->pRowBrush != *pOldRow ) { rCoreSet.Put( *pTableBck_Impl->pRowBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -898,7 +906,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( *pTableBck_Impl->pTableBrush != *pOldTable ) { rCoreSet.Put( *pTableBck_Impl->pTableBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -906,7 +914,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) { rCoreSet.Put( SfxUInt16Item( SID_BACKGRND_DESTINATION, aTblLBox.GetSelectEntryPos() ) ); - bModified |= TRUE; + bModified |= sal_True; } } else if(aParaLBox.GetData() == &aParaLBox) @@ -920,7 +928,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( *pParaBck_Impl->pParaBrush != *pOldPara ) { rCoreSet.Put( *pParaBck_Impl->pParaBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -936,7 +944,7 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) *pParaBck_Impl->pCharBrush != SvxBrushItem(SID_ATTR_BRUSH_CHAR))) { rCoreSet.Put( *pParaBck_Impl->pCharBrush ); - bModified |= TRUE; + bModified |= sal_True; } } @@ -944,23 +952,23 @@ BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet ) { rCoreSet.Put( SfxUInt16Item( SID_BACKGRND_DESTINATION, aParaLBox.GetSelectEntryPos() ) ); - bModified |= TRUE; + bModified |= sal_True; } } return bModified; } -BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, USHORT nSlot) +sal_Bool SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, sal_uInt16 nSlot) { - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); const SfxPoolItem* pOld = GetOldItem( rCoreSet, nSlot ); const SfxItemSet& rOldSet = GetItemSet(); DBG_ASSERT(pOld,"FillItemSetWithWallpaperItem: Item not found"); SvxBrushItem rOldItem( (const CntWallpaperItem&)*pOld, nWhich ); SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos(); - const BOOL bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() ); - BOOL bModified = FALSE; + const sal_Bool bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() ); + sal_Bool bModified = sal_False; if ( ( (GPOS_NONE == eOldPos) && bIsBrush ) || ( (GPOS_NONE != eOldPos) && !bIsBrush ) ) // Brush <-> Bitmap gewechselt? @@ -972,12 +980,12 @@ BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, U // Brush-Behandlung: if ( rOldItem.GetColor() != aBgdColor ) { - bModified = TRUE; + bModified = sal_True; CntWallpaperItem aItem( nWhich ); aItem.SetColor( aBgdColor ); rCoreSet.Put( aItem ); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rCoreSet.ClearItem( nWhich ); } else @@ -990,16 +998,16 @@ BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, U int bBrushChanged = ( rOldItem.GetColor() != aBgdColor ); if( bBitmapChanged || bBrushChanged ) { - bModified = TRUE; + bModified = sal_True; CntWallpaperItem aItem( nWhich ); WallpaperStyle eWallStyle = SvxBrushItem::GraphicPos2WallpaperStyle(eNewPos); - aItem.SetStyle( sal::static_int_cast< USHORT >( eWallStyle ) ); + aItem.SetStyle( sal::static_int_cast< sal_uInt16 >( eWallStyle ) ); aItem.SetColor( aBgdColor ); aItem.SetBitmapURL( aBgdGraphicPath ); rCoreSet.Put( aItem ); } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rCoreSet.ClearItem( nWhich ); } } @@ -1015,13 +1023,13 @@ BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, U { WallpaperStyle eWallStyle = SvxBrushItem::GraphicPos2WallpaperStyle( GetGraphicPosition_Impl() ); - aItem.SetStyle( sal::static_int_cast< USHORT >( eWallStyle ) ); + aItem.SetStyle( sal::static_int_cast< sal_uInt16 >( eWallStyle ) ); aItem.SetColor( aBgdColor ); aItem.SetBitmapURL( aBgdGraphicPath ); rCoreSet.Put( aItem ); } - bModified = TRUE; + bModified = sal_True; } return bModified; } @@ -1074,13 +1082,13 @@ void SvxBackgroundTabPage::ShowSelector() pPageImpl->pLoadTimer->SetTimeoutHdl( LINK( this, SvxBackgroundTabPage, LoadTimerHdl_Impl ) ); - bAllowShowSelector = FALSE; + bAllowShowSelector = sal_False; if(nHtmlMode & HTMLMODE_ON) { if(!(nHtmlMode & HTMLMODE_GRAPH_POS)) - aBtnPosition.Enable(FALSE); - aBtnArea.Enable(FALSE); + aBtnPosition.Enable(sal_False); + aBtnArea.Enable(sal_False); } } } @@ -1103,9 +1111,9 @@ void SvxBackgroundTabPage::RaiseLoadError_Impl() //------------------------------------------------------------------------ -BOOL SvxBackgroundTabPage::LoadLinkedGraphic_Impl() +sal_Bool SvxBackgroundTabPage::LoadLinkedGraphic_Impl() { - BOOL bResult = ( aBgdGraphicPath.Len() > 0 ) && + sal_Bool bResult = ( aBgdGraphicPath.Len() > 0 ) && ( GRFILTER_OK == GraphicFilter::LoadGraphic( aBgdGraphicPath, aBgdGraphicFilter, aBgdGraphic ) ); @@ -1134,7 +1142,7 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl() if ( !pColorTable ) { - bOwn = TRUE; + bOwn = sal_True; pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() ); } @@ -1148,6 +1156,7 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl() WinBits nBits = ( aBackgroundColorSet.GetStyle() | WB_ITEMBORDER | WB_NAMEFIELD | WB_NONEFIELD ); aBackgroundColorSet.SetText( SVX_RESSTR( RID_SVXSTR_TRANSPARENT ) ); aBackgroundColorSet.SetStyle( nBits ); + aBackgroundColorSet.SetAccessibleName(aBackgroundColorBox.GetText()); for ( i = 0; i < nCount; i++ ) { pEntry = pColorTable->GetColor(i); @@ -1207,8 +1216,8 @@ void SvxBackgroundTabPage::ShowColorUI_Impl() aWndPosition.Hide(); aGbPosition.Hide(); pPreviewWin2->Hide(); - aGraphTransFL.Show(FALSE); - aGraphTransMF.Show(FALSE); + aGraphTransFL.Show(sal_False); + aGraphTransMF.Show(sal_False); if(bColTransparency) { aColTransFT.Show(); @@ -1255,8 +1264,8 @@ void SvxBackgroundTabPage::ShowBitmapUI_Impl() aGraphTransFL.Show(); aGraphTransMF.Show(); } - aColTransFT.Show(FALSE); - aColTransMF.Show(FALSE); + aColTransFT.Show(sal_False); + aColTransMF.Show(sal_False); } } @@ -1353,11 +1362,11 @@ IMPL_LINK( SvxBackgroundTabPage, BackgroundColorHdl_Impl, ValueSet*, EMPTYARG ) Handler, called when color selection is changed */ { - USHORT nItemId = aBackgroundColorSet.GetSelectItemId(); + sal_uInt16 nItemId = aBackgroundColorSet.GetSelectItemId(); Color aColor = nItemId ? ( aBackgroundColorSet.GetItemColor( nItemId ) ) : Color( COL_TRANSPARENT ); aBgdColor = aColor; pPreviewWin1->NotifyChange( aBgdColor ); - BOOL bEnableTransp = aBgdColor.GetTransparency() < 0xff; + sal_Bool bEnableTransp = aBgdColor.GetTransparency() < 0xff; aColTransFT.Enable(bEnableTransp); aColTransMF.Enable(bEnableTransp); return 0; @@ -1375,7 +1384,7 @@ IMPL_LINK( SvxBackgroundTabPage, SelectHdl_Impl, ListBox*, EMPTYARG ) else { ShowBitmapUI_Impl(); - aParaLBox.Enable(FALSE);// Zeichenhintergrund kann keine Bitmap sein + aParaLBox.Enable(sal_False);// Zeichenhintergrund kann keine Bitmap sein } return 0; } @@ -1457,16 +1466,16 @@ IMPL_LINK( SvxBackgroundTabPage, BrowseHdl_Impl, PushButton* , EMPTYARG ) { if ( pPageImpl->pLoadTimer->IsActive() ) return 0; - BOOL bHtml = 0 != ( nHtmlMode & HTMLMODE_ON ); + sal_Bool bHtml = 0 != ( nHtmlMode & HTMLMODE_ON ); pImportDlg = new SvxOpenGraphicDialog( aStrBrowse ); if ( bHtml || bLinkOnly ) pImportDlg->EnableLink(sal_False); pImportDlg->SetPath( aBgdGraphicPath, aBtnLink.IsChecked() ); - pPageImpl->bIsImportDlgInExecute = TRUE; + pPageImpl->bIsImportDlgInExecute = sal_True; short nErr = pImportDlg->Execute(); - pPageImpl->bIsImportDlgInExecute = FALSE; + pPageImpl->bIsImportDlgInExecute = sal_False; if( !nErr ) { @@ -1476,7 +1485,7 @@ IMPL_LINK( SvxBackgroundTabPage, BrowseHdl_Impl, PushButton* , EMPTYARG ) // dann die Vorschau aktivieren, damit der Anwender sieht, // welche Grafik er ausgew"ahlt hat if ( !aBtnLink.IsChecked() && !aBtnPreview.IsChecked() ) - aBtnPreview.Check( TRUE ); + aBtnPreview.Check( sal_True ); // timer-verz"ogertes Laden der Grafik pPageImpl->pLoadTimer->Start(); } @@ -1510,7 +1519,7 @@ IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, Timer* , pTimer ) // neue Datei gew"ahlt aBgdGraphicPath = pImportDlg->GetPath(); aBgdGraphicFilter = pImportDlg->GetCurrentFilter(); - BOOL bLink = ( nHtmlMode & HTMLMODE_ON ) || bLinkOnly ? TRUE : pImportDlg->IsAsLink(); + sal_Bool bLink = ( nHtmlMode & HTMLMODE_ON ) || bLinkOnly ? sal_True : pImportDlg->IsAsLink(); aBtnLink.Check( bLink ); aBtnLink.Enable(); @@ -1518,17 +1527,17 @@ IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, Timer* , pTimer ) { if( !pImportDlg->GetGraphic(aBgdGraphic) ) { - bIsGraphicValid = TRUE; + bIsGraphicValid = sal_True; } else { aBgdGraphicFilter.Erase(); aBgdGraphicPath.Erase(); - bIsGraphicValid = FALSE; + bIsGraphicValid = sal_False; } } else - bIsGraphicValid = FALSE; // Grafik erst beim Preview-Click laden + bIsGraphicValid = sal_False; // Grafik erst beim Preview-Click laden if ( aBtnPreview.IsChecked() && bIsGraphicValid ) { @@ -1558,7 +1567,7 @@ void SvxBackgroundTabPage::ShowTblControl() //----------------------------------------------------------------------- -void SvxBackgroundTabPage::ShowParaControl(BOOL bCharOnly) +void SvxBackgroundTabPage::ShowParaControl(sal_Bool bCharOnly) { aParaLBox.SetSelectHdl(HDL(ParaDestinationHdl_Impl)); aParaLBox.SelectEntryPos(0); @@ -1573,11 +1582,11 @@ void SvxBackgroundTabPage::ShowParaControl(BOOL bCharOnly) IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) { - USHORT nSelPos = pBox->GetSelectEntryPos(); + sal_uInt16 nSelPos = pBox->GetSelectEntryPos(); if( pTableBck_Impl && pTableBck_Impl->nActPos != nSelPos) { SvxBrushItem** pActItem = new (SvxBrushItem*); - USHORT nWhich = 0; + sal_uInt16 nWhich = 0; switch(pTableBck_Impl->nActPos) { case TBL_DEST_CELL: @@ -1603,7 +1612,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) else { SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); - const BOOL bIsLink = aBtnLink.IsChecked(); + const sal_Bool bIsLink = aBtnLink.IsChecked(); if ( !bIsLink && !bIsGraphicValid ) bIsGraphicValid = LoadLinkedGraphic_Impl(); @@ -1652,7 +1661,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) { - USHORT nSelPos = pBox->GetSelectEntryPos(); + sal_uInt16 nSelPos = pBox->GetSelectEntryPos(); if( pParaBck_Impl && pParaBck_Impl->nActPos != nSelPos) { SvxBrushItem** pActItem = new (SvxBrushItem*); @@ -1668,13 +1677,13 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) pParaBck_Impl->nActPos = nSelPos; if(0 == aLbSelect.GetSelectEntryPos()) // Brush ausgewaehlt { - USHORT nWhich = (*pActItem)->Which(); + sal_uInt16 nWhich = (*pActItem)->Which(); **pActItem = SvxBrushItem( aBgdColor, nWhich ); } else { SvxGraphicPosition eNewPos = GetGraphicPosition_Impl(); - const BOOL bIsLink = aBtnLink.IsChecked(); + const sal_Bool bIsLink = aBtnLink.IsChecked(); if ( !bIsLink && !bIsGraphicValid ) bIsGraphicValid = LoadLinkedGraphic_Impl(); @@ -1698,7 +1707,7 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) case PARA_DEST_CHAR: { *pActItem = pParaBck_Impl->pCharBrush; - aLbSelect.Enable(FALSE); + aLbSelect.Enable(sal_False); } break; } @@ -1720,7 +1729,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, { aColTransMF.SetValue(lcl_TransparencyToPercent(rColor.GetTransparency())); aColTransMF.SaveValue(); - BOOL bEnableTransp = rColor.GetTransparency() < 0xff; + sal_Bool bEnableTransp = rColor.GetTransparency() < 0xff; aColTransFT.Enable(bEnableTransp); aColTransMF.Enable(bEnableTransp); //the default setting should be "no transparency" @@ -1735,7 +1744,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, Color aTrColor( COL_TRANSPARENT ); aBgdColor = rColor; - USHORT nCol = ( aTrColor != aBgdColor ) ? + sal_uInt16 nCol = ( aTrColor != aBgdColor ) ? GetItemId_Impl( aBackgroundColorSet, aBgdColor ) : 0; if( aTrColor != aBgdColor && nCol == 0) @@ -1754,8 +1763,8 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, aBgdGraphicPath.Erase(); if ( !rUserData.Len() ) - aBtnPreview.Check( FALSE ); - aBtnLink.Check( FALSE ); + aBtnPreview.Check( sal_False ); + aBtnLink.Check( sal_False ); aBtnLink.Disable(); pPreviewWin2->NotifyChange( NULL ); SetGraphicPosition_Impl( GPOS_TILED ); // Kacheln als Default @@ -1776,13 +1785,13 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" ); #endif aBgdGraphicPath = *pStrLink; - aBtnLink.Check( TRUE ); + aBtnLink.Check( sal_True ); aBtnLink.Enable(); } else { aBgdGraphicPath.Erase(); - aBtnLink.Check( FALSE ); + aBtnLink.Check( sal_False ); aBtnLink.Disable(); } @@ -1815,7 +1824,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, else if ( pGraphic ) { aBgdGraphic = *pGraphic; - bIsGraphicValid = TRUE; + bIsGraphicValid = sal_True; if ( !rUserData.Len() ) aBtnPreview.Check(); @@ -1823,10 +1832,10 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, else { RaiseLoadError_Impl(); - bIsGraphicValid = FALSE; + bIsGraphicValid = sal_False; if ( !rUserData.Len() ) - aBtnPreview.Check( FALSE ); + aBtnPreview.Check( sal_False ); } } @@ -1842,7 +1851,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, } } -void SvxBackgroundTabPage::EnableTransparency(BOOL bColor, BOOL bGraphic) +void SvxBackgroundTabPage::EnableTransparency(sal_Bool bColor, sal_Bool bGraphic) { bColTransparency = bColor; bGraphTransparency = bGraphic; @@ -1869,7 +1878,7 @@ void SvxBackgroundTabPage::PageCreated (SfxAllItemSet aSet) SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,sal_False); if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_SHOW_TBLCTL ) == SVX_SHOW_TBLCTL ) ShowTblControl(); if ( ( nFlags & SVX_SHOW_PARACTL ) == SVX_SHOW_PARACTL ) @@ -1877,7 +1886,7 @@ void SvxBackgroundTabPage::PageCreated (SfxAllItemSet aSet) if ( ( nFlags & SVX_SHOW_SELECTOR ) == SVX_SHOW_SELECTOR ) ShowSelector(); if ( ( nFlags & SVX_ENABLE_TRANSPARENCY ) == SVX_ENABLE_TRANSPARENCY ) - EnableTransparency(TRUE, TRUE); + EnableTransparency(sal_True, sal_True); } } diff --git a/cui/source/tabpages/backgrnd.src b/cui/source/tabpages/backgrnd.src index 395465a8c..5e670d295 100644 --- a/cui/source/tabpages/backgrnd.src +++ b/cui/source/tabpages/backgrnd.src @@ -54,6 +54,7 @@ TabPage RID_SVXPAGE_BACKGROUND }; ListBox LB_SELECTOR { + HelpID = "cui:ListBox:RID_SVXPAGE_BACKGROUND:LB_SELECTOR"; Hide = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 33 , 3 ) ; @@ -75,6 +76,7 @@ TabPage RID_SVXPAGE_BACKGROUND }; ListBox LB_TBL_BOX { + HelpID = "cui:ListBox:RID_SVXPAGE_BACKGROUND:LB_TBL_BOX"; Hide = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 172 , 3 ) ; @@ -89,6 +91,7 @@ TabPage RID_SVXPAGE_BACKGROUND }; ListBox LB_PARA_BOX { + HelpID = "cui:ListBox:RID_SVXPAGE_BACKGROUND:LB_PARA_BOX"; Hide = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 172 , 3 ) ; @@ -139,6 +142,7 @@ TabPage RID_SVXPAGE_BACKGROUND }; MetricField MF_COL_TRANS { + HelpID = "cui:MetricField:RID_SVXPAGE_BACKGROUND:MF_COL_TRANS"; Hide = TRUE ; Pos = MAP_APPFONT ( 218 , 74 + RSC_SP_CTRL_Y ) ; Size = MAP_APPFONT ( 30 , 12) ; @@ -164,6 +168,7 @@ TabPage RID_SVXPAGE_BACKGROUND }; PushButton BTN_BROWSE { + HelpID = "cui:PushButton:RID_SVXPAGE_BACKGROUND:BTN_BROWSE"; Hide = TRUE ; Pos = MAP_APPFONT ( 6 + RSC_SP_FLGR_INNERBORDER_LEFT , 23 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP ) ; Size = MAP_APPFONT ( 60 , 14 ) ; @@ -171,6 +176,7 @@ TabPage RID_SVXPAGE_BACKGROUND }; CheckBox BTN_LINK { + HelpID = "cui:CheckBox:RID_SVXPAGE_BACKGROUND:BTN_LINK"; Hide = TRUE ; Pos = MAP_APPFONT ( 6 + RSC_SP_FLGR_INNERBORDER_LEFT + 60 + 2*RSC_SP_CTRL_X, 23 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP + 3 ) ; Size = MAP_APPFONT ( 78 , 10 ) ; @@ -192,6 +198,7 @@ TabPage RID_SVXPAGE_BACKGROUND }; RadioButton BTN_POSITION { + HelpID = "cui:RadioButton:RID_SVXPAGE_BACKGROUND:BTN_POSITION"; Hide = TRUE ; Pos = MAP_APPFONT ( 12 , 89 ) ; Size = MAP_APPFONT ( 49 , 10 ) ; @@ -199,6 +206,7 @@ TabPage RID_SVXPAGE_BACKGROUND }; RadioButton BTN_AREA { + HelpID = "cui:RadioButton:RID_SVXPAGE_BACKGROUND:BTN_AREA"; Hide = TRUE ; Pos = MAP_APPFONT ( 12 , 103 ) ; Size = MAP_APPFONT ( 49 , 10 ) ; @@ -206,6 +214,7 @@ TabPage RID_SVXPAGE_BACKGROUND }; RadioButton BTN_TILE { + HelpID = "cui:RadioButton:RID_SVXPAGE_BACKGROUND:BTN_TILE"; Hide = TRUE ; Pos = MAP_APPFONT ( 12 , 117 ) ; Size = MAP_APPFONT ( 49 , 10 ) ; @@ -229,6 +238,7 @@ TabPage RID_SVXPAGE_BACKGROUND }; MetricField MF_GRAPH_TRANS { + HelpID = "cui:MetricField:RID_SVXPAGE_BACKGROUND:MF_GRAPH_TRANS"; Hide = TRUE ; Pos = MAP_APPFONT ( 12 , 168 ) ; Size = MAP_APPFONT ( 30 , 12) ; @@ -252,6 +262,7 @@ TabPage RID_SVXPAGE_BACKGROUND }; CheckBox BTN_PREVIEW { + HelpID = "cui:CheckBox:RID_SVXPAGE_BACKGROUND:BTN_PREVIEW"; Pos = MAP_APPFONT ( 170 , 23 + 4 + 139 + RSC_SP_CTRL_GROUP_Y ) ; Size = MAP_APPFONT ( 141 , 10 ) ; Text [ en-US ] = "Pre~view" ; diff --git a/cui/source/tabpages/bbdlg.cxx b/cui/source/tabpages/bbdlg.cxx index af6197312..3133b2fb7 100644 --- a/cui/source/tabpages/bbdlg.cxx +++ b/cui/source/tabpages/bbdlg.cxx @@ -41,7 +41,7 @@ SvxBorderBackgroundDlg::SvxBorderBackgroundDlg( Window *pParent, const SfxItemSet& rCoreSet, - BOOL bEnableSelector ) : + sal_Bool bEnableSelector ) : SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_BBDLG ), &rCoreSet ), bEnableBackgroundSelector( bEnableSelector ) @@ -59,7 +59,7 @@ SvxBorderBackgroundDlg::~SvxBorderBackgroundDlg() // ----------------------------------------------------------------------- -void SvxBorderBackgroundDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage ) +void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) { // Umschalten zwischen Farbe/Grafik ermoeglichen: diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index e4ab0aa8b..0eb4d3a98 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -74,7 +74,7 @@ // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_SHADOW, SID_ATTR_ALIGN_MARGIN, SID_ATTR_ALIGN_MARGIN, @@ -84,7 +84,7 @@ static USHORT pRanges[] = 0 }; -BOOL SvxBorderTabPage::bSync = TRUE; +sal_Bool SvxBorderTabPage::bSync = sal_True; //------------------------------------------------------------------------ @@ -154,17 +154,6 @@ Color TpBorderRGBColor( ColorData aColorData ) } // ----------------------------------------------------------------------- - -Color TpBorderRGBColor( const Color& rColor ) -{ - Color aRGBColor( rColor.GetRed(), - rColor.GetGreen(), - rColor.GetBlue() ); - - return( aRGBColor ); -} - -// ----------------------------------------------------------------------- void lcl_SetDecimalDigitsTo1(MetricField& rField) { sal_Int64 nMin = rField.Denormalize( rField.GetMin( FUNIT_TWIP ) ); @@ -230,7 +219,7 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent, /* Use SvxMarginItem instead of margins from SvxBoxItem, if present. -> Remember this state in mbUseMarginItem, because other special handling is needed across various functions... */ - mbUseMarginItem = rCoreAttrs.GetItemState(GetWhich(SID_ATTR_ALIGN_MARGIN),TRUE) != SFX_ITEM_UNKNOWN; + mbUseMarginItem = rCoreAttrs.GetItemState(GetWhich(SID_ATTR_ALIGN_MARGIN),sal_True) != SFX_ITEM_UNKNOWN; // Metrik einstellen FieldUnit eFUnit = GetModuleFieldUnit( rCoreAttrs ); @@ -271,10 +260,10 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent, SetFieldUnit( aEdShadowSize, eFUnit ); - USHORT nWhich = GetWhich( SID_ATTR_BORDER_INNER, sal_False ); - BOOL bIsDontCare = TRUE; + sal_uInt16 nWhich = GetWhich( SID_ATTR_BORDER_INNER, sal_False ); + sal_Bool bIsDontCare = sal_True; - if ( rCoreAttrs.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE ) + if ( rCoreAttrs.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { // Absatz oder Tabelle const SvxBoxInfoItem* pBoxInfo = @@ -366,14 +355,14 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent, if ( pColorTable ) { // fuellen der Linienfarben-Box - aLbLineColor.SetUpdateMode( FALSE ); + aLbLineColor.SetUpdateMode( sal_False ); for ( long i = 0; i < pColorTable->Count(); ++i ) { XColorEntry* pEntry = pColorTable->GetColor(i); aLbLineColor.InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - aLbLineColor.SetUpdateMode( TRUE ); + aLbLineColor.SetUpdateMode( sal_True ); // dann nur noch in die Schattenfarben-Box kopieren aLbShadowColor.CopyEntries( aLbLineColor ); } @@ -411,7 +400,7 @@ SvxBorderTabPage::~SvxBorderTabPage() // ----------------------------------------------------------------------- -USHORT* SvxBorderTabPage::GetRanges() +sal_uInt16* SvxBorderTabPage::GetRanges() { return pRanges; } @@ -445,7 +434,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) const SvxBoxItem* pBoxItem; const SvxBoxInfoItem* pBoxInfoItem; - USHORT nWhichBox = GetWhich(SID_ATTR_BORDER_OUTER); + sal_uInt16 nWhichBox = GetWhich(SID_ATTR_BORDER_OUTER); SfxMapUnit eCoreUnit; pBoxItem = (const SvxBoxItem*)GetItem( rSet, SID_ATTR_BORDER_OUTER ); @@ -488,9 +477,9 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) if ( pBoxInfoItem->IsDist() ) { - if( rSet.GetItemState( nWhichBox, TRUE ) >= SFX_ITEM_DEFAULT ) + if( rSet.GetItemState( nWhichBox, sal_True ) >= SFX_ITEM_DEFAULT ) { - BOOL bIsAnyBorderVisible = aFrameSel.IsAnyBorderVisible(); + sal_Bool bIsAnyBorderVisible = aFrameSel.IsAnyBorderVisible(); if( !bIsAnyBorderVisible || !pBoxInfoItem->IsMinDist() ) { aLeftMF.SetMin( 0 ); @@ -519,7 +508,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) // or it is null with an active border line // no automatic changes should be made const long nDefDist = bIsAnyBorderVisible ? pBoxInfoItem->GetDefDist() : 0; - BOOL bDiffDist = (nDefDist != nLeftDist || + sal_Bool bDiffDist = (nDefDist != nLeftDist || nDefDist != nRightDist || nDefDist != nTopDist || nDefDist != nBottomDist); @@ -559,7 +548,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) //------------------------------------------------------------- { // Do all visible lines show the same line widths? - USHORT nPrim, nDist, nSecn; + sal_uInt16 nPrim, nDist, nSecn; SvxBorderStyle nStyle; bool bWidthEq = aFrameSel.GetVisibleWidth( nPrim, nDist, nSecn, nStyle ); if( bWidthEq ) @@ -573,7 +562,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) if( !bColorEq ) aColor.SetColor( COL_BLACK ); - USHORT nSelPos = aLbLineColor.GetEntryPos( aColor ); + sal_uInt16 nSelPos = aLbLineColor.GetEntryPos( aColor ); if( nSelPos == LISTBOX_ENTRY_NOTFOUND ) nSelPos = aLbLineColor.InsertEntry( aColor, SVX_RESSTR( RID_SVXSTR_COLOR_USER ) ); @@ -589,7 +578,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) SelColHdl_Impl( &aLbLineColor ); } - BOOL bEnable = aWndShadows.GetSelectItemId() > 1 ; + sal_Bool bEnable = aWndShadows.GetSelectItemId() > 1 ; aFtShadowSize.Enable(bEnable); aEdShadowSize.Enable(bEnable); aFtShadowColor.Enable(bEnable); @@ -607,11 +596,11 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) const SfxPoolItem* pItem; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) || + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) { - USHORT nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue(); if(nHtmlMode & HTMLMODE_ON) { //Im Html-Mode gibt es keinen Schatten und nur komplette Umrandungen @@ -623,14 +612,14 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) aLbShadowColor.Disable(); aFlShadow .Disable(); - USHORT nLBCount = aLbLineStyle.GetEntryCount(); + sal_uInt16 nLBCount = aLbLineStyle.GetEntryCount(); // ist es ein Absatzdialog, dann alle Linien fuer // Sw-Export, sonst ist die Page nicht da if(!(mbHorEnabled || mbVerEnabled) && 0 == (nHtmlMode & HTMLMODE_FULL_ABS_POS) && SFX_ITEM_AVAILABLE > rSet.GetItemState(GetWhich( SID_ATTR_PARA_LINESPACE ))) { - for( USHORT i = nLBCount - 1; i > LINESTYLE_HTML_MAX; --i) + for( sal_uInt16 i = nLBCount - 1; i > LINESTYLE_HTML_MAX; --i) aLbLineStyle.RemoveEntry(i); } @@ -662,13 +651,13 @@ int SvxBorderTabPage::DeactivatePage( SfxItemSet* _pSet ) #define IS_DONT_CARE(a) ((a).GetState() == svx::FRAMESTATE_DONTCARE ) -BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) +sal_Bool SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) { bool bAttrsChanged = SfxTabPage::FillItemSet( rCoreAttrs ); - BOOL bPut = TRUE; - USHORT nBoxWhich = GetWhich( SID_ATTR_BORDER_OUTER ); - USHORT nBoxInfoWhich = rCoreAttrs.GetPool()->GetWhich( SID_ATTR_BORDER_INNER, sal_False ); + sal_Bool bPut = sal_True; + sal_uInt16 nBoxWhich = GetWhich( SID_ATTR_BORDER_OUTER ); + sal_uInt16 nBoxInfoWhich = rCoreAttrs.GetPool()->GetWhich( SID_ATTR_BORDER_INNER, sal_False ); const SfxItemSet& rOldSet = GetItemSet(); SvxBoxItem aBoxItem ( nBoxWhich ); SvxBoxInfoItem aBoxInfoItem ( nBoxInfoWhich ); @@ -680,7 +669,7 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) //------------------ // Umrandung aussen: //------------------ - typedef ::std::pair<svx::FrameBorderType,USHORT> TBorderPair; + typedef ::std::pair<svx::FrameBorderType,sal_uInt16> TBorderPair; TBorderPair eTypes1[] = { TBorderPair(svx::FRAMEBORDER_TOP,BOX_LINE_TOP), TBorderPair(svx::FRAMEBORDER_BOTTOM,BOX_LINE_BOTTOM), @@ -710,7 +699,7 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) if( aLeftMF.IsVisible() ) { // #i40405# enable distance controls for next dialog call - aBoxInfoItem.SetDist( TRUE ); + aBoxInfoItem.SetDist( sal_True ); if( !mbUseMarginItem ) { @@ -741,10 +730,10 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) (pOldBoxInfoItem && !pOldBoxInfoItem->IsValid(VALID_DISTANCE)) ) { - aBoxItem.SetDistance( (USHORT)GetCoreValue( aLeftMF, eCoreUnit ), BOX_LINE_LEFT ); - aBoxItem.SetDistance( (USHORT)GetCoreValue( aRightMF, eCoreUnit ), BOX_LINE_RIGHT ); - aBoxItem.SetDistance( (USHORT)GetCoreValue( aTopMF, eCoreUnit ), BOX_LINE_TOP ); - aBoxItem.SetDistance( (USHORT)GetCoreValue( aBottomMF, eCoreUnit ), BOX_LINE_BOTTOM); + aBoxItem.SetDistance( (sal_uInt16)GetCoreValue( aLeftMF, eCoreUnit ), BOX_LINE_LEFT ); + aBoxItem.SetDistance( (sal_uInt16)GetCoreValue( aRightMF, eCoreUnit ), BOX_LINE_RIGHT ); + aBoxItem.SetDistance( (sal_uInt16)GetCoreValue( aTopMF, eCoreUnit ), BOX_LINE_TOP ); + aBoxItem.SetDistance( (sal_uInt16)GetCoreValue( aBottomMF, eCoreUnit ), BOX_LINE_BOTTOM); } else { @@ -753,10 +742,10 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) aBoxItem.SetDistance(pOldBoxItem->GetDistance(BOX_LINE_TOP ), BOX_LINE_TOP); aBoxItem.SetDistance(pOldBoxItem->GetDistance(BOX_LINE_BOTTOM), BOX_LINE_BOTTOM); } - aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE ); + aBoxInfoItem.SetValid( VALID_DISTANCE, sal_True ); } else - aBoxInfoItem.SetValid( VALID_DISTANCE, FALSE ); + aBoxInfoItem.SetValid( VALID_DISTANCE, sal_False ); } } } @@ -774,13 +763,13 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) // // Put oder Clear der Umrandung? // - bPut = TRUE; + bPut = sal_True; - if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxWhich, FALSE )) + if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxWhich, sal_False )) { bPut = aBoxItem != (const SvxBoxItem&)(rOldSet.Get(nBoxWhich)) ? sal_True : sal_False; } - if( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxInfoWhich, FALSE ) ) + if( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxInfoWhich, sal_False ) ) { const SvxBoxInfoItem& rOldBoxInfo = (const SvxBoxInfoItem&) rOldSet.Get(nBoxInfoWhich); @@ -795,14 +784,14 @@ BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) if ( !pOldBoxItem || !( *pOldBoxItem == aBoxItem ) ) { rCoreAttrs.Put( aBoxItem ); - bAttrsChanged |= TRUE; + bAttrsChanged |= sal_True; } pOld = GetOldItem( rCoreAttrs, SID_ATTR_BORDER_INNER, sal_False ); if ( !pOld || !( *(const SvxBoxInfoItem*)pOld == aBoxInfoItem ) ) { rCoreAttrs.Put( aBoxInfoItem ); - bAttrsChanged |= TRUE; + bAttrsChanged |= sal_True; } } else @@ -866,7 +855,7 @@ IMPL_LINK( SvxBorderTabPage, SelPreHdl_Impl, void *, EMPTYARG ) aFrameSel.DeselectAllBorders(); // Using image ID to find correct line in table above. - USHORT nLine = GetPresetImageId( aWndPresets.GetSelectItemId() ) - 1; + sal_uInt16 nLine = GetPresetImageId( aWndPresets.GetSelectItemId() ) - 1; // Apply all styles from the table for( int nBorder = 0; nBorder < svx::FRAMEBORDERTYPE_COUNT; ++nBorder ) @@ -903,7 +892,7 @@ IMPL_LINK( SvxBorderTabPage, SelPreHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxBorderTabPage, SelSdwHdl_Impl, void *, EMPTYARG ) { - BOOL bEnable = aWndShadows.GetSelectItemId() > 1; + sal_Bool bEnable = aWndShadows.GetSelectItemId() > 1; aFtShadowSize.Enable(bEnable); aEdShadowSize.Enable(bEnable); aFtShadowColor.Enable(bEnable); @@ -949,9 +938,9 @@ IMPL_LINK( SvxBorderTabPage, SelStyleHdl_Impl, ListBox *, pLb ) { if ( pLb == &aLbLineStyle ) aFrameSel.SetStyleToSelection( - static_cast< USHORT >( aLbLineStyle.GetSelectEntryLine1() / 100 ), - static_cast< USHORT >( aLbLineStyle.GetSelectEntryDistance() / 100 ), - static_cast< USHORT >( aLbLineStyle.GetSelectEntryLine2() / 100 ), + static_cast< sal_uInt16 >( aLbLineStyle.GetSelectEntryLine1() / 100 ), + static_cast< sal_uInt16 >( aLbLineStyle.GetSelectEntryDistance() / 100 ), + static_cast< sal_uInt16 >( aLbLineStyle.GetSelectEntryLine2() / 100 ), lcl_getBorderStyle( aLbLineStyle.GetSelectEntryStyle() ) ); return 0; @@ -962,17 +951,17 @@ IMPL_LINK( SvxBorderTabPage, SelStyleHdl_Impl, ListBox *, pLb ) // ============================================================================ // number of preset images to show -const USHORT SVX_BORDER_PRESET_COUNT = 5; +const sal_uInt16 SVX_BORDER_PRESET_COUNT = 5; // number of shadow images to show -const USHORT SVX_BORDER_SHADOW_COUNT = 5; +const sal_uInt16 SVX_BORDER_SHADOW_COUNT = 5; // ---------------------------------------------------------------------------- -USHORT SvxBorderTabPage::GetPresetImageId( USHORT nValueSetIdx ) const +sal_uInt16 SvxBorderTabPage::GetPresetImageId( sal_uInt16 nValueSetIdx ) const { // table with all sets of predefined border styles - static const USHORT ppnImgIds[][ SVX_BORDER_PRESET_COUNT ] = + static const sal_uInt16 ppnImgIds[][ SVX_BORDER_PRESET_COUNT ] = { // simple cell without diagonal frame borders { IID_PRE_CELL_NONE, IID_PRE_CELL_ALL, IID_PRE_CELL_LR, IID_PRE_CELL_TB, IID_PRE_CELL_L }, @@ -1002,10 +991,10 @@ USHORT SvxBorderTabPage::GetPresetImageId( USHORT nValueSetIdx ) const return ppnImgIds[ nLine ][ nValueSetIdx - 1 ]; } -USHORT SvxBorderTabPage::GetPresetStringId( USHORT nValueSetIdx ) const +sal_uInt16 SvxBorderTabPage::GetPresetStringId( sal_uInt16 nValueSetIdx ) const { // string resource IDs for each image (in order of the IID_PRE_* image IDs) - static const USHORT pnStrIds[] = + static const sal_uInt16 pnStrIds[] = { RID_SVXSTR_TABLE_PRESET_NONE, RID_SVXSTR_PARA_PRESET_ALL, @@ -1048,7 +1037,7 @@ void SvxBorderTabPage::FillPresetVS() aWndPresets.SetSizePixel( aWndPresets.CalcWindowSizePixel( aImgSize ) ); // insert images and help texts - for( USHORT nVSIdx = 1; nVSIdx <= SVX_BORDER_PRESET_COUNT; ++nVSIdx ) + for( sal_uInt16 nVSIdx = 1; nVSIdx <= SVX_BORDER_PRESET_COUNT; ++nVSIdx ) { aWndPresets.InsertItem( nVSIdx ); aWndPresets.SetItemImage( nVSIdx, rImgList.GetImage( GetPresetImageId( nVSIdx ) ) ); @@ -1073,14 +1062,14 @@ void SvxBorderTabPage::FillShadowVS() aWndShadows.SetSizePixel( aWndShadows.CalcWindowSizePixel( aImgSize ) ); // image resource IDs - static const USHORT pnImgIds[ SVX_BORDER_SHADOW_COUNT ] = + static const sal_uInt16 pnImgIds[ SVX_BORDER_SHADOW_COUNT ] = { IID_SHADOWNONE, IID_SHADOW_BOT_RIGHT, IID_SHADOW_TOP_RIGHT, IID_SHADOW_BOT_LEFT, IID_SHADOW_TOP_LEFT }; // string resource IDs for each image - static const USHORT pnStrIds[ SVX_BORDER_SHADOW_COUNT ] = + static const sal_uInt16 pnStrIds[ SVX_BORDER_SHADOW_COUNT ] = { RID_SVXSTR_SHADOW_STYLE_NONE, RID_SVXSTR_SHADOW_STYLE_BOTTOMRIGHT, RID_SVXSTR_SHADOW_STYLE_TOPRIGHT, RID_SVXSTR_SHADOW_STYLE_BOTTOMLEFT, RID_SVXSTR_SHADOW_STYLE_TOPLEFT }; // insert images and help texts - for( USHORT nVSIdx = 1; nVSIdx <= SVX_BORDER_SHADOW_COUNT; ++nVSIdx ) + for( sal_uInt16 nVSIdx = 1; nVSIdx <= SVX_BORDER_SHADOW_COUNT; ++nVSIdx ) { aWndShadows.InsertItem( nVSIdx ); aWndShadows.SetItemImage( nVSIdx, rImgList.GetImage( pnImgIds[ nVSIdx - 1 ] ) ); @@ -1140,9 +1129,9 @@ IMPL_LINK( SvxBorderTabPage, LinesChanged_Impl, void*, EMPTYARG ) { if(!mbUseMarginItem && aLeftMF.IsVisible()) { - BOOL bLineSet = aFrameSel.IsAnyBorderVisible(); - BOOL bMinAllowed = 0 != (nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_TABLE)); - BOOL bSpaceModified = aLeftMF .IsModified()|| + sal_Bool bLineSet = aFrameSel.IsAnyBorderVisible(); + sal_Bool bMinAllowed = 0 != (nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_TABLE)); + sal_Bool bSpaceModified = aLeftMF .IsModified()|| aRightMF .IsModified()|| aTopMF .IsModified()|| aBottomMF.IsModified(); @@ -1183,7 +1172,7 @@ IMPL_LINK( SvxBorderTabPage, LinesChanged_Impl, void*, EMPTYARG ) } } //fuer Tabellen ist alles erlaubt - USHORT nValid = VALID_TOP|VALID_BOTTOM|VALID_LEFT|VALID_RIGHT; + sal_uInt16 nValid = VALID_TOP|VALID_BOTTOM|VALID_LEFT|VALID_RIGHT; //fuer Rahmen und Absatz wird das Edit disabled, wenn keine Border gesetzt ist if(nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_PARA)) diff --git a/cui/source/tabpages/border.src b/cui/source/tabpages/border.src index cfd1069fb..3d2d295c9 100644 --- a/cui/source/tabpages/border.src +++ b/cui/source/tabpages/border.src @@ -93,6 +93,7 @@ TabPage RID_SVXPAGE_BORDER }; ListBox LB_LINESTYLE { + HelpID = "cui:ListBox:RID_SVXPAGE_BORDER:LB_LINESTYLE"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 25 ) ; Size = MAP_APPFONT ( 74 , 66 ) ; @@ -105,6 +106,7 @@ TabPage RID_SVXPAGE_BORDER }; ListBox LB_LINECOLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_BORDER:LB_LINECOLOR"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 106 ) ; Size = MAP_APPFONT ( 74 , 68 ) ; @@ -125,6 +127,7 @@ TabPage RID_SVXPAGE_BORDER }; MetricField MF_LEFT { + HelpID = "cui:MetricField:RID_SVXPAGE_BORDER:MF_LEFT"; Border = TRUE ; Pos = MAP_APPFONT ( 213 , 14 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; @@ -146,6 +149,7 @@ TabPage RID_SVXPAGE_BORDER }; MetricField MF_RIGHT { + HelpID = "cui:MetricField:RID_SVXPAGE_BORDER:MF_RIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 213 , 30 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; @@ -167,6 +171,7 @@ TabPage RID_SVXPAGE_BORDER }; MetricField MF_TOP { + HelpID = "cui:MetricField:RID_SVXPAGE_BORDER:MF_TOP"; Border = TRUE ; Pos = MAP_APPFONT ( 213 , 46 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; @@ -188,6 +193,7 @@ TabPage RID_SVXPAGE_BORDER }; MetricField MF_BOTTOM { + HelpID = "cui:MetricField:RID_SVXPAGE_BORDER:MF_BOTTOM"; Border = TRUE ; Pos = MAP_APPFONT ( 213 , 62 ) ; Size = MAP_APPFONT ( 38 , 12 ) ; @@ -203,6 +209,7 @@ TabPage RID_SVXPAGE_BORDER }; CheckBox CB_SYNC { + HelpID = "cui:CheckBox:RID_SVXPAGE_BORDER:CB_SYNC"; Pos = MAP_APPFONT ( 177 , 78 ) ; Size = MAP_APPFONT ( 74 , 10 ) ; Text [ en-US ] = "Synchronize"; @@ -236,6 +243,7 @@ TabPage RID_SVXPAGE_BORDER }; MetricField ED_SHADOWSIZE { + HelpID = "cui:MetricField:RID_SVXPAGE_BORDER:ED_SHADOWSIZE"; Border = TRUE ; Pos = MAP_APPFONT ( 88 , 144 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -257,6 +265,7 @@ TabPage RID_SVXPAGE_BORDER }; ListBox LB_SHADOWCOLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_BORDER:LB_SHADOWCOLOR"; Border = TRUE ; Pos = MAP_APPFONT ( 177 , 144 ) ; Size = MAP_APPFONT ( 74 , 68 ) ; @@ -278,6 +287,7 @@ TabPage RID_SVXPAGE_BORDER }; CheckBox CB_MERGEWITHNEXT { + HelpID = "cui:CheckBox:RID_SVXPAGE_BORDER:CB_MERGEWITHNEXT"; Pos = MAP_APPFONT ( 12 , 173 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Hide = TRUE; @@ -285,6 +295,7 @@ TabPage RID_SVXPAGE_BORDER }; CheckBox CB_MERGEADJACENTBORDERS { + HelpID = "cui:CheckBox:RID_SVXPAGE_BORDER:CB_MERGEADJACENTBORDERS"; Pos = MAP_APPFONT ( 12 , 173 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Hide = TRUE; diff --git a/cui/source/tabpages/borderconn.cxx b/cui/source/tabpages/borderconn.cxx index 707af534a..04ecaa58e 100644 --- a/cui/source/tabpages/borderconn.cxx +++ b/cui/source/tabpages/borderconn.cxx @@ -49,7 +49,7 @@ of the tab page. class LineItemWrapper : public sfx::SingleItemWrapper< SvxLineItem, const SvxBorderLine* > { public: - inline explicit LineItemWrapper( USHORT nSlot ) : SingleItemWrapperType( nSlot ) {} + inline explicit LineItemWrapper( sal_uInt16 nSlot ) : SingleItemWrapperType( nSlot ) {} virtual const SvxBorderLine* GetItemValue( const SvxLineItem& rItem ) const { return rItem.GetLine(); } @@ -275,19 +275,12 @@ ShadowConnection::ShadowConnection( const SfxItemSet& rItemSet, // ============================================================================ // ============================================================================ -sfx::ItemConnectionBase* CreateFrameLineConnection( USHORT nSlot, +sfx::ItemConnectionBase* CreateFrameLineConnection( sal_uInt16 nSlot, FrameSelector& rFrameSel, FrameBorderType eBorder, sfx::ItemConnFlags nFlags ) { return new FrameLineConnection( nSlot, new FrameSelectorWrapper( rFrameSel, eBorder ), nFlags ); } -sfx::ItemConnectionBase* CreateFrameBoxConnection( USHORT /*nBoxSlot*/, USHORT /*nBoxInfoSlot*/, - FrameSelector& /*rFrameSel*/, FrameBorderType /*eBorder*/, sfx::ItemConnFlags /*nFlags*/ ) -{ - DBG_ERRORFILE( "svx::CreateFrameBoxConnection - not implemented" ); - return 0; -} - sfx::ItemConnectionBase* CreateMarginConnection( const SfxItemSet& rItemSet, MetricField& rMfLeft, MetricField& rMfRight, MetricField& rMfTop, MetricField& rMfBottom, diff --git a/cui/source/tabpages/borderconn.hxx b/cui/source/tabpages/borderconn.hxx index 7f8343d87..1993787f8 100644 --- a/cui/source/tabpages/borderconn.hxx +++ b/cui/source/tabpages/borderconn.hxx @@ -45,14 +45,7 @@ class FrameSelector; /** Creates an item connection object that connects an SvxLineItem with an svx::FrameSelector control. */ -sfx::ItemConnectionBase* CreateFrameLineConnection( USHORT nSlot, - FrameSelector& rFrameSel, FrameBorderType eBorder, - sfx::ItemConnFlags nFlags = sfx::ITEMCONN_DEFAULT ); - -/** Creates an item connection object that connects an SvxBoxItem and an - SvxBoxInfoItem with an svx::FrameSelector control. */ -sfx::ItemConnectionBase* CreateFrameBoxConnection( - USHORT nBoxSlot, USHORT nBoxInfoSlot, +sfx::ItemConnectionBase* CreateFrameLineConnection( sal_uInt16 nSlot, FrameSelector& rFrameSel, FrameBorderType eBorder, sfx::ItemConnFlags nFlags = sfx::ITEMCONN_DEFAULT ); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 82f56354c..17c9da7a7 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -101,7 +101,7 @@ using namespace ::com::sun::star; // static ---------------------------------------------------------------- -static USHORT pNameRanges[] = +static sal_uInt16 pNameRanges[] = { SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_WEIGHT, @@ -118,7 +118,7 @@ static USHORT pNameRanges[] = 0 }; -static USHORT pEffectsRanges[] = +static sal_uInt16 pEffectsRanges[] = { SID_ATTR_CHAR_SHADOWED, SID_ATTR_CHAR_UNDERLINE, @@ -139,7 +139,7 @@ static USHORT pEffectsRanges[] = 0 }; -static USHORT pPositionRanges[] = +static sal_uInt16 pPositionRanges[] = { SID_ATTR_CHAR_KERNING, SID_ATTR_CHAR_KERNING, @@ -154,7 +154,7 @@ static USHORT pPositionRanges[] = 0 }; -static USHORT pTwoLinesRanges[] = +static sal_uInt16 pTwoLinesRanges[] = { SID_ATTR_CHAR_TWO_LINES, SID_ATTR_CHAR_TWO_LINES, @@ -163,7 +163,7 @@ static USHORT pTwoLinesRanges[] = // C-Funktion ------------------------------------------------------------ -inline BOOL StateToAttr( TriState aState ) +inline sal_Bool StateToAttr( TriState aState ) { return ( STATE_CHECK == aState ); } @@ -191,11 +191,11 @@ inline SvxFont& SvxCharBasePage::GetPreviewCTLFont() // ----------------------------------------------------------------------- SvxCharBasePage::SvxCharBasePage( Window* pParent, const ResId& rResId, const SfxItemSet& rItemset, - USHORT nResIdPrewievWin, USHORT nResIdFontTypeFT ): + sal_uInt16 nResIdPrewievWin, sal_uInt16 nResIdFontTypeFT ): SfxTabPage( pParent, rResId, rItemset ), m_aPreviewWin( this, ResId( nResIdPrewievWin, *rResId.GetResMgr() ) ), m_aFontTypeFT( this, ResId( nResIdFontTypeFT, *rResId.GetResMgr() ) ), - m_bPreviewBackgroundToCharacter( FALSE ) + m_bPreviewBackgroundToCharacter( sal_False ) { } @@ -213,7 +213,7 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) SvxFont& rFont = GetPreviewFont(); SvxFont& rCJKFont = GetPreviewCJKFont(); SvxFont& rCTLFont = GetPreviewCTLFont(); - USHORT nWhich; + sal_uInt16 nWhich; nWhich = GetWhich( SID_CHAR_DLG_PREVIEW_STRING ); if( ISITEMSET ) @@ -322,7 +322,7 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) if( ISITEMSET ) { const SvxContourItem& rItem = ( SvxContourItem& ) rSet.Get( nWhich ); - BOOL bOutline = rItem.GetValue(); + sal_Bool bOutline = rItem.GetValue(); rFont.SetOutline( bOutline ); rCJKFont.SetOutline( bOutline ); rCTLFont.SetOutline( bOutline ); @@ -333,14 +333,14 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) if( ISITEMSET ) { const SvxShadowedItem& rItem = ( SvxShadowedItem& ) rSet.Get( nWhich ); - BOOL bShadow = rItem.GetValue(); + sal_Bool bShadow = rItem.GetValue(); rFont.SetShadow( bShadow ); rCJKFont.SetShadow( bShadow ); rCTLFont.SetShadow( bShadow ); } // Background - BOOL bTransparent; + sal_Bool bTransparent; nWhich = GetWhich( m_bPreviewBackgroundToCharacter ? SID_ATTR_BRUSH : SID_ATTR_BRUSH_CHAR ); if( ISITEMSET ) { @@ -352,7 +352,7 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) rCTLFont.SetFillColor( rColor ); } else - bTransparent = TRUE; + bTransparent = sal_True; rFont.SetTransparent( bTransparent ); rCJKFont.SetTransparent( bTransparent ); @@ -413,9 +413,9 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) // Escapement nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); - const BYTE nProp = 100; + const sal_uInt8 nProp = 100; short nEsc; - BYTE nEscProp; + sal_uInt8 nEscProp; if( ISITEMSET ) { const SvxEscapementItem& rItem = ( SvxEscapementItem& ) rSet.Get( nWhich ); @@ -443,9 +443,9 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -void SvxCharBasePage::SetPrevFontSize( const SfxItemSet& rSet, USHORT nSlot, SvxFont& rFont ) +void SvxCharBasePage::SetPrevFontSize( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont ) { - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); long nH; if( rSet.GetItemState( nWhich ) >= SFX_ITEM_SET ) { @@ -461,9 +461,9 @@ void SvxCharBasePage::SetPrevFontSize( const SfxItemSet& rSet, USHORT nSlot, Svx // ----------------------------------------------------------------------- -void SvxCharBasePage::SetPrevFont( const SfxItemSet& rSet, USHORT nSlot, SvxFont& rFont ) +void SvxCharBasePage::SetPrevFont( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont ) { - USHORT nWhich = GetWhich( nSlot ); + sal_uInt16 nWhich = GetWhich( nSlot ); if( ISITEMSET ) { const SvxFontItem& rFontItem = ( SvxFontItem& ) rSet.Get( nWhich ); @@ -477,9 +477,9 @@ void SvxCharBasePage::SetPrevFont( const SfxItemSet& rSet, USHORT nSlot, SvxFont // ----------------------------------------------------------------------- -void SvxCharBasePage::SetPrevFontStyle( const SfxItemSet& rSet, USHORT nPosture, USHORT nWeight, SvxFont& rFont ) +void SvxCharBasePage::SetPrevFontStyle( const SfxItemSet& rSet, sal_uInt16 nPosture, sal_uInt16 nWeight, SvxFont& rFont ) { - USHORT nWhich = GetWhich( nPosture ); + sal_uInt16 nWhich = GetWhich( nPosture ); if( ISITEMSET ) { const SvxPostureItem& rItem = ( SvxPostureItem& ) rSet.Get( nWhich ); @@ -498,7 +498,7 @@ void SvxCharBasePage::SetPrevFontStyle( const SfxItemSet& rSet, USHORT nPosture, void SvxCharBasePage::SetPrevFontWidthScale( const SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); if( ISITEMSET ) { const SvxCharScaleWidthItem& rItem = ( SvxCharScaleWidthItem& ) rSet.Get( nWhich ); @@ -511,7 +511,7 @@ void SvxCharBasePage::SetPrevFontWidthScale( const SfxItemSet& rSet ) namespace { // ----------------------------------------------------------------------- - void setPrevFontEscapement(SvxFont& _rFont,BYTE nProp, BYTE nEscProp, short nEsc ) + void setPrevFontEscapement(SvxFont& _rFont,sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ) { _rFont.SetPropr( nProp ); _rFont.SetProprRel( nEscProp ); @@ -522,7 +522,7 @@ namespace } // ----------------------------------------------------------------------- -void SvxCharBasePage::SetPrevFontEscapement( BYTE nProp, BYTE nEscProp, short nEsc ) +void SvxCharBasePage::SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ) { setPrevFontEscapement(GetPreviewFont(),nProp,nEscProp,nEsc); setPrevFontEscapement(GetPreviewCJKFont(),nProp,nEscProp,nEsc); @@ -538,16 +538,16 @@ struct SvxCharNamePage_Impl String m_aNoStyleText; String m_aTransparentText; const FontList* m_pFontList; - USHORT m_nExtraEntryPos; - BOOL m_bMustDelete; - BOOL m_bInSearchMode; + sal_uInt16 m_nExtraEntryPos; + sal_Bool m_bMustDelete; + sal_Bool m_bInSearchMode; SvxCharNamePage_Impl() : m_pFontList ( NULL ), m_nExtraEntryPos( LISTBOX_ENTRY_NOTFOUND ), - m_bMustDelete ( FALSE ), - m_bInSearchMode ( FALSE ) + m_bMustDelete ( sal_False ), + m_bInSearchMode ( sal_False ) { m_aUpdateTimer.SetTimeout( 350 ); @@ -682,9 +682,9 @@ SvxCharNamePage::SvxCharNamePage( Window* pParent, const SfxItemSet& rInSet ) : FreeResource(); - m_pWestFontLanguageLB->SetLanguageList( LANG_LIST_WESTERN, TRUE, FALSE, TRUE ); - m_pEastFontLanguageLB->SetLanguageList( LANG_LIST_CJK, TRUE, FALSE, TRUE ); - m_pCTLFontLanguageLB->SetLanguageList( LANG_LIST_CTL, TRUE, FALSE, TRUE ); + m_pWestFontLanguageLB->SetLanguageList( LANG_LIST_WESTERN, sal_True, sal_False, sal_True ); + m_pEastFontLanguageLB->SetLanguageList( LANG_LIST_CJK, sal_True, sal_False, sal_True ); + m_pCTLFontLanguageLB->SetLanguageList( LANG_LIST_CTL, sal_True, sal_False, sal_True ); Initialize(); } @@ -757,7 +757,7 @@ void SvxCharNamePage::Initialize() bKillTable = true; } - m_pColorLB->SetUpdateMode( FALSE ); + m_pColorLB->SetUpdateMode( sal_False ); { SfxPoolItem* pDummy; @@ -773,7 +773,7 @@ void SvxCharNamePage::Initialize() m_pColorLB->InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - m_pColorLB->SetUpdateMode( TRUE ); + m_pColorLB->SetUpdateMode( sal_True ); if ( bKillTable ) delete pColorTable; @@ -816,14 +816,14 @@ const FontList* SvxCharNamePage::GetFontList() const DBG_ASSERT(NULL != ( (SvxFontListItem*)pItem )->GetFontList(), "Where is the font list?"); m_pImpl->m_pFontList = static_cast<const SvxFontListItem*>(pItem )->GetFontList()->Clone(); - m_pImpl->m_bMustDelete = TRUE; + m_pImpl->m_bMustDelete = sal_True; } } if(!m_pImpl->m_pFontList) { m_pImpl->m_pFontList = new FontList( Application::GetDefaultDevice() ); - m_pImpl->m_bMustDelete = TRUE; + m_pImpl->m_bMustDelete = sal_True; } } @@ -839,14 +839,14 @@ namespace const FontStyleBox* _pFontStyleLB, const FontSizeBox* _pFontSizeLB, const FontList* _pFontList, - USHORT _nFontWhich, - USHORT _nFontHeightWhich) + sal_uInt16 _nFontWhich, + sal_uInt16 _nFontHeightWhich) { Size aSize = _rFont.GetSize(); aSize.Width() = 0; FontInfo aFontInfo; String sFontName(_pFontNameLB->GetText()); - BOOL bFontAvailable = _pFontList->IsAvailable( sFontName ); + sal_Bool bFontAvailable = _pFontList->IsAvailable( sFontName ); if(bFontAvailable || _pFontNameLB->GetSavedValue() != sFontName) aFontInfo = _pFontList->Get( sFontName, _pFontStyleLB->GetText() ); else @@ -1008,7 +1008,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp FontSizeBox* pSizeBox = NULL; FixedText* pLangFT = NULL; SvxLanguageBox* pLangBox = NULL; - USHORT nWhich = 0; + sal_uInt16 nWhich = 0; switch ( eLangGrp ) { @@ -1141,7 +1141,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp if( rItem.GetProp() != 100 || SFX_MAPUNIT_RELATIVE != rItem.GetPropUnit() ) { - BOOL bPtRel = SFX_MAPUNIT_POINT == rItem.GetPropUnit(); + sal_Bool bPtRel = SFX_MAPUNIT_POINT == rItem.GetPropUnit(); pSizeBox->SetPtRelative( bPtRel ); pSizeBox->SetValue( bPtRel ? ((short)rItem.GetProp()) * 10 : rItem.GetProp() ); } @@ -1214,16 +1214,16 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp // ----------------------------------------------------------------------- -BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ) +sal_Bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; FontNameBox* pNameBox = NULL; FontStyleBox* pStyleBox = NULL; FontSizeBox* pSizeBox = NULL; SvxLanguageBox* pLangBox = NULL; - USHORT nWhich = 0; - USHORT nSlot = 0; + sal_uInt16 nWhich = 0; + sal_uInt16 nSlot = 0; switch ( eLangGrp ) { @@ -1263,7 +1263,7 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp const String& rFontName = pNameBox->GetText(); const FontList* pFontList = GetFontList(); String aStyleBoxText =pStyleBox->GetText(); - USHORT nEntryPos = pStyleBox->GetEntryPos( aStyleBoxText ); + sal_uInt16 nEntryPos = pStyleBox->GetEntryPos( aStyleBoxText ); if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) aStyleBoxText.Erase(); FontInfo aInfo( pFontList->Get( rFontName, aStyleBoxText ) ); @@ -1283,7 +1283,7 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp bChanged = !pNameBox->GetSavedValue().Len(); if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && ( (SvxFontItem*)pItem )->GetFamilyName() != aFontItem.GetFamilyName() ) bChanged = true; @@ -1292,11 +1292,11 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp rSet.Put( aFontItem ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) rSet.ClearItem( nWhich ); - bChanged = TRUE; + bChanged = sal_True; switch ( eLangGrp ) { case Western : nSlot = SID_ATTR_CHAR_WEIGHT; break; @@ -1328,9 +1328,9 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp } if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && ( (SvxWeightItem*)pItem )->GetValue() != aWeightItem.GetValue() ) - bChanged = TRUE; + bChanged = true; if ( nEntryPos >= m_pImpl->m_nExtraEntryPos ) bChanged = ( nEntryPos == m_pImpl->m_nExtraEntryPos ); @@ -1340,9 +1340,9 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( bChanged && aText.Len() ) { rSet.Put( aWeightItem ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bChanged = true; @@ -1364,7 +1364,7 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp const SvxPostureItem& rItem = *( (const SvxPostureItem*)pOld ); if ( rItem.GetValue() == aPostureItem.GetValue() ) - bChanged = FALSE; + bChanged = false; } if ( !bChanged ) @@ -1373,11 +1373,11 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( m_pImpl->m_bInSearchMode && bChanged && aInfo.GetItalic() == ITALIC_NONE && aInfo.GetWeight() != WEIGHT_NORMAL ) - bChanged = FALSE; + bChanged = false; } if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && ( (SvxPostureItem*)pItem )->GetValue() != aPostureItem.GetValue() ) bChanged = true; @@ -1387,9 +1387,9 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( bChanged && aText.Len() ) { rSet.Put( aPostureItem ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; // FontSize @@ -1417,11 +1417,11 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp bChanged = ( nSize != nSavedSize ); if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET ) + pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET ) { float fSize = (float)nSize / 10; long nVal = CalcToUnit( fSize, rSet.GetPool()->GetMetric( nWhich ) ); - if ( ( (SvxFontHeightItem*)pItem )->GetHeight() != (UINT32)nVal ) + if ( ( (SvxFontHeightItem*)pItem )->GetHeight() != (sal_uInt32)nVal ) bChanged = true; } @@ -1437,9 +1437,9 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp SvxFontHeightItem aHeight( 240, 100, nWhich ); if ( pSizeBox->IsPtRelative() ) - aHeight.SetHeight( rOldItem.GetHeight(), (USHORT)( nSize / 10 ), SFX_MAPUNIT_POINT, eUnit ); + aHeight.SetHeight( rOldItem.GetHeight(), (sal_uInt16)( nSize / 10 ), SFX_MAPUNIT_POINT, eUnit ); else - aHeight.SetHeight( rOldItem.GetHeight(), (USHORT)nSize, SFX_MAPUNIT_RELATIVE ); + aHeight.SetHeight( rOldItem.GetHeight(), (sal_uInt16)nSize, SFX_MAPUNIT_RELATIVE ); rSet.Put( aHeight ); } else @@ -1447,9 +1447,9 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp float fSize = (float)nSize / 10; rSet.Put( SvxFontHeightItem( CalcToUnit( fSize, eUnit ), 100, nWhich ) ); } - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bChanged = true; @@ -1461,15 +1461,15 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp } nWhich = GetWhich( nSlot ); pOld = GetOldItem( rSet, nSlot ); - USHORT nLangPos = pLangBox->GetSelectEntryPos(); - LanguageType eLangType = (LanguageType)(ULONG)pLangBox->GetEntryData( nLangPos ); + sal_uInt16 nLangPos = pLangBox->GetSelectEntryPos(); + LanguageType eLangType = (LanguageType)(sal_uLong)pLangBox->GetEntryData( nLangPos ); if ( pOld ) { const SvxLanguageItem& rItem = *( (const SvxLanguageItem*)pOld ); if ( nLangPos == LISTBOX_ENTRY_NOTFOUND || eLangType == (LanguageType)rItem.GetValue() ) - bChanged = FALSE; + bChanged = false; } if ( !bChanged ) @@ -1478,9 +1478,9 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp if ( bChanged && nLangPos != LISTBOX_ENTRY_NOTFOUND ) { rSet.Put( SvxLanguageItem( eLangType, nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; return bModified; @@ -1490,7 +1490,7 @@ BOOL SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp void SvxCharNamePage::ResetColor_Impl( const SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); SfxItemState eState = rSet.GetItemState( nWhich ); switch ( eState ) @@ -1520,7 +1520,7 @@ void SvxCharNamePage::ResetColor_Impl( const SfxItemSet& rSet ) rCJKFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor ); rCTLFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor ); m_aPreviewWin.Invalidate(); - USHORT nSelPos = m_pColorLB->GetEntryPos( aColor ); + sal_uInt16 nSelPos = m_pColorLB->GetEntryPos( aColor ); if ( nSelPos == LISTBOX_ENTRY_NOTFOUND && aColor == Color( COL_TRANSPARENT ) ) nSelPos = m_pColorLB->GetEntryPos( m_pImpl->m_aTransparentText ); @@ -1542,47 +1542,6 @@ void SvxCharNamePage::ResetColor_Impl( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharNamePage::FillItemSetColor_Impl( SfxItemSet& rSet ) -{ - USHORT nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); - const SvxColorItem* pOld = (const SvxColorItem*)GetOldItem( rSet, SID_ATTR_CHAR_COLOR ); - const SvxColorItem* pItem = NULL; - BOOL bChanged = TRUE; - const SfxItemSet* pExampleSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL; - const SfxItemSet& rOldSet = GetItemSet(); - - Color aSelectedColor; - if ( m_pColorLB->GetSelectEntry() == m_pImpl->m_aTransparentText ) - aSelectedColor = Color( COL_TRANSPARENT ); - else - aSelectedColor = m_pColorLB->GetSelectEntryColor(); - - if ( pOld && pOld->GetValue() == aSelectedColor ) - bChanged = FALSE; - - if ( !bChanged ) - bChanged = ( m_pColorLB->GetSavedValue() == LISTBOX_ENTRY_NOTFOUND ); - - if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, (const SfxPoolItem**)&pItem ) == SFX_ITEM_SET && - ( (SvxColorItem*)pItem )->GetValue() != aSelectedColor ) - bChanged = TRUE; - - BOOL bModified = FALSE; - - if ( bChanged && m_pColorLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ) - { - rSet.Put( SvxColorItem( aSelectedColor, nWhich ) ); - bModified = TRUE; - } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) - CLEARTITEM; - - return bModified; -} - -// ----------------------------------------------------------------------- - IMPL_LINK( SvxCharNamePage, UpdateHdl_Impl, Timer*, EMPTYARG ) { UpdatePreview_Impl(); @@ -1649,7 +1608,7 @@ SfxTabPage* SvxCharNamePage::Create( Window* pParent, const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -USHORT* SvxCharNamePage::GetRanges() +sal_uInt16* SvxCharNamePage::GetRanges() { return pNameRanges; } @@ -1670,12 +1629,11 @@ void SvxCharNamePage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharNamePage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxCharNamePage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FillItemSet_Impl( rSet, Western ); + sal_Bool bModified = FillItemSet_Impl( rSet, Western ); bModified |= FillItemSet_Impl( rSet, Asian ); bModified |= FillItemSet_Impl( rSet, Ctl ); -//! bModified |= FillItemSetColor_Impl( rSet ); return bModified; } @@ -1688,13 +1646,13 @@ void SvxCharNamePage::SetFontList( const SvxFontListItem& rItem ) delete m_pImpl->m_pFontList; } m_pImpl->m_pFontList = rItem.GetFontList()->Clone(); - m_pImpl->m_bMustDelete = TRUE; + m_pImpl->m_bMustDelete = sal_True; } // ----------------------------------------------------------------------- namespace { - void enableRelativeMode( SvxCharNamePage* _pPage, FontSizeBox* _pFontSizeLB, USHORT _nHeightWhich ) + void enableRelativeMode( SvxCharNamePage* _pPage, FontSizeBox* _pFontSizeLB, sal_uInt16 _nHeightWhich ) { _pFontSizeLB->EnableRelativeMode( 5, 995, 5 ); // min 5%, max 995%, step 5 @@ -1724,10 +1682,10 @@ void SvxCharNamePage::EnableRelativeMode() void SvxCharNamePage::EnableSearchMode() { - m_pImpl->m_bInSearchMode = TRUE; + m_pImpl->m_bInSearchMode = sal_True; } // ----------------------------------------------------------------------- -void SvxCharNamePage::DisableControls( USHORT nDisable ) +void SvxCharNamePage::DisableControls( sal_uInt16 nDisable ) { if ( DISABLE_LANGUAGE & nDisable ) { @@ -1767,7 +1725,7 @@ void SvxCharNamePage::PageCreated (SfxAllItemSet aSet) if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_RELATIVE_MODE ) == SVX_RELATIVE_MODE ) EnableRelativeMode(); if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) @@ -1837,7 +1795,7 @@ void SvxCharEffectsPage::Initialize() // HTML-Mode const SfxPoolItem* pItem; SfxObjectShell* pShell; - if ( SFX_ITEM_SET == GetItemSet().GetItemState( SID_HTML_MODE, FALSE, &pItem ) || + if ( SFX_ITEM_SET == GetItemSet().GetItemState( SID_HTML_MODE, sal_False, &pItem ) || ( NULL != ( pShell = SfxObjectShell::Current() ) && NULL != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) ) { @@ -1867,9 +1825,9 @@ void SvxCharEffectsPage::Initialize() bKillTable = true; } - m_aUnderlineColorLB.SetUpdateMode( FALSE ); - m_aOverlineColorLB.SetUpdateMode( FALSE ); - m_aFontColorLB.SetUpdateMode( FALSE ); + m_aUnderlineColorLB.SetUpdateMode( sal_False ); + m_aOverlineColorLB.SetUpdateMode( sal_False ); + m_aFontColorLB.SetUpdateMode( sal_False ); { SfxPoolItem* pDummy; @@ -1890,9 +1848,9 @@ void SvxCharEffectsPage::Initialize() m_aFontColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - m_aUnderlineColorLB.SetUpdateMode( TRUE ); - m_aOverlineColorLB.SetUpdateMode( TRUE ); - m_aFontColorLB.SetUpdateMode( TRUE ); + m_aUnderlineColorLB.SetUpdateMode( sal_True ); + m_aOverlineColorLB.SetUpdateMode( sal_True ); + m_aFontColorLB.SetUpdateMode( sal_True ); m_aFontColorLB.SetSelectHdl( LINK( this, SvxCharEffectsPage, ColorBoxSelectHdl_Impl ) ); if ( bKillTable ) @@ -1944,12 +1902,12 @@ void SvxCharEffectsPage::UpdatePreview_Impl() SvxFont& rCJKFont = GetPreviewCJKFont(); SvxFont& rCTLFont = GetPreviewCTLFont(); - USHORT nPos = m_aUnderlineLB.GetSelectEntryPos(); - FontUnderline eUnderline = (FontUnderline)(ULONG)m_aUnderlineLB.GetEntryData( nPos ); + sal_uInt16 nPos = m_aUnderlineLB.GetSelectEntryPos(); + FontUnderline eUnderline = (FontUnderline)(sal_uLong)m_aUnderlineLB.GetEntryData( nPos ); nPos = m_aOverlineLB.GetSelectEntryPos(); - FontUnderline eOverline = (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData( nPos ); + FontUnderline eOverline = (FontUnderline)(sal_uLong)m_aOverlineLB.GetEntryData( nPos ); nPos = m_aStrikeoutLB.GetSelectEntryPos(); - FontStrikeout eStrikeout = (FontStrikeout)(ULONG)m_aStrikeoutLB.GetEntryData( nPos ); + FontStrikeout eStrikeout = (FontStrikeout)(sal_uLong)m_aStrikeoutLB.GetEntryData( nPos ); rFont.SetUnderline( eUnderline ); rCJKFont.SetUnderline( eUnderline ); rCTLFont.SetUnderline( eUnderline ); @@ -1963,14 +1921,14 @@ void SvxCharEffectsPage::UpdatePreview_Impl() rCTLFont.SetStrikeout( eStrikeout ); nPos = m_aPositionLB.GetSelectEntryPos(); - BOOL bUnder = ( CHRDLG_POSITION_UNDER == (ULONG)m_aPositionLB.GetEntryData( nPos ) ); + sal_Bool bUnder = ( CHRDLG_POSITION_UNDER == (sal_uLong)m_aPositionLB.GetEntryData( nPos ) ); FontEmphasisMark eMark = (FontEmphasisMark)m_aEmphasisLB.GetSelectEntryPos(); eMark |= bUnder ? EMPHASISMARK_POS_BELOW : EMPHASISMARK_POS_ABOVE; rFont.SetEmphasisMark( eMark ); rCJKFont.SetEmphasisMark( eMark ); rCTLFont.SetEmphasisMark( eMark ); - USHORT nRelief = m_aReliefLB.GetSelectEntryPos(); + sal_uInt16 nRelief = m_aReliefLB.GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nRelief) { rFont.SetRelief( (FontRelief)nRelief ); @@ -1986,7 +1944,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl() rCJKFont.SetShadow( rFont.IsShadow() ); rCTLFont.SetShadow( rFont.IsShadow() ); - USHORT nCapsPos = m_aEffects2LB.GetSelectEntryPos(); + sal_uInt16 nCapsPos = m_aEffects2LB.GetSelectEntryPos(); if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND ) { rFont.SetCaseMap( (SvxCaseMap)nCapsPos ); @@ -1995,7 +1953,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl() rCTLFont.SetCaseMap( static_cast<SvxCaseMap>( nCapsPos == SVX_CASEMAP_KAPITAELCHEN ? SVX_CASEMAP_NOT_MAPPED : (SvxCaseMap)nCapsPos) ); } - BOOL bWordLine = m_aIndividualWordsBtn.IsChecked(); + sal_Bool bWordLine = m_aIndividualWordsBtn.IsChecked(); rFont.SetWordLineMode( bWordLine ); rCJKFont.SetWordLineMode( bWordLine ); rCTLFont.SetWordLineMode( bWordLine ); @@ -2009,7 +1967,7 @@ void SvxCharEffectsPage::SetCaseMap_Impl( SvxCaseMap eCaseMap ) { if ( SVX_CASEMAP_END > eCaseMap ) m_aEffects2LB.SelectEntryPos( - sal::static_int_cast< USHORT >( eCaseMap ) ); + sal::static_int_cast< sal_uInt16 >( eCaseMap ) ); else { m_aEffects2LB.SetNoSelection(); @@ -2023,7 +1981,7 @@ void SvxCharEffectsPage::SetCaseMap_Impl( SvxCaseMap eCaseMap ) void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); SfxItemState eState = rSet.GetItemState( nWhich ); switch ( eState ) @@ -2057,7 +2015,7 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet ) rCTLFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor ); m_aPreviewWin.Invalidate(); - USHORT nSelPos = m_aFontColorLB.GetEntryPos( aColor ); + sal_uInt16 nSelPos = m_aFontColorLB.GetEntryPos( aColor ); if ( nSelPos == LISTBOX_ENTRY_NOTFOUND && aColor == Color( COL_TRANSPARENT ) ) nSelPos = m_aFontColorLB.GetEntryPos( m_aTransparentColorName ); @@ -2079,12 +2037,12 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) +sal_Bool SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR ); const SvxColorItem* pOld = (const SvxColorItem*)GetOldItem( rSet, SID_ATTR_CHAR_COLOR ); const SvxColorItem* pItem = NULL; - BOOL bChanged = TRUE; + sal_Bool bChanged = sal_True; const SfxItemSet* pExampleSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL; const SfxItemSet& rOldSet = GetItemSet(); @@ -2095,24 +2053,24 @@ BOOL SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet ) aSelectedColor = m_aFontColorLB.GetSelectEntryColor(); if ( pOld && pOld->GetValue() == aSelectedColor ) - bChanged = FALSE; + bChanged = sal_False; if ( !bChanged ) bChanged = ( m_aFontColorLB.GetSavedValue() == LISTBOX_ENTRY_NOTFOUND ); if ( !bChanged && pExampleSet && - pExampleSet->GetItemState( nWhich, FALSE, (const SfxPoolItem**)&pItem ) == SFX_ITEM_SET && + pExampleSet->GetItemState( nWhich, sal_False, (const SfxPoolItem**)&pItem ) == SFX_ITEM_SET && ( (SvxColorItem*)pItem )->GetValue() != aSelectedColor ) - bChanged = TRUE; + bChanged = sal_True; - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if ( bChanged && m_aFontColorLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ) { rSet.Put( SvxColorItem( aSelectedColor, nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; return bModified; @@ -2124,24 +2082,24 @@ IMPL_LINK( SvxCharEffectsPage, SelectHdl_Impl, ListBox*, pBox ) { if ( &m_aEmphasisLB == pBox ) { - USHORT nEPos = m_aEmphasisLB.GetSelectEntryPos(); - BOOL bEnable = ( nEPos > 0 && nEPos != LISTBOX_ENTRY_NOTFOUND ); + sal_uInt16 nEPos = m_aEmphasisLB.GetSelectEntryPos(); + sal_Bool bEnable = ( nEPos > 0 && nEPos != LISTBOX_ENTRY_NOTFOUND ); m_aPositionFT.Enable( bEnable ); m_aPositionLB.Enable( bEnable ); } else if( &m_aReliefLB == pBox) { - BOOL bEnable = ( pBox->GetSelectEntryPos() == 0 ); + sal_Bool bEnable = ( pBox->GetSelectEntryPos() == 0 ); m_aOutlineBtn.Enable( bEnable ); m_aShadowBtn.Enable( bEnable ); } else if ( &m_aPositionLB != pBox ) { - USHORT nUPos = m_aUnderlineLB.GetSelectEntryPos(), + sal_uInt16 nUPos = m_aUnderlineLB.GetSelectEntryPos(), nOPos = m_aOverlineLB.GetSelectEntryPos(), nSPos = m_aStrikeoutLB.GetSelectEntryPos(); - BOOL bUEnable = ( nUPos > 0 && nUPos != LISTBOX_ENTRY_NOTFOUND ); - BOOL bOEnable = ( nOPos > 0 && nOPos != LISTBOX_ENTRY_NOTFOUND ); + sal_Bool bUEnable = ( nUPos > 0 && nUPos != LISTBOX_ENTRY_NOTFOUND ); + sal_Bool bOEnable = ( nOPos > 0 && nOPos != LISTBOX_ENTRY_NOTFOUND ); m_aUnderlineColorFT.Enable( bUEnable ); m_aUnderlineColorLB.Enable( bUEnable ); m_aOverlineColorFT.Enable( bOEnable ); @@ -2219,7 +2177,7 @@ SfxTabPage* SvxCharEffectsPage::Create( Window* pParent, const SfxItemSet& rSet // ----------------------------------------------------------------------- -USHORT* SvxCharEffectsPage::GetRanges() +sal_uInt16* SvxCharEffectsPage::GetRanges() { return pEffectsRanges; } @@ -2232,10 +2190,10 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) SvxFont& rCJKFont = GetPreviewCJKFont(); SvxFont& rCTLFont = GetPreviewCTLFont(); - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; // Underline - USHORT nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); rFont.SetUnderline( UNDERLINE_NONE ); rCJKFont.SetUnderline( UNDERLINE_NONE ); rCTLFont.SetUnderline( UNDERLINE_NONE ); @@ -2257,9 +2215,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) if ( eUnderline != UNDERLINE_NONE ) { - for ( USHORT i = 0; i < m_aUnderlineLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < m_aUnderlineLB.GetEntryCount(); ++i ) { - if ( (FontUnderline)(ULONG)m_aUnderlineLB.GetEntryData(i) == eUnderline ) + if ( (FontUnderline)(sal_uLong)m_aUnderlineLB.GetEntryData(i) == eUnderline ) { m_aUnderlineLB.SelectEntryPos(i); bEnable = TRUE; @@ -2268,7 +2226,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) } Color aColor = rItem.GetColor(); - USHORT nPos = m_aUnderlineColorLB.GetEntryPos( aColor ); + sal_uInt16 nPos = m_aUnderlineColorLB.GetEntryPos( aColor ); if ( LISTBOX_ENTRY_NOTFOUND != nPos ) m_aUnderlineColorLB.SelectEntryPos( nPos ); @@ -2314,9 +2272,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) if ( eOverline != UNDERLINE_NONE ) { - for ( USHORT i = 0; i < m_aOverlineLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < m_aOverlineLB.GetEntryCount(); ++i ) { - if ( (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData(i) == eOverline ) + if ( (FontUnderline)(sal_uLong)m_aOverlineLB.GetEntryData(i) == eOverline ) { m_aOverlineLB.SelectEntryPos(i); bEnable = TRUE; @@ -2325,7 +2283,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) } Color aColor = rItem.GetColor(); - USHORT nPos = m_aOverlineColorLB.GetEntryPos( aColor ); + sal_uInt16 nPos = m_aOverlineColorLB.GetEntryPos( aColor ); if ( LISTBOX_ENTRY_NOTFOUND != nPos ) m_aOverlineColorLB.SelectEntryPos( nPos ); @@ -2371,9 +2329,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) if ( eStrikeout != STRIKEOUT_NONE ) { - for ( USHORT i = 0; i < m_aStrikeoutLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < m_aStrikeoutLB.GetEntryCount(); ++i ) { - if ( (FontStrikeout)(ULONG)m_aStrikeoutLB.GetEntryData(i) == eStrikeout ) + if ( (FontStrikeout)(sal_uLong)m_aStrikeoutLB.GetEntryData(i) == eStrikeout ) { m_aStrikeoutLB.SelectEntryPos(i); bEnable = TRUE; @@ -2427,15 +2385,15 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) rCJKFont.SetEmphasisMark( eMark ); rCTLFont.SetEmphasisMark( eMark ); - m_aEmphasisLB.SelectEntryPos( (USHORT)( eMark & EMPHASISMARK_STYLE ) ); + m_aEmphasisLB.SelectEntryPos( (sal_uInt16)( eMark & EMPHASISMARK_STYLE ) ); eMark &= ~EMPHASISMARK_STYLE; - ULONG nEntryData = ( eMark == EMPHASISMARK_POS_ABOVE ) + sal_uLong nEntryData = ( eMark == EMPHASISMARK_POS_ABOVE ) ? CHRDLG_POSITION_OVER : ( eMark == EMPHASISMARK_POS_BELOW ) ? CHRDLG_POSITION_UNDER : 0; - for ( USHORT i = 0; i < m_aPositionLB.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0; i < m_aPositionLB.GetEntryCount(); i++ ) { - if ( nEntryData == (ULONG)m_aPositionLB.GetEntryData(i) ) + if ( nEntryData == (sal_uLong)m_aPositionLB.GetEntryData(i) ) { m_aPositionLB.SelectEntryPos(i); break; @@ -2556,7 +2514,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxContourItem& rItem = (SvxContourItem&)rSet.Get( nWhich ); m_aOutlineBtn.SetState( (TriState)rItem.GetValue() ); - m_aOutlineBtn.EnableTriState( FALSE ); + m_aOutlineBtn.EnableTriState( sal_False ); break; } } @@ -2585,7 +2543,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxShadowedItem& rItem = (SvxShadowedItem&)rSet.Get( nWhich ); m_aShadowBtn.SetState( (TriState)rItem.GetValue() ); - m_aShadowBtn.EnableTriState( FALSE ); + m_aShadowBtn.EnableTriState( sal_False ); break; } } @@ -2614,7 +2572,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxBlinkItem& rItem = (SvxBlinkItem&)rSet.Get( nWhich ); m_aBlinkingBtn.SetState( (TriState)rItem.GetValue() ); - m_aBlinkingBtn.EnableTriState( FALSE ); + m_aBlinkingBtn.EnableTriState( sal_False ); break; } } @@ -2642,7 +2600,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxCharHiddenItem& rItem = (SvxCharHiddenItem&)rSet.Get( nWhich ); m_aHiddenBtn.SetState( (TriState)rItem.GetValue() ); - m_aHiddenBtn.EnableTriState( FALSE ); + m_aHiddenBtn.EnableTriState( sal_False ); break; } } @@ -2673,18 +2631,18 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) { const SfxPoolItem* pOld = 0; const SfxItemSet& rOldSet = GetItemSet(); - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; bool bChanged = true; // Underline - USHORT nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_UNDERLINE ); - USHORT nPos = m_aUnderlineLB.GetSelectEntryPos(); - FontUnderline eUnder = (FontUnderline)(ULONG)m_aUnderlineLB.GetEntryData( nPos ); + sal_uInt16 nPos = m_aUnderlineLB.GetSelectEntryPos(); + FontUnderline eUnder = (FontUnderline)(sal_uLong)m_aUnderlineLB.GetEntryData( nPos ); if ( pOld ) { @@ -2692,8 +2650,8 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) //! item-state in the 'rOldSet' will be invalid. In this case //! changing the underline style will be allowed if a style is //! selected in the listbox. - BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE ); + sal_Bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && + SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, sal_True ); const SvxUnderlineItem& rItem = *( (const SvxUnderlineItem*)pOld ); if ( (FontUnderline)rItem.GetValue() == eUnder && @@ -2709,7 +2667,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( aNewItem ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bChanged = true; @@ -2718,7 +2676,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_OVERLINE ); nPos = m_aOverlineLB.GetSelectEntryPos(); - FontUnderline eOver = (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData( nPos ); + FontUnderline eOver = (FontUnderline)(sal_uLong)m_aOverlineLB.GetEntryData( nPos ); if ( pOld ) { @@ -2726,8 +2684,8 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) //! item-state in the 'rOldSet' will be invalid. In this case //! changing the underline style will be allowed if a style is //! selected in the listbox. - BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE ); + sal_Bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && + SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, sal_True ); const SvxOverlineItem& rItem = *( (const SvxOverlineItem*)pOld ); if ( (FontUnderline)rItem.GetValue() == eOver && @@ -2743,7 +2701,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( aNewItem ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bChanged = true; @@ -2752,7 +2710,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_STRIKEOUT ); nPos = m_aStrikeoutLB.GetSelectEntryPos(); - FontStrikeout eStrike = (FontStrikeout)(ULONG)m_aStrikeoutLB.GetEntryData( nPos ); + FontStrikeout eStrike = (FontStrikeout)(sal_uLong)m_aStrikeoutLB.GetEntryData( nPos ); if ( pOld ) { @@ -2760,8 +2718,8 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) //! item-state in the 'rOldSet' will be invalid. In this case //! changing the strikeout style will be allowed if a style is //! selected in the listbox. - BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE ); + sal_Bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && + SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, sal_True ); const SvxCrossedOutItem& rItem = *( (const SvxCrossedOutItem*)pOld ); if ( !m_aStrikeoutLB.IsEnabled() @@ -2774,7 +2732,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( SvxCrossedOutItem( eStrike, nWhich ) ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bChanged = true; @@ -2799,7 +2757,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( SvxWordLineModeItem( m_aIndividualWordsBtn.IsChecked(), nWhich ) ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bChanged = true; @@ -2807,12 +2765,12 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) // Emphasis nWhich = GetWhich( SID_ATTR_CHAR_EMPHASISMARK ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_EMPHASISMARK ); - USHORT nMarkPos = m_aEmphasisLB.GetSelectEntryPos(); - USHORT nPosPos = m_aPositionLB.GetSelectEntryPos(); + sal_uInt16 nMarkPos = m_aEmphasisLB.GetSelectEntryPos(); + sal_uInt16 nPosPos = m_aPositionLB.GetSelectEntryPos(); FontEmphasisMark eMark = (FontEmphasisMark)nMarkPos; if ( m_aPositionLB.IsEnabled() ) { - eMark |= ( CHRDLG_POSITION_UNDER == (ULONG)m_aPositionLB.GetEntryData( nPosPos ) ) + eMark |= ( CHRDLG_POSITION_UNDER == (sal_uLong)m_aPositionLB.GetEntryData( nPosPos ) ) ? EMPHASISMARK_POS_BELOW : EMPHASISMARK_POS_ABOVE; } @@ -2835,7 +2793,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( SvxEmphasisMarkItem( eMark, nWhich ) ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bChanged = true; @@ -2845,7 +2803,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) pOld = GetOldItem( rSet, SID_ATTR_CHAR_CASEMAP ); SvxCaseMap eCaseMap = SVX_CASEMAP_NOT_MAPPED; bool bChecked = false; - USHORT nCapsPos = m_aEffects2LB.GetSelectEntryPos(); + sal_uInt16 nCapsPos = m_aEffects2LB.GetSelectEntryPos(); if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND ) { eCaseMap = (SvxCaseMap)nCapsPos; @@ -2858,8 +2816,8 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) //! item-state in the 'rOldSet' will be invalid. In this case //! changing the effect style will be allowed if a style is //! selected in the listbox. - BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && - SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE ); + sal_Bool bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos && + SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, sal_True ); const SvxCaseMapItem& rItem = *( (const SvxCaseMapItem*)pOld ); if ( (SvxCaseMap)rItem.GetValue() == eCaseMap && !bAllowChg ) @@ -2871,7 +2829,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( SvxCaseMapItem( eCaseMap, nWhich ) ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bChanged = true; @@ -2899,7 +2857,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) bChanged = false; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && !StateToAttr( eState ) && ( (SvxContourItem*)pItem )->GetValue() ) bChanged = true; @@ -2908,7 +2866,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( SvxContourItem( StateToAttr( eState ), nWhich ) ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bChanged = true; @@ -2925,16 +2883,16 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) bChanged = false; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && !StateToAttr( eState ) && ( (SvxShadowedItem*)pItem )->GetValue() ) bChanged = true; if ( bChanged && eState != STATE_DONTKNOW ) { rSet.Put( SvxShadowedItem( StateToAttr( eState ), nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bChanged = true; @@ -2951,7 +2909,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) bChanged = false; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && !StateToAttr( eState ) && ( (SvxBlinkItem*)pItem )->GetValue() ) bChanged = true; @@ -2960,7 +2918,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( SvxBlinkItem( StateToAttr( eState ), nWhich ) ); bModified = true; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; // Hidden @@ -2976,16 +2934,16 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) bChanged = false; } - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, FALSE, &pItem ) == SFX_ITEM_SET && + if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, sal_False, &pItem ) == SFX_ITEM_SET && !StateToAttr( eState ) && ( (SvxCharHiddenItem*)pItem )->GetValue() ) bChanged = true; if ( bChanged && eState != STATE_DONTKNOW ) { rSet.Put( SvxCharHiddenItem( StateToAttr( eState ), nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; bModified |= FillItemSetColor_Impl( rSet ); @@ -2993,7 +2951,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet ) return bModified; } -void SvxCharEffectsPage::DisableControls( USHORT nDisable ) +void SvxCharEffectsPage::DisableControls( sal_uInt16 nDisable ) { if ( ( DISABLE_CASEMAP & nDisable ) == DISABLE_CASEMAP ) { @@ -3027,7 +2985,7 @@ void SvxCharEffectsPage::EnableFlash() // ----------------------------------------------------------------------- void SvxCharEffectsPage::SetPreviewBackgroundToCharacter() { - m_bPreviewBackgroundToCharacter = TRUE; + m_bPreviewBackgroundToCharacter = sal_True; } // ----------------------------------------------------------------------- @@ -3040,7 +2998,7 @@ void SvxCharEffectsPage::PageCreated (SfxAllItemSet aSet) if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_ENABLE_FLASH ) == SVX_ENABLE_FLASH ) EnableFlash(); if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) @@ -3082,8 +3040,8 @@ SvxCharPositionPage::SvxCharPositionPage( Window* pParent, const SfxItemSet& rIn m_nSubEsc ( (short)DFLT_ESC_SUB ), m_nScaleWidthItemSetVal ( 100 ), m_nScaleWidthInitialVal ( 100 ), - m_nSuperProp ( (BYTE)DFLT_ESC_PROP ), - m_nSubProp ( (BYTE)DFLT_ESC_PROP ) + m_nSuperProp ( (sal_uInt8)DFLT_ESC_PROP ), + m_nSubProp ( (sal_uInt8)DFLT_ESC_PROP ) { FreeResource(); Initialize(); @@ -3133,14 +3091,14 @@ void SvxCharPositionPage::Initialize() // ----------------------------------------------------------------------- -void SvxCharPositionPage::UpdatePreview_Impl( BYTE nProp, BYTE nEscProp, short nEsc ) +void SvxCharPositionPage::UpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ) { SetPrevFontEscapement( nProp, nEscProp, nEsc ); } // ----------------------------------------------------------------------- -void SvxCharPositionPage::SetEscapement_Impl( USHORT nEsc ) +void SvxCharPositionPage::SetEscapement_Impl( sal_uInt16 nEsc ) { SvxEscapementItem aEscItm( (SvxEscapement)nEsc, SID_ATTR_CHAR_ESCAPEMENT ); @@ -3190,7 +3148,7 @@ void SvxCharPositionPage::SetEscapement_Impl( USHORT nEsc ) IMPL_LINK( SvxCharPositionPage, PositionHdl_Impl, RadioButton*, pBtn ) { - USHORT nEsc = SVX_ESCAPEMENT_OFF; // also when pBtn == NULL + sal_uInt16 nEsc = SVX_ESCAPEMENT_OFF; // also when pBtn == NULL if ( &m_aHighPosBtn == pBtn ) nEsc = SVX_ESCAPEMENT_SUPERSCRIPT; @@ -3205,9 +3163,9 @@ IMPL_LINK( SvxCharPositionPage, PositionHdl_Impl, RadioButton*, pBtn ) IMPL_LINK( SvxCharPositionPage, RotationHdl_Impl, RadioButton*, pBtn ) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if (&m_a90degRB == pBtn || &m_a270degRB == pBtn) - bEnable = TRUE; + bEnable = sal_True; else OSL_ENSURE( &m_a0degRB == pBtn, "unexpected button" ); m_aFitToLineCB.Enable( bEnable ); @@ -3218,7 +3176,7 @@ IMPL_LINK( SvxCharPositionPage, RotationHdl_Impl, RadioButton*, pBtn ) IMPL_LINK( SvxCharPositionPage, FontModifyHdl_Impl, MetricField*, EMPTYARG ) { - BYTE nEscProp = (BYTE)m_aFontSizeEdit.GetValue(); + sal_uInt8 nEscProp = (sal_uInt8)m_aFontSizeEdit.GetValue(); short nEsc = (short)m_aHighLowEdit.GetValue(); nEsc *= m_aLowPosBtn.IsChecked() ? -1 : 1; UpdatePreview_Impl( 100, nEscProp, nEsc ); @@ -3247,7 +3205,7 @@ IMPL_LINK( SvxCharPositionPage, FitToLineHdl_Impl, CheckBox*, pBox ) { if ( &m_aFitToLineCB == pBox) { - UINT16 nVal = m_nScaleWidthInitialVal; + sal_uInt16 nVal = m_nScaleWidthInitialVal; if (m_aFitToLineCB.IsChecked()) nVal = m_nScaleWidthItemSetVal; m_aScaleWidthMF.SetValue( nVal ); @@ -3342,9 +3300,9 @@ IMPL_LINK( SvxCharPositionPage, LoseFocusHdl_Impl, MetricField*, pField ) else if ( &m_aFontSizeEdit == pField ) { if ( bLow ) - m_nSubProp = (BYTE)m_aFontSizeEdit.GetValue(); + m_nSubProp = (sal_uInt8)m_aFontSizeEdit.GetValue(); else - m_nSuperProp = (BYTE)m_aFontSizeEdit.GetValue(); + m_nSuperProp = (sal_uInt8)m_aFontSizeEdit.GetValue(); } return 0; } @@ -3353,7 +3311,7 @@ IMPL_LINK( SvxCharPositionPage, LoseFocusHdl_Impl, MetricField*, pField ) IMPL_LINK( SvxCharPositionPage, ScaleWidthModifyHdl_Impl, MetricField*, EMPTYARG ) { - m_aPreviewWin.SetFontWidthScale( USHORT( m_aScaleWidthMF.GetValue() ) ); + m_aPreviewWin.SetFontWidthScale( sal_uInt16( m_aScaleWidthMF.GetValue() ) ); return 0; } @@ -3394,7 +3352,7 @@ SfxTabPage* SvxCharPositionPage::Create( Window* pParent, const SfxItemSet& rSet // ----------------------------------------------------------------------- -USHORT* SvxCharPositionPage::GetRanges() +sal_uInt16* SvxCharPositionPage::GetRanges() { return pPositionRanges; } @@ -3408,13 +3366,13 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) { m_nSuperEsc = (short)sUser.GetToken( 0 ).ToInt32(); m_nSubEsc = (short)sUser.GetToken( 1 ).ToInt32(); - m_nSuperProp = (BYTE)sUser.GetToken( 2 ).ToInt32(); - m_nSubProp = (BYTE)sUser.GetToken( 3 ).ToInt32(); + m_nSuperProp = (sal_uInt8)sUser.GetToken( 2 ).ToInt32(); + m_nSubProp = (sal_uInt8)sUser.GetToken( 3 ).ToInt32(); } short nEsc = 0; - BYTE nEscProp = 100; - BYTE nProp = 100; + sal_uInt8 nEscProp = 100; + sal_uInt8 nProp = 100; m_aHighLowFT.Disable(); m_aHighLowEdit.Disable(); @@ -3424,7 +3382,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) SvxFont& rFont = GetPreviewFont(); SvxFont& rCJKFont = GetPreviewCJKFont(); SvxFont& rCTLFont = GetPreviewCTLFont(); - USHORT nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_DEFAULT ) { @@ -3445,7 +3403,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) if ( nEsc > 0 ) { nFac = 1; - m_aHighPosBtn.Check( TRUE ); + m_aHighPosBtn.Check( sal_True ); if ( nEsc == DFLT_ESC_AUTO_SUPER ) { nEsc = DFLT_ESC_SUPER; @@ -3455,7 +3413,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) else { nFac = -1; - m_aLowPosBtn.Check( TRUE ); + m_aLowPosBtn.Check( sal_True ); if ( nEsc == DFLT_ESC_AUTO_SUB ) { nEsc = DFLT_ESC_SUB; @@ -3477,8 +3435,8 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) } else { - m_aNormalPosBtn.Check( TRUE ); - m_aHighLowRB.Check( TRUE ); + m_aNormalPosBtn.Check( sal_True ); + m_aHighLowRB.Check( sal_True ); PositionHdl_Impl( NULL ); } //the height has to be set after the handler is called to keep the value also if the escapement is zero @@ -3486,9 +3444,9 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) } else { - m_aHighPosBtn.Check( FALSE ); - m_aNormalPosBtn.Check( FALSE ); - m_aLowPosBtn.Check( FALSE ); + m_aHighPosBtn.Check( sal_False ); + m_aNormalPosBtn.Check( sal_False ); + m_aLowPosBtn.Check( sal_False ); } // BspFont setzen @@ -3546,7 +3504,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) m_aPairKerningBtn.Check( rItem.GetValue() ); } else - m_aPairKerningBtn.Check( FALSE ); + m_aPairKerningBtn.Check( sal_False ); // Scale Width nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); @@ -3604,13 +3562,13 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) const SvxCharRotateItem& rItem = (SvxCharRotateItem&) rSet.Get( nWhich ); if (rItem.IsBottomToTop()) - m_a90degRB.Check( TRUE ); + m_a90degRB.Check( sal_True ); else if (rItem.IsTopToBotton()) - m_a270degRB.Check( TRUE ); + m_a270degRB.Check( sal_True ); else { DBG_ASSERT( 0 == rItem.GetValue(), "incorrect value" ); - m_a0degRB.Check( TRUE ); + m_a0degRB.Check( sal_True ); } m_aFitToLineCB.Check( rItem.IsFitToLine() ); } @@ -3618,14 +3576,14 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) { if( eState == SFX_ITEM_DONTCARE ) { - m_a0degRB.Check( FALSE ); - m_a90degRB.Check( FALSE ); - m_a270degRB.Check( FALSE ); + m_a0degRB.Check( sal_False ); + m_a90degRB.Check( sal_False ); + m_a270degRB.Check( sal_False ); } else - m_a0degRB.Check( TRUE ); + m_a0degRB.Check( sal_True ); - m_aFitToLineCB.Check( FALSE ); + m_aFitToLineCB.Check( sal_False ); } m_aFitToLineCB.SetClickHdl( aOldLink ); m_aFitToLineCB.Enable( !m_a0degRB.IsChecked() ); @@ -3651,16 +3609,16 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) { // Position (hoch, normal oder tief) const SfxItemSet& rOldSet = GetItemSet(); - BOOL bModified = FALSE, bChanged = TRUE; - USHORT nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); + sal_Bool bModified = sal_False, bChanged = sal_True; + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT ); const SfxPoolItem* pOld = GetOldItem( rSet, SID_ATTR_CHAR_ESCAPEMENT ); const bool bHigh = m_aHighPosBtn.IsChecked(); short nEsc; - BYTE nEscProp; + sal_uInt8 nEscProp; if ( bHigh || m_aLowPosBtn.IsChecked() ) { @@ -3671,7 +3629,7 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) nEsc = (short)m_aHighLowEdit.Denormalize( m_aHighLowEdit.GetValue() ); nEsc *= bHigh ? 1 : -1; } - nEscProp = (BYTE)m_aFontSizeEdit.Denormalize( m_aFontSizeEdit.GetValue() ); + nEscProp = (sal_uInt8)m_aFontSizeEdit.Denormalize( m_aFontSizeEdit.GetValue() ); } else { @@ -3683,28 +3641,28 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) { const SvxEscapementItem& rItem = *( (const SvxEscapementItem*)pOld ); if ( rItem.GetEsc() == nEsc && rItem.GetProp() == nEscProp ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged && !m_aHighPosBtn.GetSavedValue() && !m_aNormalPosBtn.GetSavedValue() && !m_aLowPosBtn.GetSavedValue() ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && ( m_aHighPosBtn.IsChecked() || m_aNormalPosBtn.IsChecked() || m_aLowPosBtn.IsChecked() ) ) { rSet.Put( SvxEscapementItem( nEsc, nEscProp, nWhich ) ); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Kerning nWhich = GetWhich( SID_ATTR_CHAR_KERNING ); pOld = GetOldItem( rSet, SID_ATTR_CHAR_KERNING ); - USHORT nPos = m_aKerningLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aKerningLB.GetSelectEntryPos(); short nKerning = 0; SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich ); @@ -3722,23 +3680,23 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) { const SvxKerningItem& rItem = *( (const SvxKerningItem*)pOld ); if ( rItem.GetValue() == nKerning ) - bChanged = FALSE; + bChanged = sal_False; } if ( !bChanged && ( m_aKerningLB.GetSavedValue() == LISTBOX_ENTRY_NOTFOUND || ( !m_aKerningEdit.GetSavedValue().Len() && m_aKerningEdit.IsEnabled() ) ) ) - bChanged = TRUE; + bChanged = sal_True; if ( bChanged && nPos != LISTBOX_ENTRY_NOTFOUND ) { rSet.Put( SvxKerningItem( nKerning, nWhich ) ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; - bChanged = TRUE; + bChanged = sal_True; // Pair-Kerning nWhich = GetWhich( SID_ATTR_CHAR_AUTOKERN ); @@ -3748,17 +3706,17 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( SvxAutoKernItem( m_aPairKerningBtn.IsChecked(), nWhich ) ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; // Scale Width nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); if ( m_aScaleWidthMF.GetText() != m_aScaleWidthMF.GetSavedValue() ) { - rSet.Put( SvxCharScaleWidthItem( (USHORT)m_aScaleWidthMF.GetValue(), nWhich ) ); + rSet.Put( SvxCharScaleWidthItem( (sal_uInt16)m_aScaleWidthMF.GetValue(), nWhich ) ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; // Rotation @@ -3776,7 +3734,7 @@ BOOL SvxCharPositionPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( aItem ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; return bModified; @@ -3801,7 +3759,7 @@ void SvxCharPositionPage::FillUserData() // ----------------------------------------------------------------------- void SvxCharPositionPage::SetPreviewBackgroundToCharacter() { - m_bPreviewBackgroundToCharacter = TRUE; + m_bPreviewBackgroundToCharacter = sal_True; } // ----------------------------------------------------------------------- void SvxCharPositionPage::PageCreated (SfxAllItemSet aSet) @@ -3809,7 +3767,7 @@ void SvxCharPositionPage::PageCreated (SfxAllItemSet aSet) SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,sal_False); if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) SetPreviewBackgroundToCharacter(); } @@ -3846,7 +3804,7 @@ void SvxCharTwoLinesPage::Initialize() aSize.Height() = m_aEndBracketLB.CalcSize( 1, 6 ).Height(); m_aEndBracketLB.SetSizePixel( aSize ); - m_aTwoLinesBtn.Check( FALSE ); + m_aTwoLinesBtn.Check( sal_False ); TwoLinesHdl_Impl( NULL ); m_aTwoLinesBtn.SetClickHdl( LINK( this, SvxCharTwoLinesPage, TwoLinesHdl_Impl ) ); @@ -3891,25 +3849,25 @@ void SvxCharTwoLinesPage::SelectCharacter( ListBox* pBox ) // ----------------------------------------------------------------------- -void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, BOOL bStart ) +void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, sal_Bool bStart ) { - USHORT nEntryPos = 0; + sal_uInt16 nEntryPos = 0; ListBox* pBox = bStart ? &m_aStartBracketLB : &m_aEndBracketLB; if ( 0 == cBracket ) pBox->SelectEntryPos(0); else { bool bFound = FALSE; - for ( USHORT i = 1; i < pBox->GetEntryCount(); ++i ) + for ( sal_uInt16 i = 1; i < pBox->GetEntryCount(); ++i ) { - if ( (ULONG)pBox->GetEntryData(i) != CHRDLG_ENCLOSE_SPECIAL_CHAR ) + if ( (sal_uLong)pBox->GetEntryData(i) != CHRDLG_ENCLOSE_SPECIAL_CHAR ) { const sal_Unicode cChar = pBox->GetEntry(i).GetChar(0); if ( cChar == cBracket ) { pBox->SelectEntryPos(i); nEntryPos = i; - bFound = TRUE; + bFound = sal_True; break; } } @@ -3931,7 +3889,7 @@ void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, BOOL bStart ) IMPL_LINK( SvxCharTwoLinesPage, TwoLinesHdl_Impl, CheckBox*, EMPTYARG ) { - BOOL bChecked = m_aTwoLinesBtn.IsChecked(); + sal_Bool bChecked = m_aTwoLinesBtn.IsChecked(); m_aStartBracketFT.Enable( bChecked ); m_aStartBracketLB.Enable( bChecked ); m_aEndBracketFT.Enable( bChecked ); @@ -3945,8 +3903,8 @@ IMPL_LINK( SvxCharTwoLinesPage, TwoLinesHdl_Impl, CheckBox*, EMPTYARG ) IMPL_LINK( SvxCharTwoLinesPage, CharacterMapHdl_Impl, ListBox*, pBox ) { - USHORT nPos = pBox->GetSelectEntryPos(); - if ( CHRDLG_ENCLOSE_SPECIAL_CHAR == (ULONG)pBox->GetEntryData( nPos ) ) + sal_uInt16 nPos = pBox->GetSelectEntryPos(); + if ( CHRDLG_ENCLOSE_SPECIAL_CHAR == (sal_uLong)pBox->GetEntryData( nPos ) ) SelectCharacter( pBox ); else { @@ -3985,7 +3943,7 @@ SfxTabPage* SvxCharTwoLinesPage::Create( Window* pParent, const SfxItemSet& rSet // ----------------------------------------------------------------------- -USHORT* SvxCharTwoLinesPage::GetRanges() +sal_uInt16* SvxCharTwoLinesPage::GetRanges() { return pTwoLinesRanges; } @@ -3994,8 +3952,8 @@ USHORT* SvxCharTwoLinesPage::GetRanges() void SvxCharTwoLinesPage::Reset( const SfxItemSet& rSet ) { - m_aTwoLinesBtn.Check( FALSE ); - USHORT nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); + m_aTwoLinesBtn.Check( sal_False ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); SfxItemState eState = rSet.GetItemState( nWhich ); if ( eState >= SFX_ITEM_DONTCARE ) @@ -4005,8 +3963,8 @@ void SvxCharTwoLinesPage::Reset( const SfxItemSet& rSet ) if ( rItem.GetValue() ) { - SetBracket( rItem.GetStartBracket(), TRUE ); - SetBracket( rItem.GetEndBracket(), FALSE ); + SetBracket( rItem.GetStartBracket(), sal_True ); + SetBracket( rItem.GetEndBracket(), sal_False ); } } TwoLinesHdl_Impl( NULL ); @@ -4016,11 +3974,11 @@ void SvxCharTwoLinesPage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -BOOL SvxCharTwoLinesPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxCharTwoLinesPage::FillItemSet( SfxItemSet& rSet ) { const SfxItemSet& rOldSet = GetItemSet(); - BOOL bModified = FALSE, bChanged = TRUE; - USHORT nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); + sal_Bool bModified = sal_False, bChanged = sal_True; + sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); const SfxPoolItem* pOld = GetOldItem( rSet, SID_ATTR_CHAR_TWO_LINES ); sal_Bool bOn = m_aTwoLinesBtn.IsChecked(); sal_Unicode cStart = ( bOn && m_aStartBracketLB.GetSelectEntryPos() > 0 ) @@ -4033,7 +3991,7 @@ BOOL SvxCharTwoLinesPage::FillItemSet( SfxItemSet& rSet ) const SvxTwoLinesItem& rItem = *( (const SvxTwoLinesItem*)pOld ); if ( rItem.GetValue() == bOn && ( !bOn || ( rItem.GetStartBracket() == cStart && rItem.GetEndBracket() == cEnd ) ) ) - bChanged = FALSE; + bChanged = sal_False; } if ( bChanged ) @@ -4041,7 +3999,7 @@ BOOL SvxCharTwoLinesPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( SvxTwoLinesItem( bOn, cStart, cEnd, nWhich ) ); bModified = TRUE; } - else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, sal_False ) ) CLEARTITEM; return bModified; @@ -4060,7 +4018,7 @@ void SvxCharTwoLinesPage::UpdatePreview_Impl() // ----------------------------------------------------------------------- void SvxCharTwoLinesPage::SetPreviewBackgroundToCharacter() { - m_bPreviewBackgroundToCharacter = TRUE; + m_bPreviewBackgroundToCharacter = sal_True; } // ----------------------------------------------------------------------- @@ -4069,7 +4027,7 @@ void SvxCharTwoLinesPage::PageCreated (SfxAllItemSet aSet) SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_FLAG_TYPE,sal_False); if (pFlagItem) { - UINT32 nFlags=pFlagItem->GetValue(); + sal_uInt32 nFlags=pFlagItem->GetValue(); if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) SetPreviewBackgroundToCharacter(); } diff --git a/cui/source/tabpages/chardlg.src b/cui/source/tabpages/chardlg.src index ec646ef67..d1b1fc02e 100644 --- a/cui/source/tabpages/chardlg.src +++ b/cui/source/tabpages/chardlg.src @@ -56,6 +56,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ComboBox LB_WEST_NAME { + HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_NAME"; Border = TRUE; Pos = MAP_APPFONT ( 12 , 25 ); Size = MAP_APPFONT ( 80 , 72 ); @@ -64,6 +65,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ComboBox LB_WEST_NAME_NOCJK { + HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_NAME_NOCJK"; Border = TRUE; Pos = MAP_APPFONT ( 12 , 17 ); Size = MAP_APPFONT ( 112 , 71 ); @@ -82,6 +84,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ComboBox LB_WEST_STYLE { + HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_STYLE"; Border = TRUE; Pos = MAP_APPFONT ( 96 , 25 ); Size = MAP_APPFONT ( 40 , 48 ); @@ -97,6 +100,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ComboBox LB_WEST_STYLE_NOCJK { + HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_STYLE_NOCJK"; Border = TRUE; Pos = MAP_APPFONT ( 130 , 17 ); Size = MAP_APPFONT ( 72 , 71 ); @@ -124,6 +128,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; MetricBox LB_WEST_SIZE { + HelpID = "cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_SIZE"; Border = TRUE; Pos = MAP_APPFONT ( 140 , 25 ); Size = MAP_APPFONT ( 38 , 72 ); @@ -132,6 +137,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; MetricBox LB_WEST_SIZE_NOCJK { + HelpID = "cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_SIZE_NOCJK"; Border = TRUE; Pos = MAP_APPFONT ( 208 , 17 ); Size = MAP_APPFONT ( 40 , 71 ); @@ -152,6 +158,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ListBox LB_WEST_LANG { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_LANG"; Border = TRUE; Pos = MAP_APPFONT ( 182 , 25 ); Size = MAP_APPFONT ( 66 , 72 ); @@ -161,6 +168,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ListBox LB_WEST_LANG_NOCJK { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_LANG_NOCJK"; Border = TRUE; Pos = MAP_APPFONT ( 130 , 105 ); Size = MAP_APPFONT ( 72 , 72 ); @@ -181,6 +189,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ComboBox LB_EAST_NAME { + HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_NAME"; Border = TRUE; Pos = MAP_APPFONT ( 12 , 65 ); Size = MAP_APPFONT ( 80 , 72 ); @@ -194,6 +203,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ComboBox LB_EAST_STYLE { + HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_STYLE"; Border = TRUE; Pos = MAP_APPFONT ( 96 , 65 ); Size = MAP_APPFONT ( 40 , 48 ); @@ -215,6 +225,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; MetricBox LB_EAST_SIZE { + HelpID = "cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_SIZE"; Border = TRUE; Pos = MAP_APPFONT ( 140 , 65 ); Size = MAP_APPFONT ( 38 , 72 ); @@ -229,6 +240,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ListBox LB_EAST_LANG { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_LANG"; Border = TRUE; Pos = MAP_APPFONT ( 182 , 65 ); Size = MAP_APPFONT ( 66 , 72 ); @@ -249,6 +261,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ComboBox LB_CTL_NAME { + HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_CTL_NAME"; Border = TRUE; Pos = MAP_APPFONT ( 12 , 105 ); Size = MAP_APPFONT ( 80 , 72 ); @@ -262,6 +275,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ComboBox LB_CTL_STYLE { + HelpID = "cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_CTL_STYLE"; Border = TRUE; Pos = MAP_APPFONT ( 96 , 105 ); Size = MAP_APPFONT ( 40 , 48 ); @@ -283,6 +297,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; MetricBox LB_CTL_SIZE { + HelpID = "cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_CTL_SIZE"; Border = TRUE; Pos = MAP_APPFONT ( 140 , 105 ); Size = MAP_APPFONT ( 38 , 72 ); @@ -297,6 +312,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ListBox LB_CTL_LANG { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_CTL_LANG"; Border = TRUE; Pos = MAP_APPFONT ( 182 , 105 ); Size = MAP_APPFONT ( 66 , 72 ); @@ -331,6 +347,7 @@ TabPage RID_SVXPAGE_CHAR_NAME }; ListBox LB_COLOR2 { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_COLOR2"; Border = TRUE; Pos = MAP_APPFONT ( 12 , 105 ); Size = MAP_APPFONT ( 58 , 100 ); @@ -378,6 +395,7 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; ListBox LB_FONTCOLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_FONTCOLOR"; Border = TRUE; Pos = MAP_APPFONT ( 10 , 15 ); Size = MAP_APPFONT ( 82 , 72 ); @@ -392,6 +410,7 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; ListBox LB_EFFECTS2 { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_EFFECTS2"; Pos = MAP_APPFONT ( 10 , 44 ) ; Size = MAP_APPFONT ( 82 , 56 ) ; DropDown = TRUE; @@ -412,6 +431,7 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; ListBox LB_RELIEF { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_RELIEF"; Pos = MAP_APPFONT ( 10 , 73 ) ; Size = MAP_APPFONT ( 82 , 56 ) ; DropDown = TRUE; @@ -424,18 +444,21 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; TriStateBox CB_OUTLINE { + HelpID = "cui:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_OUTLINE"; Pos = MAP_APPFONT ( 10 , 93 ) ; Size = MAP_APPFONT ( 82 , 10 ) ; Text [ en-US ] = "Out~line" ; }; TriStateBox CB_SHADOW { + HelpID = "cui:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_SHADOW"; Pos = MAP_APPFONT ( 10 , 107 ) ; Size = MAP_APPFONT ( 82 , 10 ) ; Text [ en-US ] = "Sha~dow" ; }; TriStateBox CB_BLINKING { + HelpID = "cui:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_BLINKING"; Pos = MAP_APPFONT ( 10 , 121 ) ; Size = MAP_APPFONT ( 82 , 10 ) ; Hide = TRUE; @@ -443,6 +466,7 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; TriStateBox CB_CHARHIDDEN { + HelpID = "cui:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_CHARHIDDEN"; Pos = MAP_APPFONT ( 10 , 135 ) ; Size = MAP_APPFONT ( 82 , 10 ) ; Text [ en-US ] = "H~idden" ; @@ -461,6 +485,7 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; ListBox LB_OVERLINE { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_OVERLINE"; Border = TRUE; Pos = MAP_APPFONT ( 110 , 15 ); Size = MAP_APPFONT ( 68 , 72 ); @@ -495,6 +520,7 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; ListBox LB_OVERLINE_COLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_OVERLINE_COLOR"; Border = TRUE; Pos = MAP_APPFONT ( 184 , 15 ); Size = MAP_APPFONT ( 68 , 100 ); @@ -509,6 +535,7 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; ListBox LB_STRIKEOUT { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_STRIKEOUT"; Border = TRUE; Pos = MAP_APPFONT ( 110 , 44 ); Size = MAP_APPFONT ( 68 , 72 ); @@ -532,6 +559,7 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; ListBox LB_UNDERLINE { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_UNDERLINE"; Border = TRUE; Pos = MAP_APPFONT ( 110 , 73 ); Size = MAP_APPFONT ( 68 , 72 ); @@ -566,6 +594,7 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; ListBox LB_UNDERLINE_COLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_UNDERLINE_COLOR"; Border = TRUE; Pos = MAP_APPFONT ( 184 , 73 ); Size = MAP_APPFONT ( 68 , 100 ); @@ -574,6 +603,7 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; CheckBox CB_INDIVIDUALWORDS { + HelpID = "cui:CheckBox:RID_SVXPAGE_CHAR_EFFECTS:CB_INDIVIDUALWORDS"; Pos = MAP_APPFONT ( 110 , 93 ); Size = MAP_APPFONT ( 68 , 10 ); TabStop = TRUE; @@ -592,6 +622,7 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; ListBox LB_EMPHASIS { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_EMPHASIS"; Border = TRUE; Pos = MAP_APPFONT ( 110 , 128 ); Size = MAP_APPFONT ( 68 , 72 ); @@ -614,6 +645,7 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS }; ListBox LB_POSITION { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_POSITION"; Border = TRUE; Pos = MAP_APPFONT ( 184 , 128 ); Size = MAP_APPFONT ( 68 , 48 ); @@ -688,6 +720,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; RadioButton RB_HIGHPOS { + HelpID = "cui:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_HIGHPOS"; Pos = MAP_APPFONT ( 12 , 16 ); Size = MAP_APPFONT ( 58 , 10 ); Text [ en-US ] = "Superscript" ; @@ -695,6 +728,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; RadioButton RB_NORMALPOS { + HelpID = "cui:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_NORMALPOS"; Pos = MAP_APPFONT ( 12 , 30 ); Size = MAP_APPFONT ( 58 , 10 ); Text [ en-US ] = "Normal" ; @@ -702,6 +736,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; RadioButton RB_LOWPOS { + HelpID = "cui:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_LOWPOS"; Pos = MAP_APPFONT ( 12 , 44 ); Size = MAP_APPFONT ( 58 , 10 ); Text [ en-US ] = "Subscript" ; @@ -715,6 +750,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; MetricField ED_HIGHLOW { + HelpID = "cui:MetricField:RID_SVXPAGE_CHAR_POSITION:ED_HIGHLOW"; Border = TRUE; Pos = MAP_APPFONT ( 136 , 14 ); Size = MAP_APPFONT ( 30 , 12 ); @@ -731,6 +767,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; CheckBox CB_HIGHLOW { + HelpID = "cui:CheckBox:RID_SVXPAGE_CHAR_POSITION:CB_HIGHLOW"; Pos = MAP_APPFONT ( 172 , 16 ); Size = MAP_APPFONT ( 76 , 10 ); Text [ en-US ] = "A~utomatic" ; @@ -744,6 +781,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; MetricField ED_FONTSIZE { + HelpID = "cui:MetricField:RID_SVXPAGE_CHAR_POSITION:ED_FONTSIZE"; Border = TRUE; Pos = MAP_APPFONT ( 136 , 30 ); Size = MAP_APPFONT ( 30 , 12 ); @@ -772,6 +810,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; RadioButton RB_0_DEG { + HelpID = "cui:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_0_DEG"; Pos = MAP_APPFONT ( 12 , 70 ); Size = MAP_APPFONT ( 46 , 10 ); TabStop = TRUE; @@ -779,6 +818,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; RadioButton RB_90_DEG { + HelpID = "cui:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_90_DEG"; Pos = MAP_APPFONT ( 62 , 70 ); Size = MAP_APPFONT ( 46 , 10 ); TabStop = TRUE; @@ -786,6 +826,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; RadioButton RB_270_DEG { + HelpID = "cui:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_270_DEG"; Pos = MAP_APPFONT ( 112 , 70 ); Size = MAP_APPFONT ( 46 , 10 ); TabStop = TRUE; @@ -793,6 +834,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; CheckBox CB_FIT_TO_LINE { + HelpID = "cui:CheckBox:RID_SVXPAGE_CHAR_POSITION:CB_FIT_TO_LINE"; Pos = MAP_APPFONT ( 162 , 70 ); Size = MAP_APPFONT ( 86 , 10 ); TabStop = TRUE; @@ -806,6 +848,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; MetricField MF_SCALE_WIDTH { + HelpID = "cui:MetricField:RID_SVXPAGE_CHAR_POSITION:MF_SCALE_WIDTH"; Border = TRUE; Pos = MAP_APPFONT ( 94 , 84 ); Size = MAP_APPFONT ( 30 , 12 ); @@ -828,6 +871,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; ListBox LB_KERNING2 { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_POSITION:LB_KERNING2"; Border = TRUE; Pos = MAP_APPFONT ( 12 , 111 ); Size = MAP_APPFONT ( 72 , 48 ) ; @@ -848,6 +892,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; MetricField ED_KERNING2 { + HelpID = "cui:MetricField:RID_SVXPAGE_CHAR_POSITION:ED_KERNING2"; Border = TRUE; Pos = MAP_APPFONT ( 112 , 111 ); Size = MAP_APPFONT ( 40 , 12 ); @@ -861,6 +906,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION }; CheckBox CB_PAIRKERNING { + HelpID = "cui:CheckBox:RID_SVXPAGE_CHAR_POSITION:CB_PAIRKERNING"; Pos = MAP_APPFONT ( 156 , 113 ); Size = MAP_APPFONT ( 92 , 10 ); Text [ en-US ] = "~Pair kerning" ; @@ -895,6 +941,7 @@ TabPage RID_SVXPAGE_CHAR_TWOLINES }; CheckBox CB_TWOLINES { + HelpID = "cui:CheckBox:RID_SVXPAGE_CHAR_TWOLINES:CB_TWOLINES"; Pos = MAP_APPFONT ( 12 , 14 ); Size = MAP_APPFONT ( 236 , 10 ); Text [ en-US ] = "~Write in double lines" ; @@ -914,6 +961,7 @@ TabPage RID_SVXPAGE_CHAR_TWOLINES }; ListBox ED_STARTBRACKET { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_TWOLINES:ED_STARTBRACKET"; Pos = MAP_APPFONT ( 12 , 52 ); Size = MAP_APPFONT ( 90 , 72 ); TabStop = TRUE; @@ -936,6 +984,7 @@ TabPage RID_SVXPAGE_CHAR_TWOLINES }; ListBox ED_ENDBRACKET { + HelpID = "cui:ListBox:RID_SVXPAGE_CHAR_TWOLINES:ED_ENDBRACKET"; Pos = MAP_APPFONT ( 108 , 52 ); Size = MAP_APPFONT ( 90 , 72 ); TabStop = TRUE; diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx index 3ab32baa8..c1ffd80f2 100644 --- a/cui/source/tabpages/connect.cxx +++ b/cui/source/tabpages/connect.cxx @@ -47,9 +47,10 @@ #include <dialmgr.hxx> #include "svx/dlgutil.hxx" +#include "paragrph.hrc" #include <cuires.hrc> -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_EDGE_FIRST, SDRATTR_EDGE_LAST, @@ -121,6 +122,8 @@ SvxConnectionPage::SvxConnectionPage( Window* pWindow, const SfxItemSet& rInAttr aAttrSet ( *rInAttrs.GetPool() ) { FreeResource(); + + aCtlPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); SfxItemPool* pPool = rOutAttrs.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); @@ -285,23 +288,23 @@ void SvxConnectionPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINEDELTAANZ ); if( pItem ) { - UINT16 nValue = ( ( const SdrEdgeLineDeltaAnzItem* )pItem )->GetValue(); + sal_uInt16 nValue = ( ( const SdrEdgeLineDeltaAnzItem* )pItem )->GetValue(); if( nValue <= 2 ) { - aFtLine3.Enable( FALSE ); - aMtrFldLine3.Enable( FALSE ); + aFtLine3.Enable( sal_False ); + aMtrFldLine3.Enable( sal_False ); aMtrFldLine3.SetEmptyFieldValue(); } if( nValue <= 1 ) { - aFtLine2.Enable( FALSE ); - aMtrFldLine2.Enable( FALSE ); + aFtLine2.Enable( sal_False ); + aMtrFldLine2.Enable( sal_False ); aMtrFldLine2.SetEmptyFieldValue(); } if( nValue == 0 ) { - aFtLine1.Enable( FALSE ); - aMtrFldLine1.Enable( FALSE ); + aFtLine1.Enable( sal_False ); + aMtrFldLine1.Enable( sal_False ); aMtrFldLine1.SetEmptyFieldValue(); } } @@ -313,7 +316,7 @@ void SvxConnectionPage::Reset( const SfxItemSet& rAttrs ) if( pItem ) { SdrEdgeKind nValue = ( ( const SdrEdgeKindItem* )pItem )->GetValue(); - aLbType.SelectEntryPos( sal::static_int_cast< USHORT >(nValue) ); + aLbType.SelectEntryPos( sal::static_int_cast< sal_uInt16 >(nValue) ); } else aLbType.SetNoSelection(); @@ -326,68 +329,68 @@ void SvxConnectionPage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxConnectionPage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxConnectionPage::FillItemSet( SfxItemSet& rAttrs) { - BOOL bModified = FALSE; - INT32 nValue; + sal_Bool bModified = sal_False; + sal_Int32 nValue; if( aMtrFldHorz1.GetText() != aMtrFldHorz1.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHorz1, eUnit ); rAttrs.Put( SdrEdgeNode1HorzDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHorz2.GetText() != aMtrFldHorz2.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHorz2, eUnit ); rAttrs.Put( SdrEdgeNode2HorzDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldVert1.GetText() != aMtrFldVert1.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldVert1, eUnit ); rAttrs.Put( SdrEdgeNode1VertDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldVert2.GetText() != aMtrFldVert2.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldVert2, eUnit ); rAttrs.Put( SdrEdgeNode2VertDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldLine1.GetText() != aMtrFldLine1.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLine1, eUnit ); rAttrs.Put( SdrEdgeLine1DeltaItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldLine2.GetText() != aMtrFldLine2.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLine2, eUnit ); rAttrs.Put( SdrEdgeLine2DeltaItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldLine3.GetText() != aMtrFldLine3.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLine3, eUnit ); rAttrs.Put( SdrEdgeLine3DeltaItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } - USHORT nPos = aLbType.GetSelectEntryPos(); + sal_uInt16 nPos = aLbType.GetSelectEntryPos(); if( nPos != aLbType.GetSavedValue() ) { if( nPos != LISTBOX_ENTRY_NOTFOUND ) { rAttrs.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -426,7 +429,7 @@ SfxTabPage* SvxConnectionPage::Create( Window* pWindow, |* \************************************************************************/ -USHORT* SvxConnectionPage::GetRanges() +sal_uInt16* SvxConnectionPage::GetRanges() { return( pRanges ); } @@ -441,50 +444,50 @@ IMPL_LINK( SvxConnectionPage, ChangeAttrHdl_Impl, void *, p ) { if( p == &aMtrFldHorz1 ) { - INT32 nValue = GetCoreValue( aMtrFldHorz1, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHorz1, eUnit ); aAttrSet.Put( SdrEdgeNode1HorzDistItem( nValue ) ); } if( p == &aMtrFldHorz2 ) { - INT32 nValue = GetCoreValue( aMtrFldHorz2, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHorz2, eUnit ); aAttrSet.Put( SdrEdgeNode2HorzDistItem( nValue ) ); } if( p == &aMtrFldVert1 ) { - INT32 nValue = GetCoreValue( aMtrFldVert1, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldVert1, eUnit ); aAttrSet.Put( SdrEdgeNode1VertDistItem( nValue ) ); } if( p == &aMtrFldVert2 ) { - INT32 nValue = GetCoreValue( aMtrFldVert2, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldVert2, eUnit ); aAttrSet.Put( SdrEdgeNode2VertDistItem( nValue ) ); } if( p == &aMtrFldLine1 ) { - INT32 nValue = GetCoreValue( aMtrFldLine1, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLine1, eUnit ); aAttrSet.Put( SdrEdgeLine1DeltaItem( nValue ) ); } if( p == &aMtrFldLine2 ) { - INT32 nValue = GetCoreValue( aMtrFldLine2, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLine2, eUnit ); aAttrSet.Put( SdrEdgeLine2DeltaItem( nValue ) ); } if( p == &aMtrFldLine3 ) { - INT32 nValue = GetCoreValue( aMtrFldLine3, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLine3, eUnit ); aAttrSet.Put( SdrEdgeLine3DeltaItem( nValue ) ); } if( p == &aLbType ) { - USHORT nPos = aLbType.GetSelectEntryPos(); + sal_uInt16 nPos = aLbType.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aAttrSet.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) ); @@ -496,7 +499,7 @@ IMPL_LINK( SvxConnectionPage, ChangeAttrHdl_Impl, void *, p ) if( p == &aLbType ) { // Anzahl der Linienversaetze ermitteln - USHORT nCount = aCtlPreview.GetLineDeltaAnz(); + sal_uInt16 nCount = aCtlPreview.GetLineDeltaAnz(); aFtLine3.Enable( nCount > 2 ); aMtrFldLine3.Enable( nCount > 2 ); @@ -541,10 +544,10 @@ void SvxConnectionPage::FillTypeLB() if( pItem ) { const SdrEdgeKindItem* pEdgeKindItem = (const SdrEdgeKindItem*) pItem; - USHORT nCount = pEdgeKindItem->GetValueCount(); + sal_uInt16 nCount = pEdgeKindItem->GetValueCount(); String aStr; - for( USHORT i = 0; i < nCount; i++ ) + for( sal_uInt16 i = 0; i < nCount; i++ ) { aStr = pEdgeKindItem->GetValueTextByPos( i ); aLbType.InsertEntry( aStr ); diff --git a/cui/source/tabpages/connect.src b/cui/source/tabpages/connect.src index a52e893e6..3031be2c5 100644 --- a/cui/source/tabpages/connect.src +++ b/cui/source/tabpages/connect.src @@ -49,6 +49,7 @@ TabPage RID_SVXPAGE_CONNECTION }; ListBox LB_TYPE { + HelpID = "cui:ListBox:RID_SVXPAGE_CONNECTION:LB_TYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 37 , 6 ) ; Size = MAP_APPFONT ( 83 , 54 ) ; @@ -69,6 +70,7 @@ TabPage RID_SVXPAGE_CONNECTION }; MetricField MTR_FLD_LINE_1 { + HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_LINE_1"; Border = TRUE ; Pos = MAP_APPFONT ( 79 , 35 ) ; Size = MAP_APPFONT ( 41 , 12 ) ; @@ -91,6 +93,7 @@ TabPage RID_SVXPAGE_CONNECTION }; MetricField MTR_FLD_LINE_2 { + HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_LINE_2"; Border = TRUE ; Pos = MAP_APPFONT ( 79 , 51 ) ; Size = MAP_APPFONT ( 41 , 12 ) ; @@ -113,6 +116,7 @@ TabPage RID_SVXPAGE_CONNECTION }; MetricField MTR_FLD_LINE_3 { + HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_LINE_3"; Border = TRUE ; Pos = MAP_APPFONT ( 79 , 67 ) ; Size = MAP_APPFONT ( 41 , 12 ) ; @@ -141,6 +145,7 @@ TabPage RID_SVXPAGE_CONNECTION }; MetricField MTR_FLD_HORZ_1 { + HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_HORZ_1"; Border = TRUE ; Pos = MAP_APPFONT ( 79 , 96 ) ; Size = MAP_APPFONT ( 41 , 12 ) ; @@ -163,6 +168,7 @@ TabPage RID_SVXPAGE_CONNECTION }; MetricField MTR_FLD_HORZ_2 { + HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_HORZ_2"; Border = TRUE ; Pos = MAP_APPFONT ( 79 , 128 ) ; Size = MAP_APPFONT ( 41 , 12 ) ; @@ -185,6 +191,7 @@ TabPage RID_SVXPAGE_CONNECTION }; MetricField MTR_FLD_VERT_1 { + HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_VERT_1"; Border = TRUE ; Pos = MAP_APPFONT ( 79 , 112 ) ; Size = MAP_APPFONT ( 41 , 12 ) ; @@ -207,6 +214,7 @@ TabPage RID_SVXPAGE_CONNECTION }; MetricField MTR_FLD_VERT_2 { + HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_VERT_2"; Border = TRUE ; Pos = MAP_APPFONT ( 79 , 144 ) ; Size = MAP_APPFONT ( 41 , 12 ) ; diff --git a/cui/source/tabpages/dstribut.cxx b/cui/source/tabpages/dstribut.cxx index d7774d932..7321af17f 100644 --- a/cui/source/tabpages/dstribut.cxx +++ b/cui/source/tabpages/dstribut.cxx @@ -35,7 +35,7 @@ #include <dialmgr.hxx> #include <tools/shl.hxx> -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST, @@ -137,7 +137,7 @@ SfxTabPage* SvxDistributePage::Create(Window* pWindow, const SfxItemSet& rAttrs, |* \************************************************************************/ -UINT16* SvxDistributePage::GetRanges() +sal_uInt16* SvxDistributePage::GetRanges() { return(pRanges); } @@ -160,34 +160,34 @@ void SvxDistributePage::PointChanged(Window* /*pWindow*/, RECT_POINT /*eRP*/) void SvxDistributePage::Reset(const SfxItemSet& ) { - maBtnHorNone.SetState(FALSE); - maBtnHorLeft.SetState(FALSE); - maBtnHorCenter.SetState(FALSE); - maBtnHorDistance.SetState(FALSE); - maBtnHorRight.SetState(FALSE); + maBtnHorNone.SetState(sal_False); + maBtnHorLeft.SetState(sal_False); + maBtnHorCenter.SetState(sal_False); + maBtnHorDistance.SetState(sal_False); + maBtnHorRight.SetState(sal_False); switch(meDistributeHor) { - case SvxDistributeHorizontalNone : maBtnHorNone.SetState(TRUE); break; - case SvxDistributeHorizontalLeft : maBtnHorLeft.SetState(TRUE); break; - case SvxDistributeHorizontalCenter : maBtnHorCenter.SetState(TRUE); break; - case SvxDistributeHorizontalDistance : maBtnHorDistance.SetState(TRUE); break; + case SvxDistributeHorizontalNone : maBtnHorNone.SetState(sal_True); break; + case SvxDistributeHorizontalLeft : maBtnHorLeft.SetState(sal_True); break; + case SvxDistributeHorizontalCenter : maBtnHorCenter.SetState(sal_True); break; + case SvxDistributeHorizontalDistance : maBtnHorDistance.SetState(sal_True); break; case SvxDistributeHorizontalRight : maBtnHorRight.SetState(TRUE); break; } - maBtnVerNone.SetState(FALSE); - maBtnVerTop.SetState(FALSE); - maBtnVerCenter.SetState(FALSE); - maBtnVerDistance.SetState(FALSE); - maBtnVerBottom.SetState(FALSE); + maBtnVerNone.SetState(sal_False); + maBtnVerTop.SetState(sal_False); + maBtnVerCenter.SetState(sal_False); + maBtnVerDistance.SetState(sal_False); + maBtnVerBottom.SetState(sal_False); switch(meDistributeVer) { - case SvxDistributeVerticalNone : maBtnVerNone.SetState(TRUE); break; - case SvxDistributeVerticalTop : maBtnVerTop.SetState(TRUE); break; - case SvxDistributeVerticalCenter : maBtnVerCenter.SetState(TRUE); break; - case SvxDistributeVerticalDistance : maBtnVerDistance.SetState(TRUE); break; - case SvxDistributeVerticalBottom : maBtnVerBottom.SetState(TRUE); break; + case SvxDistributeVerticalNone : maBtnVerNone.SetState(sal_True); break; + case SvxDistributeVerticalTop : maBtnVerTop.SetState(sal_True); break; + case SvxDistributeVerticalCenter : maBtnVerCenter.SetState(sal_True); break; + case SvxDistributeVerticalDistance : maBtnVerDistance.SetState(sal_True); break; + case SvxDistributeVerticalBottom : maBtnVerBottom.SetState(sal_True); break; } } @@ -197,7 +197,7 @@ void SvxDistributePage::Reset(const SfxItemSet& ) |* \************************************************************************/ -BOOL SvxDistributePage::FillItemSet( SfxItemSet& ) +sal_Bool SvxDistributePage::FillItemSet( SfxItemSet& ) { SvxDistributeHorizontal eDistributeHor(SvxDistributeHorizontalNone); SvxDistributeVertical eDistributeVer(SvxDistributeVerticalNone); @@ -224,10 +224,10 @@ BOOL SvxDistributePage::FillItemSet( SfxItemSet& ) { meDistributeHor = eDistributeHor; meDistributeVer = eDistributeVer; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } diff --git a/cui/source/tabpages/dstribut.src b/cui/source/tabpages/dstribut.src index 30746cbc7..ed5108c90 100644 --- a/cui/source/tabpages/dstribut.src +++ b/cui/source/tabpages/dstribut.src @@ -49,6 +49,7 @@ TabPage RID_SVXPAGE_DISTRIBUTE RadioButton BTN_HOR_NONE { + HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_HOR_NONE"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 48 , 10 ) ; Text [ en-US ] = "~None" ; @@ -56,6 +57,7 @@ TabPage RID_SVXPAGE_DISTRIBUTE RadioButton BTN_HOR_LEFT { + HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_HOR_LEFT"; Pos = MAP_APPFONT ( 56 , 26 ) ; Size = MAP_APPFONT ( 45 , 10 ) ; Text [ en-US ] = "~Left" ; @@ -63,6 +65,7 @@ TabPage RID_SVXPAGE_DISTRIBUTE RadioButton BTN_HOR_CENTER { + HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_HOR_CENTER"; Pos = MAP_APPFONT ( 105 , 26 ) ; Size = MAP_APPFONT ( 45 , 10 ) ; Text [ en-US ] = "~Center" ; @@ -70,6 +73,7 @@ TabPage RID_SVXPAGE_DISTRIBUTE RadioButton BTN_HOR_DISTANCE { + HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_HOR_DISTANCE"; Pos = MAP_APPFONT ( 154 , 26 ) ; Size = MAP_APPFONT ( 45 , 10 ) ; Text [ en-US ] = "~Spacing" ; @@ -77,6 +81,7 @@ TabPage RID_SVXPAGE_DISTRIBUTE RadioButton BTN_HOR_RIGHT { + HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_HOR_RIGHT"; Pos = MAP_APPFONT ( 203 , 26 ) ; Size = MAP_APPFONT ( 45 , 10 ) ; Text [ en-US ] = "~Right" ; @@ -131,6 +136,7 @@ TabPage RID_SVXPAGE_DISTRIBUTE RadioButton BTN_VER_NONE { + HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_VER_NONE"; Pos = MAP_APPFONT ( 12 , 53 ) ; Size = MAP_APPFONT ( 46 , 10 ) ; Text [ en-US ] = "N~one" ; @@ -138,6 +144,7 @@ TabPage RID_SVXPAGE_DISTRIBUTE RadioButton BTN_VER_TOP { + HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_VER_TOP"; Pos = MAP_APPFONT ( 56 , 65 ) ; Size = MAP_APPFONT ( 45 , 10 ) ; Text [ en-US ] = "~Top" ; @@ -145,6 +152,7 @@ TabPage RID_SVXPAGE_DISTRIBUTE RadioButton BTN_VER_CENTER { + HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_VER_CENTER"; Pos = MAP_APPFONT ( 105 , 65 ) ; Size = MAP_APPFONT ( 45 , 10 ) ; Text [ en-US ] = "C~enter" ; @@ -152,6 +160,7 @@ TabPage RID_SVXPAGE_DISTRIBUTE RadioButton BTN_VER_DISTANCE { + HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_VER_DISTANCE"; Pos = MAP_APPFONT ( 154 , 65 ) ; Size = MAP_APPFONT ( 45 , 10 ) ; Text [ en-US ] = "S~pacing" ; @@ -159,6 +168,7 @@ TabPage RID_SVXPAGE_DISTRIBUTE RadioButton BTN_VER_BOTTOM { + HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_VER_BOTTOM"; Pos = MAP_APPFONT ( 203 , 65 ) ; Size = MAP_APPFONT ( 45 , 10 ) ; Text [ en-US ] = "~Bottom" ; diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 93cd0632f..167280ca8 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -80,8 +80,8 @@ SvxGrfCropPage::SvxGrfCropPage ( Window *pParent, const SfxItemSet &rSet ) aOrigSizePB( this, CUI_RES( PB_ORGSIZE )), aExampleWN( this, CUI_RES( WN_BSP )), pLastCropField(0), - bInitialized(FALSE), - bSetOrigSize(FALSE) + bInitialized(sal_False), + bSetOrigSize(sal_False) { FreeResource(); @@ -132,6 +132,8 @@ SvxGrfCropPage::SvxGrfCropPage ( Window *pParent, const SfxItemSet &rSet ) aTimer.SetTimeoutHdl(LINK(this, SvxGrfCropPage, Timeout)); aTimer.SetTimeout( 1500 ); + + aOrigSizePB.SetAccessibleRelationLabeledBy( &aOrigSizeFT ); } SvxGrfCropPage::~SvxGrfCropPage() @@ -150,7 +152,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) const SfxItemPool& rPool = *rSet.GetPool(); if(SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( - SID_ATTR_GRAF_KEEP_ZOOM ), TRUE, &pItem )) + SID_ATTR_GRAF_KEEP_ZOOM ), sal_True, &pItem )) { if( ((const SfxBoolItem*)pItem)->GetValue() ) aZoomConstRB.Check(); @@ -159,8 +161,8 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) aZoomConstRB.SaveValue(); } - USHORT nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); - if( SFX_ITEM_SET == rSet.GetItemState( nW, TRUE, &pItem)) + sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); + if( SFX_ITEM_SET == rSet.GetItemState( nW, sal_True, &pItem)) { FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW )); @@ -185,7 +187,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) } nW = rPool.GetWhich( SID_ATTR_PAGE_SIZE ); - if ( SFX_ITEM_SET == rSet.GetItemState( nW, FALSE, &pItem ) ) + if ( SFX_ITEM_SET == rSet.GetItemState( nW, sal_False, &pItem ) ) { // Orientation und Size aus dem PageItem FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW )); @@ -208,8 +210,8 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) MapMode( (MapUnit)rSet.GetPool()->GetMetric( nW ) ) ); } - BOOL bFound = FALSE; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) ) + sal_Bool bFound = sal_False; + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) ) { const Graphic* pGrf = ((SvxBrushItem*)pItem)->GetGraphic(); if( pGrf ) @@ -221,26 +223,26 @@ void SvxGrfCropPage::Reset( const SfxItemSet &rSet ) aExampleWN.SetGraphic( *pGrf ); aExampleWN.SetFrameSize( aOrigSize ); - bFound = TRUE; + bFound = sal_True; if( ((SvxBrushItem*)pItem)->GetGraphicLink() ) aGraphicName = *((SvxBrushItem*)pItem)->GetGraphicLink(); } } GraphicHasChanged( bFound ); - bReset = TRUE; + bReset = sal_True; ActivatePage( rSet ); - bReset = FALSE; + bReset = sal_False; } -BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) +sal_Bool SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) { const SfxItemPool& rPool = *rSet.GetPool(); - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if( aWidthMF.GetSavedValue() != aWidthMF.GetText() || aHeightMF.GetSavedValue() != aHeightMF.GetText() ) { - USHORT nW = rPool.GetWhich( SID_ATTR_GRAF_FRMSIZE ); + sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_FRMSIZE ); FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW )); SvxSizeItem aSz( nW ); @@ -250,7 +252,7 @@ BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) const SfxItemSet* pExSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL; const SfxPoolItem* pItem = 0; if( pExSet && SFX_ITEM_SET == - pExSet->GetItemState( nW, FALSE, &pItem ) ) + pExSet->GetItemState( nW, sal_False, &pItem ) ) aSz = *(const SvxSizeItem*)pItem; else aSz = (const SvxSizeItem&)GetItemSet().Get( nW ); @@ -275,7 +277,7 @@ BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) if( aLeftMF.IsModified() || aRightMF.IsModified() || aTopMF.IsModified() || aBottomMF.IsModified() ) { - USHORT nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); + sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_CROP ); FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW )); SvxGrfCrop* pNew = (SvxGrfCrop*)rSet.Get( nW ).Clone(); @@ -293,7 +295,7 @@ BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet) SID_ATTR_GRAF_KEEP_ZOOM), aZoomConstRB.IsChecked() ) ); } - bInitialized = FALSE; + bInitialized = sal_False; return bModified; } @@ -305,12 +307,12 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) DBG_ASSERT( pPool, "Wo ist der Pool" ); #endif - bSetOrigSize = FALSE; + bSetOrigSize = sal_False; // Size Size aSize; const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_FRMSIZE, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_FRMSIZE, sal_False, &pItem ) ) aSize = ((const SvxSizeItem*)pItem)->GetSize(); nOldWidth = aSize.Width(); @@ -344,9 +346,9 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) aHeightMF.SetValue(nHeight, FUNIT_TWIP); } aHeightMF.SaveValue(); - bInitialized = TRUE; + bInitialized = sal_True; - if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) ) { const SvxBrushItem& rBrush = *(SvxBrushItem*)pItem; if( rBrush.GetGraphicLink() && @@ -363,7 +365,7 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) CalcMinMaxBorder(); } else - GraphicHasChanged( FALSE ); + GraphicHasChanged( sal_False ); } CalcZoom(); @@ -373,7 +375,7 @@ int SvxGrfCropPage::DeactivatePage(SfxItemSet *_pSet) { if ( _pSet ) FillItemSet( *_pSet ); - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- @@ -428,7 +430,7 @@ IMPL_LINK( SvxGrfCropPage, SizeHdl, MetricField *, pField ) lcl_GetValue(aRightMF, eUnit) ); if(!nWidth) nWidth++; - USHORT nZoom = (USHORT)( aSize.Width() * 100L / nWidth); + sal_uInt16 nZoom = (sal_uInt16)( aSize.Width() * 100L / nWidth); aWidthZoomMF.SetValue(nZoom); } else @@ -438,7 +440,7 @@ IMPL_LINK( SvxGrfCropPage, SizeHdl, MetricField *, pField ) lcl_GetValue(aBottomMF, eUnit)); if(!nHeight) nHeight++; - USHORT nZoom = (USHORT)( aSize.Height() * 100L/ nHeight); + sal_uInt16 nZoom = (sal_uInt16)( aSize.Height() * 100L/ nHeight); aHeightZoomMF.SetValue(nZoom); } @@ -456,7 +458,7 @@ IMPL_LINK( SvxGrfCropPage, CropHdl, const MetricField *, pField ) FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich( SID_ATTR_GRAF_CROP ) ) ); - BOOL bZoom = aZoomConstRB.IsChecked(); + sal_Bool bZoom = aZoomConstRB.IsChecked(); if( pField == &aLeftMF || pField == &aRightMF ) { long nLeft = lcl_GetValue( aLeftMF, eUnit ); @@ -543,7 +545,7 @@ IMPL_LINK( SvxGrfCropPage, OrigSizeHdl, PushButton *, EMPTYARG ) aHeightMF.SetValue( aHeightMF.Normalize( nHeight ), eUnit ); aWidthZoomMF.SetValue(100); aHeightZoomMF.SetValue(100); - bSetOrigSize = TRUE; + bSetOrigSize = sal_True; return 0; } /*-------------------------------------------------------------------- @@ -563,13 +565,13 @@ void SvxGrfCropPage::CalcZoom() lcl_GetValue( aRightMF, eUnit ); long nULBorders = lcl_GetValue( aTopMF, eUnit ) + lcl_GetValue( aBottomMF, eUnit ); - USHORT nZoom = 0; + sal_uInt16 nZoom = 0; long nDen; if( (nDen = aOrigSize.Width() - nLRBorders) > 0) - nZoom = (USHORT)((( nWidth * 1000L / nDen )+5)/10); + nZoom = (sal_uInt16)((( nWidth * 1000L / nDen )+5)/10); aWidthZoomMF.SetValue(nZoom); if( (nDen = aOrigSize.Height() - nULBorders) > 0) - nZoom = (USHORT)((( nHeight * 1000L / nDen )+5)/10); + nZoom = (sal_uInt16)((( nHeight * 1000L / nDen )+5)/10); else nZoom = 0; aHeightZoomMF.SetValue(nZoom); @@ -608,7 +610,7 @@ void SvxGrfCropPage::CalcMinMaxBorder() FixedText mit der Originalgroesse fuellen --------------------------------------------------------------------*/ -void SvxGrfCropPage::GraphicHasChanged( BOOL bFound ) +void SvxGrfCropPage::GraphicHasChanged( sal_Bool bFound ) { if( bFound ) { diff --git a/cui/source/tabpages/grfpage.src b/cui/source/tabpages/grfpage.src index 863f8787d..a6733903f 100644 --- a/cui/source/tabpages/grfpage.src +++ b/cui/source/tabpages/grfpage.src @@ -58,6 +58,7 @@ TabPage RID_SVXPAGE_GRFCROP }; MetricField MF_LEFT { + HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_LEFT"; Border = TRUE ; Pos = MAP_APPFONT ( 42 , 42 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -83,6 +84,7 @@ TabPage RID_SVXPAGE_GRFCROP }; MetricField MF_RIGHT { + HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_RIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 42 , 58 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -106,6 +108,7 @@ TabPage RID_SVXPAGE_GRFCROP }; MetricField MF_TOP { + HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_TOP"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 42 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -131,6 +134,7 @@ TabPage RID_SVXPAGE_GRFCROP }; MetricField MF_BOTTOM { + HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_BOTTOM"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 58 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -148,12 +152,14 @@ TabPage RID_SVXPAGE_GRFCROP }; RadioButton RB_SIZECONST { + HelpID = "cui:RadioButton:RID_SVXPAGE_GRFCROP:RB_SIZECONST"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 152 , 10 ) ; Text [ en-US ] = "Keep image si~ze" ; }; RadioButton RB_ZOOMCONST { + HelpID = "cui:RadioButton:RID_SVXPAGE_GRFCROP:RB_ZOOMCONST"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 152 , 10 ) ; Check = TRUE ; @@ -180,6 +186,7 @@ TabPage RID_SVXPAGE_GRFCROP }; MetricField MF_WIDTHZOOM { + HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_WIDTHZOOM"; Border = TRUE ; Pos = MAP_APPFONT ( 42 , 87 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -207,6 +214,7 @@ TabPage RID_SVXPAGE_GRFCROP }; MetricField MF_HEIGHTZOOM { + HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_HEIGHTZOOM"; Border = TRUE ; Pos = MAP_APPFONT ( 42 , 103 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -239,6 +247,7 @@ TabPage RID_SVXPAGE_GRFCROP }; MetricField MF_WIDTH { + HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 42 , 132 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -264,6 +273,7 @@ TabPage RID_SVXPAGE_GRFCROP }; MetricField MF_HEIGHT { + HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 42 , 148 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -286,6 +296,7 @@ TabPage RID_SVXPAGE_GRFCROP }; PushButton PB_ORGSIZE { + HelpID = "cui:PushButton:RID_SVXPAGE_GRFCROP:PB_ORGSIZE"; Pos = MAP_APPFONT ( 176 , 143 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index d4245e1e1..3f04a3a07 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -63,7 +63,7 @@ // static ---------------------------------------------------------------- -static USHORT pCaptionRanges[] = +static sal_uInt16 pCaptionRanges[] = { SDRATTR_CAPTIONTYPE, SDRATTR_CAPTIONFIXEDANGLE, @@ -164,7 +164,7 @@ void SvxCaptionTabPage::Construct() // ----------------------------------------------------------------------- -BOOL SvxCaptionTabPage::FillItemSet( SfxItemSet& _rOutAttrs) +sal_Bool SvxCaptionTabPage::FillItemSet( SfxItemSet& _rOutAttrs) { SfxItemPool* pPool = _rOutAttrs.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); @@ -231,7 +231,7 @@ BOOL SvxCaptionTabPage::FillItemSet( SfxItemSet& _rOutAttrs) //NYI-------------die Winkel muessen noch hier rein!!! XXX---------------------- - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- @@ -259,7 +259,7 @@ void SvxCaptionTabPage::Reset( const SfxItemSet& ) SfxItemPool* pPool = rOutAttrs.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); - USHORT nWhich; + sal_uInt16 nWhich; SfxMapUnit eUnit; //------- Winkel ---------- @@ -383,14 +383,14 @@ SfxTabPage* SvxCaptionTabPage::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SvxCaptionTabPage::GetRanges() +sal_uInt16* SvxCaptionTabPage::GetRanges() { return( pCaptionRanges ); } //------------------------------------------------------------------------ -void SvxCaptionTabPage::SetupAnsatz_Impl( USHORT nType ) +void SvxCaptionTabPage::SetupAnsatz_Impl( sal_uInt16 nType ) { xub_StrLen nCnt=0, nIdx=0; @@ -507,7 +507,7 @@ IMPL_LINK_INLINE_END( SvxCaptionTabPage, SelectCaptTypeHdl_Impl, void *, EMPTYAR //------------------------------------------------------------------------ -void SvxCaptionTabPage::SetupType_Impl( USHORT nType ) +void SvxCaptionTabPage::SetupType_Impl( sal_uInt16 nType ) { switch( nType-1 ) { @@ -568,7 +568,7 @@ void SvxCaptionTabPage::FillValueSet() //======================================================================== -SvxCaptionTabDialog::SvxCaptionTabDialog(Window* pParent, const SdrView* pSdrView, USHORT nAnchorTypes) +SvxCaptionTabDialog::SvxCaptionTabDialog(Window* pParent, const SdrView* pSdrView, sal_uInt16 nAnchorTypes) : SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_CAPTION ) ), pView ( pSdrView ), nAnchorCtrls(nAnchorTypes) @@ -602,7 +602,7 @@ SvxCaptionTabDialog::~SvxCaptionTabDialog() // ----------------------------------------------------------------------- -void SvxCaptionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SvxCaptionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { diff --git a/cui/source/tabpages/labdlg.src b/cui/source/tabpages/labdlg.src index e4e171ed3..802bcec08 100644 --- a/cui/source/tabpages/labdlg.src +++ b/cui/source/tabpages/labdlg.src @@ -53,6 +53,7 @@ TabPage RID_SVXPAGE_CAPTION }; MetricField MF_ABSTAND { + HelpID = "cui:MetricField:RID_SVXPAGE_CAPTION:MF_ABSTAND"; Border = TRUE ; Pos = MAP_APPFONT ( 50 , 51 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; @@ -73,6 +74,7 @@ TabPage RID_SVXPAGE_CAPTION }; ListBox LB_WINKEL { + HelpID = "cui:ListBox:RID_SVXPAGE_CAPTION:LB_WINKEL"; Border = TRUE ; Pos = MAP_APPFONT ( 143 , 51 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; @@ -96,6 +98,7 @@ TabPage RID_SVXPAGE_CAPTION }; ListBox LB_ANSATZ { + HelpID = "cui:ListBox:RID_SVXPAGE_CAPTION:LB_ANSATZ"; Border = TRUE ; Pos = MAP_APPFONT ( 50 , 67 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; @@ -119,6 +122,7 @@ TabPage RID_SVXPAGE_CAPTION }; MetricField MF_ANSATZ { + HelpID = "cui:MetricField:RID_SVXPAGE_CAPTION:MF_ANSATZ"; Border = TRUE ; Pos = MAP_APPFONT ( 143 , 67 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; @@ -139,6 +143,7 @@ TabPage RID_SVXPAGE_CAPTION }; ListBox LB_ANSATZ_REL { + HelpID = "cui:ListBox:RID_SVXPAGE_CAPTION:LB_ANSATZ_REL"; Border = TRUE ; Pos = MAP_APPFONT ( 143 , 67 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; @@ -153,6 +158,7 @@ TabPage RID_SVXPAGE_CAPTION }; MetricField MF_LAENGE { + HelpID = "cui:MetricField:RID_SVXPAGE_CAPTION:MF_LAENGE"; Border = TRUE ; Pos = MAP_APPFONT ( 50 , 83 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; @@ -167,6 +173,7 @@ TabPage RID_SVXPAGE_CAPTION }; CheckBox CB_LAENGE { + HelpID = "cui:CheckBox:RID_SVXPAGE_CAPTION:CB_LAENGE"; Pos = MAP_APPFONT ( 106 , 84 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; TabStop = TRUE ; diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index b9c560dc9..fb33590d8 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -41,10 +41,11 @@ #include <svtools/svmedit.hxx> #include "cfgutil.hxx" #include <sfx2/app.hxx> +#include <sfx2/evntconf.hxx> #include <sfx2/objsh.hxx> #include "macroass.hrc" #include "cuires.hrc" -#include <sfx2/macrconf.hxx> +#include <vcl/fixed.hxx> #include "headertablistbox.hxx" using ::com::sun::star::uno::Reference; @@ -61,7 +62,6 @@ public: PushButton* pDeletePB; String* pStrEvent; String* pAssignedMacro; - ListBox* pScriptTypeLB; _HeaderTabListBox* pEventLB; SfxConfigGroupListBox_Impl* pGroupLB; FixedText* pFT_MacroLBLabel; @@ -69,12 +69,10 @@ public: FixedText* pMacroFT; String* pMacroStr; - FNGetRangeHdl fnGetRange; - FNGetMacrosOfRangeHdl fnGetMacroOfRange; - BOOL bReadOnly; + sal_Bool bReadOnly; Timer maFillGroupTimer; - BOOL bGotEvents; + sal_Bool bGotEvents; }; _SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) : @@ -82,17 +80,14 @@ _SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) : pDeletePB( NULL ), pStrEvent( NULL ), pAssignedMacro( NULL ), - pScriptTypeLB( NULL ), pEventLB( NULL ), pGroupLB( NULL ), pFT_MacroLBLabel( NULL ), pMacroLB( NULL ), pMacroFT( NULL ), pMacroStr( NULL ), - fnGetRange( NULL ), - fnGetMacroOfRange( NULL ), - bReadOnly( FALSE ), - bGotEvents( FALSE ) + bReadOnly( sal_False ), + bGotEvents( sal_False ) { } @@ -102,7 +97,6 @@ _SfxMacroTabPage_Impl::~_SfxMacroTabPage_Impl() delete pDeletePB; delete pStrEvent; delete pAssignedMacro; - delete pScriptTypeLB; delete pEventLB; delete pGroupLB; delete pMacroLB; @@ -112,10 +106,7 @@ _SfxMacroTabPage_Impl::~_SfxMacroTabPage_Impl() } -SvStringsDtor* _ImpGetRangeHdl( _SfxMacroTabPage*, const String& rLanguage ); -SvStringsDtor* _ImpGetMacrosOfRangeHdl( _SfxMacroTabPage*, const String& rLanguage, const String& rRange ); - -static USHORT aPageRg[] = { +static sal_uInt16 aPageRg[] = { SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, 0 }; @@ -137,13 +128,13 @@ static long nTabs[] = #define LB_EVENTS_ITEMPOS 1 #define LB_MACROS_ITEMPOS 2 -String ConvertToUIName_Impl( SvxMacro *pMacro, const String& /*rLanguage*/ ) +String ConvertToUIName_Impl( SvxMacro *pMacro ) { String aName( pMacro->GetMacName() ); String aEntry; if ( ! pMacro->GetLanguage().EqualsAscii("JavaScript") ) { - USHORT nCount = aName.GetTokenCount('.'); + sal_uInt16 nCount = aName.GetTokenCount('.'); aEntry = aName.GetToken( nCount-1, '.' ); if ( nCount > 2 ) { @@ -159,36 +150,24 @@ String ConvertToUIName_Impl( SvxMacro *pMacro, const String& /*rLanguage*/ ) return aName; } -void _SfxMacroTabPage::EnableButtons( const String& rLangName ) +void _SfxMacroTabPage::EnableButtons() { // Solange die Eventbox leer ist, nichts tun const SvLBoxEntry* pE = mpImpl->pEventLB->GetListBox().FirstSelected(); if ( pE ) { // Gebundenes Macro holen - const SvxMacro* pM = aTbl.Get( (USHORT)(ULONG) pE->GetUserData() ); + const SvxMacro* pM = aTbl.Get( (sal_uInt16)(sal_uLong) pE->GetUserData() ); mpImpl->pDeletePB->Enable( 0 != pM && !mpImpl->bReadOnly ); - // Bei gleichem ScriptType Zuweisung nur, wenn Macro sich - // ge"andert hat; bei verschiedenem ScriptType, wenn Script nicht leer String sEventMacro; sEventMacro = ((SvLBoxString*)pE->GetItem( LB_MACROS_ITEMPOS ))->GetText(); - if ( rLangName.EqualsAscii("JavaScript") ) - { - OSL_FAIL( "_SfxMacroTabPage::EnableButtons(): this is not an up to date usage!" ); - } - else - { - SfxMacroInfo* pInfo = mpImpl->pMacroLB->GetMacroInfo(); - String sSelMacro; - if ( pInfo ) - sSelMacro = pInfo->GetMacroName(); - if( pM && rLangName != pM->GetLanguage() ) - mpImpl->pAssignPB->Enable( pInfo != 0 && !mpImpl->bReadOnly ); - else - mpImpl->pAssignPB->Enable( pInfo && !mpImpl->bReadOnly && !sSelMacro.EqualsIgnoreCaseAscii( sEventMacro ) ); - } + + String sScriptURI = mpImpl->pMacroLB->GetSelectedScriptURI(); + mpImpl->pAssignPB->Enable( !mpImpl->bReadOnly && !sScriptURI.EqualsIgnoreCaseAscii( sEventMacro ) ); } + else + mpImpl->pAssignPB->Enable( sal_False ); } _SfxMacroTabPage::_SfxMacroTabPage( Window* pParent, const ResId& rResId, const SfxItemSet& rAttrSet ) @@ -196,8 +175,6 @@ _SfxMacroTabPage::_SfxMacroTabPage( Window* pParent, const ResId& rResId, const { mpImpl = new _SfxMacroTabPage_Impl; - mpImpl->fnGetRange = &_ImpGetRangeHdl; - mpImpl->fnGetMacroOfRange = &_ImpGetMacrosOfRangeHdl; } _SfxMacroTabPage::~_SfxMacroTabPage() @@ -205,7 +182,7 @@ _SfxMacroTabPage::~_SfxMacroTabPage() DELETEZ( mpImpl ); } -void _SfxMacroTabPage::AddEvent( const String & rEventName, USHORT nEventId ) +void _SfxMacroTabPage::AddEvent( const String & rEventName, sal_uInt16 nEventId ) { String sTmp( rEventName ); sTmp += '\t'; @@ -214,7 +191,7 @@ void _SfxMacroTabPage::AddEvent( const String & rEventName, USHORT nEventId ) SvxMacro* pM = aTbl.Get( nEventId ); if( pM ) { - String sNew( ConvertToUIName_Impl( pM, mpImpl->pScriptTypeLB->GetSelectEntry() ) ); + String sNew( ConvertToUIName_Impl( pM ) ); sTmp += sNew; } @@ -222,60 +199,39 @@ void _SfxMacroTabPage::AddEvent( const String & rEventName, USHORT nEventId ) pE->SetUserData( reinterpret_cast< void* >( sal::static_int_cast< sal_IntPtr >( nEventId )) ); } -void _SfxMacroTabPage::ScriptChanged( const String& aLangName ) +void _SfxMacroTabPage::ScriptChanged() { // neue Bereiche und deren Funktionen besorgen { - mpImpl->pGroupLB->SetScriptType( aLangName ); mpImpl->pGroupLB->Show(); mpImpl->pMacroLB->Show(); mpImpl->pMacroFT->SetText( *mpImpl->pMacroStr ); } - EnableButtons( aLangName ); -} - -void _SfxMacroTabPage::SetGetRangeLink( FNGetRangeHdl pFn ) -{ - mpImpl->fnGetRange = pFn; -} - -FNGetRangeHdl _SfxMacroTabPage::GetGetRangeLink() const -{ - return mpImpl->fnGetRange; -} - -void _SfxMacroTabPage::SetGetMacrosOfRangeLink( FNGetMacrosOfRangeHdl pFn ) -{ - mpImpl->fnGetMacroOfRange = pFn; -} - -FNGetMacrosOfRangeHdl _SfxMacroTabPage::GetGetMacrosOfRangeLink() const -{ - return mpImpl->fnGetMacroOfRange; + EnableButtons(); } -BOOL _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet ) { SvxMacroItem aItem( GetWhich( aPageRg[0] ) ); ((SvxMacroTableDtor&)aItem.GetMacroTable()) = aTbl; const SfxPoolItem* pItem; - if( SFX_ITEM_SET != GetItemSet().GetItemState( aItem.Which(), TRUE, &pItem ) + if( SFX_ITEM_SET != GetItemSet().GetItemState( aItem.Which(), sal_True, &pItem ) || aItem != *(SvxMacroItem*)pItem ) { rSet.Put( aItem ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void _SfxMacroTabPage::PageCreated (SfxAllItemSet aSet) { const SfxPoolItem* pEventsItem; - if( !mpImpl->bGotEvents && SFX_ITEM_SET == aSet.GetItemState( SID_EVENTCONFIG, TRUE, &pEventsItem ) ) + if( !mpImpl->bGotEvents && SFX_ITEM_SET == aSet.GetItemState( SID_EVENTCONFIG, sal_True, &pEventsItem ) ) { - mpImpl->bGotEvents = TRUE; + mpImpl->bGotEvents = sal_True; const SfxEventNamesList& rList = ((SfxEventNamesItem*)pEventsItem)->GetEvents(); for ( size_t nNo = 0, nCnt = rList.size(); nNo < nCnt; ++nNo ) { @@ -288,13 +244,13 @@ void _SfxMacroTabPage::PageCreated (SfxAllItemSet aSet) void _SfxMacroTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; - if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( aPageRg[0] ), TRUE, &pItem )) + if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( aPageRg[0] ), sal_True, &pItem )) aTbl = ((SvxMacroItem*)pItem)->GetMacroTable(); const SfxPoolItem* pEventsItem; - if( !mpImpl->bGotEvents && SFX_ITEM_SET == rSet.GetItemState( SID_EVENTCONFIG, TRUE, &pEventsItem ) ) + if( !mpImpl->bGotEvents && SFX_ITEM_SET == rSet.GetItemState( SID_EVENTCONFIG, sal_True, &pEventsItem ) ) { - mpImpl->bGotEvents = TRUE; + mpImpl->bGotEvents = sal_True; const SfxEventNamesList& rList = ((SfxEventNamesItem*)pEventsItem)->GetEvents(); for ( size_t nNo = 0, nCnt = rList.size(); nNo < nCnt; ++nNo ) { @@ -311,12 +267,7 @@ void _SfxMacroTabPage::Reset( const SfxItemSet& rSet ) rListBox.SetCurEntry( pE ); } -void _SfxMacroTabPage::SetReadOnly( BOOL bSet ) -{ - mpImpl->bReadOnly = bSet; -} - -BOOL _SfxMacroTabPage::IsReadOnly() const +sal_Bool _SfxMacroTabPage::IsReadOnly() const { return mpImpl->bReadOnly; } @@ -326,7 +277,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG ) _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; SvHeaderTabListBox& rListBox = pImpl->pEventLB->GetListBox(); SvLBoxEntry* pE = rListBox.FirstSelected(); - ULONG nPos; + sal_uLong nPos; if( !pE || LISTBOX_ENTRY_NOTFOUND == ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) ) { @@ -334,24 +285,8 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG ) return 0; } - USHORT nEventId = (USHORT)(ULONG)pE->GetUserData(); - String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); - - const SvxMacro* pM = pThis->aTbl.Get( nEventId ); - if( pM ) - { - if( aLanguage != pM->GetLanguage() ) - { - pImpl->pScriptTypeLB->SelectEntry( pM->GetLanguage() ); - pThis->ScriptChanged( pM->GetLanguage() ); - } - else - { - DBG_ASSERT( !aLanguage.EqualsAscii("JavaScript"), "_SfxMacroTabPage, SelectEvent_Impl(): outdated use!" ); - } - } - - pThis->EnableButtons( aLanguage ); + pThis->ScriptChanged(); + pThis->EnableButtons(); return 0; } @@ -359,26 +294,14 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox*, EMPTYARG ) { _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; String sSel( pImpl->pGroupLB->GetGroup() ); - String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); - if( !aLanguage.EqualsAscii( "JavaScript" ) ) - { - pImpl->pGroupLB->GroupSelected(); - SfxMacroInfo* pMacro = pImpl->pMacroLB->GetMacroInfo(); - String aLabelText; - if( pMacro ) - { - aLabelText = pImpl->maStaticMacroLBLabel; - aLabelText += pMacro->GetModuleName(); - } - else - { - // Wenn dort ein Macro drin ist, wurde es selektiert und der - // AssignButton schon in SelectMacro richtig enabled - pImpl->pAssignPB->Enable( FALSE ); - } - - pImpl->pFT_MacroLBLabel->SetText( aLabelText ); - } + pImpl->pGroupLB->GroupSelected(); + const String sScriptURI = pImpl->pMacroLB->GetSelectedScriptURI(); + String aLabelText; + if( sScriptURI.Len() > 0 ) + aLabelText = pImpl->maStaticMacroLBLabel; + pImpl->pFT_MacroLBLabel->SetText( aLabelText ); + + pThis->EnableButtons(); return 0; } @@ -386,13 +309,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox*, EMPTYARG ) { _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; pImpl->pMacroLB->FunctionSelected(); - pThis->EnableButtons( pImpl->pScriptTypeLB->GetSelectEntry() ); - return 0; -} - -IMPL_STATIC_LINK( _SfxMacroTabPage, GetFocus_Impl, Edit*, EMPTYARG ) -{ - pThis->EnableButtons( DEFINE_CONST_UNICODE("JavaScript") ); + pThis->EnableButtons(); return 0; } @@ -401,7 +318,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) _SfxMacroTabPage_Impl* pImpl = pThis->mpImpl; SvHeaderTabListBox& rListBox = pImpl->pEventLB->GetListBox(); SvLBoxEntry* pE = rListBox.FirstSelected(); - ULONG nPos; + sal_uLong nPos; if( !pE || LISTBOX_ENTRY_NOTFOUND == ( nPos = rListBox.GetModel()->GetAbsPos( pE ) ) ) { @@ -409,58 +326,38 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) return 0; } - const BOOL bAssEnabled = pBtn != pImpl->pDeletePB && pImpl->pAssignPB->IsEnabled(); + const sal_Bool bAssEnabled = pBtn != pImpl->pDeletePB && pImpl->pAssignPB->IsEnabled(); // aus der Tabelle entfernen - USHORT nEvent = (USHORT)(ULONG)pE->GetUserData(); + sal_uInt16 nEvent = (sal_uInt16)(sal_uLong)pE->GetUserData(); SvxMacro *pRemoveMacro = pThis->aTbl.Remove( nEvent ); delete pRemoveMacro; - String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry(); - String sNew; + String sScriptURI; if( bAssEnabled ) { - String sGroup; - String sMacro; - String aEntryText( sNew ); - DBG_ASSERT( !aLanguage.EqualsAscii("JavaScript"), "_SfxMacroTabPage, AssignDeleteHdl_Impl(): outdated use!" ); - - SfxMacroInfo* pMacro = pImpl->pMacroLB->GetMacroInfo(); - sMacro = pMacro->GetQualifiedName(); - sGroup = pImpl->pGroupLB->GetGroup(); - sNew = pMacro->GetMacroName(); - - if( sMacro.CompareToAscii( "vnd.sun.star.script:", 20 ) == COMPARE_EQUAL ) + sScriptURI = pImpl->pMacroLB->GetSelectedScriptURI(); + if( sScriptURI.CompareToAscii( "vnd.sun.star.script:", 20 ) == COMPARE_EQUAL ) { - OSL_TRACE("ASSIGN_DELETE: Its a script"); pThis->aTbl.Insert( - nEvent, new SvxMacro( sMacro, String::CreateFromAscii("Script") ) ); + nEvent, new SvxMacro( sScriptURI, String::CreateFromAscii( SVX_MACRO_LANGUAGE_SF ) ) ); } else { - OSL_TRACE("ASSIGN_DELETE: Its a basic macro"); - String sBasicName/*(SfxResId(STR_BASICNAME))*/; - if ( aLanguage == sBasicName ) - pThis->aTbl.Insert( nEvent, new SvxMacro( sMacro, sGroup, STARBASIC ) ); - else - pThis->aTbl.Insert( nEvent, new SvxMacro( sMacro, aLanguage ) ); + OSL_ENSURE( false, "_SfxMacroTabPage::AssignDeleteHdl_Impl: this branch is *not* dead? (out of interest: tell fs, please!)" ); + pThis->aTbl.Insert( + nEvent, new SvxMacro( sScriptURI, String::CreateFromAscii( SVX_MACRO_LANGUAGE_STARBASIC ) ) ); } } - pImpl->pEventLB->SetUpdateMode( FALSE ); - pE->ReplaceItem( new SvLBoxString( pE, 0, sNew ), LB_MACROS_ITEMPOS ); + pImpl->pEventLB->SetUpdateMode( sal_False ); + pE->ReplaceItem( new SvLBoxString( pE, 0, sScriptURI ), LB_MACROS_ITEMPOS ); rListBox.GetModel()->InvalidateEntry( pE ); rListBox.Select( pE ); rListBox.MakeVisible( pE ); - rListBox.SetUpdateMode( TRUE ); - - pThis->EnableButtons( aLanguage ); - return 0; -} + rListBox.SetUpdateMode( sal_True ); -IMPL_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton*, EMPTYARG ) -{ - pThis->ScriptChanged( pThis->mpImpl->pScriptTypeLB->GetSelectEntry() ); + pThis->EnableButtons(); return 0; } @@ -472,12 +369,12 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer*, EMPTYARG ) if ( pTabDlg ) { pTabDlg->EnterWait(); - pTabDlg->EnableInput( FALSE ); + pTabDlg->EnableInput( sal_False ); } pThis->FillMacroList(); if ( pTabDlg ) { - pTabDlg->EnableInput( TRUE ); + pTabDlg->EnableInput( sal_True ); pTabDlg->LeaveWait(); } return 0; @@ -498,8 +395,6 @@ void _SfxMacroTabPage::InitAndSetHandler() mpImpl->pGroupLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectGroup_Impl )); mpImpl->pMacroLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectMacro_Impl )); - mpImpl->pScriptTypeLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, ChangeScriptHdl_Impl )); - rListBox.SetSelectionMode( SINGLE_SELECTION ); rListBox.SetTabs( &nTabs[0], MAP_APPFONT ); Size aSize( nTabs[ 2 ], 0 ); @@ -511,14 +406,9 @@ void _SfxMacroTabPage::InitAndSetHandler() mpImpl->pEventLB->Show(); mpImpl->pEventLB->ConnectElements(); - mpImpl->pEventLB->Enable( TRUE ); - mpImpl->pGroupLB->Enable( TRUE ); - mpImpl->pMacroLB->Enable( TRUE ); - - mpImpl->pScriptTypeLB->SetDropDownLineCount( 3 ); - String sBasicName/*(SfxResId(STR_BASICNAME))*/; - mpImpl->pScriptTypeLB->InsertEntry( sBasicName ); - mpImpl->pScriptTypeLB->SelectEntry( sBasicName ); + mpImpl->pEventLB->Enable( sal_True ); + mpImpl->pGroupLB->Enable( sal_True ); + mpImpl->pMacroLB->Enable( sal_True ); mpImpl->pGroupLB->SetFunctionListBox( mpImpl->pMacroLB ); @@ -529,33 +419,21 @@ void _SfxMacroTabPage::InitAndSetHandler() void _SfxMacroTabPage::FillMacroList() { - String aLanguage = mpImpl->pScriptTypeLB->GetSelectEntry(); - if( ! aLanguage.EqualsAscii("JavaScript") ) - { - // 2 Listboxen - SvStringsDtor* pArr = (*mpImpl->fnGetRange)( this, String(/*SfxResId(STR_BASICNAME)*/) ); - if( pArr ) - { - mpImpl->pGroupLB->Init( - ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory >(), - GetFrame(), - ::rtl::OUString() ); - - delete pArr; - } - } + mpImpl->pGroupLB->Init( + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory >(), + GetFrame(), + ::rtl::OUString() ); } void _SfxMacroTabPage::FillEvents() { SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); - String aLanguage = mpImpl->pScriptTypeLB->GetSelectEntry(); - ULONG nEntryCnt = rListBox.GetEntryCount(); + sal_uLong nEntryCnt = rListBox.GetEntryCount(); // Events aus der Tabelle holen und die EventListBox entsprechen fuellen - for( ULONG n = 0 ; n < nEntryCnt ; ++n ) + for( sal_uLong n = 0 ; n < nEntryCnt ; ++n ) { SvLBoxEntry* pE = rListBox.GetEntry( n ); if( pE ) @@ -565,9 +443,9 @@ void _SfxMacroTabPage::FillEvents() String sOld( pLItem->GetText() ); String sNew; - USHORT nEventId = ( USHORT ) ( ULONG ) pE->GetUserData(); + sal_uInt16 nEventId = ( sal_uInt16 ) ( sal_uLong ) pE->GetUserData(); if( aTbl.IsKeyValid( nEventId ) ) - sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ), aLanguage ); + sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ) ); if( sOld != sNew ) { @@ -578,96 +456,6 @@ void _SfxMacroTabPage::FillEvents() } } -void _SfxMacroTabPage::SelectEvent( const String & /*rEventName*/, USHORT nEventId ) -{ - SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); - ULONG nEntryCnt = rListBox.GetEntryCount(); - - for( ULONG n = 0 ; n < nEntryCnt ; ++n ) - { - SvLBoxEntry* pE = rListBox.GetEntry( n ); - if( pE && ( USHORT ) ( ULONG ) pE->GetUserData() == nEventId ) - { - rListBox.SetCurEntry( pE ); - rListBox.MakeVisible( pE ); - break; - } - } -} - - -SvStringsDtor* _ImpGetRangeHdl( _SfxMacroTabPage* /*pTbPg*/, const String& rLanguage ) -{ - SvStringsDtor* pNew = new SvStringsDtor; - SfxApplication* pSfxApp = SFX_APP(); - - if ( !rLanguage.EqualsAscii("JavaScript") ) - { - pSfxApp->EnterBasicCall(); - - // AppBasic einf"ugen - String* pNewEntry = new String( pSfxApp->GetName() ); - pNew->Insert( pNewEntry, pNew->Count() ); - - // Aktuelles Dokument - SfxObjectShell* pDoc = SfxObjectShell::Current(); - if ( pDoc ) - { - String aTitle = pDoc->GetTitle(); - - // Hack f"ur Aufruf aus der Basic-IDE : das Basic ermitteln, das - // gerade bearbeitet wird - - String aAppName(DEFINE_CONST_UNICODE("BASIC - ")); - USHORT nLen = aAppName.Len(); - if ( aTitle.CompareIgnoreCaseToAscii( aAppName, nLen ) == COMPARE_EQUAL ) - { - // Basic-Namensprefix entfernen - aTitle.Erase( 0, nLen ); - USHORT nIndex=0, nCount=aTitle.GetTokenCount('.'); - if ( nCount > 1 ) - { - // Namen der Library entfernen - aTitle.GetToken( nCount-2, '.', nIndex ); - aTitle.Erase( nIndex-1 ); - } - - // Wenn das App-Basic gerade in der Basic-IDE bearbeitet wird, kein - // Dokument verwenden - pDoc = SfxObjectShell::GetFirst(); - while( pDoc ) - { - if ( aTitle == pDoc->GetTitle() ) - break; - pDoc = SfxObjectShell::GetNext( *pDoc ); - } - } - - if ( pDoc && pDoc->GetBasicManager() != SFX_APP()->GetBasicManager() && - pDoc->GetBasicManager()->GetLibCount() ) - { - pNewEntry = new String( aTitle ); - pNew->Insert( pNewEntry, pNew->Count() ); - } - } - - pSfxApp->LeaveBasicCall(); - } - - return pNew; -} - -// besorgen der Funktionen eines Bereiches -SvStringsDtor* _ImpGetMacrosOfRangeHdl( - _SfxMacroTabPage* /*pTbPg*/, - const String& /*rLanguage*/, - const String& /*rRange*/ ) -{ - SvStringsDtor* pNew = new SvStringsDtor; - return pNew; -} - - SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet ) : _SfxMacroTabPage( pParent, rResId, rSet ) { @@ -676,8 +464,6 @@ SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Re mpImpl->pEventLB = new _HeaderTabListBox( this, CUI_RES( LB_EVENT ) ); mpImpl->pAssignPB = new PushButton( this, CUI_RES( PB_ASSIGN ) ); mpImpl->pDeletePB = new PushButton( this, CUI_RES( PB_DELETE ) ); - mpImpl->pScriptTypeLB = new ListBox(this, CUI_RES( LB_SCRIPTTYPE ) ); - mpImpl->pScriptTypeLB->Hide(); mpImpl->pMacroFT = new FixedText( this, CUI_RES( FT_MACRO ) ); mpImpl->pGroupLB = new SfxConfigGroupListBox_Impl( this, CUI_RES( LB_GROUP ) ); mpImpl->pFT_MacroLBLabel = new FixedText( this, CUI_RES( FT_LABEL4LB_MACROS ) ); @@ -691,7 +477,7 @@ SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Re InitAndSetHandler(); - ScriptChanged( String( /*SfxResId(STR_BASICNAME)*/ ) ); + ScriptChanged(); } SfxTabPage* SfxMacroTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet ) diff --git a/cui/source/tabpages/macroass.hrc b/cui/source/tabpages/macroass.hrc index 9c6fd7ccd..997bb6cf9 100644 --- a/cui/source/tabpages/macroass.hrc +++ b/cui/source/tabpages/macroass.hrc @@ -38,7 +38,7 @@ #define FT_MACRO 5 #define LB_GROUP 6 #define LB_MACROS 7 -#define LB_SCRIPTTYPE 8 + // FREE #define FT_LABEL4LB_MACROS 9 #define STR_JAVASCRIPT 10 #define STR_MACROS 11 diff --git a/cui/source/tabpages/macroass.src b/cui/source/tabpages/macroass.src index 9da3b32b5..0db9825a5 100644 --- a/cui/source/tabpages/macroass.src +++ b/cui/source/tabpages/macroass.src @@ -32,6 +32,7 @@ TabPage RID_SVXPAGE_EVENTASSIGN { + HelpID = "cui:TabPage:RID_SVXPAGE_EVENTASSIGN"; Hide = TRUE ; SVLook = TRUE ; DialogControl = TRUE ; @@ -77,7 +78,7 @@ TabPage RID_SVXPAGE_EVENTASSIGN Pos = MAP_APPFONT ( COL2 , ROW7 ) ; Size = MAP_APPFONT ( WIDTH1 , RSC_CD_FIXEDTEXT_HEIGHT + HEIGHT_EXTRA7 ) ; WordBreak = TRUE; - Text [ en-US ] = "~Existing macros in:\n" ; + Text [ en-US ] = "~Existing macros\n" ; }; Control LB_MACROS { @@ -89,6 +90,7 @@ TabPage RID_SVXPAGE_EVENTASSIGN }; PushButton PB_ASSIGN { + HelpID = "cui:PushButton:RID_SVXPAGE_EVENTASSIGN:PB_ASSIGN"; Pos = MAP_APPFONT ( COL4 , ROW0 ) ; Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; Disable = TRUE ; @@ -97,22 +99,13 @@ TabPage RID_SVXPAGE_EVENTASSIGN }; PushButton PB_DELETE { + HelpID = "cui:PushButton:RID_SVXPAGE_EVENTASSIGN:PB_DELETE"; Pos = MAP_APPFONT ( COL4 , ROW2 ) ; Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; Disable = TRUE ; TabStop = TRUE ; Text [ en-US ] = "~Remove" ; }; - ListBox LB_SCRIPTTYPE - { - Pos = MAP_APPFONT ( COL4 , ROW4 ) ; - Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , 60 ) ; - // en-US was missing - Text [ en-US ] = "~Scripting Language" ; - TabStop = TRUE ; - Disable = FALSE ; - DropDown = TRUE ; - }; String STR_MACROS { Text [ en-US ] = "Macros" ; diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 344551b23..55632dfda 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -50,7 +50,7 @@ #include <sfx2/request.hxx> #include "svx/ofaitem.hxx" -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST, @@ -126,8 +126,9 @@ SvxMeasurePage::SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs ) : aAttrSet ( *rInAttrs.GetPool() ), pView( 0 ), - bPositionModified ( FALSE ) + bPositionModified ( sal_False ) { + aCtlPreview.SetAccessibleName(aCtlPreview.GetHelpText()); FillUnitLB(); FreeResource(); @@ -166,6 +167,9 @@ SvxMeasurePage::SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs ) : aTsbParallel.SetClickHdl( aLink ); aTsbShowUnit.SetClickHdl( aLink ); aLbUnit.SetSelectHdl( aLink ); + aLbUnit.SetAccessibleName(GetNonMnemonicString(aTsbShowUnit.GetText())); + aCtlPosition.SetAccessibleRelationMemberOf( &aFlLabel ); + aLbUnit.SetAccessibleRelationLabeledBy( &aTsbShowUnit ); } /************************************************************************* @@ -271,7 +275,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { aTsbBelowRefEdge.SetState( ( ( const SdrMeasureBelowRefEdgeItem& )rAttrs.Get( SDRATTR_MEASUREBELOWREFEDGE ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbBelowRefEdge.EnableTriState( FALSE ); + aTsbBelowRefEdge.EnableTriState( sal_False ); } else { @@ -285,7 +289,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREDECIMALPLACES ); if( pItem ) { - INT16 nValue = ( ( const SdrMeasureDecimalPlacesItem* )pItem )->GetValue(); + sal_Int16 nValue = ( ( const SdrMeasureDecimalPlacesItem* )pItem )->GetValue(); aMtrFldDecimalPlaces.SetValue( nValue ); } else @@ -300,7 +304,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { aTsbParallel.SetState( ( ( const SdrMeasureTextRota90Item& )rAttrs.Get( SDRATTR_MEASURETEXTROTA90 ) ). GetValue() ? STATE_NOCHECK : STATE_CHECK ); - aTsbParallel.EnableTriState( FALSE ); + aTsbParallel.EnableTriState( sal_False ); } else { @@ -313,7 +317,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { aTsbShowUnit.SetState( ( ( const SdrMeasureShowUnitItem& )rAttrs.Get( SDRATTR_MEASURESHOWUNIT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbShowUnit.EnableTriState( FALSE ); + aTsbShowUnit.EnableTriState( sal_False ); } else { @@ -327,7 +331,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) long nFieldUnit = (long) ( ( const SdrMeasureUnitItem& )rAttrs. Get( SDRATTR_MEASUREUNIT ) ).GetValue(); - for( USHORT i = 0; i < aLbUnit.GetEntryCount(); ++i ) + for( sal_uInt16 i = 0; i < aLbUnit.GetEntryCount(); ++i ) { if ( (long)aLbUnit.GetEntryData( i ) == nFieldUnit ) { @@ -350,8 +354,8 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE ) { - aTsbAutoPosV.EnableTriState( FALSE ); - aTsbAutoPosH.EnableTriState( FALSE ); + aTsbAutoPosV.EnableTriState( sal_False ); + aTsbAutoPosH.EnableTriState( sal_False ); SdrMeasureTextHPos eHPos = (SdrMeasureTextHPos) ( ( const SdrMeasureTextHPosItem& )rAttrs.Get( SDRATTR_MEASURETEXTHPOS ) ).GetValue(); @@ -429,7 +433,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) ChangeAttrHdl_Impl( &aTsbShowUnit ); aCtlPreview.SetAttributes( rAttrs ); - bPositionModified = FALSE; + bPositionModified = sal_False; } /************************************************************************* @@ -438,86 +442,86 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) { - BOOL bModified = FALSE; - INT32 nValue; + sal_Bool bModified = sal_False; + sal_Int32 nValue; TriState eState; if( aMtrFldLineDist.GetText() != aMtrFldLineDist.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldLineDist, eUnit ); rAttrs.Put( SdrMeasureLineDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelplineOverhang.GetText() != aMtrFldHelplineOverhang.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit ); rAttrs.Put( SdrMeasureHelplineOverhangItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelplineDist.GetText() != aMtrFldHelplineDist.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelplineDist, eUnit ); rAttrs.Put( SdrMeasureHelplineDistItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelpline1Len.GetText() != aMtrFldHelpline1Len.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit ); rAttrs.Put( SdrMeasureHelpline1LenItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( aMtrFldHelpline2Len.GetText() != aMtrFldHelpline2Len.GetSavedValue() ) { nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit ); rAttrs.Put( SdrMeasureHelpline2LenItem( nValue ) ); - bModified = TRUE; + bModified = sal_True; } eState = aTsbBelowRefEdge.GetState(); if( eState != aTsbBelowRefEdge.GetSavedValue() ) { - rAttrs.Put( SdrMeasureBelowRefEdgeItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrMeasureBelowRefEdgeItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } if( aMtrFldDecimalPlaces.GetText() != aMtrFldDecimalPlaces.GetSavedValue() ) { - nValue = static_cast<INT32>(aMtrFldDecimalPlaces.GetValue()); + nValue = static_cast<sal_Int32>(aMtrFldDecimalPlaces.GetValue()); rAttrs.Put( SdrMeasureDecimalPlacesItem( - sal::static_int_cast< INT16 >( nValue ) ) ); - bModified = TRUE; + sal::static_int_cast< sal_Int16 >( nValue ) ) ); + bModified = sal_True; } eState = aTsbParallel.GetState(); if( eState != aTsbParallel.GetSavedValue() ) { - rAttrs.Put( SdrMeasureTextRota90Item( (BOOL) STATE_NOCHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrMeasureTextRota90Item( (sal_Bool) STATE_NOCHECK == eState ) ); + bModified = sal_True; } eState = aTsbShowUnit.GetState(); if( eState != aTsbShowUnit.GetSavedValue() ) { - rAttrs.Put( SdrMeasureShowUnitItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrMeasureShowUnitItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } - USHORT nPos = aLbUnit.GetSelectEntryPos(); + sal_uInt16 nPos = aLbUnit.GetSelectEntryPos(); if( nPos != aLbUnit.GetSavedValue() ) { if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nFieldUnit = (USHORT)(long)aLbUnit.GetEntryData( nPos ); + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aLbUnit.GetEntryData( nPos ); FieldUnit _eUnit = (FieldUnit) nFieldUnit; rAttrs.Put( SdrMeasureUnitItem( _eUnit ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -563,13 +567,13 @@ BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) if( eOldVPos != eVPos ) { rAttrs.Put( SdrMeasureTextVPosItem( eVPos ) ); - bModified = TRUE; + bModified = sal_True; } } else { rAttrs.Put( SdrMeasureTextVPosItem( eVPos ) ); - bModified = TRUE; + bModified = sal_True; } if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE ) @@ -579,13 +583,13 @@ BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs) if( eOldHPos != eHPos ) { rAttrs.Put( SdrMeasureTextHPosItem( eHPos ) ); - bModified = TRUE; + bModified = sal_True; } } else { rAttrs.Put( SdrMeasureTextHPosItem( eHPos ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -625,7 +629,7 @@ SfxTabPage* SvxMeasurePage::Create( Window* pWindow, |* \************************************************************************/ -USHORT* SvxMeasurePage::GetRanges() +sal_uInt16* SvxMeasurePage::GetRanges() { return( pRanges ); } @@ -707,31 +711,31 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) if( p == &aMtrFldLineDist ) { - INT32 nValue = GetCoreValue( aMtrFldLineDist, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldLineDist, eUnit ); aAttrSet.Put( SdrMeasureLineDistItem( nValue ) ); } if( p == &aMtrFldHelplineOverhang ) { - INT32 nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit ); aAttrSet.Put( SdrMeasureHelplineOverhangItem( nValue) ); } if( p == &aMtrFldHelplineDist ) { - INT32 nValue = GetCoreValue( aMtrFldHelplineDist, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelplineDist, eUnit ); aAttrSet.Put( SdrMeasureHelplineDistItem( nValue) ); } if( p == &aMtrFldHelpline1Len ) { - INT32 nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit ); aAttrSet.Put( SdrMeasureHelpline1LenItem( nValue ) ); } if( p == &aMtrFldHelpline2Len ) { - INT32 nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit ); + sal_Int32 nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit ); aAttrSet.Put( SdrMeasureHelpline2LenItem( nValue ) ); } @@ -739,12 +743,12 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) { TriState eState = aTsbBelowRefEdge.GetState(); if( eState != STATE_DONTKNOW ) - aAttrSet.Put( SdrMeasureBelowRefEdgeItem( (BOOL) STATE_CHECK == eState ) ); + aAttrSet.Put( SdrMeasureBelowRefEdgeItem( (sal_Bool) STATE_CHECK == eState ) ); } if( p == &aMtrFldDecimalPlaces ) { - INT16 nValue = sal::static_int_cast< INT16 >( + sal_Int16 nValue = sal::static_int_cast< sal_Int16 >( aMtrFldDecimalPlaces.GetValue() ); aAttrSet.Put( SdrMeasureDecimalPlacesItem( nValue ) ); } @@ -753,22 +757,22 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) { TriState eState = aTsbParallel.GetState(); if( eState != STATE_DONTKNOW ) - aAttrSet.Put( SdrMeasureTextRota90Item( (BOOL) !STATE_CHECK == eState ) ); + aAttrSet.Put( SdrMeasureTextRota90Item( (sal_Bool) !STATE_CHECK == eState ) ); } if( p == &aTsbShowUnit ) { TriState eState = aTsbShowUnit.GetState(); if( eState != STATE_DONTKNOW ) - aAttrSet.Put( SdrMeasureShowUnitItem( (BOOL) STATE_CHECK == eState ) ); + aAttrSet.Put( SdrMeasureShowUnitItem( (sal_Bool) STATE_CHECK == eState ) ); } if( p == &aLbUnit ) { - USHORT nPos = aLbUnit.GetSelectEntryPos(); + sal_uInt16 nPos = aLbUnit.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nFieldUnit = (USHORT)(long)aLbUnit.GetEntryData( nPos ); + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aLbUnit.GetEntryData( nPos ); FieldUnit _eUnit = (FieldUnit) nFieldUnit; aAttrSet.Put( SdrMeasureUnitItem( _eUnit ) ); } @@ -776,7 +780,7 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p ) if( p == &aTsbAutoPosV || p == &aTsbAutoPosH || p == &aCtlPosition ) { - bPositionModified = TRUE; + bPositionModified = sal_True; // Position RECT_POINT eRP = aCtlPosition.GetActualRP(); @@ -846,10 +850,10 @@ void SvxMeasurePage::FillUnitLB() long nUnit = FUNIT_NONE; String aStrMetric( CUI_RES( STR_MEASURE_AUTOMATIC ) ); - USHORT nPos = aLbUnit.InsertEntry( aStrMetric ); + sal_uInt16 nPos = aLbUnit.InsertEntry( aStrMetric ); aLbUnit.SetEntryData( nPos, (void*)nUnit ); - for( USHORT i = 0; i < aMetricArr.Count(); ++i ) + for( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i ) { aStrMetric = aMetricArr.GetStringByPos( i ); nUnit = aMetricArr.GetValue( i ); diff --git a/cui/source/tabpages/measure.src b/cui/source/tabpages/measure.src index bec495036..52bf76a58 100644 --- a/cui/source/tabpages/measure.src +++ b/cui/source/tabpages/measure.src @@ -55,6 +55,7 @@ TabPage RID_SVXPAGE_MEASURE }; MetricField MTR_LINE_DIST { + HelpID = "cui:MetricField:RID_SVXPAGE_MEASURE:MTR_LINE_DIST"; Border = TRUE ; Pos = MAP_APPFONT ( 78 , 14 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -77,6 +78,7 @@ TabPage RID_SVXPAGE_MEASURE }; MetricField MTR_FLD_HELPLINE_OVERHANG { + HelpID = "cui:MetricField:RID_SVXPAGE_MEASURE:MTR_FLD_HELPLINE_OVERHANG"; Border = TRUE ; Pos = MAP_APPFONT ( 78 , 30 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -99,6 +101,7 @@ TabPage RID_SVXPAGE_MEASURE }; MetricField MTR_FLD_HELPLINE_DIST { + HelpID = "cui:MetricField:RID_SVXPAGE_MEASURE:MTR_FLD_HELPLINE_DIST"; Border = TRUE ; Pos = MAP_APPFONT ( 78 , 46 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -121,6 +124,7 @@ TabPage RID_SVXPAGE_MEASURE }; MetricField MTR_FLD_HELPLINE1_LEN { + HelpID = "cui:MetricField:RID_SVXPAGE_MEASURE:MTR_FLD_HELPLINE1_LEN"; Border = TRUE ; Pos = MAP_APPFONT ( 78 , 62 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -143,6 +147,7 @@ TabPage RID_SVXPAGE_MEASURE }; MetricField MTR_FLD_HELPLINE2_LEN { + HelpID = "cui:MetricField:RID_SVXPAGE_MEASURE:MTR_FLD_HELPLINE2_LEN"; Border = TRUE ; Pos = MAP_APPFONT ( 78 , 78 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -159,6 +164,7 @@ TabPage RID_SVXPAGE_MEASURE }; TriStateBox TSB_BELOW_REF_EDGE { + HelpID = "cui:TriStateBox:RID_SVXPAGE_MEASURE:TSB_BELOW_REF_EDGE"; Pos = MAP_APPFONT ( 12 , 96 ) ; Size = MAP_APPFONT ( 108 , 10 ) ; TabStop = TRUE ; @@ -173,6 +179,7 @@ TabPage RID_SVXPAGE_MEASURE }; MetricField MTR_FLD_DECIMALPLACES { + HelpID = "cui:MetricField:RID_SVXPAGE_MEASURE:MTR_FLD_DECIMALPLACES"; Border = TRUE ; Pos = MAP_APPFONT ( 78 , 110 ) ; Size = MAP_APPFONT ( 42 , 12 ) ; @@ -213,6 +220,7 @@ TabPage RID_SVXPAGE_MEASURE }; TriStateBox TSB_AUTOPOSV { + HelpID = "cui:TriStateBox:RID_SVXPAGE_MEASURE:TSB_AUTOPOSV"; Pos = MAP_APPFONT ( 154 , 54 ) ; Size = MAP_APPFONT ( 101 , 10 ) ; TabStop = TRUE ; @@ -220,6 +228,7 @@ TabPage RID_SVXPAGE_MEASURE }; TriStateBox TSB_AUTOPOSH { + HelpID = "cui:TriStateBox:RID_SVXPAGE_MEASURE:TSB_AUTOPOSH"; Pos = MAP_APPFONT ( 154 , 68 ) ; Size = MAP_APPFONT ( 101 , 10 ) ; TabStop = TRUE ; @@ -227,6 +236,7 @@ TabPage RID_SVXPAGE_MEASURE }; TriStateBox TSB_PARALLEL { + HelpID = "cui:TriStateBox:RID_SVXPAGE_MEASURE:TSB_PARALLEL"; Pos = MAP_APPFONT ( 138 , 82 ) ; Size = MAP_APPFONT ( 110 , 10 ) ; TabStop = TRUE ; @@ -234,6 +244,7 @@ TabPage RID_SVXPAGE_MEASURE }; TriStateBox TSB_SHOW_UNIT { + HelpID = "cui:TriStateBox:RID_SVXPAGE_MEASURE:TSB_SHOW_UNIT"; Pos = MAP_APPFONT ( 138 , 96 ) ; Size = MAP_APPFONT ( 64+40 , 10 ) ; TabStop = TRUE ; @@ -241,6 +252,7 @@ TabPage RID_SVXPAGE_MEASURE }; ListBox LB_UNIT { + HelpID = "cui:ListBox:RID_SVXPAGE_MEASURE:LB_UNIT"; Border = TRUE ; Pos = MAP_APPFONT ( 154 , 110 ) ; Size = MAP_APPFONT ( 60 , 80+35 ) ; diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 066e7127d..03fb70608 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -58,7 +58,7 @@ // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO, @@ -88,10 +88,10 @@ SvxNumberPreviewImpl::SvxNumberPreviewImpl( Window* pParent, const ResId& rResId { Font aFont( GetFont() ); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aFont.SetColor( Application::GetSettings().GetStyleSettings().GetFieldColor() ); SetFont( aFont ); - InitSettings( TRUE, TRUE ); + InitSettings( sal_True, sal_True ); SetBorderStyle( WINDOW_BORDER_MONO ); } @@ -157,7 +157,7 @@ void SvxNumberPreviewImpl::Paint( const Rectangle& ) // ----------------------------------------------------------------------- -void SvxNumberPreviewImpl::InitSettings( BOOL bForeground, BOOL bBackground ) +void SvxNumberPreviewImpl::InitSettings( sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); @@ -186,9 +186,9 @@ void SvxNumberPreviewImpl::InitSettings( BOOL bForeground, BOOL bBackground ) void SvxNumberPreviewImpl::StateChanged( StateChangedType nType ) { if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) - InitSettings( TRUE, FALSE ); + InitSettings( sal_True, sal_False ); else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) - InitSettings( FALSE, TRUE ); + InitSettings( sal_False, sal_True ); Window::StateChanged( nType ); } @@ -200,7 +200,7 @@ void SvxNumberPreviewImpl::DataChanged( const DataChangedEvent& rDCEvt ) Window::DataChanged( rDCEvt ); if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) - InitSettings( TRUE, TRUE ); + InitSettings( sal_True, sal_True ); } // class SvxNumberFormatTabPage ------------------------------------------ @@ -240,15 +240,20 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window* pParent, aLbCurrency ( this, CUI_RES( LB_CURRENCY) ), aLbFormat ( this, CUI_RES( LB_FORMAT ) ), aFtLanguage ( this, CUI_RES( FT_LANGUAGE ) ), - aLbLanguage ( this, CUI_RES( LB_LANGUAGE ), FALSE ), + aLbLanguage ( this, CUI_RES( LB_LANGUAGE ), sal_False ), aCbSourceFormat ( this, CUI_RES( CB_SOURCEFORMAT ) ), +#if ENABLE_LAYOUT + aWndPreview ( LAYOUT_THIS_WINDOW(this), CUI_RES_PLAIN( WND_NUMBER_PREVIEW ) ), +#else + aWndPreview ( this, CUI_RES_PLAIN( WND_NUMBER_PREVIEW ) ), +#endif + aFlOptions ( this, CUI_RES( FL_OPTIONS ) ), aFtDecimals ( this, CUI_RES( FT_DECIMALS ) ), aEdDecimals ( this, CUI_RES( ED_DECIMALS ) ), + aBtnNegRed ( this, CUI_RES( BTN_NEGRED ) ), aFtLeadZeroes ( this, CUI_RES( FT_LEADZEROES ) ), aEdLeadZeroes ( this, CUI_RES( ED_LEADZEROES ) ), - aBtnNegRed ( this, CUI_RES( BTN_NEGRED ) ), aBtnThousand ( this, CUI_RES( BTN_THOUSAND ) ), - aFlOptions ( this, CUI_RES( FL_OPTIONS ) ), aFtEdFormat ( this, CUI_RES( FT_EDFORMAT ) ), aEdFormat ( this, CUI_RES( ED_FORMAT ) ), @@ -258,11 +263,6 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window* pParent, aFtComment ( this, CUI_RES( FT_COMMENT ) ), aEdComment ( this, CUI_RES( ED_COMMENT ) ), -#if ENABLE_LAYOUT - aWndPreview ( LAYOUT_THIS_WINDOW(this), CUI_RES_PLAIN( WND_NUMBER_PREVIEW ) ), -#else - aWndPreview ( this, CUI_RES_PLAIN( WND_NUMBER_PREVIEW ) ), -#endif pNumItem ( NULL ), pNumFmtShell ( NULL ), nInitFormat ( ULONG_MAX ), @@ -290,8 +290,8 @@ void SvxNumberFormatTabPage::Init_Impl() { ImageList aIconList( CUI_RES_PLAIN ( IL_ICON ) ); - bNumItemFlag=TRUE; - bOneAreaFlag=FALSE; + bNumItemFlag=sal_True; + bOneAreaFlag=sal_False; nCatHeight=aLbCategory.GetSizePixel().Height(); @@ -304,15 +304,15 @@ void SvxNumberFormatTabPage::Init_Impl() aIbRemove. SetModeImage( aIconList.GetImage( IID_REMOVE ) ); aIbInfo. SetModeImage( aIconList.GetImage( IID_INFO ) ); - aIbAdd.Enable(FALSE ); - aIbRemove.Enable(FALSE ); - aIbInfo.Enable(FALSE ); + aIbAdd.Enable(sal_False ); + aIbRemove.Enable(sal_False ); + aIbInfo.Enable(sal_False ); aEdComment.SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert //holen aEdComment.Hide(); - aCbSourceFormat.Check( FALSE ); + aCbSourceFormat.Check( sal_False ); aCbSourceFormat.Disable(); aCbSourceFormat.Hide(); @@ -356,6 +356,13 @@ void SvxNumberFormatTabPage::Init_Impl() { aLbLanguage.InsertLanguage( xLang[i] ); } + + aIbAdd.SetAccessibleRelationLabeledBy( &aFtEdFormat ); + aIbInfo.SetAccessibleRelationLabeledBy( &aFtEdFormat ); + aIbRemove.SetAccessibleRelationLabeledBy( &aFtEdFormat ); + aIbAdd.SetAccessibleRelationMemberOf( &aIbAdd ); + aIbInfo.SetAccessibleRelationMemberOf( &aIbInfo ); + aIbRemove.SetAccessibleRelationMemberOf( &aIbRemove ); } /************************************************************************* @@ -369,7 +376,7 @@ void SvxNumberFormatTabPage::Init_Impl() #* #************************************************************************/ -USHORT* SvxNumberFormatTabPage::GetRanges() +sal_uInt16* SvxNumberFormatTabPage::GetRanges() { return pRanges; } @@ -411,8 +418,8 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) const SfxPoolItem* pItem = NULL; const SfxBoolItem* pAutoEntryAttr = NULL; - USHORT nCatLbSelPos = 0; - USHORT nFmtLbSelPos = 0; + sal_uInt16 nCatLbSelPos = 0; + sal_uInt16 nFmtLbSelPos = 0; LanguageType eLangType = LANGUAGE_DONTKNOW; SvxDelStrgs aFmtEntryList; SvxNumberValueType eValType = SVX_VALUE_TYPE_UNDEFINED; @@ -421,7 +428,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) SfxItemState eState = SFX_ITEM_DONTCARE; - eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_NOLANGUAGE ),TRUE,&pItem); + eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_NOLANGUAGE ),sal_True,&pItem); if(eState==SFX_ITEM_SET) { @@ -434,28 +441,28 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) } else { - HideLanguage(FALSE); + HideLanguage(sal_False); } } - eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_INFO ),TRUE,&pItem); + eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_INFO ),sal_True,&pItem); if(eState==SFX_ITEM_SET) { if(pNumItem==NULL) { - bNumItemFlag=TRUE; + bNumItemFlag=sal_True; pNumItem= (SvxNumberInfoItem *) pItem->Clone(); } else { - bNumItemFlag=FALSE; + bNumItemFlag=sal_False; } } else { - bNumItemFlag=FALSE; + bNumItemFlag=sal_False; } @@ -481,13 +488,13 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) if ( pBoolItem ) aCbSourceFormat.Check( pBoolItem->GetValue() ); else - aCbSourceFormat.Check( FALSE ); + aCbSourceFormat.Check( sal_False ); aCbSourceFormat.Enable(); aCbSourceFormat.Show(); } else { - BOOL bInit = FALSE; // set to TRUE for debug test + sal_Bool bInit = sal_False; // set to sal_True for debug test aCbSourceFormat.Check( bInit ); aCbSourceFormat.Enable( bInit ); aCbSourceFormat.Show( bInit ); @@ -551,7 +558,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) pNumFmtShell->GetInitSettings( nCatLbSelPos, eLangType, nFmtLbSelPos, aFmtEntryList, aPrevString, pDummy ); - aLbCurrency.SelectEntryPos((USHORT)pNumFmtShell->GetCurrencySymbol()); + aLbCurrency.SelectEntryPos((sal_uInt16)pNumFmtShell->GetCurrencySymbol()); nFixedCategory=nCatLbSelPos; if(bOneAreaFlag) @@ -580,7 +587,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) aLbLanguage.SelectLanguage( eLangType ); if(pAutoEntryAttr) AddAutomaticLanguage_Impl(eLangType, pAutoEntryAttr->GetValue()); - UpdateFormatListBox_Impl(FALSE,TRUE); + UpdateFormatListBox_Impl(sal_False,sal_True); //! This spoils everything because it rematches currency formats based on //! the selected aLbCurrency entry instead of the current format. @@ -624,9 +631,9 @@ void SvxNumberFormatTabPage::Obstructing() aFtLanguage .Disable(); aLbLanguage .Disable(); - aIbAdd.Enable(FALSE ); - aIbRemove.Enable(FALSE ); - aIbInfo.Enable(FALSE ); + aIbAdd.Enable(sal_False ); + aIbRemove.Enable(sal_False ); + aIbInfo.Enable(sal_False ); aBtnNegRed .Disable(); aBtnThousand .Disable(); @@ -637,8 +644,8 @@ void SvxNumberFormatTabPage::Obstructing() aFlOptions .Disable(); aEdDecimals .SetText( String() ); aEdLeadZeroes .SetText( String() ); - aBtnNegRed .Check( FALSE ); - aBtnThousand .Check( FALSE ); + aBtnNegRed .Check( sal_False ); + aBtnThousand .Check( sal_False ); aWndPreview .NotifyChange( String() ); aLbCategory .SelectEntryPos( 0 ); @@ -657,7 +664,7 @@ void SvxNumberFormatTabPage::Obstructing() #************************************************************************/ void SvxNumberFormatTabPage::EnableBySourceFormat_Impl() { - BOOL bEnable = !aCbSourceFormat.IsChecked(); + sal_Bool bEnable = !aCbSourceFormat.IsChecked(); if ( !bEnable ) aCbSourceFormat.GrabFocus(); aFtCategory .Enable( bEnable ); @@ -691,12 +698,12 @@ void SvxNumberFormatTabPage::EnableBySourceFormat_Impl() #* #* Klasse: SvxNumberFormatTabPage #* Funktion: Versteckt die Spracheinstellung: -#* Input: BOOL nFlag +#* Input: sal_Bool nFlag #* Output: --- #* #************************************************************************/ -void SvxNumberFormatTabPage::HideLanguage(BOOL nFlag) +void SvxNumberFormatTabPage::HideLanguage(sal_Bool nFlag) { Size aSize=aLbCategory.GetSizePixel(); @@ -728,14 +735,14 @@ void SvxNumberFormatTabPage::HideLanguage(BOOL nFlag) #* #************************************************************************/ -BOOL SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) +sal_Bool SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) { - BOOL bDataChanged = aFtLanguage.IsEnabled() || aCbSourceFormat.IsEnabled(); + sal_Bool bDataChanged = aFtLanguage.IsEnabled() || aCbSourceFormat.IsEnabled(); if ( bDataChanged ) { const SfxItemSet& rMyItemSet = GetItemSet(); - USHORT nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ); - SfxItemState eItemState = rMyItemSet.GetItemState( nWhich, FALSE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ); + SfxItemState eItemState = rMyItemSet.GetItemState( nWhich, sal_False ); // OK chosen - Is format code input entered already taken over? // If not, simulate Add. Upon syntax error ignore input and prevent Put. @@ -784,7 +791,7 @@ BOOL SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) pNumFmtShell->GetUpdateData( pDelArr, nDelCount ); pNumItem->SetDelFormatArray( pDelArr, nDelCount ); - if(bNumItemFlag==TRUE) + if(bNumItemFlag==sal_True) { rCoreAttrs.Put( *pNumItem ); } @@ -806,14 +813,14 @@ BOOL SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs ) // -------------------------------------------- if ( aCbSourceFormat.IsEnabled() ) { - USHORT _nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_SOURCE ); - SfxItemState _eItemState = rMyItemSet.GetItemState( _nWhich, FALSE ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_SOURCE ); + SfxItemState _eItemState = rMyItemSet.GetItemState( _nWhich, sal_False ); const SfxBoolItem* pBoolItem = (const SfxBoolItem*) GetItem( rMyItemSet, SID_ATTR_NUMBERFORMAT_SOURCE ); - BOOL bOld = (pBoolItem ? pBoolItem->GetValue() : FALSE); + sal_Bool bOld = (pBoolItem ? pBoolItem->GetValue() : sal_False); rCoreAttrs.Put( SfxBoolItem( _nWhich, aCbSourceFormat.IsChecked() ) ); if ( !bDataChanged ) - bDataChanged = (bOld != (BOOL) aCbSourceFormat.IsChecked() || + bDataChanged = (bOld != (sal_Bool) aCbSourceFormat.IsChecked() || _eItemState != SFX_ITEM_SET); } @@ -851,14 +858,14 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( SvxDelStrgs& rEntries ) String aTmpString; String aTmpCatString; Font aFont=aLbCategory.GetFont(); - USHORT i = 0; + sal_uInt16 i = 0; short nTmpCatPos; short aPrivCat; aLbFormat.Clear(); - aLbFormat.SetUpdateMode( FALSE ); + aLbFormat.SetUpdateMode( sal_False ); - USHORT nCount = rEntries.Count(); + sal_uInt16 nCount = rEntries.Count(); if(nCount<1) return; @@ -910,7 +917,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( SvxDelStrgs& rEntries ) } } } - aLbFormat.SetUpdateMode( TRUE ); + aLbFormat.SetUpdateMode( sal_True ); DeleteEntryList_Impl(rEntries); } @@ -928,7 +935,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( SvxDelStrgs& rEntries ) void SvxNumberFormatTabPage::DeleteEntryList_Impl( SvxDelStrgs& rEntries ) { - USHORT nCount = rEntries.Count(); + sal_uInt16 nCount = rEntries.Count(); rEntries.DeleteAndDestroy(0,nCount); } @@ -945,17 +952,17 @@ void SvxNumberFormatTabPage::DeleteEntryList_Impl( SvxDelStrgs& rEntries ) #* #************************************************************************/ -void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE*/ ) +void SvxNumberFormatTabPage::UpdateOptions_Impl( sal_Bool bCheckCatChange /*= sal_False*/ ) { SvxDelStrgs aEntryList; String theFormat = aEdFormat.GetText(); - USHORT nCurCategory = aLbCategory.GetSelectEntryPos(); - USHORT nCategory = nCurCategory; - USHORT nDecimals = 0; - USHORT nZeroes = 0; - BOOL bNegRed = FALSE; - BOOL bThousand = FALSE; - USHORT nCurrencyPos =aLbCurrency.GetSelectEntryPos(); + sal_uInt16 nCurCategory = aLbCategory.GetSelectEntryPos(); + sal_uInt16 nCategory = nCurCategory; + sal_uInt16 nDecimals = 0; + sal_uInt16 nZeroes = 0; + sal_Bool bNegRed = sal_False; + sal_Bool bThousand = sal_False; + sal_uInt16 nCurrencyPos =aLbCurrency.GetSelectEntryPos(); if(bOneAreaFlag) nCurCategory=nFixedCategory; @@ -965,15 +972,15 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE* bThousand, bNegRed, nDecimals, nZeroes, nCategory ); - BOOL bDoIt=FALSE; + sal_Bool bDoIt=sal_False; if(nCategory==CAT_CURRENCY) { - USHORT nTstPos=pNumFmtShell->FindCurrencyFormat(theFormat); - if(nCurrencyPos!=nTstPos && nTstPos!=(USHORT)-1) + sal_uInt16 nTstPos=pNumFmtShell->FindCurrencyFormat(theFormat); + if(nCurrencyPos!=nTstPos && nTstPos!=(sal_uInt16)-1) { aLbCurrency.SelectEntryPos(nTstPos); pNumFmtShell->SetCurrencySymbol(nTstPos); - bDoIt=TRUE; + bDoIt=sal_True; } } @@ -988,7 +995,7 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE* else SetCategory(nCategory ); - UpdateFormatListBox_Impl( TRUE, FALSE ); + UpdateFormatListBox_Impl( sal_True, sal_False ); } } else if ( aLbFormat.GetEntryCount() > 0 ) @@ -1040,8 +1047,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE* aBtnThousand .Disable(); aEdDecimals .SetText( UniString::CreateFromInt32( 0 ) ); aEdLeadZeroes .SetText( UniString::CreateFromInt32( 0 ) ); - aBtnNegRed .Check( FALSE ); - aBtnThousand .Check( FALSE ); + aBtnNegRed .Check( sal_False ); + aBtnThousand .Check( sal_False ); } } @@ -1061,8 +1068,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE* void SvxNumberFormatTabPage::UpdateFormatListBox_Impl ( - USHORT bCat, // Category oder Land/Sprache ListBox? - BOOL bUpdateEdit // Format-Edit aktualisieren? + sal_uInt16 bCat, // Category oder Land/Sprache ListBox? + sal_Bool bUpdateEdit // Format-Edit aktualisieren? ) { SvxDelStrgs aEntryList; @@ -1138,7 +1145,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl aFtComment.SetText(aLbCategory.GetEntry(1)); } } - ChangePreviewText( (USHORT)nFmtLbSelPos ); + ChangePreviewText( (sal_uInt16)nFmtLbSelPos ); } } @@ -1147,7 +1154,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl FillFormatListBox_Impl( aEntryList ); if(nFmtLbSelPos != SELPOS_NONE) { - aLbFormat.SelectEntryPos( (USHORT)nFmtLbSelPos ); + aLbFormat.SelectEntryPos( (sal_uInt16)nFmtLbSelPos ); aFtComment.SetText(pNumFmtShell->GetComment4Entry(nFmtLbSelPos)); if(pNumFmtShell->GetUserDefined4Entry(nFmtLbSelPos)) @@ -1234,9 +1241,9 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) if (aLbFormat.GetSelectEntryPos () == LISTBOX_ENTRY_NOTFOUND) #else /* !ENABLE_LAYOUT */ // Current category may be UserDefined with no format entries defined. - // And yes, aLbFormat is a SvxFontListBox with ULONG list positions, + // And yes, aLbFormat is a SvxFontListBox with sal_uLong list positions, // implementation returns a LIST_APPEND if empty, comparison with - // USHORT LISTBOX_ENTRY_NOTFOUND wouldn't match. + // sal_uInt16 LISTBOX_ENTRY_NOTFOUND wouldn't match. if ( aLbFormat.GetSelectEntryPos() == LIST_APPEND ) #endif /* !ENABLE_LAYOUT */ pLb = &aLbCategory; // continue with the current category selected @@ -1255,7 +1262,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) nTmpCatPos=aLbCategory.GetSelectEntryPos(); } - USHORT nCurrencyPos=LISTBOX_ENTRY_NOTFOUND ; + sal_uInt16 nCurrencyPos=LISTBOX_ENTRY_NOTFOUND ; if(nTmpCatPos==CAT_CURRENCY && (ListBox *)pLb == &aLbCurrency ) { @@ -1267,7 +1274,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) // Format-ListBox ---------------------------------------------------- if ( (SvxFontListBox *)pLb == &aLbFormat ) { - USHORT nSelPos = (USHORT) aLbFormat.GetSelectEntryPos(); + sal_uInt16 nSelPos = (sal_uInt16) aLbFormat.GetSelectEntryPos(); String aFormat = aLbFormat.GetSelectEntry(); String aComment; SvxDelStrgs aEntryList; @@ -1295,21 +1302,21 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) if ( pNumFmtShell->FindEntry( aFormat) ) { - aIbAdd.Enable(FALSE ); - BOOL bIsUserDef=pNumFmtShell->IsUserDefined( aFormat ); + aIbAdd.Enable(sal_False ); + sal_Bool bIsUserDef=pNumFmtShell->IsUserDefined( aFormat ); aIbRemove.Enable(bIsUserDef); aIbInfo.Enable(bIsUserDef); } else { - aIbAdd.Enable(TRUE ); - aIbInfo.Enable(TRUE ); - aIbRemove.Enable(FALSE ); + aIbAdd.Enable(sal_True ); + aIbInfo.Enable(sal_True ); + aIbRemove.Enable(sal_False ); aFtComment.SetText(aEdComment.GetText()); } - UpdateOptions_Impl( FALSE ); + UpdateOptions_Impl( sal_False ); return 0; } @@ -1318,9 +1325,9 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) // Kategorie-ListBox ------------------------------------------------- if ( pLb == &aLbCategory || pLb == &aLbCurrency) { - UpdateFormatListBox_Impl( TRUE, TRUE ); + UpdateFormatListBox_Impl( sal_True, sal_True ); EditHdl_Impl( NULL ); - UpdateOptions_Impl( FALSE ); + UpdateOptions_Impl( sal_False ); return 0; } @@ -1329,7 +1336,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) // Sprache/Land-ListBox ---------------------------------------------- if ( pLb == &aLbLanguage ) { - UpdateFormatListBox_Impl( FALSE, TRUE ); + UpdateFormatListBox_Impl( sal_False, sal_True ); EditHdl_Impl( &aEdFormat ); return 0; @@ -1353,12 +1360,12 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb ) IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) { - BOOL bAdded = FALSE; - BOOL bDeleted = FALSE; - ULONG nReturn = 0; - const ULONG nReturnChanged = 0x1; // THE boolean return value - const ULONG nReturnAdded = 0x2; // temp: format added - const ULONG nReturnOneArea = 0x4; // temp: one area but category changed => ignored + sal_Bool bAdded = sal_False; + sal_Bool bDeleted = sal_False; + sal_uLong nReturn = 0; + const sal_uLong nReturnChanged = 0x1; // THE boolean return value + const sal_uLong nReturnAdded = 0x2; // temp: format added + const sal_uLong nReturnOneArea = 0x4; // temp: one area but category changed => ignored if(pIB==&aIbAdd) { // Also called from FillItemSet() if a temporary currency format has @@ -1366,7 +1373,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) String aFormat = aEdFormat.GetText(); SvxDelStrgs aEntryList; SvxDelStrgs a2EntryList; - USHORT nCatLbSelPos = 0; + sal_uInt16 nCatLbSelPos = 0; short nFmtLbSelPos = SELPOS_NONE; xub_StrLen nErrPos=0; @@ -1389,7 +1396,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) { if(nCatLbSelPos==CAT_CURRENCY) { - aLbCurrency.SelectEntryPos((USHORT)pNumFmtShell->GetCurrencySymbol()); + aLbCurrency.SelectEntryPos((sal_uInt16)pNumFmtShell->GetCurrencySymbol()); } if(bOneAreaFlag && (nFixedCategory!=nCatLbSelPos)) @@ -1425,12 +1432,12 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) pNumFmtShell->SetComment4Entry(nFmtLbSelPos, String()); } - aLbFormat.SelectEntryPos( (USHORT)nFmtLbSelPos ); + aLbFormat.SelectEntryPos( (sal_uInt16)nFmtLbSelPos ); aEdFormat.SetText( aFormat ); aEdComment.SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert //holen - ChangePreviewText( (USHORT)nFmtLbSelPos ); + ChangePreviewText( (sal_uInt16)nFmtLbSelPos ); } } } @@ -1446,7 +1453,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) { String aFormat = aEdFormat.GetText(); SvxDelStrgs aEntryList; - USHORT nCatLbSelPos = 0; + sal_uInt16 nCatLbSelPos = 0; short nFmtLbSelPos = SELPOS_NONE; bDeleted = pNumFmtShell->RemoveFormat( aFormat, @@ -1471,9 +1478,9 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB) else SetCategory(nCatLbSelPos ); - aLbFormat.SelectEntryPos( (USHORT)nFmtLbSelPos ); + aLbFormat.SelectEntryPos( (sal_uInt16)nFmtLbSelPos ); aEdFormat.SetText( aFormat ); - ChangePreviewText( (USHORT)nFmtLbSelPos ); + ChangePreviewText( (sal_uInt16)nFmtLbSelPos ); } else { @@ -1523,9 +1530,9 @@ IMPL_LINK( SvxNumberFormatTabPage, EditHdl_Impl, Edit*, pEdFormat ) if ( aEdFormat.GetText().Len() == 0 ) { - aIbAdd.Enable(FALSE ); - aIbRemove.Enable(FALSE ); - aIbInfo.Enable(FALSE ); + aIbAdd.Enable(sal_False ); + aIbRemove.Enable(sal_False ); + aIbInfo.Enable(sal_False ); aFtComment.SetText(String()); } else @@ -1535,30 +1542,30 @@ IMPL_LINK( SvxNumberFormatTabPage, EditHdl_Impl, Edit*, pEdFormat ) if ( pNumFmtShell->FindEntry( aFormat, &nCurKey ) ) { - aIbAdd.Enable(FALSE ); - BOOL bUserDef=pNumFmtShell->IsUserDefined( aFormat ); + aIbAdd.Enable(sal_False ); + sal_Bool bUserDef=pNumFmtShell->IsUserDefined( aFormat ); aIbRemove.Enable(bUserDef); aIbInfo.Enable(bUserDef); if(bUserDef) { - USHORT nTmpCurPos=pNumFmtShell->FindCurrencyFormat(aFormat ); + sal_uInt16 nTmpCurPos=pNumFmtShell->FindCurrencyFormat(aFormat ); - if(nTmpCurPos!=(USHORT)-1) + if(nTmpCurPos!=(sal_uInt16)-1) aLbCurrency.SelectEntryPos(nTmpCurPos); } short nPosi=pNumFmtShell->GetListPos4Entry(aFormat); if(nPosi>=0) - aLbFormat.SelectEntryPos( (USHORT)nPosi); + aLbFormat.SelectEntryPos( (sal_uInt16)nPosi); } else { - aIbAdd.Enable(TRUE ); - aIbInfo.Enable(TRUE); - aIbRemove.Enable(FALSE ); + aIbAdd.Enable(sal_True ); + aIbInfo.Enable(sal_True); + aIbRemove.Enable(sal_False ); aFtComment.SetText(aEdComment.GetText()); @@ -1568,7 +1575,7 @@ IMPL_LINK( SvxNumberFormatTabPage, EditHdl_Impl, Edit*, pEdFormat ) if ( pEdFormat ) { pNumFmtShell->SetCurNumFmtKey( nCurKey ); - UpdateOptions_Impl( TRUE ); + UpdateOptions_Impl( sal_True ); } return 0; @@ -1594,29 +1601,29 @@ IMPL_LINK( SvxNumberFormatTabPage, OptHdl_Impl, void *, pOptCtrl ) || ((CheckBox*) pOptCtrl == &aBtnThousand) ) { String aFormat; - BOOL bThousand = aBtnThousand.IsEnabled() + sal_Bool bThousand = aBtnThousand.IsEnabled() && aBtnThousand.IsChecked(); - BOOL bNegRed = aBtnNegRed.IsEnabled() + sal_Bool bNegRed = aBtnNegRed.IsEnabled() && aBtnNegRed.IsChecked(); - USHORT nPrecision = (aEdDecimals.IsEnabled()) - ? (USHORT)aEdDecimals.GetValue() - : (USHORT)0; - USHORT nLeadZeroes = (aEdLeadZeroes.IsEnabled()) - ? (USHORT)aEdLeadZeroes.GetValue() - : (USHORT)0; + sal_uInt16 nPrecision = (aEdDecimals.IsEnabled()) + ? (sal_uInt16)aEdDecimals.GetValue() + : (sal_uInt16)0; + sal_uInt16 nLeadZeroes = (aEdLeadZeroes.IsEnabled()) + ? (sal_uInt16)aEdLeadZeroes.GetValue() + : (sal_uInt16)0; pNumFmtShell->MakeFormat( aFormat, bThousand, bNegRed, nPrecision, nLeadZeroes, - (USHORT)aLbFormat.GetSelectEntryPos() ); + (sal_uInt16)aLbFormat.GetSelectEntryPos() ); aEdFormat.SetText( aFormat ); MakePreviewText( aFormat ); if ( pNumFmtShell->FindEntry( aFormat ) ) { - aIbAdd.Enable(FALSE ); - BOOL bUserDef=pNumFmtShell->IsUserDefined( aFormat ); + aIbAdd.Enable(sal_False ); + sal_Bool bUserDef=pNumFmtShell->IsUserDefined( aFormat ); aIbRemove.Enable(bUserDef); aIbInfo.Enable(bUserDef); EditHdl_Impl( &aEdFormat); @@ -1659,7 +1666,7 @@ IMPL_LINK( SvxNumberFormatTabPage, LostFocusHdl_Impl, Edit *, pEd) aFtComment.Show(); if(!aIbAdd.IsEnabled()) { - USHORT nSelPos = (USHORT) aLbFormat.GetSelectEntryPos(); + sal_uInt16 nSelPos = (sal_uInt16) aLbFormat.GetSelectEntryPos(); pNumFmtShell->SetComment4Entry(nSelPos, aEdComment.GetText()); aEdComment.SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert @@ -1719,7 +1726,7 @@ void SvxNumberFormatTabPage::MakePreviewText( const String& rFormat ) aWndPreview.NotifyChange( aPreviewString, pPreviewColor ); } -void SvxNumberFormatTabPage::ChangePreviewText( USHORT nPos ) +void SvxNumberFormatTabPage::ChangePreviewText( sal_uInt16 nPos ) { String aPreviewString; Color* pPreviewColor = NULL; @@ -1764,11 +1771,11 @@ void SvxNumberFormatTabPage::FillCurrencyBox() SvStringsDtor aList; NfShCurrencyEntries rEntries; XubString* pEntry = NULL; - USHORT nSelPos=0; + sal_uInt16 nSelPos=0; pNumFmtShell->GetCurrencySymbols( aList, &nSelPos); - for(USHORT i=1;i<aList.Count();i++) + for(sal_uInt16 i=1;i<aList.Count();i++) { pEntry=aList[i]; aLbCurrency.InsertEntry( *pEntry); @@ -1776,12 +1783,12 @@ void SvxNumberFormatTabPage::FillCurrencyBox() aLbCurrency.SelectEntryPos(nSelPos); } -void SvxNumberFormatTabPage::SetCategory(USHORT nPos) +void SvxNumberFormatTabPage::SetCategory(sal_uInt16 nPos) { - USHORT nCurCategory = aLbCategory.GetSelectEntryPos(); + sal_uInt16 nCurCategory = aLbCategory.GetSelectEntryPos(); Point aPos=aLbFormat.GetPosPixel(); Size aSize=aLbFormat.GetSizePixel(); - USHORT nTmpCatPos; + sal_uInt16 nTmpCatPos; if(bOneAreaFlag) { @@ -1816,11 +1823,11 @@ void SvxNumberFormatTabPage::SetCategory(USHORT nPos) which marks a certain language as automatically detected Additionally the "Default" language is removed */ -void SvxNumberFormatTabPage::AddAutomaticLanguage_Impl(LanguageType eAutoLang, BOOL bSelect) +void SvxNumberFormatTabPage::AddAutomaticLanguage_Impl(LanguageType eAutoLang, sal_Bool bSelect) { aLbLanguage.RemoveLanguage(LANGUAGE_SYSTEM); - USHORT nPos = aLbLanguage.InsertEntry(sAutomaticEntry); - aLbLanguage.SetEntryData(nPos, (void*)(ULONG)eAutoLang); + sal_uInt16 nPos = aLbLanguage.InsertEntry(sAutomaticEntry); + aLbLanguage.SetEntryData(nPos, (void*)(sal_uLong)eAutoLang); if(bSelect) aLbLanguage.SelectEntryPos(nPos); } diff --git a/cui/source/tabpages/numfmt.src b/cui/source/tabpages/numfmt.src index 7eea452f8..867f93c7e 100644 --- a/cui/source/tabpages/numfmt.src +++ b/cui/source/tabpages/numfmt.src @@ -45,6 +45,7 @@ TabPage RID_SVXPAGE_NUMBERFORMAT }; ListBox LB_CATEGORY { + HelpID = "cui:ListBox:RID_SVXPAGE_NUMBERFORMAT:LB_CATEGORY"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 14 ) ; Size = MAP_APPFONT ( 70 , 71 ) ; @@ -72,6 +73,7 @@ TabPage RID_SVXPAGE_NUMBERFORMAT }; Edit ED_FORMAT { + HelpID = "cui:Edit:RID_SVXPAGE_NUMBERFORMAT:ED_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 147 ) ; Size = MAP_APPFONT ( 200 , 12 ) ; @@ -85,6 +87,7 @@ TabPage RID_SVXPAGE_NUMBERFORMAT }; Edit ED_COMMENT { + HelpID = "cui:Edit:RID_SVXPAGE_NUMBERFORMAT:ED_COMMENT"; Hide = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 163 ) ; @@ -99,6 +102,7 @@ TabPage RID_SVXPAGE_NUMBERFORMAT ListBox LB_CURRENCY { + HelpID = "cui:ListBox:RID_SVXPAGE_NUMBERFORMAT:LB_CURRENCY"; Border = TRUE ; Pos = MAP_APPFONT ( 82 , 14 ) ; Size = MAP_APPFONT ( 90 , 71 ) ; @@ -127,6 +131,7 @@ TabPage RID_SVXPAGE_NUMBERFORMAT }; NumericField ED_DECIMALS { + HelpID = "cui:NumericField:RID_SVXPAGE_NUMBERFORMAT:ED_DECIMALS"; Border = TRUE ; Pos = MAP_APPFONT ( 84 , 102 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -146,6 +151,7 @@ TabPage RID_SVXPAGE_NUMBERFORMAT }; NumericField ED_LEADZEROES { + HelpID = "cui:NumericField:RID_SVXPAGE_NUMBERFORMAT:ED_LEADZEROES"; Border = TRUE ; Pos = MAP_APPFONT ( 84 , 118 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -159,12 +165,14 @@ TabPage RID_SVXPAGE_NUMBERFORMAT }; CheckBox BTN_NEGRED { + HelpID = "cui:CheckBox:RID_SVXPAGE_NUMBERFORMAT:BTN_NEGRED"; Pos = MAP_APPFONT ( 133 , 104 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Negative numbers red" ; }; CheckBox BTN_THOUSAND { + HelpID = "cui:CheckBox:RID_SVXPAGE_NUMBERFORMAT:BTN_THOUSAND"; Pos = MAP_APPFONT ( 133 , 120 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "~Thousands separator" ; @@ -183,6 +191,7 @@ TabPage RID_SVXPAGE_NUMBERFORMAT }; ListBox LB_LANGUAGE { + HelpID = "cui:ListBox:RID_SVXPAGE_NUMBERFORMAT:LB_LANGUAGE"; Border = TRUE ; Sort = TRUE ; Pos = MAP_APPFONT ( 178 , 14 ) ; @@ -191,6 +200,7 @@ TabPage RID_SVXPAGE_NUMBERFORMAT }; CheckBox CB_SOURCEFORMAT { + HelpID = "cui:CheckBox:RID_SVXPAGE_NUMBERFORMAT:CB_SOURCEFORMAT"; Pos = MAP_APPFONT ( 178 , 42 ) ; Size = MAP_APPFONT ( 76 , 10 ) ; Text [ en-US ] = "So~urce format" ; diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 062a86031..7c09db041 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -103,7 +103,7 @@ SV_IMPL_PTRARR(SvxNumSettingsArr_Impl,SvxNumSettings_ImplPtr); #define MAX_BMP_WIDTH 16 #define MAX_BMP_HEIGHT 16 -static BOOL bLastRelative = FALSE; +static sal_Bool bLastRelative = sal_False; static const sal_Char cNumberingType[] = "NumberingType"; static const sal_Char cValue[] = "Value"; static const sal_Char cParentNumbering[] = "ParentNumbering"; @@ -169,11 +169,11 @@ static sal_Char const aNumChar[] = }; // Ist eins der maskierten Formate gesetzt? -BOOL lcl_IsNumFmtSet(SvxNumRule* pNum, USHORT nLevelMask) +sal_Bool lcl_IsNumFmtSet(SvxNumRule* pNum, sal_uInt16 nLevelMask) { - BOOL bRet = FALSE; - USHORT nMask = 1; - for( USHORT i = 0; i < SVX_MAX_NUM && !bRet; i++ ) + sal_Bool bRet = sal_False; + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < SVX_MAX_NUM && !bRet; i++ ) { if(nLevelMask & nMask) bRet |= 0 != pNum->Get( i ); @@ -184,7 +184,7 @@ BOOL lcl_IsNumFmtSet(SvxNumRule* pNum, USHORT nLevelMask) Font& lcl_GetDefaultBulletFont() { - static BOOL bInit = 0; + static sal_Bool bInit = 0; static Font aDefBulletFont( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "StarSymbol" ) ), String(), Size( 0, 14 ) ); @@ -194,8 +194,8 @@ Font& lcl_GetDefaultBulletFont() aDefBulletFont.SetFamily( FAMILY_DONTKNOW ); aDefBulletFont.SetPitch( PITCH_DONTKNOW ); aDefBulletFont.SetWeight( WEIGHT_DONTKNOW ); - aDefBulletFont.SetTransparent( TRUE ); - bInit = TRUE; + aDefBulletFont.SetTransparent( sal_True ); + bInit = sal_True; } return aDefBulletFont; } @@ -215,8 +215,8 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent, pActNum(0), pSaveNum(0), nActNumLvl( USHRT_MAX ), - bModified(FALSE), - bPreset(FALSE), + bModified(sal_False), + bPreset(sal_False), nNumItemId(SID_ATTR_NUMBERING_RULE) { FreeResource(); @@ -268,7 +268,7 @@ SfxTabPage* SvxSingleNumPickTabPage::Create( Window* pParent, return new SvxSingleNumPickTabPage(pParent, rAttrSet); } -BOOL SvxSingleNumPickTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxSingleNumPickTabPage::FillItemSet( SfxItemSet& rSet ) { if( (bPreset || bModified) && pSaveNum) { @@ -283,17 +283,17 @@ BOOL SvxSingleNumPickTabPage::FillItemSet( SfxItemSet& rSet ) void SvxSingleNumPickTabPage::ActivatePage(const SfxItemSet& rSet) { const SfxPoolItem* pItem; - bPreset = FALSE; - BOOL bIsPreset = FALSE; + bPreset = sal_False; + sal_Bool bIsPreset = sal_False; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem)) bIsPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem)) nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -308,18 +308,18 @@ void SvxSingleNumPickTabPage::ActivatePage(const SfxItemSet& rSet) { pExamplesVS->SelectItem(1); NumSelectHdl_Impl(pExamplesVS); - bPreset = TRUE; + bPreset = sal_True; } bPreset |= bIsPreset; - bModified = FALSE; + bModified = sal_False; } int SvxSingleNumPickTabPage::DeactivatePage(SfxItemSet *_pSet) { if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } void SvxSingleNumPickTabPage::Reset( const SfxItemSet& rSet ) @@ -327,15 +327,15 @@ void SvxSingleNumPickTabPage::Reset( const SfxItemSet& rSet ) const SfxPoolItem* pItem; //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); + SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem); if(eState != SFX_ITEM_SET) { nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); + eState = rSet.GetItemState(nNumItemId, sal_False, &pItem); if( eState != SFX_ITEM_SET ) { - pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) ); eState = SFX_ITEM_SET; } } @@ -353,9 +353,9 @@ IMPL_LINK(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) { if(pActNum) { - bPreset = FALSE; - bModified = TRUE; - USHORT nIdx = pExamplesVS->GetSelectItemId() - 1; + bPreset = sal_False; + bModified = sal_True; + sal_uInt16 nIdx = pExamplesVS->GetSelectItemId() - 1; DBG_ASSERT(aNumSettingsArr.Count() > nIdx, "wrong index"); if(aNumSettingsArr.Count() <= nIdx) return 0; @@ -364,8 +364,8 @@ IMPL_LINK(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) const sal_Unicode cLocalPrefix = _pSet->sPrefix.getLength() ? _pSet->sPrefix.getStr()[0] : 0; const sal_Unicode cLocalSuffix = _pSet->sSuffix.getLength() ? _pSet->sSuffix.getStr()[0] : 0; - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -408,8 +408,8 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(Window* pParent, pActNum(0), pSaveNum(0), nActNumLvl( USHRT_MAX ), - bModified(FALSE), - bPreset(FALSE), + bModified(sal_False), + bPreset(sal_False), nNumItemId(SID_ATTR_NUMBERING_RULE) { FreeResource(); @@ -433,7 +433,7 @@ SfxTabPage* SvxBulletPickTabPage::Create( Window* pParent, return new SvxBulletPickTabPage(pParent, rAttrSet); } -BOOL SvxBulletPickTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxBulletPickTabPage::FillItemSet( SfxItemSet& rSet ) { if( (bPreset || bModified) && pActNum) { @@ -447,17 +447,17 @@ BOOL SvxBulletPickTabPage::FillItemSet( SfxItemSet& rSet ) void SvxBulletPickTabPage::ActivatePage(const SfxItemSet& rSet) { const SfxPoolItem* pItem; - bPreset = FALSE; - BOOL bIsPreset = FALSE; + bPreset = sal_False; + sal_Bool bIsPreset = sal_False; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem)) bIsPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem)) nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -472,32 +472,32 @@ void SvxBulletPickTabPage::ActivatePage(const SfxItemSet& rSet) { pExamplesVS->SelectItem(1); NumSelectHdl_Impl(pExamplesVS); - bPreset = TRUE; + bPreset = sal_True; } bPreset |= bIsPreset; - bModified = FALSE; + bModified = sal_False; } int SvxBulletPickTabPage::DeactivatePage(SfxItemSet *_pSet) { if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } void SvxBulletPickTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); + SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem); if(eState != SFX_ITEM_SET) { nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); + eState = rSet.GetItemState(nNumItemId, sal_False, &pItem); if( eState != SFX_ITEM_SET ) { - pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) ); eState = SFX_ITEM_SET; } @@ -516,13 +516,13 @@ IMPL_LINK(SvxBulletPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) { if(pActNum) { - bPreset = FALSE; - bModified = TRUE; + bPreset = sal_False; + bModified = sal_True; sal_Unicode cChar = aBulletTypes[pExamplesVS->GetSelectItemId() - 1]; Font& rActBulletFont = lcl_GetDefaultBulletFont(); - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -573,8 +573,8 @@ SvxNumPickTabPage::SvxNumPickTabPage(Window* pParent, pSaveNum(0), nActNumLvl( USHRT_MAX ), nNumItemId(SID_ATTR_NUMBERING_RULE), - bModified(FALSE), - bPreset(FALSE) + bModified(sal_False), + bPreset(sal_False) { FreeResource(); @@ -633,7 +633,7 @@ SfxTabPage* SvxNumPickTabPage::Create( Window* pParent, return new SvxNumPickTabPage(pParent, rAttrSet); } -BOOL SvxNumPickTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxNumPickTabPage::FillItemSet( SfxItemSet& rSet ) { if( (bPreset || bModified) && pActNum) { @@ -647,17 +647,17 @@ BOOL SvxNumPickTabPage::FillItemSet( SfxItemSet& rSet ) void SvxNumPickTabPage::ActivatePage(const SfxItemSet& rSet) { const SfxPoolItem* pItem; - bPreset = FALSE; - BOOL bIsPreset = FALSE; + bPreset = sal_False; + sal_Bool bIsPreset = sal_False; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem)) bIsPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem)) nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -672,32 +672,32 @@ void SvxNumPickTabPage::ActivatePage(const SfxItemSet& rSet) { pExamplesVS->SelectItem(1); NumSelectHdl_Impl(pExamplesVS); - bPreset = TRUE; + bPreset = sal_True; } bPreset |= bIsPreset; - bModified = FALSE; + bModified = sal_False; } int SvxNumPickTabPage::DeactivatePage(SfxItemSet *_pSet) { if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } void SvxNumPickTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); + SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem); if(eState != SFX_ITEM_SET) { nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); + eState = rSet.GetItemState(nNumItemId, sal_False, &pItem); if( eState != SFX_ITEM_SET ) { - pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) ); eState = SFX_ITEM_SET; } @@ -718,8 +718,8 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) { if(pActNum) { - bPreset = FALSE; - bModified = TRUE; + bPreset = sal_False; + bModified = sal_True; const FontList* pList = 0; @@ -727,7 +727,7 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) Font& rActBulletFont = lcl_GetDefaultBulletFont(); SvxNumSettings_ImplPtr pLevelSettings = 0; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(rItemArr.Count() > i) pLevelSettings = rItemArr[i]; @@ -735,7 +735,7 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) break; SvxNumberFormat aFmt(pActNum->GetLevel(i)); aFmt.SetNumberingType( pLevelSettings->nNumberType ); - USHORT nUpperLevelOrChar = (USHORT)pLevelSettings->nParentNumbering; + sal_uInt16 nUpperLevelOrChar = (sal_uInt16)pLevelSettings->nParentNumbering; if(aFmt.GetNumberingType() == SVX_NUM_CHAR_SPECIAL) { if( pLevelSettings->sBulletFont.getLength() && @@ -767,7 +767,7 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) aCreateFont.SetFamily( FAMILY_DONTKNOW ); aCreateFont.SetPitch( PITCH_DONTKNOW ); aCreateFont.SetWeight( WEIGHT_DONTKNOW ); - aCreateFont.SetTransparent( TRUE ); + aCreateFont.SetTransparent( sal_True ); aFmt.SetBulletFont( &aCreateFont ); } } @@ -783,7 +783,7 @@ IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) } else { - aFmt.SetIncludeUpperLevels(sal::static_int_cast< BYTE >(0 != nUpperLevelOrChar ? pActNum->GetLevelCount() : 0)); + aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? pActNum->GetLevelCount() : 0)); aFmt.SetCharFmtName(sNumCharFmtName); // #62069# // #92724# aFmt.SetBulletRelSize(100); @@ -814,26 +814,6 @@ void SvxNumPickTabPage::PageCreated(SfxAllItemSet aSet) SetCharFmtNames( pNumCharFmt->GetValue(),pBulletCharFmt->GetValue()); } -void lcl_PaintLevel(OutputDevice* pVDev, sal_Int16 nNumberingType, - const OUString& rBulletChar, const OUString& rText, const OUString& rFontName, - Point& rLeft, Font& rRuleFont, const Font& rTextFont) -{ - - if(NumberingType::CHAR_SPECIAL == nNumberingType ) - { - rRuleFont.SetStyleName(rFontName); - pVDev->SetFont(rRuleFont); - pVDev->DrawText(rLeft, rBulletChar); - rLeft.X() += pVDev->GetTextWidth(rBulletChar); - } - else - { - pVDev->SetFont(rTextFont); - pVDev->DrawText(rLeft, rText); - rLeft.X() += pVDev->GetTextWidth(rText); - } -} - SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent, const SfxItemSet& rSet) : @@ -846,8 +826,8 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent, pSaveNum(0), nActNumLvl( USHRT_MAX ), nNumItemId(SID_ATTR_NUMBERING_RULE), - bModified(FALSE), - bPreset(FALSE) + bModified(sal_False), + bPreset(sal_False) { FreeResource(); SetExchangeSupport(); @@ -859,7 +839,7 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent, // Grafiknamen ermitteln GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames); pExamplesVS->SetHelpId(HID_VALUESET_NUMBMP ); - for(USHORT i = 0; i < aGrfNames.Count(); i++) + for(sal_uInt16 i = 0; i < aGrfNames.Count(); i++) { pExamplesVS->InsertItem( i + 1, i); String* pGrfNm = (String*) aGrfNames.GetObject(i); @@ -878,6 +858,7 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent, pExamplesVS->Format(); } + pExamplesVS->SetAccessibleRelationMemberOf( &aValuesFL ); } SvxBitmapPickTabPage::~SvxBitmapPickTabPage() @@ -902,17 +883,17 @@ SfxTabPage* SvxBitmapPickTabPage::Create( Window* pParent, void SvxBitmapPickTabPage::ActivatePage(const SfxItemSet& rSet) { const SfxPoolItem* pItem; - bPreset = FALSE; - BOOL bIsPreset = FALSE; + bPreset = sal_False; + sal_Bool bIsPreset = sal_False; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem)) bIsPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem)) nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -928,24 +909,24 @@ void SvxBitmapPickTabPage::ActivatePage(const SfxItemSet& rSet) { pExamplesVS->SelectItem(1); NumSelectHdl_Impl(pExamplesVS); - bPreset = TRUE; + bPreset = sal_True; } bPreset |= bIsPreset; - bModified = FALSE; + bModified = sal_False; } int SvxBitmapPickTabPage::DeactivatePage(SfxItemSet *_pSet) { if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } -BOOL SvxBitmapPickTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxBitmapPickTabPage::FillItemSet( SfxItemSet& rSet ) { if ( !aGrfNames.Count() ) { - return FALSE; + return sal_False; } if( (bPreset || bModified) && pActNum) { @@ -961,15 +942,15 @@ void SvxBitmapPickTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); + SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem); if(eState != SFX_ITEM_SET) { nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); + eState = rSet.GetItemState(nNumItemId, sal_False, &pItem); if( eState != SFX_ITEM_SET ) { - pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) ); eState = SFX_ITEM_SET; } @@ -984,13 +965,13 @@ void SvxBitmapPickTabPage::Reset( const SfxItemSet& rSet ) *pActNum = *pSaveNum; if(!pActNum->IsFeatureSupported(NUM_ENABLE_LINKED_BMP)) { - aLinkedCB.Check(FALSE); - aLinkedCB.Enable(FALSE); + aLinkedCB.Check(sal_False); + aLinkedCB.Enable(sal_False); } else if(!pActNum->IsFeatureSupported(NUM_ENABLE_EMBEDDED_BMP)) { - aLinkedCB.Check(TRUE); - aLinkedCB.Enable(FALSE); + aLinkedCB.Check(sal_True); + aLinkedCB.Enable(sal_False); } } @@ -998,20 +979,20 @@ IMPL_LINK(SvxBitmapPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG) { if(pActNum) { - bPreset = FALSE; - bModified = TRUE; - USHORT nIdx = pExamplesVS->GetSelectItemId() - 1; + bPreset = sal_False; + bModified = sal_True; + sal_uInt16 nIdx = pExamplesVS->GetSelectItemId() - 1; String* pGrfName = 0; if(aGrfNames.Count() > nIdx) pGrfName = (String*)aGrfNames.GetObject(nIdx); - USHORT nMask = 1; + sal_uInt16 nMask = 1; String aEmptyStr; - USHORT nSetNumberingType = SVX_NUM_BITMAP; + sal_uInt16 nSetNumberingType = SVX_NUM_BITMAP; if(aLinkedCB.IsChecked()) nSetNumberingType |= LINK_TOKEN; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -1100,12 +1081,12 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, pPreviewWIN( new SvxNumberingPreview(this, CUI_RES(WIN_PREVIEW ))), pActNum(0), pSaveNum(0), - bLastWidthModified(FALSE), - bModified(FALSE), - bPreset(FALSE), - bAutomaticCharStyles(TRUE), - bHTMLMode(FALSE), - bMenuButtonInitialized(FALSE), + bLastWidthModified(sal_False), + bModified(sal_False), + bPreset(sal_False), + bAutomaticCharStyles(sal_True), + bHTMLMode(sal_False), + bMenuButtonInitialized(sal_False), sBullet(CUI_RES(STR_BULLET)), nBullet(0xff), nActNumLvl(USHRT_MAX), @@ -1140,10 +1121,12 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, aBitmapMB.GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup ); pPopup->InsertItem( NUM_NO_GRAPHIC, String(CUI_RES(ST_POPUP_EMPTY_ENTRY)) ); - pPopup->EnableItem( NUM_NO_GRAPHIC, FALSE ); + pPopup->EnableItem( NUM_NO_GRAPHIC, sal_False ); eCoreUnit = rSet.GetPool()->GetMetric(rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE)); + aBitmapMB.SetAccessibleRelationLabeledBy( &aBitmapFT ); + FreeResource(); //get advanced numbering types from the component @@ -1153,12 +1136,12 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, // Extended numbering schemes present in the resource but not offered by // the i18n framework per configuration must be removed from the listbox. // Watch out for the ugly 0x88/*SVX_NUM_BITMAP|0x80*/ to not remove that. - const USHORT nDontRemove = 0xffff; - ::std::vector< USHORT> aRemove( aFmtLB.GetEntryCount(), nDontRemove); + const sal_uInt16 nDontRemove = 0xffff; + ::std::vector< sal_uInt16> aRemove( aFmtLB.GetEntryCount(), nDontRemove); for (size_t i=0; i<aRemove.size(); ++i) { - USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData( - sal::static_int_cast< USHORT >(i)); + sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aFmtLB.GetEntryData( + sal::static_int_cast< sal_uInt16 >(i)); if (nEntryData > NumberingType::CHARS_LOWER_LETTER_N && nEntryData != (SVX_NUM_BITMAP | 0x80)) aRemove[i] = nEntryData; @@ -1173,10 +1156,10 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, if(nCurrent > NumberingType::CHARS_LOWER_LETTER_N) { sal_Bool bInsert = sal_True; - for(USHORT nEntry = 0; nEntry < aFmtLB.GetEntryCount(); nEntry++) + for(sal_uInt16 nEntry = 0; nEntry < aFmtLB.GetEntryCount(); nEntry++) { - USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData(nEntry); - if(nEntryData == (USHORT) nCurrent) + sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aFmtLB.GetEntryData(nEntry); + if(nEntryData == (sal_uInt16) nCurrent) { bInsert = sal_False; aRemove[nEntry] = nDontRemove; @@ -1186,8 +1169,8 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, if(bInsert) { OUString aIdent = xInfo->getNumberingIdentifier( nCurrent ); - USHORT nPos = aFmtLB.InsertEntry(aIdent); - aFmtLB.SetEntryData(nPos,(void*)(ULONG)nCurrent); + sal_uInt16 nPos = aFmtLB.InsertEntry(aIdent); + aFmtLB.SetEntryData(nPos,(void*)(sal_uLong)nCurrent); } } } @@ -1196,10 +1179,14 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent, { if (aRemove[i] != nDontRemove) { - USHORT nPos = aFmtLB.GetEntryPos( (void*)(ULONG)aRemove[i]); + sal_uInt16 nPos = aFmtLB.GetEntryPos( (void*)(sal_uLong)aRemove[i]); aFmtLB.RemoveEntry( nPos); } } + + aBulletPB.SetAccessibleRelationMemberOf(&aFormatFL); + aBulletPB.SetAccessibleRelationLabeledBy(&aStartFT); + aBulletPB.SetAccessibleName(aStartFT.GetText()); } SvxNumOptionsTabPage::~SvxNumOptionsTabPage() @@ -1237,15 +1224,15 @@ void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet) { const SfxPoolItem* pItem; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); - UINT16 nTmpNumLvl = USHRT_MAX; + sal_uInt16 nTmpNumLvl = USHRT_MAX; if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem)) bPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem)) nTmpNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -1256,18 +1243,18 @@ void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet) nActNumLvl != nTmpNumLvl) { nActNumLvl = nTmpNumLvl; - USHORT nMask = 1; - aLevelLB.SetUpdateMode(FALSE); + sal_uInt16 nMask = 1; + aLevelLB.SetUpdateMode(sal_False); aLevelLB.SetNoSelection(); aLevelLB.SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == USHRT_MAX); if(nActNumLvl != USHRT_MAX) - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) - aLevelLB.SelectEntryPos( i, TRUE); + aLevelLB.SelectEntryPos( i, sal_True); nMask <<= 1 ; } - aLevelLB.SetUpdateMode(TRUE); + aLevelLB.SetUpdateMode(sal_True); *pActNum = *pSaveNum; InitControls(); } @@ -1278,17 +1265,17 @@ int SvxNumOptionsTabPage::DeactivatePage(SfxItemSet * _pSet) { if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } -BOOL SvxNumOptionsTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxNumOptionsTabPage::FillItemSet( SfxItemSet& rSet ) { rSet.Put(SfxUInt16Item(SID_PARAM_CUR_NUM_LEVEL, nActNumLvl)); if(bModified && pActNum) { *pSaveNum = *pActNum; rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); - rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, FALSE)); + rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, sal_False)); } return bModified; }; @@ -1297,15 +1284,15 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); + SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem); if(eState != SFX_ITEM_SET) { nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); + eState = rSet.GetItemState(nNumItemId, sal_False, &pItem); if( eState != SFX_ITEM_SET ) { - pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) ); eState = SFX_ITEM_SET; } @@ -1317,7 +1304,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) // Ebenen einfuegen if(!aLevelLB.GetEntryCount()) { - for(USHORT i = 1; i <= pSaveNum->GetLevelCount(); i++) + for(sal_uInt16 i = 1; i <= pSaveNum->GetLevelCount(); i++) aLevelLB.InsertEntry( UniString::CreateFromInt32(i)); if(pSaveNum->GetLevelCount() > 1) { @@ -1332,21 +1319,21 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) else aLevelLB.SelectEntryPos(aLevelLB.GetEntryCount() - 1); - USHORT nMask = 1; - aLevelLB.SetUpdateMode(FALSE); + sal_uInt16 nMask = 1; + aLevelLB.SetUpdateMode(sal_False); aLevelLB.SetNoSelection(); if(nActNumLvl == USHRT_MAX) { - aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), TRUE); + aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), sal_True); } else - for(USHORT i = 0; i < pSaveNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pSaveNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) - aLevelLB.SelectEntryPos( i, TRUE); + aLevelLB.SelectEntryPos( i, sal_True); nMask <<= 1 ; } - aLevelLB.SetUpdateMode(TRUE); + aLevelLB.SetUpdateMode(sal_True); if(!pActNum) pActNum = new SvxNumRule(*pSaveNum); @@ -1388,21 +1375,21 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) } SfxObjectShell* pShell; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE, &pItem ) + if ( SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, sal_False, &pItem ) || ( 0 != ( pShell = SfxObjectShell::Current()) && 0 != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) ) { - USHORT nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue(); bHTMLMode = 0 != (nHtmlMode&HTMLMODE_ON); } - BOOL bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE); + sal_Bool bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE); aCharFmtFT.Show(bCharFmt); aCharFmtLB.Show(bCharFmt); - BOOL bContinuous = pActNum->IsFeatureSupported(NUM_CONTINUOUS); + sal_Bool bContinuous = pActNum->IsFeatureSupported(NUM_CONTINUOUS); - BOOL bAllLevel = bContinuous && !bHTMLMode; + sal_Bool bAllLevel = bContinuous && !bHTMLMode; aAllLevelFT.Show(bAllLevel); aAllLevelNF.Show(bAllLevel); @@ -1413,10 +1400,10 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) //remove types that are unsupported by Draw/Impress if(!bContinuous) { - USHORT nFmtCount = aFmtLB.GetEntryCount(); - for(USHORT i = nFmtCount; i; i--) + sal_uInt16 nFmtCount = aFmtLB.GetEntryCount(); + for(sal_uInt16 i = nFmtCount; i; i--) { - USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData(i - 1); + sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aFmtLB.GetEntryData(i - 1); if(/*SVX_NUM_NUMBER_NONE == nEntryData ||*/ ((SVX_NUM_BITMAP|LINK_TOKEN) == nEntryData)) aFmtLB.RemoveEntry(i - 1); @@ -1426,14 +1413,14 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) if(!pActNum->IsFeatureSupported(NUM_ENABLE_LINKED_BMP)) { long nData = SVX_NUM_BITMAP|LINK_TOKEN; - USHORT nPos = aFmtLB.GetEntryPos((void*)nData); + sal_uInt16 nPos = aFmtLB.GetEntryPos((void*)nData); if(LISTBOX_ENTRY_NOTFOUND != nPos) aFmtLB.RemoveEntry(nPos); } else if(!pActNum->IsFeatureSupported(NUM_ENABLE_EMBEDDED_BMP)) { long nData = SVX_NUM_BITMAP; - USHORT nPos = aFmtLB.GetEntryPos((void*)nData); + sal_uInt16 nPos = aFmtLB.GetEntryPos((void*)nData); if(LISTBOX_ENTRY_NOTFOUND != nPos) aFmtLB.RemoveEntry(nPos); } @@ -1451,48 +1438,48 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) //Alle arten der numerischen Aufzaehlungen loeschen if(pActNum->IsFeatureSupported(NUM_NO_NUMBERS)) { - USHORT nFmtCount = aFmtLB.GetEntryCount(); - for(USHORT i = nFmtCount; i; i--) + sal_uInt16 nFmtCount = aFmtLB.GetEntryCount(); + for(sal_uInt16 i = nFmtCount; i; i--) { - USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData(i - 1); + sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)aFmtLB.GetEntryData(i - 1); if( /*nEntryData >= SVX_NUM_CHARS_UPPER_LETTER &&*/ nEntryData <= SVX_NUM_NUMBER_NONE) aFmtLB.RemoveEntry(i - 1); } } InitControls(); - bModified = FALSE; + bModified = sal_False; } void SvxNumOptionsTabPage::InitControls() { - BOOL bShowBullet = TRUE; - BOOL bShowBitmap = TRUE; - BOOL bSameType = TRUE; - BOOL bSameStart = TRUE; - BOOL bSamePrefix = TRUE; - BOOL bSameSuffix = TRUE; - BOOL bAllLevel = TRUE; - BOOL bSameCharFmt = TRUE; - BOOL bSameVOrient = TRUE; - BOOL bSameSize = TRUE; - BOOL bSameBulColor = TRUE; - BOOL bSameBulRelSize= TRUE; - BOOL bSameAdjust = TRUE; + sal_Bool bShowBullet = sal_True; + sal_Bool bShowBitmap = sal_True; + sal_Bool bSameType = sal_True; + sal_Bool bSameStart = sal_True; + sal_Bool bSamePrefix = sal_True; + sal_Bool bSameSuffix = sal_True; + sal_Bool bAllLevel = sal_True; + sal_Bool bSameCharFmt = sal_True; + sal_Bool bSameVOrient = sal_True; + sal_Bool bSameSize = sal_True; + sal_Bool bSameBulColor = sal_True; + sal_Bool bSameBulRelSize= sal_True; + sal_Bool bSameAdjust = sal_True; const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM]; String sFirstCharFmt; sal_Int16 eFirstOrient = text::VertOrientation::NONE; Size aFirstSize(0,0); - USHORT nMask = 1; - USHORT nLvl = USHRT_MAX; - USHORT nHighestLevel = 0; + sal_uInt16 nMask = 1; + sal_uInt16 nLvl = USHRT_MAX; + sal_uInt16 nHighestLevel = 0; String aEmptyStr; - BOOL bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR); - BOOL bBullRelSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE); - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_Bool bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR); + sal_Bool bBullRelSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE); + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -1539,7 +1526,7 @@ void SvxNumOptionsTabPage::InitControls() aOrientLB.SetNoSelection(); else aOrientLB.SelectEntryPos( - sal::static_int_cast< USHORT >(eFirstOrient - 1)); + sal::static_int_cast< sal_uInt16 >(eFirstOrient - 1)); // kein text::VertOrientation::NONE if(bSameSize) @@ -1556,7 +1543,7 @@ void SvxNumOptionsTabPage::InitControls() if(bSameType) { - USHORT nLBData = (USHORT) aNumFmtArr[nLvl]->GetNumberingType(); + sal_uInt16 nLBData = (sal_uInt16) aNumFmtArr[nLvl]->GetNumberingType(); aFmtLB.SelectEntryPos(aFmtLB.GetEntryPos( (void*)sal::static_int_cast<sal_uIntPtr>( nLBData ) )); } else @@ -1574,7 +1561,7 @@ void SvxNumOptionsTabPage::InitControls() } if(bSameAdjust) { - USHORT nPos = 1; // zentriert + sal_uInt16 nPos = 1; // zentriert if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT) nPos = 0; else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT) @@ -1640,14 +1627,14 @@ void SvxNumOptionsTabPage::InitControls() } // 0 - Nummer; 1 - Bullet; 2 - Bitmap -void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL ) +void SvxNumOptionsTabPage::SwitchNumberType( sal_uInt8 nType, sal_Bool ) { if(nBullet == nType) return; nBullet = nType; - BOOL bBitmap = FALSE; - BOOL bBullet = FALSE; - BOOL bEnableBitmap = FALSE; + sal_Bool bBitmap = sal_False; + sal_Bool bBullet = sal_False; + sal_Bool bEnableBitmap = sal_False; if(nType == SHOW_NUMBERING) { // Label umschalten, alten Text merken @@ -1658,27 +1645,27 @@ void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL ) { // Label umschalten, alten Text merken aStartFT.SetText(sBullet); - bBullet = TRUE; + bBullet = sal_True; } else { - bBitmap = TRUE; - bEnableBitmap = TRUE; + bBitmap = sal_True; + bEnableBitmap = sal_True; } - BOOL bNumeric = !(bBitmap||bBullet); + sal_Bool bNumeric = !(bBitmap||bBullet); aPrefixFT.Show(bNumeric); aPrefixED.Show(bNumeric); aSuffixFT.Show(bNumeric); aSuffixED.Show(bNumeric); - BOOL bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE); + sal_Bool bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE); aCharFmtFT.Show(!bBitmap && bCharFmt); aCharFmtLB.Show(!bBitmap && bCharFmt); // das ist eigentlich Missbrauch, da fuer die vollst. Numerierung kein // eigenes Flag existiert - BOOL bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS); - BOOL bAllLevel = bNumeric && bAllLevelFeature && !bHTMLMode; + sal_Bool bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS); + sal_Bool bAllLevel = bNumeric && bAllLevelFeature && !bHTMLMode; aAllLevelFT.Show(bAllLevel); aAllLevelNF.Show(bAllLevel); @@ -1686,10 +1673,10 @@ void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL ) aStartED.Show(!(bBullet||bBitmap)); aBulletPB.Show(bBullet); - BOOL bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR); + sal_Bool bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR); aBulColorFT.Show( !bBitmap && bBullColor ); aBulColLB.Show( !bBitmap && bBullColor ); - BOOL bBullResSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE); + sal_Bool bBullResSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE); aBulRelSizeFT.Show( !bBitmap && bBullResSize ); aBulRelSizeMF.Show( !bBitmap && bBullResSize ); @@ -1717,33 +1704,33 @@ void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL ) IMPL_LINK( SvxNumOptionsTabPage, LevelHdl_Impl, ListBox *, pBox ) { - USHORT nSaveNumLvl = nActNumLvl; + sal_uInt16 nSaveNumLvl = nActNumLvl; nActNumLvl = 0; if(pBox->IsEntryPosSelected( pActNum->GetLevelCount() ) && (pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff)) { nActNumLvl = 0xFFFF; - pBox->SetUpdateMode(FALSE); - for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ ) - pBox->SelectEntryPos( i, FALSE ); - pBox->SetUpdateMode(TRUE); + pBox->SetUpdateMode(sal_False); + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) + pBox->SelectEntryPos( i, sal_False ); + pBox->SetUpdateMode(sal_True); } else if(pBox->GetSelectEntryCount()) { - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) { if(pBox->IsEntryPosSelected( i )) nActNumLvl |= nMask; nMask <<= 1; } - pBox->SelectEntryPos( pActNum->GetLevelCount(), FALSE ); + pBox->SelectEntryPos( pActNum->GetLevelCount(), sal_False ); } else { nActNumLvl = nSaveNumLvl; - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) { if(nActNumLvl & nMask) { @@ -1765,15 +1752,15 @@ IMPL_LINK( SvxNumOptionsTabPage, PreviewInvalidateHdl_Impl, Timer*, EMPTYARG ) IMPL_LINK( SvxNumOptionsTabPage, AllLevelHdl_Impl, NumericField*, pBox ) { - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { - USHORT nMask = 1; - for(USHORT e = 0; e < pActNum->GetLevelCount(); e++) + sal_uInt16 nMask = 1; + for(sal_uInt16 e = 0; e < pActNum->GetLevelCount(); e++) { if(nActNumLvl & nMask) { SvxNumberFormat aNumFmt(pActNum->GetLevel(e)); - aNumFmt.SetIncludeUpperLevels((BYTE) std::min(pBox->GetValue(), sal_Int64(e + 1)) ); + aNumFmt.SetIncludeUpperLevels((sal_uInt8) std::min(pBox->GetValue(), sal_Int64(e + 1)) ); pActNum->SetLevel(e, aNumFmt); } nMask <<= 1; @@ -1786,34 +1773,34 @@ IMPL_LINK( SvxNumOptionsTabPage, AllLevelHdl_Impl, NumericField*, pBox ) IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox ) { String sSelectStyle; - BOOL bShowOrient = FALSE; - BOOL bBmp = FALSE; + sal_Bool bShowOrient = sal_False; + sal_Bool bBmp = sal_False; String aEmptyStr; - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); // PAGEDESC gibt es nicht - USHORT nNumType = (USHORT)(ULONG)pBox->GetEntryData(pBox->GetSelectEntryPos()); + sal_uInt16 nNumType = (sal_uInt16)(sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos()); aNumFmt.SetNumberingType((sal_Int16)nNumType); sal_uInt16 nNumberingType = aNumFmt.GetNumberingType(); if(SVX_NUM_BITMAP == (nNumberingType&(~LINK_TOKEN))) { bBmp |= 0 != aNumFmt.GetBrush(); - aNumFmt.SetIncludeUpperLevels( FALSE ); + aNumFmt.SetIncludeUpperLevels( sal_False ); aNumFmt.SetSuffix( aEmptyStr ); aNumFmt.SetPrefix( aEmptyStr ); if(!bBmp) aNumFmt.SetGraphic(aEmptyStr); pActNum->SetLevel(i, aNumFmt); SwitchNumberType(SHOW_BITMAP, bBmp ); - bShowOrient = TRUE; + bShowOrient = sal_True; } else if( SVX_NUM_CHAR_SPECIAL == nNumberingType ) { - aNumFmt.SetIncludeUpperLevels( FALSE ); + aNumFmt.SetIncludeUpperLevels( sal_False ); aNumFmt.SetSuffix( aEmptyStr ); aNumFmt.SetPrefix( aEmptyStr ); if( !aNumFmt.GetBulletFont() ) @@ -1845,7 +1832,7 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox ) } nMask <<= 1; } - BOOL bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS); + sal_Bool bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS); if(bShowOrient && bAllLevelFeature) { aOrientFT.Show(); @@ -1861,15 +1848,15 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox ) { aCharFmtLB.SelectEntry(sSelectStyle); CharFmtHdl_Impl(&aCharFmtLB); - bAutomaticCharStyles = TRUE; + bAutomaticCharStyles = sal_True; } return 0; } void SvxNumOptionsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType) { - BOOL bIsNull = aStartED.GetValue() == 0; - BOOL bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC || + sal_Bool bIsNull = aStartED.GetValue() == 0; + sal_Bool bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC || SVX_NUM_CHARS_UPPER_LETTER_N == nNumberingType || SVX_NUM_CHARS_LOWER_LETTER_N == nNumberingType; aStartED.SetMin(bNoZeroAllowed ? 1 : 0); @@ -1879,11 +1866,11 @@ void SvxNumOptionsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType) IMPL_LINK( SvxNumOptionsTabPage, OrientHdl_Impl, ListBox *, pBox ) { - USHORT nPos = pBox->GetSelectEntryPos(); + sal_uInt16 nPos = pBox->GetSelectEntryPos(); nPos ++; // kein VERT_NONE - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -1899,22 +1886,22 @@ IMPL_LINK( SvxNumOptionsTabPage, OrientHdl_Impl, ListBox *, pBox ) } nMask <<= 1; } - SetModified(FALSE); + SetModified(sal_False); return 0; } IMPL_LINK( SvxNumOptionsTabPage, SameLevelHdl_Impl, CheckBox *, pBox ) { - BOOL bSet = pBox->IsChecked(); + sal_Bool bSet = pBox->IsChecked(); pActNum->SetContinuousNumbering(bSet); - BOOL bRepaint = FALSE; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_Bool bRepaint = sal_False; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); if(aNumFmt.GetNumberingType() != SVX_NUM_NUMBER_NONE) { - bRepaint = TRUE; + bRepaint = sal_True; break; } } @@ -1927,8 +1914,8 @@ IMPL_LINK( SvxNumOptionsTabPage, BulColorHdl_Impl, ColorListBox*, pBox ) { Color nSetColor = pBox->GetSelectEntryColor(); - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -1944,10 +1931,10 @@ IMPL_LINK( SvxNumOptionsTabPage, BulColorHdl_Impl, ColorListBox*, pBox ) IMPL_LINK( SvxNumOptionsTabPage, BulRelSizeHdl_Impl, MetricField *, pField) { - USHORT nRelSize = (USHORT)pField->GetValue(); + sal_uInt16 nRelSize = (sal_uInt16)pField->GetValue(); - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -1963,7 +1950,7 @@ IMPL_LINK( SvxNumOptionsTabPage, BulRelSizeHdl_Impl, MetricField *, pField) IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { - USHORT nItemId = pButton->GetCurItemId(); + sal_uInt16 nItemId = pButton->GetCurItemId(); String aGrfName; Size aSize; sal_Bool bSucc(sal_False); @@ -2000,8 +1987,8 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { aSize = OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, (MapUnit)eCoreUnit); - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2040,7 +2027,7 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG ) { if(!bMenuButtonInitialized) { - bMenuButtonInitialized = TRUE; + bMenuButtonInitialized = sal_True; EnterWait(); PopupMenu* pPopup = aBitmapMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY ); GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames); @@ -2050,7 +2037,7 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG ) String aEmptyStr; GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS); - for(USHORT i = 0; i < aGrfNames.Count(); i++) + for(sal_uInt16 i = 0; i < aGrfNames.Count(); i++) { Graphic aGraphic; String sGrfName = *(const String*)aGrfNames.GetObject(i); @@ -2064,7 +2051,7 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG ) if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) { - BOOL bWidth = aSize.Width() > aSize.Height(); + sal_Bool bWidth = aSize.Width() > aSize.Height(); double nScale = bWidth ? (double)MAX_BMP_WIDTH / (double)aSize.Width(): (double)MAX_BMP_HEIGHT / (double)aSize.Height(); @@ -2090,14 +2077,14 @@ IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, EMPTYARG ) IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG ) { - SvxCharacterMap* pMap = new SvxCharacterMap( this, TRUE ); + SvxCharacterMap* pMap = new SvxCharacterMap( this, sal_True ); - USHORT nMask = 1; + sal_uInt16 nMask = 1; const Font* pFmtFont = 0; - BOOL bSameBullet = TRUE; + sal_Bool bSameBullet = sal_True; sal_Unicode cBullet = 0; - BOOL bFirst = TRUE; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_Bool bFirst = sal_True; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2108,12 +2095,12 @@ IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG ) } else if(rCurFmt.GetBulletChar() != cBullet ) { - bSameBullet = FALSE; + bSameBullet = sal_False; break; } if(!pFmtFont) pFmtFont = rCurFmt.GetBulletFont(); - bFirst = FALSE; + bFirst = sal_False; } nMask <<= 1; @@ -2130,8 +2117,8 @@ IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG ) // Font Numrules umstellen aActBulletFont = pMap->GetCharFont(); - USHORT _nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 _nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & _nMask) { @@ -2151,9 +2138,9 @@ IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, EMPTYARG ) IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, MetricField *, pField) { - BOOL bWidth = pField == &aWidthMF; + sal_Bool bWidth = pField == &aWidthMF; bLastWidthModified = bWidth; - BOOL bRatio = aRatioCB.IsChecked(); + sal_Bool bRatio = aRatioCB.IsChecked(); long nWidthVal = static_cast<long>(aWidthMF.Denormalize(aWidthMF.GetValue(FUNIT_100TH_MM))); long nHeightVal = static_cast<long>(aHeightMF.Denormalize(aHeightMF.GetValue(FUNIT_100TH_MM))); nWidthVal = OutputDevice::LogicToLogic( nWidthVal , @@ -2162,9 +2149,9 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, MetricField *, pField) MAP_100TH_MM, (MapUnit)eCoreUnit); double fSizeRatio; - BOOL bRepaint = FALSE; - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_Bool bRepaint = sal_False; + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2206,7 +2193,7 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, MetricField *, pField) const SvxBrushItem* pBrushItem = aNumFmt.GetBrush(); sal_Int16 eOrient = aNumFmt.GetVertOrient(); if(aSize != aSaveSize) - bRepaint = TRUE; + bRepaint = sal_True; aNumFmt.SetGraphicBrush( pBrushItem, &aSize, &eOrient ); pActNum->SetLevel(i, aNumFmt); } @@ -2231,12 +2218,12 @@ IMPL_LINK( SvxNumOptionsTabPage, RatioHdl_Impl, CheckBox *, pBox ) IMPL_LINK( SvxNumOptionsTabPage, CharFmtHdl_Impl, ListBox *, EMPTYARG ) { - bAutomaticCharStyles = FALSE; - USHORT nEntryPos = aCharFmtLB.GetSelectEntryPos(); + bAutomaticCharStyles = sal_False; + sal_uInt16 nEntryPos = aCharFmtLB.GetSelectEntryPos(); String sEntry = aCharFmtLB.GetSelectEntry(); - USHORT nMask = 1; + sal_uInt16 nMask = 1; String aEmptyStr; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2252,18 +2239,18 @@ IMPL_LINK( SvxNumOptionsTabPage, CharFmtHdl_Impl, ListBox *, EMPTYARG ) } nMask <<= 1; } - SetModified(FALSE); + SetModified(sal_False); return 0; }; IMPL_LINK( SvxNumOptionsTabPage, EditModifyHdl_Impl, Edit *, pEdit ) { - BOOL bPrefix = pEdit == &aPrefixED; - BOOL bSuffix = pEdit == &aSuffixED; - BOOL bStart = pEdit == &aStartED; - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_Bool bPrefix = pEdit == &aPrefixED; + sal_Bool bSuffix = pEdit == &aSuffixED; + sal_Bool bStart = pEdit == &aStartED; + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -2273,10 +2260,10 @@ IMPL_LINK( SvxNumOptionsTabPage, EditModifyHdl_Impl, Edit *, pEdit ) else if(bSuffix) aNumFmt.SetSuffix( aSuffixED.GetText() ); else if(bStart) - aNumFmt.SetStart( (USHORT)aStartED.GetValue() ); + aNumFmt.SetStart( (sal_uInt16)aStartED.GetValue() ); else //align { - USHORT nPos = aAlignLB.GetSelectEntryPos(); + sal_uInt16 nPos = aAlignLB.GetSelectEntryPos(); SvxAdjust eAdjust = SVX_ADJUST_CENTER; if(nPos == 0) eAdjust = SVX_ADJUST_LEFT; @@ -2293,11 +2280,11 @@ IMPL_LINK( SvxNumOptionsTabPage, EditModifyHdl_Impl, Edit *, pEdit ) return 0; } -USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, USHORT nXStart, - USHORT nYStart, USHORT nDivision) +sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, sal_uInt16 nXStart, + sal_uInt16 nYStart, sal_uInt16 nDivision) { const SvxBrushItem* pBrushItem = rFmt.GetBrush(); - USHORT nRet = 0; + sal_uInt16 nRet = 0; if(pBrushItem) { const Graphic* pGrf = pBrushItem->GetGraphic(); @@ -2305,7 +2292,7 @@ USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, USHORT { Size aGSize( rFmt.GetGraphicSize() ); aGSize.Width() /= nDivision; - nRet = (USHORT)aGSize.Width(); + nRet = (sal_uInt16)aGSize.Width(); aGSize.Height() /= nDivision; pGrf->Draw( pVDev, Point(nXStart,nYStart), pVDev->PixelToLogic( aGSize ) ); @@ -2315,9 +2302,9 @@ USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, USHORT } -USHORT lcl_DrawBullet(VirtualDevice* pVDev, - const SvxNumberFormat& rFmt, USHORT nXStart, - USHORT nYStart, const Size& rSize) +sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev, + const SvxNumberFormat& rFmt, sal_uInt16 nXStart, + sal_uInt16 nYStart, const Size& rSize) { Font aTmpFont(pVDev->GetFont()); @@ -2332,7 +2319,7 @@ USHORT lcl_DrawBullet(VirtualDevice* pVDev, if(!aTmpSize.Height()) aTmpSize.Height() = 1; aFont.SetSize(aTmpSize); - aFont.SetTransparent(TRUE); + aFont.SetTransparent(sal_True); Color aBulletColor = rFmt.GetBulletColor(); if(aBulletColor.GetColor() == COL_AUTO) aBulletColor = Color(pVDev->GetFillColor().IsDark() ? COL_WHITE : COL_BLACK); @@ -2344,7 +2331,7 @@ USHORT lcl_DrawBullet(VirtualDevice* pVDev, long nY = nYStart; nY -= ((aTmpSize.Height() - rSize.Height())/ 2); pVDev->DrawText( Point(nXStart, nY), aText ); - USHORT nRet = (USHORT)pVDev->GetTextWidth(aText); + sal_uInt16 nRet = (sal_uInt16)pVDev->GetTextWidth(aText); pVDev->SetFont(aTmpFont); return nRet; @@ -2374,10 +2361,10 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) if(pActNum) { - USHORT nWidthRelation; + sal_uInt16 nWidthRelation; if(nPageWidth) { - nWidthRelation = USHORT (nPageWidth / aSize.Width()); + nWidthRelation = sal_uInt16 (nPageWidth / aSize.Width()); if(bPosition) nWidthRelation = nWidthRelation * 2 / 3; else @@ -2387,50 +2374,50 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) nWidthRelation = 30; // Kapiteldialog //Hoehe pro Ebene - USHORT nXStep = sal::static_int_cast< USHORT >(aSize.Width() / (3 * pActNum->GetLevelCount())); + sal_uInt16 nXStep = sal::static_int_cast< sal_uInt16 >(aSize.Width() / (3 * pActNum->GetLevelCount())); if(pActNum->GetLevelCount() < 10) nXStep /= 2; - USHORT nYStart = 4; + sal_uInt16 nYStart = 4; // fuer ein einziges Level darf nicht die gesamte Hoehe benutzt werden - USHORT nYStep = sal::static_int_cast< USHORT >((aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5)); + sal_uInt16 nYStep = sal::static_int_cast< sal_uInt16 >((aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5)); aStdFont = OutputDevice::GetDefaultFont( DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE); aStdFont.SetColor(aTextColor); aStdFont.SetFillColor(aBackColor); - USHORT nFontHeight = nYStep * 6 / 10; + sal_uInt16 nFontHeight = nYStep * 6 / 10; if(bPosition) nFontHeight = nYStep * 15 / 10; aStdFont.SetSize(Size( 0, nFontHeight )); - SvxNodeNum aNum( (BYTE)0 ); - USHORT nPreNum = pActNum->GetLevel(0).GetStart(); + SvxNodeNum aNum( (sal_uInt8)0 ); + sal_uInt16 nPreNum = pActNum->GetLevel(0).GetStart(); if(bPosition) { - USHORT nLineHeight = nFontHeight * 8 / 7; - BYTE nStart = 0; + sal_uInt16 nLineHeight = nFontHeight * 8 / 7; + sal_uInt8 nStart = 0; while( !(nActLevel & (1<<nStart)) ) { nStart++; } if(nStart) nStart--; - BYTE nEnd = std::min( (BYTE)(nStart + 3), (BYTE)pActNum->GetLevelCount() ); - for( BYTE nLevel = nStart; nLevel < nEnd; ++nLevel ) + sal_uInt8 nEnd = std::min( (sal_uInt8)(nStart + 3), (sal_uInt8)pActNum->GetLevelCount() ); + for( sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel ) { const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel); aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart(); - USHORT nXStart( 0 ); + sal_uInt16 nXStart( 0 ); short nTextOffset( 0 ); - USHORT nNumberXPos( 0 ); + sal_uInt16 nNumberXPos( 0 ); if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nXStart = rFmt.GetAbsLSpace() / nWidthRelation; nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation; nNumberXPos = nXStart; - USHORT nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation; + sal_uInt16 nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation; if(nFirstLineOffset <= nNumberXPos) nNumberXPos = nNumberXPos - nFirstLineOffset; @@ -2451,11 +2438,11 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) } else { - nNumberXPos = static_cast<USHORT>( nTmpNumberXPos ); + nNumberXPos = static_cast<sal_uInt16>( nTmpNumberXPos ); } } - USHORT nBulletWidth = 0; + sal_uInt16 nBulletWidth = 0; if( SVX_NUM_BITMAP == (rFmt.GetNumberingType() &(~LINK_TOKEN))) { nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev, rFmt, @@ -2485,7 +2472,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) pVDev->SetFont(aColorFont); pVDev->DrawText( Point(nNumberXPos, nYStart), aText ); pVDev->SetFont(aSaveFont); - nBulletWidth = (USHORT)pVDev->GetTextWidth(aText); + nBulletWidth = (sal_uInt16)pVDev->GetTextWidth(aText); nPreNum++; } if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT && @@ -2494,10 +2481,10 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) pVDev->SetFont(aStdFont); String aText(' '); pVDev->DrawText( Point(nNumberXPos, nYStart), aText ); - nBulletWidth = nBulletWidth + (USHORT)pVDev->GetTextWidth(aText); + nBulletWidth = nBulletWidth + (sal_uInt16)pVDev->GetTextWidth(aText); } - USHORT nTextXPos( 0 ); + sal_uInt16 nTextXPos( 0 ); if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nTextXPos = nXStart; @@ -2512,7 +2499,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) { case SvxNumberFormat::LISTTAB: { - nTextXPos = static_cast<USHORT>( + nTextXPos = static_cast<sal_uInt16>( rFmt.GetListtabPos() / nWidthRelation ); if ( nTextXPos < nNumberXPos + nBulletWidth ) { @@ -2528,7 +2515,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) break; } - nXStart = static_cast<USHORT>( rFmt.GetIndentAt() / nWidthRelation ); + nXStart = static_cast<sal_uInt16>( rFmt.GetIndentAt() / nWidthRelation ); } Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2)); @@ -2552,12 +2539,12 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) if(aBlackColor == aBackColor) aBlackColor.Invert(); - for( BYTE nLevel = 0; nLevel < pActNum->GetLevelCount(); + for( sal_uInt8 nLevel = 0; nLevel < pActNum->GetLevelCount(); ++nLevel, nYStart = nYStart + nYStep ) { const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel); aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart(); - USHORT nXStart( 0 ); + sal_uInt16 nXStart( 0 ); if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nXStart = rFmt.GetAbsLSpace() / nWidthRelation; @@ -2573,12 +2560,12 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) } else { - nXStart = static_cast<USHORT>(nTmpXStart); + nXStart = static_cast<sal_uInt16>(nTmpXStart); } } nXStart /= 2; nXStart += 2; - USHORT nTextOffset = 2 * nXStep; + sal_uInt16 nTextOffset = 2 * nXStep; if( SVX_NUM_BITMAP == (rFmt.GetNumberingType()&(~LINK_TOKEN)) ) { if(rFmt.IsShowSymbol()) @@ -2611,7 +2598,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) String aText(pActNum->MakeNumString( aNum )); pVDev->DrawText( Point(nXStart, nYStart), aText ); pVDev->SetFont(aStdFont); - nTextOffset = (USHORT)pVDev->GetTextWidth(aText); + nTextOffset = (sal_uInt16)pVDev->GetTextWidth(aText); nTextOffset = nTextOffset + nXStep; nPreNum++; } @@ -2682,7 +2669,7 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(Window* pParent, nNumItemId(SID_ATTR_NUMBERING_RULE), bModified(false), bPreset(false), - bInInintControl(FALSE), + bInInintControl(sal_False), bLabelAlignmentPosAndSpaceModeActive( false ) { FreeResource(); @@ -2692,7 +2679,7 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(Window* pParent, aRelativeCB.Check(); aAlignLB.SetSelectHdl(LINK(this, SvxNumPositionTabPage, EditModifyHdl_Impl)); aAlign2LB.SetSelectHdl(LINK(this, SvxNumPositionTabPage, EditModifyHdl_Impl)); - for ( USHORT i = 0; i < aAlignLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aAlignLB.GetEntryCount(); ++i ) { aAlign2LB.InsertEntry( aAlignLB.GetEntry( i ) ); } @@ -2749,6 +2736,8 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(Window* pParent, pDebugFixedText->SetPosSizePixel(aPos, aSize); pDebugFixedText->SetText( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Das ist ein Debug-Text" ) ) ); #endif + + aStandardPB.SetAccessibleRelationMemberOf(&aPositionFL); } SvxNumPositionTabPage::~SvxNumPositionTabPage() @@ -2792,7 +2781,7 @@ void lcl_PrintDebugOutput(FixedText& rFixed, const SvxNumberFormat& rNumFmt) void SvxNumPositionTabPage::InitControls() { - bInInintControl = TRUE; + bInInintControl = sal_True; const bool bRelative = !bLabelAlignmentPosAndSpaceModeActive && aRelativeCB.IsEnabled() && aRelativeCB.IsChecked(); const bool bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && @@ -2815,11 +2804,11 @@ void SvxNumPositionTabPage::InitControls() bool bSameIndentAt = bLabelAlignmentPosAndSpaceModeActive; const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM]; - USHORT nMask = 1; - USHORT nLvl = USHRT_MAX; + sal_uInt16 nMask = 1; + sal_uInt16 nLvl = USHRT_MAX; long nFirstBorderText = 0; long nFirstBorderTextRelative = -1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { aNumFmtArr[i] = &pActNum->GetLevel(i); if(nActNumLvl & nMask) @@ -2911,7 +2900,7 @@ void SvxNumPositionTabPage::InitControls() if(bSameAdjust) { - USHORT nPos = 1; // zentriert + sal_uInt16 nPos = 1; // zentriert if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT) nPos = 0; else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT) @@ -2927,7 +2916,7 @@ void SvxNumPositionTabPage::InitControls() if ( bSameLabelFollowedBy ) { - USHORT nPos = 0; // LISTTAB + sal_uInt16 nPos = 0; // LISTTAB if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE ) { nPos = 1; @@ -2986,22 +2975,22 @@ void SvxNumPositionTabPage::InitControls() if ( bSetDistEmpty ) aDistBorderMF.SetText(aEmptyStr); - bInInintControl = FALSE; + bInInintControl = sal_False; } void SvxNumPositionTabPage::ActivatePage(const SfxItemSet& rSet) { const SfxPoolItem* pItem; - UINT16 nTmpNumLvl = USHRT_MAX; + sal_uInt16 nTmpNumLvl = USHRT_MAX; const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); if(pExampleSet) { - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, sal_False, &pItem)) bPreset = ((const SfxBoolItem*)pItem)->GetValue(); - if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem)) + if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pItem)) nTmpNumLvl = ((const SfxUInt16Item*)pItem)->GetValue(); } - if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, sal_False, &pItem)) { delete pSaveNum; pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); @@ -3012,19 +3001,19 @@ void SvxNumPositionTabPage::ActivatePage(const SfxItemSet& rSet) { *pActNum = *pSaveNum; nActNumLvl = nTmpNumLvl; - USHORT nMask = 1; - aLevelLB.SetUpdateMode(FALSE); + sal_uInt16 nMask = 1; + aLevelLB.SetUpdateMode(sal_False); aLevelLB.SetNoSelection(); aLevelLB.SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == USHRT_MAX); if(nActNumLvl != USHRT_MAX) - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) - aLevelLB.SelectEntryPos( i, TRUE); + aLevelLB.SelectEntryPos( i, sal_True); nMask <<= 1 ; } aRelativeCB.Enable(nActNumLvl != 1); - aLevelLB.SetUpdateMode(TRUE); + aLevelLB.SetUpdateMode(sal_True); InitPosAndSpaceMode(); ShowControlsDependingOnPosAndSpaceMode(); @@ -3039,10 +3028,10 @@ int SvxNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet) { if(_pSet) FillItemSet(*_pSet); - return TRUE; + return sal_True; } -BOOL SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) { rSet.Put(SfxUInt16Item(SID_PARAM_CUR_NUM_LEVEL, nActNumLvl)); @@ -3050,7 +3039,7 @@ BOOL SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) { *pSaveNum = *pActNum; rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId); - rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, FALSE)); + rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, sal_False)); } return bModified; } @@ -3059,15 +3048,15 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); + SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, sal_False, &pItem); if(eState != SFX_ITEM_SET) { nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); + eState = rSet.GetItemState(nNumItemId, sal_False, &pItem); if( eState != SFX_ITEM_SET ) { - pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, sal_True ) ); eState = SFX_ITEM_SET; } @@ -3079,7 +3068,7 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet ) // Ebenen einfuegen if(!aLevelLB.GetEntryCount()) { - for(USHORT i = 1; i <= pSaveNum->GetLevelCount(); i++) + for(sal_uInt16 i = 1; i <= pSaveNum->GetLevelCount(); i++) aLevelLB.InsertEntry(UniString::CreateFromInt32(i)); if(pSaveNum->GetLevelCount() > 1) { @@ -3093,21 +3082,21 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet ) } else aLevelLB.SelectEntryPos(aLevelLB.GetEntryCount() - 1); - USHORT nMask = 1; - aLevelLB.SetUpdateMode(FALSE); + sal_uInt16 nMask = 1; + aLevelLB.SetUpdateMode(sal_False); aLevelLB.SetNoSelection(); if(nActNumLvl == USHRT_MAX) { - aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), TRUE); + aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), sal_True); } else - for(USHORT i = 0; i < pSaveNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pSaveNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) - aLevelLB.SelectEntryPos( i, TRUE); + aLevelLB.SelectEntryPos( i, sal_True); nMask <<= 1; } - aLevelLB.SetUpdateMode(TRUE); + aLevelLB.SetUpdateMode(sal_True); if(!pActNum) pActNum = new SvxNumRule(*pSaveNum); @@ -3119,7 +3108,7 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet ) ShowControlsDependingOnPosAndSpaceMode(); InitControls(); - bModified = FALSE; + bModified = sal_False; } void SvxNumPositionTabPage::InitPosAndSpaceMode() @@ -3133,8 +3122,8 @@ void SvxNumPositionTabPage::InitPosAndSpaceMode() SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode = SvxNumberFormat::LABEL_ALIGNMENT; - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i ) { if(nActNumLvl & nMask) { @@ -3205,14 +3194,14 @@ void SvxNumPositionTabPage::SetMetric(FieldUnit eMetric) IMPL_LINK( SvxNumPositionTabPage, EditModifyHdl_Impl, Edit *, EMPTYARG ) { - USHORT nMask = 1; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); - const USHORT nPos = aAlignLB.IsVisible() + const sal_uInt16 nPos = aAlignLB.IsVisible() ? aAlignLB.GetSelectEntryPos() : aAlign2LB.GetSelectEntryPos(); SvxAdjust eAdjust = SVX_ADJUST_CENTER; @@ -3231,33 +3220,33 @@ IMPL_LINK( SvxNumPositionTabPage, EditModifyHdl_Impl, Edit *, EMPTYARG ) IMPL_LINK( SvxNumPositionTabPage, LevelHdl_Impl, ListBox *, pBox ) { - USHORT nSaveNumLvl = nActNumLvl; + sal_uInt16 nSaveNumLvl = nActNumLvl; nActNumLvl = 0; if(pBox->IsEntryPosSelected( pActNum->GetLevelCount() ) && (pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff)) { nActNumLvl = 0xFFFF; - pBox->SetUpdateMode(FALSE); - for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ ) - pBox->SelectEntryPos( i, FALSE ); - pBox->SetUpdateMode(TRUE); + pBox->SetUpdateMode(sal_False); + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) + pBox->SelectEntryPos( i, sal_False ); + pBox->SetUpdateMode(sal_True); } else if(pBox->GetSelectEntryCount()) { - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) { if(pBox->IsEntryPosSelected( i )) nActNumLvl |= nMask; nMask <<= 1; } - pBox->SelectEntryPos( pActNum->GetLevelCount(), FALSE ); + pBox->SelectEntryPos( pActNum->GetLevelCount(), sal_False ); } else { nActNumLvl = nSaveNumLvl; - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) { if(nActNumLvl & nMask) { @@ -3280,11 +3269,11 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld ) if(bInInintControl) return 0; long nValue = GetCoreValue(*pFld, eCoreUnit); - USHORT nMask = 1; + sal_uInt16 nMask = 1; #if OSL_DEBUG_LEVEL > 1 - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; #endif - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -3297,7 +3286,7 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld ) if(0 == i) { long nTmp = aNumFmt.GetFirstLineOffset(); - aNumFmt.SetAbsLSpace( USHORT(nValue - nTmp)); + aNumFmt.SetAbsLSpace( sal_uInt16(nValue - nTmp)); } else { @@ -3305,7 +3294,7 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld ) pActNum->GetLevel( i - 1 ).GetFirstLineOffset() - pActNum->GetLevel( i ).GetFirstLineOffset(); - aNumFmt.SetAbsLSpace( USHORT(nValue + nTmp)); + aNumFmt.SetAbsLSpace( sal_uInt16(nValue + nTmp)); } } else @@ -3322,14 +3311,14 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld ) //jetzt muss mit dem FirstLineOffset auch der AbsLSpace veraendert werden long nDiff = nValue + aNumFmt.GetFirstLineOffset(); long nAbsLSpace = aNumFmt.GetAbsLSpace(); - aNumFmt.SetAbsLSpace(USHORT(nAbsLSpace + nDiff)); + aNumFmt.SetAbsLSpace(sal_uInt16(nAbsLSpace + nDiff)); aNumFmt.SetFirstLineOffset( -(short)nValue ); } #if OSL_DEBUG_LEVEL > 1 if(bFirst) lcl_PrintDebugOutput(*pDebugFixedText, aNumFmt); - bFirst = FALSE; + bFirst = sal_False; #endif pActNum->SetLevel( i, aNumFmt ); } @@ -3348,16 +3337,16 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld ) IMPL_LINK( SvxNumPositionTabPage, RelativeHdl_Impl, CheckBox *, pBox ) { - BOOL bOn = pBox->IsChecked(); - BOOL bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl; - BOOL bSetValue = FALSE; + sal_Bool bOn = pBox->IsChecked(); + sal_Bool bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl; + sal_Bool bSetValue = sal_False; long nValue = 0; if(bOn || bSingleSelection) { - USHORT nMask = 1; - BOOL bFirst = TRUE; - bSetValue = TRUE; - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + sal_uInt16 nMask = 1; + sal_Bool bFirst = sal_True; + bSetValue = sal_True; + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -3372,7 +3361,7 @@ IMPL_LINK( SvxNumPositionTabPage, RelativeHdl_Impl, CheckBox *, pBox ) bSetValue = nValue == (rNumFmt.GetAbsLSpace() + rNumFmt.GetFirstLineOffset()) - (pActNum->GetLevel(i - 1).GetAbsLSpace() + pActNum->GetLevel(i - 1).GetFirstLineOffset()); - bFirst = FALSE; + bFirst = sal_False; } nMask <<= 1; } @@ -3395,7 +3384,7 @@ IMPL_LINK( SvxNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG ) SvxNumberFormat::SvxNumLabelFollowedBy eLabelFollowedBy = SvxNumberFormat::LISTTAB; { - const USHORT nPos = aLabelFollowedByLB.GetSelectEntryPos(); + const sal_uInt16 nPos = aLabelFollowedByLB.GetSelectEntryPos(); if ( nPos == 1 ) { eLabelFollowedBy = SvxNumberFormat::SPACE; @@ -3408,9 +3397,9 @@ IMPL_LINK( SvxNumPositionTabPage, LabelFollowedByHdl_Impl, ListBox*, EMPTYARG ) // set value at the chosen list levels bool bSameListtabPos = true; - USHORT nFirstLvl = USHRT_MAX; - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i ) + sal_uInt16 nFirstLvl = USHRT_MAX; + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i ) { if ( nActNumLvl & nMask ) { @@ -3455,8 +3444,8 @@ IMPL_LINK( SvxNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pFld ) const long nValue = GetCoreValue( *pFld, eCoreUnit ); // set value at the chosen list levels - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i ) { if ( nActNumLvl & nMask ) { @@ -3481,8 +3470,8 @@ IMPL_LINK( SvxNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pFld ) const long nValue = GetCoreValue( *pFld, eCoreUnit ); // set value at the chosen list levels - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i ) { if ( nActNumLvl & nMask ) { @@ -3508,8 +3497,8 @@ IMPL_LINK( SvxNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld ) const long nValue = GetCoreValue( *pFld, eCoreUnit ); // set value at the chosen list levels - USHORT nMask = 1; - for( USHORT i = 0; i < pActNum->GetLevelCount(); ++i ) + sal_uInt16 nMask = 1; + for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i ) { if ( nActNumLvl & nMask ) { @@ -3534,13 +3523,13 @@ IMPL_LINK( SvxNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld ) IMPL_LINK( SvxNumPositionTabPage, StandardHdl_Impl, PushButton *, EMPTYARG ) { - USHORT nMask = 1; + sal_uInt16 nMask = 1; SvxNumRule aTmpNumRule( pActNum->GetFeatureFlags(), pActNum->GetLevelCount(), pActNum->IsContinuousNumbering(), SVX_RULETYPE_NUMBERING, pActNum->GetLevel( 0 ).GetPositionAndSpaceMode() ); - for(USHORT i = 0; i < pActNum->GetLevelCount(); i++) + for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) { @@ -3572,9 +3561,9 @@ IMPL_LINK( SvxNumPositionTabPage, StandardHdl_Impl, PushButton *, EMPTYARG ) return 0; } -void SvxNumPositionTabPage::SetModified(BOOL bRepaint) +void SvxNumPositionTabPage::SetModified(sal_Bool bRepaint) { - bModified = TRUE; + bModified = sal_True; if(bRepaint) { pPreviewWIN->SetLevel(nActNumLvl); @@ -3582,9 +3571,9 @@ void SvxNumPositionTabPage::SetModified(BOOL bRepaint) } } -void SvxNumOptionsTabPage::SetModified(BOOL bRepaint) +void SvxNumOptionsTabPage::SetModified(sal_Bool bRepaint) { - bModified = TRUE; + bModified = sal_True; if(bRepaint) { pPreviewWIN->SetLevel(nActNumLvl); diff --git a/cui/source/tabpages/numpages.src b/cui/source/tabpages/numpages.src index 761377142..3e2576e4c 100644 --- a/cui/source/tabpages/numpages.src +++ b/cui/source/tabpages/numpages.src @@ -128,6 +128,7 @@ TabPage RID_SVXPAGE_PICK_BMP }; CheckBox CB_LINKED { + HelpID = "cui:CheckBox:RID_SVXPAGE_PICK_BMP:CB_LINKED"; Pos = MAP_APPFONT ( 9 , 169 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; TabStop = TRUE ; @@ -161,6 +162,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; MultiListBox LB_LEVEL { + HelpID = "cui:MultiListBox:RID_SVXPAGE_NUM_OPTIONS:LB_LEVEL"; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 26 , 154 ) ; TabStop = TRUE ; @@ -182,6 +184,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; ListBox LB_FMT { + HelpID = "cui:ListBox:RID_SVXPAGE_NUM_OPTIONS:LB_FMT"; Pos = MAP_APPFONT ( 103 , 25 ) ; Size = MAP_APPFONT ( 67 , 72 ) ; TabStop = TRUE ; @@ -225,6 +228,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; Edit ED_PREFIX { + HelpID = "cui:Edit:RID_SVXPAGE_NUM_OPTIONS:ED_PREFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 103 , 41 ) ; Size = MAP_APPFONT ( 67 , 12 ) ; @@ -241,6 +245,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; Edit ED_SUFFIX { + HelpID = "cui:Edit:RID_SVXPAGE_NUM_OPTIONS:ED_SUFFIX"; Border = TRUE ; Pos = MAP_APPFONT ( 103 , 57 ) ; Size = MAP_APPFONT ( 67 , 12 ) ; @@ -256,6 +261,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; ListBox LB_CHARFMT { + HelpID = "cui:ListBox:RID_SVXPAGE_NUM_OPTIONS:LB_CHARFMT"; TabStop = TRUE ; DropDown = TRUE ; Pos = MAP_APPFONT ( 103 , 73 ) ; @@ -270,6 +276,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; ListBox LB_BUL_COLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_NUM_OPTIONS:LB_BUL_COLOR"; TabStop = TRUE ; DropDown = TRUE ; Pos = MAP_APPFONT ( 103 , 73 ) ; @@ -285,6 +292,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; MetricField MF_BUL_REL_SIZE { + HelpID = "cui:MetricField:RID_SVXPAGE_NUM_OPTIONS:MF_BUL_REL_SIZE"; Pos = MAP_APPFONT ( 103 , 89 ) ; Size = MAP_APPFONT ( 67 , 12 ) ; Border = TRUE ; @@ -307,6 +315,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; NumericField NF_ALL_LEVEL { + HelpID = "cui:NumericField:RID_SVXPAGE_NUM_OPTIONS:NF_ALL_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 103 , 89 ) ; Size = MAP_APPFONT ( 67 , 12 ) ; @@ -329,6 +338,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; NumericField ED_START { + HelpID = "cui:NumericField:RID_SVXPAGE_NUM_OPTIONS:ED_START"; Border = TRUE ; Pos = MAP_APPFONT ( 103 , 105 ) ; Size = MAP_APPFONT ( 67 , 12 ) ; @@ -351,6 +361,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; ListBox LB_ALIGN { + HelpID = "cui:ListBox:RID_SVXPAGE_NUM_OPTIONS:LB_ALIGN"; Pos = MAP_APPFONT ( 103 , 133 ) ; Size = MAP_APPFONT ( 40 , 40 ) ; TabStop = TRUE ; @@ -369,6 +380,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; PushButton PB_BULLET { + HelpID = "cui:PushButton:RID_SVXPAGE_NUM_OPTIONS:PB_BULLET"; Hide = TRUE ; Pos = MAP_APPFONT ( 103 , 105 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; @@ -384,6 +396,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; MenuButton MB_BITMAP { + HelpID = "cui:MenuButton:RID_SVXPAGE_NUM_OPTIONS:MB_BITMAP"; Hide = TRUE ; Pos = MAP_APPFONT ( 103 , 41 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -416,6 +429,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; MetricField MF_WIDTH { + HelpID = "cui:MetricField:RID_SVXPAGE_NUM_OPTIONS:MF_WIDTH"; Pos = MAP_APPFONT ( 103 , 59 ) ; Size = MAP_APPFONT ( 67 , 12 ) ; Border = TRUE ; @@ -442,6 +456,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; MetricField MF_HEIGHT { + HelpID = "cui:MetricField:RID_SVXPAGE_NUM_OPTIONS:MF_HEIGHT"; Pos = MAP_APPFONT ( 103 , 75 ) ; Size = MAP_APPFONT ( 67 , 12 ) ; Border = TRUE ; @@ -461,6 +476,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; CheckBox CB_RATIO { + HelpID = "cui:CheckBox:RID_SVXPAGE_NUM_OPTIONS:CB_RATIO"; Hide = TRUE ; Pos = MAP_APPFONT ( 50 , 91 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; @@ -475,6 +491,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; ListBox LB_ORIENT { + HelpID = "cui:ListBox:RID_SVXPAGE_NUM_OPTIONS:LB_ORIENT"; Hide = TRUE ; Pos = MAP_APPFONT ( 103 , 103 ) ; Size = MAP_APPFONT ( 67 , 72 ) ; @@ -502,6 +519,7 @@ TabPage RID_SVXPAGE_NUM_OPTIONS }; CheckBox CB_SAME_LEVEL { + HelpID = "cui:CheckBox:RID_SVXPAGE_NUM_OPTIONS:CB_SAME_LEVEL"; Pos = MAP_APPFONT ( 53 , 167 ) ; Size = MAP_APPFONT ( 114 , 10 ) ; Text [ en-US ] = "~Consecutive numbering" ; @@ -537,6 +555,7 @@ TabPage RID_SVXPAGE_NUM_POSITION }; MultiListBox LB_LEVEL { + HelpID = "cui:MultiListBox:RID_SVXPAGE_NUM_POSITION:LB_LEVEL"; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 26 , 154 ) ; TabStop = TRUE ; @@ -559,6 +578,7 @@ TabPage RID_SVXPAGE_NUM_POSITION }; MetricField MF_BORDERDIST { + HelpID = "cui:MetricField:RID_SVXPAGE_NUM_POSITION:MF_BORDERDIST"; Pos = MAP_APPFONT ( 198 , 25 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -577,6 +597,7 @@ TabPage RID_SVXPAGE_NUM_POSITION }; CheckBox CB_RELATIVE { + HelpID = "cui:CheckBox:RID_SVXPAGE_NUM_POSITION:CB_RELATIVE"; Pos = MAP_APPFONT ( 198 , 41 ) ; Size = MAP_APPFONT ( 52 , 10 ) ; Text [ en-US ] = "Relati~ve" ; @@ -589,6 +610,7 @@ TabPage RID_SVXPAGE_NUM_POSITION }; MetricField MF_INDENT { + HelpID = "cui:MetricField:RID_SVXPAGE_NUM_POSITION:MF_INDENT"; Pos = MAP_APPFONT ( 198 , 57 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -613,6 +635,7 @@ TabPage RID_SVXPAGE_NUM_POSITION }; MetricField MF_NUMDIST { + HelpID = "cui:MetricField:RID_SVXPAGE_NUM_POSITION:MF_NUMDIST"; Pos = MAP_APPFONT ( 198 , 73 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Left = TRUE ; @@ -637,6 +660,7 @@ TabPage RID_SVXPAGE_NUM_POSITION }; ListBox LB_ALIGN { + HelpID = "cui:ListBox:RID_SVXPAGE_NUM_POSITION:LB_ALIGN"; Pos = MAP_APPFONT ( 198 , 89 ) ; Size = MAP_APPFONT ( 40 , 40 ) ; TabStop = TRUE ; @@ -656,6 +680,7 @@ TabPage RID_SVXPAGE_NUM_POSITION }; ListBox LB_LABEL_FOLLOWED_BY { + HelpID = "cui:ListBox:RID_SVXPAGE_NUM_POSITION:LB_LABEL_FOLLOWED_BY"; Pos = MAP_APPFONT ( 198 , 25 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; TabStop = TRUE ; @@ -676,6 +701,7 @@ TabPage RID_SVXPAGE_NUM_POSITION }; MetricField MF_LISTTAB { + HelpID = "cui:MetricField:RID_SVXPAGE_NUM_POSITION:MF_LISTTAB"; Pos = MAP_APPFONT ( 198 , 41 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Border = TRUE ; @@ -699,6 +725,7 @@ TabPage RID_SVXPAGE_NUM_POSITION }; ListBox LB_ALIGN_2 { + HelpID = "cui:ListBox:RID_SVXPAGE_NUM_POSITION:LB_ALIGN_2"; Pos = MAP_APPFONT ( 198 , 57 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; TabStop = TRUE ; @@ -712,6 +739,7 @@ TabPage RID_SVXPAGE_NUM_POSITION }; MetricField MF_ALIGNED_AT { + HelpID = "cui:MetricField:RID_SVXPAGE_NUM_POSITION:MF_ALIGNED_AT"; Pos = MAP_APPFONT ( 198 , 73 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Left = TRUE ; @@ -736,6 +764,7 @@ TabPage RID_SVXPAGE_NUM_POSITION }; MetricField MF_INDENT_AT { + HelpID = "cui:MetricField:RID_SVXPAGE_NUM_POSITION:MF_INDENT_AT"; Pos = MAP_APPFONT ( 198 , 89 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; Left = TRUE ; @@ -754,6 +783,7 @@ TabPage RID_SVXPAGE_NUM_POSITION }; PushButton PB_STANDARD { + HelpID = "cui:PushButton:RID_SVXPAGE_NUM_POSITION:PB_STANDARD"; Pos = MAP_APPFONT ( 198 , 165 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Default" ; diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 90f5d8cbc..29d4a800a 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -127,7 +127,7 @@ static const long MINBODY = 284; // 0,5cm in twips aufgerundet //static const long PRINT_OFFSET = 17; // 0,03cm in twips abgerundet static const long PRINT_OFFSET = 0; // why was this ever set to 17 ? it led to wrong right and bottom margins. -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_SHADOW, @@ -140,7 +140,7 @@ static USHORT pRanges[] = // ------- Mapping Seitenlayout ------------------------------------------ -USHORT aArr[] = +sal_uInt16 aArr[] = { SVX_PAGE_ALL, SVX_PAGE_MIRROR, @@ -150,9 +150,9 @@ USHORT aArr[] = // ----------------------------------------------------------------------- -USHORT PageUsageToPos_Impl( USHORT nUsage ) +sal_uInt16 PageUsageToPos_Impl( sal_uInt16 nUsage ) { - for ( USHORT i = 0; i < SAL_N_ELEMENTS(aArr); ++i ) + for ( sal_uInt16 i = 0; i < SAL_N_ELEMENTS(aArr); ++i ) if ( aArr[i] == ( nUsage & 0x000f ) ) return i; return SVX_PAGE_ALL; @@ -160,7 +160,7 @@ USHORT PageUsageToPos_Impl( USHORT nUsage ) // ----------------------------------------------------------------------- -USHORT PosToPageUsage_Impl( USHORT nPos ) +sal_uInt16 PosToPageUsage_Impl( sal_uInt16 nPos ) { if ( nPos >= SAL_N_ELEMENTS(aArr) ) return 0; @@ -186,7 +186,7 @@ long ConvertLong_Impl( const long nIn, SfxMapUnit eUnit ) return OutputDevice::LogicToLogic( nIn, (MapUnit)eUnit, MAP_TWIP ); } -BOOL IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize ) +sal_Bool IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize ) { if ( pSize ) { @@ -196,7 +196,7 @@ BOOL IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize ) return ( nDiffW < 10 && nDiffH < 10 ); } else - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -224,7 +224,7 @@ struct SvxPage_Impl // gibt den Bereich der Which-Werte zur"uck -USHORT* SvxPageDescPage::GetRanges() +sal_uInt16* SvxPageDescPage::GetRanges() { return pRanges; } @@ -266,13 +266,12 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : aTopMarginEdit ( this, CUI_RES( ED_TOP_MARGIN ) ), aBottomMarginLbl ( this, CUI_RES( FT_BOTTOM_MARGIN ) ), aBottomMarginEdit ( this, CUI_RES( ED_BOTTOM_MARGIN ) ), - + aBottomSeparatorFl ( this, CUI_RES( FL_BOTTOM_SEP ) ), aLayoutFL ( this, CUI_RES( FL_LAYOUT ) ), aPageText ( this, CUI_RES( FT_PAGELAYOUT ) ), aLayoutBox ( this, CUI_RES( LB_LAYOUT ) ), aNumberFormatText ( this, CUI_RES( FT_NUMBER_FORMAT ) ), aNumberFormatBox ( this, CUI_RES( LB_NUMBER_FORMAT ) ), - aBottomSeparatorFl ( this, CUI_RES( FL_BOTTOM_SEP ) ), aTblAlignFT ( this, CUI_RES( FT_TBL_ALIGN ) ), aHorzBox ( this, CUI_RES( CB_HORZ ) ), aVertBox ( this, CUI_RES( CB_VERT ) ), @@ -285,16 +284,16 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : aOutsideText ( CUI_RES( STR_OUTSIDE ) ), aPrintRangeQueryText( CUI_RES( STR_QUERY_PRINTRANGE ) ), - bLandscape ( FALSE ), + bLandscape ( sal_False ), eMode ( SVX_PAGE_MODE_STANDARD ), ePaperStart ( PAPER_A3 ), ePaperEnd ( PAPER_ENV_DL ), pImpl ( new SvxPage_Impl ) { - bBorderModified = FALSE; + bBorderModified = sal_False; FreeResource(); - aBspWin.EnableRTL( FALSE ); + aBspWin.EnableRTL( sal_False ); // diese Page braucht ExchangeSupport SetExchangeSupport(); @@ -306,7 +305,7 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : const SfxPoolItem* pItem; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, FALSE, &pItem) || + if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, sal_False, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) bWeb = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); @@ -323,9 +322,10 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : if( !bWeb ) { if( bCJK ) + { aTextFlowBox.InsertEntryValue( CUI_RESSTR( RID_SVXSTR_PAGEDIR_RTL_VERT ), FRMDIR_VERT_TOP_RIGHT ); -// if( ... ) // aTextFlowBox.InsertEntryValue( CUI_RESSTR( RID_SVXSTR_PAGEDIR_LTR_VERT ), FRMDIR_VERT_TOP_LEFT ); + } } // #109989# show the text direction box in Writer/Web too, but only, if HTML export mode is not HTML3.2. @@ -414,6 +414,9 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : aTopMarginEdit.SetLast(aDrawinglayerOpt.GetMaximumPaperTopMargin()); aBottomMarginEdit.SetMax(aDrawinglayerOpt.GetMaximumPaperBottomMargin()); aBottomMarginEdit.SetLast(aDrawinglayerOpt.GetMaximumPaperBottomMargin()); + + aPortraitBtn.SetAccessibleRelationMemberOf(&aOrientationFT); + aLandscapeBtn.SetAccessibleRelationMemberOf(&aOrientationFT); } // ----------------------------------------------------------------------- @@ -482,10 +485,10 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)*pItem; SetMetricValue( aLeftMarginEdit, rLRSpace.GetLeft(), eUnit ); aBspWin.SetLeft( - (USHORT)ConvertLong_Impl( (long)rLRSpace.GetLeft(), eUnit ) ); + (sal_uInt16)ConvertLong_Impl( (long)rLRSpace.GetLeft(), eUnit ) ); SetMetricValue( aRightMarginEdit, rLRSpace.GetRight(), eUnit ); aBspWin.SetRight( - (USHORT)ConvertLong_Impl( (long)rLRSpace.GetRight(), eUnit ) ); + (sal_uInt16)ConvertLong_Impl( (long)rLRSpace.GetRight(), eUnit ) ); } // R"ander (Oben/Unten) einstellen @@ -496,16 +499,16 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)*pItem; SetMetricValue( aTopMarginEdit, rULSpace.GetUpper(), eUnit ); aBspWin.SetTop( - (USHORT)ConvertLong_Impl( (long)rULSpace.GetUpper(), eUnit ) ); + (sal_uInt16)ConvertLong_Impl( (long)rULSpace.GetUpper(), eUnit ) ); SetMetricValue( aBottomMarginEdit, rULSpace.GetLower(), eUnit ); aBspWin.SetBottom( - (USHORT)ConvertLong_Impl( (long)rULSpace.GetLower(), eUnit ) ); + (sal_uInt16)ConvertLong_Impl( (long)rULSpace.GetLower(), eUnit ) ); } // allgemeine Seitendaten SvxNumType eNumType = SVX_ARABIC; bLandscape = ( pImpl->mpDefPrinter->GetOrientation() == ORIENTATION_LANDSCAPE ); - USHORT nUse = (USHORT)SVX_PAGE_ALL; + sal_uInt16 nUse = (sal_uInt16)SVX_PAGE_ALL; pItem = GetItem( rSet, SID_ATTR_PAGE ); if ( pItem ) @@ -522,11 +525,11 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) LayoutHdl_Impl( 0 ); // Numerierungsart der Seitenvorlage einstellen - aNumberFormatBox.SelectEntryPos( sal::static_int_cast< USHORT >(eNumType) ); + aNumberFormatBox.SelectEntryPos( sal::static_int_cast< sal_uInt16 >(eNumType) ); // Aktueller Papierschacht aPaperTrayBox.Clear(); - BYTE nPaperBin = PAPERBIN_PRINTER_SETTINGS; + sal_uInt8 nPaperBin = PAPERBIN_PRINTER_SETTINGS; pItem = GetItem( rSet, SID_ATTR_PAGE_PAPERBIN ); if ( pItem ) @@ -542,10 +545,10 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) if ( PAPERBIN_PRINTER_SETTINGS == nPaperBin ) aBinName = EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ); else - aBinName = pImpl->mpDefPrinter->GetPaperBinName( (USHORT)nPaperBin ); + aBinName = pImpl->mpDefPrinter->GetPaperBinName( (sal_uInt16)nPaperBin ); - USHORT nEntryPos = aPaperTrayBox.InsertEntry( aBinName ); - aPaperTrayBox.SetEntryData( nEntryPos, (void*)(ULONG)nPaperBin ); + sal_uInt16 nEntryPos = aPaperTrayBox.InsertEntry( aBinName ); + aPaperTrayBox.SetEntryData( nEntryPos, (void*)(sal_uLong)nPaperBin ); aPaperTrayBox.SelectEntry( aBinName ); // Size rausholen @@ -558,14 +561,14 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) bool bOrientationSupport = pImpl->mpDefPrinter->HasSupport( SUPPORT_SET_ORIENTATION ); #ifdef OS2 - // unter OS/2 wird bei HasSupport() immer TRUE returned + // unter OS/2 wird bei HasSupport() immer sal_True returned // aber nur als Dummy, deshalb FALSE - bOrientationSupport = FALSE; + bOrientationSupport = sal_False; #endif if ( !bOrientationSupport && aPaperSize.Width() > aPaperSize.Height() ) - bLandscape = TRUE; + bLandscape = sal_True; aLandscapeBtn.Check( bLandscape ); aPortraitBtn.Check( !bLandscape ); @@ -578,7 +581,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) Swap( aPaperSize ); // Actual Paper Format - Paper ePaper = SvxPaperInfo::GetSvxPaper( aPaperSize, MAP_100TH_MM, TRUE ); + Paper ePaper = SvxPaperInfo::GetSvxPaper( aPaperSize, MAP_100TH_MM, sal_True ); if ( PAPER_USER != ePaper ) aPaperSize = SvxPaperInfo::GetPaperSize( ePaper, MAP_100TH_MM ); @@ -591,8 +594,8 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) SetMetricValue( aPaperWidthEdit, aPaperSize.Width(), SFX_MAPUNIT_100TH_MM ); aPaperSizeBox.Clear(); - USHORT nActPos = LISTBOX_ENTRY_NOTFOUND; - USHORT nAryId = RID_SVXSTRARY_PAPERSIZE_STD; + sal_uInt16 nActPos = LISTBOX_ENTRY_NOTFOUND; + sal_uInt16 nAryId = RID_SVXSTRARY_PAPERSIZE_STD; if ( ePaperStart != PAPER_A3 ) nAryId = RID_SVXSTRARY_PAPERSIZE_DRAW; @@ -603,8 +606,8 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) { String aStr = aPaperAry.GetString(i); Paper eSize = (Paper)aPaperAry.GetValue(i); - USHORT nPos = aPaperSizeBox.InsertEntry( aStr ); - aPaperSizeBox.SetEntryData( nPos, (void*)(ULONG)eSize ); + sal_uInt16 nPos = aPaperSizeBox.InsertEntry( aStr ); + aPaperSizeBox.SetEntryData( nPos, (void*)(sal_uLong)eSize ); if ( eSize == ePaper ) nActPos = nPos; @@ -626,15 +629,15 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) // Horizontale Ausrichtung pItem = GetItem( rSet, SID_ATTR_PAGE_EXT1 ); aHorzBox.Check( pItem ? ( (const SfxBoolItem*)pItem )->GetValue() - : FALSE ); + : sal_False ); // Vertikale Ausrichtung pItem = GetItem( rSet, SID_ATTR_PAGE_EXT2 ); aVertBox.Check( pItem ? ( (const SfxBoolItem*)pItem )->GetValue() - : FALSE ); + : sal_False ); // Beispiel-Fenster auf Tabelle setzen - aBspWin.SetTable( TRUE ); + aBspWin.SetTable( sal_True ); aBspWin.SetHorz( aHorzBox.IsChecked() ); aBspWin.SetVert( aVertBox.IsChecked() ); @@ -647,7 +650,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) aAdaptBox.Show(); pItem = GetItem( rSet, SID_ATTR_PAGE_EXT1 ); aAdaptBox.Check( pItem ? - ( (const SfxBoolItem*)pItem )->GetValue() : FALSE ); + ( (const SfxBoolItem*)pItem )->GetValue() : sal_False ); //!!! hidden, weil von StarDraw nicht implementiert aLayoutBox.Hide(); @@ -668,8 +671,8 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) InitHeadFoot_Impl( rSet ); // R"ander auf Hoch/Quer updaten, dann Beispiel updaten - bBorderModified = FALSE; - SwapFirstValues_Impl( FALSE ); + bBorderModified = sal_False; + SwapFirstValues_Impl( sal_False ); UpdateExample_Impl(); // Alte Werte sichern @@ -707,7 +710,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) } SfxItemState eState = rSet.GetItemState( GetWhich( SID_ATTR_FRAMEDIRECTION ), - TRUE, &pItem ); + sal_True, &pItem ); if( SFX_ITEM_UNKNOWN != eState ) { sal_uInt32 nVal = SFX_ITEM_SET == eState @@ -729,13 +732,13 @@ void SvxPageDescPage::FillUserData() // ----------------------------------------------------------------------- -BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; const SfxItemSet& rOldSet = GetItemSet(); SfxItemPool* pPool = rOldSet.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); - USHORT nWhich = GetWhich( SID_ATTR_LRSPACE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_LRSPACE ); SfxMapUnit eUnit = pPool->GetMetric( nWhich ); const SfxPoolItem* pOld = 0; @@ -748,14 +751,14 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( aLeftMarginEdit.GetText() != aLeftMarginEdit.GetSavedValue() ) { - aMargin.SetLeft( (USHORT)GetCoreValue( aLeftMarginEdit, eUnit ) ); - bModified |= TRUE; + aMargin.SetLeft( (sal_uInt16)GetCoreValue( aLeftMarginEdit, eUnit ) ); + bModified |= sal_True; } if ( aRightMarginEdit.GetText() != aRightMarginEdit.GetSavedValue() ) { - aMargin.SetRight( (USHORT)GetCoreValue( aRightMarginEdit, eUnit ) ); - bModified |= TRUE; + aMargin.SetRight( (sal_uInt16)GetCoreValue( aRightMarginEdit, eUnit ) ); + bModified |= sal_True; } // Linken und rechten Rand setzen @@ -766,21 +769,21 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || !( *(const SvxLRSpaceItem*)pOld == aMargin ) ) rSet.Put( aMargin ); else - bModified = FALSE; + bModified = sal_False; } - BOOL bMod = FALSE; + sal_Bool bMod = sal_False; if ( aTopMarginEdit.GetText() != aTopMarginEdit.GetSavedValue() ) { - aTopMargin.SetUpper( (USHORT)GetCoreValue( aTopMarginEdit, eUnit ) ); - bMod |= TRUE; + aTopMargin.SetUpper( (sal_uInt16)GetCoreValue( aTopMarginEdit, eUnit ) ); + bMod |= sal_True; } if ( aBottomMarginEdit.GetText() != aBottomMarginEdit.GetSavedValue() ) { - aTopMargin.SetLower( (USHORT)GetCoreValue( aBottomMarginEdit, eUnit ) ); - bMod |= TRUE; + aTopMargin.SetLower( (sal_uInt16)GetCoreValue( aBottomMarginEdit, eUnit ) ); + bMod |= sal_True; } // unteren oberen Rand setzen @@ -791,27 +794,27 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || !( *(const SvxULSpaceItem*)pOld == aTopMargin ) ) { - bModified |= TRUE; + bModified |= sal_True; rSet.Put( aTopMargin ); } } // Druckerschacht nWhich = GetWhich( SID_ATTR_PAGE_PAPERBIN ); - USHORT nPos = aPaperTrayBox.GetSelectEntryPos(); - USHORT nBin = (USHORT)(ULONG)aPaperTrayBox.GetEntryData( nPos ); + sal_uInt16 nPos = aPaperTrayBox.GetSelectEntryPos(); + sal_uInt16 nBin = (sal_uInt16)(sal_uLong)aPaperTrayBox.GetEntryData( nPos ); pOld = GetOldItem( rSet, SID_ATTR_PAGE_PAPERBIN ); if ( !pOld || ( (const SvxPaperBinItem*)pOld )->GetValue() != nBin ) { - rSet.Put( SvxPaperBinItem( nWhich, (BYTE)nBin ) ); - bModified |= TRUE; + rSet.Put( SvxPaperBinItem( nWhich, (sal_uInt8)nBin ) ); + bModified |= sal_True; } nPos = aPaperSizeBox.GetSelectEntryPos(); - Paper ePaper = (Paper)(ULONG)aPaperSizeBox.GetEntryData( nPos ); - const USHORT nOld = aPaperSizeBox.GetSavedValue(); - BOOL bChecked = aLandscapeBtn.IsChecked(); + Paper ePaper = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData( nPos ); + const sal_uInt16 nOld = aPaperSizeBox.GetSavedValue(); + sal_Bool bChecked = aLandscapeBtn.IsChecked(); if ( PAPER_USER == ePaper ) { @@ -827,7 +830,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || ( (const SvxSizeItem*)pOld )->GetSize() != aSize ) { rSet.Put( SvxSizeItem( GetWhich(SID_ATTR_PAGE_SIZE), aSize ) ); - bModified |= TRUE; + bModified |= sal_True; } } } @@ -845,7 +848,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || ( (const SvxSizeItem*)pOld )->GetSize() != aSize ) { rSet.Put( SvxSizeItem( GetWhich(SID_ATTR_PAGE_SIZE), aSize ) ); - bModified |= TRUE; + bModified |= sal_True; } } } @@ -862,7 +865,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( bChecked != aLandscapeBtn.GetSavedValue() ) { aPage.SetLandscape(bChecked); - bMod |= TRUE; + bMod |= sal_True; } // Einstellen der Numerierungsart der Seite @@ -871,7 +874,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( nPos != aNumberFormatBox.GetSavedValue() ) { aPage.SetNumType( (SvxNumType)nPos ); - bMod |= TRUE; + bMod |= sal_True; } if ( bMod ) @@ -881,7 +884,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || !( *(const SvxPageItem*)pOld == aPage ) ) { rSet.Put( aPage ); - bModified |= TRUE; + bModified |= sal_True; } } else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich ) ) @@ -900,7 +903,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) SfxBoolItem aHorz( GetWhich( SID_ATTR_PAGE_EXT1 ), aHorzBox.IsChecked() ); rSet.Put( aHorz ); - bModified |= TRUE; + bModified |= sal_True; } if ( aVertBox.IsChecked() != aVertBox.GetSavedValue() ) @@ -908,7 +911,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) SfxBoolItem aVert( GetWhich( SID_ATTR_PAGE_EXT2 ), aVertBox.IsChecked() ); rSet.Put( aVert ); - bModified |= TRUE; + bModified |= sal_True; } break; } @@ -918,7 +921,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) // immer putten, damit Draw das auswerten kann rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_PAGE_EXT1 ), aAdaptBox.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; break; } default: ;//prevent warning @@ -930,13 +933,13 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) { const SfxBoolItem& rRegItem = (const SfxBoolItem&)rOldSet.Get(SID_SWREGISTER_MODE); SfxBoolItem* pRegItem = (SfxBoolItem*)rRegItem.Clone(); - BOOL bCheck = aRegisterCB.IsChecked(); + sal_Bool bCheck = aRegisterCB.IsChecked(); pRegItem->SetValue(bCheck); rSet.Put(*pRegItem); - bModified |= TRUE; + bModified |= sal_True; if(bCheck) { - bModified |= TRUE; + bModified |= sal_True; rSet.Put(SfxStringItem(SID_SWREGISTER_COLLECTION, aRegisterLB.GetSelectEntry())); } @@ -947,7 +950,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) if( aTextFlowBox.IsVisible() && (eDirection != aTextFlowBox.GetSavedValue()) ) { rSet.Put( SvxFrameDirectionItem( eDirection, GetWhich( SID_ATTR_FRAMEDIRECTION ) ) ); - bModified = TRUE; + bModified = sal_True; } return bModified; @@ -958,7 +961,7 @@ BOOL SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) IMPL_LINK( SvxPageDescPage, LayoutHdl_Impl, ListBox *, EMPTYARG ) { // innen au\sen umschalten - const USHORT nPos = PosToPageUsage_Impl( aLayoutBox.GetSelectEntryPos() ); + const sal_uInt16 nPos = PosToPageUsage_Impl( aLayoutBox.GetSelectEntryPos() ); if ( nPos == SVX_PAGE_MIRROR ) { @@ -990,16 +993,16 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG ) // Schacht-Box initialisieren String aOldName = aPaperTrayBox.GetSelectEntry(); - aPaperTrayBox.SetUpdateMode( FALSE ); + aPaperTrayBox.SetUpdateMode( sal_False ); aPaperTrayBox.Clear(); - USHORT nEntryPos = aPaperTrayBox.InsertEntry( + sal_uInt16 nEntryPos = aPaperTrayBox.InsertEntry( EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ) ); aPaperTrayBox.SetEntryData( nEntryPos, - (void*)(ULONG)PAPERBIN_PRINTER_SETTINGS ); + (void*)(sal_uLong)PAPERBIN_PRINTER_SETTINGS ); String aPaperBin( EditResId( RID_SVXSTR_PAPERBIN ) ); - USHORT nBinCount = pImpl->mpDefPrinter->GetPaperBinCount(); + sal_uInt16 nBinCount = pImpl->mpDefPrinter->GetPaperBinCount(); - for ( USHORT i = 0; i < nBinCount; ++i ) + for ( sal_uInt16 i = 0; i < nBinCount; ++i ) { String aName = pImpl->mpDefPrinter->GetPaperBinName(i); @@ -1010,10 +1013,10 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG ) aName.Append( UniString::CreateFromInt32( i+1 ) ); } nEntryPos = aPaperTrayBox.InsertEntry( aName ); - aPaperTrayBox.SetEntryData( nEntryPos, (void*)(ULONG)i ); + aPaperTrayBox.SetEntryData( nEntryPos, (void*)(sal_uLong)i ); } aPaperTrayBox.SelectEntry( aOldName ); - aPaperTrayBox.SetUpdateMode( TRUE ); + aPaperTrayBox.SetUpdateMode( sal_True ); return 0; } @@ -1022,8 +1025,8 @@ IMPL_LINK( SvxPageDescPage, PaperBinHdl_Impl, ListBox *, EMPTYARG ) IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox ) { - const USHORT nPos = pBox->GetSelectEntryPos(); - Paper ePaper = (Paper)(ULONG)aPaperSizeBox.GetEntryData( nPos ); + const sal_uInt16 nPos = pBox->GetSelectEntryPos(); + Paper ePaper = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData( nPos ); if ( ePaper != PAPER_USER ) { @@ -1051,7 +1054,7 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox ) { // Draw: bei Papierformat soll der Rand 1cm betragen long nTmp = 0; - BOOL bScreen = ( PAPER_SCREEN == ePaper ); + sal_Bool bScreen = ( PAPER_SCREEN == ePaper ); if ( !bScreen ) // bei Bildschirm keinen Rand @@ -1096,16 +1099,16 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox ) IMPL_LINK( SvxPageDescPage, PaperSizeModify_Impl, Edit *, EMPTYARG ) { - USHORT nWhich = GetWhich( SID_ATTR_LRSPACE ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_LRSPACE ); SfxMapUnit eUnit = GetItemSet().GetPool()->GetMetric( nWhich ); Size aSize( GetCoreValue( aPaperWidthEdit, eUnit ), GetCoreValue( aPaperHeightEdit, eUnit ) ); - Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, (MapUnit)eUnit, TRUE ); - USHORT nEntryCount = aPaperSizeBox.GetEntryCount(); + Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, (MapUnit)eUnit, sal_True ); + sal_uInt16 nEntryCount = aPaperSizeBox.GetEntryCount(); - for ( USHORT i = 0; i < nEntryCount; ++i ) + for ( sal_uInt16 i = 0; i < nEntryCount; ++i ) { - Paper eTmp = (Paper)(ULONG)aPaperSizeBox.GetEntryData(i); + Paper eTmp = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData(i); if ( eTmp == ePaper ) { @@ -1221,7 +1224,7 @@ void SvxPageDescPage::SwapFirstValues_Impl( bool bSet ) IMPL_LINK_INLINE_START( SvxPageDescPage, BorderModify_Impl, MetricField *, EMPTYARG ) { if ( !bBorderModified ) - bBorderModified = TRUE; + bBorderModified = sal_True; UpdateExample_Impl(); return 0; } @@ -1254,12 +1257,12 @@ void SvxPageDescPage::UpdateExample_Impl( bool bResetbackground ) void SvxPageDescPage::ResetBackground_Impl( const SfxItemSet& rSet ) { - USHORT nWhich = GetWhich( SID_ATTR_PAGE_HEADERSET ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_PAGE_HEADERSET ); - if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) { const SvxSetItem& rSetItem = - (const SvxSetItem&)rSet.Get( nWhich, FALSE ); + (const SvxSetItem&)rSet.Get( nWhich, sal_False ); const SfxItemSet& rTmpSet = rSetItem.GetItemSet(); const SfxBoolItem& rOn = (const SfxBoolItem&)rTmpSet.Get( GetWhich( SID_ATTR_PAGE_ON ) ); @@ -1287,10 +1290,10 @@ void SvxPageDescPage::ResetBackground_Impl( const SfxItemSet& rSet ) nWhich = GetWhich( SID_ATTR_PAGE_FOOTERSET ); - if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) { const SvxSetItem& rSetItem = - (const SvxSetItem&)rSet.Get( nWhich, FALSE ); + (const SvxSetItem&)rSet.Get( nWhich, sal_False ); const SfxItemSet& rTmpSet = rSetItem.GetItemSet(); const SfxBoolItem& rOn = (const SfxBoolItem&)rTmpSet.Get( GetWhich( SID_ATTR_PAGE_ON ) ); @@ -1354,7 +1357,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) if ( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_HEADERSET ), - FALSE, (const SfxPoolItem**)&pSetItem ) ) + sal_False, (const SfxPoolItem**)&pSetItem ) ) { const SfxItemSet& rHeaderSet = pSetItem->GetItemSet(); const SfxBoolItem& rHeaderOn = @@ -1373,13 +1376,13 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) rHeaderSet.Get( GetWhich( SID_ATTR_LRSPACE ) ); aBspWin.SetHdLeft( rLR.GetLeft() ); aBspWin.SetHdRight( rLR.GetRight() ); - aBspWin.SetHeader( TRUE ); + aBspWin.SetHeader( sal_True ); } else - aBspWin.SetHeader( FALSE ); + aBspWin.SetHeader( sal_False ); // im Beispiel Hintergrund und Umrandung anzeigen - USHORT nWhich = GetWhich( SID_ATTR_BRUSH ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_BRUSH ); if ( rHeaderSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) { @@ -1401,7 +1404,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) if ( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_FOOTERSET ), - FALSE, (const SfxPoolItem**)&pSetItem ) ) + sal_False, (const SfxPoolItem**)&pSetItem ) ) { const SfxItemSet& rFooterSet = pSetItem->GetItemSet(); const SfxBoolItem& rFooterOn = @@ -1420,13 +1423,13 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet ) rFooterSet.Get( GetWhich( SID_ATTR_LRSPACE ) ); aBspWin.SetFtLeft( rLR.GetLeft() ); aBspWin.SetFtRight( rLR.GetRight() ); - aBspWin.SetFooter( TRUE ); + aBspWin.SetFooter( sal_True ); } else - aBspWin.SetFooter( FALSE ); + aBspWin.SetFooter( sal_False ); // im Beispiel Hintergrund und Umrandung anzeigen - USHORT nWhich = GetWhich( SID_ATTR_BRUSH ); + sal_uInt16 nWhich = GetWhich( SID_ATTR_BRUSH ); if ( rFooterSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE ) { @@ -1461,8 +1464,8 @@ int SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet ) // Abfrage, ob die Seitenr"ander ausserhalb des Druckbereichs liegen // Wenn nicht, dann den Anwender fragen, ob sie "ubernommen werden sollen. // Wenn nicht, dann auf der TabPage bleiben. - USHORT nPos = aPaperSizeBox.GetSelectEntryPos(); - Paper ePaper = (Paper)(ULONG)aPaperSizeBox.GetEntryData( nPos ); + sal_uInt16 nPos = aPaperSizeBox.GetSelectEntryPos(); + Paper ePaper = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData( nPos ); if ( ePaper != PAPER_SCREEN && IsMarginOutOfRange() ) { @@ -1494,7 +1497,7 @@ int SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet ) FillItemSet( *_pSet ); // ggf. hoch/quer putten - USHORT nWh = GetWhich( SID_ATTR_PAGE_SIZE ); + sal_uInt16 nWh = GetWhich( SID_ATTR_PAGE_SIZE ); SfxMapUnit eUnit = GetItemSet().GetPool()->GetMetric( nWh ); Size aSize( GetCoreValue( aPaperWidthEdit, eUnit ), GetCoreValue( aPaperHeightEdit, eUnit ) ); @@ -1642,7 +1645,7 @@ IMPL_LINK_INLINE_END( SvxPageDescPage, CenterHdl_Impl, CheckBox *, EMPTYARG ) void SvxPageDescPage::SetCollectionList(const List* pList) { sStandardRegister = *(String*)pList->GetObject(0); - for( USHORT i = 1; i < pList->Count(); i++ ) + for( sal_uInt16 i = 1; i < pList->Count(); i++ ) { aRegisterLB.InsertEntry(*(String*)pList->GetObject(i)); } @@ -1657,10 +1660,10 @@ void SvxPageDescPage::SetCollectionList(const List* pList) IMPL_LINK( SvxPageDescPage, RegisterModify, CheckBox*, pBox ) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if(pBox->IsChecked()) { - bEnable = TRUE; + bEnable = sal_True; if(USHRT_MAX == aRegisterLB.GetSelectEntryPos()) aRegisterLB.SelectEntry(sStandardRegister); } diff --git a/cui/source/tabpages/page.h b/cui/source/tabpages/page.h index eeb9ce3a6..564077a4f 100644 --- a/cui/source/tabpages/page.h +++ b/cui/source/tabpages/page.h @@ -30,6 +30,11 @@ // define ---------------------------------------------------------------- +//!! the values of the following defines must correspond to the array position +//!! of the respective paper size in the file i18npool/source/paper/paper.cxx +//!! There are enums for them in i18npool/inc/i18npool/paper.hxx but unfortunately +//!! the resource compiler does not understand enums, thus the enum values need +//!! to be duplicated here for use in the src file. #define PAPERSIZE_A0 0 #define PAPERSIZE_A1 1 #define PAPERSIZE_A2 2 @@ -67,6 +72,7 @@ #define PAPERSIZE_B4_JIS 34 #define PAPERSIZE_B5_JIS 35 #define PAPERSIZE_B6_JIS 36 +#define PAPERSIZE_A6 56 #endif diff --git a/cui/source/tabpages/page.src b/cui/source/tabpages/page.src index 35c06cce5..0de093b21 100644 --- a/cui/source/tabpages/page.src +++ b/cui/source/tabpages/page.src @@ -54,6 +54,7 @@ TabPage RID_SVXPAGE_PAGE }; ListBox LB_PAPER_SIZE { + HelpID = "cui:ListBox:RID_SVXPAGE_PAGE:LB_PAPER_SIZE"; Pos = MAP_APPFONT ( 50 , 14 ) ; Size = MAP_APPFONT ( 50 , 64 ) ; DropDown = TRUE ; @@ -68,6 +69,7 @@ TabPage RID_SVXPAGE_PAGE }; MetricField ED_PAPER_WIDTH { + HelpID = "cui:MetricField:RID_SVXPAGE_PAGE:ED_PAPER_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 50, 30 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -89,6 +91,7 @@ TabPage RID_SVXPAGE_PAGE }; MetricField ED_PAPER_HEIGHT { + HelpID = "cui:MetricField:RID_SVXPAGE_PAGE:ED_PAPER_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 50 , 46 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -109,6 +112,7 @@ TabPage RID_SVXPAGE_PAGE }; RadioButton RB_PORTRAIT { + HelpID = "cui:RadioButton:RID_SVXPAGE_PAGE:RB_PORTRAIT"; Pos = MAP_APPFONT ( 50 , 62 ) ; Size = MAP_APPFONT ( 53 , 10 ) ; Check = TRUE ; @@ -116,6 +120,7 @@ TabPage RID_SVXPAGE_PAGE }; RadioButton RB_LANDSCAPE { + HelpID = "cui:RadioButton:RID_SVXPAGE_PAGE:RB_LANDSCAPE"; Pos = MAP_APPFONT ( 50 , 74 ) ; Size = MAP_APPFONT ( 53 , 10 ) ; Text [ en-US ] = "L~andscape"; @@ -136,6 +141,7 @@ TabPage RID_SVXPAGE_PAGE }; ListBox LB_TEXT_FLOW { + HelpID = "cui:ListBox:RID_SVXPAGE_PAGE:LB_TEXT_FLOW"; Border = TRUE ; Pos = MAP_APPFONT ( 165 , 58 ) ; Size = MAP_APPFONT ( 83 , 50 ) ; @@ -152,6 +158,7 @@ TabPage RID_SVXPAGE_PAGE }; ListBox LB_PAPER_TRAY { + HelpID = "cui:ListBox:RID_SVXPAGE_PAGE:LB_PAPER_TRAY"; Pos = MAP_APPFONT ( 165 , 72 ) ; Size = MAP_APPFONT ( 83 , 50 ) ; DropDown = TRUE ; @@ -172,6 +179,7 @@ TabPage RID_SVXPAGE_PAGE }; MetricField ED_LEFT_MARGIN { + HelpID = "cui:MetricField:RID_SVXPAGE_PAGE:ED_LEFT_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 55 , 101 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -193,6 +201,7 @@ TabPage RID_SVXPAGE_PAGE }; MetricField ED_RIGHT_MARGIN { + HelpID = "cui:MetricField:RID_SVXPAGE_PAGE:ED_RIGHT_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 55 , 117 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -214,6 +223,7 @@ TabPage RID_SVXPAGE_PAGE }; MetricField ED_TOP_MARGIN { + HelpID = "cui:MetricField:RID_SVXPAGE_PAGE:ED_TOP_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 55 , 133 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -235,6 +245,7 @@ TabPage RID_SVXPAGE_PAGE }; MetricField ED_BOTTOM_MARGIN { + HelpID = "cui:MetricField:RID_SVXPAGE_PAGE:ED_BOTTOM_MARGIN"; Border = TRUE ; Pos = MAP_APPFONT ( 55 , 149 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -267,6 +278,7 @@ TabPage RID_SVXPAGE_PAGE }; ListBox LB_LAYOUT { + HelpID = "cui:ListBox:RID_SVXPAGE_PAGE:LB_LAYOUT"; Border = TRUE ; Pos = MAP_APPFONT ( 170, 101 ) ; Size = MAP_APPFONT ( 78 , 44 ) ; @@ -287,6 +299,7 @@ TabPage RID_SVXPAGE_PAGE }; ListBox LB_NUMBER_FORMAT { + HelpID = "cui:ListBox:RID_SVXPAGE_PAGE:LB_NUMBER_FORMAT"; Border = TRUE ; Pos = MAP_APPFONT ( 170 , 117 ) ; Size = MAP_APPFONT ( 78 , 64 ) ; @@ -310,6 +323,7 @@ TabPage RID_SVXPAGE_PAGE }; CheckBox CB_HORZ { + HelpID = "cui:CheckBox:RID_SVXPAGE_PAGE:CB_HORZ"; Hide = TRUE ; Pos = MAP_APPFONT ( 175 , 133 ) ; Size = MAP_APPFONT ( 73 , 10 ) ; @@ -317,6 +331,7 @@ TabPage RID_SVXPAGE_PAGE }; CheckBox CB_VERT { + HelpID = "cui:CheckBox:RID_SVXPAGE_PAGE:CB_VERT"; Hide = TRUE ; Pos = MAP_APPFONT ( 175 , 147 ) ; Size = MAP_APPFONT ( 73 , 10 ) ; @@ -324,6 +339,7 @@ TabPage RID_SVXPAGE_PAGE }; CheckBox CB_ADAPT { + HelpID = "cui:CheckBox:RID_SVXPAGE_PAGE:CB_ADAPT"; Hide = TRUE ; Pos = MAP_APPFONT ( 113 , 133 ) ; Size = MAP_APPFONT ( 135 , 10 ) ; @@ -332,6 +348,7 @@ TabPage RID_SVXPAGE_PAGE /* Registerhaltigkeit (fuer SW) */ CheckBox CB_REGISTER { + HelpID = "cui:CheckBox:RID_SVXPAGE_PAGE:CB_REGISTER"; Pos = MAP_APPFONT ( 113 , 133 ) ; Size = MAP_APPFONT ( 135 , 10 ) ; Hide = TRUE ; @@ -346,6 +363,7 @@ TabPage RID_SVXPAGE_PAGE }; ListBox LB_REGISTER { + HelpID = "cui:ListBox:RID_SVXPAGE_PAGE:LB_REGISTER"; Pos = MAP_APPFONT ( 122 , 157 ) ; Size = MAP_APPFONT ( 126 , 50 ) ; DropDown = TRUE ; @@ -371,6 +389,7 @@ StringArray RID_SVXSTRARY_PAPERSIZE_STD { ItemList [ en-US ] = { + < "A6" ; PAPERSIZE_A6 ; > ; < "A5" ; PAPERSIZE_A5 ; > ; < "A4" ; PAPERSIZE_A4 ; > ; < "A3" ; PAPERSIZE_A3 ; > ; @@ -405,6 +424,7 @@ StringArray RID_SVXSTRARY_PAPERSIZE_DRAW { ItemList [ en-US ] = { + < "A6" ; PAPERSIZE_A6 ; > ; < "A5" ; PAPERSIZE_A5 ; > ; < "A4" ; PAPERSIZE_A4 ; > ; < "A3" ; PAPERSIZE_A3 ; > ; diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 76c206cf5..25b7f27c3 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -64,7 +64,7 @@ // static ---------------------------------------------------------------- -static USHORT pStdRanges[] = +static sal_uInt16 pStdRanges[] = { SID_ATTR_PARA_LINESPACE, // 10033 SID_ATTR_PARA_LINESPACE, @@ -75,14 +75,14 @@ static USHORT pStdRanges[] = 0 }; -static USHORT pAlignRanges[] = +static sal_uInt16 pAlignRanges[] = { SID_ATTR_PARA_ADJUST, // 10027 SID_ATTR_PARA_ADJUST, 0 }; -static USHORT pExtRanges[] = +static sal_uInt16 pExtRanges[] = { SID_ATTR_PARA_PAGEBREAK, // 10037 - SID_ATTR_PARA_WIDOWS, // 10041 @@ -137,21 +137,21 @@ void SetLineSpace_Impl( SvxLineSpacingItem& rLineSpace, case LLINESPACE_PROP: rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO; - rLineSpace.SetPropLineSpace( (BYTE)lValue ); + rLineSpace.SetPropLineSpace( (sal_uInt8)lValue ); break; case LLINESPACE_MIN: - rLineSpace.SetLineHeight( (USHORT)lValue ); + rLineSpace.SetLineHeight( (sal_uInt16)lValue ); rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF; break; case LLINESPACE_DURCH: rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO; - rLineSpace.SetInterLineSpace( (USHORT)lValue ); + rLineSpace.SetInterLineSpace( (sal_uInt16)lValue ); break; case LLINESPACE_FIX: - rLineSpace.SetLineHeight((USHORT)lValue); + rLineSpace.SetLineHeight((sal_uInt16)lValue); rLineSpace.GetLineSpaceRule() = SVX_LINE_SPACE_FIX; rLineSpace.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF; break; @@ -159,12 +159,12 @@ void SetLineSpace_Impl( SvxLineSpacingItem& rLineSpace, } -USHORT GetHtmlMode_Impl(const SfxItemSet& rSet) +sal_uInt16 GetHtmlMode_Impl(const SfxItemSet& rSet) { - USHORT nHtmlMode = 0; + sal_uInt16 nHtmlMode = 0; const SfxPoolItem* pItem = 0; SfxObjectShell* pShell; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) || + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) { @@ -225,16 +225,16 @@ SfxTabPage* SvxStdParagraphTabPage::Create( Window* pParent, // ----------------------------------------------------------------------- -BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) +sal_Bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) { SfxItemState eState = SFX_ITEM_UNKNOWN; const SfxPoolItem* pOld = 0; SfxItemPool* pPool = rOutSet.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); - BOOL bModified = FALSE; - USHORT nWhich; - USHORT nPos = aLineDist.GetSelectEntryPos(); + sal_Bool bModified = sal_False; + sal_uInt16 nWhich; + sal_uInt16 nPos = aLineDist.GetSelectEntryPos(); if ( LISTBOX_ENTRY_NOTFOUND != nPos && ( nPos != aLineDist.GetSavedValue() || @@ -278,7 +278,7 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) SFX_ITEM_DONTCARE == eState ) { rOutSet.Put( aSpacing ); - bModified = TRUE; + bModified = sal_True; } } @@ -298,21 +298,21 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( aTopDist.IsRelative() ) aMargin.SetUpper( rOldItem.GetUpper(), - (USHORT)aTopDist.GetValue() ); + (sal_uInt16)aTopDist.GetValue() ); else - aMargin.SetUpper( (USHORT)GetCoreValue( aTopDist, eUnit ) ); + aMargin.SetUpper( (sal_uInt16)GetCoreValue( aTopDist, eUnit ) ); if ( aBottomDist.IsRelative() ) aMargin.SetLower( rOldItem.GetLower(), - (USHORT)aBottomDist.GetValue() ); + (sal_uInt16)aBottomDist.GetValue() ); else - aMargin.SetLower( (USHORT)GetCoreValue( aBottomDist, eUnit ) ); + aMargin.SetLower( (sal_uInt16)GetCoreValue( aBottomDist, eUnit ) ); } else { - aMargin.SetUpper( (USHORT)GetCoreValue( aTopDist, eUnit ) ); - aMargin.SetLower( (USHORT)GetCoreValue( aBottomDist, eUnit ) ); + aMargin.SetUpper( (sal_uInt16)GetCoreValue( aTopDist, eUnit ) ); + aMargin.SetLower( (sal_uInt16)GetCoreValue( aBottomDist, eUnit ) ); } eState = GetItemSet().GetItemState( nWhich ); @@ -320,7 +320,7 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) SFX_ITEM_DONTCARE == eState ) { rOutSet.Put( aMargin ); - bModified = TRUE; + bModified = sal_True; } } bool bNullTab = false; @@ -344,29 +344,29 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( aLeftIndent.IsRelative() ) aMargin.SetTxtLeft( rOldItem.GetTxtLeft(), - (USHORT)aLeftIndent.GetValue() ); + (sal_uInt16)aLeftIndent.GetValue() ); else aMargin.SetTxtLeft( GetCoreValue( aLeftIndent, eUnit ) ); if ( aRightIndent.IsRelative() ) aMargin.SetRight( rOldItem.GetRight(), - (USHORT)aRightIndent.GetValue() ); + (sal_uInt16)aRightIndent.GetValue() ); else aMargin.SetRight( GetCoreValue( aRightIndent, eUnit ) ); if ( aFLineIndent.IsRelative() ) aMargin.SetTxtFirstLineOfst( rOldItem.GetTxtFirstLineOfst(), - (USHORT)aFLineIndent.GetValue() ); + (sal_uInt16)aFLineIndent.GetValue() ); else aMargin.SetTxtFirstLineOfst( - (USHORT)GetCoreValue( aFLineIndent, eUnit ) ); + (sal_uInt16)GetCoreValue( aFLineIndent, eUnit ) ); } else { aMargin.SetTxtLeft( GetCoreValue( aLeftIndent, eUnit ) ); aMargin.SetRight( GetCoreValue( aRightIndent, eUnit ) ); aMargin.SetTxtFirstLineOfst( - (USHORT)GetCoreValue( aFLineIndent, eUnit ) ); + (sal_uInt16)GetCoreValue( aFLineIndent, eUnit ) ); } aMargin.SetAutoFirst(aAutoCB.IsChecked()); if ( aMargin.GetTxtFirstLineOfst() < 0 ) @@ -377,7 +377,7 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) SFX_ITEM_DONTCARE == eState ) { rOutSet.Put( aMargin ); - bModified = TRUE; + bModified = sal_True; } } @@ -388,7 +388,7 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) { // negativer Erstzeileneinzug -> ggf. Null Default-Tabstop setzen - USHORT _nWhich = GetWhich( SID_ATTR_TABSTOP ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_TABSTOP ); const SfxItemSet& rInSet = GetItemSet(); if ( rInSet.GetItemState( _nWhich ) >= SFX_ITEM_AVAILABLE ) @@ -407,16 +407,16 @@ BOOL SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) const SfxBoolItem* pBoolItem = (SfxBoolItem*)GetOldItem( rOutSet, SID_ATTR_PARA_REGISTER); SfxBoolItem* pRegItem = (SfxBoolItem*)pBoolItem->Clone(); - USHORT _nWhich = GetWhich( SID_ATTR_PARA_REGISTER ); - BOOL bSet = pRegItem->GetValue(); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_REGISTER ); + sal_Bool bSet = pRegItem->GetValue(); if(aRegisterCB.IsChecked() != bSet ) { pRegItem->SetValue(!bSet); rOutSet.Put(*pRegItem); - bModified = TRUE; + bModified = sal_True; } - else if ( SFX_ITEM_DEFAULT == GetItemSet().GetItemState( _nWhich, FALSE ) ) + else if ( SFX_ITEM_DEFAULT == GetItemSet().GetItemState( _nWhich, sal_False ) ) rOutSet.ClearItem(_nWhich); delete pRegItem; } @@ -435,7 +435,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) // Metrik einstellen FieldUnit eFUnit = GetModuleFieldUnit( rSet ); - BOOL bApplyCharUnit = GetApplyCharUnit( rSet ); + sal_Bool bApplyCharUnit = GetApplyCharUnit( rSet ); SvtCJKOptions aCJKOptions; if(aCJKOptions.IsAsianTypographyEnabled() && bApplyCharUnit ) @@ -457,7 +457,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) SetFieldUnit( aLineDistAtMetricBox, eFUnit ); } - USHORT _nWhich = GetWhich( SID_ATTR_LRSPACE ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_LRSPACE ); SfxItemState eItemState = rSet.GetItemState( _nWhich ); if ( eItemState >= SFX_ITEM_AVAILABLE ) @@ -471,7 +471,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropLeft() != 100 ) { - aLeftIndent.SetRelative( TRUE ); + aLeftIndent.SetRelative( sal_True ); aLeftIndent.SetValue( rOldItem.GetPropLeft() ); } else @@ -483,7 +483,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropRight() != 100 ) { - aRightIndent.SetRelative( TRUE ); + aRightIndent.SetRelative( sal_True ); aRightIndent.SetValue( rOldItem.GetPropRight() ); } else @@ -495,7 +495,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropTxtFirstLineOfst() != 100 ) { - aFLineIndent.SetRelative( TRUE ); + aFLineIndent.SetRelative( sal_True ); aFLineIndent.SetValue( rOldItem.GetPropTxtFirstLineOfst() ); } else @@ -541,7 +541,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropUpper() != 100 ) { - aTopDist.SetRelative( TRUE ); + aTopDist.SetRelative( sal_True ); aTopDist.SetValue( rOldItem.GetPropUpper() ); } else @@ -556,7 +556,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rOldItem.GetPropLower() != 100 ) { - aBottomDist.SetRelative( TRUE ); + aBottomDist.SetRelative( sal_True ); aBottomDist.SetValue( rOldItem.GetPropLower() ); } else @@ -598,7 +598,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( eItemState >= SFX_ITEM_AVAILABLE ) aRegisterCB.Check( ((const SfxBoolItem &)rSet.Get( _nWhich )).GetValue()); aRegisterCB.SaveValue(); - USHORT nHtmlMode = GetHtmlMode_Impl(rSet); + sal_uInt16 nHtmlMode = GetHtmlMode_Impl(rSet); if(nHtmlMode & HTMLMODE_ON) { aRegisterCB.Hide(); @@ -634,7 +634,7 @@ void SvxStdParagraphTabPage::EnableRelativeMode() aRightIndent.EnableRelativeMode( 0, 999 ); aTopDist.EnableRelativeMode( 0, 999 ); aBottomDist.EnableRelativeMode( 0, 999 ); - bRelativeMode = TRUE; + bRelativeMode = sal_True; } // ----------------------------------------------------------------------- @@ -655,6 +655,7 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage( Window* pParent, SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_STD_PARAGRAPH ), rAttr ), + aIndentFrm ( this, CUI_RES( FL_INDENT ) ), aLeftLabel ( this, CUI_RES( FT_LEFTINDENT ) ), aLeftIndent ( this, CUI_RES( ED_LEFTINDENT ) ), aRightLabel ( this, CUI_RES( FT_RIGHTINDENT ) ), @@ -663,28 +664,28 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage( Window* pParent, aFLineLabel ( this, CUI_RES( FT_FLINEINDENT ) ), aFLineIndent ( this, CUI_RES( ED_FLINEINDENT ) ), aAutoCB ( this, CUI_RES( CB_AUTO ) ), - aIndentFrm ( this, CUI_RES( FL_INDENT ) ), + aDistFrm ( this, CUI_RES( FL_DIST ) ), aTopLabel ( this, CUI_RES( FT_TOPDIST ) ), aTopDist ( this, CUI_RES( ED_TOPDIST ) ), aBottomLabel ( this, CUI_RES( FT_BOTTOMDIST ) ), aBottomDist ( this, CUI_RES( ED_BOTTOMDIST ) ), - aDistFrm ( this, CUI_RES( FL_DIST ) ), + + aLineDistFrm ( this, CUI_RES( FL_LINEDIST ) ), aLineDist ( this, CUI_RES( LB_LINEDIST ) ), aLineDistAtLabel ( this, CUI_RES( FT_LINEDIST ) ), aLineDistAtPercentBox ( this, CUI_RES( ED_LINEDISTPERCENT ) ), aLineDistAtMetricBox ( this, CUI_RES( ED_LINEDISTMETRIC ) ), - aLineDistFrm ( this, CUI_RES( FL_LINEDIST ) ), sAbsDist ( CUI_RES(ST_LINEDIST_ABS) ), aExampleWin ( this, CUI_RES( WN_EXAMPLE ) ), - aRegisterCB ( this, CUI_RES( CB_REGISTER ) ), aRegisterFL ( this, CUI_RES( FL_REGISTER ) ), + aRegisterCB ( this, CUI_RES( CB_REGISTER ) ), pActLineDistFld ( &aLineDistAtPercentBox ), nAbst ( MAX_DURCH ), nWidth ( 11905 /*567 * 50*/ ), nMinFixDist(0L), - bRelativeMode ( FALSE ), - bNegativeIndents(FALSE) + bRelativeMode ( sal_False ), + bNegativeIndents(sal_False) { // diese Page braucht ExchangeSupport @@ -694,6 +695,9 @@ SvxStdParagraphTabPage::SvxStdParagraphTabPage( Window* pParent, FreeResource(); Init_Impl(); aFLineIndent.SetMin(-9999); // wird default auf 0 gesetzt + + aExampleWin.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + } @@ -705,12 +709,12 @@ void SvxStdParagraphTabPage::EnableNegativeMode() aRightIndent.SetMin(-9999); aRightIndent.EnableNegativeMode(); aLeftIndent.EnableNegativeMode(); - bNegativeIndents = TRUE; + bNegativeIndents = sal_True; } // ----------------------------------------------------------------------- -USHORT* SvxStdParagraphTabPage::GetRanges() +sal_uInt16* SvxStdParagraphTabPage::GetRanges() { return pStdRanges; } @@ -795,8 +799,8 @@ IMPL_LINK( SvxStdParagraphTabPage, LineDistHdl_Impl, ListBox *, pBox ) case LLINESPACE_1: case LLINESPACE_15: case LLINESPACE_2: - aLineDistAtLabel.Enable(FALSE); - pActLineDistFld->Enable(FALSE); + aLineDistAtLabel.Enable(sal_False); + pActLineDistFld->Enable(sal_False); pActLineDistFld->SetText( String() ); break; @@ -862,7 +866,7 @@ IMPL_LINK( SvxStdParagraphTabPage, LineDistHdl_Impl, ListBox *, pBox ) } break; } - UpdateExample_Impl( TRUE ); + UpdateExample_Impl( sal_True ); return 0; } @@ -908,7 +912,7 @@ void SvxStdParagraphTabPage::Init_Impl() // ----------------------------------------------------------------------- -void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll ) +void SvxStdParagraphTabPage::UpdateExample_Impl( sal_Bool bAll ) { aExampleWin.SetFirstLineOfst( (short)aFLineIndent.Denormalize( aFLineIndent.GetValue( FUNIT_TWIP ) ) ); @@ -917,13 +921,13 @@ void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll ) aExampleWin.SetRightMargin( static_cast<long>(aRightIndent.Denormalize( aRightIndent.GetValue( FUNIT_TWIP ) ) ) ); aExampleWin.SetUpper( - (USHORT)aTopDist.Denormalize( aTopDist.GetValue( FUNIT_TWIP ) ) ); + (sal_uInt16)aTopDist.Denormalize( aTopDist.GetValue( FUNIT_TWIP ) ) ); aExampleWin.SetLower( - (USHORT)aBottomDist.Denormalize( aBottomDist.GetValue( FUNIT_TWIP ) ) ); + (sal_uInt16)aBottomDist.Denormalize( aBottomDist.GetValue( FUNIT_TWIP ) ) ); - USHORT nPos = aLineDist.GetSelectEntryPos(); + sal_uInt16 nPos = aLineDist.GetSelectEntryPos(); switch ( nPos ) { @@ -935,7 +939,7 @@ void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll ) case LLINESPACE_PROP: aExampleWin.SetLineSpace( (SvxPrevLineSpace)nPos, - (USHORT)aLineDistAtPercentBox.Denormalize( + (sal_uInt16)aLineDistAtPercentBox.Denormalize( aLineDistAtPercentBox.GetValue() ) ); break; @@ -943,7 +947,7 @@ void SvxStdParagraphTabPage::UpdateExample_Impl( BOOL bAll ) case LLINESPACE_DURCH: case LLINESPACE_FIX: aExampleWin.SetLineSpace( (SvxPrevLineSpace)nPos, - (USHORT)GetCoreValue( aLineDistAtMetricBox, SFX_MAPUNIT_TWIP ) ); + (sal_uInt16)GetCoreValue( aLineDistAtMetricBox, SFX_MAPUNIT_TWIP ) ); break; } aExampleWin.Draw( bAll ); @@ -959,22 +963,17 @@ void SvxStdParagraphTabPage::EnableRegisterMode() IMPL_LINK( SvxStdParagraphTabPage, AutoHdl_Impl, CheckBox*, pBox ) { - BOOL bEnable = !pBox->IsChecked(); + sal_Bool bEnable = !pBox->IsChecked(); aFLineLabel .Enable(bEnable); aFLineIndent.Enable(bEnable); return 0; } -void SvxStdParagraphTabPage::SetPageWidth( USHORT nPageWidth ) +void SvxStdParagraphTabPage::SetPageWidth( sal_uInt16 nPageWidth ) { nWidth = nPageWidth; } -void SvxStdParagraphTabPage::SetMaxDistance( USHORT nMaxDist ) -{ - nAbst = nMaxDist; -} - void SvxStdParagraphTabPage::EnableAutoFirstLine() { @@ -1057,7 +1056,7 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( Window* pParent, const SfxItemSet& rSe aTextDirectionLB ( this, CUI_RES( LB_TEXTDIRECTION )) { SvtLanguageOptions aLangOptions; - USHORT nLastLinePos = LASTLINEPOS_DEFAULT; + sal_uInt16 nLastLinePos = LASTLINEPOS_DEFAULT; if ( aLangOptions.IsAsianTypographyEnabled() ) { @@ -1087,7 +1086,7 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( Window* pParent, const SfxItemSet& rSe aLastLineLB.SetSelectHdl( LINK( this, SvxParaAlignTabPage, LastLineHdl_Impl ) ); aTextDirectionLB.SetSelectHdl( LINK( this, SvxParaAlignTabPage, TextDirectionHdl_Impl ) ); - USHORT nHtmlMode = GetHtmlMode_Impl(rSet); + sal_uInt16 nHtmlMode = GetHtmlMode_Impl(rSet); if(!(nHtmlMode & HTMLMODE_ON) || (0 != (nHtmlMode & HTMLMODE_SOME_STYLES)) ) { if( aLangOptions.IsCTLFontEnabled() ) @@ -1101,6 +1100,9 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( Window* pParent, const SfxItemSet& rSe aTextDirectionLB.Show(); } } + + aExampleWin.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + } SvxParaAlignTabPage::~SvxParaAlignTabPage() @@ -1119,15 +1121,15 @@ SfxTabPage* SvxParaAlignTabPage::Create( Window* pParent, const SfxItemSet& rSet return new SvxParaAlignTabPage(pParent, rSet); } -USHORT* SvxParaAlignTabPage::GetRanges() +sal_uInt16* SvxParaAlignTabPage::GetRanges() { return pAlignRanges; } -BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) +sal_Bool SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; bool bAdj = false, bChecked = false; SvxAdjust eAdjust = SVX_ADJUST_LEFT; @@ -1158,7 +1160,7 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) aLastLineLB.GetSelectEntryPos() != aLastLineLB.GetSavedValue(); bChecked = true; } - USHORT _nWhich = GetWhich( SID_ATTR_PARA_ADJUST ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_ADJUST ); if ( bAdj ) { @@ -1166,7 +1168,7 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) (const SvxAdjustItem*)GetOldItem( rOutSet, SID_ATTR_PARA_ADJUST ); SvxAdjust eOneWord = aExpandCB.IsChecked() ? SVX_ADJUST_BLOCK : SVX_ADJUST_LEFT; - USHORT nLBPos = aLastLineLB.GetSelectEntryPos(); + sal_uInt16 nLBPos = aLastLineLB.GetSelectEntryPos(); SvxAdjust eLastBlock = SVX_ADJUST_LEFT; if ( 1 == nLBPos ) @@ -1195,12 +1197,12 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) if(aSnapToGridCB.IsChecked() != aSnapToGridCB.GetSavedValue()) { rOutSet.Put(SvxParaGridItem(aSnapToGridCB.IsChecked(), GetWhich( SID_ATTR_PARA_SNAPTOGRID ))); - bModified = TRUE; + bModified = sal_True; } if(aVertAlignLB.GetSavedValue() != aVertAlignLB.GetSelectEntryPos()) { rOutSet.Put(SvxParaVertAlignItem(aVertAlignLB.GetSelectEntryPos(), GetWhich( SID_PARA_VERTALIGN ))); - bModified = TRUE; + bModified = sal_True; } if( aTextDirectionLB.IsVisible() ) @@ -1209,7 +1211,7 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) if( eDir != aTextDirectionLB.GetSavedValue() ) { rOutSet.Put( SvxFrameDirectionItem( eDir, GetWhich( SID_ATTR_FRAMEDIRECTION ) ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -1218,10 +1220,10 @@ BOOL SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet ) void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) { - USHORT _nWhich = GetWhich( SID_ATTR_PARA_ADJUST ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_ADJUST ); SfxItemState eItemState = rSet.GetItemState( _nWhich ); - USHORT nLBSelect = 0; + sal_uInt16 nLBSelect = 0; if ( eItemState >= SFX_ITEM_AVAILABLE ) { const SvxAdjustItem& rAdj = (const SvxAdjustItem&)rSet.Get( _nWhich ); @@ -1237,7 +1239,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) case SVX_ADJUST_BLOCK: aJustify.Check(); break; default: ; //prevent warning } - BOOL bEnable = aJustify.IsChecked(); + sal_Bool bEnable = aJustify.IsChecked(); aLastLineFT.Enable(bEnable); aLastLineLB.Enable(bEnable); aExpandCB .Enable(bEnable); @@ -1255,14 +1257,14 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) } else { - aLeft.Check( FALSE ); - aRight.Check( FALSE ); - aCenter.Check( FALSE ); - aJustify.Check( FALSE ); + aLeft.Check( sal_False ); + aRight.Check( sal_False ); + aCenter.Check( sal_False ); + aJustify.Check( sal_False ); } aLastLineLB.SelectEntryPos(nLBSelect); - USHORT nHtmlMode = GetHtmlMode_Impl(rSet); + sal_uInt16 nHtmlMode = GetHtmlMode_Impl(rSet); if(nHtmlMode & HTMLMODE_ON) { aLastLineLB.Hide(); @@ -1270,7 +1272,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) aExpandCB.Hide(); if(!(nHtmlMode & (HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE)) ) aJustify.Disable(); - aSnapToGridCB.Show(FALSE); + aSnapToGridCB.Show(sal_False); } _nWhich = GetWhich(SID_ATTR_PARA_SNAPTOGRID); eItemState = rSet.GetItemState( _nWhich ); @@ -1311,22 +1313,22 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) aLastLineLB.SaveValue(); aExpandCB.SaveValue(); - UpdateExample_Impl(TRUE); + UpdateExample_Impl(sal_True); } IMPL_LINK( SvxParaAlignTabPage, AlignHdl_Impl, RadioButton*, EMPTYARG ) { - BOOL bJustify = aJustify.IsChecked(); + sal_Bool bJustify = aJustify.IsChecked(); aLastLineFT.Enable(bJustify); aLastLineLB.Enable(bJustify); aExpandCB.Enable(bJustify); - UpdateExample_Impl(FALSE); + UpdateExample_Impl(sal_False); return 0; } IMPL_LINK( SvxParaAlignTabPage, LastLineHdl_Impl, ListBox*, EMPTYARG ) { - UpdateExample_Impl(FALSE); + UpdateExample_Impl(sal_False); return 0; } @@ -1336,8 +1338,8 @@ IMPL_LINK( SvxParaAlignTabPage, TextDirectionHdl_Impl, ListBox*, EMPTYARG ) switch ( eDir ) { // check the default alignment for this text direction - case FRMDIR_HORI_LEFT_TOP : aLeft.Check( TRUE ); break; - case FRMDIR_HORI_RIGHT_TOP : aRight.Check( TRUE ); break; + case FRMDIR_HORI_LEFT_TOP : aLeft.Check( sal_True ); break; + case FRMDIR_HORI_RIGHT_TOP : aRight.Check( sal_True ); break; case FRMDIR_ENVIRONMENT : /* do nothing */ break; default: { @@ -1348,7 +1350,7 @@ IMPL_LINK( SvxParaAlignTabPage, TextDirectionHdl_Impl, ListBox*, EMPTYARG ) return 0; } -void SvxParaAlignTabPage::UpdateExample_Impl( BOOL bAll ) +void SvxParaAlignTabPage::UpdateExample_Impl( sal_Bool bAll ) { if ( aLeft.IsChecked() ) aExampleWin.SetAdjust( SVX_ADJUST_LEFT ); @@ -1360,7 +1362,7 @@ void SvxParaAlignTabPage::UpdateExample_Impl( BOOL bAll ) { aExampleWin.SetAdjust( SVX_ADJUST_BLOCK ); SvxAdjust eLastBlock = SVX_ADJUST_LEFT; - USHORT nLBPos = aLastLineLB.GetSelectEntryPos(); + sal_uInt16 nLBPos = aLastLineLB.GetSelectEntryPos(); if(nLBPos == 1) eLastBlock = SVX_ADJUST_CENTER; else if(nLBPos == 2) @@ -1399,10 +1401,10 @@ SfxTabPage* SvxExtParagraphTabPage::Create( Window* pParent, // ----------------------------------------------------------------------- -BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) +sal_Bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) { - BOOL bModified = FALSE; - USHORT _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); + sal_Bool bModified = sal_False; + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); const TriState eHyphenState = aHyphenBox.GetState(); const SfxPoolItem* pOld = GetOldItem( rOutSet, SID_ATTR_PARA_HYPHENZONE ); @@ -1417,31 +1419,31 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( eHyphenState == STATE_CHECK ) { - aHyphen.GetMinLead() = (BYTE)aExtHyphenBeforeBox.GetValue(); - aHyphen.GetMinTrail() = (BYTE)aExtHyphenAfterBox.GetValue(); + aHyphen.GetMinLead() = (sal_uInt8)aExtHyphenBeforeBox.GetValue(); + aHyphen.GetMinTrail() = (sal_uInt8)aExtHyphenAfterBox.GetValue(); } - aHyphen.GetMaxHyphens() = (BYTE)aMaxHyphenEdit.GetValue(); + aHyphen.GetMaxHyphens() = (sal_uInt8)aMaxHyphenEdit.GetValue(); if ( !pOld || !( *(SvxHyphenZoneItem*)pOld == aHyphen ) || eHyphenState != aHyphenBox.GetSavedValue()) { rOutSet.Put( aHyphen ); - bModified = TRUE; + bModified = sal_True; } } if (aPagenumEdit.IsEnabled() && aPagenumEdit.IsValueModified()) { SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM, - (USHORT)aPagenumEdit.GetValue() ); + (sal_uInt16)aPagenumEdit.GetValue() ); pOld = GetOldItem( rOutSet, SID_ATTR_PARA_PAGENUM ); if ( !pOld || ( (const SfxUInt16Item*)pOld )->GetValue() != aPageNum.GetValue() ) { rOutSet.Put( aPageNum ); - bModified = TRUE; + bModified = sal_True; } } @@ -1465,8 +1467,8 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( !pOld || ( (const SvxPageModelItem*)pOld )->GetValue() != sPage ) { - rOutSet.Put( SvxPageModelItem( sPage, FALSE, _nWhich ) ); - bModified = TRUE; + rOutSet.Put( SvxPageModelItem( sPage, sal_False, _nWhich ) ); + bModified = sal_True; } else bIsPageModel = false; @@ -1474,7 +1476,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) else if(STATE_CHECK == eState && aApplyCollBtn.IsEnabled()) bIsPageModel = true; else - rOutSet.Put( SvxPageModelItem( sPage, FALSE, _nWhich ) ); + rOutSet.Put( SvxPageModelItem( sPage, sal_False, _nWhich ) ); _nWhich = GetWhich( SID_ATTR_PARA_PAGEBREAK ); @@ -1484,7 +1486,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) else { eState = aPageBreakBox.GetState(); - SfxItemState eModelState = GetItemSet().GetItemState(SID_ATTR_PARA_MODEL, FALSE); + SfxItemState eModelState = GetItemSet().GetItemState(SID_ATTR_PARA_MODEL, sal_False); if ( (eModelState == SFX_ITEM_SET && STATE_CHECK == aPageBreakBox.GetState()) || eState != aPageBreakBox.GetSavedValue() || @@ -1499,7 +1501,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) { case STATE_CHECK: { - BOOL bBefore = aBreakPositionLB.GetSelectEntryPos() == 0; + sal_Bool bBefore = aBreakPositionLB.GetSelectEntryPos() == 0; if ( aBreakTypeLB.GetSelectEntryPos() == 0 ) { @@ -1528,7 +1530,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) if ( eState != aPageBreakBox.GetSavedValue() || !pOld || !( *(const SvxFmtBreakItem*)pOld == aBreak ) ) { - bModified = TRUE; + bModified = sal_True; rOutSet.Put( aBreak ); } } @@ -1547,7 +1549,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) ( eState == STATE_NOCHECK ) ) { rOutSet.Put( SvxFmtSplitItem( eState == STATE_NOCHECK, _nWhich ) ); - bModified = TRUE; + bModified = sal_True; } } @@ -1561,7 +1563,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) // hat sich der Status geaendert, muss immer geputtet werden rOutSet.Put( SvxFmtKeepItem( eState == STATE_CHECK, _nWhich ) ); - bModified = TRUE; + bModified = sal_True; } // Witwen und Waisen @@ -1572,13 +1574,13 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) aWidowRowNo.IsValueModified() ) { SvxWidowsItem rItem( eState == STATE_CHECK ? - (BYTE)aWidowRowNo.GetValue() : 0, _nWhich ); + (sal_uInt8)aWidowRowNo.GetValue() : 0, _nWhich ); pOld = GetOldItem( rOutSet, SID_ATTR_PARA_WIDOWS ); if ( eState != aWidowBox.GetSavedValue() || !pOld || !( *(const SvxWidowsItem*)pOld == rItem ) ) { rOutSet.Put( rItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -1589,7 +1591,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) aOrphanRowNo.IsValueModified() ) { SvxOrphansItem rItem( eState == STATE_CHECK ? - (BYTE)aOrphanRowNo.GetValue() : 0, _nWhich ); + (sal_uInt8)aOrphanRowNo.GetValue() : 0, _nWhich ); pOld = GetOldItem( rOutSet, SID_ATTR_PARA_ORPHANS ); if ( eState != aOrphanBox.GetSavedValue() || @@ -1597,7 +1599,7 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) !( *(const SvxOrphansItem*)pOld == rItem ) ) { rOutSet.Put( rItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -1608,16 +1610,16 @@ BOOL SvxExtParagraphTabPage::FillItemSet( SfxItemSet& rOutSet ) void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { - USHORT _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); + sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_HYPHENZONE ); SfxItemState eItemState = rSet.GetItemState( _nWhich ); - BOOL bItemAvailable = eItemState >= SFX_ITEM_AVAILABLE; - BOOL bIsHyphen = FALSE; + sal_Bool bItemAvailable = eItemState >= SFX_ITEM_AVAILABLE; + sal_Bool bIsHyphen = sal_False; if( !bHtmlMode && bItemAvailable ) { const SvxHyphenZoneItem& rHyphen = (const SvxHyphenZoneItem&)rSet.Get( _nWhich ); - aHyphenBox.EnableTriState( FALSE ); + aHyphenBox.EnableTriState( sal_False ); bIsHyphen = rHyphen.IsHyphen(); aHyphenBox.SetState( bIsHyphen ? STATE_CHECK : STATE_NOCHECK ); @@ -1630,7 +1632,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { aHyphenBox.SetState( STATE_DONTKNOW ); } - BOOL bEnable = bItemAvailable && bIsHyphen; + sal_Bool bEnable = bItemAvailable && bIsHyphen; aExtHyphenBeforeBox.Enable(bEnable); aExtHyphenAfterBox.Enable(bEnable); aBeforeText.Enable(bEnable); @@ -1642,7 +1644,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( rSet.GetItemState(_nWhich) >= SFX_ITEM_AVAILABLE ) { - const USHORT nPageNum = + const sal_uInt16 nPageNum = ( (const SfxUInt16Item&)rSet.Get( _nWhich ) ).GetValue(); aPagenumEdit.SetValue( nPageNum ); } @@ -1651,12 +1653,12 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { // zuerst PageModel behandeln _nWhich = GetWhich( SID_ATTR_PARA_MODEL ); - BOOL bIsPageModel = FALSE; + sal_Bool bIsPageModel = sal_False; eItemState = rSet.GetItemState( _nWhich ); if ( eItemState >= SFX_ITEM_SET ) { - aApplyCollBtn.EnableTriState( FALSE ); + aApplyCollBtn.EnableTriState( sal_False ); const SvxPageModelItem& rModel = (const SvxPageModelItem&)rSet.Get( _nWhich ); @@ -1667,10 +1669,10 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { aApplyCollBox.SelectEntry( aStr ); aApplyCollBtn.SetState( STATE_CHECK ); - bIsPageModel = TRUE; + bIsPageModel = sal_True; aPageBreakBox.Enable(); - aPageBreakBox.EnableTriState( FALSE ); + aPageBreakBox.EnableTriState( sal_False ); aBreakTypeFT.Enable(); aBreakTypeLB.Enable(); aBreakPositionFT.Enable(); @@ -1691,16 +1693,16 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) } else if ( SFX_ITEM_DONTCARE == eItemState ) { - aApplyCollBtn.EnableTriState( TRUE ); + aApplyCollBtn.EnableTriState( sal_True ); aApplyCollBtn.SetState( STATE_DONTKNOW ); aApplyCollBox.SetNoSelection(); } else { - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumEdit.Enable(FALSE); - aPagenumText.Enable(FALSE); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumEdit.Enable(sal_False); + aPagenumText.Enable(sal_False); } if ( !bIsPageModel ) @@ -1718,7 +1720,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) // PageBreak nicht ueber CTRL-RETURN, // dann kann CheckBox frei gegeben werden aPageBreakBox.Enable(); - aPageBreakBox.EnableTriState( FALSE ); + aPageBreakBox.EnableTriState( sal_False ); aBreakTypeFT.Enable(); aBreakTypeLB.Enable(); aBreakPositionFT.Enable(); @@ -1726,7 +1728,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) aPageBreakBox.SetState( STATE_CHECK ); - BOOL _bEnable = eBreak != SVX_BREAK_NONE && + sal_Bool _bEnable = eBreak != SVX_BREAK_NONE && eBreak != SVX_BREAK_COLUMN_BEFORE && eBreak != SVX_BREAK_COLUMN_AFTER; aApplyCollBtn.Enable(_bEnable); @@ -1739,8 +1741,8 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( eBreak == SVX_BREAK_NONE ) aPageBreakBox.SetState( STATE_NOCHECK ); - USHORT nType = 0; // selection position in break type ListBox : Page - USHORT nPosition = 0; // selection position in break position ListBox : Before + sal_uInt16 nType = 0; // selection position in break type ListBox : Page + sal_uInt16 nPosition = 0; // selection position in break position ListBox : Before switch ( eBreak ) { case SVX_BREAK_PAGE_BEFORE: @@ -1764,11 +1766,11 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) aPageBreakBox.SetState( STATE_DONTKNOW ); else { - aPageBreakBox.Enable(FALSE); - aBreakTypeFT.Enable(FALSE); - aBreakTypeLB.Enable(FALSE); - aBreakPositionFT.Enable(FALSE); - aBreakPositionLB.Enable(FALSE); + aPageBreakBox.Enable(sal_False); + aBreakTypeFT.Enable(sal_False); + aBreakTypeLB.Enable(sal_False); + aBreakPositionFT.Enable(sal_False); + aBreakPositionLB.Enable(sal_False); } } @@ -1781,7 +1783,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( eItemState >= SFX_ITEM_AVAILABLE ) { - aKeepParaBox.EnableTriState( FALSE ); + aKeepParaBox.EnableTriState( sal_False ); const SvxFmtKeepItem& rKeep = (const SvxFmtKeepItem&)rSet.Get( _nWhich ); @@ -1793,7 +1795,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) else if ( SFX_ITEM_DONTCARE == eItemState ) aKeepParaBox.SetState( STATE_DONTKNOW ); else - aKeepParaBox.Enable(FALSE); + aKeepParaBox.Enable(sal_False); _nWhich = GetWhich( SID_ATTR_PARA_SPLIT ); eItemState = rSet.GetItemState( _nWhich ); @@ -1802,7 +1804,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { const SvxFmtSplitItem& rSplit = (const SvxFmtSplitItem&)rSet.Get( _nWhich ); - aKeepTogetherBox.EnableTriState( FALSE ); + aKeepTogetherBox.EnableTriState( sal_False ); if ( !rSplit.GetValue() ) aKeepTogetherBox.SetState( STATE_CHECK ); @@ -1819,10 +1821,10 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { const SvxWidowsItem& rWidow = (const SvxWidowsItem&)rSet.Get( _nWhich ); - aWidowBox.EnableTriState( FALSE ); - const USHORT nLines = rWidow.GetValue(); + aWidowBox.EnableTriState( sal_False ); + const sal_uInt16 nLines = rWidow.GetValue(); - BOOL _bEnable = nLines > 0; + sal_Bool _bEnable = nLines > 0; aWidowRowNo.SetValue( aWidowRowNo.Normalize( nLines ) ); aWidowBox.SetState( _bEnable ? STATE_CHECK : STATE_NOCHECK); aWidowRowNo.Enable(_bEnable); @@ -1832,7 +1834,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) else if ( SFX_ITEM_DONTCARE == eTmpState ) aWidowBox.SetState( STATE_DONTKNOW ); else - aWidowBox.Enable(FALSE); + aWidowBox.Enable(sal_False); aOrphanBox.Enable(); _nWhich = GetWhich( SID_ATTR_PARA_ORPHANS ); @@ -1842,10 +1844,10 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { const SvxOrphansItem& rOrphan = (const SvxOrphansItem&)rSet.Get( _nWhich ); - const USHORT nLines = rOrphan.GetValue(); - aOrphanBox.EnableTriState( FALSE ); + const sal_uInt16 nLines = rOrphan.GetValue(); + aOrphanBox.EnableTriState( sal_False ); - BOOL _bEnable = nLines > 0; + sal_Bool _bEnable = nLines > 0; aOrphanBox.SetState( _bEnable ? STATE_CHECK : STATE_NOCHECK); aOrphanRowNo.SetValue( aOrphanRowNo.Normalize( nLines ) ); aOrphanRowNo.Enable(_bEnable); @@ -1855,13 +1857,13 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) else if ( SFX_ITEM_DONTCARE == eTmpState ) aOrphanBox.SetState( STATE_DONTKNOW ); else - aOrphanBox.Enable(FALSE); + aOrphanBox.Enable(sal_False); } } else if ( SFX_ITEM_DONTCARE == eItemState ) aKeepTogetherBox.SetState( STATE_DONTKNOW ); else - aKeepTogetherBox.Enable(FALSE); + aKeepTogetherBox.Enable(sal_False); // damit alles richt enabled wird KeepTogetherHdl_Impl( 0 ); @@ -1897,14 +1899,14 @@ int SvxExtParagraphTabPage::DeactivatePage( SfxItemSet* _pSet ) void SvxExtParagraphTabPage::DisablePageBreak() { - bPageBreak = FALSE; - aPageBreakBox.Enable(FALSE); + bPageBreak = sal_False; + aPageBreakBox.Enable(sal_False); aBreakTypeLB.RemoveEntry(0); - aBreakPositionFT.Enable(FALSE); - aBreakPositionLB.Enable(FALSE); - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumEdit.Enable(FALSE); + aBreakPositionFT.Enable(sal_False); + aBreakPositionLB.Enable(sal_False); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumEdit.Enable(sal_False); } // ----------------------------------------------------------------------- @@ -1913,6 +1915,7 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_EXT_PARAGRAPH ), rAttr ), + aExtFL ( this, CUI_RES( FL_HYPHEN ) ), aHyphenBox ( this, CUI_RES( BTN_HYPHEN ) ), aBeforeText ( this, CUI_RES( FT_HYPHENBEFORE ) ), aExtHyphenBeforeBox ( this, CUI_RES( ED_HYPHENBEFORE ) ), @@ -1920,7 +1923,6 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe aExtHyphenAfterBox ( this, CUI_RES( ED_HYPHENAFTER ) ), aMaxHyphenLabel ( this, CUI_RES( FT_MAXHYPH ) ), aMaxHyphenEdit ( this, CUI_RES( ED_MAXHYPH ) ), - aExtFL ( this, CUI_RES( FL_HYPHEN ) ), aBreaksFL ( this, CUI_RES( FL_BREAKS ) ), aPageBreakBox ( this, CUI_RES( BTN_PAGEBREAK ) ), aBreakTypeFT ( this, CUI_RES( FT_BREAKTYPE )), @@ -1940,12 +1942,17 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe aWidowBox ( this, CUI_RES( BTN_WIDOWS ) ), aWidowRowNo ( this, CUI_RES( ED_WIDOWS ) ), aWidowRowLabel ( this, CUI_RES( FT_WIDOWS ) ), - bPageBreak ( TRUE ), - bHtmlMode ( FALSE ), + bPageBreak ( sal_True ), + bHtmlMode ( sal_False ), nStdPos ( 0 ) { FreeResource(); + aApplyCollBox.SetAccessibleRelationLabeledBy(&aApplyCollBtn); + aApplyCollBox.SetAccessibleName(String(CUI_RES(STR_PAGE_STYLE))); + aOrphanRowNo.SetAccessibleRelationLabeledBy(&aOrphanBox); + aWidowRowNo.SetAccessibleRelationLabeledBy(&aWidowBox); + // diese Page braucht ExchangeSupport SetExchangeSupport(); @@ -1977,20 +1984,20 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage( Window* pParent, const SfxItemSe nStdPos = aApplyCollBox.GetEntryPos( aStdName ); } - USHORT nHtmlMode = GetHtmlMode_Impl( rAttr ); + sal_uInt16 nHtmlMode = GetHtmlMode_Impl( rAttr ); if ( nHtmlMode & HTMLMODE_ON ) { - bHtmlMode = TRUE; - aHyphenBox .Enable(FALSE); - aBeforeText .Enable(FALSE); - aExtHyphenBeforeBox .Enable(FALSE); - aAfterText .Enable(FALSE); - aExtHyphenAfterBox .Enable(FALSE); - aMaxHyphenLabel .Enable(FALSE); - aMaxHyphenEdit .Enable(FALSE); - aExtFL .Enable(FALSE); - aPagenumText .Enable(FALSE); - aPagenumEdit .Enable(FALSE); + bHtmlMode = sal_True; + aHyphenBox .Enable(sal_False); + aBeforeText .Enable(sal_False); + aExtHyphenBeforeBox .Enable(sal_False); + aAfterText .Enable(sal_False); + aExtHyphenAfterBox .Enable(sal_False); + aMaxHyphenLabel .Enable(sal_False); + aMaxHyphenEdit .Enable(sal_False); + aExtFL .Enable(sal_False); + aPagenumText .Enable(sal_False); + aPagenumEdit .Enable(sal_False); // no column break in HTML aBreakTypeLB.RemoveEntry(1); } @@ -2004,7 +2011,7 @@ SvxExtParagraphTabPage::~SvxExtParagraphTabPage() // ----------------------------------------------------------------------- -USHORT* SvxExtParagraphTabPage::GetRanges() +sal_uInt16* SvxExtParagraphTabPage::GetRanges() { return pExtRanges; } @@ -2026,7 +2033,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakHdl_Impl, TriStateBox *, EMPTYARG ) { aApplyCollBtn.Enable(); - BOOL bEnable = STATE_CHECK == aApplyCollBtn.GetState() && + sal_Bool bEnable = STATE_CHECK == aApplyCollBtn.GetState() && aApplyCollBox.GetEntryCount(); aApplyCollBox.Enable(bEnable); if(!bHtmlMode) @@ -2040,14 +2047,14 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakHdl_Impl, TriStateBox *, EMPTYARG ) case STATE_NOCHECK: case STATE_DONTKNOW: aApplyCollBtn.SetState( STATE_NOCHECK ); - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumText.Enable(FALSE); - aPagenumEdit.Enable(FALSE); - aBreakTypeFT.Enable(FALSE); - aBreakTypeLB.Enable(FALSE); - aBreakPositionFT.Enable(FALSE); - aBreakPositionLB.Enable(FALSE); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumText.Enable(sal_False); + aPagenumEdit.Enable(sal_False); + aBreakTypeFT.Enable(sal_False); + aBreakTypeLB.Enable(sal_False); + aBreakPositionFT.Enable(sal_False); + aBreakPositionLB.Enable(sal_False); break; } return 0; @@ -2057,7 +2064,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakHdl_Impl, TriStateBox *, EMPTYARG ) IMPL_LINK( SvxExtParagraphTabPage, KeepTogetherHdl_Impl, TriStateBox *, EMPTYARG ) { - BOOL bEnable = aKeepTogetherBox.GetState() == STATE_NOCHECK; + sal_Bool bEnable = aKeepTogetherBox.GetState() == STATE_NOCHECK; aWidowBox.Enable(bEnable); aOrphanBox.Enable(bEnable); @@ -2073,7 +2080,7 @@ IMPL_LINK( SvxExtParagraphTabPage, WidowHdl_Impl, TriStateBox *, EMPTYARG ) case STATE_CHECK: aWidowRowNo.Enable(); aWidowRowLabel.Enable(); - aKeepTogetherBox.Enable(FALSE); + aKeepTogetherBox.Enable(sal_False); break; case STATE_NOCHECK: @@ -2082,8 +2089,8 @@ IMPL_LINK( SvxExtParagraphTabPage, WidowHdl_Impl, TriStateBox *, EMPTYARG ) // kein break case STATE_DONTKNOW: - aWidowRowNo.Enable(FALSE); - aWidowRowLabel.Enable(FALSE); + aWidowRowNo.Enable(sal_False); + aWidowRowLabel.Enable(sal_False); break; } return 0; @@ -2098,7 +2105,7 @@ IMPL_LINK( SvxExtParagraphTabPage, OrphanHdl_Impl, TriStateBox *, EMPTYARG ) case STATE_CHECK: aOrphanRowNo.Enable(); aOrphanRowLabel.Enable(); - aKeepTogetherBox.Enable(FALSE); + aKeepTogetherBox.Enable(sal_False); break; case STATE_NOCHECK: @@ -2107,8 +2114,8 @@ IMPL_LINK( SvxExtParagraphTabPage, OrphanHdl_Impl, TriStateBox *, EMPTYARG ) // kein break case STATE_DONTKNOW: - aOrphanRowNo.Enable(FALSE); - aOrphanRowLabel.Enable(FALSE); + aOrphanRowNo.Enable(sal_False); + aOrphanRowLabel.Enable(sal_False); break; } return 0; @@ -2119,7 +2126,7 @@ IMPL_LINK( SvxExtParagraphTabPage, OrphanHdl_Impl, TriStateBox *, EMPTYARG ) IMPL_LINK( SvxExtParagraphTabPage, HyphenClickHdl_Impl, TriStateBox *, EMPTYARG ) { - BOOL bEnable = aHyphenBox.GetState() == STATE_CHECK; + sal_Bool bEnable = aHyphenBox.GetState() == STATE_CHECK; aBeforeText.Enable(bEnable); aExtHyphenBeforeBox.Enable(bEnable); aAfterText.Enable(bEnable); @@ -2135,11 +2142,11 @@ IMPL_LINK( SvxExtParagraphTabPage, HyphenClickHdl_Impl, TriStateBox *, EMPTYARG IMPL_LINK( SvxExtParagraphTabPage, ApplyCollClickHdl_Impl, TriStateBox *, EMPTYARG ) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if ( aApplyCollBtn.GetState() == STATE_CHECK && aApplyCollBox.GetEntryCount() ) { - bEnable = TRUE; + bEnable = sal_True; aApplyCollBox.SelectEntryPos( nStdPos ); } else @@ -2163,7 +2170,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, ListBox *, pListBox ) { aApplyCollBtn.Enable(); - BOOL bEnable = aApplyCollBtn.GetState() == STATE_CHECK && + sal_Bool bEnable = aApplyCollBtn.GetState() == STATE_CHECK && aApplyCollBox.GetEntryCount(); aApplyCollBox.Enable(bEnable); @@ -2176,10 +2183,10 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, ListBox *, pListBox ) else if ( 1 == pListBox->GetSelectEntryPos() ) { aApplyCollBtn.SetState( STATE_NOCHECK ); - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumText.Enable(FALSE); - aPagenumEdit.Enable(FALSE); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumText.Enable(sal_False); + aPagenumEdit.Enable(sal_False); } return 0; } @@ -2189,14 +2196,14 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, ListBox *, pListBox ) IMPL_LINK( SvxExtParagraphTabPage, PageBreakTypeHdl_Impl, ListBox *, pListBox ) { //column break or break break after - USHORT nBreakPos = aBreakPositionLB.GetSelectEntryPos(); + sal_uInt16 nBreakPos = aBreakPositionLB.GetSelectEntryPos(); if ( pListBox->GetSelectEntryPos() == 1 || 1 == nBreakPos) { aApplyCollBtn.SetState( STATE_NOCHECK ); - aApplyCollBtn.Enable(FALSE); - aApplyCollBox.Enable(FALSE); - aPagenumText.Enable(FALSE); - aPagenumEdit.Enable(FALSE); + aApplyCollBtn.Enable(sal_False); + aApplyCollBox.Enable(sal_False); + aPagenumText.Enable(sal_False); + aPagenumEdit.Enable(sal_False); } else PageBreakPosHdl_Impl( &aBreakPositionLB ); @@ -2242,9 +2249,9 @@ SfxTabPage* SvxAsianTabPage::Create( Window* pParent, const SfxItemSet& rSet ) return new SvxAsianTabPage(pParent, rSet); } -USHORT* SvxAsianTabPage::GetRanges() +sal_uInt16* SvxAsianTabPage::GetRanges() { - static USHORT pRanges[] = + static sal_uInt16 pRanges[] = { SID_ATTR_PARA_SCRIPTSPACE, SID_ATTR_PARA_FORBIDDEN_RULES, 0 @@ -2252,9 +2259,9 @@ USHORT* SvxAsianTabPage::GetRanges() return pRanges; } -BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SfxItemPool* pPool = rSet.GetPool(); if(aScriptSpaceCB.IsChecked() != aScriptSpaceCB.GetSavedValue()) { @@ -2263,7 +2270,7 @@ BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) pNewItem->SetValue(aScriptSpaceCB.IsChecked()); rSet.Put(*pNewItem); delete pNewItem; - bRet = TRUE; + bRet = sal_True; } if(aHangingPunctCB.IsChecked() != aHangingPunctCB.GetSavedValue()) { @@ -2272,7 +2279,7 @@ BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) pNewItem->SetValue(aHangingPunctCB.IsChecked()); rSet.Put(*pNewItem); delete pNewItem; - bRet = TRUE; + bRet = sal_True; } if(aForbiddenRulesCB.IsChecked() != aForbiddenRulesCB.GetSavedValue()) { @@ -2281,20 +2288,20 @@ BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet ) pNewItem->SetValue(aForbiddenRulesCB.IsChecked()); rSet.Put(*pNewItem); delete pNewItem; - bRet = TRUE; + bRet = sal_True; } return bRet; } -void lcl_SetBox(const SfxItemSet& rSet, USHORT nSlotId, TriStateBox& rBox) +void lcl_SetBox(const SfxItemSet& rSet, sal_uInt16 nSlotId, TriStateBox& rBox) { - USHORT _nWhich = rSet.GetPool()->GetWhich(nSlotId); - SfxItemState eState = rSet.GetItemState(_nWhich, TRUE); + sal_uInt16 _nWhich = rSet.GetPool()->GetWhich(nSlotId); + SfxItemState eState = rSet.GetItemState(_nWhich, sal_True); if(!eState || eState == SFX_ITEM_DISABLED ) - rBox.Enable(FALSE); + rBox.Enable(sal_False); else if(eState >= SFX_ITEM_AVAILABLE) { - rBox.EnableTriState( FALSE ); + rBox.EnableTriState( sal_False ); rBox.Check(((const SfxBoolItem&)rSet.Get(_nWhich)).GetValue()); } else @@ -2314,7 +2321,7 @@ void SvxAsianTabPage::Reset( const SfxItemSet& rSet ) IMPL_LINK( SvxAsianTabPage, ClickHdl_Impl, TriStateBox*, pBox ) { - pBox->EnableTriState( FALSE ); + pBox->EnableTriState( sal_False ); return 0; } diff --git a/cui/source/tabpages/paragrph.hrc b/cui/source/tabpages/paragrph.hrc index b521366ef..d831d447f 100644 --- a/cui/source/tabpages/paragrph.hrc +++ b/cui/source/tabpages/paragrph.hrc @@ -117,5 +117,9 @@ #define CB_AS_SCRIPT_SPACE 7 +//IAccessibility2 Implementation 2009----- +#define STR_EXAMPLE 5010 +#define STR_PAGE_STYLE 5011 +//-----IAccessibility2 Implementation 2009 #endif diff --git a/cui/source/tabpages/paragrph.src b/cui/source/tabpages/paragrph.src index 488e781b3..46dfb5cdf 100644 --- a/cui/source/tabpages/paragrph.src +++ b/cui/source/tabpages/paragrph.src @@ -46,6 +46,7 @@ TabPage RID_SVXPAGE_STD_PARAGRAPH }; MetricField ED_LEFTINDENT { + HelpID = "cui:MetricField:RID_SVXPAGE_STD_PARAGRAPH:ED_LEFTINDENT"; Border = TRUE ; Pos = MAP_APPFONT ( 135 , 14 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -68,6 +69,7 @@ TabPage RID_SVXPAGE_STD_PARAGRAPH }; MetricField ED_RIGHTINDENT { + HelpID = "cui:MetricField:RID_SVXPAGE_STD_PARAGRAPH:ED_RIGHTINDENT"; Border = TRUE ; Pos = MAP_APPFONT ( 135 , 30 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -90,6 +92,7 @@ TabPage RID_SVXPAGE_STD_PARAGRAPH }; MetricField ED_FLINEINDENT { + HelpID = "cui:MetricField:RID_SVXPAGE_STD_PARAGRAPH:ED_FLINEINDENT"; Border = TRUE ; Pos = MAP_APPFONT ( 135 , 46 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -107,6 +110,7 @@ TabPage RID_SVXPAGE_STD_PARAGRAPH }; CheckBox CB_AUTO { + HelpID = "cui:CheckBox:RID_SVXPAGE_STD_PARAGRAPH:CB_AUTO"; Pos = MAP_APPFONT ( 12 , 61 ) ; Size = MAP_APPFONT ( 120 , 10 ) ; Hide = TRUE ; @@ -127,6 +131,7 @@ TabPage RID_SVXPAGE_STD_PARAGRAPH }; MetricField ED_TOPDIST { + HelpID = "cui:MetricField:RID_SVXPAGE_STD_PARAGRAPH:ED_TOPDIST"; Border = TRUE ; Pos = MAP_APPFONT ( 135 , 88 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -149,6 +154,7 @@ TabPage RID_SVXPAGE_STD_PARAGRAPH }; MetricField ED_BOTTOMDIST { + HelpID = "cui:MetricField:RID_SVXPAGE_STD_PARAGRAPH:ED_BOTTOMDIST"; Border = TRUE ; Pos = MAP_APPFONT ( 135 , 104 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -170,6 +176,7 @@ TabPage RID_SVXPAGE_STD_PARAGRAPH }; ListBox LB_LINEDIST { + HelpID = "cui:ListBox:RID_SVXPAGE_STD_PARAGRAPH:LB_LINEDIST"; Pos = MAP_APPFONT ( 12 , 133 ) ; Size = MAP_APPFONT ( 55 , 72 ) ; DropDown = TRUE ; @@ -197,6 +204,7 @@ TabPage RID_SVXPAGE_STD_PARAGRAPH }; MetricField ED_LINEDISTPERCENT { + HelpID = "cui:MetricField:RID_SVXPAGE_STD_PARAGRAPH:ED_LINEDISTPERCENT"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 135 , 133 ) ; @@ -216,6 +224,7 @@ TabPage RID_SVXPAGE_STD_PARAGRAPH }; MetricField ED_LINEDISTMETRIC { + HelpID = "cui:MetricField:RID_SVXPAGE_STD_PARAGRAPH:ED_LINEDISTMETRIC"; Disable = TRUE ; Border = TRUE ; Hide = TRUE ; @@ -245,6 +254,7 @@ TabPage RID_SVXPAGE_STD_PARAGRAPH }; CheckBox CB_REGISTER { + HelpID = "cui:CheckBox:RID_SVXPAGE_STD_PARAGRAPH:CB_REGISTER"; Pos = MAP_APPFONT ( 12 , 162 ) ; Size = MAP_APPFONT ( 120 , 10 ) ; Hide = TRUE ; @@ -275,6 +285,7 @@ TabPage RID_SVXPAGE_ALIGN_PARAGRAPH }; RadioButton BTN_LEFTALIGN { + HelpID = "cui:RadioButton:RID_SVXPAGE_ALIGN_PARAGRAPH:BTN_LEFTALIGN"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 161 , 10 ) ; Text [ en-US ] = "~Left" ; @@ -282,18 +293,21 @@ TabPage RID_SVXPAGE_ALIGN_PARAGRAPH }; RadioButton BTN_RIGHTALIGN { + HelpID = "cui:RadioButton:RID_SVXPAGE_ALIGN_PARAGRAPH:BTN_RIGHTALIGN"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 161 , 10 ) ; Text [ en-US ] = "Righ~t" ; }; RadioButton BTN_CENTERALIGN { + HelpID = "cui:RadioButton:RID_SVXPAGE_ALIGN_PARAGRAPH:BTN_CENTERALIGN"; Pos = MAP_APPFONT ( 12 , 42 ) ; Size = MAP_APPFONT ( 161 , 10 ) ; Text [ en-US ] = "~Center" ; }; RadioButton BTN_JUSTIFYALIGN { + HelpID = "cui:RadioButton:RID_SVXPAGE_ALIGN_PARAGRAPH:BTN_JUSTIFYALIGN"; Pos = MAP_APPFONT ( 12 , 56 ) ; Size = MAP_APPFONT ( 161 , 10 ) ; Text [ en-US ] = "Justified" ; @@ -315,6 +329,7 @@ TabPage RID_SVXPAGE_ALIGN_PARAGRAPH }; ListBox LB_LASTLINE { + HelpID = "cui:ListBox:RID_SVXPAGE_ALIGN_PARAGRAPH:LB_LASTLINE"; Pos = MAP_APPFONT ( 105 , 70 ) ; Size = MAP_APPFONT ( 70 , 50 ) ; DropDown = TRUE ; @@ -329,6 +344,7 @@ TabPage RID_SVXPAGE_ALIGN_PARAGRAPH }; CheckBox CB_EXPAND { + HelpID = "cui:CheckBox:RID_SVXPAGE_ALIGN_PARAGRAPH:CB_EXPAND"; Pos = MAP_APPFONT ( 20 , 86 ) ; Size = MAP_APPFONT ( 153 , 10 ) ; Hide = TRUE ; @@ -336,6 +352,7 @@ TabPage RID_SVXPAGE_ALIGN_PARAGRAPH }; CheckBox CB_SNAP { + HelpID = "cui:CheckBox:RID_SVXPAGE_ALIGN_PARAGRAPH:CB_SNAP"; Pos = MAP_APPFONT ( 20 , 100 ) ; Size = MAP_APPFONT ( 153 , 10 ) ; Hide = TRUE ; @@ -363,6 +380,7 @@ TabPage RID_SVXPAGE_ALIGN_PARAGRAPH }; ListBox LB_VERTALIGN { + HelpID = "cui:ListBox:RID_SVXPAGE_ALIGN_PARAGRAPH:LB_VERTALIGN"; Pos = MAP_APPFONT ( 105 , 133 ) ; Size = MAP_APPFONT ( 70 , 50 ) ; DropDown = TRUE ; @@ -392,6 +410,7 @@ TabPage RID_SVXPAGE_ALIGN_PARAGRAPH }; ListBox LB_TEXTDIRECTION { + HelpID = "cui:ListBox:RID_SVXPAGE_ALIGN_PARAGRAPH:LB_TEXTDIRECTION"; Border = TRUE ; Pos = MAP_APPFONT ( 105 , 165 ) ; Size = MAP_APPFONT ( 146 , 50 ) ; @@ -408,12 +427,14 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH Size = MAP_APPFONT ( 260 , 185 ) ; TriStateBox BTN_HYPHEN { + HelpID = "cui:TriStateBox:RID_SVXPAGE_EXT_PARAGRAPH:BTN_HYPHEN"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "A~utomatically" ; }; NumericField ED_HYPHENBEFORE { + HelpID = "cui:NumericField:RID_SVXPAGE_EXT_PARAGRAPH:ED_HYPHENBEFORE"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 21 , 26 ) ; @@ -438,6 +459,7 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; NumericField ED_HYPHENAFTER { + HelpID = "cui:NumericField:RID_SVXPAGE_EXT_PARAGRAPH:ED_HYPHENAFTER"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 21 , 41 ) ; @@ -469,6 +491,7 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; NumericField ED_MAXHYPH { + HelpID = "cui:NumericField:RID_SVXPAGE_EXT_PARAGRAPH:ED_MAXHYPH"; Border = TRUE ; Pos = MAP_APPFONT ( 21 , 55 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; @@ -501,6 +524,7 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; TriStateBox BTN_PAGEBREAK { + HelpID = "cui:TriStateBox:RID_SVXPAGE_EXT_PARAGRAPH:BTN_PAGEBREAK"; // Disable = TRUE; Pos = MAP_APPFONT ( 12 , 86 ) ; Size = MAP_APPFONT ( 61 , 10 ) ; @@ -515,6 +539,7 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; ListBox LB_BREAKTYPE { + HelpID = "cui:ListBox:RID_SVXPAGE_EXT_PARAGRAPH:LB_BREAKTYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 98 , 84 ) ; Size = MAP_APPFONT ( 61 , 50 ) ; @@ -534,6 +559,7 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; ListBox LB_BREAKPOSITION { + HelpID = "cui:ListBox:RID_SVXPAGE_EXT_PARAGRAPH:LB_BREAKPOSITION"; Border = TRUE ; Pos = MAP_APPFONT ( 211 , 84 ) ; Size = MAP_APPFONT ( 40 , 50 ) ; @@ -546,6 +572,7 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; TriStateBox BTN_PAGECOLL { + HelpID = "cui:TriStateBox:RID_SVXPAGE_EXT_PARAGRAPH:BTN_PAGECOLL"; // Disable = TRUE; Pos = MAP_APPFONT (21 , 100 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; @@ -554,6 +581,7 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; ListBox LB_PAGECOLL { + HelpID = "cui:ListBox:RID_SVXPAGE_EXT_PARAGRAPH:LB_PAGECOLL"; // Disable = TRUE; Pos = MAP_APPFONT ( 98 , 98 ) ; Size = MAP_APPFONT ( 61 , 50 ) ; @@ -569,6 +597,7 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; NumericField ED_PAGENUM { + HelpID = "cui:NumericField:RID_SVXPAGE_EXT_PARAGRAPH:ED_PAGENUM"; Border = TRUE ; Pos = MAP_APPFONT ( 211 , 98 ) ; Size = MAP_APPFONT ( 26 , 12 ) ; @@ -583,6 +612,7 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; TriStateBox BTN_KEEPTOGETHER { + HelpID = "cui:TriStateBox:RID_SVXPAGE_EXT_PARAGRAPH:BTN_KEEPTOGETHER"; Pos = MAP_APPFONT ( 12 , 127 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~Do not split paragraph" ; @@ -590,12 +620,14 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; TriStateBox CB_KEEPTOGETHER { + HelpID = "cui:TriStateBox:RID_SVXPAGE_EXT_PARAGRAPH:CB_KEEPTOGETHER"; Pos = MAP_APPFONT ( 12, 141 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~Keep with next paragraph" ; }; TriStateBox BTN_ORPHANS { + HelpID = "cui:TriStateBox:RID_SVXPAGE_EXT_PARAGRAPH:BTN_ORPHANS"; Disable = TRUE ; Pos = MAP_APPFONT ( 12 , 155 ) ; Size = MAP_APPFONT ( 120 , 10 ) ; @@ -604,6 +636,7 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; NumericField ED_ORPHANS { + HelpID = "cui:NumericField:RID_SVXPAGE_EXT_PARAGRAPH:ED_ORPHANS"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 134 , 153 ) ; @@ -628,6 +661,7 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; TriStateBox BTN_WIDOWS { + HelpID = "cui:TriStateBox:RID_SVXPAGE_EXT_PARAGRAPH:BTN_WIDOWS"; Disable = TRUE ; Pos = MAP_APPFONT ( 12 , 169 ) ; Size = MAP_APPFONT ( 120 , 10 ) ; @@ -636,6 +670,7 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH }; NumericField ED_WIDOWS { + HelpID = "cui:NumericField:RID_SVXPAGE_EXT_PARAGRAPH:ED_WIDOWS"; Disable = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( 134 , 167 ) ; @@ -675,57 +710,33 @@ TabPage RID_SVXPAGE_PARA_ASIAN }; TriStateBox CB_AS_FORBIDDEN { + HelpID = "cui:TriStateBox:RID_SVXPAGE_PARA_ASIAN:CB_AS_FORBIDDEN"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text [ en-US ] = "Apply list of forbidden characters to the beginning and end of lines"; }; TriStateBox CB_AS_HANG_PUNC { + HelpID = "cui:TriStateBox:RID_SVXPAGE_PARA_ASIAN:CB_AS_HANG_PUNC"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text [ en-US ] = "Allow hanging punctuation"; }; TriStateBox CB_AS_SCRIPT_SPACE { + HelpID = "cui:TriStateBox:RID_SVXPAGE_PARA_ASIAN:CB_AS_SCRIPT_SPACE"; Pos = MAP_APPFONT ( 12 , 42 ) ; Size = MAP_APPFONT ( 242 , 10 ) ; Text [ en-US ] = "Apply spacing between Asian, Latin and Complex text"; }; }; -// ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +String STR_EXAMPLE +{ + Text [ en-US ] = "Example" ; +}; +String STR_PAGE_STYLE +{ + Text [ en-US ] = "Page Style" ; +}; diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 7a53da94b..2d08dede0 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -55,14 +55,14 @@ struct FrmMap SvxSwFramePosString::StringId eStrId; SvxSwFramePosString::StringId eMirrorStrId; short nAlign; - ULONG nLBRelations; + sal_uLong nLBRelations; }; struct RelationMap { SvxSwFramePosString::StringId eStrId; SvxSwFramePosString::StringId eMirrorStrId; - ULONG nLBRelation; + sal_uLong nLBRelation; short nRelation; }; struct StringIdPair_Impl @@ -418,7 +418,7 @@ std::size_t lcl_GetFrmMapCount(const FrmMap* pMap) } SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( - SvxSwFramePosString::StringId eStringId, BOOL bVertical, BOOL bRTL) + SvxSwFramePosString::StringId eStringId, sal_Bool bVertical, sal_Bool bRTL) { //special handling of STR_FROMLEFT if(SwFPos::FROMLEFT == eStringId) @@ -453,7 +453,7 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( {SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT }, {SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT } }; - USHORT nIndex; + sal_uInt16 nIndex; for(nIndex = 0; nIndex < SAL_N_ELEMENTS(aHoriIds); ++nIndex) { if(aHoriIds[nIndex].eHori == eStringId) @@ -476,9 +476,9 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( } // #i22341# - helper method in order to determine all possible // listbox relations in a relation map for a given relation -ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel ) +sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel ) { - ULONG nLBRelations = 0L; + sal_uLong nLBRelations = 0L; for ( sal_uInt16 nRelMapPos = 0; nRelMapPos < SAL_N_ELEMENTS(aRelationMap); ++nRelMapPos ) { @@ -493,11 +493,11 @@ ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel ) // #i22341# - helper method on order to determine all possible // listbox relations in a relation map for a given string ID -ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap, +sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap, const SvxSwFramePosString::StringId _eStrId, const bool _bUseMirrorStr ) { - ULONG nLBRelations = 0L; + sal_uLong nLBRelations = 0L; std::size_t nRelMapSize = lcl_GetFrmMapCount( _pMap ); for ( std::size_t nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos ) @@ -577,10 +577,10 @@ SvxSwPosSizeTabPage::SvxSwPosSizeTabPage( Window* pParent, const SfxItemSet& rIn { FreeResource(); FieldUnit eDlgUnit = GetModuleFieldUnit( rInAttrs ); - SetFieldUnit( m_aHoriByMF, eDlgUnit, TRUE ); - SetFieldUnit( m_aVertByMF, eDlgUnit, TRUE ); - SetFieldUnit( m_aWidthMF , eDlgUnit, TRUE ); - SetFieldUnit( m_aHeightMF, eDlgUnit, TRUE ); + SetFieldUnit( m_aHoriByMF, eDlgUnit, sal_True ); + SetFieldUnit( m_aVertByMF, eDlgUnit, sal_True ); + SetFieldUnit( m_aWidthMF , eDlgUnit, sal_True ); + SetFieldUnit( m_aHeightMF, eDlgUnit, sal_True ); SetExchangeSupport(); @@ -623,9 +623,9 @@ SfxTabPage* SvxSwPosSizeTabPage::Create( Window* pParent, const SfxItemSet& rSet return new SvxSwPosSizeTabPage(pParent, rSet); } -USHORT* SvxSwPosSizeTabPage::GetRanges() +sal_uInt16* SvxSwPosSizeTabPage::GetRanges() { - static USHORT pSwPosRanges[] = + static sal_uInt16 pSwPosRanges[] = { SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_POS_Y, @@ -652,15 +652,15 @@ USHORT* SvxSwPosSizeTabPage::GetRanges() return pSwPosRanges; } -BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) +sal_Bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) { bool bAnchorChanged = false; short nAnchor = GetAnchorType(&bAnchorChanged); - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if(bAnchorChanged) { rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor)); - bModified |= TRUE; + bModified |= sal_True; } if ( m_aPositionCB.GetState() != m_aPositionCB.GetSavedValue() ) { @@ -669,8 +669,8 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) else rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ), - m_aPositionCB.GetState() == STATE_CHECK ? TRUE : FALSE ) ); - bModified |= TRUE; + m_aPositionCB.GetState() == STATE_CHECK ? sal_True : sal_False ) ); + bModified |= sal_True; } if ( m_aSizeCB.GetState() != m_aSizeCB.GetSavedValue() ) @@ -680,8 +680,8 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) else rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ), - m_aSizeCB.GetState() == STATE_CHECK ? TRUE : FALSE ) ); - bModified |= TRUE; + m_aSizeCB.GetState() == STATE_CHECK ? sal_True : sal_False ) ); + bModified |= sal_True; } const SfxItemSet& rOldSet = GetItemSet(); @@ -708,7 +708,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) rSet.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_POS_X ), nHoriByPos ) ); rSet.Put( SfxInt32Item( GetWhich( SID_ATTR_TRANSFORM_POS_Y ), nVertByPos ) ); - bModified |= TRUE; + bModified |= sal_True; } } else @@ -722,7 +722,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) const SfxInt32Item& rHoriPosition = static_cast<const SfxInt32Item&>(rOldSet.Get( SID_ATTR_TRANSFORM_HORI_POSITION)) ; - USHORT nMapPos = GetMapPos(m_pHMap, m_aHoriLB); + sal_uInt16 nMapPos = GetMapPos(m_pHMap, m_aHoriLB); short nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); short nRel = GetRelation(m_pHMap, m_aHoriToLB); const long nHoriByPos = @@ -737,7 +737,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_HORI_RELATION, nRel)); if(m_aHoriByMF.IsEnabled()) rSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_HORI_POSITION, nHoriByPos)); - bModified |= TRUE; + bModified |= sal_True; } } if(m_aHoriMirrorCB.IsEnabled() && m_aHoriMirrorCB.IsChecked() != m_aHoriMirrorCB.GetSavedValue()) @@ -752,7 +752,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) const SfxInt32Item& rVertPosition = static_cast<const SfxInt32Item&>(rOldSet.Get( SID_ATTR_TRANSFORM_VERT_POSITION)); - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); short nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); short nRel = GetRelation(m_pVMap, m_aVertToLB); // #i34055# - convert vertical position for @@ -772,7 +772,7 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) rSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_VERT_RELATION, nRel)); if(m_aVertByMF.IsEnabled()) rSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_VERT_POSITION, nVertByPos)); - bModified |= TRUE; + bModified |= sal_True; } } @@ -796,13 +796,13 @@ BOOL SvxSwPosSizeTabPage::FillItemSet( SfxItemSet& rSet) sal_uInt32 nWidth = static_cast<sal_uInt32>(m_aWidthMF.Denormalize(m_aWidthMF.GetValue(FUNIT_TWIP))); sal_uInt32 nHeight = static_cast<sal_uInt32>(m_aHeightMF.Denormalize(m_aHeightMF.GetValue(FUNIT_TWIP))); rSet.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), - (UINT32) nWidth ) ); + (sal_uInt32) nWidth ) ); rSet.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ), - (UINT32) nHeight ) ); + (sal_uInt32) nHeight ) ); //this item is required by SdrEditView::SetGeoAttrToMarked() rSet.Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), RP_LT ) ); - bModified |= TRUE; + bModified |= sal_True; } return bModified; @@ -833,11 +833,11 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) } if(bInvalidateAnchor) { - m_aToPageRB.Enable( FALSE ); - m_aToParaRB.Enable( FALSE ); - m_aToCharRB.Enable( FALSE ); - m_aAsCharRB.Enable( FALSE ); - m_aToFrameRB.Enable( FALSE ); + m_aToPageRB.Enable( sal_False ); + m_aToParaRB.Enable( sal_False ); + m_aToCharRB.Enable( sal_False ); + m_aAsCharRB.Enable( sal_False ); + m_aToFrameRB.Enable( sal_False ); } pItem = GetItem( rSet, SID_ATTR_TRANSFORM_PROTECT_POS ); @@ -845,7 +845,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { sal_Bool bProtected = ( ( const SfxBoolItem* )pItem )->GetValue(); m_aPositionCB.SetState( bProtected ? STATE_CHECK : STATE_NOCHECK ); - m_aPositionCB.EnableTriState( FALSE ); + m_aPositionCB.EnableTriState( sal_False ); m_aSizeCB.Enable( !bProtected ); } else @@ -861,7 +861,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { m_aSizeCB.SetState( ( (const SfxBoolItem*)pItem )->GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_aSizeCB.EnableTriState( FALSE ); + m_aSizeCB.EnableTriState( sal_False ); } else m_aSizeCB.SetState( STATE_DONTKNOW ); @@ -897,8 +897,8 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { if( 0 == (m_nHtmlMode & HTMLMODE_FULL_ABS_POS)) { - m_aHeightFT .Enable( FALSE ); - m_aHeightMF .Enable( FALSE ); + m_aHeightFT .Enable( sal_False ); + m_aHeightMF .Enable( sal_False ); } if( 0 == (m_nHtmlMode & HTMLMODE_SOME_ABS_POS)) { @@ -906,12 +906,12 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { m_aToParaRB.Check(); } - m_aToPageRB.Enable(FALSE); + m_aToPageRB.Enable(sal_False); } - m_aHoriMirrorCB.Show(FALSE); - m_aKeepRatioCB.Enable(FALSE); + m_aHoriMirrorCB.Show(sal_False); + m_aKeepRatioCB.Enable(sal_False); // #i18732# - hide checkbox in HTML mode - m_aFollowCB.Show(FALSE); + m_aFollowCB.Show(sal_False); } else { @@ -924,12 +924,12 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) } pItem = GetItem( rSet, SID_ATTR_TRANSFORM_WIDTH ); - sal_Int32 nWidth = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (UINT32)1 ); + sal_Int32 nWidth = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (sal_uInt32)1 ); m_aWidthMF.SetValue(m_aWidthMF.Normalize(nWidth), FUNIT_TWIP); pItem = GetItem( rSet, SID_ATTR_TRANSFORM_HEIGHT ); - sal_Int32 nHeight = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (UINT32)1 ); + sal_Int32 nHeight = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (sal_uInt32)1 ); m_aHeightMF.SetValue(m_aHeightMF.Normalize(nHeight), FUNIT_TWIP); m_fWidthHeightRatio = nHeight ? double(nWidth) / double(nHeight) : 1.0; @@ -990,12 +990,12 @@ int SvxSwPosSizeTabPage::DeactivatePage( SfxItemSet* _pSet ) return( LEAVE_PAGE ); } -void SvxSwPosSizeTabPage::EnableAnchorTypes(USHORT nAnchorEnable) +void SvxSwPosSizeTabPage::EnableAnchorTypes(sal_uInt16 nAnchorEnable) { if((nAnchorEnable & SVX_OBJ_AT_FLY)) m_aToFrameRB.Show(); if(!(nAnchorEnable & SVX_OBJ_PAGE)) - m_aToPageRB.Enable(FALSE); + m_aToPageRB.Enable(sal_False); } short SvxSwPosSizeTabPage::GetAnchorType(bool* pbHasChanged) @@ -1056,9 +1056,9 @@ IMPL_LINK( SvxSwPosSizeTabPage, RangeModifyHdl, Edit *, EMPTYARG ) if ( m_pHMap ) { // Ausrichtung Horizontal - USHORT nMapPos = GetMapPos(m_pHMap, m_aHoriToLB); - USHORT nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); - USHORT nRel = GetRelation(m_pHMap, m_aHoriToLB); + sal_uInt16 nMapPos = GetMapPos(m_pHMap, m_aHoriToLB); + sal_uInt16 nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); + sal_uInt16 nRel = GetRelation(m_pHMap, m_aHoriToLB); aVal.nHoriOrient = (short)nAlign; aVal.nHRelOrient = (short)nRel; @@ -1069,9 +1069,9 @@ IMPL_LINK( SvxSwPosSizeTabPage, RangeModifyHdl, Edit *, EMPTYARG ) if ( m_pVMap ) { // Ausrichtung Vertikal - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); - USHORT nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); - USHORT nRel = GetRelation(m_pVMap, m_aVertToLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); + sal_uInt16 nRel = GetRelation(m_pVMap, m_aVertToLB); aVal.nVertOrient = (short)nAlign; aVal.nVRelOrient = (short)nRel; @@ -1155,20 +1155,20 @@ IMPL_LINK( SvxSwPosSizeTabPage, MirrorHdl, CheckBox *, EMPTYARG ) IMPL_LINK( SvxSwPosSizeTabPage, RelHdl, ListBox *, pLB ) { - BOOL bHori = pLB == &m_aHoriToLB; + sal_Bool bHori = pLB == &m_aHoriToLB; UpdateExample(); if (bHori) - m_bAtHoriPosModified = TRUE; + m_bAtHoriPosModified = sal_True; else - m_bAtVertPosModified = TRUE; + m_bAtVertPosModified = sal_True; if(m_bHtmlMode && TextContentAnchorType_AT_CHARACTER == GetAnchorType()) // wieder Sonderbehandlung { if(bHori) { - USHORT nRel = GetRelation(m_pHMap, m_aHoriToLB); + sal_uInt16 nRel = GetRelation(m_pHMap, m_aHoriToLB); if(RelOrientation::PRINT_AREA == nRel && 0 == m_aVertLB.GetSelectEntryPos()) { m_aVertLB.SelectEntryPos(1); @@ -1188,24 +1188,24 @@ IMPL_LINK( SvxSwPosSizeTabPage, RelHdl, ListBox *, pLB ) IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) { - BOOL bHori = pLB == &m_aHoriLB; + sal_Bool bHori = pLB == &m_aHoriLB; ListBox *pRelLB = bHori ? &m_aHoriToLB : &m_aVertToLB; FixedText *pRelFT = bHori ? &m_aHoriToFT : &m_aVertToFT; FrmMap *pMap = bHori ? m_pHMap : m_pVMap; - USHORT nMapPos = GetMapPos(pMap, *pLB); - USHORT nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB); + sal_uInt16 nMapPos = GetMapPos(pMap, *pLB); + sal_uInt16 nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB); if (bHori) { - BOOL bEnable = HoriOrientation::NONE == nAlign; + sal_Bool bEnable = HoriOrientation::NONE == nAlign; m_aHoriByMF.Enable( bEnable ); m_aHoriByFT.Enable( bEnable ); } else { - BOOL bEnable = VertOrientation::NONE == nAlign; + sal_Bool bEnable = VertOrientation::NONE == nAlign; m_aVertByMF.Enable( bEnable ); m_aVertByFT.Enable( bEnable ); } @@ -1228,15 +1228,15 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) UpdateExample(); if (bHori) - m_bAtHoriPosModified = TRUE; + m_bAtHoriPosModified = sal_True; else - m_bAtVertPosModified = TRUE; + m_bAtVertPosModified = sal_True; // Sonderbehandlung fuer HTML-Mode mit horz-vert-Abhaengigkeiten if(m_bHtmlMode && m_nHtmlMode & HTMLMODE_SOME_ABS_POS && TextContentAnchorType_AT_CHARACTER == GetAnchorType()) { - BOOL bSet = FALSE; + sal_Bool bSet = sal_False; if(bHori) { // rechts ist nur unterhalb erlaubt - von links nur oben @@ -1248,17 +1248,17 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) m_aVertLB.SelectEntryPos(1); else m_aVertLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } else if(HoriOrientation::LEFT == nAlign && 1 == m_aVertLB.GetSelectEntryPos()) { m_aVertLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } else if(HoriOrientation::NONE == nAlign && 1 == m_aVertLB.GetSelectEntryPos()) { m_aVertLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } if(bSet) PosHdl(&m_aVertLB); @@ -1270,7 +1270,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) if(1 == m_aHoriLB.GetSelectEntryPos()) { m_aHoriLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } m_aHoriToLB.SelectEntryPos(1); } @@ -1279,7 +1279,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) if(2 == m_aHoriLB.GetSelectEntryPos()) { m_aHoriLB.SelectEntryPos(0); - bSet = TRUE; + bSet = sal_True; } m_aHoriToLB.SelectEntryPos(0) ; } @@ -1322,7 +1322,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, ProtectHdl, TriStateBox *, EMPTYARG) short SvxSwPosSizeTabPage::GetRelation(FrmMap *, ListBox &rRelationLB) { short nRel = 0; - USHORT nPos = rRelationLB.GetSelectEntryPos(); + sal_uInt16 nPos = rRelationLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND) { @@ -1333,7 +1333,7 @@ short SvxSwPosSizeTabPage::GetRelation(FrmMap *, ListBox &rRelationLB) return nRel; } -short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/*rAlignLB*/, ListBox &rRelationLB) +short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &/*rAlignLB*/, ListBox &rRelationLB) { short nAlign = 0; @@ -1344,7 +1344,7 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/ { if (rRelationLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) { - ULONG nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation; + sal_uLong nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation; std::size_t nMapCount = ::lcl_GetFrmMapCount(pMap); SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId; @@ -1352,7 +1352,7 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/ { if (pMap[i].eStrId == eStrId) { - ULONG nLBRelations = pMap[i].nLBRelations; + sal_uLong nLBRelations = pMap[i].nLBRelations; if (nLBRelations & nRel) { nAlign = pMap[i].nAlign; @@ -1368,10 +1368,10 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &/ return nAlign; } -USHORT SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) +sal_uInt16 SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) { - USHORT nMapPos = 0; - USHORT nLBSelPos = rAlignLB.GetSelectEntryPos(); + sal_uInt16 nMapPos = 0; + sal_uInt16 nLBSelPos = rAlignLB.GetSelectEntryPos(); if (nLBSelPos != LISTBOX_ENTRY_NOTFOUND) { @@ -1388,7 +1388,7 @@ USHORT SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) if (sEntry == sSelEntry) { - nMapPos = sal::static_int_cast< USHORT >(i); + nMapPos = sal::static_int_cast< sal_uInt16 >(i); break; } } @@ -1401,14 +1401,14 @@ USHORT SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) } void SvxSwPosSizeTabPage::InitPos(short nAnchor, - USHORT nH, - USHORT nHRel, - USHORT nV, - USHORT nVRel, + sal_uInt16 nH, + sal_uInt16 nHRel, + sal_uInt16 nV, + sal_uInt16 nVRel, long nX, long nY) { - USHORT nPos = m_aVertLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aVertLB.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND && m_pVMap ) { m_nOldV = m_pVMap[nPos].nAlign; @@ -1427,7 +1427,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, m_nOldHRel = ((RelationMap *)m_aHoriToLB.GetEntryData(nPos))->nRelation; } - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; if( m_bIsMultiSelection ) { m_pVMap = aVMultiSelectionMap; @@ -1475,7 +1475,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, { m_pVMap = m_bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap; m_pHMap = 0; - bEnable = FALSE; + bEnable = sal_False; } m_aHoriLB.Enable( bEnable ); m_aHoriFT.Enable( bEnable ); @@ -1488,7 +1488,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, nHRel = m_nOldHRel; } // #i22341# - pass <nHRel> as 3rd parameter to method <FillPosLB> - USHORT nMapPos = FillPosLB(m_pHMap, nH, nHRel, m_aHoriLB); + sal_uInt16 nMapPos = FillPosLB(m_pHMap, nH, nHRel, m_aHoriLB); FillRelLB(m_pHMap, nMapPos, nH, nHRel, m_aHoriToLB, m_aHoriToFT); // Vertikal @@ -1552,10 +1552,10 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor, void SvxSwPosSizeTabPage::UpdateExample() { - USHORT nPos = m_aHoriLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aHoriLB.GetSelectEntryPos(); if ( m_pHMap && nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nMapPos = GetMapPos(m_pHMap, m_aHoriLB); + sal_uInt16 nMapPos = GetMapPos(m_pHMap, m_aHoriLB); short nAlign = GetAlignment(m_pHMap, nMapPos, m_aHoriLB, m_aHoriToLB); short nRel = GetRelation(m_pHMap, m_aHoriToLB); @@ -1566,9 +1566,9 @@ void SvxSwPosSizeTabPage::UpdateExample() nPos = m_aVertLB.GetSelectEntryPos(); if ( m_pVMap && nPos != LISTBOX_ENTRY_NOTFOUND ) { - USHORT nMapPos = GetMapPos(m_pVMap, m_aVertLB); - USHORT nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); - USHORT nRel = GetRelation(m_pVMap, m_aVertToLB); + sal_uInt16 nMapPos = GetMapPos(m_pVMap, m_aVertLB); + sal_uInt16 nAlign = GetAlignment(m_pVMap, nMapPos, m_aVertLB, m_aVertToLB); + sal_uInt16 nRel = GetRelation(m_pVMap, m_aVertToLB); m_aExampleWN.SetVAlign(nAlign); m_aExampleWN.SetVertRel(nRel); @@ -1583,11 +1583,11 @@ void SvxSwPosSizeTabPage::UpdateExample() m_aExampleWN.Invalidate(); } -ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign, - USHORT nRel, ListBox &rLB, FixedText &rFT) +sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_uInt16 nAlign, + sal_uInt16 nRel, ListBox &rLB, FixedText &rFT) { String sSelEntry; - ULONG nLBRelations = 0; + sal_uLong nLBRelations = 0; std::size_t nMapCount = ::lcl_GetFrmMapCount(pMap); rLB.Clear(); @@ -1597,7 +1597,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign if (pMap == aVAsCharHtmlMap || pMap == aVAsCharMap) { String sOldEntry(rLB.GetSelectEntry()); - USHORT nRelCount = SAL_N_ELEMENTS(aAsCharRelationMap); + sal_uInt16 nRelCount = SAL_N_ELEMENTS(aAsCharRelationMap); SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId; for (std::size_t _nMapPos = 0; _nMapPos < nMapCount; _nMapPos++) @@ -1605,7 +1605,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign if (pMap[_nMapPos].eStrId == eStrId) { nLBRelations = pMap[_nMapPos].nLBRelations; - for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++) + for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++) { if (nLBRelations & aAsCharRelationMap[nRelPos].nLBRelation) { @@ -1613,7 +1613,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft); String sEntry = m_aFramePosString.GetString(sStrId1); - USHORT nPos = rLB.InsertEntry(sEntry); + sal_uInt16 nPos = rLB.InsertEntry(sEntry); rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]); if (pMap[_nMapPos].nAlign == nAlign) sSelEntry = sEntry; @@ -1630,7 +1630,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign if (!rLB.GetSelectEntryCount()) { - for (USHORT i = 0; i < rLB.GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < rLB.GetEntryCount(); i++) { RelationMap *pEntry = (RelationMap *)rLB.GetEntryData(i); if (pEntry->nLBRelation == LB_REL_CHAR) // Default @@ -1644,7 +1644,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign } else { - USHORT nRelCount = SAL_N_ELEMENTS(aRelationMap); + sal_uInt16 nRelCount = SAL_N_ELEMENTS(aRelationMap); // #i22341# - special handling for map <aVCharMap>, // because its ambigous in its <eStrId>/<eMirrorStrId>. @@ -1661,18 +1661,18 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign nLBRelations = pMap[nMapPos].nLBRelations; } - for (ULONG nBit = 1; nBit < 0x80000000; nBit <<= 1) + for (sal_uLong nBit = 1; nBit < 0x80000000; nBit <<= 1) { if (nLBRelations & nBit) { - for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++) + for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++) { if (aRelationMap[nRelPos].nLBRelation == nBit) { SvxSwFramePosString::StringId sStrId1 = m_aHoriMirrorCB.IsChecked() ? aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId; sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft); String sEntry = m_aFramePosString.GetString(sStrId1); - USHORT nPos = rLB.InsertEntry(sEntry); + sal_uInt16 nPos = rLB.InsertEntry(sEntry); rLB.SetEntryData(nPos, &aRelationMap[nRelPos]); if (!sSelEntry.Len() && aRelationMap[nRelPos].nRelation == nRel) sSelEntry = sEntry; @@ -1705,7 +1705,7 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign break; } - for (USHORT i = 0; i < rLB.GetEntryCount(); i++) + for (sal_uInt16 i = 0; i < rLB.GetEntryCount(); i++) { RelationMap *pEntry = (RelationMap *)rLB.GetEntryData(i); if (pEntry->nRelation == nRel) @@ -1729,9 +1729,9 @@ ULONG SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, USHORT nMapPos, USHORT nAlign return nLBRelations; } -USHORT SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, - USHORT _nAlign, - const USHORT _nRel, +sal_uInt16 SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, + sal_uInt16 _nAlign, + const sal_uInt16 _nRel, ListBox &_rLB) { String sSelEntry, sOldEntry; @@ -1741,7 +1741,7 @@ USHORT SvxSwPosSizeTabPage::FillPosLB(FrmMap *_pMap, // #i22341# - determine all possible listbox relations for // given relation for map <aVCharMap> - const ULONG nLBRelations = (_pMap != aVCharMap) + const sal_uLong nLBRelations = (_pMap != aVCharMap) ? 0L : ::lcl_GetLBRelationsForRelations( _nRel ); @@ -1807,27 +1807,27 @@ void SvxSwPosSizeTabPage::SetView( const SdrView* pSdrView ) if( m_aAnchorPos != Point(0,0) ) // -> Writer { - for( USHORT i = 1; i < rMarkList.GetMarkCount(); i++ ) + for( sal_uInt16 i = 1; i < rMarkList.GetMarkCount(); i++ ) { pObj = rMarkList.GetMark( i )->GetMarkedSdrObj(); if( m_aAnchorPos != pObj->GetAnchorPos() ) { // different anchor positions -> disable positioning - m_aPositionFL.Enable(FALSE); - m_aHoriFT.Enable(FALSE); - m_aHoriLB.Enable(FALSE); - m_aHoriByFT.Enable(FALSE); - m_aHoriByMF.Enable(FALSE); - m_aHoriToFT.Enable(FALSE); - m_aHoriToLB.Enable(FALSE); - m_aHoriMirrorCB.Enable(FALSE); - m_aVertFT.Enable(FALSE); - m_aVertLB.Enable(FALSE); - m_aVertByFT.Enable(FALSE); - m_aVertByMF.Enable(FALSE); - m_aVertToFT.Enable(FALSE); - m_aVertToLB.Enable(FALSE); - m_aFollowCB.Enable(FALSE); + m_aPositionFL.Enable(sal_False); + m_aHoriFT.Enable(sal_False); + m_aHoriLB.Enable(sal_False); + m_aHoriByFT.Enable(sal_False); + m_aHoriByMF.Enable(sal_False); + m_aHoriToFT.Enable(sal_False); + m_aHoriToLB.Enable(sal_False); + m_aHoriMirrorCB.Enable(sal_False); + m_aVertFT.Enable(sal_False); + m_aVertLB.Enable(sal_False); + m_aVertByFT.Enable(sal_False); + m_aVertByMF.Enable(sal_False); + m_aVertToFT.Enable(sal_False); + m_aVertToLB.Enable(sal_False); + m_aFollowCB.Enable(sal_False); m_aHoriByMF.SetText(String()); m_aVertByMF.SetText(String()); diff --git a/cui/source/tabpages/swpossizetabpage.hxx b/cui/source/tabpages/swpossizetabpage.hxx index e3a6adb10..22821099d 100644 --- a/cui/source/tabpages/swpossizetabpage.hxx +++ b/cui/source/tabpages/swpossizetabpage.hxx @@ -103,7 +103,7 @@ class SvxSwPosSizeTabPage : public SfxTabPage short m_nOldVRel; double m_fWidthHeightRatio; //width-to-height ratio to support the KeepRatio button - USHORT m_nHtmlMode; + sal_uInt16 m_nHtmlMode; bool m_bHtmlMode; bool m_bAtHoriPosModified; bool m_bAtVertPosModified; @@ -122,15 +122,15 @@ class SvxSwPosSizeTabPage : public SfxTabPage DECL_LINK( ModifyHdl, Edit * ); DECL_LINK( ProtectHdl, TriStateBox *); - void InitPos(short nAnchorType, USHORT nH, USHORT nHRel, - USHORT nV, USHORT nVRel, + void InitPos(short nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel, + sal_uInt16 nV, sal_uInt16 nVRel, long nX, long nY); - USHORT GetMapPos(FrmMap *pMap, ListBox &rAlignLB); - short GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); + sal_uInt16 GetMapPos(FrmMap *pMap, ListBox &rAlignLB); + short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); short GetRelation(FrmMap *pMap, ListBox &rRelationLB); short GetAnchorType(bool* pbHasChanged = 0); - ULONG FillRelLB(FrmMap *pMap, USHORT nLBSelPos, USHORT nAlign, USHORT nRel, ListBox &rLB, FixedText &rFT); - USHORT FillPosLB(FrmMap *pMap, USHORT nAlign, const USHORT _nRel, ListBox &rLB); + sal_uLong FillRelLB(FrmMap *pMap, sal_uInt16 nLBSelPos, sal_uInt16 nAlign, sal_uInt16 nRel, ListBox &rLB, FixedText &rFT); + sal_uInt16 FillPosLB(FrmMap *pMap, sal_uInt16 nAlign, const sal_uInt16 _nRel, ListBox &rLB); void UpdateExample(); @@ -139,14 +139,14 @@ public: ~SvxSwPosSizeTabPage(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& ); + virtual sal_Bool FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); virtual int DeactivatePage( SfxItemSet* pSet ); - void EnableAnchorTypes(USHORT nAnchorEnable); + void EnableAnchorTypes(sal_uInt16 nAnchorEnable); void SetValidateFramePosLink( const Link& rLink ) {m_aValidateLink = rLink;} diff --git a/cui/source/tabpages/swpossizetabpage.src b/cui/source/tabpages/swpossizetabpage.src index d8bcad8e8..58b9832c1 100644 --- a/cui/source/tabpages/swpossizetabpage.src +++ b/cui/source/tabpages/swpossizetabpage.src @@ -52,6 +52,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; MetricField MF_WIDTH { + HelpID = "cui:MetricField:RID_SVXPAGE_SWPOSSIZE:MF_WIDTH"; Pos = MAP_APPFONT ( 59 , 14 ) ; Size = MAP_APPFONT ( 45 , 12 ) ; Border = TRUE ; @@ -77,6 +78,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; MetricField MF_HEIGHT { + HelpID = "cui:MetricField:RID_SVXPAGE_SWPOSSIZE:MF_HEIGHT"; Pos = MAP_APPFONT ( 59 , 30 ) ; Size = MAP_APPFONT ( 45 , 12 ) ; Border = TRUE ; @@ -95,6 +97,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; CheckBox CB_KEEPRATIO { + HelpID = "cui:CheckBox:RID_SVXPAGE_SWPOSSIZE:CB_KEEPRATIO"; Pos = MAP_APPFONT ( 12 , 45 ) ; Size = MAP_APPFONT ( 95 , 10 ) ; TabStop = TRUE ; @@ -114,30 +117,35 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; RadioButton RB_TOPAGE { + HelpID = "cui:RadioButton:RID_SVXPAGE_SWPOSSIZE:RB_TOPAGE"; Pos = MAP_APPFONT ( 122 , 14 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To ~page"; }; RadioButton RB_TOPARA { + HelpID = "cui:RadioButton:RID_SVXPAGE_SWPOSSIZE:RB_TOPARA"; Pos = MAP_APPFONT ( 122 , 28 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To paragrap~h"; }; RadioButton RB_TOCHAR { + HelpID = "cui:RadioButton:RID_SVXPAGE_SWPOSSIZE:RB_TOCHAR"; Pos = MAP_APPFONT ( 122 , 42 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "To cha~racter"; }; RadioButton RB_ASCHAR { + HelpID = "cui:RadioButton:RID_SVXPAGE_SWPOSSIZE:RB_ASCHAR"; Pos = MAP_APPFONT ( 122 , 56 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; Text [ en-US ] = "~As character" ; }; RadioButton RB_TOFRAME { + HelpID = "cui:RadioButton:RID_SVXPAGE_SWPOSSIZE:RB_TOFRAME"; Hide = TRUE; Pos = MAP_APPFONT ( 122 , 70 ) ; Size = MAP_APPFONT ( 70 , 10 ) ; @@ -156,6 +164,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; TriStateBox CB_POSITION { + HelpID = "cui:TriStateBox:RID_SVXPAGE_SWPOSSIZE:CB_POSITION"; Pos = MAP_APPFONT ( 12 , 97 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; TabStop = TRUE ; @@ -163,6 +172,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; TriStateBox CB_SIZE { + HelpID = "cui:TriStateBox:RID_SVXPAGE_SWPOSSIZE:CB_SIZE"; Pos = MAP_APPFONT ( 122 , 97 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; TabStop = TRUE ; @@ -183,6 +193,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; ListBox LB_HORI { + HelpID = "cui:ListBox:RID_SVXPAGE_SWPOSSIZE:LB_HORI"; Pos = MAP_APPFONT ( 49 , 124 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; TabStop = TRUE ; @@ -197,6 +208,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; MetricField MF_HORIBY { + HelpID = "cui:MetricField:RID_SVXPAGE_SWPOSSIZE:MF_HORIBY"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 124 ) ; Size = MAP_APPFONT ( 35 , 12 ) ; @@ -221,6 +233,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; ListBox LB_HORITO { + HelpID = "cui:ListBox:RID_SVXPAGE_SWPOSSIZE:LB_HORITO"; Pos = MAP_APPFONT ( 183 , 124 ) ; Size = MAP_APPFONT ( 65 , 60 ) ; TabStop = TRUE ; @@ -228,6 +241,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; CheckBox CB_HORIMIRROR { + HelpID = "cui:CheckBox:RID_SVXPAGE_SWPOSSIZE:CB_HORIMIRROR"; Pos = MAP_APPFONT ( 12 , 139 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -242,6 +256,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; ListBox LB_VERT { + HelpID = "cui:ListBox:RID_SVXPAGE_SWPOSSIZE:LB_VERT"; Pos = MAP_APPFONT ( 49 , 153 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; TabStop = TRUE ; @@ -256,6 +271,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; MetricField MF_VERTBY { + HelpID = "cui:MetricField:RID_SVXPAGE_SWPOSSIZE:MF_VERTBY"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 153 ) ; Size = MAP_APPFONT ( 35 , 12 ) ; @@ -280,6 +296,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; ListBox LB_VERTTO { + HelpID = "cui:ListBox:RID_SVXPAGE_SWPOSSIZE:LB_VERTTO"; Pos = MAP_APPFONT ( 183 , 153 ) ; Size = MAP_APPFONT ( 65 , 60 ) ; TabStop = TRUE ; @@ -287,6 +304,7 @@ TabPage RID_SVXPAGE_SWPOSSIZE }; CheckBox CB_FOLLOW { + HelpID = "cui:CheckBox:RID_SVXPAGE_SWPOSSIZE:CB_FOLLOW"; Pos = MAP_APPFONT ( 12 , 168 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; TabStop = TRUE ; diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx index 36b1f3a38..95491d538 100644 --- a/cui/source/tabpages/tabarea.cxx +++ b/cui/source/tabpages/tabarea.cxx @@ -84,7 +84,7 @@ SvxAreaTabDialog::SvxAreaTabDialog mnDlgType( 0 ), mnPos( 0 ), mbAreaTP( sal_False ), - mbDeleteColorTable( TRUE ) + mbDeleteColorTable( sal_True ) { FreeResource(); @@ -240,7 +240,7 @@ short SvxAreaTabDialog::Ok() SavePalettes(); // Es wird RET_OK zurueckgeliefert, wenn wenigstens eine - // TabPage in FillItemSet() TRUE zurueckliefert. Dieses + // TabPage in FillItemSet() sal_True zurueckliefert. Dieses // geschieht z.Z. standardmaessig. return( SfxTabDialog::Ok() ); } @@ -258,7 +258,7 @@ IMPL_LINK_INLINE_END( SvxAreaTabDialog, CancelHdlImpl, void *, p ) // ----------------------------------------------------------------------- -void SvxAreaTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { diff --git a/cui/source/tabpages/tabarea.hrc b/cui/source/tabpages/tabarea.hrc index dfa14dd7f..efb48ff7a 100644 --- a/cui/source/tabpages/tabarea.hrc +++ b/cui/source/tabpages/tabarea.hrc @@ -185,3 +185,7 @@ #define IMG_LOAD_H 23 #define IMG_SAVE_H 24 +// IAccessibility2 implementation 2009 ------ +#define STR_CUI_COLORMODEL 5030 +#define STR_LB_HATCHINGSTYLE 5031 +// ------ IAccessibility2 implementation 2009. diff --git a/cui/source/tabpages/tabarea.src b/cui/source/tabpages/tabarea.src index df36c6b0e..24b4c1068 100644 --- a/cui/source/tabpages/tabarea.src +++ b/cui/source/tabpages/tabarea.src @@ -51,18 +51,21 @@ TabPage RID_SVXPAGE_TRANSPARENCE }; RadioButton RBT_TRANS_OFF { + HelpID = "cui:RadioButton:RID_SVXPAGE_TRANSPARENCE:RBT_TRANS_OFF"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 110 , 10 ) ; Text [ en-US ] = "~No transparency"; }; RadioButton RBT_TRANS_LINEAR { + HelpID = "cui:RadioButton:RID_SVXPAGE_TRANSPARENCE:RBT_TRANS_LINEAR"; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 60 , 10 ) ; Text [ en-US ] = "~Transparency"; }; MetricField MTR_TRANSPARENT { + HelpID = "cui:MetricField:RID_SVXPAGE_TRANSPARENCE:MTR_TRANSPARENT"; Border = TRUE ; Pos = MAP_APPFONT ( 72 , 26 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -78,6 +81,7 @@ TabPage RID_SVXPAGE_TRANSPARENCE }; RadioButton RBT_TRANS_GRADIENT { + HelpID = "cui:RadioButton:RID_SVXPAGE_TRANSPARENCE:RBT_TRANS_GRADIENT"; Pos = MAP_APPFONT ( 12 , 42 ) ; Size = MAP_APPFONT ( 110 , 10 ) ; Text [ en-US ] = "Gradient"; @@ -90,6 +94,7 @@ TabPage RID_SVXPAGE_TRANSPARENCE }; ListBox LB_TRGR_GRADIENT_TYPES { + HelpID = "cui:ListBox:RID_SVXPAGE_TRANSPARENCE:LB_TRGR_GRADIENT_TYPES"; Border = TRUE ; Pos = MAP_APPFONT ( 72 , 54 ) ; Size = MAP_APPFONT ( 53 , 63 ) ; @@ -113,6 +118,7 @@ TabPage RID_SVXPAGE_TRANSPARENCE }; MetricField MTR_TRGR_CENTER_X { + HelpID = "cui:MetricField:RID_SVXPAGE_TRANSPARENCE:MTR_TRGR_CENTER_X"; Border = TRUE ; Pos = MAP_APPFONT ( 72 , 70 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -134,6 +140,7 @@ TabPage RID_SVXPAGE_TRANSPARENCE }; MetricField MTR_TRGR_CENTER_Y { + HelpID = "cui:MetricField:RID_SVXPAGE_TRANSPARENCE:MTR_TRGR_CENTER_Y"; Border = TRUE ; Pos = MAP_APPFONT ( 72 , 86 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -155,6 +162,7 @@ TabPage RID_SVXPAGE_TRANSPARENCE }; MetricField MTR_TRGR_ANGLE { + HelpID = "cui:MetricField:RID_SVXPAGE_TRANSPARENCE:MTR_TRGR_ANGLE"; Border = TRUE ; Pos = MAP_APPFONT ( 72 , 102 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -175,6 +183,7 @@ TabPage RID_SVXPAGE_TRANSPARENCE }; MetricField MTR_TRGR_BORDER { + HelpID = "cui:MetricField:RID_SVXPAGE_TRANSPARENCE:MTR_TRGR_BORDER"; Border = TRUE ; Pos = MAP_APPFONT ( 66 + TRANS_GRAD_OFFSET_X, 54 + TRANS_GRAD_OFFSET_Y) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -196,6 +205,7 @@ TabPage RID_SVXPAGE_TRANSPARENCE }; MetricField MTR_TRGR_START_VALUE { + HelpID = "cui:MetricField:RID_SVXPAGE_TRANSPARENCE:MTR_TRGR_START_VALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 72 , 134 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -217,6 +227,7 @@ TabPage RID_SVXPAGE_TRANSPARENCE }; MetricField MTR_TRGR_END_VALUE { + HelpID = "cui:MetricField:RID_SVXPAGE_TRANSPARENCE:MTR_TRGR_END_VALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 72 , 150 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -261,6 +272,7 @@ TabPage RID_SVXPAGE_AREA }; ListBox LB_AREA_TYPE { + HelpID = "cui:ListBox:RID_SVXPAGE_AREA:LB_AREA_TYPE"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 108 , 60 ) ; DropDown = TRUE; @@ -278,6 +290,7 @@ TabPage RID_SVXPAGE_AREA ListBox LB_COLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_AREA:LB_COLOR"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 108 , 103 ) ; @@ -285,6 +298,7 @@ TabPage RID_SVXPAGE_AREA }; ListBox LB_GRADIENT { + HelpID = "cui:ListBox:RID_SVXPAGE_AREA:LB_GRADIENT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 108 , 103 ) ; @@ -292,6 +306,7 @@ TabPage RID_SVXPAGE_AREA }; ListBox LB_HATCHING { + HelpID = "cui:ListBox:RID_SVXPAGE_AREA:LB_HATCHING"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 108 , 103 ) ; @@ -299,6 +314,7 @@ TabPage RID_SVXPAGE_AREA }; ListBox LB_BITMAP { + HelpID = "cui:ListBox:RID_SVXPAGE_AREA:LB_BITMAP"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 30 ) ; Size = MAP_APPFONT ( 108 , 103 ) ; @@ -331,6 +347,7 @@ TabPage RID_SVXPAGE_AREA }; TriStateBox TSB_STEPCOUNT { + HelpID = "cui:TriStateBox:RID_SVXPAGE_AREA:TSB_STEPCOUNT"; Pos = MAP_APPFONT ( 138 , 15 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; TabStop = TRUE ; @@ -338,6 +355,7 @@ TabPage RID_SVXPAGE_AREA }; NumericField NUM_FLD_STEPCOUNT { + HelpID = "cui:NumericField:RID_SVXPAGE_AREA:NUM_FLD_STEPCOUNT"; Border = TRUE ; Pos = MAP_APPFONT ( 208 , 14 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -355,6 +373,7 @@ TabPage RID_SVXPAGE_AREA CheckBox CB_HATCHBCKGRD { + HelpID = "cui:CheckBox:RID_SVXPAGE_AREA:CB_HATCHBCKGRD"; Pos = MAP_APPFONT ( 132 , 3 ) ; Size = MAP_APPFONT ( 122 , 10 ) ; TabStop = TRUE ; @@ -362,6 +381,7 @@ TabPage RID_SVXPAGE_AREA }; ListBox LB_HATCHBCKGRDCOLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_AREA:LB_HATCHBCKGRDCOLOR"; Border = TRUE ; Pos = MAP_APPFONT ( 141 , 16 ) ; Size = MAP_APPFONT ( 70 , 100 ) ; @@ -380,6 +400,7 @@ TabPage RID_SVXPAGE_AREA }; TriStateBox TSB_ORIGINAL { + HelpID = "cui:TriStateBox:RID_SVXPAGE_AREA:TSB_ORIGINAL"; Pos = MAP_APPFONT ( 138 , 15 ) ; Size = MAP_APPFONT ( 48 , 10 ) ; TabStop = TRUE ; @@ -387,6 +408,7 @@ TabPage RID_SVXPAGE_AREA }; TriStateBox TSB_SCALE { + HelpID = "cui:TriStateBox:RID_SVXPAGE_AREA:TSB_SCALE"; Pos = MAP_APPFONT ( 138 , 30 ) ; Size = MAP_APPFONT ( 48 , 10 ) ; TabStop = TRUE ; @@ -400,6 +422,7 @@ TabPage RID_SVXPAGE_AREA }; MetricField MTR_FLD_X_SIZE { + HelpID = "cui:MetricField:RID_SVXPAGE_AREA:MTR_FLD_X_SIZE"; Border = TRUE ; Pos = MAP_APPFONT ( 212 , 14 ) ; Size = MAP_APPFONT ( 36 , 12 ) ; @@ -424,6 +447,7 @@ TabPage RID_SVXPAGE_AREA }; MetricField MTR_FLD_Y_SIZE { + HelpID = "cui:MetricField:RID_SVXPAGE_AREA:MTR_FLD_Y_SIZE"; Border = TRUE ; Pos = MAP_APPFONT ( 212 , 29 ) ; Size = MAP_APPFONT ( 36 , 12 ) ; @@ -469,6 +493,7 @@ TabPage RID_SVXPAGE_AREA }; MetricField MTR_FLD_X_OFFSET { + HelpID = "cui:MetricField:RID_SVXPAGE_AREA:MTR_FLD_X_OFFSET"; Border = TRUE ; Pos = MAP_APPFONT ( 219 , 87 ) ; Size = MAP_APPFONT ( 29 , 12 ) ; @@ -484,6 +509,7 @@ TabPage RID_SVXPAGE_AREA }; MetricField MTR_FLD_Y_OFFSET { + HelpID = "cui:MetricField:RID_SVXPAGE_AREA:MTR_FLD_Y_OFFSET"; Border = TRUE ; Pos = MAP_APPFONT ( 219 , 102 ) ; Size = MAP_APPFONT ( 29 , 12 ) ; @@ -499,6 +525,7 @@ TabPage RID_SVXPAGE_AREA }; TriStateBox TSB_TILE { + HelpID = "cui:TriStateBox:RID_SVXPAGE_AREA:TSB_TILE"; Pos = MAP_APPFONT ( 138 , 117 ) ; Size = MAP_APPFONT ( 54 , 10 ) ; TabStop = TRUE ; @@ -506,6 +533,7 @@ TabPage RID_SVXPAGE_AREA }; TriStateBox TSB_STRETCH { + HelpID = "cui:TriStateBox:RID_SVXPAGE_AREA:TSB_STRETCH"; Pos = MAP_APPFONT ( 194 , 117 ) ; Size = MAP_APPFONT ( 54 , 10 ) ; TabStop = TRUE ; @@ -519,18 +547,21 @@ TabPage RID_SVXPAGE_AREA }; RadioButton RBT_ROW { + HelpID = "cui:RadioButton:RID_SVXPAGE_AREA:RBT_ROW"; Pos = MAP_APPFONT ( 138 , 144 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; Text [ en-US ] = "Ro~w" ; }; RadioButton RBT_COLUMN { + HelpID = "cui:RadioButton:RID_SVXPAGE_AREA:RBT_COLUMN"; Pos = MAP_APPFONT ( 138 , 158 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; Text [ en-US ] = "Colu~mn" ; }; MetricField MTR_FLD_OFFSET { + HelpID = "cui:MetricField:RID_SVXPAGE_AREA:MTR_FLD_OFFSET"; Border = TRUE ; Pos = MAP_APPFONT ( 219 , 157 ) ; Size = MAP_APPFONT ( 29 , 12 ) ; @@ -560,6 +591,7 @@ TabPage RID_SVXPAGE_SHADOW }; TriStateBox TSB_SHOW_SHADOW { + HelpID = "cui:TriStateBox:RID_SVXPAGE_SHADOW:TSB_SHOW_SHADOW"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 110 , 10 ) ; TabStop = TRUE ; @@ -587,6 +619,7 @@ TabPage RID_SVXPAGE_SHADOW }; MetricField MTR_FLD_DISTANCE { + HelpID = "cui:MetricField:RID_SVXPAGE_SHADOW:MTR_FLD_DISTANCE"; Pos = MAP_APPFONT ( 65 , 67 ) ; Size = MAP_APPFONT ( 47 , 12 ) ; Border = TRUE ; @@ -604,6 +637,7 @@ TabPage RID_SVXPAGE_SHADOW }; ListBox LB_SHADOW_COLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_SHADOW:LB_SHADOW_COLOR"; Pos = MAP_APPFONT ( 65 , 86 ) ; Size = MAP_APPFONT ( 57 , 100 ) ; DropDown = TRUE ; @@ -625,6 +659,7 @@ TabPage RID_SVXPAGE_SHADOW }; MetricField MTR_SHADOW_TRANSPARENT { + HelpID = "cui:MetricField:RID_SVXPAGE_SHADOW:MTR_SHADOW_TRANSPARENT"; Border = TRUE ; Pos = MAP_APPFONT ( 65 , 105 ) ; Size = MAP_APPFONT ( 47 , 12 ) ; @@ -667,6 +702,7 @@ TabPage RID_SVXPAGE_HATCH }; MetricField MTR_FLD_DISTANCE { + HelpID = "cui:MetricField:RID_SVXPAGE_HATCH:MTR_FLD_DISTANCE"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; @@ -689,6 +725,7 @@ TabPage RID_SVXPAGE_HATCH }; MetricField MTR_FLD_ANGLE { + HelpID = "cui:MetricField:RID_SVXPAGE_HATCH:MTR_FLD_ANGLE"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 52 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; @@ -717,6 +754,7 @@ TabPage RID_SVXPAGE_HATCH }; ListBox LB_LINE_TYPE { + HelpID = "cui:ListBox:RID_SVXPAGE_HATCH:LB_LINE_TYPE"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 134 ) ; Size = MAP_APPFONT ( 62 , 62 ) ; @@ -737,6 +775,7 @@ TabPage RID_SVXPAGE_HATCH }; ListBox LB_LINE_COLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_HATCH:LB_LINE_COLOR"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 161 ) ; Size = MAP_APPFONT ( 62 , 100 ) ; @@ -746,6 +785,7 @@ TabPage RID_SVXPAGE_HATCH }; ListBox LB_HATCHINGS { + HelpID = "cui:ListBox:RID_SVXPAGE_HATCH:LB_HATCHINGS"; Border = TRUE ; Pos = MAP_APPFONT ( 103 , 14 ) ; Size = MAP_APPFONT ( 88 , 110 ) ; @@ -759,6 +799,7 @@ TabPage RID_SVXPAGE_HATCH }; PushButton BTN_ADD { + HelpID = "cui:PushButton:RID_SVXPAGE_HATCH:BTN_ADD"; Pos = MAP_APPFONT ( 197 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add..." ; @@ -766,6 +807,7 @@ TabPage RID_SVXPAGE_HATCH }; PushButton BTN_MODIFY { + HelpID = "cui:PushButton:RID_SVXPAGE_HATCH:BTN_MODIFY"; Pos = MAP_APPFONT ( 197 , 32 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Modify..." ; @@ -773,6 +815,7 @@ TabPage RID_SVXPAGE_HATCH }; PushButton BTN_DELETE { + HelpID = "cui:PushButton:RID_SVXPAGE_HATCH:BTN_DELETE"; Pos = MAP_APPFONT ( 197 , 68 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete..." ; @@ -780,6 +823,7 @@ TabPage RID_SVXPAGE_HATCH }; ImageButton BTN_LOAD { + HelpID = "cui:ImageButton:RID_SVXPAGE_HATCH:BTN_LOAD"; Pos = MAP_APPFONT ( 197 , 104 ) ; Size = MAP_APPFONT ( 16 , 16 ) ; TabStop = TRUE ; @@ -795,6 +839,7 @@ TabPage RID_SVXPAGE_HATCH }; ImageButton BTN_SAVE { + HelpID = "cui:ImageButton:RID_SVXPAGE_HATCH:BTN_SAVE"; Pos = MAP_APPFONT ( 197 , 124 ) ; Size = MAP_APPFONT ( 16 , 16 ) ; TabStop = TRUE ; @@ -843,6 +888,7 @@ TabPage RID_SVXPAGE_BITMAP }; ListBox LB_COLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_BITMAP:LB_COLOR"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 115 ) ; Size = MAP_APPFONT ( 62 , 100 ) ; @@ -858,6 +904,7 @@ TabPage RID_SVXPAGE_BITMAP }; ListBox LB_BACKGROUND_COLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_BITMAP:LB_BACKGROUND_COLOR"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 142 ) ; Size = MAP_APPFONT ( 62 , 100 ) ; @@ -872,6 +919,7 @@ TabPage RID_SVXPAGE_BITMAP }; ListBox LB_BITMAPS { + HelpID = "cui:ListBox:RID_SVXPAGE_BITMAP:LB_BITMAPS"; Border = TRUE ; Pos = MAP_APPFONT ( 103 , 14 ) ; Size = MAP_APPFONT ( 88 , 110 ) ; @@ -885,6 +933,7 @@ TabPage RID_SVXPAGE_BITMAP }; PushButton BTN_ADD { + HelpID = "cui:PushButton:RID_SVXPAGE_BITMAP:BTN_ADD"; Pos = MAP_APPFONT ( 197 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add..." ; @@ -892,6 +941,7 @@ TabPage RID_SVXPAGE_BITMAP }; PushButton BTN_MODIFY { + HelpID = "cui:PushButton:RID_SVXPAGE_BITMAP:BTN_MODIFY"; Pos = MAP_APPFONT ( 197 , 32 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Modify..." ; @@ -899,6 +949,7 @@ TabPage RID_SVXPAGE_BITMAP }; PushButton BTN_IMPORT { + HelpID = "cui:PushButton:RID_SVXPAGE_BITMAP:BTN_IMPORT"; Pos = MAP_APPFONT ( 197 , 50 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Import..." ; @@ -906,6 +957,7 @@ TabPage RID_SVXPAGE_BITMAP }; PushButton BTN_DELETE { + HelpID = "cui:PushButton:RID_SVXPAGE_BITMAP:BTN_DELETE"; Pos = MAP_APPFONT ( 197 , 68 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete..." ; @@ -913,6 +965,7 @@ TabPage RID_SVXPAGE_BITMAP }; ImageButton BTN_LOAD { + HelpID = "cui:ImageButton:RID_SVXPAGE_BITMAP:BTN_LOAD"; Pos = MAP_APPFONT ( 197 , 104 ) ; Size = MAP_APPFONT ( 16 , 16 ) ; TabStop = TRUE ; @@ -928,6 +981,7 @@ TabPage RID_SVXPAGE_BITMAP }; ImageButton BTN_SAVE { + HelpID = "cui:ImageButton:RID_SVXPAGE_BITMAP:BTN_SAVE"; Pos = MAP_APPFONT ( 197 , 124 ) ; Size = MAP_APPFONT ( 16 , 16 ) ; TabStop = TRUE ; @@ -963,6 +1017,7 @@ TabPage RID_SVXPAGE_GRADIENT }; ListBox LB_GRADIENT_TYPES { + HelpID = "cui:ListBox:RID_SVXPAGE_GRADIENT:LB_GRADIENT_TYPES"; Border = TRUE ; Pos = MAP_APPFONT ( 49 , 14 ) ; Size = MAP_APPFONT ( 48, 63 ) ; @@ -986,6 +1041,7 @@ TabPage RID_SVXPAGE_GRADIENT }; MetricField MTR_CENTER_X { + HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_CENTER_X"; Border = TRUE ; Pos = MAP_APPFONT ( 49 , 30 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -1007,6 +1063,7 @@ TabPage RID_SVXPAGE_GRADIENT }; MetricField MTR_CENTER_Y { + HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_CENTER_Y"; Border = TRUE ; Pos = MAP_APPFONT ( 49 , 46 ) ; Size = MAP_APPFONT ( 40, 12 ) ; @@ -1028,6 +1085,7 @@ TabPage RID_SVXPAGE_GRADIENT }; MetricField MTR_ANGLE { + HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_ANGLE"; Border = TRUE ; Pos = MAP_APPFONT ( 49 , 62 ) ; Size = MAP_APPFONT ( 40, 12 ) ; @@ -1048,6 +1106,7 @@ TabPage RID_SVXPAGE_GRADIENT }; MetricField MTR_BORDER { + HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_BORDER"; Border = TRUE ; Pos = MAP_APPFONT ( 49 , 78 ) ; Size = MAP_APPFONT ( 40, 12 ) ; @@ -1069,6 +1128,7 @@ TabPage RID_SVXPAGE_GRADIENT }; ListBox LB_COLOR_FROM { + HelpID = "cui:ListBox:RID_SVXPAGE_GRADIENT:LB_COLOR_FROM"; Border = TRUE ; Pos = MAP_APPFONT ( 49 , 97 ) ; Size = MAP_APPFONT ( 48, 100 ) ; @@ -1078,6 +1138,7 @@ TabPage RID_SVXPAGE_GRADIENT }; MetricField MTR_COLOR_FROM { + HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_COLOR_FROM"; Border = TRUE ; Pos = MAP_APPFONT ( 49 , 113 ) ; Size = MAP_APPFONT ( 40, 12 ) ; @@ -1099,6 +1160,7 @@ TabPage RID_SVXPAGE_GRADIENT }; ListBox LB_COLOR_TO { + HelpID = "cui:ListBox:RID_SVXPAGE_GRADIENT:LB_COLOR_TO"; Border = TRUE ; Pos = MAP_APPFONT ( 49 , 131 ) ; Size = MAP_APPFONT ( 48, 100 ) ; @@ -1108,6 +1170,7 @@ TabPage RID_SVXPAGE_GRADIENT }; MetricField MTR_COLOR_TO { + HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_COLOR_TO"; Border = TRUE ; Pos = MAP_APPFONT ( 49 , 147 ) ; Size = MAP_APPFONT ( 40, 12 ) ; @@ -1123,6 +1186,7 @@ TabPage RID_SVXPAGE_GRADIENT }; ListBox LB_GRADIENTS { + HelpID = "cui:ListBox:RID_SVXPAGE_GRADIENT:LB_GRADIENTS"; Border = TRUE ; Pos = MAP_APPFONT ( 103 , 14 ) ; Size = MAP_APPFONT ( 88 , 110 ) ; @@ -1136,6 +1200,7 @@ TabPage RID_SVXPAGE_GRADIENT }; PushButton BTN_ADD { + HelpID = "cui:PushButton:RID_SVXPAGE_GRADIENT:BTN_ADD"; Pos = MAP_APPFONT ( 197 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add..." ; @@ -1143,6 +1208,7 @@ TabPage RID_SVXPAGE_GRADIENT }; PushButton BTN_MODIFY { + HelpID = "cui:PushButton:RID_SVXPAGE_GRADIENT:BTN_MODIFY"; Pos = MAP_APPFONT ( 197 , 32 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Modify..." ; @@ -1150,6 +1216,7 @@ TabPage RID_SVXPAGE_GRADIENT }; PushButton BTN_DELETE { + HelpID = "cui:PushButton:RID_SVXPAGE_GRADIENT:BTN_DELETE"; Pos = MAP_APPFONT ( 197 , 68 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete..." ; @@ -1157,6 +1224,7 @@ TabPage RID_SVXPAGE_GRADIENT }; ImageButton BTN_LOAD { + HelpID = "cui:ImageButton:RID_SVXPAGE_GRADIENT:BTN_LOAD"; Pos = MAP_APPFONT ( 197 , 104 ) ; Size = MAP_APPFONT ( 16 , 16 ) ; TabStop = TRUE ; @@ -1172,6 +1240,7 @@ TabPage RID_SVXPAGE_GRADIENT }; ImageButton BTN_SAVE { + HelpID = "cui:ImageButton:RID_SVXPAGE_GRADIENT:BTN_SAVE"; Pos = MAP_APPFONT ( 197 , 124 ) ; Size = MAP_APPFONT ( 16 , 16 ) ; TabStop = TRUE ; @@ -1208,6 +1277,7 @@ TabPage RID_SVXPAGE_COLOR }; Edit EDT_NAME { + HelpID = "cui:Edit:RID_SVXPAGE_COLOR:EDT_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 42 , 14 ) ; Size = MAP_APPFONT ( 76 , 12 ) ; @@ -1221,6 +1291,7 @@ TabPage RID_SVXPAGE_COLOR }; ListBox LB_COLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_COLOR:LB_COLOR"; Border = TRUE ; Pos = MAP_APPFONT ( 42 , 30 ) ; Size = MAP_APPFONT ( 76 , 100 ) ; @@ -1258,6 +1329,7 @@ TabPage RID_SVXPAGE_COLOR }; ListBox LB_COLORMODEL { + HelpID = "cui:ListBox:RID_SVXPAGE_COLOR:LB_COLORMODEL"; Border = TRUE ; Pos = MAP_APPFONT ( 157 , 71 ) ; Size = MAP_APPFONT ( 34 , 12 ) ; @@ -1277,6 +1349,7 @@ TabPage RID_SVXPAGE_COLOR }; MetricField MTR_FLD_1 { + HelpID = "cui:MetricField:RID_SVXPAGE_COLOR:MTR_FLD_1"; Border = TRUE ; Pos = MAP_APPFONT ( 157 , 87 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -1296,6 +1369,7 @@ TabPage RID_SVXPAGE_COLOR }; MetricField MTR_FLD_2 { + HelpID = "cui:MetricField:RID_SVXPAGE_COLOR:MTR_FLD_2"; Border = TRUE ; Pos = MAP_APPFONT ( 157 , 103 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -1315,6 +1389,7 @@ TabPage RID_SVXPAGE_COLOR }; MetricField MTR_FLD_3 { + HelpID = "cui:MetricField:RID_SVXPAGE_COLOR:MTR_FLD_3"; Border = TRUE ; Pos = MAP_APPFONT ( 157 , 119 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -1334,6 +1409,7 @@ TabPage RID_SVXPAGE_COLOR }; MetricField MTR_FLD_4 { + HelpID = "cui:MetricField:RID_SVXPAGE_COLOR:MTR_FLD_4"; Border = TRUE ; Pos = MAP_APPFONT ( 157 , 135 ) ; Size = MAP_APPFONT ( 30 , 12 ) ; @@ -1347,6 +1423,7 @@ TabPage RID_SVXPAGE_COLOR }; PushButton BTN_ADD { + HelpID = "cui:PushButton:RID_SVXPAGE_COLOR:BTN_ADD"; Pos = MAP_APPFONT ( 197 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add" ; @@ -1354,6 +1431,7 @@ TabPage RID_SVXPAGE_COLOR }; PushButton BTN_WORK_ON { + HelpID = "cui:PushButton:RID_SVXPAGE_COLOR:BTN_WORK_ON"; Pos = MAP_APPFONT ( 197 , 50 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Edit..." ; @@ -1361,6 +1439,7 @@ TabPage RID_SVXPAGE_COLOR }; PushButton BTN_DELETE { + HelpID = "cui:PushButton:RID_SVXPAGE_COLOR:BTN_DELETE"; Pos = MAP_APPFONT ( 197 , 68 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete..." ; @@ -1368,6 +1447,7 @@ TabPage RID_SVXPAGE_COLOR }; PushButton BTN_MODIFY { + HelpID = "cui:PushButton:RID_SVXPAGE_COLOR:BTN_MODIFY"; Pos = MAP_APPFONT ( 197, 32 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Modify" ; @@ -1375,6 +1455,7 @@ TabPage RID_SVXPAGE_COLOR }; ImageButton BTN_LOAD { + HelpID = "cui:ImageButton:RID_SVXPAGE_COLOR:BTN_LOAD"; Pos = MAP_APPFONT ( 197 , 104 ) ; Size = MAP_APPFONT ( 16 , 16 ) ; TabStop = TRUE ; @@ -1390,6 +1471,7 @@ TabPage RID_SVXPAGE_COLOR }; ImageButton BTN_SAVE { + HelpID = "cui:ImageButton:RID_SVXPAGE_COLOR:BTN_SAVE"; Pos = MAP_APPFONT ( 197 , 124 ) ; Size = MAP_APPFONT ( 16 , 16 ) ; TabStop = TRUE ; @@ -1463,4 +1545,13 @@ TabDialog RID_SVXDLG_AREA }; }; - // ********************************************************************** EOF +String STR_LB_HATCHINGSTYLE +{ + Text [ en-US ] = "Hatching Style" ; +}; + +String STR_CUI_COLORMODEL +{ + Text [ en-US ] = "Color Mode" ; +}; + diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx index b316498d7..550cff4d7 100644 --- a/cui/source/tabpages/tabline.cxx +++ b/cui/source/tabpages/tabline.cxx @@ -63,7 +63,7 @@ SvxLineTabDialog::SvxLineTabDialog const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pSdrObj, - BOOL bHasObj + sal_Bool bHasObj ) : SfxTabDialog ( pParent, CUI_RES( RID_SVXDLG_LINE ), pAttr ), @@ -87,7 +87,7 @@ SvxLineTabDialog::SvxLineTabDialog nPosLineEndLb( 0 ), mnPos( 0 ), mbAreaTP( sal_False ), - mbDeleteColorTable( TRUE ) + mbDeleteColorTable( sal_True ) { FreeResource(); @@ -204,7 +204,7 @@ short SvxLineTabDialog::Ok() SavePalettes(); // Es wird RET_OK zurueckgeliefert, wenn wenigstens eine - // TabPage in FillItemSet() TRUE zurueckliefert. Dieses + // TabPage in FillItemSet() sal_True zurueckliefert. Dieses // geschieht z.Z. standardmaessig. return( SfxTabDialog::Ok() ); } @@ -222,7 +222,7 @@ IMPL_LINK_INLINE_END( SvxLineTabDialog, CancelHdlImpl, void *, EMPTYARG ) // ----------------------------------------------------------------------- -void SvxLineTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SvxLineTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { diff --git a/cui/source/tabpages/tabline.hrc b/cui/source/tabpages/tabline.hrc index 34b7e7fe4..15d6db12c 100644 --- a/cui/source/tabpages/tabline.hrc +++ b/cui/source/tabpages/tabline.hrc @@ -41,6 +41,21 @@ #define FT_LINE_ENDS_WIDTH 6 #define LB_START_STYLE 3 #define LB_END_STYLE 4 +//IAccessibility2 Impplementaton 2009----- +#define STR_STYLE (LB_END_STYLE+1) +#define STR_LB_START_STYLE 30 +#define STR_LB_END_STYLE 31 +#define STR_MTR_FLD_START_WIDTH 32 +#define STR_MTR_FLD_END_WIDTH 33 +#define STR_CENTER_START 34 +#define STR_CENTER_END 35 +#define STR_START_TYPE 36 +#define STR_END_TYPE 37 +#define STR_START_NUM 38 +#define STR_END_NUM 39 +#define STR_START_LENGTH 40 +#define STR_END_LENGTH 41 +//-----IAccessibility2 Impplementaton 2009 #define MTR_FLD_START_WIDTH 3 #define MTR_FLD_END_WIDTH 2 #define CBX_SYNCHRONIZE 1 @@ -103,4 +118,13 @@ #define MN_SYMBOLS_AUTO 5 #define MN_GALLERY_ENTRY 100 - +/* +//IAccessibility2 Implementation 2009----- +#define STR_START_TYPE 1 +#define STR_END_TYPE 2 +#define STR_START_NUM 3 +#define STR_END_NUM 4 +#define STR_START_LENGTH 5 +#define STR_END_LENGTH 6 +//-----IAccessibility2 Implementation 2009 +*/ diff --git a/cui/source/tabpages/tabline.src b/cui/source/tabpages/tabline.src index 57d821389..ccb482fa8 100644 --- a/cui/source/tabpages/tabline.src +++ b/cui/source/tabpages/tabline.src @@ -55,6 +55,7 @@ TabPage RID_SVXPAGE_LINE }; ListBox LB_LINE_STYLE { + HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_LINE_STYLE"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 100 , 100 ) ; @@ -70,6 +71,7 @@ TabPage RID_SVXPAGE_LINE }; ListBox LB_COLOR { + HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_COLOR"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 52 ) ; Size = MAP_APPFONT ( 100 , 100 ) ; @@ -85,6 +87,7 @@ TabPage RID_SVXPAGE_LINE }; MetricField MTR_FLD_LINE_WIDTH { + HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MTR_FLD_LINE_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 79 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; @@ -108,6 +111,7 @@ TabPage RID_SVXPAGE_LINE }; MetricField MTR_LINE_TRANSPARENT { + HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MTR_LINE_TRANSPARENT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 106 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; @@ -141,6 +145,7 @@ TabPage RID_SVXPAGE_LINE }; ListBox LB_START_STYLE { + HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_START_STYLE"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 25 ) ; Size = MAP_APPFONT ( 57 , 99 ) ; @@ -150,6 +155,7 @@ TabPage RID_SVXPAGE_LINE }; ListBox LB_END_STYLE { + HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_END_STYLE"; Border = TRUE ; Pos = MAP_APPFONT ( 191 , 25 ) ; Size = MAP_APPFONT ( 57 , 100 ) ; @@ -165,6 +171,7 @@ TabPage RID_SVXPAGE_LINE }; MetricField MTR_FLD_START_WIDTH { + HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MTR_FLD_START_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 52 ) ; Size = MAP_APPFONT ( 45 , 12 ) ; @@ -182,6 +189,7 @@ TabPage RID_SVXPAGE_LINE }; MetricField MTR_FLD_END_WIDTH { + HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MTR_FLD_END_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 191 , 52 ) ; Size = MAP_APPFONT ( 45 , 12 ) ; @@ -199,6 +207,7 @@ TabPage RID_SVXPAGE_LINE }; TriStateBox TSB_CENTER_START { + HelpID = "cui:TriStateBox:RID_SVXPAGE_LINE:TSB_CENTER_START"; Pos = MAP_APPFONT ( 130 , 68 ) ; Size = MAP_APPFONT ( 57 , 10 ) ; Text [ en-US ] = "Ce~nter" ; @@ -206,6 +215,7 @@ TabPage RID_SVXPAGE_LINE }; TriStateBox TSB_CENTER_END { + HelpID = "cui:TriStateBox:RID_SVXPAGE_LINE:TSB_CENTER_END"; Pos = MAP_APPFONT ( 191 , 68 ) ; Size = MAP_APPFONT ( 57 , 10 ) ; Text [ en-US ] = "C~enter" ; @@ -213,6 +223,7 @@ TabPage RID_SVXPAGE_LINE }; CheckBox CBX_SYNCHRONIZE { + HelpID = "cui:CheckBox:RID_SVXPAGE_LINE:CBX_SYNCHRONIZE"; // #116827# // Pos = MAP_APPFONT ( 130 , 107 ) ; Pos = MAP_APPFONT ( 130 , 68 + (16 - 4) ) ; @@ -238,6 +249,7 @@ TabPage RID_SVXPAGE_LINE }; ListBox LB_EDGE_STYLE { + HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_EDGE_STYLE"; Border = TRUE ; Pos = MAP_APPFONT ( 130 , 25 + (16 * 6) - 4 ) ; Size = MAP_APPFONT ( 57 , 99 ) ; @@ -273,6 +285,7 @@ TabPage RID_SVXPAGE_LINE MenuButton MB_SYMBOL_BITMAP { + HelpID = "cui:MenuButton:RID_SVXPAGE_LINE:MB_SYMBOL_BITMAP"; Hide = TRUE ; Pos = MAP_APPFONT ( 130 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; @@ -319,6 +332,7 @@ TabPage RID_SVXPAGE_LINE }; MetricField MF_SYMBOL_WIDTH { + HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MF_SYMBOL_WIDTH"; Pos = MAP_APPFONT ( 191 , 30 ); Size = MAP_APPFONT ( 57 , 12 ) ; Border = TRUE ; @@ -345,6 +359,7 @@ TabPage RID_SVXPAGE_LINE }; MetricField MF_SYMBOL_HEIGHT { + HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MF_SYMBOL_HEIGHT"; Pos = MAP_APPFONT ( 191 , 46 ); Size = MAP_APPFONT ( 57 , 12 ) ; Border = TRUE ; @@ -364,11 +379,40 @@ TabPage RID_SVXPAGE_LINE }; CheckBox CB_SYMBOL_RATIO { + HelpID = "cui:CheckBox:RID_SVXPAGE_LINE:CB_SYMBOL_RATIO"; Hide = TRUE ; Pos = MAP_APPFONT ( 130 , 62 ); Size = MAP_APPFONT ( 118 , 10 ) ; Text [ en-US ] = "Keep ratio" ; }; + String STR_STYLE + { + Text [ en-US ] = "Style" ; + }; + String STR_LB_START_STYLE + { + Text [ en-US ] = "Start style" ; + }; + String STR_LB_END_STYLE + { + Text [ en-US ] = "End style" ; + }; + String STR_MTR_FLD_START_WIDTH + { + Text [ en-US ] = "Start width" ; + }; + String STR_MTR_FLD_END_WIDTH + { + Text [ en-US ] = "End width" ; + }; + String STR_CENTER_START + { + Text [ en-US ] = "Start with center" ; + }; + String STR_CENTER_END + { + Text [ en-US ] = "End with center" ; + }; }; // Defining LineStyles -------------------- @@ -394,6 +438,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; ListBox LB_TYPE_1 { + HelpID = "cui:ListBox:RID_SVXPAGE_LINE_DEF:LB_TYPE_1"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 32 ) ; Size = MAP_APPFONT ( 43 , 49 ) ; @@ -407,6 +452,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; ListBox LB_TYPE_2 { + HelpID = "cui:ListBox:RID_SVXPAGE_LINE_DEF:LB_TYPE_2"; Border = TRUE ; Pos = MAP_APPFONT ( 113 , 32 ) ; Size = MAP_APPFONT ( 43 , 49 ) ; @@ -426,6 +472,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; NumericField NUM_FLD_1 { + HelpID = "cui:NumericField:RID_SVXPAGE_LINE_DEF:NUM_FLD_1"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 48 ) ; Size = MAP_APPFONT ( 43 , 12 ) ; @@ -440,6 +487,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; NumericField NUM_FLD_2 { + HelpID = "cui:NumericField:RID_SVXPAGE_LINE_DEF:NUM_FLD_2"; Border = TRUE ; Pos = MAP_APPFONT ( 113 , 48 ) ; Size = MAP_APPFONT ( 43 , 12 ) ; @@ -460,6 +508,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; MetricField MTR_FLD_LENGTH_1 { + HelpID = "cui:MetricField:RID_SVXPAGE_LINE_DEF:MTR_FLD_LENGTH_1"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 64 ) ; Size = MAP_APPFONT ( 43 , 12 ) ; @@ -480,6 +529,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; MetricField MTR_FLD_LENGTH_2 { + HelpID = "cui:MetricField:RID_SVXPAGE_LINE_DEF:MTR_FLD_LENGTH_2"; Border = TRUE ; Pos = MAP_APPFONT ( 113 , 64 ) ; Size = MAP_APPFONT ( 43 , 12 ) ; @@ -506,6 +556,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; MetricField MTR_FLD_DISTANCE { + HelpID = "cui:MetricField:RID_SVXPAGE_LINE_DEF:MTR_FLD_DISTANCE"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 79 ) ; Size = MAP_APPFONT ( 43 , 12 ) ; @@ -524,6 +575,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; CheckBox CBX_SYNCHRONIZE { + HelpID = "cui:CheckBox:RID_SVXPAGE_LINE_DEF:CBX_SYNCHRONIZE"; Pos = MAP_APPFONT ( 12 , 95 ) ; Size = MAP_APPFONT ( 174 , 10 ) ; Text [ en-US ] = "~Fit to line width" ; @@ -540,6 +592,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; ListBox LB_LINESTYLES { + HelpID = "cui:ListBox:RID_SVXPAGE_LINE_DEF:LB_LINESTYLES"; Border = TRUE ; Pos = MAP_APPFONT ( 66 , 14 ) ; Size = MAP_APPFONT ( 120 , 80 ) ; @@ -549,6 +602,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; PushButton BTN_ADD { + HelpID = "cui:PushButton:RID_SVXPAGE_LINE_DEF:BTN_ADD"; Pos = MAP_APPFONT ( 198 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add..." ; @@ -556,6 +610,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; PushButton BTN_MODIFY { + HelpID = "cui:PushButton:RID_SVXPAGE_LINE_DEF:BTN_MODIFY"; Pos = MAP_APPFONT ( 198 , 34 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Modify..." ; @@ -563,6 +618,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; PushButton BTN_DELETE { + HelpID = "cui:PushButton:RID_SVXPAGE_LINE_DEF:BTN_DELETE"; Pos = MAP_APPFONT ( 198 , 54 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete..." ; @@ -570,6 +626,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; ImageButton BTN_LOAD { + HelpID = "cui:ImageButton:RID_SVXPAGE_LINE_DEF:BTN_LOAD"; Pos = MAP_APPFONT ( 198 , 74 ) ; Size = MAP_APPFONT ( 16 , 16 ) ; TabStop = TRUE ; @@ -585,6 +642,7 @@ TabPage RID_SVXPAGE_LINE_DEF }; ImageButton BTN_SAVE { + HelpID = "cui:ImageButton:RID_SVXPAGE_LINE_DEF:BTN_SAVE"; Pos = MAP_APPFONT ( 198 , 96 ) ; Size = MAP_APPFONT ( 16 , 16 ) ; TabStop = TRUE ; @@ -605,6 +663,30 @@ TabPage RID_SVXPAGE_LINE_DEF Size = MAP_APPFONT ( 248 , 40 ) ; }; + String STR_START_TYPE + { + Text [ en-US ] = "Start type" ; + }; + String STR_END_TYPE + { + Text [ en-US ] = "End type" ; + }; + String STR_START_NUM + { + Text [ en-US ] = "Start number" ; + }; + String STR_END_NUM + { + Text [ en-US ] = "End number" ; + }; + String STR_START_LENGTH + { + Text [ en-US ] = "Start length" ; + }; + String STR_END_LENGTH + { + Text [ en-US ] = "End length" ; + }; }; // Defining LineEnds -------------------- @@ -638,6 +720,7 @@ TabPage RID_SVXPAGE_LINEEND_DEF }; Edit EDT_NAME { + HelpID = "cui:Edit:RID_SVXPAGE_LINEEND_DEF:EDT_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 98 , 14 ) ; Size = MAP_APPFONT ( 87 , 12 ) ; @@ -651,6 +734,7 @@ TabPage RID_SVXPAGE_LINEEND_DEF }; ListBox LB_LINEENDS { + HelpID = "cui:ListBox:RID_SVXPAGE_LINEEND_DEF:LB_LINEENDS"; Border = TRUE ; Pos = MAP_APPFONT ( 98 , 30 ) ; Size = MAP_APPFONT ( 87 , 80 ) ; @@ -660,6 +744,7 @@ TabPage RID_SVXPAGE_LINEEND_DEF }; PushButton BTN_ADD { + HelpID = "cui:PushButton:RID_SVXPAGE_LINEEND_DEF:BTN_ADD"; Pos = MAP_APPFONT ( 198 , 14 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add..." ; @@ -667,6 +752,7 @@ TabPage RID_SVXPAGE_LINEEND_DEF }; PushButton BTN_MODIFY { + HelpID = "cui:PushButton:RID_SVXPAGE_LINEEND_DEF:BTN_MODIFY"; Pos = MAP_APPFONT ( 198 , 34 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Modify..." ; @@ -674,6 +760,7 @@ TabPage RID_SVXPAGE_LINEEND_DEF }; PushButton BTN_DELETE { + HelpID = "cui:PushButton:RID_SVXPAGE_LINEEND_DEF:BTN_DELETE"; Pos = MAP_APPFONT ( 198 , 54 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete..." ; @@ -681,6 +768,7 @@ TabPage RID_SVXPAGE_LINEEND_DEF }; ImageButton BTN_LOAD { + HelpID = "cui:ImageButton:RID_SVXPAGE_LINEEND_DEF:BTN_LOAD"; Pos = MAP_APPFONT ( 198 , 74 ) ; Size = MAP_APPFONT ( 16 , 16 ) ; TabStop = TRUE ; @@ -696,6 +784,7 @@ TabPage RID_SVXPAGE_LINEEND_DEF }; ImageButton BTN_SAVE { + HelpID = "cui:ImageButton:RID_SVXPAGE_LINEEND_DEF:BTN_SAVE"; Pos = MAP_APPFONT ( 198 , 96 ) ; Size = MAP_APPFONT ( 16 , 16 ) ; TabStop = TRUE ; diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index a531e3fad..f2d8e0c3c 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -53,10 +53,10 @@ class TabWin_Impl : public Window { private: - USHORT nTabStyle; + sal_uInt16 nTabStyle; public: - TabWin_Impl( Window* pParent, const ResId& rId, USHORT nStyle ) : + TabWin_Impl( Window* pParent, const ResId& rId, sal_uInt16 nStyle ) : Window( pParent, rId ), nTabStyle( nStyle ) {} @@ -65,7 +65,7 @@ public: // static ---------------------------------------------------------------- -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SID_ATTR_TABSTOP, SID_ATTR_TABSTOP_OFFSET, @@ -103,27 +103,27 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_TABULATOR ), rAttr ), - aTabBox ( this, CUI_RES( ED_TABPOS ) ), aTabLabel ( this, CUI_RES( FL_TABPOS ) ), + aTabBox ( this, CUI_RES( ED_TABPOS ) ), aTabLabelVert ( this, CUI_RES( FL_TABPOS_VERT ) ), + aTabTypeLabel ( this, CUI_RES( FL_TABTYPE ) ), aLeftTab ( this, CUI_RES( BTN_TABTYPE_LEFT ) ), aRightTab ( this, CUI_RES( BTN_TABTYPE_RIGHT ) ), aCenterTab ( this, CUI_RES( BTN_TABTYPE_CENTER ) ), aDezTab ( this, CUI_RES( BTN_TABTYPE_DECIMAL ) ), - pLeftWin ( new TabWin_Impl( this, CUI_RES( WIN_TABLEFT ), (USHORT)(RULER_TAB_LEFT|WB_HORZ) ) ), - pRightWin ( new TabWin_Impl( this, CUI_RES( WIN_TABRIGHT ), (USHORT)(RULER_TAB_RIGHT|WB_HORZ) ) ), - pCenterWin ( new TabWin_Impl( this, CUI_RES( WIN_TABCENTER ), (USHORT)(RULER_TAB_CENTER|WB_HORZ) ) ), - pDezWin ( new TabWin_Impl( this, CUI_RES( WIN_TABDECIMAL ), (USHORT)(RULER_TAB_DECIMAL|WB_HORZ) ) ), + pLeftWin ( new TabWin_Impl( this, CUI_RES( WIN_TABLEFT ), (sal_uInt16)(RULER_TAB_LEFT|WB_HORZ) ) ), + pRightWin ( new TabWin_Impl( this, CUI_RES( WIN_TABRIGHT ), (sal_uInt16)(RULER_TAB_RIGHT|WB_HORZ) ) ), + pCenterWin ( new TabWin_Impl( this, CUI_RES( WIN_TABCENTER ), (sal_uInt16)(RULER_TAB_CENTER|WB_HORZ) ) ), + pDezWin ( new TabWin_Impl( this, CUI_RES( WIN_TABDECIMAL ), (sal_uInt16)(RULER_TAB_DECIMAL|WB_HORZ) ) ), aDezCharLabel ( this, CUI_RES( FT_TABTYPE_DECCHAR ) ), aDezChar ( this, CUI_RES( ED_TABTYPE_DECCHAR ) ), - aTabTypeLabel ( this, CUI_RES( FL_TABTYPE ) ), + aFillLabel ( this, CUI_RES( FL_FILLCHAR ) ), aNoFillChar ( this, CUI_RES( BTN_FILLCHAR_NO ) ), aFillPoints ( this, CUI_RES( BTN_FILLCHAR_POINTS ) ), aFillDashLine ( this, CUI_RES( BTN_FILLCHAR_DASHLINE ) ), aFillSolidLine ( this, CUI_RES( BTN_FILLCHAR_UNDERSCORE ) ), aFillSpecial ( this, CUI_RES( BTN_FILLCHAR_OTHER ) ), aFillChar ( this, CUI_RES( ED_FILLCHAR_OTHER ) ), - aFillLabel ( this, CUI_RES( FL_FILLCHAR ) ), aNewBtn ( this, CUI_RES( BTN_NEW ) ), aDelAllBtn ( this, CUI_RES( BTN_DELALL ) ), aDelBtn ( this, CUI_RES( BTN_DEL ) ), @@ -132,7 +132,7 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, aNewTabs ( 0, 0, SVX_TAB_ADJUST_LEFT, GetWhich( SID_ATTR_TABSTOP ) ), nDefDist ( 0 ), eDefUnit( FUNIT_100TH_MM ), - bCheck ( FALSE ) + bCheck ( sal_False ) { SvtCJKOptions aCJKOptions; @@ -142,6 +142,7 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, aRightTab .SetText(String(CUI_RES( ST_RIGHTTAB_ASIAN ))); } + aFillChar.SetAccessibleName(String(CUI_RES( ST_FILLCHAR_OTHER ))); // diese Page braucht ExchangeSupport SetExchangeSupport(); @@ -179,6 +180,22 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, aTabBox.SetDoubleClickHdl( LINK( this, SvxTabulatorTabPage, SelectHdl_Impl ) ); aTabBox.SetModifyHdl( LINK( this, SvxTabulatorTabPage, ModifyHdl_Impl ) ); + aLeftTab.SetAccessibleRelationMemberOf( &aTabTypeLabel ); + aRightTab.SetAccessibleRelationMemberOf( &aTabTypeLabel ); + aCenterTab.SetAccessibleRelationMemberOf( &aTabTypeLabel ); + aDezTab.SetAccessibleRelationMemberOf( &aTabTypeLabel ); + aDezCharLabel.SetAccessibleRelationMemberOf( &aTabTypeLabel ); + aDezChar.SetAccessibleRelationMemberOf( &aTabTypeLabel ); + + aNoFillChar.SetAccessibleRelationMemberOf( &aFillLabel ); + aFillPoints.SetAccessibleRelationMemberOf( &aFillLabel ); + aFillDashLine.SetAccessibleRelationMemberOf( &aFillLabel ); + aFillSolidLine.SetAccessibleRelationMemberOf( &aFillLabel ); + aFillSpecial.SetAccessibleRelationMemberOf( &aFillLabel ); + aFillChar.SetAccessibleRelationMemberOf( &aFillLabel ); + + aFillChar.SetAccessibleRelationLabeledBy(&aFillSpecial); + // das Default-Dezimalzeichen vom System holen LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ); aAktTab.GetDecimal() = aLocaleWrapper.getNumDecimalSep().GetChar(0); @@ -197,16 +214,16 @@ SvxTabulatorTabPage::~SvxTabulatorTabPage() // ----------------------------------------------------------------------- -USHORT* SvxTabulatorTabPage::GetRanges() +sal_uInt16* SvxTabulatorTabPage::GetRanges() { return pRanges; } // ----------------------------------------------------------------------- -BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; // Hier die Werte aus den Controls eintueten if ( aNewBtn.IsEnabled() ) @@ -228,7 +245,7 @@ BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) const SfxPoolItem* pLRSpace; // wenn nicht im neuen Set, dann vielleicht im alten if ( SFX_ITEM_SET != - rSet.GetItemState( GetWhich( SID_ATTR_LRSPACE ), TRUE, &pLRSpace ) ) + rSet.GetItemState( GetWhich( SID_ATTR_LRSPACE ), sal_True, &pLRSpace ) ) pLRSpace = GetOldItem( rSet, SID_ATTR_LRSPACE ); if ( pLRSpace && ( (SvxLRSpaceItem*)pLRSpace )->GetTxtFirstLineOfst() < 0 ) @@ -240,7 +257,7 @@ BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) SvxTabStopItem aTmp( aNewTabs ); aTmp.Remove( 0, aTmp.Count() ); - for ( USHORT i = 0; i < aNewTabs.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aNewTabs.Count(); ++i ) { SvxTabStop aTmpStop = aNewTabs[i]; aTmpStop.GetTabPos() = @@ -251,13 +268,13 @@ BOOL SvxTabulatorTabPage::FillItemSet( SfxItemSet& rSet ) if ( !pOld || !( *( (SvxTabStopItem*)pOld ) == aTmp ) ) { rSet.Put( aTmp ); - bModified = TRUE; + bModified = sal_True; } } else if ( !pOld || !( *( (SvxTabStopItem*)pOld ) == aNewTabs ) ) { rSet.Put( aNewTabs ); - bModified = TRUE; + bModified = sal_True; } return bModified; } @@ -287,7 +304,7 @@ void SvxTabulatorTabPage::Reset( const SfxItemSet& rSet ) SvxTabStopItem aTmp( *( (const SvxTabStopItem*)pItem ) ); aNewTabs.Remove( 0, aNewTabs.Count() ); - for ( USHORT i = 0; i < aTmp.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aTmp.Count(); ++i ) { SvxTabStop aTmpStop = aTmp[i]; aTmpStop.GetTabPos() = @@ -310,7 +327,7 @@ void SvxTabulatorTabPage::Reset( const SfxItemSet& rSet ) (long)((const SfxUInt16Item*)pItem)->GetValue(), eUnit, MAP_100TH_MM ); // Aktuell selektierte Tab-Pos - USHORT nTabPos = 0; + sal_uInt16 nTabPos = 0; pItem = GetItem( rSet, SID_ATTR_TABSTOP_POS ); if ( pItem ) @@ -321,7 +338,7 @@ void SvxTabulatorTabPage::Reset( const SfxItemSet& rSet ) // ----------------------------------------------------------------------- -void SvxTabulatorTabPage::DisableControls( const USHORT nFlag ) +void SvxTabulatorTabPage::DisableControls( const sal_uInt16 nFlag ) { if ( ( TABTYPE_LEFT & nFlag ) == TABTYPE_LEFT ) { @@ -375,13 +392,13 @@ int SvxTabulatorTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- -void SvxTabulatorTabPage::InitTabPos_Impl( USHORT nTabPos ) +void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos ) { aTabBox.Clear(); long nOffset = 0; const SfxPoolItem* pItem = 0; - if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, TRUE, &pItem ) + if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, sal_True, &pItem ) == SFX_ITEM_SET ) { nOffset = ( (const SfxInt32Item*)pItem )->GetValue(); @@ -390,7 +407,7 @@ void SvxTabulatorTabPage::InitTabPos_Impl( USHORT nTabPos ) } // Aktuelle TabPos korrigieren und Defaults-Tabs - for ( USHORT i = 0; i < aNewTabs.Count(); i++ ) + for ( sal_uInt16 i = 0; i < aNewTabs.Count(); i++ ) { if ( aNewTabs[i].GetAdjustment() != SVX_TAB_ADJUST_DEFAULT ) { @@ -402,14 +419,14 @@ void SvxTabulatorTabPage::InitTabPos_Impl( USHORT nTabPos ) } // aktuellen Tabulator auswaehlen - const USHORT nSize = aNewTabs.Count(); + const sal_uInt16 nSize = aNewTabs.Count(); if ( nTabPos >= nSize ) nTabPos = 0; // alle RadioButtons erstmal ausschalten - aLeftTab.Check( TRUE ); - aNoFillChar.Check( TRUE ); + aLeftTab.Check( sal_True ); + aNoFillChar.Check( sal_True ); if( aTabBox.GetEntryCount() > 0 ) { @@ -492,7 +509,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) long nOffset = 0; const SfxPoolItem* pItem = 0; - if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, TRUE, &pItem ) == + if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, sal_True, &pItem ) == SFX_ITEM_SET ) { nOffset = ( (const SfxInt32Item*)pItem )->GetValue(); @@ -500,9 +517,9 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) nOffset = OutputDevice::LogicToLogic( nOffset, eUnit, MAP_100TH_MM ); } const long nReal = nVal - nOffset; - USHORT nSize = aTabBox.GetEntryCount(); + sal_uInt16 nSize = aTabBox.GetEntryCount(); - USHORT i; + sal_uInt16 i; for( i = 0; i < nSize; i++ ) { if ( nReal < aNewTabs[i].GetTabPos() ) @@ -530,7 +547,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) // falls kein RadioButton geclickt wurde, // muss trotzdem geputtet werden - bCheck |= TRUE; + bCheck |= sal_True; // set the selection into the position Edit aTabBox.SetSelection(Selection(0, aTabBox.GetText().Len())); return 0; @@ -540,7 +557,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) IMPL_LINK( SvxTabulatorTabPage, DelHdl_Impl, Button *, EMPTYARG ) { - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue() ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue() ); if ( nPos == COMBOBOX_ENTRY_NOTFOUND ) return 0; @@ -556,7 +573,7 @@ IMPL_LINK( SvxTabulatorTabPage, DelHdl_Impl, Button *, EMPTYARG ) aNewTabs.Remove( nPos ); // aAktTab neu setzen - const USHORT nSize = aNewTabs.Count(); + const sal_uInt16 nSize = aNewTabs.Count(); if ( nSize > 0 ) { @@ -576,7 +593,7 @@ IMPL_LINK( SvxTabulatorTabPage, DelHdl_Impl, Button *, EMPTYARG ) // falls kein RadioButton geclickt wurde, // muss trotzdem geputtet werden - bCheck |= TRUE; + bCheck |= sal_True; return 0; } @@ -590,7 +607,7 @@ IMPL_LINK( SvxTabulatorTabPage, DelAllHdl_Impl, Button *, EMPTYARG ) InitTabPos_Impl(); // damit in FillItemSet() geputtet wird - bCheck |= TRUE; + bCheck |= sal_True; } return 0; } @@ -599,7 +616,7 @@ IMPL_LINK( SvxTabulatorTabPage, DelAllHdl_Impl, Button *, EMPTYARG ) IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox ) { - bCheck |= TRUE; + bCheck |= sal_True; SvxTabAdjust eAdj; aDezChar.Disable(); aDezCharLabel.Disable(); @@ -620,7 +637,7 @@ IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox ) } aAktTab.GetAdjustment() = eAdj; - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { @@ -634,8 +651,8 @@ IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox ) IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox ) { - bCheck |= TRUE; - BYTE cFill = ' '; + bCheck |= sal_True; + sal_uInt8 cFill = ' '; aFillChar.SetText( String() ); aFillChar.Disable(); @@ -651,7 +668,7 @@ IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox ) cFill = '-'; aAktTab.GetFill() = cFill; - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { @@ -670,7 +687,7 @@ IMPL_LINK( SvxTabulatorTabPage, GetFillCharHdl_Impl, Edit *, pEdit ) if ( aChar.Len() > 0 ) aAktTab.GetFill() = aChar.GetChar( 0 ); - const USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit); + const sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { aNewTabs.Remove( nPos ); @@ -687,7 +704,7 @@ IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit ) if ( aChar.Len() > 0 && ( aChar.GetChar( 0 ) >= ' ')) aAktTab.GetDecimal() = aChar.GetChar( 0 ); - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { aNewTabs.Remove( nPos ); @@ -700,7 +717,7 @@ IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit ) IMPL_LINK( SvxTabulatorTabPage, SelectHdl_Impl, MetricBox *, EMPTYARG ) { - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { aAktTab = aNewTabs[nPos]; @@ -714,7 +731,7 @@ IMPL_LINK( SvxTabulatorTabPage, SelectHdl_Impl, MetricBox *, EMPTYARG ) IMPL_LINK( SvxTabulatorTabPage, ModifyHdl_Impl, MetricBox *, EMPTYARG ) { - USHORT nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); + sal_uInt16 nPos = aTabBox.GetValuePos( aTabBox.GetValue( eDefUnit ), eDefUnit ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) { aAktTab = aNewTabs[nPos]; diff --git a/cui/source/tabpages/tabstpge.hrc b/cui/source/tabpages/tabstpge.hrc index 97ae4d947..095b89c04 100644 --- a/cui/source/tabpages/tabstpge.hrc +++ b/cui/source/tabpages/tabstpge.hrc @@ -59,5 +59,8 @@ #define BTN_DELALL 52 #define ST_LEFTTAB_ASIAN 53 #define ST_RIGHTTAB_ASIAN 54 +//IAccessibility2 Implementation 2009----- +#define ST_FILLCHAR_OTHER 55 +//-----IAccessibility2 Implementation 2009 #endif diff --git a/cui/source/tabpages/tabstpge.src b/cui/source/tabpages/tabstpge.src index cb743cf84..79421f0ce 100644 --- a/cui/source/tabpages/tabstpge.src +++ b/cui/source/tabpages/tabstpge.src @@ -45,6 +45,7 @@ TabPage RID_SVXPAGE_TABULATOR }; MetricBox ED_TABPOS { + HelpID = "cui:MetricBox:RID_SVXPAGE_TABULATOR:ED_TABPOS"; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 39 , 165 ) ; Minimum = -5600 ; @@ -66,6 +67,7 @@ TabPage RID_SVXPAGE_TABULATOR }; RadioButton BTN_TABTYPE_LEFT { + HelpID = "cui:RadioButton:RID_SVXPAGE_TABULATOR:BTN_TABTYPE_LEFT"; Pos = MAP_APPFONT ( 66 , 14 ) ; Size = MAP_APPFONT ( 89 , 10 ) ; Text [ en-US ] = "~Left" ; @@ -78,6 +80,7 @@ TabPage RID_SVXPAGE_TABULATOR }; RadioButton BTN_TABTYPE_RIGHT { + HelpID = "cui:RadioButton:RID_SVXPAGE_TABULATOR:BTN_TABTYPE_RIGHT"; Pos = MAP_APPFONT ( 66 , 28 ) ; Size = MAP_APPFONT ( 89 , 10 ) ; Text [ en-US ] = "Righ~t" ; @@ -89,6 +92,7 @@ TabPage RID_SVXPAGE_TABULATOR }; RadioButton BTN_TABTYPE_CENTER { + HelpID = "cui:RadioButton:RID_SVXPAGE_TABULATOR:BTN_TABTYPE_CENTER"; Pos = MAP_APPFONT ( 66 , 42 ) ; Size = MAP_APPFONT ( 89 , 10 ) ; Text [ en-US ] = "C~entered" ; @@ -100,6 +104,7 @@ TabPage RID_SVXPAGE_TABULATOR }; RadioButton BTN_TABTYPE_DECIMAL { + HelpID = "cui:RadioButton:RID_SVXPAGE_TABULATOR:BTN_TABTYPE_DECIMAL"; Pos = MAP_APPFONT ( 66 , 56 ) ; Size = MAP_APPFONT ( 89 , 10 ) ; Text [ en-US ] = "Deci~mal" ; @@ -117,6 +122,7 @@ TabPage RID_SVXPAGE_TABULATOR }; Edit ED_TABTYPE_DECCHAR { + HelpID = "cui:Edit:RID_SVXPAGE_TABULATOR:ED_TABTYPE_DECCHAR"; Border = TRUE ; Pos = MAP_APPFONT ( 156 , 68 ) ; Size = MAP_APPFONT ( 9 , 12 ) ; @@ -130,6 +136,7 @@ TabPage RID_SVXPAGE_TABULATOR }; RadioButton BTN_FILLCHAR_NO { + HelpID = "cui:RadioButton:RID_SVXPAGE_TABULATOR:BTN_FILLCHAR_NO"; Pos = MAP_APPFONT ( 66 , 97 ) ; Size = MAP_APPFONT ( 89 , 10 ) ; Text [ en-US ] = "N~one" ; @@ -137,30 +144,35 @@ TabPage RID_SVXPAGE_TABULATOR }; RadioButton BTN_FILLCHAR_POINTS { + HelpID = "cui:RadioButton:RID_SVXPAGE_TABULATOR:BTN_FILLCHAR_POINTS"; Pos = MAP_APPFONT ( 66 , 111 ) ; Size = MAP_APPFONT ( 89 , 10 ) ; Text = "~........" ; }; RadioButton BTN_FILLCHAR_DASHLINE { + HelpID = "cui:RadioButton:RID_SVXPAGE_TABULATOR:BTN_FILLCHAR_DASHLINE"; Pos = MAP_APPFONT ( 66 , 125 ) ; Size = MAP_APPFONT ( 89 , 10 ) ; Text = "~--------" ; }; RadioButton BTN_FILLCHAR_UNDERSCORE { + HelpID = "cui:RadioButton:RID_SVXPAGE_TABULATOR:BTN_FILLCHAR_UNDERSCORE"; Pos = MAP_APPFONT ( 66 , 139 ) ; Size = MAP_APPFONT ( 89 , 10 ) ; Text = "~_____" ; }; RadioButton BTN_FILLCHAR_OTHER { + HelpID = "cui:RadioButton:RID_SVXPAGE_TABULATOR:BTN_FILLCHAR_OTHER"; Pos = MAP_APPFONT ( 66 , 153 ) ; Size = MAP_APPFONT ( 89 , 10 ) ; Text [ en-US ] = "Character" ; }; Edit ED_FILLCHAR_OTHER { + HelpID = "cui:Edit:RID_SVXPAGE_TABULATOR:ED_FILLCHAR_OTHER"; Border = TRUE ; Pos = MAP_APPFONT ( 156 , 151 ) ; Size = MAP_APPFONT ( 9 , 12 ) ; @@ -168,18 +180,21 @@ TabPage RID_SVXPAGE_TABULATOR }; PushButton BTN_NEW { + HelpID = "cui:PushButton:RID_SVXPAGE_TABULATOR:BTN_NEW"; Pos = MAP_APPFONT ( 204 , 6 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~New" ; }; PushButton BTN_DELALL { + HelpID = "cui:PushButton:RID_SVXPAGE_TABULATOR:BTN_DELALL"; Pos = MAP_APPFONT ( 204 , 23 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Delete ~All" ; }; PushButton BTN_DEL { + HelpID = "cui:PushButton:RID_SVXPAGE_TABULATOR:BTN_DEL"; Pos = MAP_APPFONT ( 204 , 40 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Delete" ; @@ -192,40 +207,9 @@ TabPage RID_SVXPAGE_TABULATOR { Text [ en-US ] = "Righ~t/Bottom" ; }; + String ST_FILLCHAR_OTHER + { + Text [ en-US ] = "Character" ; + }; }; - // ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index 4ef0287df..c8a0fd4ad 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -43,7 +43,7 @@ #include <dialmgr.hxx> #include "svx/dlgutil.hxx" -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_TEXT_ANIKIND, SDRATTR_TEXT_ANIAMOUNT, @@ -75,7 +75,7 @@ SvxTextTabDialog::SvxTextTabDialog( Window* pParent, |* \************************************************************************/ -void SvxTextTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage ) +void SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { @@ -156,6 +156,24 @@ SvxTextAnimationPage::SvxTextAnimationPage( Window* pWindow, const SfxItemSet& r aBtnLeft.SetClickHdl( aLink ); aBtnRight.SetClickHdl( aLink ); aBtnDown.SetClickHdl( aLink ); + + aNumFldCount.SetAccessibleRelationLabeledBy( &aTsbEndless ); + aMtrFldAmount.SetAccessibleRelationLabeledBy( &aTsbPixel ); + aMtrFldDelay.SetAccessibleRelationLabeledBy( &aTsbAuto ); + + aBtnUp.SetAccessibleRelationLabeledBy( &aFtDirection ); + aBtnLeft.SetAccessibleRelationLabeledBy( &aFtDirection ); + aBtnRight.SetAccessibleRelationLabeledBy( &aFtDirection ); + aBtnDown.SetAccessibleRelationLabeledBy( &aFtDirection ); + + aBtnUp.SetAccessibleRelationMemberOf( &aFlEffect ); + aBtnLeft.SetAccessibleRelationMemberOf( &aFlEffect ); + aBtnRight.SetAccessibleRelationMemberOf( &aFlEffect ); + aBtnDown.SetAccessibleRelationMemberOf( &aFlEffect ); + + aTsbEndless.SetAccessibleRelationLabeledBy( &aFtCount ); + aTsbPixel.SetAccessibleRelationLabeledBy( &aFtAmount ); + aTsbAuto.SetAccessibleRelationLabeledBy( &aFtDelay ); } /************************************************************************* @@ -186,7 +204,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) if( pItem ) { eAniKind = ( ( const SdrTextAniKindItem* )pItem )->GetValue(); - aLbEffect.SelectEntryPos( sal::static_int_cast< USHORT >(eAniKind) ); + aLbEffect.SelectEntryPos( sal::static_int_cast< sal_uInt16 >(eAniKind) ); } else aLbEffect.SetNoSelection(); @@ -203,10 +221,10 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) } else { - aBtnUp.Check( FALSE ); - aBtnLeft.Check( FALSE ); - aBtnRight.Check( FALSE ); - aBtnDown.Check( FALSE ); + aBtnUp.Check( sal_False ); + aBtnLeft.Check( sal_False ); + aBtnRight.Check( sal_False ); + aBtnDown.Check( sal_False ); } aBtnUp.SaveValue(); aBtnLeft.SaveValue(); @@ -219,8 +237,8 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTARTINSIDE ); if( pItem ) { - aTsbStartInside.EnableTriState( FALSE ); - BOOL bValue = ( ( const SdrTextAniStartInsideItem* )pItem )->GetValue(); + aTsbStartInside.EnableTriState( sal_False ); + sal_Bool bValue = ( ( const SdrTextAniStartInsideItem* )pItem )->GetValue(); if( bValue ) aTsbStartInside.SetState( STATE_CHECK ); else @@ -236,8 +254,8 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTOPINSIDE ); if( pItem ) { - aTsbStopInside.EnableTriState( FALSE ); - BOOL bValue = ( ( const SdrTextAniStopInsideItem* )pItem )->GetValue(); + aTsbStopInside.EnableTriState( sal_False ); + sal_Bool bValue = ( ( const SdrTextAniStopInsideItem* )pItem )->GetValue(); if( bValue ) aTsbStopInside.SetState( STATE_CHECK ); else @@ -253,7 +271,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANICOUNT ); if( pItem ) { - aTsbEndless.EnableTriState( FALSE ); + aTsbEndless.EnableTriState( sal_False ); long nValue = (long) ( ( const SdrTextAniCountItem* )pItem )->GetValue(); aNumFldCount.SetValue( nValue ); if( nValue == 0 ) @@ -261,7 +279,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) if( eAniKind == SDRTEXTANI_SLIDE ) { aTsbEndless.SetState( STATE_NOCHECK ); - aTsbEndless.Enable( FALSE ); + aTsbEndless.Enable( sal_False ); } else { @@ -286,7 +304,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDELAY ); if( pItem ) { - aTsbAuto.EnableTriState( FALSE ); + aTsbAuto.EnableTriState( sal_False ); long nValue = (long) ( ( const SdrTextAniDelayItem* )pItem )->GetValue(); aMtrFldDelay.SetValue( nValue ); if( nValue == 0 ) @@ -311,7 +329,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIAMOUNT ); if( pItem ) { - aTsbPixel.EnableTriState( FALSE ); + aTsbPixel.EnableTriState( sal_False ); long nValue = (long) ( ( const SdrTextAniAmountItem* )pItem )->GetValue(); if( nValue <= 0 ) { @@ -367,10 +385,10 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { - BOOL bModified = FALSE; - USHORT nPos; + sal_Bool bModified = sal_False; + sal_uInt16 nPos; TriState eState; // Animationstyp @@ -379,7 +397,7 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) nPos != aLbEffect.GetSavedValue() ) { rAttrs.Put( SdrTextAniKindItem( (SdrTextAniKind) nPos ) ); - bModified = TRUE; + bModified = sal_True; } // Animationsrichtung @@ -390,23 +408,23 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { SdrTextAniDirection eValue = (SdrTextAniDirection) GetSelectedDirection(); rAttrs.Put( SdrTextAniDirectionItem( eValue ) ); - bModified = TRUE; + bModified = sal_True; } // Start inside eState = aTsbStartInside.GetState(); if( eState != aTsbStartInside.GetSavedValue() ) { - rAttrs.Put( SdrTextAniStartInsideItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrTextAniStartInsideItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } // Stop inside eState = aTsbStopInside.GetState(); if( eState != aTsbStopInside.GetSavedValue() ) { - rAttrs.Put( SdrTextAniStopInsideItem( (BOOL) STATE_CHECK == eState ) ); - bModified = TRUE; + rAttrs.Put( SdrTextAniStopInsideItem( (sal_Bool) STATE_CHECK == eState ) ); + bModified = sal_True; } // Anzahl @@ -417,17 +435,17 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { sal_Int64 nValue = 0; if( eState == STATE_CHECK /*#89844#*/ && aTsbEndless.IsEnabled()) - bModified = TRUE; + bModified = sal_True; else { if( aStr != aNumFldCount.GetSavedValue() ) { nValue = aNumFldCount.GetValue(); - bModified = TRUE; + bModified = sal_True; } } if( bModified ) - rAttrs.Put( SdrTextAniCountItem( (UINT16) nValue ) ); + rAttrs.Put( SdrTextAniCountItem( (sal_uInt16) nValue ) ); } // Verzoegerung @@ -438,17 +456,17 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { sal_Int64 nValue = 0; if( eState == STATE_CHECK ) - bModified = TRUE; + bModified = sal_True; else { if( aStr != aMtrFldDelay.GetSavedValue() ) { nValue = aMtrFldDelay.GetValue(); - bModified = TRUE; + bModified = sal_True; } } if( bModified ) - rAttrs.Put( SdrTextAniDelayItem( (UINT16) nValue ) ); + rAttrs.Put( SdrTextAniDelayItem( (sal_uInt16) nValue ) ); } // Schrittweite @@ -467,9 +485,9 @@ BOOL SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) { nValue = GetCoreValue( aMtrFldAmount, eUnit ); } - rAttrs.Put( SdrTextAniAmountItem( (INT16) nValue ) ); + rAttrs.Put( SdrTextAniAmountItem( (sal_Int16) nValue ) ); - bModified = TRUE; + bModified = sal_True; } return( bModified ); @@ -491,7 +509,7 @@ void SvxTextAnimationPage::Construct() |* \************************************************************************/ -USHORT* SvxTextAnimationPage::GetRanges() +sal_uInt16* SvxTextAnimationPage::GetRanges() { return( pRanges ); } @@ -516,7 +534,7 @@ SfxTabPage* SvxTextAnimationPage::Create( Window* pWindow, IMPL_LINK( SvxTextAnimationPage, SelectEffectHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbEffect.GetSelectEntryPos(); + sal_uInt16 nPos = aLbEffect.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { eAniKind = (SdrTextAniKind) nPos; @@ -736,9 +754,9 @@ void SvxTextAnimationPage::SelectDirection( SdrTextAniDirection nValue ) |* \************************************************************************/ -USHORT SvxTextAnimationPage::GetSelectedDirection() +sal_uInt16 SvxTextAnimationPage::GetSelectedDirection() { - USHORT nValue = 0; + sal_uInt16 nValue = 0; if( aBtnUp.IsChecked() ) nValue = SDRTEXTANI_UP; diff --git a/cui/source/tabpages/textanim.src b/cui/source/tabpages/textanim.src index 346426f24..212492378 100644 --- a/cui/source/tabpages/textanim.src +++ b/cui/source/tabpages/textanim.src @@ -71,6 +71,7 @@ // RID_SVXPAGE_TEXTANIMATION --------------------------------------------- TabPage RID_SVXPAGE_TEXTANIMATION { + HelpID = "cui:TabPage:RID_SVXPAGE_TEXTANIMATION"; SVLook = TRUE ; Hide = TRUE ; Size = MAP_APPFONT ( MA_TOTAL_WIDTH , 185 ) ; @@ -91,6 +92,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION }; ListBox LB_EFFECT { + HelpID = "cui:ListBox:RID_SVXPAGE_TEXTANIMATION:LB_EFFECT"; Border = TRUE ; Pos = MAP_APPFONT ( MA_EFFECTLIST_X, MA_CURR_Y + 1 ) ; Size = MAP_APPFONT ( MA_EFFECTLIST_WIDTH , 57 ) ; @@ -117,6 +119,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION }; ImageButton BTN_UP { + HelpID = "cui:ImageButton:RID_SVXPAGE_TEXTANIMATION:BTN_UP"; Pos = MAP_APPFONT ( MA_TOTAL_WIDTH - MA_MOVEBUT_GRACE_X - 2*MA_BUTTON_WIDTH - RSC_SP_TBPG_INNERBORDER_RIGHT - RSC_SP_FLGR_INNERBORDER_RIGHT, RSC_SP_TBPG_INNERBORDER_TOP + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP ); Size = BUTTON_SIZE ; @@ -125,6 +128,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION }; ImageButton BTN_LEFT { + HelpID = "cui:ImageButton:RID_SVXPAGE_TEXTANIMATION:BTN_LEFT"; Pos = MAP_APPFONT ( MA_TOTAL_WIDTH - MA_MOVEBUT_GRACE_X - 3*MA_BUTTON_WIDTH - RSC_SP_TBPG_INNERBORDER_RIGHT - RSC_SP_FLGR_INNERBORDER_RIGHT, RSC_SP_TBPG_INNERBORDER_TOP + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP + MA_BUTTON_HEIGHT); Size = BUTTON_SIZE ; @@ -133,6 +137,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION }; ImageButton BTN_RIGHT { + HelpID = "cui:ImageButton:RID_SVXPAGE_TEXTANIMATION:BTN_RIGHT"; Pos = MAP_APPFONT ( MA_TOTAL_WIDTH - MA_MOVEBUT_GRACE_X - MA_BUTTON_WIDTH - RSC_SP_TBPG_INNERBORDER_RIGHT - RSC_SP_FLGR_INNERBORDER_RIGHT, RSC_SP_TBPG_INNERBORDER_TOP + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP + MA_BUTTON_HEIGHT ) ; Size = BUTTON_SIZE ; @@ -141,6 +146,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION }; ImageButton BTN_DOWN { + HelpID = "cui:ImageButton:RID_SVXPAGE_TEXTANIMATION:BTN_DOWN"; Pos = MAP_APPFONT ( MA_TOTAL_WIDTH - MA_MOVEBUT_GRACE_X - 2*MA_BUTTON_WIDTH - RSC_SP_TBPG_INNERBORDER_RIGHT - RSC_SP_FLGR_INNERBORDER_RIGHT, RSC_SP_TBPG_INNERBORDER_TOP + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP + 2*MA_BUTTON_HEIGHT ) ; Size = BUTTON_SIZE ; @@ -157,6 +163,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION #define MA_CURR_Y2 RSC_SP_TBPG_INNERBORDER_TOP + MA_EFFECTSGROUP_HEIGHT + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP TriStateBox TSB_START_INSIDE { + HelpID = "cui:TriStateBox:RID_SVXPAGE_TEXTANIMATION:TSB_START_INSIDE"; TabStop = TRUE ; Pos = MAP_APPFONT ( RSC_SP_TBPG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT, MA_CURR_Y2 ) ; Size = MAP_APPFONT ( MA_TOTAL_WIDTH - RSC_SP_TBPG_INNERBORDER_LEFT - RSC_SP_TBPG_INNERBORDER_RIGHT - 12, RSC_CD_CHECKBOX_HEIGHT ); @@ -165,6 +172,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION #define MA_CURR_Y3 MA_CURR_Y2 + RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y TriStateBox TSB_STOP_INSIDE { + HelpID = "cui:TriStateBox:RID_SVXPAGE_TEXTANIMATION:TSB_STOP_INSIDE"; TabStop = TRUE ; Pos = MAP_APPFONT ( RSC_SP_TBPG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT, MA_CURR_Y3 ) ; Size = MAP_APPFONT ( MA_TOTAL_WIDTH - RSC_SP_TBPG_INNERBORDER_LEFT - RSC_SP_TBPG_INNERBORDER_RIGHT - 12, RSC_CD_CHECKBOX_HEIGHT ); @@ -181,6 +189,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION #define MA_CURR_Y5 MA_CURR_Y4 + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP TriStateBox TSB_ENDLESS { + HelpID = "cui:TriStateBox:RID_SVXPAGE_TEXTANIMATION:TSB_ENDLESS"; TabStop = TRUE ; Pos = MAP_APPFONT ( RSC_SP_TBPG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT + 9 , MA_CURR_Y5 + 2 ) ; Size = MAP_APPFONT ( 71 , RSC_CD_CHECKBOX_HEIGHT ) ; @@ -188,6 +197,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION }; NumericField NUM_FLD_COUNT { + HelpID = "cui:NumericField:RID_SVXPAGE_TEXTANIMATION:NUM_FLD_COUNT"; Border = TRUE ; Pos = MAP_APPFONT ( RSC_SP_TBPG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT + 80 + RSC_SP_CTRL_GROUP_X, MA_CURR_Y5 ) ; @@ -209,6 +219,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION #define MA_CURR_Y7 MA_CURR_Y6 + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP TriStateBox TSB_PIXEL { + HelpID = "cui:TriStateBox:RID_SVXPAGE_TEXTANIMATION:TSB_PIXEL"; TabStop = TRUE ; Pos = MAP_APPFONT ( RSC_SP_TBPG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT + 9 , MA_CURR_Y7 + 2 ) ; Size = MAP_APPFONT ( 71 , RSC_CD_CHECKBOX_HEIGHT ) ; @@ -216,6 +227,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION }; MetricField MTR_FLD_AMOUNT { + HelpID = "cui:MetricField:RID_SVXPAGE_TEXTANIMATION:MTR_FLD_AMOUNT"; Border = TRUE ; Pos = MAP_APPFONT ( RSC_SP_TBPG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT + 80 + RSC_SP_CTRL_GROUP_X, MA_CURR_Y7 ) ; @@ -242,6 +254,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION #define MA_CURR_Y9 MA_CURR_Y8 + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP TriStateBox TSB_AUTO { + HelpID = "cui:TriStateBox:RID_SVXPAGE_TEXTANIMATION:TSB_AUTO"; Pos = MAP_APPFONT ( RSC_SP_TBPG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT + 9 , MA_CURR_Y9 + 2 ) ; Size = MAP_APPFONT ( 71 , RSC_CD_CHECKBOX_HEIGHT ) ; TabStop = TRUE ; @@ -249,6 +262,7 @@ TabPage RID_SVXPAGE_TEXTANIMATION }; MetricField MTR_FLD_DELAY { + HelpID = "cui:MetricField:RID_SVXPAGE_TEXTANIMATION:MTR_FLD_DELAY"; Border = TRUE ; Pos = MAP_APPFONT ( RSC_SP_TBPG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT + 80 + RSC_SP_CTRL_GROUP_X, MA_CURR_Y9 ) ; diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index c69a625ec..f9634b6d8 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -54,7 +54,7 @@ #include <svx/ofaitem.hxx> #include <editeng/writingmodeitem.hxx> -static USHORT pRanges[] = +static sal_uInt16 pRanges[] = { SDRATTR_MISC_FIRST, SDRATTR_TEXT_HORZADJUST, SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_AUTOGROWSIZE, @@ -113,6 +113,8 @@ SvxTextAttrPage::SvxTextAttrPage( Window* pWindow, const SfxItemSet& rInAttrs ) aTsbFullWidth.SetClickHdl( LINK( this, SvxTextAttrPage, ClickFullWidthHdl_Impl ) ); + + aCtlPosition.SetAccessibleRelationMemberOf( &aFlPosition ); } /************************************************************************* @@ -195,7 +197,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { aTsbAutoGrowHeight.SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbAutoGrowHeight.EnableTriState( FALSE ); + aTsbAutoGrowHeight.EnableTriState( sal_False ); } else aTsbAutoGrowHeight.SetState( STATE_DONTKNOW ); @@ -206,7 +208,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { aTsbAutoGrowWidth.SetState( ( ( const SdrTextAutoGrowWidthItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWWIDTH ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbAutoGrowWidth.EnableTriState( FALSE ); + aTsbAutoGrowWidth.EnableTriState( sal_False ); } else aTsbAutoGrowWidth.SetState( STATE_DONTKNOW ); @@ -217,7 +219,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { aTsbAutoGrowSize.SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbAutoGrowSize.EnableTriState( FALSE ); + aTsbAutoGrowSize.EnableTriState( sal_False ); } else aTsbAutoGrowSize.SetState( STATE_DONTKNOW ); @@ -228,7 +230,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { aTsbWordWrapText.SetState( ( ( const SdrTextWordWrapItem& )rAttrs.Get( SDRATTR_TEXT_WORDWRAP ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - aTsbWordWrapText.EnableTriState( FALSE ); + aTsbWordWrapText.EnableTriState( sal_False ); } else aTsbWordWrapText.SetState( STATE_DONTKNOW ); @@ -247,7 +249,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) SdrTextHorzAdjust eTHA = (SdrTextHorzAdjust)((const SdrTextHorzAdjustItem&)rAttrs.Get(SDRATTR_TEXT_HORZADJUST)).GetValue(); RECT_POINT eRP = RP_LB; - aTsbFullWidth.EnableTriState( FALSE ); + aTsbFullWidth.EnableTriState( sal_False ); // Translate item values into local anchor position. switch (eTVA) @@ -321,7 +323,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) SdrFitToSizeType eFTS = (SdrFitToSizeType) ( ( const SdrTextFitToSizeTypeItem& )rAttrs.Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue(); aTsbFitToSize.SetState( eFTS == SDRTEXTFIT_NONE ? STATE_NOCHECK : STATE_CHECK ); - aTsbFitToSize.EnableTriState( FALSE ); + aTsbFitToSize.EnableTriState( sal_False ); } else aTsbFitToSize.SetState( STATE_DONTKNOW ); @@ -330,9 +332,9 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) // Konturfluss if( rAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME ) != SFX_ITEM_DONTCARE ) { - BOOL bContour = ( ( const SdrTextContourFrameItem& )rAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue(); + sal_Bool bContour = ( ( const SdrTextContourFrameItem& )rAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue(); aTsbContour.SetState( bContour ? STATE_CHECK : STATE_NOCHECK ); - aTsbContour.EnableTriState( FALSE ); + aTsbContour.EnableTriState( sal_False ); } else aTsbContour.SetState( STATE_DONTKNOW ); @@ -347,13 +349,13 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) |* \************************************************************************/ -BOOL SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) +sal_Bool SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) { SfxItemPool* pPool = rAttrs.GetPool(); DBG_ASSERT( pPool, "Wo ist der Pool" ); SfxMapUnit eUnit = pPool->GetMetric( SDRATTR_TEXT_LEFTDIST ); - INT32 nValue; + sal_Int32 nValue; TriState eState; if( aMtrFldLeft.GetText() != aMtrFldLeft.GetSavedValue() ) @@ -383,32 +385,32 @@ BOOL SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) eState = aTsbAutoGrowHeight.GetState(); if( eState != aTsbAutoGrowHeight.GetSavedValue() ) { - rAttrs.Put( SdrTextAutoGrowHeightItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextAutoGrowHeightItem( (sal_Bool) STATE_CHECK == eState ) ); } eState = aTsbAutoGrowWidth.GetState(); if( eState != aTsbAutoGrowWidth.GetSavedValue() ) { - rAttrs.Put( SdrTextAutoGrowWidthItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextAutoGrowWidthItem( (sal_Bool) STATE_CHECK == eState ) ); } eState = aTsbAutoGrowSize.GetState(); if( eState != aTsbAutoGrowSize.GetSavedValue() ) { - rAttrs.Put( SdrTextAutoGrowHeightItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextAutoGrowHeightItem( (sal_Bool) STATE_CHECK == eState ) ); } eState = aTsbWordWrapText.GetState(); if( eState != aTsbWordWrapText.GetSavedValue() ) { - rAttrs.Put( SdrTextWordWrapItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextWordWrapItem( (sal_Bool) STATE_CHECK == eState ) ); } // Konturfluss eState = aTsbContour.GetState(); if( eState != aTsbContour.GetSavedValue() ) { - rAttrs.Put( SdrTextContourFrameItem( (BOOL) STATE_CHECK == eState ) ); + rAttrs.Put( SdrTextContourFrameItem( (sal_Bool) STATE_CHECK == eState ) ); } eState = aTsbFitToSize.GetState(); @@ -487,7 +489,7 @@ BOOL SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) rAttrs.Put( SdrTextHorzAdjustItem( eTHA ) ); } - return( TRUE ); + return( sal_True ); } /************************************************************************* @@ -500,8 +502,8 @@ void SvxTextAttrPage::Construct() { DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" ); - bFitToSizeEnabled = bContourEnabled = TRUE; - bWordWrapTextEnabled = bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = FALSE; + bFitToSizeEnabled = bContourEnabled = sal_True; + bWordWrapTextEnabled = bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = sal_False; const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); if( rMarkList.GetMarkCount() == 1 ) @@ -520,18 +522,18 @@ void SvxTextAttrPage::Construct() if ( ((SdrTextObj*)pObj)->HasText() ) { // Konturfluss ist NICHT bei reinen Textobjekten m�glich - bContourEnabled = FALSE; + bContourEnabled = sal_False; // Breite und Hoehe anpassen ist NUR bei reinen Textobjekten m�glich - bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = TRUE; + bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = sal_True; } } break; case OBJ_CUSTOMSHAPE : { - bFitToSizeEnabled = bContourEnabled = FALSE; - bAutoGrowSizeEnabled = TRUE; - bWordWrapTextEnabled = TRUE; + bFitToSizeEnabled = bContourEnabled = sal_False; + bAutoGrowSizeEnabled = sal_True; + bWordWrapTextEnabled = sal_True; } break; default: ;//prevent warning @@ -564,7 +566,7 @@ SfxTabPage* SvxTextAttrPage::Create( Window* pWindow, |* \************************************************************************/ -USHORT* SvxTextAttrPage::GetRanges() +sal_uInt16* SvxTextAttrPage::GetRanges() { return( pRanges ); } @@ -682,10 +684,10 @@ IMPL_LINK( SvxTextAttrPage, ClickFullWidthHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxTextAttrPage, ClickHdl_Impl, void *, EMPTYARG ) { - BOOL bAutoGrowWidth = aTsbAutoGrowWidth.GetState() == STATE_CHECK; - BOOL bAutoGrowHeight = aTsbAutoGrowHeight.GetState() == STATE_CHECK; - BOOL bFitToSize = aTsbFitToSize.GetState() == STATE_CHECK; - BOOL bContour = aTsbContour.GetState() == STATE_CHECK; + sal_Bool bAutoGrowWidth = aTsbAutoGrowWidth.GetState() == STATE_CHECK; + sal_Bool bAutoGrowHeight = aTsbAutoGrowHeight.GetState() == STATE_CHECK; + sal_Bool bFitToSize = aTsbFitToSize.GetState() == STATE_CHECK; + sal_Bool bContour = aTsbContour.GetState() == STATE_CHECK; aTsbContour.Enable( !bFitToSize && !( ( bAutoGrowWidth && bAutoGrowWidthEnabled ) || ( bAutoGrowHeight && bAutoGrowHeightEnabled ) ) && diff --git a/cui/source/tabpages/textattr.src b/cui/source/tabpages/textattr.src index 23a2138cb..45e5e9cb7 100644 --- a/cui/source/tabpages/textattr.src +++ b/cui/source/tabpages/textattr.src @@ -46,6 +46,7 @@ TabPage RID_SVXPAGE_TEXTATTR }; TriStateBox TSB_AUTOGROW_WIDTH { + HelpID = "cui:TriStateBox:RID_SVXPAGE_TEXTATTR:TSB_AUTOGROW_WIDTH"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 102 , 10 ) ; @@ -53,6 +54,7 @@ TabPage RID_SVXPAGE_TEXTATTR }; TriStateBox TSB_AUTOGROW_HEIGHT { + HelpID = "cui:TriStateBox:RID_SVXPAGE_TEXTATTR:TSB_AUTOGROW_HEIGHT"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 28 ) ; Size = MAP_APPFONT ( 102 , 10 ) ; @@ -60,6 +62,7 @@ TabPage RID_SVXPAGE_TEXTATTR }; TriStateBox TSB_FIT_TO_SIZE { + HelpID = "cui:TriStateBox:RID_SVXPAGE_TEXTATTR:TSB_FIT_TO_SIZE"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 42 ) ; Size = MAP_APPFONT ( 102 , 10 ) ; @@ -67,6 +70,7 @@ TabPage RID_SVXPAGE_TEXTATTR }; TriStateBox TSB_CONTOUR { + HelpID = "cui:TriStateBox:RID_SVXPAGE_TEXTATTR:TSB_CONTOUR"; TabStop = TRUE ; Pos = MAP_APPFONT ( 12 , 56 ) ; Size = MAP_APPFONT ( 102 , 10 ) ; @@ -74,6 +78,7 @@ TabPage RID_SVXPAGE_TEXTATTR }; TriStateBox TSB_WORDWRAP_TEXT { + HelpID = "cui:TriStateBox:RID_SVXPAGE_TEXTATTR:TSB_WORDWRAP_TEXT"; TabStop = TRUE; Pos = MAP_APPFONT( 132, 14 ) ; Size = MAP_APPFONT( 127 , 10 ) ; @@ -81,6 +86,7 @@ TabPage RID_SVXPAGE_TEXTATTR }; TriStateBox TSB_AUTOGROW_SIZE { + HelpID = "cui:TriStateBox:RID_SVXPAGE_TEXTATTR:TSB_AUTOGROW_SIZE"; TabStop = TRUE; Pos = MAP_APPFONT( 132, 28 ); Size = MAP_APPFONT( 127 , 10 ); @@ -118,6 +124,7 @@ TabPage RID_SVXPAGE_TEXTATTR }; MetricField MTR_FLD_LEFT { + HelpID = "cui:MetricField:RID_SVXPAGE_TEXTATTR:MTR_FLD_LEFT"; Border = TRUE ; Pos = MAP_APPFONT ( 69 , 83 ) ; Size = MAP_APPFONT ( 45 , 12 ) ; @@ -134,6 +141,7 @@ TabPage RID_SVXPAGE_TEXTATTR }; MetricField MTR_FLD_RIGHT { + HelpID = "cui:MetricField:RID_SVXPAGE_TEXTATTR:MTR_FLD_RIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 69 , 99 ) ; Size = MAP_APPFONT ( 45 , 12 ) ; @@ -150,6 +158,7 @@ TabPage RID_SVXPAGE_TEXTATTR }; MetricField MTR_FLD_TOP { + HelpID = "cui:MetricField:RID_SVXPAGE_TEXTATTR:MTR_FLD_TOP"; Border = TRUE ; Pos = MAP_APPFONT ( 69 , 115 ) ; Size = MAP_APPFONT ( 45 , 12 ) ; @@ -166,6 +175,7 @@ TabPage RID_SVXPAGE_TEXTATTR }; MetricField MTR_FLD_BOTTOM { + HelpID = "cui:MetricField:RID_SVXPAGE_TEXTATTR:MTR_FLD_BOTTOM"; Border = TRUE ; Pos = MAP_APPFONT ( 69 , 131 ) ; Size = MAP_APPFONT ( 45 , 12 ) ; @@ -202,6 +212,7 @@ TabPage RID_SVXPAGE_TEXTATTR }; TriStateBox TSB_FULL_WIDTH { + HelpID = "cui:TriStateBox:RID_SVXPAGE_TEXTATTR:TSB_FULL_WIDTH"; TabStop = TRUE ; Pos = MAP_APPFONT ( 132 , 139 ) ; Size = MAP_APPFONT ( 116 , 10 ) ; diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 4d42afe2d..ca7137723 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -53,12 +53,12 @@ #include "svx/dlgutil.hxx" #include <svl/intitem.hxx> #include <sfx2/request.hxx> - +#include "paragrph.hrc" #define DLGWIN this->GetParent()->GetParent() // static ---------------------------------------------------------------- -static USHORT pAreaRanges[] = +static sal_uInt16 pAreaRanges[] = { XATTR_GRADIENTSTEPCOUNT, XATTR_GRADIENTSTEPCOUNT, @@ -67,7 +67,7 @@ static USHORT pAreaRanges[] = 0 }; -static USHORT pTransparenceRanges[] = +static sal_uInt16 pTransparenceRanges[] = { XATTR_FILLTRANSPARENCE, XATTR_FILLTRANSPARENCE, @@ -87,8 +87,8 @@ static USHORT pTransparenceRanges[] = IMPL_LINK(SvxTransparenceTabPage, ClickTransOffHdl_Impl, void *, EMPTYARG) { // disable all other controls - ActivateLinear(FALSE); - ActivateGradient(FALSE); + ActivateLinear(sal_False); + ActivateGradient(sal_False); // Preview rXFSet.ClearItem (XATTR_FILLTRANSPARENCE); @@ -96,7 +96,7 @@ IMPL_LINK(SvxTransparenceTabPage, ClickTransOffHdl_Impl, void *, EMPTYARG) aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() ); - InvalidatePreview( FALSE ); + InvalidatePreview( sal_False ); return( 0L ); } @@ -104,8 +104,8 @@ IMPL_LINK(SvxTransparenceTabPage, ClickTransOffHdl_Impl, void *, EMPTYARG) IMPL_LINK(SvxTransparenceTabPage, ClickTransLinearHdl_Impl, void *, EMPTYARG) { // enable linear, disable other - ActivateLinear(TRUE); - ActivateGradient(FALSE); + ActivateLinear(sal_True); + ActivateGradient(sal_False); // preview rXFSet.ClearItem (XATTR_FILLFLOATTRANSPARENCE); @@ -117,8 +117,8 @@ IMPL_LINK(SvxTransparenceTabPage, ClickTransLinearHdl_Impl, void *, EMPTYARG) IMPL_LINK(SvxTransparenceTabPage, ClickTransGradientHdl_Impl, void *, EMPTYARG) { // enable gradient, disable other - ActivateLinear(FALSE); - ActivateGradient(TRUE); + ActivateLinear(sal_False); + ActivateGradient(sal_True); // preview rXFSet.ClearItem (XATTR_FILLTRANSPARENCE); @@ -127,14 +127,14 @@ IMPL_LINK(SvxTransparenceTabPage, ClickTransGradientHdl_Impl, void *, EMPTYARG) return( 0L ); } -void SvxTransparenceTabPage::ActivateLinear(BOOL bActivate) +void SvxTransparenceTabPage::ActivateLinear(sal_Bool bActivate) { aMtrTransparent.Enable(bActivate); } IMPL_LINK(SvxTransparenceTabPage, ModifyTransparentHdl_Impl, void*, EMPTYARG) { - UINT16 nPos = (UINT16)aMtrTransparent.GetValue(); + sal_uInt16 nPos = (sal_uInt16)aMtrTransparent.GetValue(); XFillTransparenceItem aItem(nPos); rXFSet.Put(XFillTransparenceItem(aItem)); @@ -153,16 +153,16 @@ IMPL_LINK(SvxTransparenceTabPage, ModifiedTrgrHdl_Impl, void *, pControl) } // preview - UINT8 nStartCol = (UINT8)(((UINT16)aMtrTrgrStartValue.GetValue() * 255) / 100); - UINT8 nEndCol = (UINT8)(((UINT16)aMtrTrgrEndValue.GetValue() * 255) / 100); + sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)aMtrTrgrStartValue.GetValue() * 255) / 100); + sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)aMtrTrgrEndValue.GetValue() * 255) / 100); XGradient aTmpGradient( Color(nStartCol, nStartCol, nStartCol), Color(nEndCol, nEndCol, nEndCol), (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos(), - (UINT16)aMtrTrgrAngle.GetValue() * 10, - (UINT16)aMtrTrgrCenterX.GetValue(), - (UINT16)aMtrTrgrCenterY.GetValue(), - (UINT16)aMtrTrgrBorder.GetValue(), + (sal_uInt16)aMtrTrgrAngle.GetValue() * 10, + (sal_uInt16)aMtrTrgrCenterX.GetValue(), + (sal_uInt16)aMtrTrgrCenterY.GetValue(), + (sal_uInt16)aMtrTrgrBorder.GetValue(), 100, 100); String aString; @@ -174,7 +174,7 @@ IMPL_LINK(SvxTransparenceTabPage, ModifiedTrgrHdl_Impl, void *, pControl) return( 0L ); } -void SvxTransparenceTabPage::ActivateGradient(BOOL bActivate) +void SvxTransparenceTabPage::ActivateGradient(sal_Bool bActivate) { aFtTrgrType.Enable(bActivate); aLbTrgrGradientType.Enable(bActivate); @@ -277,13 +277,18 @@ SvxTransparenceTabPage::SvxTransparenceTabPage(Window* pParent, const SfxItemSet aCtlBitmapPreview ( this, CUI_RES( CTL_BITMAP_PREVIEW ) ), aCtlXRectPreview ( this, CUI_RES( CTL_TRANS_PREVIEW ) ), - bBitmap ( FALSE ), + bBitmap ( sal_False ), pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFillAttr ( pXPool ), rXFSet ( aXFillAttr.GetItemSet() ) { FreeResource(); + String accName = String(CUI_RES(STR_EXAMPLE)); + aCtlBitmapPreview.SetAccessibleName(accName); + aCtlXRectPreview.SetAccessibleName(accName); + aMtrTransparent.SetAccessibleRelationLabeledBy( &aRbtTransLinear ); + // main selection aRbtTransOff.SetClickHdl(LINK(this, SvxTransparenceTabPage, ClickTransOffHdl_Impl)); aRbtTransLinear.SetClickHdl(LINK(this, SvxTransparenceTabPage, ClickTransLinearHdl_Impl)); @@ -319,33 +324,33 @@ SfxTabPage* SvxTransparenceTabPage::Create(Window* pWindow, const SfxItemSet& rA return(new SvxTransparenceTabPage(pWindow, rAttrs)); } -UINT16* SvxTransparenceTabPage::GetRanges() +sal_uInt16* SvxTransparenceTabPage::GetRanges() { return(pTransparenceRanges); } -BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) +sal_Bool SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) { const SfxPoolItem* pGradientItem = NULL; const SfxPoolItem* pLinearItem = NULL; - SfxItemState eStateGradient(rOutAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, TRUE, &pGradientItem)); - SfxItemState eStateLinear(rOutAttrs.GetItemState(XATTR_FILLTRANSPARENCE, TRUE, &pLinearItem)); - BOOL bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); - BOOL bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); + SfxItemState eStateGradient(rOutAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, sal_True, &pGradientItem)); + SfxItemState eStateLinear(rOutAttrs.GetItemState(XATTR_FILLTRANSPARENCE, sal_True, &pLinearItem)); + sal_Bool bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); + sal_Bool bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); // #103765# - BOOL bGradUsed = (eStateGradient == SFX_ITEM_DONTCARE); - BOOL bLinearUsed = (eStateLinear == SFX_ITEM_DONTCARE); + sal_Bool bGradUsed = (eStateGradient == SFX_ITEM_DONTCARE); + sal_Bool bLinearUsed = (eStateLinear == SFX_ITEM_DONTCARE); - BOOL bModified(FALSE); - BOOL bSwitchOffLinear(FALSE); - BOOL bSwitchOffGradient(FALSE); + sal_Bool bModified(sal_False); + sal_Bool bSwitchOffLinear(sal_False); + sal_Bool bSwitchOffGradient(sal_False); if(aMtrTransparent.IsEnabled()) { // linear transparence - UINT16 nPos = (UINT16)aMtrTransparent.GetValue(); - if(nPos != (UINT16)aMtrTransparent.GetSavedValue().ToInt32() || !bLinearActive) + sal_uInt16 nPos = (sal_uInt16)aMtrTransparent.GetValue(); + if(nPos != (sal_uInt16)aMtrTransparent.GetSavedValue().ToInt32() || !bLinearActive) { XFillTransparenceItem aItem(nPos); SdrShadowTransparenceItem aShadowItem(nPos); @@ -354,8 +359,8 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) { rAttrs.Put(aItem); rAttrs.Put(aShadowItem); - bModified = TRUE; - bSwitchOffGradient = TRUE; + bModified = sal_True; + bSwitchOffGradient = sal_True; } } } @@ -364,23 +369,23 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) // transparence gradient, fill ItemSet from values if(!bGradActive || (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos() != (XGradientStyle)aLbTrgrGradientType.GetSavedValue() - || (UINT16)aMtrTrgrAngle.GetValue() != (UINT16)aMtrTrgrAngle.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrCenterX.GetValue() != (UINT16)aMtrTrgrCenterX.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrCenterY.GetValue() != (UINT16)aMtrTrgrCenterY.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrBorder.GetValue() != (UINT16)aMtrTrgrBorder.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrStartValue.GetValue() != (UINT16)aMtrTrgrStartValue.GetSavedValue().ToInt32() - || (UINT16)aMtrTrgrEndValue.GetValue() != (UINT16)aMtrTrgrEndValue.GetSavedValue().ToInt32() ) + || (sal_uInt16)aMtrTrgrAngle.GetValue() != (sal_uInt16)aMtrTrgrAngle.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrCenterX.GetValue() != (sal_uInt16)aMtrTrgrCenterX.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrCenterY.GetValue() != (sal_uInt16)aMtrTrgrCenterY.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrBorder.GetValue() != (sal_uInt16)aMtrTrgrBorder.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrStartValue.GetValue() != (sal_uInt16)aMtrTrgrStartValue.GetSavedValue().ToInt32() + || (sal_uInt16)aMtrTrgrEndValue.GetValue() != (sal_uInt16)aMtrTrgrEndValue.GetSavedValue().ToInt32() ) { - UINT8 nStartCol = (UINT8)(((UINT16)aMtrTrgrStartValue.GetValue() * 255) / 100); - UINT8 nEndCol = (UINT8)(((UINT16)aMtrTrgrEndValue.GetValue() * 255) / 100); + sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)aMtrTrgrStartValue.GetValue() * 255) / 100); + sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)aMtrTrgrEndValue.GetValue() * 255) / 100); XGradient aTmpGradient( Color(nStartCol, nStartCol, nStartCol), Color(nEndCol, nEndCol, nEndCol), (XGradientStyle)aLbTrgrGradientType.GetSelectEntryPos(), - (UINT16)aMtrTrgrAngle.GetValue() * 10, - (UINT16)aMtrTrgrCenterX.GetValue(), - (UINT16)aMtrTrgrCenterY.GetValue(), - (UINT16)aMtrTrgrBorder.GetValue(), + (sal_uInt16)aMtrTrgrAngle.GetValue() * 10, + (sal_uInt16)aMtrTrgrCenterX.GetValue(), + (sal_uInt16)aMtrTrgrCenterY.GetValue(), + (sal_uInt16)aMtrTrgrBorder.GetValue(), 100, 100); String aString; @@ -390,16 +395,16 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) if(!pOld || !(*(const XFillFloatTransparenceItem*)pOld == aItem) || !bGradActive) { rAttrs.Put(aItem); - bModified = TRUE; - bSwitchOffLinear = TRUE; + bModified = sal_True; + bSwitchOffLinear = sal_True; } } } else { // no transparence - bSwitchOffGradient = TRUE; - bSwitchOffLinear = TRUE; + bSwitchOffGradient = sal_True; + bSwitchOffLinear = sal_True; } // disable unused XFillFloatTransparenceItem @@ -411,9 +416,9 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) aGrad.SetEndIntens(100); String aString; XFillFloatTransparenceItem aItem( rXFSet.GetPool()/*aString*/, aGrad); - aItem.SetEnabled(FALSE); + aItem.SetEnabled(sal_False); rAttrs.Put(aItem); - bModified = TRUE; + bModified = sal_True; } // disable unused XFillFloatTransparenceItem @@ -423,7 +428,7 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) SdrShadowTransparenceItem aShadowItem(0); rAttrs.Put(aItem); rAttrs.Put(aShadowItem); - bModified = TRUE; + bModified = sal_True; } rAttrs.Put (CntUInt16Item(SID_PAGE_TYPE,nPageType)); return bModified; @@ -432,30 +437,30 @@ BOOL SvxTransparenceTabPage::FillItemSet(SfxItemSet& rAttrs) void SvxTransparenceTabPage::Reset(const SfxItemSet& rAttrs) { const SfxPoolItem* pGradientItem = NULL; - SfxItemState eStateGradient(rAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, TRUE, &pGradientItem)); + SfxItemState eStateGradient(rAttrs.GetItemState(XATTR_FILLFLOATTRANSPARENCE, sal_True, &pGradientItem)); if(!pGradientItem) pGradientItem = &rAttrs.Get(XATTR_FILLFLOATTRANSPARENCE); - BOOL bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); + sal_Bool bGradActive = (eStateGradient == SFX_ITEM_SET && ((XFillFloatTransparenceItem*)pGradientItem)->IsEnabled()); const SfxPoolItem* pLinearItem = NULL; - SfxItemState eStateLinear(rAttrs.GetItemState(XATTR_FILLTRANSPARENCE, TRUE, &pLinearItem)); + SfxItemState eStateLinear(rAttrs.GetItemState(XATTR_FILLTRANSPARENCE, sal_True, &pLinearItem)); if(!pLinearItem) pLinearItem = &rAttrs.Get(XATTR_FILLTRANSPARENCE); - BOOL bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); + sal_Bool bLinearActive = (eStateLinear == SFX_ITEM_SET && ((XFillTransparenceItem*)pLinearItem)->GetValue() != 0); // transparence gradient const XGradient& rGradient = ((XFillFloatTransparenceItem*)pGradientItem)->GetGradientValue(); XGradientStyle eXGS(rGradient.GetGradientStyle()); - aLbTrgrGradientType.SelectEntryPos(sal::static_int_cast< USHORT >(eXGS)); + aLbTrgrGradientType.SelectEntryPos(sal::static_int_cast< sal_uInt16 >(eXGS)); aMtrTrgrAngle.SetValue(rGradient.GetAngle() / 10); aMtrTrgrBorder.SetValue(rGradient.GetBorder()); aMtrTrgrCenterX.SetValue(rGradient.GetXOffset()); aMtrTrgrCenterY.SetValue(rGradient.GetYOffset()); - aMtrTrgrStartValue.SetValue((UINT16)((((UINT16)rGradient.GetStartColor().GetRed() + 1) * 100) / 255)); - aMtrTrgrEndValue.SetValue((UINT16)((((UINT16)rGradient.GetEndColor().GetRed() + 1) * 100) / 255)); + aMtrTrgrStartValue.SetValue((sal_uInt16)((((sal_uInt16)rGradient.GetStartColor().GetRed() + 1) * 100) / 255)); + aMtrTrgrEndValue.SetValue((sal_uInt16)((((sal_uInt16)rGradient.GetEndColor().GetRed() + 1) * 100) / 255)); // linear transparence - UINT16 nTransp = ((XFillTransparenceItem*)pLinearItem)->GetValue(); + sal_uInt16 nTransp = ((XFillTransparenceItem*)pLinearItem)->GetValue(); aMtrTransparent.SetValue(bLinearActive ? nTransp : 50); ModifyTransparentHdl_Impl(NULL); @@ -490,7 +495,7 @@ void SvxTransparenceTabPage::Reset(const SfxItemSet& rAttrs) aMtrTrgrStartValue.SaveValue(); aMtrTrgrEndValue.SaveValue(); - BOOL bActive = InitPreview ( rAttrs ); + sal_Bool bActive = InitPreview ( rAttrs ); InvalidatePreview ( bActive ); } @@ -521,7 +526,7 @@ void SvxTransparenceTabPage::PointChanged(Window* , RECT_POINT eRcPt) // // Preview-Methods // -BOOL SvxTransparenceTabPage::InitPreview ( const SfxItemSet& rSet ) +sal_Bool SvxTransparenceTabPage::InitPreview ( const SfxItemSet& rSet ) { // set transparencetyp for preview if ( aRbtTransOff.IsChecked() ) @@ -563,7 +568,7 @@ BOOL SvxTransparenceTabPage::InitPreview ( const SfxItemSet& rSet ) return !aRbtTransOff.IsChecked(); } -void SvxTransparenceTabPage::InvalidatePreview (BOOL bEnable) +void SvxTransparenceTabPage::InvalidatePreview (sal_Bool bEnable) { if ( bBitmap ) { @@ -661,6 +666,10 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : { FreeResource(); + String accName = String(CUI_RES(STR_EXAMPLE)); + aCtlXRectPreview.SetAccessibleName(accName); + aCtlBitmapPreview.SetAccessibleName(accName); + // Gruppen, die sich ueberlagern aLbBitmap.Hide(); aCtlBitmapPreview.Hide(); @@ -693,7 +702,7 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : aLbHatchBckgrdColor.Hide(); - aTsbOriginal.EnableTriState( FALSE ); + aTsbOriginal.EnableTriState( sal_False ); // this page needs ExchangeSupport @@ -710,8 +719,8 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : break; default: ;//prevent warning } - SetFieldUnit( aMtrFldXSize, eFUnit, TRUE ); - SetFieldUnit( aMtrFldYSize, eFUnit, TRUE ); + SetFieldUnit( aMtrFldXSize, eFUnit, sal_True ); + SetFieldUnit( aMtrFldYSize, eFUnit, sal_True ); // get PoolUnit SfxItemPool* pPool = rOutAttrs.GetPool(); @@ -756,7 +765,16 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : aTypeLB.SetSelectHdl( LINK( this, SvxAreaTabPage, SelectDialogTypeHdl_Impl ) ); // #i76307# always paint the preview in LTR, because this is what the document does - aCtlXRectPreview.EnableRTL(FALSE); + aCtlXRectPreview.EnableRTL(sal_False); + + aNumFldStepCount.SetAccessibleRelationLabeledBy( &aTsbStepCount ); + aCtlPosition.SetAccessibleRelationMemberOf( &aFlPosition ); + aLbHatchBckgrdColor.SetAccessibleRelationLabeledBy( &aCbxHatchBckgrd ); + aLbHatchBckgrdColor.SetAccessibleName(aCbxHatchBckgrd.GetText()); + + aLbColor.SetAccessibleRelationMemberOf( &aFlProp ); + aMtrFldOffset.SetAccessibleRelationLabeledBy(&aFlOffset); + aMtrFldOffset.SetAccessibleName(aFlOffset.GetText()); } // ----------------------------------------------------------------------- @@ -776,7 +794,7 @@ void SvxAreaTabPage::Construct() void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) { - USHORT nCount; + sal_uInt16 nCount; SFX_ITEMSET_ARG (&rSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False); SFX_ITEMSET_ARG (&rSet,pPosItem,SfxUInt16Item,SID_TABPAGE_POS,sal_False); if (pPageTypeItem) @@ -785,7 +803,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) SetPos(pPosItem->GetValue()); if( nDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = TRUE; + *pbAreaTP = sal_True; if( pColorTab ) { @@ -968,11 +986,11 @@ int SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- -BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) +sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) { const SfxPoolItem* pOld = NULL; - USHORT _nPos; - BOOL bModified = FALSE; + sal_uInt16 _nPos; + sal_Bool bModified = sal_False; if( nDlgType != 0 || *pbAreaTP ) { @@ -989,7 +1007,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1006,20 +1024,20 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillColorItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // NEU if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE ) ) ) + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True ) ) ) { XFillStyleItem aStyleItem( XFILL_SOLID ); pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1037,20 +1055,20 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillGradientItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // NEU if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE ) ) ) + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True ) ) ) { XFillStyleItem aStyleItem( XFILL_GRADIENT ); pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1068,7 +1086,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillHatchItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } XFillBackgroundItem aItem ( aCbxHatchBckgrd.IsChecked() ); @@ -1083,20 +1101,20 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillColorItem*)pOld == aFillColorItem ) ) { rAttrs.Put( aFillColorItem ); - bModified = TRUE; + bModified = sal_True; } } // NEU if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE ) ) ) + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), sal_True ) ) ) { XFillStyleItem aStyleItem( XFILL_HATCH ); pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1114,20 +1132,20 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBitmapItem*)pOld == aFillBitmapItem ) ) { rAttrs.Put( aFillBitmapItem ); - bModified = TRUE; + bModified = sal_True; } } // NEU if( (eSavedStyle != eStyle) && ( bModified || - SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), TRUE ) ) ) + SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True ) ) ) { XFillStyleItem aStyleItem( XFILL_BITMAP ); pOld = GetOldItem( rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { rAttrs.Put( aStyleItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1137,22 +1155,22 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) // Schrittweite if( aTsbStepCount.IsEnabled() ) { - UINT16 nValue = 0; - BOOL bValueModified = FALSE; + sal_uInt16 nValue = 0; + sal_Bool bValueModified = sal_False; TriState eState = aTsbStepCount.GetState(); if( eState == STATE_CHECK ) { if( eState != aTsbStepCount.GetSavedValue() ) - bValueModified = TRUE; + bValueModified = sal_True; } else { // Zustand != Disabled ? if( aNumFldStepCount.GetText().Len() > 0 ) { - nValue = (UINT16) aNumFldStepCount.GetValue(); - if( nValue != (UINT16) aNumFldStepCount.GetSavedValue().ToInt32() ) - bValueModified = TRUE; + nValue = (sal_uInt16) aNumFldStepCount.GetValue(); + if( nValue != (sal_uInt16) aNumFldStepCount.GetSavedValue().ToInt32() ) + bValueModified = sal_True; } } if( bValueModified ) @@ -1162,7 +1180,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XGradientStepCountItem*)pOld == aFillBitmapItem ) ) { rAttrs.Put( aFillBitmapItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1174,12 +1192,12 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( eState != aTsbTile.GetSavedValue() ) { XFillBmpTileItem aFillBmpTileItem( - sal::static_int_cast< BOOL >( eState ) ); + sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_TILE ); if ( !pOld || !( *(const XFillBmpTileItem*)pOld == aFillBmpTileItem ) ) { rAttrs.Put( aFillBmpTileItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1190,19 +1208,19 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( eState != aTsbStretch.GetSavedValue() ) { XFillBmpStretchItem aFillBmpStretchItem( - sal::static_int_cast< BOOL >( eState ) ); + sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_STRETCH ); if ( !pOld || !( *(const XFillBmpStretchItem*)pOld == aFillBmpStretchItem ) ) { rAttrs.Put( aFillBmpStretchItem ); - bModified = TRUE; + bModified = sal_True; } } } // Originalgroesse (im UI) wird wie folgt benutzt: // Controls sind disabled, muessen aber gesetzt werden. - // SizeX = 0; SizeY = 0; Log = TRUE + // SizeX = 0; SizeY = 0; Log = sal_True //aTsbScale TriState eState = aTsbScale.GetState(); @@ -1215,7 +1233,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( aTsbScale.IsEnabled() ) pItem = new XFillBmpSizeLogItem( eState == STATE_NOCHECK ); else if( aTsbOriginal.IsEnabled() && aTsbOriginal.GetState() == STATE_CHECK ) - pItem = new XFillBmpSizeLogItem( TRUE ); + pItem = new XFillBmpSizeLogItem( sal_True ); if( pItem ) { @@ -1223,7 +1241,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBmpSizeLogItem*)pOld == *pItem ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -1260,7 +1278,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBmpSizeXItem*)pOld == *pItem ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -1297,7 +1315,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBmpSizeYItem*)pOld == *pItem ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -1316,24 +1334,24 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) { if( aRbtRow.IsChecked() ) { - XFillBmpTileOffsetXItem aFillBmpTileOffsetXItem( (UINT16) aMtrFldOffset.GetValue() ); + XFillBmpTileOffsetXItem aFillBmpTileOffsetXItem( (sal_uInt16) aMtrFldOffset.GetValue() ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_TILEOFFSETX ); if ( !pOld || !( *(const XFillBmpTileOffsetXItem*)pOld == aFillBmpTileOffsetXItem ) ) { rAttrs.Put( aFillBmpTileOffsetXItem ); rAttrs.Put( XFillBmpTileOffsetYItem( 0 ) ); - bModified = TRUE; + bModified = sal_True; } } else if( aRbtColumn.IsChecked() ) { - XFillBmpTileOffsetYItem aFillBmpTileOffsetYItem( (UINT16) aMtrFldOffset.GetValue() ); + XFillBmpTileOffsetYItem aFillBmpTileOffsetYItem( (sal_uInt16) aMtrFldOffset.GetValue() ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_TILEOFFSETY ); if ( !pOld || !( *(const XFillBmpTileOffsetYItem*)pOld == aFillBmpTileOffsetYItem ) ) { rAttrs.Put( aFillBmpTileOffsetYItem ); rAttrs.Put( XFillBmpTileOffsetXItem( 0 ) ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1342,16 +1360,16 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) //aCtlPosition if( aCtlPosition.IsEnabled() ) { - BOOL bPut = FALSE; + sal_Bool bPut = sal_False; RECT_POINT _eRP = aCtlPosition.GetActualRP(); if( SFX_ITEM_DONTCARE == rOutAttrs.GetItemState( XATTR_FILLBMP_POS ) ) - bPut = TRUE; + bPut = sal_True; else { RECT_POINT eValue = ( ( const XFillBmpPosItem& ) rOutAttrs.Get( XATTR_FILLBMP_POS ) ).GetValue(); if( eValue != _eRP ) - bPut = TRUE; + bPut = sal_True; } if( bPut ) { @@ -1360,7 +1378,7 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XFillBmpPosItem*)pOld == aFillBmpPosItem ) ) { rAttrs.Put( aFillBmpPosItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1372,12 +1390,12 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( sMtrXOffset.Len() > 0 && sMtrXOffset != aMtrFldXOffset.GetSavedValue() ) { - XFillBmpPosOffsetXItem aFillBmpPosOffsetXItem( (UINT16) aMtrFldXOffset.GetValue() ); + XFillBmpPosOffsetXItem aFillBmpPosOffsetXItem( (sal_uInt16) aMtrFldXOffset.GetValue() ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_POSOFFSETX ); if ( !pOld || !( *(const XFillBmpPosOffsetXItem*)pOld == aFillBmpPosOffsetXItem ) ) { rAttrs.Put( aFillBmpPosOffsetXItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1389,12 +1407,12 @@ BOOL SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs ) if( sMtrYOffset.Len() > 0 && sMtrYOffset != aMtrFldYOffset.GetSavedValue() ) { - XFillBmpPosOffsetYItem aFillBmpPosOffsetYItem( (UINT16) aMtrFldYOffset.GetValue() ); + XFillBmpPosOffsetYItem aFillBmpPosOffsetYItem( (sal_uInt16) aMtrFldYOffset.GetValue() ); pOld = GetOldItem( rAttrs, XATTR_FILLBMP_POSOFFSETY ); if ( !pOld || !( *(const XFillBmpPosOffsetYItem*)pOld == aFillBmpPosOffsetYItem ) ) { rAttrs.Put( aFillBmpPosOffsetYItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -1414,7 +1432,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) { eXFS = (XFillStyle) ( ( ( const XFillStyleItem& ) rAttrs. Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue() ); - aTypeLB.SelectEntryPos( sal::static_int_cast< USHORT >( eXFS ) ); + aTypeLB.SelectEntryPos( sal::static_int_cast< sal_uInt16 >( eXFS ) ); switch( eXFS ) { case XFILL_NONE: @@ -1507,8 +1525,8 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) if( ( rAttrs.GetItemState( XATTR_GRADIENTSTEPCOUNT ) != SFX_ITEM_DONTCARE ) || ( rAttrs.GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE ) ) { - aTsbStepCount.EnableTriState( FALSE ); - UINT16 nValue = ( ( const XGradientStepCountItem& ) rAttrs.Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue(); + aTsbStepCount.EnableTriState( sal_False ); + sal_uInt16 nValue = ( ( const XGradientStepCountItem& ) rAttrs.Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue(); if( nValue == 0 ) { aTsbStepCount.SetState( STATE_CHECK ); @@ -1532,7 +1550,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) // Ist Kacheln gesetzt? if( rAttrs.GetItemState( XATTR_FILLBMP_TILE ) != SFX_ITEM_DONTCARE ) { - aTsbTile.EnableTriState( FALSE ); + aTsbTile.EnableTriState( sal_False ); if( ( ( const XFillBmpTileItem& ) rAttrs.Get( XATTR_FILLBMP_TILE ) ).GetValue() ) aTsbTile.SetState( STATE_CHECK ); @@ -1545,7 +1563,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) // Ist Stretchen gesetzt? if( rAttrs.GetItemState( XATTR_FILLBMP_STRETCH ) != SFX_ITEM_DONTCARE ) { - aTsbStretch.EnableTriState( FALSE ); + aTsbStretch.EnableTriState( sal_False ); if( ( ( const XFillBmpStretchItem& ) rAttrs.Get( XATTR_FILLBMP_STRETCH ) ).GetValue() ) aTsbStretch.SetState( STATE_CHECK ); @@ -1559,7 +1577,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aTsbScale if( rAttrs.GetItemState( XATTR_FILLBMP_SIZELOG ) != SFX_ITEM_DONTCARE ) { - aTsbScale.EnableTriState( FALSE ); + aTsbScale.EnableTriState( sal_False ); if( ( ( const XFillBmpSizeLogItem& ) rAttrs.Get( XATTR_FILLBMP_SIZELOG ) ).GetValue() ) aTsbScale.SetState( STATE_NOCHECK ); @@ -1578,7 +1596,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldXSize if( rAttrs.GetItemState( XATTR_FILLBMP_SIZEX ) != SFX_ITEM_DONTCARE ) { - INT32 nValue = ( ( const XFillBmpSizeXItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEX ) ).GetValue(); + sal_Int32 nValue = ( ( const XFillBmpSizeXItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEX ) ).GetValue(); if( aTsbScale.GetState() == STATE_CHECK ) { // Wenn im Item eine Prozentangabe steckt, @@ -1606,7 +1624,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldYSize if( rAttrs.GetItemState( XATTR_FILLBMP_SIZEY ) != SFX_ITEM_DONTCARE ) { - INT32 nValue = ( ( const XFillBmpSizeYItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEY ) ).GetValue(); + sal_Int32 nValue = ( ( const XFillBmpSizeYItem& ) rAttrs.Get( XATTR_FILLBMP_SIZEY ) ).GetValue(); if( aTsbScale.GetState() == STATE_CHECK ) { // Wenn im Item eine Prozentangabe steckt, @@ -1640,7 +1658,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldOffset if( rAttrs.GetItemState( XATTR_FILLBMP_TILEOFFSETX ) != SFX_ITEM_DONTCARE ) { - UINT16 nValue = ( ( const XFillBmpTileOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_TILEOFFSETX ) ).GetValue(); + sal_uInt16 nValue = ( ( const XFillBmpTileOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_TILEOFFSETX ) ).GetValue(); if( nValue > 0 ) { aMtrFldOffset.SetValue( nValue ); @@ -1674,7 +1692,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldXOffset if( rAttrs.GetItemState( XATTR_FILLBMP_POSOFFSETX ) != SFX_ITEM_DONTCARE ) { - INT32 nValue = ( ( const XFillBmpPosOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETX ) ).GetValue(); + sal_Int32 nValue = ( ( const XFillBmpPosOffsetXItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETX ) ).GetValue(); aMtrFldXOffset.SetValue( nValue ); } else @@ -1683,7 +1701,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aMtrFldYOffset if( rAttrs.GetItemState( XATTR_FILLBMP_POSOFFSETY ) != SFX_ITEM_DONTCARE ) { - INT32 nValue = ( ( const XFillBmpPosOffsetYItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETY ) ).GetValue(); + sal_Int32 nValue = ( ( const XFillBmpPosOffsetYItem& ) rAttrs.Get( XATTR_FILLBMP_POSOFFSETY ) ).GetValue(); aMtrFldYOffset.SetValue( nValue ); } else @@ -1722,7 +1740,7 @@ SfxTabPage* SvxAreaTabPage::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SvxAreaTabPage::GetRanges() +sal_uInt16* SvxAreaTabPage::GetRanges() { return( pAreaRanges ); } @@ -1854,7 +1872,7 @@ IMPL_LINK( SvxAreaTabPage, ClickColorHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyColorHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbColor.GetSelectEntryPos(); aLbHatchBckgrdColor.SelectEntryPos( _nPos ); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -1863,7 +1881,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyColorHdl_Impl, void *, EMPTYARG ) aLbColor.GetSelectEntryColor() ) ); } // NEU - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_SOLID ) ); Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetColorValue() ); @@ -1945,7 +1963,7 @@ IMPL_LINK( SvxAreaTabPage, ClickGradientHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyGradientHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbGradient.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbGradient.GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { // ItemSet fuellen und an aCtlXRectPreview weiterleiten @@ -1955,7 +1973,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyGradientHdl_Impl, void *, EMPTYARG ) rXFSet.Put( XFillGradientItem( String(), pEntry->GetGradient() ) ); } - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_GRADIENT ) ); rXFSet.Put( XFillGradientItem( String(), ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() ) ); @@ -2039,7 +2057,7 @@ IMPL_LINK( SvxAreaTabPage, ClickHatchingHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyHatchingHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbHatching.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbHatching.GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { // ItemSet fuellen und an aCtlXRectPreview weiterleiten @@ -2048,7 +2066,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyHatchingHdl_Impl, void *, EMPTYARG ) rXFSet.Put( XFillStyleItem( XFILL_HATCH ) ); rXFSet.Put( XFillHatchItem( String(), pEntry->GetHatch() ) ); } - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_HATCH ) ); rXFSet.Put( XFillHatchItem( String(), ( ( const XFillHatchItem* ) pPoolItem )->GetHatchValue() ) ); @@ -2067,14 +2085,14 @@ IMPL_LINK( SvxAreaTabPage, ModifyHatchingHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbHatchBckgrdColor.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbHatchBckgrdColor.GetSelectEntryPos(); aLbColor.SelectEntryPos( _nPos ); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { rXFSet.Put( XFillColorItem( String(), aLbHatchBckgrdColor.GetSelectEntryColor() ) ); } - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetColorValue() ); rXFSet.Put( XFillColorItem( String(), aColor ) ); @@ -2198,7 +2216,7 @@ IMPL_LINK( SvxAreaTabPage, ClickBitmapHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxAreaTabPage, ModifyBitmapHdl_Impl, void *, EMPTYARG ) { const SfxPoolItem* pPoolItem = NULL; - USHORT _nPos = aLbBitmap.GetSelectEntryPos(); + sal_uInt16 _nPos = aLbBitmap.GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { // ItemSet fuellen und an aCtlXRectPreview weiterleiten @@ -2207,7 +2225,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyBitmapHdl_Impl, void *, EMPTYARG ) rXFSet.Put( XFillStyleItem( XFILL_BITMAP ) ); rXFSet.Put( XFillBitmapItem( String(), pEntry->GetXBitmap() ) ); } - else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), TRUE, &pPoolItem ) ) + else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True, &pPoolItem ) ) { rXFSet.Put( XFillStyleItem( XFILL_BITMAP ) ); rXFSet.Put( XFillBitmapItem( String(), ( ( const XFillBitmapItem* ) pPoolItem )->GetBitmapValue() ) ); @@ -2238,12 +2256,12 @@ IMPL_LINK( SvxAreaTabPage, ModifyStepCountHdl_Impl, void *, p ) aNumFldStepCount.Disable(); } - UINT16 nValue = 0; + sal_uInt16 nValue = 0; if( aTsbStepCount.GetState() != STATE_CHECK ) { // Zustand != Disabled ? if( aNumFldStepCount.GetText().Len() > 0 ) - nValue = (UINT16) aNumFldStepCount.GetValue(); + nValue = (sal_uInt16) aNumFldStepCount.GetValue(); } rXFSet.Put( XGradientStepCountItem( nValue ) ); aCtlXRectPreview.SetAttributes( aXFillAttr.GetItemSet() ); @@ -2359,12 +2377,12 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) aMtrFldYSize.SetValue( aMtrFldYSize.GetValue() ); } - rXFSet.Put( XFillBmpTileItem( sal::static_int_cast< BOOL >( eState ) ) ); + rXFSet.Put( XFillBmpTileItem( sal::static_int_cast< sal_Bool >( eState ) ) ); if( aTsbStretch.IsEnabled() ) rXFSet.Put( XFillBmpStretchItem( - sal::static_int_cast< BOOL >( aTsbStretch.GetState() ) ) ); + sal::static_int_cast< sal_Bool >( aTsbStretch.GetState() ) ) ); if( aTsbScale.IsEnabled() ) rXFSet.Put( XFillBmpSizeLogItem( aTsbScale.GetState() == STATE_NOCHECK ) ); @@ -2387,7 +2405,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) { // Originalgroesse -> Size == 0 rXFSet.Put( XFillBmpSizeXItem( 0 ) ); - rXFSet.Put( XFillBmpSizeLogItem( TRUE ) ); + rXFSet.Put( XFillBmpSizeLogItem( sal_True ) ); } if( aMtrFldYSize.IsEnabled() ) @@ -2408,20 +2426,20 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) { // Originalgroesse -> Size == 0 rXFSet.Put( XFillBmpSizeYItem( 0 ) ); - rXFSet.Put( XFillBmpSizeLogItem( TRUE ) ); + rXFSet.Put( XFillBmpSizeLogItem( sal_True ) ); } if( aMtrFldOffset.IsEnabled() ) { if( aRbtRow.IsChecked() ) { - rXFSet.Put( XFillBmpTileOffsetXItem( (UINT16) aMtrFldOffset.GetValue() ) ); - rXFSet.Put( XFillBmpTileOffsetYItem( (UINT16) 0 ) ); + rXFSet.Put( XFillBmpTileOffsetXItem( (sal_uInt16) aMtrFldOffset.GetValue() ) ); + rXFSet.Put( XFillBmpTileOffsetYItem( (sal_uInt16) 0 ) ); } else if( aRbtColumn.IsChecked() ) { - rXFSet.Put( XFillBmpTileOffsetXItem( (UINT16) 0 ) ); - rXFSet.Put( XFillBmpTileOffsetYItem( (UINT16) aMtrFldOffset.GetValue() ) ); + rXFSet.Put( XFillBmpTileOffsetXItem( (sal_uInt16) 0 ) ); + rXFSet.Put( XFillBmpTileOffsetYItem( (sal_uInt16) aMtrFldOffset.GetValue() ) ); } } @@ -2429,10 +2447,10 @@ IMPL_LINK( SvxAreaTabPage, ModifyTileHdl_Impl, void *, EMPTYARG ) rXFSet.Put( XFillBmpPosItem( aCtlPosition.GetActualRP() ) ); if( aMtrFldXOffset.IsEnabled() ) - rXFSet.Put( XFillBmpPosOffsetXItem( (UINT16) aMtrFldXOffset.GetValue() ) ); + rXFSet.Put( XFillBmpPosOffsetXItem( (sal_uInt16) aMtrFldXOffset.GetValue() ) ); if( aMtrFldYOffset.IsEnabled() ) - rXFSet.Put( XFillBmpPosOffsetYItem( (UINT16) aMtrFldYOffset.GetValue() ) ); + rXFSet.Put( XFillBmpPosOffsetYItem( (sal_uInt16) aMtrFldYOffset.GetValue() ) ); aCtlBitmapPreview.SetAttributes( aXFillAttr.GetItemSet() ); diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 05898008e..34a9499c8 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -66,6 +66,7 @@ #include <svx/svxdlg.hxx> #include <dialmgr.hxx> #include "sfx2/opengrf.hxx" +#include "paragrph.hrc" #define DLGWIN this->GetParent()->GetParent() @@ -140,6 +141,16 @@ SvxBitmapTabPage::SvxBitmapTabPage aLbBackgroundColor.SetSelectHdl( LINK( this, SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl ) ); + String accName = String(SVX_RES(STR_EXAMPLE)); + aCtlPreview.SetAccessibleName(accName); + aCtlPixel.SetAccessibleRelationMemberOf( &aFlProp ); + aCtlPixel.SetAccessibleRelationLabeledBy( &aFtPixelEdit ); + aLbBitmaps.SetAccessibleRelationLabeledBy(&aLbBitmaps); + aBtnAdd.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnModify.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnImport.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnDelete.SetAccessibleRelationMemberOf( &aFlProp ); + } // ----------------------------------------------------------------------- @@ -158,12 +169,12 @@ void SvxBitmapTabPage::Construct() void SvxBitmapTabPage::ActivatePage( const SfxItemSet& ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -246,9 +257,9 @@ int SvxBitmapTabPage::DeactivatePage( SfxItemSet* _pSet) // ----------------------------------------------------------------------- -BOOL SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) +sal_Bool SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) { - if( *pDlgType == 0 && *pbAreaTP == FALSE ) // Flaechen-Dialog + if( *pDlgType == 0 && *pbAreaTP == sal_False ) // Flaechen-Dialog { if( *pPageType == PT_BITMAP ) { @@ -256,7 +267,7 @@ BOOL SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) XOBitmap aXOBitmap; String aString; - USHORT nPos = aLbBitmaps.GetSelectEntryPos(); + sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aXOBitmap = pBitmapList->GetBitmap( nPos )->GetXBitmap(); @@ -276,7 +287,7 @@ BOOL SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs ) _rOutAttrs.Put( XFillBitmapItem( aString, aXOBitmap ) ); } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -334,11 +345,11 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) else { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), sal_True, &pPoolItem ) ) { XFillStyle eXFS = (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue(); if( ( XFILL_BITMAP == eXFS ) && - ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), TRUE, &pPoolItem ) ) ) + ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True, &pPoolItem ) ) ) { pXOBitmap = new XOBitmap( ( ( const XFillBitmapItem* ) pPoolItem )->GetBitmapValue() ); } @@ -365,7 +376,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) sal_uInt32 nCol1(0xffffffff); // background sal_uInt32 nCol2(0xffffffff); // pixel BitmapReadAccess* pAccess = aBitmap.AcquireReadAccess(); - sal_Bool bValid(TRUE); + sal_Bool bValid(sal_True); if(pAccess) { @@ -398,7 +409,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) else { // Third color detected - bValid = FALSE; + bValid = sal_False; } } else @@ -421,7 +432,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) else { // no access -> no success - bValid = FALSE; + bValid = sal_False; } if(bValid) @@ -454,7 +465,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) if( pXOBitmap->GetBitmapType() == XBITMAP_IMPORT ) { aCtlPixel.Reset(); - aCtlPixel.SetPaintable( FALSE ); + aCtlPixel.SetPaintable( sal_False ); aCtlPixel.Disable(); aFtPixelEdit.Disable(); aFtColor.Disable(); @@ -466,7 +477,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) } else if( pXOBitmap->GetBitmapType() == XBITMAP_8X8 ) { - aCtlPixel.SetPaintable( TRUE ); + aCtlPixel.SetPaintable( sal_True ); aCtlPixel.Enable(); aFtPixelEdit.Enable(); aFtColor.Enable(); @@ -515,7 +526,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlPreview.Invalidate(); - bBmpChanged = FALSE; + bBmpChanged = sal_False; delete pXOBitmap; } return 0L; @@ -525,7 +536,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG ) long SvxBitmapTabPage::CheckChanges_Impl() { - USHORT nPos = aLbBitmaps.GetSelectEntryPos(); + sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { String aString = aLbBitmaps.GetSelectEntry(); @@ -586,18 +597,18 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pBitmapList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pBitmapList->GetBitmap( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -605,17 +616,17 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); WarningBox* pWarnBox = NULL; - USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE; + sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; while( pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pBitmapList->GetBitmap( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { nError = 0; @@ -652,7 +663,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) else // Es muss sich um eine nicht vorhandene importierte Bitmap handeln { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( XATTR_FILLBITMAP, TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( XATTR_FILLBITMAP, sal_True, &pPoolItem ) ) { XOBitmap aXOBitmap( ( ( const XFillBitmapItem* ) pPoolItem )->GetBitmapValue() ); pEntry = new XBitmapEntry( aXOBitmap, aName ); @@ -671,7 +682,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbBitmaps.GetPosPixel(), aLbBitmaps.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); //aLbBitmaps.Invalidate(); @@ -739,12 +750,12 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) { pDlg->GetName( aName ); - BOOL bDifferent = TRUE; + sal_Bool bDifferent = sal_True; long nCount = pBitmapList->Count(); for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pBitmapList->GetBitmap( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { nError = 0; @@ -779,7 +790,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbBitmaps.GetPosPixel(), aLbBitmaps.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); } @@ -809,7 +820,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbBitmaps.GetSelectEntryPos(); + sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -825,24 +836,24 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!"); long nCount = pBitmapList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pBitmapList->GetBitmap( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; XBitmapEntry* pEntry = pBitmapList->GetBitmap( nPos ); pEntry->SetName( aName ); @@ -861,7 +872,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) // Flag fuer modifiziert setzen *pnBitmapListState |= CT_MODIFIED; - bBmpChanged = FALSE; + bBmpChanged = sal_False; } else { @@ -879,7 +890,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxBitmapTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbBitmaps.GetSelectEntryPos(); + sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -915,7 +926,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxBitmapTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; ResMgr& rMgr = CUI_MGR(); if ( *pnBitmapListState & CT_MODIFIED ) @@ -1084,7 +1095,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangePixelColorHdl_Impl, void *, EMPTYARG ) aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlPreview.Invalidate(); - bBmpChanged = TRUE; + bBmpChanged = sal_True; return 0L; } @@ -1103,7 +1114,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBackgrndColorHdl_Impl, void *, EMPTYARG ) aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlPreview.Invalidate(); - bBmpChanged = TRUE; + bBmpChanged = sal_True; return 0L; } @@ -1121,7 +1132,7 @@ void SvxBitmapTabPage::PointChanged( Window* pWindow, RECT_POINT ) aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() ); aCtlPreview.Invalidate(); - bBmpChanged = TRUE; + bBmpChanged = sal_True; } } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 984e97fa4..91317416c 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -113,7 +113,7 @@ SvxColorTabPage::SvxColorTabPage rOutAttrs ( rInAttrs ), pColorTab( NULL ), - bDeleteColorTable ( TRUE ), + bDeleteColorTable ( sal_True ), pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFStyleItem ( XFILL_SOLID ), @@ -166,6 +166,11 @@ SvxColorTabPage::SvxColorTabPage aValSetColorTable.SetExtraSpacing( 0 ); aValSetColorTable.Show(); + aLbColorModel.SetAccessibleName( String( CUI_RES(STR_CUI_COLORMODEL) ) ); + aBtnAdd.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnModify.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnWorkOn.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnDelete.SetAccessibleRelationMemberOf( &aFlProp ); } // ----------------------------------------------------------------------- @@ -182,7 +187,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& ) { if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -197,7 +202,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& ) else if( *pPageType == PT_COLOR && *pPos == LISTBOX_ENTRY_NOTFOUND ) { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), sal_True, &pPoolItem ) ) { aLbColorModel.SelectEntryPos( CM_RGB ); @@ -279,7 +284,7 @@ long SvxColorTabPage::CheckChanges_Impl() if (eCM != CM_RGB) ConvertColorValues (aTmpColor, CM_RGB); - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { Color aColor = pColorTab->GetColor( nPos )->GetColor(); @@ -345,15 +350,15 @@ long SvxColorTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxColorTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxColorTabPage::FillItemSet( SfxItemSet& rSet ) { if( ( *pDlgType != 0 ) || - ( *pPageType == PT_COLOR && *pbAreaTP == FALSE ) ) + ( *pPageType == PT_COLOR && *pbAreaTP == sal_False ) ) { String aString; Color aColor; - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aColor = pColorTab->GetColor( nPos )->GetColor(); @@ -369,14 +374,14 @@ BOOL SvxColorTabPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( XFillStyleItem( XFILL_SOLID ) ); } - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- void SvxColorTabPage::Reset( const SfxItemSet& rSet ) { - USHORT nState = rSet.GetItemState( XATTR_FILLCOLOR ); + sal_uInt16 nState = rSet.GetItemState( XATTR_FILLCOLOR ); if ( nState >= SFX_ITEM_DEFAULT ) { @@ -388,7 +393,7 @@ void SvxColorTabPage::Reset( const SfxItemSet& rSet ) // Farbmodell setzen String aStr = GetUserData(); - aLbColorModel.SelectEntryPos( (USHORT) aStr.ToInt32() ); + aLbColorModel.SelectEntryPos( (sal_uInt16) aStr.ToInt32() ); ChangeColorHdl_Impl( this ); SelectColorModelHdl_Impl( this ); @@ -428,10 +433,10 @@ SfxTabPage* SvxColorTabPage::Create( Window* pWindow, IMPL_LINK( SvxColorTabPage, ModifiedHdl_Impl, void *, EMPTYARG ) { // lese aktuelle MtrFields aus, wenn cmyk, dann k-Wert als Trans.-Farbe - aAktuellColor.SetColor ( Color( (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel4.GetValue() ), - (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel1.GetValue() ), - (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel2.GetValue() ), - (UINT8)PercentToColor_Impl( (USHORT) aMtrFldColorModel3.GetValue() ) ).GetColor() ); + aAktuellColor.SetColor ( Color( (sal_uInt8)PercentToColor_Impl( (sal_uInt16) aMtrFldColorModel4.GetValue() ), + (sal_uInt8)PercentToColor_Impl( (sal_uInt16) aMtrFldColorModel1.GetValue() ), + (sal_uInt8)PercentToColor_Impl( (sal_uInt16) aMtrFldColorModel2.GetValue() ), + (sal_uInt8)PercentToColor_Impl( (sal_uInt16) aMtrFldColorModel3.GetValue() ) ).GetColor() ); Color aTmpColor(aAktuellColor); if (eCM != CM_RGB) @@ -463,12 +468,12 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) String aName( aEdtName.GetText() ); XColorEntry* pEntry; long nCount = pColorTab->Count(); - BOOL bDifferent = TRUE; + sal_Bool bDifferent = sal_True; // Pruefen, ob Name schon vorhanden ist for ( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pColorTab->GetColor( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; // Wenn ja, wird wiederholt ein neuer Name angefordert if ( !bDifferent ) @@ -482,21 +487,21 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while ( !bDifferent && bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pColorTab->GetColor( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) - bLoop = FALSE; + bLoop = sal_False; else aWarningBox.Execute(); } @@ -541,7 +546,7 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) // IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -549,12 +554,12 @@ IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) String aDesc( ResId( RID_SVXSTR_DESC_COLOR, rMgr ) ); String aName( aEdtName.GetText() ); long nCount = pColorTab->Count(); - BOOL bDifferent = TRUE; + sal_Bool bDifferent = sal_True; // Pruefen, ob Name schon vorhanden ist for ( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pColorTab->GetColor( i )->GetName() && nPos != i ) - bDifferent = FALSE; + bDifferent = sal_False; // Wenn ja, wird wiederholt ein neuer Name angefordert if ( !bDifferent ) @@ -568,19 +573,19 @@ IMPL_LINK( SvxColorTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while ( !bDifferent && bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for ( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pColorTab->GetColor( i )->GetName() && nPos != i ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) - bLoop = FALSE; + bLoop = sal_False; else aWarningBox.Execute(); } @@ -632,7 +637,7 @@ IMPL_LINK( SvxColorTabPage, ClickWorkOnHdl_Impl, void *, EMPTYARG ) if( pColorDlg->Execute() == RET_OK ) { - USHORT nK = 0; + sal_uInt16 nK = 0; Color aPreviewColor = pColorDlg->GetColor(); aAktuellColor = aPreviewColor; if (eCM != CM_RGB) @@ -662,7 +667,7 @@ IMPL_LINK( SvxColorTabPage, ClickWorkOnHdl_Impl, void *, EMPTYARG ) // IMPL_LINK( SvxColorTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -672,14 +677,14 @@ IMPL_LINK( SvxColorTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) if( aQueryBox.Execute() == RET_YES ) { // Jetzt wird richtig geloescht - ULONG nCount = pColorTab->Count() - 1; + sal_uLong nCount = pColorTab->Count() - 1; XColorEntry* pEntry; pEntry = pColorTab->Remove( nPos ); DBG_ASSERT( pEntry, "ColorEntry nicht vorhanden (1) !" ); delete pEntry; - for( ULONG i = nPos; i < nCount; i++ ) + for( sal_uLong i = nPos; i < nCount; i++ ) { pEntry = pColorTab->Remove( i + 1 ); DBG_ASSERT( pEntry, "ColorEntry nicht vorhanden (2) !" ); @@ -720,7 +725,7 @@ IMPL_LINK( SvxColorTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxColorTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if( *pnColorTableState & CT_MODIFIED ) { @@ -772,7 +777,7 @@ IMPL_LINK( SvxColorTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) if( bDeleteColorTable ) delete pColorTab; else - bDeleteColorTable = TRUE; + bDeleteColorTable = sal_True; } pColorTab = pColTab; @@ -917,7 +922,7 @@ IMPL_LINK( SvxColorTabPage, ClickSaveHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxColorTabPage, SelectColorLBHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aValSetColorTable.SelectItem( nPos + 1 ); @@ -940,7 +945,7 @@ IMPL_LINK( SvxColorTabPage, SelectColorLBHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxColorTabPage, SelectValSetHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aValSetColorTable.GetSelectItemId(); + sal_uInt16 nPos = aValSetColorTable.GetSelectItemId(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { aLbColor.SelectEntryPos( nPos - 1 ); @@ -970,16 +975,16 @@ void SvxColorTabPage::ConvertColorValues (Color& rColor, ColorModel eModell) { case CM_RGB: { - CmykToRgb_Impl (rColor, (USHORT)rColor.GetTransparency() ); - rColor.SetTransparency ((UINT8) 0); + CmykToRgb_Impl (rColor, (sal_uInt16)rColor.GetTransparency() ); + rColor.SetTransparency ((sal_uInt8) 0); } break; case CM_CMYK: { - USHORT nK; + sal_uInt16 nK; RgbToCmyk_Impl (rColor, nK ); - rColor.SetTransparency ((UINT8) nK); + rColor.SetTransparency ((sal_uInt8) nK); } break; } @@ -1104,6 +1109,12 @@ IMPL_LINK( SvxColorTabPage, SelectColorModelHdl_Impl, void *, EMPTYARG ) aMtrFldColorModel3.SetValue( ColorToPercent_Impl( aAktuellColor.GetBlue() ) ); aMtrFldColorModel4.SetValue( ColorToPercent_Impl( aAktuellColor.GetTransparency() ) ); } + + aMtrFldColorModel1.SetAccessibleName( GetNonMnemonicString(aFtColorModel1.GetText()) ); + aMtrFldColorModel2.SetAccessibleName( GetNonMnemonicString(aFtColorModel2.GetText()) ); + aMtrFldColorModel3.SetAccessibleName( GetNonMnemonicString(aFtColorModel3.GetText()) ); + aMtrFldColorModel4.SetAccessibleName( GetNonMnemonicString(aFtColorModel4.GetText()) ); + return( 0L ); } @@ -1145,7 +1156,7 @@ void SvxColorTabPage::FillValueSet_Impl( ValueSet& rVs ) for( long i = 0; i < nCount; i++ ) { pColorEntry = pColorTab->GetColor( i ); - rVs.InsertItem( (USHORT) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() ); + rVs.InsertItem( (sal_uInt16) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() ); } } @@ -1157,24 +1168,24 @@ void SvxColorTabPage::FillValueSet_Impl( ValueSet& rVs ) // Bei weiteren Farbmodellen sollte man hierfuer eigene Klassen entwickeln, // die dann auch entsprechende Casts enthalten. -void SvxColorTabPage::RgbToCmyk_Impl( Color& rColor, USHORT& rK ) +void SvxColorTabPage::RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK ) { - USHORT const nColor1 = 255 - rColor.GetRed(); - USHORT const nColor2 = 255 - rColor.GetGreen(); - USHORT const nColor3 = 255 - rColor.GetBlue(); + sal_uInt16 const nColor1 = 255 - rColor.GetRed(); + sal_uInt16 const nColor2 = 255 - rColor.GetGreen(); + sal_uInt16 const nColor3 = 255 - rColor.GetBlue(); rK = Min( Min( nColor1, nColor2 ), nColor3 ); - rColor.SetRed( sal::static_int_cast< UINT8 >( nColor1 - rK ) ); - rColor.SetGreen( sal::static_int_cast< UINT8 >( nColor2 - rK ) ); - rColor.SetBlue( sal::static_int_cast< UINT8 >( nColor3 - rK ) ); + rColor.SetRed( sal::static_int_cast< sal_uInt8 >( nColor1 - rK ) ); + rColor.SetGreen( sal::static_int_cast< sal_uInt8 >( nColor2 - rK ) ); + rColor.SetBlue( sal::static_int_cast< sal_uInt8 >( nColor3 - rK ) ); } //------------------------------------------------------------------------ // Umgekehrter Fall zu RgbToCmyk_Impl (s.o.) -void SvxColorTabPage::CmykToRgb_Impl( Color& rColor, const USHORT nK ) +void SvxColorTabPage::CmykToRgb_Impl( Color& rColor, const sal_uInt16 nK ) { long lTemp; @@ -1182,26 +1193,26 @@ void SvxColorTabPage::CmykToRgb_Impl( Color& rColor, const USHORT nK ) if( lTemp < 0L ) lTemp = 0L; - rColor.SetRed( (BYTE)lTemp ); + rColor.SetRed( (sal_uInt8)lTemp ); lTemp = 255 - ( rColor.GetGreen() + nK ); if( lTemp < 0L ) lTemp = 0L; - rColor.SetGreen( (BYTE)lTemp ); + rColor.SetGreen( (sal_uInt8)lTemp ); lTemp = 255 - ( rColor.GetBlue() + nK ); if( lTemp < 0L ) lTemp = 0L; - rColor.SetBlue( (BYTE)lTemp ); + rColor.SetBlue( (sal_uInt8)lTemp ); } //------------------------------------------------------------------------ -USHORT SvxColorTabPage::ColorToPercent_Impl( USHORT nColor ) +sal_uInt16 SvxColorTabPage::ColorToPercent_Impl( sal_uInt16 nColor ) { - USHORT nWert = 0; + sal_uInt16 nWert = 0; switch (eCM) { @@ -1210,7 +1221,7 @@ USHORT SvxColorTabPage::ColorToPercent_Impl( USHORT nColor ) break; case CM_CMYK: - nWert = (USHORT) ( (double) nColor * 100.0 / 255.0 + 0.5 ); + nWert = (sal_uInt16) ( (double) nColor * 100.0 / 255.0 + 0.5 ); break; } @@ -1219,9 +1230,9 @@ USHORT SvxColorTabPage::ColorToPercent_Impl( USHORT nColor ) //------------------------------------------------------------------------ -USHORT SvxColorTabPage::PercentToColor_Impl( USHORT nPercent ) +sal_uInt16 SvxColorTabPage::PercentToColor_Impl( sal_uInt16 nPercent ) { - USHORT nWert = 0; + sal_uInt16 nWert = 0; switch (eCM) { @@ -1230,7 +1241,7 @@ USHORT SvxColorTabPage::PercentToColor_Impl( USHORT nPercent ) break; case CM_CMYK: - nWert = (USHORT) ( (double) nPercent * 255.0 / 100.0 + 0.5 ); + nWert = (sal_uInt16) ( (double) nPercent * 255.0 / 100.0 + 0.5 ); break; } diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 06cfbb00d..6fa476bb8 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -50,6 +50,7 @@ #include <dialmgr.hxx> #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> +#include "paragrph.hrc" #define DLGWIN this->GetParent()->GetParent() @@ -106,6 +107,10 @@ SvxGradientTabPage::SvxGradientTabPage rXFSet ( aXFillAttr.GetItemSet() ) { FreeResource(); + + aCtlPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + aLbGradients.SetAccessibleName( GetText()); + // diese Page braucht ExchangeSupport SetExchangeSupport(); @@ -145,8 +150,13 @@ SvxGradientTabPage::SvxGradientTabPage aBtnSave.SetClickHdl( LINK( this, SvxGradientTabPage, ClickSaveHdl_Impl ) ); + aBtnAdd.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnModify.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnDelete.SetAccessibleRelationMemberOf( &aFlProp ); + aLbGradients.SetAccessibleRelationLabeledBy(&aLbGradients); + // #i76307# always paint the preview in LTR, because this is what the document does - aCtlPreview.EnableRTL( FALSE ); + aCtlPreview.EnableRTL( sal_False ); } // ----------------------------------------------------------------------- @@ -165,12 +175,12 @@ void SvxGradientTabPage::Construct() void SvxGradientTabPage::ActivatePage( const SfxItemSet& ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -259,13 +269,13 @@ long SvxGradientTabPage::CheckChanges_Impl() aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { XGradient aGradient = pGradientList->GetGradient( nPos )->GetGradient(); @@ -322,15 +332,15 @@ long SvxGradientTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) { - if( *pDlgType == 0 && *pPageType == PT_GRADIENT && *pbAreaTP == FALSE ) + if( *pDlgType == 0 && *pPageType == PT_GRADIENT && *pbAreaTP == sal_False ) { // CheckChanges(); <-- doppelte Abfrage ? XGradient* pXGradient = NULL; String aString; - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { pXGradient = new XGradient( pGradientList->GetGradient( nPos )->GetGradient() ); @@ -344,11 +354,11 @@ BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); } DBG_ASSERT( pXGradient, "XGradient konnte nicht erzeugt werden" ); rSet.Put( XFillStyleItem( XFILL_GRADIENT ) ); @@ -356,7 +366,7 @@ BOOL SvxGradientTabPage::FillItemSet( SfxItemSet& rSet ) delete pXGradient; } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -399,11 +409,11 @@ IMPL_LINK( SvxGradientTabPage, ModifiedHdl_Impl, void *, pControl ) aLbColorTo.GetSelectEntryColor(), eXGS, static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); // Enablen/Disablen von Controls if( pControl == &aLbGradientType || pControl == this ) @@ -429,18 +439,18 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pGradientList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pGradientList->GetGradient( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -448,17 +458,17 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); WarningBox* pWarnBox = NULL; - USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE; + sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; while( pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pGradientList->GetGradient( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { @@ -486,11 +496,11 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); XGradientEntry* pEntry = new XGradientEntry( aXGradient, aName ); pGradientList->Insert( pEntry, nCount ); @@ -502,7 +512,7 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbGradients.GetPosPixel(), aLbGradients.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); } @@ -528,7 +538,7 @@ IMPL_LINK( SvxGradientTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -544,33 +554,33 @@ IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!"); long nCount = pGradientList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pGradientList->GetGradient( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; XGradient aXGradient( aLbColorFrom.GetSelectEntryColor(), aLbColorTo.GetSelectEntryColor(), (XGradientStyle) aLbGradientType.GetSelectEntryPos(), static_cast<long>(aMtrAngle.GetValue() * 10), // sollte in Resource geaendert werden - (USHORT) aMtrCenterX.GetValue(), - (USHORT) aMtrCenterY.GetValue(), - (USHORT) aMtrBorder.GetValue(), - (USHORT) aMtrColorFrom.GetValue(), - (USHORT) aMtrColorTo.GetValue() ); + (sal_uInt16) aMtrCenterX.GetValue(), + (sal_uInt16) aMtrCenterY.GetValue(), + (sal_uInt16) aMtrBorder.GetValue(), + (sal_uInt16) aMtrColorFrom.GetValue(), + (sal_uInt16) aMtrColorTo.GetValue() ); XGradientEntry* pEntry = new XGradientEntry( aXGradient, aName ); @@ -600,7 +610,7 @@ IMPL_LINK( SvxGradientTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxGradientTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbGradients.GetSelectEntryPos(); + sal_uInt16 nPos = aLbGradients.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -636,7 +646,7 @@ IMPL_LINK( SvxGradientTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxGradientTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnGradientListState & CT_MODIFIED ) { @@ -806,10 +816,10 @@ IMPL_LINK( SvxGradientTabPage, ChangeGradientHdl_Impl, void *, EMPTYARG ) else { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), sal_True, &pPoolItem ) ) { if( ( XFILL_GRADIENT == (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && - ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), TRUE, &pPoolItem ) ) ) + ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), sal_True, &pPoolItem ) ) ) { pGradient = new XGradient( ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() ); } @@ -828,7 +838,7 @@ IMPL_LINK( SvxGradientTabPage, ChangeGradientHdl_Impl, void *, EMPTYARG ) XGradientStyle eXGS = pGradient->GetGradientStyle(); aLbGradientType.SelectEntryPos( - sal::static_int_cast< USHORT >( eXGS ) ); + sal::static_int_cast< sal_uInt16 >( eXGS ) ); // Wenn der EIntrag nicht in der Listbox ist, werden die Farben // temporaer hinzugenommen aLbColorFrom.SetNoSelection(); diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 987ef5d2b..8c6901684 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -50,6 +50,7 @@ #include <dialmgr.hxx> #include "svx/dlgutil.hxx" #include <svx/dialmgr.hxx> +#include "paragrph.hrc" #include <svx/dialogs.hrc> #define DLGWIN this->GetParent()->GetParent() @@ -146,6 +147,15 @@ SvxHatchTabPage::SvxHatchTabPage aBtnSave.SetClickHdl( LINK( this, SvxHatchTabPage, ClickSaveHdl_Impl ) ); aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + + aCtlPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + aLbHatchings.SetAccessibleName( String(CUI_RES(STR_LB_HATCHINGSTYLE)) ); + aCtlAngle.SetAccessibleRelationMemberOf( &aFlProp ); + aLbHatchings.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnAdd.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnModify.SetAccessibleRelationMemberOf( &aFlProp ); + aBtnDelete.SetAccessibleRelationMemberOf( &aFlProp ); + aLbHatchings.SetAccessibleRelationLabeledBy(&aLbHatchings); } // ----------------------------------------------------------------------- @@ -163,12 +173,12 @@ void SvxHatchTabPage::Construct() void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; if( *pDlgType == 0 ) // Flaechen-Dialog { - *pbAreaTP = FALSE; + *pbAreaTP = sal_False; if( pColorTab ) { @@ -287,7 +297,7 @@ long SvxHatchTabPage::CheckChanges_Impl() delete aMessDlg; } - USHORT nPos = aLbHatchings.GetSelectEntryPos(); + sal_uInt16 nPos = aLbHatchings.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) *pPos = nPos; return 0L; @@ -295,9 +305,9 @@ long SvxHatchTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) { - if( *pDlgType == 0 && *pbAreaTP == FALSE ) // Flaechen-Dialog + if( *pDlgType == 0 && *pbAreaTP == sal_False ) // Flaechen-Dialog { if( *pPageType == PT_HATCH ) { @@ -305,7 +315,7 @@ BOOL SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) XHatch* pXHatch = NULL; String aString; - USHORT nPos = aLbHatchings.GetSelectEntryPos(); + sal_uInt16 nPos = aLbHatchings.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { pXHatch = new XHatch( pHatchingList->GetHatch( nPos )->GetHatch() ); @@ -326,7 +336,7 @@ BOOL SvxHatchTabPage::FillItemSet( SfxItemSet& rSet ) delete pXHatch; } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -409,10 +419,10 @@ IMPL_LINK( SvxHatchTabPage, ChangeHatchHdl_Impl, void *, EMPTYARG ) else { const SfxPoolItem* pPoolItem = NULL; - if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), TRUE, &pPoolItem ) ) + if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), sal_True, &pPoolItem ) ) { if( ( XFILL_HATCH == (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && - ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), TRUE, &pPoolItem ) ) ) + ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), sal_True, &pPoolItem ) ) ) { pHatch = new XHatch( ( ( const XFillHatchItem* ) pPoolItem )->GetHatchValue() ); } @@ -428,7 +438,7 @@ IMPL_LINK( SvxHatchTabPage, ChangeHatchHdl_Impl, void *, EMPTYARG ) if( pHatch ) { aLbLineType.SelectEntryPos( - sal::static_int_cast< USHORT >( pHatch->GetHatchStyle() ) ); + sal::static_int_cast< sal_uInt16 >( pHatch->GetHatchStyle() ) ); // Wenn der Eintrag nicht in der Listbox ist, wird die Farbe // temporaer hinzugenommen aLbLineColor.SetNoSelection(); @@ -482,18 +492,18 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pHatchingList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pHatchingList->GetHatch( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -501,17 +511,17 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); WarningBox* pWarnBox = NULL; - USHORT nError = RID_SVXSTR_WARN_NAME_DUPLICATE; + sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; while( pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if( aName == pHatchingList->GetHatch( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; if( bDifferent ) { nError = 0; @@ -549,7 +559,7 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) #ifdef WNT // hack: #31355# W.P. Rectangle aRect( aLbHatchings.GetPosPixel(), aLbHatchings.GetSizePixel() ); - if( TRUE ) { // ??? overlapped with pDlg + if( sal_True ) { // ??? overlapped with pDlg // and srolling Invalidate( aRect ); } @@ -575,7 +585,7 @@ IMPL_LINK( SvxHatchTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxHatchTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbHatchings.GetSelectEntryPos(); + sal_uInt16 nPos = aLbHatchings.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -591,23 +601,23 @@ IMPL_LINK( SvxHatchTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!"); long nCount = pHatchingList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pHatchingList->GetHatch( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; XHatch aXHatch( aLbLineColor.GetSelectEntryColor(), (XHatchStyle) aLbLineType.GetSelectEntryPos(), GetCoreValue( aMtrDistance, ePoolUnit ), @@ -647,7 +657,7 @@ IMPL_LINK( SvxHatchTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxHatchTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbHatchings.GetSelectEntryPos(); + sal_uInt16 nPos = aLbHatchings.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -683,7 +693,7 @@ IMPL_LINK( SvxHatchTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxHatchTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnHatchingListState & CT_MODIFIED ) { diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 4c05982c9..1d8da92c1 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -61,6 +61,7 @@ #include <svx/gallery.hxx> #include <svx/xbitmap.hxx> #include <unotools/localfilehelper.hxx> +#include "paragrph.hrc" #include "sfx2/opengrf.hxx" #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> @@ -77,7 +78,7 @@ // static ---------------------------------------------------------------- -static USHORT pLineRanges[] = +static sal_uInt16 pLineRanges[] = { XATTR_LINETRANSPARENCE, XATTR_LINETRANSPARENCE, @@ -98,6 +99,7 @@ SvxLineTabPage::SvxLineTabPage const SfxItemSet& rInAttrs ) : SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_LINE ), rInAttrs ), + aFlLine ( this, CUI_RES( FL_LINE ) ), aFtLineStyle ( this, CUI_RES( FT_LINE_STYLE ) ), aLbLineStyle ( this, CUI_RES( LB_LINE_STYLE ) ), aFtColor ( this, CUI_RES( FT_COLOR ) ), @@ -106,19 +108,18 @@ SvxLineTabPage::SvxLineTabPage aMtrLineWidth ( this, CUI_RES( MTR_FLD_LINE_WIDTH ) ), aFtTransparent ( this, CUI_RES( FT_TRANSPARENT ) ), aMtrTransparent ( this, CUI_RES( MTR_LINE_TRANSPARENT ) ), - aFlLine ( this, CUI_RES( FL_LINE ) ), - aFtLineEndsStyle ( this, CUI_RES( FT_LINE_ENDS_STYLE ) ), + aFlLineEnds ( this, CUI_RES( FL_LINE_ENDS ) ), aLbStartStyle ( this, CUI_RES( LB_START_STYLE ) ), - aFtLineEndsWidth ( this, CUI_RES( FT_LINE_ENDS_WIDTH ) ), aMtrStartWidth ( this, CUI_RES( MTR_FLD_START_WIDTH ) ), aTsbCenterStart ( this, CUI_RES( TSB_CENTER_START ) ), + aFtLineEndsStyle ( this, CUI_RES( FT_LINE_ENDS_STYLE ) ), aLbEndStyle ( this, CUI_RES( LB_END_STYLE ) ), + aFtLineEndsWidth ( this, CUI_RES( FT_LINE_ENDS_WIDTH ) ), aMtrEndWidth ( this, CUI_RES( MTR_FLD_END_WIDTH ) ), aTsbCenterEnd ( this, CUI_RES( TSB_CENTER_END ) ), aCbxSynchronize ( this, CUI_RES( CBX_SYNCHRONIZE ) ), - aFlLineEnds ( this, CUI_RES( FL_LINE_ENDS ) ), - aCtlPreview ( this, CUI_RES( CTL_PREVIEW ) ), aFLSeparator ( this, CUI_RES( FL_SEPARATOR ) ), + aCtlPreview ( this, CUI_RES( CTL_PREVIEW ) ), // #116827# maFLEdgeStyle ( this, CUI_RES( FL_EDGE_STYLE ) ), @@ -139,9 +140,9 @@ SvxLineTabPage::SvxLineTabPage aSymbolHeightMF ( this, CUI_RES(MF_SYMBOL_HEIGHT)), aSymbolRatioCB ( this, CUI_RES(CB_SYMBOL_RATIO)), - bLastWidthModified(FALSE), + bLastWidthModified(sal_False), aSymbolLastSize(Size(0,0)), - bSymbols(FALSE), + bSymbols(sal_False), rOutAttrs ( rInAttrs ), bObjSelected( sal_False ), @@ -158,8 +159,18 @@ SvxLineTabPage::SvxLineTabPage pnColorTableState( 0 ), nPageType ( 0 ) { - FreeResource(); + aLbEndStyle.SetAccessibleName(String(CUI_RES(STR_STYLE))); + aLbStartStyle.SetAccessibleName(String(CUI_RES( STR_LB_START_STYLE ) ) ); + aMtrStartWidth.SetAccessibleName(String(CUI_RES( STR_MTR_FLD_START_WIDTH ) ) ); + aLbEndStyle.SetAccessibleName(String(CUI_RES( STR_LB_END_STYLE ) ) ); + aMtrEndWidth.SetAccessibleName(String(CUI_RES( STR_MTR_FLD_END_WIDTH ) ) ); + aTsbCenterStart.SetAccessibleName(String(CUI_RES( STR_CENTER_START ) ) ); + aTsbCenterEnd.SetAccessibleName(String(CUI_RES( STR_CENTER_END ) ) ); + FreeResource(); + + aCtlPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + // diese Page braucht ExchangeSupport SetExchangeSupport(); @@ -227,14 +238,14 @@ SvxLineTabPage::SvxLineTabPage aSymbolHeightMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl)); aSymbolRatioCB.SetClickHdl(LINK(this, SvxLineTabPage, RatioHdl_Impl)); - aSymbolRatioCB.Check(TRUE); - ShowSymbolControls(FALSE); + aSymbolRatioCB.Check(sal_True); + ShowSymbolControls(sal_False); // #63083# nActLineWidth = -1; } //#58425# Symbole auf einer Linie (z.B. StarChart) , Symbol-Controls aktivieren -void SvxLineTabPage::ShowSymbolControls(BOOL bOn) +void SvxLineTabPage::ShowSymbolControls(sal_Bool bOn) { bSymbols=bOn; aSymbolWidthFT.Show(bOn); @@ -279,7 +290,7 @@ void SvxLineTabPage::Construct() void SvxLineTabPage::FillListboxes() { // Linienstile - USHORT nOldSelect = aLbLineStyle.GetSelectEntryPos(); + sal_uInt16 nOldSelect = aLbLineStyle.GetSelectEntryPos(); aLbLineStyle.FillStyles(); aLbLineStyle.Fill( pDashList ); aLbLineStyle.SelectEntryPos( nOldSelect ); @@ -294,7 +305,7 @@ void SvxLineTabPage::FillListboxes() nOldSelect = aLbEndStyle.GetSelectEntryPos(); aLbEndStyle.Clear(); aLbEndStyle.InsertEntry( sNone ); - aLbEndStyle.Fill( pLineEndList, FALSE ); + aLbEndStyle.Fill( pLineEndList, sal_False ); aLbEndStyle.SelectEntryPos( nOldSelect ); } @@ -307,8 +318,8 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) SetPageType(pPageTypeItem->GetValue()); if( nDlgType == 0 && pDashList ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; // Dashliste if( ( *pnDashListState & CT_MODIFIED ) || @@ -369,7 +380,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) aLbEndStyle.Clear(); aLbEndStyle.InsertEntry( sNone ); - aLbEndStyle.Fill( pLineEndList, FALSE ); + aLbEndStyle.Fill( pLineEndList, sal_False ); nCount = aLbEndStyle.GetEntryCount(); if( nCount == 0 ) @@ -453,7 +464,7 @@ int SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet ) { nPageType = 1; // evtl. fuer Erweiterungen *pPosDashLb = aLbLineStyle.GetSelectEntryPos() - 2;// erster Eintrag SOLID !!! - USHORT nPos = aLbStartStyle.GetSelectEntryPos(); + sal_uInt16 nPos = aLbStartStyle.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) nPos--; *pPosLineEndLb = nPos; @@ -467,11 +478,11 @@ int SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- -BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) +sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) { const SfxPoolItem* pOld = NULL; - USHORT nPos; - BOOL bModified = FALSE; + sal_uInt16 nPos; + sal_Bool bModified = sal_False; // Um evtl. Modifikationen der Liste vorzubeugen // werden Items anderer Seiten nicht gesetzt @@ -500,7 +511,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineDashItem*)pOld == aDashItem ) ) { rAttrs.Put( aDashItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -508,7 +519,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineStyleItem*)pOld == *pStyleItem ) ) { rAttrs.Put( *pStyleItem ); - bModified = TRUE; + bModified = sal_True; } delete pStyleItem; } @@ -522,7 +533,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } //Breite Linienanfang @@ -533,7 +544,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } //Breite Linienende @@ -544,7 +555,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -557,7 +568,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineColorItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -579,7 +590,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -599,7 +610,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) ) { rAttrs.Put( *pItem ); - bModified = TRUE; + bModified = sal_True; } delete pItem; } @@ -609,23 +620,23 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) TriState eState = aTsbCenterStart.GetState(); if( eState != aTsbCenterStart.GetSavedValue() ) { - XLineStartCenterItem aItem( sal::static_int_cast< BOOL >( eState ) ); + XLineStartCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_LINESTARTCENTER ); if ( !pOld || !( *(const XLineStartCenterItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } eState = aTsbCenterEnd.GetState(); if( eState != aTsbCenterEnd.GetSavedValue() ) { - XLineEndCenterItem aItem( sal::static_int_cast< BOOL >( eState ) ); + XLineEndCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_LINEENDCENTER ); if ( !pOld || !( *(const XLineEndCenterItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -637,7 +648,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } //Breite Linienende @@ -648,20 +659,20 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // Transparenz - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); - if( nVal != (UINT16)aMtrTransparent.GetSavedValue().ToInt32() ) + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); + if( nVal != (sal_uInt16)aMtrTransparent.GetSavedValue().ToInt32() ) { XLineTransparenceItem aItem( nVal ); pOld = GetOldItem( rAttrs, XATTR_LINETRANSPARENCE ); if ( !pOld || !( *(const XLineTransparenceItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } @@ -702,7 +713,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if(!pOld || !(*(const XLineJointItem*)pOld == *pNew)) { rAttrs.Put( *pNew ); - bModified = TRUE; + bModified = sal_True; } delete pNew; @@ -718,7 +729,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if(bNewSize) { rAttrs.Put(aSItem); - bModified=TRUE; + bModified=sal_True; } SfxInt32Item aTItem(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),nSymbolType); @@ -729,7 +740,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if(bNewType) { rAttrs.Put(aTItem); - bModified=TRUE; + bModified=sal_True; } if(nSymbolType!=SVX_SYMBOLTYPE_NONE) @@ -741,7 +752,7 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if(bNewBrush) { rAttrs.Put(aBItem); - bModified=TRUE; + bModified=sal_True; } } } @@ -751,9 +762,9 @@ BOOL SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) // ----------------------------------------------------------------------- -BOOL SvxLineTabPage::FillXLSet_Impl() +sal_Bool SvxLineTabPage::FillXLSet_Impl() { - USHORT nPos; + sal_uInt16 nPos; if( aLbLineStyle.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND ) { @@ -832,23 +843,23 @@ BOOL SvxLineTabPage::FillXLSet_Impl() // Linienenden zentriert if( aTsbCenterStart.GetState() == STATE_CHECK ) - rXLSet.Put( XLineStartCenterItem( TRUE ) ); + rXLSet.Put( XLineStartCenterItem( sal_True ) ); else if( aTsbCenterStart.GetState() == STATE_NOCHECK ) - rXLSet.Put( XLineStartCenterItem( FALSE ) ); + rXLSet.Put( XLineStartCenterItem( sal_False ) ); if( aTsbCenterEnd.GetState() == STATE_CHECK ) - rXLSet.Put( XLineEndCenterItem( TRUE ) ); + rXLSet.Put( XLineEndCenterItem( sal_True ) ); else if( aTsbCenterEnd.GetState() == STATE_NOCHECK ) - rXLSet.Put( XLineEndCenterItem( FALSE ) ); + rXLSet.Put( XLineEndCenterItem( sal_False ) ); // Transparenz - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); rXLSet.Put( XLineTransparenceItem( nVal ) ); // #116827# aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet()); - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- @@ -861,11 +872,11 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) // Linienstil const SfxPoolItem *pPoolItem; long nSymType=SVX_SYMBOLTYPE_UNKNOWN; - BOOL bPrevSym=FALSE; - BOOL bEnable=TRUE; - BOOL bIgnoreGraphic=FALSE; - BOOL bIgnoreSize=FALSE; - if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),TRUE,&pPoolItem) == SFX_ITEM_SET) + sal_Bool bPrevSym=sal_False; + sal_Bool bEnable=sal_True; + sal_Bool bIgnoreGraphic=sal_False; + sal_Bool bIgnoreSize=sal_False; + if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),sal_True,&pPoolItem) == SFX_ITEM_SET) { nSymType=((const SfxInt32Item *)pPoolItem)->GetValue(); } @@ -874,13 +885,13 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) { aSymbolGraphic=aAutoSymbolGraphic; aSymbolSize=aSymbolLastSize=aAutoSymbolGraphic.GetPrefSize(); - bPrevSym=TRUE; + bPrevSym=sal_True; } else if(nSymType == SVX_SYMBOLTYPE_NONE) { - bEnable=FALSE; - bIgnoreGraphic=TRUE; - bIgnoreSize=TRUE; + bEnable=sal_False; + bIgnoreGraphic=sal_True; + bIgnoreSize=sal_True; } else if(nSymType >= 0) { @@ -889,7 +900,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) SdrModel* pModel = new SdrModel(NULL, NULL, LOADREFCOUNTS); pModel->GetItemPool().FreezeIdRanges(); - SdrPage* pPage = new SdrPage( *pModel, FALSE ); + SdrPage* pPage = new SdrPage( *pModel, sal_False ); pPage->SetSize(Size(1000,1000)); pModel->InsertPage( pPage, 0 ); SdrView* pView = new SdrView( pModel, &aVDev ); @@ -922,9 +933,9 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) aSymbolSize=pObj->GetSnapRect().GetSize(); aSymbolGraphic.SetPrefSize(aSymbolSize); aSymbolGraphic.SetPrefMapMode(MAP_100TH_MM); - bPrevSym=TRUE; - bEnable=TRUE; - bIgnoreGraphic=TRUE; + bPrevSym=sal_True; + bEnable=sal_True; + bIgnoreGraphic=sal_True; pView->UnmarkAll(); pObj=pPage->RemoveObject(0); @@ -935,7 +946,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) delete pView; delete pModel; } - if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH),TRUE,&pPoolItem) == SFX_ITEM_SET) + if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH),sal_True,&pPoolItem) == SFX_ITEM_SET) { const Graphic* pGraphic = ((const SvxBrushItem *)pPoolItem)->GetGraphic(); if( pGraphic ) @@ -950,10 +961,10 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) pGraphic->GetPrefMapMode(), MAP_100TH_MM ); } - bPrevSym=TRUE; + bPrevSym=sal_True; } } - if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),TRUE,&pPoolItem) == SFX_ITEM_SET) + if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),sal_True,&pPoolItem) == SFX_ITEM_SET) { aSymbolSize = ((const SvxSizeItem *)pPoolItem)->GetSize(); } @@ -1032,7 +1043,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) else if( rAttrs.GetItemState( XATTR_LINESTART ) != SFX_ITEM_DONTCARE ) { // #86265# select entry using list and polygon, not string - sal_Bool bSelected(FALSE); + sal_Bool bSelected(sal_False); const basegfx::B2DPolyPolygon& rItemPolygon = ((const XLineStartItem&)rAttrs.Get(XATTR_LINESTART)).GetLineStartValue(); for(sal_Int32 a(0);!bSelected && a < pLineEndList->Count(); a++) @@ -1044,7 +1055,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) { // select this entry aLbStartStyle.SelectEntryPos((sal_uInt16)a + 1); - bSelected = TRUE; + bSelected = sal_True; } } @@ -1065,7 +1076,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) else if( rAttrs.GetItemState( XATTR_LINEEND ) != SFX_ITEM_DONTCARE ) { // #86265# select entry using list and polygon, not string - sal_Bool bSelected(FALSE); + sal_Bool bSelected(sal_False); const basegfx::B2DPolyPolygon& rItemPolygon = ((const XLineEndItem&)rAttrs.Get(XATTR_LINEEND)).GetLineEndValue(); for(sal_Int32 a(0);!bSelected && a < pLineEndList->Count(); a++) @@ -1077,7 +1088,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) { // select this entry aLbEndStyle.SelectEntryPos((sal_uInt16)a + 1); - bSelected = TRUE; + bSelected = sal_True; } } @@ -1125,7 +1136,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) } else if( rAttrs.GetItemState( XATTR_LINESTARTCENTER ) != SFX_ITEM_DONTCARE ) { - aTsbCenterStart.EnableTriState( FALSE ); + aTsbCenterStart.EnableTriState( sal_False ); if( ( ( const XLineStartCenterItem& ) rAttrs.Get( XATTR_LINESTARTCENTER ) ).GetValue() ) aTsbCenterStart.SetState( STATE_CHECK ); @@ -1145,7 +1156,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) } else if( rAttrs.GetItemState( XATTR_LINEENDCENTER ) != SFX_ITEM_DONTCARE ) { - aTsbCenterEnd.EnableTriState( FALSE ); + aTsbCenterEnd.EnableTriState( sal_False ); if( ( ( const XLineEndCenterItem& ) rAttrs.Get( XATTR_LINEENDCENTER ) ).GetValue() ) aTsbCenterEnd.SetState( STATE_CHECK ); @@ -1160,7 +1171,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) // Transparenz if( rAttrs.GetItemState( XATTR_LINETRANSPARENCE ) != SFX_ITEM_DONTCARE ) { - USHORT nTransp = ( ( const XLineTransparenceItem& ) rAttrs. + sal_uInt16 nTransp = ( ( const XLineTransparenceItem& ) rAttrs. Get( XATTR_LINETRANSPARENCE ) ).GetValue(); aMtrTransparent.SetValue( nTransp ); ChangeTransparentHdl_Impl( NULL ); @@ -1184,7 +1195,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) // Synchronisieren // Jetzt wird der Wert aus der INI-Datei geholt (#42258#) String aStr = GetUserData(); - aCbxSynchronize.Check( (BOOL)aStr.ToInt32() ); + aCbxSynchronize.Check( (sal_Bool)aStr.ToInt32() ); // #116827# if(bObjSelected && SFX_ITEM_DEFAULT == rAttrs.GetItemState(XATTR_LINEJOINT)) @@ -1240,7 +1251,7 @@ SfxTabPage* SvxLineTabPage::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SvxLineTabPage::GetRanges() +sal_uInt16* SvxLineTabPage::GetRanges() { return( pLineRanges ); } @@ -1252,12 +1263,12 @@ IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl ) if(pCntrl == &aMtrLineWidth) { // Linienbreite und Start/EndBreite - INT32 nNewLineWidth = GetCoreValue( aMtrLineWidth, ePoolUnit ); + sal_Int32 nNewLineWidth = GetCoreValue( aMtrLineWidth, ePoolUnit ); if(nActLineWidth == -1) { // Noch nicht initialisiert, hole den Startwert const SfxPoolItem* pOld = GetOldItem( rXLSet, XATTR_LINEWIDTH ); - INT32 nStartLineWidth = 0; + sal_Int32 nStartLineWidth = 0; if(pOld) nStartLineWidth = (( const XLineWidthItem *)pOld)->GetValue(); nActLineWidth = nStartLineWidth; @@ -1266,8 +1277,8 @@ IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl ) if(nActLineWidth != nNewLineWidth) { // Anpassungen Start/EndWidth #63083# - INT32 nValAct = GetCoreValue( aMtrStartWidth, ePoolUnit ); - INT32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10); + sal_Int32 nValAct = GetCoreValue( aMtrStartWidth, ePoolUnit ); + sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10); if(nValNew < 0) nValNew = 0; SetMetricValue( aMtrStartWidth, nValNew, ePoolUnit ); @@ -1420,7 +1431,7 @@ IMPL_LINK( SvxLineTabPage, ChangeEndHdl_Impl, void *, p ) IMPL_LINK( SvxLineTabPage, ChangeTransparentHdl_Impl, void *, EMPTYARG ) { - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); XLineTransparenceItem aItem( nVal ); rXLSet.Put( XLineTransparenceItem( aItem ) ); @@ -1480,7 +1491,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) SvxBmpItemInfo* pInfo = new SvxBmpItemInfo(); pInfo->pBrushItem = pBrushItem; - pInfo->nItemId = (UINT16)(MN_GALLERY_ENTRY + i); + pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i); aGrfBrushItems.Insert(pInfo, i); const Graphic* pGraphic = pBrushItem->GetGraphic(); @@ -1491,7 +1502,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) { - BOOL bWidth = aSize.Width() > aSize.Height(); + sal_Bool bWidth = aSize.Width() > aSize.Height(); double nScale = bWidth ? (double)MAX_BMP_WIDTH / (double)aSize.Width(): (double)MAX_BMP_HEIGHT / (double)aSize.Height(); @@ -1509,7 +1520,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) } aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup ); if(!aGrfNames.Count()) - aSymbolMB.GetPopupMenu()->EnableItem(MN_GALLERY, FALSE); + aSymbolMB.GetPopupMenu()->EnableItem(MN_GALLERY, sal_False); } if(!pButton->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ) && pSymbolList) @@ -1519,7 +1530,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) SdrModel* pModel = new SdrModel(NULL, NULL, LOADREFCOUNTS); pModel->GetItemPool().FreezeIdRanges(); // Page - SdrPage* pPage = new SdrPage( *pModel, FALSE ); + SdrPage* pPage = new SdrPage( *pModel, sal_False ); pPage->SetSize(Size(1000,1000)); pModel->InsertPage( pPage, 0 ); // 3D View @@ -1559,13 +1570,13 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) SvxBmpItemInfo* pInfo = new SvxBmpItemInfo(); pInfo->pBrushItem = pBrushItem; - pInfo->nItemId = (UINT16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems); + pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems); aGrfBrushItems.Insert(pInfo, nNumMenuGalleryItems + i); Size aSize(aBitmap.GetSizePixel()); if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) { - BOOL bWidth = aSize.Width() > aSize.Height(); + sal_Bool bWidth = aSize.Width() > aSize.Height(); double nScale = bWidth ? (double)MAX_BMP_WIDTH / (double)aSize.Width(): (double)MAX_BMP_HEIGHT / (double)aSize.Height(); @@ -1576,7 +1587,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) } aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup ); if(!aGrfNames.Count()) - aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, FALSE); + aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False); delete pView; delete pModel; @@ -1591,7 +1602,7 @@ IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem) PopupMenu* pPopup = pThis->aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY ); SvxBmpItemInfo* pBmpInfo = 0; - for ( USHORT i = 0; i < pThis->aGrfBrushItems.Count(); i++ ) + for ( sal_uInt16 i = 0; i < pThis->aGrfBrushItems.Count(); i++ ) { SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)pThis->aGrfBrushItems.GetObject(i); if( pInfo->pBrushItem == pItem ) @@ -1608,7 +1619,7 @@ IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem) if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) { - BOOL bWidth = aSize.Width() > aSize.Height(); + sal_Bool bWidth = aSize.Width() > aSize.Height(); double nScale = bWidth ? (double)MAX_BMP_WIDTH / (double)aSize.Width(): (double)MAX_BMP_HEIGHT / (double)aSize.Height(); @@ -1626,12 +1637,12 @@ IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem) //Handler f�r Menuebutton IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { - USHORT nItemId = pButton->GetCurItemId(); + sal_uInt16 nItemId = pButton->GetCurItemId(); const Graphic* pGraphic = 0; Graphic aGraphic; String aGrfName; - BOOL bResetSize = FALSE; - BOOL bEnable=TRUE; + sal_Bool bResetSize = sal_False; + sal_Bool bEnable=sal_True; long nPreviousSymbolType = nSymbolType; if(nItemId >= MN_GALLERY_ENTRY) @@ -1643,7 +1654,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) else { nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM; - bResetSize = TRUE; + bResetSize = sal_True; } SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.GetObject(nItemId - MN_GALLERY_ENTRY); pGraphic = pInfo->pBrushItem->GetGraphic(); @@ -1662,7 +1673,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { nSymbolType=SVX_SYMBOLTYPE_NONE; pGraphic=NULL; - bEnable=FALSE; + bEnable=sal_False; } break; default: @@ -1678,7 +1689,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM; pGraphic = &aGraphic; - bResetSize = TRUE; + bResetSize = sal_True; } } if( !pGraphic ) @@ -1711,7 +1722,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) { aSymbolGraphic=Graphic(); aCtlPreview.SetSymbol(NULL,aSymbolSize); - bEnable=FALSE; + bEnable=sal_False; } aSymbolLastSize=aSymbolSize; SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit); @@ -1728,9 +1739,9 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, MetricField *, pField) { bNewSize=true; - BOOL bWidth = (BOOL)(pField == &aSymbolWidthMF); + sal_Bool bWidth = (sal_Bool)(pField == &aSymbolWidthMF); bLastWidthModified = bWidth; - BOOL bRatio = aSymbolRatioCB.IsChecked(); + sal_Bool bRatio = aSymbolRatioCB.IsChecked(); long nWidthVal = static_cast<long>(aSymbolWidthMF.Denormalize(aSymbolWidthMF.GetValue(FUNIT_100TH_MM))); long nHeightVal= static_cast<long>(aSymbolHeightMF.Denormalize(aSymbolHeightMF.GetValue(FUNIT_100TH_MM))); nWidthVal = OutputDevice::LogicToLogic(nWidthVal,MAP_100TH_MM,(MapUnit)ePoolUnit ); @@ -1821,7 +1832,7 @@ void SvxLineTabPage::PageCreated (SfxAllItemSet aSet) if(pSdrObjListItem) //symbols { - ShowSymbolControls(TRUE); + ShowSymbolControls(sal_True); pSymbolList = static_cast<SdrObjList*>(pSdrObjListItem->GetValue()); if (pSymbolAttrItem) pSymbolAttr = new SfxItemSet(pSymbolAttrItem->GetItemSet()); diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 8488dee30..bfa75eac1 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -106,6 +106,13 @@ SvxLineDefTabPage::SvxLineDefTabPage aXLineAttr ( pXPool ), rXLSet ( aXLineAttr.GetItemSet() ) { + aLbType1.SetAccessibleName(String(CUI_RES( STR_START_TYPE ) ) ); + aLbType2.SetAccessibleName(String(CUI_RES( STR_END_TYPE ) ) ); + aNumFldNumber1.SetAccessibleName(String(CUI_RES( STR_START_NUM ) ) ); + aNumFldNumber2.SetAccessibleName(String(CUI_RES( STR_END_NUM ) ) ); + aMtrLength1.SetAccessibleName(String(CUI_RES( STR_START_LENGTH ) ) ); + aMtrLength2.SetAccessibleName(String(CUI_RES( STR_END_LENGTH ) ) ); + FreeResource(); // diese Page braucht ExchangeSupport @@ -168,6 +175,12 @@ SvxLineDefTabPage::SvxLineDefTabPage aMtrDistance.SetModifyHdl( aLink ); pDashList = NULL; + + aBtnAdd.SetAccessibleRelationMemberOf( &aFlDefinition ); + aBtnModify.SetAccessibleRelationMemberOf( &aFlDefinition ); + aBtnDelete.SetAccessibleRelationMemberOf( &aFlDefinition ); + aBtnLoad.SetAccessibleRelationMemberOf( &aFlDefinition ); + aBtnSave.SetAccessibleRelationMemberOf( &aFlDefinition ); } @@ -275,7 +288,7 @@ void SvxLineDefTabPage::CheckChanges_Impl() - USHORT nPos = aLbLineStyles.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineStyles.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { *pPosDashLb = nPos; @@ -284,7 +297,7 @@ void SvxLineDefTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxLineDefTabPage::FillItemSet( SfxItemSet& rAttrs ) +sal_Bool SvxLineDefTabPage::FillItemSet( SfxItemSet& rAttrs ) { if( *pDlgType == 0 ) // Linien-Dialog { @@ -297,7 +310,7 @@ BOOL SvxLineDefTabPage::FillItemSet( SfxItemSet& rAttrs ) rAttrs.Put( XLineDashItem( aString, aDash ) ); } } - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- @@ -554,40 +567,40 @@ IMPL_LINK( SvxLineDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pDashList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while ( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for ( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pDashList->GetDash( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while ( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pDashList->GetDash( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; FillDash_Impl(); pEntry = new XDashEntry( aDash, aName ); @@ -636,7 +649,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbLineStyles.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineStyles.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -652,24 +665,24 @@ IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pDlg, "Dialogdiet fail!"); long nCount = pDashList->Count(); - BOOL bDifferent = FALSE; - BOOL bLoop = TRUE; + sal_Bool bDifferent = sal_False; + sal_Bool bLoop = sal_True; while ( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pDashList->GetDash( i )->GetName() && aName != aOldName ) - bDifferent = FALSE; + bDifferent = sal_False; } if ( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; FillDash_Impl(); XDashEntry* pEntry = new XDashEntry( aDash, aName ); @@ -710,7 +723,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbLineStyles.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineStyles.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -748,7 +761,7 @@ IMPL_LINK( SvxLineDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnDashListState & CT_MODIFIED ) { @@ -885,10 +898,10 @@ void SvxLineDefTabPage::FillDash_Impl() eXDS = XDASH_RECT; aDash.SetDashStyle( eXDS ); - aDash.SetDots( (BYTE) aNumFldNumber1.GetValue() ); + aDash.SetDots( (sal_uInt8) aNumFldNumber1.GetValue() ); aDash.SetDotLen( aLbType1.GetSelectEntryPos() == 0 ? 0 : GetCoreValue( aMtrLength1, ePoolUnit ) ); - aDash.SetDashes( (BYTE) aNumFldNumber2.GetValue() ); + aDash.SetDashes( (sal_uInt8) aNumFldNumber2.GetValue() ); aDash.SetDashLen( aLbType2.GetSelectEntryPos() == 0 ? 0 : GetCoreValue( aMtrLength2, ePoolUnit ) ); aDash.SetDistance( GetCoreValue( aMtrDistance, ePoolUnit ) ); @@ -907,7 +920,7 @@ void SvxLineDefTabPage::FillDialog_Impl() if( eXDS == XDASH_RECTRELATIVE ) aCbxSynchronize.Check(); else - aCbxSynchronize.Check( FALSE ); + aCbxSynchronize.Check( sal_False ); aNumFldNumber1.SetValue( aDash.GetDots() ); SetMetricValue( aMtrLength1, aDash.GetDotLen(), ePoolUnit ); @@ -936,7 +949,7 @@ void SvxLineDefTabPage::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - USHORT nOldSelect = aLbLineStyles.GetSelectEntryPos(); + sal_uInt16 nOldSelect = aLbLineStyles.GetSelectEntryPos(); aLbLineStyles.Clear(); aLbLineStyles.Fill( pDashList ); aLbLineStyles.SelectEntryPos( nOldSelect ); diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 02ca47477..afb15156c 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -130,6 +130,9 @@ SvxLineEndDefTabPage::SvxLineEndDefTabPage aLbLineEnds.SetSelectHdl( LINK( this, SvxLineEndDefTabPage, SelectLineEndHdl_Impl ) ); + aBtnAdd.SetAccessibleRelationMemberOf(&aFlTip); + aBtnModify.SetAccessibleRelationMemberOf(&aFlTip); + aBtnDelete.SetAccessibleRelationMemberOf(&aFlTip); } //------------------------------------------------------------------------ @@ -156,7 +159,7 @@ void SvxLineEndDefTabPage::Construct() pPolyObj->TakeObjInfo( aInfoRec ); SdrObject* pNewObj = 0; if( aInfoRec.bCanConvToPath ) - pNewObj = pPolyObj->ConvertToPolyObj( TRUE, FALSE ); + pNewObj = pPolyObj->ConvertToPolyObj( sal_True, sal_False ); bCreateArrowPossible = pNewObj && pNewObj->ISA( SdrPathObj ); SdrObject::Free( pNewObj ); @@ -206,7 +209,7 @@ int SvxLineEndDefTabPage::DeactivatePage( SfxItemSet* _pSet ) void SvxLineEndDefTabPage::CheckChanges_Impl() { - USHORT nPos = aLbLineEnds.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineEnds.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -229,7 +232,7 @@ void SvxLineEndDefTabPage::CheckChanges_Impl() // ----------------------------------------------------------------------- -BOOL SvxLineEndDefTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SvxLineEndDefTabPage::FillItemSet( SfxItemSet& rSet ) { if( *pDlgType == 0 ) // Linien-Dialog { @@ -244,7 +247,7 @@ BOOL SvxLineEndDefTabPage::FillItemSet( SfxItemSet& rSet ) rSet.Put( XLineEndItem( pEntry->GetName(), pEntry->GetLineEnd() ) ); } } - return( TRUE ); + return( sal_True ); } // ----------------------------------------------------------------------- @@ -333,7 +336,7 @@ long SvxLineEndDefTabPage::ChangePreviewHdl_Impl( void* ) IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbLineEnds.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineEnds.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -341,12 +344,12 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) String aDesc( ResId( RID_SVXSTR_DESC_LINEEND, rMgr ) ); String aName( aEdtName.GetText() ); long nCount = pLineEndList->Count(); - BOOL bDifferent = TRUE; + sal_Bool bDifferent = sal_True; // Pruefen, ob Name schon vorhanden ist for ( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pLineEndList->GetLineEnd( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; // Wenn ja, wird wiederholt ein neuer Name angefordert if ( !bDifferent ) @@ -360,21 +363,21 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG ) DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while( !bDifferent && bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pLineEndList->GetLineEnd( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) - bLoop = FALSE; + bLoop = sal_False; else aWarningBox.Execute(); } @@ -421,7 +424,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) if( aInfoRec.bCanConvToPath ) { - pNewObj = pConvPolyObj = pPolyObj->ConvertToPolyObj( TRUE, FALSE ); + pNewObj = pConvPolyObj = pPolyObj->ConvertToPolyObj( sal_True, sal_False ); if( !pNewObj || !pNewObj->ISA( SdrPathObj ) ) return( 0L ); // Abbruch, zusaetzliche Sicherheit, die bei @@ -449,40 +452,40 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) long nCount = pLineEndList->Count(); long j = 1; - BOOL bDifferent = FALSE; + sal_Bool bDifferent = sal_False; while ( !bDifferent ) { aName = aNewName; aName += sal_Unicode(' '); aName += UniString::CreateFromInt32( j++ ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) if ( aName == pLineEndList->GetLineEnd( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( DLGWIN, aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; while ( bLoop && pDlg->Execute() == RET_OK ) { pDlg->GetName( aName ); - bDifferent = TRUE; + bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) { if( aName == pLineEndList->GetLineEnd( i )->GetName() ) - bDifferent = FALSE; + bDifferent = sal_False; } if( bDifferent ) { - bLoop = FALSE; + bLoop = sal_False; pEntry = new XLineEndEntry( aNewPolyPolygon, aName ); long nLineEndCount = pLineEndList->Count(); @@ -524,7 +527,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineEndDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) { - USHORT nPos = aLbLineEnds.GetSelectEntryPos(); + sal_uInt16 nPos = aLbLineEnds.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -561,7 +564,7 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG ) IMPL_LINK( SvxLineEndDefTabPage, ClickLoadHdl_Impl, void *, EMPTYARG ) { ResMgr& rMgr = CUI_MGR(); - USHORT nReturn = RET_YES; + sal_uInt16 nReturn = RET_YES; if ( *pnLineEndListState & CT_MODIFIED ) { @@ -688,7 +691,7 @@ void SvxLineEndDefTabPage::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - USHORT nOldSelect = aLbLineEnds.GetSelectEntryPos(); + sal_uInt16 nOldSelect = aLbLineEnds.GetSelectEntryPos(); aLbLineEnds.Clear(); aLbLineEnds.Fill( pLineEndList ); aLbLineEnds.SelectEntryPos( nOldSelect ); diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 0fd849e1c..aa01b6933 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -44,7 +44,7 @@ #include <dialmgr.hxx> #include "svx/dlgutil.hxx" #include <cuitabline.hxx> - +#include "paragrph.hrc" #include <svx/xlineit0.hxx> #include <sfx2/request.hxx> @@ -52,7 +52,7 @@ // static ---------------------------------------------------------------- -static USHORT pShadowRanges[] = +static sal_uInt16 pShadowRanges[] = { SDRATTR_SHADOWCOLOR, SDRATTR_SHADOWTRANSPARENCE, @@ -84,7 +84,7 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs aCtlXRectPreview ( this, CUI_RES( CTL_COLOR_PREVIEW ) ), rOutAttrs ( rInAttrs ), pColorTab( NULL ), - bDisable ( FALSE ), + bDisable ( sal_False ), pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), aXFillAttr ( pXPool ), rXFSet ( aXFillAttr.GetItemSet() ) @@ -186,6 +186,8 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs aMtrTransparent.SetModifyHdl( aLink ); aMtrDistance.SetModifyHdl( aLink ); + aCtlXRectPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); + aCtlPosition.SetAccessibleRelationMemberOf( &aFlProp ); } // ----------------------------------------------------------------------- @@ -213,8 +215,8 @@ void SvxShadowTabPage::Construct() void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet ) { - USHORT nPos; - USHORT nCount; + sal_uInt16 nPos; + sal_uInt16 nCount; SFX_ITEMSET_ARG (&rSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False); if (pPageTypeItem) @@ -274,10 +276,10 @@ int SvxShadowTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- -BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) +sal_Bool SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) { const SfxPoolItem* pOld = NULL; - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if( !bDisable ) { @@ -285,20 +287,20 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) TriState eState = aTsbShowShadow.GetState(); if( eState != aTsbShowShadow.GetSavedValue() ) { - SdrShadowItem aItem( sal::static_int_cast< BOOL >( eState ) ); + SdrShadowItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, SDRATTR_SHADOW ); if ( !pOld || !( *(const SdrShadowItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // Schatten-Entfernung // Etwas umstaendliche Abfrage, ob etwas geaendert wurde, // da Items nicht direkt auf Controls abbildbar sind - INT32 nX = 0L, nY = 0L; - INT32 nXY = GetCoreValue( aMtrDistance, ePoolUnit ); + sal_Int32 nX = 0L, nY = 0L; + sal_Int32 nXY = GetCoreValue( aMtrDistance, ePoolUnit ); switch( aCtlPosition.GetActualRP() ) { @@ -321,8 +323,8 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE || rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) { - INT32 nOldX = 9876543; // Unmoeglicher Wert, entspr. DontCare - INT32 nOldY = 9876543; + sal_Int32 nOldX = 9876543; // Unmoeglicher Wert, entspr. DontCare + sal_Int32 nOldY = 9876543; if( rOutAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE && rOutAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) { @@ -337,7 +339,7 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) ( !pOld || !( *(const SdrShadowXDistItem*)pOld == aXItem ) ) ) { rAttrs.Put( aXItem ); - bModified = TRUE; + bModified = sal_True; } SdrShadowYDistItem aYItem( nY ); pOld = GetOldItem( rAttrs, SDRATTR_SHADOWYDIST ); @@ -345,12 +347,12 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) ( !pOld || !( *(const SdrShadowYDistItem*)pOld == aYItem ) ) ) { rAttrs.Put( aYItem ); - bModified = TRUE; + bModified = sal_True; } } // ShadowColor - USHORT nPos = aLbShadowColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbShadowColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND && nPos != aLbShadowColor.GetSavedValue() ) { @@ -360,20 +362,20 @@ BOOL SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs ) if ( !pOld || !( *(const SdrShadowColorItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } // Transparenz - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); - if( nVal != (UINT16)aMtrTransparent.GetSavedValue().ToInt32() ) + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); + if( nVal != (sal_uInt16)aMtrTransparent.GetSavedValue().ToInt32() ) { SdrShadowTransparenceItem aItem( nVal ); pOld = GetOldItem( rAttrs, SDRATTR_SHADOWTRANSPARENCE ); if ( !pOld || !( *(const SdrShadowTransparenceItem*)pOld == aItem ) ) { rAttrs.Put( aItem ); - bModified = TRUE; + bModified = sal_True; } } } @@ -395,7 +397,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) // Ist Schatten gesetzt? if( rAttrs.GetItemState( SDRATTR_SHADOW ) != SFX_ITEM_DONTCARE ) { - aTsbShowShadow.EnableTriState( FALSE ); + aTsbShowShadow.EnableTriState( sal_False ); if( ( ( const SdrShadowItem& ) rAttrs.Get( SDRATTR_SHADOW ) ).GetValue() ) aTsbShowShadow.SetState( STATE_CHECK ); @@ -413,8 +415,8 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) if( rAttrs.GetItemState( SDRATTR_SHADOWXDIST ) != SFX_ITEM_DONTCARE && rAttrs.GetItemState( SDRATTR_SHADOWYDIST ) != SFX_ITEM_DONTCARE ) { - INT32 nX = ( ( const SdrShadowXDistItem& ) rAttrs.Get( SDRATTR_SHADOWXDIST ) ).GetValue(); - INT32 nY = ( ( const SdrShadowYDistItem& ) rAttrs.Get( SDRATTR_SHADOWYDIST ) ).GetValue(); + sal_Int32 nX = ( ( const SdrShadowXDistItem& ) rAttrs.Get( SDRATTR_SHADOWXDIST ) ).GetValue(); + sal_Int32 nY = ( ( const SdrShadowYDistItem& ) rAttrs.Get( SDRATTR_SHADOWYDIST ) ).GetValue(); if( nX != 0 ) SetMetricValue( aMtrDistance, nX < 0L ? -nX : nX, ePoolUnit ); @@ -441,8 +443,8 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) SdrShadowYDistItem* pYDistItem = (SdrShadowYDistItem*)&pPool->GetDefaultItem (SDRATTR_SHADOWYDIST); if (pXDistItem && pYDistItem) { - INT32 nX = pXDistItem->GetValue(); - INT32 nY = pYDistItem->GetValue(); + sal_Int32 nX = pXDistItem->GetValue(); + sal_Int32 nY = pYDistItem->GetValue(); if( nX != 0 ) SetMetricValue( aMtrDistance, nX < 0L ? -nX : nX, ePoolUnit ); else @@ -467,7 +469,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) // Transparenz if( rAttrs.GetItemState( SDRATTR_SHADOWTRANSPARENCE ) != SFX_ITEM_DONTCARE ) { - USHORT nTransp = ( ( const SdrShadowTransparenceItem& ) rAttrs.Get( SDRATTR_SHADOWTRANSPARENCE ) ).GetValue(); + sal_uInt16 nTransp = ( ( const SdrShadowTransparenceItem& ) rAttrs.Get( SDRATTR_SHADOWTRANSPARENCE ) ).GetValue(); aMtrTransparent.SetValue( nTransp ); } else @@ -499,7 +501,7 @@ SfxTabPage* SvxShadowTabPage::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SvxShadowTabPage::GetRanges() +sal_uInt16* SvxShadowTabPage::GetRanges() { return( pShadowRanges ); } @@ -546,19 +548,19 @@ IMPL_LINK( SvxShadowTabPage, ModifyShadowHdl_Impl, void *, EMPTYARG ) else rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); - USHORT nPos = aLbShadowColor.GetSelectEntryPos(); + sal_uInt16 nPos = aLbShadowColor.GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { rXFSet.Put( XFillColorItem( String(), aLbShadowColor.GetSelectEntryColor() ) ); } - UINT16 nVal = (UINT16)aMtrTransparent.GetValue(); + sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); XFillTransparenceItem aItem( nVal ); rXFSet.Put( XFillTransparenceItem( aItem ) ); // Schatten-Entfernung - INT32 nX = 0L, nY = 0L; - INT32 nXY = GetCoreValue( aMtrDistance, ePoolUnit ); + sal_Int32 nX = 0L, nY = 0L; + sal_Int32 nXY = GetCoreValue( aMtrDistance, ePoolUnit ); switch( aCtlPosition.GetActualRP() ) { case RP_LT: nX = nY = -nXY; break; diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 2bf84a27a..0f2409b64 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -55,7 +55,7 @@ // static ---------------------------------------------------------------- -static USHORT pPosSizeRanges[] = +static sal_uInt16 pPosSizeRanges[] = { SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_POS_Y, @@ -74,7 +74,7 @@ static USHORT pPosSizeRanges[] = 0 }; -static USHORT pAngleRanges[] = +static sal_uInt16 pAngleRanges[] = { SID_ATTR_TRANSFORM_ROT_X, SID_ATTR_TRANSFORM_ANGLE, @@ -83,7 +83,7 @@ static USHORT pAngleRanges[] = 0 }; -static USHORT pSlantRanges[] = +static sal_uInt16 pSlantRanges[] = { SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS, @@ -119,7 +119,7 @@ void lcl_ScaleRect(basegfx::B2DRange& rRange, const Fraction aUIScale) \************************************************************************/ SvxTransformTabDialog::SvxTransformTabDialog( Window* pParent, const SfxItemSet* pAttr, - const SdrView* pSdrView, USHORT nAnchorTypes ) : + const SdrView* pSdrView, sal_uInt16 nAnchorTypes ) : SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_TRANSFORM ), pAttr ), pView ( pSdrView ), nAnchorCtrls(nAnchorTypes) @@ -151,7 +151,7 @@ SvxTransformTabDialog::~SvxTransformTabDialog() // ----------------------------------------------------------------------- -void SvxTransformTabDialog::PageCreated(USHORT nId, SfxTabPage &rPage) +void SvxTransformTabDialog::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) { switch(nId) { @@ -247,6 +247,11 @@ SvxAngleTabPage::SvxAngleTabPage( Window* pParent, const SfxItemSet& rInAttrs ) ePoolUnit = pPool->GetMetric(SID_ATTR_TRANSFORM_POS_X); aMtrAngle.SetModifyHdl(LINK( this, SvxAngleTabPage, ModifiedHdl)); + + aCtlRect.SetAccessibleRelationLabeledBy(&aFtPosPresets); + aCtlRect.SetAccessibleRelationMemberOf(&aFlPosition); + aCtlAngle.SetAccessibleRelationLabeledBy(&aFtAnglePresets); + aCtlAngle.SetAccessibleRelationMemberOf(&aFlAngle); } // ----------------------------------------------------------------------- @@ -255,8 +260,8 @@ void SvxAngleTabPage::Construct() { DBG_ASSERT(pView, "No valid view (!)"); eDlgUnit = GetModuleFieldUnit(GetItemSet()); - SetFieldUnit(aMtrPosX, eDlgUnit, TRUE); - SetFieldUnit(aMtrPosY, eDlgUnit, TRUE); + SetFieldUnit(aMtrPosX, eDlgUnit, sal_True); + SetFieldUnit(aMtrPosY, eDlgUnit, sal_True); if(FUNIT_MILE == eDlgUnit || FUNIT_KM == eDlgUnit) { @@ -311,9 +316,9 @@ void SvxAngleTabPage::Construct() // ----------------------------------------------------------------------- -BOOL SvxAngleTabPage::FillItemSet(SfxItemSet& rSet) +sal_Bool SvxAngleTabPage::FillItemSet(SfxItemSet& rSet) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if(aMtrAngle.IsValueModified() || aMtrPosX.IsValueModified() || aMtrPosY.IsValueModified()) { @@ -325,7 +330,7 @@ BOOL SvxAngleTabPage::FillItemSet(SfxItemSet& rSet) rSet.Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ROT_X), basegfx::fround(fTmpX))); rSet.Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_ROT_Y), basegfx::fround(fTmpY))); - bModified |= TRUE; + bModified |= sal_True; } return bModified; @@ -382,7 +387,7 @@ SfxTabPage* SvxAngleTabPage::Create( Window* pWindow, const SfxItemSet& rSet) //------------------------------------------------------------------------ -USHORT* SvxAngleTabPage::GetRanges() +sal_uInt16* SvxAngleTabPage::GetRanges() { return(pAngleRanges); } @@ -541,7 +546,7 @@ void SvxSlantTabPage::Construct() // get the range DBG_ASSERT(pView, "no valid view (!)"); eDlgUnit = GetModuleFieldUnit(GetItemSet()); - SetFieldUnit(aMtrRadius, eDlgUnit, TRUE); + SetFieldUnit(aMtrRadius, eDlgUnit, sal_True); { // #i75273# Rectangle aTempRect(pView->GetAllMarkedRect()); @@ -552,9 +557,9 @@ void SvxSlantTabPage::Construct() // ----------------------------------------------------------------------- -BOOL SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) +sal_Bool SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; String aStr = aMtrRadius.GetText(); if( aStr != aMtrRadius.GetSavedValue() ) @@ -564,16 +569,16 @@ BOOL SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) nTmp = Fraction( nTmp ) * aUIScale; rAttrs.Put( SdrEckenradiusItem( nTmp ) ); - bModified = TRUE; + bModified = sal_True; } aStr = aMtrAngle.GetText(); if( aStr != aMtrAngle.GetSavedValue() ) { - INT32 nValue = static_cast<INT32>(aMtrAngle.GetValue()); + sal_Int32 nValue = static_cast<sal_Int32>(aMtrAngle.GetValue()); rAttrs.Put( SfxInt32Item( SID_ATTR_TRANSFORM_SHEAR, nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( bModified ) @@ -586,7 +591,7 @@ BOOL SvxSlantTabPage::FillItemSet(SfxItemSet& rAttrs) rAttrs.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_X, aPt.X())); rAttrs.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_Y, aPt.Y())); - rAttrs.Put( SfxBoolItem( SID_ATTR_TRANSFORM_SHEAR_VERTICAL, FALSE ) ); + rAttrs.Put( SfxBoolItem( SID_ATTR_TRANSFORM_SHEAR_VERTICAL, sal_False ) ); } return( bModified ); @@ -659,7 +664,7 @@ SfxTabPage* SvxSlantTabPage::Create( Window* pWindow, const SfxItemSet& rOutAttr //------------------------------------------------------------------------ -USHORT* SvxSlantTabPage::GetRanges() +sal_uInt16* SvxSlantTabPage::GetRanges() { return( pSlantRanges ); } @@ -670,7 +675,7 @@ void SvxSlantTabPage::ActivatePage( const SfxItemSet& rSet ) { SfxRectangleItem* pRectItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , FALSE, (const SfxPoolItem**) &pRectItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , sal_False, (const SfxPoolItem**) &pRectItem ) ) { const Rectangle aTempRect(pRectItem->GetValue()); maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom()); @@ -733,7 +738,7 @@ SvxPositionSizeTabPage::SvxPositionSizeTabPage( Window* pParent, const SfxItemSe mrOutAttrs ( rInAttrs ), mnProtectSizeState( STATE_NOCHECK ), - mbPageDisabled ( FALSE ), + mbPageDisabled ( sal_False ), mbProtectDisabled( false ), mbSizeDisabled( false ), mbAdjustDisabled( true ) @@ -762,6 +767,10 @@ SvxPositionSizeTabPage::SvxPositionSizeTabPage( Window* pParent, const SfxItemSe maTsbPosProtect.SetClickHdl( LINK( this, SvxPositionSizeTabPage, ChangePosProtectHdl ) ); maTsbSizeProtect.SetClickHdl( LINK( this, SvxPositionSizeTabPage, ChangeSizeProtectHdl ) ); + maCtlPos.SetAccessibleRelationMemberOf( &maFlPosition ); + maCtlSize.SetAccessibleRelationMemberOf( &maFlSize ); + maCtlPos.SetAccessibleRelationLabeledBy( &maFtPosReference ); + maCtlSize.SetAccessibleRelationLabeledBy( &maFtSizeReference ); } // ----------------------------------------------------------------------- @@ -771,10 +780,10 @@ void SvxPositionSizeTabPage::Construct() // get range and work area DBG_ASSERT( mpView, "no valid view (!)" ); meDlgUnit = GetModuleFieldUnit( GetItemSet() ); - SetFieldUnit( maMtrPosX, meDlgUnit, TRUE ); - SetFieldUnit( maMtrPosY, meDlgUnit, TRUE ); - SetFieldUnit( maMtrWidth, meDlgUnit, TRUE ); - SetFieldUnit( maMtrHeight, meDlgUnit, TRUE ); + SetFieldUnit( maMtrPosX, meDlgUnit, sal_True ); + SetFieldUnit( maMtrPosY, meDlgUnit, sal_True ); + SetFieldUnit( maMtrWidth, meDlgUnit, sal_True ); + SetFieldUnit( maMtrHeight, meDlgUnit, sal_True ); if(FUNIT_MILE == meDlgUnit || FUNIT_KM == meDlgUnit) { @@ -815,7 +824,7 @@ void SvxPositionSizeTabPage::Construct() // diferent anchor positions maMtrPosX.SetText( String() ); maMtrPosY.SetText( String() ); - mbPageDisabled = TRUE; + mbPageDisabled = sal_True; return; } } @@ -842,8 +851,8 @@ void SvxPositionSizeTabPage::Construct() maTsbAutoGrowHeight.SetClickHdl( LINK( this, SvxPositionSizeTabPage, ClickSizeProtectHdl ) ); // is used as flag to evaluate if its selectable - maTsbAutoGrowWidth.EnableTriState( FALSE ); - maTsbAutoGrowHeight.EnableTriState( FALSE ); + maTsbAutoGrowWidth.EnableTriState( sal_False ); + maTsbAutoGrowHeight.EnableTriState( sal_False ); } } @@ -862,9 +871,9 @@ void SvxPositionSizeTabPage::Construct() // ----------------------------------------------------------------------- -BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) +sal_Bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) { - BOOL bModified(FALSE); + sal_Bool bModified(sal_False); if ( maMtrWidth.HasFocus() ) { @@ -896,7 +905,7 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) rOutAttrs.Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_POS_X), basegfx::fround(fX))); rOutAttrs.Put(SfxInt32Item(GetWhich(SID_ATTR_TRANSFORM_POS_Y), basegfx::fround(fY))); - bModified |= TRUE; + bModified |= sal_True; } if ( maTsbPosProtect.GetState() != maTsbPosProtect.GetSavedValue() ) @@ -909,10 +918,10 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) { rOutAttrs.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ), - maTsbPosProtect.GetState() == STATE_CHECK ? TRUE : FALSE ) ); + maTsbPosProtect.GetState() == STATE_CHECK ? sal_True : sal_False ) ); } - bModified |= TRUE; + bModified |= sal_True; } } @@ -936,11 +945,11 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) // put Width & Height to itemset rOutAttrs.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), - (UINT32) lWidth ) ); + (sal_uInt32) lWidth ) ); rOutAttrs.Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ), - (UINT32) lHeight ) ); - rOutAttrs.Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), sal::static_int_cast< USHORT >( meRP ) ) ); - bModified |= TRUE; + (sal_uInt32) lHeight ) ); + rOutAttrs.Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), sal::static_int_cast< sal_uInt16 >( meRP ) ) ); + bModified |= sal_True; } if ( maTsbSizeProtect.GetState() != maTsbSizeProtect.GetSavedValue() ) @@ -950,8 +959,8 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) else rOutAttrs.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ), - maTsbSizeProtect.GetState() == STATE_CHECK ? TRUE : FALSE ) ); - bModified |= TRUE; + maTsbSizeProtect.GetState() == STATE_CHECK ? sal_True : sal_False ) ); + bModified |= sal_True; } if ( maTsbAutoGrowWidth.GetState() != maTsbAutoGrowWidth.GetSavedValue() ) @@ -963,9 +972,9 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) else rOutAttrs.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOWIDTH ), - maTsbAutoGrowWidth.GetState() == STATE_CHECK ? TRUE : FALSE ) ); + maTsbAutoGrowWidth.GetState() == STATE_CHECK ? sal_True : sal_False ) ); } - bModified |= TRUE; + bModified |= sal_True; } if ( maTsbAutoGrowHeight.GetState() != maTsbAutoGrowHeight.GetSavedValue() ) @@ -977,9 +986,9 @@ BOOL SvxPositionSizeTabPage::FillItemSet( SfxItemSet& rOutAttrs ) else rOutAttrs.Put( SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOHEIGHT ), - maTsbAutoGrowHeight.GetState() == STATE_CHECK ? TRUE : FALSE ) ); + maTsbAutoGrowHeight.GetState() == STATE_CHECK ? sal_True : sal_False ) ); } - bModified |= TRUE; + bModified |= sal_True; } @@ -1014,7 +1023,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& ) { sal_Bool bProtected = ( ( const SfxBoolItem* )pItem )->GetValue(); maTsbPosProtect.SetState( bProtected ? STATE_CHECK : STATE_NOCHECK ); - maTsbPosProtect.EnableTriState( FALSE ); + maTsbPosProtect.EnableTriState( sal_False ); } else { @@ -1057,7 +1066,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& ) { maTsbSizeProtect.SetState( ( (const SfxBoolItem*)pItem )->GetValue() ? STATE_CHECK : STATE_NOCHECK ); - maTsbSizeProtect.EnableTriState( FALSE ); + maTsbSizeProtect.EnableTriState( sal_False ); } else maTsbSizeProtect.SetState( STATE_DONTKNOW ); @@ -1082,7 +1091,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& ) // Ist Abgleich gesetzt? String aStr = GetUserData(); - maCbxScale.Check( (BOOL)aStr.ToInt32() ); + maCbxScale.Check( (sal_Bool)aStr.ToInt32() ); maTsbSizeProtect.SaveValue(); maTsbAutoGrowWidth.SaveValue(); @@ -1102,7 +1111,7 @@ SfxTabPage* SvxPositionSizeTabPage::Create( Window* pWindow, const SfxItemSet& r //------------------------------------------------------------------------ -USHORT* SvxPositionSizeTabPage::GetRanges() +sal_uInt16* SvxPositionSizeTabPage::GetRanges() { return( pPosSizeRanges ); } @@ -1113,7 +1122,7 @@ void SvxPositionSizeTabPage::ActivatePage( const SfxItemSet& rSet ) { SfxRectangleItem* pRectItem = NULL; - if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , FALSE, (const SfxPoolItem**) &pRectItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_TRANSFORM_INTERN ) , sal_False, (const SfxPoolItem**) &pRectItem ) ) { { // #i75273# const Rectangle aTempRect(pRectItem->GetValue()); diff --git a/cui/source/tabpages/transfrm.src b/cui/source/tabpages/transfrm.src index 5e57d5742..d8960137a 100644 --- a/cui/source/tabpages/transfrm.src +++ b/cui/source/tabpages/transfrm.src @@ -61,6 +61,7 @@ TabPage RID_SVXPAGE_POSITION_SIZE }; MetricField MTR_FLD_POS_X { + HelpID = "cui:MetricField:RID_SVXPAGE_POSITION_SIZE:MTR_FLD_POS_X"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 14 + 8 ) ; Size = MAP_APPFONT ( 54 , 12 ) ; @@ -76,6 +77,7 @@ TabPage RID_SVXPAGE_POSITION_SIZE }; MetricField MTR_FLD_POS_Y { + HelpID = "cui:MetricField:RID_SVXPAGE_POSITION_SIZE:MTR_FLD_POS_Y"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 30 + 8 ) ; Size = MAP_APPFONT ( 54 , 12 ) ; @@ -127,6 +129,7 @@ TabPage RID_SVXPAGE_POSITION_SIZE }; MetricField MTR_FLD_WIDTH { + HelpID = "cui:MetricField:RID_SVXPAGE_POSITION_SIZE:MTR_FLD_WIDTH"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 14 + 61 ) ; Size = MAP_APPFONT ( 54 , 12 ) ; @@ -142,6 +145,7 @@ TabPage RID_SVXPAGE_POSITION_SIZE }; MetricField MTR_FLD_HEIGHT { + HelpID = "cui:MetricField:RID_SVXPAGE_POSITION_SIZE:MTR_FLD_HEIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 30 + 61 ) ; Size = MAP_APPFONT ( 54 , 12 ) ; @@ -172,6 +176,7 @@ TabPage RID_SVXPAGE_POSITION_SIZE }; CheckBox CBX_SCALE { + HelpID = "cui:CheckBox:RID_SVXPAGE_POSITION_SIZE:CBX_SCALE"; Pos = MAP_APPFONT ( 12 , 47 + 61 ) ; Size = MAP_APPFONT ( 162 , 10 ) ; TabStop = TRUE ; @@ -189,6 +194,7 @@ TabPage RID_SVXPAGE_POSITION_SIZE TriStateBox TSB_POSPROTECT { + HelpID = "cui:TriStateBox:RID_SVXPAGE_POSITION_SIZE:TSB_POSPROTECT"; Pos = MAP_APPFONT ( 12 , 10 + 120 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; Text [ en-US ] = "Position" ; @@ -197,6 +203,7 @@ TabPage RID_SVXPAGE_POSITION_SIZE TriStateBox TSB_SIZEPROTECT { + HelpID = "cui:TriStateBox:RID_SVXPAGE_POSITION_SIZE:TSB_SIZEPROTECT"; Pos = MAP_APPFONT ( 12 , 24 + 120 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; Text [ en-US ] = "~Size" ; @@ -213,6 +220,7 @@ TabPage RID_SVXPAGE_POSITION_SIZE }; TriStateBox TSB_AUTOGROW_WIDTH { + HelpID = "cui:TriStateBox:RID_SVXPAGE_POSITION_SIZE:TSB_AUTOGROW_WIDTH"; Pos = MAP_APPFONT ( 12 + 121 + 8, 10 + 120 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; Text [ en-US ] = "~Fit width to text" ; @@ -220,6 +228,7 @@ TabPage RID_SVXPAGE_POSITION_SIZE }; TriStateBox TSB_AUTOGROW_HEIGHT { + HelpID = "cui:TriStateBox:RID_SVXPAGE_POSITION_SIZE:TSB_AUTOGROW_HEIGHT"; Pos = MAP_APPFONT ( 12 + 121 + 8, 24 + 120 ) ; Size = MAP_APPFONT ( 113 , 10 ) ; Text [ en-US ] = "Fit ~height to text" ; @@ -251,6 +260,7 @@ TabPage RID_SVXPAGE_POSITION_SIZE }; ListBox LB_ANCHOR { + HelpID = "cui:ListBox:RID_SVXPAGE_POSITION_SIZE:LB_ANCHOR"; Pos = MAP_APPFONT ( 46 + 121 + 16 , 8 + 120 ) ; Size = MAP_APPFONT ( 54 , 60 ) ; Hide = TRUE ; @@ -272,6 +282,7 @@ TabPage RID_SVXPAGE_POSITION_SIZE }; ListBox LB_ORIENT { + HelpID = "cui:ListBox:RID_SVXPAGE_POSITION_SIZE:LB_ORIENT"; Pos = MAP_APPFONT ( 46 + 121 + 16 , 22 + 120 ); Size = MAP_APPFONT ( 54 , 60 ) ; Hide = TRUE ; @@ -319,6 +330,7 @@ TabPage RID_SVXPAGE_ANGLE }; MetricField MTR_FLD_POS_X { + HelpID = "cui:MetricField:RID_SVXPAGE_ANGLE:MTR_FLD_POS_X"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 14 + 11 ) ; Size = MAP_APPFONT ( 54 , 12 ) ; @@ -334,6 +346,7 @@ TabPage RID_SVXPAGE_ANGLE }; MetricField MTR_FLD_POS_Y { + HelpID = "cui:MetricField:RID_SVXPAGE_ANGLE:MTR_FLD_POS_Y"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 30 + 11 ) ; Size = MAP_APPFONT ( 54 , 12 ) ; @@ -376,6 +389,7 @@ TabPage RID_SVXPAGE_ANGLE }; MetricField MTR_FLD_ANGLE { + HelpID = "cui:MetricField:RID_SVXPAGE_ANGLE:MTR_FLD_ANGLE"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 82 + 22 ) ; Size = MAP_APPFONT ( 54 , 12 ) ; @@ -427,6 +441,7 @@ TabPage RID_SVXPAGE_SLANT }; MetricField MTR_FLD_RADIUS { + HelpID = "cui:MetricField:RID_SVXPAGE_SLANT:MTR_FLD_RADIUS"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 14 ) ; Size = MAP_APPFONT ( 54 , 12 ) ; @@ -454,6 +469,7 @@ TabPage RID_SVXPAGE_SLANT }; MetricField MTR_FLD_ANGLE { + HelpID = "cui:MetricField:RID_SVXPAGE_SLANT:MTR_FLD_ANGLE"; Border = TRUE ; Pos = MAP_APPFONT ( 56 , 46 ) ; Size = MAP_APPFONT ( 54 , 12 ) ; |