diff options
Diffstat (limited to 'sw/source/ui/misc')
-rw-r--r-- | sw/source/ui/misc/docfnote.cxx | 98 | ||||
-rw-r--r-- | sw/source/ui/misc/glossary.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/misc/impfnote.hxx | 6 | ||||
-rw-r--r-- | sw/source/ui/misc/insfnote.cxx | 34 | ||||
-rw-r--r-- | sw/source/ui/misc/linenum.cxx | 32 | ||||
-rw-r--r-- | sw/source/ui/misc/num.cxx | 210 | ||||
-rw-r--r-- | sw/source/ui/misc/outline.cxx | 284 | ||||
-rw-r--r-- | sw/source/ui/misc/pgfnote.cxx | 54 | ||||
-rw-r--r-- | sw/source/ui/misc/srtdlg.cxx | 48 | ||||
-rw-r--r-- | sw/source/ui/misc/titlepage.cxx | 48 |
10 files changed, 410 insertions, 410 deletions
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 76cad1a47ac5..5703e6d7b354 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -87,7 +87,7 @@ SwEndNoteOptionPage::SwEndNoteOptionPage(vcl::Window *pParent, bool bEN, { get(m_pNumViewBox, "numberinglb"); get(m_pOffsetLbl, "offset"); - get(m_pOffsetFld, "offsetnf"); + get(m_pOffsetField, "offsetnf"); get(m_pPrefixED, "prefix"); get(m_pSuffixED, "suffix"); @@ -113,8 +113,8 @@ SwEndNoteOptionPage::SwEndNoteOptionPage(vcl::Window *pParent, bool bEN, get(m_pParaTemplBox, "parastylelb"); get(m_pPageTemplLbl, "pagestyleft"); get(m_pPageTemplBox, "pagestylelb"); - get(m_pFtnCharAnchorTemplBox, "charanchorstylelb"); - get(m_pFtnCharTextTemplBox, "charstylelb"); + get(m_pFootnoteCharAnchorTemplBox, "charanchorstylelb"); + get(m_pFootnoteCharTextTemplBox, "charstylelb"); } SwEndNoteOptionPage::~SwEndNoteOptionPage() @@ -126,7 +126,7 @@ void SwEndNoteOptionPage::dispose() { m_pNumViewBox.clear(); m_pOffsetLbl.clear(); - m_pOffsetFld.clear(); + m_pOffsetField.clear(); m_pNumCountBox.clear(); m_pPrefixED.clear(); m_pSuffixED.clear(); @@ -137,8 +137,8 @@ void SwEndNoteOptionPage::dispose() m_pParaTemplBox.clear(); m_pPageTemplLbl.clear(); m_pPageTemplBox.clear(); - m_pFtnCharAnchorTemplBox.clear(); - m_pFtnCharTextTemplBox.clear(); + m_pFootnoteCharAnchorTemplBox.clear(); + m_pFootnoteCharTextTemplBox.clear(); m_pContEdit.clear(); m_pContFromEdit.clear(); SfxTabPage::dispose(); @@ -147,7 +147,7 @@ void SwEndNoteOptionPage::dispose() void SwEndNoteOptionPage::Reset( const SfxItemSet* ) { boost::scoped_ptr<SwEndNoteInfo> pInf(bEndNote ? new SwEndNoteInfo( pSh->GetEndNoteInfo() ) - : new SwFtnInfo( pSh->GetFtnInfo() )); + : new SwFootnoteInfo( pSh->GetFootnoteInfo() )); SfxObjectShell * pDocSh = SfxObjectShell::Current(); if (PTR_CAST(SwWebDocShell, pDocSh)) @@ -159,7 +159,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet* ) } else { - const SwFtnInfo &rInf = pSh->GetFtnInfo(); + const SwFootnoteInfo &rInf = pSh->GetFootnoteInfo(); // set position (page, chapter) if ( rInf.ePos == FTNPOS_PAGE ) { @@ -184,19 +184,19 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet* ) // numbering // art - m_pNumViewBox->SelectNumberingType( pInf->aFmt.GetNumberingType()); - m_pOffsetFld->SetValue(pInf->nFtnOffset + 1); + m_pNumViewBox->SelectNumberingType( pInf->aFormat.GetNumberingType()); + m_pOffsetField->SetValue(pInf->nFootnoteOffset + 1); m_pPrefixED->SetText(pInf->GetPrefix().replaceAll("\t", "\\t")); // fdo#65666 m_pSuffixED->SetText(pInf->GetSuffix().replaceAll("\t", "\\t")); - const SwCharFmt* pCharFmt = pInf->GetCharFmt( + const SwCharFormat* pCharFormat = pInf->GetCharFormat( *pSh->GetView().GetDocShell()->GetDoc()); - m_pFtnCharTextTemplBox->SelectEntry(pCharFmt->GetName()); - m_pFtnCharTextTemplBox->SaveValue(); + m_pFootnoteCharTextTemplBox->SelectEntry(pCharFormat->GetName()); + m_pFootnoteCharTextTemplBox->SaveValue(); - pCharFmt = pInf->GetAnchorCharFmt( *pSh->GetDoc() ); - m_pFtnCharAnchorTemplBox->SelectEntry( pCharFmt->GetName() ); - m_pFtnCharAnchorTemplBox->SaveValue(); + pCharFormat = pInf->GetAnchorCharFormat( *pSh->GetDoc() ); + m_pFootnoteCharAnchorTemplBox->SelectEntry( pCharFormat->GetName() ); + m_pFootnoteCharAnchorTemplBox->SaveValue(); // styles special regions // paragraph @@ -215,7 +215,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet* ) if(LISTBOX_ENTRY_NOTFOUND == m_pParaTemplBox->GetEntryPos( sStr ) ) m_pParaTemplBox->InsertEntry( sStr ); - SwTxtFmtColl* pColl = pInf->GetFtnTxtColl(); + SwTextFormatColl* pColl = pInf->GetFootnoteTextColl(); if( !pColl ) m_pParaTemplBox->SelectEntry( sStr ); // Default else @@ -286,12 +286,12 @@ void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell ) { pSh = &rShell; // collect character templates - m_pFtnCharTextTemplBox->Clear(); - m_pFtnCharAnchorTemplBox->Clear(); - ::FillCharStyleListBox(*m_pFtnCharTextTemplBox, + m_pFootnoteCharTextTemplBox->Clear(); + m_pFootnoteCharAnchorTemplBox->Clear(); + ::FillCharStyleListBox(*m_pFootnoteCharTextTemplBox, pSh->GetView().GetDocShell()); - ::FillCharStyleListBox(*m_pFtnCharAnchorTemplBox, + ::FillCharStyleListBox(*m_pFootnoteCharAnchorTemplBox, pSh->GetView().GetDocShell()); } @@ -299,7 +299,7 @@ void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell ) // all kinds of numbering can be used. IMPL_LINK_NOARG(SwEndNoteOptionPage, PosPageHdl) { - const SwFtnNum eNum = (const SwFtnNum)GetNumbering(); + const SwFootnoteNum eNum = (const SwFootnoteNum)GetNumbering(); bPosDoc = false; if(LISTBOX_ENTRY_NOTFOUND == m_pNumCountBox->GetEntryPos(aNumPage)) { @@ -319,10 +319,10 @@ IMPL_LINK_NOARG(SwEndNoteOptionPage, NumCountHdl) if( m_pNumCountBox->GetEntryCount() - 1 != m_pNumCountBox->GetSelectEntryPos() ) { bEnable = false; - m_pOffsetFld->SetValue(1); + m_pOffsetField->SetValue(1); } m_pOffsetLbl->Enable(bEnable); - m_pOffsetFld->Enable(bEnable); + m_pOffsetField->Enable(bEnable); return 0; } @@ -341,53 +341,53 @@ IMPL_LINK_NOARG(SwEndNoteOptionPage, PosChapterHdl) return 0; } -static SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const OUString& rCharFmtName ) +static SwCharFormat* lcl_GetCharFormat( SwWrtShell* pSh, const OUString& rCharFormatName ) { - SwCharFmt* pFmt = 0; - const sal_uInt16 nChCount = pSh->GetCharFmtCount(); + SwCharFormat* pFormat = 0; + const sal_uInt16 nChCount = pSh->GetCharFormatCount(); for(sal_uInt16 i = 0; i< nChCount; i++) { - SwCharFmt& rChFmt = pSh->GetCharFmt(i); - if(rChFmt.GetName() == rCharFmtName ) + SwCharFormat& rChFormat = pSh->GetCharFormat(i); + if(rChFormat.GetName() == rCharFormatName ) { - pFmt = &rChFmt; + pFormat = &rChFormat; break; } } - if(!pFmt) + if(!pFormat) { SfxStyleSheetBasePool* pPool = pSh->GetView().GetDocShell()->GetStyleSheetPool(); SfxStyleSheetBase* pBase; - pBase = pPool->Find(rCharFmtName, SFX_STYLE_FAMILY_CHAR); + pBase = pPool->Find(rCharFormatName, SFX_STYLE_FAMILY_CHAR); if(!pBase) - pBase = &pPool->Make(rCharFmtName, SFX_STYLE_FAMILY_CHAR); - pFmt = static_cast<SwDocStyleSheet*>(pBase)->GetCharFmt(); + pBase = &pPool->Make(rCharFormatName, SFX_STYLE_FAMILY_CHAR); + pFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat(); } - return pFmt; + return pFormat; } bool SwEndNoteOptionPage::FillItemSet( SfxItemSet * ) { - boost::scoped_ptr<SwEndNoteInfo> pInf(bEndNote ? new SwEndNoteInfo() : new SwFtnInfo()); + boost::scoped_ptr<SwEndNoteInfo> pInf(bEndNote ? new SwEndNoteInfo() : new SwFootnoteInfo()); - pInf->nFtnOffset = static_cast< sal_uInt16 >(m_pOffsetFld->GetValue() -1); - pInf->aFmt.SetNumberingType(m_pNumViewBox->GetSelectedNumberingType() ); + pInf->nFootnoteOffset = static_cast< sal_uInt16 >(m_pOffsetField->GetValue() -1); + pInf->aFormat.SetNumberingType(m_pNumViewBox->GetSelectedNumberingType() ); pInf->SetPrefix(m_pPrefixED->GetText().replaceAll("\\t", "\t")); pInf->SetSuffix(m_pSuffixED->GetText().replaceAll("\\t", "\t")); - pInf->SetCharFmt( lcl_GetCharFormat( pSh, - m_pFtnCharTextTemplBox->GetSelectEntry() ) ); - pInf->SetAnchorCharFmt( lcl_GetCharFormat( pSh, - m_pFtnCharAnchorTemplBox->GetSelectEntry() ) ); + pInf->SetCharFormat( lcl_GetCharFormat( pSh, + m_pFootnoteCharTextTemplBox->GetSelectEntry() ) ); + pInf->SetAnchorCharFormat( lcl_GetCharFormat( pSh, + m_pFootnoteCharAnchorTemplBox->GetSelectEntry() ) ); // paragraph template sal_Int32 nPos = m_pParaTemplBox->GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nPos) { - const OUString aFmtName( m_pParaTemplBox->GetSelectEntry() ); - SwTxtFmtColl *pColl = pSh->GetParaStyle(aFmtName, SwWrtShell::GETSTYLE_CREATEANY); + const OUString aFormatName( m_pParaTemplBox->GetSelectEntry() ); + SwTextFormatColl *pColl = pSh->GetParaStyle(aFormatName, SwWrtShell::GETSTYLE_CREATEANY); OSL_ENSURE(pColl, "paragraph style not found"); - pInf->SetFtnTxtColl(*pColl); + pInf->SetFootnoteTextColl(*pColl); } // page template @@ -401,13 +401,13 @@ bool SwEndNoteOptionPage::FillItemSet( SfxItemSet * ) } else { - SwFtnInfo *pI = static_cast<SwFtnInfo*>(pInf.get()); + SwFootnoteInfo *pI = static_cast<SwFootnoteInfo*>(pInf.get()); pI->ePos = m_pPosPageBox->IsChecked() ? FTNPOS_PAGE : FTNPOS_CHAPTER; - pI->eNum = (SwFtnNum)GetNumbering(); + pI->eNum = (SwFootnoteNum)GetNumbering(); pI->aQuoVadis = m_pContEdit->GetText(); pI->aErgoSum = m_pContFromEdit->GetText(); - if ( !(*pI == pSh->GetFtnInfo()) ) - pSh->SetFtnInfo( *pI ); + if ( !(*pI == pSh->GetFootnoteInfo()) ) + pSh->SetFootnoteInfo( *pI ); } return true; } diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index d00a14a2aa9e..d82a5c11e397 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -565,10 +565,10 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn ) if ( pMacroDlg && pMacroDlg->Execute() == RET_OK && SfxItemState::SET == pMacroDlg->GetOutputItemSet()->GetItemState( RES_FRMMACRO, false, &pItem ) ) { - const SvxMacroTableDtor& rTbl = static_cast<const SvxMacroItem*>(pItem)->GetMacroTable(); + const SvxMacroTableDtor& rTable = static_cast<const SvxMacroItem*>(pItem)->GetMacroTable(); pGlossaryHdl->SetMacros( m_pShortNameEdit->GetText(), - rTbl.Get( SW_EVENT_START_INS_GLOSSARY ), - rTbl.Get( SW_EVENT_END_INS_GLOSSARY ) ); + rTable.Get( SW_EVENT_START_INS_GLOSSARY ), + rTable.Get( SW_EVENT_END_INS_GLOSSARY ) ); } } else if (sItemIdent == "import") diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx index 31b5f8a920d0..8d291d0c6794 100644 --- a/sw/source/ui/misc/impfnote.hxx +++ b/sw/source/ui/misc/impfnote.hxx @@ -32,7 +32,7 @@ class SwEndNoteOptionPage : public SfxTabPage { VclPtr<SwNumberingTypeListBox> m_pNumViewBox; VclPtr<FixedText> m_pOffsetLbl; - VclPtr<NumericField> m_pOffsetFld; + VclPtr<NumericField> m_pOffsetField; VclPtr<ListBox> m_pNumCountBox; VclPtr<Edit> m_pPrefixED; VclPtr<Edit> m_pSuffixED; @@ -46,8 +46,8 @@ class SwEndNoteOptionPage : public SfxTabPage VclPtr<FixedText> m_pPageTemplLbl; VclPtr<ListBox> m_pPageTemplBox; - VclPtr<ListBox> m_pFtnCharAnchorTemplBox; - VclPtr<ListBox> m_pFtnCharTextTemplBox; + VclPtr<ListBox> m_pFootnoteCharAnchorTemplBox; + VclPtr<ListBox> m_pFootnoteCharTextTemplBox; VclPtr<Edit> m_pContEdit; VclPtr<Edit> m_pContFromEdit; diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index d3f3c086fddb..e105ca13355d 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -54,10 +54,10 @@ void SwInsFootNoteDlg::Apply() rSh.StartAction(); rSh.Left(CRSR_SKIP_CHARS, false, 1, false ); rSh.StartUndo( UNDO_START ); - SwFmtFtn aNote( m_pEndNoteBtn->IsChecked() ); + SwFormatFootnote aNote( m_pEndNoteBtn->IsChecked() ); aNote.SetNumStr( aStr ); - if( rSh.SetCurFtn( aNote ) && bExtCharAvailable ) + if( rSh.SetCurFootnote( aNote ) && bExtCharAvailable ) { rSh.Right(CRSR_SKIP_CHARS, true, 1, false ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); @@ -79,7 +79,7 @@ void SwInsFootNoteDlg::Apply() } - bFootnote = m_pFtnBtn->IsChecked(); + bFootnote = m_pFootnoteBtn->IsChecked(); } IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberCharHdl) @@ -151,9 +151,9 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn ) // go to the next foot/endnote here rSh.ResetSelect(0, false); if (pBtn == m_pNextBT) - rSh.GotoNextFtnAnchor(); + rSh.GotoNextFootnoteAnchor(); else - rSh.GotoPrevFtnAnchor(); + rSh.GotoPrevFootnoteAnchor(); Init(); @@ -172,7 +172,7 @@ SwInsFootNoteDlg::SwInsFootNoteDlg(vcl::Window *pParent, SwWrtShell &rShell, boo get(m_pNumberCharBtn, "character"); get(m_pNumberCharEdit, "characterentry"); get(m_pNumberExtChar, "choosecharacter"); - get(m_pFtnBtn, "footnote"); + get(m_pFootnoteBtn, "footnote"); get(m_pEndNoteBtn, "endnote"); get(m_pOkBtn, "ok"); get(m_pPrevBT, "prev"); @@ -216,7 +216,7 @@ void SwInsFootNoteDlg::dispose() m_pNumberCharBtn.clear(); m_pNumberCharEdit.clear(); m_pNumberExtChar.clear(); - m_pFtnBtn.clear(); + m_pFootnoteBtn.clear(); m_pEndNoteBtn.clear(); m_pOkBtn.clear(); m_pPrevBT.clear(); @@ -226,18 +226,18 @@ void SwInsFootNoteDlg::dispose() void SwInsFootNoteDlg::Init() { - SwFmtFtn aFtnNote; + SwFormatFootnote aFootnoteNote; OUString sNumStr; vcl::Font aFont; bExtCharAvailable = false; rSh.StartAction(); - if( rSh.GetCurFtn( &aFtnNote )) + if( rSh.GetCurFootnote( &aFootnoteNote )) { - if (!aFtnNote.GetNumStr().isEmpty()) + if (!aFootnoteNote.GetNumStr().isEmpty()) { - sNumStr = aFtnNote.GetNumStr(); + sNumStr = aFootnoteNote.GetNumStr(); rSh.Right(CRSR_SKIP_CHARS, true, 1, false ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); @@ -252,7 +252,7 @@ void SwInsFootNoteDlg::Init() bExtCharAvailable = true; rSh.Left( CRSR_SKIP_CHARS, false, 1, false ); } - bFootnote = !aFtnNote.IsEndNote(); + bFootnote = !aFootnoteNote.IsEndNote(); } m_pNumberCharEdit->SetFont(aFont); @@ -265,19 +265,19 @@ void SwInsFootNoteDlg::Init() m_pNumberCharEdit->GrabFocus(); if (bFootnote) - m_pFtnBtn->Check(); + m_pFootnoteBtn->Check(); else m_pEndNoteBtn->Check(); - bool bNext = rSh.GotoNextFtnAnchor(); + bool bNext = rSh.GotoNextFootnoteAnchor(); if (bNext) - rSh.GotoPrevFtnAnchor(); + rSh.GotoPrevFootnoteAnchor(); - bool bPrev = rSh.GotoPrevFtnAnchor(); + bool bPrev = rSh.GotoPrevFootnoteAnchor(); if (bPrev) - rSh.GotoNextFtnAnchor(); + rSh.GotoNextFootnoteAnchor(); m_pPrevBT->Enable(bPrev); m_pNextBT->Enable(bNext); diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index b14903c9e170..7523cac8d503 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -53,9 +53,9 @@ static void lcl_setLineNumbering(const OUString& rName, SwWrtShell* pSh, bool bL if(!xStyleSheet.is()) return; SfxItemSet& rSet = xStyleSheet->GetItemSet(); - SwFmtLineNumber aFmt; - aFmt.SetCountLines(bLineNumber); - rSet.Put(aFmt); + SwFormatLineNumber aFormat; + aFormat.SetCountLines(bLineNumber); + rSet.Put(aFormat); xStyleSheet->MergeIndentAttrsOfListStyle( rSet ); xStyleSheet->SetItemSet(rSet, false); } @@ -101,7 +101,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw) const SwLineNumberInfo &rInf = pSh->GetLineNumberInfo(); IDocumentStylePoolAccess* pIDSPA = pSh->getIDocumentStylePoolAccess(); - OUString sStyleName(rInf.GetCharFmt( *pIDSPA )->GetName()); + OUString sStyleName(rInf.GetCharFormat( *pIDSPA )->GetName()); const sal_Int32 nPos = m_pCharStyleLB->GetEntryPos(sStyleName); if (nPos != LISTBOX_ENTRY_NOTFOUND) @@ -116,9 +116,9 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw) } // format - sal_uInt16 nSelFmt = rInf.GetNumType().GetNumberingType(); + sal_uInt16 nSelFormat = rInf.GetNumType().GetNumberingType(); - m_pFormatLB->SelectNumberingType(nSelFmt); + m_pFormatLB->SelectNumberingType(nSelFormat); // position m_pPosLB->SelectEntryPos((sal_Int32)rInf.GetPos()); @@ -151,8 +151,8 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw) if(xStyleSheet.is()) { SfxItemSet& rSet = xStyleSheet->GetItemSet(); - const SwFmtLineNumber &aFmt = static_cast<const SwFmtLineNumber&>(rSet.Get(RES_LINENUMBER)); - if(aFmt.IsCount()) + const SwFormatLineNumber &aFormat = static_cast<const SwFormatLineNumber&>(rSet.Get(RES_LINENUMBER)); + if(aFormat.IsCount()) m_pNumberingOnFooterHeader->SetState(TRISTATE_TRUE); else m_pNumberingOnFooterHeader->SetState(TRISTATE_FALSE); @@ -198,21 +198,21 @@ IMPL_LINK_NOARG(SwLineNumberingDlg, OKHdl) SwLineNumberInfo aInf(pSh->GetLineNumberInfo()); // char styles - OUString sCharFmtName(m_pCharStyleLB->GetSelectEntry()); - SwCharFmt *pCharFmt = pSh->FindCharFmtByName(sCharFmtName); + OUString sCharFormatName(m_pCharStyleLB->GetSelectEntry()); + SwCharFormat *pCharFormat = pSh->FindCharFormatByName(sCharFormatName); - if (!pCharFmt) + if (!pCharFormat) { SfxStyleSheetBasePool* pPool = pSh->GetView().GetDocShell()->GetStyleSheetPool(); SfxStyleSheetBase* pBase; - pBase = pPool->Find(sCharFmtName, SFX_STYLE_FAMILY_CHAR); + pBase = pPool->Find(sCharFormatName, SFX_STYLE_FAMILY_CHAR); if(!pBase) - pBase = &pPool->Make(sCharFmtName, SFX_STYLE_FAMILY_CHAR); - pCharFmt = static_cast<SwDocStyleSheet*>(pBase)->GetCharFmt(); + pBase = &pPool->Make(sCharFormatName, SFX_STYLE_FAMILY_CHAR); + pCharFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat(); } - if (pCharFmt) - aInf.SetCharFmt(pCharFmt); + if (pCharFormat) + aInf.SetCharFormat(pCharFormat); // format SvxNumberType aType; diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 0cd2f805018c..783cdf2bdf8e 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -220,13 +220,13 @@ void SwNumPositionTabPage::InitControls() bool bSameAlignAt = bLabelAlignmentPosAndSpaceModeActive; bool bSameIndentAt = bLabelAlignmentPosAndSpaceModeActive; - const SwNumFmt* aNumFmtArr[MAXLEVEL]; + const SwNumFormat* aNumFormatArr[MAXLEVEL]; sal_uInt16 nMask = 1; sal_uInt16 nLvl = USHRT_MAX; long nFirstBorderTextRelative = -1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - aNumFmtArr[i] = &pActNum->Get(i); + aNumFormatArr[i] = &pActNum->Get(i); if(nActNumLvl & nMask) { if(USHRT_MAX == nLvl) @@ -236,14 +236,14 @@ void SwNumPositionTabPage::InitControls() if( i > nLvl) { - bSameAdjust &= aNumFmtArr[i]->GetNumAdjust() == aNumFmtArr[nLvl]->GetNumAdjust(); + bSameAdjust &= aNumFormatArr[i]->GetNumAdjust() == aNumFormatArr[nLvl]->GetNumAdjust(); if ( !bLabelAlignmentPosAndSpaceModeActive ) { if(bRelative) { const long nBorderTextRelative = - aNumFmtArr[i]->GetAbsLSpace() + aNumFmtArr[i]->GetFirstLineOffset() - - aNumFmtArr[i - 1]->GetAbsLSpace() + aNumFmtArr[i - 1]->GetFirstLineOffset(); + aNumFormatArr[i]->GetAbsLSpace() + aNumFormatArr[i]->GetFirstLineOffset() - + aNumFormatArr[i - 1]->GetAbsLSpace() + aNumFormatArr[i - 1]->GetFirstLineOffset(); if (nFirstBorderTextRelative == -1) nFirstBorderTextRelative = nBorderTextRelative; else @@ -252,24 +252,24 @@ void SwNumPositionTabPage::InitControls() else { bSameDistBorderNum &= - aNumFmtArr[i]->GetAbsLSpace() - aNumFmtArr[i]->GetFirstLineOffset() == - aNumFmtArr[i - 1]->GetAbsLSpace() - aNumFmtArr[i - 1]->GetFirstLineOffset(); + aNumFormatArr[i]->GetAbsLSpace() - aNumFormatArr[i]->GetFirstLineOffset() == + aNumFormatArr[i - 1]->GetAbsLSpace() - aNumFormatArr[i - 1]->GetFirstLineOffset(); } - bSameDist &= aNumFmtArr[i]->GetCharTextDistance() == aNumFmtArr[nLvl]->GetCharTextDistance(); - bSameIndent &= aNumFmtArr[i]->GetFirstLineOffset() == aNumFmtArr[nLvl]->GetFirstLineOffset(); + bSameDist &= aNumFormatArr[i]->GetCharTextDistance() == aNumFormatArr[nLvl]->GetCharTextDistance(); + bSameIndent &= aNumFormatArr[i]->GetFirstLineOffset() == aNumFormatArr[nLvl]->GetFirstLineOffset(); } else { bSameLabelFollowedBy &= - aNumFmtArr[i]->GetLabelFollowedBy() == aNumFmtArr[nLvl]->GetLabelFollowedBy(); + aNumFormatArr[i]->GetLabelFollowedBy() == aNumFormatArr[nLvl]->GetLabelFollowedBy(); bSameListtab &= - aNumFmtArr[i]->GetListtabPos() == aNumFmtArr[nLvl]->GetListtabPos(); + aNumFormatArr[i]->GetListtabPos() == aNumFormatArr[nLvl]->GetListtabPos(); bSameAlignAt &= - ( ( aNumFmtArr[i]->GetIndentAt() + aNumFmtArr[i]->GetFirstLineIndent() ) - == ( aNumFmtArr[nLvl]->GetIndentAt() + aNumFmtArr[nLvl]->GetFirstLineIndent() ) ); + ( ( aNumFormatArr[i]->GetIndentAt() + aNumFormatArr[i]->GetFirstLineIndent() ) + == ( aNumFormatArr[nLvl]->GetIndentAt() + aNumFormatArr[nLvl]->GetFirstLineIndent() ) ); bSameIndentAt &= - aNumFmtArr[i]->GetIndentAt() == aNumFmtArr[nLvl]->GetIndentAt(); + aNumFormatArr[i]->GetIndentAt() == aNumFormatArr[nLvl]->GetIndentAt(); } } } @@ -286,13 +286,13 @@ void SwNumPositionTabPage::InitControls() long nDistBorderNum; if(bRelative) { - nDistBorderNum = (long)aNumFmtArr[nLvl]->GetAbsLSpace()+ aNumFmtArr[nLvl]->GetFirstLineOffset(); + nDistBorderNum = (long)aNumFormatArr[nLvl]->GetAbsLSpace()+ aNumFormatArr[nLvl]->GetFirstLineOffset(); if(nLvl) - nDistBorderNum -= (long)aNumFmtArr[nLvl - 1]->GetAbsLSpace()+ aNumFmtArr[nLvl - 1]->GetFirstLineOffset(); + nDistBorderNum -= (long)aNumFormatArr[nLvl - 1]->GetAbsLSpace()+ aNumFormatArr[nLvl - 1]->GetFirstLineOffset(); } else { - nDistBorderNum = (long)aNumFmtArr[nLvl]->GetAbsLSpace()+ aNumFmtArr[nLvl]->GetFirstLineOffset(); + nDistBorderNum = (long)aNumFormatArr[nLvl]->GetAbsLSpace()+ aNumFormatArr[nLvl]->GetFirstLineOffset(); } m_pDistBorderMF->SetValue(m_pDistBorderMF->Normalize(nDistBorderNum),FUNIT_TWIP); } @@ -300,20 +300,20 @@ void SwNumPositionTabPage::InitControls() bSetDistEmpty = true; if(bSameDist) - m_pDistNumMF->SetValue(m_pDistNumMF->Normalize(aNumFmtArr[nLvl]->GetCharTextDistance()), FUNIT_TWIP); + m_pDistNumMF->SetValue(m_pDistNumMF->Normalize(aNumFormatArr[nLvl]->GetCharTextDistance()), FUNIT_TWIP); else m_pDistNumMF->SetText(aEmptyOUStr); if(bSameIndent) - m_pIndentMF->SetValue(m_pIndentMF->Normalize(-aNumFmtArr[nLvl]->GetFirstLineOffset()), FUNIT_TWIP); + m_pIndentMF->SetValue(m_pIndentMF->Normalize(-aNumFormatArr[nLvl]->GetFirstLineOffset()), FUNIT_TWIP); else m_pIndentMF->SetText(aEmptyOUStr); if(bSameAdjust) { sal_Int32 nPos = 1; // centered - if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT) + if(aNumFormatArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT) nPos = 0; - else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT) + else if(aNumFormatArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT) nPos = 2; m_pAlignLB->SelectEntryPos(nPos); m_pAlign2LB->SelectEntryPos( nPos ); @@ -327,11 +327,11 @@ void SwNumPositionTabPage::InitControls() if ( bSameLabelFollowedBy ) { sal_Int32 nPos = 0; // LISTTAB - if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE ) + if ( aNumFormatArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE ) { nPos = 1; } - else if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::NOTHING ) + else if ( aNumFormatArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::NOTHING ) { nPos = 2; } @@ -342,13 +342,13 @@ void SwNumPositionTabPage::InitControls() m_pLabelFollowedByLB->SetNoSelection(); } - if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::LISTTAB ) + if ( aNumFormatArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::LISTTAB ) { m_pListtabFT->Enable( true ); m_pListtabMF->Enable( true ); if ( bSameListtab ) { - m_pListtabMF->SetValue(m_pListtabMF->Normalize(aNumFmtArr[nLvl]->GetListtabPos()),FUNIT_TWIP); + m_pListtabMF->SetValue(m_pListtabMF->Normalize(aNumFormatArr[nLvl]->GetListtabPos()),FUNIT_TWIP); } else { @@ -365,8 +365,8 @@ void SwNumPositionTabPage::InitControls() if ( bSameAlignAt ) { m_pAlignedAtMF->SetValue( - m_pAlignedAtMF->Normalize( aNumFmtArr[nLvl]->GetIndentAt() + - aNumFmtArr[nLvl]->GetFirstLineIndent()), + m_pAlignedAtMF->Normalize( aNumFormatArr[nLvl]->GetIndentAt() + + aNumFormatArr[nLvl]->GetFirstLineIndent()), FUNIT_TWIP ); } else @@ -377,7 +377,7 @@ void SwNumPositionTabPage::InitControls() if ( bSameIndentAt ) { m_pIndentAtMF->SetValue( - m_pIndentAtMF->Normalize( aNumFmtArr[nLvl]->GetIndentAt()), FUNIT_TWIP ); + m_pIndentAtMF->Normalize( aNumFormatArr[nLvl]->GetIndentAt()), FUNIT_TWIP ); } else { @@ -400,7 +400,7 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& ) { bPreset = static_cast<const SfxBoolItem*>(pItem)->GetValue(); } - bModified = (!pActNum->GetNumFmt( 0 ) || bPreset); + bModified = (!pActNum->GetNumFormat( 0 ) || bPreset); if(*pActNum != *pSaveNum || nActNumLvl != nTmpNumLvl ) { @@ -504,8 +504,8 @@ void SwNumPositionTabPage::InitPosAndSpaceMode() { if(nActNumLvl & nMask) { - SvxNumberFormat aNumFmt( pActNum->Get(i) ); - ePosAndSpaceMode = aNumFmt.GetPositionAndSpaceMode(); + SvxNumberFormat aNumFormat( pActNum->Get(i) ); + ePosAndSpaceMode = aNumFormat.GetPositionAndSpaceMode(); if ( ePosAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT ) { break; @@ -595,7 +595,7 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, EditModifyHdl) { if(nActNumLvl & nMask) { - SwNumFmt aNumFmt(pActNum->Get(i)); + SwNumFormat aNumFormat(pActNum->Get(i)); const sal_Int32 nPos = m_pAlignLB->IsVisible() ? m_pAlignLB->GetSelectEntryPos() @@ -605,8 +605,8 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, EditModifyHdl) eAdjust = SVX_ADJUST_LEFT; else if(nPos == 2) eAdjust = SVX_ADJUST_RIGHT; - aNumFmt.SetNumAdjust( eAdjust ); - pActNum->Set(i, aNumFmt); + aNumFormat.SetNumAdjust( eAdjust ); + pActNum->Set(i, aNumFormat); } nMask <<= 1; } @@ -660,26 +660,26 @@ IMPL_LINK( SwNumPositionTabPage, LevelHdl, ListBox *, pBox ) return 0; } -IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) +IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pField ) { if(bInInintControl) return 0; - long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP))); + long nValue = static_cast< long >(pField->Denormalize(pField->GetValue(FUNIT_TWIP))); sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) { - SwNumFmt aNumFmt( pActNum->Get( i ) ); - if(pFld == m_pDistBorderMF) + SwNumFormat aNumFormat( pActNum->Get( i ) ); + if(pField == m_pDistBorderMF) { if(m_pRelativeCB->IsChecked() && m_pRelativeCB->IsEnabled()) { if(0 == i) { - long nTmp = aNumFmt.GetFirstLineOffset(); - aNumFmt.SetAbsLSpace( nValue - nTmp ); + long nTmp = aNumFormat.GetFirstLineOffset(); + aNumFormat.SetAbsLSpace( nValue - nTmp ); } else { @@ -687,28 +687,28 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pFld ) pActNum->Get( i - 1 ).GetFirstLineOffset() - pActNum->Get( i ).GetFirstLineOffset(); - aNumFmt.SetAbsLSpace( nValue + nTmp ); + aNumFormat.SetAbsLSpace( nValue + nTmp ); } } else { - aNumFmt.SetAbsLSpace( (short)nValue - aNumFmt.GetFirstLineOffset()); + aNumFormat.SetAbsLSpace( (short)nValue - aNumFormat.GetFirstLineOffset()); } } - else if (pFld == m_pDistNumMF) + else if (pField == m_pDistNumMF) { - aNumFmt.SetCharTextDistance( nValue ); + aNumFormat.SetCharTextDistance( nValue ); } - else if (pFld == m_pIndentMF) + else if (pField == m_pIndentMF) { // now AbsLSpace also has to be modified by FirstLineOffset - long nDiff = nValue + aNumFmt.GetFirstLineOffset(); - long nAbsLSpace = aNumFmt.GetAbsLSpace(); - aNumFmt.SetAbsLSpace( nAbsLSpace + nDiff ); - aNumFmt.SetFirstLineOffset( -nValue ); + long nDiff = nValue + aNumFormat.GetFirstLineOffset(); + long nAbsLSpace = aNumFormat.GetAbsLSpace(); + aNumFormat.SetAbsLSpace( nAbsLSpace + nDiff ); + aNumFormat.SetFirstLineOffset( -nValue ); } - pActNum->Set( i, aNumFmt ); + pActNum->Set( i, aNumFormat ); } nMask <<= 1; } @@ -735,15 +735,15 @@ IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox ) { if(nActNumLvl & nMask) { - const SwNumFmt &rNumFmt = pActNum->Get(i); + const SwNumFormat &rNumFormat = pActNum->Get(i); if(bFirst) { - nValue = rNumFmt.GetAbsLSpace(); + nValue = rNumFormat.GetAbsLSpace(); if(bOn && i) nValue -= pActNum->Get(i - 1).GetAbsLSpace(); } else - bSetValue = nValue == rNumFmt.GetAbsLSpace() - pActNum->Get(i - 1).GetAbsLSpace(); + bSetValue = nValue == rNumFormat.GetAbsLSpace() - pActNum->Get(i - 1).GetAbsLSpace(); bFirst = false; } nMask <<= 1; @@ -783,9 +783,9 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, LabelFollowedByHdl_Impl) { if ( nActNumLvl & nMask ) { - SwNumFmt aNumFmt( pActNum->Get(i) ); - aNumFmt.SetLabelFollowedBy( eLabelFollowedBy ); - pActNum->Set( i, aNumFmt ); + SwNumFormat aNumFormat( pActNum->Get(i) ); + aNumFormat.SetLabelFollowedBy( eLabelFollowedBy ); + pActNum->Set( i, aNumFormat ); if ( nFirstLvl == USHRT_MAX ) { @@ -793,7 +793,7 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, LabelFollowedByHdl_Impl) } else { - bSameListtabPos &= aNumFmt.GetListtabPos() == + bSameListtabPos &= aNumFormat.GetListtabPos() == pActNum->Get( nFirstLvl ).GetListtabPos(); } } @@ -820,10 +820,10 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, LabelFollowedByHdl_Impl) return 0; } -IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pFld ) +IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pField ) { // determine value to be set at the chosen list levels - const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP))); + const long nValue = static_cast< long >(pField->Denormalize(pField->GetValue(FUNIT_TWIP))); // set value at the chosen list levels sal_uInt16 nMask = 1; @@ -831,9 +831,9 @@ IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pFld ) { if ( nActNumLvl & nMask ) { - SwNumFmt aNumFmt( pActNum->Get(i) ); - aNumFmt.SetListtabPos( nValue ); - pActNum->Set( i, aNumFmt ); + SwNumFormat aNumFormat( pActNum->Get(i) ); + aNumFormat.SetListtabPos( nValue ); + pActNum->Set( i, aNumFormat ); } nMask <<= 1; } @@ -843,10 +843,10 @@ IMPL_LINK( SwNumPositionTabPage, ListtabPosHdl_Impl, MetricField*, pFld ) return 0; } -IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pFld ) +IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pField ) { // determine value to be set at the chosen list levels - const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP))); + const long nValue = static_cast< long >(pField->Denormalize(pField->GetValue(FUNIT_TWIP))); // set value at the chosen list levels sal_uInt16 nMask = 1; @@ -854,10 +854,10 @@ IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pFld ) { if ( nActNumLvl & nMask ) { - SwNumFmt aNumFmt( pActNum->Get(i) ); - const long nFirstLineIndent = nValue - aNumFmt.GetIndentAt(); - aNumFmt.SetFirstLineIndent( nFirstLineIndent ); - pActNum->Set( i, aNumFmt ); + SwNumFormat aNumFormat( pActNum->Get(i) ); + const long nFirstLineIndent = nValue - aNumFormat.GetIndentAt(); + aNumFormat.SetFirstLineIndent( nFirstLineIndent ); + pActNum->Set( i, aNumFormat ); } nMask <<= 1; } @@ -867,10 +867,10 @@ IMPL_LINK( SwNumPositionTabPage, AlignAtHdl_Impl, MetricField*, pFld ) return 0; } -IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld ) +IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pField ) { // determine value to be set at the chosen list levels - const long nValue = static_cast< long >(pFld->Denormalize(pFld->GetValue(FUNIT_TWIP))); + const long nValue = static_cast< long >(pField->Denormalize(pField->GetValue(FUNIT_TWIP))); // set value at the chosen list levels sal_uInt16 nMask = 1; @@ -878,13 +878,13 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pFld ) { if ( nActNumLvl & nMask ) { - SwNumFmt aNumFmt( pActNum->Get(i) ); - const long nAlignedAt = aNumFmt.GetIndentAt() + - aNumFmt.GetFirstLineIndent(); - aNumFmt.SetIndentAt( nValue ); + SwNumFormat aNumFormat( pActNum->Get(i) ); + const long nAlignedAt = aNumFormat.GetIndentAt() + + aNumFormat.GetFirstLineIndent(); + aNumFormat.SetIndentAt( nValue ); const long nNewFirstLineIndent = nAlignedAt - nValue; - aNumFmt.SetFirstLineIndent( nNewFirstLineIndent ); - pActNum->Set( i, aNumFmt ); + aNumFormat.SetFirstLineIndent( nNewFirstLineIndent ); + pActNum->Set( i, aNumFormat ); } nMask <<= 1; } @@ -901,27 +901,27 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, StandardHdl) { if(nActNumLvl & nMask) { - SwNumFmt aNumFmt( pActNum->Get( i ) ); + SwNumFormat aNumFormat( pActNum->Get( i ) ); SwNumRule aTmpNumRule( pWrtSh->GetUniqueNumRuleName(), - aNumFmt.GetPositionAndSpaceMode(), + aNumFormat.GetPositionAndSpaceMode(), pOutlineDlg ? OUTLINE_RULE : NUM_RULE ); - SwNumFmt aTempFmt(aTmpNumRule.Get( i )); - aNumFmt.SetPositionAndSpaceMode( aTempFmt.GetPositionAndSpaceMode() ); - if ( aTempFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + SwNumFormat aTempFormat(aTmpNumRule.Get( i )); + aNumFormat.SetPositionAndSpaceMode( aTempFormat.GetPositionAndSpaceMode() ); + if ( aTempFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { - aNumFmt.SetAbsLSpace( aTempFmt.GetAbsLSpace()); - aNumFmt.SetCharTextDistance( aTempFmt.GetCharTextDistance() ); - aNumFmt.SetFirstLineOffset( aTempFmt.GetFirstLineOffset() ); + aNumFormat.SetAbsLSpace( aTempFormat.GetAbsLSpace()); + aNumFormat.SetCharTextDistance( aTempFormat.GetCharTextDistance() ); + aNumFormat.SetFirstLineOffset( aTempFormat.GetFirstLineOffset() ); } - else if ( aTempFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + else if ( aTempFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { - aNumFmt.SetNumAdjust( aTempFmt.GetNumAdjust() ); - aNumFmt.SetLabelFollowedBy( aTempFmt.GetLabelFollowedBy() ); - aNumFmt.SetListtabPos( aTempFmt.GetListtabPos() ); - aNumFmt.SetFirstLineIndent( aTempFmt.GetFirstLineIndent() ); - aNumFmt.SetIndentAt( aTempFmt.GetIndentAt() ); + aNumFormat.SetNumAdjust( aTempFormat.GetNumAdjust() ); + aNumFormat.SetLabelFollowedBy( aTempFormat.GetLabelFollowedBy() ); + aNumFormat.SetListtabPos( aTempFormat.GetListtabPos() ); + aNumFormat.SetFirstLineIndent( aTempFormat.GetFirstLineIndent() ); + aNumFormat.SetIndentAt( aTempFormat.GetIndentAt() ); } - pActNum->Set( i, aNumFmt ); + pActNum->Set( i, aNumFormat ); } nMask <<= 1; } @@ -967,38 +967,38 @@ SwSvxNumBulletTabDialog::~SwSvxNumBulletTabDialog() void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) { // set styles' names and metric - OUString sNumCharFmt, sBulletCharFmt; - SwStyleNameMapper::FillUIName( RES_POOLCHR_NUM_LEVEL, sNumCharFmt ); - SwStyleNameMapper::FillUIName( RES_POOLCHR_BUL_LEVEL, sBulletCharFmt ); + OUString sNumCharFormat, sBulletCharFormat; + SwStyleNameMapper::FillUIName( RES_POOLCHR_NUM_LEVEL, sNumCharFormat ); + SwStyleNameMapper::FillUIName( RES_POOLCHR_BUL_LEVEL, sBulletCharFormat ); if (nPageId == m_nSingleNumPageId) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFmt)); - aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt)); + aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFormat)); + aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFormat)); rPage.PageCreated(aSet); } else if (nPageId == m_nBulletPageId) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt)); + aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFormat)); rPage.PageCreated(aSet); } else if (nPageId == m_nOptionsPageId) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFmt)); - aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt)); + aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFormat)); + aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFormat)); // collect char styles - ScopedVclPtrInstance< ListBox > rCharFmtLB(this); - rCharFmtLB->Clear(); - rCharFmtLB->InsertEntry( SwViewShell::GetShellRes()->aStrNone ); + ScopedVclPtrInstance< ListBox > rCharFormatLB(this); + rCharFormatLB->Clear(); + rCharFormatLB->InsertEntry( SwViewShell::GetShellRes()->aStrNone ); SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell(); - ::FillCharStyleListBox(*rCharFmtLB.get(), pDocShell); + ::FillCharStyleListBox(*rCharFormatLB.get(), pDocShell); std::vector<OUString> aList; - for(sal_Int32 j = 0; j < rCharFmtLB->GetEntryCount(); j++) - aList.push_back( rCharFmtLB->GetEntry(j) ); + for(sal_Int32 j = 0; j < rCharFormatLB->GetEntryCount(); j++) + aList.push_back( rCharFormatLB->GetEntry(j) ); aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ; diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 3b58a69de47d..59749f98a7c2 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -190,16 +190,16 @@ SwOutlineTabDialog::SwOutlineTabDialog(vcl::Window* pParent, const SfxItemSet* p } // query the text templates' outlining levels - const sal_uInt16 nCount = rWrtSh.GetTxtFmtCollCount(); + const sal_uInt16 nCount = rWrtSh.GetTextFormatCollCount(); for(i = 0; i < nCount; ++i ) { - SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i); - if(!rTxtColl.IsDefault()) + SwTextFormatColl &rTextColl = rWrtSh.GetTextFormatColl(i); + if(!rTextColl.IsDefault()) { - if(rTxtColl.IsAssignedToListLevelOfOutlineStyle()) + if(rTextColl.IsAssignedToListLevelOfOutlineStyle()) { - int nOutLevel = rTxtColl.GetAssignedOutlineStyleLevel(); - aCollNames[ nOutLevel ] = rTxtColl.GetName(); + int nOutLevel = rTextColl.GetAssignedOutlineStyleLevel(); + aCollNames[ nOutLevel ] = rTextColl.GetName(); } } } @@ -325,11 +325,11 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu ) return 0; } -sal_uInt16 SwOutlineTabDialog::GetLevel(const OUString &rFmtName) const +sal_uInt16 SwOutlineTabDialog::GetLevel(const OUString &rFormatName) const { for(sal_uInt16 i = 0; i < MAXLEVEL; ++i) { - if(aCollNames[i] == rFmtName) + if(aCollNames[i] == rFormatName) return i; } return MAXLEVEL; @@ -348,36 +348,36 @@ short SwOutlineTabDialog::Ok() const SwNumRule * pOutlineRule = rWrtSh.GetOutlineNumRule(); - sal_uInt16 i, nCount = rWrtSh.GetTxtFmtCollCount(); + sal_uInt16 i, nCount = rWrtSh.GetTextFormatCollCount(); for( i = 0; i < nCount; ++i ) { - SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i); - if( !rTxtColl.IsDefault() ) + SwTextFormatColl &rTextColl = rWrtSh.GetTextFormatColl(i); + if( !rTextColl.IsDefault() ) { const SfxPoolItem & rItem = - rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, false); + rTextColl.GetFormatAttr(RES_PARATR_NUMRULE, false); - if ((sal_uInt8)GetLevel(rTxtColl.GetName()) == MAXLEVEL) + if ((sal_uInt8)GetLevel(rTextColl.GetName()) == MAXLEVEL) { - if(rTxtColl.IsAssignedToListLevelOfOutlineStyle()) + if(rTextColl.IsAssignedToListLevelOfOutlineStyle()) { - rTxtColl.DeleteAssignmentToListLevelOfOutlineStyle(); + rTextColl.DeleteAssignmentToListLevelOfOutlineStyle(); } if (static_cast<const SwNumRuleItem &>(rItem).GetValue() == pOutlineRule->GetName()) { - rTxtColl.ResetFmtAttr(RES_PARATR_NUMRULE); + rTextColl.ResetFormatAttr(RES_PARATR_NUMRULE); } } else { - rTxtColl.AssignToListLevelOfOutlineStyle(GetLevel(rTxtColl.GetName())); + rTextColl.AssignToListLevelOfOutlineStyle(GetLevel(rTextColl.GetName())); if (static_cast<const SwNumRuleItem &>(rItem).GetValue() != pOutlineRule->GetName()) { SwNumRuleItem aItem(pOutlineRule->GetName()); - rTxtColl.SetFmtAttr(aItem); + rTextColl.SetFormatAttr(aItem); } } } @@ -388,25 +388,25 @@ short SwOutlineTabDialog::Ok() OUString sHeadline; ::SwStyleNameMapper::FillUIName( static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i), sHeadline ); - SwTxtFmtColl* pColl = rWrtSh.FindTxtFmtCollByName( sHeadline ); + SwTextFormatColl* pColl = rWrtSh.FindTextFormatCollByName( sHeadline ); if( !pColl ) { if(aCollNames[i] != sHeadline) { - SwTxtFmtColl* pTxtColl = rWrtSh.GetTxtCollFromPool( + SwTextFormatColl* pTextColl = rWrtSh.GetTextCollFromPool( static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i) ); - pTxtColl->DeleteAssignmentToListLevelOfOutlineStyle(); - pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE); + pTextColl->DeleteAssignmentToListLevelOfOutlineStyle(); + pTextColl->ResetFormatAttr(RES_PARATR_NUMRULE); if( !aCollNames[i].isEmpty() ) { - pTxtColl = rWrtSh.GetParaStyle( + pTextColl = rWrtSh.GetParaStyle( aCollNames[i], SwWrtShell::GETSTYLE_CREATESOME); - if(pTxtColl) + if(pTextColl) { - pTxtColl->AssignToListLevelOfOutlineStyle(i); + pTextColl->AssignToListLevelOfOutlineStyle(i); SwNumRuleItem aItem(pOutlineRule->GetName()); - pTxtColl->SetFmtAttr(aItem); + pTextColl->SetFormatAttr(aItem); } } } @@ -425,7 +425,7 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(vcl::Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "OutlineNumberingPage", "modules/swriter/ui/outlinenumberingpage.ui", &rSet) - , aNoFmtName(SW_RESSTR(SW_STR_NONE)) + , aNoFormatName(SW_RESSTR(SW_STR_NONE)) , pSh(NULL) , pNumRule(NULL) , pCollNames(NULL) @@ -435,7 +435,7 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(vcl::Window* pParent, get(m_pCollBox, "style"); m_pCollBox->SetStyle(m_pCollBox->GetStyle()|WB_SORT); get(m_pNumberBox, "numbering"); - get(m_pCharFmtLB, "charstyle"); + get(m_pCharFormatLB, "charstyle"); get(m_pAllLevelFT, "sublevelsft"); get(m_pAllLevelNF, "sublevelsnf"); get(m_pPrefixED, "prefix"); @@ -445,7 +445,7 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(vcl::Window* pParent, SetExchangeSupport(); - m_pCollBox->InsertEntry(aNoFmtName); + m_pCollBox->InsertEntry(aNoFormatName); m_pLevelLB->SetSelectHdl(LINK(this, SwOutlineSettingsTabPage, LevelHdl)); m_pAllLevelNF->SetModifyHdl(LINK(this, SwOutlineSettingsTabPage, ToggleComplete)); m_pCollBox->SetSelectHdl(LINK(this, SwOutlineSettingsTabPage, CollSelect)); @@ -454,7 +454,7 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(vcl::Window* pParent, m_pPrefixED->SetModifyHdl(LINK(this, SwOutlineSettingsTabPage, DelimModify)); m_pSuffixED->SetModifyHdl(LINK(this, SwOutlineSettingsTabPage, DelimModify)); m_pStartEdit->SetModifyHdl(LINK(this, SwOutlineSettingsTabPage, StartModified)); - m_pCharFmtLB->SetSelectHdl(LINK(this, SwOutlineSettingsTabPage, CharFmtHdl)); + m_pCharFormatLB->SetSelectHdl(LINK(this, SwOutlineSettingsTabPage, CharFormatHdl)); } void SwOutlineSettingsTabPage::Update() @@ -468,63 +468,63 @@ void SwOutlineSettingsTabPage::Update() bool bSameType = true; bool bSameComplete = true; bool bSameStart = true; - bool bSameCharFmt = true; + bool bSameCharFormat = true; - const SwNumFmt* aNumFmtArr[MAXLEVEL]; - const SwCharFmt* pFirstFmt = 0; + const SwNumFormat* aNumFormatArr[MAXLEVEL]; + const SwCharFormat* pFirstFormat = 0; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { - aNumFmtArr[ i ] = &pNumRule->Get(i); + aNumFormatArr[ i ] = &pNumRule->Get(i); if(i == 0) - pFirstFmt = aNumFmtArr[i]->GetCharFmt(); + pFirstFormat = aNumFormatArr[i]->GetCharFormat(); else { - bSameType &= aNumFmtArr[i]->GetNumberingType() == aNumFmtArr[0]->GetNumberingType(); - bSameStart &= aNumFmtArr[i]->GetStart() == aNumFmtArr[0]->GetStart(); - bSamePrefix &= aNumFmtArr[i]->GetPrefix() == aNumFmtArr[0]->GetPrefix(); - bSameSuffix &= aNumFmtArr[i]->GetSuffix() == aNumFmtArr[0]->GetSuffix(); - bSameComplete &= aNumFmtArr[i]->GetIncludeUpperLevels() == aNumFmtArr[0]->GetIncludeUpperLevels(); - const SwCharFmt* pFmt = aNumFmtArr[i]->GetCharFmt(); - bSameCharFmt &= (!pFirstFmt && !pFmt) - || (pFirstFmt && pFmt && pFmt->GetName() == pFirstFmt->GetName()); + bSameType &= aNumFormatArr[i]->GetNumberingType() == aNumFormatArr[0]->GetNumberingType(); + bSameStart &= aNumFormatArr[i]->GetStart() == aNumFormatArr[0]->GetStart(); + bSamePrefix &= aNumFormatArr[i]->GetPrefix() == aNumFormatArr[0]->GetPrefix(); + bSameSuffix &= aNumFormatArr[i]->GetSuffix() == aNumFormatArr[0]->GetSuffix(); + bSameComplete &= aNumFormatArr[i]->GetIncludeUpperLevels() == aNumFormatArr[0]->GetIncludeUpperLevels(); + const SwCharFormat* pFormat = aNumFormatArr[i]->GetCharFormat(); + bSameCharFormat &= (!pFirstFormat && !pFormat) + || (pFirstFormat && pFormat && pFormat->GetName() == pFirstFormat->GetName()); } } - CheckForStartValue_Impl(aNumFmtArr[0]->GetNumberingType()); + CheckForStartValue_Impl(aNumFormatArr[0]->GetNumberingType()); if(bSameType) - m_pNumberBox->SelectNumberingType( aNumFmtArr[0]->GetNumberingType() ); + m_pNumberBox->SelectNumberingType( aNumFormatArr[0]->GetNumberingType() ); else m_pNumberBox->SetNoSelection(); if(bSameStart) - m_pStartEdit->SetValue(aNumFmtArr[0]->GetStart()); + m_pStartEdit->SetValue(aNumFormatArr[0]->GetStart()); else m_pStartEdit->SetText(OUString()); if(bSamePrefix) - m_pPrefixED->SetText(aNumFmtArr[0]->GetPrefix()); + m_pPrefixED->SetText(aNumFormatArr[0]->GetPrefix()); else m_pPrefixED->SetText(OUString()); if(bSameSuffix) - m_pSuffixED->SetText(aNumFmtArr[0]->GetSuffix()); + m_pSuffixED->SetText(aNumFormatArr[0]->GetSuffix()); else m_pSuffixED->SetText(OUString()); - if(bSameCharFmt) + if(bSameCharFormat) { - if(pFirstFmt) - m_pCharFmtLB->SelectEntry(pFirstFmt->GetName()); + if(pFirstFormat) + m_pCharFormatLB->SelectEntry(pFirstFormat->GetName()); else - m_pCharFmtLB->SelectEntry( SwViewShell::GetShellRes()->aStrNone ); + m_pCharFormatLB->SelectEntry( SwViewShell::GetShellRes()->aStrNone ); } else - m_pCharFmtLB->SetNoSelection(); + m_pCharFormatLB->SetNoSelection(); m_pAllLevelFT->Enable(true); m_pAllLevelNF->Enable(true); m_pAllLevelNF->SetMax(MAXLEVEL); if(bSameComplete) { - m_pAllLevelNF->SetValue(aNumFmtArr[0]->GetIncludeUpperLevels()); + m_pAllLevelNF->SetValue(aNumFormatArr[0]->GetIncludeUpperLevels()); } else { @@ -538,24 +538,24 @@ void SwOutlineSettingsTabPage::Update() if(!aColl.isEmpty()) m_pCollBox->SelectEntry(aColl); else - m_pCollBox->SelectEntry(aNoFmtName); - const SwNumFmt &rFmt = pNumRule->Get(nTmpLevel); - - m_pNumberBox->SelectNumberingType( rFmt.GetNumberingType() ); - m_pPrefixED->SetText(rFmt.GetPrefix()); - m_pSuffixED->SetText(rFmt.GetSuffix()); - const SwCharFmt* pFmt = rFmt.GetCharFmt(); - if(pFmt) - m_pCharFmtLB->SelectEntry(pFmt->GetName()); + m_pCollBox->SelectEntry(aNoFormatName); + const SwNumFormat &rFormat = pNumRule->Get(nTmpLevel); + + m_pNumberBox->SelectNumberingType( rFormat.GetNumberingType() ); + m_pPrefixED->SetText(rFormat.GetPrefix()); + m_pSuffixED->SetText(rFormat.GetSuffix()); + const SwCharFormat* pFormat = rFormat.GetCharFormat(); + if(pFormat) + m_pCharFormatLB->SelectEntry(pFormat->GetName()); else - m_pCharFmtLB->SelectEntry( SwViewShell::GetShellRes()->aStrNone ); + m_pCharFormatLB->SelectEntry( SwViewShell::GetShellRes()->aStrNone ); if(nTmpLevel) { m_pAllLevelFT->Enable(true); m_pAllLevelNF->Enable(true); m_pAllLevelNF->SetMax(nTmpLevel + 1); - m_pAllLevelNF->SetValue(rFmt.GetIncludeUpperLevels()); + m_pAllLevelNF->SetValue(rFormat.GetIncludeUpperLevels()); } else { @@ -563,8 +563,8 @@ void SwOutlineSettingsTabPage::Update() m_pAllLevelNF->Enable(false); m_pAllLevelFT->Enable(false); } - CheckForStartValue_Impl(rFmt.GetNumberingType()); - m_pStartEdit->SetValue( rFmt.GetStart() ); + CheckForStartValue_Impl(rFormat.GetNumberingType()); + m_pStartEdit->SetValue( rFormat.GetStart() ); } SetModified(); } @@ -590,17 +590,17 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox ) return 0; } -IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld ) +IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pField ) { sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) { - SwNumFmt aNumFmt(pNumRule->Get(i)); - aNumFmt.SetIncludeUpperLevels( std::min( (sal_uInt8)pFld->GetValue(), + SwNumFormat aNumFormat(pNumRule->Get(i)); + aNumFormat.SetIncludeUpperLevels( std::min( (sal_uInt8)pField->GetValue(), (sal_uInt8)(i + 1)) ); - pNumRule->Set(i, aNumFmt); + pNumRule->Set(i, aNumFormat); } nMask <<= 1; } @@ -620,7 +620,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox ) for( i = 0; i < MAXLEVEL; ++i) pCollNames[i] = aSaveCollNames[i]; - if(aCollName == aNoFmtName) + if(aCollName == aNoFormatName) pCollNames[nTmpLevel].clear(); else { @@ -666,9 +666,9 @@ IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBo { if(nActLevel & nMask) { - SwNumFmt aNumFmt(pNumRule->Get(i)); - aNumFmt.SetNumberingType(nNumberType); - pNumRule->Set(i, aNumFmt); + SwNumFormat aNumFormat(pNumRule->Get(i)); + aNumFormat.SetNumberingType(nNumberType); + pNumRule->Set(i, aNumFormat); CheckForStartValue_Impl(nNumberType); } nMask <<= 1; @@ -684,10 +684,10 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, DelimModify) { if(nActLevel & nMask) { - SwNumFmt aNumFmt(pNumRule->Get(i)); - aNumFmt.SetPrefix( m_pPrefixED->GetText() ); - aNumFmt.SetSuffix( m_pSuffixED->GetText() ); - pNumRule->Set(i, aNumFmt); + SwNumFormat aNumFormat(pNumRule->Get(i)); + aNumFormat.SetPrefix( m_pPrefixED->GetText() ); + aNumFormat.SetSuffix( m_pSuffixED->GetText() ); + pNumRule->Set(i, aNumFormat); } nMask <<= 1; } @@ -695,16 +695,16 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, DelimModify) return 0; } -IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld ) +IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pField ) { sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActLevel & nMask) { - SwNumFmt aNumFmt(pNumRule->Get(i)); - aNumFmt.SetStart( (sal_uInt16)pFld->GetValue() ); - pNumRule->Set(i, aNumFmt); + SwNumFormat aNumFormat(pNumRule->Get(i)); + aNumFormat.SetStart( (sal_uInt16)pField->GetValue() ); + pNumRule->Set(i, aNumFormat); } nMask <<= 1; } @@ -712,32 +712,32 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld ) return 0; } -IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFmtHdl) +IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFormatHdl) { - OUString sEntry = m_pCharFmtLB->GetSelectEntry(); + OUString sEntry = m_pCharFormatLB->GetSelectEntry(); sal_uInt16 nMask = 1; bool bFormatNone = sEntry == SwViewShell::GetShellRes()->aStrNone; - SwCharFmt* pFmt = 0; + SwCharFormat* pFormat = 0; if(!bFormatNone) { - sal_uInt16 nChCount = pSh->GetCharFmtCount(); + sal_uInt16 nChCount = pSh->GetCharFormatCount(); for(sal_uInt16 i = 0; i < nChCount; i++) { - SwCharFmt& rChFmt = pSh->GetCharFmt(i); - if(rChFmt.GetName() == sEntry) + SwCharFormat& rChFormat = pSh->GetCharFormat(i); + if(rChFormat.GetName() == sEntry) { - pFmt = &rChFmt; + pFormat = &rChFormat; break; } } - if(!pFmt) + if(!pFormat) { SfxStyleSheetBasePool* pPool = pSh->GetView().GetDocShell()->GetStyleSheetPool(); SfxStyleSheetBase* pBase; pBase = pPool->Find(sEntry, SFX_STYLE_FAMILY_CHAR); if(!pBase) pBase = &pPool->Make(sEntry, SFX_STYLE_FAMILY_PAGE); - pFmt = static_cast<SwDocStyleSheet*>(pBase)->GetCharFmt(); + pFormat = static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat(); } } @@ -746,12 +746,12 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFmtHdl) { if(nActLevel & nMask) { - SwNumFmt aNumFmt(pNumRule->Get(i)); + SwNumFormat aNumFormat(pNumRule->Get(i)); if(bFormatNone) - aNumFmt.SetCharFmt(0); + aNumFormat.SetCharFormat(0); else - aNumFmt.SetCharFmt(pFmt); - pNumRule->Set(i, aNumFmt); + aNumFormat.SetCharFormat(pFormat); + pNumRule->Set(i, aNumFormat); } nMask <<= 1; } @@ -768,7 +768,7 @@ void SwOutlineSettingsTabPage::dispose() m_pLevelLB.clear(); m_pCollBox.clear(); m_pNumberBox.clear(); - m_pCharFmtLB.clear(); + m_pCharFormatLB.clear(); m_pAllLevelFT.clear(); m_pAllLevelNF.clear(); m_pPrefixED.clear(); @@ -790,8 +790,8 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) m_pPreviewWIN->SetOutlineNames(pCollNames); // set start value - nActLevel must be 1 here sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel); - const SwNumFmt& rNumFmt = pNumRule->Get( nTmpLevel ); - m_pStartEdit->SetValue( rNumFmt.GetStart() ); + const SwNumFormat& rNumFormat = pNumRule->Get( nTmpLevel ); + m_pStartEdit->SetValue( rNumFormat.GetStart() ); // create pool formats for headlines sal_uInt16 i; @@ -806,19 +806,19 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) m_pLevelLB->InsertEntry( sStr ); // query the texttemplates' outlining levels - const sal_uInt16 nCount = pSh->GetTxtFmtCollCount(); + const sal_uInt16 nCount = pSh->GetTextFormatCollCount(); for( i = 0; i < nCount; ++i ) { - SwTxtFmtColl &rTxtColl = pSh->GetTxtFmtColl(i); - if(!rTxtColl.IsDefault()) + SwTextFormatColl &rTextColl = pSh->GetTextFormatColl(i); + if(!rTextColl.IsDefault()) { - sStr = rTxtColl.GetName(); + sStr = rTextColl.GetName(); if(LISTBOX_ENTRY_NOTFOUND == m_pCollBox->GetEntryPos( sStr )) m_pCollBox->InsertEntry( sStr ); } } - m_pNumberBox->SelectNumberingType(rNumFmt.GetNumberingType()); + m_pNumberBox->SelectNumberingType(rNumFormat.GetNumberingType()); sal_uInt16 nOutlinePos = pSh->GetOutlinePos(MAXLEVEL); sal_uInt16 nTmp = 0; if(nOutlinePos != USHRT_MAX) @@ -828,11 +828,11 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) m_pLevelLB->SelectEntryPos(nTmp-1); // collect char styles - m_pCharFmtLB->Clear(); - m_pCharFmtLB->InsertEntry( SwViewShell::GetShellRes()->aStrNone ); + m_pCharFormatLB->Clear(); + m_pCharFormatLB->InsertEntry( SwViewShell::GetShellRes()->aStrNone ); // char styles - ::FillCharStyleListBox(*m_pCharFmtLB, + ::FillCharStyleListBox(*m_pCharFormatLB, pSh->GetView().GetDocShell()); Update(); } @@ -880,15 +880,15 @@ void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType m_pStartEdit->GetModifyHdl().Call(m_pStartEdit); } -static long lcl_DrawBullet(vcl::RenderContext* pVDev, const SwNumFmt& rFmt, long nXStart, long nYStart, const Size& rSize) +static long lcl_DrawBullet(vcl::RenderContext* pVDev, const SwNumFormat& rFormat, long nXStart, long nYStart, const Size& rSize) { vcl::Font aTmpFont(pVDev->GetFont()); - vcl::Font aFont(*rFmt.GetBulletFont()); + vcl::Font aFont(*rFormat.GetBulletFont()); aFont.SetSize(rSize); aFont.SetTransparent(true); pVDev->SetFont(aFont); - OUString aText(rFmt.GetBulletChar()); + OUString aText(rFormat.GetBulletChar()); pVDev->DrawText(Point(nXStart, nYStart), aText); const long nRet = pVDev->GetTextWidth(aText); @@ -896,16 +896,16 @@ static long lcl_DrawBullet(vcl::RenderContext* pVDev, const SwNumFmt& rFmt, long return nRet; } -static long lcl_DrawGraphic(vcl::RenderContext* pVDev, const SwNumFmt &rFmt, long nXStart, long nYStart, long nDivision) +static long lcl_DrawGraphic(vcl::RenderContext* pVDev, const SwNumFormat &rFormat, long nXStart, long nYStart, long nDivision) { - const SvxBrushItem* pBrushItem = rFmt.GetBrush(); + const SvxBrushItem* pBrushItem = rFormat.GetBrush(); long nRet = 0; if (pBrushItem) { const Graphic* pGraphic = pBrushItem->GetGraphic(); if (pGraphic) { - Size aGSize( rFmt.GetGraphicSize()); + Size aGSize( rFormat.GetGraphicSize()); aGSize.Width() /= nDivision; nRet = aGSize.Width(); aGSize.Height() /= nDivision; @@ -972,39 +972,39 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle sal_uInt8 nEnd = std::min(sal_uInt8(nStart + 3), MAXLEVEL); for (sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel) { - const SwNumFmt &rFmt = pActNum->Get(nLevel); - aNumVector.push_back(rFmt.GetStart()); + const SwNumFormat &rFormat = pActNum->Get(nLevel); + aNumVector.push_back(rFormat.GetStart()); long nXStart( 0 ); long nTextOffset( 0 ); long nNumberXPos( 0 ); - if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION) + if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION) { - nXStart = rFmt.GetAbsLSpace() / nWidthRelation; - nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation; + nXStart = rFormat.GetAbsLSpace() / nWidthRelation; + nTextOffset = rFormat.GetCharTextDistance() / nWidthRelation; nNumberXPos = nXStart; - const long nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation; + const long nFirstLineOffset = (-rFormat.GetFirstLineOffset()) / nWidthRelation; if(nFirstLineOffset <= nNumberXPos) nNumberXPos -= nFirstLineOffset; else nNumberXPos = 0; } - else if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT) + else if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT) { - const long nTmpNumberXPos((rFmt.GetIndentAt() + rFmt.GetFirstLineIndent()) / nWidthRelation); + const long nTmpNumberXPos((rFormat.GetIndentAt() + rFormat.GetFirstLineIndent()) / nWidthRelation); nNumberXPos = (nTmpNumberXPos < 0) ? 0 : nTmpNumberXPos; } long nBulletWidth = 0; - if (SVX_NUM_BITMAP == rFmt.GetNumberingType()) + if (SVX_NUM_BITMAP == rFormat.GetNumberingType()) { - nBulletWidth = lcl_DrawGraphic(pVDev.get(), rFmt, nNumberXPos, + nBulletWidth = lcl_DrawGraphic(pVDev.get(), rFormat, nNumberXPos, nYStart, nWidthRelation); } - else if (SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType()) + else if (SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType()) { - nBulletWidth = lcl_DrawBullet(pVDev.get(), rFmt, nNumberXPos, + nBulletWidth = lcl_DrawBullet(pVDev.get(), rFormat, nNumberXPos, nYStart, aStdFont.GetSize()); } else @@ -1018,8 +1018,8 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle nBulletWidth = pVDev->GetTextWidth(aText); nPreNum++; } - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT && - rFmt.GetLabelFollowedBy() == SvxNumberFormat::SPACE ) + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT && + rFormat.GetLabelFollowedBy() == SvxNumberFormat::SPACE ) { pVDev->SetFont(aStdFont); OUString aText(' '); @@ -1028,7 +1028,7 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle } long nTextXPos(0); - if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION) + if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION) { nTextXPos = nXStart; if (nTextOffset < 0) @@ -1036,13 +1036,13 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle if (nNumberXPos + nBulletWidth + nTextOffset > nTextXPos) nTextXPos = nNumberXPos + nBulletWidth + nTextOffset; } - else if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT) + else if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT) { - switch (rFmt.GetLabelFollowedBy()) + switch (rFormat.GetLabelFollowedBy()) { case SvxNumberFormat::LISTTAB: { - nTextXPos = rFmt.GetListtabPos() / nWidthRelation; + nTextXPos = rFormat.GetListtabPos() / nWidthRelation; if (nTextXPos < nNumberXPos + nBulletWidth) { nTextXPos = nNumberXPos + nBulletWidth; @@ -1057,7 +1057,7 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle break; } - nXStart = rFmt.GetIndentAt() / nWidthRelation; + nXStart = rFormat.GetIndentAt() / nWidthRelation; } Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2)); @@ -1075,29 +1075,29 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle const long nLineHeight = nFontHeight * 3 / 2; for (sal_uInt8 nLevel = 0; nLevel < MAXLEVEL; ++nLevel, nYStart = nYStart + nYStep) { - const SwNumFmt &rFmt = pActNum->Get(nLevel); - aNumVector.push_back(rFmt.GetStart()); + const SwNumFormat &rFormat = pActNum->Get(nLevel); + aNumVector.push_back(rFormat.GetStart()); long nXStart(0); - if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION) + if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION) { - nXStart = rFmt.GetAbsLSpace() / nWidthRelation; + nXStart = rFormat.GetAbsLSpace() / nWidthRelation; } - else if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT) + else if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT) { - const long nTmpXStart((rFmt.GetIndentAt() + rFmt.GetFirstLineIndent() ) / nWidthRelation); + const long nTmpXStart((rFormat.GetIndentAt() + rFormat.GetFirstLineIndent() ) / nWidthRelation); nXStart = (nTmpXStart < 0) ? 0 : nTmpXStart; } nXStart /= 2; nXStart += 2; long nTextOffset; - if (SVX_NUM_BITMAP == rFmt.GetNumberingType()) + if (SVX_NUM_BITMAP == rFormat.GetNumberingType()) { - lcl_DrawGraphic(pVDev.get(), rFmt, nXStart, nYStart, nWidthRelation); + lcl_DrawGraphic(pVDev.get(), rFormat, nXStart, nYStart, nWidthRelation); nTextOffset = nLineHeight + nXStep; } - else if (SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType()) + else if (SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType()) { - nTextOffset = lcl_DrawBullet(pVDev.get(), rFmt, nXStart, nYStart, aStdFont.GetSize()); + nTextOffset = lcl_DrawBullet(pVDev.get(), rFormat, nXStart, nYStart, aStdFont.GetSize()); nTextOffset += nXStep; } else diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 6a2b42a12f58..49ac9ab8964a 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -159,22 +159,22 @@ VclPtr<SfxTabPage> SwFootNotePage::Create(vcl::Window *pParent, const SfxItemSet void SwFootNotePage::Reset(const SfxItemSet *rSet) { // if no example exists, otherwise Init here in Activate - boost::scoped_ptr<SwPageFtnInfo> pDefFtnInfo; - const SwPageFtnInfo* pFtnInfo; + boost::scoped_ptr<SwPageFootnoteInfo> pDefFootnoteInfo; + const SwPageFootnoteInfo* pFootnoteInfo; const SfxPoolItem* pItem = SfxTabPage::GetItem(*rSet, FN_PARAM_FTN_INFO); if( pItem ) { - pFtnInfo = &static_cast<const SwPageFtnInfoItem*>(pItem)->GetPageFtnInfo(); + pFootnoteInfo = &static_cast<const SwPageFootnoteInfoItem*>(pItem)->GetPageFootnoteInfo(); } else { // when "standard" is being activated the footnote item is deleted, // that's why a footnote structure has to be created here - pDefFtnInfo.reset(new SwPageFtnInfo()); - pFtnInfo = pDefFtnInfo.get(); + pDefFootnoteInfo.reset(new SwPageFootnoteInfo()); + pFootnoteInfo = pDefFootnoteInfo.get(); } // footnote area's height - SwTwips lHeight = pFtnInfo->GetHeight(); + SwTwips lHeight = pFootnoteInfo->GetHeight(); if(lHeight) { m_pMaxHeightEdit->SetValue(m_pMaxHeightEdit->Normalize(lHeight),FUNIT_TWIP); @@ -196,7 +196,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet) m_pLineWidthEdit->SetModifyHdl( LINK( this, SwFootNotePage, LineWidthChanged_Impl ) ); sal_Int64 nWidthPt = static_cast<sal_Int64>(MetricField::ConvertDoubleValue( - sal_Int64( pFtnInfo->GetLineWidth() ), m_pLineWidthEdit->GetDecimalDigits(), + sal_Int64( pFootnoteInfo->GetLineWidth() ), m_pLineWidthEdit->GetDecimalDigits(), MAP_TWIP, m_pLineWidthEdit->GetUnit( ) )); m_pLineWidthEdit->SetValue( nWidthPt ); @@ -213,8 +213,8 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet) m_pLineTypeBox->InsertEntry( ::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DASHED), table::BorderLineStyle::DASHED ); - m_pLineTypeBox->SetWidth( pFtnInfo->GetLineWidth( ) ); - m_pLineTypeBox->SelectEntry( pFtnInfo->GetLineStyle() ); + m_pLineTypeBox->SetWidth( pFootnoteInfo->GetLineWidth( ) ); + m_pLineTypeBox->SelectEntry( pFootnoteInfo->GetLineStyle() ); // Separator Color SfxObjectShell* pDocSh = SfxObjectShell::Current(); @@ -244,69 +244,69 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet) } // select color in the list or add it as a user color - sal_Int32 nSelPos = m_pLineColorBox->GetEntryPos( pFtnInfo->GetLineColor() ); + sal_Int32 nSelPos = m_pLineColorBox->GetEntryPos( pFootnoteInfo->GetLineColor() ); if( nSelPos == LISTBOX_ENTRY_NOTFOUND ) - nSelPos = m_pLineColorBox->InsertEntry( pFtnInfo->GetLineColor(), + nSelPos = m_pLineColorBox->InsertEntry( pFootnoteInfo->GetLineColor(), SVX_RESSTR(RID_SVXSTR_COLOR_USER) ); m_pLineColorBox->SetSelectHdl( LINK( this, SwFootNotePage, LineColorSelected_Impl ) ); m_pLineColorBox->SelectEntryPos( nSelPos ); - m_pLineTypeBox->SetColor( pFtnInfo->GetLineColor() ); + m_pLineTypeBox->SetColor( pFootnoteInfo->GetLineColor() ); // position - m_pLinePosBox->SelectEntryPos( static_cast< sal_Int32 >(pFtnInfo->GetAdj()) ); + m_pLinePosBox->SelectEntryPos( static_cast< sal_Int32 >(pFootnoteInfo->GetAdj()) ); // width Fraction aTmp( 100, 1 ); - aTmp *= pFtnInfo->GetWidth(); + aTmp *= pFootnoteInfo->GetWidth(); m_pLineLengthEdit->SetValue( static_cast<long>(aTmp) ); // gap footnote area - m_pDistEdit->SetValue(m_pDistEdit->Normalize(pFtnInfo->GetTopDist()),FUNIT_TWIP); + m_pDistEdit->SetValue(m_pDistEdit->Normalize(pFootnoteInfo->GetTopDist()),FUNIT_TWIP); m_pLineDistEdit->SetValue( - m_pLineDistEdit->Normalize(pFtnInfo->GetBottomDist()), FUNIT_TWIP); + m_pLineDistEdit->Normalize(pFootnoteInfo->GetBottomDist()), FUNIT_TWIP); ActivatePage( *rSet ); } // stuff attributes into the set, when OK bool SwFootNotePage::FillItemSet(SfxItemSet *rSet) { - SwPageFtnInfoItem aItem(static_cast<const SwPageFtnInfoItem&>(GetItemSet().Get(FN_PARAM_FTN_INFO))); + SwPageFootnoteInfoItem aItem(static_cast<const SwPageFootnoteInfoItem&>(GetItemSet().Get(FN_PARAM_FTN_INFO))); // that's the original - SwPageFtnInfo &rFtnInfo = aItem.GetPageFtnInfo(); + SwPageFootnoteInfo &rFootnoteInfo = aItem.GetPageFootnoteInfo(); // footnote area's height if(m_pMaxHeightBtn->IsChecked()) - rFtnInfo.SetHeight( static_cast< SwTwips >( + rFootnoteInfo.SetHeight( static_cast< SwTwips >( m_pMaxHeightEdit->Denormalize(m_pMaxHeightEdit->GetValue(FUNIT_TWIP)))); else - rFtnInfo.SetHeight(0); + rFootnoteInfo.SetHeight(0); // gap footnote area - rFtnInfo.SetTopDist( static_cast< SwTwips >( + rFootnoteInfo.SetTopDist( static_cast< SwTwips >( m_pDistEdit->Denormalize(m_pDistEdit->GetValue(FUNIT_TWIP)))); - rFtnInfo.SetBottomDist( static_cast< SwTwips >( + rFootnoteInfo.SetBottomDist( static_cast< SwTwips >( m_pLineDistEdit->Denormalize(m_pLineDistEdit->GetValue(FUNIT_TWIP)))); // Separator style - rFtnInfo.SetLineStyle( ::editeng::SvxBorderStyle( m_pLineTypeBox->GetSelectEntryStyle() ) ); + rFootnoteInfo.SetLineStyle( ::editeng::SvxBorderStyle( m_pLineTypeBox->GetSelectEntryStyle() ) ); // Separator width long nWidth = static_cast<long>(MetricField::ConvertDoubleValue( m_pLineWidthEdit->GetValue( ), m_pLineWidthEdit->GetDecimalDigits( ), m_pLineWidthEdit->GetUnit(), MAP_TWIP )); - rFtnInfo.SetLineWidth( nWidth ); + rFootnoteInfo.SetLineWidth( nWidth ); // Separator color - rFtnInfo.SetLineColor( m_pLineColorBox->GetSelectEntryColor() ); + rFootnoteInfo.SetLineColor( m_pLineColorBox->GetSelectEntryColor() ); // Position - rFtnInfo.SetAdj((SwFtnAdj)m_pLinePosBox->GetSelectEntryPos()); + rFootnoteInfo.SetAdj((SwFootnoteAdj)m_pLinePosBox->GetSelectEntryPos()); // Breite - rFtnInfo.SetWidth(Fraction( static_cast< long >(m_pLineLengthEdit->GetValue()), 100)); + rFootnoteInfo.SetWidth(Fraction( static_cast< long >(m_pLineLengthEdit->GetValue()), 100)); const SfxPoolItem* pOldItem; if(0 == (pOldItem = GetOldItem( *rSet, FN_PARAM_FTN_INFO )) || diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 298dd171c313..37b42cd0a06f 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -81,10 +81,10 @@ static void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox ) } // determine lines and columns for table selection -static bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY ) +static bool lcl_GetSelTable( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY ) { - const SwTableNode* pTblNd = rSh.IsCrsrInTbl(); - if( !pTblNd ) + const SwTableNode* pTableNd = rSh.IsCrsrInTable(); + if( !pTableNd ) return false; _FndBox aFndBox( 0, 0 ); @@ -92,10 +92,10 @@ static bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY ) // look for all boxes / lines { SwSelBoxes aSelBoxes; - ::GetTblSel( rSh, aSelBoxes ); + ::GetTableSel( rSh, aSelBoxes ); _FndPara aPara( aSelBoxes, &aFndBox ); - const SwTable& rTbl = pTblNd->GetTable(); - ForEach_FndLineCopyCol( (SwTableLines&)rTbl.GetTabLines(), &aPara ); + const SwTable& rTable = pTableNd->GetTable(); + ForEach_FndLineCopyCol( (SwTableLines&)rTable.GetTabLines(), &aPara ); } rX = aFndBox.GetLines().size(); if( !rX ) @@ -108,9 +108,9 @@ static bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY ) // init list SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell) : SvxStandardDialog(pParent, "SortDialog", "modules/swriter/ui/sortdialog.ui") - , aColTxt(SW_RES(STR_COL)) - , aRowTxt(SW_RES(STR_ROW)) - , aNumericTxt(SW_RES(STR_NUMERIC)) + , aColText(SW_RES(STR_COL)) + , aRowText(SW_RES(STR_ROW)) + , aNumericText(SW_RES(STR_NUMERIC)) , rSh(rShell) , pColRes(0) , nX(99) @@ -166,7 +166,7 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell) (nsSelectionType::SEL_TBL|nsSelectionType::SEL_TBL_CELLS) ) { m_pColumnRB->Check(bCol); - m_pColLbl->SetText(bCol ? aRowTxt : aColTxt); + m_pColLbl->SetText(bCol ? aRowText : aColText); m_pRowRB->Check(!bCol); m_pDelimTabRB->Enable(false); m_pDelimFreeRB->Enable(false); @@ -176,7 +176,7 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell) { m_pColumnRB->Enable(false); m_pRowRB->Check(true); - m_pColLbl->SetText(aColTxt); + m_pColLbl->SetText(aColText); } // initialise @@ -230,7 +230,7 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell) else DelimHdl(m_pDelimTabRB); - if( ::lcl_GetSelTbl( rSh, nX, nY) ) + if( ::lcl_GetSelTable( rSh, nX, nY) ) { sal_uInt16 nMax = m_pRowRB->IsChecked()? nY : nX; m_pColEdt1->SetMax(nMax); @@ -330,7 +330,7 @@ void SwSortDlg::Apply() if( bCheck1 ) { OUString sEntry( m_pTypDLB1->GetSelectEntry() ); - if( sEntry == aNumericTxt ) + if( sEntry == aNumericText ) sEntry.clear(); else if( 0 != (pUserData = m_pTypDLB1->GetSelectEntryData()) ) sEntry = *static_cast<OUString*>(pUserData); @@ -343,7 +343,7 @@ void SwSortDlg::Apply() if( bCheck2 ) { OUString sEntry( m_pTypDLB2->GetSelectEntry() ); - if( sEntry == aNumericTxt ) + if( sEntry == aNumericText ) sEntry.clear(); else if( 0 != (pUserData = m_pTypDLB2->GetSelectEntryData()) ) sEntry = *static_cast<OUString*>(pUserData); @@ -356,7 +356,7 @@ void SwSortDlg::Apply() if( bCheck3 ) { OUString sEntry( m_pTypDLB3->GetSelectEntry() ); - if( sEntry == aNumericTxt ) + if( sEntry == aNumericText ) sEntry.clear(); else if( 0 != (pUserData = m_pTypDLB3->GetSelectEntryData()) ) sEntry = *static_cast<OUString*>(pUserData); @@ -416,25 +416,25 @@ IMPL_LINK( SwSortDlg, CheckHdl, void *, pControl ) { if( pControl == m_pRowRB.get()) { - m_pColLbl->SetText(aColTxt); + m_pColLbl->SetText(aColText); m_pColEdt1->SetMax(nY); m_pColEdt2->SetMax(nY); m_pColEdt3->SetMax(nY); - m_pColEdt1->SetAccessibleName(aColTxt); - m_pColEdt2->SetAccessibleName(aColTxt); - m_pColEdt3->SetAccessibleName(aColTxt); + m_pColEdt1->SetAccessibleName(aColText); + m_pColEdt2->SetAccessibleName(aColText); + m_pColEdt3->SetAccessibleName(aColText); } else if( pControl == m_pColumnRB.get()) { - m_pColLbl->SetText(aRowTxt); + m_pColLbl->SetText(aRowText); m_pColEdt1->SetMax(nX); m_pColEdt2->SetMax(nX); m_pColEdt3->SetMax(nX); - m_pColEdt1->SetAccessibleName(aRowTxt); - m_pColEdt2->SetAccessibleName(aRowTxt); - m_pColEdt3->SetAccessibleName(aRowTxt); + m_pColEdt1->SetAccessibleName(aRowText); + m_pColEdt2->SetAccessibleName(aRowText); + m_pColEdt3->SetAccessibleName(aRowText); } else if(!m_pKeyCB1->IsChecked() && !m_pKeyCB2->IsChecked() && @@ -472,7 +472,7 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox ) if( nCnt < nEnd ) sUINm = pColRes->GetTranslation( sAlg = aSeq[ nCnt ] ); else - sUINm = sAlg = aNumericTxt; + sUINm = sAlg = aNumericText; for( int n = 0; n < nLstBoxCnt; ++n ) { diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index 8af9afeacf98..59980d53005a 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -29,7 +29,7 @@ namespace { - bool lcl_GetPageDesc(SwWrtShell *pSh, sal_uInt16 &rPageNo, const SwFmtPageDesc **ppPageFmtDesc) + bool lcl_GetPageDesc(SwWrtShell *pSh, sal_uInt16 &rPageNo, const SwFormatPageDesc **ppPageFormatDesc) { bool bRet = false; SfxItemSet aSet( pSh->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC ); @@ -38,11 +38,11 @@ namespace const SfxPoolItem* pItem(0); if (SfxItemState::SET == aSet.GetItemState( RES_PAGEDESC, true, &pItem ) && pItem) { - ::boost::optional<sal_uInt16> oNumOffset = static_cast<const SwFmtPageDesc *>(pItem)->GetNumOffset(); + ::boost::optional<sal_uInt16> oNumOffset = static_cast<const SwFormatPageDesc *>(pItem)->GetNumOffset(); if (oNumOffset) rPageNo = oNumOffset.get(); - if (ppPageFmtDesc) - (*ppPageFmtDesc) = static_cast<const SwFmtPageDesc *>(pItem->Clone()); + if (ppPageFormatDesc) + (*ppPageFormatDesc) = static_cast<const SwFormatPageDesc *>(pItem->Clone()); bRet = true; } } @@ -55,9 +55,9 @@ namespace const size_t nCurIdx = pSh->GetCurPageDesc(); const SwPageDesc &rCurrentDesc = pSh->GetPageDesc( nCurIdx ); - const SwFmtPageDesc *pPageFmtDesc(0); + const SwFormatPageDesc *pPageFormatDesc(0); sal_uInt16 nDontCare; - lcl_GetPageDesc(pSh, nDontCare, &pPageFmtDesc); + lcl_GetPageDesc(pSh, nDontCare, &pPageFormatDesc); // If we want a new number then set it, otherwise reuse the existing one sal_uInt16 nPgNo; @@ -67,9 +67,9 @@ namespace } else { - if (pPageFmtDesc) + if (pPageFormatDesc) { - ::boost::optional<sal_uInt16> oNumOffset = pPageFmtDesc->GetNumOffset(); + ::boost::optional<sal_uInt16> oNumOffset = pPageFormatDesc->GetNumOffset(); if (oNumOffset) { nPgNo = oNumOffset.get(); @@ -88,18 +88,18 @@ namespace // If we want a new descriptior then set it, otherwise reuse the existing one if (!pNewDesc) { - SwFmtPageDesc aPageFmtDesc(pPageFmtDesc ? *pPageFmtDesc : &rCurrentDesc); - if (nPgNo) aPageFmtDesc.SetNumOffset(nPgNo); - pSh->SetAttrItem(aPageFmtDesc); + SwFormatPageDesc aPageFormatDesc(pPageFormatDesc ? *pPageFormatDesc : &rCurrentDesc); + if (nPgNo) aPageFormatDesc.SetNumOffset(nPgNo); + pSh->SetAttrItem(aPageFormatDesc); } else { - SwFmtPageDesc aPageFmtDesc(pNewDesc); - if (nPgNo) aPageFmtDesc.SetNumOffset(nPgNo); - pSh->SetAttrItem(aPageFmtDesc); + SwFormatPageDesc aPageFormatDesc(pNewDesc); + if (nPgNo) aPageFormatDesc.SetNumOffset(nPgNo); + pSh->SetAttrItem(aPageFormatDesc); } - delete pPageFmtDesc; + delete pPageFormatDesc; } void lcl_PushCursor(SwWrtShell *pSh) @@ -152,7 +152,7 @@ sal_uInt16 SwTitlePageDlg::GetInsertPosition() const SwTitlePageDlg::SwTitlePageDlg( vcl::Window *pParent ) : SfxModalDialog( pParent, "DLG_TITLEPAGE", "modules/swriter/ui/titlepage.ui"), - mpPageFmtDesc(0) + mpPageFormatDesc(0) { get(m_pUseExistingPagesRB, "RB_USE_EXISTING_PAGES"); get(m_pPageCountNF, "NF_PAGE_COUNT"); @@ -187,9 +187,9 @@ SwTitlePageDlg::SwTitlePageDlg( vcl::Window *pParent ) : mpNormalDesc = mpSh->GetPageDescFromPool(RES_POOLPAGE_STANDARD); mpSh->SttDoc(); - if (lcl_GetPageDesc( mpSh, nSetPage, &mpPageFmtDesc )) + if (lcl_GetPageDesc( mpSh, nSetPage, &mpPageFormatDesc )) { - if (mpPageFmtDesc->GetPageDesc() == mpTitleDesc) + if (mpPageFormatDesc->GetPageDesc() == mpTitleDesc) { while (mpSh->SttNxtPg()) { @@ -275,7 +275,7 @@ SwTitlePageDlg::~SwTitlePageDlg() void SwTitlePageDlg::dispose() { - delete mpPageFmtDesc; + delete mpPageFormatDesc; m_pUseExistingPagesRB.clear(); m_pPageCountNF.clear(); m_pDocumentStartRB.clear(); @@ -306,12 +306,12 @@ IMPL_LINK_NOARG(SwTitlePageDlg, OKHdl) mpSh->StartUndo(); - SwFmtPageDesc aTitleDesc(mpTitleDesc); + SwFormatPageDesc aTitleDesc(mpTitleDesc); if (m_pSetPageNumberCB->IsChecked()) aTitleDesc.SetNumOffset(m_pSetPageNumberNF->GetValue()); - else if (mpPageFmtDesc) - aTitleDesc.SetNumOffset(mpPageFmtDesc->GetNumOffset()); + else if (mpPageFormatDesc) + aTitleDesc.SetNumOffset(mpPageFormatDesc->GetNumOffset()); sal_uInt16 nNoPages = m_pPageCountNF->GetValue(); if (!m_pUseExistingPagesRB->IsChecked()) @@ -333,8 +333,8 @@ IMPL_LINK_NOARG(SwTitlePageDlg, OKHdl) if (nNoPages > 1 && mpSh->GotoPage(GetInsertPosition() + nNoPages, false)) { - SwFmtPageDesc aPageFmtDesc(mpNormalDesc); - mpSh->SetAttrItem(aPageFmtDesc); + SwFormatPageDesc aPageFormatDesc(mpNormalDesc); + mpSh->SetAttrItem(aPageFormatDesc); } if (m_pRestartNumberingCB->IsChecked() || nNoPages > 1) |