code: void initPageNavIndexes() {
  
          if (m_pageIndex < m_pageNavLength) {
  
              m_pageNavStartIndex = 1;
              m_pageNavEndIndex = m_pageCount < m_pageNavLength ? m_pageCount : m_pageNavLength;
  
          } else {
  
              int middle = m_pageNavLength / 2;
              m_pageNavStartIndex = m_pageIndex - middle;
              m_pageNavEndIndex = (m_pageNavStartIndex + m_pageNavLength) - 1;
  
              if (m_pageNavStartIndex < 1) {
                  m_pageNavStartIndex = 1;
              } else if (m_pageNavEndIndex < 1) {
                  m_pageNavEndIndex = m_pageCount;
              } else if (m_pageNavEndIndex > m_pageCount) {
  
                  // adjust end index
                  m_pageNavEndIndex = m_pageCount;
                  m_pageNavStartIndex = (m_pageNavEndIndex - m_pageNavLength) + 1;
  
                  if (m_pageNavStartIndex < 1) {
                      // adjust the start index again
                      m_pageNavStartIndex = 1;
                  }
              }
          }
      }
docs: Initializes the start and end indexes to build a Google-like page navigation.<p>