diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-05-20 13:05:49 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-05-20 13:05:49 +0200 |
commit | ab465b90f6c6da5595393a0ba73f33a1e71a2b65 (patch) | |
tree | 36b77192de2799a11b4bf0b269cb3f74d0a0bb1f /sw/source/ui/fldui | |
parent | 0db96caf0fcce09b87621c11b584a6d81cc7df86 (diff) |
bin/rename-sw-abbreviations.sh
libreoffice-5-0-branch-point
renames the most annoying abbreviations in Writer (and partially
in the shared code too).
Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
Diffstat (limited to 'sw/source/ui/fldui')
-rw-r--r-- | sw/source/ui/fldui/DropDownFieldDialog.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/FldRefTreeListBox.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/fldui/FldRefTreeListBox.hxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/changedb.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddb.cxx | 94 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddb.hxx | 8 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddinf.cxx | 70 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddinf.hxx | 6 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddok.cxx | 132 | ||||
-rw-r--r-- | sw/source/ui/fldui/flddok.hxx | 6 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldedt.cxx | 112 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldfunc.cxx | 120 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldfunc.hxx | 6 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldpage.cxx | 102 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldpage.hxx | 24 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 300 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldref.hxx | 24 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldtdlg.cxx | 52 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldvar.cxx | 244 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldvar.hxx | 8 | ||||
-rw-r--r-- | sw/source/ui/fldui/inpdlg.cxx | 56 | ||||
-rw-r--r-- | sw/source/ui/fldui/javaedit.cxx | 28 |
22 files changed, 706 insertions, 706 deletions
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) |