diff options
Diffstat (limited to 'sd/source/ui/view/OutlinerIterator.cxx')
-rwxr-xr-x | sd/source/ui/view/OutlinerIterator.cxx | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx index 226d767c6c91..e7d0e0d63475 100755 --- a/sd/source/ui/view/OutlinerIterator.cxx +++ b/sd/source/ui/view/OutlinerIterator.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -216,18 +216,18 @@ Iterator OutlinerContainer::CreateSelectionIterator ( const ::std::vector<SdrObjectWeakRef>& rObjectList, SdDrawDocument* pDocument, const ::boost::shared_ptr<ViewShell>& rpViewShell, - bool bDirectionIsForward, + bool bDirectionIsForward, IteratorLocation aLocation) { OSL_ASSERT(rpViewShell.get()); - + sal_Int32 nObjectIndex; if (bDirectionIsForward) switch (aLocation) { case CURRENT: - case BEGIN: + case BEGIN: default: nObjectIndex = 0; break; @@ -239,7 +239,7 @@ Iterator OutlinerContainer::CreateSelectionIterator ( switch (aLocation) { case CURRENT: - case BEGIN: + case BEGIN: default: nObjectIndex = rObjectList.size()-1; break; @@ -253,13 +253,13 @@ Iterator OutlinerContainer::CreateSelectionIterator ( } Iterator OutlinerContainer::CreateDocumentIterator ( - SdDrawDocument* pDocument, + SdDrawDocument* pDocument, const ::boost::shared_ptr<ViewShell>& rpViewShell, - bool bDirectionIsForward, + bool bDirectionIsForward, IteratorLocation aLocation) { OSL_ASSERT(rpViewShell.get()); - + PageKind ePageKind; EditMode eEditMode; @@ -278,7 +278,7 @@ Iterator OutlinerContainer::CreateDocumentIterator ( eEditMode = EM_MASTERPAGE; } break; - + case END: if (bDirectionIsForward) { @@ -308,7 +308,7 @@ Iterator OutlinerContainer::CreateDocumentIterator ( break; } - sal_Int32 nPageIndex = GetPageIndex (pDocument, rpViewShell, + sal_Int32 nPageIndex = GetPageIndex (pDocument, rpViewShell, ePageKind, eEditMode, bDirectionIsForward, aLocation); return Iterator ( @@ -319,13 +319,13 @@ Iterator OutlinerContainer::CreateDocumentIterator ( sal_Int32 OutlinerContainer::GetPageIndex ( SdDrawDocument* pDocument, const ::boost::shared_ptr<ViewShell>& rpViewShell, - PageKind ePageKind, + PageKind ePageKind, EditMode eEditMode, bool bDirectionIsForward, IteratorLocation aLocation) { OSL_ASSERT(rpViewShell); - + sal_Int32 nPageIndex; sal_Int32 nPageCount; @@ -359,7 +359,7 @@ sal_Int32 OutlinerContainer::GetPageIndex ( } break; - case BEGIN: + case BEGIN: default: if (bDirectionIsForward) nPageIndex = 0; @@ -386,10 +386,10 @@ sal_Int32 OutlinerContainer::GetPageIndex ( IteratorImplBase::IteratorImplBase(SdDrawDocument* pDocument, const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward) -: maPosition() -, mpDocument (pDocument) -, mpViewShellWeak (rpViewShellWeak) -, mbDirectionIsForward (bDirectionIsForward) +: maPosition() +, mpDocument (pDocument) +, mpViewShellWeak (rpViewShellWeak) +, mbDirectionIsForward (bDirectionIsForward) { ::boost::shared_ptr<DrawViewShell> pDrawViewShell; if ( ! mpViewShellWeak.expired()) @@ -493,7 +493,7 @@ IteratorImplBase* SelectionIteratorImpl::Clone (IteratorImplBase* pObject) const void SelectionIteratorImpl::GotoNextText (void) { - SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( mrObjectList.at(mnObjectIndex).get() ); + SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( mrObjectList.at(mnObjectIndex).get() ); if (mbDirectionIsForward) { if( pTextObj ) @@ -503,7 +503,7 @@ void SelectionIteratorImpl::GotoNextText (void) { maPosition.mnText = 0; ++mnObjectIndex; - } + } } else { @@ -519,7 +519,7 @@ void SelectionIteratorImpl::GotoNextText (void) { maPosition.mnText = -1; --mnObjectIndex; - } + } } else { @@ -529,7 +529,7 @@ void SelectionIteratorImpl::GotoNextText (void) if( (maPosition.mnText == -1) && (mnObjectIndex >= 0) ) { - pTextObj = dynamic_cast< SdrTextObj* >( mrObjectList.at(mnObjectIndex).get() ); + pTextObj = dynamic_cast< SdrTextObj* >( mrObjectList.at(mnObjectIndex).get() ); if( pTextObj ) maPosition.mnText = pTextObj->getTextCount() - 1; } @@ -560,9 +560,9 @@ bool SelectionIteratorImpl::IsEqual ( { if (aType == SELECTION) { - const SelectionIteratorImpl* pSelectionIterator = + const SelectionIteratorImpl* pSelectionIterator = static_cast<const SelectionIteratorImpl*>(&rIterator); - return mpDocument == pSelectionIterator->mpDocument + return mpDocument == pSelectionIterator->mpDocument && mnObjectIndex == pSelectionIterator->mnObjectIndex; } else @@ -592,7 +592,7 @@ ViewIteratorImpl::ViewIteratorImpl ( ViewIteratorImpl::ViewIteratorImpl ( sal_Int32 nPageIndex, - SdDrawDocument* pDocument, + SdDrawDocument* pDocument, const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward, PageKind ePageKind, @@ -617,7 +617,7 @@ ViewIteratorImpl::~ViewIteratorImpl (void) IteratorImplBase* ViewIteratorImpl::Clone (IteratorImplBase* pObject) const { - + ViewIteratorImpl* pIterator = static_cast<ViewIteratorImpl*>(pObject); if (pIterator == NULL) pIterator = new ViewIteratorImpl ( @@ -644,7 +644,7 @@ IteratorImplBase* ViewIteratorImpl::Clone (IteratorImplBase* pObject) const void ViewIteratorImpl::GotoNextText(void) { - SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( maPosition.mxObject.get() ); + SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( maPosition.mxObject.get() ); if( pTextObj ) { if (mbDirectionIsForward) @@ -684,7 +684,7 @@ void ViewIteratorImpl::GotoNextText(void) maPosition.mnText = 0; if( !mbDirectionIsForward && maPosition.mxObject.is() ) { - pTextObj = dynamic_cast< SdrTextObj* >( maPosition.mxObject.get() ); + pTextObj = dynamic_cast< SdrTextObj* >( maPosition.mxObject.get() ); if( pTextObj ) maPosition.mnText = pTextObj->getTextCount() - 1; } @@ -716,11 +716,11 @@ void ViewIteratorImpl::SetPage (sal_Int32 nPageIndex) { if (maPosition.meEditMode == EM_PAGE) mpPage = mpDocument->GetSdPage ( - (USHORT)nPageIndex, + (USHORT)nPageIndex, maPosition.mePageKind); else mpPage = mpDocument->GetMasterSdPage ( - (USHORT)nPageIndex, + (USHORT)nPageIndex, maPosition.mePageKind); } else @@ -742,7 +742,7 @@ void ViewIteratorImpl::SetPage (sal_Int32 nPageIndex) maPosition.mnText = 0; if( !mbDirectionIsForward && maPosition.mxObject.is() ) { - SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( maPosition.mxObject.get() ); + SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( maPosition.mxObject.get() ); if( pTextObj ) maPosition.mnText = pTextObj->getTextCount() - 1; } @@ -824,14 +824,14 @@ void DocumentIteratorImpl::GotoNextText (void) if (mbDirectionIsForward) { if (maPosition.mnPageIndex >= mnPageCount) - { + { // Switch to master page. if (maPosition.meEditMode == EM_PAGE) { maPosition.meEditMode = EM_MASTERPAGE; SetPage (0); } - + // Switch to next view mode. else { @@ -860,7 +860,7 @@ void DocumentIteratorImpl::GotoNextText (void) maPosition.meEditMode = EM_PAGE; bSetToOnePastLastPage = true; } - + // Switch to previous view mode. else { @@ -887,7 +887,7 @@ void DocumentIteratorImpl::GotoNextText (void) nPageCount = mpDocument->GetSdPageCount (maPosition.mePageKind); else nPageCount = mpDocument->GetMasterSdPageCount(maPosition.mePageKind); - + // Now that we know the number of pages we can set the current page index. if (bSetToOnePastLastPage) SetPage (nPageCount); |