fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / sd / source / ui / toolpanel / controls / DocumentHelper.hxx
blob01039681cf5e09009555dbf83cc54feb09c92393
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef SD_TOOLPANEL_CONTROLS_DCUMENT_HELPER_HXX
21 #define SD_TOOLPANEL_CONTROLS_DCUMENT_HELPER_HXX
23 #include <tools/solar.h>
24 #include <boost/shared_ptr.hpp>
25 #include <vector>
27 class SdDrawDocument;
28 class SdPage;
29 class String;
31 namespace sd { namespace toolpanel { namespace controls {
33 /** A collection of methods supporting the handling of master pages.
35 class DocumentHelper
37 public:
38 /** Return a copy of the given master page in the given document.
40 static SdPage* CopyMasterPageToLocalDocument (
41 SdDrawDocument& rTargetDocument,
42 SdPage* pMasterPage);
44 /** Return and, when not yet present, create a slide that uses the given
45 masster page.
47 static SdPage* GetSlideForMasterPage (SdPage* pMasterPage);
49 /** Copy the styles used by the given page from the source document to
50 the target document.
52 static void ProvideStyles (
53 SdDrawDocument& rSourceDocument,
54 SdDrawDocument& rTargetDocument,
55 SdPage* pPage);
57 /** Assign the given master page to the list of pages.
58 @param rTargetDocument
59 The document that is the owner of the pages in rPageList.
60 @param pMasterPage
61 This master page will usually be a member of the list of all
62 available master pages as provided by the MasterPageContainer.
63 @param rPageList
64 The pages to which to assign the master page. These pages may
65 be slides or master pages themselves.
67 static void AssignMasterPageToPageList (
68 SdDrawDocument& rTargetDocument,
69 SdPage* pMasterPage,
70 const ::boost::shared_ptr<std::vector<SdPage*> >& rPageList);
72 private:
73 static SdPage* AddMasterPage (
74 SdDrawDocument& rTargetDocument,
75 SdPage* pMasterPage);
76 static SdPage* AddMasterPage (
77 SdDrawDocument& rTargetDocument,
78 SdPage* pMasterPage,
79 sal_uInt16 nInsertionIndex);
80 static SdPage* ProvideMasterPage (
81 SdDrawDocument& rTargetDocument,
82 SdPage* pMasterPage,
83 const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList);
85 /** Assign the given master page to the given page.
86 @param pMasterPage
87 In contrast to AssignMasterPageToPageList() this page is assumed
88 to be in the target document, i.e. the same document that pPage
89 is in. The caller will usually call AddMasterPage() to create a
90 clone of a master page in a another document to create it.
91 @param rsBaseLayoutName
92 The layout name of the given master page. It is given so that
93 it has not to be created on every call. It could be generated
94 from the given master page, though.
95 @param pPage
96 The page to which to assign the master page. It can be a slide
97 or a master page itself.
99 static void AssignMasterPageToPage (
100 SdPage* pMasterPage,
101 const String& rsBaseLayoutName,
102 SdPage* pPage);
106 } } } // end of namespace ::sd::toolpanel::controls
108 #endif
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */