diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:59:29 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:59:29 +0100 |
commit | 5a267de99f19bdab857429a81ffcfbb4d06f5bbd (patch) | |
tree | 1425ce2404af0e2542e1be0dca3821600f5b82a8 /sw/source/core/unocore/unoobj2.cxx | |
parent | 3bb681a344beb911d92b48469afbd0ccc51db1dd (diff) | |
parent | 99ebfb7335c333a77910b1059b7b41fb34ff0899 (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
starmath/source/symbol.cxx
sw/source/core/doc/docnew.cxx
sw/source/core/doc/docnum.cxx
sw/source/core/draw/dview.cxx
sw/source/core/fields/docufld.cxx
sw/source/core/layout/calcmove.cxx
sw/source/filter/html/swhtml.cxx
sw/source/filter/rtf/rtftbl.cxx
sw/source/ui/config/modcfg.cxx
sw/source/ui/dialog/docstdlg.cxx
sw/source/ui/dialog/docstdlg.src
sw/source/ui/fldui/flddb.cxx
sw/source/ui/fldui/flddinf.cxx
sw/source/ui/fldui/flddok.cxx
sw/source/ui/fldui/fldfunc.cxx
sw/source/ui/fldui/fldmgr.cxx
sw/source/ui/fldui/fldpage.hxx
sw/source/ui/fldui/fldref.cxx
sw/source/ui/fldui/fldvar.cxx
sw/source/ui/fldui/fldvar.hxx
sw/source/ui/fldui/fldwrap.cxx
sw/source/ui/fldui/xfldui.cxx
sw/source/ui/inc/docstdlg.hxx
sw/source/ui/shells/langhelper.cxx
sw/source/ui/shells/txtattr.cxx
sw/source/ui/shells/txtcrsr.cxx
sw/source/ui/table/tabledlg.cxx
Diffstat (limited to 'sw/source/core/unocore/unoobj2.cxx')
-rw-r--r-- | sw/source/core/unocore/unoobj2.cxx | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index d810112b1dec..b64d3141f32a 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -38,6 +38,7 @@ #include <bookmrk.hxx> #include <frmfmt.hxx> #include <doc.hxx> +#include <IDocumentUndoRedo.hxx> #include <ndtxt.hxx> #include <ndnotxt.hxx> #include <unocrsr.hxx> @@ -200,14 +201,14 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, const bool _bAtCharAnchoredObjs ) { // _bAtCharAnchoredObjs: - // <TRUE>: at-character anchored objects are collected - // <FALSE>: at-paragraph anchored objects are collected + // <sal_True>: at-character anchored objects are collected + // <sal_False>: at-paragraph anchored objects are collected // alle Rahmen, Grafiken und OLEs suchen, die an diesem Absatz // gebunden sind SwDoc* pDoc = rIdx.GetNode().GetDoc(); - USHORT nChkType = static_cast< USHORT >((_bAtCharAnchoredObjs) + sal_uInt16 nChkType = static_cast< sal_uInt16 >((_bAtCharAnchoredObjs) ? FLY_AT_CHAR : FLY_AT_PARA); const SwCntntFrm* pCFrm; const SwCntntNode* pCNd; @@ -217,7 +218,7 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, { const SwSortedObjs *pObjs = pCFrm->GetDrawObjs(); if( pObjs ) - for( USHORT i = 0; i < pObjs->Count(); ++i ) + for( sal_uInt16 i = 0; i < pObjs->Count(); ++i ) { SwAnchoredObject* pAnchoredObj = (*pObjs)[i]; SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt(); @@ -239,8 +240,8 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, else { const SwSpzFrmFmts& rFmts = *pDoc->GetSpzFrmFmts(); - USHORT nSize = rFmts.Count(); - for ( USHORT i = 0; i < nSize; i++) + sal_uInt16 nSize = rFmts.Count(); + for ( sal_uInt16 i = 0; i < nSize; i++) { const SwFrmFmt* pFmt = rFmts[ i ]; const SwFmtAnchor& rAnchor = pFmt->GetAnchor(); @@ -342,7 +343,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam, UnoActionContext aAction(pDoc); if (rPam.GetNext() != &rPam) // Ring of Cursors { - pDoc->StartUndo(UNDO_INSATTR, NULL); + pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL); SwPaM *pCurrent = &rPam; do @@ -356,7 +357,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam, pCurrent= static_cast<SwPaM *>(pCurrent->GetNext()); } while (pCurrent != &rPam); - pDoc->EndUndo(UNDO_INSATTR, NULL); + pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, NULL); } else { @@ -390,8 +391,8 @@ void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam, { SwPosition const & rStart( *pCurrent->Start() ); SwPosition const & rEnd( *pCurrent->End() ); - const ULONG nSttNd = rStart.nNode.GetIndex(); - const ULONG nEndNd = rEnd .nNode.GetIndex(); + const sal_uLong nSttNd = rStart.nNode.GetIndex(); + const sal_uLong nEndNd = rEnd .nNode.GetIndex(); if (nEndNd - nSttNd >= nMaxLookup) { @@ -402,7 +403,7 @@ void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam, // the first node inserts the values into the get set // all other nodes merge their values into the get set - for (ULONG n = nSttNd; n <= nEndNd; ++n) + for (sal_uLong n = nSttNd; n <= nEndNd; ++n) { SwNode *const pNd = rPam.GetDoc()->GetNodes()[ n ]; switch (pNd->GetNodeType()) @@ -461,7 +462,7 @@ public: /// embedded tables. SwStartNode const*const m_pOwnStartNode; SwTable const*const m_pOwnTable; - const ULONG m_nEndIndex; + const sal_uLong m_nEndIndex; sal_Int32 m_nFirstParaStart; sal_Int32 m_nLastParaEnd; bool m_bFirstParagraph; @@ -881,7 +882,7 @@ throw (uno::RuntimeException) if (GetPositions(aCursor)) { UnoActionContext aAction(& m_pImpl->m_rDoc); - m_pImpl->m_rDoc.StartUndo(UNDO_INSERT, NULL); + m_pImpl->m_rDoc.GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL); if (aCursor.HasMark()) { m_pImpl->m_rDoc.DeleteAndJoin(aCursor); @@ -893,10 +894,10 @@ throw (uno::RuntimeException) m_pImpl->m_rDoc, aCursor, rText, bForceExpandHints); SwUnoCursorHelper::SelectPam(aCursor, true); - aCursor.Left(rText.getLength(), CRSR_SKIP_CHARS, FALSE, FALSE); + aCursor.Left(rText.getLength(), CRSR_SKIP_CHARS, sal_False, sal_False); } SetPositions(aCursor); - m_pImpl->m_rDoc.EndUndo(UNDO_INSERT, NULL); + m_pImpl->m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL); } } @@ -1150,7 +1151,7 @@ lcl_IsStartNodeInFormat(const bool bHeader, SwStartNode *const pSttNode, const SfxItemSet& rSet = pFrmFmt->GetAttrSet(); const SfxPoolItem* pItem; if (SFX_ITEM_SET == rSet.GetItemState( - static_cast<USHORT>(bHeader ? RES_HEADER : RES_FOOTER), + static_cast<sal_uInt16>(bHeader ? RES_HEADER : RES_FOOTER), sal_True, &pItem)) { SfxPoolItem *const pItemNonConst(const_cast<SfxPoolItem *>(pItem)); @@ -1319,7 +1320,7 @@ throw (uno::RuntimeException) } const SwPosition aPos(GetDoc()->GetNodes().GetEndOfContent()); const ::std::auto_ptr<SwUnoCrsr> pNewCrsr( - m_pImpl->m_rDoc.CreateUnoCrsr(aPos, FALSE)); + m_pImpl->m_rDoc.CreateUnoCrsr(aPos, sal_False)); if (!GetPositions(*pNewCrsr)) { throw uno::RuntimeException(); @@ -1341,7 +1342,7 @@ SwXTextRange::createEnumeration() throw (uno::RuntimeException) } const SwPosition aPos(GetDoc()->GetNodes().GetEndOfContent()); ::std::auto_ptr<SwUnoCrsr> pNewCrsr( - m_pImpl->m_rDoc.CreateUnoCrsr(aPos, FALSE)); + m_pImpl->m_rDoc.CreateUnoCrsr(aPos, sal_False)); if (!GetPositions(*pNewCrsr)) { throw uno::RuntimeException(); @@ -1711,7 +1712,7 @@ void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString) // Start/EndAction SwDoc *const pDoc = rCursor.GetDoc(); UnoActionContext aAction(pDoc); - pDoc->StartUndo(UNDO_INSERT, NULL); + pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL); if (rCursor.HasMark()) { pDoc->DeleteAndJoin(rCursor); @@ -1724,9 +1725,9 @@ void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString) DBG_ASSERT( bSuccess, "DocInsertStringSplitCR" ); (void) bSuccess; SwUnoCursorHelper::SelectPam(rCursor, true); - rCursor.Left(rString.getLength(), CRSR_SKIP_CHARS, FALSE, FALSE); + rCursor.Left(rString.getLength(), CRSR_SKIP_CHARS, sal_False, sal_False); } - pDoc->EndUndo(UNDO_INSERT, NULL); + pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL); } /****************************************************************** @@ -1882,7 +1883,7 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration( SwPosFlyFrms aFlyFrms; //get all frames that are bound at paragraph or at character rPaM.GetDoc()->GetAllFlyFmts(aFlyFrms, m_pImpl->GetCursor()); - for(USHORT i = 0; i < aFlyFrms.Count(); i++) + for(sal_uInt16 i = 0; i < aFlyFrms.Count(); i++) { SwPosFlyFrm* pPosFly = aFlyFrms[i]; SwFrmFmt *const pFrmFmt = @@ -1902,7 +1903,7 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration( lcl_FillFrame(*m_pImpl.get(), *m_pImpl->GetCursor(), m_pImpl->m_Frames); m_pImpl->GetCursor()->Right( - 1, CRSR_SKIP_CHARS, FALSE, FALSE); + 1, CRSR_SKIP_CHARS, sal_False, sal_False); } while (*m_pImpl->GetCursor()->GetPoint() < *m_pImpl->GetCursor()->GetMark()); |