summaryrefslogtreecommitdiff
path: root/sd/inc
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-03-27 18:48:54 -0430
committerLuboš Luňák <l.lunak@suse.cz>2012-04-13 18:42:07 +0200
commita8daf5ff0a825777af0438b5605c5796acb6dd72 (patch)
tree2099e3715d86638feb93a1c842fd25599c0b3312 /sd/inc
parent3c854f6d316ddd7a3ddf85a148a8cf2e0c047e50 (diff)
Overload InsertBookmarkAsPage to use std::vector instead of List.
This are the hardest ones to port, since the rExchangeList parameter uses the last position from InsertBookmarkAsPage in InsertBookmarkAsObject, so the best idea i came up with to avoid doing nasty stuffs was erase procesed objects in InsertBookmarkAsPage and add an extra parameter to InsertBookmarkAsObject that recalculates object count when rExchangeList has items but its manipulated by InsertBookmarkAsPage first like it occurs in function SdDrawDocument::InsertBookmark.
Diffstat (limited to 'sd/inc')
-rw-r--r--sd/inc/drawdoc.hxx53
1 files changed, 53 insertions, 0 deletions
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index b5dd3e2f003f..9146e342ad5a 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -326,6 +326,59 @@ public:
sal_Bool bNoDialogs, ::sd::DrawDocShell* pBookmarkDocSh,
sal_Bool bCopy, sal_Bool bMergeMasterPages,
sal_Bool bPreservePageNames);
+
+ /** Insert pages into this document
+
+ This method inserts whole pages into this document, either
+ selected ones (specified via pBookmarkList/pExchangeList), or
+ all from the source document.
+
+ @attention Beware! This method in it's current state does not
+ handle all combinations of their input parameters
+ correctly. For example, for pBookmarkList=NULL, bReplace=sal_True
+ is ignored (no replace happens).
+
+ @param pBookmarkList
+ A list of strings, denoting the names of the pages to be copied
+
+ @param pExchangeList
+ A list of strings, denoting the names of the pages to be renamed
+
+ @param bLink
+ Whether the inserted pages should be links to the bookmark document
+
+ @param bReplace
+ Whether the pages should not be inserted, but replace the pages in
+ the destination document
+
+ @param nPgPos
+ Insertion point/start of replacement
+
+ @param bNoDialogs
+ Whether query dialogs are allowed (e.g. for page scaling)
+
+ @param pBookmarkDocSh
+ DocShell of the source document (used e.g. to extract the filename
+ for linked pages)
+
+ @param bCopy
+ Whether the source document should be treated as immutable (i.e.
+ inserted pages are not removed from it, but cloned)
+
+ @param bMergeMasterPages
+ Whether the source document's master pages should be copied, too.
+
+ @param bPreservePageNames
+ Whether the replace operation should take the name from the new
+ page, or preserve the old name
+ */
+
+ sal_Bool InsertBookmarkAsPage(std::vector<rtl::OUString> &rBookmarkList, std::vector<rtl::OUString> &rExchangeList,
+ sal_Bool bLink, sal_Bool bReplace, sal_uInt16 nPgPos,
+ sal_Bool bNoDialogs, ::sd::DrawDocShell* pBookmarkDocSh,
+ sal_Bool bCopy, sal_Bool bMergeMasterPages,
+ sal_Bool bPreservePageNames);
+
sal_Bool InsertBookmarkAsObject(List* pBookmarkList, List* pExchangeListL,
sal_Bool bLink, ::sd::DrawDocShell* pBookmarkDocSh,
Point* pObjPos);