LibreOffice Module sd (master) 1
PageListWatcher.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <pres.hxx>
23#include <sal/types.h>
24#include <vector>
25
26class SdPage;
27class SdrModel;
28
33{
34protected:
35 // typedefs for a vector of SdPages
36 typedef ::std::vector< SdPage* > SdPageVector;
37
39
43
45
47 virtual sal_uInt32 ImpGetPageCount() const = 0;
48
53 virtual SdPage* ImpGetPage (sal_uInt32 nIndex) const = 0;
54
55public:
56 explicit ImpPageListWatcher(const SdrModel& rModel);
57 virtual ~ImpPageListWatcher();
58
59 void Invalidate() { mbPageListValid = false; }
60 SdPage* GetSdPage(PageKind ePgKind, sal_uInt32 nPgNum);
61 sal_uInt32 GetSdPageCount(PageKind ePgKind);
62 sal_uInt32 GetVisibleSdPageCount() const;
63};
64
66{
67protected:
68 virtual sal_uInt32 ImpGetPageCount() const override;
69 virtual SdPage* ImpGetPage(sal_uInt32 nIndex) const override;
70
71public:
72 explicit ImpDrawPageListWatcher(const SdrModel& rModel);
73 virtual ~ImpDrawPageListWatcher() override;
74};
75
77{
78protected:
79 virtual sal_uInt32 ImpGetPageCount() const override;
80 virtual SdPage* ImpGetPage(sal_uInt32 nIndex) const override;
81
82public:
83 explicit ImpMasterPageListWatcher(const SdrModel& rModel);
84 virtual ~ImpMasterPageListWatcher() override;
85};
86
87/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ImpDrawPageListWatcher(const SdrModel &rModel)
virtual ~ImpDrawPageListWatcher() override
virtual SdPage * ImpGetPage(sal_uInt32 nIndex) const override
Return the page with the given index.
virtual sal_uInt32 ImpGetPageCount() const override
virtual ~ImpMasterPageListWatcher() override
ImpMasterPageListWatcher(const SdrModel &rModel)
virtual SdPage * ImpGetPage(sal_uInt32 nIndex) const override
Return the page with the given index.
virtual sal_uInt32 ImpGetPageCount() const override
Maintain a map of page indices to page objects for faster access that remains valid during deletions ...
SdPageVector maPageVectorNotes
SdPageVector maPageVectorStandard
virtual SdPage * ImpGetPage(sal_uInt32 nIndex) const =0
Return the page with the given index.
virtual sal_uInt32 ImpGetPageCount() const =0
virtual ~ImpPageListWatcher()
sal_uInt32 GetSdPageCount(PageKind ePgKind)
::std::vector< SdPage * > SdPageVector
SdPage * GetSdPage(PageKind ePgKind, sal_uInt32 nPgNum)
sal_uInt32 GetVisibleSdPageCount() const
void ImpRecreateSortedPageListOnDemand()
ImpPageListWatcher(const SdrModel &rModel)
const SdrModel & mrModel
sal_Int32 nIndex
PageKind
Definition: pres.hxx:45