diff options
Diffstat (limited to 'sw/source/ui')
78 files changed, 2627 insertions, 2627 deletions
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index a4ae9e945a4f..66becc79d534 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -155,17 +155,17 @@ SwBreakDlg::SwBreakDlg( vcl::Window *pParent, SwWrtShell &rS ) ::InsertStringSorted(rPageDesc.GetName(), *m_pPageCollBox, 1 ); } - OUString aFmtName; + OUString aFormatName; for(sal_uInt16 i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i) { - aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ); - if(LISTBOX_ENTRY_NOTFOUND == m_pPageCollBox->GetEntryPos(aFmtName)) - ::InsertStringSorted(aFmtName, *m_pPageCollBox, 1 ); + aFormatName = SwStyleNameMapper::GetUIName( i, aFormatName ); + if(LISTBOX_ENTRY_NOTFOUND == m_pPageCollBox->GetEntryPos(aFormatName)) + ::InsertStringSorted(aFormatName, *m_pPageCollBox, 1 ); } //add landscape page - aFmtName = SwStyleNameMapper::GetUIName( RES_POOLPAGE_LANDSCAPE, aFmtName ); - if(LISTBOX_ENTRY_NOTFOUND == m_pPageCollBox->GetEntryPos(aFmtName)) - ::InsertStringSorted(aFmtName, *m_pPageCollBox, 1 ); + aFormatName = SwStyleNameMapper::GetUIName( RES_POOLPAGE_LANDSCAPE, aFormatName ); + if(LISTBOX_ENTRY_NOTFOUND == m_pPageCollBox->GetEntryPos(aFormatName)) + ::InsertStringSorted(aFormatName, *m_pPageCollBox, 1 ); CheckEnable(); m_pPageNumEdit->SetText(OUString()); } diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index da7c147b8e9c..b20dfdc2bc3f 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -209,14 +209,14 @@ void SwCharURLPage::Reset(const SfxItemSet* rSet) const SfxPoolItem* pItem; if ( SfxItemState::SET == rSet->GetItemState( RES_TXTATR_INETFMT, false, &pItem ) ) { - const SwFmtINetFmt* pINetFmt = static_cast<const SwFmtINetFmt*>( pItem); - m_pURLED->SetText(INetURLObject::decode(pINetFmt->GetValue(), + const SwFormatINetFormat* pINetFormat = static_cast<const SwFormatINetFormat*>( pItem); + m_pURLED->SetText(INetURLObject::decode(pINetFormat->GetValue(), INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8)); m_pURLED->SaveValue(); - m_pURLED->SetText(pINetFmt->GetName()); + m_pURLED->SetText(pINetFormat->GetName()); - OUString sEntry = pINetFmt->GetVisitedFmt(); + OUString sEntry = pINetFormat->GetVisitedFormat(); if (sEntry.isEmpty()) { OSL_ENSURE( false, "<SwCharURLPage::Reset(..)> - missing visited character format at hyperlink attribute" ); @@ -224,7 +224,7 @@ void SwCharURLPage::Reset(const SfxItemSet* rSet) } m_pVisitedLB->SelectEntry( sEntry ); - sEntry = pINetFmt->GetINetFmt(); + sEntry = pINetFormat->GetINetFormat(); if (sEntry.isEmpty()) { OSL_ENSURE( false, "<SwCharURLPage::Reset(..)> - missing unvisited character format at hyperlink attribute" ); @@ -232,14 +232,14 @@ void SwCharURLPage::Reset(const SfxItemSet* rSet) } m_pNotVisitedLB->SelectEntry(sEntry); - m_pTargetFrmLB->SetText(pINetFmt->GetTargetFrame()); + m_pTargetFrmLB->SetText(pINetFormat->GetTargetFrame()); m_pVisitedLB-> SaveValue(); m_pNotVisitedLB->SaveValue(); m_pTargetFrmLB-> SaveValue(); pINetItem = new SvxMacroItem(FN_INET_FIELD_MACRO); - if( pINetFmt->GetMacroTbl() ) - pINetItem->SetMacroTable( *pINetFmt->GetMacroTbl() ); + if( pINetFormat->GetMacroTable() ) + pINetItem->SetMacroTable( *pINetFormat->GetMacroTable() ); } if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_SELECTION, false, &pItem)) { @@ -260,8 +260,8 @@ bool SwCharURLPage::FillItemSet(SfxItemSet* rSet) sURL = URIHelper::simpleNormalizedMakeRelative(OUString(), sURL); } - SwFmtINetFmt aINetFmt(sURL, m_pTargetFrmLB->GetText()); - aINetFmt.SetName(m_pNameED->GetText()); + SwFormatINetFormat aINetFormat(sURL, m_pTargetFrmLB->GetText()); + aINetFormat.SetName(m_pNameED->GetText()); bool bURLModified = m_pURLED->IsValueChangedFromSaved(); bool bNameModified = m_pNameED->IsModified(); bool bTargetModified = m_pTargetFrmLB->IsValueChangedFromSaved(); @@ -270,14 +270,14 @@ bool SwCharURLPage::FillItemSet(SfxItemSet* rSet) // set valid settings first OUString sEntry = m_pVisitedLB->GetSelectEntry(); sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); - aINetFmt.SetVisitedFmtAndId( sEntry, nId ); + aINetFormat.SetVisitedFormatAndId( sEntry, nId ); sEntry = m_pNotVisitedLB->GetSelectEntry(); nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); - aINetFmt.SetINetFmtAndId( sEntry, nId ); + aINetFormat.SetINetFormatAndId( sEntry, nId ); if( pINetItem && !pINetItem->GetMacroTable().empty() ) - aINetFmt.SetMacroTbl( &pINetItem->GetMacroTable() ); + aINetFormat.SetMacroTable( &pINetItem->GetMacroTable() ); if(m_pVisitedLB->IsValueChangedFromSaved()) bModified = true; @@ -291,7 +291,7 @@ bool SwCharURLPage::FillItemSet(SfxItemSet* rSet) rSet->Put(SfxStringItem(FN_PARAM_SELECTION, m_pTextED->GetText())); } if(bModified) - rSet->Put(aINetFmt); + rSet->Put(aINetFormat); return bModified; } @@ -314,7 +314,7 @@ IMPL_LINK_NOARG(SwCharURLPage, InsertFileHdl) IMPL_LINK_NOARG(SwCharURLPage, EventHdl) { - bModified |= SwMacroAssignDlg::INetFmtDlg( this, + bModified |= SwMacroAssignDlg::INetFormatDlg( this, ::GetActiveView()->GetWrtShell(), pINetItem ); return 0; } diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index 6d0ac7216e7d..a18073102e68 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -254,12 +254,12 @@ void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, vcl::Font& _ { SfxItemSet aSet( _rPage.rSh.GetAttrPool(), _nWhich, _nWhich); _rPage.rSh.GetCurAttr(aSet); - SvxFontItem aFmtFont(static_cast<const SvxFontItem &>( aSet.Get(_nWhich))); + SvxFontItem aFormatFont(static_cast<const SvxFontItem &>( aSet.Get(_nWhich))); - _rFont.SetFamily (aFmtFont.GetFamily()); - _rFont.SetName (aFmtFont.GetFamilyName()); - _rFont.SetPitch (aFmtFont.GetPitch()); - _rFont.SetCharSet(aFmtFont.GetCharSet()); + _rFont.SetFamily (aFormatFont.GetFamily()); + _rFont.SetName (aFormatFont.GetFamilyName()); + _rFont.SetPitch (aFormatFont.GetPitch()); + _rFont.SetCharSet(aFormatFont.GetCharSet()); } void SwDropCapsPict::UpdatePaintSettings() @@ -298,16 +298,16 @@ void SwDropCapsPict::UpdatePaintSettings() else { // query Font at character template - SwCharFmt *pFmt = mpPage->rSh.GetCharStyle( + SwCharFormat *pFormat = mpPage->rSh.GetCharStyle( mpPage->m_pTemplateBox->GetSelectEntry(), SwWrtShell::GETSTYLE_CREATEANY ); - OSL_ENSURE(pFmt, "character style doesn't exist!"); - const SvxFontItem &rFmtFont = pFmt->GetFont(); + OSL_ENSURE(pFormat, "character style doesn't exist!"); + const SvxFontItem &rFormatFont = pFormat->GetFont(); - aFont.SetFamily (rFmtFont.GetFamily()); - aFont.SetName (rFmtFont.GetFamilyName()); - aFont.SetPitch (rFmtFont.GetPitch()); - aFont.SetCharSet(rFmtFont.GetCharSet()); + aFont.SetFamily (rFormatFont.GetFamily()); + aFont.SetName (rFormatFont.GetFamilyName()); + aFont.SetPitch (rFormatFont.GetPitch()); + aFont.SetCharSet(rFormatFont.GetCharSet()); } } @@ -462,7 +462,7 @@ Size SwDropCapsPict::CalcTextSize() sal_Int32 nStart; sal_Int32 nEnd; GetFirstScriptSegment(nStart, nEnd, nScript); - long nTxtWidth = 0; + long nTextWidth = 0; long nCJKHeight = 0; long nCTLHeight = 0; long nHeight = 0; @@ -477,11 +477,11 @@ Size SwDropCapsPict::CalcTextSize() ? maCTLFont : maFont); - sal_uLong nWidth = rFnt.GetTxtSize(mpPrinter, maText, nStart, nEnd-nStart ).Width(); + sal_uLong nWidth = rFnt.GetTextSize(mpPrinter, maText, nStart, nEnd-nStart ).Width(); if (nIdx < maScriptChanges.size()) maScriptChanges[nIdx].textWidth = nWidth; - nTxtWidth += nWidth; + nTextWidth += nWidth; switch(nScript) { case css::i18n::ScriptType::ASIAN: @@ -512,8 +512,8 @@ Size SwDropCapsPict::CalcTextSize() nAscent = nCTLAscent; nHeight += nAscent; - Size aTxtSize(nTxtWidth, nHeight); - return aTxtSize; + Size aTextSize(nTextWidth, nHeight); + return aTextSize; } void SwDropCapsPict::_InitPrinter() @@ -634,13 +634,13 @@ bool SwDropCapsPage::FillItemSet(SfxItemSet *rSet) void SwDropCapsPage::Reset(const SfxItemSet *rSet) { // Characters, lines, gap and text - SwFmtDrop aFmtDrop(static_cast<const SwFmtDrop &>( rSet->Get(RES_PARATR_DROP))); - if (aFmtDrop.GetLines() > 1) + SwFormatDrop aFormatDrop(static_cast<const SwFormatDrop &>( rSet->Get(RES_PARATR_DROP))); + if (aFormatDrop.GetLines() > 1) { - m_pDropCapsField->SetValue(aFmtDrop.GetChars()); - m_pLinesField->SetValue(aFmtDrop.GetLines()); - m_pDistanceField->SetValue(m_pDistanceField->Normalize(aFmtDrop.GetDistance()), FUNIT_TWIP); - m_pWholeWordCB->Check(aFmtDrop.GetWholeWord()); + m_pDropCapsField->SetValue(aFormatDrop.GetChars()); + m_pLinesField->SetValue(aFormatDrop.GetLines()); + m_pDistanceField->SetValue(m_pDistanceField->Normalize(aFormatDrop.GetDistance()), FUNIT_TWIP); + m_pWholeWordCB->Check(aFormatDrop.GetWholeWord()); } else { @@ -655,17 +655,17 @@ void SwDropCapsPage::Reset(const SfxItemSet *rSet) // Reset format m_pTemplateBox->SelectEntryPos(0); - if (aFmtDrop.GetCharFmt()) - m_pTemplateBox->SelectEntry(aFmtDrop.GetCharFmt()->GetName()); + if (aFormatDrop.GetCharFormat()) + m_pTemplateBox->SelectEntry(aFormatDrop.GetCharFormat()->GetName()); // Enable controls - m_pDropCapsBox->Check(aFmtDrop.GetLines() > 1); + m_pDropCapsBox->Check(aFormatDrop.GetLines() > 1); const sal_Int32 nVal = static_cast<sal_Int32>(m_pDropCapsField->GetValue()); if (bFormat) m_pTextEdit->SetText(GetDefaultString(nVal)); else { - m_pTextEdit->SetText(rSh.GetDropTxt(nVal)); + m_pTextEdit->SetText(rSh.GetDropText(nVal)); m_pTextEdit->Enable(); m_pTextText->Enable(); } @@ -733,12 +733,12 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit ) : 0; bool bSetText = false; - if (bFormat || rSh.GetDropTxt(1).isEmpty()) + if (bFormat || rSh.GetDropText(1).isEmpty()) sPreview = GetDefaultString(nVal); else { bSetText = true; - sPreview = rSh.GetDropTxt(nVal); + sPreview = rSh.GetDropText(nVal); } OUString sEdit(m_pTextEdit->GetText()); @@ -783,32 +783,32 @@ void SwDropCapsPage::FillSet( SfxItemSet &rSet ) { if(bModified) { - SwFmtDrop aFmt; + SwFormatDrop aFormat; bool bOn = m_pDropCapsBox->IsChecked(); if(bOn) { // quantity, lines, gap - aFmt.GetChars() = (sal_uInt8) m_pDropCapsField->GetValue(); - aFmt.GetLines() = (sal_uInt8) m_pLinesField->GetValue(); - aFmt.GetDistance() = (sal_uInt16) m_pDistanceField->Denormalize(m_pDistanceField->GetValue(FUNIT_TWIP)); - aFmt.GetWholeWord() = m_pWholeWordCB->IsChecked(); + aFormat.GetChars() = (sal_uInt8) m_pDropCapsField->GetValue(); + aFormat.GetLines() = (sal_uInt8) m_pLinesField->GetValue(); + aFormat.GetDistance() = (sal_uInt16) m_pDistanceField->Denormalize(m_pDistanceField->GetValue(FUNIT_TWIP)); + aFormat.GetWholeWord() = m_pWholeWordCB->IsChecked(); // template if (m_pTemplateBox->GetSelectEntryPos()) - aFmt.SetCharFmt(rSh.GetCharStyle(m_pTemplateBox->GetSelectEntry())); + aFormat.SetCharFormat(rSh.GetCharStyle(m_pTemplateBox->GetSelectEntry())); } else { - aFmt.GetChars() = 1; - aFmt.GetLines() = 1; - aFmt.GetDistance() = 0; + aFormat.GetChars() = 1; + aFormat.GetLines() = 1; + aFormat.GetDistance() = 0; } // set attributes const SfxPoolItem* pOldItem; - if (0 == (pOldItem = GetOldItem(rSet, FN_FORMAT_DROPCAPS)) || aFmt != *pOldItem) - rSet.Put(aFmt); + if (0 == (pOldItem = GetOldItem(rSet, FN_FORMAT_DROPCAPS)) || aFormat != *pOldItem) + rSet.Put(aFormat); // hard text formatting // Bug 24974: in designer/template catalog this doesn't make sense!! diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 659ad559640e..26b8a210b31f 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -177,11 +177,11 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet ) m_pRestartParaCountCB->IsValueChangedFromSaved() || m_pRestartNF->IsValueChangedFromSaved() ) { - SwFmtLineNumber aFmt; - aFmt.SetStartValue( static_cast< sal_uLong >(m_pRestartParaCountCB->GetState() == TRISTATE_TRUE ? + SwFormatLineNumber aFormat; + aFormat.SetStartValue( static_cast< sal_uLong >(m_pRestartParaCountCB->GetState() == TRISTATE_TRUE ? m_pRestartNF->GetValue() : 0 )); - aFmt.SetCountLines( m_pCountParaCB->IsChecked() ); - rSet->Put(aFmt); + aFormat.SetCountLines( m_pCountParaCB->IsChecked() ); + rSet->Put(aFormat); bModified = true; } return bModified; @@ -264,7 +264,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) StyleHdl_Impl(m_pNumberStyleLB); if( SfxItemState::DEFAULT <= rSet->GetItemState(RES_LINENUMBER)) { - const SwFmtLineNumber& rNum = static_cast<const SwFmtLineNumber&>(rSet->Get(RES_LINENUMBER)); + const SwFormatLineNumber& rNum = static_cast<const SwFormatLineNumber&>(rSet->Get(RES_LINENUMBER)); sal_uLong nStartValue = rNum.GetStartValue(); bool bCount = rNum.IsCount(); m_pCountParaCB->SetState( bCount ? TRISTATE_TRUE : TRISTATE_FALSE ); diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index 1601db38d557..c9bd552b6c2f 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -238,7 +238,7 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) } else if( m_nParaNumPara == nId) { - SwTxtFmtColl* pTmpColl = rSh.GetCurTxtFmtColl(); + SwTextFormatColl* pTmpColl = rSh.GetCurTextFormatColl(); if( pTmpColl && pTmpColl->IsAssignedToListLevelOfOutlineStyle() ) { static_cast<SwParagraphNumTabPage&>(rPage).DisableOutline() ; diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index 4b8f894a86b1..7b813250e690 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -56,7 +56,7 @@ SwCondCollPage::SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet) , m_rSh(::GetActiveView()->GetWrtShell()), m_pCmds( SwCondCollItem::GetCmds() ), - m_pFmt(0), + m_pFormat(0), m_bNewTemplate(false) { @@ -176,7 +176,7 @@ void SwCondCollPage::Reset(const SfxItemSet *) { if(m_bNewTemplate) m_pConditionCB->Enable(); - if(RES_CONDTXTFMTCOLL == m_pFmt->Which()) + if(RES_CONDTXTFMTCOLL == m_pFormat->Which()) m_pConditionCB->Check(); OnOffHdl(m_pConditionCB); @@ -188,7 +188,7 @@ void SwCondCollPage::Reset(const SfxItemSet *) const SfxStyleSheetBase* pBase = pPool->First(); while( pBase ) { - if(!m_pFmt || pBase->GetName() != m_pFmt->GetName()) + if(!m_pFormat || pBase->GetName() != m_pFormat->GetName()) m_pStyleLB->InsertEntry(pBase->GetName()); pBase = pPool->Next(); } @@ -199,12 +199,12 @@ void SwCondCollPage::Reset(const SfxItemSet *) OUString aEntry( m_aStrArr[n] + "\t" ); const SwCollCondition* pCond = 0; - if( m_pFmt && RES_CONDTXTFMTCOLL == m_pFmt->Which() && - 0 != ( pCond = static_cast<SwConditionTxtFmtColl*>(m_pFmt)-> + if( m_pFormat && RES_CONDTXTFMTCOLL == m_pFormat->Which() && + 0 != ( pCond = static_cast<SwConditionTextFormatColl*>(m_pFormat)-> HasCondition( SwCollCondition( 0, m_pCmds[n].nCnd, m_pCmds[n].nSubCond ) ) ) - && pCond->GetTxtFmtColl() ) + && pCond->GetTextFormatColl() ) { - aEntry += pCond->GetTxtFmtColl()->GetName(); + aEntry += pCond->GetTextFormatColl()->GetName(); } SvTreeListEntry* pE = m_pTbLinks->InsertEntryToColumn( aEntry, n ); @@ -271,7 +271,7 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox) while( pBase ) { - if(!m_pFmt || pBase->GetName() != m_pFmt->GetName()) + if(!m_pFormat || pBase->GetName() != m_pFormat->GetName()) m_pStyleLB->InsertEntry(pBase->GetName()); pBase = pPool->Next(); } @@ -295,9 +295,9 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox) return 0; } -void SwCondCollPage::SetCollection(SwFmt* pFormat, bool bNew) +void SwCondCollPage::SetCollection(SwFormat* pFormat, bool bNew) { - m_pFmt = pFormat; + m_pFormat = pFormat; m_bNewTemplate = bNew; } diff --git a/sw/source/ui/chrdlg/tblnumfm.cxx b/sw/source/ui/chrdlg/tblnumfm.cxx index e3244f3320a0..108b6b3eb19c 100644 --- a/sw/source/ui/chrdlg/tblnumfm.cxx +++ b/sw/source/ui/chrdlg/tblnumfm.cxx @@ -29,7 +29,7 @@ #include <svl/itemset.hxx> #include <sfx2/tabdlg.hxx> -SwNumFmtDlg::SwNumFmtDlg(vcl::Window* pParent, const SfxItemSet& rSet) +SwNumFormatDlg::SwNumFormatDlg(vcl::Window* pParent, const SfxItemSet& rSet) : SfxSingleTabDialog(pParent, rSet, "FormatNumberDialog", "cui/ui/formatnumberdialog.ui") { diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 3a046a402f25..336395c7631f 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -171,16 +171,16 @@ bool SwLoadOptPage::FillItemSet( SfxItemSet* rSet ) else if (m_pRequestRB->IsChecked()) nNewLinkMode = MANUAL; - SwFldUpdateFlags eFldFlags = m_pAutoUpdateFields->IsChecked() ? + SwFieldUpdateFlags eFieldFlags = m_pAutoUpdateFields->IsChecked() ? m_pAutoUpdateCharts->IsChecked() ? AUTOUPD_FIELD_AND_CHARTS : AUTOUPD_FIELD_ONLY : AUTOUPD_OFF; if(m_pAutoUpdateFields->IsValueChangedFromSaved() || m_pAutoUpdateCharts->IsValueChangedFromSaved()) { - pMod->ApplyFldUpdateFlags(eFldFlags); + pMod->ApplyFieldUpdateFlags(eFieldFlags); if(m_pWrtShell) { - m_pWrtShell->SetFldUpdateFlags(eFldFlags); + m_pWrtShell->SetFieldUpdateFlags(eFieldFlags); m_pWrtShell->SetModified(); } } @@ -277,20 +277,20 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem)) m_pWrtShell = static_cast<SwWrtShell*>(static_cast<const SwPtrItem*>(pItem)->GetValue()); - SwFldUpdateFlags eFldFlags = AUTOUPD_GLOBALSETTING; + SwFieldUpdateFlags eFieldFlags = AUTOUPD_GLOBALSETTING; m_nOldLinkMode = GLOBALSETTING; if (m_pWrtShell) { - eFldFlags = m_pWrtShell->GetFldUpdateFlags(true); + eFieldFlags = m_pWrtShell->GetFieldUpdateFlags(true); m_nOldLinkMode = m_pWrtShell->GetLinkUpdMode(true); } if(GLOBALSETTING == m_nOldLinkMode) m_nOldLinkMode = pUsrPref->GetUpdateLinkMode(); - if(AUTOUPD_GLOBALSETTING == eFldFlags) - eFldFlags = pUsrPref->GetFldUpdateFlags(); + if(AUTOUPD_GLOBALSETTING == eFieldFlags) + eFieldFlags = pUsrPref->GetFieldUpdateFlags(); - m_pAutoUpdateFields->Check(eFldFlags != AUTOUPD_OFF); - m_pAutoUpdateCharts->Check(eFldFlags == AUTOUPD_FIELD_AND_CHARTS); + m_pAutoUpdateFields->Check(eFieldFlags != AUTOUPD_OFF); + m_pAutoUpdateCharts->Check(eFieldFlags == AUTOUPD_FIELD_AND_CHARTS); switch (m_nOldLinkMode) { @@ -453,7 +453,7 @@ SwCaptionOptPage::SwCaptionOptPage(vcl::Window* pParent, const SfxItemSet& rSet) , m_sAbove(SW_RESSTR(STR_CAPTION_ABOVE)) , m_sBelow(SW_RESSTR(STR_CAPTION_BELOW)) , m_sNone(SW_RESSTR(SW_STR_NONE)) - , pMgr(new SwFldMgr()) + , pMgr(new SwFieldMgr()) , bHTMLMode(false) { get(m_pCheckLB, "objects"); @@ -483,15 +483,15 @@ SwCaptionOptPage::SwCaptionOptPage(vcl::Window* pParent, const SfxItemSet& rSet) SwWrtShell* pSh = ::GetActiveWrtShell(); // m_pFormatBox - sal_uInt16 nSelFmt = SVX_NUM_ARABIC; + sal_uInt16 nSelFormat = SVX_NUM_ARABIC; if (pSh) { - for ( sal_uInt16 i = pMgr->GetFldTypeCount(); i; ) + for ( sal_uInt16 i = pMgr->GetFieldTypeCount(); i; ) { - SwFieldType* pFldType = pMgr->GetFldType(USHRT_MAX, --i); - if (pFldType->GetName().equals(m_pCategoryBox->GetText())) + SwFieldType* pFieldType = pMgr->GetFieldType(USHRT_MAX, --i); + if (pFieldType->GetName().equals(m_pCategoryBox->GetText())) { - nSelFmt = (sal_uInt16)static_cast<SwSetExpFieldType*>(pFldType)->GetSeqFormat(); + nSelFormat = (sal_uInt16)static_cast<SwSetExpFieldType*>(pFieldType)->GetSeqFormat(); break; } } @@ -503,9 +503,9 @@ SwCaptionOptPage::SwCaptionOptPage(vcl::Window* pParent, const SfxItemSet& rSet) for ( sal_uInt16 i = 0; i < nCount; ++i ) { m_pFormatBox->InsertEntry( pMgr->GetFormatStr(TYP_SEQFLD, i) ); - const sal_uInt16 nFmtId = pMgr->GetFormatId(TYP_SEQFLD, i); - m_pFormatBox->SetEntryData( i, reinterpret_cast<void*>(nFmtId) ); - if( nFmtId == nSelFmt ) + const sal_uInt16 nFormatId = pMgr->GetFormatId(TYP_SEQFLD, i); + m_pFormatBox->SetEntryData( i, reinterpret_cast<void*>(nFormatId) ); + if( nFormatId == nSelFormat ) m_pFormatBox->SelectEntryPos( i ); } @@ -517,12 +517,12 @@ SwCaptionOptPage::SwCaptionOptPage(vcl::Window* pParent, const SfxItemSet& rSet) if (pSh) { - SwSetExpFieldType* pFldType = static_cast<SwSetExpFieldType*>(pMgr->GetFldType( + SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(pMgr->GetFieldType( RES_SETEXPFLD, m_pCategoryBox->GetText() )); - if( pFldType ) + if( pFieldType ) { - sDelim = pFldType->GetDelimiter(); - nLvl = pFldType->GetOutlineLvl(); + sDelim = pFieldType->GetDelimiter(); + nLvl = pFieldType->GetOutlineLvl(); } } @@ -706,11 +706,11 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl) m_pCategoryBox->InsertEntry(m_sNone); if (pSh) { - const sal_uInt16 nCount = pMgr->GetFldTypeCount(); + const sal_uInt16 nCount = pMgr->GetFieldTypeCount(); for (sal_uInt16 i = 0; i < nCount; i++) { - SwFieldType *pType = pMgr->GetFldType( USHRT_MAX, i ); + SwFieldType *pType = pMgr->GetFieldType( USHRT_MAX, i ); if( pType->Which() == RES_SETEXPFLD && static_cast<SwSetExpFieldType *>( pType)->GetType() & nsSwGetSetExpType::GSE_SEQ ) m_pCategoryBox->InsertSwEntry(SwBoxEntry(pType->GetName())); @@ -832,13 +832,13 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry) IMPL_LINK_NOARG(SwCaptionOptPage, ModifyHdl) { - const OUString sFldTypeName = m_pCategoryBox->GetText(); + const OUString sFieldTypeName = m_pCategoryBox->GetText(); SfxSingleTabDialog *pDlg = dynamic_cast<SfxSingleTabDialog*>(GetParentDialog()); PushButton *pBtn = pDlg ? pDlg->GetOKButton() : NULL; if (pBtn) - pBtn->Enable(!sFldTypeName.isEmpty()); - bool bEnable = m_pCategoryBox->IsEnabled() && sFldTypeName != m_sNone; + pBtn->Enable(!sFieldTypeName.isEmpty()); + bool bEnable = m_pCategoryBox->IsEnabled() && sFieldTypeName != m_sNone; m_pFormatText->Enable(bEnable); m_pFormatBox->Enable(bEnable); @@ -881,9 +881,9 @@ void SwCaptionOptPage::InvalidatePreview() //#i61007# order of captions bool bOrderNumberingFirst = m_pLbCaptionOrder->GetSelectEntryPos() == 1; // number - const sal_uInt16 nNumFmt = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatBox->GetEntryData( + const sal_uInt16 nNumFormat = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatBox->GetEntryData( m_pFormatBox->GetSelectEntryPos() )); - if( SVX_NUM_NUMBER_NONE != nNumFmt ) + if( SVX_NUM_NUMBER_NONE != nNumFormat ) { //#i61007# order of captions if( !bOrderNumberingFirst ) @@ -895,11 +895,11 @@ void SwCaptionOptPage::InvalidatePreview() SwWrtShell *pSh = ::GetActiveWrtShell(); if (pSh) { - SwSetExpFieldType* pFldType = static_cast<SwSetExpFieldType*>(pMgr->GetFldType( + SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(pMgr->GetFieldType( RES_SETEXPFLD, m_pCategoryBox->GetText() )); - if( pFldType && pFldType->GetOutlineLvl() < MAXLEVEL ) + if( pFieldType && pFieldType->GetOutlineLvl() < MAXLEVEL ) { - sal_uInt8 nLvl = pFldType->GetOutlineLvl(); + sal_uInt8 nLvl = pFieldType->GetOutlineLvl(); SwNumberTree::tNumberVector aNumVector; for( sal_uInt8 i = 0; i <= nLvl; ++i ) aNumVector.push_back(1); @@ -907,11 +907,11 @@ void SwCaptionOptPage::InvalidatePreview() const OUString sNumber( pSh->GetOutlineNumRule()->MakeNumString( aNumVector, false )); if( !sNumber.isEmpty() ) - aStr += sNumber + pFldType->GetDelimiter(); + aStr += sNumber + pFieldType->GetDelimiter(); } } - switch( nNumFmt ) + switch( nNumFormat ) { case SVX_NUM_CHARS_UPPER_LETTER: aStr += "A"; break; case SVX_NUM_CHARS_UPPER_LETTER_N: aStr += "A"; break; diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 271a91be0fda..86da07785385 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -101,9 +101,9 @@ SwContentOptPage::SwContentOptPage( vcl::Window* pParent, get (m_pSmoothCBox, "smoothscroll"); get (m_pGrfCB, "graphics"); - get (m_pTblCB, "tables"); + get (m_pTableCB, "tables"); get (m_pDrwCB, "drawings"); - get (m_pFldNameCB, "fieldcodes"); + get (m_pFieldNameCB, "fieldcodes"); get (m_pPostItCB, "comments"); get (m_pSettingsFrame, "settingsframe"); @@ -184,9 +184,9 @@ void SwContentOptPage::dispose() m_pVMetric.clear(); m_pSmoothCBox.clear(); m_pGrfCB.clear(); - m_pTblCB.clear(); + m_pTableCB.clear(); m_pDrwCB.clear(); - m_pFldNameCB.clear(); + m_pFieldNameCB.clear(); m_pPostItCB.clear(); m_pSettingsFrame.clear(); m_pSettingsLabel.clear(); @@ -228,10 +228,10 @@ void SwContentOptPage::Reset(const SfxItemSet* rSet) reinterpret_cast<const SfxPoolItem**>(&pElemAttr) ); if(pElemAttr) { - m_pTblCB->Check (pElemAttr->bTable); + m_pTableCB->Check (pElemAttr->bTable); m_pGrfCB->Check (pElemAttr->bGraphic); m_pDrwCB->Check (pElemAttr->bDrawing); - m_pFldNameCB->Check (pElemAttr->bFieldName); + m_pFieldNameCB->Check (pElemAttr->bFieldName); m_pPostItCB->Check (pElemAttr->bNotes); m_pCrossCB->Check (pElemAttr->bCrosshair); m_pHScrollBox->Check (pElemAttr->bHorzScrollbar); @@ -257,10 +257,10 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet) SwElemItem aElem; if(pOldAttr) aElem = *pOldAttr; - aElem.bTable = m_pTblCB->IsChecked(); + aElem.bTable = m_pTableCB->IsChecked(); aElem.bGraphic = m_pGrfCB->IsChecked(); aElem.bDrawing = m_pDrwCB->IsChecked(); - aElem.bFieldName = m_pFldNameCB->IsChecked(); + aElem.bFieldName = m_pFieldNameCB->IsChecked(); aElem.bNotes = m_pPostItCB->IsChecked(); aElem.bCrosshair = m_pCrossCB->IsChecked(); aElem.bHorzScrollbar = m_pHScrollBox->IsChecked(); @@ -331,7 +331,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(vcl::Window* pParent, , bPreview(false) { get(m_pGrfCB, "graphics"); - get(m_pCtrlFldCB, "formcontrols"); + get(m_pCtrlFieldCB, "formcontrols"); get(m_pBackgroundCB, "background"); get(m_pBlackFontCB, "inblack"); get(m_pPrintHiddenTextCB, "hiddentext"); @@ -357,7 +357,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(vcl::Window* pParent, m_pGrfCB->SetClickHdl( aLk ); m_pRightPageCB->SetClickHdl( aLk ); m_pLeftPageCB->SetClickHdl( aLk ); - m_pCtrlFldCB->SetClickHdl( aLk ); + m_pCtrlFieldCB->SetClickHdl( aLk ); m_pBackgroundCB->SetClickHdl( aLk ); m_pBlackFontCB->SetClickHdl( aLk ); m_pPrintHiddenTextCB->SetClickHdl( aLk ); @@ -398,7 +398,7 @@ SwAddPrinterTabPage::~SwAddPrinterTabPage() void SwAddPrinterTabPage::dispose() { m_pGrfCB.clear(); - m_pCtrlFldCB.clear(); + m_pCtrlFieldCB.clear(); m_pBackgroundCB.clear(); m_pBlackFontCB.clear(); m_pPrintHiddenTextCB.clear(); @@ -442,7 +442,7 @@ bool SwAddPrinterTabPage::FillItemSet( SfxItemSet* rCoreSet ) aAddPrinterAttr.bPrintGraphic = m_pGrfCB->IsChecked(); aAddPrinterAttr.bPrintTable = true; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/ aAddPrinterAttr.bPrintDraw = m_pGrfCB->IsChecked(); // UI merged with m_pGrfCB in CWS printerpullgpages - aAddPrinterAttr.bPrintControl = m_pCtrlFldCB->IsChecked(); + aAddPrinterAttr.bPrintControl = m_pCtrlFieldCB->IsChecked(); aAddPrinterAttr.bPrintPageBackground = m_pBackgroundCB->IsChecked(); aAddPrinterAttr.bPrintBlackFont = m_pBlackFontCB->IsChecked(); aAddPrinterAttr.bPrintHiddenText = m_pPrintHiddenTextCB->IsChecked(); @@ -484,7 +484,7 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet* ) reinterpret_cast<const SfxPoolItem**>(&pAddPrinterAttr) )) { m_pGrfCB->Check(pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw); - m_pCtrlFldCB->Check( pAddPrinterAttr->bPrintControl); + m_pCtrlFieldCB->Check( pAddPrinterAttr->bPrintControl); m_pBackgroundCB->Check( pAddPrinterAttr->bPrintPageBackground); m_pBlackFontCB->Check( pAddPrinterAttr->bPrintBlackFont); m_pPrintHiddenTextCB->Check( pAddPrinterAttr->bPrintHiddenText); @@ -678,8 +678,8 @@ static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType, vcl::Font aFont( rStyle, Size( 0, 10 ) ); if( pPrt ) aFont = pPrt->GetFontMetric( aFont ); - SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType); - pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(nType); + pColl->SetFormatAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), aEmptyOUStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } @@ -688,8 +688,8 @@ static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType, { float fSize = (float)nHeight / 10; nHeight = CalcToUnit( fSize, SFX_MAPUNIT_TWIP ); - SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType); - pColl->SetFmtAttr(SvxFontHeightItem(nHeight, 100, nFontHeightWhich)); + SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(nType); + pColl->SetFormatAttr(SvxFontHeightItem(nHeight, 100, nFontHeightWhich)); } bool SwStdFontTabPage::FillItemSet( SfxItemSet* ) @@ -759,16 +759,16 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet* ) aFont = pPrinter->GetFontMetric( aFont ); pWrtShell->SetDefault(SvxFontItem(aFont.GetFamily(), aFont.GetName(), aEmptyOUStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); - SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); - pColl->ResetFmtAttr(nFontWhich); + SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(RES_POOLCOLL_STANDARD); + pColl->ResetFormatAttr(nFontWhich); bMod = true; } if(bStandardHeightChanged) { float fSize = (float)pStandardHeightLB->GetValue() / 10; pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), 100, nFontHeightWhich ) ); - SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); - pColl->ResetFmtAttr(nFontHeightWhich); + SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(RES_POOLCOLL_STANDARD); + pColl->ResetFormatAttr(nFontHeightWhich); bMod = true; } @@ -930,7 +930,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) } else { - SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); + SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(RES_POOLCOLL_STANDARD); const SvxFontItem& rFont = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellStd = sStdBackup = rFont.GetFamilyName(); @@ -938,45 +938,45 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) const sal_uInt16 nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONTSIZE : FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE ); - const SvxFontHeightItem& rFontHeightStandard = static_cast<const SvxFontHeightItem& >(pColl->GetFmtAttr(nFontHeightWhich)); + const SvxFontHeightItem& rFontHeightStandard = static_cast<const SvxFontHeightItem& >(pColl->GetFormatAttr(nFontHeightWhich)); nStandardHeight = (sal_Int32)rFontHeightStandard.GetHeight(); - pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_HEADLINE_BASE); + pColl = pWrtShell->GetTextCollFromPool(RES_POOLCOLL_HEADLINE_BASE); const SvxFontItem& rFontHL = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellTitle = sOutBackup = rFontHL.GetFamilyName(); - const SvxFontHeightItem& rFontHeightTitle = static_cast<const SvxFontHeightItem&>(pColl->GetFmtAttr( nFontHeightWhich, true )); + const SvxFontHeightItem& rFontHeightTitle = static_cast<const SvxFontHeightItem&>(pColl->GetFormatAttr( nFontHeightWhich, true )); nTitleHeight = (sal_Int32)rFontHeightTitle.GetHeight(); const sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT : FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT); - pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_NUMBUL_BASE); + pColl = pWrtShell->GetTextCollFromPool(RES_POOLCOLL_NUMBUL_BASE); const SvxFontItem& rFontLS = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); bListDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); sShellList = sListBackup = rFontLS.GetFamilyName(); - const SvxFontHeightItem& rFontHeightList = static_cast<const SvxFontHeightItem&>(pColl->GetFmtAttr(nFontHeightWhich, true)); + const SvxFontHeightItem& rFontHeightList = static_cast<const SvxFontHeightItem&>(pColl->GetFormatAttr(nFontHeightWhich, true)); nListHeight = (sal_Int32)rFontHeightList.GetHeight(); bListHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); - pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_LABEL); + pColl = pWrtShell->GetTextCollFromPool(RES_POOLCOLL_LABEL); bLabelDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); const SvxFontItem& rFontCP = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellLabel = sCapBackup = rFontCP.GetFamilyName(); - const SvxFontHeightItem& rFontHeightLabel = static_cast<const SvxFontHeightItem&>(pColl->GetFmtAttr(nFontHeightWhich, true)); + const SvxFontHeightItem& rFontHeightLabel = static_cast<const SvxFontHeightItem&>(pColl->GetFormatAttr(nFontHeightWhich, true)); nLabelHeight = (sal_Int32)rFontHeightLabel.GetHeight(); bLabelHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); - pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_REGISTER_BASE); + pColl = pWrtShell->GetTextCollFromPool(RES_POOLCOLL_REGISTER_BASE); bIdxDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); const SvxFontItem& rFontIDX = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellIndex = sIdxBackup = rFontIDX.GetFamilyName(); - const SvxFontHeightItem& rFontHeightIndex = static_cast<const SvxFontHeightItem&>(pColl->GetFmtAttr(nFontHeightWhich, true)); + const SvxFontHeightItem& rFontHeightIndex = static_cast<const SvxFontHeightItem&>(pColl->GetFormatAttr(nFontHeightWhich, true)); nIndexHeight = (sal_Int32)rFontHeightIndex.GetHeight(); bIndexHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); } @@ -1149,7 +1149,7 @@ SwTableOptionsTabPage::SwTableOptionsTabPage( vcl::Window* pParent, const SfxIte get(pDontSplitCB,"dontsplit"); get(pBorderCB,"border"); get(pNumFormattingCB,"numformatting"); - get(pNumFmtFormattingCB,"numfmtformatting"); + get(pNumFormatFormattingCB,"numfmtformatting"); get(pNumAlignmentCB,"numalignment"); get(pRowMoveMF,"rowmove"); get(pColMoveMF,"colmove"); @@ -1161,7 +1161,7 @@ SwTableOptionsTabPage::SwTableOptionsTabPage( vcl::Window* pParent, const SfxIte Link<> aLnk(LINK(this, SwTableOptionsTabPage, CheckBoxHdl)); pNumFormattingCB->SetClickHdl(aLnk); - pNumFmtFormattingCB->SetClickHdl(aLnk); + pNumFormatFormattingCB->SetClickHdl(aLnk); pHeaderCB->SetClickHdl(aLnk); } @@ -1177,7 +1177,7 @@ void SwTableOptionsTabPage::dispose() pDontSplitCB.clear(); pBorderCB.clear(); pNumFormattingCB.clear(); - pNumFmtFormattingCB.clear(); + pNumFormatFormattingCB.clear(); pNumAlignmentCB.clear(); pRowMoveMF.clear(); pColMoveMF.clear(); @@ -1202,32 +1202,32 @@ bool SwTableOptionsTabPage::FillItemSet( SfxItemSet* ) SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); if(pRowMoveMF->IsModified()) - pModOpt->SetTblHMove( (sal_uInt16)pRowMoveMF->Denormalize( pRowMoveMF->GetValue(FUNIT_TWIP))); + pModOpt->SetTableHMove( (sal_uInt16)pRowMoveMF->Denormalize( pRowMoveMF->GetValue(FUNIT_TWIP))); if(pColMoveMF->IsModified()) - pModOpt->SetTblVMove( (sal_uInt16)pColMoveMF->Denormalize( pColMoveMF->GetValue(FUNIT_TWIP))); + pModOpt->SetTableVMove( (sal_uInt16)pColMoveMF->Denormalize( pColMoveMF->GetValue(FUNIT_TWIP))); if(pRowInsertMF->IsModified()) - pModOpt->SetTblHInsert((sal_uInt16)pRowInsertMF->Denormalize( pRowInsertMF->GetValue(FUNIT_TWIP))); + pModOpt->SetTableHInsert((sal_uInt16)pRowInsertMF->Denormalize( pRowInsertMF->GetValue(FUNIT_TWIP))); if(pColInsertMF->IsModified()) - pModOpt->SetTblVInsert((sal_uInt16)pColInsertMF->Denormalize( pColInsertMF->GetValue(FUNIT_TWIP))); + pModOpt->SetTableVInsert((sal_uInt16)pColInsertMF->Denormalize( pColInsertMF->GetValue(FUNIT_TWIP))); - TblChgMode eMode; + TableChgMode eMode; if(pFixRB->IsChecked()) eMode = TBLFIX_CHGABS; else if(pFixPropRB->IsChecked()) eMode = TBLFIX_CHGPROP; else eMode = TBLVAR_CHGABS; - if(eMode != pModOpt->GetTblMode()) + if(eMode != pModOpt->GetTableMode()) { - pModOpt->SetTblMode(eMode); + pModOpt->SetTableMode(eMode); // the table-keyboard-mode has changed, now the current // table should know about that too. if(pWrtShell && nsSelectionType::SEL_TBL & pWrtShell->GetSelectionType()) { - pWrtShell->SetTblChgMode(eMode); + pWrtShell->SetTableChgMode(eMode); static sal_uInt16 aInva[] = { FN_TABLE_MODE_FIX, FN_TABLE_MODE_FIX_PROP, @@ -1259,24 +1259,24 @@ bool SwTableOptionsTabPage::FillItemSet( SfxItemSet* ) pDontSplitCB->IsValueChangedFromSaved() || pBorderCB->IsValueChangedFromSaved()) { - pModOpt->SetInsTblFlags(bHTMLMode, aInsOpts); + pModOpt->SetInsTableFlags(bHTMLMode, aInsOpts); } if (pNumFormattingCB->IsValueChangedFromSaved()) { - pModOpt->SetInsTblFormatNum(bHTMLMode, pNumFormattingCB->IsChecked()); + pModOpt->SetInsTableFormatNum(bHTMLMode, pNumFormattingCB->IsChecked()); bRet = true; } - if (pNumFmtFormattingCB->IsValueChangedFromSaved()) + if (pNumFormatFormattingCB->IsValueChangedFromSaved()) { - pModOpt->SetInsTblChangeNumFormat(bHTMLMode, pNumFmtFormattingCB->IsChecked()); + pModOpt->SetInsTableChangeNumFormat(bHTMLMode, pNumFormatFormattingCB->IsChecked()); bRet = true; } if (pNumAlignmentCB->IsValueChangedFromSaved()) { - pModOpt->SetInsTblAlignNum(bHTMLMode, pNumAlignmentCB->IsChecked()); + pModOpt->SetInsTableAlignNum(bHTMLMode, pNumAlignmentCB->IsChecked()); bRet = true; } @@ -1296,12 +1296,12 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) ::SetFieldUnit( *pColInsertMF, eFieldUnit ); } - pRowMoveMF->SetValue(pRowMoveMF->Normalize(pModOpt->GetTblHMove()), FUNIT_TWIP); - pColMoveMF->SetValue(pColMoveMF->Normalize(pModOpt->GetTblVMove()), FUNIT_TWIP); - pRowInsertMF->SetValue(pRowInsertMF->Normalize(pModOpt->GetTblHInsert()), FUNIT_TWIP); - pColInsertMF->SetValue(pColInsertMF->Normalize(pModOpt->GetTblVInsert()), FUNIT_TWIP); + pRowMoveMF->SetValue(pRowMoveMF->Normalize(pModOpt->GetTableHMove()), FUNIT_TWIP); + pColMoveMF->SetValue(pColMoveMF->Normalize(pModOpt->GetTableVMove()), FUNIT_TWIP); + pRowInsertMF->SetValue(pRowInsertMF->Normalize(pModOpt->GetTableHInsert()), FUNIT_TWIP); + pColInsertMF->SetValue(pColInsertMF->Normalize(pModOpt->GetTableVInsert()), FUNIT_TWIP); - switch(pModOpt->GetTblMode()) + switch(pModOpt->GetTableMode()) { case TBLFIX_CHGABS: pFixRB->Check(); break; case TBLFIX_CHGPROP: pFixPropRB->Check(); break; @@ -1320,24 +1320,24 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) pDontSplitCB->Hide(); } - SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode); - const sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode; + SwInsertTableOptions aInsOpts = pModOpt->GetInsTableFlags(bHTMLMode); + const sal_uInt16 nInsTableFlags = aInsOpts.mnInsMode; - pHeaderCB->Check(0 != (nInsTblFlags & tabopts::HEADLINE)); + pHeaderCB->Check(0 != (nInsTableFlags & tabopts::HEADLINE)); pRepeatHeaderCB->Check((!bHTMLMode) && (aInsOpts.mnRowsToRepeat > 0)); - pDontSplitCB->Check(!(nInsTblFlags & tabopts::SPLIT_LAYOUT)); - pBorderCB->Check(0 != (nInsTblFlags & tabopts::DEFAULT_BORDER)); + pDontSplitCB->Check(!(nInsTableFlags & tabopts::SPLIT_LAYOUT)); + pBorderCB->Check(0 != (nInsTableFlags & tabopts::DEFAULT_BORDER)); - pNumFormattingCB->Check(pModOpt->IsInsTblFormatNum(bHTMLMode)); - pNumFmtFormattingCB->Check(pModOpt->IsInsTblChangeNumFormat(bHTMLMode)); - pNumAlignmentCB->Check(pModOpt->IsInsTblAlignNum(bHTMLMode)); + pNumFormattingCB->Check(pModOpt->IsInsTableFormatNum(bHTMLMode)); + pNumFormatFormattingCB->Check(pModOpt->IsInsTableChangeNumFormat(bHTMLMode)); + pNumAlignmentCB->Check(pModOpt->IsInsTableAlignNum(bHTMLMode)); pHeaderCB->SaveValue(); pRepeatHeaderCB->SaveValue(); pDontSplitCB->SaveValue(); pBorderCB->SaveValue(); pNumFormattingCB->SaveValue(); - pNumFmtFormattingCB->SaveValue(); + pNumFormatFormattingCB->SaveValue(); pNumAlignmentCB->SaveValue(); CheckBoxHdl(0); @@ -1345,7 +1345,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) IMPL_LINK_NOARG(SwTableOptionsTabPage, CheckBoxHdl) { - pNumFmtFormattingCB->Enable(pNumFormattingCB->IsChecked()); + pNumFormatFormattingCB->Enable(pNumFormattingCB->IsChecked()); pNumAlignmentCB->Enable(pNumFormattingCB->IsChecked()); pRepeatHeaderCB->Enable(pHeaderCB->IsChecked()); return 0; @@ -1371,8 +1371,8 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( vcl::Window* pParent, get(m_pTabCB, "tabs"); get(m_pBreakCB, "break"); get(m_pCharHiddenCB, "hiddentext"); - get(m_pFldHiddenCB, "hiddentextfield"); - get(m_pFldHiddenParaCB, "hiddenparafield"); + get(m_pFieldHiddenCB, "hiddentextfield"); + get(m_pFieldHiddenParaCB, "hiddenparafield"); get(m_pDirectCursorFrame, "directcrsrframe"); get(m_pOnOffCB, "cursoronoff"); @@ -1406,8 +1406,8 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( vcl::Window* pParent, { m_pTabCB->Hide(); m_pCharHiddenCB->Hide(); - m_pFldHiddenCB->Hide(); - m_pFldHiddenParaCB->Hide(); + m_pFieldHiddenCB->Hide(); + m_pFieldHiddenParaCB->Hide(); m_pDirectCursorFrame->Hide(); m_pOnOffCB->Hide(); @@ -1436,8 +1436,8 @@ void SwShdwCrsrOptionsTabPage::dispose() m_pTabCB.clear(); m_pBreakCB.clear(); m_pCharHiddenCB.clear(); - m_pFldHiddenCB.clear(); - m_pFldHiddenParaCB.clear(); + m_pFieldHiddenCB.clear(); + m_pFieldHiddenParaCB.clear(); m_pDirectCursorFrame.clear(); m_pOnOffCB.clear(); m_pFillMarginRB.clear(); @@ -1518,9 +1518,9 @@ bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet* rSet ) aDisp.bSpace = m_pSpacesCB->IsChecked(); aDisp.bNonbreakingSpace = m_pHSpacesCB->IsChecked(); aDisp.bSoftHyphen = m_pSHyphCB->IsChecked(); - aDisp.bFldHiddenText = m_pFldHiddenCB->IsChecked(); + aDisp.bFieldHiddenText = m_pFieldHiddenCB->IsChecked(); aDisp.bCharHiddenText = m_pCharHiddenCB->IsChecked(); - aDisp.bShowHiddenPara = m_pFldHiddenParaCB->IsChecked(); + aDisp.bShowHiddenPara = m_pFieldHiddenParaCB->IsChecked(); aDisp.bManualBreak = m_pBreakCB->IsChecked(); bRet |= (!pOldAttr || aDisp != *pOldAttr); @@ -1572,8 +1572,8 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet ) m_pHSpacesCB->Check ( pDocDisplayAttr->bNonbreakingSpace ); m_pSHyphCB->Check ( pDocDisplayAttr->bSoftHyphen ); m_pCharHiddenCB->Check ( pDocDisplayAttr->bCharHiddenText ); - m_pFldHiddenCB->Check ( pDocDisplayAttr->bFldHiddenText ); - m_pFldHiddenParaCB->Check ( pDocDisplayAttr->bShowHiddenPara ); + m_pFieldHiddenCB->Check ( pDocDisplayAttr->bFieldHiddenText ); + m_pFieldHiddenParaCB->Check ( pDocDisplayAttr->bShowHiddenPara ); m_pBreakCB->Check ( pDocDisplayAttr->bManualBreak ); } } @@ -1642,8 +1642,8 @@ void SwMarkPreview::InitColors() bool bHC = rSettings.GetHighContrastMode(); m_aLineCol = bHC? SwViewOption::GetFontColor() : Color( COL_BLACK ); m_aShadowCol = bHC? m_aBgCol : rSettings.GetShadowColor(); - m_aTxtCol = bHC? SwViewOption::GetFontColor() : Color( COL_GRAY ); - m_aPrintAreaCol = m_aTxtCol; + m_aTextCol = bHC? SwViewOption::GetFontColor() : Color( COL_GRAY ); + m_aPrintAreaCol = m_aTextCol; } void SwMarkPreview::DataChanged( const DataChangedEvent& rDCEvt ) @@ -1730,15 +1730,15 @@ void SwMarkPreview::PaintPage(vcl::RenderContext& rRenderContext, const Rectangl drawRect(rRenderContext, rRect, m_aTransCol, m_aPrintAreaCol); // draw Testparagraph - sal_uLong nLTxtBorder = 4; - sal_uLong nRTxtBorder = 4; - sal_uLong nTTxtBorder = 4; + sal_uLong nLTextBorder = 4; + sal_uLong nRTextBorder = 4; + sal_uLong nTTextBorder = 4; Rectangle aTextLine = rRect; aTextLine.SetSize(Size(aTextLine.GetWidth(), 2)); - aTextLine.Left() += nLTxtBorder; - aTextLine.Right() -= nRTxtBorder; - aTextLine.Move(0, nTTxtBorder); + aTextLine.Left() += nLTextBorder; + aTextLine.Right() -= nRTextBorder; + aTextLine.Move(0, nTTextBorder); const long nStep = aTextLine.GetHeight() + 2; const long nLines = rRect.GetHeight() / (aTextLine.GetHeight() + 2) - 1; @@ -1750,7 +1750,7 @@ void SwMarkPreview::PaintPage(vcl::RenderContext& rRenderContext, const Rectangl aTextLine.SetSize(Size(aTextLine.GetWidth() / 2, aTextLine.GetHeight())); if (aPage.IsInside(aTextLine)) - drawRect(rRenderContext, aTextLine, m_aTxtCol, m_aTransCol); + drawRect(rRenderContext, aTextLine, m_aTextCol, m_aTransCol); aTextLine.Move(0, nStep); } diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 72a88f1a1c33..550b626e5bf8 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -563,8 +563,8 @@ void SwAddressListDialog::DetectTablesAndQueries( uno::Reference<XTablesSupplier> xTSupplier(pUserData->xConnection, UNO_QUERY); if(xTSupplier.is()) { - uno::Reference<XNameAccess> xTbls = xTSupplier->getTables(); - aTables = xTbls->getElementNames(); + uno::Reference<XNameAccess> xTables = xTSupplier->getTables(); + aTables = xTables->getElementNames(); nTables += aTables.getLength(); } uno::Reference<XQueriesSupplier> xQSupplier(pUserData->xConnection, UNO_QUERY); diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 51f0e9745fc8..ddfed15db9cc 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -104,8 +104,8 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::uno; -const char cDBFldStart = '<'; -const char cDBFldEnd = '>'; +const char cDBFieldStart = '<'; +const char cDBFieldEnd = '>'; // Helper structure for adding database rows as fields or text struct _DB_Column @@ -126,10 +126,10 @@ struct _DB_Column eColType = DB_SPLITPARA; } - _DB_Column( const OUString& rTxt ) + _DB_Column( const OUString& rText ) { pColInfo = 0; - DB_ColumnData.pText = new OUString( rTxt ); + DB_ColumnData.pText = new OUString( rText ); eColType = DB_FILLTEXT; } @@ -140,10 +140,10 @@ struct _DB_Column eColType = DB_COL_TEXT; } - _DB_Column( const SwInsDBColumn& rInfo, SwDBField& rFld ) + _DB_Column( const SwInsDBColumn& rInfo, SwDBField& rField ) { pColInfo = &rInfo; - DB_ColumnData.pField = &rFld; + DB_ColumnData.pField = &rField; eColType = DB_COL_FIELD; } @@ -162,9 +162,9 @@ struct _DB_ColumnConfigData: private boost::noncopyable OUString sSource; OUString sTable; OUString sEdit; - OUString sTblList; + OUString sTableList; OUString sTmplNm; - OUString sTAutoFmtNm; + OUString sTAutoFormatNm; bool bIsTable : 1, bIsField : 1, bIsHeadlineOn : 1, @@ -195,23 +195,23 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, , aDBData(rData) , sNoTmpl(SW_RESSTR(SW_STR_NONE)) , pView(&rView) - , pTAutoFmt(0) - , pTblSet(0) + , pTAutoFormat(0) + , pTableSet(0) , pRep(0) { get(m_pRbAsTable, "astable"); get(m_pRbAsField, "asfields"); get(m_pRbAsText, "astext"); get(m_pHeadFrame, "dbframe"); - get(m_pLbTblDbColumn, "tabledbcols"); - get(m_pLbTxtDbColumn, "tabletxtcols"); - m_pLbTblDbColumn->SetDropDownLineCount(8); - m_pLbTxtDbColumn->SetDropDownLineCount(8); + get(m_pLbTableDbColumn, "tabledbcols"); + get(m_pLbTextDbColumn, "tabletxtcols"); + m_pLbTableDbColumn->SetDropDownLineCount(8); + m_pLbTextDbColumn->SetDropDownLineCount(8); get(m_pFormatFrame, "formatframe"); - get(m_pRbDbFmtFromDb, "fromdatabase"); - get(m_pRbDbFmtFromUsr, "userdefined"); - get(m_pLbDbFmtFromUsr, "numformat"); - aOldNumFmtLnk = m_pLbDbFmtFromUsr->GetSelectHdl(); + get(m_pRbDbFormatFromDb, "fromdatabase"); + get(m_pRbDbFormatFromUsr, "userdefined"); + get(m_pLbDbFormatFromUsr, "numformat"); + aOldNumFormatLnk = m_pLbDbFormatFromUsr->GetSelectHdl(); get(m_pIbDbcolToEdit, "toedit"); get(m_pEdDbText, "textview"); m_pEdDbText->set_width_request(m_pEdDbText->approximate_char_width() * 46); @@ -228,18 +228,18 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, get(m_pCbTableHeadon, "tableheading"); get(m_pRbHeadlColnms, "columnname"); get(m_pRbHeadlEmpty, "rowonly"); - get(m_pPbTblFormat, "tableformat"); - get(m_pPbTblAutofmt, "autoformat"); + get(m_pPbTableFormat, "tableformat"); + get(m_pPbTableAutofmt, "autoformat"); - nGBFmtLen = m_pFormatFrame->get_label().getLength(); + nGBFormatLen = m_pFormatFrame->get_label().getLength(); if(xColSupp.is()) { SwWrtShell& rSh = pView->GetWrtShell(); - SvNumberFormatter* pNumFmtr = rSh.GetNumberFormatter(); - SvNumberFormatsSupplierObj* pNumFmt = new SvNumberFormatsSupplierObj( pNumFmtr ); - Reference< util::XNumberFormatsSupplier > xDocNumFmtsSupplier = pNumFmt; - Reference< util::XNumberFormats > xDocNumberFormats = xDocNumFmtsSupplier->getNumberFormats(); + SvNumberFormatter* pNumFormatr = rSh.GetNumberFormatter(); + SvNumberFormatsSupplierObj* pNumFormat = new SvNumberFormatsSupplierObj( pNumFormatr ); + Reference< util::XNumberFormatsSupplier > xDocNumFormatsSupplier = pNumFormat; + Reference< util::XNumberFormats > xDocNumberFormats = xDocNumFormatsSupplier->getNumberFormats(); Reference< util::XNumberFormatTypes > xDocNumberFormatTypes(xDocNumberFormats, UNO_QUERY); Reference<XPropertySet> xSourceProps(xDataSource, UNO_QUERY); @@ -287,17 +287,17 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, case DataType::TIME: case DataType::TIMESTAMP: { - pNew->bHasFmt = true; + pNew->bHasFormat = true; Any aFormat = xCol->getPropertyValue("FormatKey"); if(aFormat.hasValue()) { - sal_Int32 nFmt = 0; - aFormat >>= nFmt; + sal_Int32 nFormat = 0; + aFormat >>= nFormat; if(xNumberFormats.is()) { try { - Reference<XPropertySet> xNumProps = xNumberFormats->getByKey( nFmt ); + Reference<XPropertySet> xNumProps = xNumberFormats->getByKey( nFormat ); Any aFormatVal = xNumProps->getPropertyValue("FormatString"); Any aLocale = xNumProps->getPropertyValue("Locale"); OUString sFormat; @@ -309,7 +309,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, { nKey = xDocNumberFormats->addNew( sFormat, aLoc ); } - pNew->nDBNumFmt = nKey; + pNew->nDBNumFormat = nKey; } catch (const Exception&) { @@ -319,7 +319,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, } else { - pNew->nDBNumFmt = getDefaultNumberFormat(xCol, + pNew->nDBNumFormat = getDefaultNumberFormat(xCol, xDocNumberFormatTypes, LanguageTag( rSh.GetCurLang() ).getLocale()); } @@ -350,16 +350,16 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, } // when the cursor is inside of a table, table must NEVER be selectable - if( pView->GetWrtShell().GetTableFmt() ) + if( pView->GetWrtShell().GetTableFormat() ) { m_pRbAsTable->Enable( false ); m_pRbAsField->Check( true ); - m_pRbDbFmtFromDb->Check( true ); + m_pRbDbFormatFromDb->Check( true ); } else { m_pRbAsTable->Check( true ); - m_pRbDbFmtFromDb->Check( true ); + m_pRbDbFormatFromDb->Check( true ); m_pIbDbcolOneFrom->Enable( false ); m_pIbDbcolAllFrom->Enable( false ); } @@ -368,39 +368,39 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, m_pRbAsField->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, PageHdl )); m_pRbAsText->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, PageHdl )); - m_pRbDbFmtFromDb->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, DBFormatHdl )); - m_pRbDbFmtFromUsr->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, DBFormatHdl )); + m_pRbDbFormatFromDb->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, DBFormatHdl )); + m_pRbDbFormatFromUsr->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, DBFormatHdl )); - m_pPbTblFormat->SetClickHdl(LINK(this, SwInsertDBColAutoPilot, TblFmtHdl )); - m_pPbTblAutofmt->SetClickHdl(LINK(this, SwInsertDBColAutoPilot, AutoFmtHdl )); + m_pPbTableFormat->SetClickHdl(LINK(this, SwInsertDBColAutoPilot, TableFormatHdl )); + m_pPbTableAutofmt->SetClickHdl(LINK(this, SwInsertDBColAutoPilot, AutoFormatHdl )); - m_pIbDbcolAllTo->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TblToFromHdl )); - m_pIbDbcolOneTo->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TblToFromHdl )); - m_pIbDbcolOneFrom->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TblToFromHdl )); - m_pIbDbcolAllFrom->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TblToFromHdl )); - m_pIbDbcolToEdit->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TblToFromHdl )); + m_pIbDbcolAllTo->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TableToFromHdl )); + m_pIbDbcolOneTo->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TableToFromHdl )); + m_pIbDbcolOneFrom->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TableToFromHdl )); + m_pIbDbcolAllFrom->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TableToFromHdl )); + m_pIbDbcolToEdit->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TableToFromHdl )); m_pCbTableHeadon->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, HeaderHdl )); m_pRbHeadlColnms->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, HeaderHdl )); m_pRbHeadlEmpty->SetClickHdl( LINK(this, SwInsertDBColAutoPilot, HeaderHdl )); - m_pLbTxtDbColumn->SetSelectHdl( LINK( this, SwInsertDBColAutoPilot, SelectHdl )); - m_pLbTblDbColumn->SetSelectHdl( LINK( this, SwInsertDBColAutoPilot, SelectHdl )); - m_pLbDbFmtFromUsr->SetSelectHdl( LINK( this, SwInsertDBColAutoPilot, SelectHdl )); + m_pLbTextDbColumn->SetSelectHdl( LINK( this, SwInsertDBColAutoPilot, SelectHdl )); + m_pLbTableDbColumn->SetSelectHdl( LINK( this, SwInsertDBColAutoPilot, SelectHdl )); + m_pLbDbFormatFromUsr->SetSelectHdl( LINK( this, SwInsertDBColAutoPilot, SelectHdl )); m_pLbTableCol->SetSelectHdl( LINK( this, SwInsertDBColAutoPilot, SelectHdl )); - m_pLbTxtDbColumn->SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl )); - m_pLbTblDbColumn->SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl )); + m_pLbTextDbColumn->SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl )); + m_pLbTableDbColumn->SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl )); m_pLbTableCol->SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl )); for( size_t n = 0; n < aDBColumns.size(); ++n ) { const OUString& rS = aDBColumns[ n ]->sColumn; - m_pLbTblDbColumn->InsertEntry( rS, static_cast<sal_Int32>(n) ); - m_pLbTxtDbColumn->InsertEntry( rS, static_cast<sal_Int32>(n) ); + m_pLbTableDbColumn->InsertEntry( rS, static_cast<sal_Int32>(n) ); + m_pLbTextDbColumn->InsertEntry( rS, static_cast<sal_Int32>(n) ); } - m_pLbTxtDbColumn->SelectEntryPos( 0 ); - m_pLbTblDbColumn->SelectEntryPos( 0 ); + m_pLbTextDbColumn->SelectEntryPos( 0 ); + m_pLbTableDbColumn->SelectEntryPos( 0 ); // read configuration Load(); @@ -418,20 +418,20 @@ SwInsertDBColAutoPilot::~SwInsertDBColAutoPilot() void SwInsertDBColAutoPilot::dispose() { - delete pTblSet; + delete pTableSet; delete pRep; - delete pTAutoFmt; + delete pTAutoFormat; m_pRbAsTable.clear(); m_pRbAsField.clear(); m_pRbAsText.clear(); m_pHeadFrame.clear(); - m_pLbTblDbColumn.clear(); - m_pLbTxtDbColumn.clear(); + m_pLbTableDbColumn.clear(); + m_pLbTextDbColumn.clear(); m_pFormatFrame.clear(); - m_pRbDbFmtFromDb.clear(); - m_pRbDbFmtFromUsr.clear(); - m_pLbDbFmtFromUsr.clear(); + m_pRbDbFormatFromDb.clear(); + m_pRbDbFormatFromUsr.clear(); + m_pLbDbFormatFromUsr.clear(); m_pIbDbcolToEdit.clear(); m_pEdDbText.clear(); m_pFtDbParaColl.clear(); @@ -445,40 +445,40 @@ void SwInsertDBColAutoPilot::dispose() m_pCbTableHeadon.clear(); m_pRbHeadlColnms.clear(); m_pRbHeadlEmpty.clear(); - m_pPbTblFormat.clear(); - m_pPbTblAutofmt.clear(); + m_pPbTableFormat.clear(); + m_pPbTableAutofmt.clear(); SfxModalDialog::dispose(); } IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton ) { - bool bShowTbl = pButton == m_pRbAsTable; + bool bShowTable = pButton == m_pRbAsTable; m_pHeadFrame->set_label(MnemonicGenerator::EraseAllMnemonicChars(pButton->GetText())); - m_pLbTxtDbColumn->Show( !bShowTbl ); - m_pIbDbcolToEdit->Show( !bShowTbl ); - m_pEdDbText->Show( !bShowTbl ); - m_pFtDbParaColl->Show( !bShowTbl ); - m_pLbDbParaColl->Show( !bShowTbl ); - - m_pLbTblDbColumn->Show( bShowTbl ); - m_pIbDbcolAllTo->Show( bShowTbl ); - m_pIbDbcolOneTo->Show( bShowTbl ); - m_pIbDbcolOneFrom->Show( bShowTbl ); - m_pIbDbcolAllFrom->Show( bShowTbl ); - m_pFtTableCol->Show( bShowTbl ); - m_pLbTableCol->Show( bShowTbl ); - m_pCbTableHeadon->Show( bShowTbl ); - m_pRbHeadlColnms->Show( bShowTbl ); - m_pRbHeadlEmpty->Show( bShowTbl ); - m_pPbTblFormat->Show( bShowTbl ); - m_pPbTblAutofmt->Show( bShowTbl ); - - if( bShowTbl ) - m_pPbTblFormat->Enable( 0 != m_pLbTableCol->GetEntryCount() ); - - SelectHdl( bShowTbl ? m_pLbTblDbColumn : m_pLbTxtDbColumn ); + m_pLbTextDbColumn->Show( !bShowTable ); + m_pIbDbcolToEdit->Show( !bShowTable ); + m_pEdDbText->Show( !bShowTable ); + m_pFtDbParaColl->Show( !bShowTable ); + m_pLbDbParaColl->Show( !bShowTable ); + + m_pLbTableDbColumn->Show( bShowTable ); + m_pIbDbcolAllTo->Show( bShowTable ); + m_pIbDbcolOneTo->Show( bShowTable ); + m_pIbDbcolOneFrom->Show( bShowTable ); + m_pIbDbcolAllFrom->Show( bShowTable ); + m_pFtTableCol->Show( bShowTable ); + m_pLbTableCol->Show( bShowTable ); + m_pCbTableHeadon->Show( bShowTable ); + m_pRbHeadlColnms->Show( bShowTable ); + m_pRbHeadlEmpty->Show( bShowTable ); + m_pPbTableFormat->Show( bShowTable ); + m_pPbTableAutofmt->Show( bShowTable ); + + if( bShowTable ) + m_pPbTableFormat->Enable( 0 != m_pLbTableCol->GetEntryCount() ); + + SelectHdl( bShowTable ? m_pLbTableDbColumn : m_pLbTextDbColumn ); return 0; } @@ -487,24 +487,24 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton ) { ListBox& rBox = m_pRbAsTable->IsChecked() ? ( 0 == m_pLbTableCol->GetEntryData( 0 ) - ? *m_pLbTblDbColumn + ? *m_pLbTableDbColumn : *m_pLbTableCol ) - : *m_pLbTxtDbColumn; + : *m_pLbTextDbColumn; SwInsDBColumn aSrch( rBox.GetSelectEntry(), 0 ); SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch ); - bool bFromDB = m_pRbDbFmtFromDb == pButton; - (*it)->bIsDBFmt = bFromDB; - m_pLbDbFmtFromUsr->Enable( !bFromDB ); + bool bFromDB = m_pRbDbFormatFromDb == pButton; + (*it)->bIsDBFormat = bFromDB; + m_pLbDbFormatFromUsr->Enable( !bFromDB ); return 0; } -IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) +IMPL_LINK( SwInsertDBColAutoPilot, TableToFromHdl, Button*, pButton ) { bool bChgEnable = true, bEnableTo = true, bEnableFrom = true; - m_pLbTblDbColumn->SetUpdateMode( false ); + m_pLbTableDbColumn->SetUpdateMode( false ); m_pLbTableCol->SetUpdateMode( false ); if( pButton == m_pIbDbcolAllTo ) @@ -512,34 +512,34 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) bEnableTo = false; sal_Int32 n, nInsPos = m_pLbTableCol->GetSelectEntryPos(), - nCnt = m_pLbTblDbColumn->GetEntryCount(); + nCnt = m_pLbTableDbColumn->GetEntryCount(); if( LISTBOX_APPEND == nInsPos ) for( n = 0; n < nCnt; ++n ) - m_pLbTableCol->InsertEntry( m_pLbTblDbColumn->GetEntry( n ), + m_pLbTableCol->InsertEntry( m_pLbTableDbColumn->GetEntry( n ), LISTBOX_APPEND ); else for( n = 0; n < nCnt; ++n, ++nInsPos ) - m_pLbTableCol->InsertEntry( m_pLbTblDbColumn->GetEntry( n ), nInsPos ); - m_pLbTblDbColumn->Clear(); + m_pLbTableCol->InsertEntry( m_pLbTableDbColumn->GetEntry( n ), nInsPos ); + m_pLbTableDbColumn->Clear(); m_pLbTableCol->SelectEntryPos( nInsPos ); - m_pLbTblDbColumn->SelectEntryPos( LISTBOX_APPEND ); + m_pLbTableDbColumn->SelectEntryPos( LISTBOX_APPEND ); } else if( pButton == m_pIbDbcolOneTo && - LISTBOX_ENTRY_NOTFOUND != m_pLbTblDbColumn->GetSelectEntryPos() ) + LISTBOX_ENTRY_NOTFOUND != m_pLbTableDbColumn->GetSelectEntryPos() ) { sal_Int32 nInsPos = m_pLbTableCol->GetSelectEntryPos(), - nDelPos = m_pLbTblDbColumn->GetSelectEntryPos(), - nTopPos = m_pLbTblDbColumn->GetTopEntry(); - m_pLbTableCol->InsertEntry( m_pLbTblDbColumn->GetEntry( nDelPos ), nInsPos ); - m_pLbTblDbColumn->RemoveEntry( nDelPos ); + nDelPos = m_pLbTableDbColumn->GetSelectEntryPos(), + nTopPos = m_pLbTableDbColumn->GetTopEntry(); + m_pLbTableCol->InsertEntry( m_pLbTableDbColumn->GetEntry( nDelPos ), nInsPos ); + m_pLbTableDbColumn->RemoveEntry( nDelPos ); m_pLbTableCol->SelectEntryPos( nInsPos ); - if( nDelPos >= m_pLbTblDbColumn->GetEntryCount() ) - nDelPos = m_pLbTblDbColumn->GetEntryCount() - 1; - m_pLbTblDbColumn->SelectEntryPos( nDelPos ); - m_pLbTblDbColumn->SetTopEntry( nTopPos ); + if( nDelPos >= m_pLbTableDbColumn->GetEntryCount() ) + nDelPos = m_pLbTableDbColumn->GetEntryCount() - 1; + m_pLbTableDbColumn->SelectEntryPos( nDelPos ); + m_pLbTableDbColumn->SetTopEntry( nTopPos ); - bEnableTo = 0 != m_pLbTblDbColumn->GetEntryCount(); + bEnableTo = 0 != m_pLbTableDbColumn->GetEntryCount(); } else if( pButton == m_pIbDbcolOneFrom ) { @@ -558,17 +558,17 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) { nInsPos = LISTBOX_ENTRY_NOTFOUND; while( ++it != aDBColumns.end() && - LISTBOX_ENTRY_NOTFOUND == (nInsPos = m_pLbTblDbColumn-> + LISTBOX_ENTRY_NOTFOUND == (nInsPos = m_pLbTableDbColumn-> GetEntryPos( (*it)->sColumn )) ) ; } - m_pLbTblDbColumn->InsertEntry( aSrch.sColumn, nInsPos ); + m_pLbTableDbColumn->InsertEntry( aSrch.sColumn, nInsPos ); m_pLbTableCol->RemoveEntry( nDelPos ); - if( nInsPos >= m_pLbTblDbColumn->GetEntryCount() ) - nInsPos = m_pLbTblDbColumn->GetEntryCount() - 1; - m_pLbTblDbColumn->SelectEntryPos( nInsPos ); + if( nInsPos >= m_pLbTableDbColumn->GetEntryCount() ) + nInsPos = m_pLbTableDbColumn->GetEntryCount() - 1; + m_pLbTableDbColumn->SelectEntryPos( nInsPos ); if( nDelPos >= m_pLbTableCol->GetEntryCount() ) nDelPos = m_pLbTableCol->GetEntryCount() - 1; @@ -576,7 +576,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) m_pLbTableCol->SetTopEntry( nTopPos ); } else - bEnableTo = 0 != m_pLbTblDbColumn->GetEntryCount(); + bEnableTo = 0 != m_pLbTableDbColumn->GetEntryCount(); bEnableFrom = 0 != m_pLbTableCol->GetEntryCount(); } @@ -584,19 +584,19 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) { bEnableFrom = false; - m_pLbTblDbColumn->Clear(); + m_pLbTableDbColumn->Clear(); m_pLbTableCol->Clear(); for( size_t n = 0; n < aDBColumns.size(); ++n ) - m_pLbTblDbColumn->InsertEntry( aDBColumns[ n ]->sColumn, + m_pLbTableDbColumn->InsertEntry( aDBColumns[ n ]->sColumn, static_cast<sal_Int32>(n) ); - m_pLbTblDbColumn->SelectEntryPos( 0 ); + m_pLbTableDbColumn->SelectEntryPos( 0 ); } else if( pButton == m_pIbDbcolToEdit ) { bChgEnable = false; // move data to Edit: - OUString aFld( m_pLbTxtDbColumn->GetSelectEntry() ); - if( !aFld.isEmpty() ) + OUString aField( m_pLbTextDbColumn->GetSelectEntry() ); + if( !aField.isEmpty() ) { OUString aStr( m_pEdDbText->GetText() ); sal_Int32 nPos = static_cast<sal_Int32>(m_pEdDbText->GetSelection().Min()); @@ -605,25 +605,25 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) // first delete the existing selection aStr = aStr.replaceAt( nPos, nSel, "" ); - aFld = OUStringLiteral1<cDBFldStart>() + aFld + OUStringLiteral1<cDBFldEnd>(); + aField = OUStringLiteral1<cDBFieldStart>() + aField + OUStringLiteral1<cDBFieldEnd>(); if( !aStr.isEmpty() ) { if( nPos ) // one blank in front { sal_Unicode c = aStr[ nPos-1 ]; if( '\n' != c && '\r' != c ) - aFld = " " + aFld; + aField = " " + aField; } if( nPos < aStr.getLength() ) // one blank behind { sal_Unicode c = aStr[ nPos ]; if( '\n' != c && '\r' != c ) - aFld += " "; + aField += " "; } } - m_pEdDbText->SetText( aStr.replaceAt( nPos, 0, aFld ) ); - nPos += aFld.getLength(); + m_pEdDbText->SetText( aStr.replaceAt( nPos, 0, aField ) ); + nPos += aField.getLength(); m_pEdDbText->SetSelection( Selection( nPos )); } } @@ -635,13 +635,13 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) m_pIbDbcolOneFrom->Enable( bEnableFrom ); m_pIbDbcolAllFrom->Enable( bEnableFrom ); - m_pRbDbFmtFromDb->Enable( false ); - m_pRbDbFmtFromUsr->Enable( false ); - m_pLbDbFmtFromUsr->Enable( false ); + m_pRbDbFormatFromDb->Enable( false ); + m_pRbDbFormatFromUsr->Enable( false ); + m_pLbDbFormatFromUsr->Enable( false ); - m_pPbTblFormat->Enable( bEnableFrom ); + m_pPbTableFormat->Enable( bEnableFrom ); } - m_pLbTblDbColumn->SetUpdateMode( true ); + m_pLbTableDbColumn->SetUpdateMode( true ); m_pLbTableCol->SetUpdateMode( true ); return 0; @@ -650,39 +650,39 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox ) { Button* pButton = 0; - if( pBox == m_pLbTxtDbColumn ) + if( pBox == m_pLbTextDbColumn ) pButton = m_pIbDbcolToEdit; - else if( pBox == m_pLbTblDbColumn && m_pIbDbcolOneTo->IsEnabled() ) + else if( pBox == m_pLbTableDbColumn && m_pIbDbcolOneTo->IsEnabled() ) pButton = m_pIbDbcolOneTo; else if( pBox == m_pLbTableCol && m_pIbDbcolOneFrom->IsEnabled() ) pButton = m_pIbDbcolOneFrom; if( pButton ) - TblToFromHdl( pButton ); + TableToFromHdl( pButton ); return 0; } -IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) +IMPL_LINK( SwInsertDBColAutoPilot, TableFormatHdl, PushButton*, pButton ) { SwWrtShell& rSh = pView->GetWrtShell(); bool bNewSet = false; - if( !pTblSet ) + if( !pTableSet ) { bNewSet = true; - pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() ); + pTableSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() ); // At first acquire the simple attributes - pTblSet->Put( SfxStringItem( FN_PARAM_TABLE_NAME, rSh.GetUniqueTblName() )); - pTblSet->Put( SfxUInt16Item( FN_PARAM_TABLE_HEADLINE, 1 ) ); + pTableSet->Put( SfxStringItem( FN_PARAM_TABLE_NAME, rSh.GetUniqueTableName() )); + pTableSet->Put( SfxUInt16Item( FN_PARAM_TABLE_HEADLINE, 1 ) ); - pTblSet->Put( SfxUInt16Item( SID_BACKGRND_DESTINATION, - rSh.GetViewOptions()->GetTblDest() )); + pTableSet->Put( SfxUInt16Item( SID_BACKGRND_DESTINATION, + rSh.GetViewOptions()->GetTableDest() )); SvxBrushItem aBrush( RES_BACKGROUND ); - pTblSet->Put( aBrush ); - pTblSet->Put( aBrush, SID_ATTR_BRUSH_ROW ); - pTblSet->Put( aBrush, SID_ATTR_BRUSH_TABLE ); + pTableSet->Put( aBrush ); + pTableSet->Put( aBrush, SID_ATTR_BRUSH_ROW ); + pTableSet->Put( aBrush, SID_ATTR_BRUSH_TABLE ); SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); // table variant, when multiple table cells are selected @@ -695,7 +695,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) aBoxInfo.SetDefDist( MIN_BORDER_DIST ); // Single lines can have DontCare-status only in tables aBoxInfo.SetValid( SvxBoxInfoItemValidFlags::DISABLE, true ); - pTblSet->Put( aBoxInfo ); + pTableSet->Put( aBoxInfo ); SwGetCurColNumPara aPara; const sal_uInt16 nNum = rSh.GetCurColNum( &aPara ); @@ -704,7 +704,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) if( nNum ) { nWidth = aPara.pPrtRect->Width(); - const SwFmtCol& rCol = aPara.pFrmFmt->GetCol(); + const SwFormatCol& rCol = aPara.pFrameFormat->GetCol(); const SwColumns& rCols = rCol.GetColumns(); // initialise nStart und nEnd for nNum == 0 @@ -735,9 +735,9 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) pRep->SetSpace( nWidth ); pRep->SetWidth( nWidth ); pRep->SetWidthPercent( 100 ); - pTblSet->Put( SwPtrItem( FN_TABLE_REP, pRep )); + pTableSet->Put( SwPtrItem( FN_TABLE_REP, pRep )); - pTblSet->Put( SfxUInt16Item( SID_HTML_MODE, + pTableSet->Put( SfxUInt16Item( SID_HTML_MODE, ::GetHtmlMode( pView->GetDocShell() ))); } @@ -763,89 +763,89 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) pRep->SetSpace( nWidth ); pRep->SetWidth( nWidth ); pRep->SetWidthPercent( 100 ); - pTblSet->Put( SwPtrItem( FN_TABLE_REP, pRep )); + pTableSet->Put( SwPtrItem( FN_TABLE_REP, pRep )); } SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwTableTabDlg(pButton, rSh.GetAttrPool(), pTblSet, &rSh)); + boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwTableTabDlg(pButton, rSh.GetAttrPool(), pTableSet, &rSh)); OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute() ) - pTblSet->Put( *pDlg->GetOutputItemSet() ); + pTableSet->Put( *pDlg->GetOutputItemSet() ); else if( bNewSet ) { - delete pTblSet, pTblSet = 0; + delete pTableSet, pTableSet = 0; delete pRep, pRep = 0; } return 0; } -IMPL_LINK( SwInsertDBColAutoPilot, AutoFmtHdl, PushButton*, pButton ) +IMPL_LINK( SwInsertDBColAutoPilot, AutoFormatHdl, PushButton*, pButton ) { SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - boost::scoped_ptr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(), false, pTAutoFmt)); + boost::scoped_ptr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(), false, pTAutoFormat)); OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute()) - pDlg->FillAutoFmtOfIndex( pTAutoFmt ); + pDlg->FillAutoFormatOfIndex( pTAutoFormat ); return 0; } IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) { - ListBox* pGetBox = pBox == m_pLbDbFmtFromUsr + ListBox* pGetBox = pBox == m_pLbDbFormatFromUsr ? ( m_pRbAsTable->IsChecked() ? ( 0 == m_pLbTableCol->GetEntryData( 0 ) - ? m_pLbTblDbColumn.get() + ? m_pLbTableDbColumn.get() : m_pLbTableCol.get() ) - : m_pLbTxtDbColumn.get() ) + : m_pLbTextDbColumn.get() ) : pBox; SwInsDBColumn aSrch( pGetBox->GetSelectEntry(), 0 ); SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch ); - if( pBox == m_pLbDbFmtFromUsr ) + if( pBox == m_pLbDbFormatFromUsr ) { if( !aSrch.sColumn.isEmpty() ) { - aOldNumFmtLnk.Call( pBox ); - (*it)->nUsrNumFmt = m_pLbDbFmtFromUsr->GetFormat(); + aOldNumFormatLnk.Call( pBox ); + (*it)->nUsrNumFormat = m_pLbDbFormatFromUsr->GetFormat(); } } else { // set the selected FieldName at the FormatGroupBox, so that // it's clear what field is configured by the format! - OUString sTxt( m_pFormatFrame->get_label().copy( 0, nGBFmtLen )); + OUString sText( m_pFormatFrame->get_label().copy( 0, nGBFormatLen )); if( aSrch.sColumn.isEmpty() ) { - m_pRbDbFmtFromDb->Enable( false ); - m_pRbDbFmtFromUsr->Enable( false ); - m_pLbDbFmtFromUsr->Enable( false ); + m_pRbDbFormatFromDb->Enable( false ); + m_pRbDbFormatFromUsr->Enable( false ); + m_pLbDbFormatFromUsr->Enable( false ); } else { - bool bEnableFmt = (*it)->bHasFmt; - m_pRbDbFmtFromDb->Enable( bEnableFmt ); - m_pRbDbFmtFromUsr->Enable( bEnableFmt ); + bool bEnableFormat = (*it)->bHasFormat; + m_pRbDbFormatFromDb->Enable( bEnableFormat ); + m_pRbDbFormatFromUsr->Enable( bEnableFormat ); - if( bEnableFmt ) + if( bEnableFormat ) { - sTxt += " (" + aSrch.sColumn + ")"; + sText += " (" + aSrch.sColumn + ")"; } - bool bIsDBFmt = (*it)->bIsDBFmt; - m_pRbDbFmtFromDb->Check( bIsDBFmt ); - m_pRbDbFmtFromUsr->Check( !bIsDBFmt ); - m_pLbDbFmtFromUsr->Enable( !bIsDBFmt ); - if( !bIsDBFmt ) - m_pLbDbFmtFromUsr->SetDefFormat( (*it)->nUsrNumFmt ); + bool bIsDBFormat = (*it)->bIsDBFormat; + m_pRbDbFormatFromDb->Check( bIsDBFormat ); + m_pRbDbFormatFromUsr->Check( !bIsDBFormat ); + m_pLbDbFormatFromUsr->Enable( !bIsDBFormat ); + if( !bIsDBFormat ) + m_pLbDbFormatFromUsr->SetDefFormat( (*it)->nUsrNumFormat ); } - m_pFormatFrame->set_label(sTxt); + m_pFormatFrame->set_label(sText); // to know later on, what ListBox was the "active", a Flag // is remembered in the 1st entry @@ -867,45 +867,45 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton ) return 0; } -static void lcl_InsTextInArr( const OUString& rTxt, _DB_Columns& rColArr ) +static void lcl_InsTextInArr( const OUString& rText, _DB_Columns& rColArr ) { _DB_Column* pNew; sal_Int32 nSttPos = 0, nFndPos; - while( -1 != ( nFndPos = rTxt.indexOf( '\x0A', nSttPos )) ) + while( -1 != ( nFndPos = rText.indexOf( '\x0A', nSttPos )) ) { if( 1 < nFndPos ) { - pNew = new _DB_Column( rTxt.copy( nSttPos, nFndPos -1 ) ); + pNew = new _DB_Column( rText.copy( nSttPos, nFndPos -1 ) ); rColArr.push_back( pNew ); } pNew = new _DB_Column; rColArr.push_back( pNew ); nSttPos = nFndPos + 1; } - if( nSttPos < rTxt.getLength() ) + if( nSttPos < rText.getLength() ) { - pNew = new _DB_Column( rTxt.copy( nSttPos ) ); + pNew = new _DB_Column( rText.copy( nSttPos ) ); rColArr.push_back( pNew ); } } -bool SwInsertDBColAutoPilot::SplitTextToColArr( const OUString& rTxt, +bool SwInsertDBColAutoPilot::SplitTextToColArr( const OUString& rText, _DB_Columns& rColArr, bool bInsField ) { // create each of the database columns from the text again // and then save in an array // database columns are in <> and must be present in the columns' array: - OUString sTxt( rTxt ); + OUString sText( rText ); sal_Int32 nFndPos, nEndPos, nSttPos = 0; - while( -1 != ( nFndPos = sTxt.indexOf( cDBFldStart, nSttPos ))) + while( -1 != ( nFndPos = sText.indexOf( cDBFieldStart, nSttPos ))) { nSttPos = nFndPos + 1; - if( -1 != ( nEndPos = sTxt.indexOf( cDBFldEnd, nSttPos+1 ))) + if( -1 != ( nEndPos = sText.indexOf( cDBFieldEnd, nSttPos+1 ))) { // Text in <> brackets found: what is it: - SwInsDBColumn aSrch( sTxt.copy( nSttPos, nEndPos - nSttPos ), 0); + SwInsDBColumn aSrch( sText.copy( nSttPos, nEndPos - nSttPos ), 0); SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch ); if( it != aDBColumns.end() ) { @@ -917,22 +917,22 @@ bool SwInsertDBColAutoPilot::SplitTextToColArr( const OUString& rTxt, if( 1 < nSttPos ) { - ::lcl_InsTextInArr( sTxt.copy( 0, nSttPos-1 ), rColArr ); - sTxt = sTxt.copy( nSttPos-1 ); + ::lcl_InsTextInArr( sText.copy( 0, nSttPos-1 ), rColArr ); + sText = sText.copy( nSttPos-1 ); } - sTxt = sTxt.copy( rFndCol.sColumn.getLength() + 2 ); + sText = sText.copy( rFndCol.sColumn.getLength() + 2 ); nSttPos = 0; sal_uInt16 nSubType = 0; sal_uLong nFormat; - if( rFndCol.bHasFmt ) + if( rFndCol.bHasFormat ) { - if( rFndCol.bIsDBFmt ) - nFormat = rFndCol.nDBNumFmt; + if( rFndCol.bIsDBFormat ) + nFormat = rFndCol.nDBNumFormat; else { - nFormat = rFndCol.nUsrNumFmt; + nFormat = rFndCol.nUsrNumFormat; nSubType = nsSwExtendedSubType::SUB_OWN_FMT; } } @@ -942,10 +942,10 @@ bool SwInsertDBColAutoPilot::SplitTextToColArr( const OUString& rTxt, if( bInsField ) { SwWrtShell& rSh = pView->GetWrtShell(); - SwDBFieldType aFldType( rSh.GetDoc(), aSrch.sColumn, + SwDBFieldType aFieldType( rSh.GetDoc(), aSrch.sColumn, aDBData ); pNew = new _DB_Column( rFndCol, *new SwDBField( - static_cast<SwDBFieldType*>(rSh.InsertFldType( aFldType )), + static_cast<SwDBFieldType*>(rSh.InsertFieldType( aFieldType )), nFormat ) ); if( nSubType ) pNew->DB_ColumnData.pField->SetSubType( nSubType ); @@ -959,8 +959,8 @@ bool SwInsertDBColAutoPilot::SplitTextToColArr( const OUString& rTxt, } // don't forget the last text - if( !sTxt.isEmpty() ) - ::lcl_InsTextInArr( sTxt, rColArr ); + if( !sText.isEmpty() ) + ::lcl_InsTextInArr( sText, rColArr ); return !rColArr.empty(); } @@ -992,7 +992,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, rSh.StartUndo( UNDO_EMPTY ); bool bAsTable = m_pRbAsTable->IsChecked(); - SvNumberFormatter& rNumFmtr = *rSh.GetNumberFormatter(); + SvNumberFormatter& rNumFormatr = *rSh.GetNumberFormatter(); if( rSh.HasSelection() ) rSh.DelRight(); @@ -1018,22 +1018,22 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, ++nRows; // prepare the array for the selected columns - std::vector<SwInsDBColumn*> aColFlds; + std::vector<SwInsDBColumn*> aColFields; for( sal_Int32 n = 0; n < nCols; ++n ) { SwInsDBColumn aSrch( m_pLbTableCol->GetEntry( n ), 0 ); SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch ); if (it != aDBColumns.end()) - aColFlds.push_back(*it); + aColFields.push_back(*it); else { OSL_ENSURE( false, "database column not found" ); } } - if( static_cast<size_t>(nCols) != aColFlds.size() ) + if( static_cast<size_t>(nCols) != aColFields.size() ) { OSL_ENSURE( false, "not all database columns found" ); - nCols = static_cast<sal_Int32>(aColFlds.size()); + nCols = static_cast<sal_Int32>(aColFields.size()); } if(!nRows || !nCols) @@ -1046,14 +1046,14 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON); rSh.InsertTable( - pModOpt->GetInsTblFlags(bHTML), - nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFmt : 0) ); + pModOpt->GetInsTableFlags(bHTML), + nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFormat : 0) ); rSh.MoveTable( GetfnTablePrev(), GetfnTableStart() ); - if( pSelection && pTblSet ) + if( pSelection && pTableSet ) SetTabSet(); - SfxItemSet aTblSet( rSh.GetAttrPool(), RES_BOXATR_FORMAT, + SfxItemSet aTableSet( rSh.GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE ); bool bIsAutoUpdateCells = rSh.IsAutoUpdateCells(); rSh.SetAutoUpdateCells( false ); @@ -1064,7 +1064,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, { if( m_pRbHeadlColnms->IsChecked() ) { - rSh.SwEditShell::Insert2( aColFlds[ n ]->sColumn ); + rSh.SwEditShell::Insert2( aColFields[ n ]->sColumn ); } rSh.GoNextCell(); } @@ -1101,7 +1101,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, if( i || n ) rSh.GoNextCell(); - const SwInsDBColumn* pEntry = aColFlds[ n ]; + const SwInsDBColumn* pEntry = aColFields[ n ]; Reference< XColumn > xColumn; xCols->getByName(pEntry->sColumn) >>= xColumn; @@ -1114,31 +1114,31 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } try { - if( pEntry->bHasFmt ) + if( pEntry->bHasFormat ) { - SwTblBoxNumFormat aNumFmt( - pEntry->bIsDBFmt ? pEntry->nDBNumFmt - : pEntry->nUsrNumFmt ); - aTblSet.Put(aNumFmt); + SwTableBoxNumFormat aNumFormat( + pEntry->bIsDBFormat ? pEntry->nDBNumFormat + : pEntry->nUsrNumFormat ); + aTableSet.Put(aNumFormat); if( xColumn.is() ) { double fVal = xColumn->getDouble(); if( xColumn->wasNull() ) - aTblSet.ClearItem( RES_BOXATR_VALUE ); + aTableSet.ClearItem( RES_BOXATR_VALUE ); else { - if(rNumFmtr.GetType(aNumFmt.GetValue()) & css::util::NumberFormat::DATE) + if(rNumFormatr.GetType(aNumFormat.GetValue()) & css::util::NumberFormat::DATE) { ::Date aStandard(1,1,1900); - if (*rNumFmtr.GetNullDate() != aStandard) - fVal += (aStandard - *rNumFmtr.GetNullDate()); + if (*rNumFormatr.GetNullDate() != aStandard) + fVal += (aStandard - *rNumFormatr.GetNullDate()); } - aTblSet.Put( SwTblBoxValue( fVal )); + aTableSet.Put( SwTableBoxValue( fVal )); } } else - aTblSet.ClearItem( RES_BOXATR_VALUE ); - rSh.SetTblBoxFormulaAttrs( aTblSet ); + aTableSet.ClearItem( RES_BOXATR_VALUE ); + rSh.SetTableBoxFormulaAttrs( aTableSet ); } //#i60207# don't insert binary data as string - creates a loop else if( DataType::BINARY == eDataType || @@ -1186,13 +1186,13 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() ); - if( !pSelection && ( pTblSet || pTAutoFmt )) + if( !pSelection && ( pTableSet || pTAutoFormat )) { - if( pTblSet ) + if( pTableSet ) SetTabSet(); - if( pTAutoFmt ) - rSh.SetTableAutoFmt( *pTAutoFmt ); + if( pTAutoFormat ) + rSh.SetTableAutoFormat( *pTAutoFormat ); } rSh.SetAutoUpdateCells( bIsAutoUpdateCells ); } @@ -1214,22 +1214,22 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, rSh.DoUndo( false ); - SwTxtFmtColl* pColl = 0; + SwTextFormatColl* pColl = 0; { const OUString sTmplNm( m_pLbDbParaColl->GetSelectEntry() ); if( sNoTmpl != sTmplNm ) { - pColl = rSh.FindTxtFmtCollByName( sTmplNm ); + pColl = rSh.FindTextFormatCollByName( sTmplNm ); if( !pColl ) { const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); if( USHRT_MAX != nId ) - pColl = rSh.GetTxtCollFromPool( nId ); + pColl = rSh.GetTextCollFromPool( nId ); else - pColl = rSh.MakeTxtFmtColl( sTmplNm ); + pColl = rSh.MakeTextFormatColl( sTmplNm ); } - rSh.SetTxtFmtColl( pColl ); + rSh.SetTextFormatColl( pColl ); } } @@ -1258,8 +1258,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, } } aDBFormatData.aLocale = LanguageTag( rSh.GetCurLang() ).getLocale(); - SwDBNextSetField aNxtDBFld( static_cast<SwDBNextSetFieldType*>(rSh. - GetFldType( 0, RES_DBNEXTSETFLD )), + SwDBNextSetField aNxtDBField( static_cast<SwDBNextSetFieldType*>(rSh. + GetFieldType( 0, RES_DBNEXTSETFLD )), "1", "", aDBData ); bool bSetCrsr = true; @@ -1301,20 +1301,20 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, rSh.SplitNode(); // when the template is not the same as the follow template, // the selected has to be set newly - if( pColl && &pColl->GetNextTxtFmtColl() != pColl ) - rSh.SetTxtFmtColl( pColl ); + if( pColl && &pColl->GetNextTextFormatColl() != pColl ) + rSh.SetTextFormatColl( pColl ); break; case _DB_Column::DB_COL_FIELD: { - boost::scoped_ptr<SwDBField> pFld(static_cast<SwDBField *>( + boost::scoped_ptr<SwDBField> pField(static_cast<SwDBField *>( pDBCol->DB_ColumnData.pField->CopyField())); double nValue = DBL_MAX; Reference< XPropertySet > xColumnProps; xCols->getByName(pDBCol->pColInfo->sColumn) >>= xColumnProps; - pFld->SetExpansion( SwDBManager::GetDBField( + pField->SetExpansion( SwDBManager::GetDBField( xColumnProps, aDBFormatData, &nValue ) ); @@ -1334,11 +1334,11 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, if(aStandard != aCompare) nValue += (aStandard - aCompare); } - pFld->ChgValue( nValue, true ); + pField->ChgValue( nValue, true ); } - pFld->SetInitialized(); + pField->SetInitialized(); - rSh.Insert( *pFld ); + rSh.Insert( *pField ); } break; @@ -1355,13 +1355,13 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, DBL_MAX != nValue ) { Color* pCol; - if(rNumFmtr.GetType(pDBCol->DB_ColumnData.nFormat) & css::util::NumberFormat::DATE) + if(rNumFormatr.GetType(pDBCol->DB_ColumnData.nFormat) & css::util::NumberFormat::DATE) { ::Date aStandard(1,1,1900); - if (*rNumFmtr.GetNullDate() != aStandard) - nValue += (aStandard - *rNumFmtr.GetNullDate()); + if (*rNumFormatr.GetNullDate() != aStandard) + nValue += (aStandard - *rNumFormatr.GetNullDate()); } - rNumFmtr.GetOutputString( nValue, + rNumFormatr.GetOutputString( nValue, pDBCol->DB_ColumnData.nFormat, sIns, &pCol ); } @@ -1402,7 +1402,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, break; if( m_pRbAsField->IsChecked() ) - rSh.Insert( aNxtDBFld ); + rSh.Insert( aNxtDBField ); if( !rSh.IsSttPara() ) rSh.SwEditShell::SplitNode(); @@ -1442,19 +1442,19 @@ void SwInsertDBColAutoPilot::SetTabSet() SwWrtShell& rSh = pView->GetWrtShell(); const SfxPoolItem* pItem; - if( pTAutoFmt ) + if( pTAutoFormat ) { - if( pTAutoFmt->IsFrame() ) + if( pTAutoFormat->IsFrame() ) { // border is from AutoFormat - pTblSet->ClearItem( RES_BOX ); - pTblSet->ClearItem( SID_ATTR_BORDER_INNER ); + pTableSet->ClearItem( RES_BOX ); + pTableSet->ClearItem( SID_ATTR_BORDER_INNER ); } - if( pTAutoFmt->IsBackground() ) + if( pTAutoFormat->IsBackground() ) { - pTblSet->ClearItem( RES_BACKGROUND ); - pTblSet->ClearItem( SID_ATTR_BRUSH_ROW ); - pTblSet->ClearItem( SID_ATTR_BRUSH_TABLE ); + pTableSet->ClearItem( RES_BACKGROUND ); + pTableSet->ClearItem( SID_ATTR_BRUSH_ROW ); + pTableSet->ClearItem( SID_ATTR_BRUSH_TABLE ); } } else @@ -1464,21 +1464,21 @@ void SwInsertDBColAutoPilot::SetTabSet() static const sal_uInt16 aIds[3] = { RES_BACKGROUND, SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE }; for( int i = 0; i < 3; ++i ) - if( SfxItemState::SET == pTblSet->GetItemState( aIds[ i ], + if( SfxItemState::SET == pTableSet->GetItemState( aIds[ i ], false, &pItem ) && *pItem == aBrush ) - pTblSet->ClearItem( aIds[ i ] ); + pTableSet->ClearItem( aIds[ i ] ); } - if( SfxItemState::SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, false, + if( SfxItemState::SET == pTableSet->GetItemState( FN_PARAM_TABLE_NAME, false, &pItem ) && static_cast<const SfxStringItem*>(pItem)->GetValue() == - rSh.GetTableFmt()->GetName() ) - pTblSet->ClearItem( FN_PARAM_TABLE_NAME ); + rSh.GetTableFormat()->GetName() ) + pTableSet->ClearItem( FN_PARAM_TABLE_NAME ); rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() ); rSh.SetMark(); rSh.MoveTable( GetfnTableCurr(), GetfnTableEnd() ); - ItemSetToTableParam( *pTblSet, rSh ); + ItemSetToTableParam( *pTableSet, rSh ); rSh.ClearMark(); rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() ); @@ -1588,8 +1588,8 @@ void SwInsertDBColAutoPilot::ImplCommit() if( sNoTmpl != (sTmp = m_pLbDbParaColl->GetSelectEntry()) ) pValues[5].Value <<= sTmp; - if( pTAutoFmt ) - pValues[6].Value <<= pTAutoFmt->GetName(); + if( pTAutoFormat ) + pValues[6].Value <<= pTAutoFormat->GetName(); pValues[7].Value <<= m_pRbAsTable->IsChecked(); pValues[8].Value <<= m_pRbAsField->IsChecked(); @@ -1602,7 +1602,7 @@ void SwInsertDBColAutoPilot::ImplCommit() LanguageType ePrevLang = (LanguageType)-1; - SvNumberFormatter& rNFmtr = *pView->GetWrtShell().GetNumberFormatter(); + SvNumberFormatter& rNFormatr = *pView->GetWrtShell().GetNumberFormatter(); for(size_t nCol = 0; nCol < aDBColumns.size(); nCol++) { SwInsDBColumn* pColumn = aDBColumns[nCol]; @@ -1623,11 +1623,11 @@ void SwInsertDBColAutoPilot::ImplCommit() pSubValues[i].Name = pSubNodeNames[i]; pSubValues[0].Value <<= pColumn->sColumn; pSubValues[1].Value <<= i; - pSubValues[2].Value <<= pColumn->bHasFmt; - pSubValues[3].Value <<= pColumn->bIsDBFmt; + pSubValues[2].Value <<= pColumn->bHasFormat; + pSubValues[3].Value <<= pColumn->bIsDBFormat; SwStyleNameMapper::FillUIName( RES_POOLCOLL_STANDARD, sTmp ); - const SvNumberformat* pNF = rNFmtr.GetEntry( pColumn->nUsrNumFmt ); + const SvNumberformat* pNF = rNFormatr.GetEntry( pColumn->nUsrNumFormat ); LanguageType eLang; if( pNF ) { @@ -1656,7 +1656,7 @@ void SwInsertDBColAutoPilot::Load() { Sequence <OUString> aNames = GetNodeNames(OUString()); const OUString* pNames = aNames.getArray(); - SvNumberFormatter& rNFmtr = *pView->GetWrtShell().GetNumberFormatter(); + SvNumberFormatter& rNFormatr = *pView->GetWrtShell().GetNumberFormatter(); for(sal_Int32 nNode = 0; nNode < aNames.getLength(); nNode++) { //search for entries with the appropriate data source and table @@ -1676,9 +1676,9 @@ void SwInsertDBColAutoPilot::Load() pNewData->sTable = sCommand; pDataSourceProps[3] >>= pNewData->sEdit; - pDataSourceProps[4] >>= pNewData->sTblList; + pDataSourceProps[4] >>= pNewData->sTableList; pDataSourceProps[5] >>= pNewData->sTmplNm; - pDataSourceProps[6] >>= pNewData->sTAutoFmtNm; + pDataSourceProps[6] >>= pNewData->sTAutoFormatNm; if(pDataSourceProps[7].hasValue()) pNewData->bIsTable = *static_cast<sal_Bool const *>(pDataSourceProps[7].getValue()); if(pDataSourceProps[8].hasValue()) @@ -1716,11 +1716,11 @@ void SwInsertDBColAutoPilot::Load() pSubProps[1] >>= nIndex; SwInsDBColumn* pInsDBColumn = new SwInsDBColumn(sColumn, nIndex); if(pSubProps[2].hasValue()) - pInsDBColumn->bHasFmt = *static_cast<sal_Bool const *>(pSubProps[2].getValue()); + pInsDBColumn->bHasFormat = *static_cast<sal_Bool const *>(pSubProps[2].getValue()); if(pSubProps[3].hasValue()) - pInsDBColumn->bIsDBFmt = *static_cast<sal_Bool const *>(pSubProps[3].getValue()); + pInsDBColumn->bIsDBFormat = *static_cast<sal_Bool const *>(pSubProps[3].getValue()); - pSubProps[4] >>= pInsDBColumn->sUsrNumFmt; + pSubProps[4] >>= pInsDBColumn->sUsrNumFormat; OUString sNumberFormatLocale; pSubProps[5] >>= sNumberFormatLocale; @@ -1732,28 +1732,28 @@ void SwInsertDBColAutoPilot::Load() * case-insensitive equal language/country combos that may have * worked, for all others not. FIXME if you need to read old * data that you were never able to read before. */ - pInsDBColumn->eUsrNumFmtLng = LanguageTag::convertToLanguageType( sNumberFormatLocale ); + pInsDBColumn->eUsrNumFormatLng = LanguageTag::convertToLanguageType( sNumberFormatLocale ); - pInsDBColumn->nUsrNumFmt = rNFmtr.GetEntryKey( pInsDBColumn->sUsrNumFmt, - pInsDBColumn->eUsrNumFmtLng ); + pInsDBColumn->nUsrNumFormat = rNFormatr.GetEntryKey( pInsDBColumn->sUsrNumFormat, + pInsDBColumn->eUsrNumFormatLng ); pNewData->aDBColumns.insert(pInsDBColumn); } - OUString sTmp( pNewData->sTblList ); + OUString sTmp( pNewData->sTableList ); if( !sTmp.isEmpty() ) { sal_Int32 n = 0; do { const OUString sEntry( sTmp.getToken( 0, '\x0a', n ) ); //preselect column - if they still exist! - if(m_pLbTblDbColumn->GetEntryPos(sEntry) != LISTBOX_ENTRY_NOTFOUND) + if(m_pLbTableDbColumn->GetEntryPos(sEntry) != LISTBOX_ENTRY_NOTFOUND) { m_pLbTableCol->InsertEntry( sEntry ); - m_pLbTblDbColumn->RemoveEntry( sEntry ); + m_pLbTableDbColumn->RemoveEntry( sEntry ); } } while( n>=0 ); - if( !m_pLbTblDbColumn->GetEntryCount() ) + if( !m_pLbTableDbColumn->GetEntryCount() ) { m_pIbDbcolAllTo->Enable( false ); m_pIbDbcolOneTo->Enable( false ); @@ -1769,17 +1769,17 @@ void SwInsertDBColAutoPilot::Load() else m_pLbDbParaColl->SelectEntryPos( 0 ); - delete pTAutoFmt, pTAutoFmt = 0; - sTmp = pNewData->sTAutoFmtNm; + delete pTAutoFormat, pTAutoFormat = 0; + sTmp = pNewData->sTAutoFormatNm; if( !sTmp.isEmpty() ) { - // then load the AutoFmt file and look for Autoformat first - SwTableAutoFmtTbl aAutoFmtTbl; - aAutoFmtTbl.Load(); - for( size_t nAutoFmt = aAutoFmtTbl.size(); nAutoFmt; ) - if( sTmp == aAutoFmtTbl[ --nAutoFmt ].GetName() ) + // then load the AutoFormat file and look for Autoformat first + SwTableAutoFormatTable aAutoFormatTable; + aAutoFormatTable.Load(); + for( size_t nAutoFormat = aAutoFormatTable.size(); nAutoFormat; ) + if( sTmp == aAutoFormatTable[ --nAutoFormat ].GetName() ) { - pTAutoFmt = new SwTableAutoFmt( aAutoFmtTbl[ nAutoFmt ] ); + pTAutoFormat = new SwTableAutoFormat( aAutoFormatTable[ nAutoFormat ] ); break; } } @@ -1803,17 +1803,17 @@ void SwInsertDBColAutoPilot::Load() SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ]; if(rGet.sColumn == rSet.sColumn) { - if( rGet.bHasFmt && !rGet.bIsDBFmt ) + if( rGet.bHasFormat && !rGet.bIsDBFormat ) { - rSet.bIsDBFmt = false; - rSet.nUsrNumFmt = rNFmtr.GetEntryKey( rGet.sUsrNumFmt, - rGet.eUsrNumFmtLng ); - if( NUMBERFORMAT_ENTRY_NOT_FOUND == rSet.nUsrNumFmt ) + rSet.bIsDBFormat = false; + rSet.nUsrNumFormat = rNFormatr.GetEntryKey( rGet.sUsrNumFormat, + rGet.eUsrNumFormatLng ); + if( NUMBERFORMAT_ENTRY_NOT_FOUND == rSet.nUsrNumFormat ) { sal_Int32 nCheckPos; short nType; - rNFmtr.PutEntry( rGet.sUsrNumFmt, nCheckPos, nType, - rSet.nUsrNumFmt, rGet.eUsrNumFmtLng ); + rNFormatr.PutEntry( rGet.sUsrNumFormat, nCheckPos, nType, + rSet.nUsrNumFormat, rGet.eUsrNumFormatLng ); } } break; diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index a0f99e956e59..f13ccb01ea71 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -246,12 +246,12 @@ bool SwMailMergeLayoutPage::commitPage( ::svt::WizardTypes::CommitPageReason _eR return true; } -SwFrmFmt* SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView* pView, +SwFrameFormat* SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView* pView, SwMailMergeConfigItem& rConfigItem, const Point& rAddressPosition, bool bAlignToBody) { - SwFrmFmt* pAddressBlockFormat = 0; + SwFrameFormat* pAddressBlockFormat = 0; pView->GetWrtShell().StartUndo(UNDO_INSERT); if(rConfigItem.IsAddressBlock() && !rConfigItem.IsAddressInserted()) { @@ -274,7 +274,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView* pView, return pAddressBlockFormat; } -SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame( +SwFrameFormat* SwMailMergeLayoutPage::InsertAddressFrame( SwWrtShell& rShell, SwMailMergeConfigItem& rConfigItem, const Point& rDestination, @@ -289,20 +289,20 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame( RES_FRM_SIZE, RES_FRM_SIZE, RES_SURROUND, RES_SURROUND, 0 ); - aSet.Put(SwFmtAnchor(FLY_AT_PAGE, 1)); + aSet.Put(SwFormatAnchor(FLY_AT_PAGE, 1)); if(bAlignLeft) - aSet.Put(SwFmtHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA )); + aSet.Put(SwFormatHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA )); else - aSet.Put(SwFmtHoriOrient( rDestination.X(), text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME )); - aSet.Put(SwFmtVertOrient( rDestination.Y(), text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME )); - aSet.Put(SwFmtFrmSize( ATT_MIN_SIZE, DEFAULT_ADDRESS_WIDTH, DEFAULT_ADDRESS_HEIGHT )); + aSet.Put(SwFormatHoriOrient( rDestination.X(), text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME )); + aSet.Put(SwFormatVertOrient( rDestination.Y(), text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME )); + aSet.Put(SwFormatFrmSize( ATT_MIN_SIZE, DEFAULT_ADDRESS_WIDTH, DEFAULT_ADDRESS_HEIGHT )); // the example gets a border around the frame, the real document doesn't get one if(!bExample) aSet.Put(SvxBoxItem( RES_BOX )); - aSet.Put(SwFmtSurround( SURROUND_NONE )); + aSet.Put(SwFormatSurround( SURROUND_NONE )); rShell.NewFlyFrm(aSet, true ); - SwFrmFmt* pRet = rShell.GetFlyFrmFmt(); + SwFrameFormat* pRet = rShell.GetFlyFrameFormat(); OSL_ENSURE( pRet, "Fly not inserted" ); rShell.UnSelectFrm(); @@ -314,7 +314,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame( else { //the placeholders should be replaced by the appropriate fields - SwFldMgr aFldMgr(&rShell); + SwFieldMgr aFieldMgr(&rShell); //create a database string source.command.commandtype.column const SwDBData& rData = rConfigItem.GetCurrentDBData(); OUString sDBName(rData.sDataSource + OUString(DB_DELIM) @@ -372,22 +372,22 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame( if( !rExcludeCountry.isEmpty() ) { const OUString sExpression("[" + sDatabaseConditionPrefix + sCountryColumn + "]"); - SwInsertFld_Data aData(TYP_CONDTXTFLD, 0, + SwInsertField_Data aData(TYP_CONDTXTFLD, 0, sExpression + " != \"" + rExcludeCountry + "\"", sExpression, 0, &rShell ); - aFldMgr.InsertFld( aData ); + aFieldMgr.InsertField( aData ); } else { - SwInsertFld_Data aData(TYP_HIDDENPARAFLD, 0, "", "", 0, &rShell ); - aFldMgr.InsertFld( aData ); + SwInsertField_Data aData(TYP_HIDDENPARAFLD, 0, "", "", 0, &rShell ); + aFieldMgr.InsertField( aData ); } } else { - SwInsertFld_Data aData(TYP_DBFLD, 0, sDB, aEmptyOUStr, 0, &rShell ); - aFldMgr.InsertFld( aData ); + SwInsertField_Data aData(TYP_DBFLD, 0, sDB, aEmptyOUStr, 0, &rShell ); + aFieldMgr.InsertField( aData ); } } else if(!aItem.bIsReturn) @@ -398,8 +398,8 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame( { if(bHideEmptyParagraphs) { - SwInsertFld_Data aData(TYP_HIDDENPARAFLD, 0, sHideParagraphsExpression, aEmptyOUStr, 0, &rShell ); - aFldMgr.InsertFld( aData ); + SwInsertField_Data aData(TYP_HIDDENPARAFLD, 0, sHideParagraphsExpression, aEmptyOUStr, 0, &rShell ); + aFieldMgr.InsertField( aData ); } sHideParagraphsExpression.clear(); //now add a new paragraph @@ -408,8 +408,8 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame( } if(bHideEmptyParagraphs && !sHideParagraphsExpression.isEmpty()) { - SwInsertFld_Data aData(TYP_HIDDENPARAFLD, 0, sHideParagraphsExpression, aEmptyOUStr, 0, &rShell ); - aFldMgr.InsertFld( aData ); + SwInsertField_Data aData(TYP_HIDDENPARAFLD, 0, sHideParagraphsExpression, aEmptyOUStr, 0, &rShell ); + aFieldMgr.InsertField( aData ); } } return pRet; @@ -440,7 +440,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig //text needs to be appended while(nYPos < GREETING_TOP_DISTANCE) { - if(!rShell.AppendTxtNode()) + if(!rShell.AppendTextNode()) break; nYPos = rShell.GetCharRect().Top(); } @@ -475,7 +475,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig if(bIndividual) { //lock expression fields - prevents hiding of the paragraph to insert into - rShell.LockExpFlds(); + rShell.LockExpFields(); if(bExample) { for(sal_Int8 eGender = SwMailMergeConfigItem::FEMALE; @@ -494,7 +494,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig } else { - SwFldMgr aFldMgr(&rShell); + SwFieldMgr aFieldMgr(&rShell); //three paragraphs, each with an appropriate hidden paragraph field //are to be inserted @@ -548,13 +548,13 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig if(bHideEmptyParagraphs && !sHideParagraphsExpression.isEmpty()) { OUString sComplete = "(" + sCondition + ") OR (" + sHideParagraphsExpression + ")"; - SwInsertFld_Data aData(TYP_HIDDENPARAFLD, 0, sComplete, aEmptyOUStr, 0, &rShell ); - aFldMgr.InsertFld( aData ); + SwInsertField_Data aData(TYP_HIDDENPARAFLD, 0, sComplete, aEmptyOUStr, 0, &rShell ); + aFieldMgr.InsertField( aData ); } else { - SwInsertFld_Data aData(TYP_HIDDENPARAFLD, 0, sCondition, aEmptyOUStr, 0, &rShell ); - aFldMgr.InsertFld( aData ); + SwInsertField_Data aData(TYP_HIDDENPARAFLD, 0, sCondition, aEmptyOUStr, 0, &rShell ); + aFieldMgr.InsertField( aData ); } //now the text has to be inserted const ResStringArray& rHeaders = rConfigItem.GetDefaultAddressHeaders(); @@ -580,10 +580,10 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig break; } } - SwInsertFld_Data aData(TYP_DBFLD, 0, + SwInsertField_Data aData(TYP_DBFLD, 0, sDBName + sConvertedColumn, aEmptyOUStr, 0, &rShell ); - aFldMgr.InsertFld( aData ); + aFieldMgr.InsertField( aData ); } else { @@ -596,7 +596,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig } } - rShell.UnlockExpFlds(); + rShell.UnlockExpFields(); } else { @@ -616,7 +616,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig //put the cursor to the start of the paragraph rShell.SttPara(); - OSL_ENSURE(0 == rShell.GetTableFmt(), "What to do with a table here?"); + OSL_ENSURE(0 == rShell.GetTableFormat(), "What to do with a table here?"); } IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl) @@ -653,7 +653,7 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl) aZoom <<= (sal_Int16)DocumentZoomType::ENTIRE_PAGE; m_xViewProperties->setPropertyValue(UNO_NAME_ZOOM_TYPE, aZoom); - const SwFmtFrmSize& rPageSize = m_pExampleWrtShell->GetPageDesc( + const SwFormatFrmSize& rPageSize = m_pExampleWrtShell->GetPageDesc( m_pExampleWrtShell->GetCurPageDesc()).GetMaster().GetFrmSize(); m_pLeftMF->SetMax(rPageSize.GetWidth() - DEFAULT_LEFT_DISTANCE); m_pTopMF->SetMax(rPageSize.GetHeight() - DEFAULT_TOP_DISTANCE); @@ -695,10 +695,10 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, ChangeAddressHdl_Impl) RES_HORI_ORIENT, RES_HORI_ORIENT, 0 ); if(m_pAlignToBodyCB->IsChecked()) - aSet.Put(SwFmtHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA )); + aSet.Put(SwFormatHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA )); else - aSet.Put(SwFmtHoriOrient( nLeft, text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME )); - aSet.Put(SwFmtVertOrient( nTop, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME )); + aSet.Put(SwFormatHoriOrient( nLeft, text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME )); + aSet.Put(SwFormatVertOrient( nTop, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME )); m_pExampleWrtShell->GetDoc()->SetFlyFrmAttr( *m_pAddressBlockFormat, aSet ); } return 0; diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx index 5b9f9a8c3cc1..a5558103dadb 100644 --- a/sw/source/ui/dbui/mmlayoutpage.hxx +++ b/sw/source/ui/dbui/mmlayoutpage.hxx @@ -29,7 +29,7 @@ #include <com/sun/star/uno/Reference.h> class SwMailMergeWizard; -class SwFrmFmt; +class SwFrameFormat; class SwOneExampleFrame; class SwWrtShell; class SwView; @@ -57,7 +57,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage SwWrtShell* m_pExampleWrtShell; OUString m_sExampleURL; - SwFrmFmt* m_pAddressBlockFormat; + SwFrameFormat* m_pAddressBlockFormat; bool m_bIsGreetingInserted; @@ -71,7 +71,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage DECL_LINK(GreetingsHdl_Impl, PushButton*); DECL_LINK(AlignToTextHdl_Impl, CheckBox*); - static SwFrmFmt* InsertAddressFrame( + static SwFrameFormat* InsertAddressFrame( SwWrtShell& rShell, SwMailMergeConfigItem& rConfigItem, const Point& rDestination, @@ -86,7 +86,7 @@ public: virtual ~SwMailMergeLayoutPage(); virtual void dispose() SAL_OVERRIDE; - static SwFrmFmt* InsertAddressAndGreeting(SwView* pView, + static SwFrameFormat* InsertAddressAndGreeting(SwView* pView, SwMailMergeConfigItem& rConfigItem, const Point& rAddressPos, bool bAlignToBody); diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index db1b8e6fab00..249de7c41d3e 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -761,8 +761,8 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); SwgReaderOption aOpt; - aOpt.SetTxtFmts( true ); - aOpt.SetFrmFmts( true ); + aOpt.SetTextFormats( true ); + aOpt.SetFrameFormats( true ); aOpt.SetPageDescs( true ); aOpt.SetNumRules( true ); aOpt.SetMerge( false ); @@ -1166,8 +1166,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); SwgReaderOption aOpt; - aOpt.SetTxtFmts( true ); - aOpt.SetFrmFmts( true ); + aOpt.SetTextFormats( true ); + aOpt.SetFrameFormats( true ); aOpt.SetPageDescs( true ); aOpt.SetNumRules( true ); aOpt.SetMerge( false ); diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 1db947e9f3d4..e81e72a214be 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -116,12 +116,12 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent, Reference<XTablesSupplier> xTSupplier(m_xConnection, UNO_QUERY); if (xTSupplier.is()) { - Reference<XNameAccess> xTbls = xTSupplier->getTables(); - Sequence<OUString> aTbls = xTbls->getElementNames(); - const OUString* pTbls = aTbls.getConstArray(); - for(long i = 0; i < aTbls.getLength(); i++) + Reference<XNameAccess> xTables = xTSupplier->getTables(); + Sequence<OUString> aTables = xTables->getElementNames(); + const OUString* pTables = aTables.getConstArray(); + for(long i = 0; i < aTables.getLength(); i++) { - OUString sEntry = pTbls[i]; + OUString sEntry = pTables[i]; sEntry += "\t"; sEntry += m_sTable; SvTreeListEntry* pEntry = m_pTable->InsertEntry(sEntry); diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx index 6e2e045bd5fa..70909751a46e 100644 --- a/sw/source/ui/dialog/docstdlg.cxx +++ b/sw/source/ui/dialog/docstdlg.cxx @@ -107,7 +107,7 @@ void SwDocStatPage::Reset(const SfxItemSet *) void SwDocStatPage::SetData(const SwDocStat &rStat) { const LocaleDataWrapper& rLocaleData = GetSettings().GetUILocaleDataWrapper(); - m_pTableNo->SetText(rLocaleData.getNum(rStat.nTbl, 0)); + m_pTableNo->SetText(rLocaleData.getNum(rStat.nTable, 0)); m_pGrfNo->SetText(rLocaleData.getNum(rStat.nGrf, 0)); m_pOLENo->SetText(rLocaleData.getNum(rStat.nOLE, 0)); m_pPageNo->SetText(rLocaleData.getNum(rStat.nPage, 0)); diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 9bbd471bface..5eadf9a3f2e8 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -91,7 +91,7 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType ) SW_EVENT_OBJECT_SELECT ); } // no break; - case MACASSGN_INETFMT: // INetFmt-Attributes + case MACASSGN_INETFMT: // INetFormat-Attributes { aItem.AddEvent( OUString( SW_RES(STR_EVENT_MOUSEOVER_OBJECT) ), OUString(), SFX_EVENT_MOUSEOVER_OBJECT ); @@ -106,7 +106,7 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType ) return aItem; } -bool SwMacroAssignDlg::INetFmtDlg( vcl::Window* pParent, SwWrtShell& rSh, +bool SwMacroAssignDlg::INetFormatDlg( vcl::Window* pParent, SwWrtShell& rSh, SvxMacroItem*& rpINetItem ) { bool bRet = false; diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 28d8bbd25233..cd993247d8a2 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -108,11 +108,11 @@ IMPL_ABSTDLG_BASE(AbstractDropDownFieldDialog_Impl); IMPL_ABSTDLG_BASE(AbstractSwLabDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSwSelGlossaryDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSwAutoFormatDlg_Impl); -IMPL_ABSTDLG_BASE(AbstractSwFldDlg_Impl); +IMPL_ABSTDLG_BASE(AbstractSwFieldDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSwRenameXNamedDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSwModalRedlineAcceptDlg_Impl); IMPL_ABSTDLG_BASE(AbstractGlossaryDlg_Impl); -IMPL_ABSTDLG_BASE(AbstractFldInputDlg_Impl); +IMPL_ABSTDLG_BASE(AbstractFieldInputDlg_Impl); IMPL_ABSTDLG_BASE(AbstractInsFootNoteDlg_Impl); IMPL_ABSTDLG_BASE(AbstractInsTableDlg_Impl); IMPL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl); @@ -224,10 +224,10 @@ sal_uInt16 AbstractSwBreakDlg_Impl:: GetKind() return pDlg->GetPageNumber(); } -void AbstractSwConvertTableDlg_Impl::GetValues( sal_Unicode& rDelim,SwInsertTableOptions& rInsTblFlags, - SwTableAutoFmt const*& prTAFmt) +void AbstractSwConvertTableDlg_Impl::GetValues( sal_Unicode& rDelim,SwInsertTableOptions& rInsTableFlags, + SwTableAutoFormat const*& prTAFormat) { - pDlg->GetValues(rDelim,rInsTblFlags, prTAFmt); + pDlg->GetValues(rDelim,rInsTableFlags, prTAFormat); } void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::Any >& rSelection, @@ -308,72 +308,72 @@ void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(sal_Int32 nIdx) pDlg->SelectEntryPos( nIdx ); } -void AbstractSwAutoFormatDlg_Impl::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const +void AbstractSwAutoFormatDlg_Impl::FillAutoFormatOfIndex( SwTableAutoFormat*& rToFill ) const { - pDlg->FillAutoFmtOfIndex(rToFill); + pDlg->FillAutoFormatOfIndex(rToFill); } -void AbstractSwFldDlg_Impl::SetCurPageId( sal_uInt16 nId ) +void AbstractSwFieldDlg_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } -void AbstractSwFldDlg_Impl::SetCurPageId( const OString &rName ) +void AbstractSwFieldDlg_Impl::SetCurPageId( const OString &rName ) { pDlg->SetCurPageId( rName ); } -const SfxItemSet* AbstractSwFldDlg_Impl::GetOutputItemSet() const +const SfxItemSet* AbstractSwFieldDlg_Impl::GetOutputItemSet() const { return pDlg->GetOutputItemSet(); } -const sal_uInt16* AbstractSwFldDlg_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* AbstractSwFieldDlg_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } -void AbstractSwFldDlg_Impl::SetInputSet( const SfxItemSet* pInSet ) +void AbstractSwFieldDlg_Impl::SetInputSet( const SfxItemSet* pInSet ) { pDlg->SetInputSet( pInSet ); } -void AbstractSwFldDlg_Impl::SetText( const OUString& rStr ) +void AbstractSwFieldDlg_Impl::SetText( const OUString& rStr ) { pDlg->SetText( rStr ); } -OUString AbstractSwFldDlg_Impl::GetText() const +OUString AbstractSwFieldDlg_Impl::GetText() const { return pDlg->GetText(); } -void AbstractSwFldDlg_Impl::Start( bool bShowl ) +void AbstractSwFieldDlg_Impl::Start( bool bShowl ) { pDlg->Start( bShowl ); } -void AbstractSwFldDlg_Impl::Initialize(SfxChildWinInfo *pInfo) +void AbstractSwFieldDlg_Impl::Initialize(SfxChildWinInfo *pInfo) { pDlg->Initialize( pInfo ); } -void AbstractSwFldDlg_Impl::ReInitDlg() +void AbstractSwFieldDlg_Impl::ReInitDlg() { pDlg->ReInitDlg(); } -void AbstractSwFldDlg_Impl::ActivateDatabasePage() +void AbstractSwFieldDlg_Impl::ActivateDatabasePage() { pDlg->ActivateDatabasePage(); } -vcl::Window* AbstractSwFldDlg_Impl::GetWindow() +vcl::Window* AbstractSwFieldDlg_Impl::GetWindow() { return (vcl::Window*)pDlg; } -void AbstractSwFldDlg_Impl::ShowReferencePage() +void AbstractSwFieldDlg_Impl::ShowReferencePage() { pDlg->ShowReferencePage(); } @@ -405,17 +405,17 @@ OUString AbstractGlossaryDlg_Impl::GetCurrShortName() const return pDlg->GetCurrShortName(); } -void AbstractFldInputDlg_Impl::SetWindowState( const OString& rStr ) +void AbstractFieldInputDlg_Impl::SetWindowState( const OString& rStr ) { pDlg->SetWindowState( rStr ); } -OString AbstractFldInputDlg_Impl::GetWindowState( sal_uLong nMask ) const +OString AbstractFieldInputDlg_Impl::GetWindowState( sal_uLong nMask ) const { return pDlg->GetWindowState( nMask ); } -void AbstractFldInputDlg_Impl::EndDialog(long n) +void AbstractFieldInputDlg_Impl::EndDialog(long n) { pDlg->EndDialog(n); } @@ -446,10 +446,10 @@ void AbstractInsFootNoteDlg_Impl::SetText( const OUString& rStr ) } void AbstractInsTableDlg_Impl::GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol, - SwInsertTableOptions& rInsTblFlags, OUString& rTableAutoFmtName, - SwTableAutoFmt *& prTAFmt ) + SwInsertTableOptions& rInsTableFlags, OUString& rTableAutoFormatName, + SwTableAutoFormat *& prTAFormat ) { - pDlg->GetValues( rName, rRow, rCol, rInsTblFlags, rTableAutoFmtName, prTAFmt); + pDlg->GetValues( rName, rRow, rCol, rInsTableFlags, rTableAutoFormatName, prTAFormat); } OUString AbstractJavaEditDialog_Impl::GetScriptText() const @@ -666,7 +666,7 @@ SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSfxDialog( vcl::Window* p pDlg = VclPtr<SwBackgroundDlg>::Create( pParent, rSet ); break; case RC_DLG_SWNUMFMTDLG : - pDlg = VclPtr<SwNumFmtDlg>::Create( pParent, rSet ); + pDlg = VclPtr<SwNumFormatDlg>::Create( pParent, rSet ); break; default: break; @@ -720,9 +720,9 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView& } SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwCharDlg(vcl::Window* pParent, SwView& pVw, - const SfxItemSet& rCoreSet, sal_uInt8 nDialogMode, const OUString* pFmtStr) + const SfxItemSet& rCoreSet, sal_uInt8 nDialogMode, const OUString* pFormatStr) { - VclPtr<SfxTabDialog> pDlg = VclPtr<SwCharDlg>::Create(pParent, pVw, rCoreSet, nDialogMode, pFmtStr); + VclPtr<SfxTabDialog> pDlg = VclPtr<SwCharDlg>::Create(pParent, pVw, rCoreSet, nDialogMode, pFormatStr); return new AbstractTabDialog_Impl(pDlg); } @@ -829,9 +829,9 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclAbstractDialog ( vcl: return 0; } -AbstractSplitTableDialog * SwAbstractDialogFactory_Impl::CreateSplitTblDialog ( vcl::Window *pParent, SwWrtShell &rSh ) +AbstractSplitTableDialog * SwAbstractDialogFactory_Impl::CreateSplitTableDialog ( vcl::Window *pParent, SwWrtShell &rSh ) { - return new AbstractSplitTableDialog_Impl( VclPtr<SwSplitTblDlg>::Create( pParent, rSh) ); + return new AbstractSplitTableDialog_Impl( VclPtr<SwSplitTableDlg>::Create( pParent, rSh) ); } AbstractSwSelGlossaryDlg * SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg(vcl::Window * pParent, const OUString &rShortName) @@ -841,9 +841,9 @@ AbstractSwSelGlossaryDlg * SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg( } AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg(vcl::Window* pParent, - SwWrtShell* pShell, bool bSetAutoFmt, const SwTableAutoFmt* pSelFmt) + SwWrtShell* pShell, bool bSetAutoFormat, const SwTableAutoFormat* pSelFormat) { - VclPtr<SwAutoFormatDlg> pDlg = VclPtr<SwAutoFormatDlg>::Create(pParent, pShell, bSetAutoFmt, pSelFmt); + VclPtr<SwAutoFormatDlg> pDlg = VclPtr<SwAutoFormatDlg>::Create(pParent, pShell, bSetAutoFormat, pSelFormat); return new AbstractSwAutoFormatDlg_Impl(pDlg); } @@ -894,19 +894,19 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTableTabDlg(vcl::Win return new AbstractTabDialog_Impl(pDlg); } -AbstractSwFldDlg * SwAbstractDialogFactory_Impl::CreateSwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent) +AbstractSwFieldDlg * SwAbstractDialogFactory_Impl::CreateSwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent) { - VclPtr<SwFldDlg> pDlg = VclPtr<SwFldDlg>::Create(pB, pCW, pParent); - return new AbstractSwFldDlg_Impl(pDlg); + VclPtr<SwFieldDlg> pDlg = VclPtr<SwFieldDlg>::Create(pB, pCW, pParent); + return new AbstractSwFieldDlg_Impl(pDlg); } -SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwFldEditDlg ( SwView& rVw, int nResId ) +SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwFieldEditDlg ( SwView& rVw, int nResId ) { VclPtr<SfxModalDialog> pDlg; switch ( nResId ) { case RC_DLG_SWFLDEDITDLG : - pDlg = VclPtr<SwFldEditDlg>::Create( rVw ); + pDlg = VclPtr<SwFieldEditDlg>::Create( rVw ); break; default: break; @@ -931,9 +931,9 @@ AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRed return new AbstractSwModalRedlineAcceptDlg_Impl( pDlg ); } -VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTblMergeDialog(vcl::Window* pParent, bool& rWithPrev) +VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTableMergeDialog(vcl::Window* pParent, bool& rWithPrev) { - VclPtr<Dialog> pDlg = VclPtr<SwMergeTblDlg>::Create( pParent, rWithPrev ); + VclPtr<Dialog> pDlg = VclPtr<SwMergeTableDlg>::Create( pParent, rWithPrev ); return new VclAbstractDialog_Impl( pDlg ); } @@ -941,11 +941,11 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog(const OUS SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrm, - bool bFmt, + bool bFormat, const OString& sDefPage, - const OUString* pFmtStr ) + const OUString* pFormatStr ) { - VclPtr<SfxTabDialog> pDlg = VclPtr<SwFrmDlg>::Create(pFrame, pParent, rCoreSet, bNewFrm, rDialogType, bFmt, sDefPage, pFmtStr); + VclPtr<SfxTabDialog> pDlg = VclPtr<SwFrmDlg>::Create(pFrame, pParent, rCoreSet, bNewFrm, rDialogType, bFormat, sDefPage, pFormatStr); return new AbstractTabDialog_Impl(pDlg); } @@ -969,11 +969,11 @@ AbstractGlossaryDlg* SwAbstractDialogFactory_Impl::CreateGlossaryDlg(SfxViewFram return new AbstractGlossaryDlg_Impl( pDlg ); } -AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg(vcl::Window *pParent, +AbstractFieldInputDlg* SwAbstractDialogFactory_Impl::CreateFieldInputDlg(vcl::Window *pParent, SwWrtShell &rSh, SwField* pField, bool bNextButton) { - VclPtr<SwFldInputDlg> pDlg = VclPtr<SwFldInputDlg>::Create( pParent, rSh, pField, bNextButton ); - return new AbstractFldInputDlg_Impl( pDlg ); + VclPtr<SwFieldInputDlg> pDlg = VclPtr<SwFieldInputDlg>::Create( pParent, rSh, pField, bNextButton ); + return new AbstractFieldInputDlg_Impl( pDlg ); } AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( @@ -1011,7 +1011,7 @@ AbstractJavaEditDialog * SwAbstractDialogFactory_Impl::CreateJavaEditDialog( AbstractMailMergeDlg * SwAbstractDialogFactory_Impl::CreateMailMergeDlg( int nResId, vcl::Window* pParent, SwWrtShell& rSh, const OUString& rSourceName, - const OUString& rTblName, + const OUString& rTableName, sal_Int32 nCommandType, const uno::Reference< sdbc::XConnection>& xConnection, uno::Sequence< uno::Any >* pSelection ) @@ -1020,7 +1020,7 @@ AbstractMailMergeDlg * SwAbstractDialogFactory_Impl::CreateMailMergeDlg( int nRe switch ( nResId ) { case DLG_MAILMERGE : - pDlg = VclPtr<SwMailMergeDlg>::Create( pParent, rSh, rSourceName, rTblName, nCommandType, xConnection, pSelection ); + pDlg = VclPtr<SwMailMergeDlg>::Create( pParent, rSh, rSourceName, rTableName, nCommandType, xConnection, pSelection ); break; default: break; diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 7ef801594e14..8ff7d381390b 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -31,11 +31,11 @@ class SwInsertDBColAutoPilot; class SwLabDlg; class SwSelGlossaryDlg; class SwAutoFormatDlg; -class SwFldDlg; +class SwFieldDlg; class SwRenameXNamedDlg; class SwModalRedlineAcceptDlg; class SwTOXMark; -class SwSplitTblDlg; +class SwSplitTableDlg; #include "itabenum.hxx" @@ -111,7 +111,7 @@ class AbstractSwBreakDlg_Impl : public AbstractSwBreakDlg }; class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add for { - DECL_ABSTDLG_BASE(AbstractSplitTableDialog_Impl, SwSplitTblDlg) + DECL_ABSTDLG_BASE(AbstractSplitTableDialog_Impl, SwSplitTableDlg) virtual sal_uInt16 GetSplitMode() SAL_OVERRIDE; }; @@ -144,8 +144,8 @@ private: class AbstractSwConvertTableDlg_Impl : public AbstractSwConvertTableDlg { DECL_ABSTDLG_BASE( AbstractSwConvertTableDlg_Impl,SwConvertTableDlg) - virtual void GetValues( sal_Unicode& rDelim,SwInsertTableOptions& rInsTblFlags, - SwTableAutoFmt const*& prTAFmt) SAL_OVERRIDE; + virtual void GetValues( sal_Unicode& rDelim,SwInsertTableOptions& rInsTableFlags, + SwTableAutoFormat const*& prTAFormat) SAL_OVERRIDE; }; class AbstractSwInsertDBColAutoPilot_Impl : public AbstractSwInsertDBColAutoPilot @@ -190,12 +190,12 @@ class AbstractSwSelGlossaryDlg_Impl : public AbstractSwSelGlossaryDlg class AbstractSwAutoFormatDlg_Impl : public AbstractSwAutoFormatDlg { DECL_ABSTDLG_BASE(AbstractSwAutoFormatDlg_Impl,SwAutoFormatDlg ) - virtual void FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const SAL_OVERRIDE; + virtual void FillAutoFormatOfIndex( SwTableAutoFormat*& rToFill ) const SAL_OVERRIDE; }; -class AbstractSwFldDlg_Impl : public AbstractSwFldDlg +class AbstractSwFieldDlg_Impl : public AbstractSwFieldDlg { - DECL_ABSTDLG_BASE(AbstractSwFldDlg_Impl,SwFldDlg ) + DECL_ABSTDLG_BASE(AbstractSwFieldDlg_Impl,SwFieldDlg ) virtual void SetCurPageId( sal_uInt16 nId ) SAL_OVERRIDE; virtual void SetCurPageId( const OString &rName ) SAL_OVERRIDE; virtual const SfxItemSet* GetOutputItemSet() const SAL_OVERRIDE; @@ -235,10 +235,10 @@ class AbstractGlossaryDlg_Impl : public AbstractGlossaryDlg virtual OUString GetCurrShortName() const SAL_OVERRIDE; }; -class SwFldInputDlg; -class AbstractFldInputDlg_Impl : public AbstractFldInputDlg +class SwFieldInputDlg; +class AbstractFieldInputDlg_Impl : public AbstractFieldInputDlg { - DECL_ABSTDLG_BASE(AbstractFldInputDlg_Impl,SwFldInputDlg) + DECL_ABSTDLG_BASE(AbstractFieldInputDlg_Impl,SwFieldInputDlg) //from class SalFrame virtual void SetWindowState( const OString & rStr ) SAL_OVERRIDE ; virtual OString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const SAL_OVERRIDE ; @@ -262,8 +262,8 @@ class AbstractInsTableDlg_Impl : public AbstractInsTableDlg { DECL_ABSTDLG_BASE(AbstractInsTableDlg_Impl,SwInsTableDlg) virtual void GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol, - SwInsertTableOptions& rInsTblFlags, OUString& rTableAutoFmtName, - SwTableAutoFmt *& prTAFmt ) SAL_OVERRIDE; + SwInsertTableOptions& rInsTableFlags, OUString& rTableAutoFormatName, + SwTableAutoFormat *& prTAFormat ) SAL_OVERRIDE; }; class SwJavaEditDialog; @@ -388,7 +388,7 @@ public: virtual AbstractSwBreakDlg * CreateSwBreakDlg(vcl::Window *pParent, SwWrtShell &rSh) SAL_OVERRIDE; virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw) SAL_OVERRIDE; virtual SfxAbstractTabDialog * CreateSwCharDlg(vcl::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, - sal_uInt8 nDialogMode, const OUString* pFmtStr = 0) SAL_OVERRIDE; + sal_uInt8 nDialogMode, const OUString* pFormatStr = 0) SAL_OVERRIDE; virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, bool bToTable) SAL_OVERRIDE; virtual VclAbstractDialog * CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV,int nResId) SAL_OVERRIDE; @@ -415,32 +415,32 @@ public: virtual AbstractSwSelGlossaryDlg * CreateSwSelGlossaryDlg(vcl::Window * pParent, const OUString &rShortName) SAL_OVERRIDE; virtual VclAbstractDialog * CreateVclAbstractDialog ( vcl::Window * pParent, SwWrtShell &rSh, int nResId ) SAL_OVERRIDE; - virtual AbstractSplitTableDialog * CreateSplitTblDialog ( vcl::Window * pParent, SwWrtShell &rSh ) SAL_OVERRIDE; + virtual AbstractSplitTableDialog * CreateSplitTableDialog ( vcl::Window * pParent, SwWrtShell &rSh ) SAL_OVERRIDE; virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pShell, - bool bSetAutoFmt = true, - const SwTableAutoFmt* pSelFmt = 0 ) SAL_OVERRIDE; + bool bSetAutoFormat = true, + const SwTableAutoFormat* pSelFormat = 0 ) SAL_OVERRIDE; virtual SfxAbstractDialog * CreateSwBorderDlg (vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType, int nResId ) SAL_OVERRIDE; virtual SfxAbstractDialog * CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode, int nResId ) SAL_OVERRIDE; virtual VclAbstractDialog * CreateSwTableWidthDlg(vcl::Window *pParent, SwTableFUNC &rFnc) SAL_OVERRIDE; virtual SfxAbstractTabDialog* CreateSwTableTabDlg(vcl::Window* pParent, SfxItemPool& Pool, const SfxItemSet* pItemSet, SwWrtShell* pSh) SAL_OVERRIDE; - virtual AbstractSwFldDlg * CreateSwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent) SAL_OVERRIDE; - virtual SfxAbstractDialog* CreateSwFldEditDlg ( SwView& rVw, int nResId ) SAL_OVERRIDE; + virtual AbstractSwFieldDlg * CreateSwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent) SAL_OVERRIDE; + virtual SfxAbstractDialog* CreateSwFieldEditDlg ( SwView& rVw, int nResId ) SAL_OVERRIDE; virtual AbstractSwRenameXNamedDlg * CreateSwRenameXNamedDlg(vcl::Window* pParent, ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed, ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess) SAL_OVERRIDE; virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg(vcl::Window *pParent) SAL_OVERRIDE; - virtual VclAbstractDialog* CreateTblMergeDialog(vcl::Window* pParent, bool& rWithPrev) SAL_OVERRIDE; + virtual VclAbstractDialog* CreateTableMergeDialog(vcl::Window* pParent, bool& rWithPrev) SAL_OVERRIDE; virtual SfxAbstractTabDialog* CreateFrmTabDialog( const OUString &rDialogType, SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrm = true, - bool bFmt = false, + bool bFormat = false, const OString& sDefPage = OString(), - const OUString* pFmtStr = 0) SAL_OVERRIDE; + const OUString* pFormatStr = 0) SAL_OVERRIDE; virtual SfxAbstractApplyTabDialog* CreateTemplateDialog( vcl::Window* pParent, SfxStyleSheetBase& rBase, @@ -451,7 +451,7 @@ public: virtual AbstractGlossaryDlg* CreateGlossaryDlg(SfxViewFrame* pViewFrame, SwGlossaryHdl* pGlosHdl, SwWrtShell *pWrtShell) SAL_OVERRIDE; - virtual AbstractFldInputDlg* CreateFldInputDlg(vcl::Window *pParent, + virtual AbstractFieldInputDlg* CreateFieldInputDlg(vcl::Window *pParent, SwWrtShell &rSh, SwField* pField, bool bNextButton = false) SAL_OVERRIDE; virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( vcl::Window * pParent, SwWrtShell &rSh, bool bEd = false) SAL_OVERRIDE; @@ -463,7 +463,7 @@ public: virtual AbstractMailMergeDlg* CreateMailMergeDlg( int nResId, vcl::Window* pParent, SwWrtShell& rSh, const OUString& rSourceName, - const OUString& rTblName, + const OUString& rTableName, sal_Int32 nCommandType, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& xConnection, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >* pSelection = 0 ) SAL_OVERRIDE; diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 2ffb988b9c86..b2bc81e08cbd 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -69,47 +69,47 @@ using namespace ::com::sun::star; static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox ); -static void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames, const SwSectionFmt* pNewFmt ) +static void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames, const SwSectionFormat* pNewFormat ) { - if( !pNewFmt ) + if( !pNewFormat ) { - const size_t nCount = rSh.GetSectionFmtCount(); + const size_t nCount = rSh.GetSectionFormatCount(); for (size_t i = 0; i<nCount; i++) { SectionType eTmpType; - const SwSectionFmt* pFmt = &rSh.GetSectionFmt(i); - if( !pFmt->GetParent() && - pFmt->IsInNodesArr() && - (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION + const SwSectionFormat* pFormat = &rSh.GetSectionFormat(i); + if( !pFormat->GetParent() && + pFormat->IsInNodesArr() && + (eTmpType = pFormat->GetSection()->GetType()) != TOX_CONTENT_SECTION && TOX_HEADER_SECTION != eTmpType ) { - const OUString sString(pFmt->GetSection()->GetSectionName()); + const OUString sString(pFormat->GetSection()->GetSectionName()); if(pAvailNames) pAvailNames->InsertEntry(sString); rSubRegions.InsertEntry(sString); - lcl_FillList( rSh, rSubRegions, pAvailNames, pFmt ); + lcl_FillList( rSh, rSubRegions, pAvailNames, pFormat ); } } } else { SwSections aTmpArr; - pNewFmt->GetChildSections(aTmpArr, SORTSECT_POS); + pNewFormat->GetChildSections(aTmpArr, SORTSECT_POS); if( !aTmpArr.empty() ) { SectionType eTmpType; for( const auto pSect : aTmpArr ) { - const SwSectionFmt* pFmt = pSect->GetFmt(); - if( pFmt->IsInNodesArr()&& - (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION + const SwSectionFormat* pFormat = pSect->GetFormat(); + if( pFormat->IsInNodesArr()&& + (eTmpType = pFormat->GetSection()->GetType()) != TOX_CONTENT_SECTION && TOX_HEADER_SECTION != eTmpType ) { - const OUString sString(pFmt->GetSection()->GetSectionName()); + const OUString sString(pFormat->GetSection()->GetSectionName()); if(pAvailNames) pAvailNames->InsertEntry(sString); rSubRegions.InsertEntry(sString); - lcl_FillList( rSh, rSubRegions, pAvailNames, pFmt ); + lcl_FillList( rSh, rSubRegions, pAvailNames, pFormat ); } } } @@ -135,11 +135,11 @@ class SectRepr { private: SwSectionData m_SectionData; - SwFmtCol m_Col; + SwFormatCol m_Col; SvxBrushItem m_Brush; - SwFmtFtnAtTxtEnd m_FtnNtAtEnd; - SwFmtEndAtTxtEnd m_EndNtAtEnd; - SwFmtNoBalancedColumns m_Balance; + SwFormatFootnoteAtTextEnd m_FootnoteNtAtEnd; + SwFormatEndAtTextEnd m_EndNtAtEnd; + SwFormatNoBalancedColumns m_Balance; SvxFrameDirectionItem m_FrmDirItem; SvxLRSpaceItem m_LRSpaceItem; size_t m_nArrPos; @@ -156,11 +156,11 @@ public: { return m_nArrPos < rSectRef.GetArrPos(); } SwSectionData & GetSectionData() { return m_SectionData; } - SwFmtCol& GetCol() { return m_Col; } + SwFormatCol& GetCol() { return m_Col; } SvxBrushItem& GetBackground() { return m_Brush; } - SwFmtFtnAtTxtEnd& GetFtnNtAtEnd() { return m_FtnNtAtEnd; } - SwFmtEndAtTxtEnd& GetEndNtAtEnd() { return m_EndNtAtEnd; } - SwFmtNoBalancedColumns& GetBalance() { return m_Balance; } + SwFormatFootnoteAtTextEnd& GetFootnoteNtAtEnd() { return m_FootnoteNtAtEnd; } + SwFormatEndAtTextEnd& GetEndNtAtEnd() { return m_EndNtAtEnd; } + SwFormatNoBalancedColumns& GetBalance() { return m_Balance; } SvxFrameDirectionItem& GetFrmDir() { return m_FrmDirItem; } SvxLRSpaceItem& GetLRSpace() { return m_LRSpaceItem; } @@ -191,16 +191,16 @@ SectRepr::SectRepr( size_t nPos, SwSection& rSect ) , m_bContent(m_SectionData.GetLinkFileName().isEmpty()) , m_bSelected(false) { - SwSectionFmt *pFmt = rSect.GetFmt(); - if( pFmt ) + SwSectionFormat *pFormat = rSect.GetFormat(); + if( pFormat ) { - m_Col = pFmt->GetCol(); - m_Brush = pFmt->makeBackgroundBrushItem(); - m_FtnNtAtEnd = pFmt->GetFtnAtTxtEnd(); - m_EndNtAtEnd = pFmt->GetEndAtTxtEnd(); - m_Balance.SetValue(pFmt->GetBalancedColumns().GetValue()); - m_FrmDirItem = pFmt->GetFrmDir(); - m_LRSpaceItem = pFmt->GetLRSpace(); + m_Col = pFormat->GetCol(); + m_Brush = pFormat->makeBackgroundBrushItem(); + m_FootnoteNtAtEnd = pFormat->GetFootnoteAtTextEnd(); + m_EndNtAtEnd = pFormat->GetEndAtTextEnd(); + m_Balance.SetValue(pFormat->GetBalancedColumns().GetValue()); + m_FrmDirItem = pFormat->GetFrmDir(); + m_LRSpaceItem = pFormat->GetLRSpace(); } } @@ -438,26 +438,26 @@ bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox) } // recursively look for child-sections -void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pEntry ) +void SwEditRegionDlg::RecurseList( const SwSectionFormat* pFormat, SvTreeListEntry* pEntry ) { SvTreeListEntry* pSelEntry = 0; - if (!pFmt) + if (!pFormat) { - const size_t nCount=rSh.GetSectionFmtCount(); + const size_t nCount=rSh.GetSectionFormatCount(); for ( size_t n = 0; n < nCount; n++ ) { SectionType eTmpType; - if( !( pFmt = &rSh.GetSectionFmt(n))->GetParent() && - pFmt->IsInNodesArr() && - (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION + if( !( pFormat = &rSh.GetSectionFormat(n))->GetParent() && + pFormat->IsInNodesArr() && + (eTmpType = pFormat->GetSection()->GetType()) != TOX_CONTENT_SECTION && TOX_HEADER_SECTION != eTmpType ) { - SwSection *pSect = pFmt->GetSection(); + SwSection *pSect = pFormat->GetSection(); SectRepr* pSectRepr = new SectRepr( n, *pSect ); Image aImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden()); pEntry = m_pTree->InsertEntry(pSect->GetSectionName(), aImg, aImg); pEntry->SetUserData(pSectRepr); - RecurseList( pFmt, pEntry ); + RecurseList( pFormat, pEntry ); if (pEntry->HasChildren()) m_pTree->Expand(pEntry); if (pCurrSect==pSect) @@ -469,25 +469,25 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pE { SwSections aTmpArr; SvTreeListEntry* pNEntry; - pFmt->GetChildSections(aTmpArr, SORTSECT_POS); + pFormat->GetChildSections(aTmpArr, SORTSECT_POS); if( !aTmpArr.empty() ) { for( const auto pSect : aTmpArr ) { SectionType eTmpType; - pFmt = pSect->GetFmt(); - if( pFmt->IsInNodesArr() && - (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION + pFormat = pSect->GetFormat(); + if( pFormat->IsInNodesArr() && + (eTmpType = pFormat->GetSection()->GetType()) != TOX_CONTENT_SECTION && TOX_HEADER_SECTION != eTmpType ) { SectRepr* pSectRepr=new SectRepr( - FindArrPos( pSect->GetFmt() ), *pSect ); + FindArrPos( pSect->GetFormat() ), *pSect ); Image aImage = BuildBitmap( pSect->IsProtect(), pSect->IsHidden()); pNEntry = m_pTree->InsertEntry( pSect->GetSectionName(), aImage, aImage, pEntry); pNEntry->SetUserData(pSectRepr); - RecurseList( pSect->GetFmt(), pNEntry ); + RecurseList( pSect->GetFormat(), pNEntry ); if( pNEntry->HasChildren()) m_pTree->Expand(pNEntry); if (pCurrSect==pSect) @@ -503,11 +503,11 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pE } } -size_t SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt ) +size_t SwEditRegionDlg::FindArrPos(const SwSectionFormat* pFormat ) { - const size_t nCount=rSh.GetSectionFmtCount(); + const size_t nCount=rSh.GetSectionFormatCount(); for ( size_t i = 0; i < nCount; i++ ) - if ( pFmt == &rSh.GetSectionFmt(i) ) + if ( pFormat == &rSh.GetSectionFormat(i) ) return i; OSL_FAIL("SectionFormat not on the list" ); @@ -768,8 +768,8 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl) // StartUndo must certainly also happen not before the formats // are copied (ClearRedo!) - const SwSectionFmts& rDocFmts = rSh.GetDoc()->GetSections(); - SwSectionFmts aOrigArray(rDocFmts); + const SwSectionFormats& rDocFormats = rSh.GetDoc()->GetSections(); + SwSectionFormats aOrigArray(rDocFormats); rSh.StartAllAction(); rSh.StartUndo(); @@ -779,35 +779,35 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl) while( pEntry ) { SectReprPtr pRepr = static_cast<SectReprPtr>(pEntry->GetUserData()); - SwSectionFmt* pFmt = aOrigArray[ pRepr->GetArrPos() ]; + SwSectionFormat* pFormat = aOrigArray[ pRepr->GetArrPos() ]; if (!pRepr->GetSectionData().IsProtectFlag()) { pRepr->GetSectionData().SetPassword(uno::Sequence<sal_Int8 >()); } - size_t nNewPos = rDocFmts.GetPos(pFmt); + size_t nNewPos = rDocFormats.GetPos(pFormat); if ( SIZE_MAX != nNewPos ) { - boost::scoped_ptr<SfxItemSet> pSet(pFmt->GetAttrSet().Clone( false )); - if( pFmt->GetCol() != pRepr->GetCol() ) + boost::scoped_ptr<SfxItemSet> pSet(pFormat->GetAttrSet().Clone( false )); + if( pFormat->GetCol() != pRepr->GetCol() ) pSet->Put( pRepr->GetCol() ); - SvxBrushItem aBrush(pFmt->makeBackgroundBrushItem(false)); + SvxBrushItem aBrush(pFormat->makeBackgroundBrushItem(false)); if( aBrush != pRepr->GetBackground() ) pSet->Put( pRepr->GetBackground() ); - if( pFmt->GetFtnAtTxtEnd(false) != pRepr->GetFtnNtAtEnd() ) - pSet->Put( pRepr->GetFtnNtAtEnd() ); + if( pFormat->GetFootnoteAtTextEnd(false) != pRepr->GetFootnoteNtAtEnd() ) + pSet->Put( pRepr->GetFootnoteNtAtEnd() ); - if( pFmt->GetEndAtTxtEnd(false) != pRepr->GetEndNtAtEnd() ) + if( pFormat->GetEndAtTextEnd(false) != pRepr->GetEndNtAtEnd() ) pSet->Put( pRepr->GetEndNtAtEnd() ); - if( pFmt->GetBalancedColumns() != pRepr->GetBalance() ) + if( pFormat->GetBalancedColumns() != pRepr->GetBalance() ) pSet->Put( pRepr->GetBalance() ); - if( pFmt->GetFrmDir() != pRepr->GetFrmDir() ) + if( pFormat->GetFrmDir() != pRepr->GetFrmDir() ) pSet->Put( pRepr->GetFrmDir() ); - if( pFmt->GetLRSpace() != pRepr->GetLRSpace()) + if( pFormat->GetLRSpace() != pRepr->GetLRSpace()) pSet->Put( pRepr->GetLRSpace()); rSh.UpdateSection( nNewPos, pRepr->GetSectionData(), @@ -818,10 +818,10 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl) for (SectReprArr::reverse_iterator aI = aSectReprArr.rbegin(), aEnd = aSectReprArr.rend(); aI != aEnd; ++aI) { - SwSectionFmt* pFmt = aOrigArray[ aI->GetArrPos() ]; - const size_t nNewPos = rDocFmts.GetPos( pFmt ); + SwSectionFormat* pFormat = aOrigArray[ aI->GetArrPos() ]; + const size_t nNewPos = rDocFormats.GetPos( pFormat ); if( SIZE_MAX != nNewPos ) - rSh.DelSectionFmt( nNewPos ); + rSh.DelSectionFormat( nNewPos ); } aOrigArray.clear(); @@ -1063,22 +1063,22 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl) aSet.Put( pSectRepr->GetCol() ); aSet.Put( pSectRepr->GetBackground() ); - aSet.Put( pSectRepr->GetFtnNtAtEnd() ); + aSet.Put( pSectRepr->GetFootnoteNtAtEnd() ); aSet.Put( pSectRepr->GetEndNtAtEnd() ); aSet.Put( pSectRepr->GetBalance() ); aSet.Put( pSectRepr->GetFrmDir() ); aSet.Put( pSectRepr->GetLRSpace() ); - const SwSectionFmts& rDocFmts = rSh.GetDoc()->GetSections(); - SwSectionFmts aOrigArray(rDocFmts); + const SwSectionFormats& rDocFormats = rSh.GetDoc()->GetSections(); + SwSectionFormats aOrigArray(rDocFormats); - SwSectionFmt* pFmt = aOrigArray[pSectRepr->GetArrPos()]; - long nWidth = rSh.GetSectionWidth(*pFmt); + SwSectionFormat* pFormat = aOrigArray[pSectRepr->GetArrPos()]; + long nWidth = rSh.GetSectionWidth(*pFormat); aOrigArray.clear(); if (!nWidth) nWidth = USHRT_MAX; - aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth)); + aSet.Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth)); aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); ScopedVclPtrInstance< SwSectionPropertyTabDialog > aTabDlg(this, aSet, rSh); @@ -1088,14 +1088,14 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl) if( pOutSet && pOutSet->Count() ) { const SfxPoolItem *pColItem, *pBrushItem, - *pFtnItem, *pEndItem, *pBalanceItem, + *pFootnoteItem, *pEndItem, *pBalanceItem, *pFrmDirItem, *pLRSpaceItem; SfxItemState eColState = pOutSet->GetItemState( RES_COL, false, &pColItem ); SfxItemState eBrushState = pOutSet->GetItemState( RES_BACKGROUND, false, &pBrushItem ); - SfxItemState eFtnState = pOutSet->GetItemState( - RES_FTN_AT_TXTEND, false, &pFtnItem ); + SfxItemState eFootnoteState = pOutSet->GetItemState( + RES_FTN_AT_TXTEND, false, &pFootnoteItem ); SfxItemState eEndState = pOutSet->GetItemState( RES_END_AT_TXTEND, false, &pEndItem ); SfxItemState eBalanceState = pOutSet->GetItemState( @@ -1107,7 +1107,7 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl) if( SfxItemState::SET == eColState || SfxItemState::SET == eBrushState || - SfxItemState::SET == eFtnState || + SfxItemState::SET == eFootnoteState || SfxItemState::SET == eEndState || SfxItemState::SET == eBalanceState|| SfxItemState::SET == eFrmDirState|| @@ -1118,15 +1118,15 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl) { SectReprPtr pRepr = static_cast<SectReprPtr>(pSelEntry->GetUserData()); if( SfxItemState::SET == eColState ) - pRepr->GetCol() = *static_cast<const SwFmtCol*>(pColItem); + pRepr->GetCol() = *static_cast<const SwFormatCol*>(pColItem); if( SfxItemState::SET == eBrushState ) pRepr->GetBackground() = *static_cast<const SvxBrushItem*>(pBrushItem); - if( SfxItemState::SET == eFtnState ) - pRepr->GetFtnNtAtEnd() = *static_cast<const SwFmtFtnAtTxtEnd*>(pFtnItem); + if( SfxItemState::SET == eFootnoteState ) + pRepr->GetFootnoteNtAtEnd() = *static_cast<const SwFormatFootnoteAtTextEnd*>(pFootnoteItem); if( SfxItemState::SET == eEndState ) - pRepr->GetEndNtAtEnd() = *static_cast<const SwFmtEndAtTxtEnd*>(pEndItem); + pRepr->GetEndNtAtEnd() = *static_cast<const SwFormatEndAtTextEnd*>(pEndItem); if( SfxItemState::SET == eBalanceState ) - pRepr->GetBalance().SetValue(static_cast<const SwFmtNoBalancedColumns*>(pBalanceItem)->GetValue()); + pRepr->GetBalance().SetValue(static_cast<const SwFormatNoBalancedColumns*>(pBalanceItem)->GetValue()); if( SfxItemState::SET == eFrmDirState ) pRepr->GetFrmDir().SetValue(static_cast<const SvxFrameDirectionItem*>(pFrmDirItem)->GetValue()); if( SfxItemState::SET == eLRState ) @@ -1428,7 +1428,7 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog( m_nSectionPageId = AddTabPage("section", SwInsertSectionTabPage::Create, 0); m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, 0); m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0); - m_nNotePageId = AddTabPage("notes", SwSectionFtnEndTabPage::Create, 0); + m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, 0); m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create, 0); SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get(); @@ -1461,7 +1461,7 @@ void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if (nId == m_nColumnPageId) { - const SwFmtFrmSize& rSize = static_cast<const SwFmtFrmSize&>(GetInputSetImpl()->Get(RES_FRM_SIZE)); + const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(GetInputSetImpl()->Get(RES_FRM_SIZE)); static_cast<SwColumnPage&>(rPage).SetPageWidth(rSize.GetWidth()); static_cast<SwColumnPage&>(rPage).ShowBalance(true); static_cast<SwColumnPage&>(rPage).SetInSection(true); @@ -1492,7 +1492,7 @@ short SwInsertSectionTabDialog::Ok() if(SfxItemState::SET == pOutputItemSet->GetItemState(RES_COL, false, &pCol)) { aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS, - static_cast<const SwFmtCol*>(pCol)->GetColumns().size())); + static_cast<const SwFormatCol*>(pCol)->GetColumns().size())); } aRequest.AppendItem(SfxStringItem( FN_PARAM_REGION_NAME, m_pSectionData->GetSectionName())); @@ -1844,68 +1844,68 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil return 0; } -SwSectionFtnEndTabPage::SwSectionFtnEndTabPage( vcl::Window *pParent, +SwSectionFootnoteEndTabPage::SwSectionFootnoteEndTabPage( vcl::Window *pParent, const SfxItemSet &rAttrSet) : SfxTabPage( pParent, "FootnotesEndnotesTabPage", "modules/swriter/ui/footnotesendnotestabpage.ui", &rAttrSet ) { - get(pFtnNtAtTextEndCB,"ftnntattextend"); + get(pFootnoteNtAtTextEndCB,"ftnntattextend"); - get(pFtnNtNumCB,"ftnntnum"); - get(pFtnOffsetLbl,"ftnoffset_label"); - get(pFtnOffsetFld,"ftnoffset"); + get(pFootnoteNtNumCB,"ftnntnum"); + get(pFootnoteOffsetLbl,"ftnoffset_label"); + get(pFootnoteOffsetField,"ftnoffset"); - get(pFtnNtNumFmtCB,"ftnntnumfmt"); - get(pFtnPrefixFT,"ftnprefix_label"); - get(pFtnPrefixED,"ftnprefix"); - get(pFtnNumViewBox,"ftnnumviewbox"); - get(pFtnSuffixFT,"ftnsuffix_label"); - get(pFtnSuffixED,"ftnsuffix"); + get(pFootnoteNtNumFormatCB,"ftnntnumfmt"); + get(pFootnotePrefixFT,"ftnprefix_label"); + get(pFootnotePrefixED,"ftnprefix"); + get(pFootnoteNumViewBox,"ftnnumviewbox"); + get(pFootnoteSuffixFT,"ftnsuffix_label"); + get(pFootnoteSuffixED,"ftnsuffix"); get(pEndNtAtTextEndCB,"endntattextend"); get(pEndNtNumCB,"endntnum"); get(pEndOffsetLbl,"endoffset_label"); - get(pEndOffsetFld,"endoffset"); + get(pEndOffsetField,"endoffset"); - get(pEndNtNumFmtCB,"endntnumfmt"); + get(pEndNtNumFormatCB,"endntnumfmt"); get(pEndPrefixFT,"endprefix_label"); get(pEndPrefixED,"endprefix"); get(pEndNumViewBox,"endnumviewbox"); get(pEndSuffixFT,"endsuffix_label"); get(pEndSuffixED,"endsuffix"); - Link<> aLk( LINK( this, SwSectionFtnEndTabPage, FootEndHdl)); - pFtnNtAtTextEndCB->SetClickHdl( aLk ); - pFtnNtNumCB->SetClickHdl( aLk ); + Link<> aLk( LINK( this, SwSectionFootnoteEndTabPage, FootEndHdl)); + pFootnoteNtAtTextEndCB->SetClickHdl( aLk ); + pFootnoteNtNumCB->SetClickHdl( aLk ); pEndNtAtTextEndCB->SetClickHdl( aLk ); pEndNtNumCB->SetClickHdl( aLk ); - pFtnNtNumFmtCB->SetClickHdl( aLk ); - pEndNtNumFmtCB->SetClickHdl( aLk ); + pFootnoteNtNumFormatCB->SetClickHdl( aLk ); + pEndNtNumFormatCB->SetClickHdl( aLk ); } -SwSectionFtnEndTabPage::~SwSectionFtnEndTabPage() +SwSectionFootnoteEndTabPage::~SwSectionFootnoteEndTabPage() { disposeOnce(); } -void SwSectionFtnEndTabPage::dispose() +void SwSectionFootnoteEndTabPage::dispose() { - pFtnNtAtTextEndCB.clear(); - pFtnNtNumCB.clear(); - pFtnOffsetLbl.clear(); - pFtnOffsetFld.clear(); - pFtnNtNumFmtCB.clear(); - pFtnPrefixFT.clear(); - pFtnPrefixED.clear(); - pFtnNumViewBox.clear(); - pFtnSuffixFT.clear(); - pFtnSuffixED.clear(); + pFootnoteNtAtTextEndCB.clear(); + pFootnoteNtNumCB.clear(); + pFootnoteOffsetLbl.clear(); + pFootnoteOffsetField.clear(); + pFootnoteNtNumFormatCB.clear(); + pFootnotePrefixFT.clear(); + pFootnotePrefixED.clear(); + pFootnoteNumViewBox.clear(); + pFootnoteSuffixFT.clear(); + pFootnoteSuffixED.clear(); pEndNtAtTextEndCB.clear(); pEndNtNumCB.clear(); pEndOffsetLbl.clear(); - pEndOffsetFld.clear(); - pEndNtNumFmtCB.clear(); + pEndOffsetField.clear(); + pEndNtNumFormatCB.clear(); pEndPrefixFT.clear(); pEndPrefixED.clear(); pEndNumViewBox.clear(); @@ -1914,32 +1914,32 @@ void SwSectionFtnEndTabPage::dispose() SfxTabPage::dispose(); } -bool SwSectionFtnEndTabPage::FillItemSet( SfxItemSet* rSet ) +bool SwSectionFootnoteEndTabPage::FillItemSet( SfxItemSet* rSet ) { - SwFmtFtnAtTxtEnd aFtn( pFtnNtAtTextEndCB->IsChecked() - ? ( pFtnNtNumCB->IsChecked() - ? ( pFtnNtNumFmtCB->IsChecked() + SwFormatFootnoteAtTextEnd aFootnote( pFootnoteNtAtTextEndCB->IsChecked() + ? ( pFootnoteNtNumCB->IsChecked() + ? ( pFootnoteNtNumFormatCB->IsChecked() ? FTNEND_ATTXTEND_OWNNUMANDFMT : FTNEND_ATTXTEND_OWNNUMSEQ ) : FTNEND_ATTXTEND ) : FTNEND_ATPGORDOCEND ); - switch( aFtn.GetValue() ) + switch( aFootnote.GetValue() ) { case FTNEND_ATTXTEND_OWNNUMANDFMT: - aFtn.SetNumType( pFtnNumViewBox->GetSelectedNumberingType() ); - aFtn.SetPrefix( pFtnPrefixED->GetText().replaceAll("\\t", "\t") ); // fdo#65666 - aFtn.SetSuffix( pFtnSuffixED->GetText().replaceAll("\\t", "\t") ); + aFootnote.SetNumType( pFootnoteNumViewBox->GetSelectedNumberingType() ); + aFootnote.SetPrefix( pFootnotePrefixED->GetText().replaceAll("\\t", "\t") ); // fdo#65666 + aFootnote.SetSuffix( pFootnoteSuffixED->GetText().replaceAll("\\t", "\t") ); // no break; case FTNEND_ATTXTEND_OWNNUMSEQ: - aFtn.SetOffset( static_cast< sal_uInt16 >( pFtnOffsetFld->GetValue()-1 ) ); + aFootnote.SetOffset( static_cast< sal_uInt16 >( pFootnoteOffsetField->GetValue()-1 ) ); // no break; } - SwFmtEndAtTxtEnd aEnd( pEndNtAtTextEndCB->IsChecked() + SwFormatEndAtTextEnd aEnd( pEndNtAtTextEndCB->IsChecked() ? ( pEndNtNumCB->IsChecked() - ? ( pEndNtNumFmtCB->IsChecked() + ? ( pEndNtNumFormatCB->IsChecked() ? FTNEND_ATTXTEND_OWNNUMANDFMT : FTNEND_ATTXTEND_OWNNUMSEQ ) : FTNEND_ATTXTEND ) @@ -1954,58 +1954,58 @@ bool SwSectionFtnEndTabPage::FillItemSet( SfxItemSet* rSet ) // no break; case FTNEND_ATTXTEND_OWNNUMSEQ: - aEnd.SetOffset( static_cast< sal_uInt16 >( pEndOffsetFld->GetValue()-1 ) ); + aEnd.SetOffset( static_cast< sal_uInt16 >( pEndOffsetField->GetValue()-1 ) ); // no break; } - rSet->Put( aFtn ); + rSet->Put( aFootnote ); rSet->Put( aEnd ); return true; } -void SwSectionFtnEndTabPage::ResetState( bool bFtn, - const SwFmtFtnEndAtTxtEnd& rAttr ) +void SwSectionFootnoteEndTabPage::ResetState( bool bFootnote, + const SwFormatFootnoteEndAtTextEnd& rAttr ) { - CheckBox *pNtAtTextEndCB, *pNtNumCB, *pNtNumFmtCB; + CheckBox *pNtAtTextEndCB, *pNtNumCB, *pNtNumFormatCB; FixedText*pPrefixFT, *pSuffixFT; Edit *pPrefixED, *pSuffixED; SwNumberingTypeListBox *pNumViewBox; - FixedText* pOffsetTxt; - NumericField *pOffsetFld; - - if( bFtn ) - { - pNtAtTextEndCB = pFtnNtAtTextEndCB; - pNtNumCB = pFtnNtNumCB; - pNtNumFmtCB = pFtnNtNumFmtCB; - pPrefixFT = pFtnPrefixFT; - pPrefixED = pFtnPrefixED; - pSuffixFT = pFtnSuffixFT; - pSuffixED = pFtnSuffixED; - pNumViewBox = pFtnNumViewBox; - pOffsetTxt = pFtnOffsetLbl; - pOffsetFld = pFtnOffsetFld; + FixedText* pOffsetText; + NumericField *pOffsetField; + + if( bFootnote ) + { + pNtAtTextEndCB = pFootnoteNtAtTextEndCB; + pNtNumCB = pFootnoteNtNumCB; + pNtNumFormatCB = pFootnoteNtNumFormatCB; + pPrefixFT = pFootnotePrefixFT; + pPrefixED = pFootnotePrefixED; + pSuffixFT = pFootnoteSuffixFT; + pSuffixED = pFootnoteSuffixED; + pNumViewBox = pFootnoteNumViewBox; + pOffsetText = pFootnoteOffsetLbl; + pOffsetField = pFootnoteOffsetField; } else { pNtAtTextEndCB = pEndNtAtTextEndCB; pNtNumCB = pEndNtNumCB; - pNtNumFmtCB = pEndNtNumFmtCB; + pNtNumFormatCB = pEndNtNumFormatCB; pPrefixFT = pEndPrefixFT; pPrefixED = pEndPrefixED; pSuffixFT = pEndSuffixFT; pSuffixED = pEndSuffixED; pNumViewBox = pEndNumViewBox; - pOffsetTxt = pEndOffsetLbl; - pOffsetFld = pEndOffsetFld; + pOffsetText = pEndOffsetLbl; + pOffsetField = pEndOffsetField; } const sal_uInt16 eState = rAttr.GetValue(); switch( eState ) { case FTNEND_ATTXTEND_OWNNUMANDFMT: - pNtNumFmtCB->SetState( TRISTATE_TRUE ); + pNtNumFormatCB->SetState( TRISTATE_TRUE ); // no break; case FTNEND_ATTXTEND_OWNNUMSEQ: @@ -2018,7 +2018,7 @@ void SwSectionFtnEndTabPage::ResetState( bool bFtn, } pNumViewBox->SelectNumberingType( rAttr.GetNumType() ); - pOffsetFld->SetValue( rAttr.GetOffset() + 1 ); + pOffsetField->SetValue( rAttr.GetOffset() + 1 ); pPrefixED->SetText( rAttr.GetPrefix().replaceAll("\t", "\\t") ); pSuffixED->SetText( rAttr.GetSuffix().replaceAll("\t", "\\t") ); @@ -2029,9 +2029,9 @@ void SwSectionFtnEndTabPage::ResetState( bool bFtn, // no break; case FTNEND_ATTXTEND: - pNtNumFmtCB->Enable( false ); - pOffsetFld->Enable( false ); - pOffsetTxt->Enable( false ); + pNtNumFormatCB->Enable( false ); + pOffsetField->Enable( false ); + pOffsetText->Enable( false ); // no break; case FTNEND_ATTXTEND_OWNNUMSEQ: @@ -2044,53 +2044,53 @@ void SwSectionFtnEndTabPage::ResetState( bool bFtn, } } -void SwSectionFtnEndTabPage::Reset( const SfxItemSet* rSet ) +void SwSectionFootnoteEndTabPage::Reset( const SfxItemSet* rSet ) { - ResetState( true, static_cast<const SwFmtFtnAtTxtEnd&>(rSet->Get( + ResetState( true, static_cast<const SwFormatFootnoteAtTextEnd&>(rSet->Get( RES_FTN_AT_TXTEND, false ))); - ResetState( false, static_cast<const SwFmtEndAtTxtEnd&>(rSet->Get( + ResetState( false, static_cast<const SwFormatEndAtTextEnd&>(rSet->Get( RES_END_AT_TXTEND, false ))); } -VclPtr<SfxTabPage> SwSectionFtnEndTabPage::Create( vcl::Window* pParent, +VclPtr<SfxTabPage> SwSectionFootnoteEndTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet) { - return VclPtr<SwSectionFtnEndTabPage>::Create(pParent, *rAttrSet); + return VclPtr<SwSectionFootnoteEndTabPage>::Create(pParent, *rAttrSet); } -IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox ) +IMPL_LINK( SwSectionFootnoteEndTabPage, FootEndHdl, CheckBox *, pBox ) { - bool bFoot = pFtnNtAtTextEndCB == pBox || pFtnNtNumCB == pBox || - pFtnNtNumFmtCB == pBox ; + bool bFoot = pFootnoteNtAtTextEndCB == pBox || pFootnoteNtNumCB == pBox || + pFootnoteNtNumFormatCB == pBox ; - CheckBox *pNumBox, *pNumFmtBox, *pEndBox; + CheckBox *pNumBox, *pNumFormatBox, *pEndBox; SwNumberingTypeListBox* pNumViewBox; - FixedText* pOffsetTxt; - NumericField *pOffsetFld; + FixedText* pOffsetText; + NumericField *pOffsetField; FixedText*pPrefixFT, *pSuffixFT; Edit *pPrefixED, *pSuffixED; if( bFoot ) { - pEndBox = pFtnNtAtTextEndCB; - pNumBox = pFtnNtNumCB; - pNumFmtBox = pFtnNtNumFmtCB; - pNumViewBox = pFtnNumViewBox; - pOffsetTxt = pFtnOffsetLbl; - pOffsetFld = pFtnOffsetFld; - pPrefixFT = pFtnPrefixFT; - pSuffixFT = pFtnSuffixFT; - pPrefixED = pFtnPrefixED; - pSuffixED = pFtnSuffixED; + pEndBox = pFootnoteNtAtTextEndCB; + pNumBox = pFootnoteNtNumCB; + pNumFormatBox = pFootnoteNtNumFormatCB; + pNumViewBox = pFootnoteNumViewBox; + pOffsetText = pFootnoteOffsetLbl; + pOffsetField = pFootnoteOffsetField; + pPrefixFT = pFootnotePrefixFT; + pSuffixFT = pFootnoteSuffixFT; + pPrefixED = pFootnotePrefixED; + pSuffixED = pFootnoteSuffixED; } else { pEndBox = pEndNtAtTextEndCB; pNumBox = pEndNtNumCB; - pNumFmtBox = pEndNtNumFmtCB; + pNumFormatBox = pEndNtNumFormatCB; pNumViewBox = pEndNumViewBox; - pOffsetTxt = pEndOffsetLbl; - pOffsetFld = pEndOffsetFld; + pOffsetText = pEndOffsetLbl; + pOffsetField = pEndOffsetField; pPrefixFT = pEndPrefixFT; pSuffixFT = pEndSuffixFT; pPrefixED = pEndPrefixED; @@ -2099,17 +2099,17 @@ IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox ) bool bEnableAtEnd = TRISTATE_TRUE == pEndBox->GetState(); bool bEnableNum = bEnableAtEnd && TRISTATE_TRUE == pNumBox->GetState(); - bool bEnableNumFmt = bEnableNum && TRISTATE_TRUE == pNumFmtBox->GetState(); + bool bEnableNumFormat = bEnableNum && TRISTATE_TRUE == pNumFormatBox->GetState(); pNumBox->Enable( bEnableAtEnd ); - pOffsetTxt->Enable( bEnableNum ); - pOffsetFld->Enable( bEnableNum ); - pNumFmtBox->Enable( bEnableNum ); - pNumViewBox->Enable( bEnableNumFmt ); - pPrefixED->Enable( bEnableNumFmt ); - pSuffixED->Enable( bEnableNumFmt ); - pPrefixFT->Enable( bEnableNumFmt ); - pSuffixFT->Enable( bEnableNumFmt ); + pOffsetText->Enable( bEnableNum ); + pOffsetField->Enable( bEnableNum ); + pNumFormatBox->Enable( bEnableNum ); + pNumViewBox->Enable( bEnableNumFormat ); + pPrefixED->Enable( bEnableNumFormat ); + pSuffixED->Enable( bEnableNumFormat ); + pPrefixFT->Enable( bEnableNumFormat ); + pSuffixFT->Enable( bEnableNumFormat ); return 0; } @@ -2124,7 +2124,7 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog( OSL_ENSURE(pFact, "Dialog creation failed!"); m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, 0); m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 ); - m_nNotePageId = AddTabPage("notes", SwSectionFtnEndTabPage::Create, 0); + m_nNotePageId = AddTabPage("notes", SwSectionFootnoteEndTabPage::Create, 0); m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create, 0); SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get(); diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index 2073dd5b35d0..3a9f6b4c76ce 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -116,7 +116,7 @@ namespace { static long lUserW = 5669; // 10 cm static long lUserH = 5669; // 10 cm -SwEnvFmtPage::SwEnvFmtPage(vcl::Window* pParent, const SfxItemSet& rSet) +SwEnvFormatPage::SwEnvFormatPage(vcl::Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "EnvFormatPage", "modules/swriter/ui/envformatpage.ui", &rSet) { @@ -142,7 +142,7 @@ SwEnvFmtPage::SwEnvFmtPage(vcl::Window* pParent, const SfxItemSet& rSet) SetMetric(*m_pSizeHeightField, aMetric); // Install handlers - Link<> aLk = LINK(this, SwEnvFmtPage, ModifyHdl); + Link<> aLk = LINK(this, SwEnvFormatPage, ModifyHdl); m_pAddrLeftField->SetUpHdl( aLk ); m_pAddrTopField->SetUpHdl( aLk ); m_pSendLeftField->SetUpHdl( aLk ); @@ -164,13 +164,13 @@ SwEnvFmtPage::SwEnvFmtPage(vcl::Window* pParent, const SfxItemSet& rSet) m_pSizeWidthField->SetLoseFocusHdl( aLk ); m_pSizeHeightField->SetLoseFocusHdl( aLk ); - Link<MenuButton *, void> aLk2 = LINK(this, SwEnvFmtPage, EditHdl ); + Link<MenuButton *, void> aLk2 = LINK(this, SwEnvFormatPage, EditHdl ); m_pAddrEditButton->SetSelectHdl( aLk2 ); m_pSendEditButton->SetSelectHdl( aLk2 ); m_pPreview->SetBorderStyle( WindowBorderStyle::MONO ); - m_pSizeFormatBox->SetSelectHdl(LINK(this, SwEnvFmtPage, FormatHdl)); + m_pSizeFormatBox->SetSelectHdl(LINK(this, SwEnvFormatPage, FormatHdl)); // m_pSizeFormatBox for (sal_uInt16 i = PAPER_A3; i <= PAPER_KAI32BIG; i++) @@ -197,12 +197,12 @@ SwEnvFmtPage::SwEnvFmtPage(vcl::Window* pParent, const SfxItemSet& rSet) } -SwEnvFmtPage::~SwEnvFmtPage() +SwEnvFormatPage::~SwEnvFormatPage() { disposeOnce(); } -void SwEnvFmtPage::dispose() +void SwEnvFormatPage::dispose() { m_pAddrLeftField.clear(); m_pAddrTopField.clear(); @@ -218,10 +218,10 @@ void SwEnvFmtPage::dispose() } -IMPL_LINK( SwEnvFmtPage, ModifyHdl, Edit *, pEdit ) +IMPL_LINK( SwEnvFormatPage, ModifyHdl, Edit *, pEdit ) { - long lWVal = static_cast< long >(GetFldVal(*m_pSizeWidthField )); - long lHVal = static_cast< long >(GetFldVal(*m_pSizeHeightField)); + long lWVal = static_cast< long >(GetFieldVal(*m_pSizeWidthField )); + long lHVal = static_cast< long >(GetFieldVal(*m_pSizeHeightField)); long lWidth = std::max(lWVal, lHVal); long lHeight = std::min(lWVal, lHVal); @@ -254,7 +254,7 @@ IMPL_LINK( SwEnvFmtPage, ModifyHdl, Edit *, pEdit ) return 0; } -IMPL_LINK_TYPED( SwEnvFmtPage, EditHdl, MenuButton *, pButton, void ) +IMPL_LINK_TYPED( SwEnvFormatPage, EditHdl, MenuButton *, pButton, void ) { SwWrtShell* pSh = GetParentSwEnvDlg()->pSh; OSL_ENSURE(pSh, "Shell missing"); @@ -262,7 +262,7 @@ IMPL_LINK_TYPED( SwEnvFmtPage, EditHdl, MenuButton *, pButton, void ) // determine collection-ptr bool bSender = pButton != m_pAddrEditButton; - SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< sal_uInt16 >( + SwTextFormatColl* pColl = pSh->GetTextCollFromPool( static_cast< sal_uInt16 >( bSender ? RES_POOLCOLL_SENDADRESS : RES_POOLCOLL_JAKETADRESS)); OSL_ENSURE(pColl, "Text collection missing"); @@ -279,8 +279,8 @@ IMPL_LINK_TYPED( SwEnvFmtPage, EditHdl, MenuButton *, pButton, void ) SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - const OUString sFmtStr = pColl->GetName(); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_CHAR_ENV, &sFmtStr)); + const OUString sFormatStr = pColl->GetName(); + boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_CHAR_ENV, &sFormatStr)); OSL_ENSURE(pDlg, "Dialog creation failed!"); if (pDlg->Execute() == RET_OK) { @@ -310,15 +310,15 @@ IMPL_LINK_TYPED( SwEnvFmtPage, EditHdl, MenuButton *, pButton, void ) // left border as offset const long nOff = static_cast<const SvxLRSpaceItem&>(aTmpSet.Get( RES_LR_SPACE )). - GetTxtLeft(); + GetTextLeft(); SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff ); aTmpSet.Put( aOff ); // set BoxInfo ::PrepareBoxInfo( aTmpSet, *pSh ); - const OUString sFmtStr = pColl->GetName(); - VclPtrInstance< SwParaDlg > pDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFmtStr); + const OUString sFormatStr = pColl->GetName(); + VclPtrInstance< SwParaDlg > pDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFormatStr); if ( pDlg->Execute() == RET_OK ) { @@ -345,7 +345,7 @@ IMPL_LINK_TYPED( SwEnvFmtPage, EditHdl, MenuButton *, pButton, void ) } // A temporary Itemset that gets discarded at abort -SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, bool bSender) +SfxItemSet *SwEnvFormatPage::GetCollItemSet(SwTextFormatColl* pColl, bool bSender) { SfxItemSet *&pAddrSet = bSender ? GetParentSwEnvDlg()->pSenderSet : GetParentSwEnvDlg()->pAddresseeSet; if (!pAddrSet) @@ -380,7 +380,7 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, bool bSender) return pAddrSet; } -IMPL_LINK_NOARG(SwEnvFmtPage, FormatHdl) +IMPL_LINK_NOARG(SwEnvFormatPage, FormatHdl) { long lWidth; long lHeight; @@ -407,13 +407,13 @@ IMPL_LINK_NOARG(SwEnvFmtPage, FormatHdl) lAddrFromLeft = lWidth / 2; lAddrFromTop = lHeight / 2; - SetFldVal(*m_pAddrLeftField, lAddrFromLeft); - SetFldVal(*m_pAddrTopField , lAddrFromTop ); - SetFldVal(*m_pSendLeftField, lSendFromLeft); - SetFldVal(*m_pSendTopField , lSendFromTop ); + SetFieldVal(*m_pAddrLeftField, lAddrFromLeft); + SetFieldVal(*m_pAddrTopField , lAddrFromTop ); + SetFieldVal(*m_pSendLeftField, lSendFromLeft); + SetFieldVal(*m_pSendTopField , lSendFromTop ); - SetFldVal(*m_pSizeWidthField , lWidth ); - SetFldVal(*m_pSizeHeightField, lHeight); + SetFieldVal(*m_pSizeWidthField , lWidth ); + SetFieldVal(*m_pSizeHeightField, lHeight); SetMinMax(); @@ -422,23 +422,23 @@ IMPL_LINK_NOARG(SwEnvFmtPage, FormatHdl) return 0; } -void SwEnvFmtPage::SetMinMax() +void SwEnvFormatPage::SetMinMax() { - long lWVal = static_cast< long >(GetFldVal(*m_pSizeWidthField )); - long lHVal = static_cast< long >(GetFldVal(*m_pSizeHeightField)); + long lWVal = static_cast< long >(GetFieldVal(*m_pSizeWidthField )); + long lHVal = static_cast< long >(GetFieldVal(*m_pSizeHeightField)); long lWidth = std::max(lWVal, lHVal), lHeight = std::min(lWVal, lHVal); // Min and Max - m_pAddrLeftField->SetMin((long) 100 * (GetFldVal(*m_pSendLeftField) + 566), FUNIT_TWIP); + m_pAddrLeftField->SetMin((long) 100 * (GetFieldVal(*m_pSendLeftField) + 566), FUNIT_TWIP); m_pAddrLeftField->SetMax((long) 100 * (lWidth - 2 * 566), FUNIT_TWIP); - m_pAddrTopField->SetMin((long) 100 * (GetFldVal(*m_pSendTopField ) + 2 * 566), FUNIT_TWIP); + m_pAddrTopField->SetMin((long) 100 * (GetFieldVal(*m_pSendTopField ) + 2 * 566), FUNIT_TWIP); m_pAddrTopField->SetMax((long) 100 * (lHeight - 2 * 566), FUNIT_TWIP); m_pSendLeftField->SetMin((long) 100 * (566), FUNIT_TWIP); - m_pSendLeftField->SetMax((long) 100 * (GetFldVal(*m_pAddrLeftField) - 566), FUNIT_TWIP); + m_pSendLeftField->SetMax((long) 100 * (GetFieldVal(*m_pAddrLeftField) - 566), FUNIT_TWIP); m_pSendTopField->SetMin((long) 100 * (566), FUNIT_TWIP); - m_pSendTopField->SetMax((long) 100 * (GetFldVal(*m_pAddrTopField ) - 2 * 566), FUNIT_TWIP); + m_pSendTopField->SetMax((long) 100 * (GetFieldVal(*m_pAddrTopField ) - 2 * 566), FUNIT_TWIP); // First and last m_pAddrLeftField->SetFirst(m_pAddrLeftField->GetMin()); @@ -459,37 +459,37 @@ void SwEnvFmtPage::SetMinMax() m_pSizeHeightField->Reformat(); } -VclPtr<SfxTabPage> SwEnvFmtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) +VclPtr<SfxTabPage> SwEnvFormatPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) { - return VclPtr<SfxTabPage>(new SwEnvFmtPage(pParent, *rSet), SAL_NO_ACQUIRE); + return VclPtr<SfxTabPage>(new SwEnvFormatPage(pParent, *rSet), SAL_NO_ACQUIRE); } -void SwEnvFmtPage::ActivatePage(const SfxItemSet& rSet) +void SwEnvFormatPage::ActivatePage(const SfxItemSet& rSet) { SfxItemSet aSet(rSet); aSet.Put(GetParentSwEnvDlg()->aEnvItem); Reset(&aSet); } -SfxTabPage::sfxpg SwEnvFmtPage::DeactivatePage(SfxItemSet* _pSet) +SfxTabPage::sfxpg SwEnvFormatPage::DeactivatePage(SfxItemSet* _pSet) { if( _pSet ) FillItemSet(_pSet); return SfxTabPage::LEAVE_PAGE; } -void SwEnvFmtPage::FillItem(SwEnvItem& rItem) +void SwEnvFormatPage::FillItem(SwEnvItem& rItem) { - rItem.lAddrFromLeft = static_cast< sal_Int32 >(GetFldVal(*m_pAddrLeftField)); - rItem.lAddrFromTop = static_cast< sal_Int32 >(GetFldVal(*m_pAddrTopField )); - rItem.lSendFromLeft = static_cast< sal_Int32 >(GetFldVal(*m_pSendLeftField)); - rItem.lSendFromTop = static_cast< sal_Int32 >(GetFldVal(*m_pSendTopField )); + rItem.lAddrFromLeft = static_cast< sal_Int32 >(GetFieldVal(*m_pAddrLeftField)); + rItem.lAddrFromTop = static_cast< sal_Int32 >(GetFieldVal(*m_pAddrTopField )); + rItem.lSendFromLeft = static_cast< sal_Int32 >(GetFieldVal(*m_pSendLeftField)); + rItem.lSendFromTop = static_cast< sal_Int32 >(GetFieldVal(*m_pSendTopField )); const sal_uInt16 nPaper = aIDs[m_pSizeFormatBox->GetSelectEntryPos()]; if (nPaper == (sal_uInt16)PAPER_USER) { - long lWVal = static_cast< long >(GetFldVal(*m_pSizeWidthField )); - long lHVal = static_cast< long >(GetFldVal(*m_pSizeHeightField)); + long lWVal = static_cast< long >(GetFieldVal(*m_pSizeWidthField )); + long lHVal = static_cast< long >(GetFieldVal(*m_pSizeHeightField)); rItem.lWidth = std::max(lWVal, lHVal); rItem.lHeight = std::min(lWVal, lHVal); } @@ -502,14 +502,14 @@ void SwEnvFmtPage::FillItem(SwEnvItem& rItem) } } -bool SwEnvFmtPage::FillItemSet(SfxItemSet* rSet) +bool SwEnvFormatPage::FillItemSet(SfxItemSet* rSet) { FillItem(GetParentSwEnvDlg()->aEnvItem); rSet->Put(GetParentSwEnvDlg()->aEnvItem); return true; } -void SwEnvFmtPage::Reset(const SfxItemSet* rSet) +void SwEnvFormatPage::Reset(const SfxItemSet* rSet) { const SwEnvItem& rItem = static_cast<const SwEnvItem&>( rSet->Get(FN_ENVELOP)); @@ -521,12 +521,12 @@ void SwEnvFmtPage::Reset(const SfxItemSet* rSet) m_pSizeFormatBox->SelectEntryPos(static_cast<sal_Int32>(i)); // Metric fields - SetFldVal(*m_pAddrLeftField, rItem.lAddrFromLeft); - SetFldVal(*m_pAddrTopField, rItem.lAddrFromTop ); - SetFldVal(*m_pSendLeftField, rItem.lSendFromLeft); - SetFldVal(*m_pSendTopField, rItem.lSendFromTop ); - SetFldVal(*m_pSizeWidthField , std::max(rItem.lWidth, rItem.lHeight)); - SetFldVal(*m_pSizeHeightField , std::min(rItem.lWidth, rItem.lHeight)); + SetFieldVal(*m_pAddrLeftField, rItem.lAddrFromLeft); + SetFieldVal(*m_pAddrTopField, rItem.lAddrFromTop ); + SetFieldVal(*m_pSendLeftField, rItem.lSendFromLeft); + SetFieldVal(*m_pSendTopField, rItem.lSendFromTop ); + SetFieldVal(*m_pSizeWidthField , std::max(rItem.lWidth, rItem.lHeight)); + SetFieldVal(*m_pSizeHeightField , std::min(rItem.lWidth, rItem.lHeight)); SetMinMax(); DELETEZ(GetParentSwEnvDlg()->pSenderSet); diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx index f028d285e6c0..ced01862a050 100644 --- a/sw/source/ui/envelp/envfmt.hxx +++ b/sw/source/ui/envelp/envfmt.hxx @@ -26,9 +26,9 @@ #include "envlop.hxx" -class SwTxtFmtColl; +class SwTextFormatColl; -class SwEnvFmtPage : public SfxTabPage +class SwEnvFormatPage : public SfxTabPage { VclPtr<MetricField> m_pAddrLeftField; VclPtr<MetricField> m_pAddrTopField; @@ -49,7 +49,7 @@ class SwEnvFmtPage : public SfxTabPage void SetMinMax(); - SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, bool bSender); + SfxItemSet *GetCollItemSet(SwTextFormatColl* pColl, bool bSender); SwEnvDlg *GetParentSwEnvDlg() {return static_cast<SwEnvDlg*>(GetParentDialog());} @@ -57,8 +57,8 @@ class SwEnvFmtPage : public SfxTabPage using TabPage::DeactivatePage; public: - SwEnvFmtPage(vcl::Window* pParent, const SfxItemSet& rSet); - virtual ~SwEnvFmtPage(); + SwEnvFormatPage(vcl::Window* pParent, const SfxItemSet& rSet); + virtual ~SwEnvFormatPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet); diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 1599d99eb462..be34f66b3bdf 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -143,7 +143,7 @@ SwEnvDlg::SwEnvDlg(vcl::Window* pParent, const SfxItemSet& rSet, } AddTabPage("envelope", SwEnvPage ::Create, 0); - AddTabPage("format", SwEnvFmtPage::Create, 0); + AddTabPage("format", SwEnvFormatPage::Create, 0); m_nEnvPrintId = AddTabPage("printer", SwEnvPrtPage::Create, 0); } @@ -175,13 +175,13 @@ short SwEnvDlg::Ok() { if (pAddresseeSet) { - SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool(RES_POOLCOLL_JAKETADRESS); - pColl->SetFmtAttr(*pAddresseeSet); + SwTextFormatColl* pColl = pSh->GetTextCollFromPool(RES_POOLCOLL_JAKETADRESS); + pColl->SetFormatAttr(*pAddresseeSet); } if (pSenderSet) { - SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool(RES_POOLCOLL_SENDADRESS); - pColl->SetFmtAttr(*pSenderSet); + SwTextFormatColl* pColl = pSh->GetTextCollFromPool(RES_POOLCOLL_SENDADRESS); + pColl->SetFormatAttr(*pSenderSet); } } diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx index 2b4379d97895..b256af9cdb2d 100644 --- a/sw/source/ui/envelp/envprt.cxx +++ b/sw/source/ui/envelp/envprt.cxx @@ -175,8 +175,8 @@ void SwEnvPrtPage::FillItem(SwEnvItem& rItem) rItem.eAlign = (SwEnvAlign) (nOrient); rItem.bPrintFromAbove = m_pTopButton->IsChecked(); - rItem.lShiftRight = static_cast< sal_Int32 >(GetFldVal(*m_pRightField)); - rItem.lShiftDown = static_cast< sal_Int32 >(GetFldVal(*m_pDownField )); + rItem.lShiftRight = static_cast< sal_Int32 >(GetFieldVal(*m_pRightField)); + rItem.lShiftDown = static_cast< sal_Int32 >(GetFieldVal(*m_pDownField )); } bool SwEnvPrtPage::FillItemSet(SfxItemSet* rSet) @@ -197,8 +197,8 @@ void SwEnvPrtPage::Reset(const SfxItemSet* rSet) else m_pBottomButton->Check(); - SetFldVal(*m_pRightField, rItem.lShiftRight); - SetFldVal(*m_pDownField , rItem.lShiftDown ); + SetFieldVal(*m_pRightField, rItem.lShiftRight); + SetFieldVal(*m_pDownField , rItem.lShiftDown ); ActivatePage(*rSet); ClickHdl(m_pTopButton); diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 267186efe9c4..dfffd5dbe369 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -107,7 +107,7 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet, { WaitObject aWait( pParent ); - m_nFormatId = AddTabPage("format", SwLabFmtPage::Create, 0); + m_nFormatId = AddTabPage("format", SwLabFormatPage::Create, 0); m_nOptionsId = AddTabPage("options", SwLabPrtPage::Create, 0); m_nCardsId = AddTabPage("cards", SwVisitingCardPage::Create, 0); m_sBusinessCardDlg = GetPageText(m_nCardsId); diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx index d1d4d27ca74a..b5a9c92eeb43 100644 --- a/sw/source/ui/envelp/labelexp.cxx +++ b/sw/source/ui/envelp/labelexp.cxx @@ -169,8 +169,8 @@ void SwVisitingCardPage::UpdateFields() void SwLabDlg::UpdateFieldInformation(uno::Reference< frame::XModel > & xModel, const SwLabItem& rItem) { - uno::Reference< text::XTextFieldsSupplier > xFlds(xModel, uno::UNO_QUERY); - uno::Reference< container::XNameAccess > xFldMasters = xFlds->getTextFieldMasters(); + uno::Reference< text::XTextFieldsSupplier > xFields(xModel, uno::UNO_QUERY); + uno::Reference< container::XNameAccess > xFieldMasters = xFields->getTextFieldMasters(); static const struct _SwLabItemMap { const char* pName; @@ -215,17 +215,17 @@ void SwLabDlg::UpdateFieldInformation(uno::Reference< frame::XModel > & xModel, { for( const _SwLabItemMap* p = aArr; p->pName; ++p ) { - OUString uFldName( + OUString uFieldName( "com.sun.star.text.FieldMaster.User." + OUString::createFromAscii(p->pName)); - if( xFldMasters->hasByName( uFldName )) + if( xFieldMasters->hasByName( uFieldName )) { - uno::Any aFirstName = xFldMasters->getByName( uFldName ); - uno::Reference< beans::XPropertySet > xFld; - aFirstName >>= xFld; + uno::Any aFirstName = xFieldMasters->getByName( uFieldName ); + uno::Reference< beans::XPropertySet > xField; + aFirstName >>= xField; uno::Any aContent; aContent <<= rItem.*p->pValue; - xFld->setPropertyValue( UNO_NAME_CONTENT, aContent ); + xField->setPropertyValue( UNO_NAME_CONTENT, aContent ); } } } @@ -234,8 +234,8 @@ void SwLabDlg::UpdateFieldInformation(uno::Reference< frame::XModel > & xModel, } - uno::Reference< container::XEnumerationAccess > xFldAcc = xFlds->getTextFields(); - uno::Reference< util::XRefreshable > xRefresh(xFldAcc, uno::UNO_QUERY); + uno::Reference< container::XEnumerationAccess > xFieldAcc = xFields->getTextFields(); + uno::Reference< util::XRefreshable > xRefresh(xFieldAcc, uno::UNO_QUERY); xRefresh->refresh(); } diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index 5f8f72d59746..aa81e11ef13b 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -292,7 +292,7 @@ void SwLabPreview::UpdateItem(const SwLabItem& rItem) Invalidate(); } -SwLabFmtPage::SwLabFmtPage(vcl::Window* pParent, const SfxItemSet& rSet) +SwLabFormatPage::SwLabFormatPage(vcl::Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "LabelFormatPage", "modules/swriter/ui/labelformatpage.ui", &rSet) , bModified(false) @@ -327,7 +327,7 @@ SwLabFmtPage::SwLabFmtPage(vcl::Window* pParent, const SfxItemSet& rSet) SetMetric(*m_pPHeightField, aMetric); // Install handlers - Link<> aLk = LINK(this, SwLabFmtPage, ModifyHdl); + Link<> aLk = LINK(this, SwLabFormatPage, ModifyHdl); m_pHDistField->SetModifyHdl( aLk ); m_pVDistField->SetModifyHdl( aLk ); m_pWidthField->SetModifyHdl( aLk ); @@ -339,7 +339,7 @@ SwLabFmtPage::SwLabFmtPage(vcl::Window* pParent, const SfxItemSet& rSet) m_pPWidthField->SetModifyHdl( aLk ); m_pPHeightField->SetModifyHdl( aLk ); - aLk = LINK(this, SwLabFmtPage, LoseFocusHdl); + aLk = LINK(this, SwLabFormatPage, LoseFocusHdl); m_pHDistField->SetLoseFocusHdl( aLk ); m_pVDistField->SetLoseFocusHdl( aLk ); m_pWidthField->SetLoseFocusHdl( aLk ); @@ -351,18 +351,18 @@ SwLabFmtPage::SwLabFmtPage(vcl::Window* pParent, const SfxItemSet& rSet) m_pPWidthField->SetLoseFocusHdl( aLk ); m_pPHeightField->SetLoseFocusHdl( aLk ); - m_pSavePB->SetClickHdl( LINK (this, SwLabFmtPage, SaveHdl)); + m_pSavePB->SetClickHdl( LINK (this, SwLabFormatPage, SaveHdl)); // Set timer aPreviewIdle.SetPriority(SchedulerPriority::LOWEST); - aPreviewIdle.SetIdleHdl(LINK(this, SwLabFmtPage, PreviewHdl)); + aPreviewIdle.SetIdleHdl(LINK(this, SwLabFormatPage, PreviewHdl)); } -SwLabFmtPage::~SwLabFmtPage() +SwLabFormatPage::~SwLabFormatPage() { disposeOnce(); } -void SwLabFmtPage::dispose() +void SwLabFormatPage::dispose() { m_pMakeFI.clear(); m_pTypeFI.clear(); @@ -383,7 +383,7 @@ void SwLabFmtPage::dispose() // Modify-handler of MetricFields. start preview timer -IMPL_LINK_NOARG(SwLabFmtPage, ModifyHdl) +IMPL_LINK_NOARG(SwLabFormatPage, ModifyHdl) { bModified = true; aPreviewIdle.Start(); @@ -391,7 +391,7 @@ IMPL_LINK_NOARG(SwLabFmtPage, ModifyHdl) } // Invalidate preview -IMPL_LINK_NOARG_TYPED(SwLabFmtPage, PreviewHdl, Idle *, void) +IMPL_LINK_NOARG_TYPED(SwLabFormatPage, PreviewHdl, Idle *, void) { aPreviewIdle.Stop(); ChangeMinMax(); @@ -400,14 +400,14 @@ IMPL_LINK_NOARG_TYPED(SwLabFmtPage, PreviewHdl, Idle *, void) } // LoseFocus-Handler: Update on change -IMPL_LINK( SwLabFmtPage, LoseFocusHdl, Control *, pControl ) +IMPL_LINK( SwLabFormatPage, LoseFocusHdl, Control *, pControl ) { if (static_cast<Edit*>( pControl)->IsModified()) PreviewHdl(0); return 0; } -void SwLabFmtPage::ChangeMinMax() +void SwLabFormatPage::ChangeMinMax() { long lMax = 31748; // 56 cm long nMinSize = 10; // 0,1cm @@ -486,18 +486,18 @@ void SwLabFmtPage::ChangeMinMax() m_pPHeightField->Reformat(); } -VclPtr<SfxTabPage> SwLabFmtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) +VclPtr<SfxTabPage> SwLabFormatPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) { - return VclPtr<SfxTabPage>(new SwLabFmtPage(pParent, *rSet), SAL_NO_ACQUIRE); + return VclPtr<SfxTabPage>(new SwLabFormatPage(pParent, *rSet), SAL_NO_ACQUIRE); } -void SwLabFmtPage::ActivatePage(const SfxItemSet& rSet) +void SwLabFormatPage::ActivatePage(const SfxItemSet& rSet) { SfxItemSet aSet(rSet); Reset(&aSet); } -SfxTabPage::sfxpg SwLabFmtPage::DeactivatePage(SfxItemSet* _pSet) +SfxTabPage::sfxpg SwLabFormatPage::DeactivatePage(SfxItemSet* _pSet) { if (_pSet) FillItemSet(_pSet); @@ -505,7 +505,7 @@ SfxTabPage::sfxpg SwLabFmtPage::DeactivatePage(SfxItemSet* _pSet) return LEAVE_PAGE; } -void SwLabFmtPage::FillItem(SwLabItem& rItem) +void SwLabFormatPage::FillItem(SwLabItem& rItem) { if (bModified) { @@ -525,7 +525,7 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem) } } -bool SwLabFmtPage::FillItemSet(SfxItemSet* rSet) +bool SwLabFormatPage::FillItemSet(SfxItemSet* rSet) { FillItem(aItem); rSet->Put(aItem); @@ -533,7 +533,7 @@ bool SwLabFmtPage::FillItemSet(SfxItemSet* rSet) return true; } -void SwLabFmtPage::Reset(const SfxItemSet* ) +void SwLabFormatPage::Reset(const SfxItemSet* ) { // Initialise fields GetParentSwLabDlg()->GetLabItem(aItem); @@ -566,7 +566,7 @@ void SwLabFmtPage::Reset(const SfxItemSet* ) PreviewHdl(0); } -IMPL_LINK_NOARG(SwLabFmtPage, SaveHdl) +IMPL_LINK_NOARG(SwLabFormatPage, SaveHdl) { SwLabRec aRec; aRec.lHDist = static_cast< long >(GETFLDVAL(*m_pHDistField)); @@ -598,7 +598,7 @@ IMPL_LINK_NOARG(SwLabFmtPage, SaveHdl) return 0; } -SwSaveLabelDlg::SwSaveLabelDlg(SwLabFmtPage* pParent, SwLabRec& rRec) +SwSaveLabelDlg::SwSaveLabelDlg(SwLabFormatPage* pParent, SwLabRec& rRec) : ModalDialog(pParent, "SaveLabelDialog", "modules/swriter/ui/savelabeldialog.ui") , bSuccess(false) diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx index db9826a0c429..9959db71a6a0 100644 --- a/sw/source/ui/envelp/labfmt.hxx +++ b/sw/source/ui/envelp/labfmt.hxx @@ -23,7 +23,7 @@ #include "labimg.hxx" #include <vcl/msgbox.hxx> #include <vcl/idle.hxx> -class SwLabFmtPage; +class SwLabFormatPage; class SwLabPreview : public vcl::Window { @@ -65,7 +65,7 @@ public: void UpdateItem(const SwLabItem& rItem); }; -class SwLabFmtPage : public SfxTabPage +class SwLabFormatPage : public SfxTabPage { VclPtr<FixedText> m_pMakeFI; VclPtr<FixedText> m_pTypeFI; @@ -98,8 +98,8 @@ class SwLabFmtPage : public SfxTabPage using TabPage::DeactivatePage; public: - SwLabFmtPage(vcl::Window* pParent, const SfxItemSet& rSet); - virtual ~SwLabFmtPage(); + SwLabFormatPage(vcl::Window* pParent, const SfxItemSet& rSet); + virtual ~SwLabFormatPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rSet); @@ -120,14 +120,14 @@ class SwSaveLabelDlg : public ModalDialog VclPtr<OKButton> m_pOKPB; bool bSuccess; - VclPtr<SwLabFmtPage> pLabPage; + VclPtr<SwLabFormatPage> pLabPage; SwLabRec& rLabRec; DECL_LINK(OkHdl, void *); DECL_LINK(ModifyHdl, void *); public: - SwSaveLabelDlg(SwLabFmtPage* pParent, SwLabRec& rRec); + SwSaveLabelDlg(SwLabFormatPage* pParent, SwLabRec& rRec); virtual ~SwSaveLabelDlg(); virtual void dispose() SAL_OVERRIDE; diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 636ba4babb56..8b68dddb984e 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -129,7 +129,7 @@ void SwXSelChgLstnr_Impl::disposing( const EventObject& ) throw (RuntimeExcepti SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell, const OUString& rSourceName, - const OUString& rTblName, + const OUString& rTableName, sal_Int32 nCommandType, const uno::Reference< XConnection>& _xConnection, Sequence< Any >* pSelection) : @@ -170,7 +170,7 @@ SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell, get(m_pFilterFT, "fileformatlabel"); get(m_pFilterLB, "fileformat"); - get(m_pAddressFldLB, "address"); + get(m_pAddressFieldLB, "address"); get(m_pSubjectFT, "subjectlabel"); get(m_pSubjectED, "subject"); get(m_pFormatFT, "mailformatlabel"); @@ -233,7 +233,7 @@ SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell, pProperties[0].Name = "DataSourceName"; pProperties[0].Value <<= rSourceName; pProperties[1].Name = "Command"; - pProperties[1].Value <<= rTblName; + pProperties[1].Value <<= rTableName; pProperties[2].Name = "CommandType"; pProperties[2].Value <<= nCommandType; xD->dispatch(aURL, aProperties); @@ -256,10 +256,10 @@ SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell, pModOpt = SW_MOD()->GetModuleConfig(); - MailTxtFormats nMailingMode(pModOpt->GetMailingFormats()); - m_pFormatSwCB->Check(bool(nMailingMode & MailTxtFormats::OFFICE)); - m_pFormatHtmlCB->Check(bool(nMailingMode & MailTxtFormats::HTML)); - m_pFormatRtfCB->Check(bool(nMailingMode & MailTxtFormats::RTF)); + MailTextFormats nMailingMode(pModOpt->GetMailingFormats()); + m_pFormatSwCB->Check(bool(nMailingMode & MailTextFormats::OFFICE)); + m_pFormatHtmlCB->Check(bool(nMailingMode & MailTextFormats::HTML)); + m_pFormatRtfCB->Check(bool(nMailingMode & MailTextFormats::RTF)); m_pAllRB->Check(true); @@ -299,13 +299,13 @@ SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell, SwDBManager* pDBManager = rSh.GetDBManager(); if(_xConnection.is()) - SwDBManager::GetColumnNames(m_pAddressFldLB, _xConnection, rTblName); + SwDBManager::GetColumnNames(m_pAddressFieldLB, _xConnection, rTableName); else - pDBManager->GetColumnNames(m_pAddressFldLB, rSourceName, rTblName); - for(sal_Int32 nEntry = 0; nEntry < m_pAddressFldLB->GetEntryCount(); ++nEntry) - m_pColumnLB->InsertEntry(m_pAddressFldLB->GetEntry(nEntry)); + pDBManager->GetColumnNames(m_pAddressFieldLB, rSourceName, rTableName); + for(sal_Int32 nEntry = 0; nEntry < m_pAddressFieldLB->GetEntryCount(); ++nEntry) + m_pColumnLB->InsertEntry(m_pAddressFieldLB->GetEntry(nEntry)); - m_pAddressFldLB->SelectEntry("EMAIL"); + m_pAddressFieldLB->SelectEntry("EMAIL"); OUString sPath(pModOpt->GetMailingPath()); if(sPath.isEmpty()) @@ -326,8 +326,8 @@ SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell, else m_pColumnLB->SelectEntry(pModOpt->GetNameFromColumn()); - if (m_pAddressFldLB->GetSelectEntryCount() == 0) - m_pAddressFldLB->SelectEntryPos(0); + if (m_pAddressFieldLB->GetSelectEntryCount() == 0) + m_pAddressFieldLB->SelectEntryPos(0); if (m_pColumnLB->GetSelectEntryCount() == 0) m_pColumnLB->SelectEntryPos(0); @@ -427,7 +427,7 @@ void SwMailMergeDlg::dispose() m_pPathPB.clear(); m_pFilterFT.clear(); m_pFilterLB.clear(); - m_pAddressFldLB.clear(); + m_pAddressFieldLB.clear(); m_pSubjectFT.clear(); m_pSubjectED.clear(); m_pFormatFT.clear(); @@ -616,14 +616,14 @@ bool SwMailMergeDlg::ExecQryShell() pModOpt->SetSinglePrintJob(m_pSingleJobsCB->IsChecked()); - MailTxtFormats nMailingMode = MailTxtFormats::NONE; + MailTextFormats nMailingMode = MailTextFormats::NONE; if (m_pFormatSwCB->IsChecked()) - nMailingMode |= MailTxtFormats::OFFICE; + nMailingMode |= MailTextFormats::OFFICE; if (m_pFormatHtmlCB->IsChecked()) - nMailingMode |= MailTxtFormats::HTML; + nMailingMode |= MailTextFormats::HTML; if (m_pFormatRtfCB->IsChecked()) - nMailingMode |= MailTxtFormats::RTF; + nMailingMode |= MailTextFormats::RTF; pModOpt->SetMailingFormats(nMailingMode); return true; } diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx index f7deb4c63f95..6263190669aa 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.cxx +++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx @@ -98,7 +98,7 @@ void sw::DropDownFieldDialog::Apply() static_cast<SwDropDownField *>( pDropField->CopyField() ) ); pCopy->SetPar1(sSelect); - rSh.SwEditShell::UpdateFlds(*pCopy); + rSh.SwEditShell::UpdateFields(*pCopy); rSh.SetUndoNoResetModified(); rSh.EndAllAction(); diff --git a/sw/source/ui/fldui/FldRefTreeListBox.cxx b/sw/source/ui/fldui/FldRefTreeListBox.cxx index 00d308eda173..976230e86f30 100644 --- a/sw/source/ui/fldui/FldRefTreeListBox.cxx +++ b/sw/source/ui/fldui/FldRefTreeListBox.cxx @@ -23,21 +23,21 @@ #include <vcl/builderfactory.hxx> #include <vcl/help.hxx> -SwFldRefTreeListBox::SwFldRefTreeListBox(vcl::Window* pParent, WinBits nStyle) +SwFieldRefTreeListBox::SwFieldRefTreeListBox(vcl::Window* pParent, WinBits nStyle) : SvTreeListBox(pParent, nStyle) { } -VCL_BUILDER_DECL_FACTORY(SwFldRefTreeListBox) +VCL_BUILDER_DECL_FACTORY(SwFieldRefTreeListBox) { WinBits nWinStyle = WB_TABSTOP; OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - rRet = VclPtr<SwFldRefTreeListBox>::Create(pParent, nWinStyle); + rRet = VclPtr<SwFieldRefTreeListBox>::Create(pParent, nWinStyle); } -void SwFldRefTreeListBox::RequestHelp( const HelpEvent& rHEvt ) +void SwFieldRefTreeListBox::RequestHelp( const HelpEvent& rHEvt ) { bool bCallBase( true ); if ( rHEvt.GetMode() & HelpEventMode::QUICK ) diff --git a/sw/source/ui/fldui/FldRefTreeListBox.hxx b/sw/source/ui/fldui/FldRefTreeListBox.hxx index 216d32ae7392..42e5e568bed1 100644 --- a/sw/source/ui/fldui/FldRefTreeListBox.hxx +++ b/sw/source/ui/fldui/FldRefTreeListBox.hxx @@ -21,13 +21,13 @@ #include <svtools/treelistbox.hxx> -class SwFldRefTreeListBox : public SvTreeListBox +class SwFieldRefTreeListBox : public SvTreeListBox { protected: virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE; public: - SwFldRefTreeListBox(vcl::Window* pParent, WinBits nStyle); + SwFieldRefTreeListBox(vcl::Window* pParent, WinBits nStyle); }; #endif diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index 3f4c1d9f48bb..a5f61470f534 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -56,7 +56,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) "modules/swriter/ui/exchangedatabases.ui") , aImageList(SW_RES(ILIST_DB_DLG)) , pSh(rVw.GetWrtShellPtr()) - , pMgr( new SwFldMgr() ) + , pMgr( new SwFieldMgr() ) { get(m_pUsedDBTLB, "inuselb"); get(m_pAvailDBTLB, "availablelb"); @@ -181,9 +181,9 @@ void SwChangeDBDlg::dispose() // close void SwChangeDBDlg::Apply() { - UpdateFlds(); + UpdateFields(); } -void SwChangeDBDlg::UpdateFlds() +void SwChangeDBDlg::UpdateFields() { std::vector<OUString> aDBNames; aDBNames.reserve(m_pUsedDBTLB->GetSelectionCount()); diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index be5e04189987..96ceb81cd274 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -33,8 +33,8 @@ #define USER_DATA_VERSION_1 "1" #define USER_DATA_VERSION USER_DATA_VERSION_1 -SwFldDBPage::SwFldDBPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) - : SwFldPage(pParent, "FldDbPage", +SwFieldDBPage::SwFieldDBPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) + : SwFieldPage(pParent, "FieldDbPage", "modules/swriter/ui/flddbpage.ui", rCoreSet) , m_nOldFormat(0) , m_nOldSubType(0) @@ -64,20 +64,20 @@ SwFldDBPage::SwFldDBPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) m_aOldNumSelectHdl = m_pNumFormatLB->GetSelectHdl(); - m_pNumFormatLB->SetSelectHdl(LINK(this, SwFldDBPage, NumSelectHdl)); - m_pDatabaseTLB->SetSelectHdl(LINK(this, SwFldDBPage, TreeSelectHdl)); - m_pDatabaseTLB->SetDoubleClickHdl(LINK(this, SwFldDBPage, InsertHdl)); + m_pNumFormatLB->SetSelectHdl(LINK(this, SwFieldDBPage, NumSelectHdl)); + m_pDatabaseTLB->SetSelectHdl(LINK(this, SwFieldDBPage, TreeSelectHdl)); + m_pDatabaseTLB->SetDoubleClickHdl(LINK(this, SwFieldDBPage, InsertHdl)); - m_pValueED->SetModifyHdl(LINK(this, SwFldDBPage, ModifyHdl)); - m_pAddDBPB->SetClickHdl(LINK(this, SwFldDBPage, AddDBHdl)); + m_pValueED->SetModifyHdl(LINK(this, SwFieldDBPage, ModifyHdl)); + m_pAddDBPB->SetClickHdl(LINK(this, SwFieldDBPage, AddDBHdl)); } -SwFldDBPage::~SwFldDBPage() +SwFieldDBPage::~SwFieldDBPage() { disposeOnce(); } -void SwFldDBPage::dispose() +void SwFieldDBPage::dispose() { m_pTypeLB.clear(); m_pDatabaseTLB.clear(); @@ -91,11 +91,11 @@ void SwFldDBPage::dispose() m_pNumFormatLB.clear(); m_pFormatLB.clear(); m_pFormat.clear(); - SwFldPage::dispose(); + SwFieldPage::dispose(); } // initialise TabPage -void SwFldDBPage::Reset(const SfxItemSet*) +void SwFieldDBPage::Reset(const SfxItemSet*) { Init(); // Allgemeine initialisierung @@ -105,15 +105,15 @@ void SwFldDBPage::Reset(const SfxItemSet*) m_pTypeLB->Clear(); - if (!IsFldEdit()) + if (!IsFieldEdit()) { // initialise TypeListBox - const SwFldGroupRgn& rRg = SwFldMgr::GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); + const SwFieldGroupRgn& rRg = SwFieldMgr::GetGroupRange(IsFieldDlgHtmlMode(), GetGroup()); for(sal_uInt16 i = rRg.nStart; i < rRg.nEnd; ++i) { - const sal_uInt16 nTypeId = SwFldMgr::GetTypeId(i); - const sal_Int32 nPos = m_pTypeLB->InsertEntry(SwFldMgr::GetTypeStr(i)); + const sal_uInt16 nTypeId = SwFieldMgr::GetTypeId(i); + const sal_Int32 nPos = m_pTypeLB->InsertEntry(SwFieldMgr::GetTypeStr(i)); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId)); } } @@ -121,7 +121,7 @@ void SwFldDBPage::Reset(const SfxItemSet*) { const sal_uInt16 nTypeId = GetCurField()->GetTypeId(); const sal_Int32 nPos = m_pTypeLB->InsertEntry( - SwFldMgr::GetTypeStr(SwFldMgr::GetPos(nTypeId))); + SwFieldMgr::GetTypeStr(SwFieldMgr::GetPos(nTypeId))); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId)); } @@ -131,17 +131,17 @@ void SwFldDBPage::Reset(const SfxItemSet*) m_pFormatLB->Clear(); - const sal_uInt16 nSize = GetFldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, false, IsFldDlgHtmlMode()); + const sal_uInt16 nSize = GetFieldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, false, IsFieldDlgHtmlMode()); for( sal_uInt16 i = 0; i < nSize; ++i ) { - const sal_Int32 nEntryPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i)); - const sal_uInt16 nFmtId = GetFldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i ); - m_pFormatLB->SetEntryData( nEntryPos, reinterpret_cast<void*>(nFmtId) ); - if( SVX_NUM_ARABIC == nFmtId ) + const sal_Int32 nEntryPos = m_pFormatLB->InsertEntry(GetFieldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i)); + const sal_uInt16 nFormatId = GetFieldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i ); + m_pFormatLB->SetEntryData( nEntryPos, reinterpret_cast<void*>(nFormatId) ); + if( SVX_NUM_ARABIC == nFormatId ) m_pFormatLB->SelectEntryPos( nEntryPos ); } - if (!IsFldEdit()) + if (!IsFieldEdit()) { if (nOldPos != LISTBOX_ENTRY_NOTFOUND) m_pTypeLB->SelectEntryPos(nOldPos); @@ -183,10 +183,10 @@ void SwFldDBPage::Reset(const SfxItemSet*) TypeHdl(0); m_pTypeLB->SetUpdateMode(true); - m_pTypeLB->SetSelectHdl(LINK(this, SwFldDBPage, TypeHdl)); - m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFldDBPage, InsertHdl)); + m_pTypeLB->SetSelectHdl(LINK(this, SwFieldDBPage, TypeHdl)); + m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFieldDBPage, InsertHdl)); - if (IsFldEdit()) + if (IsFieldEdit()) { m_pConditionED->SaveValue(); m_pValueED->SaveValue(); @@ -196,7 +196,7 @@ void SwFldDBPage::Reset(const SfxItemSet*) } } -bool SwFldDBPage::FillItemSet(SfxItemSet* ) +bool SwFieldDBPage::FillItemSet(SfxItemSet* ) { OUString sTableName; OUString sColumnName; @@ -251,31 +251,31 @@ bool SwFldDBPage::FillItemSet(SfxItemSet* ) OUString sTempDBName = m_pDatabaseTLB->GetDBName(sTempTableName, sTempColumnName); bool bDBListBoxChanged = m_sOldDBName != sTempDBName || m_sOldTableName != sTempTableName || m_sOldColumnName != sTempColumnName; - if (!IsFldEdit() || + if (!IsFieldEdit() || m_pConditionED->IsValueChangedFromSaved() || m_pValueED->GetSavedValue() != aVal || bDBListBoxChanged || m_nOldFormat != nFormat || m_nOldSubType != nSubType) { - InsertFld( nTypeId, nSubType, aName, aVal, nFormat); + InsertField( nTypeId, nSubType, aName, aVal, nFormat); } } return false; } -VclPtr<SfxTabPage> SwFldDBPage::Create( vcl::Window* pParent, +VclPtr<SfxTabPage> SwFieldDBPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return VclPtr<SwFldDBPage>::Create( pParent, *rAttrSet ); + return VclPtr<SwFieldDBPage>::Create( pParent, *rAttrSet ); } -sal_uInt16 SwFldDBPage::GetGroup() +sal_uInt16 SwFieldDBPage::GetGroup() { return GRP_DB; } -IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) +IMPL_LINK( SwFieldDBPage, TypeHdl, ListBox *, pBox ) { // save old ListBoxPos const sal_Int32 nOld = GetTypeSel(); @@ -299,7 +299,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) m_pDatabaseTLB->ShowColumns(nTypeId == TYP_DBFLD); - if (IsFldEdit()) + if (IsFieldEdit()) { SwDBData aData; OUString sColumnName; @@ -326,7 +326,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) if (pBox) // type was changed by user m_pDBFormatRB->Check(); - if (IsFldEdit()) + if (IsFieldEdit()) { if (GetCurField()->GetFormat() != 0 && GetCurField()->GetFormat() != SAL_MAX_UINT32) m_pNumFormatLB->SetDefFormat(GetCurField()->GetFormat()); @@ -343,7 +343,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) // no break! case TYP_DBNEXTSETFLD: bCond = true; - if (IsFldEdit()) + if (IsFieldEdit()) { m_pConditionED->SetText(GetCurField()->GetPar1()); m_pValueED->SetText(GetCurField()->GetPar2()); @@ -358,7 +358,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) m_pNewFormatRB->Check(); m_pNumFormatLB->Hide(); m_pFormatLB->Show(); - if( IsFldEdit() ) + if( IsFieldEdit() ) { for( sal_Int32 nI = m_pFormatLB->GetEntryCount(); nI; ) if( GetCurField()->GetFormat() == reinterpret_cast<sal_uLong>( @@ -382,7 +382,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) } m_pFormat->Enable(bDBFormat || bFormat); - if (!IsFldEdit()) + if (!IsFieldEdit()) { m_pValueED->SetText(aEmptyOUStr); if (bCond) @@ -397,7 +397,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) return 0; } -IMPL_LINK( SwFldDBPage, NumSelectHdl, NumFormatListBox *, pLB ) +IMPL_LINK( SwFieldDBPage, NumSelectHdl, NumFormatListBox *, pLB ) { m_pNewFormatRB->Check(); m_aOldNumSelectHdl.Call(pLB); @@ -405,7 +405,7 @@ IMPL_LINK( SwFldDBPage, NumSelectHdl, NumFormatListBox *, pLB ) return 0; } -void SwFldDBPage::CheckInsert() +void SwFieldDBPage::CheckInsert() { bool bInsert = true; const sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); @@ -434,7 +434,7 @@ void SwFldDBPage::CheckInsert() EnableInsert(bInsert); } -IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox ) +IMPL_LINK( SwFieldDBPage, TreeSelectHdl, SvTreeListBox *, pBox ) { SvTreeListEntry* pEntry = pBox->GetCurEntry(); if (pEntry) @@ -458,11 +458,11 @@ IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox ) OUString sColumnName; sal_Bool bIsTable; OUString sDBName = m_pDatabaseTLB->GetDBName(sTableName, sColumnName, &bIsTable); - bNumFormat = GetFldMgr().IsDBNumeric(sDBName, + bNumFormat = GetFieldMgr().IsDBNumeric(sDBName, sTableName, bIsTable, sColumnName); - if (!IsFldEdit()) + if (!IsFieldEdit()) m_pDBFormatRB->Check(); } @@ -475,7 +475,7 @@ IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox ) return 0; } -IMPL_LINK_NOARG(SwFldDBPage, AddDBHdl) +IMPL_LINK_NOARG(SwFieldDBPage, AddDBHdl) { OUString sNewDB = SwDBManager::LoadAndRegisterDataSource(); if(!sNewDB.isEmpty()) @@ -486,13 +486,13 @@ IMPL_LINK_NOARG(SwFldDBPage, AddDBHdl) } // Modify -IMPL_LINK_NOARG(SwFldDBPage, ModifyHdl) +IMPL_LINK_NOARG(SwFieldDBPage, ModifyHdl) { CheckInsert(); return 0; } -void SwFldDBPage::FillUserData() +void SwFieldDBPage::FillUserData() { const sal_Int32 nEntryPos = m_pTypeLB->GetSelectEntryPos(); const sal_uInt16 nTypeSel = ( LISTBOX_ENTRY_NOTFOUND == nEntryPos ) @@ -500,7 +500,7 @@ void SwFldDBPage::FillUserData() SetUserData(USER_DATA_VERSION ";" + OUString::number( nTypeSel )); } -void SwFldDBPage::ActivateMailMergeAddress() +void SwFieldDBPage::ActivateMailMergeAddress() { sal_uLong nData = TYP_DBFLD; m_pTypeLB->SelectEntryPos(m_pTypeLB->GetEntryPos( reinterpret_cast<const void*>( nData ) )); @@ -509,7 +509,7 @@ void SwFldDBPage::ActivateMailMergeAddress() m_pDatabaseTLB->Select(rData.sDataSource, rData.sCommand, aEmptyOUStr); } -void SwFldDBPage::SetWrtShell(SwWrtShell& rSh) +void SwFieldDBPage::SetWrtShell(SwWrtShell& rSh) { m_pDatabaseTLB->SetWrtShell(rSh); } diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx index c8328c445b03..0ac7f4c37768 100644 --- a/sw/source/ui/fldui/flddb.hxx +++ b/sw/source/ui/fldui/flddb.hxx @@ -30,7 +30,7 @@ #include "fldpage.hxx" -class SwFldDBPage : public SwFldPage +class SwFieldDBPage : public SwFieldPage { VclPtr<ListBox> m_pTypeLB; VclPtr<SwDBTreeList> m_pDatabaseTLB; @@ -62,15 +62,15 @@ class SwFldDBPage : public SwFldPage void CheckInsert(); - using SwFldPage::SetWrtShell; + using SwFieldPage::SetWrtShell; protected: virtual sal_uInt16 GetGroup() SAL_OVERRIDE; public: - SwFldDBPage(vcl::Window* pParent, const SfxItemSet& rSet); + SwFieldDBPage(vcl::Window* pParent, const SfxItemSet& rSet); - virtual ~SwFldDBPage(); + virtual ~SwFieldDBPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 8814ceb3c3f9..fe8e4feb0e93 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -47,8 +47,8 @@ using namespace nsSwDocInfoSubType; using namespace com::sun::star; -SwFldDokInfPage::SwFldDokInfPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) - : SwFldPage(pParent, "FldDocInfoPage", +SwFieldDokInfPage::SwFieldDokInfPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) + : SwFieldPage(pParent, "FieldDocInfoPage", "modules/swriter/ui/flddocinfopage.ui", rCoreSet) , pSelEntry(0) , nOldSel(0) @@ -87,12 +87,12 @@ SwFldDokInfPage::SwFldDokInfPage(vcl::Window* pParent, const SfxItemSet& rCoreSe pItem->GetValue() >>= xCustomPropertySet; } -SwFldDokInfPage::~SwFldDokInfPage() +SwFieldDokInfPage::~SwFieldDokInfPage() { disposeOnce(); } -void SwFldDokInfPage::dispose() +void SwFieldDokInfPage::dispose() { m_pTypeTLB.clear(); m_pSelection.clear(); @@ -100,10 +100,10 @@ void SwFldDokInfPage::dispose() m_pFormat.clear(); m_pFormatLB.clear(); m_pFixedCB.clear(); - SwFldPage::dispose(); + SwFieldPage::dispose(); } -void SwFldDokInfPage::Reset(const SfxItemSet* ) +void SwFieldDokInfPage::Reset(const SfxItemSet* ) { Init(); // general initialisation @@ -118,7 +118,7 @@ void SwFldDokInfPage::Reset(const SfxItemSet* ) SvTreeListEntry* pInfo = 0; sal_uInt16 nSubType = USHRT_MAX; - if (IsFldEdit()) + if (IsFieldEdit()) { const SwField* pCurField = GetCurField(); nSubType = static_cast<const SwDocInfoField*>(pCurField)->GetSubType() & 0xff; @@ -144,10 +144,10 @@ void SwFldDokInfPage::Reset(const SfxItemSet* ) } std::vector<OUString> aLst; - GetFldMgr().GetSubTypes(TYP_DOCINFOFLD, aLst); + GetFieldMgr().GetSubTypes(TYP_DOCINFOFLD, aLst); for(size_t i = 0; i < aLst.size(); ++i) { - if (!IsFldEdit() || nSubType == i) + if (!IsFieldEdit() || nSubType == i) { if (DI_CUSTOM == i) { @@ -177,7 +177,7 @@ void SwFldDokInfPage::Reset(const SfxItemSet* ) } else { - if (!(IsFldDlgHtmlMode() && (i == DI_EDIT || i == DI_THEMA || i == DI_PRINT))) + if (!(IsFieldDlgHtmlMode() && (i == DI_EDIT || i == DI_THEMA || i == DI_PRINT))) { pEntry = m_pTypeTLB->InsertEntry(aLst[i]); pEntry->SetUserData(reinterpret_cast<void*>(i)); @@ -205,13 +205,13 @@ void SwFldDokInfPage::Reset(const SfxItemSet* ) TypeHdl(); m_pTypeTLB->SetUpdateMode(true); - m_pTypeTLB->SetSelectHdl(LINK(this, SwFldDokInfPage, TypeHdl)); - m_pTypeTLB->SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl)); - m_pSelectionLB->SetSelectHdl(LINK(this, SwFldDokInfPage, SubTypeHdl)); - m_pSelectionLB->SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl)); - m_pFormatLB->SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl)); + m_pTypeTLB->SetSelectHdl(LINK(this, SwFieldDokInfPage, TypeHdl)); + m_pTypeTLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, InsertHdl)); + m_pSelectionLB->SetSelectHdl(LINK(this, SwFieldDokInfPage, SubTypeHdl)); + m_pSelectionLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, InsertHdl)); + m_pFormatLB->SetDoubleClickHdl(LINK(this, SwFieldDokInfPage, InsertHdl)); - if (IsFldEdit()) + if (IsFieldEdit()) { nOldSel = m_pSelectionLB->GetSelectEntryPos(); nOldFormat = GetCurField()->GetFormat(); @@ -219,7 +219,7 @@ void SwFldDokInfPage::Reset(const SfxItemSet* ) } } -IMPL_LINK_NOARG(SwFldDokInfPage, TypeHdl) +IMPL_LINK_NOARG(SwFieldDokInfPage, TypeHdl) { // save old ListBoxPos SvTreeListEntry* pOldEntry = pSelEntry; @@ -240,7 +240,7 @@ IMPL_LINK_NOARG(SwFldDokInfPage, TypeHdl) return 0; } -IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl) +IMPL_LINK_NOARG(SwFieldDokInfPage, SubTypeHdl) { sal_uInt16 nSubType = (sal_uInt16)reinterpret_cast<sal_uLong>(pSelEntry->GetUserData()); sal_Int32 nPos = m_pSelectionLB->GetSelectEntryPos(); @@ -327,11 +327,11 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl) bEnable = true; } - sal_uLong nFormat = IsFldEdit() ? static_cast<SwDocInfoField*>(GetCurField())->GetFormat() : 0; + sal_uLong nFormat = IsFieldEdit() ? static_cast<SwDocInfoField*>(GetCurField())->GetFormat() : 0; - sal_uInt16 nOldSubType = IsFldEdit() ? (static_cast<SwDocInfoField*>(GetCurField())->GetSubType() & 0xff00) : 0; + sal_uInt16 nOldSubType = IsFieldEdit() ? (static_cast<SwDocInfoField*>(GetCurField())->GetSubType() & 0xff00) : 0; - if (IsFldEdit()) + if (IsFieldEdit()) { nPos = m_pSelectionLB->GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND ) @@ -373,7 +373,7 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl) return 0; } -sal_Int32 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType) +sal_Int32 SwFieldDokInfPage::FillSelectionLB(sal_uInt16 nSubType) { // fill Format-Listbox sal_uInt16 nTypeId = TYP_DOCINFOFLD; @@ -387,9 +387,9 @@ sal_Int32 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType) sal_uInt16 nSize = 0; sal_Int32 nSelPos = LISTBOX_ENTRY_NOTFOUND; - sal_uInt16 nExtSubType = IsFldEdit() ? (static_cast<SwDocInfoField*>(GetCurField())->GetSubType() & 0xff00) : 0; + sal_uInt16 nExtSubType = IsFieldEdit() ? (static_cast<SwDocInfoField*>(GetCurField())->GetSubType() & 0xff00) : 0; - if (IsFldEdit()) + if (IsFieldEdit()) { m_pFixedCB->Check((nExtSubType & DI_SUB_FIXED) != 0); nExtSubType = ((nExtSubType & ~DI_SUB_FIXED) >> 8) - 1; @@ -401,12 +401,12 @@ sal_Int32 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType) } else { - nSize = GetFldMgr().GetFormatCount(nTypeId, false, IsFldDlgHtmlMode()); + nSize = GetFieldMgr().GetFormatCount(nTypeId, false, IsFieldDlgHtmlMode()); for (sal_uInt16 i = 0; i < nSize; i++) { - sal_Int32 nPos = m_pSelectionLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); - m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId(nTypeId, i))); - if (IsFldEdit() && i == nExtSubType) + sal_Int32 nPos = m_pSelectionLB->InsertEntry(GetFieldMgr().GetFormatStr(nTypeId, i)); + m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(GetFieldMgr().GetFormatId(nTypeId, i))); + if (IsFieldEdit() && i == nExtSubType) nSelPos = nPos; } } @@ -426,7 +426,7 @@ sal_Int32 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType) return nSize; } -bool SwFldDokInfPage::FillItemSet(SfxItemSet* ) +bool SwFieldDokInfPage::FillItemSet(SfxItemSet* ) { if (!pSelEntry || (sal_uInt16)reinterpret_cast<sal_uLong>(pSelEntry->GetUserData()) == USHRT_MAX) return false; @@ -451,29 +451,29 @@ bool SwFldDokInfPage::FillItemSet(SfxItemSet* ) if(nPos != LISTBOX_ENTRY_NOTFOUND) nFormat = m_pFormatLB->GetFormat(); - if (!IsFldEdit() || nOldSel != m_pSelectionLB->GetSelectEntryPos() || + if (!IsFieldEdit() || nOldSel != m_pSelectionLB->GetSelectEntryPos() || nOldFormat != nFormat || m_pFixedCB->IsValueChangedFromSaved() || (DI_CUSTOM == nSubType && aName != m_sOldCustomFieldName )) { - InsertFld(TYP_DOCINFOFLD, nSubType, aName, aEmptyOUStr, nFormat, + InsertField(TYP_DOCINFOFLD, nSubType, aName, aEmptyOUStr, nFormat, ' ', m_pFormatLB->IsAutomaticLanguage()); } return false; } -VclPtr<SfxTabPage> SwFldDokInfPage::Create( vcl::Window* pParent, +VclPtr<SfxTabPage> SwFieldDokInfPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return VclPtr<SwFldDokInfPage>::Create( pParent, *rAttrSet ); + return VclPtr<SwFieldDokInfPage>::Create( pParent, *rAttrSet ); } -sal_uInt16 SwFldDokInfPage::GetGroup() +sal_uInt16 SwFieldDokInfPage::GetGroup() { return GRP_REG; } -void SwFldDokInfPage::FillUserData() +void SwFieldDokInfPage::FillUserData() { SvTreeListEntry* pEntry = m_pTypeTLB->FirstSelected(); sal_uInt16 nTypeSel = pEntry ? sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(pEntry->GetUserData())) : USHRT_MAX; diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx index fc9452075b4a..7a1ea48df165 100644 --- a/sw/source/ui/fldui/flddinf.hxx +++ b/sw/source/ui/fldui/flddinf.hxx @@ -34,7 +34,7 @@ namespace com{namespace sun{ namespace star{ namespace beans{ class XPropertySet; }}}} -class SwFldDokInfPage : public SwFldPage +class SwFieldDokInfPage : public SwFieldPage { VclPtr<SvTreeListBox> m_pTypeTLB; VclPtr<VclContainer> m_pSelection; @@ -59,9 +59,9 @@ protected: virtual sal_uInt16 GetGroup() SAL_OVERRIDE; public: - SwFldDokInfPage(vcl::Window* pWindow, const SfxItemSet& rSet); + SwFieldDokInfPage(vcl::Window* pWindow, const SfxItemSet& rSet); - virtual ~SwFldDokInfPage(); + virtual ~SwFieldDokInfPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index 4a54d14bc10c..780b49deb570 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -34,8 +34,8 @@ #define USER_DATA_VERSION_1 "1" #define USER_DATA_VERSION USER_DATA_VERSION_1 -SwFldDokPage::SwFldDokPage(vcl::Window* pParent, const SfxItemSet& rCoreSet ) - : SwFldPage(pParent, "FldDocumentPage", +SwFieldDokPage::SwFieldDokPage(vcl::Window* pParent, const SfxItemSet& rCoreSet ) + : SwFieldPage(pParent, "FieldDocumentPage", "modules/swriter/ui/flddocumentpage.ui", rCoreSet) , nOldSel(0) , nOldFormat(0) @@ -67,9 +67,9 @@ SwFldDokPage::SwFldDokPage(vcl::Window* pParent, const SfxItemSet& rCoreSet ) m_pSelectionLB->set_width_request(nWidth); m_pFormatLB->set_width_request(nWidth); - m_pSelectionLB->SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl)); - m_pFormatLB->SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl)); - m_pNumFormatLB->SetDoubleClickHdl(LINK(this, SwFldDokPage, NumFormatHdl)); + m_pSelectionLB->SetDoubleClickHdl(LINK(this, SwFieldDokPage, InsertHdl)); + m_pFormatLB->SetDoubleClickHdl(LINK(this, SwFieldDokPage, InsertHdl)); + m_pNumFormatLB->SetDoubleClickHdl(LINK(this, SwFieldDokPage, NumFormatHdl)); m_pLevelED->SetMax(MAXLEVEL); m_pDateOffsetED->SetMin(LONG_MIN); @@ -78,12 +78,12 @@ SwFldDokPage::SwFldDokPage(vcl::Window* pParent, const SfxItemSet& rCoreSet ) m_pNumFormatLB->SetShowLanguageControl(true); } -SwFldDokPage::~SwFldDokPage() +SwFieldDokPage::~SwFieldDokPage() { disposeOnce(); } -void SwFldDokPage::dispose() +void SwFieldDokPage::dispose() { m_pTypeLB.clear(); m_pSelection.clear(); @@ -99,30 +99,30 @@ void SwFldDokPage::dispose() m_pFormatLB.clear(); m_pNumFormatLB.clear(); m_pFixedCB.clear(); - SwFldPage::dispose(); + SwFieldPage::dispose(); } -void SwFldDokPage::Reset(const SfxItemSet* ) +void SwFieldDokPage::Reset(const SfxItemSet* ) { SavePos(m_pTypeLB); Init(); // general initialisation // initialise TypeListBox - const SwFldGroupRgn& rRg = SwFldMgr::GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); + const SwFieldGroupRgn& rRg = SwFieldMgr::GetGroupRange(IsFieldDlgHtmlMode(), GetGroup()); m_pTypeLB->SetUpdateMode(false); m_pTypeLB->Clear(); sal_Int32 nPos; - if (!IsFldEdit()) + if (!IsFieldEdit()) { bool bPage = false; // fill Type-Listbox for(sal_uInt16 i = rRg.nStart; i < rRg.nEnd; ++i) { - const sal_uInt16 nTypeId = SwFldMgr::GetTypeId(i); + const sal_uInt16 nTypeId = SwFieldMgr::GetTypeId(i); switch (nTypeId) { @@ -138,7 +138,7 @@ void SwFldDokPage::Reset(const SfxItemSet* ) break; default: - nPos = m_pTypeLB->InsertEntry(SwFldMgr::GetTypeStr(i)); + nPos = m_pTypeLB->InsertEntry(SwFieldMgr::GetTypeStr(i)); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId)); break; } @@ -152,7 +152,7 @@ void SwFldDokPage::Reset(const SfxItemSet* ) nTypeId = TYP_DATEFLD; if (nTypeId == TYP_FIXTIMEFLD) nTypeId = TYP_TIMEFLD; - nPos = m_pTypeLB->InsertEntry(SwFldMgr::GetTypeStr(SwFldMgr::GetPos(nTypeId))); + nPos = m_pTypeLB->InsertEntry(SwFieldMgr::GetTypeStr(SwFieldMgr::GetPos(nTypeId))); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId)); m_pNumFormatLB->SetAutomaticLanguage(pCurField->IsAutomaticLanguage()); SwWrtShell *pSh = GetWrtShell(); @@ -170,9 +170,9 @@ void SwFldDokPage::Reset(const SfxItemSet* ) RestorePos(m_pTypeLB); m_pTypeLB->SetUpdateMode(true); - m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl)); - m_pTypeLB->SetSelectHdl(LINK(this, SwFldDokPage, TypeHdl)); - m_pFormatLB->SetSelectHdl(LINK(this, SwFldDokPage, FormatHdl)); + m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFieldDokPage, InsertHdl)); + m_pTypeLB->SetSelectHdl(LINK(this, SwFieldDokPage, TypeHdl)); + m_pFormatLB->SetSelectHdl(LINK(this, SwFieldDokPage, FormatHdl)); if( !IsRefresh() ) { @@ -194,7 +194,7 @@ void SwFldDokPage::Reset(const SfxItemSet* ) } TypeHdl(0); - if (IsFldEdit()) + if (IsFieldEdit()) { nOldSel = m_pSelectionLB->GetSelectEntryPos(); nOldFormat = GetCurField()->GetFormat(); @@ -205,7 +205,7 @@ void SwFldDokPage::Reset(const SfxItemSet* ) } } -IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) +IMPL_LINK_NOARG(SwFieldDokPage, TypeHdl) { // save old ListBoxPos const sal_Int32 nOld = GetTypeSel(); @@ -234,23 +234,23 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) if (nTypeId != USHRT_MAX) { std::vector<OUString> aLst; - GetFldMgr().GetSubTypes(nTypeId, aLst); + GetFieldMgr().GetSubTypes(nTypeId, aLst); if (nTypeId != TYP_AUTHORFLD) nCount = aLst.size(); else - nCount = GetFldMgr().GetFormatCount(nTypeId, false, IsFldDlgHtmlMode()); + nCount = GetFieldMgr().GetFormatCount(nTypeId, false, IsFieldDlgHtmlMode()); size_t nPos; for(size_t i = 0; i < nCount; ++i) { - if (!IsFldEdit()) + if (!IsFieldEdit()) { if (nTypeId != TYP_AUTHORFLD) nPos = m_pSelectionLB->InsertEntry(aLst[i]); else - nPos = m_pSelectionLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); + nPos = m_pSelectionLB->InsertEntry(GetFieldMgr().GetFormatStr(nTypeId, i)); m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(i)); } @@ -280,10 +280,10 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) case TYP_AUTHORFLD: { - const OUString sFmt(GetFldMgr().GetFormatStr(nTypeId, i)); - nPos = m_pSelectionLB->InsertEntry(sFmt); + const OUString sFormat(GetFieldMgr().GetFormatStr(nTypeId, i)); + nPos = m_pSelectionLB->InsertEntry(sFormat); m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(i)); - m_pSelectionLB->SelectEntry(GetFldMgr().GetFormatStr(nTypeId, GetCurField()->GetFormat())); + m_pSelectionLB->SelectEntry(GetFieldMgr().GetFormatStr(nTypeId, GetCurField()->GetFormat())); break; } @@ -309,7 +309,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) AddSubType(TYP_NEXTPAGEFLD); nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pSelectionLB->GetEntryData(0)); nCount = 3; - m_pSelectionLB->SetSelectHdl(LINK(this, SwFldDokPage, SubTypeHdl)); + m_pSelectionLB->SetSelectHdl(LINK(this, SwFieldDokPage, SubTypeHdl)); } bool bEnable = nCount != 0; @@ -322,45 +322,45 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) // fill Format-Listbox sal_Int32 nSize = FillFormatLB(nTypeId); - bool bValue = false, bLevel = false, bNumFmt = false, bOffset = false; + bool bValue = false, bLevel = false, bNumFormat = false, bOffset = false; bool bFormat = nSize != 0; bool bOneArea = false; bool bFixed = false; - sal_uInt16 nFmtType = 0; + sal_uInt16 nFormatType = 0; switch (nTypeId) { case TYP_DATEFLD: - bFormat = bNumFmt = bOneArea = bOffset = true; + bFormat = bNumFormat = bOneArea = bOffset = true; - nFmtType = css::util::NumberFormat::DATE; + nFormatType = css::util::NumberFormat::DATE; m_pDateFT->Show(); m_pDateOffsetED->SetFirst(-31); // one month m_pDateOffsetED->SetLast(31); - if (IsFldEdit()) + if (IsFieldEdit()) m_pDateOffsetED->SetValue( static_cast<SwDateTimeField*>(GetCurField())->GetOffset() / 24 / 60); break; case TYP_TIMEFLD: - bFormat = bNumFmt = bOneArea = bOffset = true; + bFormat = bNumFormat = bOneArea = bOffset = true; - nFmtType = css::util::NumberFormat::TIME; + nFormatType = css::util::NumberFormat::TIME; m_pTimeFT->Show(); m_pDateOffsetED->SetFirst(-1440); // one day m_pDateOffsetED->SetLast(1440); - if (IsFldEdit()) + if (IsFieldEdit()) m_pDateOffsetED->SetValue( static_cast<SwDateTimeField*>(GetCurField())->GetOffset() ); break; case TYP_PREVPAGEFLD: case TYP_NEXTPAGEFLD: - if (IsFldEdit()) + if (IsFieldEdit()) { const sal_uInt16 nTmp = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatLB->GetEntryData( m_pFormatLB->GetSelectEntryPos() )); @@ -385,14 +385,14 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) case TYP_CHAPTERFLD: m_pValueFT->SetText(SW_RESSTR(STR_LEVEL)); - if (IsFldEdit()) + if (IsFieldEdit()) m_pLevelED->SetText(OUString::number(static_cast<SwChapterField*>(GetCurField())->GetLevel() + 1)); bLevel = true; break; case TYP_PAGENUMBERFLD: m_pValueFT->SetText( SW_RESSTR( STR_OFFSET )); - if (IsFldEdit()) + if (IsFieldEdit()) m_pValueED->SetText(GetCurField()->GetPar2()); bValue = true; break; @@ -407,9 +407,9 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) break; } - if (bNumFmt) + if (bNumFormat) { - if (IsFldEdit()) + if (IsFieldEdit()) { m_pNumFormatLB->SetDefFormat(GetCurField()->GetFormat()); @@ -418,19 +418,19 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) // always set Format-Type because otherwise when date/time formats are combined, // both formats would be displayed at the same time m_pNumFormatLB->SetFormatType(0); - m_pNumFormatLB->SetFormatType(nFmtType); + m_pNumFormatLB->SetFormatType(nFormatType); // set correct format once again m_pNumFormatLB->SetDefFormat(GetCurField()->GetFormat()); } } else - m_pNumFormatLB->SetFormatType(nFmtType); + m_pNumFormatLB->SetFormatType(nFormatType); m_pNumFormatLB->SetOneArea(bOneArea); } - m_pFormatLB->Show(!bNumFmt); - m_pNumFormatLB->Show(bNumFmt); + m_pFormatLB->Show(!bNumFormat); + m_pNumFormatLB->Show(bNumFormat); m_pValueFT->Show(bValue); m_pValueED->Show(bValue); @@ -442,7 +442,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) m_pFormat->Enable(bFormat); m_pFixedCB->Enable(bFixed); - if (IsFldEdit()) + if (IsFieldEdit()) m_pFixedCB->Check( (GetCurField()->GetFormat() & AF_FIXED) != 0 && bFixed ); if (m_pNumFormatLB->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND) @@ -454,13 +454,13 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) return 0; } -void SwFldDokPage::AddSubType(sal_uInt16 nTypeId) +void SwFieldDokPage::AddSubType(sal_uInt16 nTypeId) { const sal_Int32 nPos = m_pSelectionLB->InsertEntry(SwFieldType::GetTypeStr(nTypeId)); m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId)); } -IMPL_LINK_NOARG(SwFldDokPage, SubTypeHdl) +IMPL_LINK_NOARG(SwFieldDokPage, SubTypeHdl) { sal_Int32 nPos = m_pSelectionLB->GetSelectEntryPos(); if(nPos == LISTBOX_ENTRY_NOTFOUND) @@ -494,7 +494,7 @@ IMPL_LINK_NOARG(SwFldDokPage, SubTypeHdl) return 0; } -sal_Int32 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId) +sal_Int32 SwFieldDokPage::FillFormatLB(sal_uInt16 nTypeId) { // fill Format-Listbox m_pFormatLB->Clear(); @@ -502,14 +502,14 @@ sal_Int32 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId) if (nTypeId == TYP_AUTHORFLD) return m_pFormatLB->GetEntryCount(); - const sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, false, IsFldDlgHtmlMode()); + const sal_uInt16 nSize = GetFieldMgr().GetFormatCount(nTypeId, false, IsFieldDlgHtmlMode()); for( sal_uInt16 i = 0; i < nSize; ++i ) { - const sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); - const sal_uInt16 nFmtId = GetFldMgr().GetFormatId( nTypeId, i ); - m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>( nFmtId )); - if (IsFldEdit() && nFmtId == (GetCurField()->GetFormat() & ~AF_FIXED)) + const sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFieldMgr().GetFormatStr(nTypeId, i)); + const sal_uInt16 nFormatId = GetFieldMgr().GetFormatId( nTypeId, i ); + m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>( nFormatId )); + if (IsFieldEdit() && nFormatId == (GetCurField()->GetFormat() & ~AF_FIXED)) m_pFormatLB->SelectEntryPos( nPos ); } @@ -529,7 +529,7 @@ sal_Int32 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId) return nSize; } -IMPL_LINK_NOARG(SwFldDokPage, FormatHdl) +IMPL_LINK_NOARG(SwFieldDokPage, FormatHdl) { sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); @@ -547,21 +547,21 @@ IMPL_LINK_NOARG(SwFldDokPage, FormatHdl) // Prev/Next - PageNumFields special treatment: sal_uInt16 nTmp = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatLB->GetEntryData( m_pFormatLB->GetSelectEntryPos() )); - const OUString sOldTxt( m_pValueFT->GetText() ); - const OUString sNewTxt( SW_RES( SVX_NUM_CHAR_SPECIAL == nTmp ? STR_VALUE + const OUString sOldText( m_pValueFT->GetText() ); + const OUString sNewText( SW_RES( SVX_NUM_CHAR_SPECIAL == nTmp ? STR_VALUE : STR_OFFSET )); - if( sOldTxt != sNewTxt ) - m_pValueFT->SetText( sNewTxt ); + if( sOldText != sNewText ) + m_pValueFT->SetText( sNewText ); - if (sOldTxt != m_pValueFT->GetText()) + if (sOldText != m_pValueFT->GetText()) m_pValueED->SetText( aEmptyOUStr ); } return 0; } -bool SwFldDokPage::FillItemSet(SfxItemSet* ) +bool SwFieldDokPage::FillItemSet(SfxItemSet* ) { sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); @@ -639,7 +639,7 @@ bool SwFldDokPage::FillItemSet(SfxItemSet* ) break; } - if (!IsFldEdit() || + if (!IsFieldEdit() || nOldSel != m_pSelectionLB->GetSelectEntryPos() || nOldFormat != nFormat || m_pFixedCB->IsValueChangedFromSaved() || @@ -647,24 +647,24 @@ bool SwFldDokPage::FillItemSet(SfxItemSet* ) m_pLevelED->IsValueChangedFromSaved() || m_pDateOffsetED->IsValueChangedFromSaved()) { - InsertFld( nTypeId, nSubType, aEmptyOUStr, aVal, nFormat, ' ', m_pNumFormatLB->IsAutomaticLanguage() ); + InsertField( nTypeId, nSubType, aEmptyOUStr, aVal, nFormat, ' ', m_pNumFormatLB->IsAutomaticLanguage() ); } return false; } -VclPtr<SfxTabPage> SwFldDokPage::Create( vcl::Window* pParent, +VclPtr<SfxTabPage> SwFieldDokPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return VclPtr<SwFldDokPage>::Create( pParent, *rAttrSet ); + return VclPtr<SwFieldDokPage>::Create( pParent, *rAttrSet ); } -sal_uInt16 SwFldDokPage::GetGroup() +sal_uInt16 SwFieldDokPage::GetGroup() { return GRP_DOC; } -void SwFldDokPage::FillUserData() +void SwFieldDokPage::FillUserData() { const sal_Int32 nEntryPos = m_pTypeLB->GetSelectEntryPos(); const sal_uInt16 nTypeSel = ( LISTBOX_ENTRY_NOTFOUND == nEntryPos ) diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx index 3beb6a7c0a1b..d3035ea5e969 100644 --- a/sw/source/ui/fldui/flddok.hxx +++ b/sw/source/ui/fldui/flddok.hxx @@ -30,7 +30,7 @@ #include "numfmtlb.hxx" #include "fldpage.hxx" -class SwFldDokPage : public SwFldPage +class SwFieldDokPage : public SwFieldPage { VclPtr<ListBox> m_pTypeLB; VclPtr<VclContainer> m_pSelection; @@ -61,9 +61,9 @@ protected: virtual sal_uInt16 GetGroup() SAL_OVERRIDE; public: - SwFldDokPage(vcl::Window* pWindow, const SfxItemSet& rSet); + SwFieldDokPage(vcl::Window* pWindow, const SfxItemSet& rSet); - virtual ~SwFldDokPage(); + virtual ~SwFieldDokPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 17e805442d54..e95edece3efc 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -49,15 +49,15 @@ #include <boost/scoped_ptr.hpp> #include <swuiexp.hxx> -void SwFldEditDlg::EnsureSelection(SwField *pCurFld, SwFldMgr &rMgr) +void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr) { - if (pSh->CrsrInsideInputFld()) + if (pSh->CrsrInsideInputField()) { // move cursor to start of Input Field - SwInputField* pInputFld = dynamic_cast<SwInputField*>(pCurFld); - if (pInputFld && pInputFld->GetFmtFld()) + SwInputField* pInputField = dynamic_cast<SwInputField*>(pCurField); + if (pInputField && pInputField->GetFormatField()) { - pSh->GotoField( *(pInputFld->GetFmtFld()) ); + pSh->GotoField( *(pInputField->GetFormatField()) ); } } @@ -68,14 +68,14 @@ void SwFldEditDlg::EnsureSelection(SwField *pCurFld, SwFldMgr &rMgr) SwShellCrsr* pCrsr = pSh->getShellCrsr(true); SwPosition aOrigPos(*pCrsr->GetPoint()); - //After this attempt it is possible that rMgr.GetCurFld() != pCurFld if + //After this attempt it is possible that rMgr.GetCurField() != pCurField if //the field was in e.g. a zero height portion and so invisible in which //case it will be skipped over pSh->Right(CRSR_SKIP_CHARS, true, 1, false ); //So (fdo#50640) if it didn't work then reposition back to the original //location where the field was - SwField *pRealCurFld = rMgr.GetCurFld(); - bool bSelectionFailed = pCurFld != pRealCurFld; + SwField *pRealCurField = rMgr.GetCurField(); + bool bSelectionFailed = pCurField != pRealCurField; if (bSelectionFailed) { pCrsr->DeleteMark(); @@ -85,10 +85,10 @@ void SwFldEditDlg::EnsureSelection(SwField *pCurFld, SwFldMgr &rMgr) pSh->NormalizePam(); - assert(pCurFld == rMgr.GetCurFld()); + assert(pCurField == rMgr.GetCurField()); } -SwFldEditDlg::SwFldEditDlg(SwView& rVw) +SwFieldEditDlg::SwFieldEditDlg(SwView& rVw) : SfxSingleTabDialog(&rVw.GetViewFrame()->GetWindow(), 0, "EditFieldDialog", "modules/swriter/ui/editfielddialog.ui") , pSh(rVw.GetWrtShellPtr()) @@ -97,42 +97,42 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) get(m_pNextBT, "next"); get(m_pAddressBT, "edit"); - SwFldMgr aMgr(pSh); + SwFieldMgr aMgr(pSh); - SwField *pCurFld = aMgr.GetCurFld(); - if (!pCurFld) + SwField *pCurField = aMgr.GetCurField(); + if (!pCurField) return; SwViewShell::SetCareWin(this); - EnsureSelection(pCurFld, aMgr); + EnsureSelection(pCurField, aMgr); - sal_uInt16 nGroup = SwFldMgr::GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType()); + sal_uInt16 nGroup = SwFieldMgr::GetGroup(false, pCurField->GetTypeId(), pCurField->GetSubType()); CreatePage(nGroup); - GetOKButton()->SetClickHdl(LINK(this, SwFldEditDlg, OKHdl)); + GetOKButton()->SetClickHdl(LINK(this, SwFieldEditDlg, OKHdl)); - m_pPrevBT->SetClickHdl(LINK(this, SwFldEditDlg, NextPrevHdl)); - m_pNextBT->SetClickHdl(LINK(this, SwFldEditDlg, NextPrevHdl)); + m_pPrevBT->SetClickHdl(LINK(this, SwFieldEditDlg, NextPrevHdl)); + m_pNextBT->SetClickHdl(LINK(this, SwFieldEditDlg, NextPrevHdl)); - m_pAddressBT->SetClickHdl(LINK(this, SwFldEditDlg, AddressHdl)); + m_pAddressBT->SetClickHdl(LINK(this, SwFieldEditDlg, AddressHdl)); Init(); } // initialise controls -void SwFldEditDlg::Init() +void SwFieldEditDlg::Init() { - VclPtr<SwFldPage> pTabPage = static_cast<SwFldPage*>(GetTabPage()); + VclPtr<SwFieldPage> pTabPage = static_cast<SwFieldPage*>(GetTabPage()); if( pTabPage ) { - SwFldMgr& rMgr = pTabPage->GetFldMgr(); + SwFieldMgr& rMgr = pTabPage->GetFieldMgr(); - SwField *pCurFld = rMgr.GetCurFld(); + SwField *pCurField = rMgr.GetCurField(); - if(!pCurFld) + if(!pCurField) return; // Traveling only when more than one field @@ -148,7 +148,7 @@ void SwFldEditDlg::Init() rMgr.GoNext(); m_pPrevBT->Enable( bMove ); - if (pCurFld->GetTypeId() == TYP_EXTUSERFLD) + if (pCurField->GetTypeId() == TYP_EXTUSERFLD) m_pAddressBT->Show(); pSh->DestroyCrsr(); @@ -159,7 +159,7 @@ void SwFldEditDlg::Init() !pSh->HasReadonlySel() ); } -VclPtr<SfxTabPage> SwFldEditDlg::CreatePage(sal_uInt16 nGroup) +VclPtr<SfxTabPage> SwFieldEditDlg::CreatePage(sal_uInt16 nGroup) { // create TabPage VclPtr<SfxTabPage> pTabPage; @@ -167,13 +167,13 @@ VclPtr<SfxTabPage> SwFldEditDlg::CreatePage(sal_uInt16 nGroup) switch (nGroup) { case GRP_DOC: - pTabPage = SwFldDokPage::Create(get_content_area(), 0); + pTabPage = SwFieldDokPage::Create(get_content_area(), 0); break; case GRP_FKT: - pTabPage = SwFldFuncPage::Create(get_content_area(), 0); + pTabPage = SwFieldFuncPage::Create(get_content_area(), 0); break; case GRP_REF: - pTabPage = SwFldRefPage::Create(get_content_area(), 0); + pTabPage = SwFieldRefPage::Create(get_content_area(), 0); break; case GRP_REG: { @@ -188,15 +188,15 @@ VclPtr<SfxTabPage> SwFldEditDlg::CreatePage(sal_uInt16 nGroup) xDocProps->getUserDefinedProperties(), uno::UNO_QUERY_THROW); pSet->Put( SfxUnoAnyItem( SID_DOCINFO, uno::makeAny(xUDProps) ) ); - pTabPage = SwFldDokInfPage::Create(get_content_area(), pSet); + pTabPage = SwFieldDokInfPage::Create(get_content_area(), pSet); break; } case GRP_DB: - pTabPage = SwFldDBPage::Create(get_content_area(), 0); - static_cast<SwFldDBPage*>(pTabPage.get())->SetWrtShell(*pSh); + pTabPage = SwFieldDBPage::Create(get_content_area(), 0); + static_cast<SwFieldDBPage*>(pTabPage.get())->SetWrtShell(*pSh); break; case GRP_VAR: - pTabPage = SwFldVarPage::Create(get_content_area(), 0); + pTabPage = SwFieldVarPage::Create(get_content_area(), 0); break; } @@ -205,19 +205,19 @@ VclPtr<SfxTabPage> SwFldEditDlg::CreatePage(sal_uInt16 nGroup) if (pTabPage) { - static_cast<SwFldPage*>(pTabPage.get())->SetWrtShell(pSh); + static_cast<SwFieldPage*>(pTabPage.get())->SetWrtShell(pSh); SetTabPage(pTabPage); } return pTabPage; } -SwFldEditDlg::~SwFldEditDlg() +SwFieldEditDlg::~SwFieldEditDlg() { disposeOnce(); } -void SwFldEditDlg::dispose() +void SwFieldEditDlg::dispose() { SwViewShell::SetCareWin(NULL); pSh->EnterStdMode(); @@ -227,20 +227,20 @@ void SwFldEditDlg::dispose() SfxSingleTabDialog::dispose(); } -void SwFldEditDlg::EnableInsert(bool bEnable) +void SwFieldEditDlg::EnableInsert(bool bEnable) { if( bEnable && pSh->IsReadOnlyAvailable() && pSh->HasReadonlySel() ) bEnable = false; GetOKButton()->Enable( bEnable ); } -void SwFldEditDlg::InsertHdl() +void SwFieldEditDlg::InsertHdl() { GetOKButton()->Click(); } // kick off changing of the field -IMPL_LINK_NOARG(SwFldEditDlg, OKHdl) +IMPL_LINK_NOARG(SwFieldEditDlg, OKHdl) { if (GetOKButton()->IsEnabled()) { @@ -253,41 +253,41 @@ IMPL_LINK_NOARG(SwFldEditDlg, OKHdl) return 0; } -short SwFldEditDlg::Execute() +short SwFieldEditDlg::Execute() { // without TabPage no dialog return GetTabPage() ? Dialog::Execute() : static_cast<short>(RET_CANCEL); } // Traveling between fields of the same type -IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton ) +IMPL_LINK( SwFieldEditDlg, NextPrevHdl, Button *, pButton ) { bool bNext = pButton == m_pNextBT; pSh->EnterStdMode(); SwFieldType *pOldTyp = 0; - VclPtr<SwFldPage> pTabPage = static_cast<SwFldPage*>(GetTabPage()); + VclPtr<SwFieldPage> pTabPage = static_cast<SwFieldPage*>(GetTabPage()); //#112462# FillItemSet may delete the current field //that's why it has to be called before accessing the current field if( GetOKButton()->IsEnabled() ) pTabPage->FillItemSet(0); - SwFldMgr& rMgr = pTabPage->GetFldMgr(); - SwField *pCurFld = rMgr.GetCurFld(); - if (pCurFld->GetTypeId() == TYP_DBFLD) - pOldTyp = static_cast<SwDBFieldType*>(pCurFld->GetTyp()); + SwFieldMgr& rMgr = pTabPage->GetFieldMgr(); + SwField *pCurField = rMgr.GetCurField(); + if (pCurField->GetTypeId() == TYP_DBFLD) + pOldTyp = static_cast<SwDBFieldType*>(pCurField->GetTyp()); rMgr.GoNextPrev( bNext, pOldTyp ); - pCurFld = rMgr.GetCurFld(); + pCurField = rMgr.GetCurField(); - EnsureSelection(pCurFld, rMgr); + EnsureSelection(pCurField, rMgr); - sal_uInt16 nGroup = SwFldMgr::GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType()); + sal_uInt16 nGroup = SwFieldMgr::GetGroup(false, pCurField->GetTypeId(), pCurField->GetSubType()); if (nGroup != pTabPage->GetGroup()) - pTabPage = static_cast<SwFldPage*>(CreatePage(nGroup).get()); + pTabPage = static_cast<SwFieldPage*>(CreatePage(nGroup).get()); pTabPage->EditNewField(); @@ -296,11 +296,11 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton ) return 0; } -IMPL_LINK_NOARG(SwFldEditDlg, AddressHdl) +IMPL_LINK_NOARG(SwFieldEditDlg, AddressHdl) { - SwFldPage* pTabPage = static_cast<SwFldPage*>(GetTabPage()); - SwFldMgr& rMgr = pTabPage->GetFldMgr(); - SwField *pCurFld = rMgr.GetCurFld(); + SwFieldPage* pTabPage = static_cast<SwFieldPage*>(GetTabPage()); + SwFieldMgr& rMgr = pTabPage->GetFieldMgr(); + SwField *pCurField = rMgr.GetCurField(); SfxItemSet aSet( pSh->GetAttrPool(), SID_FIELD_GRABFOCUS, SID_FIELD_GRABFOCUS, @@ -308,7 +308,7 @@ IMPL_LINK_NOARG(SwFldEditDlg, AddressHdl) EditPosition nEditPos = EditPosition::UNKNOWN; - switch(pCurFld->GetSubType()) + switch(pCurField->GetSubType()) { case EU_FIRSTNAME: nEditPos = EditPosition::FIRSTNAME; break; case EU_NAME: nEditPos = EditPosition::LASTNAME; break; @@ -339,7 +339,7 @@ IMPL_LINK_NOARG(SwFldEditDlg, AddressHdl) OSL_ENSURE(pDlg, "Dialog creation failed!"); if(RET_OK == pDlg->Execute()) { - pSh->UpdateFlds( *pCurFld ); + pSh->UpdateFields( *pCurField ); } return 0; } diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 1be9660cbb3c..dd4e8e64ce2f 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -37,8 +37,8 @@ using namespace ::com::sun::star; -SwFldFuncPage::SwFldFuncPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) - : SwFldPage(pParent, "FldFuncPage", +SwFieldFuncPage::SwFieldFuncPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) + : SwFieldPage(pParent, "FieldFuncPage", "modules/swriter/ui/fldfuncpage.ui", rCoreSet) , nOldFormat(0) , bDropDownLBChanged(false) @@ -80,7 +80,7 @@ SwFldFuncPage::SwFldFuncPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) m_pTypeLB->set_width_request(nWidth); m_pFormatLB->set_width_request(nWidth); - m_pNameED->SetModifyHdl(LINK(this, SwFldFuncPage, ModifyHdl)); + m_pNameED->SetModifyHdl(LINK(this, SwFieldFuncPage, ModifyHdl)); m_sOldValueFT = m_pValueFT->GetText(); m_sOldNameFT = m_pNameFT->GetText(); @@ -89,12 +89,12 @@ SwFldFuncPage::SwFldFuncPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) m_pCond2ED->ShowBrackets(false); } -SwFldFuncPage::~SwFldFuncPage() +SwFieldFuncPage::~SwFieldFuncPage() { disposeOnce(); } -void SwFldFuncPage::dispose() +void SwFieldFuncPage::dispose() { m_pTypeLB.clear(); m_pSelectionLB.clear(); @@ -121,10 +121,10 @@ void SwFldFuncPage::dispose() m_pListDownPB.clear(); m_pListNameFT.clear(); m_pListNameED.clear(); - SwFldPage::dispose(); + SwFieldPage::dispose(); } -void SwFldFuncPage::Reset(const SfxItemSet* ) +void SwFieldFuncPage::Reset(const SfxItemSet* ) { SavePos(m_pTypeLB); Init(); // general initialisation @@ -134,47 +134,47 @@ void SwFldFuncPage::Reset(const SfxItemSet* ) sal_Int32 nPos; - if (!IsFldEdit()) + if (!IsFieldEdit()) { // initialise TypeListBox - const SwFldGroupRgn& rRg = SwFldMgr::GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); + const SwFieldGroupRgn& rRg = SwFieldMgr::GetGroupRange(IsFieldDlgHtmlMode(), GetGroup()); // fill Typ-Listbox for(sal_uInt16 i = rRg.nStart; i < rRg.nEnd; ++i) { - const sal_uInt16 nTypeId = SwFldMgr::GetTypeId(i); - nPos = m_pTypeLB->InsertEntry(SwFldMgr::GetTypeStr(i)); + const sal_uInt16 nTypeId = SwFieldMgr::GetTypeId(i); + nPos = m_pTypeLB->InsertEntry(SwFieldMgr::GetTypeStr(i)); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId)); } } else { const sal_uInt16 nTypeId = GetCurField()->GetTypeId(); - nPos = m_pTypeLB->InsertEntry(SwFldMgr::GetTypeStr(SwFldMgr::GetPos(nTypeId))); + nPos = m_pTypeLB->InsertEntry(SwFieldMgr::GetTypeStr(SwFieldMgr::GetPos(nTypeId))); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId)); if (nTypeId == TYP_MACROFLD) { - GetFldMgr().SetMacroPath(GetCurField()->GetPar1()); + GetFieldMgr().SetMacroPath(GetCurField()->GetPar1()); } } // select old Pos RestorePos(m_pTypeLB); - m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFldFuncPage, InsertHdl)); - m_pTypeLB->SetSelectHdl (LINK(this, SwFldFuncPage, TypeHdl)); - m_pSelectionLB->SetSelectHdl (LINK(this, SwFldFuncPage, SelectHdl)); - m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFldFuncPage, InsertMacroHdl)); - m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFldFuncPage, InsertHdl)); - m_pMacroBT->SetClickHdl (LINK(this, SwFldFuncPage, MacroHdl)); - Link<> aListModifyLk( LINK(this, SwFldFuncPage, ListModifyHdl)); + m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFieldFuncPage, InsertHdl)); + m_pTypeLB->SetSelectHdl (LINK(this, SwFieldFuncPage, TypeHdl)); + m_pSelectionLB->SetSelectHdl (LINK(this, SwFieldFuncPage, SelectHdl)); + m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFieldFuncPage, InsertMacroHdl)); + m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldFuncPage, InsertHdl)); + m_pMacroBT->SetClickHdl (LINK(this, SwFieldFuncPage, MacroHdl)); + Link<> aListModifyLk( LINK(this, SwFieldFuncPage, ListModifyHdl)); m_pListAddPB->SetClickHdl(aListModifyLk); m_pListRemovePB->SetClickHdl(aListModifyLk); m_pListUpPB->SetClickHdl(aListModifyLk); m_pListDownPB->SetClickHdl(aListModifyLk); m_pListItemED->SetReturnActionLink(aListModifyLk); - Link<> aListEnableLk = LINK(this, SwFldFuncPage, ListEnableHdl); + Link<> aListEnableLk = LINK(this, SwFieldFuncPage, ListEnableHdl); m_pListItemED->SetModifyHdl(aListEnableLk); m_pListItemsLB->SetSelectHdl(aListEnableLk); @@ -200,7 +200,7 @@ void SwFldFuncPage::Reset(const SfxItemSet* ) m_pTypeLB->SetUpdateMode(true); - if (IsFldEdit()) + if (IsFieldEdit()) { m_pNameED->SaveValue(); m_pValueED->SaveValue(); @@ -210,7 +210,7 @@ void SwFldFuncPage::Reset(const SfxItemSet* ) } } -IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) +IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl) { // save old ListBoxPos const sal_Int32 nOld = GetTypeSel(); @@ -234,17 +234,17 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) // fill Format-Listbox m_pFormatLB->Clear(); - const sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, false, IsFldDlgHtmlMode()); + const sal_uInt16 nSize = GetFieldMgr().GetFormatCount(nTypeId, false, IsFieldDlgHtmlMode()); for (sal_uInt16 i = 0; i < nSize; i++) { - sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); - m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i )) ); + sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFieldMgr().GetFormatStr(nTypeId, i)); + m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFieldMgr().GetFormatId( nTypeId, i )) ); } if (nSize) { - if (IsFldEdit() && nTypeId == TYP_JUMPEDITFLD) + if (IsFieldEdit() && nTypeId == TYP_JUMPEDITFLD) m_pFormatLB->SelectEntry(SW_RESSTR(FMT_MARK_BEGIN + GetCurField()->GetFormat())); if (!m_pFormatLB->GetSelectEntryCount()) @@ -256,13 +256,13 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) // two controls for conditional text bool bDropDown = TYP_DROPDOWN == nTypeId; - bool bCondTxtFld = TYP_CONDTXTFLD == nTypeId; + bool bCondTextField = TYP_CONDTXTFLD == nTypeId; - m_pCond1FT->Show(!bDropDown && bCondTxtFld); - m_pCond1ED->Show(!bDropDown && bCondTxtFld); - m_pCond2FT->Show(!bDropDown && bCondTxtFld); - m_pCond2ED->Show(!bDropDown && bCondTxtFld); - m_pValueGroup->Show(!bDropDown && !bCondTxtFld); + m_pCond1FT->Show(!bDropDown && bCondTextField); + m_pCond1ED->Show(!bDropDown && bCondTextField); + m_pCond2FT->Show(!bDropDown && bCondTextField); + m_pCond2ED->Show(!bDropDown && bCondTextField); + m_pValueGroup->Show(!bDropDown && !bCondTextField); m_pMacroBT->Show(!bDropDown); m_pNameED->Show(!bDropDown); m_pNameFT->Show(!bDropDown); @@ -271,7 +271,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) m_pNameED->SetDropEnable(false); - if (IsFldEdit()) + if (IsFieldEdit()) { if(bDropDown) { @@ -309,14 +309,14 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) { case TYP_MACROFLD: bMacro = true; - if (!GetFldMgr().GetMacroPath().isEmpty()) + if (!GetFieldMgr().GetMacroPath().isEmpty()) bValue = true; else bInsert = false; m_pNameFT->SetText(SW_RESSTR(STR_MACNAME)); m_pValueFT->SetText(SW_RESSTR(STR_PROMPT)); - m_pNameED->SetText(GetFldMgr().GetMacroName()); + m_pNameED->SetText(GetFieldMgr().GetMacroName()); m_pNameED->SetAccessibleName(m_pNameFT->GetText()); m_pValueED->SetAccessibleName(m_pValueFT->GetText()); break; @@ -335,8 +335,8 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) m_pNameED->SetDropEnable(true); m_pValueFT->SetText(SW_RESSTR(STR_INSTEXT)); SwWrtShell* pSh = GetActiveWrtShell(); - if (!IsFldEdit() && pSh ) - m_pValueED->SetText(pSh->GetSelTxt()); + if (!IsFieldEdit() && pSh ) + m_pValueED->SetText(pSh->GetSelText()); bName = bValue = true; m_pNameED->SetAccessibleName(m_pNameFT->GetText()); m_pValueED->SetAccessibleName(m_pValueFT->GetText()); @@ -346,7 +346,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) case TYP_CONDTXTFLD: m_pNameFT->SetText(SW_RESSTR(STR_COND)); m_pNameED->SetDropEnable(true); - if (IsFldEdit()) + if (IsFieldEdit()) { m_pCond1ED->SetText(GetCurField()->GetPar2().getToken(0, '|')); m_pCond2ED->SetText(GetCurField()->GetPar2().getToken(1, '|')); @@ -405,7 +405,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl) return 0; } -IMPL_LINK_NOARG(SwFldFuncPage, SelectHdl) +IMPL_LINK_NOARG(SwFieldFuncPage, SelectHdl) { const sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); @@ -415,7 +415,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, SelectHdl) return 0; } -IMPL_LINK_NOARG(SwFldFuncPage, InsertMacroHdl) +IMPL_LINK_NOARG(SwFieldFuncPage, InsertMacroHdl) { SelectHdl(); InsertHdl(); @@ -423,7 +423,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, InsertMacroHdl) return 0; } -IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl) +IMPL_LINK( SwFieldFuncPage, ListModifyHdl, Control*, pControl) { m_pListItemsLB->SetUpdateMode(false); if(pControl == m_pListAddPB || @@ -470,7 +470,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl) return 0; } -IMPL_LINK_NOARG(SwFldFuncPage, ListEnableHdl) +IMPL_LINK_NOARG(SwFieldFuncPage, ListEnableHdl) { //enable "Add" button when text is in the Edit that's not already member of the box m_pListAddPB->Enable(!m_pListItemED->GetText().isEmpty() && @@ -485,7 +485,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, ListEnableHdl) } // renew types in SelectionBox -void SwFldFuncPage::UpdateSubType() +void SwFieldFuncPage::UpdateSubType() { const sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); @@ -494,7 +494,7 @@ void SwFldFuncPage::UpdateSubType() m_pSelectionLB->Clear(); std::vector<OUString> aLst; - GetFldMgr().GetSubTypes(nTypeId, aLst); + GetFieldMgr().GetSubTypes(nTypeId, aLst); const size_t nCount = aLst.size(); for(size_t i = 0; i < nCount; ++i) @@ -514,11 +514,11 @@ void SwFldFuncPage::UpdateSubType() if (nTypeId == TYP_MACROFLD) { - const bool bHasMacro = !GetFldMgr().GetMacroPath().isEmpty(); + const bool bHasMacro = !GetFieldMgr().GetMacroPath().isEmpty(); if (bHasMacro) { - m_pNameED->SetText(GetFldMgr().GetMacroName()); + m_pNameED->SetText(GetFieldMgr().GetMacroName()); m_pValueGroup->Enable(); } EnableInsert(bHasMacro); @@ -528,12 +528,12 @@ void SwFldFuncPage::UpdateSubType() } // call MacroBrowser, fill Listbox with Macros -IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn ) +IMPL_LINK( SwFieldFuncPage, MacroHdl, Button *, pBtn ) { vcl::Window* pDefModalDlgParent = Application::GetDefDialogParent(); Application::SetDefDialogParent( pBtn ); const OUString sMacro(TurnMacroString(m_pNameED->GetText()).replaceAll(".", ";")); - if (GetFldMgr().ChooseMacro(sMacro)) + if (GetFieldMgr().ChooseMacro(sMacro)) UpdateSubType(); Application::SetDefDialogParent( pDefModalDlgParent ); @@ -541,7 +541,7 @@ IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn ) return 0; } -bool SwFldFuncPage::FillItemSet(SfxItemSet* ) +bool SwFieldFuncPage::FillItemSet(SfxItemSet* ) { const sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); @@ -559,14 +559,14 @@ bool SwFldFuncPage::FillItemSet(SfxItemSet* ) case TYP_INPUTFLD: nSubType = INP_TXT; // to prevent removal of CR/LF restore old content - if(!m_pNameED->IsModified() && IsFldEdit()) + if(!m_pNameED->IsModified() && IsFieldEdit()) aName = GetCurField()->GetPar1(); break; case TYP_MACROFLD: // use the full script URL, not the name in the Edit control - aName = GetFldMgr().GetMacroPath(); + aName = GetFieldMgr().GetMacroPath(); break; case TYP_CONDTXTFLD: @@ -587,7 +587,7 @@ bool SwFldFuncPage::FillItemSet(SfxItemSet* ) break; } - if (!IsFldEdit() || + if (!IsFieldEdit() || m_pNameED->IsValueChangedFromSaved() || m_pValueED->IsValueChangedFromSaved() || m_pCond1ED->IsValueChangedFromSaved() || @@ -596,7 +596,7 @@ bool SwFldFuncPage::FillItemSet(SfxItemSet* ) bDropDownLBChanged || nOldFormat != nFormat) { - InsertFld( nTypeId, nSubType, aName, aVal, nFormat ); + InsertField( nTypeId, nSubType, aName, aVal, nFormat ); } ModifyHdl(); // enable/disable Insert if applicable @@ -604,7 +604,7 @@ bool SwFldFuncPage::FillItemSet(SfxItemSet* ) return false; } -OUString SwFldFuncPage::TurnMacroString(const OUString &rMacro) +OUString SwFieldFuncPage::TurnMacroString(const OUString &rMacro) { if (!rMacro.isEmpty()) { @@ -628,18 +628,18 @@ OUString SwFldFuncPage::TurnMacroString(const OUString &rMacro) return rMacro; } -VclPtr<SfxTabPage> SwFldFuncPage::Create( vcl::Window* pParent, +VclPtr<SfxTabPage> SwFieldFuncPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return VclPtr<SwFldFuncPage>::Create( pParent, *rAttrSet ); + return VclPtr<SwFieldFuncPage>::Create( pParent, *rAttrSet ); } -sal_uInt16 SwFldFuncPage::GetGroup() +sal_uInt16 SwFieldFuncPage::GetGroup() { return GRP_FKT; } -void SwFldFuncPage::FillUserData() +void SwFieldFuncPage::FillUserData() { const sal_Int32 nEntryPos = m_pTypeLB->GetSelectEntryPos(); const sal_uInt16 nTypeSel = ( LISTBOX_ENTRY_NOTFOUND == nEntryPos ) @@ -649,7 +649,7 @@ void SwFldFuncPage::FillUserData() SetUserData(USER_DATA_VERSION ";" + OUString::number( nTypeSel )); } -IMPL_LINK_NOARG(SwFldFuncPage, ModifyHdl) +IMPL_LINK_NOARG(SwFieldFuncPage, ModifyHdl) { const sal_Int32 nLen = m_pNameED->GetText().getLength(); diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx index 01963e2ed2be..468f5fdf0bd8 100644 --- a/sw/source/ui/fldui/fldfunc.hxx +++ b/sw/source/ui/fldui/fldfunc.hxx @@ -30,7 +30,7 @@ #include "fldpage.hxx" #include <actctrl.hxx> -class SwFldFuncPage : public SwFldPage +class SwFieldFuncPage : public SwFieldPage { VclPtr<ListBox> m_pTypeLB; VclPtr<ListBox> m_pSelectionLB; @@ -83,9 +83,9 @@ protected: virtual sal_uInt16 GetGroup() SAL_OVERRIDE; public: - SwFldFuncPage(vcl::Window* pParent, const SfxItemSet& rSet); + SwFieldFuncPage(vcl::Window* pParent, const SfxItemSet& rSet); - virtual ~SwFldFuncPage(); + virtual ~SwFieldFuncPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index 20b665182b0d..9db03bdcae0c 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -41,43 +41,43 @@ using namespace ::com::sun::star; -SwFldPage::SwFldPage(vcl::Window *pParent, const OString& rID, +SwFieldPage::SwFieldPage(vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet &rAttrSet) : SfxTabPage(pParent, rID, rUIXMLDescription, &rAttrSet) - , m_pCurFld(0) + , m_pCurField(0) , m_pWrtShell(0) , m_nTypeSel(LISTBOX_ENTRY_NOTFOUND) , m_nSelectionSel(LISTBOX_ENTRY_NOTFOUND) - , m_bFldEdit(false) + , m_bFieldEdit(false) , m_bInsert(true) - , m_bFldDlgHtmlMode(false) + , m_bFieldDlgHtmlMode(false) , m_bRefresh(false) , m_bFirstHTMLInit(true) { } -SwFldPage::~SwFldPage() +SwFieldPage::~SwFieldPage() { } // initialise TabPage -void SwFldPage::Init() +void SwFieldPage::Init() { SwDocShell* pDocSh = static_cast<SwDocShell*>(SfxObjectShell::Current()); bool bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON); - m_bFldEdit = 0 == GetTabDialog(); + m_bFieldEdit = 0 == GetTabDialog(); // newly initialise FieldManager. important for // Dok-Switch (fldtdlg:ReInitTabPage) - m_pCurFld = m_aMgr.GetCurFld(); + m_pCurField = m_aMgr.GetCurField(); - if( bNewMode != m_bFldDlgHtmlMode ) + if( bNewMode != m_bFieldDlgHtmlMode ) { - m_bFldDlgHtmlMode = bNewMode; + m_bFieldDlgHtmlMode = bNewMode; // initialise Rangelistbox - if( m_bFldDlgHtmlMode && m_bFirstHTMLInit ) + if( m_bFieldDlgHtmlMode && m_bFirstHTMLInit ) { m_bFirstHTMLInit = false; SwWrtShell *pSh = m_pWrtShell; @@ -86,9 +86,9 @@ void SwFldPage::Init() if(pSh) { SwDoc* pDoc = pSh->GetDoc(); - pSh->InsertFldType( SwSetExpFieldType( pDoc, + pSh->InsertFieldType( SwSetExpFieldType( pDoc, OUString("HTML_ON"), 1)); - pSh->InsertFldType( SwSetExpFieldType(pDoc, + pSh->InsertFieldType( SwSetExpFieldType(pDoc, OUString("HTML_OFF"), 1)); } } @@ -96,13 +96,13 @@ void SwFldPage::Init() } // newly initialise page -void SwFldPage::ActivatePage() +void SwFieldPage::ActivatePage() { EnableInsert(m_bInsert); } // complete reset; edit new field -void SwFldPage::EditNewField( bool bOnlyActivate ) +void SwFieldPage::EditNewField( bool bOnlyActivate ) { if( !bOnlyActivate ) { @@ -115,7 +115,7 @@ void SwFldPage::EditNewField( bool bOnlyActivate ) } // insert field -bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUString& rPar1, +bool SwFieldPage::InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUString& rPar1, const OUString& rPar2, sal_uLong nFormatId, sal_Unicode cSeparator, bool bIsAutomaticLanguage) { @@ -123,12 +123,12 @@ bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUStrin SwView* pView = GetActiveView(); SwWrtShell *pSh = m_pWrtShell ? m_pWrtShell : pView->GetWrtShellPtr(); - if (!IsFldEdit()) // insert new field + if (!IsFieldEdit()) // insert new field { - SwInsertFld_Data aData(nTypeId, nSubType, rPar1, rPar2, nFormatId, 0, cSeparator, bIsAutomaticLanguage ); - //#i26566# provide parent for SwWrtShell::StartInputFldDlg + SwInsertField_Data aData(nTypeId, nSubType, rPar1, rPar2, nFormatId, 0, cSeparator, bIsAutomaticLanguage ); + //#i26566# provide parent for SwWrtShell::StartInputFieldDlg aData.m_pParent = &GetTabDialog()->GetOKButton(); - bRet = m_aMgr.InsertFld( aData ); + bRet = m_aMgr.InsertField( aData ); uno::Reference< frame::XDispatchRecorder > xRecorder = pView->GetViewFrame()->GetBindings().GetRecorder(); @@ -169,7 +169,7 @@ bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUStrin } else // change field { - SwField *const pTmpFld = m_pCurFld->CopyField(); + SwField *const pTmpField = m_pCurField->CopyField(); OUString sPar1(rPar1); OUString sPar2(rPar2); @@ -194,7 +194,7 @@ bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUStrin aData.nCommandType = rPar1.getToken(0, DB_DELIM, nPos).toInt32(); sPar1 = rPar1.copy(nPos); - static_cast<SwDBNameInfField*>(pTmpFld)->SetDBData(aData); + static_cast<SwDBNameInfField*>(pTmpField)->SetDBData(aData); } break; @@ -206,18 +206,18 @@ bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUStrin aData.nCommandType = rPar1.getToken(2, DB_DELIM).toInt32(); OUString sColumn = rPar1.getToken(3, DB_DELIM); - SwDBFieldType* pOldTyp = static_cast<SwDBFieldType*>(pTmpFld->GetTyp()); - SwDBFieldType* pTyp = static_cast<SwDBFieldType*>(pSh->InsertFldType( + SwDBFieldType* pOldTyp = static_cast<SwDBFieldType*>(pTmpField->GetTyp()); + SwDBFieldType* pTyp = static_cast<SwDBFieldType*>(pSh->InsertFieldType( SwDBFieldType(pSh->GetDoc(), sColumn, aData))); - SwIterator<SwFmtFld,SwFieldType> aIter( *pOldTyp ); + SwIterator<SwFormatField,SwFieldType> aIter( *pOldTyp ); - for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() ) + for( SwFormatField* pFormatField = aIter.First(); pFormatField; pFormatField = aIter.Next() ) { - if( pFmtFld->GetField() == m_pCurFld) + if( pFormatField->GetField() == m_pCurField) { - pFmtFld->RegisterToFieldType(*pTyp); - pTmpFld->ChgTyp(pTyp); + pFormatField->RegisterToFieldType(*pTyp); + pTmpField->ChgTyp(pTyp); break; } } @@ -226,7 +226,7 @@ bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUStrin case TYP_SEQFLD: { - SwSetExpFieldType* pTyp = static_cast<SwSetExpFieldType*>(pTmpFld->GetTyp()); + SwSetExpFieldType* pTyp = static_cast<SwSetExpFieldType*>(pTmpField->GetTyp()); pTyp->SetOutlineLvl( static_cast< sal_uInt8 >(nSubType & 0xff)); pTyp->SetDelimiter(OUString(cSeparator)); @@ -237,12 +237,12 @@ bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUStrin case TYP_INPUTFLD: { // User- or SetField ? - if (m_aMgr.GetFldType(RES_USERFLD, sPar1) == 0 && - !(pTmpFld->GetSubType() & INP_TXT)) // SETEXPFLD + if (m_aMgr.GetFieldType(RES_USERFLD, sPar1) == 0 && + !(pTmpField->GetSubType() & INP_TXT)) // SETEXPFLD { - SwSetExpField* pFld = static_cast<SwSetExpField*>(pTmpFld); - pFld->SetPromptText(sPar2); - sPar2 = pFld->GetPar2(); + SwSetExpField* pField = static_cast<SwSetExpField*>(pTmpField); + pField->SetPromptText(sPar2); + sPar2 = pField->GetPar2(); } } break; @@ -250,7 +250,7 @@ bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUStrin { if( nSubType == nsSwDocInfoSubType::DI_CUSTOM ) { - SwDocInfoField* pDocInfo = static_cast<SwDocInfoField*>( pTmpFld ); + SwDocInfoField* pDocInfo = static_cast<SwDocInfoField*>( pTmpField ); pDocInfo->SetName( rPar1 ); } } @@ -259,18 +259,18 @@ bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUStrin pSh->StartAllAction(); - pTmpFld->SetSubType(nSubType); - pTmpFld->SetAutomaticLanguage(bIsAutomaticLanguage); + pTmpField->SetSubType(nSubType); + pTmpField->SetAutomaticLanguage(bIsAutomaticLanguage); - m_aMgr.UpdateCurFld( nFormatId, sPar1, sPar2, pTmpFld ); + m_aMgr.UpdateCurField( nFormatId, sPar1, sPar2, pTmpField ); - m_pCurFld = m_aMgr.GetCurFld(); + m_pCurField = m_aMgr.GetCurField(); switch (nTypeId) { case TYP_HIDDENTXTFLD: case TYP_HIDDENPARAFLD: - m_aMgr.EvalExpFlds(pSh); + m_aMgr.EvalExpFields(pSh); break; } @@ -281,7 +281,7 @@ bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUStrin return bRet; } -void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2, +void SwFieldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2, const ListBox* pLst3 ) { const ListBox* aLBArr [ coLBCount ] = { pLst1, pLst2, pLst3 }; @@ -294,7 +294,7 @@ void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2, m_aLstStrArr[ i ].clear(); } -void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3) +void SwFieldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3) { sal_Int32 nPos = 0; ListBox* aLBArr [ coLBCount ] = { pLst1, pLst2, pLst3 }; @@ -307,9 +307,9 @@ void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3) } // Insert new fields -IMPL_LINK( SwFldPage, InsertHdl, Button *, pBtn ) +IMPL_LINK( SwFieldPage, InsertHdl, Button *, pBtn ) { - SwFldDlg *pDlg = static_cast<SwFldDlg*>(GetTabDialog()); + SwFieldDlg *pDlg = static_cast<SwFieldDlg*>(GetTabDialog()); if (pDlg) { pDlg->InsertHdl(); @@ -319,7 +319,7 @@ IMPL_LINK( SwFldPage, InsertHdl, Button *, pBtn ) } else { - SwFldEditDlg *pEditDlg = static_cast<SwFldEditDlg *>(GetParentDialog()); + SwFieldEditDlg *pEditDlg = static_cast<SwFieldEditDlg *>(GetParentDialog()); pEditDlg->InsertHdl(); } @@ -327,9 +327,9 @@ IMPL_LINK( SwFldPage, InsertHdl, Button *, pBtn ) } // enable/disable "Insert"-Button -void SwFldPage::EnableInsert(bool bEnable) +void SwFieldPage::EnableInsert(bool bEnable) { - SwFldDlg *pDlg = static_cast<SwFldDlg*>(GetTabDialog()); + SwFieldDlg *pDlg = static_cast<SwFieldDlg*>(GetTabDialog()); if (pDlg) { if (pDlg->GetCurTabPage() == this) @@ -337,21 +337,21 @@ void SwFldPage::EnableInsert(bool bEnable) } else { - SwFldEditDlg *pEditDlg = static_cast<SwFldEditDlg *>(GetParentDialog()); + SwFieldEditDlg *pEditDlg = static_cast<SwFieldEditDlg *>(GetParentDialog()); pEditDlg->EnableInsert(bEnable); } m_bInsert = bEnable; } -IMPL_LINK_NOARG(SwFldPage, NumFormatHdl) +IMPL_LINK_NOARG(SwFieldPage, NumFormatHdl) { InsertHdl(); return 0; } -void SwFldPage::SetWrtShell( SwWrtShell* pShell ) +void SwFieldPage::SetWrtShell( SwWrtShell* pShell ) { m_pWrtShell = pShell; m_aMgr.SetWrtShell( pShell ); diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx index 3416e97361ac..15c063dd0bc3 100644 --- a/sw/source/ui/fldui/fldpage.hxx +++ b/sw/source/ui/fldui/fldpage.hxx @@ -28,17 +28,17 @@ class ListBox; const int coLBCount = 3; -class SwFldPage : public SfxTabPage +class SwFieldPage : public SfxTabPage { OUString m_aLstStrArr[ coLBCount ]; - SwFldMgr m_aMgr; - SwField *m_pCurFld; + SwFieldMgr m_aMgr; + SwField *m_pCurField; SwWrtShell* m_pWrtShell; sal_Int32 m_nTypeSel; sal_Int32 m_nSelectionSel; - bool m_bFldEdit; + bool m_bFieldEdit; bool m_bInsert; - bool m_bFldDlgHtmlMode; + bool m_bFieldDlgHtmlMode; bool m_bRefresh; bool m_bFirstHTMLInit; @@ -48,9 +48,9 @@ protected: void SetTypeSel(sal_Int32 nSet) { m_nTypeSel = nSet;} sal_Int32 GetSelectionSel() const { return m_nSelectionSel;} void SetSelectionSel(sal_Int32 nSet){ m_nSelectionSel = nSet;} - bool IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;} + bool IsFieldDlgHtmlMode() const { return m_bFieldDlgHtmlMode;} bool IsRefresh() const { return m_bRefresh;} - SwField* GetCurField() { return m_pCurFld;} + SwField* GetCurField() { return m_pCurField;} SwWrtShell* GetWrtShell() { return m_pWrtShell;} DECL_LINK( InsertHdl, Button *pBtn = 0 ); @@ -63,10 +63,10 @@ protected: void RestorePos( ListBox* pLst1, ListBox* pLst2 = 0, ListBox* pLst3 = 0 ); void EnableInsert(bool bEnable = true); - inline bool IsFldEdit() const { return m_bFldEdit; } + inline bool IsFieldEdit() const { return m_bFieldEdit; } // insert field - bool InsertFld( sal_uInt16 nTypeId, + bool InsertField( sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUString& rPar1, const OUString& rPar2, @@ -77,14 +77,14 @@ protected: using SfxTabPage::ActivatePage; public: - SwFldPage(vcl::Window *pParent, const OString& rID, + SwFieldPage(vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet &rAttrSet); - virtual ~SwFldPage(); + virtual ~SwFieldPage(); virtual void ActivatePage() SAL_OVERRIDE; - inline SwFldMgr& GetFldMgr() { return m_aMgr; } + inline SwFieldMgr& GetFieldMgr() { return m_aMgr; } void SetWrtShell( SwWrtShell* m_pWrtShell ); void EditNewField( bool bOnlyActivate = false ); virtual sal_uInt16 GetGroup() = 0; diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index e03f5db0d3b3..cef199107340 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -42,17 +42,17 @@ #define REFFLDFLAG_HEADING 0x7100 #define REFFLDFLAG_NUMITEM 0x7200 -static sal_uInt16 nFldDlgFmtSel = 0; +static sal_uInt16 nFieldDlgFormatSel = 0; #define USER_DATA_VERSION_1 "1" #define USER_DATA_VERSION USER_DATA_VERSION_1 -SwFldRefPage::SwFldRefPage(vcl::Window* pParent, const SfxItemSet& rCoreSet ) - : SwFldPage(pParent, "FldRefPage", +SwFieldRefPage::SwFieldRefPage(vcl::Window* pParent, const SfxItemSet& rCoreSet ) + : SwFieldPage(pParent, "FieldRefPage", "modules/swriter/ui/fldrefpage.ui", rCoreSet) , maOutlineNodes() , maNumItems() - , mpSavedSelectedTxtNode(0) + , mpSavedSelectedTextNode(0) , mnSavedSelectedPos(0) { get(m_pTypeLB, "type"); @@ -67,12 +67,12 @@ SwFldRefPage::SwFldRefPage(vcl::Window* pParent, const SfxItemSet& rCoreSet ) get(m_pNameED, "name"); get(m_pValueED, "value"); - sBookmarkTxt = m_pTypeLB->GetEntry(0); - sFootnoteTxt = m_pTypeLB->GetEntry(1); - sEndnoteTxt = m_pTypeLB->GetEntry(2); + sBookmarkText = m_pTypeLB->GetEntry(0); + sFootnoteText = m_pTypeLB->GetEntry(1); + sEndnoteText = m_pTypeLB->GetEntry(2); // #i83479# - sHeadingTxt = m_pTypeLB->GetEntry(3); - sNumItemTxt = m_pTypeLB->GetEntry(4); + sHeadingText = m_pTypeLB->GetEntry(3); + sNumItemText = m_pTypeLB->GetEntry(4); m_pTypeLB->Clear(); long nHeight = m_pTypeLB->GetTextHeight() * 20; @@ -89,28 +89,28 @@ SwFldRefPage::SwFldRefPage(vcl::Window* pParent, const SfxItemSet& rCoreSet ) m_pSelection->set_width_request(nWidth*2); m_pSelectionToolTipLB->set_width_request(nWidth*2); - m_pNameED->SetModifyHdl(LINK(this, SwFldRefPage, ModifyHdl)); + m_pNameED->SetModifyHdl(LINK(this, SwFieldRefPage, ModifyHdl)); - m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFldRefPage, InsertHdl)); - m_pTypeLB->SetSelectHdl (LINK(this, SwFldRefPage, TypeHdl)); - m_pSelectionLB->SetSelectHdl (LINK(this, SwFldRefPage, SubTypeHdl)); - m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFldRefPage, InsertHdl)); - m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFldRefPage, InsertHdl)); + m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFieldRefPage, InsertHdl)); + m_pTypeLB->SetSelectHdl (LINK(this, SwFieldRefPage, TypeHdl)); + m_pSelectionLB->SetSelectHdl (LINK(this, SwFieldRefPage, SubTypeHdl)); + m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFieldRefPage, InsertHdl)); + m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldRefPage, InsertHdl)); // #i83479# - m_pSelectionToolTipLB->SetSelectHdl( LINK(this, SwFldRefPage, SubTypeHdl) ); - m_pSelectionToolTipLB->SetDoubleClickHdl( LINK(this, SwFldRefPage, InsertHdl) ); + m_pSelectionToolTipLB->SetSelectHdl( LINK(this, SwFieldRefPage, SubTypeHdl) ); + m_pSelectionToolTipLB->SetDoubleClickHdl( LINK(this, SwFieldRefPage, InsertHdl) ); m_pSelectionToolTipLB->SetStyle( m_pSelectionToolTipLB->GetStyle() | WB_HSCROLL ); m_pSelectionToolTipLB->SetSpaceBetweenEntries(1); m_pSelectionToolTipLB->SetHighlightRange(); } -SwFldRefPage::~SwFldRefPage() +SwFieldRefPage::~SwFieldRefPage() { disposeOnce(); } -void SwFldRefPage::dispose() +void SwFieldRefPage::dispose() { m_pTypeLB.clear(); m_pSelection.clear(); @@ -121,13 +121,13 @@ void SwFldRefPage::dispose() m_pNameFT.clear(); m_pNameED.clear(); m_pValueED.clear(); - SwFldPage::dispose(); + SwFieldPage::dispose(); } // #i83479# -void SwFldRefPage::SaveSelectedTxtNode() +void SwFieldRefPage::SaveSelectedTextNode() { - mpSavedSelectedTxtNode = 0; + mpSavedSelectedTextNode = 0; mnSavedSelectedPos = 0; if ( m_pSelectionToolTipLB->IsVisible() ) { @@ -141,7 +141,7 @@ void SwFldRefPage::SaveSelectedTxtNode() mnSavedSelectedPos = static_cast<size_t>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())); if ( mnSavedSelectedPos < maOutlineNodes.size() ) { - mpSavedSelectedTxtNode = maOutlineNodes[mnSavedSelectedPos]; + mpSavedSelectedTextNode = maOutlineNodes[mnSavedSelectedPos]; } } else if ( nTypeId == REFFLDFLAG_NUMITEM ) @@ -149,20 +149,20 @@ void SwFldRefPage::SaveSelectedTxtNode() mnSavedSelectedPos = static_cast<size_t>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())); if ( mnSavedSelectedPos < maNumItems.size() ) { - mpSavedSelectedTxtNode = maNumItems[mnSavedSelectedPos]->GetTxtNode(); + mpSavedSelectedTextNode = maNumItems[mnSavedSelectedPos]->GetTextNode(); } } } } } -void SwFldRefPage::Reset(const SfxItemSet* ) +void SwFieldRefPage::Reset(const SfxItemSet* ) { - if (!IsFldEdit()) + if (!IsFieldEdit()) { SavePos(m_pTypeLB); // #i83479# - SaveSelectedTxtNode(); + SaveSelectedTextNode(); } SetSelectionSel(LISTBOX_ENTRY_NOTFOUND); SetTypeSel(LISTBOX_ENTRY_NOTFOUND); @@ -176,24 +176,24 @@ void SwFldRefPage::Reset(const SfxItemSet* ) sal_Int32 nPos; // set/insert reference - const SwFldGroupRgn& rRg = SwFldMgr::GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); + const SwFieldGroupRgn& rRg = SwFieldMgr::GetGroupRange(IsFieldDlgHtmlMode(), GetGroup()); for (short i = rRg.nStart; i < rRg.nEnd; ++i) { - const sal_uInt16 nTypeId = SwFldMgr::GetTypeId(i); + const sal_uInt16 nTypeId = SwFieldMgr::GetTypeId(i); - if (!IsFldEdit() || nTypeId != TYP_SETREFFLD) + if (!IsFieldEdit() || nTypeId != TYP_SETREFFLD) { - nPos = m_pTypeLB->InsertEntry(SwFldMgr::GetTypeStr(i), i - rRg.nStart); + nPos = m_pTypeLB->InsertEntry(SwFieldMgr::GetTypeStr(i), i - rRg.nStart); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId)); } } // #i83479# // entries for headings and numbered items - nPos = m_pTypeLB->InsertEntry(sHeadingTxt); + nPos = m_pTypeLB->InsertEntry(sHeadingText); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(REFFLDFLAG_HEADING)); - nPos = m_pTypeLB->InsertEntry(sNumItemTxt); + nPos = m_pTypeLB->InsertEntry(sNumItemText); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(REFFLDFLAG_NUMITEM)); // fill up with the sequence types @@ -201,11 +201,11 @@ void SwFldRefPage::Reset(const SfxItemSet* ) if(!pSh) pSh = ::GetActiveWrtShell(); - const sal_uInt16 nFldTypeCnt = pSh->GetFldTypeCount(RES_SETEXPFLD); + const sal_uInt16 nFieldTypeCnt = pSh->GetFieldTypeCount(RES_SETEXPFLD); - for (sal_uInt16 n = 0; n < nFldTypeCnt; ++n) + for (sal_uInt16 n = 0; n < nFieldTypeCnt; ++n) { - SwSetExpFieldType* pType = static_cast<SwSetExpFieldType*>(pSh->GetFldType(n, RES_SETEXPFLD)); + SwSetExpFieldType* pType = static_cast<SwSetExpFieldType*>(pSh->GetFieldType(n, RES_SETEXPFLD)); if ((nsSwGetSetExpType::GSE_SEQ & pType->GetType()) && pType->HasWriterListeners() && pSh->IsUsed(*pType)) { @@ -215,30 +215,30 @@ void SwFldRefPage::Reset(const SfxItemSet* ) } // text marks - now always (because of globaldocuments) - nPos = m_pTypeLB->InsertEntry(sBookmarkTxt); + nPos = m_pTypeLB->InsertEntry(sBookmarkText); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(REFFLDFLAG_BOOKMARK)); // footnotes: - if( pSh->HasFtns() ) + if( pSh->HasFootnotes() ) { - nPos = m_pTypeLB->InsertEntry(sFootnoteTxt); + nPos = m_pTypeLB->InsertEntry(sFootnoteText); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(REFFLDFLAG_FOOTNOTE)); } // endnotes: - if ( pSh->HasFtns(true) ) + if ( pSh->HasFootnotes(true) ) { - nPos = m_pTypeLB->InsertEntry(sEndnoteTxt); + nPos = m_pTypeLB->InsertEntry(sEndnoteText); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(REFFLDFLAG_ENDNOTE)); } // select old Pos - if (!IsFldEdit()) + if (!IsFieldEdit()) RestorePos(m_pTypeLB); m_pTypeLB->SetUpdateMode(true); - nFldDlgFmtSel = 0; + nFieldDlgFormatSel = 0; if( !IsRefresh() ) { @@ -261,7 +261,7 @@ void SwFldRefPage::Reset(const SfxItemSet* ) } TypeHdl(0); - if (IsFldEdit()) + if (IsFieldEdit()) { m_pTypeLB->SaveValue(); m_pSelectionLB->SaveValue(); @@ -271,7 +271,7 @@ void SwFldRefPage::Reset(const SfxItemSet* ) } } -IMPL_LINK_NOARG(SwFldRefPage, TypeHdl) +IMPL_LINK_NOARG(SwFieldRefPage, TypeHdl) { // save old ListBoxPos const sal_Int32 nOld = GetTypeSel(); @@ -281,7 +281,7 @@ IMPL_LINK_NOARG(SwFldRefPage, TypeHdl) if(GetTypeSel() == LISTBOX_ENTRY_NOTFOUND) { - if (IsFldEdit()) + if (IsFieldEdit()) { // select positions OUString sName; @@ -292,34 +292,34 @@ IMPL_LINK_NOARG(SwFldRefPage, TypeHdl) case REF_BOOKMARK: { // #i83479# - SwGetRefField* pRefFld = dynamic_cast<SwGetRefField*>(GetCurField()); - if ( pRefFld && - pRefFld->IsRefToHeadingCrossRefBookmark() ) + SwGetRefField* pRefField = dynamic_cast<SwGetRefField*>(GetCurField()); + if ( pRefField && + pRefField->IsRefToHeadingCrossRefBookmark() ) { - sName = sHeadingTxt; + sName = sHeadingText; nFlag = REFFLDFLAG_HEADING; } - else if ( pRefFld && - pRefFld->IsRefToNumItemCrossRefBookmark() ) + else if ( pRefField && + pRefField->IsRefToNumItemCrossRefBookmark() ) { - sName = sNumItemTxt; + sName = sNumItemText; nFlag = REFFLDFLAG_NUMITEM; } else { - sName = sBookmarkTxt; + sName = sBookmarkText; nFlag = REFFLDFLAG_BOOKMARK; } } break; case REF_FOOTNOTE: - sName = sFootnoteTxt; + sName = sFootnoteText; nFlag = REFFLDFLAG_FOOTNOTE; break; case REF_ENDNOTE: - sName = sEndnoteTxt; + sName = sEndnoteText; nFlag = REFFLDFLAG_ENDNOTE; break; @@ -358,9 +358,9 @@ IMPL_LINK_NOARG(SwFldRefPage, TypeHdl) UpdateSubType(); bool bName = false; - nFldDlgFmtSel = 0; + nFieldDlgFormatSel = 0; - if ( ( !IsFldEdit() || m_pSelectionLB->GetEntryCount() ) && + if ( ( !IsFieldEdit() || m_pSelectionLB->GetEntryCount() ) && nOld != LISTBOX_ENTRY_NOTFOUND ) { m_pNameED->SetText(aEmptyOUStr); @@ -372,7 +372,7 @@ IMPL_LINK_NOARG(SwFldRefPage, TypeHdl) case TYP_GETREFFLD: if (REFFLDFLAG & (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(nOld))) // the old one stays - nFldDlgFmtSel = m_pFormatLB->GetSelectEntryPos(); + nFieldDlgFormatSel = m_pFormatLB->GetSelectEntryPos(); bName = true; break; @@ -389,7 +389,7 @@ IMPL_LINK_NOARG(SwFldRefPage, TypeHdl) const sal_uInt16 nOldId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(nOld)); if( nOldId & REFFLDFLAG || nOldId == TYP_GETREFFLD ) // then the old one stays - nFldDlgFmtSel = m_pFormatLB->GetSelectEntryPos(); + nFieldDlgFormatSel = m_pFormatLB->GetSelectEntryPos(); } break; } @@ -409,14 +409,14 @@ IMPL_LINK_NOARG(SwFldRefPage, TypeHdl) return 0; } -IMPL_LINK_NOARG(SwFldRefPage, SubTypeHdl) +IMPL_LINK_NOARG(SwFieldRefPage, SubTypeHdl) { sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); switch(nTypeId) { case TYP_GETREFFLD: - if (!IsFldEdit() || m_pSelectionLB->GetSelectEntryCount()) + if (!IsFieldEdit() || m_pSelectionLB->GetSelectEntryCount()) { m_pNameED->SetText(m_pSelectionLB->GetSelectEntry()); ModifyHdl(m_pNameED); @@ -430,7 +430,7 @@ IMPL_LINK_NOARG(SwFldRefPage, SubTypeHdl) pSh = ::GetActiveWrtShell(); if(pSh) { - m_pValueED->SetText(pSh->GetSelTxt()); + m_pValueED->SetText(pSh->GetSelText()); } } @@ -448,7 +448,7 @@ IMPL_LINK_NOARG(SwFldRefPage, SubTypeHdl) break; default: - if (!IsFldEdit() || m_pSelectionLB->GetSelectEntryCount()) + if (!IsFieldEdit() || m_pSelectionLB->GetSelectEntryCount()) m_pNameED->SetText(m_pSelectionLB->GetSelectEntry()); break; } @@ -457,12 +457,12 @@ IMPL_LINK_NOARG(SwFldRefPage, SubTypeHdl) } // renew types in SelectionLB -void SwFldRefPage::UpdateSubType() +void SwFieldRefPage::UpdateSubType() { SwWrtShell *pSh = GetWrtShell(); if(!pSh) pSh = ::GetActiveWrtShell(); - SwGetRefField* pRefFld = static_cast<SwGetRefField*>(GetCurField()); + SwGetRefField* pRefField = static_cast<SwGetRefField*>(GetCurField()); const sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); OUString sOldSel; @@ -475,8 +475,8 @@ void SwFldRefPage::UpdateSubType() sOldSel = m_pSelectionLB->GetEntry(nSelectionSel); } } - if (IsFldEdit() && sOldSel.isEmpty()) - sOldSel = OUString::number( pRefFld->GetSeqNo() + 1 ); + if (IsFieldEdit() && sOldSel.isEmpty()) + sOldSel = OUString::number( pRefField->GetSeqNo() + 1 ); m_pSelectionLB->SetUpdateMode(false); m_pSelectionLB->Clear(); @@ -500,32 +500,32 @@ void SwFldRefPage::UpdateSubType() if(IDocumentMarkAccess::MarkType::BOOKMARK == IDocumentMarkAccess::GetType(*pBkmk)) m_pSelectionLB->InsertEntry( pBkmk->GetName() ); } - if (IsFldEdit()) - sOldSel = pRefFld->GetSetRefName(); + if (IsFieldEdit()) + sOldSel = pRefField->GetSetRefName(); } else if (nTypeId == REFFLDFLAG_FOOTNOTE) { m_pSelectionLB->SetStyle(m_pSelectionLB->GetStyle() & ~WB_SORT); - SwSeqFldList aArr; - const size_t nCnt = pSh->GetSeqFtnList( aArr ); + SwSeqFieldList aArr; + const size_t nCnt = pSh->GetSeqFootnoteList( aArr ); for( size_t n = 0; n < nCnt; ++n ) { m_pSelectionLB->InsertEntry( aArr[ n ]->sDlgEntry ); - if (IsFldEdit() && pRefFld->GetSeqNo() == aArr[ n ]->nSeqNo) + if (IsFieldEdit() && pRefField->GetSeqNo() == aArr[ n ]->nSeqNo) sOldSel = aArr[n]->sDlgEntry; } } else if (nTypeId == REFFLDFLAG_ENDNOTE) { m_pSelectionLB->SetStyle(m_pSelectionLB->GetStyle() & ~WB_SORT); - SwSeqFldList aArr; - const size_t nCnt = pSh->GetSeqFtnList( aArr, true ); + SwSeqFieldList aArr; + const size_t nCnt = pSh->GetSeqFootnoteList( aArr, true ); for( size_t n = 0; n < nCnt; ++n ) { m_pSelectionLB->InsertEntry( aArr[ n ]->sDlgEntry ); - if (IsFldEdit() && pRefFld->GetSeqNo() == aArr[ n ]->nSeqNo) + if (IsFieldEdit() && pRefField->GetSeqNo() == aArr[ n ]->nSeqNo) sOldSel = aArr[n]->sDlgEntry; } } @@ -536,21 +536,21 @@ void SwFldRefPage::UpdateSubType() const IDocumentOutlineNodes* pIDoc( pSh->getIDocumentOutlineNodesAccess() ); pIDoc->getOutlineNodes( maOutlineNodes ); - bool bCertainTxtNodeSelected( false ); + bool bCertainTextNodeSelected( false ); for ( size_t nOutlIdx = 0; nOutlIdx < maOutlineNodes.size(); ++nOutlIdx ) { SvTreeListEntry* pEntry = m_pSelectionToolTipLB->InsertEntry( pIDoc->getOutlineText( nOutlIdx, true, true, false ) ); pEntry->SetUserData( reinterpret_cast<void*>(nOutlIdx) ); - if ( ( IsFldEdit() && - pRefFld->GetReferencedTxtNode() == maOutlineNodes[nOutlIdx] ) || - mpSavedSelectedTxtNode == maOutlineNodes[nOutlIdx] ) + if ( ( IsFieldEdit() && + pRefField->GetReferencedTextNode() == maOutlineNodes[nOutlIdx] ) || + mpSavedSelectedTextNode == maOutlineNodes[nOutlIdx] ) { m_pSelectionToolTipLB->Select( pEntry ); sOldSel.clear(); - bCertainTxtNodeSelected = true; + bCertainTextNodeSelected = true; } - else if ( !bCertainTxtNodeSelected && mnSavedSelectedPos == nOutlIdx ) + else if ( !bCertainTextNodeSelected && mnSavedSelectedPos == nOutlIdx ) { m_pSelectionToolTipLB->Select( pEntry ); sOldSel.clear(); @@ -563,21 +563,21 @@ void SwFldRefPage::UpdateSubType() const IDocumentListItems* pIDoc( pSh->getIDocumentListItemsAccess() ); pIDoc->getNumItems( maNumItems ); - bool bCertainTxtNodeSelected( false ); + bool bCertainTextNodeSelected( false ); for ( size_t nNumItemIdx = 0; nNumItemIdx < maNumItems.size(); ++nNumItemIdx ) { SvTreeListEntry* pEntry = m_pSelectionToolTipLB->InsertEntry( pIDoc->getListItemText( *maNumItems[nNumItemIdx], true, true ) ); pEntry->SetUserData( reinterpret_cast<void*>(nNumItemIdx) ); - if ( ( IsFldEdit() && - pRefFld->GetReferencedTxtNode() == maNumItems[nNumItemIdx]->GetTxtNode() ) || - mpSavedSelectedTxtNode == maNumItems[nNumItemIdx]->GetTxtNode() ) + if ( ( IsFieldEdit() && + pRefField->GetReferencedTextNode() == maNumItems[nNumItemIdx]->GetTextNode() ) || + mpSavedSelectedTextNode == maNumItems[nNumItemIdx]->GetTextNode() ) { m_pSelectionToolTipLB->Select( pEntry ); sOldSel.clear(); - bCertainTxtNodeSelected = true; + bCertainTextNodeSelected = true; } - else if ( !bCertainTxtNodeSelected && mnSavedSelectedPos == nNumItemIdx ) + else if ( !bCertainTextNodeSelected && mnSavedSelectedPos == nNumItemIdx ) { m_pSelectionToolTipLB->Select( pEntry ); sOldSel.clear(); @@ -589,38 +589,38 @@ void SwFldRefPage::UpdateSubType() m_pSelectionLB->SetStyle(m_pSelectionLB->GetStyle()|WB_SORT); // get the fields to Seq-FieldType: - SwSetExpFieldType* pType = static_cast<SwSetExpFieldType*>(pSh->GetFldType( + SwSetExpFieldType* pType = static_cast<SwSetExpFieldType*>(pSh->GetFieldType( nTypeId & ~REFFLDFLAG, RES_SETEXPFLD )); if( pType ) { - SwSeqFldList aArr; + SwSeqFieldList aArr; // old selection should be kept in non-edit mode - if(IsFldEdit()) + if(IsFieldEdit()) sOldSel.clear(); - const size_t nCnt = pType->GetSeqFldList( aArr ); + const size_t nCnt = pType->GetSeqFieldList( aArr ); for( size_t n = 0; n < nCnt; ++n ) { m_pSelectionLB->InsertEntry( aArr[ n ]->sDlgEntry ); - if (IsFldEdit() && sOldSel.isEmpty() && - aArr[ n ]->nSeqNo == pRefFld->GetSeqNo()) + if (IsFieldEdit() && sOldSel.isEmpty() && + aArr[ n ]->nSeqNo == pRefField->GetSeqNo()) sOldSel = aArr[ n ]->sDlgEntry; } - if (IsFldEdit() && sOldSel.isEmpty()) - sOldSel = OUString::number( pRefFld->GetSeqNo() + 1); + if (IsFieldEdit() && sOldSel.isEmpty()) + sOldSel = OUString::number( pRefField->GetSeqNo() + 1); } } } else { std::vector<OUString> aLst; - GetFldMgr().GetSubTypes(nTypeId, aLst); + GetFieldMgr().GetSubTypes(nTypeId, aLst); for(size_t i = 0; i < aLst.size(); ++i) m_pSelectionLB->InsertEntry(aLst[i]); - if (IsFldEdit()) - sOldSel = pRefFld->GetSetRefName(); + if (IsFieldEdit()) + sOldSel = pRefField->GetSetRefName(); } // #i83479# @@ -638,7 +638,7 @@ void SwFldRefPage::UpdateSubType() m_pSelectionToolTipLB->MakeVisible( m_pSelectionToolTipLB->GetCurEntry() ); } - if ( IsFldEdit() && m_pSelectionToolTipLB->GetCurEntry() == 0 ) + if ( IsFieldEdit() && m_pSelectionToolTipLB->GetCurEntry() == 0 ) { m_pNameED->SetText(sOldSel); } @@ -654,16 +654,16 @@ void SwFldRefPage::UpdateSubType() if ( bEnable ) { m_pSelectionLB->SelectEntry(sOldSel); - if (!m_pSelectionLB->GetSelectEntryCount() && !IsFldEdit()) + if (!m_pSelectionLB->GetSelectEntryCount() && !IsFieldEdit()) m_pSelectionLB->SelectEntryPos(0); } - if (IsFldEdit() && !m_pSelectionLB->GetSelectEntryCount()) // in case the reference was already deleted... + if (IsFieldEdit() && !m_pSelectionLB->GetSelectEntryCount()) // in case the reference was already deleted... m_pNameED->SetText(sOldSel); } } -sal_Int32 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId) +sal_Int32 SwFieldRefPage::FillFormatLB(sal_uInt16 nTypeId) { OUString sOldSel; @@ -701,7 +701,7 @@ sal_Int32 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId) } else { - nSize = GetFldMgr().GetFormatCount( nTypeId, false, IsFldDlgHtmlMode() ); + nSize = GetFieldMgr().GetFormatCount( nTypeId, false, IsFieldDlgHtmlMode() ); } break; } @@ -711,35 +711,35 @@ sal_Int32 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId) for (sal_uInt16 i = 0; i < nSize; i++) { - sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr( nTypeId, i )); - m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i ))); + sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFieldMgr().GetFormatStr( nTypeId, i )); + m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFieldMgr().GetFormatId( nTypeId, i ))); } // #i83479# if ( bAddCrossRefFormats ) { sal_uInt16 nFormat = FMT_REF_NUMBER - FMT_REF_BEGIN; - sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat )); - m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, nFormat ))); + sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFieldMgr().GetFormatStr( nTypeId, nFormat )); + m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFieldMgr().GetFormatId( nTypeId, nFormat ))); nFormat = FMT_REF_NUMBER_NO_CONTEXT - FMT_REF_BEGIN; - nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat )); - m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, nFormat ))); + nPos = m_pFormatLB->InsertEntry(GetFieldMgr().GetFormatStr( nTypeId, nFormat )); + m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFieldMgr().GetFormatId( nTypeId, nFormat ))); nFormat = FMT_REF_NUMBER_FULL_CONTEXT - FMT_REF_BEGIN; - nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat )); - m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, nFormat ))); + nPos = m_pFormatLB->InsertEntry(GetFieldMgr().GetFormatStr( nTypeId, nFormat )); + m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFieldMgr().GetFormatId( nTypeId, nFormat ))); nSize += 3; } // select a certain entry if (nSize) { - if (!IsFldEdit()) + if (!IsFieldEdit()) m_pFormatLB->SelectEntry(sOldSel); else m_pFormatLB->SelectEntry(SW_RESSTR(FMT_REF_BEGIN + GetCurField()->GetFormat())); if (!m_pFormatLB->GetSelectEntryCount()) { - m_pFormatLB->SelectEntryPos(nFldDlgFmtSel); + m_pFormatLB->SelectEntryPos(nFieldDlgFormatSel); if (!m_pFormatLB->GetSelectEntryCount()) m_pFormatLB->SelectEntryPos(0); } @@ -749,7 +749,7 @@ sal_Int32 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId) } // Modify -IMPL_LINK_NOARG(SwFldRefPage, ModifyHdl) +IMPL_LINK_NOARG(SwFieldRefPage, ModifyHdl) { OUString aName(m_pNameED->GetText()); const bool bEmptyName = aName.isEmpty(); @@ -757,7 +757,7 @@ IMPL_LINK_NOARG(SwFldRefPage, ModifyHdl) bool bEnable = true; sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); - if ((nTypeId == TYP_SETREFFLD && !GetFldMgr().CanInsertRefMark(aName)) || + if ((nTypeId == TYP_SETREFFLD && !GetFieldMgr().CanInsertRefMark(aName)) || (bEmptyName && (nTypeId == TYP_GETREFFLD || nTypeId == TYP_SETREFFLD || nTypeId == REFFLDFLAG_BOOKMARK))) bEnable = false; @@ -769,7 +769,7 @@ IMPL_LINK_NOARG(SwFldRefPage, ModifyHdl) return 0; } -bool SwFldRefPage::FillItemSet(SfxItemSet* ) +bool SwFieldRefPage::FillItemSet(SfxItemSet* ) { bool bModified = false; sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); @@ -790,7 +790,7 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) case TYP_SETREFFLD: { - SwFieldType* pType = GetFldMgr().GetFldType(RES_SETEXPFLD, aName); + SwFieldType* pType = GetFieldMgr().GetFieldType(RES_SETEXPFLD, aName); if(!pType) // Only insert when the name doesn't exist yet { @@ -801,7 +801,7 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) } } - SwGetRefField* pRefFld = static_cast<SwGetRefField*>(GetCurField()); + SwGetRefField* pRefField = static_cast<SwGetRefField*>(GetCurField()); if (REFFLDFLAG & nTypeId) { @@ -818,8 +818,8 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) } else if (REFFLDFLAG_FOOTNOTE == nTypeId) // footnotes { - SwSeqFldList aArr; - _SeqFldLstElem aElem( m_pSelectionLB->GetSelectEntry(), 0 ); + SwSeqFieldList aArr; + _SeqFieldLstElem aElem( m_pSelectionLB->GetSelectEntry(), 0 ); size_t nPos = 0; @@ -827,20 +827,20 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) nSubType = REF_FOOTNOTE; aName.clear(); - if (pSh->GetSeqFtnList(aArr) && aArr.SeekEntry(aElem, &nPos)) + if (pSh->GetSeqFootnoteList(aArr) && aArr.SeekEntry(aElem, &nPos)) { aVal = OUString::number( aArr[nPos]->nSeqNo ); - if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo()) + if (IsFieldEdit() && aArr[nPos]->nSeqNo == pRefField->GetSeqNo()) bModified = true; // can happen with fields of which the references were deleted } - else if (IsFldEdit()) - aVal = OUString::number( pRefFld->GetSeqNo() ); + else if (IsFieldEdit()) + aVal = OUString::number( pRefField->GetSeqNo() ); } else if (REFFLDFLAG_ENDNOTE == nTypeId) // endnotes { - SwSeqFldList aArr; - _SeqFldLstElem aElem( m_pSelectionLB->GetSelectEntry(), 0 ); + SwSeqFieldList aArr; + _SeqFieldLstElem aElem( m_pSelectionLB->GetSelectEntry(), 0 ); size_t nPos = 0; @@ -848,22 +848,22 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) nSubType = REF_ENDNOTE; aName.clear(); - if (pSh->GetSeqFtnList(aArr, true) && aArr.SeekEntry(aElem, &nPos)) + if (pSh->GetSeqFootnoteList(aArr, true) && aArr.SeekEntry(aElem, &nPos)) { aVal = OUString::number( aArr[nPos]->nSeqNo ); - if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo()) + if (IsFieldEdit() && aArr[nPos]->nSeqNo == pRefField->GetSeqNo()) bModified = true; // can happen with fields of which the reference was deleted } - else if (IsFldEdit()) - aVal = OUString::number( pRefFld->GetSeqNo() ); + else if (IsFieldEdit()) + aVal = OUString::number( pRefField->GetSeqNo() ); } // #i83479# else if ( nTypeId == REFFLDFLAG_HEADING ) { SvTreeListEntry* pEntry = m_pSelectionToolTipLB->GetCurEntry(); OSL_ENSURE( pEntry, - "<SwFldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" ); + "<SwFieldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" ); if ( pEntry ) { const size_t nOutlIdx( static_cast<size_t> @@ -871,7 +871,7 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) pSh->getIDocumentOutlineNodesAccess()->getOutlineNodes( maOutlineNodes ); if ( nOutlIdx < maOutlineNodes.size() ) { - ::sw::mark::IMark const * const pMark = pSh->getIDocumentMarkAccess()->getMarkForTxtNode( + ::sw::mark::IMark const * const pMark = pSh->getIDocumentMarkAccess()->getMarkForTextNode( *(maOutlineNodes[nOutlIdx]), IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK); aName = pMark->GetName(); @@ -884,7 +884,7 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) { SvTreeListEntry* pEntry = m_pSelectionToolTipLB->GetCurEntry(); OSL_ENSURE( pEntry, - "<SwFldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" ); + "<SwFieldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" ); if ( pEntry ) { const size_t nNumItemIdx( static_cast<size_t> @@ -892,8 +892,8 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) pSh->getIDocumentListItemsAccess()->getNumItems( maNumItems ); if ( nNumItemIdx < maNumItems.size() ) { - ::sw::mark::IMark const * const pMark = pSh->getIDocumentMarkAccess()->getMarkForTxtNode( - *(maNumItems[nNumItemIdx]->GetTxtNode()), + ::sw::mark::IMark const * const pMark = pSh->getIDocumentMarkAccess()->getMarkForTextNode( + *(maNumItems[nNumItemIdx]->GetTextNode()), IDocumentMarkAccess::MarkType::CROSSREF_NUMITEM_BOOKMARK); aName = pMark->GetName(); nTypeId = TYP_GETREFFLD; @@ -904,12 +904,12 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) else // SeqenceFields { // get fields for Seq-FeldType: - SwSetExpFieldType* pType = static_cast<SwSetExpFieldType*>(pSh->GetFldType( + SwSetExpFieldType* pType = static_cast<SwSetExpFieldType*>(pSh->GetFieldType( nTypeId & ~REFFLDFLAG, RES_SETEXPFLD )); if( pType ) { - SwSeqFldList aArr; - _SeqFldLstElem aElem( m_pSelectionLB->GetSelectEntry(), 0 ); + SwSeqFieldList aArr; + _SeqFieldLstElem aElem( m_pSelectionLB->GetSelectEntry(), 0 ); size_t nPos = 0; @@ -917,32 +917,32 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) nSubType = REF_SEQUENCEFLD; aName = pType->GetName(); - if (pType->GetSeqFldList(aArr) && aArr.SeekEntry(aElem, &nPos)) + if (pType->GetSeqFieldList(aArr) && aArr.SeekEntry(aElem, &nPos)) { aVal = OUString::number( aArr[nPos]->nSeqNo ); - if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo()) + if (IsFieldEdit() && aArr[nPos]->nSeqNo == pRefField->GetSeqNo()) bModified = true; // can happen with fields of which the reference was deleted } - else if (IsFldEdit()) - aVal = OUString::number( pRefFld->GetSeqNo() ); + else if (IsFieldEdit()) + aVal = OUString::number( pRefField->GetSeqNo() ); } } } - if (IsFldEdit() && nTypeId == TYP_GETREFFLD) + if (IsFieldEdit() && nTypeId == TYP_GETREFFLD) { aVal = OUString::number(nSubType) + "|" + aVal; } - if (!IsFldEdit() || bModified || + if (!IsFieldEdit() || bModified || m_pNameED->IsValueChangedFromSaved() || m_pValueED->IsValueChangedFromSaved() || m_pTypeLB->IsValueChangedFromSaved() || m_pSelectionLB->IsValueChangedFromSaved() || m_pFormatLB->IsValueChangedFromSaved()) { - InsertFld( nTypeId, nSubType, aName, aVal, nFormat ); + InsertField( nTypeId, nSubType, aName, aVal, nFormat ); } ModifyHdl(); // enable/disable insert if applicable @@ -950,18 +950,18 @@ bool SwFldRefPage::FillItemSet(SfxItemSet* ) return false; } -VclPtr<SfxTabPage> SwFldRefPage::Create( vcl::Window* pParent, +VclPtr<SfxTabPage> SwFieldRefPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return VclPtr<SwFldRefPage>::Create( pParent, *rAttrSet ); + return VclPtr<SwFieldRefPage>::Create( pParent, *rAttrSet ); } -sal_uInt16 SwFldRefPage::GetGroup() +sal_uInt16 SwFieldRefPage::GetGroup() { return GRP_REF; } -void SwFldRefPage::FillUserData() +void SwFieldRefPage::FillUserData() { const sal_Int32 nEntryPos = m_pTypeLB->GetSelectEntryPos(); const sal_uInt16 nTypeSel = ( LISTBOX_ENTRY_NOTFOUND == nEntryPos ) diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx index 24c540f181f7..bb1f683d7b5e 100644 --- a/sw/source/ui/fldui/fldref.hxx +++ b/sw/source/ui/fldui/fldref.hxx @@ -30,33 +30,33 @@ #include <IDocumentOutlineNodes.hxx> #include <IDocumentListItems.hxx> #include <FldRefTreeListBox.hxx> -class SwTxtNode; +class SwTextNode; -class SwFldRefPage : public SwFldPage +class SwFieldRefPage : public SwFieldPage { VclPtr<ListBox> m_pTypeLB; VclPtr<VclContainer> m_pSelection; VclPtr<ListBox> m_pSelectionLB; // #i83479# - VclPtr<SwFldRefTreeListBox> m_pSelectionToolTipLB; + VclPtr<SwFieldRefTreeListBox> m_pSelectionToolTipLB; VclPtr<VclContainer> m_pFormat; VclPtr<ListBox> m_pFormatLB; VclPtr<FixedText> m_pNameFT; VclPtr<Edit> m_pNameED; VclPtr<Edit> m_pValueED; - OUString sBookmarkTxt; - OUString sFootnoteTxt; - OUString sEndnoteTxt; + OUString sBookmarkText; + OUString sFootnoteText; + OUString sEndnoteText; // #i83479# - OUString sHeadingTxt; - OUString sNumItemTxt; + OUString sHeadingText; + OUString sNumItemText; IDocumentOutlineNodes::tSortedOutlineNodeList maOutlineNodes; IDocumentListItems::tSortedNodeNumList maNumItems; // selected text node in the listbox for headings and numbered items // in order to restore selection after update of selection listbox - const SwTxtNode* mpSavedSelectedTxtNode; + const SwTextNode* mpSavedSelectedTextNode; // fallback, if previously selected text node doesn't exist anymore size_t mnSavedSelectedPos; @@ -68,15 +68,15 @@ class SwFldRefPage : public SwFldPage sal_Int32 FillFormatLB(sal_uInt16 nTypeId); // #i83479# - void SaveSelectedTxtNode(); + void SaveSelectedTextNode(); protected: virtual sal_uInt16 GetGroup() SAL_OVERRIDE; public: - SwFldRefPage(vcl::Window* pParent, const SfxItemSet& rSet); + SwFieldRefPage(vcl::Window* pParent, const SfxItemSet& rSet); - virtual ~SwFldRefPage(); + virtual ~SwFieldRefPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 00cb076de723..06ddf5f9a973 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -47,7 +47,7 @@ #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> // carrier of the dialog -SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent) +SwFieldDlg::SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent) : SfxTabDialog(pParent, "FieldDialog", "modules/swriter/ui/fielddialog.ui") , m_pChildWin(pCW) , m_pBindings(pB) @@ -62,18 +62,18 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent SetStyle(GetStyle()|WB_STDMODELESS); m_bHtmlMode = (::GetHtmlMode(static_cast<SwDocShell*>(SfxObjectShell::Current())) & HTMLMODE_ON) != 0; - GetCancelButton().SetClickHdl(LINK(this, SwFldDlg, CancelHdl)); + GetCancelButton().SetClickHdl(LINK(this, SwFieldDlg, CancelHdl)); - GetOKButton().SetClickHdl(LINK(this, SwFldDlg, OKHdl)); + GetOKButton().SetClickHdl(LINK(this, SwFieldDlg, OKHdl)); - m_nDokId = AddTabPage("document", SwFldDokPage::Create, 0); - m_nVarId = AddTabPage("variables", SwFldVarPage::Create, 0); - m_nDokInf = AddTabPage("docinfo", SwFldDokInfPage::Create, 0); + m_nDokId = AddTabPage("document", SwFieldDokPage::Create, 0); + m_nVarId = AddTabPage("variables", SwFieldVarPage::Create, 0); + m_nDokInf = AddTabPage("docinfo", SwFieldDokInfPage::Create, 0); if (!m_bHtmlMode) { - m_nRefId = AddTabPage("ref", SwFldRefPage::Create, 0); - m_nFuncId = AddTabPage("functions", SwFldFuncPage::Create, 0); + m_nRefId = AddTabPage("ref", SwFieldRefPage::Create, 0); + m_nFuncId = AddTabPage("functions", SwFieldFuncPage::Create, 0); utl::OConfigurationTreeRoot aCfgRoot = utl::OConfigurationTreeRoot::createWithComponentContext( @@ -88,7 +88,7 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent OUString("DatabaseFields")) >>= bDatabaseFields; if (bDatabaseFields) - m_nDbId = AddTabPage("database", SwFldDBPage::Create, 0); + m_nDbId = AddTabPage("database", SwFieldDBPage::Create, 0); else RemoveTabPage("database"); } @@ -100,11 +100,11 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent } } -SwFldDlg::~SwFldDlg() +SwFieldDlg::~SwFieldDlg() { } -bool SwFldDlg::Close() +bool SwFieldDlg::Close() { m_pBindings->GetDispatcher()-> Execute(m_bDataBaseMode ? FN_INSERT_FIELD_DATA_ONLY : FN_INSERT_FIELD, @@ -112,7 +112,7 @@ bool SwFldDlg::Close() return true; } -void SwFldDlg::Initialize(SfxChildWinInfo *pInfo) +void SwFieldDlg::Initialize(SfxChildWinInfo *pInfo) { Point aPos; Size aSize; @@ -158,7 +158,7 @@ void SwFldDlg::Initialize(SfxChildWinInfo *pInfo) SetPosPixel( aPos ); } -SfxItemSet* SwFldDlg::CreateInputItemSet( sal_uInt16 nID ) +SfxItemSet* SwFieldDlg::CreateInputItemSet( sal_uInt16 nID ) { if ( nID == m_nDokInf ) { @@ -180,7 +180,7 @@ SfxItemSet* SwFldDlg::CreateInputItemSet( sal_uInt16 nID ) } // kick off inserting of new fields -IMPL_LINK_NOARG(SwFldDlg, OKHdl) +IMPL_LINK_NOARG(SwFieldDlg, OKHdl) { if (GetOKButton().IsEnabled()) { @@ -193,14 +193,14 @@ IMPL_LINK_NOARG(SwFldDlg, OKHdl) return 0; } -IMPL_LINK_NOARG(SwFldDlg, CancelHdl) +IMPL_LINK_NOARG(SwFieldDlg, CancelHdl) { Close(); return 0; } // newly initialise dialog after Doc-Switch -void SwFldDlg::ReInitDlg() +void SwFieldDlg::ReInitDlg() { SwDocShell* pDocSh = static_cast<SwDocShell*>(SfxObjectShell::Current()); bool bNewMode = (::GetHtmlMode(pDocSh) & HTMLMODE_ON) != 0; @@ -234,15 +234,15 @@ void SwFldDlg::ReInitDlg() } // newly initialise TabPage after Doc-Switch -void SwFldDlg::ReInitTabPage( sal_uInt16 nPageId, bool bOnlyActivate ) +void SwFieldDlg::ReInitTabPage( sal_uInt16 nPageId, bool bOnlyActivate ) { - SwFldPage* pPage = static_cast<SwFldPage* >(GetTabPage(nPageId)); + SwFieldPage* pPage = static_cast<SwFieldPage* >(GetTabPage(nPageId)); if ( pPage ) pPage->EditNewField( bOnlyActivate ); // newly initialise TabPage } // newly initialise after activation of a few TabPages -void SwFldDlg::Activate() +void SwFieldDlg::Activate() { SwView* pView = ::GetActiveView(); if( pView ) @@ -262,7 +262,7 @@ void SwFldDlg::Activate() } } -void SwFldDlg::EnableInsert(bool bEnable) +void SwFieldDlg::EnableInsert(bool bEnable) { if( bEnable ) { @@ -276,19 +276,19 @@ void SwFldDlg::EnableInsert(bool bEnable) GetOKButton().Enable(bEnable); } -void SwFldDlg::InsertHdl() +void SwFieldDlg::InsertHdl() { GetOKButton().Click(); } -void SwFldDlg::ActivateDatabasePage() +void SwFieldDlg::ActivateDatabasePage() { m_bDataBaseMode = true; ShowPage(m_nDbId); SfxTabPage* pDBPage = GetTabPage(m_nDbId); if( pDBPage ) { - static_cast<SwFldDBPage*>(pDBPage)->ActivateMailMergeAddress(); + static_cast<SwFieldDBPage*>(pDBPage)->ActivateMailMergeAddress(); } //remove all other pages RemoveTabPage("document"); @@ -298,12 +298,12 @@ void SwFldDlg::ActivateDatabasePage() RemoveTabPage("functions"); } -void SwFldDlg::ShowReferencePage() +void SwFieldDlg::ShowReferencePage() { ShowPage(m_nRefId); } -void SwFldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) +void SwFieldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) { if (nId == m_nDbId) { @@ -318,7 +318,7 @@ void SwFldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) pViewShell = SfxViewShell::GetNext( *pViewShell, &aSwViewTypeId ); } if(pViewShell) - static_cast<SwFldDBPage&>(rPage).SetWrtShell(static_cast<SwView*>(pViewShell)->GetWrtShell()); + static_cast<SwFieldDBPage&>(rPage).SetWrtShell(static_cast<SwView*>(pViewShell)->GetWrtShell()); } } } diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 72bfdcf4b4a3..95c737f0ea7a 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -39,8 +39,8 @@ #define USER_DATA_VERSION_1 "1" #define USER_DATA_VERSION USER_DATA_VERSION_1 -SwFldVarPage::SwFldVarPage(vcl::Window* pParent, const SfxItemSet& rCoreSet ) - : SwFldPage(pParent, "FldVarPage", +SwFieldVarPage::SwFieldVarPage(vcl::Window* pParent, const SfxItemSet& rCoreSet ) + : SwFieldPage(pParent, "FieldVarPage", "modules/swriter/ui/fldvarpage.ui", rCoreSet) , nOldFormat(0) , bInit(true) @@ -86,12 +86,12 @@ SwFldVarPage::SwFldVarPage(vcl::Window* pParent, const SfxItemSet& rCoreSet ) m_pNumFormatLB->SetShowLanguageControl(true); } -SwFldVarPage::~SwFldVarPage() +SwFieldVarPage::~SwFieldVarPage() { disposeOnce(); } -void SwFldVarPage::dispose() +void SwFieldVarPage::dispose() { m_pTypeLB.clear(); m_pSelection.clear(); @@ -109,10 +109,10 @@ void SwFldVarPage::dispose() m_pSeparatorFT.clear(); m_pSeparatorED.clear(); m_pNewDelTBX.clear(); - SwFldPage::dispose(); + SwFieldPage::dispose(); } -void SwFldVarPage::Reset(const SfxItemSet* ) +void SwFieldVarPage::Reset(const SfxItemSet* ) { SavePos(m_pTypeLB); @@ -124,26 +124,26 @@ void SwFldVarPage::Reset(const SfxItemSet* ) sal_Int32 nPos; sal_uInt16 nTypeId; - if (!IsFldEdit()) + if (!IsFieldEdit()) { // initialise TypeListBox - const SwFldGroupRgn& rRg = SwFldMgr::GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); + const SwFieldGroupRgn& rRg = SwFieldMgr::GetGroupRange(IsFieldDlgHtmlMode(), GetGroup()); for (short i = rRg.nStart; i < rRg.nEnd; ++i) { - nTypeId = SwFldMgr::GetTypeId(i); - nPos = m_pTypeLB->InsertEntry(SwFldMgr::GetTypeStr(i)); + nTypeId = SwFieldMgr::GetTypeId(i); + nPos = m_pTypeLB->InsertEntry(SwFieldMgr::GetTypeStr(i)); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId)); } } else { const SwField* pCurField = GetCurField(); - assert(pCurField && "<SwFldVarPage::Reset(..)> - <SwField> instance missing!"); + assert(pCurField && "<SwFieldVarPage::Reset(..)> - <SwField> instance missing!"); nTypeId = pCurField->GetTypeId(); if (nTypeId == TYP_SETINPFLD) nTypeId = TYP_INPUTFLD; - nPos = m_pTypeLB->InsertEntry(SwFldMgr::GetTypeStr(SwFldMgr::GetPos(nTypeId))); + nPos = m_pTypeLB->InsertEntry(SwFieldMgr::GetTypeStr(SwFieldMgr::GetPos(nTypeId))); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId)); m_pNumFormatLB->SetAutomaticLanguage(pCurField->IsAutomaticLanguage()); SwWrtShell *pSh = GetWrtShell(); @@ -160,17 +160,17 @@ void SwFldVarPage::Reset(const SfxItemSet* ) // select old Pos RestorePos(m_pTypeLB); - m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFldVarPage, InsertHdl)); - m_pTypeLB->SetSelectHdl (LINK(this, SwFldVarPage, TypeHdl)); - m_pSelectionLB->SetSelectHdl (LINK(this, SwFldVarPage, SubTypeHdl)); - m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFldVarPage, InsertHdl)); - m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFldVarPage, InsertHdl)); - m_pNumFormatLB->SetDoubleClickHdl (LINK(this, SwFldVarPage, InsertHdl)); - m_pNameED->SetModifyHdl (LINK(this, SwFldVarPage, ModifyHdl)); - m_pValueED->SetModifyHdl (LINK(this, SwFldVarPage, ModifyHdl)); - m_pNewDelTBX->SetClickHdl (LINK(this, SwFldVarPage, TBClickHdl)); - m_pChapterLevelLB->SetSelectHdl (LINK(this, SwFldVarPage, ChapterHdl)); - m_pSeparatorED->SetModifyHdl (LINK(this, SwFldVarPage, SeparatorHdl)); + m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, InsertHdl)); + m_pTypeLB->SetSelectHdl (LINK(this, SwFieldVarPage, TypeHdl)); + m_pSelectionLB->SetSelectHdl (LINK(this, SwFieldVarPage, SubTypeHdl)); + m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, InsertHdl)); + m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, InsertHdl)); + m_pNumFormatLB->SetDoubleClickHdl (LINK(this, SwFieldVarPage, InsertHdl)); + m_pNameED->SetModifyHdl (LINK(this, SwFieldVarPage, ModifyHdl)); + m_pValueED->SetModifyHdl (LINK(this, SwFieldVarPage, ModifyHdl)); + m_pNewDelTBX->SetClickHdl (LINK(this, SwFieldVarPage, TBClickHdl)); + m_pChapterLevelLB->SetSelectHdl (LINK(this, SwFieldVarPage, ChapterHdl)); + m_pSeparatorED->SetModifyHdl (LINK(this, SwFieldVarPage, SeparatorHdl)); if( !IsRefresh() ) { @@ -194,7 +194,7 @@ void SwFldVarPage::Reset(const SfxItemSet* ) m_pTypeLB->SetUpdateMode(true); - if (IsFldEdit()) + if (IsFieldEdit()) { m_pSelectionLB->SaveValue(); m_pFormatLB->SaveValue(); @@ -207,7 +207,7 @@ void SwFldVarPage::Reset(const SfxItemSet* ) } } -IMPL_LINK_NOARG(SwFldVarPage, TypeHdl) +IMPL_LINK_NOARG(SwFieldVarPage, TypeHdl) { // save old ListBoxPos const sal_Int32 nOld = GetTypeSel(); @@ -239,7 +239,7 @@ IMPL_LINK_NOARG(SwFldVarPage, TypeHdl) return 0; } -IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) +IMPL_LINK( SwFieldVarPage, SubTypeHdl, ListBox *, pBox ) { sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); sal_Int32 nSelPos = m_pSelectionLB->GetSelectEntryPos(); @@ -248,12 +248,12 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if (nSelPos != LISTBOX_ENTRY_NOTFOUND) nSelData = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pSelectionLB->GetEntryData(nSelPos)); - if (IsFldEdit() && (!pBox || bInit)) + if (IsFieldEdit() && (!pBox || bInit)) { if (nTypeId != TYP_FORMELFLD) - m_pNameED->SetText(GetFldMgr().GetCurFldPar1()); + m_pNameED->SetText(GetFieldMgr().GetCurFieldPar1()); - m_pValueED->SetText(GetFldMgr().GetCurFldPar2()); + m_pValueED->SetText(GetFieldMgr().GetCurFieldPar2()); } if (m_pNameFT->GetText() != OUString(sOldNameFT)) @@ -267,7 +267,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) sal_Int32 nSize = m_pFormatLB->GetEntryCount(); - bool bValue = false, bName = false, bNumFmt = false, + bool bValue = false, bName = false, bNumFormat = false, bInvisible = false, bShowChapterFrame = false; bool bFormat = nSize != 0; @@ -277,11 +277,11 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) { // change or create user type SwUserFieldType* pType = static_cast<SwUserFieldType*>( - GetFldMgr().GetFldType(RES_USERFLD, nSelData)); + GetFieldMgr().GetFieldType(RES_USERFLD, nSelData)); if (pType) { - if (!IsFldEdit()) + if (!IsFieldEdit()) { if (pBox || (bInit && !IsRefresh())) // only when interacting via mouse { @@ -307,7 +307,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) m_pValueED->SetText(OUString()); } } - bValue = bName = bNumFmt = bInvisible = true; + bValue = bName = bNumFormat = bInvisible = true; m_pValueED->SetDropEnable(true); break; @@ -316,9 +316,9 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) case TYP_SETFLD: bValue = true; - bNumFmt = bInvisible = true; + bNumFormat = bInvisible = true; - if (!IsFldDlgHtmlMode()) + if (!IsFieldDlgHtmlMode()) bName = true; else { @@ -328,14 +328,14 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) m_pNumFormatLB->SelectEntryPos(0); } // is there a corresponding SetField - if (IsFldEdit() || pBox) // only when interacting via mouse + if (IsFieldEdit() || pBox) // only when interacting via mouse { if (nSelPos != LISTBOX_ENTRY_NOTFOUND) { OUString sName(m_pSelectionLB->GetSelectEntry()); m_pNameED->SetText(sName); - if (!IsFldDlgHtmlMode()) + if (!IsFieldDlgHtmlMode()) { SwWrtShell *pSh = GetWrtShell(); if(!pSh) @@ -343,7 +343,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if(pSh) { SwSetExpFieldType* pSetTyp = static_cast<SwSetExpFieldType*>( - pSh->GetFldType(RES_SETEXPFLD, sName)); + pSh->GetFieldType(RES_SETEXPFLD, sName)); if (pSetTyp && pSetTyp->GetType() == nsSwGetSetExpType::GSE_STRING) m_pNumFormatLB->SelectEntryPos(0); // textual @@ -351,7 +351,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) } } } - if (GetCurField() != NULL && IsFldEdit()) + if (GetCurField() != NULL && IsFieldEdit()) { // GetFormula leads to problems with date formats because // only the numeric value without formatting is returned. @@ -366,7 +366,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) case TYP_FORMELFLD: { bValue = true; - bNumFmt = true; + bNumFormat = true; m_pValueFT->SetText(SW_RESSTR(STR_FORMULA)); m_pValueED->SetDropEnable(true); } @@ -374,7 +374,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) case TYP_GETFLD: { - if (!IsFldEdit()) + if (!IsFieldEdit()) { m_pNameED->SetText(OUString()); m_pValueED->SetText(OUString()); @@ -383,7 +383,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if (nSelPos != LISTBOX_ENTRY_NOTFOUND) { OUString sName(m_pSelectionLB->GetSelectEntry()); - if (!IsFldEdit()) + if (!IsFieldEdit()) m_pNameED->SetText(sName); // is there a corresponding SetField @@ -393,21 +393,21 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if(pSh) { SwSetExpFieldType* pSetTyp = static_cast<SwSetExpFieldType*>( - pSh->GetFldType(RES_SETEXPFLD, sName)); + pSh->GetFieldType(RES_SETEXPFLD, sName)); if(pSetTyp) { if (pSetTyp->GetType() & nsSwGetSetExpType::GSE_STRING) // textual? bFormat = true; else // numeric - bNumFmt = true; + bNumFormat = true; } } } else bFormat = false; - EnableInsert(bFormat || bNumFmt); + EnableInsert(bFormat || bNumFormat); } break; @@ -416,7 +416,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if (nSelPos != LISTBOX_ENTRY_NOTFOUND) { - bValue = bNumFmt = true; + bValue = bNumFormat = true; OUString sName; @@ -425,13 +425,13 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) // User- or SetField ? const sal_uInt16 nInpType = static_cast< sal_uInt16 > - (GetFldMgr().GetFldType(RES_USERFLD, sName) ? 0 : TYP_SETINPFLD); + (GetFieldMgr().GetFieldType(RES_USERFLD, sName) ? 0 : TYP_SETINPFLD); if (nInpType) // SETEXPFLD { // is there a corresponding SetField SwSetExpFieldType* pSetTyp = static_cast<SwSetExpFieldType*>( - GetFldMgr().GetFldType(RES_SETEXPFLD, sName)); + GetFieldMgr().GetFieldType(RES_SETEXPFLD, sName)); if(pSetTyp) { @@ -444,23 +444,23 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) m_pNumFormatLB->SelectEntryPos(0); } } - if (GetCurField() && IsFldEdit() && (!pBox || bInit) ) + if (GetCurField() && IsFieldEdit() && (!pBox || bInit) ) m_pValueED->SetText(static_cast<SwSetExpField*>(GetCurField())->GetPromptText()); } else // USERFLD - bFormat = bNumFmt = false; + bFormat = bNumFormat = false; } break; case TYP_DDEFLD: m_pValueFT->SetText(SW_RESSTR(STR_DDE_CMD)); - if (IsFldEdit() || pBox) // only when interacting via mouse + if (IsFieldEdit() || pBox) // only when interacting via mouse { if (nSelPos != LISTBOX_ENTRY_NOTFOUND) { SwDDEFieldType* pType = - static_cast<SwDDEFieldType*>( GetFldMgr().GetFldType(RES_DDEFLD, nSelData) ); + static_cast<SwDDEFieldType*>( GetFieldMgr().GetFieldType(RES_DDEFLD, nSelData) ); if(pType) { @@ -485,34 +485,34 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) { bName = bValue = bShowChapterFrame = true; - SwFieldType* pFldTyp; - if( GetCurField() && IsFldEdit() ) - pFldTyp = GetCurField()->GetTyp(); + SwFieldType* pFieldTyp; + if( GetCurField() && IsFieldEdit() ) + pFieldTyp = GetCurField()->GetTyp(); else { - OUString sFldTypeName( m_pSelectionLB->GetEntry( nSelPos )); - if( !sFldTypeName.isEmpty() ) - pFldTyp = GetFldMgr().GetFldType( RES_SETEXPFLD, - sFldTypeName ); + OUString sFieldTypeName( m_pSelectionLB->GetEntry( nSelPos )); + if( !sFieldTypeName.isEmpty() ) + pFieldTyp = GetFieldMgr().GetFieldType( RES_SETEXPFLD, + sFieldTypeName ); else - pFldTyp = 0; + pFieldTyp = 0; } - if( GetCurField() && IsFldEdit() ) + if( GetCurField() && IsFieldEdit() ) m_pValueED->SetText( static_cast<SwSetExpField*>(GetCurField())-> GetFormula() ); - if( IsFldEdit() || pBox ) // only when interacting via mouse + if( IsFieldEdit() || pBox ) // only when interacting via mouse m_pNameED->SetText( m_pSelectionLB->GetSelectEntry() ); - if( pFldTyp ) + if( pFieldTyp ) { - sal_uInt8 nLevel = static_cast<SwSetExpFieldType*>(pFldTyp)->GetOutlineLvl(); + sal_uInt8 nLevel = static_cast<SwSetExpFieldType*>(pFieldTyp)->GetOutlineLvl(); if( 0x7f == nLevel ) m_pChapterLevelLB->SelectEntryPos( 0 ); else m_pChapterLevelLB->SelectEntryPos( nLevel + 1 ); - OUString sDelim = static_cast<SwSetExpFieldType*>(pFldTyp)->GetDelimiter(); + OUString sDelim = static_cast<SwSetExpFieldType*>(pFieldTyp)->GetDelimiter(); m_pSeparatorED->SetText( sDelim ); ChapterHdl(); } @@ -524,13 +524,13 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) bValue = false; m_pValueFT->SetText( SW_RESSTR( STR_OFFSET )); - if (IsFldEdit() || pBox) // only when interacting via mouse + if (IsFieldEdit() || pBox) // only when interacting via mouse m_pNameED->SetText(OUString()); if (nSelPos != 0 && nSelPos != LISTBOX_ENTRY_NOTFOUND) { bValue = true; // SubType OFF - knows no Offset - if (GetCurField() && IsFldEdit()) + if (GetCurField() && IsFieldEdit()) m_pValueED->SetText(OUString::number(static_cast<SwRefPageSetField*>(GetCurField())->GetOffset())); } } @@ -542,13 +542,13 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) break; } - m_pNumFormatLB->Show(bNumFmt); - m_pFormatLB->Show(!bNumFmt); + m_pNumFormatLB->Show(bNumFormat); + m_pFormatLB->Show(!bNumFormat); - if (IsFldEdit()) + if (IsFieldEdit()) bName = false; - m_pFormat->Enable(bFormat || bNumFmt); + m_pFormat->Enable(bFormat || bNumFormat); m_pNameFT->Enable(bName); m_pNameED->Enable(bName); m_pValueFT->Enable(bValue); @@ -592,7 +592,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) } // renew types in SelectionBox -void SwFldVarPage::UpdateSubType() +void SwFieldVarPage::UpdateSubType() { SetSelectionSel(m_pSelectionLB->GetSelectEntryPos()); @@ -606,13 +606,13 @@ void SwFldVarPage::UpdateSubType() const sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); std::vector<OUString> aList; - GetFldMgr().GetSubTypes(nTypeId, aList); + GetFieldMgr().GetSubTypes(nTypeId, aList); const size_t nCount = aList.size(); for (size_t i = 0; i < nCount; ++i) { if (nTypeId != TYP_INPUTFLD || i) { - if (!IsFldEdit()) + if (!IsFieldEdit()) { const size_t nPos = m_pSelectionLB->InsertEntry(aList[i]); m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(i)); @@ -699,7 +699,7 @@ void SwFldVarPage::UpdateSubType() m_pSelectionLB->SetUpdateMode(true); } -sal_Int32 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId) +sal_Int32 SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) { OUString sOldSel; const sal_Int32 nFormatSel = m_pFormatLB->GetSelectEntryPos(); @@ -718,15 +718,15 @@ sal_Int32 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId) // fill Format-Listbox m_pFormatLB->Clear(); m_pNumFormatLB->Clear(); - bool bSpecialFmt = false; + bool bSpecialFormat = false; if( TYP_GETREFPAGEFLD != nTypeId ) { - if (GetCurField() != NULL && IsFldEdit()) + if (GetCurField() != NULL && IsFieldEdit()) { - bSpecialFmt = GetCurField()->GetFormat() == SAL_MAX_UINT32; + bSpecialFormat = GetCurField()->GetFormat() == SAL_MAX_UINT32; - if (!bSpecialFmt) + if (!bSpecialFormat) { m_pNumFormatLB->SetDefFormat(GetCurField()->GetFormat()); sOldNumSel.clear(); @@ -749,7 +749,7 @@ sal_Int32 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId) { case TYP_USERFLD: { - if (!IsFldEdit() || bSpecialFmt) + if (!IsFieldEdit() || bSpecialFormat) { sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); @@ -761,7 +761,7 @@ sal_Int32 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId) case TYP_SETFLD: { - if (!IsFldEdit() || bSpecialFmt) + if (!IsFieldEdit() || bSpecialFormat) { sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); @@ -784,7 +784,7 @@ sal_Int32 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId) break; } - if (IsFldEdit() && bSpecialFmt) + if (IsFieldEdit() && bSpecialFormat) { if (nTypeId == TYP_USERFLD && (GetCurField()->GetSubType() & nsSwExtendedSubType::SUB_CMD)) m_pNumFormatLB->SelectEntryPos(1); @@ -799,18 +799,18 @@ sal_Int32 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId) m_pNumFormatLB->SelectEntry(sOldSel); } - const sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, false, IsFldDlgHtmlMode()); + const sal_uInt16 nSize = GetFieldMgr().GetFormatCount(nTypeId, false, IsFieldDlgHtmlMode()); for (sal_uInt16 i = 0; i < nSize; i++) { - const sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i)); - const sal_uInt16 nFldId = GetFldMgr().GetFormatId( nTypeId, i ); - m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(nFldId) ); - if (IsFldEdit() && GetCurField() && nFldId == GetCurField()->GetFormat()) + const sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFieldMgr().GetFormatStr(nTypeId, i)); + const sal_uInt16 nFieldId = GetFieldMgr().GetFormatId( nTypeId, i ); + m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(nFieldId) ); + if (IsFieldEdit() && GetCurField() && nFieldId == GetCurField()->GetFormat()) m_pFormatLB->SelectEntryPos( nPos ); } - if (nSize && (!IsFldEdit() || !m_pFormatLB->GetSelectEntryCount())) + if (nSize && (!IsFieldEdit() || !m_pFormatLB->GetSelectEntryCount())) { m_pFormatLB->SelectEntry(sOldSel); @@ -830,7 +830,7 @@ sal_Int32 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId) } // Modify -IMPL_LINK_NOARG(SwFldVarPage, ModifyHdl) +IMPL_LINK_NOARG(SwFieldVarPage, ModifyHdl) { OUString sValue(m_pValueED->GetText()); bool bHasValue = !sValue.isEmpty(); @@ -866,7 +866,7 @@ IMPL_LINK_NOARG(SwFldVarPage, ModifyHdl) // is there already a corrensponding type bInsert = bApply = true; - SwFieldType* pType = GetFldMgr().GetFldType(RES_DDEFLD, sName); + SwFieldType* pType = GetFieldMgr().GetFieldType(RES_DDEFLD, sName); SwWrtShell *pSh = GetWrtShell(); if(!pSh) @@ -880,7 +880,7 @@ IMPL_LINK_NOARG(SwFldVarPage, ModifyHdl) if( nLen ) { // is there already a corresponding type - SwFieldType* pType = GetFldMgr().GetFldType(RES_USERFLD, sName); + SwFieldType* pType = GetFieldMgr().GetFieldType(RES_USERFLD, sName); SwWrtShell *pSh = GetWrtShell(); if(!pSh) @@ -888,7 +888,7 @@ IMPL_LINK_NOARG(SwFldVarPage, ModifyHdl) if(pSh && pType) bDelete = !pSh->IsUsed( *pType ); - pType = GetFldMgr().GetFldType(RES_SETEXPFLD, sName); + pType = GetFieldMgr().GetFieldType(RES_SETEXPFLD, sName); if (!pType) // no name conflict with variables { // user fields can also be inserted without content! @@ -903,10 +903,10 @@ IMPL_LINK_NOARG(SwFldVarPage, ModifyHdl) if (nTypeId == TYP_SETFLD || nTypeId == TYP_SEQFLD) { - SwSetExpFieldType* pFldType = static_cast<SwSetExpFieldType*>( - GetFldMgr().GetFldType(RES_SETEXPFLD, sName)); + SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>( + GetFieldMgr().GetFieldType(RES_SETEXPFLD, sName)); - if (pFldType) + if (pFieldType) { SwWrtShell *pSh = GetWrtShell(); @@ -914,32 +914,32 @@ IMPL_LINK_NOARG(SwFldVarPage, ModifyHdl) pSh = ::GetActiveWrtShell(); if(pSh) { - const SwFldTypes* p = pSh->GetDoc()->getIDocumentFieldsAccess().GetFldTypes(); + const SwFieldTypes* p = pSh->GetDoc()->getIDocumentFieldsAccess().GetFieldTypes(); sal_uInt16 i; for (i = 0; i < INIT_FLDTYPES; i++) { SwFieldType* pType = (*p)[ i ]; - if (pType == pFldType) + if (pType == pFieldType) break; } - if (i >= INIT_FLDTYPES && !pSh->IsUsed(*pFldType)) + if (i >= INIT_FLDTYPES && !pSh->IsUsed(*pFieldType)) bDelete = true; - if (nTypeId == TYP_SEQFLD && !(pFldType->GetType() & nsSwGetSetExpType::GSE_SEQ)) + if (nTypeId == TYP_SEQFLD && !(pFieldType->GetType() & nsSwGetSetExpType::GSE_SEQ)) bInsert = false; - if (nTypeId == TYP_SETFLD && (pFldType->GetType() & nsSwGetSetExpType::GSE_SEQ)) + if (nTypeId == TYP_SETFLD && (pFieldType->GetType() & nsSwGetSetExpType::GSE_SEQ)) bInsert = false; } } - if (GetFldMgr().GetFldType(RES_USERFLD, sName)) + if (GetFieldMgr().GetFieldType(RES_USERFLD, sName)) bInsert = false; } if( !nLen && ( nTypeId == TYP_SETFLD || - (!IsFldEdit() && nTypeId == TYP_GETFLD ) ) ) + (!IsFieldEdit() && nTypeId == TYP_GETFLD ) ) ) bInsert = false; if( (nTypeId == TYP_SETFLD || nTypeId == TYP_FORMELFLD) && @@ -955,7 +955,7 @@ IMPL_LINK_NOARG(SwFldVarPage, ModifyHdl) return 0; } -IMPL_LINK_TYPED( SwFldVarPage, TBClickHdl, ToolBox *, pBox, void ) +IMPL_LINK_TYPED( SwFieldVarPage, TBClickHdl, ToolBox *, pBox, void ) { const sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); @@ -964,7 +964,7 @@ IMPL_LINK_TYPED( SwFldVarPage, TBClickHdl, ToolBox *, pBox, void ) if (nCurId == m_nDeleteId) { if( nTypeId == TYP_USERFLD ) - GetFldMgr().RemoveFldType(RES_USERFLD, m_pSelectionLB->GetSelectEntry()); + GetFieldMgr().RemoveFieldType(RES_USERFLD, m_pSelectionLB->GetSelectEntry()); else { sal_uInt16 nWhich; @@ -980,7 +980,7 @@ IMPL_LINK_TYPED( SwFldVarPage, TBClickHdl, ToolBox *, pBox, void ) break; } - GetFldMgr().RemoveFldType(nWhich, m_pSelectionLB->GetSelectEntry()); + GetFieldMgr().RemoveFieldType(nWhich, m_pSelectionLB->GetSelectEntry()); } UpdateSubType(); @@ -1005,7 +1005,7 @@ IMPL_LINK_TYPED( SwFldVarPage, TBClickHdl, ToolBox *, pBox, void ) case TYP_DDEFLD: nId = RES_DDEFLD; break; case TYP_SETFLD: nId = RES_SETEXPFLD;break; } - pType = GetFldMgr().GetFldType(nId, sName); + pType = GetFieldMgr().GetFieldType(nId, sName); sal_uLong nFormat = m_pFormatLB->GetSelectEntryPos(); if (nFormat != LISTBOX_ENTRY_NOTFOUND) @@ -1049,7 +1049,7 @@ IMPL_LINK_TYPED( SwFldVarPage, TBClickHdl, ToolBox *, pBox, void ) static_cast<SwDDEFieldType*>(pType)->SetType(static_cast<SfxLinkUpdateMode>(nFormat)); } } - pType->UpdateFlds(); + pType->UpdateFields(); pSh->EndAllAction(); } @@ -1071,7 +1071,7 @@ IMPL_LINK_TYPED( SwFldVarPage, TBClickHdl, ToolBox *, pBox, void ) aType.SetContent( sValue, nNumFormatPos == 0 ? 0 : m_pNumFormatLB->GetFormat() ); m_pSelectionLB->InsertEntry(sName); m_pSelectionLB->SelectEntry(sName); - GetFldMgr().InsertFldType( aType ); // Userfld new + GetFieldMgr().InsertFieldType( aType ); // Userfld new } } } @@ -1088,18 +1088,18 @@ IMPL_LINK_TYPED( SwFldVarPage, TBClickHdl, ToolBox *, pBox, void ) SwDDEFieldType aType(sName, sValue, static_cast<SfxLinkUpdateMode>(nFormat)); m_pSelectionLB->InsertEntry(sName); m_pSelectionLB->SelectEntry(sName); - GetFldMgr().InsertFldType(aType); // DDE-Field new + GetFieldMgr().InsertFieldType(aType); // DDE-Field new } } } - if (IsFldEdit()) - GetFldMgr().GetCurFld(); // update FieldManager + if (IsFieldEdit()) + GetFieldMgr().GetCurField(); // update FieldManager UpdateSubType(); } } -IMPL_LINK_NOARG(SwFldVarPage, ChapterHdl) +IMPL_LINK_NOARG(SwFieldVarPage, ChapterHdl) { bool bEnable = m_pChapterLevelLB->GetSelectEntryPos() != 0; @@ -1110,7 +1110,7 @@ IMPL_LINK_NOARG(SwFldVarPage, ChapterHdl) return 0; } -IMPL_LINK_NOARG(SwFldVarPage, SeparatorHdl) +IMPL_LINK_NOARG(SwFieldVarPage, SeparatorHdl) { bool bEnable = !m_pSeparatorED->GetText().isEmpty() || m_pChapterLevelLB->GetSelectEntryPos() == 0; @@ -1119,7 +1119,7 @@ IMPL_LINK_NOARG(SwFldVarPage, SeparatorHdl) return 0; } -bool SwFldVarPage::FillItemSet(SfxItemSet* ) +bool SwFieldVarPage::FillItemSet(SfxItemSet* ) { const sal_uInt16 nTypeId = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pTypeLB->GetEntryData(GetTypeSel())); @@ -1189,14 +1189,14 @@ bool SwFldVarPage::FillItemSet(SfxItemSet* ) } case TYP_INPUTFLD: { - SwFieldType* pType = GetFldMgr().GetFldType(RES_USERFLD, aName); + SwFieldType* pType = GetFieldMgr().GetFieldType(RES_USERFLD, aName); nSubType = static_cast< sal_uInt16 >((nSubType & 0xff00) | ((pType) ? INP_USR : INP_VAR)); break; } case TYP_SETFLD: { - if (IsFldDlgHtmlMode()) + if (IsFieldDlgHtmlMode()) { nSubType = 0x0100; nSubType = (nSubType & 0xff00) | nsSwGetSetExpType::GSE_STRING; @@ -1227,7 +1227,7 @@ bool SwFldVarPage::FillItemSet(SfxItemSet* ) break; } - if (!IsFldEdit() || + if (!IsFieldEdit() || m_pNameED->IsValueChangedFromSaved() || m_pValueED->IsValueChangedFromSaved() || m_pSelectionLB->IsValueChangedFromSaved() || @@ -1237,7 +1237,7 @@ bool SwFldVarPage::FillItemSet(SfxItemSet* ) m_pChapterLevelLB->IsValueChangedFromSaved() || m_pSeparatorED->IsValueChangedFromSaved()) { - InsertFld( nTypeId, nSubType, aName, aVal, nFormat, + InsertField( nTypeId, nSubType, aName, aVal, nFormat, cSeparator, m_pNumFormatLB->IsAutomaticLanguage() ); } @@ -1246,13 +1246,13 @@ bool SwFldVarPage::FillItemSet(SfxItemSet* ) return false; } -VclPtr<SfxTabPage> SwFldVarPage::Create( vcl::Window* pParent, +VclPtr<SfxTabPage> SwFieldVarPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return VclPtr<SwFldVarPage>::Create( pParent, *rAttrSet ); + return VclPtr<SwFieldVarPage>::Create( pParent, *rAttrSet ); } -sal_uInt16 SwFldVarPage::GetGroup() +sal_uInt16 SwFieldVarPage::GetGroup() { return GRP_VAR; } @@ -1303,7 +1303,7 @@ bool SelectionListBox::PreNotify( NotifyEvent& rNEvt ) return nHandled; } -void SwFldVarPage::FillUserData() +void SwFieldVarPage::FillUserData() { OUString sData(USER_DATA_VERSION); sData += ";"; diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx index a7bf3f0163ac..13ed1e5c69a7 100644 --- a/sw/source/ui/fldui/fldvar.hxx +++ b/sw/source/ui/fldui/fldvar.hxx @@ -31,7 +31,7 @@ #include "condedit.hxx" #include "numfmtlb.hxx" -class SwFldVarPage; +class SwFieldVarPage; class SelectionListBox : public ListBox { @@ -47,7 +47,7 @@ public: void ResetCallAddSelection() {bCallAddSelection = false;} }; -class SwFldVarPage : public SwFldPage +class SwFieldVarPage : public SwFieldPage { friend class SelectionListBox; @@ -90,9 +90,9 @@ protected: virtual sal_uInt16 GetGroup() SAL_OVERRIDE; public: - SwFldVarPage(vcl::Window* pParent, const SfxItemSet& rSet); + SwFieldVarPage(vcl::Window* pParent, const SfxItemSet& rSet); - virtual ~SwFldVarPage(); + virtual ~SwFieldVarPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index 6a7c663d6437..c225195c8029 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -31,13 +31,13 @@ #include <fldui.hrc> // edit field-insert -SwFldInputDlg::SwFldInputDlg( vcl::Window *pParent, SwWrtShell &rS, +SwFieldInputDlg::SwFieldInputDlg( vcl::Window *pParent, SwWrtShell &rS, SwField* pField, bool bNextButton ) : SvxStandardDialog( pParent, "InputFieldDialog", "modules/swriter/ui/inputfielddialog.ui") , rSh( rS ) - , pInpFld(0) - , pSetFld(0) + , pInpField(0) + , pSetField(0) , pUsrType(0) { get(m_pLabelED, "name"); @@ -53,7 +53,7 @@ SwFldInputDlg::SwFldInputDlg( vcl::Window *pParent, SwWrtShell &rS, if( bNextButton ) { m_pNextBT->Show(); - m_pNextBT->SetClickHdl(LINK(this, SwFldInputDlg, NextHdl)); + m_pNextBT->SetClickHdl(LINK(this, SwFieldInputDlg, NextHdl)); } // evaluation here @@ -61,20 +61,20 @@ SwFldInputDlg::SwFldInputDlg( vcl::Window *pParent, SwWrtShell &rS, if( RES_INPUTFLD == pField->GetTyp()->Which() ) { // it is an input field - pInpFld = static_cast<SwInputField*>(pField); - m_pLabelED->SetText( pInpFld->GetPar2() ); - sal_uInt16 nSubType = pInpFld->GetSubType(); + pInpField = static_cast<SwInputField*>(pField); + m_pLabelED->SetText( pInpField->GetPar2() ); + sal_uInt16 nSubType = pInpField->GetSubType(); switch(nSubType & 0xff) { case INP_TXT: - aStr = pInpFld->GetPar1(); + aStr = pInpField->GetPar1(); break; case INP_USR: // user field - if( 0 != ( pUsrType = static_cast<SwUserFieldType*>(rSh.GetFldType( - RES_USERFLD, pInpFld->GetPar1() ) ) ) ) + if( 0 != ( pUsrType = static_cast<SwUserFieldType*>(rSh.GetFieldType( + RES_USERFLD, pInpField->GetPar1() ) ) ) ) aStr = pUsrType->GetContent(); break; } @@ -82,17 +82,17 @@ SwFldInputDlg::SwFldInputDlg( vcl::Window *pParent, SwWrtShell &rS, else { // it is a SetExpression - pSetFld = static_cast<SwSetExpField*>(pField); - OUString sFormula(pSetFld->GetFormula()); + pSetField = static_cast<SwSetExpField*>(pField); + OUString sFormula(pSetField->GetFormula()); //values are formatted - formulas are not - CharClass aCC( LanguageTag( pSetFld->GetLanguage() )); + CharClass aCC( LanguageTag( pSetField->GetLanguage() )); if( aCC.isNumeric( sFormula )) { - aStr = pSetFld->ExpandField(true); + aStr = pSetField->ExpandField(true); } else aStr = sFormula; - m_pLabelED->SetText( pSetFld->GetPromptText() ); + m_pLabelED->SetText( pSetField->GetPromptText() ); } // JP 31.3.00: Inputfields in readonly regions must be allowed to @@ -106,12 +106,12 @@ SwFldInputDlg::SwFldInputDlg( vcl::Window *pParent, SwWrtShell &rS, m_pEditED->SetText(convertLineEnd(aStr, GetSystemLineEnd())); } -SwFldInputDlg::~SwFldInputDlg() +SwFieldInputDlg::~SwFieldInputDlg() { disposeOnce(); } -void SwFldInputDlg::dispose() +void SwFieldInputDlg::dispose() { m_pLabelED.clear(); m_pEditED.clear(); @@ -120,7 +120,7 @@ void SwFldInputDlg::dispose() SvxStandardDialog::dispose(); } -void SwFldInputDlg::StateChanged( StateChangedType nType ) +void SwFieldInputDlg::StateChanged( StateChangedType nType ) { if ( nType == StateChangedType::InitShow ) m_pEditED->GrabFocus(); @@ -128,33 +128,33 @@ void SwFldInputDlg::StateChanged( StateChangedType nType ) } // Close -void SwFldInputDlg::Apply() +void SwFieldInputDlg::Apply() { OUString aTmp(comphelper::string::remove(m_pEditED->GetText(), '\r')); rSh.StartAllAction(); bool bModified = false; - if(pInpFld) + if(pInpField) { if(pUsrType) { if( !aTmp.equals(pUsrType->GetContent()) ) { pUsrType->SetContent(aTmp); - pUsrType->UpdateFlds(); + pUsrType->UpdateFields(); bModified = true; } } - else if( !aTmp.equals(pInpFld->GetPar1()) ) + else if( !aTmp.equals(pInpField->GetPar1()) ) { - pInpFld->SetPar1(aTmp); - rSh.SwEditShell::UpdateFlds(*pInpFld); + pInpField->SetPar1(aTmp); + rSh.SwEditShell::UpdateFields(*pInpField); bModified = true; } } - else if( !aTmp.equals(pSetFld->GetPar2()) ) + else if( !aTmp.equals(pSetField->GetPar2()) ) { - pSetFld->SetPar2(aTmp); - rSh.SwEditShell::UpdateFlds(*pSetFld); + pSetField->SetPar2(aTmp); + rSh.SwEditShell::UpdateFields(*pSetField); bModified = true; } @@ -164,7 +164,7 @@ void SwFldInputDlg::Apply() rSh.EndAllAction(); } -IMPL_LINK_NOARG(SwFldInputDlg, NextHdl) +IMPL_LINK_NOARG(SwFieldInputDlg, NextHdl) { EndDialog(RET_OK); return 0; diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index 2b073110aa7d..ae304ee4194a 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -73,10 +73,10 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) : aFont.SetWeight( WEIGHT_LIGHT ); m_pEditED->SetFont( aFont ); - pMgr = new SwFldMgr(pSh); - pFld = static_cast<SwScriptField*>(pMgr->GetCurFld()); + pMgr = new SwFieldMgr(pSh); + pField = static_cast<SwScriptField*>(pMgr->GetCurField()); - bNew = !(pFld && pFld->GetTyp()->Which() == RES_SCRIPTFLD); + bNew = !(pField && pField->GetTyp()->Which() == RES_SCRIPTFLD); CheckTravel(); @@ -114,9 +114,9 @@ IMPL_LINK_NOARG(SwJavaEditDialog, PrevHdl) { pSh->EnterStdMode(); - SetFld(); + SetField(); pMgr->GoPrev(); - pFld = static_cast<SwScriptField*>(pMgr->GetCurFld()); + pField = static_cast<SwScriptField*>(pMgr->GetCurField()); CheckTravel(); RadioButtonHdl(NULL); @@ -127,9 +127,9 @@ IMPL_LINK_NOARG(SwJavaEditDialog, NextHdl) { pSh->EnterStdMode(); - SetFld(); + SetField(); pMgr->GoNext(); - pFld = static_cast<SwScriptField*>(pMgr->GetCurFld()); + pField = static_cast<SwScriptField*>(pMgr->GetCurField()); CheckTravel(); RadioButtonHdl(NULL); @@ -138,7 +138,7 @@ IMPL_LINK_NOARG(SwJavaEditDialog, NextHdl) IMPL_LINK_NOARG(SwJavaEditDialog, OKHdl) { - SetFld(); + SetField(); EndDialog( RET_OK ); return 0; } @@ -169,9 +169,9 @@ void SwJavaEditDialog::CheckTravel() pSh->DestroyCrsr(); pSh->EndAction(); - if (pFld->IsCodeURL()) + if (pField->IsCodeURL()) { - OUString sURL(pFld->GetPar2()); + OUString sURL(pField->GetPar2()); if(!sURL.isEmpty()) { INetURLObject aINetURL(sURL); @@ -184,11 +184,11 @@ void SwJavaEditDialog::CheckTravel() } else { - m_pEditED->SetText(pFld->GetPar2()); + m_pEditED->SetText(pField->GetPar2()); m_pUrlED->SetText(OUString()); m_pEditRB->Check(); } - m_pTypeED->SetText(pFld->GetPar1()); + m_pTypeED->SetText(pField->GetPar1()); } if ( !bTravel ) @@ -203,7 +203,7 @@ void SwJavaEditDialog::CheckTravel() } } -void SwJavaEditDialog::SetFld() +void SwJavaEditDialog::SetField() { if( !m_pOKBtn->IsEnabled() ) return ; @@ -234,7 +234,7 @@ void SwJavaEditDialog::SetFld() bool SwJavaEditDialog::IsUpdate() const { - return pFld && ( sal_uInt32(bIsUrl ? 1 : 0) != pFld->GetFormat() || pFld->GetPar2() != aType || pFld->GetPar1() != aText ); + return pField && ( sal_uInt32(bIsUrl ? 1 : 0) != pField->GetFormat() || pField->GetPar2() != aType || pField->GetPar1() != aText ); } IMPL_LINK_NOARG(SwJavaEditDialog, RadioButtonHdl) diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index d8276160da0c..0f3381760725 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -373,9 +373,9 @@ void SwTemplateDlg::RefreshInputSet() void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { // set style's and metric's names - 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); SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); if (nId == m_nFontId) @@ -431,7 +431,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) else if (nId == m_nOutlineId) { // handle if the current paragraph style is assigned to a list level of outline style, - SwTxtFmtColl* pTmpColl = pWrtShell->FindTxtFmtCollByName( GetStyleSheet().GetName() ); + SwTextFormatColl* pTmpColl = pWrtShell->FindTextFormatCollByName( GetStyleSheet().GetName() ); if( pTmpColl && pTmpColl->IsAssignedToListLevelOfOutlineStyle() ) { static_cast<SwParagraphNumTabPage&>(rPage).DisableOutline() ; @@ -530,25 +530,25 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if (nId == m_nNumId) { - 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 (nId == m_nNumOptId) { - 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 character 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 = ::GetActiveWrtShell()->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 ) ) ; FieldUnit eMetric = ::GetDfltMetric(pDocShell->ISA(SwWebDocShell)); @@ -565,7 +565,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if (nId == m_nBulletId) { - aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFmt)); + aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFormat)); rPage.PageCreated(aSet); } else if (nId == m_nHeaderId) diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 1d0c7beaeeaa..43766da0bcb6 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -115,11 +115,11 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh) const sal_uInt16 nFullSectCnt = rWrtShell.GetFullSelectedSectionCount(); if( pCurrSection && ( !rWrtShell.HasSelection() || 0 != nFullSectCnt )) { - nSelectionWidth = rSh.GetSectionWidth(*pCurrSection->GetFmt()); + nSelectionWidth = rSh.GetSectionWidth(*pCurrSection->GetFormat()); if ( !nSelectionWidth ) nSelectionWidth = USHRT_MAX; pSectionSet = new SfxItemSet( rWrtShell.GetAttrPool(), aSectIds ); - pSectionSet->Put( pCurrSection->GetFmt()->GetAttrSet() ); + pSectionSet->Put( pCurrSection->GetFormat()->GetAttrSet() ); pColPgSet = pSectionSet; } @@ -131,12 +131,12 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh) pColPgSet = pSelectionSet; } - if( rWrtShell.GetFlyFrmFmt() ) + if( rWrtShell.GetFlyFrameFormat() ) { - const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt() ; + const SwFrameFormat* pFormat = rSh.GetFlyFrameFormat() ; pFrameSet = new SfxItemSet(rWrtShell.GetAttrPool(), aSectIds ); - pFrameSet->Put(pFmt->GetFrmSize()); - pFrameSet->Put(pFmt->GetCol()); + pFrameSet->Put(pFormat->GetFrmSize()); + pFrameSet->Put(pFormat->GetCol()); pColPgSet = pFrameSet; } @@ -149,15 +149,15 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh) RES_LR_SPACE, RES_LR_SPACE, 0 ); - const SwFrmFmt &rFmt = pPageDesc->GetMaster(); - nPageWidth = rFmt.GetFrmSize().GetSize().Width(); + const SwFrameFormat &rFormat = pPageDesc->GetMaster(); + nPageWidth = rFormat.GetFrmSize().GetSize().Width(); - const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rFmt.GetLRSpace(); - const SvxBoxItem& rBox = (const SvxBoxItem&) rFmt.GetBox(); + const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rFormat.GetLRSpace(); + const SvxBoxItem& rBox = (const SvxBoxItem&) rFormat.GetBox(); nPageWidth -= rLRSpace.GetLeft() + rLRSpace.GetRight() + rBox.GetDistance(); - pPageSet->Put(rFmt.GetCol()); - pPageSet->Put(rFmt.GetLRSpace()); + pPageSet->Put(rFormat.GetCol()); + pPageSet->Put(rFormat.GetLRSpace()); pColPgSet = pPageSet; } @@ -187,7 +187,7 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh) IsMarkInSameSection( rWrtShell, pCurrSection ) )))) m_pApplyToLB->RemoveEntry(m_pApplyToLB->GetEntryPos( reinterpret_cast<void*>((sal_IntPtr)LISTBOX_SELECTION) )); - if (!rWrtShell.GetFlyFrmFmt()) + if (!rWrtShell.GetFlyFrameFormat()) m_pApplyToLB->RemoveEntry(m_pApplyToLB->GetEntryPos( reinterpret_cast<void*>(LISTBOX_FRAME) )); const sal_Int32 nPagePos = m_pApplyToLB->GetEntryPos( reinterpret_cast<void*>(LISTBOX_PAGE) ); @@ -266,17 +266,17 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox) case LISTBOX_SELECTION : pSet = pSelectionSet; if( pSelectionSet ) - pSet->Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth, nWidth)); + pSet->Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth, nWidth)); break; case LISTBOX_SECTION : case LISTBOX_SECTIONS : pSet = pSectionSet; - pSet->Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth, nWidth)); + pSet->Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth, nWidth)); break; case LISTBOX_PAGE : nWidth = nPageWidth; pSet = pPageSet; - pSet->Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth, nWidth)); + pSet->Put(SwFormatFrmSize(ATT_VAR_SIZE, nWidth, nWidth)); break; case LISTBOX_FRAME: pSet = pFrameSet; @@ -324,7 +324,7 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl) if(pSelectionSet && SfxItemState::SET == pSelectionSet->GetItemState(RES_COL)) { //insert region with columns - const SwFmtCol& rColItem = static_cast<const SwFmtCol&>(pSelectionSet->Get(RES_COL)); + const SwFormatCol& rColItem = static_cast<const SwFormatCol&>(pSelectionSet->Get(RES_COL)); //only if there actually are columns! if(rColItem.GetNumCols() > 1) rWrtShell.GetView().GetViewFrame()->GetDispatcher()->Execute( @@ -334,8 +334,8 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl) if(pSectionSet && pSectionSet->Count() && bSectionChanged ) { const SwSection* pCurrSection = rWrtShell.GetCurrSection(); - const SwSectionFmt* pFmt = pCurrSection->GetFmt(); - const size_t nNewPos = rWrtShell.GetSectionFmtPos( *pFmt ); + const SwSectionFormat* pFormat = pCurrSection->GetFormat(); + const size_t nNewPos = rWrtShell.GetSectionFormatPos( *pFormat ); SwSectionData aData(*pCurrSection); rWrtShell.UpdateSection( nNewPos, aData, pSectionSet ); } @@ -350,8 +350,8 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl) // deterine current PageDescriptor and fill the Set with it const size_t nCurIdx = rWrtShell.GetCurPageDesc(); SwPageDesc aPageDesc(rWrtShell.GetPageDesc(nCurIdx)); - SwFrmFmt &rFmt = aPageDesc.GetMaster(); - rFmt.SetFmtAttr(pPageSet->Get(RES_COL)); + SwFrameFormat &rFormat = aPageDesc.GetMaster(); + rFormat.SetFormatAttr(pPageSet->Get(RES_COL)); rWrtShell.ChgPageDesc(nCurIdx, aPageDesc); } if(pFrameSet && SfxItemState::SET == pFrameSet->GetItemState(RES_COL) && bFrameChanged) @@ -597,10 +597,10 @@ void SwColumnPage::SetPageWidth(long nPageWidth) void SwColumnPage::connectPercentField(PercentField &rWrap, const OString &rName) { - MetricField *pFld = get<MetricField>(rName); - assert(pFld); - rWrap.set(pFld); - m_aPercentFieldsMap[pFld] = &rWrap; + MetricField *pField = get<MetricField>(rName); + assert(pField); + rWrap.set(pField); + m_aPercentFieldsMap[pField] = &rWrap; } void SwColumnPage::Reset(const SfxItemSet *rSet) @@ -631,7 +631,7 @@ void SwColumnPage::Reset(const SfxItemSet *rSet) pColMgr->SetActualWidth(FRAME_FORMAT_WIDTH); else { - const SwFmtFrmSize& rSize = static_cast<const SwFmtFrmSize&>(rSet->Get(RES_FRM_SIZE)); + const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(rSet->Get(RES_FRM_SIZE)); const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(rSet->Get(RES_BOX)); pColMgr->SetActualWidth((sal_uInt16)rSize.GetSize().Width() - rBox.GetDistance()); } @@ -640,7 +640,7 @@ void SwColumnPage::Reset(const SfxItemSet *rSet) { const SfxPoolItem* pItem; if( SfxItemState::SET == rSet->GetItemState( RES_COLUMNBALANCE, false, &pItem )) - m_pBalanceColsCB->Check(!static_cast<const SwFmtNoBalancedColumns*>(pItem)->GetValue()); + m_pBalanceColsCB->Check(!static_cast<const SwFormatNoBalancedColumns*>(pItem)->GetValue()); else m_pBalanceColsCB->Check( true ); } @@ -674,14 +674,14 @@ bool SwColumnPage::FillItemSet(SfxItemSet *rSet) // the current settings are already present const SfxPoolItem* pOldItem; - const SwFmtCol& rCol = pColMgr->GetColumns(); + const SwFormatCol& rCol = pColMgr->GetColumns(); if(0 == (pOldItem = GetOldItem( *rSet, RES_COL )) || rCol != *pOldItem ) rSet->Put(rCol); if(m_pBalanceColsCB->IsVisible() ) { - rSet->Put(SwFmtNoBalancedColumns(!m_pBalanceColsCB->IsChecked() )); + rSet->Put(SwFormatNoBalancedColumns(!m_pBalanceColsCB->IsChecked() )); } if( m_pTextDirectionLB->IsVisible()) { @@ -998,13 +998,13 @@ IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF ) * width the automatic calculation of the column width is overruled; only an * alteration of the column number leads back to that default. */ -IMPL_LINK( SwColumnPage, GapModify, MetricField*, pMetricFld ) +IMPL_LINK( SwColumnPage, GapModify, MetricField*, pMetricField ) { if (nCols < 2) return 0; - PercentField *pFld = m_aPercentFieldsMap[pMetricFld]; - assert(pFld); - long nActValue = static_cast< long >(pFld->DenormalizePercent(pFld->GetValue(FUNIT_TWIP))); + PercentField *pField = m_aPercentFieldsMap[pMetricField]; + assert(pField); + long nActValue = static_cast< long >(pField->DenormalizePercent(pField->GetValue(FUNIT_TWIP))); if(m_pAutoWidthBox->IsChecked()) { const long nMaxGap = static_cast< long > @@ -1023,7 +1023,7 @@ IMPL_LINK( SwColumnPage, GapModify, MetricField*, pMetricFld ) } else { - const sal_uInt16 nVis = nFirstVis + ((pFld == &aDistEd2) ? 1 : 0); + const sal_uInt16 nVis = nFirstVis + ((pField == &aDistEd2) ? 1 : 0); long nDiff = nActValue - nColDist[nVis]; if(nDiff) { @@ -1061,13 +1061,13 @@ IMPL_LINK( SwColumnPage, GapModify, MetricField*, pMetricFld ) } } - Update(pMetricFld); + Update(pMetricField); return 0; } -IMPL_LINK( SwColumnPage, EdModify, MetricField *, pMetricFld ) +IMPL_LINK( SwColumnPage, EdModify, MetricField *, pMetricField ) { - PercentField *pField = m_aPercentFieldsMap[pMetricFld]; + PercentField *pField = m_aPercentFieldsMap[pMetricField]; assert(pField); pModifiedField = pField; Timeout(); @@ -1250,7 +1250,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) m_pFrmExampleWN->Show(); // Size - const SwFmtFrmSize& rSize = static_cast<const SwFmtFrmSize&>(rSet.Get(RES_FRM_SIZE)); + const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(rSet.Get(RES_FRM_SIZE)); const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>( rSet.Get(RES_BOX)); long nDistance = rBox.GetDistance(); diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 374265889c87..bdf1e56ed867 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -61,11 +61,11 @@ class SwSequenceOptionDialog : public SvxStandardDialog VclPtr<ListBox> m_pLbCaptionOrder; SwView& rView; - OUString aFldTypeName; + OUString aFieldTypeName; public: SwSequenceOptionDialog( vcl::Window *pParent, SwView &rV, - const OUString& rSeqFldType ); + const OUString& rSeqFieldType ); virtual ~SwSequenceOptionDialog(); virtual void dispose() SAL_OVERRIDE; virtual void Apply() SAL_OVERRIDE; @@ -97,7 +97,7 @@ SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) : m_sNone( SW_RESSTR(SW_STR_NONE) ), m_aTextFilter(m_sNone), rView( rV ), - pMgr( new SwFldMgr(rView.GetWrtShellPtr()) ), + pMgr( new SwFieldMgr(rView.GetWrtShellPtr()) ), bCopyAttributes( false ), bOrderNumberingFirst( SW_MOD()->GetModuleConfig()->IsCaptionOrderNumberingFirst() ) { @@ -143,10 +143,10 @@ SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) : m_pAutoCaptionButton->SetClickHdl(LINK(this, SwCaptionDialog, CaptionHdl)); m_pCategoryBox->InsertEntry( m_sNone ); - sal_uInt16 nCount = pMgr->GetFldTypeCount(); + sal_uInt16 nCount = pMgr->GetFieldTypeCount(); for (sal_uInt16 i = 0; i < nCount; i++) { - SwFieldType *pType = pMgr->GetFldType( USHRT_MAX, i ); + SwFieldType *pType = pMgr->GetFieldType( USHRT_MAX, i ); if( pType->Which() == RES_SETEXPFLD && static_cast<SwSetExpFieldType *>( pType)->GetType() & nsSwGetSetExpType::GSE_SEQ ) m_pCategoryBox->InsertEntry(pType->GetName()); @@ -174,7 +174,7 @@ SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) : sString = ::GetOldTabCat(); uno::Reference< text::XTextTablesSupplier > xTables(xModel, uno::UNO_QUERY); xNameAccess = xTables->getTextTables(); - sObjectName = rSh.GetTableFmt()->GetName(); + sObjectName = rSh.GetTableFormat()->GetName(); } else if( eType & nsSelectionType::SEL_FRM ) { @@ -204,14 +204,14 @@ SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) : } // aFormatBox - sal_uInt16 nSelFmt = SVX_NUM_ARABIC; - nCount = pMgr->GetFldTypeCount(); + sal_uInt16 nSelFormat = SVX_NUM_ARABIC; + nCount = pMgr->GetFieldTypeCount(); for ( sal_uInt16 i = nCount; i; ) { - SwFieldType* pFldType = pMgr->GetFldType(USHRT_MAX, --i); - if( pFldType->GetName().equals(m_pCategoryBox->GetText()) ) + SwFieldType* pFieldType = pMgr->GetFieldType(USHRT_MAX, --i); + if( pFieldType->GetName().equals(m_pCategoryBox->GetText()) ) { - nSelFmt = (sal_uInt16)static_cast<SwSetExpFieldType*>(pFldType)->GetSeqFormat(); + nSelFormat = (sal_uInt16)static_cast<SwSetExpFieldType*>(pFieldType)->GetSeqFormat(); break; } } @@ -220,9 +220,9 @@ SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) : for ( sal_uInt16 i = 0; i < nCount; ++i ) { m_pFormatBox->InsertEntry( pMgr->GetFormatStr(TYP_SEQFLD, i) ); - const sal_uInt16 nFmtId = pMgr->GetFormatId(TYP_SEQFLD, i); - m_pFormatBox->SetEntryData( i, reinterpret_cast<void*>( nFmtId ) ); - if( nFmtId == nSelFmt ) + const sal_uInt16 nFormatId = pMgr->GetFormatId(TYP_SEQFLD, i); + m_pFormatBox->SetEntryData( i, reinterpret_cast<void*>( nFormatId ) ); + if( nFormatId == nSelFormat ) m_pFormatBox->SelectEntryPos( i ); } @@ -282,10 +282,10 @@ void SwCaptionDialog::Apply() IMPL_LINK( SwCaptionDialog, OptionHdl, Button*, pButton ) { - OUString sFldTypeName = m_pCategoryBox->GetText(); - if(sFldTypeName == m_sNone) - sFldTypeName.clear(); - ScopedVclPtrInstance< SwSequenceOptionDialog > aDlg( pButton, rView, sFldTypeName ); + OUString sFieldTypeName = m_pCategoryBox->GetText(); + if(sFieldTypeName == m_sNone) + sFieldTypeName.clear(); + ScopedVclPtrInstance< SwSequenceOptionDialog > aDlg( pButton, rView, sFieldTypeName ); aDlg->SetApplyBorderAndShadow(bCopyAttributes); aDlg->SetCharacterStyle( sCharacterStyle ); aDlg->SetOrderNumberingFirst( bOrderNumberingFirst ); @@ -312,15 +312,15 @@ IMPL_LINK_NOARG(SwCaptionDialog, SelectHdl) IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl) { SwWrtShell &rSh = rView.GetWrtShell(); - OUString sFldTypeName = m_pCategoryBox->GetText(); - bool bCorrectFldName = !sFldTypeName.isEmpty(); - bool bNone = sFldTypeName == m_sNone; - SwFieldType* pType = (bCorrectFldName && !bNone) - ? rSh.GetFldType( RES_SETEXPFLD, sFldTypeName ) + OUString sFieldTypeName = m_pCategoryBox->GetText(); + bool bCorrectFieldName = !sFieldTypeName.isEmpty(); + bool bNone = sFieldTypeName == m_sNone; + SwFieldType* pType = (bCorrectFieldName && !bNone) + ? rSh.GetFieldType( RES_SETEXPFLD, sFieldTypeName ) : 0; fprintf(stderr, "pType is %p\n", pType); - fprintf(stderr, "bCorrectFldName is %d\n", bCorrectFldName); - m_pOKButton->Enable( bCorrectFldName && + fprintf(stderr, "bCorrectFieldName is %d\n", bCorrectFieldName); + m_pOKButton->Enable( bCorrectFieldName && (!pType || static_cast<SwSetExpFieldType*>(pType)->GetType() == nsSwGetSetExpType::GSE_SEQ) ); m_pOptionButton->Enable( m_pOKButton->IsEnabled() && !bNone ); @@ -349,28 +349,28 @@ void SwCaptionDialog::DrawSample() OUString sCaption = m_pTextEdit->GetText(); // number - OUString sFldTypeName = m_pCategoryBox->GetText(); - bool bNone = sFldTypeName == m_sNone; + OUString sFieldTypeName = m_pCategoryBox->GetText(); + bool bNone = sFieldTypeName == m_sNone; if( !bNone ) { - const sal_uInt16 nNumFmt = (sal_uInt16)reinterpret_cast<sal_uIntPtr>(m_pFormatBox->GetSelectEntryData()); - if( SVX_NUM_NUMBER_NONE != nNumFmt ) + const sal_uInt16 nNumFormat = (sal_uInt16)reinterpret_cast<sal_uIntPtr>(m_pFormatBox->GetSelectEntryData()); + if( SVX_NUM_NUMBER_NONE != nNumFormat ) { // category //#i61007# order of captions if( !bOrderNumberingFirst ) { - aStr = sFldTypeName; + aStr = sFieldTypeName; if ( !aStr.isEmpty() ) aStr += " "; } SwWrtShell &rSh = rView.GetWrtShell(); - SwSetExpFieldType* pFldType = static_cast<SwSetExpFieldType*>(rSh.GetFldType( - RES_SETEXPFLD, sFldTypeName )); - if( pFldType && pFldType->GetOutlineLvl() < MAXLEVEL ) + SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(rSh.GetFieldType( + RES_SETEXPFLD, sFieldTypeName )); + if( pFieldType && pFieldType->GetOutlineLvl() < MAXLEVEL ) { - sal_Int8 nLvl = pFldType->GetOutlineLvl(); + sal_Int8 nLvl = pFieldType->GetOutlineLvl(); SwNumberTree::tNumberVector aNumVector; for( sal_Int8 i = 0; i <= nLvl; ++i ) aNumVector.push_back(1); @@ -378,10 +378,10 @@ void SwCaptionDialog::DrawSample() OUString sNumber( rSh.GetOutlineNumRule()-> MakeNumString(aNumVector, false )); if( !sNumber.isEmpty() ) - aStr += sNumber + pFldType->GetDelimiter(); + aStr += sNumber + pFieldType->GetDelimiter(); } - switch( nNumFmt ) + switch( nNumFormat ) { case SVX_NUM_CHARS_UPPER_LETTER: aStr += "A"; break; case SVX_NUM_CHARS_UPPER_LETTER_N: aStr += "A"; break; @@ -394,7 +394,7 @@ void SwCaptionDialog::DrawSample() //#i61007# order of captions if( bOrderNumberingFirst ) { - aStr += m_pNumberingSeparatorED->GetText() + sFldTypeName; + aStr += m_pNumberingSeparatorED->GetText() + sFieldTypeName; } } @@ -434,10 +434,10 @@ void SwCaptionDialog::dispose() } SwSequenceOptionDialog::SwSequenceOptionDialog( vcl::Window *pParent, SwView &rV, - const OUString& rSeqFldType ) + const OUString& rSeqFieldType ) : SvxStandardDialog( pParent, "CaptionOptionsDialog", "modules/swriter/ui/captionoptions.ui" ), rView( rV ), - aFldTypeName( rSeqFldType ) + aFieldTypeName( rSeqFieldType ) { get(m_pLbLevel, "level"); get(m_pEdDelim, "separator"); @@ -453,15 +453,15 @@ SwSequenceOptionDialog::SwSequenceOptionDialog( vcl::Window *pParent, SwView &rV for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) m_pLbLevel->InsertEntry( OUString::number(n+1) ); - SwSetExpFieldType* pFldType = static_cast<SwSetExpFieldType*>(rSh.GetFldType( - RES_SETEXPFLD, aFldTypeName )); + SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(rSh.GetFieldType( + RES_SETEXPFLD, aFieldTypeName )); sal_Unicode nLvl = MAXLEVEL; OUString sDelim(": "); - if( pFldType ) + if( pFieldType ) { - sDelim = pFldType->GetDelimiter(); - nLvl = pFldType->GetOutlineLvl(); + sDelim = pFieldType->GetDelimiter(); + nLvl = pFieldType->GetOutlineLvl(); } m_pLbLevel->SelectEntryPos( nLvl < MAXLEVEL ? nLvl + 1 : 0 ); @@ -491,31 +491,31 @@ void SwSequenceOptionDialog::dispose() void SwSequenceOptionDialog::Apply() { SwWrtShell &rSh = rView.GetWrtShell(); - SwSetExpFieldType* pFldType = static_cast<SwSetExpFieldType*>(rSh.GetFldType( - RES_SETEXPFLD, aFldTypeName )); + SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(rSh.GetFieldType( + RES_SETEXPFLD, aFieldTypeName )); sal_Int8 nLvl = (sal_Int8)( m_pLbLevel->GetSelectEntryPos() - 1); sal_Unicode cDelim = m_pEdDelim->GetText()[0]; bool bUpdate = true; - if( pFldType ) + if( pFieldType ) { - pFldType->SetDelimiter( OUString(cDelim) ); - pFldType->SetOutlineLvl( nLvl ); + pFieldType->SetDelimiter( OUString(cDelim) ); + pFieldType->SetOutlineLvl( nLvl ); } - else if( !aFldTypeName.isEmpty() && nLvl < MAXLEVEL ) + else if( !aFieldTypeName.isEmpty() && nLvl < MAXLEVEL ) { // then we have to insert that - SwSetExpFieldType aFldType( rSh.GetDoc(), aFldTypeName, nsSwGetSetExpType::GSE_SEQ ); - aFldType.SetDelimiter( OUString(cDelim) ); - aFldType.SetOutlineLvl( nLvl ); - rSh.InsertFldType( aFldType ); + SwSetExpFieldType aFieldType( rSh.GetDoc(), aFieldTypeName, nsSwGetSetExpType::GSE_SEQ ); + aFieldType.SetDelimiter( OUString(cDelim) ); + aFieldType.SetOutlineLvl( nLvl ); + rSh.InsertFieldType( aFieldType ); } else bUpdate = false; if( bUpdate ) - rSh.UpdateExpFlds(); + rSh.UpdateExpFields(); } OUString SwSequenceOptionDialog::GetCharacterStyle() const diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index df93bfbe0bde..84b88ae6638a 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -168,7 +168,7 @@ void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) static_cast<SwColumnPage&>(rPage).SetFrmMode(true); static_cast<SwColumnPage&>(rPage).SetFormatUsed(m_bFormat); - const SwFmtFrmSize& rSize = static_cast<const SwFmtFrmSize&>( + const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>( m_rSet.Get( RES_FRM_SIZE )); static_cast<SwColumnPage&>(rPage).SetPageWidth( rSize.GetWidth() ); } diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 1186b66518a3..f756ad9c32ed 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -614,7 +614,7 @@ SwFrmPage::SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet) nUpperBorder(0), nLowerBorder(0), fWidthHeightRatio(1.0), - mpToCharCntntPos( NULL ), + mpToCharContentPos( NULL ), nOldH(text::HoriOrientation::CENTER), nOldHRel(text::RelOrientation::FRAME), @@ -901,7 +901,7 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) SetMetric( *m_pAtVertPosED, aMetric ); const SfxPoolItem* pItem = NULL; - const SwFmtAnchor& rAnchor = static_cast<const SwFmtAnchor&>(rSet->Get(RES_ANCHOR)); + const SwFormatAnchor& rAnchor = static_cast<const SwFormatAnchor&>(rSet->Get(RES_ANCHOR)); if (SfxItemState::SET == rSet->GetItemState(FN_OLE_IS_MATH, false, &pItem)) m_bIsMathOLE = static_cast<const SfxBoolItem*>(pItem)->GetValue(); @@ -956,7 +956,7 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) } else { - aGrfSize = static_cast<const SwFmtFrmSize&>(rSet->Get(RES_FRM_SIZE)).GetSize(); + aGrfSize = static_cast<const SwFormatFrmSize&>(rSet->Get(RES_FRM_SIZE)).GetSize(); } // entering procent value made possible @@ -965,7 +965,7 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) //the available space is not yet known so the RefValue has to be calculated from size and relative size values //this is needed only if relative values are already set - const SwFmtFrmSize& rFrmSize = static_cast<const SwFmtFrmSize&>(rSet->Get(RES_FRM_SIZE)); + const SwFormatFrmSize& rFrmSize = static_cast<const SwFormatFrmSize&>(rSet->Get(RES_FRM_SIZE)); m_pRelWidthRelationLB->InsertEntry(aFramePosString.GetString(SwFPos::FRAME)); m_pRelWidthRelationLB->InsertEntry(aFramePosString.GetString(SwFPos::REL_PG_FRAME)); @@ -1006,12 +1006,12 @@ void SwFrmPage::Reset( const SfxItemSet *rSet ) // i#22341 - determine content position of character // Note: content position can be NULL - mpToCharCntntPos = rAnchor.GetCntntAnchor(); + mpToCharContentPos = rAnchor.GetContentAnchor(); // i#18732 - init checkbox value { const bool bFollowTextFlow = - static_cast<const SwFmtFollowTextFlow&>(rSet->Get(RES_FOLLOW_TEXT_FLOW)).GetValue(); + static_cast<const SwFormatFollowTextFlow&>(rSet->Get(RES_FOLLOW_TEXT_FLOW)).GetValue(); m_pFollowTextFlowCB->Check( bFollowTextFlow ); } @@ -1074,16 +1074,16 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet) if ( !bFormat ) { pOldItem = GetOldItem(*rSet, RES_ANCHOR); - if (bNew || !pOldItem || eAnchorId != static_cast<const SwFmtAnchor*>(pOldItem)->GetAnchorId()) + if (bNew || !pOldItem || eAnchorId != static_cast<const SwFormatAnchor*>(pOldItem)->GetAnchorId()) { - SwFmtAnchor aAnc( eAnchorId, pSh->GetPhyPageNum() ); + SwFormatAnchor aAnc( eAnchorId, pSh->GetPhyPageNum() ); bRet = 0 != rSet->Put( aAnc ); } } if ( pHMap ) { - SwFmtHoriOrient aHoriOrient( static_cast<const SwFmtHoriOrient&>( + SwFormatHoriOrient aHoriOrient( static_cast<const SwFormatHoriOrient&>( rOldSet.Get(RES_HORI_ORIENT)) ); const sal_Int32 nMapPos = GetMapPos(pHMap, *m_pHorizontalDLB); @@ -1108,7 +1108,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet) bool bSame = false; if ((bNew == bFormat) && pOldItem) { - bSame = aHoriOrient == static_cast<const SwFmtHoriOrient&>(*pOldItem); + bSame = aHoriOrient == static_cast<const SwFormatHoriOrient&>(*pOldItem); } if ((bNew && !bFormat) || ((bAtHorzPosModified || bMod) && !bSame)) { @@ -1119,7 +1119,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet) if ( pVMap ) { // alignment vertical - SwFmtVertOrient aVertOrient( static_cast<const SwFmtVertOrient&>( + SwFormatVertOrient aVertOrient( static_cast<const SwFormatVertOrient&>( rOldSet.Get(RES_VERT_ORIENT)) ); const sal_Int32 nMapPos = GetMapPos(pVMap, *m_pVerticalDLB); @@ -1148,10 +1148,10 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet) if((bNew == bFormat) && pOldItem) { bSame = bFormat ? - aVertOrient.GetVertOrient() == static_cast<const SwFmtVertOrient*>(pOldItem)->GetVertOrient() && - aVertOrient.GetRelationOrient() == static_cast<const SwFmtVertOrient*>(pOldItem)->GetRelationOrient() && - aVertOrient.GetPos() == static_cast<const SwFmtVertOrient*>(pOldItem)->GetPos() - : aVertOrient == static_cast<const SwFmtVertOrient&>(*pOldItem); + aVertOrient.GetVertOrient() == static_cast<const SwFormatVertOrient*>(pOldItem)->GetVertOrient() && + aVertOrient.GetRelationOrient() == static_cast<const SwFormatVertOrient*>(pOldItem)->GetRelationOrient() && + aVertOrient.GetPos() == static_cast<const SwFormatVertOrient*>(pOldItem)->GetPos() + : aVertOrient == static_cast<const SwFormatVertOrient&>(*pOldItem); } if( ( bNew && !bFormat ) || ((bAtVertPosModified || bMod) && !bSame )) { @@ -1164,8 +1164,8 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet) // for a graphic that isn't even loaded, are set. Then no SetSize // is done here when the size settings were not changed by the // user. - const SwFmtFrmSize& rOldSize = static_cast<const SwFmtFrmSize& >(rOldSet.Get(RES_FRM_SIZE)); - SwFmtFrmSize aSz( rOldSize ); + const SwFormatFrmSize& rOldSize = static_cast<const SwFormatFrmSize& >(rOldSet.Get(RES_FRM_SIZE)); + SwFormatFrmSize aSz( rOldSize ); sal_Int32 nRelWidthRelation = m_pRelWidthRelationLB->GetSelectEntryPos(); if (nRelWidthRelation != LISTBOX_ENTRY_NOTFOUND) @@ -1250,7 +1250,7 @@ bool SwFrmPage::FillItemSet(SfxItemSet *rSet) } if(m_pFollowTextFlowCB->IsValueChangedFromSaved()) { - bRet |= 0 != rSet->Put(SwFmtFollowTextFlow(m_pFollowTextFlowCB->IsChecked())); + bRet |= 0 != rSet->Put(SwFormatFollowTextFlow(m_pFollowTextFlowCB->IsChecked())); } return bRet; } @@ -1753,7 +1753,7 @@ SfxTabPage::sfxpg SwFrmPage::DeactivatePage(SfxItemSet * _pSet) SwWrtShell* pSh = bFormat ? ::GetActiveWrtShell() : getFrmDlgParentShell(); RndStdIds eAnchorId = (RndStdIds)GetAnchor(); - SwFmtAnchor aAnc( eAnchorId, pSh->GetPhyPageNum() ); + SwFormatAnchor aAnc( eAnchorId, pSh->GetPhyPageNum() ); _pSet->Put( aAnc ); } @@ -1842,7 +1842,7 @@ IMPL_LINK_NOARG(SwFrmPage, RangeModifyHdl) aVal.nHPos = nAtHorzPosVal; aVal.nVPos = nAtVertPosVal; - aMgr.ValidateMetrics(aVal, mpToCharCntntPos, true); // one time, to get reference values for percental values + aMgr.ValidateMetrics(aVal, mpToCharContentPos, true); // one time, to get reference values for percental values // set reference values for percental values (100%) ... m_aWidthED.SetRefValue(aVal.aPercentSize.Width()); @@ -1854,13 +1854,13 @@ IMPL_LINK_NOARG(SwFrmPage, RangeModifyHdl) aVal.nWidth = nWidth; aVal.nHeight = nHeight; - aMgr.ValidateMetrics(aVal, mpToCharCntntPos); // one more time, to determine all remaining values with correct width and height. + aMgr.ValidateMetrics(aVal, mpToCharContentPos); // one more time, to determine all remaining values with correct width and height. // all columns have to be correct if(GetTabDialog()->GetExampleSet() && SfxItemState::DEFAULT <= GetTabDialog()->GetExampleSet()->GetItemState(RES_COL)) { - const SwFmtCol& rCol = static_cast<const SwFmtCol&>(GetTabDialog()->GetExampleSet()->Get(RES_COL)); + const SwFormatCol& rCol = static_cast<const SwFormatCol&>(GetTabDialog()->GetExampleSet()->Get(RES_COL)); if ( rCol.GetColumns().size() > 1 ) { for ( size_t i = 0; i < rCol.GetColumns().size(); ++i ) @@ -2207,7 +2207,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) } } - const SwFmtFrmSize& rSize = static_cast<const SwFmtFrmSize&>(rSet.Get(RES_FRM_SIZE)); + const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(rSet.Get(RES_FRM_SIZE)); sal_Int64 nWidth = m_aWidthED.NormalizePercent(rSize.GetWidth()); sal_Int64 nHeight = m_aHeightED.NormalizePercent(rSize.GetHeight()); @@ -2254,8 +2254,8 @@ void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) if ( !bFormat ) { SwWrtShell* pSh = getFrmDlgParentShell(); - const SwFrmFmt* pFmt = pSh->GetFlyFrmFmt(); - if( pFmt && pFmt->GetChain().GetNext() ) + const SwFrameFormat* pFormat = pSh->GetFlyFrameFormat(); + if( pFormat && pFormat->GetChain().GetNext() ) m_pAutoHeightCB->Enable( false ); } } @@ -2274,7 +2274,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) } // columns - SwFmtCol aCol( static_cast<const SwFmtCol&>(rSet.Get(RES_COL)) ); + SwFormatCol aCol( static_cast<const SwFormatCol&>(rSet.Get(RES_COL)) ); ::FitToActualSize( aCol, (sal_uInt16)rSize.GetWidth() ); RndStdIds eAnchorId = (RndStdIds)GetAnchor(); @@ -2283,8 +2283,8 @@ void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) InitPos(eAnchorId, -1, 0, -1, 0, LONG_MAX, LONG_MAX); else { - const SwFmtHoriOrient& rHori = static_cast<const SwFmtHoriOrient&>(rSet.Get(RES_HORI_ORIENT)); - const SwFmtVertOrient& rVert = static_cast<const SwFmtVertOrient&>(rSet.Get(RES_VERT_ORIENT)); + const SwFormatHoriOrient& rHori = static_cast<const SwFormatHoriOrient&>(rSet.Get(RES_HORI_ORIENT)); + const SwFormatVertOrient& rVert = static_cast<const SwFormatVertOrient&>(rSet.Get(RES_VERT_ORIENT)); nOldH = rHori.GetHoriOrient(); nOldHRel = rHori.GetRelationOrient(); nOldV = rVert.GetVertOrient(), @@ -2316,7 +2316,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, bool bReset) // transparent for example // circulation for example - const SwFmtSurround& rSurround = static_cast<const SwFmtSurround&>(rSet.Get(RES_SURROUND)); + const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(rSet.Get(RES_SURROUND)); m_pExampleWN->SetWrap ( static_cast< sal_uInt16 >(rSurround.GetSurround()) ); if ( rSurround.GetSurround() == SURROUND_THROUGHT ) @@ -2445,14 +2445,14 @@ void SwGrfExtPage::Reset(const SfxItemSet *rSet) void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) { const SvxProtectItem& rProt = static_cast<const SvxProtectItem& >(rSet.Get(RES_PROTECT)); - bool bProtCntnt = rProt.IsCntntProtected(); + bool bProtContent = rProt.IsContentProtected(); const SfxPoolItem* pItem = 0; bool bEnable = false; bool bEnableMirrorRB = false; SfxItemState eState = rSet.GetItemState(RES_GRFATR_MIRRORGRF, true, &pItem); - if( SfxItemState::UNKNOWN != eState && !bProtCntnt && !bHtmlMode ) + if( SfxItemState::UNKNOWN != eState && !bProtContent && !bHtmlMode ) { if( SfxItemState::SET != eState ) pItem = &rSet.Get( RES_GRFATR_MIRRORGRF ); @@ -2790,17 +2790,17 @@ void SwFrmURLPage::Reset( const SfxItemSet *rSet ) if ( SfxItemState::SET == rSet->GetItemState( RES_URL, true, &pItem ) ) { - const SwFmtURL* pFmtURL = static_cast<const SwFmtURL*>(pItem); - pURLED->SetText( INetURLObject::decode( pFmtURL->GetURL(), + const SwFormatURL* pFormatURL = static_cast<const SwFormatURL*>(pItem); + pURLED->SetText( INetURLObject::decode( pFormatURL->GetURL(), INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 )); - pNameED->SetText( pFmtURL->GetName()); + pNameED->SetText( pFormatURL->GetName()); - pClientCB->Enable( pFmtURL->GetMap() != 0 ); - pClientCB->Check ( pFmtURL->GetMap() != 0 ); - pServerCB->Check ( pFmtURL->IsServerMap() ); + pClientCB->Enable( pFormatURL->GetMap() != 0 ); + pClientCB->Check ( pFormatURL->GetMap() != 0 ); + pServerCB->Check ( pFormatURL->IsServerMap() ); - pFrameCB->SetText(pFmtURL->GetTargetFrameName()); + pFrameCB->SetText(pFormatURL->GetTargetFrameName()); pFrameCB->SaveValue(); } else @@ -2813,38 +2813,38 @@ void SwFrmURLPage::Reset( const SfxItemSet *rSet ) bool SwFrmURLPage::FillItemSet(SfxItemSet *rSet) { bool bModified = false; - const SwFmtURL* pOldURL = static_cast<const SwFmtURL*>(GetOldItem(*rSet, RES_URL)); - boost::scoped_ptr<SwFmtURL> pFmtURL; + const SwFormatURL* pOldURL = static_cast<const SwFormatURL*>(GetOldItem(*rSet, RES_URL)); + boost::scoped_ptr<SwFormatURL> pFormatURL; if(pOldURL) - pFmtURL.reset(static_cast<SwFmtURL*>(pOldURL->Clone())); + pFormatURL.reset(static_cast<SwFormatURL*>(pOldURL->Clone())); else - pFmtURL.reset(new SwFmtURL()); + pFormatURL.reset(new SwFormatURL()); { const OUString sText = pURLED->GetText(); - if( pFmtURL->GetURL() != sText || - pFmtURL->GetName() != pNameED->GetText() || - pServerCB->IsChecked() != pFmtURL->IsServerMap() ) + if( pFormatURL->GetURL() != sText || + pFormatURL->GetName() != pNameED->GetText() || + pServerCB->IsChecked() != pFormatURL->IsServerMap() ) { - pFmtURL->SetURL( sText, pServerCB->IsChecked() ); - pFmtURL->SetName( pNameED->GetText() ); + pFormatURL->SetURL( sText, pServerCB->IsChecked() ); + pFormatURL->SetName( pNameED->GetText() ); bModified = true; } } - if(!pClientCB->IsChecked() && pFmtURL->GetMap() != 0) + if(!pClientCB->IsChecked() && pFormatURL->GetMap() != 0) { - pFmtURL->SetMap(0); + pFormatURL->SetMap(0); bModified = true; } - if(pFmtURL->GetTargetFrameName() != pFrameCB->GetText()) + if(pFormatURL->GetTargetFrameName() != pFrameCB->GetText()) { - pFmtURL->SetTargetFrameName(pFrameCB->GetText()); + pFormatURL->SetTargetFrameName(pFrameCB->GetText()); bModified = true; } - rSet->Put(*pFmtURL); + rSet->Put(*pFormatURL); return bModified; } @@ -3017,28 +3017,28 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) if (!bNew) { - SwFrmFmt* pFmt = pWrtSh->GetFlyFrmFmt(); + SwFrameFormat* pFormat = pWrtSh->GetFlyFrameFormat(); - if (pFmt) + if (pFormat) { - const SwFmtChain &rChain = pFmt->GetChain(); - const SwFlyFrmFmt* pFlyFmt; + const SwFormatChain &rChain = pFormat->GetChain(); + const SwFlyFrameFormat* pFlyFormat; OUString sNextChain, sPrevChain; - if ((pFlyFmt = rChain.GetPrev()) != 0) + if ((pFlyFormat = rChain.GetPrev()) != 0) { - sPrevChain = pFlyFmt->GetName(); + sPrevChain = pFlyFormat->GetName(); } - if ((pFlyFmt = rChain.GetNext()) != 0) + if ((pFlyFormat = rChain.GetNext()) != 0) { - sNextChain = pFlyFmt->GetName(); + sNextChain = pFlyFormat->GetName(); } //determine chainable frames ::std::vector< OUString > aPrevPageFrames; ::std::vector< OUString > aThisPageFrames; ::std::vector< OUString > aNextPageFrames; ::std::vector< OUString > aRemainFrames; - pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, false, + pWrtSh->GetConnectableFrameFormats(*pFormat, sNextChain, false, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames ); lcl_InsertVectors(*pPrevLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames); if(!sPrevChain.isEmpty()) @@ -3054,7 +3054,7 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) aThisPageFrames.erase(aThisPageFrames.begin(), aThisPageFrames.end()); aRemainFrames.erase(aRemainFrames.begin(), aRemainFrames.end()); - pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, true, + pWrtSh->GetConnectableFrameFormats(*pFormat, sPrevChain, true, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames ); lcl_InsertVectors(*pNextLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames); if(!sNextChain.isEmpty()) @@ -3073,10 +3073,10 @@ void SwFrmAddPage::Reset(const SfxItemSet *rSet ) // Pos Protected const SvxProtectItem& rProt = static_cast<const SvxProtectItem& >(rSet->Get(RES_PROTECT)); pProtectFrameCB->Check(rProt.IsPosProtected()); - pProtectContentCB->Check(rProt.IsCntntProtected()); + pProtectContentCB->Check(rProt.IsContentProtected()); pProtectSizeCB->Check(rProt.IsSizeProtected()); - const SwFmtEditInReadonly& rEdit = static_cast<const SwFmtEditInReadonly& >(rSet->Get(RES_EDIT_IN_READONLY)); + const SwFormatEditInReadonly& rEdit = static_cast<const SwFormatEditInReadonly& >(rSet->Get(RES_EDIT_IN_READONLY)); pEditInReadonlyCB->Check(rEdit.GetValue()); pEditInReadonlyCB->SaveValue(); // print @@ -3140,7 +3140,7 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet) const SfxPoolItem* pOldItem; SvxProtectItem aProt ( static_cast<const SvxProtectItem& >(GetItemSet().Get(RES_PROTECT)) ); - aProt.SetCntntProtect( pProtectContentCB->IsChecked() ); + aProt.SetContentProtect( pProtectContentCB->IsChecked() ); aProt.SetSizeProtect ( pProtectSizeCB->IsChecked() ); aProt.SetPosProtect ( pProtectFrameCB->IsChecked() ); if ( 0 == (pOldItem = GetOldItem(*rSet, FN_SET_PROTECT)) || @@ -3148,7 +3148,7 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet) bRet |= 0 != rSet->Put( aProt); if ( pEditInReadonlyCB->IsValueChangedFromSaved() ) - bRet |= 0 != rSet->Put( SwFmtEditInReadonly( RES_EDIT_IN_READONLY, pEditInReadonlyCB->IsChecked())); + bRet |= 0 != rSet->Put( SwFormatEditInReadonly( RES_EDIT_IN_READONLY, pEditInReadonlyCB->IsChecked())); if ( pPrintFrameCB->IsValueChangedFromSaved() ) bRet |= 0 != rSet->Put( SvxPrintItem( RES_PRINT, pPrintFrameCB->IsChecked())); @@ -3166,22 +3166,22 @@ bool SwFrmAddPage::FillItemSet(SfxItemSet *rSet) } if(pWrtSh) { - const SwFrmFmt* pFmt = pWrtSh->GetFlyFrmFmt(); - if (pFmt) + const SwFrameFormat* pFormat = pWrtSh->GetFlyFrameFormat(); + if (pFormat) { OUString sCurrentPrevChain, sCurrentNextChain; if(pPrevLB->GetSelectEntryPos()) sCurrentPrevChain = pPrevLB->GetSelectEntry(); if(pNextLB->GetSelectEntryPos()) sCurrentNextChain = pNextLB->GetSelectEntry(); - const SwFmtChain &rChain = pFmt->GetChain(); - const SwFlyFrmFmt* pFlyFmt; + const SwFormatChain &rChain = pFormat->GetChain(); + const SwFlyFrameFormat* pFlyFormat; OUString sNextChain, sPrevChain; - if ((pFlyFmt = rChain.GetPrev()) != 0) - sPrevChain = pFlyFmt->GetName(); + if ((pFlyFormat = rChain.GetPrev()) != 0) + sPrevChain = pFlyFormat->GetName(); - if ((pFlyFmt = rChain.GetNext()) != 0) - sNextChain = pFlyFmt->GetName(); + if ((pFlyFormat = rChain.GetNext()) != 0) + sNextChain = pFlyFormat->GetName(); if(sPrevChain != sCurrentPrevChain) bRet |= 0 != rSet->Put(SfxStringItem(FN_PARAM_CHAIN_PREVIOUS, sCurrentPrevChain)); if(sNextChain != sCurrentNextChain) @@ -3230,8 +3230,8 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox) sCurrentPrevChain = pPrevLB->GetSelectEntry(); if(pNextLB->GetSelectEntryPos()) sCurrentNextChain = pNextLB->GetSelectEntry(); - SwFrmFmt* pFmt = pWrtSh->GetFlyFrmFmt(); - if (pFmt) + SwFrameFormat* pFormat = pWrtSh->GetFlyFrameFormat(); + if (pFormat) { bool bNextBox = pNextLB == pBox; ListBox& rChangeLB = bNextBox ? *pPrevLB : *pNextLB; @@ -3242,7 +3242,7 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox) ::std::vector< OUString > aThisPageFrames; ::std::vector< OUString > aNextPageFrames; ::std::vector< OUString > aRemainFrames; - pWrtSh->GetConnectableFrmFmts(*pFmt, bNextBox ? sCurrentNextChain : sCurrentPrevChain, !bNextBox, + pWrtSh->GetConnectableFrameFormats(*pFormat, bNextBox ? sCurrentNextChain : sCurrentPrevChain, !bNextBox, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames ); lcl_InsertVectors(rChangeLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames); diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index df2a7378ddaa..54ccf0402731 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -199,10 +199,10 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet) SetMetric(*m_pTopMarginED, aMetric); SetMetric(*m_pBottomMarginED, aMetric); - const SwFmtSurround& rSurround = static_cast<const SwFmtSurround&>(rSet->Get(RES_SURROUND)); + const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(rSet->Get(RES_SURROUND)); SwSurround nSur = rSurround.GetSurround(); - const SwFmtAnchor &rAnch = static_cast<const SwFmtAnchor&>(rSet->Get(RES_ANCHOR)); + const SwFormatAnchor &rAnch = static_cast<const SwFormatAnchor&>(rSet->Get(RES_ANCHOR)); nAnchorId = rAnch.GetAnchorId(); if (((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) @@ -294,8 +294,8 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet) { bool bModified = false; const SfxPoolItem* pOldItem; - const SwFmtSurround& rOldSur = static_cast<const SwFmtSurround&>(GetItemSet().Get(RES_SURROUND)); - SwFmtSurround aSur( rOldSur ); + const SwFormatSurround& rOldSur = static_cast<const SwFormatSurround&>(GetItemSet().Get(RES_SURROUND)); + SwFormatSurround aSur( rOldSur ); SvxOpaqueItem aOp( RES_OPAQUE); @@ -395,7 +395,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet) void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) { // anchor - const SwFmtAnchor &rAnch = static_cast<const SwFmtAnchor&>(rSet.Get(RES_ANCHOR)); + const SwFormatAnchor &rAnch = static_cast<const SwFormatAnchor&>(rSet.Get(RES_ANCHOR)); nAnchorId = rAnch.GetAnchorId(); bool bEnable = (nAnchorId != FLY_AS_CHAR); @@ -406,7 +406,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) SvxSwFrameValidation aVal; // size - const SwFmtFrmSize& rFrmSize = static_cast<const SwFmtFrmSize&>(rSet.Get(RES_FRM_SIZE)); + const SwFormatFrmSize& rFrmSize = static_cast<const SwFormatFrmSize&>(rSet.Get(RES_FRM_SIZE)); Size aSize = rFrmSize.GetSize(); // margin @@ -418,8 +418,8 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) nOldLowerMargin = static_cast< sal_uInt16 >(rUL.GetLower()); // position - const SwFmtHoriOrient& rHori = static_cast<const SwFmtHoriOrient&>(rSet.Get(RES_HORI_ORIENT)); - const SwFmtVertOrient& rVert = static_cast<const SwFmtVertOrient&>(rSet.Get(RES_VERT_ORIENT)); + const SwFormatHoriOrient& rHori = static_cast<const SwFormatHoriOrient&>(rSet.Get(RES_HORI_ORIENT)); + const SwFormatVertOrient& rVert = static_cast<const SwFormatVertOrient&>(rSet.Get(RES_VERT_ORIENT)); aVal.nAnchorType = static_cast< sal_Int16 >(nAnchorId); aVal.bAutoHeight = rFrmSize.GetHeightSizeType() == ATT_MIN_SIZE; @@ -427,7 +427,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) aVal.bMirror = rHori.IsPosToggle(); // #i18732# aVal.bFollowTextFlow = - static_cast<const SwFmtFollowTextFlow&>(rSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue(); + static_cast<const SwFormatFollowTextFlow&>(rSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue(); aVal.nHoriOrient = (short)rHori.GetHoriOrient(); aVal.nVertOrient = (short)rVert.GetVertOrient(); @@ -494,13 +494,13 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) RangeModifyHdl(m_pTopMarginED); } - const SwFmtSurround& rSurround = static_cast<const SwFmtSurround&>(rSet.Get(RES_SURROUND)); + const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(rSet.Get(RES_SURROUND)); SwSurround nSur = rSurround.GetSurround(); m_pWrapTransparentCB->Enable( bEnable && !bHtmlMode && nSur == SURROUND_THROUGHT ); if(bHtmlMode) { - const SwFmtHoriOrient& rHori = static_cast<const SwFmtHoriOrient&>(rSet.Get(RES_HORI_ORIENT)); + const SwFormatHoriOrient& rHori = static_cast<const SwFormatHoriOrient&>(rSet.Get(RES_HORI_ORIENT)); sal_Int16 eHOrient = rHori.GetHoriOrient(); sal_Int16 eHRelOrient = rHori.GetRelationOrient(); m_pWrapOutlineCB->Hide(); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index fe40ea44873e..a0c803642668 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -279,7 +279,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet& if(TOX_AUTHORITIES == eCurrentTOXType.eType) { const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>( - rSh.GetFldType(RES_AUTHORITY, aEmptyOUStr)); + rSh.GetFieldType(RES_AUTHORITY, aEmptyOUStr)); if(pFType) { OUString sBrackets; @@ -360,7 +360,7 @@ void SwMultiTOXTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if(nId == m_nColumnId) { - const SwFmtFrmSize& rSize = static_cast<const SwFmtFrmSize&>(GetInputSetImpl()->Get(RES_FRM_SIZE)); + const SwFormatFrmSize& rSize = static_cast<const SwFormatFrmSize&>(GetInputSetImpl()->Get(RES_FRM_SIZE)); static_cast<SwColumnPage&>(rPage).SetPageWidth(rSize.GetWidth()); } @@ -428,7 +428,7 @@ SwTOXDescription& SwMultiTOXTabDialog::GetTOXDescription(CurTOXType eType) if(TOX_AUTHORITIES == eType.eType) { const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>( - rSh.GetFldType(RES_AUTHORITY, aEmptyOUStr)); + rSh.GetFieldType(RES_AUTHORITY, aEmptyOUStr)); if(pFType) { pDescArr[nIndex]->SetAuthBrackets(OUString(pFType->GetPrefix()) + @@ -521,14 +521,14 @@ IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl ) bool SwMultiTOXTabDialog::IsNoNum(SwWrtShell& rSh, const OUString& rName) { - SwTxtFmtColl* pColl = rSh.GetParaStyle(rName); + SwTextFormatColl* pColl = rSh.GetParaStyle(rName); if(pColl && ! pColl->IsAssignedToListLevelOfOutlineStyle()) return true; const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); if(nId != USHRT_MAX && - ! rSh.GetTxtCollFromPool(nId)->IsAssignedToListLevelOfOutlineStyle()) + ! rSh.GetTextCollFromPool(nId)->IsAssignedToListLevelOfOutlineStyle()) return true; return false; @@ -691,12 +691,12 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(vcl::Window* pParent, } // now the other styles - const SwTxtFmtColl *pColl = 0; - const sal_uInt16 nSz = rWrtSh.GetTxtFmtCollCount(); + const SwTextFormatColl *pColl = 0; + const sal_uInt16 nSz = rWrtSh.GetTextFormatCollCount(); for ( sal_uInt16 j = 0;j < nSz; ++j ) { - pColl = &rWrtSh.GetTxtFmtColl(j); + pColl = &rWrtSh.GetTextFormatColl(j); if(pColl->IsDefault()) continue; @@ -1274,10 +1274,10 @@ void SwTOXSelectTabPage::Reset( const SfxItemSet* ) m_pFromFileCB->Check( !sAutoMarkURL.isEmpty() ); m_pCaptionSequenceLB->Clear(); - const sal_uInt16 nCount = rSh.GetFldTypeCount(RES_SETEXPFLD); + const sal_uInt16 nCount = rSh.GetFieldTypeCount(RES_SETEXPFLD); for (sal_uInt16 i = 0; i < nCount; i++) { - SwFieldType *pType = rSh.GetFldType( i, RES_SETEXPFLD ); + SwFieldType *pType = rSh.GetFieldType( i, RES_SETEXPFLD ); if( pType->Which() == RES_SETEXPFLD && static_cast<SwSetExpFieldType *>( pType)->GetType() & nsSwGetSetExpType::GSE_SEQ ) m_pCaptionSequenceLB->InsertEntry(pType->GetName()); @@ -2095,7 +2095,7 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/) { SwWrtShell& rSh = pTOXDlg->GetWrtShell(); const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>( - rSh.GetFldType(RES_AUTHORITY, aEmptyOUStr)); + rSh.GetFieldType(RES_AUTHORITY, aEmptyOUStr)); if(pFType) { if(pFType->IsSortByDocument()) @@ -2311,7 +2311,7 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn) { if( TOX_CONTENT == m_pCurrentForm->GetTOXType() ) { - sText = SwForm::GetFormEntryTxt(); + sText = SwForm::GetFormEntryText(); eTokenType = TOKEN_ENTRY_TEXT; } else @@ -2832,7 +2832,7 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL) switch( aToken.eTokenType ) { case TOKEN_ENTRY_NO: sForm = SwForm::GetFormEntryNum(); break; - case TOKEN_ENTRY_TEXT: sForm = SwForm::GetFormEntryTxt(); break; + case TOKEN_ENTRY_TEXT: sForm = SwForm::GetFormEntryText(); break; case TOKEN_ENTRY: sForm = SwForm::GetFormEntry(); break; case TOKEN_TAB_STOP: sForm = SwForm::GetFormTab(); break; case TOKEN_PAGE_NUMS: sForm = SwForm::GetFormPageNums(); break; @@ -3722,11 +3722,11 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) // initialise templates SwWrtShell& rSh = static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(); - const sal_uInt16 nSz = rSh.GetTxtFmtCollCount(); + const sal_uInt16 nSz = rSh.GetTextFormatCollCount(); for( sal_uInt16 i = 0; i < nSz; ++i ) { - const SwTxtFmtColl *pColl = &rSh.GetTxtFmtColl( i ); + const SwTextFormatColl *pColl = &rSh.GetTextFormatColl( i ); if( !pColl->IsDefault() ) m_pParaLayLB->InsertEntry( pColl->GetName() ); } @@ -4065,19 +4065,19 @@ bool SwEntryBrowseBox::SaveModified() void SwEntryBrowseBox::InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol) { - const OUString rTxt = GetCellText( nRow, nCol ); + const OUString rText = GetCellText( nRow, nCol ); if(nCol < ITEM_CASE) { rController = xController; ::svt::CellController* pController = xController; - static_cast< ::svt::EditCellController*>(pController)->GetEditImplementation()->SetText( rTxt ); + static_cast< ::svt::EditCellController*>(pController)->GetEditImplementation()->SetText( rText ); } else { rController = xCheckController; ::svt::CellController* pController = xCheckController; static_cast< ::svt::CheckBoxCellController*>(pController)->GetCheckBox().Check( - rTxt == sYes ); + rText == sYes ); } } diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 9fb0662c407b..8af83aac7d3a 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -306,16 +306,16 @@ void SwIndexMarkPane::UpdateLanguageDependenciesForPhoneticReading() OSL_ENSURE(pMark, "need current SwTOXMark"); if(!pMark) return; - SwTxtTOXMark* pTxtTOXMark = pMark->GetTxtTOXMark(); - OSL_ENSURE(pTxtTOXMark, "need current SwTxtTOXMark"); - if(!pTxtTOXMark) + SwTextTOXMark* pTextTOXMark = pMark->GetTextTOXMark(); + OSL_ENSURE(pTextTOXMark, "need current SwTextTOXMark"); + if(!pTextTOXMark) return; - const SwTxtNode* pTxtNode = pTxtTOXMark->GetpTxtNd(); - OSL_ENSURE(pTxtNode, "need current SwTxtNode"); - if(!pTxtNode) + const SwTextNode* pTextNode = pTextTOXMark->GetpTextNd(); + OSL_ENSURE(pTextNode, "need current SwTextNode"); + if(!pTextNode) return; - sal_Int32 nTextIndex = pTxtTOXMark->GetStart(); - nLangForPhoneticReading = pTxtNode->GetLang( nTextIndex ); + sal_Int32 nTextIndex = pTextTOXMark->GetStart(); + nLangForPhoneticReading = pTextNode->GetLang( nTextIndex ); } else //if dialog is opened to create a new mark { @@ -419,7 +419,7 @@ static void lcl_SelectSameStrings(SwWrtShell& rSh, bool bWordOnly, bool bCaseSen SearchOptions aSearchOpt( SearchAlgorithms_ABSOLUTE, ( bWordOnly ? SearchFlags::NORM_WORD_ONLY : 0 ), - rSh.GetSelTxt(), OUString(), + rSh.GetSelText(), OUString(), GetAppLanguageTag().getLocale(), 0, 0, 0, (bCaseSensitive @@ -846,7 +846,7 @@ void SwIndexMarkPane::UpdateDialog() m_pKey1DCB->SetReadOnly( !bEnable ); m_pKey2DCB->SetReadOnly( !bEnable ); - pSh->SelectTxtAttr( RES_TXTATR_TOXMARK, pMark->GetTxtTOXMark() ); + pSh->SelectTextAttr( RES_TXTATR_TOXMARK, pMark->GetTextTOXMark() ); // we need the point at the start of the attribute pSh->SwapPam(); @@ -1167,7 +1167,7 @@ IMPL_LINK( SwAuthorMarkPane, CompEntryHdl, ListBox*, pBox) if(!sEntry.isEmpty()) { const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>( - pSh->GetFldType(RES_AUTHORITY, OUString())); + pSh->GetFieldType(RES_AUTHORITY, OUString())); const SwAuthEntry* pEntry = pFType ? pFType->GetEntryByIdentifier(sEntry) : 0; for(int i = 0; i < AUTH_FIELD_END; i++) m_sFields[i] = pEntry ? @@ -1194,7 +1194,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl) OSL_ENSURE(!m_sFields[AUTH_FIELD_AUTHORITY_TYPE].isEmpty() , "No authority type is set!"); //check if the entry already exists with different content const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>( - pSh->GetFldType(RES_AUTHORITY, OUString())); + pSh->GetFieldType(RES_AUTHORITY, OUString())); const SwAuthEntry* pEntry = pFType ? pFType->GetEntryByIdentifier( m_sFields[AUTH_FIELD_IDENTIFIER]) : 0; @@ -1210,7 +1210,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl) } } - SwFldMgr aMgr(pSh); + SwFieldMgr aMgr(pSh); OUString sFields; for(int i = 0; i < AUTH_FIELD_END; i++) { @@ -1225,12 +1225,12 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl) aNewData.SetAuthorField((ToxAuthorityField)i, m_sFields[i]); pSh->ChangeAuthorityData(&aNewData); } - SwInsertFld_Data aData(TYP_AUTHORITY, 0, sFields, OUString(), 0 ); - aMgr.InsertFld( aData ); + SwInsertField_Data aData(TYP_AUTHORITY, 0, sFields, OUString(), 0 ); + aMgr.InsertField( aData ); } - else if(aMgr.GetCurFld()) + else if(aMgr.GetCurField()) { - aMgr.UpdateCurFld(0, sFields, OUString()); + aMgr.UpdateCurField(0, sFields, OUString()); } } if(!bNewEntry) @@ -1329,7 +1329,7 @@ IMPL_LINK(SwAuthorMarkPane, ChangeSourceHdl, RadioButton*, pButton) else { const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>( - pSh->GetFldType(RES_AUTHORITY, OUString())); + pSh->GetFieldType(RES_AUTHORITY, OUString())); if(pFType) { std::vector<OUString> aIds; @@ -1370,7 +1370,7 @@ IMPL_LINK(SwAuthorMarkPane, IsEntryAllowedHdl, Edit*, pEdit) else if(bIsFromComponent) { const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>( - pSh->GetFldType(RES_AUTHORITY, OUString())); + pSh->GetFieldType(RES_AUTHORITY, OUString())); bAllowed = !pFType || !pFType->GetEntryByIdentifier(sEntry); } else @@ -1384,7 +1384,7 @@ IMPL_LINK(SwAuthorMarkPane, IsEntryAllowedHdl, Edit*, pEdit) void SwAuthorMarkPane::InitControls() { OSL_ENSURE(pSh, "no shell?"); - SwField* pField = pSh->GetCurFld(); + SwField* pField = pSh->GetCurField(); OSL_ENSURE(bNewEntry || pField, "no current marker"); if(bNewEntry) { @@ -1474,7 +1474,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(vcl::Window* pParent, SwCreateAuthEntryDlg_Impl, IdentifierHdl)); const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>( - rSh.GetFldType(RES_AUTHORITY, OUString())); + rSh.GetFieldType(RES_AUTHORITY, OUString())); if(pFType) { std::vector<OUString> aIds; @@ -1568,7 +1568,7 @@ OUString SwCreateAuthEntryDlg_Impl::GetEntryText(ToxAuthorityField eField) cons IMPL_LINK(SwCreateAuthEntryDlg_Impl, IdentifierHdl, ComboBox*, pBox) { const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>( - rWrtSh.GetFldType(RES_AUTHORITY, OUString())); + rWrtSh.GetFieldType(RES_AUTHORITY, OUString())); if(pFType) { const SwAuthEntry* pEntry = pFType->GetEntryByIdentifier( 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) diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 20e3cb9b28f0..be75802e7a94 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -43,8 +43,8 @@ static bool bIsKeepColumn = true; static sal_Unicode uOther = ','; void SwConvertTableDlg::GetValues( sal_Unicode& rDelim, - SwInsertTableOptions& rInsTblOpts, - SwTableAutoFmt const*& prTAFmt ) + SwInsertTableOptions& rInsTableOpts, + SwTableAutoFormat const*& prTAFormat ) { if( mpTabBtn->IsChecked() ) { @@ -81,22 +81,22 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim, if (mpHeaderCB->IsChecked()) nInsMode |= tabopts::HEADLINE; if (mpRepeatHeaderCB->IsEnabled() && mpRepeatHeaderCB->IsChecked()) - rInsTblOpts.mnRowsToRepeat = sal_uInt16( mpRepeatHeaderNF->GetValue() ); + rInsTableOpts.mnRowsToRepeat = sal_uInt16( mpRepeatHeaderNF->GetValue() ); else - rInsTblOpts.mnRowsToRepeat = 0; + rInsTableOpts.mnRowsToRepeat = 0; if (!mpDontSplitCB->IsChecked()) nInsMode |= tabopts::SPLIT_LAYOUT; - if( pTAutoFmt ) - prTAFmt = new SwTableAutoFmt( *pTAutoFmt ); + if( pTAutoFormat ) + prTAFormat = new SwTableAutoFormat( *pTAutoFormat ); - rInsTblOpts.mnInsMode = nInsMode; + rInsTableOpts.mnInsMode = nInsMode; } SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) : SfxModalDialog(&rView.GetViewFrame()->GetWindow(), "ConvertTextTableDialog", "modules/swriter/ui/converttexttable.ui" ) , sConvertTextTable(SW_RES(STR_CONVERT_TEXT_TABLE)) - , pTAutoFmt(0) + , pTAutoFormat(0) , pShell(&rView.GetWrtShell()) { get(mpTabBtn, "tabs"); @@ -112,7 +112,7 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) get(mpRepeatHeaderNF, "repeatheadersb"); get(mpDontSplitCB, "dontsplitcb"); get(mpBorderCB, "bordercb"); - get(mpAutoFmtBtn, "autofmt"); + get(mpAutoFormatBtn, "autofmt"); if(nSaveButtonState > -1) { @@ -135,8 +135,8 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) if( bToTable ) { SetText( sConvertTextTable ); - mpAutoFmtBtn->SetClickHdl(LINK(this, SwConvertTableDlg, AutoFmtHdl)); - mpAutoFmtBtn->Show(); + mpAutoFormatBtn->SetClickHdl(LINK(this, SwConvertTableDlg, AutoFormatHdl)); + mpAutoFormatBtn->Show(); mpKeepColumn->Show(); mpKeepColumn->Enable( mpTabBtn->IsChecked() ); } @@ -158,13 +158,13 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); - SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode); - sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode; + SwInsertTableOptions aInsOpts = pModOpt->GetInsTableFlags(bHTMLMode); + sal_uInt16 nInsTableFlags = aInsOpts.mnInsMode; - mpHeaderCB->Check( 0 != (nInsTblFlags & tabopts::HEADLINE) ); + mpHeaderCB->Check( 0 != (nInsTableFlags & tabopts::HEADLINE) ); mpRepeatHeaderCB->Check(aInsOpts.mnRowsToRepeat > 0); - mpDontSplitCB->Check( 0 == (nInsTblFlags & tabopts::SPLIT_LAYOUT)); - mpBorderCB->Check( 0!= (nInsTblFlags & tabopts::DEFAULT_BORDER) ); + mpDontSplitCB->Check( 0 == (nInsTableFlags & tabopts::SPLIT_LAYOUT)); + mpBorderCB->Check( 0!= (nInsTableFlags & tabopts::DEFAULT_BORDER) ); mpHeaderCB->SetClickHdl(LINK(this, SwConvertTableDlg, CheckBoxHdl)); mpRepeatHeaderCB->SetClickHdl(LINK(this, SwConvertTableDlg, ReapeatHeaderCheckBoxHdl)); @@ -179,7 +179,7 @@ SwConvertTableDlg:: ~SwConvertTableDlg() void SwConvertTableDlg::dispose() { - delete pTAutoFmt; + delete pTAutoFormat; mpTabBtn.clear(); mpSemiBtn.clear(); mpParaBtn.clear(); @@ -193,19 +193,19 @@ void SwConvertTableDlg::dispose() mpRepeatHeaderNF.clear(); mpDontSplitCB.clear(); mpBorderCB.clear(); - mpAutoFmtBtn.clear(); + mpAutoFormatBtn.clear(); SfxModalDialog::dispose(); } -IMPL_LINK( SwConvertTableDlg, AutoFmtHdl, PushButton*, pButton ) +IMPL_LINK( SwConvertTableDlg, AutoFormatHdl, PushButton*, pButton ) { SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - boost::scoped_ptr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(pButton, pShell, false, pTAutoFmt)); + boost::scoped_ptr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(pButton, pShell, false, pTAutoFormat)); OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute()) - pDlg->FillAutoFmtOfIndex( pTAutoFmt ); + pDlg->FillAutoFormatOfIndex( pTAutoFormat ); return 0; } diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index 0a24fe53619f..e471c9cf5d59 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -38,8 +38,8 @@ #define ROW_COL_PROD 16384 void SwInsTableDlg::GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol, - SwInsertTableOptions& rInsTblOpts, OUString& rAutoName, - SwTableAutoFmt *& prTAFmt ) + SwInsertTableOptions& rInsTableOpts, OUString& rAutoName, + SwTableAutoFormat *& prTAFormat ) { sal_uInt16 nInsMode = 0; rName = m_pNameEdit->GetText(); @@ -51,25 +51,25 @@ void SwInsTableDlg::GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rC if (m_pHeaderCB->IsChecked()) nInsMode |= tabopts::HEADLINE; if (m_pRepeatHeaderCB->IsEnabled() && m_pRepeatHeaderCB->IsChecked()) - rInsTblOpts.mnRowsToRepeat = sal_uInt16( m_pRepeatHeaderNF->GetValue() ); + rInsTableOpts.mnRowsToRepeat = sal_uInt16( m_pRepeatHeaderNF->GetValue() ); else - rInsTblOpts.mnRowsToRepeat = 0; + rInsTableOpts.mnRowsToRepeat = 0; if (!m_pDontSplitCB->IsChecked()) nInsMode |= tabopts::SPLIT_LAYOUT; - if( pTAutoFmt ) + if( pTAutoFormat ) { - prTAFmt = new SwTableAutoFmt( *pTAutoFmt ); - rAutoName = prTAFmt->GetName(); + prTAFormat = new SwTableAutoFormat( *pTAutoFormat ); + rAutoName = prTAFormat->GetName(); } - rInsTblOpts.mnInsMode = nInsMode; + rInsTableOpts.mnInsMode = nInsMode; } SwInsTableDlg::SwInsTableDlg( SwView& rView ) : SfxModalDialog(rView.GetWindow(), "InsertTableDialog", "modules/swriter/ui/inserttable.ui") , m_aTextFilter(" .<>") , pShell(&rView.GetWrtShell()) - , pTAutoFmt(0) + , pTAutoFormat(0) , nEnteredValRepeatHeaderNF(-1) { get(m_pNameEdit, "nameedit"); @@ -80,29 +80,29 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView ) get(m_pRepeatHeaderCB, "repeatcb"); get(m_pDontSplitCB, "dontsplitcb"); get(m_pBorderCB, "bordercb"); - get(m_pAutoFmtBtn, "autoformat"); + get(m_pAutoFormatBtn, "autoformat"); get(m_pInsertBtn, "ok"); get(m_pRepeatGroup, "repeatgroup"); get(m_pRepeatHeaderNF, "repeatheaderspin"); - m_pNameEdit->SetText(pShell->GetUniqueTblName()); + m_pNameEdit->SetText(pShell->GetUniqueTableName()); m_pNameEdit->SetModifyHdl(LINK(this, SwInsTableDlg, ModifyName)); m_pColNF->SetModifyHdl(LINK(this, SwInsTableDlg, ModifyRowCol)); m_pRowNF->SetModifyHdl(LINK(this, SwInsTableDlg, ModifyRowCol)); m_pRowNF->SetMax(ROW_COL_PROD/m_pColNF->GetValue()); m_pColNF->SetMax(ROW_COL_PROD/m_pRowNF->GetValue()); - m_pAutoFmtBtn->SetClickHdl(LINK(this, SwInsTableDlg, AutoFmtHdl)); + m_pAutoFormatBtn->SetClickHdl(LINK(this, SwInsTableDlg, AutoFormatHdl)); m_pInsertBtn->SetClickHdl(LINK(this, SwInsTableDlg, OKHdl)); bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode); - sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode; + SwInsertTableOptions aInsOpts = pModOpt->GetInsTableFlags(bHTMLMode); + sal_uInt16 nInsTableFlags = aInsOpts.mnInsMode; - m_pHeaderCB->Check( 0 != (nInsTblFlags & tabopts::HEADLINE) ); + m_pHeaderCB->Check( 0 != (nInsTableFlags & tabopts::HEADLINE) ); m_pRepeatHeaderCB->Check(aInsOpts.mnRowsToRepeat > 0); if(bHTMLMode) { @@ -111,9 +111,9 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView ) } else { - m_pDontSplitCB->Check( 0 == (nInsTblFlags & tabopts::SPLIT_LAYOUT) ); + m_pDontSplitCB->Check( 0 == (nInsTableFlags & tabopts::SPLIT_LAYOUT) ); } - m_pBorderCB->Check( 0 != (nInsTblFlags & tabopts::DEFAULT_BORDER) ); + m_pBorderCB->Check( 0 != (nInsTableFlags & tabopts::DEFAULT_BORDER) ); m_pRepeatHeaderNF->SetModifyHdl( LINK( this, SwInsTableDlg, ModifyRepeatHeaderNF_Hdl ) ); m_pHeaderCB->SetClickHdl(LINK(this, SwInsTableDlg, CheckBoxHdl)); @@ -142,7 +142,7 @@ SwInsTableDlg::~SwInsTableDlg() void SwInsTableDlg::dispose() { - delete pTAutoFmt; + delete pTAutoFormat; m_pNameEdit.clear(); m_pColNF.clear(); m_pRowNF.clear(); @@ -153,20 +153,20 @@ void SwInsTableDlg::dispose() m_pDontSplitCB.clear(); m_pBorderCB.clear(); m_pInsertBtn.clear(); - m_pAutoFmtBtn.clear(); + m_pAutoFormatBtn.clear(); SfxModalDialog::dispose(); } IMPL_LINK( SwInsTableDlg, ModifyName, Edit *, pEdit ) { - OUString sTblName = pEdit->GetText(); - if (sTblName.indexOf(' ') != -1) + OUString sTableName = pEdit->GetText(); + if (sTableName.indexOf(' ') != -1) { - sTblName = sTblName.replaceAll(" ", ""); - pEdit->SetText(sTblName); + sTableName = sTableName.replaceAll(" ", ""); + pEdit->SetText(sTableName); } - m_pInsertBtn->Enable(pShell->GetTblStyle( sTblName ) == 0); + m_pInsertBtn->Enable(pShell->GetTableStyle( sTableName ) == 0); return 0; } @@ -200,15 +200,15 @@ IMPL_LINK( SwInsTableDlg, ModifyRowCol, NumericField *, pField ) return 0; } -IMPL_LINK( SwInsTableDlg, AutoFmtHdl, PushButton*, pButton ) +IMPL_LINK( SwInsTableDlg, AutoFormatHdl, PushButton*, pButton ) { SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - boost::scoped_ptr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(pButton,pShell, false, pTAutoFmt)); + boost::scoped_ptr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(pButton,pShell, false, pTAutoFormat)); OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute()) - pDlg->FillAutoFmtOfIndex( pTAutoFmt ); + pDlg->FillAutoFormatOfIndex( pTAutoFormat ); return 0; } diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx index 1206a8b04842..b00fca6ca93e 100644 --- a/sw/source/ui/table/mergetbl.cxx +++ b/sw/source/ui/table/mergetbl.cxx @@ -20,7 +20,7 @@ #include <swtypes.hxx> #include <mergetbl.hxx> -SwMergeTblDlg::SwMergeTblDlg( vcl::Window *pParent, bool& rWithPrev ) +SwMergeTableDlg::SwMergeTableDlg( vcl::Window *pParent, bool& rWithPrev ) : SvxStandardDialog(pParent, "MergeTableDialog", "modules/swriter/ui/mergetabledialog.ui") , m_rMergePrev(rWithPrev) { @@ -28,19 +28,19 @@ SwMergeTblDlg::SwMergeTblDlg( vcl::Window *pParent, bool& rWithPrev ) m_pMergePrevRB->Check(); } -SwMergeTblDlg::~SwMergeTblDlg() +SwMergeTableDlg::~SwMergeTableDlg() { disposeOnce(); } -void SwMergeTblDlg::dispose() +void SwMergeTableDlg::dispose() { m_pMergePrevRB.clear(); SvxStandardDialog::dispose(); } -void SwMergeTblDlg::Apply() +void SwMergeTableDlg::Apply() { m_rMergePrev = m_pMergePrevRB->IsChecked(); } diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx index 6c8bdb49b0c0..0dddb91636a0 100644 --- a/sw/source/ui/table/rowht.cxx +++ b/sw/source/ui/table/rowht.cxx @@ -38,7 +38,7 @@ void SwTableHeightDlg::Apply() { SwTwips nHeight = static_cast< SwTwips >(m_pHeightEdit->Denormalize(m_pHeightEdit->GetValue(FUNIT_TWIP))); - SwFmtFrmSize aSz(ATT_FIX_SIZE, 0, nHeight); + SwFormatFrmSize aSz(ATT_FIX_SIZE, 0, nHeight); SwFrmSize eFrmSize = m_pAutoHeightCB->IsChecked() ? ATT_MIN_SIZE : ATT_FIX_SIZE; @@ -63,7 +63,7 @@ SwTableHeightDlg::SwTableHeightDlg(vcl::Window *pParent, SwWrtShell &rS) m_pHeightEdit->SetMin(MINLAY, FUNIT_TWIP); if(!m_pHeightEdit->GetMin()) m_pHeightEdit->SetMin(1); - SwFmtFrmSize *pSz; + SwFormatFrmSize *pSz; rSh.GetRowHeight( pSz ); if ( pSz ) { diff --git a/sw/source/ui/table/splittbl.cxx b/sw/source/ui/table/splittbl.cxx index c1d00489c519..3411b7740de0 100644 --- a/sw/source/ui/table/splittbl.cxx +++ b/sw/source/ui/table/splittbl.cxx @@ -22,32 +22,32 @@ #include <table.hrc> #include <tblenum.hxx> -SwSplitTblDlg::SwSplitTblDlg( vcl::Window *pParent, SwWrtShell &rSh ) +SwSplitTableDlg::SwSplitTableDlg( vcl::Window *pParent, SwWrtShell &rSh ) : SvxStandardDialog( pParent, "SplitTableDialog", "modules/swriter/ui/splittable.ui" ) , rShell(rSh) , m_nSplit(HEADLINE_CNTNTCOPY) { - get(mpCntntCopyRB, "copyheading"); + get(mpContentCopyRB, "copyheading"); get(mpBoxAttrCopyWithParaRB, "customheadingapplystyle"); get(mpBoxAttrCopyNoParaRB, "customheading"); get(mpBorderCopyRB, "noheading"); } -SwSplitTblDlg::~SwSplitTblDlg() +SwSplitTableDlg::~SwSplitTableDlg() { disposeOnce(); } -void SwSplitTblDlg::dispose() +void SwSplitTableDlg::dispose() { - mpCntntCopyRB.clear(); + mpContentCopyRB.clear(); mpBoxAttrCopyWithParaRB.clear(); mpBoxAttrCopyNoParaRB.clear(); mpBorderCopyRB.clear(); SvxStandardDialog::dispose(); } -void SwSplitTblDlg::Apply() +void SwSplitTableDlg::Apply() { m_nSplit = HEADLINE_CNTNTCOPY; if(mpBoxAttrCopyWithParaRB->IsChecked()) diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 2796753c4f72..e757f3d02903 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -66,7 +66,7 @@ using namespace ::com::sun::star; SwFormatTablePage::SwFormatTablePage(vcl::Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "FormatTablePage", "modules/swriter/ui/formattablepage.ui", &rSet) , m_aTextFilter(" .<>") - , pTblData(0) + , pTableData(0) , nSaveWidth(0) , nMinTableWidth(MINLAY) , bModified(false) @@ -169,7 +169,7 @@ void SwFormatTablePage::Init() IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) { - OSL_ENSURE(pTblData, "table data not available?"); + OSL_ENSURE(pTableData, "table data not available?"); bool bIsChecked = pBtn->IsChecked(); sal_Int64 nLeft = m_aLeftMF.DenormalizePercent(m_aLeftMF.GetValue(FUNIT_TWIP )); sal_Int64 nRight = m_aRightMF.DenormalizePercent(m_aRightMF.GetValue(FUNIT_TWIP )); @@ -179,9 +179,9 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) if (bIsChecked) { - m_aWidthMF.SetRefValue(pTblData->GetSpace()); - m_aLeftMF.SetRefValue(pTblData->GetSpace()); - m_aRightMF.SetRefValue(pTblData->GetSpace()); + m_aWidthMF.SetRefValue(pTableData->GetSpace()); + m_aLeftMF.SetRefValue(pTableData->GetSpace()); + m_aRightMF.SetRefValue(pTableData->GetSpace()); m_aLeftMF.SetMetricFieldMin(0); //will be overwritten by the Percentfield m_aRightMF.SetMetricFieldMin(0); //dito m_aLeftMF.SetMetricFieldMax(99); @@ -215,7 +215,7 @@ IMPL_LINK( SwFormatTablePage, AutoClickHdl, void *, pControl ) m_aLeftMF.SetPrcntValue(0); m_aRightMF.SetPrcntValue(0); nSaveWidth = static_cast< SwTwips >(m_aWidthMF.DenormalizePercent(m_aWidthMF.GetValue(FUNIT_TWIP ))); - m_aWidthMF.SetPrcntValue(m_aWidthMF.NormalizePercent(pTblData->GetSpace() ), FUNIT_TWIP ); + m_aWidthMF.SetPrcntValue(m_aWidthMF.NormalizePercent(pTableData->GetSpace() ), FUNIT_TWIP ); bFull = true; bRestore = false; } @@ -306,7 +306,7 @@ void SwFormatTablePage::ModifyHdl(const Edit * pEdit) { if( nCurWidth < MINLAY ) nCurWidth = MINLAY; - nDiff = nRight + nLeft + nCurWidth - pTblData->GetSpace() ; + nDiff = nRight + nLeft + nCurWidth - pTableData->GetSpace() ; //right aligned: only change the left margin if(m_pRightBtn->IsChecked()) nLeft -= nDiff; @@ -328,7 +328,7 @@ void SwFormatTablePage::ModifyHdl(const Edit * pEdit) { nRight += nLeft - nDiff; nLeft = 0; - nCurWidth = pTblData->GetSpace(); + nCurWidth = pTableData->GetSpace(); } } @@ -358,10 +358,10 @@ void SwFormatTablePage::ModifyHdl(const Edit * pEdit) if (pEdit == m_aRightMF.get()) { - if( nRight + nLeft > pTblData->GetSpace() - MINLAY ) - nRight = pTblData->GetSpace() -nLeft - MINLAY; + if( nRight + nLeft > pTableData->GetSpace() - MINLAY ) + nRight = pTableData->GetSpace() -nLeft - MINLAY; - nCurWidth = pTblData->GetSpace() - nLeft - nRight; + nCurWidth = pTableData->GetSpace() - nLeft - nRight; } if (pEdit == m_aLeftMF.get()) { @@ -370,22 +370,22 @@ void SwFormatTablePage::ModifyHdl(const Edit * pEdit) bool bCenter = m_pCenterBtn->IsChecked(); if( bCenter ) nRight = nLeft; - if(nRight + nLeft > pTblData->GetSpace() - MINLAY ) + if(nRight + nLeft > pTableData->GetSpace() - MINLAY ) { - nLeft = bCenter ? (pTblData->GetSpace() - MINLAY) /2 : - (pTblData->GetSpace() - MINLAY) - nRight; - nRight = bCenter ? (pTblData->GetSpace() - MINLAY) /2 : nRight; + nLeft = bCenter ? (pTableData->GetSpace() - MINLAY) /2 : + (pTableData->GetSpace() - MINLAY) - nRight; + nRight = bCenter ? (pTableData->GetSpace() - MINLAY) /2 : nRight; } - nCurWidth = pTblData->GetSpace() - nLeft - nRight; + nCurWidth = pTableData->GetSpace() - nLeft - nRight; } else { //Upon changes on the left side the right margin will be changed at first, //thereafter the width. - nDiff = nRight + nLeft + nCurWidth - pTblData->GetSpace() ; + nDiff = nRight + nLeft + nCurWidth - pTableData->GetSpace() ; nRight -= nDiff; - nCurWidth = pTblData->GetSpace() - nLeft - nRight; + nCurWidth = pTableData->GetSpace() - nLeft - nRight; } } if (nCurWidth != nPrevWidth ) @@ -478,14 +478,14 @@ void SwFormatTablePage::Reset( const SfxItemSet* ) if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) { - pTblData = static_cast<SwTableRep*>(static_cast<const SwPtrItem*>( pItem)->GetValue()); - nMinTableWidth = pTblData->GetColCount() * MINLAY; + pTableData = static_cast<SwTableRep*>(static_cast<const SwPtrItem*>( pItem)->GetValue()); + nMinTableWidth = pTableData->GetColCount() * MINLAY; - if(pTblData->GetWidthPercent()) + if(pTableData->GetWidthPercent()) { m_pRelWidthCB->Check(true); RelWidthClickHdl(m_pRelWidthCB); - m_aWidthMF.SetPrcntValue(pTblData->GetWidthPercent(), FUNIT_CUSTOM); + m_aWidthMF.SetPrcntValue(pTableData->GetWidthPercent(), FUNIT_CUSTOM); m_aWidthMF.SaveValue(); nSaveWidth = static_cast< SwTwips >(m_aWidthMF.GetValue(FUNIT_CUSTOM)); @@ -493,26 +493,26 @@ void SwFormatTablePage::Reset( const SfxItemSet* ) else { m_aWidthMF.SetPrcntValue(m_aWidthMF.NormalizePercent( - pTblData->GetWidth()), FUNIT_TWIP); + pTableData->GetWidth()), FUNIT_TWIP); m_aWidthMF.SaveValue(); - nSaveWidth = pTblData->GetWidth(); + nSaveWidth = pTableData->GetWidth(); nMinTableWidth = std::min( nSaveWidth, nMinTableWidth ); } - m_aWidthMF.SetRefValue(pTblData->GetSpace()); - m_aWidthMF.SetLast(m_aWidthMF.NormalizePercent( pTblData->GetSpace() )); - m_aLeftMF.SetLast(m_aLeftMF.NormalizePercent( pTblData->GetSpace() )); - m_aRightMF.SetLast(m_aRightMF.NormalizePercent( pTblData->GetSpace() )); + m_aWidthMF.SetRefValue(pTableData->GetSpace()); + m_aWidthMF.SetLast(m_aWidthMF.NormalizePercent( pTableData->GetSpace() )); + m_aLeftMF.SetLast(m_aLeftMF.NormalizePercent( pTableData->GetSpace() )); + m_aRightMF.SetLast(m_aRightMF.NormalizePercent( pTableData->GetSpace() )); m_aLeftMF.SetPrcntValue(m_aLeftMF.NormalizePercent( - pTblData->GetLeftSpace()), FUNIT_TWIP); + pTableData->GetLeftSpace()), FUNIT_TWIP); m_aRightMF.SetPrcntValue(m_aRightMF.NormalizePercent( - pTblData->GetRightSpace()), FUNIT_TWIP); + pTableData->GetRightSpace()), FUNIT_TWIP); m_aLeftMF.SaveValue(); m_aRightMF.SaveValue(); bool bSetRight = false, bSetLeft = false; - switch( pTblData->GetAlign() ) + switch( pTableData->GetAlign() ) { case text::HoriOrientation::NONE: m_pFreeBtn->Check(); @@ -586,22 +586,22 @@ void SwFormatTablePage::Reset( const SfxItemSet* ) m_pTextDirectionLB->SaveValue(); } - m_aWidthMF.SetMax( 2*m_aWidthMF.NormalizePercent( pTblData->GetSpace() ), FUNIT_TWIP ); - m_aRightMF.SetMax( m_aRightMF.NormalizePercent( pTblData->GetSpace() ), FUNIT_TWIP ); - m_aLeftMF.SetMax( m_aLeftMF.NormalizePercent( pTblData->GetSpace() ), FUNIT_TWIP ); + m_aWidthMF.SetMax( 2*m_aWidthMF.NormalizePercent( pTableData->GetSpace() ), FUNIT_TWIP ); + m_aRightMF.SetMax( m_aRightMF.NormalizePercent( pTableData->GetSpace() ), FUNIT_TWIP ); + m_aLeftMF.SetMax( m_aLeftMF.NormalizePercent( pTableData->GetSpace() ), FUNIT_TWIP ); m_aWidthMF.SetMin( m_aWidthMF.NormalizePercent( nMinTableWidth ), FUNIT_TWIP ); } void SwFormatTablePage::ActivatePage( const SfxItemSet& rSet ) { - OSL_ENSURE(pTblData, "table data not available?"); + OSL_ENSURE(pTableData, "table data not available?"); if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP )) { - SwTwips nCurWidth = text::HoriOrientation::FULL != pTblData->GetAlign() ? - pTblData->GetWidth() : - pTblData->GetSpace(); - if(pTblData->GetWidthPercent() == 0 && + SwTwips nCurWidth = text::HoriOrientation::FULL != pTableData->GetAlign() ? + pTableData->GetWidth() : + pTableData->GetSpace(); + if(pTableData->GetWidthPercent() == 0 && nCurWidth != m_aWidthMF.DenormalizePercent(m_aWidthMF.GetValue(FUNIT_TWIP ))) { m_aWidthMF.SetPrcntValue(m_aWidthMF.NormalizePercent( @@ -609,10 +609,10 @@ void SwFormatTablePage::ActivatePage( const SfxItemSet& rSet ) m_aWidthMF.SaveValue(); nSaveWidth = nCurWidth; m_aLeftMF.SetPrcntValue(m_aLeftMF.NormalizePercent( - pTblData->GetLeftSpace()), FUNIT_TWIP); + pTableData->GetLeftSpace()), FUNIT_TWIP); m_aLeftMF.SaveValue(); m_aRightMF.SetPrcntValue(m_aRightMF.NormalizePercent( - pTblData->GetRightSpace()), FUNIT_TWIP); + pTableData->GetRightSpace()), FUNIT_TWIP); m_aRightMF.SaveValue(); } } @@ -625,8 +625,8 @@ SfxTabPage::sfxpg SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) //in the dialog lose the focus m_pNameED->GrabFocus(); //test the table name for spaces - OUString sTblName = m_pNameED->GetText(); - if(sTblName.indexOf(' ') != -1) + OUString sTableName = m_pNameED->GetText(); + if(sTableName.indexOf(' ') != -1) { MessageDialog(this, SW_RES(STR_WRONG_TABLENAME), VCL_MESSAGE_INFO).Execute(); m_pNameED->GrabFocus(); @@ -643,55 +643,55 @@ SfxTabPage::sfxpg SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) if( m_aLeftMF.GetText() != m_aLeftMF.GetSavedValue() || m_aRightMF.GetText() != m_aRightMF.GetSavedValue() ) { - pTblData->SetWidthChanged(); - pTblData->SetLeftSpace( lLeft); - pTblData->SetRightSpace( lRight); + pTableData->SetWidthChanged(); + pTableData->SetLeftSpace( lLeft); + pTableData->SetRightSpace( lRight); } SwTwips lWidth; if (m_pRelWidthCB->IsChecked() && m_pRelWidthCB->IsEnabled()) { - lWidth = pTblData->GetSpace() - lRight - lLeft; + lWidth = pTableData->GetSpace() - lRight - lLeft; const sal_uInt16 nPercentWidth = m_aWidthMF.GetValue(FUNIT_CUSTOM); - if(pTblData->GetWidthPercent() != nPercentWidth) + if(pTableData->GetWidthPercent() != nPercentWidth) { - pTblData->SetWidthPercent(nPercentWidth); - pTblData->SetWidthChanged(); + pTableData->SetWidthPercent(nPercentWidth); + pTableData->SetWidthChanged(); } } else { - pTblData->SetWidthPercent(0); + pTableData->SetWidthPercent(0); lWidth = static_cast< SwTwips >(m_aWidthMF.DenormalizePercent(m_aWidthMF.GetValue( FUNIT_TWIP ))); } - pTblData->SetWidth(lWidth); + pTableData->SetWidth(lWidth); SwTwips nColSum = 0; - for( sal_uInt16 i = 0; i < pTblData->GetColCount(); i++) + for( sal_uInt16 i = 0; i < pTableData->GetColCount(); i++) { - nColSum += pTblData->GetColumns()[i].nWidth; + nColSum += pTableData->GetColumns()[i].nWidth; } - if(nColSum != pTblData->GetWidth()) + if(nColSum != pTableData->GetWidth()) { SwTwips nMinWidth = std::min( (long)MINLAY, - (long) (pTblData->GetWidth() / - pTblData->GetColCount() - 1)); - SwTwips nDiff = nColSum - pTblData->GetWidth(); - while ( std::abs(nDiff) > pTblData->GetColCount() + 1 ) + (long) (pTableData->GetWidth() / + pTableData->GetColCount() - 1)); + SwTwips nDiff = nColSum - pTableData->GetWidth(); + while ( std::abs(nDiff) > pTableData->GetColCount() + 1 ) { - SwTwips nSub = nDiff / pTblData->GetColCount(); - for( sal_uInt16 i = 0; i < pTblData->GetColCount(); i++) + SwTwips nSub = nDiff / pTableData->GetColCount(); + for( sal_uInt16 i = 0; i < pTableData->GetColCount(); i++) { - if(pTblData->GetColumns()[i].nWidth - nMinWidth > nSub) + if(pTableData->GetColumns()[i].nWidth - nMinWidth > nSub) { - pTblData->GetColumns()[i].nWidth -= nSub; + pTableData->GetColumns()[i].nWidth -= nSub; nDiff -= nSub; } else { - nDiff -= pTblData->GetColumns()[i].nWidth - nMinWidth; - pTblData->GetColumns()[i].nWidth = nMinWidth; + nDiff -= pTableData->GetColumns()[i].nWidth - nMinWidth; + pTableData->GetColumns()[i].nWidth = nMinWidth; } } @@ -714,20 +714,20 @@ SfxTabPage::sfxpg SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) nAlign = text::HoriOrientation::FULL; lWidth = lAutoWidth; } - if(nAlign != pTblData->GetAlign()) + if(nAlign != pTableData->GetAlign()) { - pTblData->SetWidthChanged(); - pTblData->SetAlign(nAlign); + pTableData->SetWidthChanged(); + pTableData->SetAlign(nAlign); } - if(pTblData->GetWidth() != lWidth ) + if(pTableData->GetWidth() != lWidth ) { - pTblData->SetWidthChanged(); - pTblData->SetWidth( - nAlign == text::HoriOrientation::FULL ? pTblData->GetSpace() : lWidth ); + pTableData->SetWidthChanged(); + pTableData->SetWidth( + nAlign == text::HoriOrientation::FULL ? pTableData->GetSpace() : lWidth ); } - if(pTblData->HasWidthChanged()) - _pSet->Put(SwPtrItem(FN_TABLE_REP, pTblData)); + if(pTableData->HasWidthChanged()) + _pSet->Put(SwPtrItem(FN_TABLE_REP, pTableData)); } } return LEAVE_PAGE; @@ -737,13 +737,13 @@ SfxTabPage::sfxpg SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) SwTableColumnPage::SwTableColumnPage(vcl::Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "TableColumnPage", "modules/swriter/ui/tablecolumnpage.ui", &rSet) - , pTblData(0) + , pTableData(0) , nTableWidth(0) , nMinWidth(MINLAY) , nNoOfCols(0) , nNoOfVisibleCols(0) , bModified(false) - , bModifyTbl(false) + , bModifyTable(false) , bPercentMode(false) { get(m_pModifyTableCB, "adaptwidth"); @@ -805,17 +805,17 @@ void SwTableColumnPage::Reset( const SfxItemSet* ) const SfxPoolItem* pItem; if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem )) { - pTblData = static_cast<SwTableRep*>(static_cast<const SwPtrItem*>( pItem)->GetValue()); - nNoOfVisibleCols = pTblData->GetColCount(); - nNoOfCols = pTblData->GetAllColCount(); - nTableWidth = pTblData->GetAlign() != text::HoriOrientation::FULL && - pTblData->GetAlign() != text::HoriOrientation::LEFT_AND_WIDTH? - pTblData->GetWidth() : pTblData->GetSpace(); + pTableData = static_cast<SwTableRep*>(static_cast<const SwPtrItem*>( pItem)->GetValue()); + nNoOfVisibleCols = pTableData->GetColCount(); + nNoOfCols = pTableData->GetAllColCount(); + nTableWidth = pTableData->GetAlign() != text::HoriOrientation::FULL && + pTableData->GetAlign() != text::HoriOrientation::LEFT_AND_WIDTH? + pTableData->GetWidth() : pTableData->GetSpace(); for( sal_uInt16 i = 0; i < nNoOfCols; i++ ) { - if( pTblData->GetColumns()[i].nWidth < nMinWidth ) - nMinWidth = pTblData->GetColumns()[i].nWidth; + if( pTableData->GetColumns()[i].nWidth < nMinWidth ) + nMinWidth = pTableData->GetColumns()[i].nWidth; } sal_Int64 nMinTwips = m_aFieldArr[0].NormalizePercent( nMinWidth ); sal_Int64 nMaxTwips = m_aFieldArr[0].NormalizePercent( nTableWidth ); @@ -850,7 +850,7 @@ void SwTableColumnPage::Init(bool bWeb) Link<> aLkLF = LINK( this, SwTableColumnPage, LoseFocusHdl ); for( sal_uInt16 i = 0; i < MET_FIELDS; i++ ) { - aValueTbl[i] = i; + aValueTable[i] = i; m_aFieldArr[i].SetMetric(aMetric); m_aFieldArr[i].SetUpHdl( aLkUp ); m_aFieldArr[i].SetDownHdl( aLkDown ); @@ -872,24 +872,24 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, void *, pControl ) //move display window if(pControl == m_pDownBtn.get()) { - if(aValueTbl[0] > 0) + if(aValueTable[0] > 0) { for( sal_uInt16 i=0; i < MET_FIELDS; i++ ) - aValueTbl[i] -= 1; + aValueTable[i] -= 1; } } if (pControl == m_pUpBtn.get()) { - if( aValueTbl[ MET_FIELDS -1 ] < nNoOfVisibleCols -1 ) + if( aValueTable[ MET_FIELDS -1 ] < nNoOfVisibleCols -1 ) { for(sal_uInt16 i=0;i < MET_FIELDS;i++) - aValueTbl[i] += 1; + aValueTable[i] += 1; } } for( sal_uInt16 i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ ) { OUString sEntry('~'); - OUString sIndex = OUString::number( aValueTbl[i] + 1 ); + OUString sIndex = OUString::number( aValueTable[i] + 1 ); sEntry += sIndex; m_pTextArr[i]->SetText( sEntry ); @@ -899,8 +899,8 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, void *, pControl ) m_aFieldArr[i].SetAccessibleName( sColumnWidth ); } - m_pDownBtn->Enable(aValueTbl[0] > 0); - m_pUpBtn->Enable(aValueTbl[ MET_FIELDS -1 ] < nNoOfVisibleCols -1 ); + m_pDownBtn->Enable(aValueTable[0] > 0); + m_pUpBtn->Enable(aValueTable[ MET_FIELDS -1 ] < nNoOfVisibleCols -1 ); UpdateCols(0); return 0; } @@ -936,7 +936,7 @@ IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox ) { if(bCheck) m_pModifyTableCB->Check(); - m_pModifyTableCB->Enable(!bCheck && bModifyTbl); + m_pModifyTableCB->Enable(!bCheck && bModifyTable); } return 0; } @@ -954,7 +954,7 @@ bool SwTableColumnPage::FillItemSet( SfxItemSet* ) if(bModified) { - pTblData->SetColsChanged(); + pTableData->SetColsChanged(); } return bModified; } @@ -979,9 +979,9 @@ void SwTableColumnPage::ModifyHdl( MetricField* pField ) return; } - SetVisibleWidth(aValueTbl[i], static_cast< SwTwips >(pEdit->DenormalizePercent(pEdit->GetValue( FUNIT_TWIP ))) ); + SetVisibleWidth(aValueTable[i], static_cast< SwTwips >(pEdit->DenormalizePercent(pEdit->GetValue( FUNIT_TWIP ))) ); - UpdateCols( aValueTbl[i] ); + UpdateCols( aValueTable[i] ); } void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) @@ -990,7 +990,7 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) for( sal_uInt16 i = 0; i < nNoOfCols; i++ ) { - nSum += (pTblData->GetColumns())[i].nWidth; + nSum += (pTableData->GetColumns())[i].nWidth; } SwTwips nDiff = nSum - nTableWidth; @@ -1041,11 +1041,11 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) { //Difference is balanced by the width of the table, //other columns remain unchanged. - OSL_ENSURE(nDiff <= pTblData->GetSpace() - nTableWidth, "wrong maximum" ); - SwTwips nActSpace = pTblData->GetSpace() - nTableWidth; + OSL_ENSURE(nDiff <= pTableData->GetSpace() - nTableWidth, "wrong maximum" ); + SwTwips nActSpace = pTableData->GetSpace() - nTableWidth; if(nDiff > nActSpace) { - nTableWidth = pTblData->GetSpace(); + nTableWidth = pTableData->GetSpace(); SetVisibleWidth(nAktPos, GetVisibleWidth(nAktPos) - nDiff + nActSpace ); } else @@ -1057,11 +1057,11 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) { //All columns will be changed proportionally with, //the table width is adjusted accordingly. - OSL_ENSURE(nDiff * nNoOfVisibleCols <= pTblData->GetSpace() - nTableWidth, "wrong maximum" ); + OSL_ENSURE(nDiff * nNoOfVisibleCols <= pTableData->GetSpace() - nTableWidth, "wrong maximum" ); long nAdd = nDiff; - if(nDiff * nNoOfVisibleCols > pTblData->GetSpace() - nTableWidth) + if(nDiff * nNoOfVisibleCols > pTableData->GetSpace() - nTableWidth) { - nAdd = (pTblData->GetSpace() - nTableWidth) / nNoOfVisibleCols; + nAdd = (pTableData->GetSpace() - nTableWidth) / nNoOfVisibleCols; SetVisibleWidth(nAktPos, GetVisibleWidth(nAktPos) - nDiff + nAdd ); nDiff = nAdd; } @@ -1087,56 +1087,56 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) } if(!bPercentMode) - m_pSpaceED->SetValue(m_pSpaceED->Normalize( pTblData->GetSpace() - nTableWidth) , FUNIT_TWIP); + m_pSpaceED->SetValue(m_pSpaceED->Normalize( pTableData->GetSpace() - nTableWidth) , FUNIT_TWIP); for( sal_uInt16 i = 0; ( i < nNoOfVisibleCols ) && ( i < MET_FIELDS ); i++) { m_aFieldArr[i].SetPrcntValue(m_aFieldArr[i].NormalizePercent( - GetVisibleWidth(aValueTbl[i]) ), FUNIT_TWIP); + GetVisibleWidth(aValueTable[i]) ), FUNIT_TWIP); m_aFieldArr[i].ClearModifyFlag(); } } void SwTableColumnPage::ActivatePage( const SfxItemSet& ) { - bPercentMode = pTblData->GetWidthPercent() != 0; + bPercentMode = pTableData->GetWidthPercent() != 0; for( sal_uInt16 i = 0; (i < MET_FIELDS) && (i < nNoOfVisibleCols); i++ ) { - m_aFieldArr[i].SetRefValue(pTblData->GetWidth()); + m_aFieldArr[i].SetRefValue(pTableData->GetWidth()); m_aFieldArr[i].ShowPercent( bPercentMode ); } - const sal_uInt16 nTblAlign = pTblData->GetAlign(); - if((text::HoriOrientation::FULL != nTblAlign && nTableWidth != pTblData->GetWidth()) || - (text::HoriOrientation::FULL == nTblAlign && nTableWidth != pTblData->GetSpace())) + const sal_uInt16 nTableAlign = pTableData->GetAlign(); + if((text::HoriOrientation::FULL != nTableAlign && nTableWidth != pTableData->GetWidth()) || + (text::HoriOrientation::FULL == nTableAlign && nTableWidth != pTableData->GetSpace())) { - nTableWidth = text::HoriOrientation::FULL == nTblAlign ? - pTblData->GetSpace() : - pTblData->GetWidth(); + nTableWidth = text::HoriOrientation::FULL == nTableAlign ? + pTableData->GetSpace() : + pTableData->GetWidth(); UpdateCols(0); } - bModifyTbl = true; - if(pTblData->GetWidthPercent() || - text::HoriOrientation::FULL == nTblAlign || - pTblData->IsLineSelected() ) - bModifyTbl = false; + bModifyTable = true; + if(pTableData->GetWidthPercent() || + text::HoriOrientation::FULL == nTableAlign || + pTableData->IsLineSelected() ) + bModifyTable = false; if(bPercentMode) { m_pModifyTableCB->Check(false); m_pProportionalCB->Check(false); } - else if( !bModifyTbl ) + else if( !bModifyTable ) { m_pProportionalCB->Check(false); m_pModifyTableCB->Check(false); } m_pSpaceFT->Enable(!bPercentMode); m_pSpaceED->Enable(!bPercentMode); - m_pModifyTableCB->Enable( !bPercentMode && bModifyTbl ); - m_pProportionalCB->Enable(!bPercentMode && bModifyTbl ); + m_pModifyTableCB->Enable( !bPercentMode && bModifyTable ); + m_pProportionalCB->Enable(!bPercentMode && bModifyTable ); m_pSpaceED->SetValue(m_pSpaceED->Normalize( - pTblData->GetSpace() - nTableWidth) , FUNIT_TWIP); + pTableData->GetSpace() - nTableWidth) , FUNIT_TWIP); } @@ -1145,59 +1145,59 @@ SfxTabPage::sfxpg SwTableColumnPage::DeactivatePage( SfxItemSet* _pSet ) if(_pSet) { FillItemSet(_pSet); - if(text::HoriOrientation::FULL != pTblData->GetAlign() && pTblData->GetWidth() != nTableWidth) + if(text::HoriOrientation::FULL != pTableData->GetAlign() && pTableData->GetWidth() != nTableWidth) { - pTblData->SetWidth(nTableWidth); - SwTwips nDiff = pTblData->GetSpace() - pTblData->GetWidth() - - pTblData->GetLeftSpace() - pTblData->GetRightSpace(); - switch( pTblData->GetAlign() ) + pTableData->SetWidth(nTableWidth); + SwTwips nDiff = pTableData->GetSpace() - pTableData->GetWidth() - + pTableData->GetLeftSpace() - pTableData->GetRightSpace(); + switch( pTableData->GetAlign() ) { case text::HoriOrientation::RIGHT: - pTblData->SetLeftSpace(pTblData->GetLeftSpace() + nDiff); + pTableData->SetLeftSpace(pTableData->GetLeftSpace() + nDiff); break; case text::HoriOrientation::LEFT: - pTblData->SetRightSpace(pTblData->GetRightSpace() + nDiff); + pTableData->SetRightSpace(pTableData->GetRightSpace() + nDiff); break; case text::HoriOrientation::NONE: { SwTwips nDiff2 = nDiff/2; if( nDiff > 0 || - (-nDiff2 < pTblData->GetRightSpace() && - nDiff2 < pTblData->GetLeftSpace())) + (-nDiff2 < pTableData->GetRightSpace() && - nDiff2 < pTableData->GetLeftSpace())) { - pTblData->SetRightSpace(pTblData->GetRightSpace() + nDiff2); - pTblData->SetLeftSpace(pTblData->GetLeftSpace() + nDiff2); + pTableData->SetRightSpace(pTableData->GetRightSpace() + nDiff2); + pTableData->SetLeftSpace(pTableData->GetLeftSpace() + nDiff2); } else { - if(pTblData->GetRightSpace() > pTblData->GetLeftSpace()) + if(pTableData->GetRightSpace() > pTableData->GetLeftSpace()) { - pTblData->SetLeftSpace(0); - pTblData->SetRightSpace(pTblData->GetSpace() - pTblData->GetWidth()); + pTableData->SetLeftSpace(0); + pTableData->SetRightSpace(pTableData->GetSpace() - pTableData->GetWidth()); } else { - pTblData->SetRightSpace(0); - pTblData->SetLeftSpace(pTblData->GetSpace() - pTblData->GetWidth()); + pTableData->SetRightSpace(0); + pTableData->SetLeftSpace(pTableData->GetSpace() - pTableData->GetWidth()); } } } break; case text::HoriOrientation::CENTER: - pTblData->SetRightSpace(pTblData->GetRightSpace() + nDiff/2); - pTblData->SetLeftSpace(pTblData->GetLeftSpace() + nDiff/2); + pTableData->SetRightSpace(pTableData->GetRightSpace() + nDiff/2); + pTableData->SetLeftSpace(pTableData->GetLeftSpace() + nDiff/2); break; case text::HoriOrientation::LEFT_AND_WIDTH : - if(nDiff > pTblData->GetRightSpace()) + if(nDiff > pTableData->GetRightSpace()) { - pTblData->SetLeftSpace(pTblData->GetSpace() - pTblData->GetWidth()); + pTableData->SetLeftSpace(pTableData->GetSpace() - pTableData->GetWidth()); } - pTblData->SetRightSpace( - pTblData->GetSpace() - pTblData->GetWidth() - pTblData->GetLeftSpace()); + pTableData->SetRightSpace( + pTableData->GetSpace() - pTableData->GetWidth() - pTableData->GetLeftSpace()); break; } - pTblData->SetWidthChanged(); + pTableData->SetWidthChanged(); } - _pSet->Put(SwPtrItem( FN_TABLE_REP, pTblData )); + _pSet->Put(SwPtrItem( FN_TABLE_REP, pTableData )); } return LEAVE_PAGE; } @@ -1208,14 +1208,14 @@ SwTwips SwTableColumnPage::GetVisibleWidth(sal_uInt16 nPos) while( nPos ) { - if(pTblData->GetColumns()[i].bVisible && nPos) + if(pTableData->GetColumns()[i].bVisible && nPos) nPos--; i++; } - SwTwips nReturn = pTblData->GetColumns()[i].nWidth; + SwTwips nReturn = pTableData->GetColumns()[i].nWidth; OSL_ENSURE(i < nNoOfCols, "Array index out of range"); - while(!pTblData->GetColumns()[i].bVisible && (i + 1) < nNoOfCols) - nReturn += pTblData->GetColumns()[++i].nWidth; + while(!pTableData->GetColumns()[i].bVisible && (i + 1) < nNoOfCols) + nReturn += pTableData->GetColumns()[++i].nWidth; return nReturn; } @@ -1225,14 +1225,14 @@ void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth) sal_uInt16 i=0; while( nPos ) { - if(pTblData->GetColumns()[i].bVisible && nPos) + if(pTableData->GetColumns()[i].bVisible && nPos) nPos--; i++; } OSL_ENSURE(i < nNoOfCols, "Array index out of range"); - pTblData->GetColumns()[i].nWidth = nNewWidth; - while(!pTblData->GetColumns()[i].bVisible && (i + 1) < nNoOfCols) - pTblData->GetColumns()[++i].nWidth = 0; + pTableData->GetColumns()[i].nWidth = nNewWidth; + while(!pTableData->GetColumns()[i].bVisible && (i + 1) < nNoOfCols) + pTableData->GetColumns()[++i].nWidth = 0; } @@ -1387,16 +1387,16 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet ) SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, m_pHeadLineCB->IsChecked()? sal_uInt16(m_pRepeatHeaderNF->GetValue()) : 0 )); } if(m_pKeepCB->IsValueChangedFromSaved()) - bModified |= 0 != rSet->Put( SvxFmtKeepItem( m_pKeepCB->IsChecked(), RES_KEEP)); + bModified |= 0 != rSet->Put( SvxFormatKeepItem( m_pKeepCB->IsChecked(), RES_KEEP)); if(m_pSplitCB->IsValueChangedFromSaved()) - bModified |= 0 != rSet->Put( SwFmtLayoutSplit( m_pSplitCB->IsChecked())); + bModified |= 0 != rSet->Put( SwFormatLayoutSplit( m_pSplitCB->IsChecked())); if(m_pSplitRowCB->IsValueChangedFromSaved()) - bModified |= 0 != rSet->Put( SwFmtRowSplit( m_pSplitRowCB->IsChecked())); + bModified |= 0 != rSet->Put( SwFormatRowSplit( m_pSplitRowCB->IsChecked())); - const SvxFmtBreakItem* pBreak = static_cast<const SvxFmtBreakItem*>(GetOldItem( *rSet, RES_BREAK )); - const SwFmtPageDesc* pDesc = static_cast<const SwFmtPageDesc*>(GetOldItem( *rSet, RES_PAGEDESC )); + const SvxFormatBreakItem* pBreak = static_cast<const SvxFormatBreakItem*>(GetOldItem( *rSet, RES_BREAK )); + const SwFormatPageDesc* pDesc = static_cast<const SwFormatPageDesc*>(GetOldItem( *rSet, RES_PAGEDESC )); bool bState = m_pPageCollCB->IsChecked(); @@ -1418,9 +1418,9 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet ) ( pDesc->GetPageDesc() && ((pDesc->GetPageDesc()->GetName() != sPage) || !comphelper::string::equals(m_pPageNoNF->GetSavedValue(), nPgNum)))) { - SwFmtPageDesc aFmt( pShell->FindPageDescByName( sPage, true ) ); - aFmt.SetNumOffset(bState ? nPgNum : 0); - bModified |= 0 != rSet->Put( aFmt ); + SwFormatPageDesc aFormat( pShell->FindPageDescByName( sPage, true ) ); + aFormat.SetNumOffset(bState ? nPgNum : 0); + bModified |= 0 != rSet->Put( aFormat ); bPageItemPut = bState; } } @@ -1431,8 +1431,8 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet ) m_pPgBrkBeforeRB->IsValueChangedFromSaved() || m_pPgBrkRB->IsValueChangedFromSaved() )) { - SvxFmtBreakItem aBreak( - static_cast<const SvxFmtBreakItem&>(GetItemSet().Get( RES_BREAK )) ); + SvxFormatBreakItem aBreak( + static_cast<const SvxFormatBreakItem&>(GetItemSet().Get( RES_BREAK )) ); if(bIsChecked) { @@ -1505,20 +1505,20 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) m_pPageCollLB->InsertEntry(rPageDesc.GetName()); } - OUString aFmtName; + OUString aFormatName; for(sal_uInt16 i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i) if( LISTBOX_ENTRY_NOTFOUND == m_pPageCollLB->GetEntryPos( - aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ) )) - m_pPageCollLB->InsertEntry( aFmtName ); + aFormatName = SwStyleNameMapper::GetUIName( i, aFormatName ) )) + m_pPageCollLB->InsertEntry( aFormatName ); if(SfxItemState::SET == rSet->GetItemState( RES_KEEP, false, &pItem )) { - m_pKeepCB->Check( static_cast<const SvxFmtKeepItem*>(pItem)->GetValue() ); + m_pKeepCB->Check( static_cast<const SvxFormatKeepItem*>(pItem)->GetValue() ); m_pKeepCB->SaveValue(); } if(SfxItemState::SET == rSet->GetItemState( RES_LAYOUT_SPLIT, false, &pItem )) { - m_pSplitCB->Check( static_cast<const SwFmtLayoutSplit*>(pItem)->GetValue() ); + m_pSplitCB->Check( static_cast<const SwFormatLayoutSplit*>(pItem)->GetValue() ); } else m_pSplitCB->Check(); @@ -1528,7 +1528,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) if(SfxItemState::SET == rSet->GetItemState( RES_ROW_SPLIT, false, &pItem )) { - m_pSplitRowCB->Check( static_cast<const SwFmtRowSplit*>(pItem)->GetValue() ); + m_pSplitRowCB->Check( static_cast<const SwFormatRowSplit*>(pItem)->GetValue() ); } else m_pSplitRowCB->SetState(TRISTATE_INDET); @@ -1539,10 +1539,10 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) if(SfxItemState::SET == rSet->GetItemState( RES_PAGEDESC, false, &pItem )) { OUString sPageDesc; - const SwPageDesc* pDesc = static_cast<const SwFmtPageDesc*>(pItem)->GetPageDesc(); + const SwPageDesc* pDesc = static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc(); - //m_pPageNoNF->SetValue(static_cast<const SwFmtPageDesc*>(pItem)->GetNumOffset()); - ::boost::optional<sal_uInt16> oNumOffset = static_cast<const SwFmtPageDesc*>(pItem)->GetNumOffset(); + //m_pPageNoNF->SetValue(static_cast<const SwFormatPageDesc*>(pItem)->GetNumOffset()); + ::boost::optional<sal_uInt16> oNumOffset = static_cast<const SwFormatPageDesc*>(pItem)->GetNumOffset(); if (oNumOffset) m_pPageNoNF->SetValue(oNumOffset.get()); else @@ -1578,7 +1578,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet ) if(SfxItemState::SET == rSet->GetItemState( RES_BREAK, false, &pItem )) { - const SvxFmtBreakItem* pPageBreak = static_cast<const SvxFmtBreakItem*>(pItem); + const SvxFormatBreakItem* pPageBreak = static_cast<const SvxFormatBreakItem*>(pItem); SvxBreak eBreak = (SvxBreak)pPageBreak->GetValue(); if ( eBreak != SVX_BREAK_NONE ) diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index ddb2aa03e877..1d7cf89f7d28 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -45,14 +45,14 @@ using namespace com::sun::star; #define FRAME_OFFSET 4 -class AutoFmtPreview : public vcl::Window +class AutoFormatPreview : public vcl::Window { public: - AutoFmtPreview(vcl::Window* pParent, WinBits nStyle); - virtual ~AutoFmtPreview(); + AutoFormatPreview(vcl::Window* pParent, WinBits nStyle); + virtual ~AutoFormatPreview(); virtual void dispose() SAL_OVERRIDE; - void NotifyChange( const SwTableAutoFmt& rNewData ); + void NotifyChange( const SwTableAutoFormat& rNewData ); void DetectRTL(SwWrtShell* pWrtShell); @@ -61,7 +61,7 @@ protected: virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; private: - SwTableAutoFmt aCurData; + SwTableAutoFormat aCurData; ScopedVclPtr<VirtualDevice> aVD; svx::frame::Array maArray; /// Implementation to draw the frame borders. bool bFitWidth; @@ -78,7 +78,7 @@ private: const OUString aStrMid; const OUString aStrSouth; const OUString aStrSum; - SvNumberFormatter* pNumFmt; + SvNumberFormatter* pNumFormat; uno::Reference<i18n::XBreakIterator> m_xBreak; @@ -142,7 +142,7 @@ void SwStringInputDlg::dispose() // AutoFormat-Dialogue: SwAutoFormatDlg::SwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pWrtShell, - bool bAutoFormat, const SwTableAutoFmt* pSelFmt ) + bool bAutoFormat, const SwTableAutoFormat* pSelFormat ) : SfxModalDialog(pParent, "AutoFormatTableDialog", "modules/swriter/ui/autoformattable.ui") , aStrTitle(SW_RES(STR_ADD_AUTOFORMAT_TITLE)) , aStrLabel(SW_RES(STR_ADD_AUTOFORMAT_LABEL)) @@ -150,12 +150,12 @@ SwAutoFormatDlg::SwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pWrtShell, , aStrDelTitle(SW_RES(STR_DEL_AUTOFORMAT_TITLE)) , aStrDelMsg(SW_RES(STR_DEL_AUTOFORMAT_MSG)) , aStrRenameTitle(SW_RES(STR_RENAME_AUTOFORMAT_TITLE)) - , aStrInvalidFmt(SW_RES(STR_INVALID_AUTOFORMAT_NAME)) + , aStrInvalidFormat(SW_RES(STR_INVALID_AUTOFORMAT_NAME)) , pShell(pWrtShell) , nIndex(0) , nDfltStylePos(0) , bCoreDataChanged(false) - , bSetAutoFmt(bAutoFormat) + , bSetAutoFormat(bAutoFormat) { get(m_pLbFormat, "formatlb"); get(m_pFormatting, "formatting"); @@ -173,10 +173,10 @@ SwAutoFormatDlg::SwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pWrtShell, m_pWndPreview->DetectRTL(pWrtShell); - pTableTbl = new SwTableAutoFmtTbl; - pTableTbl->Load(); + pTableTable = new SwTableAutoFormatTable; + pTableTable->Load(); - Init(pSelFmt); + Init(pSelFormat); } SwAutoFormatDlg::~SwAutoFormatDlg() @@ -187,8 +187,8 @@ SwAutoFormatDlg::~SwAutoFormatDlg() void SwAutoFormatDlg::dispose() { if (bCoreDataChanged) - pTableTbl->Save(); - delete pTableTbl; + pTableTable->Save(); + delete pTableTable; m_pLbFormat.clear(); m_pFormatting.clear(); m_pBtnNumFormat.clear(); @@ -205,7 +205,7 @@ void SwAutoFormatDlg::dispose() SfxModalDialog::dispose(); } -void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt ) +void SwAutoFormatDlg::Init( const SwTableAutoFormat* pSelFormat ) { Link<> aLk( LINK( this, SwAutoFormatDlg, CheckHdl ) ); m_pBtnBorder->SetClickHdl( aLk ); @@ -218,12 +218,12 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt ) m_pBtnRemove->SetClickHdl ( LINK( this, SwAutoFormatDlg, RemoveHdl ) ); m_pBtnRename->SetClickHdl ( LINK( this, SwAutoFormatDlg, RenameHdl ) ); m_pBtnOk->SetClickHdl ( LINK( this, SwAutoFormatDlg, OkHdl ) ); - m_pLbFormat->SetSelectHdl( LINK( this, SwAutoFormatDlg, SelFmtHdl ) ); + m_pLbFormat->SetSelectHdl( LINK( this, SwAutoFormatDlg, SelFormatHdl ) ); - m_pBtnAdd->Enable( bSetAutoFmt ); + m_pBtnAdd->Enable( bSetAutoFormat ); nIndex = 0; - if( !bSetAutoFmt ) + if( !bSetAutoFormat ) { // Then the list to be expanded by the entry "- none -". m_pLbFormat->InsertEntry( SwViewShell::GetShellRes()->aStrNone ); @@ -231,45 +231,45 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt ) nIndex = 255; } - for (sal_uInt8 i = 0, nCount = static_cast<sal_uInt8>(pTableTbl->size()); + for (sal_uInt8 i = 0, nCount = static_cast<sal_uInt8>(pTableTable->size()); i < nCount; i++) { - SwTableAutoFmt const& rFmt = (*pTableTbl)[ i ]; - m_pLbFormat->InsertEntry(rFmt.GetName()); - if (pSelFmt && rFmt.GetName() == pSelFmt->GetName()) + SwTableAutoFormat const& rFormat = (*pTableTable)[ i ]; + m_pLbFormat->InsertEntry(rFormat.GetName()); + if (pSelFormat && rFormat.GetName() == pSelFormat->GetName()) nIndex = i; } m_pLbFormat->SelectEntryPos( 255 != nIndex ? (nDfltStylePos + nIndex) : 0 ); - SelFmtHdl( 0 ); + SelFormatHdl( 0 ); } -void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, bool bEnable ) +void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFormat& rFormat, bool bEnable ) { m_pBtnNumFormat->Enable( bEnable ); - m_pBtnNumFormat->Check( rFmt.IsValueFormat() ); + m_pBtnNumFormat->Check( rFormat.IsValueFormat() ); m_pBtnBorder->Enable( bEnable ); - m_pBtnBorder->Check( rFmt.IsFrame() ); + m_pBtnBorder->Check( rFormat.IsFrame() ); m_pBtnFont->Enable( bEnable ); - m_pBtnFont->Check( rFmt.IsFont() ); + m_pBtnFont->Check( rFormat.IsFont() ); m_pBtnPattern->Enable( bEnable ); - m_pBtnPattern->Check( rFmt.IsBackground() ); + m_pBtnPattern->Check( rFormat.IsBackground() ); m_pBtnAlignment->Enable( bEnable ); - m_pBtnAlignment->Check( rFmt.IsJustify() ); + m_pBtnAlignment->Check( rFormat.IsJustify() ); } -void SwAutoFormatDlg::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const +void SwAutoFormatDlg::FillAutoFormatOfIndex( SwTableAutoFormat*& rToFill ) const { if( 255 != nIndex ) { if( rToFill ) - *rToFill = (*pTableTbl)[ nIndex ]; + *rToFill = (*pTableTable)[ nIndex ]; else - rToFill = new SwTableAutoFmt( (*pTableTbl)[ nIndex ] ); + rToFill = new SwTableAutoFormat( (*pTableTable)[ nIndex ] ); } else delete rToFill, rToFill = 0; @@ -279,7 +279,7 @@ void SwAutoFormatDlg::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) { - SwTableAutoFmt* pData = &(*pTableTbl)[nIndex]; + SwTableAutoFormat* pData = &(*pTableTable)[nIndex]; bool bCheck = static_cast<CheckBox*>(pBtn)->IsChecked(), bDataChgd = true; if( pBtn == m_pBtnNumFormat ) @@ -310,7 +310,7 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl) { - bool bOk = false, bFmtInserted = false; + bool bOk = false, bFormatInserted = false; while( !bOk ) { VclPtrInstance<SwStringInputDlg> pDlg( this, aStrTitle, @@ -322,26 +322,26 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl) if ( !aFormatName.isEmpty() ) { size_t n; - for( n = 0; n < pTableTbl->size(); ++n ) - if( (*pTableTbl)[n].GetName() == aFormatName ) + for( n = 0; n < pTableTable->size(); ++n ) + if( (*pTableTable)[n].GetName() == aFormatName ) break; - if( n >= pTableTbl->size() ) + if( n >= pTableTable->size() ) { // Format with the name does not already exist, so take up. - SwTableAutoFmt* pNewData = new - SwTableAutoFmt( aFormatName ); - pShell->GetTableAutoFmt( *pNewData ); + SwTableAutoFormat* pNewData = new + SwTableAutoFormat( aFormatName ); + pShell->GetTableAutoFormat( *pNewData ); // Insert sorted!! - for( n = 1; n < pTableTbl->size(); ++n ) - if( (*pTableTbl)[ n ].GetName() > aFormatName ) + for( n = 1; n < pTableTable->size(); ++n ) + if( (*pTableTable)[ n ].GetName() > aFormatName ) break; - pTableTbl->InsertAutoFmt(n, pNewData); + pTableTable->InsertAutoFormat(n, pNewData); m_pLbFormat->InsertEntry( aFormatName, nDfltStylePos + n ); m_pLbFormat->SelectEntryPos( nDfltStylePos + n ); - bFmtInserted = true; + bFormatInserted = true; m_pBtnAdd->Enable( false ); if ( !bCoreDataChanged ) { @@ -349,14 +349,14 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl) bCoreDataChanged = true; } - SelFmtHdl( 0 ); + SelFormatHdl( 0 ); bOk = true; } } - if( !bFmtInserted ) + if( !bFormatInserted ) { - bOk = RET_CANCEL == MessageDialog(this, aStrInvalidFmt, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL) + bOk = RET_CANCEL == MessageDialog(this, aStrInvalidFormat, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL) .Execute(); } } @@ -381,7 +381,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl) m_pLbFormat->RemoveEntry( nDfltStylePos + nIndex ); m_pLbFormat->SelectEntryPos( nDfltStylePos + nIndex-1 ); - pTableTbl->EraseAutoFmt(nIndex); + pTableTable->EraseAutoFormat(nIndex); nIndex--; if( !nIndex ) @@ -398,7 +398,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl) } pBox.reset(); - SelFmtHdl( 0 ); + SelFormatHdl( 0 ); return 0; } @@ -413,32 +413,32 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl) OUString() ); if( pDlg->Execute() == RET_OK ) { - bool bFmtRenamed = false; + bool bFormatRenamed = false; const OUString aFormatName( pDlg->GetInputString() ); if ( !aFormatName.isEmpty() ) { size_t n; - for( n = 0; n < pTableTbl->size(); ++n ) - if ((*pTableTbl)[n].GetName() == aFormatName) + for( n = 0; n < pTableTable->size(); ++n ) + if ((*pTableTable)[n].GetName() == aFormatName) break; - if( n >= pTableTbl->size() ) + if( n >= pTableTable->size() ) { // no format with this name exists, so rename it m_pLbFormat->RemoveEntry( nDfltStylePos + nIndex ); - SwTableAutoFmt* p = pTableTbl->ReleaseAutoFmt( nIndex ); + SwTableAutoFormat* p = pTableTable->ReleaseAutoFormat( nIndex ); p->SetName( aFormatName ); // keep all arrays sorted! - for( n = 1; n < pTableTbl->size(); ++n ) - if ((*pTableTbl)[n].GetName() > aFormatName) + for( n = 1; n < pTableTable->size(); ++n ) + if ((*pTableTable)[n].GetName() > aFormatName) { break; } - pTableTbl->InsertAutoFmt( n, p ); + pTableTable->InsertAutoFormat( n, p ); m_pLbFormat->InsertEntry( aFormatName, nDfltStylePos + n ); m_pLbFormat->SelectEntryPos( nDfltStylePos + n ); @@ -448,15 +448,15 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl) bCoreDataChanged = true; } - SelFmtHdl( 0 ); + SelFormatHdl( 0 ); bOk = true; - bFmtRenamed = true; + bFormatRenamed = true; } } - if( !bFmtRenamed ) + if( !bFormatRenamed ) { - bOk = RET_CANCEL == MessageDialog(this, aStrInvalidFmt, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL) + bOk = RET_CANCEL == MessageDialog(this, aStrInvalidFormat, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL) .Execute(); } } @@ -466,22 +466,22 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl) return 0; } -IMPL_LINK_NOARG(SwAutoFormatDlg, SelFmtHdl) +IMPL_LINK_NOARG(SwAutoFormatDlg, SelFormatHdl) { bool bBtnEnable = false; sal_uInt8 nSelPos = (sal_uInt8) m_pLbFormat->GetSelectEntryPos(), nOldIdx = nIndex; if( nSelPos >= nDfltStylePos ) { nIndex = nSelPos - nDfltStylePos; - m_pWndPreview->NotifyChange( (*pTableTbl)[nIndex] ); + m_pWndPreview->NotifyChange( (*pTableTable)[nIndex] ); bBtnEnable = 0 != nIndex; - UpdateChecks( (*pTableTbl)[nIndex], true ); + UpdateChecks( (*pTableTable)[nIndex], true ); } else { nIndex = 255; - SwTableAutoFmt aTmp( SwViewShell::GetShellRes()->aStrNone ); + SwTableAutoFormat aTmp( SwViewShell::GetShellRes()->aStrNone ); aTmp.SetFont( false ); aTmp.SetJustify( false ); aTmp.SetFrame( false ); @@ -502,13 +502,13 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, SelFmtHdl) IMPL_LINK_NOARG(SwAutoFormatDlg, OkHdl) { - if( bSetAutoFmt ) - pShell->SetTableAutoFmt( (*pTableTbl)[ nIndex ] ); + if( bSetAutoFormat ) + pShell->SetTableAutoFormat( (*pTableTable)[ nIndex ] ); EndDialog( RET_OK ); return sal_IntPtr(true); } -AutoFmtPreview::AutoFmtPreview(vcl::Window* pParent, WinBits nStyle) : +AutoFormatPreview::AutoFormatPreview(vcl::Window* pParent, WinBits nStyle) : Window ( pParent, nStyle ), aCurData ( OUString() ), aVD ( VclPtr<VirtualDevice>::Create(*this) ), @@ -524,21 +524,21 @@ AutoFmtPreview::AutoFmtPreview(vcl::Window* pParent, WinBits nStyle) : { uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); m_xBreak = i18n::BreakIterator::create(xContext); - pNumFmt = new SvNumberFormatter( xContext, LANGUAGE_SYSTEM ); + pNumFormat = new SvNumberFormatter( xContext, LANGUAGE_SYSTEM ); Init(); } -VCL_BUILDER_DECL_FACTORY(AutoFmtPreview) +VCL_BUILDER_DECL_FACTORY(AutoFormatPreview) { WinBits nWinStyle = 0; OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - rRet = VclPtr<AutoFmtPreview>::Create(pParent, nWinStyle); + rRet = VclPtr<AutoFormatPreview>::Create(pParent, nWinStyle); } -void AutoFmtPreview::Resize() +void AutoFormatPreview::Resize() { aPrvSize = Size(GetSizePixel().Width() - 6, GetSizePixel().Height() - 30); nLabelColWidth = (aPrvSize.Width() - 4) / 4 - 12; @@ -548,22 +548,22 @@ void AutoFmtPreview::Resize() NotifyChange(aCurData); } -void AutoFmtPreview::DetectRTL(SwWrtShell* pWrtShell) +void AutoFormatPreview::DetectRTL(SwWrtShell* pWrtShell) { - if (!pWrtShell->IsCrsrInTbl()) // We haven't created the table yet + if (!pWrtShell->IsCrsrInTable()) // We haven't created the table yet mbRTL = AllSettings::GetLayoutRTL(); else mbRTL = pWrtShell->IsTableRightToLeft(); } -AutoFmtPreview::~AutoFmtPreview() +AutoFormatPreview::~AutoFormatPreview() { disposeOnce(); } -void AutoFmtPreview::dispose() +void AutoFormatPreview::dispose() { - delete pNumFmt; + delete pNumFormat; vcl::Window::dispose(); } @@ -587,30 +587,30 @@ rFont.MethodName( Value ); \ rCJKFont.MethodName( Value ); \ rCTLFont.MethodName( Value ); -void AutoFmtPreview::MakeFonts( sal_uInt8 nIndex, vcl::Font& rFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont ) +void AutoFormatPreview::MakeFonts( sal_uInt8 nIndex, vcl::Font& rFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont ) { - const SwBoxAutoFmt& rBoxFmt = aCurData.GetBoxFmt( nIndex ); + const SwBoxAutoFormat& rBoxFormat = aCurData.GetBoxFormat( nIndex ); rFont = rCJKFont = rCTLFont = GetFont(); Size aFontSize( rFont.GetSize().Width(), 10 * GetDPIScaleFactor() ); - lcl_SetFontProperties( rFont, rBoxFmt.GetFont(), rBoxFmt.GetWeight(), rBoxFmt.GetPosture() ); - lcl_SetFontProperties( rCJKFont, rBoxFmt.GetCJKFont(), rBoxFmt.GetCJKWeight(), rBoxFmt.GetCJKPosture() ); - lcl_SetFontProperties( rCTLFont, rBoxFmt.GetCTLFont(), rBoxFmt.GetCTLWeight(), rBoxFmt.GetCTLPosture() ); + lcl_SetFontProperties( rFont, rBoxFormat.GetFont(), rBoxFormat.GetWeight(), rBoxFormat.GetPosture() ); + lcl_SetFontProperties( rCJKFont, rBoxFormat.GetCJKFont(), rBoxFormat.GetCJKWeight(), rBoxFormat.GetCJKPosture() ); + lcl_SetFontProperties( rCTLFont, rBoxFormat.GetCTLFont(), rBoxFormat.GetCTLWeight(), rBoxFormat.GetCTLPosture() ); - SETONALLFONTS( SetUnderline, (FontUnderline)rBoxFmt.GetUnderline().GetValue() ); - SETONALLFONTS( SetOverline, (FontUnderline)rBoxFmt.GetOverline().GetValue() ); - SETONALLFONTS( SetStrikeout, (FontStrikeout)rBoxFmt.GetCrossedOut().GetValue() ); - SETONALLFONTS( SetOutline, rBoxFmt.GetContour().GetValue() ); - SETONALLFONTS( SetShadow, rBoxFmt.GetShadowed().GetValue() ); - SETONALLFONTS( SetColor, rBoxFmt.GetColor().GetValue() ); + SETONALLFONTS( SetUnderline, (FontUnderline)rBoxFormat.GetUnderline().GetValue() ); + SETONALLFONTS( SetOverline, (FontUnderline)rBoxFormat.GetOverline().GetValue() ); + SETONALLFONTS( SetStrikeout, (FontStrikeout)rBoxFormat.GetCrossedOut().GetValue() ); + SETONALLFONTS( SetOutline, rBoxFormat.GetContour().GetValue() ); + SETONALLFONTS( SetShadow, rBoxFormat.GetShadowed().GetValue() ); + SETONALLFONTS( SetColor, rBoxFormat.GetColor().GetValue() ); SETONALLFONTS( SetSize, aFontSize ); SETONALLFONTS( SetTransparent, true ); } -sal_uInt8 AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const +sal_uInt8 AutoFormatPreview::GetFormatIndex( size_t nCol, size_t nRow ) const { - static const sal_uInt8 pnFmtMap[] = + static const sal_uInt8 pnFormatMap[] = { 0, 1, 2, 1, 3, 4, 5, 6, 5, 7, @@ -618,15 +618,15 @@ sal_uInt8 AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const 4, 5, 6, 5, 7, 12, 13, 14, 13, 15 }; - return pnFmtMap[ maArray.GetCellIndex( nCol, nRow, mbRTL ) ]; + return pnFormatMap[ maArray.GetCellIndex( nCol, nRow, mbRTL ) ]; } -const SvxBoxItem& AutoFmtPreview::GetBoxItem( size_t nCol, size_t nRow ) const +const SvxBoxItem& AutoFormatPreview::GetBoxItem( size_t nCol, size_t nRow ) const { - return aCurData.GetBoxFmt( GetFormatIndex( nCol, nRow ) ).GetBox(); + return aCurData.GetBoxFormat( GetFormatIndex( nCol, nRow ) ).GetBox(); } -void AutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCol, size_t nRow) +void AutoFormatPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCol, size_t nRow) { // Output of the cell text: sal_uLong nNum; @@ -701,17 +701,17 @@ void AutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCol, MAKENUMSTR: if (aCurData.IsValueFormat()) { - OUString sFmt; + OUString sFormat; LanguageType eLng, eSys; - aCurData.GetBoxFmt(sal_uInt8(nNum)).GetValueFormat(sFmt, eLng, eSys); + aCurData.GetBoxFormat(sal_uInt8(nNum)).GetValueFormat(sFormat, eLng, eSys); short nType; bool bNew; sal_Int32 nCheckPos; - sal_uInt32 nKey = pNumFmt->GetIndexPuttingAndConverting(sFmt, eLng, + sal_uInt32 nKey = pNumFormat->GetIndexPuttingAndConverting(sFormat, eLng, eSys, nType, bNew, nCheckPos); Color* pDummy; - pNumFmt->GetOutputString(nVal, nKey, cellString, &pDummy); + pNumFormat->GetOutputString(nVal, nKey, cellString, &pDummy); } else cellString = OUString::number(sal_Int32(nVal)); @@ -723,7 +723,7 @@ MAKENUMSTR: { SvtScriptedTextHelper aScriptedText(rRenderContext); Size aStrSize; - sal_uInt8 nFmtIndex = GetFormatIndex( nCol, nRow ); + sal_uInt8 nFormatIndex = GetFormatIndex( nCol, nRow ); Rectangle cellRect = maArray.GetCellRect( nCol, nRow ); Point aPos = cellRect.TopLeft(); long nRightX = 0; @@ -733,7 +733,7 @@ MAKENUMSTR: if (aCurData.IsFont()) { vcl::Font aFont, aCJKFont, aCTLFont; - MakeFonts(nFmtIndex, aFont, aCJKFont, aCTLFont); + MakeFonts(nFormatIndex, aFont, aCJKFont, aCTLFont); aScriptedText.SetFonts(&aFont, &aCJKFont, &aCTLFont); } else @@ -770,7 +770,7 @@ MAKENUMSTR: aPos.X() += nRightX; else if (aCurData.IsJustify()) { - const SvxAdjustItem& rAdj = aCurData.GetBoxFmt(nFmtIndex).GetAdjust(); + const SvxAdjustItem& rAdj = aCurData.GetBoxFormat(nFormatIndex).GetAdjust(); switch (rAdj.GetAdjust()) { case SVX_ADJUST_LEFT: @@ -805,20 +805,20 @@ MAKENUMSTR: #undef FRAME_OFFSET -void AutoFmtPreview::DrawStrings(vcl::RenderContext& rRenderContext) +void AutoFormatPreview::DrawStrings(vcl::RenderContext& rRenderContext) { for (size_t nRow = 0; nRow < 5; ++nRow) for (size_t nCol = 0; nCol < 5; ++nCol) DrawString(rRenderContext, nCol, nRow); } -void AutoFmtPreview::DrawBackground(vcl::RenderContext& rRenderContext) +void AutoFormatPreview::DrawBackground(vcl::RenderContext& rRenderContext) { for (size_t nRow = 0; nRow < 5; ++nRow) { for (size_t nCol = 0; nCol < 5; ++nCol) { - SvxBrushItem aBrushItem(aCurData.GetBoxFmt(GetFormatIndex(nCol, nRow)).GetBackground()); + SvxBrushItem aBrushItem(aCurData.GetBoxFormat(GetFormatIndex(nCol, nRow)).GetBackground()); rRenderContext.Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR); rRenderContext.SetLineColor(); @@ -829,7 +829,7 @@ void AutoFmtPreview::DrawBackground(vcl::RenderContext& rRenderContext) } } -void AutoFmtPreview::PaintCells(vcl::RenderContext& rRenderContext) +void AutoFormatPreview::PaintCells(vcl::RenderContext& rRenderContext) { // 1) background if (aCurData.IsBackground()) @@ -843,7 +843,7 @@ void AutoFmtPreview::PaintCells(vcl::RenderContext& rRenderContext) maArray.DrawArray(rRenderContext); } -void AutoFmtPreview::Init() +void AutoFormatPreview::Init() { SetBorderStyle( GetBorderStyle() | WindowBorderStyle::MONO ); maArray.Initialize( 5, 5 ); @@ -852,7 +852,7 @@ void AutoFmtPreview::Init() CalcLineMap(); } -void AutoFmtPreview::CalcCellArray( bool _bFitWidth ) +void AutoFormatPreview::CalcCellArray( bool _bFitWidth ) { maArray.SetXOffset( 2 ); maArray.SetAllColWidths( _bFitWidth ? nDataColWidth2 : nDataColWidth1 ); @@ -871,7 +871,7 @@ inline void lclSetStyleFromBorder( svx::frame::Style& rStyle, const ::editeng::S rStyle.Set( pBorder, 0.05, 5 ); } -void AutoFmtPreview::CalcLineMap() +void AutoFormatPreview::CalcLineMap() { for( size_t nRow = 0; nRow < 5; ++nRow ) { @@ -898,7 +898,7 @@ void AutoFmtPreview::CalcLineMap() } } -void AutoFmtPreview::NotifyChange( const SwTableAutoFmt& rNewData ) +void AutoFormatPreview::NotifyChange( const SwTableAutoFormat& rNewData ) { aCurData = rNewData; bFitWidth = aCurData.IsJustify(); // true; //??? @@ -907,7 +907,7 @@ void AutoFmtPreview::NotifyChange( const SwTableAutoFmt& rNewData ) Invalidate(Rectangle(Point(0,0), GetSizePixel())); } -void AutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) +void AutoFormatPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) { DrawModeFlags nOldDrawMode = aVD->GetDrawMode(); if (rRenderContext.GetSettings().GetStyleSettings().GetHighContrastMode()) @@ -953,7 +953,7 @@ void AutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectangle aVD->SetDrawMode(nOldDrawMode); } -void AutoFmtPreview::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) +void AutoFormatPreview::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) { DoPaint(rRenderContext, rRect); } diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index 10240811336a..23074c8093ee 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -798,8 +798,8 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException, s if( xTextTable.is() ) { uno::Reference< css::text::XTextDocument > xTextDoc( mxModel, uno::UNO_QUERY_THROW ); - uno::Reference< word::XTable > xVBATbl = new SwVbaTable( mxParent, mxContext, xTextDoc, xTextTable ); - aRet <<= xVBATbl; + uno::Reference< word::XTable > xVBATable = new SwVbaTable( mxParent, mxContext, xTextDoc, xTextTable ); + aRet <<= xVBATable; return aRet; } @@ -812,13 +812,13 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException, s SwXTextTableCursor* pTTCursor = dynamic_cast< SwXTextTableCursor* >( xTextTableCursor.get() ); if ( pTTCursor ) { - SwFrmFmt* pFmt = pTTCursor->GetFrmFmt(); - if ( pFmt ) + SwFrameFormat* pFormat = pTTCursor->GetFrameFormat(); + if ( pFormat ) { - uno::Reference< text::XTextTable > xTbl = SwXTextTables::GetObject(*pFmt); + uno::Reference< text::XTextTable > xTable = SwXTextTables::GetObject(*pFormat); uno::Reference< css::text::XTextDocument > xTextDoc( mxModel, uno::UNO_QUERY_THROW ); - uno::Reference< word::XTable > xVBATbl = new SwVbaTable( mxParent, mxContext, xTextDoc, xTbl ); - aRet <<= xVBATbl; + uno::Reference< word::XTable > xVBATable = new SwVbaTable( mxParent, mxContext, xTextDoc, xTable ); + aRet <<= xVBATable; } } return aRet; diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index bb174d1ede0b..755ecd899b87 100644 --- a/sw/source/ui/vba/vbatablehelper.cxx +++ b/sw/source/ui/vba/vbatablehelper.cxx @@ -38,18 +38,18 @@ SwTable* SwVbaTableHelper::GetSwTable( const uno::Reference< text::XTextTable >& if( !pXTextTable ) throw uno::RuntimeException(); - SwFrmFmt* pFrmFmt = pXTextTable->GetFrmFmt(); - if( !pFrmFmt ) + SwFrameFormat* pFrameFormat = pXTextTable->GetFrameFormat(); + if( !pFrameFormat ) throw uno::RuntimeException(); - SwTable* pTable = SwTable::FindTable( pFrmFmt ); + SwTable* pTable = SwTable::FindTable( pFrameFormat ); return pTable; } sal_Int32 SwVbaTableHelper::getTabColumnsCount( sal_Int32 nRowIndex ) throw (uno::RuntimeException) { sal_Int32 nRet = 0; - if(!pTable->IsTblComplex()) + if(!pTable->IsTableComplex()) { SwTableLines& rLines = pTable->GetTabLines(); SwTableLine* pLine = rLines[ nRowIndex ]; @@ -76,7 +76,7 @@ sal_Int32 SwVbaTableHelper::getTabRowIndex( const OUString& CellName ) throw (un { sal_Int32 nRet = 0; OUString sCellName(CellName); - SwTableBox* pBox = const_cast<SwTableBox*>(pTable->GetTblBox( sCellName )); + SwTableBox* pBox = const_cast<SwTableBox*>(pTable->GetTableBox( sCellName )); if( !pBox ) throw uno::RuntimeException(); @@ -91,7 +91,7 @@ sal_Int32 SwVbaTableHelper::getTabColIndex( const OUString& CellName ) throw (un { sal_Int32 nRet = 0; OUString sCellName(CellName); - const SwTableBox* pBox = pTable->GetTblBox( sCellName ); + const SwTableBox* pBox = pTable->GetTableBox( sCellName ); if( !pBox ) throw uno::RuntimeException(); const SwTableBoxes* pBoxes = &pBox->GetUpper()->GetTabBoxes(); |