/************************************************************************* * * $RCSfile: Outliner.hxx,v $ * * $Revision: 1.5 $ * * last change: $Author: kz $ $Date: 2004-06-10 10:23:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses * * - GNU Lesser General Public License Version 2.1 * - Sun Industry Standards Source License Version 1.1 * * Sun Microsystems Inc., October, 2000 * * GNU Lesser General Public License Version 2.1 * ============================================= * Copyright 2000 by Sun Microsystems, Inc. * 901 San Antonio Road, Palo Alto, CA 94303, USA * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * * * Sun Industry Standards Source License Version 1.1 * ================================================= * The contents of this file are subject to the Sun Industry Standards * Source License Version 1.1 (the "License"); You may not use this file * except in compliance with the License. You may obtain a copy of the * License at http://www.openoffice.org/license.html. * * Software provided under this License is provided on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. * See the License for the specific provisions governing your rights and * obligations concerning the Software. * * The Initial Developer of the Original Code is: Sun Microsystems, Inc. * * Copyright: 2000 by Sun Microsystems, Inc. * * All Rights Reserved. * * Contributor(s): _______________________________________ * * ************************************************************************/ #ifndef SD_OUTLINER_HXX #define SD_OUTLINER_HXX #ifndef _SVDOUTL_HXX #include #endif #ifndef _PRESENTATION_HXX #include "pres.hxx" #endif #ifndef SD_OUTLINER_ITERATOR_HXX #include "OutlinerIterator.hxx" #endif class Dialog; class SdPage; class SdrObject; class SdrTextObj; class SdDrawDocument; class SfxStyleSheetPool; class SdrObjListIter; namespace sd { class DrawViewShell; class View; class ViewShell; class Window; /** The main purpose of this class is searching and replacing as well as spelling of impress documents. The main part of both tasks lies in iterating over the pages and view modes of a document and apply the respective function to all objects containing text on those pages.

Relevant objects: There are two sets of objects to search/spell check. One is the set of all selected objects. The other consists of all objects on all pages in draw-, notes-, and handout view as well as slide- and background view (draw pages and master pages).

Iteration: Search/replace and spelling functions operate on shapes containing text. To cover all relevant objects an order has to be defined on the objects. For the set of all selected objects this order is simply the order in which they can be retrieved from the selection object.
When there is no selection the order is nested. The three modes of the draw view are on the outer level: draw mode, notes mode, handout mode. The inner level switches between draw pages and master pages. This leads to the following order:

  1. draw pages of draw mode
  2. master pages of draw mode
  3. draw pages of notes mode
  4. master pages of notes mode
  5. draw pages of handout mode
  6. master pages of handout mode
Iteration starts at the top of the current page. When reaching the end of the document, i.e. the last master page of the handout mode, it jumps to the first draw page of draw mode. In backward searches this order is reversed. When doing a replace all then the whole document is searched for matches starting at the first page of the draw/slide view (or last page of handout/background view even though search direction).

The start position is restored after finishing spell checking or replacing all matches in a document.

Some related pieces of information: The search dialog (SvxSearchDialog) can be controlled in more than one way: