ViewsWindow.cxx (9e0e4191) ViewsWindow.cxx (b862c97c)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 450 unchanged lines hidden (view full) ---

459 pRet = (*aIter);
460 break;
461 }
462 else if ( nsa == PREVIOUS )
463 {
464 if (nCurrentPosition > 0)
465 {
466 pRet = (*(--aIter));
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 450 unchanged lines hidden (view full) ---

459 pRet = (*aIter);
460 break;
461 }
462 else if ( nsa == PREVIOUS )
463 {
464 if (nCurrentPosition > 0)
465 {
466 pRet = (*(--aIter));
467 if (pRet == NULL)
468 {
469 pRet = (*m_aSections.begin());
470 }
467 if( !bool(pRet) )
468 pRet = (*m_aSections.begin());
471 }
472 else
473 {
474 // if we are out of bounds return the first one
475 pRet = (*m_aSections.begin());
476 }
477 break;
478 }
479 else if ( nsa == POST )
480 {
481 sal_uInt32 nSize = m_aSections.size();
482 if ((nCurrentPosition + 1) < nSize)
483 {
484 pRet = *(++aIter);
469 }
470 else
471 {
472 // if we are out of bounds return the first one
473 pRet = (*m_aSections.begin());
474 }
475 break;
476 }
477 else if ( nsa == POST )
478 {
479 sal_uInt32 nSize = m_aSections.size();
480 if ((nCurrentPosition + 1) < nSize)
481 {
482 pRet = *(++aIter);
485 if (pRet == NULL)
486 {
487 pRet = (*(--aEnd));
488 }
483 if( !bool(pRet) )
484 pRet = (*(--aEnd));
489 }
490 else
491 {
492 // if we are out of bounds return the last one
493 pRet = (*(--aEnd));
494 }
495 break;
496 }

--- 1414 unchanged lines hidden ---
485 }
486 else
487 {
488 // if we are out of bounds return the last one
489 pRet = (*(--aEnd));
490 }
491 break;
492 }

--- 1414 unchanged lines hidden ---