diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:59:29 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:59:29 +0100 |
commit | 5a267de99f19bdab857429a81ffcfbb4d06f5bbd (patch) | |
tree | 1425ce2404af0e2542e1be0dca3821600f5b82a8 /sw/source/ui/index | |
parent | 3bb681a344beb911d92b48469afbd0ccc51db1dd (diff) | |
parent | 99ebfb7335c333a77910b1059b7b41fb34ff0899 (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
starmath/source/symbol.cxx
sw/source/core/doc/docnew.cxx
sw/source/core/doc/docnum.cxx
sw/source/core/draw/dview.cxx
sw/source/core/fields/docufld.cxx
sw/source/core/layout/calcmove.cxx
sw/source/filter/html/swhtml.cxx
sw/source/filter/rtf/rtftbl.cxx
sw/source/ui/config/modcfg.cxx
sw/source/ui/dialog/docstdlg.cxx
sw/source/ui/dialog/docstdlg.src
sw/source/ui/fldui/flddb.cxx
sw/source/ui/fldui/flddinf.cxx
sw/source/ui/fldui/flddok.cxx
sw/source/ui/fldui/fldfunc.cxx
sw/source/ui/fldui/fldmgr.cxx
sw/source/ui/fldui/fldpage.hxx
sw/source/ui/fldui/fldref.cxx
sw/source/ui/fldui/fldvar.cxx
sw/source/ui/fldui/fldvar.hxx
sw/source/ui/fldui/fldwrap.cxx
sw/source/ui/fldui/xfldui.cxx
sw/source/ui/inc/docstdlg.hxx
sw/source/ui/shells/langhelper.cxx
sw/source/ui/shells/txtattr.cxx
sw/source/ui/shells/txtcrsr.cxx
sw/source/ui/table/tabledlg.cxx
Diffstat (limited to 'sw/source/ui/index')
-rw-r--r-- | sw/source/ui/index/cntex.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 137 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.hrc | 1 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.src | 78 | ||||
-rw-r--r-- | sw/source/ui/index/idxmrk.src | 13 | ||||
-rw-r--r-- | sw/source/ui/index/makefile.mk | 67 | ||||
-rw-r--r-- | sw/source/ui/index/multmrk.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/index/multmrk.src | 3 | ||||
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 61 | ||||
-rw-r--r-- | sw/source/ui/index/toxmgr.cxx | 68 |
10 files changed, 253 insertions, 191 deletions
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 848b752937cc..286c0a494cc4 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -105,14 +105,14 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo, void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo, uno::Reference< XPropertySet > & xProps, - USHORT nId, const String& rValue) + sal_uInt16 nId, const String& rValue) { lcl_SetProp( xInfo, xProps, SW_PROP_NAME_STR(nId), rValue); } void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo, uno::Reference< XPropertySet > & xProps, - USHORT nId, sal_Int16 nValue ) + sal_uInt16 nId, sal_Int16 nValue ) { OUString uPropName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(nId))); if(xInfo->hasPropertyByName(uPropName)) @@ -126,7 +126,7 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo, void lcl_SetBOOLProp( uno::Reference< beans::XPropertySetInfo > & xInfo, uno::Reference< beans::XPropertySet > & xProps, - USHORT nId, sal_Bool bValue ) + sal_uInt16 nId, sal_Bool bValue ) { OUString uPropName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(nId))); if(xInfo->hasPropertyByName(uPropName)) @@ -146,7 +146,7 @@ IMPL_LINK( SwMultiTOXTabDialog, CreateExample_Hdl, void*, EMPTYARG ) SwXTextDocument* pDoc = reinterpret_cast<SwXTextDocument*>(xDocTunnel->getSomething(SwXTextDocument::getUnoTunnelId())); if( pDoc ) - pDoc->GetDocShell()->_LoadStyles( *rSh.GetView().GetDocShell(), TRUE ); + pDoc->GetDocShell()->_LoadStyles( *rSh.GetView().GetDocShell(), sal_True ); uno::Reference< lang::XMultiServiceFactory > xFact( xModel, uno::UNO_QUERY); @@ -235,7 +235,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( if(xSectPr.is()) { - BOOL bTemp = i == nTOXIndex; + sal_Bool bTemp = i == nTOXIndex; aVal.setValue(&bTemp, ::getBooleanCppuType()); xSectPr->setPropertyValue(uIsVisible, aVal); } @@ -403,7 +403,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( if(TOKEN_TAB_STOP == aToken.eTokenType) { pPropValArr[2].Name = C2U("TabStopRightAligned"); - BOOL bTemp = SVX_TAB_ADJUST_END == aToken.eTabAlign; + sal_Bool bTemp = SVX_TAB_ADJUST_END == aToken.eTabAlign; pPropValArr[2].Value.setValue(&bTemp, ::getBooleanCppuType()); pPropValArr[3].Name = C2U("TabStopFillCharacter"); pPropValArr[3].Value <<= OUString(aToken.cTabFillChar); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index a9697939d96a..5ae40724d85b 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -215,7 +215,7 @@ public: sal_Bool IsModified()const; - virtual String GetCellText( long nRow, USHORT nColumn ) const; + virtual String GetCellText( long nRow, sal_uInt16 nColumn ) const; }; class SwAutoMarkDlg_Impl : public ModalDialog @@ -349,6 +349,8 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet aShowExampleCB.SetClickHdl(LINK(this, SwMultiTOXTabDialog, ShowPreviewHdl)); aShowExampleCB.Check( SW_MOD()->GetModuleConfig()->IsShowIndexPreview()); + + aExampleContainerWIN.SetAccessibleName(aShowExampleCB.GetText()); SetViewAlign( WINDOWALIGN_LEFT ); // SetViewWindow does not work if the dialog is visible! @@ -499,7 +501,7 @@ SwTOXDescription* SwMultiTOXTabDialog::CreateTOXDescFromTOXBase( pDesc->SetIndexOptions(pCurTOX->GetOptions()); pDesc->SetMainEntryCharStyle(pCurTOX->GetMainEntryCharStyle()); if(pDesc->GetTOXType() != TOX_INDEX) - pDesc->SetLevel((BYTE)pCurTOX->GetLevel()); + pDesc->SetLevel((sal_uInt8)pCurTOX->GetLevel()); pDesc->SetCreateFromObjectNames(pCurTOX->IsFromObjectNames()); pDesc->SetSequenceName(pCurTOX->GetSequenceName()); pDesc->SetCaptionDisplay(pCurTOX->GetCaptionDisplay()); @@ -530,7 +532,7 @@ IMPL_LINK( SwMultiTOXTabDialog, ShowPreviewHdl, CheckBox *, pBox ) SvtPathOptions aOpt; // 6.0 (extension .sxw) - BOOL bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE ); + sal_Bool bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE ); #ifndef MAC_WITHOUT_EXT if( !bExist ) @@ -623,7 +625,7 @@ long SwIndexTreeLB::GetTabPos( SvLBoxEntry* pEntry, SvLBoxTab* pTab) long nData = (long)pEntry->GetUserData(); if(nData != USHRT_MAX) { - long nPos = pHeaderBar->GetItemRect( static_cast< USHORT >(101 + nData) ).TopLeft().X(); + long nPos = pHeaderBar->GetItemRect( static_cast< sal_uInt16 >(101 + nData) ).TopLeft().X(); nData = nPos; } else @@ -743,6 +745,10 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent, { FreeResource(); + aHeaderTree.SetAccessibleRelationMemberOf(&aStylesFL); + aLeftPB.SetAccessibleRelationMemberOf(&aStylesFL); + aRightPB.SetAccessibleRelationMemberOf(&aStylesFL); + aOk.SetClickHdl(LINK(this, SwAddStylesDlg_Impl, OkHdl)); aLeftPB.SetClickHdl(LINK(this, SwAddStylesDlg_Impl, LeftRightHdl)); aRightPB.SetClickHdl(LINK(this, SwAddStylesDlg_Impl, LeftRightHdl)); @@ -761,7 +767,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent, rHB.Show(); SwIndexTreeLB& rTLB = aHeaderTree.GetTreeListBox(); - rTLB.SetWindowBits(WB_CLIPCHILDREN|WB_SORT); + rTLB.SetStyle(rTLB.GetStyle()|WB_CLIPCHILDREN|WB_SORT); rTLB.GetModel()->SetSortMode(SortAscending); for(i = 0; i < MAXLEVEL; ++i) { @@ -904,6 +910,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS aTOXMarksCB( this, SW_RES(CB_TOXMARKS )), + aIdxOptionsFL( this, SW_RES(FL_IDXOPTIONS )), aCollectSameCB( this, SW_RES(CB_COLLECTSAME )), aUseFFCB( this, SW_RES(CB_USEFF )), aUseDashCB( this, SW_RES(CB_USE_DASH )), @@ -912,7 +919,6 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS aKeyAsEntryCB( this, SW_RES(CB_KEYASENTRY )), aFromFileCB( this, SW_RES(CB_FROMFILE )), aAutoMarkPB( this, SW_RES(MB_AUTOMARK )), - aIdxOptionsFL( this, SW_RES(FL_IDXOPTIONS )), aFromNames( SW_RES(RES_SRCTYPES )), aFromObjCLB( this, SW_RES(CLB_FROMOBJ )), @@ -936,12 +942,17 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS bFirstCall(sal_True) { aBracketLB.InsertEntry(String(SW_RES(ST_NO_BRACKET)), 0); + + aAddStylesPB.SetAccessibleRelationMemberOf(&aCreateFromFL); + aAddStylesPB.SetAccessibleRelationLabeledBy(&aAddStylesCB); + aAddStylesPB.SetAccessibleName(aAddStylesCB.GetText()); + FreeResource(); pIndexEntryWrapper = new IndexEntrySupplierWrapper(); aLanguageLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, - FALSE, FALSE, FALSE ); + sal_False, sal_False, sal_False ); sAddStyleContent = aAddStylesCB.GetText(); @@ -1149,7 +1160,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription() aFromObjectNamesRB.Check(rDesc.IsCreateFromObjectNames()); aFromCaptionsRB.Check(!rDesc.IsCreateFromObjectNames()); aCaptionSequenceLB.SelectEntry(rDesc.GetSequenceName()); - aDisplayTypeLB.SelectEntryPos( static_cast< USHORT >(rDesc.GetCaptionDisplay()) ); + aDisplayTypeLB.SelectEntryPos( static_cast< sal_uInt16 >(rDesc.GetCaptionDisplay()) ); RadioButtonHdl(&aFromCaptionsRB); } @@ -1180,11 +1191,11 @@ void SwTOXSelectTabPage::ApplyTOXDescription() LanguageHdl(0); for( long nCnt = 0; nCnt < aSortAlgorithmLB.GetEntryCount(); ++nCnt ) { - const String* pEntryData = (const String*)aSortAlgorithmLB.GetEntryData( (USHORT)nCnt ); + const String* pEntryData = (const String*)aSortAlgorithmLB.GetEntryData( (sal_uInt16)nCnt ); OSL_ENSURE(pEntryData, "no entry data available"); if( pEntryData && *pEntryData == rDesc.GetSortAlgorithm()) { - aSortAlgorithmLB.SelectEntryPos( (USHORT)nCnt ); + aSortAlgorithmLB.SelectEntryPos( (sal_uInt16)nCnt ); break; } } @@ -1261,7 +1272,7 @@ void SwTOXSelectTabPage::FillTOXDescription() nOLEData |= nData; } } - rDesc.SetOLEOptions((USHORT)nOLEData); + rDesc.SetOLEOptions((sal_uInt16)nOLEData); } break; case TOX_AUTHORITIES: @@ -1286,7 +1297,7 @@ void SwTOXSelectTabPage::FillTOXDescription() rDesc.SetContentOptions(nContentOptions); rDesc.SetIndexOptions(nIndexOptions); - rDesc.SetLevel( static_cast< BYTE >(aLevelNF.GetValue()) ); + rDesc.SetLevel( static_cast< sal_uInt8 >(aLevelNF.GetValue()) ); rDesc.SetReadonly(aReadOnlyCB.IsChecked()); @@ -1406,6 +1417,18 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) aSortAlgorithmFT.Show(bEnableSortLanguage); aSortAlgorithmLB.Show(bEnableSortLanguage); + // initialize button positions + + //#i111993# add styles button has two different positions + if( !aAddStylesPosDef.X() ) + { + aAddStylesPosDef = ( aAddStylesPB.GetPosPixel() ); + // move left! + Point aPos(aAddStylesPosDef); + aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width(); + aAddStylesPosUser = aPos; + } + if( nType & TO_ILLUSTRATION ) //add by zhaojianwei aCaptionSequenceLB.SelectEntry( SwStyleNameMapper::GetUIName( RES_POOLCOLL_LABEL_ABB, aEmptyStr )); @@ -1415,10 +1438,11 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) else if( nType & TO_USER ) { aAddStylesCB.SetText(sAddStyleUser); - // move left! - Point aPos(aAddStylesPB.GetPosPixel()); - aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width(); - aAddStylesPB.SetPosPixel(aPos); + aAddStylesPB.SetPosPixel(aAddStylesPosUser); + } + else if( nType & TO_CONTENT ) + { + aAddStylesPB.SetPosPixel(aAddStylesPosDef); } aCollectSameCB.Show( 0 != (nType & TO_INDEX) ); @@ -1514,16 +1538,16 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox) if( 0 != (pUserData = aSortAlgorithmLB.GetEntryData( aSortAlgorithmLB.GetSelectEntryPos())) ) sOldString = *(String*)pUserData; void* pDel; - USHORT nEnd = aSortAlgorithmLB.GetEntryCount(); - for( USHORT n = 0; n < nEnd; ++n ) + sal_uInt16 nEnd = aSortAlgorithmLB.GetEntryCount(); + for( sal_uInt16 n = 0; n < nEnd; ++n ) if( 0 != ( pDel = aSortAlgorithmLB.GetEntryData( n )) ) delete (String*)pDel; aSortAlgorithmLB.Clear(); - USHORT nInsPos; + sal_uInt16 nInsPos; String sAlg, sUINm; - nEnd = static_cast< USHORT >(aSeq.getLength()); - for( USHORT nCnt = 0; nCnt < nEnd; ++nCnt ) + nEnd = static_cast< sal_uInt16 >(aSeq.getLength()); + for( sal_uInt16 nCnt = 0; nCnt < nEnd; ++nCnt ) { sUINm = pIndexRes->GetTranslation( sAlg = aSeq[ nCnt ] ); nInsPos = aSortAlgorithmLB.InsertEntry( sUINm ); @@ -1819,7 +1843,7 @@ void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt ) SvLBoxEntry* pEntry = GetEntry( aPos ); if( pEntry ) { - USHORT nLevel = static_cast< USHORT >(GetModel()->GetAbsPos(pEntry)); + sal_uInt16 nLevel = static_cast< sal_uInt16 >(GetModel()->GetAbsPos(pEntry)); String sEntry = pParent->GetLevelHelp(++nLevel); if('*' == sEntry) sEntry = GetEntryText(pEntry); @@ -1853,6 +1877,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet SfxTabPage(pParent, SW_RES(TP_TOX_ENTRY), rAttrSet), aLevelFT(this, SW_RES(FT_LEVEL )), aLevelLB(this, SW_RES(LB_LEVEL )), + aEntryFL(this, SW_RES(FL_ENTRY )), aTokenFT(this, SW_RES(FT_TOKEN )), aTokenWIN(this, SW_RES(WIN_TOKEN )), @@ -1886,14 +1911,14 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet aTabPosFT(this, SW_RES(FT_TABPOS )), aTabPosMF(this, SW_RES(MF_TABPOS )), aAutoRightCB(this, SW_RES(CB_AUTORIGHT )), - aEntryFL(this, SW_RES(FL_ENTRY )), + aFormatFL(this, SW_RES(FL_FORMAT )), + aRelToStyleCB(this, SW_RES(CB_RELTOSTYLE )), aMainEntryStyleFT(this, SW_RES(FT_MAIN_ENTRY_STYLE)), aMainEntryStyleLB(this, SW_RES(LB_MAIN_ENTRY_STYLE)), aAlphaDelimCB(this, SW_RES(CB_ALPHADELIM )), aCommaSeparatedCB(this, SW_RES(CB_COMMASEPARATED )), - aFormatFL(this, SW_RES(FL_FORMAT )), aSortDocPosRB(this, SW_RES(RB_DOCPOS )), aSortContentRB(this, SW_RES(RB_SORTCONTENT )), @@ -1924,10 +1949,20 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet m_pCurrentForm(0), bInLevelHdl(sal_False) { + aEditStylePB.SetAccessibleRelationMemberOf(&aEntryFL); + aHyperLinkPB.SetAccessibleRelationMemberOf(&aEntryFL); + aPageNoPB.SetAccessibleRelationMemberOf(&aEntryFL); + aTabPB.SetAccessibleRelationMemberOf(&aEntryFL); + aEntryPB.SetAccessibleRelationMemberOf(&aEntryFL); + aEntryNoPB.SetAccessibleRelationMemberOf(&aEntryFL); + aAllLevelsPB.SetAccessibleRelationMemberOf(&aEntryFL); + aTokenWIN.SetAccessibleRelationMemberOf(&aEntryFL); + aTokenWIN.SetAccessibleRelationLabeledBy(&aTokenFT); + FreeResource(); sLevelStr = aLevelFT.GetText(); - aLevelLB.SetWindowBits( WB_HSCROLL ); + aLevelLB.SetStyle( aLevelLB.GetStyle() | WB_HSCROLL ); aLevelLB.SetSpaceBetweenEntries(0); aLevelLB.SetSelectionMode( SINGLE_SELECTION ); aLevelLB.SetHighlightRange(); // select full width @@ -1968,7 +2003,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet aCommaSeparatedCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); aRelToStyleCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); - FieldUnit aMetric = ::GetDfltMetric(FALSE); + FieldUnit aMetric = ::GetDfltMetric(sal_False); SetMetric(aTabPosMF, aMetric); aSortDocPosRB.Check(); @@ -1998,7 +2033,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet aEntryOutlineLevelFT.GetPosPixel().X(); //fill the types in - USHORT i; + sal_uInt16 i; for( i = 0; i < AUTH_FIELD_END; i++) { String sTmp(SW_RES(STR_AUTH_FIELD_START + i)); @@ -2103,9 +2138,9 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/) m_pCurrentForm = pTOXDlg->GetForm(aCurType); if( !( aLastTOXType == aCurType )) { - BOOL bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType; - BOOL bToxIsIndex = TOX_INDEX == aCurType.eType; - BOOL bToxIsContent = TOX_CONTENT == aCurType.eType; + sal_Bool bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType; + sal_Bool bToxIsIndex = TOX_INDEX == aCurType.eType; + sal_Bool bToxIsContent = TOX_CONTENT == aCurType.eType; aLevelLB.Clear(); for(sal_uInt16 i = 1; i < m_pCurrentForm->GetFormMax(); i++) @@ -2397,7 +2432,7 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn) String sText; FormTokenType eTokenType = TOKEN_ENTRY_NO; String sCharStyle; - USHORT nChapterFormat = CF_NUMBER; // i89791 + sal_uInt16 nChapterFormat = CF_NUMBER; // i89791 if(pBtn == &aEntryNoPB) { sText.AssignAscii(SwForm::aFormEntryNum); @@ -2692,7 +2727,7 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoHdl, ListBox*, pBox) IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField) { - const sal_uInt16 nLevel = static_cast<BYTE>(pField->GetValue()); + const sal_uInt16 nLevel = static_cast<sal_uInt8>(pField->GetValue()); Control* pCtrl = aTokenWIN.GetActiveControl(); OSL_ENSURE(pCtrl, "no active control?"); @@ -2776,7 +2811,7 @@ IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox) void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh) { SwDocShell* pDocSh = rSh.GetView().GetDocShell(); - ::FillCharStyleListBox(aCharStyleLB, pDocSh, TRUE, TRUE); + ::FillCharStyleListBox(aCharStyleLB, pDocSh, sal_True, sal_True); const String sDefault(SW_RES(STR_POOLCOLL_STANDARD)); for(sal_uInt16 i = 0; i < aCharStyleLB.GetEntryCount(); i++) { @@ -3142,9 +3177,9 @@ void SwTokenWindow::InsertAtSelection( aSel.Justify(); String sEditText = ((SwTOXEdit*)pActiveCtrl)->GetText(); - String sLeft = sEditText.Copy( 0, static_cast< USHORT >(aSel.A()) ); - String sRight = sEditText.Copy( static_cast< USHORT >(aSel.B()), - static_cast< USHORT >(sEditText.Len() - aSel.B())); + String sLeft = sEditText.Copy( 0, static_cast< sal_uInt16 >(aSel.A()) ); + String sRight = sEditText.Copy( static_cast< sal_uInt16 >(aSel.B()), + static_cast< sal_uInt16 >(sEditText.Len() - aSel.B())); ((SwTOXEdit*)pActiveCtrl)->SetText(sLeft); ((SwTOXEdit*)pActiveCtrl)->AdjustSize(); @@ -3454,11 +3489,11 @@ sal_Bool SwTokenWindow::Contains(FormTokenType eSearchFor) const return bRet; } -BOOL SwTokenWindow::CreateQuickHelp(Control* pCtrl, +sal_Bool SwTokenWindow::CreateQuickHelp(Control* pCtrl, const SwFormToken& rToken, const HelpEvent& rHEvt) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rHEvt.GetMode() & HELPMODE_QUICK ) { sal_Bool bBalloon = Help::IsBalloonHelpEnabled(); @@ -3495,7 +3530,7 @@ BOOL SwTokenWindow::CreateQuickHelp(Control* pCtrl, else Help::ShowQuickHelp( this, aItemRect, sEntry, QUICKHELP_LEFT|QUICKHELP_VCENTER ); - bRet = TRUE; + bRet = sal_True; } return bRet; } @@ -3643,17 +3678,18 @@ void SwTokenWindow::GetFocus() SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet ) : SfxTabPage(pParent, SW_RES(TP_TOX_STYLES), rAttrSet), + aFormatFL(this, SW_RES(FL_FORMAT )), aLevelFT2(this, SW_RES(FT_LEVEL )), aLevelLB(this, SW_RES(LB_LEVEL )), + aAssignBT(this, SW_RES(BT_ASSIGN )), aTemplateFT(this, SW_RES(FT_TEMPLATE)), aParaLayLB(this, SW_RES(LB_PARALAY )), aStdBT(this, SW_RES(BT_STD )), - aAssignBT(this, SW_RES(BT_ASSIGN )), aEditStyleBT(this, SW_RES(BT_EDIT_STYLE )), - aFormatFL(this, SW_RES(FL_FORMAT )), m_pCurrentForm(0) { FreeResource(); + SetExchangeSupport( sal_True ); aEditStyleBT.SetClickHdl (LINK( this, SwTOXStylesTabPage, EditStyleHdl)); @@ -3662,6 +3698,11 @@ SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrS aParaLayLB.SetSelectHdl (LINK( this, SwTOXStylesTabPage, EnableSelectHdl)); aLevelLB.SetSelectHdl (LINK( this, SwTOXStylesTabPage, EnableSelectHdl)); aParaLayLB.SetDoubleClickHdl(LINK( this, SwTOXStylesTabPage, DoubleClickHdl)); + + aStdBT.SetAccessibleRelationMemberOf(&aFormatFL); + aAssignBT.SetAccessibleRelationMemberOf(&aFormatFL); + aEditStyleBT.SetAccessibleRelationMemberOf(&aFormatFL); + } SwTOXStylesTabPage::~SwTOXStylesTabPage() @@ -3932,15 +3973,15 @@ SwEntryBrowseBox::SwEntryBrowseBox(Window* pParent, const ResId& rId, sal_Bool SwEntryBrowseBox::SeekRow( long nRow ) { nCurrentRow = nRow; - return TRUE; + return sal_True; } -String SwEntryBrowseBox::GetCellText(long nRow, USHORT nColumn) const +String SwEntryBrowseBox::GetCellText(long nRow, sal_uInt16 nColumn) const { const String* pRet = &aEmptyStr; if(aEntryArr.Count() > nRow) { - AutoMarkEntry* pEntry = aEntryArr[ static_cast< USHORT >(nRow) ]; + AutoMarkEntry* pEntry = aEntryArr[ static_cast< sal_uInt16 >(nRow) ]; switch(nColumn) { case ITEM_SEARCH :pRet = &pEntry->sSearch; break; @@ -3971,7 +4012,7 @@ void SwEntryBrowseBox::PaintCell(OutputDevice& rDev, sal_Bool SwEntryBrowseBox::SaveModified() { SetModified(); - USHORT nRow = static_cast< USHORT >(GetCurRow()); + sal_uInt16 nRow = static_cast< sal_uInt16 >(GetCurRow()); sal_uInt16 nCol = GetCurColumnId(); String sNew; @@ -4054,7 +4095,7 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr) if( !pToInsert ) pToInsert = new AutoMarkEntry; - USHORT nSttPos = 0; + sal_uInt16 nSttPos = 0; pToInsert->sSearch = sLine.GetToken(0, ';', nSttPos ); pToInsert->sAlternative = sLine.GetToken(0, ';', nSttPos ); pToInsert->sPrimKey = sLine.GetToken(0, ';', nSttPos ); @@ -4164,7 +4205,7 @@ SwAutoMarkDlg_Impl::SwAutoMarkDlg_Impl(Window* pParent, const String& rAutoMarkU aEntriesBB.RowInserted(0, 1, sal_True); else { - SfxMedium aMed( sAutoMarkURL, STREAM_STD_READ, FALSE ); + SfxMedium aMed( sAutoMarkURL, STREAM_STD_READ, sal_False ); if( aMed.GetInStream() && !aMed.GetInStream()->GetError() ) aEntriesBB.ReadEntries( *aMed.GetInStream() ); else @@ -4187,7 +4228,7 @@ IMPL_LINK(SwAutoMarkDlg_Impl, OkHdl, OKButton*, EMPTYARG) SfxMedium aMed( sAutoMarkURL, bCreateMode ? STREAM_WRITE : STREAM_WRITE| STREAM_TRUNC, - FALSE ); + sal_False ); SvStream* pStrm = aMed.GetOutStream(); pStrm->SetStreamCharSet( RTL_TEXTENCODING_MS_1253 ); if( !pStrm->GetError() ) diff --git a/sw/source/ui/index/cnttab.hrc b/sw/source/ui/index/cnttab.hrc index d1eed8cefad1..b6170bf53176 100644 --- a/sw/source/ui/index/cnttab.hrc +++ b/sw/source/ui/index/cnttab.hrc @@ -173,6 +173,7 @@ #define STR_TOKEN_HELP_AUTHORITY (STR_BUTTON_HELP_TEXT_START + 9) #define STR_CHARSTYLE (STR_TOKEN_HELP_AUTHORITY + 1) + #define TLB_STYLES 100 #define FL_STYLES 101 #define PB_OK 102 diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src index 377c07020268..9559aee6fab5 100644 --- a/sw/source/ui/index/cnttab.src +++ b/sw/source/ui/index/cnttab.src @@ -132,6 +132,7 @@ TabPage TP_TOX_SELECT }; Edit ED_TITLE { + HelpID = "sw:Edit:TP_TOX_SELECT:ED_TITLE"; Pos = MAP_APPFONT ( 45 , 14 ) ; Size = MAP_APPFONT ( 203 , 12 ) ; Border = TRUE; @@ -144,6 +145,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_TYPE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_TYPE"; Pos = MAP_APPFONT ( 45 , 30 ) ; Size = MAP_APPFONT ( 80 , 80 ) ; TabStop = TRUE ; @@ -161,6 +163,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_READONLY { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_READONLY"; Pos = MAP_APPFONT ( 51 , 46 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; Check = TRUE; @@ -180,6 +183,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_AREA { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_AREA"; Pos = MAP_APPFONT ( 45 , 70 ) ; Size = MAP_APPFONT ( 80 , 12 ) ; TabStop = TRUE ; @@ -198,6 +202,7 @@ TabPage TP_TOX_SELECT }; NumericField NF_LEVEL { + HelpID = "sw:NumericField:TP_TOX_SELECT:NF_LEVEL"; Pos = MAP_APPFONT ( 231 , 72 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; Border = TRUE ; @@ -218,6 +223,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_FROMHEADINGS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMHEADINGS"; Pos = MAP_APPFONT ( 12 , 99 ) ; Size = MAP_APPFONT ( 95 , 10 ) ; Check = TRUE; @@ -234,6 +240,7 @@ TabPage TP_TOX_SELECT */ CheckBox CB_ADDSTYLES { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_ADDSTYLES"; Pos = MAP_APPFONT ( 12 , 115 ) ; Size = MAP_APPFONT ( 75 , 10 ) ; Text [ en-US ] = "~Additional Styles"; @@ -244,6 +251,7 @@ TabPage TP_TOX_SELECT }; PushButton PB_ADDSTYLES { + HelpID = "sw:PushButton:TP_TOX_SELECT:PB_ADDSTYLES"; Pos = MAP_APPFONT ( 115 , 114 ) ; Size = MAP_APPFONT ( 12 , 12 ) ; Text = "..." ; @@ -251,6 +259,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_TOXMARKS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_TOXMARKS"; Pos = MAP_APPFONT ( 12 , 131 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Inde~x marks"; @@ -258,6 +267,7 @@ TabPage TP_TOX_SELECT RadioButton RB_FROMCAPTIONS { + HelpID = "sw:RadioButton:TP_TOX_SELECT:RB_FROMCAPTIONS"; Pos = MAP_APPFONT ( 12 , 98 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Captions"; @@ -270,6 +280,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_CAPTIONSEQUENCE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_CAPTIONSEQUENCE"; Pos = MAP_APPFONT ( 55 , 112 ) ; Size = MAP_APPFONT ( 70 , 40 ) ; DropDown = TRUE; @@ -283,6 +294,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_DISPLAYTYPE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_DISPLAYTYPE"; Pos = MAP_APPFONT ( 55 , 128 ) ; Size = MAP_APPFONT ( 70 , 40 ) ; DropDown = TRUE; @@ -296,54 +308,63 @@ TabPage TP_TOX_SELECT }; RadioButton RB_FROMOBJECTNAMES { + HelpID = "sw:RadioButton:TP_TOX_SELECT:RB_FROMOBJECTNAMES"; Pos = MAP_APPFONT ( 156 , 98 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Object names"; }; CheckBox CB_COLLECTSAME { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_COLLECTSAME"; Pos = MAP_APPFONT ( 12 , 98 ) ; Size = MAP_APPFONT ( 121 , 10 ) ; Text [ en-US ] = "Combine identical entries"; }; CheckBox CB_USEFF { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_USEFF"; Pos = MAP_APPFONT ( 18 , 111 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Combine identical entries with p or ~pp"; }; CheckBox CB_USE_DASH { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_USE_DASH"; Pos = MAP_APPFONT ( 18 , 124 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Combine with -"; }; CheckBox CB_CASESENSITIVE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_CASESENSITIVE"; Pos = MAP_APPFONT ( 18 , 137 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Case sensitive"; }; CheckBox CB_INITIALCAPS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_INITIALCAPS"; Pos = MAP_APPFONT ( 136 , 98 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "AutoCapitalize entries"; }; CheckBox CB_KEYASENTRY { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_KEYASENTRY"; Pos = MAP_APPFONT ( 136, 111 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "Keys as separate entries"; }; CheckBox CB_FROMFILE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMFILE"; Pos = MAP_APPFONT ( 136 , 124 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; Text [ en-US ] = "~Concordance file"; }; MenuButton MB_AUTOMARK { + HelpID = "sw:MenuButton:TP_TOX_SELECT:MB_AUTOMARK"; Pos = MAP_APPFONT ( 136 , 137 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -372,30 +393,35 @@ TabPage TP_TOX_SELECT }; CheckBox CB_FROMTABLES { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMTABLES"; Pos = MAP_APPFONT ( 112 , 99 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "Tables"; }; CheckBox CB_FROMFRAMES { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMFRAMES"; Pos = MAP_APPFONT ( 182 , 99 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "Te~xt frames"; }; CheckBox CB_FROMGRAPHICS { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMGRAPHICS"; Pos = MAP_APPFONT ( 112 , 113 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "Graphics"; }; CheckBox CB_FROMOLE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMOLE"; Pos = MAP_APPFONT ( 182 , 113 ) ; Size = MAP_APPFONT ( 68 , 10 ) ; Text [ en-US ] = "OLE objects"; }; CheckBox CB_LEVELFROMCHAPTER { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_LEVELFROMCHAPTER"; Pos = MAP_APPFONT ( 118 , 127 ) ; Size = MAP_APPFONT ( 103 , 10 ) ; Text [ en-US ] = "Use level from source chapter"; @@ -443,6 +469,7 @@ TabPage TP_TOX_SELECT }; CheckBox CB_SEQUENCE { + HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_SEQUENCE"; Pos = MAP_APPFONT ( 12, 70) ; Size = MAP_APPFONT ( 100, 10 ) ; Text [ en-US ] = "~Number entries"; @@ -455,6 +482,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_BRACKET { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_BRACKET"; Pos = MAP_APPFONT ( 75, 84) ; Size = MAP_APPFONT ( 40, 50 ) ; Border = TRUE; @@ -495,6 +523,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_LANGUAGE { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_LANGUAGE"; Pos = MAP_APPFONT ( 47, 164) ; Size = MAP_APPFONT ( 80, 50 ) ; Border = TRUE; @@ -508,6 +537,7 @@ TabPage TP_TOX_SELECT }; ListBox LB_SORTALG { + HelpID = "sw:ListBox:TP_TOX_SELECT:LB_SORTALG"; Pos = MAP_APPFONT ( 201, 164) ; Size = MAP_APPFONT ( 50, 50 ) ; Border = TRUE; @@ -549,6 +579,7 @@ TabPage TP_TOX_ENTRY Size = MAP_APPFONT ( 136, 12 ) ; ImageButton WIN_LEFT_SCROLL { + HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_LEFT_SCROLL"; Pos = MAP_APPFONT ( 0, 0 ) ; Size = MAP_APPFONT ( 10, 12 ) ; Symbol = IMAGEBUTTON_ARROW_LEFT; @@ -563,6 +594,7 @@ TabPage TP_TOX_ENTRY }; ImageButton WIN_RIGHT_SCROLL { + HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_RIGHT_SCROLL"; Pos = MAP_APPFONT ( 126, 0 ) ; Size = MAP_APPFONT ( 10, 12 ) ; Symbol = IMAGEBUTTON_ARROW_RIGHT; @@ -649,48 +681,56 @@ TabPage TP_TOX_ENTRY }; PushButton PB_ALL_LEVELS { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ALL_LEVELS"; Pos = MAP_APPFONT ( 209 , 14 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "~All"; }; PushButton PB_ENTRYNO { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ENTRYNO"; Pos = MAP_APPFONT ( 37 , 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Chapter no."; }; PushButton PB_ENTRY { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ENTRY"; Pos = MAP_APPFONT ( 80, 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Entry text"; }; PushButton PB_CHAPTERINFO { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_CHAPTERINFO"; Pos = MAP_APPFONT ( 123 , 32 ) ; Size = MAP_APPFONT ( 40, 14) ; Text [ en-US ] = "~Chapter info"; }; PushButton PB_PAGENO { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_PAGENO"; Pos = MAP_APPFONT ( 166 , 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Page no."; }; PushButton PB_TAB { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_TAB"; Pos = MAP_APPFONT ( 209 ,32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "Tab stop"; }; PushButton PB_HYPERLINK { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_HYPERLINK"; Pos = MAP_APPFONT ( 209 , 32 ) ; Size = MAP_APPFONT ( 40, 14 ) ; Text [ en-US ] = "H~yperlink"; }; ListBox LB_AUTHFIELD { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_AUTHFIELD"; Pos = MAP_APPFONT ( 37 , 33 ) ; Size = MAP_APPFONT ( 59, 60 ) ; DropDown = TRUE; @@ -699,12 +739,14 @@ TabPage TP_TOX_ENTRY }; PushButton PB_AUTHINSERT { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_AUTHINSERT"; Pos = MAP_APPFONT ( 99 , 32 ) ; Size = MAP_APPFONT ( 39, 14 ) ; Text [ en-US ] = "~Insert"; }; PushButton PB_AUTHREMOVE { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_AUTHREMOVE"; Pos = MAP_APPFONT ( 142 , 32 ) ; Size = MAP_APPFONT ( 39, 14 ) ; Text [ en-US ] = "~Remove"; @@ -717,6 +759,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_CHARSTYLE { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_CHARSTYLE"; Pos = MAP_APPFONT ( 100 , 53 ) ; Size = MAP_APPFONT ( 93, 60 ) ; TabStop = TRUE ; @@ -724,6 +767,7 @@ TabPage TP_TOX_ENTRY }; PushButton PB_EDITSTYLE { + HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_EDITSTYLE"; Pos = MAP_APPFONT ( 199 , 52 ) ; Size = MAP_APPFONT ( 50, 14 ) ; Text [ en-US ] = "~Edit..."; @@ -736,6 +780,7 @@ TabPage TP_TOX_ENTRY }; ComboBox CB_FILLCHAR { + HelpID = "sw:ComboBox:TP_TOX_ENTRY:CB_FILLCHAR"; Pos = MAP_APPFONT ( 100 , 69 ) ; Size = MAP_APPFONT ( 40, 40 ) ; TabStop = TRUE ; @@ -749,6 +794,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_CHAPTERENTRY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_CHAPTERENTRY"; Pos = MAP_APPFONT ( 100 , 69 ) ; Size = MAP_APPFONT ( 93, 40 ) ; TabStop = TRUE ; @@ -769,6 +815,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_ENTRY_NO { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_ENTRY_NO"; Pos = MAP_APPFONT ( 100 , 69 ) ; Size = MAP_APPFONT ( 93, 40 ) ; TabStop = TRUE ; @@ -788,6 +835,7 @@ TabPage TP_TOX_ENTRY }; NumericField NF_LEVEL_OL { + HelpID = "sw:NumericField:TP_TOX_ENTRY:NF_LEVEL_OL"; Pos = MAP_APPFONT ( 100 , 85 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; Border = TRUE ; @@ -809,6 +857,7 @@ TabPage TP_TOX_ENTRY }; MetricField MF_TABPOS { + HelpID = "sw:MetricField:TP_TOX_ENTRY:MF_TABPOS"; Pos = MAP_APPFONT ( 100 , 85 ) ; Size = MAP_APPFONT ( 40, 12 ) ; Border = TRUE ; @@ -827,6 +876,7 @@ TabPage TP_TOX_ENTRY }; CheckBox CB_AUTORIGHT { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_AUTORIGHT"; Pos = MAP_APPFONT ( 143 , 86 ) ; Size = MAP_APPFONT ( 100, 10 ) ; Text [ en-US ] = "Align right"; @@ -839,6 +889,7 @@ TabPage TP_TOX_ENTRY }; CheckBox CB_RELTOSTYLE { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_RELTOSTYLE"; Pos = MAP_APPFONT ( 37 , 110 ) ; Size = MAP_APPFONT ( 200, 10 ) ; Text [ en-US ] = "Tab position relati~ve to Paragraph Style indent"; @@ -851,6 +902,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_MAIN_ENTRY_STYLE { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_MAIN_ENTRY_STYLE"; Pos = MAP_APPFONT ( 157 , 110 ) ; Size = MAP_APPFONT ( 92, 80 ) ; TabStop = TRUE ; @@ -860,12 +912,14 @@ TabPage TP_TOX_ENTRY CheckBox CB_ALPHADELIM { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_ALPHADELIM"; Pos = MAP_APPFONT ( 37 , 126 ) ; Size = MAP_APPFONT ( 105, 10 ) ; Text [ en-US ] = "Alphabetical delimiter"; }; CheckBox CB_COMMASEPARATED { + HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_COMMASEPARATED"; Pos = MAP_APPFONT ( 37 , 140 ) ; Size = MAP_APPFONT ( 105, 10 ) ; Text [ en-US ] = "Key separated by commas"; @@ -878,12 +932,14 @@ TabPage TP_TOX_ENTRY }; RadioButton RB_DOCPOS { + HelpID = "sw:RadioButton:TP_TOX_ENTRY:RB_DOCPOS"; Pos = MAP_APPFONT ( 40 , 113) ; Size = MAP_APPFONT ( 94, 10 ) ; Text [ en-US ] = "Document ~position "; }; RadioButton RB_SORTCONTENT { + HelpID = "sw:RadioButton:TP_TOX_ENTRY:RB_SORTCONTENT"; Pos = MAP_APPFONT ( 136 , 113 ) ; Size = MAP_APPFONT ( 90, 10 ) ; Text [ en-US ] = "~Content"; @@ -902,6 +958,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_FIRSTKEY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_FIRSTKEY"; Pos = MAP_APPFONT ( 60 , 138 ) ; Size = MAP_APPFONT ( 159, 50 ) ; Border = TRUE; @@ -909,6 +966,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTUP1 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP1"; Pos = MAP_APPFONT ( 222 , 138 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -922,6 +980,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTDOWN1 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN1"; Pos = MAP_APPFONT ( 237 , 138 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -934,6 +993,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTUP2 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP2"; Pos = MAP_APPFONT ( 222 , 153 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -947,6 +1007,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTDOWN2 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN2"; Pos = MAP_APPFONT ( 237 , 153 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -959,6 +1020,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTUP3 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP3"; Pos = MAP_APPFONT ( 222 , 168 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -972,6 +1034,7 @@ TabPage TP_TOX_ENTRY }; ImageRadioButton RB_SORTDOWN3 { + HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN3"; Pos = MAP_APPFONT ( 237 ,168 ) ; Size = MAP_APPFONT ( 12, 12 ) ; RadioButtonImage = @@ -990,6 +1053,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_SECONDKEY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_SECONDKEY"; Pos = MAP_APPFONT ( 60 , 153 ) ; Size = MAP_APPFONT ( 159, 50 ) ; Border = TRUE; @@ -1003,6 +1067,7 @@ TabPage TP_TOX_ENTRY }; ListBox LB_THIRDKEY { + HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_THIRDKEY"; Pos = MAP_APPFONT ( 60 , 168 ) ; Size = MAP_APPFONT ( 159, 50 ) ; Border = TRUE; @@ -1042,6 +1107,7 @@ TabPage TP_TOX_STYLES }; ListBox LB_LEVEL { + HelpID = "sw:ListBox:TP_TOX_STYLES:LB_LEVEL"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 25 ) ; Size = MAP_APPFONT ( 102 , 131 ) ; @@ -1057,6 +1123,7 @@ TabPage TP_TOX_STYLES }; ListBox LB_PARALAY { + HelpID = "sw:ListBox:TP_TOX_STYLES:LB_PARALAY"; Border = TRUE ; Pos = MAP_APPFONT ( 142 , 25 ) ; Size = MAP_APPFONT ( 101 , 131 ) ; @@ -1066,6 +1133,7 @@ TabPage TP_TOX_STYLES }; PushButton BT_STD { + HelpID = "sw:PushButton:TP_TOX_STYLES:BT_STD"; Pos = MAP_APPFONT ( 64 , 162 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -1073,6 +1141,7 @@ TabPage TP_TOX_STYLES }; ImageButton BT_ASSIGN { + HelpID = "sw:ImageButton:TP_TOX_STYLES:BT_ASSIGN"; Pos = MAP_APPFONT ( 118 , 28 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; TabStop = TRUE ; @@ -1087,6 +1156,7 @@ TabPage TP_TOX_STYLES }; PushButton BT_EDIT_STYLE { + HelpID = "sw:PushButton:TP_TOX_STYLES:BT_EDIT_STYLE"; Pos = MAP_APPFONT ( 193 , 162 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -1126,6 +1196,7 @@ ModalDialog DLG_ADD_IDX_STYLES }; ImageButton PB_LEFT { + HelpID = "sw:ImageButton:DLG_ADD_IDX_STYLES:PB_LEFT"; Pos = MAP_APPFONT ( 12 , 182 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; @@ -1137,9 +1208,13 @@ ModalDialog DLG_ADD_IDX_STYLES }; MaskColor = IMAGE_MASK_COLOR ; }; + //IAccessibility2 Implementation 2009----- + QuickHelpText [ en-US ] = "Left" ; + //-----IAccessibility2 Implementation 2009 }; ImageButton PB_RIGHT { + HelpID = "sw:ImageButton:DLG_ADD_IDX_STYLES:PB_RIGHT"; Pos = MAP_APPFONT ( 65 , 182 ) ; Size = MAP_APPFONT ( 50 , 12 ) ; TabStop = TRUE ; @@ -1151,6 +1226,9 @@ ModalDialog DLG_ADD_IDX_STYLES }; MaskColor = IMAGE_MASK_COLOR ; }; + //IAccessibility2 Implementation 2009----- + QuickHelpText [ en-US ] = "Right" ; + //-----IAccessibility2 Implementation 2009 }; FixedLine FL_STYLES { diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src index ce90dea26928..0fdb84db1980 100644 --- a/sw/source/ui/index/idxmrk.src +++ b/sw/source/ui/index/idxmrk.src @@ -275,7 +275,7 @@ ModalDialog DLG_EDIT_IDXMARK Moveable = TRUE ; Closeable = TRUE; Sizeable = FALSE ; - HelpID = FN_EDIT_IDX_ENTRY_DLG; + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_NORMAL Size = MAP_APPFONT ( IDX_WIN_WIDTH , 118 ) ; @@ -294,7 +294,7 @@ ModalDialog DLG_EDIT_IDXMARK_CJK Moveable = TRUE ; Closeable = TRUE; Sizeable = FALSE ; - HelpID = FN_EDIT_IDX_ENTRY_DLG; + HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_CJK Size = MAP_APPFONT ( IDX_WIN_WIDTH , 118 ) ; @@ -315,7 +315,7 @@ ModelessDialog DLG_INSIDXMARK Sizeable = FALSE ; Hide = TRUE ; // Zoomable = TRUE ; - HelpID = FN_INSERT_IDX_ENTRY_DLG; + HelpId = CMD_FN_INSERT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_NORMAL Size = MAP_APPFONT ( IDX_WIN_WIDTH , 138) ; @@ -336,7 +336,7 @@ ModelessDialog DLG_INSIDXMARK_CJK Closeable = TRUE; Sizeable = FALSE ; // Zoomable = TRUE ; - HelpID = FN_INSERT_IDX_ENTRY_DLG; + HelpId = CMD_FN_INSERT_IDX_ENTRY_DLG; SVLook = TRUE ; #define IDX_WIN_WIDTH IDX_WIN_WIDTH_CJK Size = MAP_APPFONT ( IDX_WIN_WIDTH , 138) ; @@ -392,6 +392,7 @@ ModalDialog DLG_NEW_USER_IDX }; Edit ED_NAME { + HelpID = "sw:Edit:DLG_NEW_USER_IDX:ED_NAME"; Border = TRUE ; Pos = MAP_APPFONT ( 55 , 15 ) ; Size = MAP_APPFONT ( 78 , 12 ) ; @@ -522,7 +523,7 @@ ModalDialog DLG_EDIT_AUTHMARK Moveable = TRUE ; Closeable = TRUE ; Sizeable = FALSE ; - HelpID = FN_EDIT_AUTH_ENTRY_DLG; + HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG; SVLook = TRUE ; Size = MAP_APPFONT ( 218 , 118 ) ; #define RADIO_BUTTON_HEIGHT 0 @@ -535,7 +536,7 @@ ModelessDialog DLG_INSAUTHMARK Closeable = TRUE ; Sizeable = FALSE ; // Zoomable = TRUE ; - HelpID = FN_INSERT_AUTH_ENTRY_DLG; + HelpId = CMD_FN_INSERT_AUTH_ENTRY_DLG; SVLook = TRUE ; #define RADIO_BUTTON_HEIGHT 30 Size = MAP_APPFONT ( 218 , 118 + RADIO_BUTTON_HEIGHT) ; diff --git a/sw/source/ui/index/makefile.mk b/sw/source/ui/index/makefile.mk deleted file mode 100644 index a42f98122b55..000000000000 --- a/sw/source/ui/index/makefile.mk +++ /dev/null @@ -1,67 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=sw -TARGET=index -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/inc$/swpre.mk -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/inc$/sw.mk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES = \ - cnttab.src \ - idxmrk.src \ - multmrk.src - -EXCEPTIONSFILES = \ - $(SLO)$/cnttab.obj \ - $(SLO)$/cntex.obj \ - $(SLO)$/idxmrk.obj \ - $(SLO)$/multmrk.obj \ - $(SLO)$/swuiidxmrk.obj \ - $(SLO)$/toxmgr.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) - -LIB1TARGET= $(SLB)$/$(TARGET).lib - -LIB1OBJFILES = \ - $(SLO)$/idxmrk.obj \ - $(SLO)$/toxmgr.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx index 661c05955e6d..61c87315e8da 100644 --- a/sw/source/ui/index/multmrk.cxx +++ b/sw/source/ui/index/multmrk.cxx @@ -60,8 +60,8 @@ SwMultiTOXMarkDlg::SwMultiTOXMarkDlg( Window* pParent, SwTOXMgr& rTOXMgr ) : { aTOXLB.SetSelectHdl(LINK(this, SwMultiTOXMarkDlg, SelectHdl)); - USHORT nSize = rMgr.GetTOXMarkCount(); - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nSize = rMgr.GetTOXMarkCount(); + for(sal_uInt16 i=0; i < nSize; ++i) aTOXLB.InsertEntry(rMgr.GetTOXMark(i)->GetText()); aTOXLB.SelectEntryPos(0); diff --git a/sw/source/ui/index/multmrk.src b/sw/source/ui/index/multmrk.src index be7b47d836d4..5ecb1810d811 100644 --- a/sw/source/ui/index/multmrk.src +++ b/sw/source/ui/index/multmrk.src @@ -31,7 +31,7 @@ #include "helpid.h" ModalDialog DLG_MULTMRK { - HelpID = FN_EDIT_IDX_ENTRY_DLG ; + HelpID = CMD_FN_EDIT_IDX_ENTRY_DLG ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 220 , 95 ) ; @@ -65,6 +65,7 @@ ModalDialog DLG_MULTMRK }; ListBox LB_TOX { + HelpID = "sw:ListBox:DLG_MULTMRK:LB_TOX"; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 37 ) ; Size = MAP_APPFONT ( 100 , 49 ) ; diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 81930b247ebe..5c55f4cb9f65 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -72,7 +72,6 @@ #include <ndtxt.hxx> #include <breakit.hxx> #include <SwRewriter.hxx> -#include <undobj.hxx> #include <unomid.h> @@ -103,6 +102,7 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, const ResId& rResId, sal_Int32 _nOptionsId, SwWrtShell& rWrtShell ) : Window(pParent, rResId), + aIndexFL(this, SW_RES(FL_INDEX )), aTypeFT (this, SW_RES(LBL_INDEX )), aTypeDCB(this, SW_RES(DCB_INDEX )), aNewBT(this, SW_RES(BT_NEW )), @@ -129,7 +129,6 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, aSearchCaseSensitiveCB(this, SW_RES(CB_CASESENSITIVE )), aSearchCaseWordOnlyCB(this, SW_RES(CB_WORDONLY )), - aIndexFL(this, SW_RES(FL_INDEX )), aOKBT(this, SW_RES(BT_OK )), aCancelBT(this, SW_RES(BT_CANCEL )), @@ -146,15 +145,17 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent, bNewMark(bNewDlg), bSelected(sal_False), - bPhoneticED0_ChangedByUser(FALSE), - bPhoneticED1_ChangedByUser(FALSE), - bPhoneticED2_ChangedByUser(FALSE), + bPhoneticED0_ChangedByUser(sal_False), + bPhoneticED1_ChangedByUser(sal_False), + bPhoneticED2_ChangedByUser(sal_False), nLangForPhoneticReading(2052), - bIsPhoneticReadingEnabled(FALSE), + bIsPhoneticReadingEnabled(sal_False), xExtendedIndexEntrySupplier(NULL), pTOXMgr(0), pSh(&rWrtShell) { + aNewBT.SetAccessibleRelationMemberOf(&aIndexFL); + if( SvtCJKOptions().IsCJKFontEnabled() ) { uno::Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory(); @@ -350,10 +351,10 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading() //no phonetic reading if no global cjk support if( !xExtendedIndexEntrySupplier.is() ) { - bIsPhoneticReadingEnabled = FALSE; + bIsPhoneticReadingEnabled = sal_False; return; } - bIsPhoneticReadingEnabled = TRUE; + bIsPhoneticReadingEnabled = sal_True; //get the current language if(!bNewMark) //if dialog is opened to iterate existing marks @@ -378,8 +379,8 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading() } else //if dialog is opened to create a new mark { - USHORT nScriptType = pSh->GetScriptType(); - USHORT nWhich; + sal_uInt16 nScriptType = pSh->GetScriptType(); + sal_uInt16 nWhich; switch(nScriptType) { case SCRIPTTYPE_ASIAN: nWhich = RES_CHRATR_CJK_LANGUAGE; break; @@ -483,7 +484,7 @@ void SwIndexMarkDlg::InsertUpdate() /*-------------------------------------------------------------------- Beschreibung: Marke einfuegen --------------------------------------------------------------------*/ -static void lcl_SelectSameStrings(SwWrtShell& rSh, BOOL bWordOnly, BOOL bCaseSensitive) +static void lcl_SelectSameStrings(SwWrtShell& rSh, sal_Bool bWordOnly, sal_Bool bCaseSensitive) { rSh.Push(); @@ -498,12 +499,12 @@ static void lcl_SelectSameStrings(SwWrtShell& rSh, BOOL bWordOnly, BOOL bCaseSen : TransliterationModules_IGNORE_CASE) ); rSh.ClearMark(); - BOOL bCancel; + sal_Bool bCancel; //todo/mba: assuming that notes should not be searched - BOOL bSearchInNotes = FALSE; + sal_Bool bSearchInNotes = sal_False; rSh.Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel, - (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), FALSE ); + (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), sal_False ); } @@ -540,9 +541,9 @@ void SwIndexMarkDlg::InsertMark() } if (aOrgStr != aEntryED.GetText()) aDesc.SetAltStr(aEntryED.GetText()); - BOOL bApplyAll = aApplyToAllCB.IsChecked(); - BOOL bWordOnly = aSearchCaseWordOnlyCB.IsChecked(); - BOOL bCaseSensitive = aSearchCaseSensitiveCB.IsChecked(); + sal_Bool bApplyAll = aApplyToAllCB.IsChecked(); + sal_Bool bWordOnly = aSearchCaseWordOnlyCB.IsChecked(); + sal_Bool bCaseSensitive = aSearchCaseSensitiveCB.IsChecked(); pSh->StartAllAction(); // hier muessen alle gleichen Strings selektiert werden @@ -555,7 +556,7 @@ void SwIndexMarkDlg::InsertMark() SwTOXMgr aMgr(pSh); aMgr.InsertTOXMark(aDesc); if(bApplyAll) - pSh->Pop(FALSE); + pSh->Pop(sal_False); pSh->EndAllAction(); } @@ -773,11 +774,11 @@ IMPL_LINK( SwIndexMarkDlg, ModifyHdl, ListBox *, pBox ) } else //aEntryED !!aEntryED is not a ListBox but a Edit { - BOOL bHasText = (aEntryED.GetText().Len()>0); + sal_Bool bHasText = (aEntryED.GetText().Len()>0); if(!bHasText) { aPhoneticED0.SetText(aEmptyStr); - bPhoneticED0_ChangedByUser = FALSE; + bPhoneticED0_ChangedByUser = sal_False; } else if(!bPhoneticED0_ChangedByUser) aPhoneticED0.SetText(GetDefaultPhoneticReading(aEntryED.GetText())); @@ -980,15 +981,15 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox ) aKey2DCB.SetText(aEmptyStr); aPhoneticED1.SetText(aEmptyStr); aPhoneticED2.SetText(aEmptyStr); - bPhoneticED1_ChangedByUser = FALSE; - bPhoneticED2_ChangedByUser = FALSE; + bPhoneticED1_ChangedByUser = sal_False; + bPhoneticED2_ChangedByUser = sal_False; } else { if(pBox->IsInDropDown()) { //reset bPhoneticED1_ChangedByUser if a completly new string is selected - bPhoneticED1_ChangedByUser = FALSE; + bPhoneticED1_ChangedByUser = sal_False; } if(!bPhoneticED1_ChangedByUser) aPhoneticED1.SetText(GetDefaultPhoneticReading(pBox->GetText())); @@ -1001,14 +1002,14 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox ) if(!(pBox->GetText().Len()>0)) { aPhoneticED2.SetText(aEmptyStr); - bPhoneticED2_ChangedByUser = FALSE; + bPhoneticED2_ChangedByUser = sal_False; } else { if(pBox->IsInDropDown()) { //reset bPhoneticED1_ChangedByUser if a completly new string is selected - bPhoneticED2_ChangedByUser = FALSE; + bPhoneticED2_ChangedByUser = sal_False; } if(!bPhoneticED2_ChangedByUser) aPhoneticED2.SetText(GetDefaultPhoneticReading(pBox->GetText())); @@ -1041,7 +1042,7 @@ void SwIndexMarkDlg::ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark) pTOXMgr = new SwTOXMgr(pSh); if(pCurTOXMark) { - for(USHORT i = 0; i < pTOXMgr->GetTOXMarkCount(); i++) + for(sal_uInt16 i = 0; i < pTOXMgr->GetTOXMarkCount(); i++) if(pTOXMgr->GetTOXMark(i) == pCurTOXMark) { pTOXMgr->SetCurTOXMark(i); @@ -1129,7 +1130,7 @@ public: struct TextInfo { sal_uInt16 nToxField; - sal_uInt16 nHelpId; + const char* pHelpId; }; static const TextInfo aTextInfoArr[] = @@ -1640,7 +1641,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pTypeListBox->SetPosPixel(bLeft ? aTR1 : aTR2); pTypeListBox->Show(); pTypeListBox->SetSelectHdl(LINK(this, SwCreateAuthEntryDlg_Impl, EnableHdl)); - pTypeListBox->SetHelpId(aCurInfo.nHelpId); + pTypeListBox->SetHelpId(aCurInfo.pHelpId); } else if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField && !m_bNewEntryMode) @@ -1668,7 +1669,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pIdentifierBox->SetSizePixel(aTmp); pIdentifierBox->SetPosPixel(bLeft ? aTR1 : aTR2); pIdentifierBox->Show(); - pIdentifierBox->SetHelpId(aCurInfo.nHelpId); + pIdentifierBox->SetHelpId(aCurInfo.pHelpId); } else { @@ -1679,7 +1680,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pEdits[nIndex]->SetPosPixel(bLeft ? aTR1 : aTR2); pEdits[nIndex]->SetText(pFields[aCurInfo.nToxField]); pEdits[nIndex]->Show(); - pEdits[nIndex]->SetHelpId(aCurInfo.nHelpId); + pEdits[nIndex]->SetHelpId(aCurInfo.pHelpId); if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField) { pEdits[nIndex]->SetModifyHdl(LINK(this, SwCreateAuthEntryDlg_Impl, ShortNameHdl)); diff --git a/sw/source/ui/index/toxmgr.cxx b/sw/source/ui/index/toxmgr.cxx index ad6f70beca5c..f3afd0c21d15 100644 --- a/sw/source/ui/index/toxmgr.cxx +++ b/sw/source/ui/index/toxmgr.cxx @@ -28,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" + #include <wrtsh.hxx> #include <shellres.hxx> #include <swwait.hxx> @@ -35,6 +36,7 @@ #include <toxmgr.hxx> #include <crsskip.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <swundo.hxx> #include <globals.hrc> @@ -55,13 +57,13 @@ SwTOXMgr::SwTOXMgr(SwWrtShell* pShell): --------------------------------------------------------------------*/ -USHORT SwTOXMgr::GetTOXMarks() +sal_uInt16 SwTOXMgr::GetTOXMarks() { return pSh->GetCurTOXMarks(aCurMarks); } -SwTOXMark* SwTOXMgr::GetTOXMark(USHORT nId) +SwTOXMark* SwTOXMgr::GetTOXMark(sal_uInt16 nId) { if(aCurMarks.Count() > 0) return aCurMarks[nId]; @@ -95,7 +97,7 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc) OSL_ENSURE(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL, "invalid InsertTOCMark level"); pMark = new SwTOXMark(pSh->GetTOXType(TOX_CONTENT, 0)); - pMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) ); + pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) ); if(rDesc.GetAltStr()) pMark->SetAlternativeText(*rDesc.GetAltStr()); @@ -129,10 +131,10 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc) { OSL_ENSURE(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL, "invalid InsertTOCMark level"); - USHORT nId = rDesc.GetTOUName() ? + sal_uInt16 nId = rDesc.GetTOUName() ? GetUserTypeID(*rDesc.GetTOUName()) : 0; pMark = new SwTOXMark(pSh->GetTOXType(TOX_USER, nId)); - pMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) ); + pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) ); if(rDesc.GetAltStr()) pMark->SetAlternativeText(*rDesc.GetAltStr()); @@ -192,13 +194,13 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc) pCurTOXMark->SetMainEntry(rDesc.IsMainEntry()); } else - pCurTOXMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) ); + pCurTOXMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) ); if(rDesc.GetAltStr()) { // JP 26.08.96: Bug 30344 - entweder der Text aus dem Doc oder // ein Alternativ-Text, beides gibts nicht! - BOOL bReplace = pCurTOXMark->IsAlternativeText(); + sal_Bool bReplace = pCurTOXMark->IsAlternativeText(); if( bReplace ) pCurTOXMark->SetAlternativeText( *rDesc.GetAltStr() ); else @@ -216,7 +218,7 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc) // Bug 36207 pCurTOXMark zeigt hier in den Wald! if(!pCurTOXMark) { - pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); + pSh->Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False ); pSh->GetCurTOXMarks(aCurMarks); SetCurTOXMark(0); } @@ -228,10 +230,10 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc) --------------------------------------------------------------------*/ -USHORT SwTOXMgr::GetUserTypeID(const String& rStr) +sal_uInt16 SwTOXMgr::GetUserTypeID(const String& rStr) { - USHORT nSize = pSh->GetTOXTypeCount(TOX_USER); - for(USHORT i=0; i < nSize; ++i) + sal_uInt16 nSize = pSh->GetTOXTypeCount(TOX_USER); + for(sal_uInt16 i=0; i < nSize; ++i) { const SwTOXType* pTmp = pSh->GetTOXType(TOX_USER, i); if(pTmp && pTmp->GetTypeName() == rStr) @@ -247,7 +249,7 @@ USHORT SwTOXMgr::GetUserTypeID(const String& rStr) --------------------------------------------------------------------*/ -void SwTOXMgr::NextTOXMark(BOOL bSame) +void SwTOXMgr::NextTOXMark(sal_Bool bSame) { OSL_ENSURE(pCurTOXMark, "no current TOXMark"); if( pCurTOXMark ) @@ -258,7 +260,7 @@ void SwTOXMgr::NextTOXMark(BOOL bSame) } -void SwTOXMgr::PrevTOXMark(BOOL bSame) +void SwTOXMgr::PrevTOXMark(sal_Bool bSame) { OSL_ENSURE(pCurTOXMark, "no current TOXMark"); if( pCurTOXMark ) @@ -276,22 +278,22 @@ const SwTOXBase* SwTOXMgr::GetCurTOX() return pSh->GetCurTOX(); } -const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, USHORT nId) const +const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const { return pSh->GetTOXType(eTyp, nId); } -void SwTOXMgr::SetCurTOXMark(USHORT nId) +void SwTOXMgr::SetCurTOXMark(sal_uInt16 nId) { pCurTOXMark = (nId < aCurMarks.Count()) ? aCurMarks[nId] : 0; } -BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, +sal_Bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase, const SfxItemSet* pSet) { - SwWait aWait( *pSh->GetView().GetDocShell(), TRUE ); - BOOL bRet = TRUE; + SwWait aWait( *pSh->GetView().GetDocShell(), sal_True ); + sal_Bool bRet = sal_True; const SwTOXBase* pCurTOX = ppBase && *ppBase ? *ppBase : GetCurTOX(); SwTOXBase* pTOX = (SwTOXBase*)pCurTOX; @@ -336,9 +338,9 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, { if(!pCurTOX || (ppBase && !(*ppBase))) { - USHORT nPos = 0; - USHORT nSize = pSh->GetTOXTypeCount(eCurTOXType); - for(USHORT i=0; rDesc.GetTOUName() && i < nSize; ++i) + sal_uInt16 nPos = 0; + sal_uInt16 nSize = pSh->GetTOXTypeCount(eCurTOXType); + for(sal_uInt16 i=0; rDesc.GetTOUName() && i < nSize; ++i) { const SwTOXType* pType = pSh->GetTOXType(TOX_USER, i); if(pType->GetTypeName() == *rDesc.GetTOUName()) { nPos = i; @@ -409,14 +411,14 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, OSL_ENSURE(pNewTOX, "no TOXBase created!" ); if(!pNewTOX) - return FALSE; + return sal_False; pNewTOX->SetFromChapter(rDesc.IsFromChapter()); pNewTOX->SetSequenceName(rDesc.GetSequenceName()); pNewTOX->SetCaptionDisplay(rDesc.GetCaptionDisplay()); pNewTOX->SetProtected(rDesc.IsReadonly()); - for(USHORT nLevel = 0; nLevel < MAXLEVEL; nLevel++) + for(sal_uInt16 nLevel = 0; nLevel < MAXLEVEL; nLevel++) pNewTOX->SetStyleNames(rDesc.GetStyleNames(nLevel), nLevel); if(rDesc.GetTitle()) @@ -442,12 +444,14 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, { SwDoc * pDoc = pSh->GetDoc(); - if (pDoc->DoesUndo()) + if (pDoc->GetIDocumentUndoRedo().DoesUndo()) { if (pNewTOX != NULL) - pDoc->DelAllUndoObj(); + { + pDoc->GetIDocumentUndoRedo().DelAllUndoObj(); + } - pDoc->StartUndo(UNDO_TOXCHANGE, NULL); + pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, NULL); } if (pNewTOX != NULL) // => pTOX != NULL @@ -455,12 +459,14 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, bRet = pSh->UpdateTableOf(*pTOX, pSet); - if (pDoc->DoesUndo()) + if (pDoc->GetIDocumentUndoRedo().DoesUndo()) { - pDoc->EndUndo(UNDO_TOXCHANGE, NULL); + pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, NULL); if (pNewTOX == NULL) - pDoc->DelAllUndoObj(); + { + pDoc->GetIDocumentUndoRedo().DelAllUndoObj(); + } } } @@ -472,7 +478,7 @@ void SwTOXDescription::SetSortKeys(SwTOXSortKey eKey1, SwTOXSortKey eKey3) { SwTOXSortKey aArr[3]; - USHORT nPos = 0; + sal_uInt16 nPos = 0; if(AUTH_FIELD_END > eKey1.eField) aArr[nPos++] = eKey1; if(AUTH_FIELD_END > eKey2.eField) @@ -487,7 +493,7 @@ void SwTOXDescription::SetSortKeys(SwTOXSortKey eKey1, void SwTOXDescription::ApplyTo(SwTOXBase& rTOXBase) { - for(USHORT i = 0; i < MAXLEVEL; i++) + for(sal_uInt16 i = 0; i < MAXLEVEL; i++) rTOXBase.SetStyleNames(GetStyleNames(i), i); rTOXBase.SetTitle(GetTitle() ? *GetTitle() : aEmptyStr); rTOXBase.SetCreate(GetContentOptions()); |