diff options
author | hg <hg@oosvn01.> | 2009-10-08 15:46:11 +0000 |
---|---|---|
committer | hg <hg@oosvn01.> | 2009-10-08 15:46:11 +0000 |
commit | 7d476e2e47e4572c44b325e976048bb8ae6959b6 (patch) | |
tree | b7f17c1cf3235cf394bd10eb867af0bf545bf83b /sw/inc | |
parent | 73220d96bca7cb760051144a5ea731119287d9f1 (diff) | |
parent | 5edc2d8ffaf658b05e4b044e44bd360697c3d08c (diff) |
merge with m50
Diffstat (limited to 'sw/inc')
39 files changed, 673 insertions, 1085 deletions
diff --git a/sw/inc/IDocumentBookmarkAccess.hxx b/sw/inc/IDocumentBookmarkAccess.hxx deleted file mode 100644 index 539fb594852b..000000000000 --- a/sw/inc/IDocumentBookmarkAccess.hxx +++ /dev/null @@ -1,282 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: IDocumentBookmarkAccess.hxx,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef IDOCUMENTBOOKMARKACCESS_HXX_INCLUDED -#define IDOCUMENTBOOKMARKACCESS_HXX_INCLUDED - -#include <sal/types.h> - -class SwBookmark; -class SwFieldBookmark; -class SwBookmarks; -class SwPaM; -class KeyCode; -class String; -struct SwPosition; -class SwTxtNode; - -/** Provides access to the bookmarks of a document. -*/ -class IDocumentBookmarkAccess -{ -public: - enum BookmarkType - { - BOOKMARK, - MARK, - DDE_BOOKMARK, - UNO_BOOKMARK, - // --> OD 2007-10-11 #i81002# - bookmark type for cross-references - CROSSREF_BOOKMARK, - // <-- - // FIELDMARK, // for future use... - FORM_FIELDMARK_TEXT, - FORM_FIELDMARK_NO_TEXT - }; - - // --> OD 2007-11-16 #i83479# - enum CrossReferenceBookmarkSubType - { - HEADING, - NUMITEM - }; - // <-- - -public: - /** Returns all bookmarks set at the document. - - @returns - the bookmarks set at the document. - */ - virtual const SwBookmarks& getBookmarks() const = 0; - - /** Generates a new bookmark in the document. - - @param rPaM - [in] the location of the new bookmark. - - @param rKC - [in] ??? - - @param rName - [in] the name of the new bookmark. - - @param rShortName - [in] the short name of the new bookmark. - - @param eMark - [in] the type of the new bookmark. - - @returns - a pointer to the new bookmark. - */ - virtual SwBookmark* makeBookmark( /*[in]*/const SwPaM& rPaM, /*[in]*/const KeyCode& rKC, - /*[in]*/const String& rName, /*[in]*/const String& rShortName, - /*[in]*/BookmarkType eMark ) = 0; - - /** Deletes a bookmark. - - @param nPos - [in] the position of the bookmark to be deleted. - */ - virtual void deleteBookmark( /*[in]*/sal_uInt16 nPos ) = 0; - - /** Deletes a bookmark. - - @param rName - [in] the name of the bookmark to be deleted. - */ - virtual void deleteBookmark( /*[in]*/const String& rName ) = 0; - - /** Checks, if the given name fits to the cross-reference bookmark - name schema - - OD 2007-10-24 #i81002# - - @author OD - - @param rName - [in] the name to be checked. - - @returns - boolean indicating , if the name fits or not - */ - virtual bool isCrossRefBookmarkName( /*[in]*/const String& rName ) = 0; - - /** Find a bookmark. - - @param rName - [in] the name of the bookmark to be found. - - @returns - the position of the bookmark in the bookmark container. - */ - virtual sal_uInt16 findBookmark( /*[in]*/const String& rName ) = 0; - - /** Generates a unique bookmark name. The name has to be passed to the - function, a number will be added to the name if the name is already - used. - - @param rName - [in/out] the name of the bookmark. - */ - virtual void makeUniqueBookmarkName( /*[in/out]*/String& rName ) = 0; - - /** Get the number of ::com::sun::star::text::Bookmarks. - - @param bBkmrk - [in] if set, only "real" bookmarks are considered. - - @returns - the number of bookmarks. - */ - virtual sal_uInt16 getBookmarkCount( /*[in]*/bool bBkmrk) const = 0; - - /** Get a bookmark. - - @param nPos - [in] the position of the bookmark in the bookmark container. - - @param bBkmrk - [in] if set, only "real" bookmarks are considered. - - @returns - the bookmark. - */ - virtual SwBookmark& getBookmark( /*[in]*/sal_uInt16 nPos, /*[in]*/bool bBkmrk) = 0; - - /** Get cross-reference bookmark name for certain text node - - OD 2007-11-16 #i83479# - - @author OD - - @param rTxtNode - [in] reference to text node, whose cross-reference bookmark name has to be returned. - - @param nCrossRefType - [in] sub type of cross-reference bookmark, whose name has to be returned. - - @returns - name of cross-reference bookmark of given cross-reference sub type, - if such a cross-reference bookmark exists at given textnode. - otherwise, empty string - */ - virtual String getCrossRefBookmarkName( - /*[in]*/const SwTxtNode& rTxtNode, - /*[in]*/const CrossReferenceBookmarkSubType nCrossRefType ) const = 0; - - /** Generates new cross-reference bookmark for given text node of given sub type - - OD 2007-11-16 #i83479# - - @author OD - - @param rTxtNode - [in] reference to text node, at which the cross-reference bookmark has to be generated. - - @param nCrossRefType - [in] sub type of cross-reference bookmark. - - @returns - name of generated cross-reference bookmark. - If empty, cross-reference bookmark is not generated. - */ - virtual String makeCrossRefBookmark( - /*[in]*/const SwTxtNode& rTxtNode, - /*[in]*/const CrossReferenceBookmarkSubType nCrossRefType ) = 0; - - virtual SwBookmark* getFieldBookmarkFor(const SwPosition &pos) const = 0; - virtual SwFieldBookmark* getFormFieldBookmarkFor(const SwPosition &pos) const = 0; - virtual SwBookmark* getNextFieldBookmarkFor(const SwPosition &pos) const = 0; - virtual SwBookmark* getPrevFieldBookmarkFor(const SwPosition &pos) const = 0; - -protected: - virtual ~IDocumentBookmarkAccess() {}; -}; - -namespace bookmarkfunc -{ - /** return the prefix used for cross-reference bookmark for headings - - OD 2007-11-16 #i83479# - - @author OD - */ - const String getHeadingCrossRefBookmarkNamePrefix(); - - /** return the prefix used for cross-reference bookmark for numbered items - - OD 2007-11-16 #i83479# - - @author OD - */ - const String getNumItemCrossRefBookmarkNamePrefix(); - - /** Checks, if the given name fits to the heading cross-reference bookmark - name schema - - OD 2007-11-09 #i81002# - - @author OD - - @param rName - [in] the name to be checked. - - @returns - boolean indicating , if the name fits or not - */ - bool isHeadingCrossRefBookmarkName( /*[in]*/const String& rName ); - - /** Checks, if the given name fits to the numbered item cross-reference - bookmark name schema - - OD 2007-11-09 #i81002# - - @author OD - - @param rName - [in] the name to be checked. - - @returns - boolean indicating , if the name fits or not - */ - bool isNumItemCrossRefBookmarkName( /*[in]*/const String& rName ); - - /** generate new name for a cross-reference bookmark of given sub type - - OD 2007-11-16 #i83479# - - @author OD - */ - String generateNewCrossRefBookmarkName( - /*[in]*/const IDocumentBookmarkAccess::CrossReferenceBookmarkSubType nSubType ); -} -#endif // IDOCUMENTBOOKMARKACCESS_HXX_INCLUDED diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx new file mode 100644 index 000000000000..56a6050c09c6 --- /dev/null +++ b/sw/inc/IDocumentMarkAccess.hxx @@ -0,0 +1,247 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: IDocumentMarkAccess.hxx,v $ + * $Revision: 1.4.42.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef IDOCUMENTMARKACCESS_HXX_INCLUDED +#define IDOCUMENTMARKACCESS_HXX_INCLUDED + +#include <sal/types.h> +#include <IMark.hxx> +#include <boost/shared_ptr.hpp> + +class SwPaM; +class KeyCode; +class String; +struct SwPosition; +class SwTxtNode; + +namespace sw { namespace mark { + class SaveBookmark; // FIXME: Ugly: SaveBookmark is a core-internal class, and should not be used in the interface +}} + +/** Provides access to the marks of a document. +*/ +class IDocumentMarkAccess +{ + public: + enum MarkType + { + UNO_BOOKMARK, + DDE_BOOKMARK, + BOOKMARK, + CROSSREF_HEADING_BOOKMARK, + CROSSREF_NUMITEM_BOOKMARK, + TEXT_FIELDMARK, + CHECKBOX_FIELDMARK, + NAVIGATOR_REMINDER + }; + + typedef ::boost::shared_ptr< ::sw::mark::IMark> pMark_t; + typedef ::std::vector< pMark_t > container_t; + typedef container_t::iterator iterator_t; + typedef container_t::const_iterator const_iterator_t; + typedef container_t::const_reverse_iterator const_reverse_iterator_t; + + /** Generates a new mark in the document for a certain selection. + + @param rPaM + [in] the selection being marked. + + @param rProposedName + [in] the proposed name of the new mark. + + @param eMark + [in] the type of the new mark. + + @returns + a pointer to the new mark (name might have changed). + */ + virtual ::sw::mark::IMark* makeMark(const SwPaM& rPaM, + const ::rtl::OUString& rProposedName, + MarkType eMark) =0; + + /** Returns a mark in the document for a paragraph. + If there is none, a mark will be created. + + @param rTxtNode + [in] the paragraph being marked (a selection over the paragraph is marked) + + @param eMark + [in] the type of the new mark. + + @returns + a pointer to the new mark (name might have changed). + */ + virtual ::sw::mark::IMark* getMarkForTxtNode(const SwTxtNode& rTxtNode, + MarkType eMark) =0; + + /** Moves an existing mark to a new selection and performs needed updates. + @param io_pMark + [in/out] the mark to be moved + + @param rPaM + [in] new selection to be marked + */ + + virtual void repositionMark(::sw::mark::IMark* io_pMark, + const SwPaM& rPaM) =0; + + /** Renames an existing Mark, if possible. + @param io_pMark + [in/out] the mark to be renamed + + @param rNewName + [in] new name for the mark + + @returns false, if renaming failed (because the name is already in use) + */ + virtual bool renameMark(::sw::mark::IMark* io_pMark, + const ::rtl::OUString& rNewName) =0; + + /** Corrects marks (absolute) + This method ignores the previous position of the mark in the paragraph + + @param rOldNode + [in] the node from which nodes should be moved + + @param rNewPos + [in] new position to which marks will be moved, if nOffset == 0 + + @param nOffset + [in] the offset by which the mark gets positioned of rNewPos + */ + virtual void correctMarksAbsolute(const SwNodeIndex& rOldNode, + const SwPosition& rNewPos, + const xub_StrLen nOffset) =0; + + /** Corrects marks (relative) + This method uses the previous position of the mark in the paragraph as offset + + @param rOldNode + [in] the node from which nodes should be moved + + @param rNewPos + [in] new position to which marks from the start of the paragraph will be + moved, if nOffset == 0 + + @param nOffset + [in] the offset by which the mark gets positioned of rNewPos in addition to + its old position in the paragraph + */ + virtual void correctMarksRelative(const SwNodeIndex& rOldNode, + const SwPosition& rNewPos, + const xub_StrLen nOffset) =0; + + /** Deletes marks in a range + */ + virtual void deleteMarks( + const SwNodeIndex& rStt, + const SwNodeIndex& rEnd, + ::std::vector< ::sw::mark::SaveBookmark>* pSaveBkmk, // Ugly: SaveBookmark is core-internal + const SwIndex* pSttIdx, + const SwIndex* pEndIdx) =0; + + /** Deletes a mark. + + @param ppMark + [in] an iterator pointing to the Mark to be deleted. + */ + virtual void deleteMark(const IDocumentMarkAccess::const_iterator_t ppMark) =0; + + /** Deletes a mark. + + @param ppMark + [in] the name of the mark to be deleted. + */ + virtual void deleteMark(const ::sw::mark::IMark* const pMark) =0; + + /** Clear (deletes) all marks. + */ + virtual void clearAllMarks() =0; + + /** returns a STL-like random access iterator to the begin of the sequence of marks. + */ + virtual const_iterator_t getMarksBegin() const =0; + + /** returns a STL-like random access iterator to the end of the sequence of marks. + */ + virtual const_iterator_t getMarksEnd() const =0; + + /** returns the number of marks. + */ + virtual sal_Int32 getMarksCount() const =0; + + /** Finds a mark by name. + + @param rName + [in] the name of the mark to find. + + @returns + an iterator pointing to the mark, or pointing to getMarksEnd() if nothing was found. + */ + virtual const_iterator_t findMark(const ::rtl::OUString& rMark) const =0; + + + // interface IBookmarks (BOOKMARK, CROSSREF_NUMITEM_BOOKMARK, CROSSREF_HEADING_BOOKMARK) + + /** returns a STL-like random access iterator to the begin of the sequence the IBookmarks. + */ + virtual const_iterator_t getBookmarksBegin() const =0; + + /** returns a STL-like random access iterator to the end of the sequence of IBookmarks. + */ + virtual const_iterator_t getBookmarksEnd() const =0; + + /** returns the number of IBookmarks. + */ + virtual sal_Int32 getBookmarksCount() const =0; + + /** Finds a bookmark by name. + + @param rName + [in] the name of the bookmark to find. + + @returns + an iterator pointing to the bookmark, or getBookmarksEnd() if nothing was found. + */ + virtual const_iterator_t findBookmark(const ::rtl::OUString& rMark) const =0; + + + // Fieldmarks + virtual ::sw::mark::IFieldmark* getFieldmarkFor(const SwPosition& pos) const =0; + virtual ::sw::mark::IFieldmark* getFieldmarkBefore(const SwPosition& pos) const =0; + virtual ::sw::mark::IFieldmark* getFieldmarkAfter(const SwPosition& pos) const =0; + + // Returns the MarkType used to create the mark + static MarkType SAL_DLLPUBLIC_EXPORT GetType(const ::sw::mark::IMark& rMark); + protected: + virtual ~IDocumentMarkAccess() {}; +}; + +#endif // IDOCUMENTBOOKMARKACCESS_HXX_INCLUDED diff --git a/sw/inc/IMark.hxx b/sw/inc/IMark.hxx new file mode 100644 index 000000000000..81317d69a369 --- /dev/null +++ b/sw/inc/IMark.hxx @@ -0,0 +1,115 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: bookmrk.hxx,v $ + * $Revision: 1.11 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _IMARK_HXX +#define _IMARK_HXX + +#include <vcl/keycod.hxx> +#include <calbck.hxx> +#include <pam.hxx> +#include <boost/operators.hpp> + +#ifndef SW_DECL_SWSERVEROBJECT_DEFINED +#define SW_DECL_SWSERVEROBJECT_DEFINED +SV_DECL_REF( SwServerObject ) +#endif + + +struct SwPosition; + +namespace sw { namespace mark +{ + class IMark + : virtual public SwModify // inherited as interface + , public ::boost::totally_ordered<IMark> + { + public: + //getters + virtual const SwPosition& GetMarkPos() const =0; + // GetOtherMarkPos() is only guaranteed to return a valid + // reference if IsExpanded() returned true + virtual const SwPosition& GetOtherMarkPos() const =0; + virtual const SwPosition& GetMarkStart() const =0; + virtual const SwPosition& GetMarkEnd() const =0; + virtual const ::rtl::OUString& GetName() const =0; + virtual bool IsExpanded() const =0; + virtual bool IsCoveringPosition(const SwPosition& rPos) const =0; + + //setters + // not available in IMark + // inside core, you can cast to MarkBase and use its setters, + // make sure to update the sortings in Markmanager in this case + + //operators and comparisons (non-virtual) + bool operator<(const IMark& rOther) const + { return GetMarkStart() < rOther.GetMarkStart(); } + bool operator==(const IMark& rOther) const + { return GetMarkStart() == rOther.GetMarkStart(); } + bool StartsBefore(const SwPosition& rPos) const + { return GetMarkStart() < rPos; } + bool StartsAfter(const SwPosition& rPos) const + { return GetMarkStart() > rPos; } + bool EndsBefore(const SwPosition& rPos) const + { return GetMarkEnd() < rPos; } + bool EndsAfter(const SwPosition& rPos) const + { return GetMarkEnd() > rPos; } + }; + + class IBookmark + : virtual public IMark + { + public: + virtual const ::rtl::OUString& GetShortName() const =0; + virtual const KeyCode& GetKeyCode() const =0; + virtual void SetShortName(const ::rtl::OUString&) =0; + virtual void SetKeyCode(const KeyCode&) =0; + }; + + class IFieldmark + : virtual public IMark + { + public: + //getters + virtual ::rtl::OUString GetFieldname() const =0; + virtual ::rtl::OUString GetFieldHelptext() const =0; + + //setters + virtual void SetFieldname(const ::rtl::OUString& rFieldname) =0; + virtual void SetFieldHelptext(const ::rtl::OUString& rFieldHelptext) =0; + }; + + class ICheckboxFieldmark + : virtual public IFieldmark + { + public: + virtual bool IsChecked() const =0; + virtual void SetChecked(bool checked) =0; + }; +}} +#endif diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx index 29607aa34b99..fcf9d727f05e 100644 --- a/sw/inc/SwAppletImpl.hxx +++ b/sw/inc/SwAppletImpl.hxx @@ -40,7 +40,6 @@ #include <tools/string.hxx> -#include <svtools/htmlkywd.hxx> #include <sfx2/frmhtml.hxx> #include <sfx2/frmhtmlw.hxx> #ifndef _WRKWIN_HXX //autogen @@ -53,12 +52,7 @@ class SfxItemSet; -extern SVT_DLLPUBLIC sal_Char const SVTOOLS_CONSTASCII_DECL( sHTML_O_archive, "ARCHIVE" ); - -extern sal_Char const SVTOOLS_CONSTASCII_DECL( sHTML_O_Hidden, "HIDDEN" ); -extern sal_Char const SVTOOLS_CONSTASCII_DECL( sHTML_O_Hidden_False, "FALSE" ); -extern sal_Char const SVTOOLS_CONSTASCII_DECL( sHTML_O_Archives, "ARCHIVES" ); -extern sal_Char const SVTOOLS_CONSTASCII_DECL( sHTML_O_Object, "OBJECT" ); +#define OOO_STRING_SW_HTML_O_Hidden "HIDDEN" class SwApplet_Impl { diff --git a/sw/inc/SwBitArray.hxx b/sw/inc/SwBitArray.hxx deleted file mode 100644 index f5647019ec61..000000000000 --- a/sw/inc/SwBitArray.hxx +++ /dev/null @@ -1,185 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: SwBitArray.hxx,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SW_BIT_ARRAY_HXX -#define _SW_BIT_ARRAY_HXX - -#include <swtypes.hxx> -#if OSL_DEBUG_LEVEL > 1 -#include <iostream> -#endif - -/** - a bit array -*/ -class SwBitArray -{ - /** - size of a group of bits - */ - static const size_t mGroupSize = sizeof(sal_uInt32); - - /** - Returns number of groups. - - @return number of groups - */ - size_t calcSize() const { return (nSize - 1)/ mGroupSize + 1; } - - /** - array of group of bits - */ - sal_uInt32 * mArray; - - /** - number of groups - */ - sal_uInt32 nSize; - - /** - Returns group of bits according to an index. - - @param n index to search for - - @return group of bits according to given index - */ - sal_uInt32 * GetGroup(sal_uInt32 n) const { return &mArray[n/mGroupSize]; } - -public: - SwBitArray(sal_uInt32 _nSize); - SwBitArray(const SwBitArray & rArray); - ~SwBitArray(); - - /** - Returns if an index is valid. - - @retval TRUE the index is valid - @retval FALSE else - */ - BOOL IsValid(sal_uInt32 n) const; - - /** - Returns the number of bits stored in the array. - - @return number of bits in the array - */ - sal_uInt32 Size() const { return nSize; } - - /** - Sets/unsets a bit. - - @param n index of bit to set/unset - @param nValue -TRUE set the bit - -FALSE unset the bit - */ - void Set(sal_uInt32 n, BOOL nValue); - - /** - Unsets all bits of the array. - */ - void Reset(); - - /** - Returns if a certain bit in the array is set. - - @param n index of the bit in question - - @retval TRUE the bit is set - @retval FALSE else - */ - BOOL Get(sal_uInt32 n) const; - - /** - Assigns a bit array to this bit array. - - @param rArray array to assign - - rArray must have the same size as this array. Otherwise this - array will not be altered. - */ - SwBitArray & operator = (const SwBitArray & rArray); - - /** - Returns the bitwise AND of two bit arrays. - - @param rA - @param rB the arrays to combine - - @return bitwise AND of rA and rB - */ - friend SwBitArray operator & (const SwBitArray & rA, - const SwBitArray & rB); - - /** - Returns the bitwise OR of two bit arrays. - - @param rA - @param rB the arrays to combine - - @return bitwise OR of rA and rB - */ - friend SwBitArray operator | (const SwBitArray & rA, - const SwBitArray & rB); - - /** - Returns the bitwise XOR of two bit arrays. - - @param rA - @param rB the arrays to combine - - @return bitwise XOR of rA and rB - */ - friend SwBitArray operator ^ (const SwBitArray & rA, - const SwBitArray & rB); - - /** - Returns the bitwise NOT of an arrays. - - @param rA the array to negate - - @return bitwise NOT of rA - */ - friend SwBitArray operator ~ (const SwBitArray & rA); - -#if OSL_DEBUG_LEVEL > 1 - /** - output operator - - @param o output stream - @param rBitArray bit array to output - - @return o after the output - */ - friend std::ostream & operator << - (std::ostream & o, const SwBitArray & rBitArray); -#endif -}; - - -#endif // _SW_BIT_ARRAY_HXX diff --git a/sw/inc/bookmrk.hxx b/sw/inc/bookmrk.hxx deleted file mode 100644 index 3b459f61c081..000000000000 --- a/sw/inc/bookmrk.hxx +++ /dev/null @@ -1,218 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: bookmrk.hxx,v $ - * $Revision: 1.11 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _BOOKMRK_HXX -#define _BOOKMRK_HXX - -#include "hintids.hxx" //die Ids der Attribute, vor macitem damit die - //die Attribut richtig angezogen werden. -#include <svtools/macitem.hxx> - -#ifndef _KEYCOD_HXX //autogen -#include <vcl/keycod.hxx> -#endif -#ifndef _TOOLS_REF_HXX -#include <tools/ref.hxx> -#endif -#include <IDocumentBookmarkAccess.hxx> -#include <calbck.hxx> -#include <pam.hxx> - -#ifndef SW_DECL_SWSERVEROBJECT_DEFINED -#define SW_DECL_SWSERVEROBJECT_DEFINED -SV_DECL_REF( SwServerObject ) -#endif - - -struct SwPosition; // fwd Decl. wg. UI - -class SwBookmark : public SwModify -{ - SwPosition *pPos1, *pPos2; // wird im CTOR gesetzt, im DTOR geloescht - // pPos1 is always != 0, pPos2 may be 0 - SwServerObjectRef refObj; // falls DataServer -> Pointer gesetzt - -protected: - String aName; - String aShortName; - KeyCode aCode; - IDocumentBookmarkAccess::BookmarkType eMarkType; - - SwBookmark( const SwPosition& aPos, - const KeyCode& rCode, - const String& rName, const String& rShortName); - -public: - TYPEINFO(); - - SwBookmark( const SwPosition& aPos ); - // --> OD 2007-09-26 #i81002# - SwBookmark( const SwPaM& aPaM, - const KeyCode& rCode, - const String& rName, const String& rShortName); - // <-- - - // Beim Loeschen von Text werden Bookmarks mitgeloescht! - virtual ~SwBookmark(); - - // --> OD 2007-10-10 #i81002# - // made virtual and thus no longer inline - virtual const SwPosition& GetBookmarkPos() const; - virtual const SwPosition* GetOtherBookmarkPos() const; - // <-- - - // nicht undofaehig - const String& GetName() const { return aName; } - // nicht undofaehig - const String& GetShortName() const { return aShortName; } - // nicht undofaehig - const KeyCode& GetKeyCode() const { return aCode; } - - // Vergleiche auf Basis der Dokumentposition - BOOL operator < (const SwBookmark &) const; - BOOL operator ==(const SwBookmark &) const; - // falls man wirklich auf gleiche Position abfragen will. - BOOL IsEqualPos( const SwBookmark &rBM ) const; - - BOOL IsFormFieldMark() const { return IDocumentBookmarkAccess::FORM_FIELDMARK_TEXT == eMarkType || IDocumentBookmarkAccess::FORM_FIELDMARK_NO_TEXT == eMarkType; } - BOOL IsBookMark() const { return IDocumentBookmarkAccess::BOOKMARK == eMarkType || IDocumentBookmarkAccess::FORM_FIELDMARK_TEXT == eMarkType || IDocumentBookmarkAccess::FORM_FIELDMARK_NO_TEXT == eMarkType; } -// // --> OD 2007-10-17 #TESTING# -// BOOL IsBookMark() const -// { -// return IDocumentBookmarkAccess::BOOKMARK == eMarkType || -// IsCrossRefMark(); -// } -// // <-- - BOOL IsMark() const { return IDocumentBookmarkAccess::MARK == eMarkType; } - BOOL IsUNOMark() const { return IDocumentBookmarkAccess::UNO_BOOKMARK == eMarkType; } - // --> OD 2007-10-11 #i81002# - bookmark type for cross-references - BOOL IsCrossRefMark() const { return IDocumentBookmarkAccess::CROSSREF_BOOKMARK == eMarkType; } - // <-- - void SetType( IDocumentBookmarkAccess::BookmarkType eNewType ) { eMarkType = eNewType; } - IDocumentBookmarkAccess::BookmarkType GetType() const { return eMarkType; } - - // Daten Server-Methoden - void SetRefObject( SwServerObject* pObj ); - const SwServerObject* GetObject() const { return &refObj; } - SwServerObject* GetObject() { return &refObj; } - BOOL IsServer() const { return refObj.Is(); } - - // --> OD 2007-10-10 #i81002# - // made virtual and thus no longer inline - // to access start and end of a bookmark. - // start and end may be the same - virtual const SwPosition* BookmarkStart() const; - virtual const SwPosition* BookmarkEnd() const; - // <-- - - // --> OD 2007-09-26 #i81002# - virtual void SetBookmarkPos( const SwPosition* pNewPos1 ); - virtual void SetOtherBookmarkPos( const SwPosition* pNewPos2 ); - // <-- - -private: - // fuer METWARE: - // es wird (vorerst) nicht kopiert und nicht zugewiesen - SwBookmark(const SwBookmark &); - SwBookmark &operator=(const SwBookmark &); -}; - -class SwMark: public SwBookmark -{ -public: - SwMark( const SwPosition& aPos, - const KeyCode& rCode, - const String& rName, const String& rShortName); -}; - -class SW_DLLPUBLIC SwFieldBookmark : public SwBookmark -{ -private: - int fftype; // Type: 0 = Text, 1 = Check Box, 2 = List - int ffres; - bool ffprot; - bool ffsize; // 0 = Auto, 1=Exact (see ffhps) - int fftypetxt; // Type of text field: 0 = Regular text, 1 = Number, 2 = Date, 3 = Current date, 4 = Current time, 5 = Calculation - bool ffrecalc; - int ffmaxlen; // Number of characters for text field. Zero means unlimited. - int ffhps; // Check box size (half-point sizes). - - String ffname; - String ffhelptext; - -public: - SwFieldBookmark(const SwPosition& aPos, - const KeyCode& rCode, - const String& rName, const String& rShortName, - IDocumentBookmarkAccess::BookmarkType eMark); - - void SetFieldType(int fftype); - int GetFieldType(); - - void SetChecked(bool checked); - bool IsChecked(); - - void SetFFName(String aNewName) { - this->ffname=aNewName; - } - - String GetFFName() - { - return ffname; - } - - int GetFFRes() { - return ffres; - } - - void SetFFRes(int nNew) { - this->ffres=nNew; - } - - void SetFFHelpText(String newffhelptext) { - this->ffhelptext=newffhelptext; - } - - String GetFFHelpText() { - return ffhelptext; - } -}; - -class SwUNOMark: public SwBookmark -{ -public: - // --> OD 2007-09-26 #i81002# - SwUNOMark( const SwPaM& aPaM, - const KeyCode& rCode, - const String& rName, const String& rShortName); - // <-- -}; - - -#endif diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 04808bd1a8fc..ac64dcb85510 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -911,6 +911,7 @@ Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr #define FN_UNO_PARA_CONT_PREV_SUBTREE (FN_EXTRA2 + 109) #define FN_UNO_PARA_NUM_STRING (FN_EXTRA2 + 110) +#define FN_UNO_TABLE_NAME (FN_EXTRA2 + 111) /*-------------------------------------------------------------------- Bereich: Hilfe diff --git a/sw/inc/crossrefbookmark.hxx b/sw/inc/crossrefbookmark.hxx deleted file mode 100644 index a8b1f78923b4..000000000000 --- a/sw/inc/crossrefbookmark.hxx +++ /dev/null @@ -1,72 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: crossrefbookmark.hxx,v $ - * $Revision: 1.3 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CROSSREFBOOKMRK_HXX -#define _CROSSREFBOOKMRK_HXX - -#include <bookmrk.hxx> - -/** Bookmark for cross-references - - OD 2007-10-11 #i81002# - Bookmark, which bookmarks a complete text node (heading or numbered paragraph) - for cross-referencing. - <GetBookmarkPos()> is always at the beginning of this text node and - <GetOtherBookmarkPos()> is always NULL. - - @author OD -*/ -class SwCrossRefBookmark : public SwBookmark -{ -public: - TYPEINFO(); - - SwCrossRefBookmark( const SwPosition& aPos, - const KeyCode& rCode, - const String& rName, - const String& rShortName ); - - virtual ~SwCrossRefBookmark(); - - virtual const SwPosition* GetOtherBookmarkPos() const; - - virtual void SetBookmarkPos( const SwPosition* pNewPos1 ); - virtual void SetOtherBookmarkPos( const SwPosition* /*pNewPos2*/ ); - - IDocumentBookmarkAccess::CrossReferenceBookmarkSubType GetSubType() const; -private: - // --> OD 2007-11-16 #i83479# - IDocumentBookmarkAccess::CrossReferenceBookmarkSubType mnSubType; - // <-- - - // no copy-constructor and no assignment-operator - SwCrossRefBookmark(const SwCrossRefBookmark &); - SwCrossRefBookmark &operator=(const SwCrossRefBookmark &); -}; -#endif diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 2a66b9a63ca0..4fae1ca69a6b 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -44,7 +44,7 @@ #include <viscrs.hxx> #include <node.hxx> #include <tblsel.hxx> -#include <IDocumentBookmarkAccess.hxx> +#include <IDocumentMarkAccess.hxx> // einige Forward Deklarationen @@ -52,8 +52,6 @@ class KeyCode; class SfxItemSet; class SfxPoolItem; -class SwBookmark; -class SwFieldBookmark; class SwCntntFrm; class SwCrsrShell; class SwCursor; @@ -583,28 +581,22 @@ public: // gehe zur vorherigen Selection BOOL GoPrevCrsr(); - // am CurCrsr.SPoint - BOOL SetBookmark( const KeyCode&, const String& rName, - const String& rShortName, IDocumentBookmarkAccess::BookmarkType eMark = IDocumentBookmarkAccess::BOOKMARK); - BOOL GotoBookmark( USHORT ); // setzt CurCrsr.SPoint - BOOL GotoBookmark( USHORT nPos, BOOL bAtStart ); // - BOOL GoNextBookmark(); // TRUE, wenn's noch eine gab - BOOL GoPrevBookmark(); - USHORT GetBookmarkCnt(BOOL bBkmrk = FALSE) const; - SwBookmark& GetBookmark( USHORT, BOOL bBkmrk = FALSE ); - void DelBookmark( USHORT ); - void DelBookmark( const String& rName ); - USHORT FindBookmark( const String& rName ); - // erzeugt einen eindeutigen Namen. Der Name selbst muss vorgegeben - // werden, es wird dann bei gleichen Namen nur durchnumeriert. - void MakeUniqueBookmarkName( String& rNm ); - - bool IsFormProtected(); - SwBookmark* IsInFieldBookmark(); - SwFieldBookmark* IsInFormFieldBookmark(); - SwBookmark* GetNextFieldBookmark(); - SwBookmark* GetPrevFieldBookmark(); - bool GotoFieldBookmark(SwBookmark *pBkmk); + // at CurCrsr.SPoint + ::sw::mark::IMark* SetBookmark( + const KeyCode&, + const ::rtl::OUString& rName, + const ::rtl::OUString& rShortName, + IDocumentMarkAccess::MarkType eMark = IDocumentMarkAccess::BOOKMARK); + bool GotoMark( const ::sw::mark::IMark* const pMark ); // sets CurCrsr.SPoint + bool GotoMark( const ::sw::mark::IMark* const pMark, bool bAtStart ); + bool GoNextBookmark(); // true, if there was one + bool GoPrevBookmark(); + + bool IsFormProtected(); + ::sw::mark::IFieldmark* GetCurrentFieldmark(); + ::sw::mark::IFieldmark* GetFieldmarkAfter(); + ::sw::mark::IFieldmark* GetFieldmarkBefore(); + bool GotoFieldmark( const ::sw::mark::IFieldmark* const pMark ); // aktualisiere den Crsrs, d.H. setze ihn wieder in den Content. // Das sollte nur aufgerufen werden, wenn der Cursor z.B. beim diff --git a/sw/inc/dialog.hrc b/sw/inc/dialog.hrc index 7e9b8b3389b9..deed99451d94 100644 --- a/sw/inc/dialog.hrc +++ b/sw/inc/dialog.hrc @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: dialog.hrc,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.240.1 $ * * This file is part of OpenOffice.org. * @@ -54,8 +54,7 @@ #define STR_LINKEDIT_TEXT (RC_DIALOG_BEGIN + 1) #define STR_CLOSELINKMSG (RC_DIALOG_BEGIN + 3) -#define STR_PATH_NOT_FOUND1 (RC_DIALOG_BEGIN + 4) -#define STR_PATH_NOT_FOUND2 (RC_DIALOG_BEGIN + 5) +#define STR_PATH_NOT_FOUND (RC_DIALOG_BEGIN + 4) #define STR_FLT_SGV (RC_DIALOG_BEGIN + 8) diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 8fe60d0fb8c7..a82ea0235359 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -39,7 +39,7 @@ #ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED #include <IDocumentDeviceAccess.hxx> #endif -#include <IDocumentBookmarkAccess.hxx> +#include <IDocumentMarkAccess.hxx> #ifndef IREDLINEACCESS_HXX_INCLUDED #include <IDocumentRedlineAccess.hxx> #endif @@ -114,6 +114,8 @@ class SwList; #include <svtools/embedhlp.hxx> #include <vector> +#include <boost/scoped_ptr.hpp> + class SfxObjectShell; class SfxObjectShellRef; class SvxForbiddenCharactersTable; @@ -142,8 +144,6 @@ class SvxMacroTableDtor; class SvxBorderLine; class SwAutoCompleteWord; class SwAutoCorrExceptWord; -class SwBookmark; -class SwBookmarks; class SwCalc; class SwCellFrm; class SwCharFmt; @@ -240,6 +240,9 @@ class SwChartDataProvider; class SwChartLockController_Helper; class IGrammarContact; +namespace sw { namespace mark { + class MarkManager; +}} namespace com { namespace sun { namespace star { namespace i18n { @@ -265,14 +268,13 @@ SV_DECL_PTRARR_DEL( SwPageDescs, SwPageDescPtr, 4, 4 ) void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem ); // global function to start grammar checking in the document -void StartGrammarChecking( SwDoc &rDoc, SwRootFrm &rRootFrame ); +void StartGrammarChecking( SwDoc &rDoc ); class SW_DLLPUBLIC SwDoc : public IInterface, public IDocumentSettingAccess, public IDocumentDeviceAccess, public IDocumentRedlineAccess, - public IDocumentBookmarkAccess, public IDocumentUndoRedo, public IDocumentLinksAdministration, public IDocumentFieldsAccess, @@ -319,6 +321,8 @@ class SW_DLLPUBLIC SwDoc : xXForms; // container with XForms models mutable com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > m_xGCIterator; + const ::boost::scoped_ptr< ::sw::mark::MarkManager> pMarkManager; + // ------------------------------------------------------------------- // die Pointer //Defaultformate @@ -337,8 +341,6 @@ class SW_DLLPUBLIC SwDoc : SwTxtFmtColls *pTxtFmtCollTbl; // FormatCollections SwGrfFmtColls *pGrfFmtCollTbl; - SwBookmarks *pBookmarkTbl; //Bookmarks - SwTOXTypes *pTOXTypes; // Verzeichnisse SwDefTOXBase_Impl * pDefTOXBases; // defaults of SwTOXBase's @@ -755,10 +757,6 @@ public: virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags eMode ); virtual SwCharCompressType getCharacterCompressionType() const; virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType ); - SwBookmark* getFieldBookmarkFor(const SwPosition &pos) const; - SwBookmark* getNextFieldBookmarkFor(const SwPosition &pos) const; - SwBookmark* getPrevFieldBookmarkFor(const SwPosition &pos) const; - SwFieldBookmark* getFormFieldBookmarkFor(const SwPosition &pos) const; /** IDocumentDeviceAccess */ @@ -773,25 +771,10 @@ public: virtual SwPrintData* getPrintData() const; virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData); - /** IDocumentBookmarkAccess + /** IDocumentMarkAccess */ - virtual const SwBookmarks& getBookmarks() const; - virtual SwBookmark* makeBookmark( /*[in]*/const SwPaM& rPaM, /*[in]*/const KeyCode& rKC, - /*[in]*/ const String& rName, /*[in]*/const String& rShortName, - /*[in]*/BookmarkType eMark ); - virtual void deleteBookmark( /*[in]*/sal_uInt16 nPos ); - virtual void deleteBookmark( /*[in]*/const String& rName ); - virtual bool isCrossRefBookmarkName( /*[in]*/const String& rName ); - virtual sal_uInt16 findBookmark( /*[in]*/const String& rName ); - virtual void makeUniqueBookmarkName( /*[in/out]*/String& rName ); - virtual sal_uInt16 getBookmarkCount( /*[in]*/ bool bBkmrk ) const; - virtual SwBookmark& getBookmark( /*[in]*/sal_uInt16 nPos, /*[in]*/bool bBkmrk ); - virtual String getCrossRefBookmarkName( - /*[in]*/const SwTxtNode& rTxtNode, - /*[in]*/const CrossReferenceBookmarkSubType nCrossRefType ) const; - virtual String makeCrossRefBookmark( - /*[in]*/const SwTxtNode& rTxtNode, - /*[in]*/const CrossReferenceBookmarkSubType nCrossRefType ); + IDocumentMarkAccess* getIDocumentMarkAccess(); + const IDocumentMarkAccess* getIDocumentMarkAccess() const; /** IDocumentRedlineAccess */ @@ -1420,7 +1403,7 @@ public: // Methoden fuer die Verzeichnisse: // - Verzeichnismarke einfuegen loeschen travel sal_uInt16 GetCurTOXMark( const SwPosition& rPos, SwTOXMarks& ) const; - void Delete( SwTOXMark* pTOXMark ); + void Delete( const SwTOXMark* pTOXMark ); const SwTOXMark& GotoTOXMark( const SwTOXMark& rCurTOXMark, SwTOXSearch eDir, sal_Bool bInReadOnly ); diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index 649d7b4e650d..c8ffcba549ab 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -35,7 +35,6 @@ class SwFieldType; class SwFrmFmt; class SwCharFmt; -class SwBookmark; class SwTOXType; class SwUndo; class SwSectionFmt; @@ -72,10 +71,6 @@ SV_DECL_PTRARR_DEL(SwCharFmts,SwCharFmtPtr,4,4) SV_DECL_PTRARR_DEL( SwFldTypes, SwFldTypePtr, INIT_FLDTYPES, GROW_FLDTYPES ) -//Bookmarks (nach Dokumentpositionen sortiertes Array) -typedef SwBookmark* SwBookmarkPtr; -SV_DECL_PTRARR_SORT(SwBookmarks, SwBookmarkPtr,0,1) - typedef SwTOXType* SwTOXTypePtr; SV_DECL_PTRARR_DEL( SwTOXTypes, SwTOXTypePtr, 0, 1 ) diff --git a/sw/inc/dochdl.hrc b/sw/inc/dochdl.hrc index 29beaa022c92..1ee4b68efe10 100644 --- a/sw/inc/dochdl.hrc +++ b/sw/inc/dochdl.hrc @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: dochdl.hrc,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.240.1 $ * * This file is part of OpenOffice.org. * @@ -33,8 +33,7 @@ #include "rcid.hrc" -#define STR_NOGLOS1 (RC_DOCHDL_BEGIN + 1) -#define STR_NOGLOS2 (RC_DOCHDL_BEGIN + 2) +#define STR_NOGLOS (RC_DOCHDL_BEGIN + 1) #define MSG_ERR_INSERT_GLOS (RC_DOCHDL_BEGIN + 3) #define MSG_CLPBRD_FORMAT_ERROR (RC_DOCHDL_BEGIN + 4) #define MSG_UPDATE_NEW_GLOS_FMT (RC_DOCHDL_BEGIN + 5) diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx index 31df17358a77..babf6c91436a 100644 --- a/sw/inc/mdiexp.hxx +++ b/sw/inc/mdiexp.hxx @@ -32,6 +32,7 @@ #include <tools/solar.h> #include <tblenum.hxx> +#include <layout/layout.hxx> #include <swdllapi.h> class UniString; @@ -63,7 +64,7 @@ void RescheduleProgress( SwDocShell *pDocShell ); void EnableCmdInterface(BOOL bEnable = TRUE); -Dialog* GetSearchDialog(); +LAYOUT_NS Dialog* GetSearchDialog(); void RepaintPagePreview( ViewShell* pVwSh, const SwRect& rRect ); diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 6bbce692d4ec..5aa259b68c06 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -71,7 +71,7 @@ struct SwPosition; class IStyleAccess; class IDocumentSettingAccess; class IDocumentDeviceAccess; -class IDocumentBookmarkAccess; +class IDocumentMarkAccess; class IDocumentRedlineAccess; class IDocumentStylePoolAccess; class IDocumentLineNumberAccess; @@ -223,7 +223,7 @@ public: /** Provides access to the document bookmark interface */ - const IDocumentBookmarkAccess* getIDocumentBookmarkAccess() const; + const IDocumentMarkAccess* getIDocumentMarkAccess() const; /** Provides access to the document redline interface */ diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 78c658ebf616..fc62291e85c7 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -717,7 +717,6 @@ #include "svx/acorrcfg.hxx" #include "svx/anchorid.hxx" #include "svx/asiancfg.hxx" -#include "svx/charmap.hxx" #include "svx/checklbx.hxx" #include "svx/clipboardctl.hxx" #include "svx/clipfmtitem.hxx" diff --git a/sw/inc/rolbck.hxx b/sw/inc/rolbck.hxx index 84d89d4e6161..f137b8b73e6c 100644 --- a/sw/inc/rolbck.hxx +++ b/sw/inc/rolbck.hxx @@ -44,7 +44,6 @@ class SwDoc; class SwFmt; class SwFmtColl; class SwHstryHint; -class SwBookmark; class SwTxtAttr; class SfxPoolItem; class SwTxtNode; @@ -70,7 +69,7 @@ class SwCharFmt; #include <SwNumberTreeTypes.hxx> // --> OD 2007-10-17 #i81002# -#include <IDocumentBookmarkAccess.hxx> +#include <IDocumentMarkAccess.hxx> // <-- #ifndef PRODUCT @@ -256,22 +255,25 @@ public: class SwHstryBookmark : public SwHstryHint { - String aName, aShortName; - ULONG nNode1, nNode2; - xub_StrLen nCntnt1, nCntnt2; - USHORT nKeyCode; - BYTE nTyp; - // --> OD 2007-10-17 #i81002# - const IDocumentBookmarkAccess::BookmarkType eBkmkType; - // <-- -public: - enum { BKMK_POS = 1, BKMK_OTHERPOS = 2 }; - SwHstryBookmark( const SwBookmark&, BYTE nTyp ); - virtual void SetInDoc( SwDoc* pDoc, BOOL bTmpSet ); - OUT_HSTR_HINT(Bookmark) - - BOOL IsEqualBookmark( const SwBookmark& ); - const String & GetName() const; + public: + SwHstryBookmark(const ::sw::mark::IMark& rBkmk, bool bSavePos, bool bSaveOtherPos); + virtual void SetInDoc(SwDoc * pDoc, BOOL); + OUT_HSTR_HINT(Bookmark) + + BOOL IsEqualBookmark(const ::sw::mark::IMark& rBkmk); + const ::rtl::OUString& GetName() const; + private: + const ::rtl::OUString m_aName; + ::rtl::OUString m_aShortName; + KeyCode m_aKeycode; + const ULONG m_nNode; + const ULONG m_nOtherNode; + const xub_StrLen m_nCntnt; + const xub_StrLen m_nOtherCntnt; + const bool m_bSavePos; + const bool m_bSaveOtherPos; + const bool m_bHadOtherPos; + const IDocumentMarkAccess::MarkType m_eBkmkType; }; class SwHstrySetAttrSet : public SwHstryHint @@ -371,7 +373,7 @@ public: void Add( const SwTxtAttr* pTxtHt, ULONG nNodeIdx, BOOL bNewAttr = TRUE ); void Add( const SwFmtColl*, ULONG nNodeIdx, BYTE nWhichNd ); - void Add( const SwBookmark&, BYTE ); + void Add( const ::sw::mark::IMark&, bool bSavePos, bool bSaveOtherPos ); void Add( const SwFrmFmt& rFmt ); void Add( const SwFlyFrmFmt&, USHORT& rSetPos ); void Add( const SwTxtFtn& ); diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index bc1453b561df..497426e83b4d 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -504,7 +504,7 @@ public: const String& GetBaseURL() const { return sBaseURL;} // suche die naechste Bookmark-Position aus der Bookmark-Tabelle - USHORT FindPos_Bkmk( const SwPosition& rPos ) const; + sal_Int32 FindPos_Bkmk( const SwPosition& rPos ) const; // build a bookmark table, which is sort by the node position. The // OtherPos of the bookmarks also inserted. void CreateBookmarkTbl(); diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 3218a0b57008..78f05d419d0b 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -35,6 +35,7 @@ #include <tools/solar.h> #include <tools/string.hxx> #include <sfx2/sfxdlg.hxx> +#include <svx/svxdlg.hxx> #include <vcl/syswin.hxx> #ifndef _GLOBALS_HRC #include <globals.hrc> @@ -346,9 +347,13 @@ class SwAbstractDialogFactory public: static SwAbstractDialogFactory* Create(); + virtual SfxAbstractDialog* CreateSfxDialog( Window* pParent, //add for SvxMeasureDialog & SvxConnectionDialog + const SfxItemSet& rAttr, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame, + sal_uInt32 nResId + ) = 0; virtual AbstractSwWordCountDialog* CreateSwWordCountDialog( Window* pWindow ) = 0; virtual AbstractSwInsertAbstractDlg * CreateSwInsertAbstractDlg ( Window* pParent, int nResId) = 0; // add for SwInsertAbstractDlg - virtual AbstractSfxSingleTabDialog* CreateSfxSingleTabDialog ( Window* pParent, SfxItemSet& rSet, int nResId ) = 0; // add for SwAddrDlg SwDropCapsDlg, SwBackgroundDlg,SwNumFmtDlg, virtual AbstractSwAsciiFilterDlg* CreateSwAsciiFilterDlg ( Window* pParent, SwDocShell& rDocSh, SvStream* pStream, int nResId ) = 0;// add for SwAsciiFilterDlg virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, int nResId ) = 0;// add for SwInsertBookmarkDlg @@ -394,15 +399,15 @@ public: int nResId, BOOL bSetAutoFmt = TRUE, const SwTableAutoFmt* pSelFmt = 0 ) = 0; - virtual AbstractSfxSingleTabDialog * CreateSwBorderDlg ( Window* pParent, SfxItemSet& rSet, USHORT nType,int nResId ) = 0;//add for SwBorderDlg - virtual AbstractSfxSingleTabDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId ) = 0; //add for SwWrapDlg + virtual SfxAbstractDialog * CreateSwBorderDlg ( Window* pParent, SfxItemSet& rSet, USHORT nType, int nResId ) = 0;//add for SwBorderDlg + virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId ) = 0; //add for SwWrapDlg virtual VclAbstractDialog * CreateSwTableWidthDlg ( Window *pParent, SwTableFUNC &rFnc , int nResId ) = 0; //add for SwTableWidthDlg virtual SfxAbstractTabDialog* CreateSwTableTabDlg( Window* pParent, SfxItemPool& Pool, const SfxItemSet* pItemSet, SwWrtShell* pSh,int nResId ) = 0; //add for SwTableTabDlg virtual AbstractSwFldDlg * CreateSwFldDlg ( SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent, int nResId ) = 0; //add for SwFldDlg - virtual AbstractSfxSingleTabDialog* CreateSwFldEditDlg ( SwView& rVw, int nResId ) = 0; //add for SwFldEditDlg + virtual SfxAbstractDialog* CreateSwFldEditDlg ( SwView& rVw, int nResId ) = 0; //add for SwFldEditDlg virtual AbstractSwRenameXNamedDlg * CreateSwRenameXNamedDlg( Window* pParent, //add for SwRenameXNamedDlg STAR_REFERENCE( container::XNamed ) & xNamed, STAR_REFERENCE( container::XNameAccess ) & xNameAccess, int nResId ) = 0; diff --git a/sw/inc/swserv.hxx b/sw/inc/swserv.hxx index 2f410ac391d5..b421bee29af9 100644 --- a/sw/inc/swserv.hxx +++ b/sw/inc/swserv.hxx @@ -31,8 +31,8 @@ #define _SWSERV_HXX #include <sfx2/linksrc.hxx> +#include <IMark.hxx> -class SwBookmark; class SwSectionNode; class SwBaseLink; class SwTableNode; @@ -46,7 +46,7 @@ class SwServerObject : public ::sfx2::SvLinkSource protected: enum ServerModes { BOOKMARK_SERVER, TABLE_SERVER, SECTION_SERVER, NONE_SERVER } eType; union { - SwBookmark* pBkmk; + ::sw::mark::IMark* pBkmk; SwTableNode* pTblNd; SwSectionNode* pSectNd; } CNTNT_TYPE; @@ -54,7 +54,7 @@ protected: SwServerObject(); public: - SwServerObject( SwBookmark& rBookmark ) + SwServerObject( ::sw::mark::IMark& rBookmark ) : eType( BOOKMARK_SERVER ) { CNTNT_TYPE.pBkmk = &rBookmark; @@ -72,8 +72,8 @@ public: virtual ~SwServerObject(); virtual BOOL GetData( ::com::sun::star::uno::Any & rData, - const String & rMimeType, - BOOL bSynchron = FALSE ); + const String & rMimeType, + BOOL bSynchron = FALSE ); BOOL SetData( const String & rMimeType, const ::com::sun::star::uno::Any& rData ); @@ -83,7 +83,8 @@ public: BOOL IsLinkInServer( const SwBaseLink* ) const; - void SetNoServer() { CNTNT_TYPE.pBkmk = 0, eType = NONE_SERVER; } + void SetNoServer(); + void SetDdeBookmark( ::sw::mark::IMark& rBookmark); }; #ifndef SW_DECL_SWSERVEROBJECT_DEFINED diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx index 2a23f487bc0e..ebf27999b0aa 100644 --- a/sw/inc/swunohelper.hxx +++ b/sw/inc/swunohelper.hxx @@ -75,7 +75,7 @@ BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList, SvPtrarr* pDateTimeList = 0 ); // is the URL an existing file? -BOOL UCB_IsFile( const String& rURL ); +SW_DLLPUBLIC BOOL UCB_IsFile( const String& rURL ); // is the URL a existing directory? BOOL UCB_IsDirectory( const String& rURL ); diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index f1490eeb6d5d..00053210553a 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -48,7 +48,7 @@ #include <swundo.hxx> - +#include <IMark.hxx> // --> OD 2006-11-01 #130889# #include <vector> // <-- @@ -63,7 +63,6 @@ class SwFmt; class SwFmtColl; class SwTxtFmtColl; class SwTxtNode; -class SwBookmark; class SwTableNode; class SwTable; class SwTableBox; @@ -1084,7 +1083,7 @@ class SwUndoBookmark : public SwUndo { SwHstryBookmark* pHBookmark; protected: - SwUndoBookmark( SwUndoId nUndoId, const SwBookmark& ); + SwUndoBookmark( SwUndoId nUndoId, const ::sw::mark::IMark& ); void SetInDoc( SwDoc* ); void ResetInDoc( SwDoc* ); @@ -1112,7 +1111,7 @@ public: class SwUndoDelBookmark : public SwUndoBookmark { public: - SwUndoDelBookmark( const SwBookmark& ); + SwUndoDelBookmark( const ::sw::mark::IMark& ); virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); OUT_UNDOBJ( DelBookmark ) @@ -1121,7 +1120,7 @@ public: class SwUndoInsBookmark : public SwUndoBookmark { public: - SwUndoInsBookmark( const SwBookmark& ); + SwUndoInsBookmark( const ::sw::mark::IMark& ); virtual void Undo( SwUndoIter& ); virtual void Redo( SwUndoIter& ); OUT_UNDOBJ( InsBookmark ) diff --git a/sw/inc/unoatxt.hxx b/sw/inc/unoatxt.hxx index 8122cdb5dc09..b115919a5623 100644 --- a/sw/inc/unoatxt.hxx +++ b/sw/inc/unoatxt.hxx @@ -120,7 +120,7 @@ class SwXAutoTextGroup : public cppu::WeakImplHelper6 ::com::sun::star::lang::XUnoTunnel > { - SfxItemPropertySet aPropSet; + const SfxItemPropertySet* pPropSet; SwGlossaries* pGlossaries; rtl::OUString sName; String m_sGroupName; // prefix m_ to disambiguate from some local vars in the implementation diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx index a3936fbe6bb5..955030cbada8 100644 --- a/sw/inc/unochart.hxx +++ b/sw/inc/unochart.hxx @@ -281,7 +281,7 @@ class SwChartDataSequence : SwUnoCrsr* pTblCrsr; // cursor spanned over cells to use SwDepend aCursorDepend; //the cursor is removed after the doc has been removed - const SfxItemPropertyMap* pMap; + const SfxItemPropertySet* _pPropSet; sal_Bool bDisposed; diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx index 596b8e682838..99a089f1194e 100644 --- a/sw/inc/unocoll.hxx +++ b/sw/inc/unocoll.hxx @@ -33,6 +33,7 @@ #include <flyenum.hxx> #include <vcl/timer.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XIndexAccess.hpp> #include <tools/string.hxx> @@ -40,6 +41,8 @@ #include <cppuhelper/implbase2.hxx> // helper for implementations #include <cppuhelper/implbase3.hxx> // helper for implementations #include <cppuhelper/implbase4.hxx> // helper for implementations +#include <IMark.hxx> +#include <unobaseclass.hxx> /*************************************************** *************************************************** * @@ -58,7 +61,6 @@ class SwFmtFtn; class XBookmark; class SwXReferenceMark; class SwSectionFmt; -class SwBookmark; class SwFmtRefMark; class SwXReferenceMark; class SwXBookmark; @@ -304,17 +306,23 @@ public: virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); +virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); static ::com::sun::star::text::XTextTable* GetObject( SwFrmFmt& rFmt ); }; -/*-----------------11.12.97 10:14------------------- +typedef +cppu::WeakImplHelper4 +< + ::com::sun::star::container::XEnumerationAccess, + ::com::sun::star::container::XNameAccess, + ::com::sun::star::container::XIndexAccess, + ::com::sun::star::lang::XServiceInfo +> SwXFramesBaseClass; ---------------------------------------------------*/ -class SwXFrames : public SwCollectionBaseClass, +class SwXFrames : public SwXFramesBaseClass, public SwUnoCollection { const FlyCntType eType; @@ -323,6 +331,9 @@ protected: public: SwXFrames(SwDoc* pDoc, FlyCntType eSet); + //XEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); + //XIndexAccess virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); @@ -444,31 +455,31 @@ public: class SwXBookmarks : public SwCollectionBaseClass, public SwUnoCollection { -protected: - virtual ~SwXBookmarks(); -public: - SwXBookmarks(SwDoc* pDoc); + protected: + virtual ~SwXBookmarks(); + public: + SwXBookmarks(SwDoc* pDoc); - //XIndexAccess - virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - //XNameAccess - virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); + //XNameAccess + virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); + //XElementAccess + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - static SwXBookmark* GetObject( SwBookmark& rBkm, SwDoc* pDoc ); + static SwXBookmark* GetObject( ::sw::mark::IMark& rBkm, SwDoc* pDoc); }; class SwXNumberingRulesCollection : public cppu::WeakImplHelper1 diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx index 6a74498cf724..7133f6edba46 100644 --- a/sw/inc/unocrsrhelper.hxx +++ b/sw/inc/unocrsrhelper.hxx @@ -32,9 +32,9 @@ #include <com/sun/star/beans/XPropertyState.hpp> #include <unocrsr.hxx> +#include <map> - -struct SfxItemPropertyMap; +struct SfxItemPropertySimpleEntry; class SwPaM; class SwDoc; @@ -46,12 +46,23 @@ namespace com{ namespace sun{ namespace star{ struct PropertyValue; } }}} + /* -----------------------------14.12.00 15:06-------------------------------- ---------------------------------------------------------------------------*/ namespace SwUnoCursorHelper { - sal_Bool getCrsrPropertyValue(const SfxItemPropertyMap* pMap + // keep Any's mapped by (WhichId << 16 ) + (MemberId) + typedef std::map< sal_uInt32, com::sun::star::uno::Any *> AnyMapHelper_t; + class SwAnyMapHelper : public AnyMapHelper_t + { + public: + ~SwAnyMapHelper(); + + void SetValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any& rAny ); + bool FillValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any*& pAny ); + }; + sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry , SwPaM& rPam , com::sun::star::uno::Any *pAny , com::sun::star::beans::PropertyState& eState @@ -65,7 +76,7 @@ namespace SwUnoCursorHelper { return rUnoCrsr.GetCntntNode() && rUnoCrsr.GetPoint()->nContent == rUnoCrsr.GetCntntNode()->Len();} - void resetCrsrPropertyValue(const SfxItemPropertyMap* pMap, SwPaM& rPam); + void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPam); void InsertFile(SwUnoCrsr* pUnoCrsr, const String& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rOptions diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index 0103e969e8be..05857bbc6fe1 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -42,8 +42,10 @@ #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/drawing/XShapes.hpp> #include <cppuhelper/implbase3.hxx> // helper for implementations +#include <cppuhelper/implbase4.hxx> // helper for implementations // --> OD 2004-07-22 #i31698# #include <cppuhelper/implbase6.hxx> // helper for implementations +#include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/drawing/HomogenMatrix3.hpp> // <-- #include <svtools/itemprop.hxx> @@ -83,11 +85,9 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw (); }; -/* -----------------09.12.98 08:57------------------- - * - * --------------------------------------------------*/ -typedef cppu::WeakAggImplHelper3 +typedef cppu::WeakAggImplHelper4 < + ::com::sun::star::container::XEnumerationAccess, ::com::sun::star::drawing::XDrawPage, ::com::sun::star::lang::XServiceInfo, ::com::sun::star::drawing::XShapeGrouper @@ -102,6 +102,9 @@ public: SwXDrawPage(SwDoc* pDoc); ~SwXDrawPage(); + //XEnumerationAccess + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); @@ -162,8 +165,8 @@ class SwXShape : public SwXShapeBaseClass, ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape; // <-- - SfxItemPropertySet aPropSet; - const SfxItemPropertyMap* _pMap; + const SfxItemPropertySet* m_pPropSet; + const SfxItemPropertyMapEntry* m_pPropertyMapEntries; com::sun::star::uno::Sequence< sal_Int8 >* pImplementationId; SwShapeDescriptor_Impl* pImpl; @@ -315,6 +318,9 @@ public: SwShapeDescriptor_Impl* GetDescImpl() {return pImpl;} ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > GetAggregationInterface() {return xShapeAgg;} + + // helper + static void AddExistingShapeToFmt( SdrObject& _rObj ); }; /* -----------------------------31.05.01 09:54-------------------------------- diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx index 417caf0290f5..a02999c8ca3d 100644 --- a/sw/inc/unoframe.hxx +++ b/sw/inc/unoframe.hxx @@ -43,6 +43,7 @@ */ class SwDoc; +class SfxItemPropertSet; /*-----------------12.02.98 11:21------------------- --------------------------------------------------*/ @@ -59,9 +60,8 @@ class SwXFrame : public cppu::WeakImplHelper6 public SwClient { SwEventListenerContainer aLstnrCntnr; - SfxItemPropertySet aPropSet; - const SfxItemPropertyMap* _pMap; - SwDoc* mpDoc; + const SfxItemPropertySet* m_pPropSet; + SwDoc* m_pDoc; const FlyCntType eType; @@ -79,10 +79,10 @@ protected: virtual ~SwXFrame(); public: SwXFrame(FlyCntType eSet, - const SfxItemPropertyMap* pMap, + const SfxItemPropertySet* pPropSet, SwDoc *pDoc ); //Descriptor-If SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet, - const SfxItemPropertyMap* pMap); + const SfxItemPropertySet* pPropSet); static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); @@ -166,7 +166,7 @@ class SwXTextFrame : public SwXTextFrameBaseClass, public SwXText, public SwXFrame { - const SfxItemPropertyMap* _pMap; + const SfxItemPropertSet* _pPropSet; protected: virtual const SwStartNode *GetStartNode() const; diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx index 3832f3376aea..5ea20f65c89d 100644 --- a/sw/inc/unoidx.hxx +++ b/sw/inc/unoidx.hxx @@ -60,7 +60,7 @@ class SwXDocumentIndex : public cppu::WeakImplHelper5 friend class SwXIndexTokenAccess_Impl; SwEventListenerContainer aLstnrCntnr; - const SfxItemPropertyMap* _pMap; + const SfxItemPropertySet* m_pPropSet; SwDoc* m_pDoc; const SwTOXBaseSection* pBase; TOXTypes eTOXType; @@ -153,7 +153,7 @@ class SwXDocumentIndexMark : public cppu::WeakImplHelper4 SwDepend aTypeDepend; SwDoc* m_pDoc; const SwTOXMark* m_pTOXMark; - const SfxItemPropertyMap* _pMap; + const SfxItemPropertySet* m_pPropSet; sal_Bool bIsDescriptor; sal_Bool bMainEntry; diff --git a/sw/inc/unomailmerge.hxx b/sw/inc/unomailmerge.hxx index cb940dcb0ced..3dbe497b2e3c 100644 --- a/sw/inc/unomailmerge.hxx +++ b/sw/inc/unomailmerge.hxx @@ -109,7 +109,7 @@ class SwXMailMerge : OPropertyListenerContainerHelper aPropListeners; //SfxItemPropertySet aPropSet; - const SfxItemPropertyMap* pMap; + const SfxItemPropertySet* pPropSet; SfxObjectShellRef xDocSh; // the document diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx index 7b1b90cce3b2..9de2db4f493c 100644 --- a/sw/inc/unomap.hxx +++ b/sw/inc/unomap.hxx @@ -134,18 +134,6 @@ #define PROPERTY_MAP_END 98 -#define PROPERTY_SET_CHAR_STYLE 1 -#define PROPERTY_SET_PARA_STYLE 2 -#define PROPERTY_SET_FRAME_STYLE 3 -#define PROPERTY_SET_PAGE_STYLE 4 -#define PROPERTY_SET_NUM_STYLE 5 -// basically the same as PROPERTY_SET_PARA_STYLE with additional property -// that is only available for conditional para styles -#define PROPERTY_SET_CONDITIONAL_PARA_STYLE 6 -#define PROPERTY_SET_CHAR_AUTO_STYLE 7 -#define PROPERTY_SET_RUBY_AUTO_STYLE 8 -#define PROPERTY_SET_PARA_AUTO_STYLE 9 - //S&E #define WID_WORDS 0 #define WID_BACKWARDS 1 @@ -337,7 +325,7 @@ class SwItemPropertySet : public SfxItemPropertySet protected: virtual sal_Bool FillItem(SfxItemSet& rSet, sal_uInt16 nWhich, sal_Bool bGetProperty) const; public: - SwItemPropertySet( const SfxItemPropertyMap *pMap ) : + SwItemPropertySet( const SfxItemPropertyMapEntry *pMap ) : SfxItemPropertySet( pMap ){} }; /* -----------------04.07.98 11:41------------------- @@ -345,26 +333,16 @@ public: * --------------------------------------------------*/ class SwUnoPropertyMapProvider { - SfxItemPropertyMap* aMapArr[PROPERTY_MAP_END]; - - SfxItemPropertySet* pCharStyleMap; - SfxItemPropertySet* pParaStyleMap; - SfxItemPropertySet* pFrameStyleMap; - SfxItemPropertySet* pPageStyleMap; - SfxItemPropertySet* pNumStyleMap; - SfxItemPropertySet* pConditionalParaStyleMap; - SfxItemPropertySet* pCharAutoStyleMap; - SfxItemPropertySet* pParaAutoStyleMap; - SfxItemPropertySet* pRubyAutoStyleMap; + SfxItemPropertyMapEntry* aMapEntriesArr[PROPERTY_MAP_END]; + SfxItemPropertySet* aPropertySetArr[PROPERTY_MAP_END]; - void Sort(sal_uInt16 nId); public: SwUnoPropertyMapProvider(); ~SwUnoPropertyMapProvider(); - const SfxItemPropertyMap* GetPropertyMap(sal_uInt16 PropertyId); + const SfxItemPropertyMapEntry* GetPropertyMapEntries(sal_uInt16 PropertyId); + const SfxItemPropertySet* GetPropertySet( sal_uInt16 PropertyId ); - SfxItemPropertySet& GetPropertySet(sal_Int8 nPropSetId); }; extern SwUnoPropertyMapProvider aSwMapProvider; diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx index 7893d198309c..74a67295d23e 100644 --- a/sw/inc/unoobj.hxx +++ b/sw/inc/unoobj.hxx @@ -59,9 +59,7 @@ #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XMultiPropertySet.hpp> -//#ifndef _COM_SUN_STAR_BEANS_XTOLERANTMULTIPROPERTYSET_HPP_ -//#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp> -//#endif +#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp> #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/beans/XMultiPropertyStates.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> @@ -91,11 +89,10 @@ #include <unomid.h> #include <tools/link.hxx> -#include <IDocumentBookmarkAccess.hxx> +#include <IDocumentMarkAccess.hxx> class SwUnoCrsr; class SwCursor; -class SwBookmark; class SwFmtFtn; class SwFmtRefMark; class GetCurTxtFmtColl; @@ -217,7 +214,7 @@ class SwXText : public ::com::sun::star::lang::XTypeProvider, SwDoc* pDoc; BOOL bObjectValid; CursorType eCrsrType; - const SfxItemPropertyMap* _pMap; + const SfxItemPropertySet* m_pPropSet; virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL finishOrAppendParagraph( bool bFinish, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & CharacterAndParagraphProperties ) @@ -318,7 +315,8 @@ enum SwGetPropertyStatesCaller { SW_PROPERTY_STATE_CALLER_DEFAULT, SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION, - SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY + SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY, + SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT }; #define CRSR_ATTR_MODE_TABLE 1 //attributes should be applied to a table selection #define CRSR_ATTR_MODE_DONTREPLACE 2 //attributes should be added, not replaced @@ -342,7 +340,7 @@ class SwXTextCursor : public SwXTextCursor_Base, public OTextCursorHelper { SwEventListenerContainer aLstnrCntnr; - SfxItemPropertySet aPropSet; + const SfxItemPropertySet* m_pPropSet; ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; SwSortOptions* pLastSortOptions; @@ -439,7 +437,6 @@ public: const SfxItemPropertySet& rPropSet, const rtl::OUString& rPropertyName, const ::com::sun::star::uno::Any& aValue, - const SfxItemPropertyMap* pMap = 0, USHORT nAttrMode = 0) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, @@ -447,8 +444,8 @@ public: ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); static ::com::sun::star::uno::Any GetPropertyValue( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > GetPropertyStates( SwPaM& rPaM, SfxItemPropertySet& rPropSet, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, SwGetPropertyStatesCaller eCaller = SW_PROPERTY_STATE_CALLER_DEFAULT) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - static ::com::sun::star::beans::PropertyState GetPropertyState( SwPaM& rPaM, SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > GetPropertyStates( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, SwGetPropertyStatesCaller eCaller = SW_PROPERTY_STATE_CALLER_DEFAULT) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + static ::com::sun::star::beans::PropertyState GetPropertyState( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); static void SetPropertyToDefault( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); static ::com::sun::star::uno::Any GetPropertyDefault( SwPaM& rPaM, const SfxItemPropertySet& rPropSet, const ::rtl::OUString& rPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); @@ -568,11 +565,7 @@ public: }; */ -/*-----------------20.02.98 08:45------------------- - ---------------------------------------------------*/ -typedef -cppu::WeakImplHelper5 +typedef cppu::WeakImplHelper5 < ::com::sun::star::text::XTextContent, ::com::sun::star::beans::XPropertySet, @@ -580,84 +573,98 @@ cppu::WeakImplHelper5 ::com::sun::star::container::XNamed, ::com::sun::star::lang::XUnoTunnel > -SwRefBookmarkBaseClass; -class SwXBookmark : public SwRefBookmarkBaseClass, - public SwClient +SwRefMarkBaseClass; + +class SwXBookmark + : public SwRefMarkBaseClass + , private SwClient { -protected: - SwEventListenerContainer aLstnrCntnr; - SwDoc* pDoc; - String m_aName; - BOOL bIsDescriptor; -protected: - virtual ~SwXBookmark(); -public: - SwXBookmark(SwBookmark* pBkm = 0, SwDoc* pDoc = 0); + private: + SwEventListenerContainer m_aLstnrCntnr; + SwDoc* m_pDoc; + String m_aName; + ::sw::mark::IMark* m_pRegisteredBookmark; + + void registerInMark(::sw::mark::IMark* const pBkmk) + { + if(pBkmk) + pBkmk->Add(this); + else if(m_pRegisteredBookmark) + { + m_aName = m_pRegisteredBookmark->GetName(); + m_pRegisteredBookmark->Remove(this); + } + m_pRegisteredBookmark = pBkmk; + } + + protected: + virtual ~SwXBookmark(); + public: + SwXBookmark(::sw::mark::IMark* pMark = 0, SwDoc* pDoc = 0); - TYPEINFO(); + TYPEINFO(); - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - //XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); + //XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); - //XTextContent - virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); + //XTextContent + virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException); - //XComponent - virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + //XComponent + virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException ); - //XNamed - virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException ); + //XNamed + virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setName(const rtl::OUString& rName) throw( ::com::sun::star::uno::RuntimeException ); - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); + //XServiceInfo + virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); - //XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + //XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - void attachToRangeEx(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange, IDocumentBookmarkAccess::BookmarkType eMark)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + void attachToRangeEx(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange, IDocumentMarkAccess::MarkType eType) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); + //SwClient + virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ); - SwBookmark* GetBookmark() const { return (SwBookmark*)GetRegisteredIn(); } - SwDoc* GetDoc(){return pDoc;} + const ::sw::mark::IMark* GetBookmark() const + { return m_pRegisteredBookmark; } + SwDoc* GetDoc() + { return m_pDoc; } }; typedef cppu::ImplInheritanceHelper1< SwXBookmark, ::com::sun::star::text::XFormField > SwXFieldmark_BASE; class SwXFieldmark : public SwXFieldmark_BASE { -private: - bool isReplacementObject; -public: - SwXFieldmark(bool isReplacementObject, SwBookmark* pBkm = 0, SwDoc* pDoc = 0); - - virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::rtl::OUString SAL_CALL getDescription(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::sal_Int16 SAL_CALL getType( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int16 SAL_CALL getRes( ) throw (::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL setType( ::sal_Int16 fieldType ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setRes( ::sal_Int16 res ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setDescription( const ::rtl::OUString& description ) throw (::com::sun::star::uno::RuntimeException); + private: + bool isReplacementObject; + public: + SwXFieldmark(bool isReplacementObject, ::sw::mark::IMark* pBkm = 0, SwDoc* pDoc = 0); -// virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException); + virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); + virtual ::rtl::OUString SAL_CALL getDescription(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::sal_Int16 SAL_CALL getType( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getRes( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setType( ::sal_Int16 fieldType ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setRes( ::sal_Int16 res ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDescription( const ::rtl::OUString& description ) throw (::com::sun::star::uno::RuntimeException); }; /*-----------------23.02.98 10:45------------------- @@ -707,9 +714,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > CreateTextCursor(BOOL bIgnoreTables = sal_False); }; -/*-----------------23.02.98 12:05------------------- ---------------------------------------------------*/ class SW_DLLPUBLIC SwXTextRange : public cppu::WeakImplHelper8 < ::com::sun::star::text::XTextRange, @@ -720,7 +725,7 @@ class SW_DLLPUBLIC SwXTextRange : public cppu::WeakImplHelper8 ::com::sun::star::beans::XPropertyState, ::com::sun::star::container::XEnumerationAccess, ::com::sun::star::text::XRedline ->, public SwClient +>, private SwClient { friend class SwXText; enum RangePosition @@ -736,10 +741,10 @@ class SW_DLLPUBLIC SwXTextRange : public cppu::WeakImplHelper8 SwTableBox* pBox; const SwStartNode* pBoxStartNode; SwDepend aObjectDepend; //Format der Tabelle oder des Rahmens anmelden - SfxItemPropertySet aPropSet; + const SfxItemPropertySet* m_pPropSet; //SwDepend aFrameDepend; ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; - + ::sw::mark::IMark* pMark; void _CreateNewBookmark(SwPaM& rPam); //TODO: new exception type for protected content @@ -803,18 +808,20 @@ public: virtual void SAL_CALL makeRedline( const ::rtl::OUString& RedlineType, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& RedlineProperties ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); //SwClient - virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew); - - BOOL GetPositions(SwPaM& rToFill) const; - const SwDoc* GetDoc()const {return pDoc;} - SwDoc* GetDoc(){return pDoc;} - - SwBookmark* GetBookmark() const { return (SwBookmark*)GetRegisteredIn(); } - - static BOOL XTextRangeToSwPaM( SwUnoInternalPaM& rToFill, - const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange); - static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > CreateTextRangeFromPosition(SwDoc* pDoc, - const SwPosition& rPos, const SwPosition* pMark); + virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + BOOL GetPositions(SwPaM& rToFill) const; + const SwDoc* GetDoc() const + { return pDoc; } + SwDoc* GetDoc() + { return pDoc; } + const ::sw::mark::IMark * GetBookmark() const + { return pMark; } + + static BOOL XTextRangeToSwPaM(SwUnoInternalPaM& rToFill, + const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange); + static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > CreateTextRangeFromPosition( + SwDoc* pDoc, + const SwPosition& rPos, const SwPosition* pMark); }; /* -----------------15.05.98 08:29------------------- @@ -913,7 +920,7 @@ class SwXTextSection : public cppu::WeakImplHelper7 { friend class SwXTextSectionClient; SwEventListenerContainer aLstnrCntnr; - SfxItemPropertySet aPropSet; + const SfxItemPropertySet* m_pPropSet; BOOL m_bIsDescriptor; BOOL m_bIndexHeader; @@ -1139,9 +1146,9 @@ public: /*-----------------07.04.98 08:15------------------- --------------------------------------------------*/ -class SwXParagraph : public cppu::WeakImplHelper9 +class SwXParagraph : public cppu::WeakImplHelper10 < -// ::com::sun::star::beans::XTolerantMultiPropertySet, + ::com::sun::star::beans::XTolerantMultiPropertySet, ::com::sun::star::beans::XMultiPropertySet, ::com::sun::star::text::XTextRange, ::com::sun::star::beans::XPropertySet, @@ -1156,7 +1163,7 @@ class SwXParagraph : public cppu::WeakImplHelper9 { ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; SwEventListenerContainer aLstnrCntnr; - SfxItemPropertySet aPropSet; + const SfxItemPropertySet* m_pPropSet; rtl::OUString m_sText; sal_Int32 nSelectionStartPos; sal_Int32 nSelectionEndPos; @@ -1167,9 +1174,9 @@ protected: void SAL_CALL SetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); -// ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL GetPropertyValuesTolerant_Impl( -// const ::com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames, -// sal_Bool bDirectValuesOnly ) throw (::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL GetPropertyValuesTolerant_Impl( + const ::com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames, + sal_Bool bDirectValuesOnly ) throw (::com::sun::star::uno::RuntimeException); virtual ~SwXParagraph(); public: @@ -1183,9 +1190,9 @@ public: virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); //XTolerantMultiPropertySet -// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL setPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); -// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL getPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); -// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL setPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL getPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); //XMultiPropertySet // virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); @@ -1428,7 +1435,7 @@ public: /* -----------------27.08.98 15:11------------------- * * --------------------------------------------------*/ -class SwXReferenceMark : public SwRefBookmarkBaseClass, +class SwXReferenceMark : public SwRefMarkBaseClass, public SwClient { SwEventListenerContainer aLstnrCntnr; diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx index 1d6b60436a7b..ed29a995dfe3 100644 --- a/sw/inc/unoport.hxx +++ b/sw/inc/unoport.hxx @@ -38,9 +38,7 @@ #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/beans/XMultiPropertySet.hpp> -//#ifndef _COM_SUN_STAR_BEANS_XTOLERANTMULTIPROPERTYSET_HPP_ -//#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp> -//#endif +#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp> #include <com/sun/star/text/XTextField.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> @@ -80,9 +78,9 @@ enum SwTextPortionType class SwXRubyPortion; -class SwXTextPortion : public cppu::WeakImplHelper8 +class SwXTextPortion : public cppu::WeakImplHelper9 < -// ::com::sun::star::beans::XTolerantMultiPropertySet, + ::com::sun::star::beans::XTolerantMultiPropertySet, ::com::sun::star::beans::XMultiPropertySet, ::com::sun::star::beans::XPropertySet, ::com::sun::star::text::XTextRange, @@ -96,7 +94,7 @@ class SwXTextPortion : public cppu::WeakImplHelper8 { friend class SwXRubyPortion; SwEventListenerContainer aLstnrCntnr; - SfxItemPropertySet aPropSet; + const SfxItemPropertySet* m_pPropSet; ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xRefMark; ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > xTOXMark; @@ -117,10 +115,15 @@ class SwXTextPortion : public cppu::WeakImplHelper8 SwFmtFld* GetFldFmt(BOOL bInit = sal_False); protected: - SfxItemPropertySet& GetPropSet() { return aPropSet; } + //SfxItemPropertySet& GetPropSet() { return aPropSet; } - void SAL_CALL SetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + void SAL_CALL SetPropertyValues_Impl( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) + throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( + const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) + throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); // ::com::sun::star::uno::Any GetPropertyValue( const SfxItemPropertyMap *pEntry, // SwUnoCrsr *pUnoCrsr, @@ -130,11 +133,11 @@ protected: sal_Int32 nLength ); void GetPropertyValue( ::com::sun::star::uno::Any &rVal, - const SfxItemPropertyMap *pEntry, SwUnoCrsr *pUnoCrsr, SfxItemSet *&pSet ); + const SfxItemPropertySimpleEntry& rEntry, SwUnoCrsr *pUnoCrsr, SfxItemSet *&pSet ); -// ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL GetPropertyValuesTolerant_Impl( -// const ::com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames, -// sal_Bool bDirectValuesOnly ) throw (::com::sun::star::uno::RuntimeException); + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL GetPropertyValuesTolerant_Impl( + const ::com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames, + sal_Bool bDirectValuesOnly ) throw (::com::sun::star::uno::RuntimeException); virtual ~SwXTextPortion(); public: @@ -150,9 +153,9 @@ public: virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); //XTolerantMultiPropertySet -// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL setPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); -// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL getPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); -// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL setPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL getPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); //XMultiPropertySet // virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx index 0fe1705c9988..bc9cd02a3ac7 100644 --- a/sw/inc/unosett.hxx +++ b/sw/inc/unosett.hxx @@ -44,13 +44,12 @@ #include <cppuhelper/implbase4.hxx> #include <cppuhelper/implbase5.hxx> #include <tools/string.hxx> +#include <svtools/itemprop.hxx> class SwDoc; class SwFmtCol; class SwDocShell; class SwNumRule; -struct SfxItemPropertyMap; - /****************************************************************************** * ******************************************************************************/ @@ -64,7 +63,7 @@ class SwXFootnoteProperties : public cppu::WeakAggImplHelper2 > { SwDoc* pDoc; - const SfxItemPropertyMap* _pMap; + const SfxItemPropertySet* m_pPropertySet; protected: virtual ~SwXFootnoteProperties(); public: @@ -98,7 +97,7 @@ class SwXEndnoteProperties : public cppu::WeakAggImplHelper2 > { SwDoc* pDoc; - const SfxItemPropertyMap* _pMap; + const SfxItemPropertySet* m_pPropertySet; protected: virtual ~SwXEndnoteProperties(); public: @@ -132,7 +131,7 @@ class SwXLineNumberingProperties : public cppu::WeakAggImplHelper2 > { SwDoc* pDoc; - const SfxItemPropertyMap* _pMap; + const SfxItemPropertySet* m_pPropertySet; protected: virtual ~SwXLineNumberingProperties(); public: @@ -175,7 +174,7 @@ class SwXNumberingRules : public cppu::WeakAggImplHelper5 SwDoc* pDoc; // wird nur fuers anmelden gebraucht SwDocShell* pDocShell; //nur, wenn als ChapterNumbering verwendet SwNumRule* pNumRule; - const SfxItemPropertyMap* _pMap; + const SfxItemPropertySet* m_pPropertySet; sal_Bool bOwnNumRuleCreated; static String sInvalidStyle; protected: @@ -275,7 +274,7 @@ class SwXTextColumns : public cppu::WeakAggImplHelper4 sal_Bool bIsAutomaticWidth; sal_Int32 nAutoDistance; - const SfxItemPropertyMap* _pMap; + const SfxItemPropertySet* m_pPropSet; //separator line sal_Int32 nSepLineWidth; diff --git a/sw/inc/unosrch.hxx b/sw/inc/unosrch.hxx index 47b287d6c697..f03048f240b6 100644 --- a/sw/inc/unosrch.hxx +++ b/sw/inc/unosrch.hxx @@ -39,7 +39,7 @@ /****************************************************************************** * ******************************************************************************/ -struct SfxItemPropertyMap; +class SfxItemPropertySet; class SwXTextDocument; class SwSearchProperties_Impl; class SfxItemSet; @@ -68,7 +68,7 @@ class SwXTextSearch : public cppu::WeakImplHelper3 SwSearchProperties_Impl* pReplaceProperties; - const SfxItemPropertyMap* _pMap; + const SfxItemPropertySet* m_pPropSet; sal_Bool bAll : 1; sal_Bool bWord : 1; sal_Bool bBack : 1; diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx index 6d5b5a5db3fb..7c9e00f6671f 100644 --- a/sw/inc/unostyle.hxx +++ b/sw/inc/unostyle.hxx @@ -55,7 +55,7 @@ #include <istyleaccess.hxx> class SwDocShell; -struct SfxItemPropertyMap; +class SfxItemPropertySet; class SwXStyle; class SwStyleProperties_Impl; class SwAutoStylesEnumImpl; diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index 1d0fc4c7372d..0ad2b3c494c8 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -84,8 +84,8 @@ class SwXCell : public SwXCellBaseClass, friend void lcl_setValue( SwXCell &rCell, double nVal ); - SfxItemPropertySet aPropSet; - SwTableBox* pBox; // only set in non-XML import + const SfxItemPropertySet* m_pPropSet; + SwTableBox* pBox; // only set in non-XML import const SwStartNode* pStartNode; // only set in XML import // table position where pBox was found last @@ -174,7 +174,7 @@ class SwXTextTableRow : public cppu::WeakImplHelper2 >, public SwClient { - SfxItemPropertySet aPropSet; + const SfxItemPropertySet* m_pPropSet; SwTableLine* pLine; SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } @@ -219,7 +219,7 @@ class SwXTextTableCursor : public SwXTextTableCursor_Base ,public OTextCursorHelper { SwDepend aCrsrDepend; - SfxItemPropertySet aPropSet; + const SfxItemPropertySet* m_pPropSet; SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } // SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); } @@ -304,8 +304,7 @@ class SwXTextTable : public cppu::WeakImplHelper10 { SwEventListenerContainer aLstnrCntnr; SwChartEventListenerContainer aChartLstnrCntnr; - SfxItemPropertySet aPropSet; - const SfxItemPropertyMap* _pMap; + const SfxItemPropertySet* m_pPropSet; // Descriptor-interface SwTableProperties_Impl* pTableProps; @@ -431,10 +430,9 @@ class SwXCellRange : public cppu::WeakImplHelper7 SwChartEventListenerContainer aChartLstnrCntnr; SwRangeDescriptor aRgDesc; - SfxItemPropertySet aPropSet; + const SfxItemPropertySet* m_pPropSet; SwUnoCrsr* pTblCrsr; - const SfxItemPropertyMap* _pMap; sal_Bool bFirstRowAsLabel :1; sal_Bool bFirstColumnAsLabel :1; diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 77369c7a4840..50851a31e945 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -176,7 +176,7 @@ class SwXTextDocument : public SwXTextDocumentBaseClass, ActionContextArr aActionArr; SwRefreshListenerContainer aRefreshCont; - SfxItemPropertySet aPropSet; + const SfxItemPropertySet* pPropSet; SwDocShell* pDocShell; sal_Bool bObjectValid; @@ -477,7 +477,7 @@ class SwXLinkNameAccessWrapper : public cppu::WeakImplHelper4 > { ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xRealAccess; - SfxItemPropertySet aPropSet; + const SfxItemPropertySet* pPropSet; const String sLinkSuffix; const String sLinkDisplayName; ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextDocument > xDoc; @@ -527,8 +527,8 @@ class SwXOutlineTarget : public cppu::WeakImplHelper2 ::com::sun::star::lang::XServiceInfo > { - SfxItemPropertySet aPropSet; - String sOutlineText; + const SfxItemPropertySet* pPropSet; + String sOutlineText; public: SwXOutlineTarget(const String& rOutlineText); diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index e531485bd6ad..5a249db26337 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -48,7 +48,7 @@ class SfxObjectShellRef; class SwDoc; class IDocumentSettingAccess; class IDocumentDeviceAccess; -class IDocumentBookmarkAccess; +class IDocumentMarkAccess; class IDocumentDrawModelAccess; class IDocumentRedlineAccess; class IDocumentLayoutAccess; @@ -306,8 +306,8 @@ public: /** Provides access to the document bookmark interface */ - const IDocumentBookmarkAccess* getIDocumentBookmarkAccess() const; - IDocumentBookmarkAccess* getIDocumentBookmarkAccess(); + const IDocumentMarkAccess* getIDocumentMarkAccess() const; + IDocumentMarkAccess* getIDocumentMarkAccess(); /** Provides access to the document draw model interface */ |