diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-12-01 17:30:38 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-12-01 17:30:38 +0000 |
commit | b5d79ba0c2c3a07331406eb0f3bbb3d40986320f (patch) | |
tree | 316e92b8935ce9711ca450c054511b9a0bca764f /sw/source/ui/fldui | |
parent | eb1e977a36bfeebf17c57a167238c610c74be783 (diff) | |
parent | 5edc2d8ffaf658b05e4b044e44bd360697c3d08c (diff) |
chartshapes: merge with DEV300 m50
Diffstat (limited to 'sw/source/ui/fldui')
-rw-r--r-- | sw/source/ui/fldui/fldedt.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 44 |
2 files changed, 22 insertions, 26 deletions
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index fbb25cdb9fce..c0ee8f2e0a98 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -409,7 +409,9 @@ IMPL_LINK( SwFldEditDlg, AddressHdl, PushButton *, EMPTYARG ) SwAbstractDialogFactory* pFact = swui::GetFactory(); DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); - AbstractSfxSingleTabDialog* pDlg = pFact->CreateSfxSingleTabDialog( this, aSet, RC_DLG_ADDR ); + SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aSet, + pSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface(), + RC_DLG_ADDR ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if(RET_OK == pDlg->Execute()) { diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 5f3c1bc4fd72..24c025fb55d8 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -39,7 +39,7 @@ #include "swtypes.hxx" #include <view.hxx> -#include <bookmrk.hxx> +#include <IMark.hxx> #include <expfld.hxx> #include <swmodule.hxx> #ifndef _FLDREF_HXX @@ -59,7 +59,8 @@ #endif // --> OD 2007-11-14 #i83479# #include <SwNodeNum.hxx> -#include <IDocumentBookmarkAccess.hxx> +#include <IDocumentMarkAccess.hxx> +#include <ndtxt.hxx> // <-- // sw/inc/expfld.hxx @@ -78,6 +79,8 @@ USHORT nFldDlgFmtSel = 0; #define USER_DATA_VERSION_1 "1" #define USER_DATA_VERSION USER_DATA_VERSION_1 + + /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ @@ -544,11 +547,14 @@ void SwFldRefPage::UpdateSubType() { aSelectionLB.SetStyle(aSelectionLB.GetStyle()|WB_SORT); // alle Textmarken besorgen - USHORT nCnt = pSh->GetBookmarkCnt(TRUE); - for( USHORT n = 0; n < nCnt; ++n ) + IDocumentMarkAccess* const pMarkAccess = pSh->getIDocumentMarkAccess(); + for(IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getBookmarksBegin(); + ppMark != pMarkAccess->getBookmarksEnd(); + ppMark++) { - const SwBookmark& rBkmk = pSh->GetBookmark( n, TRUE ); - aSelectionLB.InsertEntry( rBkmk.GetName() ); + const ::sw::mark::IMark* pBkmk = ppMark->get(); + if(IDocumentMarkAccess::BOOKMARK == IDocumentMarkAccess::GetType(*pBkmk)) + aSelectionLB.InsertEntry( pBkmk->GetName() ); } if (IsFldEdit()) sOldSel = pRefFld->GetSetRefName(); @@ -952,16 +958,10 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) pSh->getIDocumentOutlineNodesAccess()->getOutlineNodes( maOutlineNodes ); if ( nOutlIdx < maOutlineNodes.size() ) { - IDocumentBookmarkAccess* pIDoc = pSh->getIDocumentBookmarkAccess(); - aName = pIDoc->getCrossRefBookmarkName( - *(maOutlineNodes[nOutlIdx]), - IDocumentBookmarkAccess::HEADING ); - if ( aName.Len() == 0 ) - { - aName = pIDoc->makeCrossRefBookmark( - *(maOutlineNodes[nOutlIdx]), - IDocumentBookmarkAccess::HEADING ); - } + ::sw::mark::IMark const * const pMark = pSh->getIDocumentMarkAccess()->getMarkForTxtNode( + *(maOutlineNodes[nOutlIdx]), + IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK); + aName = pMark->GetName(); nTypeId = TYP_GETREFFLD; nSubType = REF_BOOKMARK; } @@ -978,16 +978,10 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& ) pSh->getIDocumentListItemsAccess()->getNumItems( maNumItems ); if ( nNumItemIdx < maNumItems.size() ) { - IDocumentBookmarkAccess* pIDoc = pSh->getIDocumentBookmarkAccess(); - aName = pIDoc->getCrossRefBookmarkName( + ::sw::mark::IMark const * const pMark = pSh->getIDocumentMarkAccess()->getMarkForTxtNode( *(maNumItems[nNumItemIdx]->GetTxtNode()), - IDocumentBookmarkAccess::NUMITEM ); - if ( aName.Len() == 0 ) - { - aName = pIDoc->makeCrossRefBookmark( - *(maNumItems[nNumItemIdx]->GetTxtNode()), - IDocumentBookmarkAccess::NUMITEM ); - } + IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK); + aName = pMark->GetName(); nTypeId = TYP_GETREFFLD; nSubType = REF_BOOKMARK; } |