diff options
Diffstat (limited to 'sw/inc')
302 files changed, 0 insertions, 60067 deletions
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx deleted file mode 100644 index d140f8dca1..0000000000 --- a/sw/inc/AnnotationWin.hxx +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * 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 _ANNOTATIONWIN_HXX -#define _ANNOTATIONWIN_HXX - -#include <SidebarWin.hxx> - -class PopupMenu; -class OutlinerParaObject; - -namespace sw { namespace annotation { - -class SwAnnotationWin : public sw::sidebarwindows::SwSidebarWin -{ - public: - SwAnnotationWin( SwEditWin& rEditWin, - WinBits nBits, - SwPostItMgr& aMgr, - SwPostItBits aBits, - SwSidebarItem& rSidebarItem, - SwFmtFld* aField ); - virtual ~SwAnnotationWin(); - - virtual void UpdateData(); - virtual void SetPostItText(); - virtual void Delete(); - virtual void GotoPos(); - - virtual String GetAuthor(); - virtual Date GetDate(); - virtual Time GetTime(); - - virtual sal_uInt32 MoveCaret(); - - virtual bool CalcFollow(); - void InitAnswer(OutlinerParaObject* pText); - - virtual bool IsProtected(); - - protected: - virtual MenuButton* CreateMenuButton(); - - private: - virtual SvxLanguageItem GetLanguage(void); - sal_uInt32 CountFollowing(); - - SwFmtFld* mpFmtFld; - SwPostItField* mpFld; - PopupMenu* mpButtonPopup; - -}; - -} } // end of namespace sw::annotation -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx deleted file mode 100644 index 1d106e147b..0000000000 --- a/sw/inc/EnhancedPDFExportHelper.hxx +++ /dev/null @@ -1,259 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _ENHANCEDPDFEXPORTHELPER_HXX -#define _ENHANCEDPDFEXPORTHELPER_HXX - -#include <vcl/pdfextoutdevdata.hxx> -#include <i18npool/lang.h> -#include <swrect.hxx> -#include <swtypes.hxx> - -#include <map> -#include <vector> -#include <set> - -namespace vcl -{ - class PDFExtOutDevData; -} -class OutputDevice; -class SwFrm; -class SwLinePortion; -class SwTxtPainter; -class SwEditShell; -namespace rtl -{ - class OUString; -} -class MultiSelection; -class SwTxtNode; -class SwNumRule; -class SwTable; -class SwNumberTreeNode; -class String; -class SvxLanguageItem; - - -/* - * Mapping of OOo elements to tagged pdf elements: - * - * OOo element tagged pdf element - * ----------- ------------------ - * - * Grouping elements: - * - * SwRootFrm Document - * Part - * Art - * SwSection Sect - * SwFtnContFrm and SwFlyFrm Div - * SwFmt "Quotations" BlockQuote - * SwFmt "Caption" Caption - * SwSection (TOC) TOC - * SwTxtNode in TOC TOCI - * SwSection (Index) Index - * - * Block-Level Structure Elements: - * - * SwTxtNode P - * SwFmt "Heading" H - * SwTxtNode with Outline H1 - H6 - * SwTxtNode with NumRule L, LI, LBody - * SwTable Table - * SwRowFrm TR - * SwCellFrm in Headline row or - * SwFtm "Table Heading" TH - * SwCellFrm TD - * - * Inline-Level Structure Elements: - * - * SwTxtPortion Span - * SwFmt "Quotation" Quote - * SwFtnFrm Note - * Form - * Reference - * SwFldPortion (AuthorityField) BibEntry - * SwFmt "Source Text" Code - * SwFtnPortion, SwFldPortion (RefField) Link - * - * Illustration elements: - * - * SwFlyFrm with SwNoTxtFrm Figure - * SwFlyFrm with Math OLE Object Formula - * - */ - -struct Num_Info -{ - const SwFrm& mrFrm; - Num_Info( const SwFrm& rFrm ) : mrFrm( rFrm ) {}; -}; - -struct Frm_Info -{ - const SwFrm& mrFrm; - Frm_Info( const SwFrm& rFrm ) : mrFrm( rFrm ) {}; -}; - -struct Por_Info -{ - const SwLinePortion& mrPor; - const SwTxtPainter& mrTxtPainter; - Por_Info( const SwLinePortion& rPor, const SwTxtPainter& rTxtPainer ) - : mrPor( rPor ), mrTxtPainter( rTxtPainer ) {}; -}; - -struct lt_TableColumn -{ - bool operator()( long nVal1, long nVal2 ) const - { - return nVal1 + ( MINLAY - 1 ) < nVal2; - } -}; - -/************************************************************************* - * class SwTaggedPDFHelper - * Analyses a given frame during painting and generates the appropriate - * structure elements. - *************************************************************************/ - -class SwTaggedPDFHelper -{ - private: - - // This will be incremented for each BeginTag() call. - // It denotes the number of tags to close during EndStructureElements(); - sal_uInt8 nEndStructureElement; - - // If an already existing tag is reopened for follows of flow frames, - // this value stores the tag id which has to be restored. - sal_Int32 nRestoreCurrentTag; - - vcl::PDFExtOutDevData* mpPDFExtOutDevData; - - const Num_Info* mpNumInfo; - const Frm_Info* mpFrmInfo; - const Por_Info* mpPorInfo; - - void BeginTag( vcl::PDFWriter::StructElement aTagRole, const String& rTagName ); - void EndTag(); - - void SetAttributes( vcl::PDFWriter::StructElement eType ); - - // These functions are called by the c'tor, d'tor - void BeginNumberedListStructureElements(); - void BeginBlockStructureElements(); - void BeginInlineStructureElements(); - void EndStructureElements(); - - bool CheckReopenTag(); - bool CheckRestoreTag() const; - - public: - - // pFrmInfo != 0 => BeginBlockStructureElement - // pPorInfo != 0 => BeginInlineStructureElement - // pFrmInfo, pPorInfo = 0 => BeginNonStructureElement - SwTaggedPDFHelper( const Num_Info* pNumInfo, const Frm_Info* pFrmInfo, const Por_Info* pPorInfo, - OutputDevice& rOut ); - ~SwTaggedPDFHelper(); - - static bool IsExportTaggedPDF( const OutputDevice& rOut ); -}; - -/************************************************************************* - * class SwEnhancedPDFExportHelper - * Analyses the document structure and export Notes, Hyperlinks, References, - * and Outline. Link ids created during pdf export are stored in - * aReferenceIdMap and aHyperlinkIdMap, in order to use them during - * tagged pdf output. Therefore the SwEnhancedPDFExportHelper is used - * before painting. Unfortunately links from the EditEngine into the - * Writer document require to be exported after they have been painted. - * Therefore SwEnhancedPDFExportHelper also has to be used after the - * painting process, the parameter bEditEngineOnly indicated that only - * the bookmarks from the EditEngine have to be processed. - *************************************************************************/ - -typedef std::set< long, lt_TableColumn > TableColumnsMapEntry; -typedef std::pair< SwRect, sal_Int32 > IdMapEntry; -typedef std::vector< IdMapEntry > LinkIdMap; -typedef std::map< const SwTable*, TableColumnsMapEntry > TableColumnsMap; -typedef std::map< const SwNumberTreeNode*, sal_Int32 > NumListIdMap; -typedef std::map< const SwNumberTreeNode*, sal_Int32 > NumListBodyIdMap; -typedef std::map< const void*, sal_Int32 > FrmTagIdMap; - -class SwEnhancedPDFExportHelper -{ - private: - - SwEditShell& mrSh; - OutputDevice& mrOut; - - MultiSelection* pPageRange; - - bool mbSkipEmptyPages; - bool mbEditEngineOnly; - - static TableColumnsMap aTableColumnsMap; - static LinkIdMap aLinkIdMap; - static NumListIdMap aNumListIdMap; - static NumListBodyIdMap aNumListBodyIdMap; - static FrmTagIdMap aFrmTagIdMap; - - static LanguageType eLanguageDefault; - - void EnhancedPDFExport(); - sal_Int32 CalcOutputPageNum( const SwRect& rRect ) const; - - void MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rPDFExtOutDevData, - const SwTxtNode& rTNd, const SwRect& rLinkRect, - sal_Int32 nDestId, const String& rURL, bool bIntern ) const; - - public: - - SwEnhancedPDFExportHelper( SwEditShell& rSh, - OutputDevice& rOut, - const rtl::OUString& rPageRange, - bool bSkipEmptyPages, - bool bEditEngineOnly ); - - ~SwEnhancedPDFExportHelper(); - - static TableColumnsMap& GetTableColumnsMap() {return aTableColumnsMap; } - static LinkIdMap& GetLinkIdMap() { return aLinkIdMap; } - static NumListIdMap& GetNumListIdMap() {return aNumListIdMap; } - static NumListBodyIdMap& GetNumListBodyIdMap() {return aNumListBodyIdMap; } - static FrmTagIdMap& GetFrmTagIdMap() { return aFrmTagIdMap; } - - static LanguageType GetDefaultLanguage() {return eLanguageDefault; } -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/HandleAnchorNodeChg.hxx b/sw/inc/HandleAnchorNodeChg.hxx deleted file mode 100644 index a2613cde64..0000000000 --- a/sw/inc/HandleAnchorNodeChg.hxx +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _HANDLEANCHORNODECHG_HXX -#define _HANDLEANCHORNODECHG_HXX - -class SwFlyFrmFmt; -class SwFmtAnchor; -class SwFlyFrm; - -// helper class to track change of anchor node of at-paragraph respectively -// at-character anchored fly frames -// if such a change happens, it has to be checked, if the count of the anchor -// frames also change. if yes, a re-creation of the fly frames is needed: -// - deletion of existing fly frames before the intrinsic anchor node changes -// - creation of new fly frames after the intrinsic anchor node change. -class SwHandleAnchorNodeChg -{ -public: - /** checks, if re-creation of fly frames for an anchor node change at the - given fly frame format is necessary, and performs the first part. - - @author OD - - @param _rFlyFrmFmt - reference to the fly frame format instance, which is handled. - - @param _rNewAnchorFmt - new anchor attribute, which will be applied at the given fly frame format - - @param _pKeepThisFlyFrm - optional parameter - pointer to a fly frame of the given fly frame format, - which isn't deleted, if re-creation of fly frames is necessary. - */ - SwHandleAnchorNodeChg( SwFlyFrmFmt& _rFlyFrmFmt, - const SwFmtAnchor& _rNewAnchorFmt, - SwFlyFrm* _pKeepThisFlyFrm = 0L ); - - /** calls <SwFlyFrmFmt::MakeFrms>, if re-creation of fly frames is necessary. - - @author OD - */ - ~SwHandleAnchorNodeChg(); - -private: - // fly frame format, which is tracked for a anchor node change. - SwFlyFrmFmt& mrFlyFrmFmt; - // internal flag, which indicates that the certain anchor node change occurs - // and that re-creation of fly frames is necessary. - bool mbAnchorNodeChanged; - - // no copy-constructor - SwHandleAnchorNodeChg( const SwHandleAnchorNodeChg& ); - // no assignment-operator - void operator=( const SwHandleAnchorNodeChg ); -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentChartDataProviderAccess.hxx b/sw/inc/IDocumentChartDataProviderAccess.hxx deleted file mode 100644 index 4043e75c4f..0000000000 --- a/sw/inc/IDocumentChartDataProviderAccess.hxx +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTCHARTDATAPROVIDER_HXX_INCLUDED - #define IDOCUMENTCHARTDATAPROVIDER_HXX_INCLUDED - -#include "com/sun/star/uno/Reference.hxx" - -namespace com { namespace sun { namespace star { namespace frame { - class XModel; -}}}} - -class SwTable; -class SwChartDataProvider; -class SwChartLockController_Helper; - - - /** Give access to the data-provider for chart - */ - class IDocumentChartDataProviderAccess - { - public: - - /** - returns or creates the data-provider for chart - */ - virtual SwChartDataProvider * GetChartDataProvider( bool bCreate = false ) const = 0; - - /** - calls createInternalDataProvider for all charts using the specified table - */ - virtual void CreateChartInternalDataProviders( const SwTable *pTable ) = 0; - - /** - returns chart controller helper that is used to lock/unlock all - charts when relevant parts of tables are changed - */ - virtual SwChartLockController_Helper & GetChartControllerHelper() = 0; - - protected: - virtual ~IDocumentChartDataProviderAccess() {}; - }; - - #endif // IDOCUMENTCHARTDATAPROVIDER_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx deleted file mode 100644 index 9d4de14da0..0000000000 --- a/sw/inc/IDocumentContentOperations.hxx +++ /dev/null @@ -1,192 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED - #define IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED - - #ifndef _SAL_TYPES_H_ - #include <sal/types.h> - #endif - - class SwPaM; - struct SwPosition; - class SwNode; - class SwNodeRange; - class String; - class Graphic; - class SfxItemSet; - class SfxPoolItem; - class GraphicObject; - class SdrObject; - class SwFrmFmt; - class SwDrawFrmFmt; - class SwFlyFrmFmt; - class SwNodeIndex; - - namespace utl { class TransliterationWrapper; } - namespace svt { class EmbeddedObjectRef; } - - /** Text operation/manipulation interface - */ - class IDocumentContentOperations - { - public: - enum SwMoveFlags - { - DOC_MOVEDEFAULT = 0x00, - DOC_MOVEALLFLYS = 0x01, - DOC_CREATEUNDOOBJ = 0x02, - DOC_MOVEREDLINES = 0x04, - DOC_NO_DELFRMS = 0x08 - }; - - // constants for inserting text - enum InsertFlags - { INS_DEFAULT = 0x00 // no extras - , INS_EMPTYEXPAND = 0x01 // expand empty hints at insert position - , INS_NOHINTEXPAND = 0x02 // do not expand any hints at insert pos - , INS_FORCEHINTEXPAND = 0x04 // expand all hints at insert position - }; - - public: - /** Copying of a range within or to another document. - The position can also be within the range! - */ - virtual bool CopyRange(SwPaM&, SwPosition&, const bool bCopyAll ) const = 0; - - /** Delete section containing the node. - */ - virtual void DeleteSection(SwNode* pNode) = 0; - - /** Delete a range SwFlyFrmFmt. - */ - virtual bool DeleteRange(SwPaM&) = 0; - - /** Delete full paragraphs. - */ - virtual bool DelFullPara(SwPaM&) = 0; - - /** complete delete of a given PaM - - #i100466# - Add optional parameter <bForceJoinNext>, default value <false> - Needed for hiding of deletion redlines - */ - virtual bool DeleteAndJoin( SwPaM&, - const bool bForceJoinNext = false ) = 0; - - virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags) = 0; - - virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags) = 0; - - /** Move a range. - */ - virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags) = 0; - - /** Overwrite string in an existing text node. - */ - virtual bool Overwrite(const SwPaM &rRg, const String& rStr) = 0; - - /** Insert string into existing text node at position rRg.Point(). - */ - virtual bool InsertString(const SwPaM &rRg, const String&, - const enum InsertFlags nInsertMode = INS_EMPTYEXPAND ) = 0; - - /** change text to Upper/Lower/Hiragana/Katagana/... - */ - virtual void TransliterateText(const SwPaM& rPaM, utl::TransliterationWrapper&) = 0; - - /** Insert graphic or formula. The XXXX are copied. - */ - virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, - const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0; - - virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0; - - /** Transpose graphic (with undo) - */ - virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj) = 0; - - /** Insert a DrawObject. The object must be already registered - in DrawModel. - */ - virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*) = 0; - - /** Insert OLE-objects. - */ - virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0; - - virtual SwFlyFrmFmt* InsertOLE(const SwPaM &rRg, const String& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0; - - /** Split a node at rPos (implemented only for TxtNode). - */ - virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart) = 0; - - virtual bool AppendTxtNode(SwPosition& rPos) = 0; - - /** Replace selected range in a TxtNode with string. - Intended for search & replace. - bRegExpRplc - replace tabs (\\t) and insert the found string - ( not \& ). E.g.: Find: "zzz", Replace: "xx\t\\t..&..\&" - --> "xx\t<Tab>..zzz..&" - */ - virtual bool ReplaceRange(SwPaM& rPam, const String& rNewStr, - const bool bRegExReplace) = 0; - - /** Insert an attribute. If rRg spans several nodes the - attribute is split, provided it makes sense. - Nodes, where this attribute does not make sense are ignored. - In nodes completely enclosed in the selection the attribute - becomes hard-formated, in all other (text-) nodes the attribute - is inserted into the attribute array. - For a character attribute, in cases where no selection exists - an "empty" hint is inserted. If there is a selection the attribute - is hard-formated and added to the node at rRg.Start(). - If the attribute could not be inserted, the method returns - sal_False. - */ - virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&, - const sal_uInt16 nFlags) = 0; - - virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&, - const sal_uInt16 nFlags) = 0; - - /** Removes any leading white space from the paragraph - */ - virtual void RemoveLeadingWhiteSpace(const SwPosition & rPos ) = 0; - - protected: - virtual ~IDocumentContentOperations() {}; -}; - -#endif // IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentDeviceAccess.hxx b/sw/inc/IDocumentDeviceAccess.hxx deleted file mode 100644 index 81719063d4..0000000000 --- a/sw/inc/IDocumentDeviceAccess.hxx +++ /dev/null @@ -1,148 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTDEVICEACCESS_HXX_INCLUDED - #define IDOCUMENTDEVICEACCESS_HXX_INCLUDED - - class SfxPrinter; - class JobSetup; - class SwPrintData; - class VirtualDevice; - class OutputDevice; - - /** Provides access to the formatting devices of a document - */ - class IDocumentDeviceAccess - { - public: - - /** Return the printer set at the document. - - @param bCreate - [in] if set, a printer will be created if not already done. - - @returns - the printer set at the document. - */ - virtual SfxPrinter* getPrinter(/*[in]*/ bool bCreate ) const = 0; - - /** Set the printer at the document. - - @param pP - [in] the new printer or 0. - - @param bDeleteOld - [in] if set, the old printer will be deleted. - - @param bCallPrtDataChanged - [in] if set, triggers all necessary invalidations. - - @returns - the printer set at the document. - */ - virtual void setPrinter(/*[in]*/ SfxPrinter* pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged ) = 0; - - /** Return the virtual device set at the document. - - @param bCreate - [in] if set, a virtual device will be created if not already done. - - @returns - the virtual device set at the document. - */ - virtual VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate ) const = 0; - - /** Sets the current virtual device - - @param pVd - [in] the new virtual device. - - @param bDeleteOld - [in] if set, the old virtual device will be deleted. - - @param bCallVirDevDataChanged - [in] if set, triggers all necessary invalidations. - */ - virtual void setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOld, /*[in]*/ bool bCallVirDevDataChanged ) = 0; - - /** Returns the current reference device - - @param bCreate - [in] if set, the reference device will be created if not already done. - - @returns - the current reference device - */ - virtual OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate ) const = 0; - - /** Sets the type of the reference device used for formatting the document - - @param bNewVirtual - [in] if set, the reference device will be a virtual device, otherwise - the printer is used for formatting the document - - @param bNewHiRes - [in] if set, the virtual device will be the HiRes virtual device - */ - virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual, /*[in]*/ bool bNewHiRes ) = 0; - - /** Returns the Jobsetup - - @returns - the current Jobsetup - */ - virtual const JobSetup* getJobsetup() const = 0; - - /** Sets the Jobsetup - - @param rJobSetup - [in] the new Jobsetup. - */ - virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup ) = 0; - - /** Returns the PrintData - - @returns - the current PrintData - */ - virtual const SwPrintData & getPrintData() const = 0; - - /** Sets the PrintData - - @param rPrtData - [in] the new PrintData. - */ - virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData) = 0; - - protected: - virtual ~IDocumentDeviceAccess() {}; - }; - - #endif // IDOCUMENTDEVICEACCESS_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentDrawModelAccess.hxx b/sw/inc/IDocumentDrawModelAccess.hxx deleted file mode 100644 index 1332f10487..0000000000 --- a/sw/inc/IDocumentDrawModelAccess.hxx +++ /dev/null @@ -1,110 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTDRAWMODEL_HXX_INCLUDED -#define IDOCUMENTDRAWMODEL_HXX_INCLUDED - -#include <svx/svdtypes.hxx> - -class SdrModel; -class SdrPageView; - -/** IDocumentDrawModelAccess - */ -class IDocumentDrawModelAccess -{ -public: - - /** Draw Model and id accessors - */ - virtual const SdrModel* GetDrawModel() const = 0; - virtual SdrModel* GetDrawModel() = 0; - virtual SdrModel* _MakeDrawModel() = 0; - virtual SdrModel* GetOrCreateDrawModel() = 0; - virtual SdrLayerID GetHeavenId() const = 0; - virtual SdrLayerID GetHellId() const = 0; - virtual SdrLayerID GetControlsId() const = 0; - virtual SdrLayerID GetInvisibleHeavenId() const = 0; - virtual SdrLayerID GetInvisibleHellId() const = 0; - virtual SdrLayerID GetInvisibleControlsId() const = 0; - - /** method to notify drawing page view about the invisible layers - @author OD - */ - virtual void NotifyInvisibleLayers( SdrPageView& _rSdrPageView ) = 0; - - /** method to determine, if a layer ID belongs to the visible ones. - Note: If given layer ID is unknown, method asserts and returns <false>. - @author OD - - @param _nLayerId - input parameter - layer ID, which has to be checked, if it belongs to - the visible ones. - - @return bool, indicating, if given layer ID belongs to the visible ones. - */ - virtual bool IsVisibleLayerId( const SdrLayerID& _nLayerId ) const = 0; - - /** method to determine, if the corresponding visible layer ID for a invisible one. - - Note: If given layer ID is a visible one, method returns given layer ID. - Note: If given layer ID is unknown, method returns given layer ID. - - @author OD - - @param _nInvisibleLayerId - input parameter - invisible layer ID for which the corresponding - visible one has to be returned. - - @return sal_Int8, visible layer ID corresponding to given layer ID - */ - virtual SdrLayerID GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisibleLayerId ) = 0; - - /** method to determine, if the corresponding invisible layer ID for a visible one. - - Note: If given layer ID is a invisible one, method returns given layer ID. - Note: If given layer ID is unknown, method returns given layer ID. - - @author OD - - @param _nVisibleLayerId - input parameter - visible layer ID for which the corresponding - invisible one has to be returned. - - @return sal_Int8, invisible layer ID corresponding to given layer ID - */ - virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId ) = 0; - -protected: - - virtual ~IDocumentDrawModelAccess() {}; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentExternalData.hxx b/sw/inc/IDocumentExternalData.hxx deleted file mode 100644 index 629a2e2a7c..0000000000 --- a/sw/inc/IDocumentExternalData.hxx +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX -#define INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX - -#include <boost/unordered_map.hpp> -#include <boost/shared_ptr.hpp> - -namespace sw -{ -enum tExternalDataType { FIB, STTBF_ASSOC }; - -struct ExternalDataTypeHash -{ - size_t operator()(tExternalDataType eType) const { return eType; } -}; - -class ExternalData -{ -public: - ExternalData() {} - virtual ~ExternalData() {} -}; - -typedef ::boost::shared_ptr<ExternalData> tExternalDataPointer; -} - - -class IDocumentExternalData -{ -protected: - typedef ::boost::unordered_map<sw::tExternalDataType, sw::tExternalDataPointer, sw::ExternalDataTypeHash> - tExternalData; - - tExternalData m_externalData; - - virtual ~IDocumentExternalData() {}; - -public: - virtual void setExternalData(sw::tExternalDataType eType, - sw::tExternalDataPointer pPayload) = 0; - virtual sw::tExternalDataPointer getExternalData(sw::tExternalDataType eType) = 0; -}; - -#endif //INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx deleted file mode 100644 index 1b8619da04..0000000000 --- a/sw/inc/IDocumentFieldsAccess.hxx +++ /dev/null @@ -1,148 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTFIELDSACCESS_HXX_INCLUDED -#define IDOCUMENTFIELDSACCESS_HXX_INCLUDED - -#include <sal/types.h> -#include <tools/solar.h> - -class SwFldTypes; -class SwFieldType; -class SfxPoolItem; -struct SwPosition; -class SwDocUpdtFld; -class SwCalc; -class SwTxtFld; -class SwField; -class SwMsgPoolItem; -class DateTime; -class _SetGetExpFld; -struct SwHash; -class String; -class SwNode; - -namespace com { namespace sun { namespace star { namespace uno { class Any; } } } } - - /** Document fields related interfaces - */ - class IDocumentFieldsAccess - { - public: - virtual const SwFldTypes *GetFldTypes() const = 0; - - virtual SwFieldType *InsertFldType(const SwFieldType &) = 0; - - virtual SwFieldType *GetSysFldType( const sal_uInt16 eWhich ) const = 0; - - virtual SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName, bool bDbFieldMatching) const = 0; - - virtual void RemoveFldType(sal_uInt16 nFld) = 0; - - virtual void UpdateFlds( SfxPoolItem* pNewHt, bool bCloseDB) = 0; - - virtual void InsDeletedFldType(SwFieldType &) = 0; - - /** - Puts a value into a field at a certain position. - - A missing field at the given position leads to a failure. - - @param rPosition position of the field - @param rVal the value - @param nMId - - @retval sal_True putting of value was successful - @retval sal_False else - */ - virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich) = 0; - - // Call update of expression fields. All expressions are re-evaluated. - - /** Updates a field. - - @param rDstFmtFld field to update - @param rSrcFld field containing the new values - @param pMsgHnt - @param bUpdateTblFlds TRUE: update table fields, too. - - @retval sal_True update was successful - @retval sal_False else - */ - virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds) = 0; - - virtual void UpdateRefFlds(SfxPoolItem* pHt) = 0; - - virtual void UpdateTblFlds(SfxPoolItem* pHt) = 0; - - virtual void UpdateExpFlds(SwTxtFld* pFld, bool bUpdateRefFlds) = 0; - - virtual void UpdateUsrFlds() = 0; - - virtual void UpdatePageFlds(SfxPoolItem*) = 0; - - virtual void LockExpFlds() = 0; - - virtual void UnlockExpFlds() = 0; - - virtual bool IsExpFldsLocked() const = 0; - - virtual SwDocUpdtFld& GetUpdtFlds() const = 0; - - /* @@@MAINTAINABILITY-HORROR@@@ - SwNode (see parameter pChk) is (?) part of the private - data structure of SwDoc and should not be exposed - */ - virtual bool SetFieldsDirty(bool b, const SwNode* pChk, sal_uLong nLen) = 0; - - virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime) = 0; - - - // In Calculator set all SetExpression fields that are valid up to the indicated position - // (Node [ + ::com::sun::star::ucb::Content]). - // A generated list of all fields may be passed along too - // (if the addreess != 0 and the pointer == 0 a new list will be returned). - virtual void FldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt) = 0; - - virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld) = 0; - - virtual void FldsToExpand(SwHash**& ppTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld) = 0; - - virtual bool IsNewFldLst() const = 0; - - virtual void SetNewFldLst( bool bFlag) = 0; - - virtual void InsDelFldInFldLst(bool bIns, const SwTxtFld& rFld) = 0; - -protected: - virtual ~IDocumentFieldsAccess() {}; - }; - - #endif // IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentLayoutAccess.hxx b/sw/inc/IDocumentLayoutAccess.hxx deleted file mode 100644 index 8dc8ef09ab..0000000000 --- a/sw/inc/IDocumentLayoutAccess.hxx +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTLAYOUTACCESS_HXX_INCLUDED -#define IDOCUMENTLAYOUTACCESS_HXX_INCLUDED - -#include <swtypes.hxx> - -class ViewShell; -class SwRootFrm; -class SwFrmFmt; -class SfxItemSet; -class SwLayouter; -class SwFmtAnchor; - -/** Provides access to the layout of a document. -*/ -class IDocumentLayoutAccess -{ -public: - - /** Returns the layout set at the document. - */ - virtual const ViewShell* GetCurrentViewShell() const = 0; - virtual ViewShell* GetCurrentViewShell() = 0; //swmod 071107//swmod 071225 - virtual const SwRootFrm* GetCurrentLayout() const = 0; - virtual SwRootFrm* GetCurrentLayout() = 0; //swmod 080218 - virtual bool HasLayout() const = 0; - - /** !!!The old layout must be deleted!!! - */ - virtual void SetCurrentViewShell( ViewShell* pNew ) = 0; //swmod 071107//swmod 071225 - - /** - */ - virtual SwFrmFmt* MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet ) = 0; - - /** - */ - virtual SwLayouter* GetLayouter() = 0; - virtual const SwLayouter* GetLayouter() const = 0; - virtual void SetLayouter( SwLayouter* pNew ) = 0; - - /** - */ - virtual void DelLayoutFmt( SwFrmFmt *pFmt ) = 0; - - /** - */ - virtual SwFrmFmt* CopyLayoutFmt( const SwFrmFmt& rSrc, const SwFmtAnchor& rNewAnchor, - bool bSetTxtFlyAtt, bool bMakeFrms ) = 0; - -protected: - - virtual ~IDocumentLayoutAccess() {}; - }; - - #endif // IDOCUMENTLAYOUTACCESS_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentLineNumberAccess.hxx b/sw/inc/IDocumentLineNumberAccess.hxx deleted file mode 100644 index 9f0ffa0401..0000000000 --- a/sw/inc/IDocumentLineNumberAccess.hxx +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTLINENUMBERACCESS_HXX_INCLUDED - #define IDOCUMENTLINENUMBERACCESS_HXX_INCLUDED - - #ifndef _SAL_TYPES_H_ - #include <sal/types.h> - #endif - -class SwLineNumberInfo; - - /** Access to the line number information - */ - class IDocumentLineNumberAccess - { - public: - - virtual const SwLineNumberInfo& GetLineNumberInfo() const = 0; - virtual void SetLineNumberInfo(const SwLineNumberInfo& rInfo) = 0; - - protected: - virtual ~IDocumentLineNumberAccess() {}; -}; - -#endif // IDOCUMENTLINENUMBERACCESS_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentLinksAdministration.hxx b/sw/inc/IDocumentLinksAdministration.hxx deleted file mode 100644 index 2ae7dcba28..0000000000 --- a/sw/inc/IDocumentLinksAdministration.hxx +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED -#define IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED - -#include <tools/solar.h> - -class String; -namespace com { namespace sun { namespace star { namespace uno { class Any; } } } } -namespace sfx2 { class SvLinkSource; class LinkManager; } - - /** Document links administration interface - */ - class IDocumentLinksAdministration - { - public: - /** Insert links in-/visibly into LinkManager (linked ranges). - */ - virtual bool IsVisibleLinks() const = 0; - - virtual void SetVisibleLinks(bool bFlag) = 0; - - virtual sfx2::LinkManager& GetLinkManager() = 0; - - virtual const sfx2::LinkManager& GetLinkManager() const = 0; - - /** #i42634# Moved common code of SwReader::Read() and - SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks(): - */ - virtual void UpdateLinks(sal_Bool bUI) = 0; - - /** SS fuers Linken von Dokumentteilen / ?? for linking of parts of documents. - */ - virtual bool GetData(const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any& rValue) const = 0; - - virtual bool SetData(const String& rItem, const String& rMimeType, const ::com::sun::star::uno::Any& rValue) = 0; - - virtual ::sfx2::SvLinkSource* CreateLinkSource(const String& rItem) = 0; - - /** Embed all local links (ranges/graphics). - */ - virtual bool EmbedAllLinks() = 0; - - virtual void SetLinksUpdated(const bool bNewLinksUpdated) = 0; - - virtual bool LinksUpdated() const = 0; - -protected: - virtual ~IDocumentLinksAdministration() {}; - }; - - #endif // IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentListItems.hxx b/sw/inc/IDocumentListItems.hxx deleted file mode 100644 index e2ce05f7f4..0000000000 --- a/sw/inc/IDocumentListItems.hxx +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTLISTITEMS_HXX_INCLUDED -#define IDOCUMENTLISTITEMS_HXX_INCLUDED - -#include <vector> -#include <tools/string.hxx> -class SwNodeNum; - -/** Provides numbered items of a document. -*/ -class IDocumentListItems -{ -public: - typedef ::std::vector< const SwNodeNum* > tSortedNodeNumList; - - virtual void addListItem( const SwNodeNum& rNodeNum ) = 0; - virtual void removeListItem( const SwNodeNum& rNodeNum ) = 0; - - virtual String getListItemText( const SwNodeNum& rNodeNum, - const bool bWithNumber = true, - const bool bWithSpacesForLevel = false ) const = 0; - - /** get vector of all list items - */ - virtual void getListItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const = 0; - - /** get vector of all list items, which are numbered - */ - virtual void getNumItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const = 0; - -protected: - virtual ~IDocumentListItems() {}; -}; - - #endif // IDOCUMENTLISTITEMS_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentListsAccess.hxx b/sw/inc/IDocumentListsAccess.hxx deleted file mode 100644 index 03d7c21ad1..0000000000 --- a/sw/inc/IDocumentListsAccess.hxx +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTLISTSACCESS_HXX_INCLUDED -#define IDOCUMENTLISTSACCESS_HXX_INCLUDED - -#include <tools/string.hxx> - -class SwList; - -/** Provides access to the lists of a document. -*/ -class IDocumentListsAccess -{ - public: - virtual SwList* createList( String sListId, - const String sDefaultListStyleName ) = 0; - virtual void deleteList( const String sListId ) = 0; - virtual SwList* getListByName( const String sListId ) const = 0; - - virtual SwList* createListForListStyle( const String sListStyleName ) = 0; - virtual SwList* getListForListStyle( const String sListStyleName ) const = 0; - virtual void deleteListForListStyle( const String sListStyleName ) = 0; - // #i91400# - virtual void trackChangeOfListStyleName( const String sListStyleName, - const String sNewListStyleName ) = 0; - protected: - virtual ~IDocumentListsAccess() {}; -}; - -#endif // IDOCUMENTLISTSACCESS_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx deleted file mode 100644 index ad03f51905..0000000000 --- a/sw/inc/IDocumentMarkAccess.hxx +++ /dev/null @@ -1,254 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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; - - virtual sw::mark::IFieldmark* makeFieldBookmark( const SwPaM& rPaM, - const rtl::OUString& rName, - const rtl::OUString& rType) = 0; - virtual sw::mark::IFieldmark* makeNoTextFieldBookmark( const SwPaM& rPaM, - const rtl::OUString& rName, - const rtl::OUString& rType) = 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 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentOutlineNodes.hxx b/sw/inc/IDocumentOutlineNodes.hxx deleted file mode 100644 index f0e2cc963e..0000000000 --- a/sw/inc/IDocumentOutlineNodes.hxx +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTOUTLINENODES_HXX_INCLUDED -#define IDOCUMENTOUTLINENODES_HXX_INCLUDED - -#include <sal/types.h> -#include <tools/string.hxx> -#include <vector> -class SwTxtNode; - -/** Provides outline nodes of a document. -*/ -class IDocumentOutlineNodes -{ -public: - typedef ::std::vector< const SwTxtNode* > tSortedOutlineNodeList; - - virtual sal_Int32 getOutlineNodesCount() const = 0; - - virtual int getOutlineLevel( const sal_Int32 nIdx ) const = 0; - virtual String getOutlineText( const sal_Int32 nIdx, - const bool bWithNumber = true, - const bool bWithSpacesForLevel = false ) const = 0; - virtual SwTxtNode* getOutlineNode( const sal_Int32 nIdx ) const = 0; - - virtual void getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOutlineNodeList ) const = 0; - -protected: - virtual ~IDocumentOutlineNodes() {}; -}; - - #endif // IDOCUMENTOUTLINENODES_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx deleted file mode 100644 index 0ecbc32c24..0000000000 --- a/sw/inc/IDocumentRedlineAccess.hxx +++ /dev/null @@ -1,225 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTREDLINE_HXX_INCLUDED - #define IDOCUMENTREDLINE_HXX_INCLUDED - - #ifndef _SAL_TYPES_H_ - #include <sal/types.h> - #endif - #ifndef _SOLAR_H - #include <tools/solar.h> - #endif - - #include <limits.h> // USHRT_MAX - - #ifndef _COM_SUN_STAR_SEQUENCE_HXX_ - #include <com/sun/star/uno/Sequence.hxx> - #endif - - class SwRedline; - class SwRedlineTbl; - class SwPaM; - struct SwPosition; - class SwStartNode; - class SwNode; - class String; - -typedef sal_uInt16 RedlineMode_t; -namespace nsRedlineMode_t -{ - const RedlineMode_t REDLINE_NONE = 0; // no RedlineMode - const RedlineMode_t REDLINE_ON = 0x01;// RedlineMode on - const RedlineMode_t REDLINE_IGNORE = 0x02;// ignore Redlines - const RedlineMode_t REDLINE_SHOW_INSERT = 0x10;// show all inserts - const RedlineMode_t REDLINE_SHOW_DELETE = 0x20;// show all delets - const RedlineMode_t REDLINE_SHOW_MASK = REDLINE_SHOW_INSERT | REDLINE_SHOW_DELETE; - - // For internal management: - // remove the original Redlines together with their content - // (Clipboard/text modules). - const RedlineMode_t REDLINE_DELETE_REDLINES = 0x100; - // When deleting within a RedlineObject - // ignore the DeleteRedline during Append. - const RedlineMode_t REDLINE_IGNOREDELETE_REDLINES = 0x200; - // don't combine any redlines. This flag may be only used in Undo. - const RedlineMode_t REDLINE_DONTCOMBINE_REDLINES = 0x400; -} - -typedef sal_uInt16 RedlineType_t; -namespace nsRedlineType_t -{ - // Range of RedlineTypes is 0 to 127. - const RedlineType_t REDLINE_INSERT = 0x0;// Content has been inserted. - const RedlineType_t REDLINE_DELETE = 0x1;// Content has been deleted. - const RedlineType_t REDLINE_FORMAT = 0x2;// Attributes have been applied. - const RedlineType_t REDLINE_TABLE = 0x3;// Table structure has been altered. - const RedlineType_t REDLINE_FMTCOLL = 0x4;// Style has been altered (Autoformat!). - - // When larger than 128, flags can be inserted. - const RedlineType_t REDLINE_NO_FLAG_MASK = 0x7F; - //const RedlineType_t REDLINE_FLAG_MASK = 0xFF80; - const RedlineType_t REDLINE_FORM_AUTOFMT = 0x80;// Can be a flag in RedlineType. -} - -/** IDocumentRedlineAccess -*/ -class IDocumentRedlineAccess -{ - // Static helper functions -public: - static bool IsShowChanges(const sal_uInt16 eM) - { return (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); } - - static bool IsHideChanges(const sal_uInt16 eM) - { return nsRedlineMode_t::REDLINE_SHOW_INSERT == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); } - - static bool IsShowOriginal(const sal_uInt16 eM) - { return nsRedlineMode_t::REDLINE_SHOW_DELETE == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); } - - static bool IsRedlineOn(const sal_uInt16 eM) - { return nsRedlineMode_t::REDLINE_ON == (eM & (nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE )); } - -public: - - /************************************************* - Query - *************************************************/ - - /** Query the currently set redline mode - - @returns - the currently set redline mode - */ - virtual RedlineMode_t GetRedlineMode() const = 0; - - /** Set a new redline mode. - - @param eMode - [in] the new redline mode. - */ - virtual void SetRedlineMode_intern(/*[in]*/RedlineMode_t eMode) = 0; - - /** Set a new redline mode. - - @param eMode - [in] the new redline mode. - */ - virtual void SetRedlineMode(/*[in]*/RedlineMode_t eMode) = 0; - - /** Query if redlining is on. - - @returns - <TRUE/> if redlining is on <FALSE/> otherwise - */ - virtual bool IsRedlineOn() const = 0; - - virtual bool IsIgnoreRedline() const = 0; - - virtual const SwRedlineTbl& GetRedlineTbl() const = 0; - - virtual bool IsInRedlines(const SwNode& rNode) const = 0; - - /*************************************************** - Manipulation - ***************************************************/ - - /** Append a new redline - - @param pPtr - - @param bCallDelete - - @returns - */ - virtual bool AppendRedline(/*[in]*/SwRedline* pPtr, /*[in]*/bool bCallDelete) = 0; - - virtual bool SplitRedline(/*[in]*/const SwPaM& rPam) = 0; - - virtual bool DeleteRedline( - /*[in]*/const SwPaM& rPam, - /*[in]*/bool bSaveInUndo, - /*[in]*/sal_uInt16 nDelType) = 0; - - virtual bool DeleteRedline( - /*[in]*/const SwStartNode& rSection, - /*[in]*/bool bSaveInUndo, - /*[in]*/sal_uInt16 nDelType) = 0; - - virtual sal_uInt16 GetRedlinePos( - /*[in]*/const SwNode& rNode, - /*[in]*/sal_uInt16 nType) const = 0; - - virtual void CompressRedlines() = 0; - - virtual const SwRedline* GetRedline( - /*[in]*/const SwPosition& rPos, - /*[in]*/sal_uInt16* pFndPos) const = 0; - - virtual bool IsRedlineMove() const = 0; - - virtual void SetRedlineMove(/*[in]*/bool bFlag) = 0; - - virtual bool AcceptRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete) = 0; - - virtual bool AcceptRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete) = 0; - - virtual bool RejectRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete) = 0; - - virtual bool RejectRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete) = 0; - - virtual const SwRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const = 0; - - virtual const SwRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const = 0; - - // Representation has changed, invalidate all Redlines. - virtual void UpdateRedlineAttr() = 0; - - // Create a new Author if required. - virtual sal_uInt16 GetRedlineAuthor() = 0; - - // For Readers etc.: register new Author in table. - virtual sal_uInt16 InsertRedlineAuthor(const String& rAuthor) = 0; - - // Place a comment at Redline at given position. - virtual bool SetRedlineComment( - /*[in]*/const SwPaM& rPam, - /*[in]*/const String& rComment) = 0; - - virtual const ::com::sun::star::uno::Sequence <sal_Int8>& GetRedlinePassword() const = 0; - - virtual void SetRedlinePassword( - /*[in]*/const ::com::sun::star::uno::Sequence <sal_Int8>& rNewPassword) = 0; - - protected: - virtual ~IDocumentRedlineAccess() {}; - }; - - #endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx deleted file mode 100644 index 4e83e72cd2..0000000000 --- a/sw/inc/IDocumentSettingAccess.hxx +++ /dev/null @@ -1,216 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTSETTINGACCESS_HXX_INCLUDED -#define IDOCUMENTSETTINGACCESS_HXX_INCLUDED - -#include <tools/solar.h> -#include <rtl/ref.hxx> -#include <chcmprse.hxx> -#include <fldupde.hxx> - -class SvxForbiddenCharactersTable; -namespace com { namespace sun { namespace star { namespace i18n { struct ForbiddenCharacters; } } } } - - /** Provides access to settings of a document - */ - class IDocumentSettingAccess - { - public: - enum DocumentSettingId - { - // COMPATIBILITY FLAGS START - PARA_SPACE_MAX, - PARA_SPACE_MAX_AT_PAGES, - - TAB_COMPAT, - - ADD_FLY_OFFSETS, - - OLD_NUMBERING, - - ADD_EXT_LEADING, - USE_VIRTUAL_DEVICE, - USE_HIRES_VIRTUAL_DEVICE, - OLD_LINE_SPACING, - ADD_PARA_SPACING_TO_TABLE_CELLS, - USE_FORMER_OBJECT_POS, - USE_FORMER_TEXT_WRAPPING, - CONSIDER_WRAP_ON_OBJECT_POSITION, - - IGNORE_FIRST_LINE_INDENT_IN_NUMBERING, - DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, - DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, - OUTLINE_LEVEL_YIELDS_OUTLINE_RULE, - - DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, - TABLE_ROW_KEEP, - IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, - CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME, - - UNIX_FORCE_ZERO_EXT_LEADING, - USE_OLD_PRINTER_METRICS, - TABS_RELATIVE_TO_INDENT, - PROTECT_FORM, - // #i89181# - TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, - INVERT_BORDER_SPACING, - COLLAPSE_EMPTY_CELL_PARA, - SMALL_CAPS_PERCENTAGE_66, - // COMPATIBILITY FLAGS END - - BROWSE_MODE, - HTML_MODE, - GLOBAL_DOCUMENT, - GLOBAL_DOCUMENT_SAVE_LINKS, - LABEL_DOCUMENT, - PURGE_OLE, - KERN_ASIAN_PUNCTUATION, - MATH_BASELINE_ALIGNMENT - }; - - public: - /** Return the specified document setting. - - @param id - [in] the identifier of the document setting to be returned. - See above for a list of valid document setting identifiers. - - @returns - the value of the requested document setting. - */ - virtual bool get(/*[in]*/ DocumentSettingId id) const = 0; - - /** Set the specified document setting. - - @param id - [in] the identifier of the document setting to be set. - See above for a list of valid document setting identifiers. - - @param value - [in] the new value of the specified document setting. - */ - virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) = 0; - - /** Return the forbidden characters. - - @param nLang - [in] the language for which the forbidden character list is returned. - - @param bLocaleData - [in] if set and there is no user defined forbidden character list for - language lang, the default list for language lang will be returned. - - @returns - a list of forbidden characters. - */ - virtual const com::sun::star::i18n::ForbiddenCharacters* - getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const = 0; - - /** Set the forbidden characters. - - @param nLang - [in] the language for which the forbidden character list should be set. - - @param rForbiddenCharacters - [in] the new list of forbidden characters for language lang. - */ - virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, - /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) = 0; - - /** Get the forbidden character table and creates one if necessary. - - @returns - the forbidden characters table. - */ - virtual rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0; - - /** Get the forbidden character table. - - @returns - the forbidden characters table. - */ - virtual const rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0; - - /** Get the current link update mode. - - @param bGlobalSettings - [in] if set, the link update mode is obtained from the module, - if it is set to GLOBALSETTING - - @returns - the current link update mode. - */ - virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const = 0; - - /** Set the current link update mode. - - @param nMode - [in] the new link update mode. - */ - virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode ) = 0; - - /** Get the current field update mode. - - @param bGlobalSettings - [in] if set, the field update mode is obtained from the module, - if it is set to GLOBALSETTING - - @returns - the current field update mode. - */ - virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const = 0; - - /** Set the current field update mode. - - @param nMode - [in] the new field update mode. - */ - virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags nMode ) = 0; - - /** Get the character compression type for Asian characters. - - @returns - the current character compression mode. - */ - virtual SwCharCompressType getCharacterCompressionType() const = 0; - - /** Set the character compression type for Asian characters. - - @param nMode - [in] the new character compression type. - */ - virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType ) = 0; - -protected: - virtual ~IDocumentSettingAccess() {}; - }; - -#endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentState.hxx b/sw/inc/IDocumentState.hxx deleted file mode 100644 index 4a1d66fdcc..0000000000 --- a/sw/inc/IDocumentState.hxx +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTSTATE_HXX_INCLUDED - #define IDOCUMENTSTATE_HXX_INCLUDED - - #include <tools/solar.h> - - /** Get information about the current document state - */ - class IDocumentState - { - public: - /** Must be called manually at changes of format. - */ - virtual void SetModified() = 0; - - virtual void ResetModified() = 0; - - /** Changes of document? - */ - virtual bool IsModified() const = 0; - - /** State of being loaded or not. - Formerly DocInfo. - */ - virtual bool IsLoaded() const = 0; - - virtual bool IsUpdateExpFld() const = 0; - - virtual bool IsNewDoc() const = 0; - - virtual bool IsPageNums() const = 0; - - virtual void SetPageNums(bool b) = 0; - - virtual void SetNewDoc(bool b) = 0; - - virtual void SetUpdateExpFldStat(bool b) = 0; - - virtual void SetLoaded(bool b = sal_True) = 0; - - protected: - virtual ~IDocumentState() {}; - }; - - #endif // IDOCUMENTSTATE_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentStatistics.hxx b/sw/inc/IDocumentStatistics.hxx deleted file mode 100644 index 2421aff7be..0000000000 --- a/sw/inc/IDocumentStatistics.hxx +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTSTATISTICS_HXX_INCLUDED - #define IDOCUMENTSTATISTICS_HXX_INCLUDED - - struct SwDocStat; - - /** Document statistics information - */ - class IDocumentStatistics - { - public: - - /** DocInfo has changed (notify via DocShell): - make required fields update. - */ - virtual void DocInfoChgd() = 0; - - /** Document - Statistics - */ - virtual const SwDocStat &GetDocStat() const = 0; - - virtual void SetDocStat(const SwDocStat& rStat) = 0; - - virtual void UpdateDocStat(SwDocStat& rStat) = 0; - -protected: - virtual ~IDocumentStatistics() {}; - }; - - #endif // IDOCUMENTSTATISTICS_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentStylePoolAccess.hxx b/sw/inc/IDocumentStylePoolAccess.hxx deleted file mode 100644 index ec469f0665..0000000000 --- a/sw/inc/IDocumentStylePoolAccess.hxx +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTSTYLEPOOLACCESS_HXX_INCLUDED - #define IDOCUMENTSTYLEPOOLACCESS_HXX_INCLUDED - - #ifndef _SAL_TYPES_H_ - #include <sal/types.h> - #endif - - class SwTxtFmtColl; - class SwCharFmt; - class SwFmt; - class SwFrmFmt; - class String; - class SwNumRule; - class SwPageDesc; - - /** Access to the style pool - */ - class IDocumentStylePoolAccess - { - public: - - /** Return "Auto-Collection with ID. - Create, if it does not yet exist. - If string pointer is defined request only description - of attributes, do not create style sheet! - */ - virtual SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage = true ) = 0; - - /** Return required automatic format base class. - */ - virtual SwFmt* GetFmtFromPool( sal_uInt16 nId ) = 0; - - /** Return required automatic format. - */ - virtual SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId ) = 0; - - virtual SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId ) = 0; - - /** Return required automatic page style. - */ - virtual SwPageDesc* GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage = true ) = 0; - - virtual SwNumRule* GetNumRuleFromPool( sal_uInt16 nId ) = 0; - - /** Check whether this "auto-collection" is used in document. - */ - virtual bool IsPoolTxtCollUsed( sal_uInt16 nId ) const = 0; - virtual bool IsPoolFmtUsed( sal_uInt16 nId ) const = 0; - virtual bool IsPoolPageDescUsed( sal_uInt16 nId ) const = 0; - - protected: - virtual ~IDocumentStylePoolAccess() {}; -}; - -#endif // IDOCUMENTSTYLEPOOLACCESS_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentTimerAccess.hxx b/sw/inc/IDocumentTimerAccess.hxx deleted file mode 100644 index a717f46069..0000000000 --- a/sw/inc/IDocumentTimerAccess.hxx +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTTIMERACCESS_HXX_INCLUDED - #define IDOCUMENTTIMERACCESS_HXX_INCLUDED - - /** Get information about the current document state - */ - class IDocumentTimerAccess - { - public: - /** - Set modus to start, i.e. start timer if block count == 0 - */ - virtual void StartIdling() = 0; - - /** - Set modus to stopped, i.e. stop timer if running - */ - virtual void StopIdling() = 0; - - /** - Increment block count, stop timer if running - */ - virtual void BlockIdling() = 0; - - /** - Decrement block count, start timer if block count == 0 AND modus == start - */ - virtual void UnblockIdling() = 0; - - protected: - virtual ~IDocumentTimerAccess() {}; - }; - - #endif // IDOCUMENTTIMERACCESS_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IDocumentUndoRedo.hxx b/sw/inc/IDocumentUndoRedo.hxx deleted file mode 100644 index 20cf10d235..0000000000 --- a/sw/inc/IDocumentUndoRedo.hxx +++ /dev/null @@ -1,285 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IDOCUMENTUNDOREDO_HXX_INCLUDED -#define IDOCUMENTUNDOREDO_HXX_INCLUDED - -#include <sal/types.h> - -#include <swundo.hxx> - - -class SwRewriter; -class SwNodes; -class SwUndo; - -namespace sw { - class RepeatContext; -} - - - -/** IDocumentUndoRedo -*/ -class IDocumentUndoRedo -{ -public: - - /** Enable/Disable Undo. - */ - virtual void DoUndo(bool const bDoUndo) = 0; - - /** Is Undo enabled? - */ - virtual bool DoesUndo() const = 0; - - /** Enable/Disable Group Undo. - This determines whether successive Insert/Delete/Overwrite - actions are combined. - */ - virtual void DoGroupUndo(bool const bDoUndo) = 0; - - /** Is Group Undo enabled? - */ - virtual bool DoesGroupUndo() const = 0; - - /** Enable/Disable Undo for Drawing objects. - */ - virtual void DoDrawUndo(bool const bDoUndo) = 0; - - /** Is Undo for Drawing objects enabled? - for Draw-Undo: writer wants to handle actions on Flys on its own. - */ - virtual bool DoesDrawUndo() const = 0; - - /** Set the position at which the document is in the "unmodified" state - to the current position in the Undo stack. - */ - virtual void SetUndoNoModifiedPosition() = 0; - - /** Prevent updates to the "unmodified" state position - via SetUndoNoResetModified(). - */ - virtual void LockUndoNoModifiedPosition() = 0; - - /** Allow updates to the "unmodified" state position - via SetUndoNoResetModified(). - */ - virtual void UnLockUndoNoModifiedPosition() = 0; - - /** Disable (re)setting the document modified flag on Undo/Redo. - */ - virtual void SetUndoNoResetModified() = 0; - - /** Is setting the document modified flag on Undo/Redo disabled? - */ - virtual bool IsUndoNoResetModified() const = 0; - - /** Execute Undo. - - @return true if executing the last Undo action was successful. - */ - virtual sal_Bool Undo() = 0; - - /** Opens undo block. - - @remark StartUndo() and EndUndo() do nothing if !DoesUndo(). - - @param nUndoId undo ID for the list action - @param pRewriter rewriter for comments @see SwUndo::GetComment - - If the given nUndoId is equal to zero an undo object with ID - UNDO_START will be generated. - - @return the undo ID of the created object - */ - virtual SwUndoId StartUndo(SwUndoId const eUndoId, - SwRewriter const*const pRewriter) = 0; - - /** - Closes undo block. - - @remark StartUndo() and EndUndo() do nothing if !DoesUndo(). - - @param nUndoId undo ID for the list action - @param pRewriter rewriter for comments @see SwUndo::GetComment - - If the given nUndoId is not UNDO_EMPTY or UNDO_END, the comment of - the resulting list action will be set via the nUndoId, applying the - given pRewriter (if not 0). Otherwise the comment of the resulting - list action is unchanged if it has an UndoId that is not UNDO_START - set by StartUndo, and in case the UndoId is UNDO_START the comment - of the list action defaults to the comment of the last action - contained in the list action. - */ - virtual SwUndoId EndUndo(SwUndoId const eUndoId, - SwRewriter const*const pRewriter) = 0; - - /** - Delete all Undo actions. - Of course Undo will be disabled during deletion. - */ - virtual void DelAllUndoObj() = 0; - - /** Get Id and comment of last Undo action. - @param o_pStr if not 0, receives comment of last Undo action. - @param o_pId if not 0, receives Id of last Undo action. - @return true if there is a Undo action, false if none - */ - virtual bool GetLastUndoInfo(::rtl::OUString *const o_pStr, - SwUndoId *const o_pId) const = 0; - - /** Get comments of Undo actions. - @return comments of all top-level Undo actions. - */ - virtual SwUndoComments_t GetUndoComments() const = 0; - - /** Execute Redo. - - @return true if executing the first Redo action was successful. - */ - virtual sal_Bool Redo() = 0; - - /** Get comment of first Redo action. - @param o_pStr if not 0, receives comment of first Redo action. - @return true if there is a Redo action, false if none - */ - virtual bool GetFirstRedoInfo(::rtl::OUString *const o_pStr) const = 0; - - /** Get comments of Redo actions. - @return comments of all top-level Redo actions. - */ - virtual SwUndoComments_t GetRedoComments() const = 0; - - /** Repeat the last Undo action. - @return true if repeating the last Undo Redo action was attempted. - */ - virtual bool Repeat(::sw::RepeatContext & rContext, - sal_uInt16 const nRepeatCnt) = 0; - - /** Get Id and comment of last Undo action, if it is Repeat capable. - @param o_pStr if not 0, receives comment of last Undo action - if it is Repeat capable. - @return Id of last Undo action if it is Repeat capable, - or UNDO_EMPTY if there is none or it is not Repeat capable. - */ - virtual SwUndoId GetRepeatInfo(::rtl::OUString *const o_pStr) const = 0; - - /** Add new Undo action. - Takes over ownership of pUndo. - @remark calls ClearRedo(), except for UNDO_START/UNDO_END. - @remark does nothing if !DoesUndo(). - */ - virtual void AppendUndo(SwUndo *const pUndo) = 0; - - /** Delete all Redo actions. - */ - virtual void ClearRedo() = 0; - - /* Is the given nodes array the Undo nodes array? - */ - virtual bool IsUndoNodes(SwNodes const& rNodes) const = 0; - -protected: - virtual ~IDocumentUndoRedo() {}; -}; - - -namespace sw { - -class UndoGuard -{ -public: - - UndoGuard(IDocumentUndoRedo & rUndoRedo) - : m_rUndoRedo(rUndoRedo) - , m_bUndoWasEnabled(rUndoRedo.DoesUndo()) - { - m_rUndoRedo.DoUndo(false); - } - ~UndoGuard() - { - m_rUndoRedo.DoUndo(m_bUndoWasEnabled); - } - - bool UndoWasEnabled() const - { - return m_bUndoWasEnabled; - } - -private: - IDocumentUndoRedo & m_rUndoRedo; - bool const m_bUndoWasEnabled; -}; - -class GroupUndoGuard -{ -public: - - GroupUndoGuard(IDocumentUndoRedo & rUndoRedo) - : m_rUndoRedo(rUndoRedo) - , m_bGroupUndoWasEnabled(rUndoRedo.DoesGroupUndo()) - { - m_rUndoRedo.DoGroupUndo(false); - } - ~GroupUndoGuard() - { - m_rUndoRedo.DoGroupUndo(m_bGroupUndoWasEnabled); - } - -private: - IDocumentUndoRedo & m_rUndoRedo; - bool const m_bGroupUndoWasEnabled; -}; - -class DrawUndoGuard -{ -public: - - DrawUndoGuard(IDocumentUndoRedo & rUndoRedo) - : m_rUndoRedo(rUndoRedo) - , m_bDrawUndoWasEnabled(rUndoRedo.DoesDrawUndo()) - { - m_rUndoRedo.DoDrawUndo(false); - } - ~DrawUndoGuard() - { - m_rUndoRedo.DoDrawUndo(m_bDrawUndoWasEnabled); - } - -private: - IDocumentUndoRedo & m_rUndoRedo; - bool const m_bDrawUndoWasEnabled; -}; - - -} // namespace sw - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IGrammarContact.hxx b/sw/inc/IGrammarContact.hxx deleted file mode 100644 index f3581ecbe4..0000000000 --- a/sw/inc/IGrammarContact.hxx +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IGRAMMARCONTACT_HXX_INCLUDED -#define IGRAMMARCONTACT_HXX_INCLUDED - -struct SwPosition; -class SwTxtNode; -class SwGrammarMarkUp; -class SwDoc; - -/** Organizer of the contact between SwTxtNodes and grammar checker -*/ -class IGrammarContact -{ -public: - - /** Update cursor position reacts to a change of the current input cursor - As long as the cursor in inside a paragraph, the grammar checking does - not show new grammar faults. When the cursor leaves the paragraph, these - faults are shown. - @returns void - */ - virtual void updateCursorPosition( const SwPosition& rNewPos ) = 0; - - /** getGrammarCheck checks if the given text node is blocked by the current cursor - if not, the normal markup list is returned - if blocked, it will return a markup list "proxy" - @returns a markup list (grammar) for the given SwTxtNode - */ - virtual SwGrammarMarkUp* getGrammarCheck( SwTxtNode& rTxtNode, bool bCreate ) = 0; - - /** finishGrammarCheck() has to be called if a grammar checking has been completed - for a text node. If this text node has not been hided by the current proxy list - it will be repainted. Otherwise the proxy list replaces the old list and the - repaint will be triggered by a timer - @returns void - */ - virtual void finishGrammarCheck( SwTxtNode& rTxtNode ) = 0; - -public: - virtual ~IGrammarContact() {} -}; - -/** Factory for a grammar contact -@returns a new created grammar contact object -*/ -IGrammarContact* createGrammarContact(); - -/* Helper functions */ - -/** getGrammarContact() delivers the grammar contact of the document (for a given textnode) -@returns grammar contact -*/ -IGrammarContact* getGrammarContact( const SwTxtNode& ); - -/** finishGrammarCheck() calls the same function of the grammar contact of the document (for a given textnode) -@returns void -*/ -void finishGrammarCheck( SwTxtNode& ); - -#endif // IGRAMMARCONTACT_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IInterface.hxx b/sw/inc/IInterface.hxx deleted file mode 100644 index fbe9d116ed..0000000000 --- a/sw/inc/IInterface.hxx +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 IINTERFACE_HXX_INCLUDED - #define IINTERFACE_HXX_INCLUDED - - #include <sal/types.h> - - /** The base interface - */ - class IInterface - { - public: - - /** Aquire a reference to an instance. A caller shall release - the instance by calling 'release' when it is no longer needed. - 'acquire' and 'release' calls need to be balanced. - - @returns - the current reference count of the instance for debugging purposes. - */ - virtual sal_Int32 acquire() = 0; - - /** Releases a reference to an instance. A caller has to call - 'release' when a before aquired reference to an instance - is no longer needed. 'acquire' and 'release' calls need to - be balanced. - - @returns - the current reference count of the instance for debugging purposes. - */ - virtual sal_Int32 release() = 0; - - /** Returns the current reference count. This method should be used for - debugging purposes. Using it otherwise is a signal of a design flaw. - */ - virtual sal_Int32 getReferenceCount() const = 0; - -protected: - virtual ~IInterface() {}; - }; - - #endif // IDOCUMENT_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IMark.hxx b/sw/inc/IMark.hxx deleted file mode 100644 index 5ef17ebd50..0000000000 --- a/sw/inc/IMark.hxx +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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> -#include <map> -#include "swdll.hxx" - -#ifndef SW_DECL_SWSERVEROBJECT_DEFINED -#define SW_DECL_SWSERVEROBJECT_DEFINED -SV_DECL_REF( SwServerObject ) -#endif - - -struct SwPosition; - -namespace sw { namespace mark -{ - class SAL_DLLPUBLIC_EXPORT 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; } - - virtual rtl::OUString ToString( ) const =0; - }; - - class SAL_DLLPUBLIC_EXPORT 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 SAL_DLLPUBLIC_EXPORT IFieldmark - : virtual public IMark - { - public: - typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Any> parameter_map_t; - //getters - virtual ::rtl::OUString GetFieldname() const =0; - virtual ::rtl::OUString GetFieldHelptext() const =0; - virtual parameter_map_t* GetParameters() =0; - virtual const parameter_map_t* GetParameters() const =0; - - //setters - virtual void SetFieldname(const ::rtl::OUString& rFieldname) =0; - virtual void SetFieldHelptext(const ::rtl::OUString& rFieldHelptext) =0; - virtual void Invalidate() = 0; - }; - - class SAL_DLLPUBLIC_EXPORT ICheckboxFieldmark - : virtual public IFieldmark - { - public: - virtual bool IsChecked() const =0; - virtual void SetChecked(bool checked) =0; - }; -}} -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/IShellCursorSupplier.hxx b/sw/inc/IShellCursorSupplier.hxx deleted file mode 100644 index a160f43d40..0000000000 --- a/sw/inc/IShellCursorSupplier.hxx +++ /dev/null @@ -1,51 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 ISHELLCURSORSUPPLIER_HXX -#define ISHELLCURSORSUPPLIER_HXX - - -class SwPaM; - - -namespace sw { - -/** The Undo actions need to create new Shell cursors. - Just creating new SwPaMs in the Undo actions is not sufficient, - because only Shell cursors are corrected by doccorr.cxx. - */ -class IShellCursorSupplier -{ -public: - virtual ~IShellCursorSupplier() { } - virtual SwPaM & CreateNewShellCursor() = 0; - virtual SwPaM & GetCurrentShellCursor() = 0; -}; - -} // namespace sw - -#endif // ISHELLCURSORSUPPLIER_HXX diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx deleted file mode 100644 index 120e66b71d..0000000000 --- a/sw/inc/PostItMgr.hxx +++ /dev/null @@ -1,298 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _POSTITMGR_HXX -#define _POSTITMGR_HXX - -#include <list> -#include <vector> -#include <editeng/outlobj.hxx> -#include <tools/string.hxx> -#include <tools/link.hxx> -#include <swrect.hxx> -#include <unotools/configitem.hxx> -#include <unotools/options.hxx> -#include <com/sun/star/util/SearchOptions.hpp> -#include <com/sun/star/uno/Any.hxx> -#include <SidebarWindowsTypes.hxx> -#include <svl/lstner.hxx> - -class SwWrtShell; -class SwDoc; -class SwView; -class SwPostItField; -class SwFmtFld; -class SwField; -class SfxBroadcaster; -class SfxHint; -class SwEditWin; -class Color; -class SvxSearchItem; -class SvxLanguageItem; -namespace sw { namespace annotation { - class SwAnnotationWin; -}} -namespace sw { namespace sidebarwindows { - class SwSidebarWin; - class SwFrmSidebarWinContainer; -}} -class SwSidebarItem; -class SwFrm; -class Window; - -#define SORT_POS 1 -#define SORT_AUTHOR 2 -#define SORT_DATE 3 - -#define COL_NOTES_SIDEPANE_ARROW_ENABLED RGB_COLORDATA(0,0,0) -#define COL_NOTES_SIDEPANE_ARROW_DISABLED RGB_COLORDATA(172,168,153) - -typedef std::list<SwSidebarItem*> SwSidebarItem_list; -typedef std::list<SwSidebarItem*>::iterator SwSidebarItem_iterator; - - -struct SwPostItPageItem -{ - bool bScrollbar; - sw::sidebarwindows::SidebarPosition eSidebarPosition; - long lOffset; - SwRect mPageRect; - SwSidebarItem_list* mList; - SwPostItPageItem(): bScrollbar(false), eSidebarPosition( sw::sidebarwindows::SIDEBAR_LEFT ), lOffset(0) - { - mList = new SwSidebarItem_list; - } - ~SwPostItPageItem() - { - mList->clear(); - delete mList; - } - -}; - -struct FieldShadowState -{ - const SwPostItField* mpShadowFld; - bool bCursor; - bool bMouse; - FieldShadowState(): mpShadowFld(0),bCursor(false),bMouse(false) - { - } -}; - -class SwNoteProps: public utl::ConfigItem -{ - private: - bool bIsShowAnchor; - public: - SwNoteProps() - : ConfigItem(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Writer/Notes"))) - , bIsShowAnchor(false) - { - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames = GetPropertyNames(); - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aValues = GetProperties(rNames); - const ::com::sun::star::uno::Any* pValues = aValues.getConstArray(); - OSL_ENSURE(aValues.getLength() == rNames.getLength(), "GetProperties failed"); - if (aValues.getLength()) - pValues[0]>>=bIsShowAnchor; - } - - bool IsShowAnchor() - { - return bIsShowAnchor; - } - ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetPropertyNames() - { - static ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames; - if(!aNames.getLength()) - { - aNames.realloc(1); - ::rtl::OUString* pNames = aNames.getArray(); - pNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowAnkor")); - } - return aNames; - } - - virtual void Commit(); - virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); -}; - -class SwPostItMgr: public SfxListener -{ - private: - SwView* mpView; - SwWrtShell* mpWrtShell; - SwEditWin* mpEditWin; - std::list< SwSidebarItem*> mvPostItFlds; - std::vector<SwPostItPageItem*> mPages; - sal_uLong mnEventId; - bool mbWaitingForCalcRects; - sw::sidebarwindows::SwSidebarWin* mpActivePostIt; - bool mbLayout; - long mbLayoutHeight; - long mbLayouting; - bool mbReadOnly; - bool mbDeleteNote; - FieldShadowState mShadowState; - OutlinerParaObject* mpAnswer; - bool mbIsShowAnchor; - - // data structure to collect the <SwSidebarWin> instances for certain <SwFrm> instances. - sw::sidebarwindows::SwFrmSidebarWinContainer* mpFrmSidebarWinContainer; - - typedef std::list<sw::sidebarwindows::SwSidebarWin*>::iterator SwSidebarWin_iterator; - - void AddPostIts(bool bCheckExistance = true,bool bFocus = true); - void RemoveSidebarWin(); - void PreparePageContainer(); - void Scroll(const long lScroll,const unsigned long aPage ); - void AutoScroll(const sw::sidebarwindows::SwSidebarWin* pPostIt,const unsigned long aPage ); - bool ScrollbarHit(const unsigned long aPage,const Point &aPoint); - bool LayoutByPage( std::list<sw::sidebarwindows::SwSidebarWin*> &aVisiblePostItList, - const Rectangle aBorder, - long lNeededHeight); - void CheckForRemovedPostIts(); - bool ArrowEnabled(sal_uInt16 aDirection,unsigned long aPage) const; - bool BorderOverPageBorder(unsigned long aPage) const; - bool HasScrollbars() const; - void Focus(SfxBroadcaster& rBC); - - sal_Int32 GetInitialAnchorDistance() const; - sal_Int32 GetScrollSize() const; - sal_Int32 GetSpaceBetween() const; - void SetReadOnlyState(); - DECL_LINK( CalcHdl, void*); - - sw::sidebarwindows::SwSidebarWin* GetSidebarWin(const SfxBroadcaster* pBroadcaster) const; - - void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus); - void RemoveItem( SfxBroadcaster* pBroadcast ); - - void Sort(const short aType); - - public: - SwPostItMgr(SwView* aDoc); - ~SwPostItMgr(); - - typedef std::list< SwSidebarItem* >::const_iterator const_iterator; - const_iterator begin() const { return mvPostItFlds.begin(); } - const_iterator end() const { return mvPostItFlds.end(); } - - void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - - void LayoutPostIts(); - bool CalcRects(); - - void MakeVisible( const sw::sidebarwindows::SwSidebarWin* pPostIt, - long aPage = -1); - - bool ShowScrollbar(const unsigned long aPage) const; - bool HasNotes() const ; - bool ShowNotes() const; - bool IsShowAnchor() { return mbIsShowAnchor;} - unsigned long GetSidebarWidth(bool bPx = false) const; - unsigned long GetSidebarBorderWidth(bool bPx = false) const; - unsigned long GetNoteWidth(); - - void PrepareView(bool bIgnoreCount = false); - - void CorrectPositions(); - - void SetLayout() { mbLayout = true; }; - void Delete(String aAuthor); - void Delete(); - - void Hide( const String& rAuthor ); - void Hide(); - void Show(); - - void Rescale(); - - Rectangle GetBottomScrollRect(const unsigned long aPage) const; - Rectangle GetTopScrollRect(const unsigned long aPage) const; - - bool IsHit(const Point &aPointPixel); - Color GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) const; - - sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pFld) const; - - sw::sidebarwindows::SwSidebarWin* GetNextPostIt( sal_uInt16 aDirection, - sw::sidebarwindows::SwSidebarWin* aPostIt); - long GetNextBorder(); - - sw::sidebarwindows::SwSidebarWin* GetActiveSidebarWin() { return mpActivePostIt; } - void SetActiveSidebarWin( sw::sidebarwindows::SwSidebarWin* p); - bool HasActiveSidebarWin() const; - bool HasActiveAnnotationWin() const; - void GrabFocusOnActiveSidebarWin(); - void UpdateDataOnActiveSidebarWin(); - void DeleteActiveSidebarWin(); - void HideActiveSidebarWin(); - void ToggleInsModeOnActiveSidebarWin(); - - sal_Int32 GetMinimumSizeWithMeta() const; - sal_Int32 GetSidebarScrollerHeight() const; - - void SetShadowState(const SwPostItField* pFld,bool bCursor = true); - - void SetSpellChecking(); - - Color GetColorDark(sal_uInt16 aAuthorIndex); - Color GetColorLight(sal_uInt16 aAuthorIndex); - Color GetColorAnchor(sal_uInt16 aAuthorIndex); - - - void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;} - OutlinerParaObject* IsAnswer() {return mpAnswer;} - void CheckMetaText(); - void StartSpelling(); - - sal_uInt16 Replace(SvxSearchItem* pItem); - sal_uInt16 SearchReplace(const SwFmtFld &pFld, const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward); - sal_uInt16 FinishSearchReplace(const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward); - - void AssureStdModeAtShell(); - - void ConnectSidebarWinToFrm( const SwFrm& rFrm, - const SwFmtFld& rFmtFld, - sw::sidebarwindows::SwSidebarWin& rSidebarWin ); - void DisconnectSidebarWinFromFrm( const SwFrm& rFrm, - sw::sidebarwindows::SwSidebarWin& rSidebarWin ); - bool HasFrmConnectedSidebarWins( const SwFrm& rFrm ); - Window* GetSidebarWinForFrmByIndex( const SwFrm& rFrm, - const sal_Int32 nIndex ); - void GetAllSidebarWinForFrm( const SwFrm& rFrm, - std::vector< Window* >* pChildren ); -}; - -#endif - - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/RefreshListenerContainer.hxx b/sw/inc/RefreshListenerContainer.hxx deleted file mode 100644 index 155b5face1..0000000000 --- a/sw/inc/RefreshListenerContainer.hxx +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _REFRESH_LISTENER_CONTAINER_HXX_ -#define _REFRESH_LISTENER_CONTAINER_HXX_ - -#include <unoevtlstnr.hxx> - -class SwRefreshListenerContainer : public SwEventListenerContainer -{ -public: - SwRefreshListenerContainer( ::com::sun::star::uno::XInterface* pxParent); - void Refreshed(); -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx deleted file mode 100644 index d5285c9268..0000000000 --- a/sw/inc/SidebarWin.hxx +++ /dev/null @@ -1,243 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SIDEBARWIN_HXX -#define _SIDEBARWIN_HXX - -#include <postithelper.hxx> -#include <SidebarWindowsTypes.hxx> - -#include <vcl/window.hxx> -#include <swrect.hxx> - -#include <tools/datetime.hxx> -#include <tools/date.hxx> - -#include <vcl/lineinfo.hxx> -#include <basegfx/polygon/b2dpolygon.hxx> -#include <editeng/editstat.hxx> - -class SwPostItMgr; -class SwPostItField; -class OutlinerView; -class Outliner; -class ScrollBar; -class SwEditWin; -class SwView; -class Edit; -class MenuButton; -class SwFrm; - - -namespace sw { namespace sidebarwindows { - -class SidebarTxtControl; -class AnchorOverlayObject; -class ShadowOverlayObject; - -typedef sal_Int64 SwPostItBits; - -#define PB_Preview ((SwPostItBits)0x00000001) - - -class SwSidebarWin : public Window -{ - public: - SwSidebarWin( SwEditWin& rEditWin, - WinBits nBits, - SwPostItMgr& aMgr, - SwPostItBits aBits, - SwSidebarItem& rSidebarItem ); - virtual ~SwSidebarWin(); - - void SetSize( const Size& rNewSize ); - void SetPosSizePixelRect( long nX, - long nY, - long nWidth, - long nHeight, - const SwRect &aRect, - const long PageBorder); - void SetPosAndSize(); - void TranslateTopPosition(const long aAmount); - virtual void CheckMetaText(); - - inline Point GetAnchorPos() { return mAnchorRect.Pos(); } - SwEditWin* EditWin(); - - inline OutlinerView* GetOutlinerView() { return mpOutlinerView;} - bool HasScrollbar() const; - bool IsScrollbarVisible() const; - inline ScrollBar* Scrollbar() { return mpVScrollbar; } - inline ::sw::sidebarwindows::AnchorOverlayObject* Anchor() { return mpAnchor;} - inline ::sw::sidebarwindows::ShadowOverlayObject* Shadow() { return mpShadow;} - - long GetPostItTextHeight(); - - void SwitchToPostIt(sal_uInt16 aDirection); - virtual void SwitchToFieldPos(); - - virtual sal_uInt32 MoveCaret() = 0; - - virtual void UpdateData() = 0; - virtual void SetPostItText() = 0; - virtual void Delete(); - virtual void GotoPos() = 0; - - virtual String GetAuthor() = 0; - virtual Date GetDate() = 0; - virtual Time GetTime() = 0; - - void ExecuteCommand(sal_uInt16 nSlot); - void InitControls(); - void HidePostIt(); - void DoResize(); - void ResizeIfNeccessary(long aOldHeight, long aNewHeight); - void SetScrollbar(); - - void SetVirtualPosSize( const Point& aPoint, const Size& aSize); - const Point VirtualPos() { return mPosSize.TopLeft(); } - const Size VirtualSize() { return mPosSize.GetSize(); } - - void ShowAnchorOnly(const Point &aPoint); - void ShowNote(); - void HideNote(); - - void ResetAttributes(); - - void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition); - void SetReadonly(sal_Bool bSet); - sal_Bool IsReadOnly() { return mbReadonly;} - bool IsPreview() { return nFlags & PB_Preview;} - - void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor); - const Color& ColorAnchor() { return mColorAnchor; } - const Color& ColorDark() { return mColorDark; } - const Color& ColorLight() { return mColorLight; } - void Rescale(); - - void SetViewState(::sw::sidebarwindows::ViewState bViewState); - - bool IsFollow() { return mbIsFollow; } - void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; }; - virtual bool CalcFollow() = 0; - - sal_Int32 GetMetaHeight(); - sal_Int32 GetMinimumSizeWithMeta(); - sal_Int32 GetMinimumSizeWithoutMeta(); - sal_Int32 GetMetaButtonAreaWidth(); - sal_Int32 GetScrollbarWidth(); - - void SetSpellChecking(); - - void ToggleInsMode(); - - virtual void ActivatePostIt(); - virtual void DeactivatePostIt(); - - void SetChangeTracking( const SwPostItHelper::SwLayoutStatus aStatus, - const Color& aColor); - SwPostItHelper::SwLayoutStatus GetLayoutStatus() { return mLayoutStatus; } - Color GetChangeColor() { return mChangeColor; } - - virtual bool IsProtected() {return mbReadonly;}; - - DECL_LINK( WindowEventListener, VclSimpleEvent* ); - inline bool IsMouseOverSidebarWin() const { return mbMouseOver; } - - void SetLanguage(const SvxLanguageItem aNewItem); - - void ChangeSidebarItem( SwSidebarItem& rSidebarItem ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); - - protected: - virtual void DataChanged( const DataChangedEvent& aEvent); - virtual void LoseFocus(); - virtual void Paint( const Rectangle& rRect); - virtual void GetFocus(); - virtual MenuButton* CreateMenuButton() = 0; - - void SetSizePixel( const Size& rNewSize ); - SfxItemSet DefaultItem(); - - DECL_LINK(ModifyHdl, void*); - DECL_LINK(ScrollHdl, ScrollBar*); - DECL_LINK(DeleteHdl, void*); - - inline SwView& DocView() { return mrView;} - inline SwPostItMgr& Mgr() { return mrMgr; } - inline Outliner* Engine() { return mpOutliner;} - - private: - SwSidebarWin* GetTopReplyNote(); - - virtual SvxLanguageItem GetLanguage(void); - - SwPostItMgr& mrMgr; - SwView& mrView; - const SwPostItBits nFlags; - - sal_uLong mnEventId; - - OutlinerView* mpOutlinerView; - Outliner* mpOutliner; - - sw::sidebarwindows::SidebarTxtControl* mpSidebarTxtControl; - ScrollBar* mpVScrollbar; - Edit* mpMetadataAuthor; - Edit* mpMetadataDate; - MenuButton* mpMenuButton; - - sw::sidebarwindows::AnchorOverlayObject* mpAnchor; - sw::sidebarwindows::ShadowOverlayObject* mpShadow; - - Color mColorAnchor; - Color mColorDark; - Color mColorLight; - Color mChangeColor; - - sw::sidebarwindows::SidebarPosition meSidebarPosition; - - Rectangle mPosSize; - SwRect mAnchorRect; - long mPageBorder; - - bool mbMouseOver; - SwPostItHelper::SwLayoutStatus mLayoutStatus; - - bool mbReadonly; - bool mbIsFollow; - - SwSidebarItem& mrSidebarItem; - const SwFrm* mpAnchorFrm; -}; - -} } // eof namespace sw::sidebarwindows - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SidebarWindowsTypes.hxx b/sw/inc/SidebarWindowsTypes.hxx deleted file mode 100644 index 8e9ce8a3da..0000000000 --- a/sw/inc/SidebarWindowsTypes.hxx +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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 - * - * 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 _SIDEBARWINDOWSTYPES_HXX -#define _SIDEBARWINDOWSTYPES_HXX - -namespace sw { namespace sidebarwindows { - -enum ViewState -{ - VS_NORMAL, - VS_VIEW, - VS_EDIT -}; - -enum SidebarPosition -{ - SIDEBAR_LEFT, // sidebar on left side - SIDEBAR_RIGHT, // sidebar on right side - SIDEBAR_NONE // sidebar on neither side -}; - -} } // end of namespace sw::sidebarwindows - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx deleted file mode 100644 index cde8ff0be1..0000000000 --- a/sw/inc/SwAppletImpl.hxx +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_APPLET_IMPL_HXX -#define _SW_APPLET_IMPL_HXX - -#define SWHTML_OPTTYPE_IGNORE 0 -#define SWHTML_OPTTYPE_TAG 1 -#define SWHTML_OPTTYPE_PARAM 2 -#define SWHTML_OPTTYPE_SIZE 3 - -#include <com/sun/star/embed/XEmbeddedObject.hpp> - - -#include <tools/string.hxx> -#include <sfx2/frmhtml.hxx> -#include <sfx2/frmhtmlw.hxx> -#include <vcl/wrkwin.hxx> -#include <sot/storage.hxx> -#include <svl/itemset.hxx> - -#include <svl/ownlist.hxx> - -class SfxItemSet; - -#define OOO_STRING_SW_HTML_O_Hidden "HIDDEN" - -class SwApplet_Impl -{ - com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > xApplet; - SvCommandList aCommandList; - SfxItemSet aItemSet; - String sAlt; - -public: - static sal_uInt16 GetOptionType( const String& rName, sal_Bool bApplet ); - SwApplet_Impl( SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2 ); - SwApplet_Impl( SfxItemSet& rSet ): aItemSet ( rSet) {} - ~SwApplet_Impl(); - void CreateApplet( const String& rCode, const String& rName, - sal_Bool bMayScript, const String& rCodeBase, - const String& rBaseURL ); -#ifdef SOLAR_JAVA - sal_Bool CreateApplet( const String& rBaseURL ); - void AppendParam( const String& rName, const String& rValue ); -#endif - void FinishApplet(); - com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetApplet() { return xApplet; } - SfxItemSet& GetItemSet() { return aItemSet; } - const String& GetAltText() { return sAlt; } - void SetAltText( const String& rAlt ) {sAlt = rAlt;} -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SwCapObjType.hxx b/sw/inc/SwCapObjType.hxx deleted file mode 100644 index 3fae8a859e..0000000000 --- a/sw/inc/SwCapObjType.hxx +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWCAPOBJTYPE_HXX -#define _SWCAPOBJTYPE_HXX - -enum SwCapObjType -{ - FRAME_CAP, GRAPHIC_CAP, TABLE_CAP, OLE_CAP -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SwGetPoolIdFromName.hxx b/sw/inc/SwGetPoolIdFromName.hxx deleted file mode 100644 index c7bb4ecbcb..0000000000 --- a/sw/inc/SwGetPoolIdFromName.hxx +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _GETPOOLIDFROMNAMEENUM_HXX -#define _GETPOOLIDFROMNAMEENUM_HXX - -/* When using the NameMapper to translate pool ids to UI or programmatic - * names, this enum is used to define which family is required */ - -typedef sal_uInt16 SwGetPoolIdFromName; - -namespace nsSwGetPoolIdFromName -{ - const SwGetPoolIdFromName GET_POOLID_TXTCOLL = 0x01; - const SwGetPoolIdFromName GET_POOLID_CHRFMT = 0x02; - const SwGetPoolIdFromName GET_POOLID_FRMFMT = 0x04; - const SwGetPoolIdFromName GET_POOLID_PAGEDESC = 0x08; - const SwGetPoolIdFromName GET_POOLID_NUMRULE = 0x10; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SwNodeNum.hxx b/sw/inc/SwNodeNum.hxx deleted file mode 100644 index ddd0e6b5b8..0000000000 --- a/sw/inc/SwNodeNum.hxx +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_NODE_NUM_HXX -#define _SW_NODE_NUM_HXX - -#include <SwNumberTree.hxx> - -class SwTxtNode; -struct SwPosition; -class SwNumRule; -class SwNumFmt; - -class SW_DLLPUBLIC SwNodeNum : public SwNumberTreeNode -{ -public: - - explicit SwNodeNum( SwTxtNode* pTxtNode ); - explicit SwNodeNum( SwNumRule* pNumRule ); - virtual ~SwNodeNum(); - - SwNumRule* GetNumRule() const; - void ChangeNumRule( SwNumRule& rNumRule ); - SwTxtNode* GetTxtNode() const; - - virtual bool IsNotificationEnabled() const; - - virtual bool IsContinuous() const; - - virtual bool IsCounted() const; - - virtual bool LessThan(const SwNumberTreeNode & rNode) const; - - virtual bool IsRestart() const; - - virtual SwNumberTree::tSwNumTreeNumber GetStartValue() const; - - SwPosition GetPosition() const; - - // The number tree root node is deleted, when the corresponding numbering - // rule is deleted. In this situation the number tree should be empty - - // still registered text nodes aren't allowed. But it is possible, that - // text nodes of the undo nodes array are still registered. These will be - // unregistered. - // Text nodes of the document nodes array aren't allowed to be registered - // in this situation - this will be asserted. - static void HandleNumberTreeRootNodeDelete( SwNodeNum& rNodeNum ); - - /** determines the <SwNodeNum> instance, which is preceding the given text node - - #i81002# - - @author OD - */ - const SwNodeNum* GetPrecedingNodeNumOf( const SwTxtNode& rTxtNode ) const; - -protected: - virtual SwNumberTreeNode * Create() const; - - // --> #i64010# - virtual bool HasCountedChildren() const; - virtual bool IsCountedForNumbering() const; - - // method called before this tree node has been added to the list tree - virtual void PreAdd(); - // method called at a child after this child has been removed from the list tree - virtual void PostRemove(); -private: - SwTxtNode * mpTxtNode; - SwNumRule * mpNumRule; - - static void _UnregisterMeAndChildrenDueToRootDelete( SwNodeNum& rNodeNum ); - - SwNodeNum( const SwNodeNum& ); // no copy constructor - SwNodeNum& operator=( const SwNodeNum& ); // no assignment operator - - virtual bool IsCountPhantoms() const; - - virtual bool IsNotifiable() const; - - virtual void NotifyNode(); -}; - -#endif // _SW_NODE_NUM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx deleted file mode 100644 index c9a8979aea..0000000000 --- a/sw/inc/SwNumberTree.hxx +++ /dev/null @@ -1,725 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_NUMBER_TREE_HXX -#define _SW_NUMBER_TREE_HXX - -#include <set> -#include <vector> -#include <tools/string.hxx> -#include <swdllapi.h> -#include <SwNumberTreeTypes.hxx> - -class SwNumberTreeNode; - -bool SwNumberTreeNodeLessThan (const SwNumberTreeNode * pA, - const SwNumberTreeNode * pB); - -struct compSwNumberTreeNodeLessThan -{ - bool operator()(const SwNumberTreeNode * pA, - const SwNumberTreeNode * pB) const - { return SwNumberTreeNodeLessThan(pA, pB); } -}; - -/** - A tree of numbered nodes. - - Simple example: - - <pre> - 1. kshdkjfs - 1.1. lskjf - 2. sdfjlksaf - 3. fkaöslk - 3.1. lfjlaskf - 3.2. jaslkjflsf - 3.2.1. hkljhkjhk - - + R - + 1 kshdkjfs - | + 1 lskjf - + 2 sdfjlksaf - + 3 fkaöslk - + 1 lfjlaskf - + 2 jaslkjflsf - + 1 hkljhkjhk - </pre> - - The root contains the nodes of the first level. Each node A of the - first level contains those nodes of the second level that have the - same first level number as A and so on for the subsidiary levels. - - The numbering label of a node A is resolved by concatenating the - numbers of the nodes on the path from the root to A. - - ------------------------------------------ - - Phantoms - - A phantom is an auxiliary node that is used to emulate numberings - starting with nodes not at top level. The phantom contains the - number for the level but is not considered part of the numbering. - - Constraint 1: A phantom is always the first child node. - Constraint 2: At each node there is at most one child that is a phantom. - Constraint 3: A phantom is the smallest of all numbering nodes. - - Uncounted Phantoms - - 0.1. dljflskjlasf - 5. abcdagaha - 5.1. - - + R (nStart = 5) - + 0 (phantom, not counted) - | + 1 dljflskjlasf - + 5 abcdagaha - + 1 - - The phantom gets numbered with 0. The first non-phantom node gets - numbered with the start value. - - ----------------------------------------- - - Counted Phantoms - - 5.1. lgkjjgklg - 6. lkjfalskjflsaf - 6.1. ljdflaksjflkjasflkjsf - - + R (nStart = 5) - + 5 (phantom, counted) - | + 1 lgkjjgklg - + 6 lkjfalskjflsaf - + 1 ljdflaksjflkjasflkjsf - - The phantom gets numbered with the start value. -*/ -class SW_DLLPUBLIC SwNumberTreeNode -{ -protected: - typedef std::set<SwNumberTreeNode *, compSwNumberTreeNodeLessThan> - tSwNumberTreeChildren; - -public: - SwNumberTreeNode(); - - virtual ~SwNumberTreeNode(); - - /** - Add a child. - - @param pChild child to add - @param nDepth depth in which to add the child - */ - void AddChild( SwNumberTreeNode* pChild, - const int nDepth = 0 ); - - /** - Remove a child. - - @param pChild child to be removed - */ - void RemoveChild( SwNumberTreeNode* pChild ); - - /** - Remove this child from the tree. - */ - void RemoveMe(); - - /** - Returns the parent of this node. - - @return the parent - */ - inline SwNumberTreeNode* GetParent() const - { - return mpParent; - } - - /** - Returns number of this node. - - @param bValidate validate the number? - - @return number of this node - */ - SwNumberTree::tSwNumTreeNumber GetNumber( bool bValidate = true ) const; - - bool IsContinueingPreviousSubTree() const; - - /** - Returns level numbers of this node. - - @return level numbers of this node - */ - SwNumberTree::tNumberVector GetNumberVector() const; - - /** - Return if numbering is restartet at this node. - */ - virtual bool IsRestart() const = 0; - - /** - Return start value. - - @return start value - */ - virtual SwNumberTree::tSwNumTreeNumber GetStartValue() const = 0; - - /** - Return if this node is counted. - - @retval true this node is counted - @retval false this node is NOT counted - */ - virtual bool IsCounted() const; - - /** - Return if this node is counted continuous. - - @retval true This node is counted continuous. - @retval false else - */ - virtual bool IsContinuous() const = 0; - - /** - Return if a node is first non-phantom child of this node. - - @param pNode the node to check - - @retval true pNode is first child of this node - @retval false else - */ - virtual bool IsFirst(const SwNumberTreeNode * pNode) const; - - /** - Return if this node if the first non-phantom node in the tree. - - @retval true this node is the first non-phantom node in the tree - @retval false else - */ - virtual bool IsFirst() const; - - /** - Return if this node is a phantom. - - @retval true this node is a phantom - @retval false this node is NOT a phantom - */ - bool IsPhantom() const; - - /** set level of this node - - precondition: node is already member of a list tree - - @author OD - */ - void SetLevelInListTree( const int nLevel ); - - /** - Return level of this node. - - The level of this node is the length of the path from the root - to this node. - - @return the level of this node - */ - int GetLevelInListTree() const; - - /** - Returns if this node is less than another node. - - @param rTreeNode node to compare with - - @attention A phantom node is considered the least element with - respect to lessThan. - - @retval true this node is less than rTreeNode - @retval false else - */ - virtual bool LessThan(const SwNumberTreeNode & rTreeNode) const; - - /** - Invalidate this node and all its descendants. - - All iterators holding the last valid node in the according list - of childs are set to the end of this list, thereby stating all - children in the list are invalid. - #i83479# - made public - */ - void InvalidateTree() const; - - /** - Notifies all invalid children of this node. - #i83479# - made public - */ - void NotifyInvalidChildren(); - - /** - Notifies the node. - - Calls Invalidate(this) on parent. - */ - void InvalidateMe(); - - /** - Validate the tree. - - Validates all nodes in this subtree. - */ - void ValidateTree(); - - /** - Validates this node. - - Calls Validate(this) on parent. - */ - void ValidateMe(); - - /** - Notifies all invalid siblings of this node. - */ - void NotifyInvalidSiblings(); - - /** - notification of all nodes in the list tree on certain list level - */ - void NotifyNodesOnListLevel( const int nListLevel ); - - /** Invalidation and notification of complete numbering tree - - #i64010# - Usage: on <IsCounted()> state change its needed to invalidate the - complete numbering tree due to wide influence of this change. - */ - inline void InvalidateAndNotifyTree() - { - if ( GetRoot() ) - { - GetRoot()->InvalidateTree(); - GetRoot()->Notify(); - } - } - - /** - Returns the greatest descendant of the root that is smaller than - this node, aka the predecessor of this node. - - @return the predecessor - */ - SwNumberTreeNode* GetPred( bool bSibling = false ) const; - - /** determines the node, which is preceding the node - - #i81002# - The search for the preceding node is performed for the tree below the - <this> node. To search the complete tree, the method has been called for - the root of the tree. - - @author OD - */ - const SwNumberTreeNode* GetPrecedingNodeOf( const SwNumberTreeNode& rNode ) const; - -#if OSL_DEBUG_LEVEL > 1 - static unsigned long GetInstances(); - unsigned long GetSerial(); -#endif - -#ifdef __SW_NUMBER_TREE_SANITY_CHECK - /** - Sanity check. - - @param bRecursive descend to children - - @retval true the structure of this node is sane - @retval false else - */ - bool IsSane(bool bRecursive) const; -#endif // __SW_NUMBER_TREE_SANITY_CHECK - -protected: - /** - the children - */ - tSwNumberTreeChildren mChildren; - - /** - Returns the root node of the tree this node is part of. - - Important note: method call <GetRoot()->GetRoot()> returns NULL. - - @return the root - */ - SwNumberTreeNode* GetRoot() const; - - /** - Return if the notification is not disabled on global conditions - - @retval true Notification enabled in general. - @retval false else - */ - virtual bool IsNotificationEnabled() const = 0; - - /** - Returns how many children this node has got. - - @return number of children - */ - tSwNumberTreeChildren::size_type GetChildCount() const; - - // #i64010# - made pure virtual - virtual bool HasCountedChildren() const = 0; - - // #i64010# - virtual bool IsCountedForNumbering() const = 0; - - // method called before this tree node has been added to the list tree - virtual void PreAdd() = 0; - // method called after this tree node has been removed from the list tree - virtual void PostRemove() = 0; - -#ifdef __SW_NUMBER_TREE_SANITY_CHECK - /** - Sanity check with loop detection. - - @param bRecursive descend to children - @param rParents vector for recording path - - @retval true this node is sane - @retval false else */ - virtual bool IsSane - (bool bRecursive, std::vector<const SwNumberTreeNode *> rParents) const; -#endif // __SW_NUMBER_TREE_SANITY_CHECK - - /** - the parent node - */ - SwNumberTreeNode * mpParent; - - /** - the number of the node - */ - mutable SwNumberTree::tSwNumTreeNumber mnNumber; - - // boolean indicating, that a node of a not counted parent node is continueing - // the numbering of parent's previous node sub tree. - // Example: - // 1. kshdkjfs - // 1.1. lskjf - // sdfjlksaf <-- not counted parent node - // 1.2. lfjlaskf <-- <mbContinueingPreviousSubTree = true> - mutable bool mbContinueingPreviousSubTree; - - /** - true this node is a phantom - false this node is NOT a phantom - */ - bool mbPhantom; - - /** - Iterator to the last valid element. All children that are less - than or equal to the referenced child are valid. All children - greater than the referenced child are invalid. - */ - mutable tSwNumberTreeChildren::const_iterator mItLastValid; - -#if OSL_DEBUG_LEVEL > 1 - /** - Counter for the number of created instances. - */ - static unsigned long nInstances; - - /** - Serial number. - */ - unsigned long mnSerial; -#endif - - SwNumberTreeNode(const SwNumberTreeNode& ); - SwNumberTreeNode& operator=( const SwNumberTreeNode& ); - - /** - Calls _GetNumberVector on parent and adds number of this node - at the end. - - @param rVector return value - @param bValidate validate the number? - */ - void _GetNumberVector( SwNumberTree::tNumberVector& rVector, - bool bValidate = true ) const; - - /** - Invalidates a child. - - Calls SetLastValid for the preceeding sibling of the child and - notifies all invalid children. - - @param pChild the child to invalidate - */ - void Invalidate( SwNumberTreeNode * pChild ); - - /** Invalidation of all children - - Usage: on <IsCounted()> state change the children have to be invalidated - */ - inline void InvalidateChildren() - { - SetLastValid( mChildren.end() ); - } - - /** Invalidation of parent node, if its not counted. - - Usage: on <IsCounted()> state change the parent have to be invalidated - */ - inline void InvalidateNotCountedParent() - { - if ( GetParent() && !GetParent()->IsCountedForNumbering() ) - { - GetParent()->InvalidateMe(); - } - } - - /** - Set the last valid child of this node. - - @param aItLastValid iterator pointing to the new last valid child - @param bValidating - true always set the last valid node to - aItLastValid - - false only set if aItLastValid is preceeding - the current last valid node - */ - void SetLastValid(tSwNumberTreeChildren::const_iterator aItLastValid, - bool bValidating = false) const; - - /** - Set this node as last valid child of its parent. - - @param bValidation see aboce - */ - void SetLastValid(bool bValidating) const; - - /** - Return if this node is notifiable. - - @attention If a not is not notifiable a notify request is *not* - forwarded to its descendants. - - @retval true This node is notifiable. - @retval false else - */ - virtual bool IsNotifiable() const = 0; - - /** - Notifies the node. - - Called when the number of the node got invalid. - */ - virtual void NotifyNode() = 0; - - /** - Notifies this node (NotifyNode) and all descendants. - */ - void Notify(); - - /** Notification of parent node siblings, if its not counted. - - Usage: on <IsCounted()> state change the parent node and its siblings - have to be notified. - */ - inline void NotifyNotCountedParentSiblings() - { - if ( GetParent() && !GetParent()->IsCountedForNumbering() ) - { - GetParent()->NotifyInvalidSiblings(); - } - } - - /** notification of children nodes on certain depth - - @author OD - */ - void NotifyChildrenOnDepth( const int nDepth ); - - /** - Returns if a child A this node is valid. - - A is valid if aItLastValid in parent refers to a node - greater than of equal to A. - - @param pChild child to be tested - - @retval true this node is valid - @retval false this node is NOT valid - */ - bool IsValid(const SwNumberTreeNode * pChild) const; - - /** - Returns if this node is valid. - - @retval true this node is valid - @retval false else - */ - bool IsValid() const; - - /** - Validates a child. - - @param pNode child to be validated - - @attention All invalid children preceding pNode are validated, too. - */ - void Validate(const SwNumberTreeNode * pNode) const; - - /** - Validates a child using hierarchical numbering. - - @param pNode child to be validated - - @attention All invalid children preceding pNode are validated, too. - */ - void ValidateHierarchical(const SwNumberTreeNode * pNode) const; - - /** - Validates a child using continuous numbering. - - @param pNode child to be validated - - @attention All invalid children preceding pNode are validated, too. - */ - void ValidateContinuous(const SwNumberTreeNode * pNode) const; - - /** - Creates a new node of the same class. - - @return the new node - */ - virtual SwNumberTreeNode * Create() const = 0; - - /** - Creates a phantom. - - @return the created phantom - */ - SwNumberTreeNode * CreatePhantom(); - - /** - Set if this node is a phantom. - - @param bPhantom - true this node is a phantom - - false this node is a phantom - */ - void SetPhantom(bool bPhantom = true); - - /** - Return if phantoms are counted. - - @retval true phantoms are counted - @retval false else - */ - virtual bool IsCountPhantoms() const = 0; - - /** - Return if all descendants of this node are phantoms. - - @retval true all descendants are phantoms - @retval false else - */ - bool HasOnlyPhantoms() const; - - bool HasPhantomCountedParent() const; - - /** - HB, OD : return node, if it isn't a phantom, otherwise return first - non-phantom descendant. - Returns the first child of this node that is NOT a phantom. - - @return the first non phantom child - */ - SwNumberTreeNode* GetFirstNonPhantomChild(); - - /** - Removes recursively phantoms that have no children. - - The resulting tree has no phantoms that either have no children or - whose descendancy consist entirely of phantoms. - */ - void ClearObsoletePhantoms(); - - tSwNumberTreeChildren::const_iterator GetIterator(const SwNumberTreeNode * pChild) const; - - /** - Moves all children to a given destination node. - - @param pDest the destination node - */ - void MoveChildren(SwNumberTreeNode * pDest); - - /** Moves all children of this node that are greater than a given node - to the destination node. - - distinguish between node for comparing, whose children are greater, - and the destination node. - - @param _rCompareNode - input parameter - reference to the node, which is used to determine - the greater children - - @param _rDestNode - input parameter - reference to the node, which is the destination for - the greater children - */ - void MoveGreaterChildren( SwNumberTreeNode& _rCompareNode, - SwNumberTreeNode& _rDestNode ); - - /** - Returns the last descendant of a node, if it has children. - - @return last descendant of the node - */ - SwNumberTreeNode* GetLastDescendant() const; - -}; - -/** - Functor. Checks if a certain node is less than the functor's member. - */ -struct SwNumberTreeNodeIsLessThan -{ - const SwNumberTreeNode * pNode; - - SwNumberTreeNodeIsLessThan(const SwNumberTreeNode * _pNode) - : pNode(_pNode) {} - - bool operator()(const SwNumberTreeNode * _pNode) const - { return SwNumberTreeNodeLessThan(_pNode, pNode); } -}; -#endif // _SW_NUMBER_TREE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SwNumberTreeTypes.hxx b/sw/inc/SwNumberTreeTypes.hxx deleted file mode 100644 index 378d7f4b75..0000000000 --- a/sw/inc/SwNumberTreeTypes.hxx +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_NUMBER_TREE_TYPES_HXX -#define _SW_NUMBER_TREE_TYPES_HXX - -#include <vector> - -namespace SwNumberTree -{ - typedef long tSwNumTreeNumber; - typedef std::vector<tSwNumTreeNumber> tNumberVector; -} - -#endif // _SW_NUMBER_TREE_TYPES_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SwRewriter.hxx b/sw/inc/SwRewriter.hxx deleted file mode 100644 index efd81113ef..0000000000 --- a/sw/inc/SwRewriter.hxx +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_REWRITER_HXX -#define _SW_REWRITER_HXX - -#include <vector> -#include <tools/string.hxx> -#include <swdllapi.h> - -extern SW_DLLPUBLIC String const UNDO_ARG1; -extern SW_DLLPUBLIC String const UNDO_ARG2; -extern SW_DLLPUBLIC String const UNDO_ARG3; - -typedef std::pair<String, String> SwRewriteRule; - -class SW_DLLPUBLIC SwRewriter -{ - std::vector<SwRewriteRule> mRules; - -public: - SwRewriter(); - SwRewriter(const SwRewriter & rSrc); - ~SwRewriter(); - - void AddRule(const String & rWhat, const String & rWith); - - String Apply(const String & rStr) const; -}; - -#endif // _SW_REWRITER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SwSmartTagMgr.hxx b/sw/inc/SwSmartTagMgr.hxx deleted file mode 100644 index a2b4c47f4e..0000000000 --- a/sw/inc/SwSmartTagMgr.hxx +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWSMARTTAGMGR_HXX -#define _SWSMARTTAGMGR_HXX - -#include <svx/SmartTagMgr.hxx> - - -/************************************************************************* - * class SwSmartTagMgr - * - * Wrapper for the svx SmartTagMgr - *************************************************************************/ - -class SwSmartTagMgr : public SmartTagMgr -{ -private: - static SwSmartTagMgr* mpTheSwSmartTagMgr; - - SwSmartTagMgr( const rtl::OUString& rModuleName ); - virtual ~SwSmartTagMgr(); - -public: - static SwSmartTagMgr& Get(); - - // ::com::sun::star::util::XModifyListener - virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::util::XChangesListener - virtual void SAL_CALL changesOccurred( const ::com::sun::star::util::ChangesEvent& Event ) throw(::com::sun::star::uno::RuntimeException); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SwStyleNameMapper.hxx b/sw/inc/SwStyleNameMapper.hxx deleted file mode 100644 index 894621c31e..0000000000 --- a/sw/inc/SwStyleNameMapper.hxx +++ /dev/null @@ -1,207 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWSTYLENAMEMAPPER_HXX -#define _SWSTYLENAMEMAPPER_HXX - -#include <sal/types.h> -#include <tools/string.hxx> -#include <SwGetPoolIdFromName.hxx> -#include "swdllapi.h" - -#ifndef INCLUDED_HASH_MAP -#include <boost/unordered_map.hpp> -#define INCLUDED_HASH_MAP -#endif -#include <stringhash.hxx> - -/** This class holds all data about the names of styles used in the user - * interface (UI names...these are localised into different languages). - * These UI names are loaded from the resource files on demand. - * - * It also holds all information about the 'Programmatic' names of styles - * which remain static (and are hardcoded in the corresponding cxx file) - * for all languages. - * - * This class also provides static functions which can be used for the - * following conversions: - * - * 1. Programmatic Name -> UI Name - * 2. Programmatic Name -> Pool ID - * 3. UI Name -> Programmatic Name - * 4. UI Name -> Pool ID - * 5. Pool ID -> UI Name - * 6. Pool ID -> Programmatic Name - * - * The relationship of these tables to the style families is as follows: - * - * 1. Paragraph contains the Text, Lists, Extra, Register, Doc and HTML - * name arrays. - * 2. Character contains the ChrFmt and HTMLChrFmt name arrays. - * 3. Page contains the PageDesc name array. - * 4. Frame contains the FrmFmt name array. - * 5. Numbering Rule contains the NumRule name array. - */ - -/** - * There is a further complication that came to light later. If someone enters - * a user-defined style name which is the same as a programmatic name, this - * name clash must be handled. - * - * Therefore, when there is a danger of a nameclash, the boolean bDisambiguate - * must be set to true in the SwStyleNameMapper call (it defaults to false). - * This will cause the following to happen: - * - * If the UI style name either equals a programmatic name or already ends - * with " (user)", then it must append " (user)" to the end. - * - * When a programmatic name is being converted to a UI name, if it ends in - * " (user)", we simply remove it. - */ - -class SvStringsDtor; -class String; -struct SwTableEntry; - - -typedef ::boost::unordered_map < const String*, sal_uInt16, StringHash, StringEq > NameToIdHash; - -class SwStyleNameMapper -{ - friend void _InitCore(); - friend void _FinitCore(); - -protected: - // UI Name tables - static SvStringsDtor *pTextUINameArray, - *pListsUINameArray, - *pExtraUINameArray, - *pRegisterUINameArray, - *pDocUINameArray, - *pHTMLUINameArray, - *pFrmFmtUINameArray, - *pChrFmtUINameArray, - *pHTMLChrFmtUINameArray, - *pPageDescUINameArray, - *pNumRuleUINameArray, - // Programmatic Name tables - *pTextProgNameArray, - *pListsProgNameArray, - *pExtraProgNameArray, - *pRegisterProgNameArray, - *pDocProgNameArray, - *pHTMLProgNameArray, - *pFrmFmtProgNameArray, - *pChrFmtProgNameArray, - *pHTMLChrFmtProgNameArray, - *pPageDescProgNameArray, - *pNumRuleProgNameArray; - - static NameToIdHash *pParaUIMap, - *pCharUIMap, - *pPageUIMap, - *pFrameUIMap, - *pNumRuleUIMap, - - *pParaProgMap, - *pCharProgMap, - *pPageProgMap, - *pFrameProgMap, - *pNumRuleProgMap; - - static SvStringsDtor* NewUINameArray( SvStringsDtor*&, - sal_uInt16 nStt, - sal_uInt16 nEnd ); - - static SvStringsDtor* NewProgNameArray( SvStringsDtor*&, - const SwTableEntry *pTable, - sal_uInt8 nCount); - - static void fillNameFromId ( sal_uInt16 nId, String &rName, sal_Bool bProgName ); - static const String& getNameFromId ( sal_uInt16 nId, const String &rName, sal_Bool bProgName ); - static const NameToIdHash& getHashTable ( SwGetPoolIdFromName, sal_Bool bProgName ); - static sal_Bool SuffixIsUser ( const String & rString ); - static void CheckSuffixAndDelete ( String & rString ); - -public: - // This gets the UI Name from the programmatic name - static const String& GetUIName ( const String& rName, SwGetPoolIdFromName ); - static void FillUIName ( const String& rName, String& rFillName, SwGetPoolIdFromName, sal_Bool bDisambiguate = sal_False ); - - // Get the programmatic Name from the UI name - static const String& GetProgName ( const String& rName, SwGetPoolIdFromName ); - static void FillProgName ( const String& rName, String& rFillName, SwGetPoolIdFromName, sal_Bool bDisambiguate = sal_False ); - - // This gets the UI Name from the Pool ID - SW_DLLPUBLIC static void FillUIName ( sal_uInt16 nId, String& rFillName ); - SW_DLLPUBLIC static const String& GetUIName ( sal_uInt16 nId, const String& rName ); - - // This gets the programmatic Name from the Pool ID - static void FillProgName( sal_uInt16 nId, String& rFillName ); - SW_DLLPUBLIC static const String& GetProgName ( sal_uInt16 nId, const String& rName ); - - // This gets the PoolId from the UI Name - SW_DLLPUBLIC static sal_uInt16 GetPoolIdFromUIName( const String& rName, SwGetPoolIdFromName ); - - // Get the Pool ID from the programmatic name - static sal_uInt16 GetPoolIdFromProgName( const String& rName, SwGetPoolIdFromName ); - - // used to convert the 4 special ExtraProg/UINames for - // RES_POOLCOLL_LABEL_DRAWING, RES_POOLCOLL_LABEL_ABB, - // RES_POOLCOLL_LABEL_TABLE, RES_POOLCOLL_LABEL_FRAME - // forth and back. - // Non-matching names remain unchanged. - SW_DLLPUBLIC static const String GetSpecialExtraProgName( const String& rExtraUIName ); - static const String GetSpecialExtraUIName( const String& rExtraProgName ); - - static const SvStringsDtor& GetTextUINameArray(); - static const SvStringsDtor& GetListsUINameArray(); - static const SvStringsDtor& GetExtraUINameArray(); - static const SvStringsDtor& GetRegisterUINameArray(); - static const SvStringsDtor& GetDocUINameArray(); - static const SvStringsDtor& GetHTMLUINameArray(); - static const SvStringsDtor& GetFrmFmtUINameArray(); - static const SvStringsDtor& GetChrFmtUINameArray(); - static const SvStringsDtor& GetHTMLChrFmtUINameArray(); - static const SvStringsDtor& GetPageDescUINameArray(); - static const SvStringsDtor& GetNumRuleUINameArray(); - - static const SvStringsDtor& GetTextProgNameArray(); - static const SvStringsDtor& GetListsProgNameArray(); - static const SvStringsDtor& GetExtraProgNameArray(); - static const SvStringsDtor& GetRegisterProgNameArray(); - static const SvStringsDtor& GetDocProgNameArray(); - static const SvStringsDtor& GetHTMLProgNameArray(); - static const SvStringsDtor& GetFrmFmtProgNameArray(); - static const SvStringsDtor& GetChrFmtProgNameArray(); - static const SvStringsDtor& GetHTMLChrFmtProgNameArray(); - static const SvStringsDtor& GetPageDescProgNameArray(); - static const SvStringsDtor& GetNumRuleProgNameArray(); -}; -#endif // _NAME_MAPPER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx deleted file mode 100644 index a0610178f6..0000000000 --- a/sw/inc/SwUndoField.hxx +++ /dev/null @@ -1,96 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNDO_FIELD_HXX -#define SW_UNDO_FIELD_HXX - -#include <undobj.hxx> - -#include <com/sun/star/uno/Any.h> - - -class SwDoc; -class SwField; -class SwMsgPoolItem; - -class SwUndoField : public SwUndo -{ - sal_uLong nNodeIndex; - xub_StrLen nOffset; - -protected: - SwDoc * pDoc; - SwPosition GetPosition(); - -public: - SwUndoField(const SwPosition & rPos, SwUndoId nId = UNDO_FIELD ); - virtual ~SwUndoField(); -}; - -class SwUndoFieldFromDoc : public SwUndoField -{ - SwField * pOldField, * pNewField; - SwMsgPoolItem * pHnt; - sal_Bool bUpdate; - - void DoImpl(); - -public: - SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & aOldField, - const SwField & aNewField, - SwMsgPoolItem * pHnt, sal_Bool bUpdate, - SwUndoId nId = UNDO_FIELD ); - - virtual ~SwUndoFieldFromDoc(); - - virtual void UndoImpl( ::sw::UndoRedoContext & ); - virtual void RedoImpl( ::sw::UndoRedoContext & ); - virtual void RepeatImpl( ::sw::RepeatContext & ); -}; - -class SwUndoFieldFromAPI : public SwUndoField -{ - com::sun::star::uno::Any aOldVal, aNewVal; - sal_uInt16 nWhich; - - void DoImpl(); - -public: - SwUndoFieldFromAPI(const SwPosition & rPos, - const com::sun::star::uno::Any & rOldVal, - const com::sun::star::uno::Any & rNewVal, - sal_uInt16 nWhich); - virtual ~SwUndoFieldFromAPI(); - - virtual void UndoImpl( ::sw::UndoRedoContext & ); - virtual void RedoImpl( ::sw::UndoRedoContext & ); - virtual void RepeatImpl( ::sw::RepeatContext & ); -}; - -#endif // SW_UNDO_FIELD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/SwXMLSectionList.hxx b/sw/inc/SwXMLSectionList.hxx deleted file mode 100644 index 85cfcb4284..0000000000 --- a/sw/inc/SwXMLSectionList.hxx +++ /dev/null @@ -1,91 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_XMLSECTIONLIST_HXX -#define _SW_XMLSECTIONLIST_HXX - -#include <xmloff/xmlictxt.hxx> -#include <xmloff/xmlimp.hxx> - -class SvStrings; - -class SwXMLSectionList : public SvXMLImport -{ -protected: - // This method is called after the namespace map has been updated, but - // before a context for the current element has been pushed. - virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix, - const ::rtl::OUString& rLocalName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); -public: - SvStrings & rSectionList; - - SwXMLSectionList( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - SvStrings & rNewSectionList ); - - virtual ~SwXMLSectionList ( ) - throw(); -}; - -class SvXMLSectionListContext : public SvXMLImportContext -{ -private: - SwXMLSectionList & rLocalRef; -public: - SvXMLSectionListContext ( SwXMLSectionList& rImport, - sal_uInt16 nPrefix, - const rtl::OUString& rLocalName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, - const rtl::OUString& rLocalName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); - ~SvXMLSectionListContext ( void ); -}; - -class SvXMLIgnoreSectionListContext : public SvXMLImportContext -{ -private: - SwXMLSectionList & rLocalRef; -public: - SvXMLIgnoreSectionListContext ( SwXMLSectionList& rImport, - sal_uInt16 nPrefix, - const rtl::OUString& rLocalName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, - const rtl::OUString& rLocalName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); - ~SvXMLIgnoreSectionListContext ( void ); -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/TextCursorHelper.hxx b/sw/inc/TextCursorHelper.hxx deleted file mode 100644 index b5e511037d..0000000000 --- a/sw/inc/TextCursorHelper.hxx +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_TEXTCURSORHELPER_HXX -#define _SW_TEXTCURSORHELPER_HXX - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <cppuhelper/implbase1.hxx> - -class SwDoc; -class SwPaM; - -class OTextCursorHelper : public ::cppu::ImplHelper1< ::com::sun::star::lang::XUnoTunnel> -{ -public: - - OTextCursorHelper(){} - 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); - - virtual const SwPaM* GetPaM() const = 0; - virtual SwPaM* GetPaM() = 0; - virtual const SwDoc* GetDoc() const = 0; - virtual SwDoc* GetDoc() = 0; -}; - -#endif // _SW_TEXTCURSORHELPER_HXX - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc deleted file mode 100644 index 35ca0d763c..0000000000 --- a/sw/inc/access.hrc +++ /dev/null @@ -1,75 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _ACCESS_HRC -#define _ACCESS_HRC - -#include "rcid.hrc" - -#define STR_ACCESS_DOC_NAME (RC_ACCESS_BEGIN + 1) -#define STR_ACCESS_DOC_DESC (RC_ACCESS_BEGIN + 2) -#define STR_ACCESS_HEADING_WITH_NUM_DESC (RC_ACCESS_BEGIN + 3) -#define STR_ACCESS_HEADER_NAME (RC_ACCESS_BEGIN + 4) -#define STR_ACCESS_HEADER_DESC (RC_ACCESS_BEGIN + 5) -#define STR_ACCESS_FOOTER_NAME (RC_ACCESS_BEGIN + 6) -#define STR_ACCESS_FOOTER_DESC (RC_ACCESS_BEGIN + 7) -#define STR_ACCESS_FOOTNOTE_NAME (RC_ACCESS_BEGIN + 8) -#define STR_ACCESS_FOOTNOTE_DESC (RC_ACCESS_BEGIN + 9) -#define STR_ACCESS_ENDNOTE_NAME (RC_ACCESS_BEGIN + 10) -#define STR_ACCESS_ENDNOTE_DESC (RC_ACCESS_BEGIN + 11) -#define STR_ACCESS_REPLACEMENT_POSTIT (RC_ACCESS_BEGIN + 12) -#define STR_ACCESS_REPLACEMENT_FRAME (RC_ACCESS_BEGIN + 13) -#define STR_ACCESS_REPLACEMENT_BULLET_GRAPHICS (RC_ACCESS_BEGIN + 14) -#define STR_ACCESS_TABLE_DESC (RC_ACCESS_BEGIN + 15) -#define STR_ACCESS_PAGE_NAME (RC_ACCESS_BEGIN + 16) -#define STR_ACCESS_PAGE_DESC (RC_ACCESS_BEGIN + 17) -#define STR_ACCESS_ANNOTATION_AUTHOR_NAME (RC_ACCESS_BEGIN + 18) -#define STR_ACCESS_ANNOTATION_DATE_NAME (RC_ACCESS_BEGIN + 19) -#define STR_ACCESS_ANNOTATION_BUTTON_NAME (RC_ACCESS_BEGIN + 20) -#define STR_ACCESS_ANNOTATION_BUTTON_DESC (RC_ACCESS_BEGIN + 21) - -//IAccessibility2 Implementation 2009----- -#define STR_ACCESS_PREVIEW_DOC_NAME (RC_ACCESS_BEGIN + 22) -//#define STR_ACCESS_PREVIEW_DOC_DESC (RC_ACCESS_BEGIN + 23) -#define STR_ACCESS_PREVIEW_DOC_SUFFIX (RC_ACCESS_BEGIN + 24) -#define STR_ACCESS_DOC_WORDPROCESSING (RC_ACCESS_BEGIN + 25) -#define STR_ACCESS_DOC_WORDPROCESSING_READONLY (RC_ACCESS_BEGIN + 26) -#define STR_ACCESS_COLUMN_WIDTH (RC_ACCESS_BEGIN + 27) -#define STR_ACCESS_PAGESETUP_SPACING (RC_ACCESS_BEGIN + 28) -#define STR_ACCESS_SW_CATEGORY (RC_ACCESS_BEGIN + 29) -#define STR_ACCESS_TL_GLOBAL (RC_ACCESS_BEGIN + 30) -#define STR_ACCESS_TL_CONTENT (RC_ACCESS_BEGIN + 31) -//-----IAccessibility2 Implementation 2009 - -#define ACCESS_ACT_END STR_ACCESS_TL_CONTENT - -#if ACCESS_ACT_END > RC_ACCESS_END -#error Resource-Id Ueberlauf in #file, #line -#endif - - -#endif diff --git a/sw/inc/accessibilityoptions.hxx b/sw/inc/accessibilityoptions.hxx deleted file mode 100644 index 433656fa6b..0000000000 --- a/sw/inc/accessibilityoptions.hxx +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _ACCESSIBILITYOPTIONS_HXX -#define _ACCESSIBILITYOPTIONS_HXX - -#include <tools/solar.h> - -struct SwAccessibilityOptions -{ - sal_Bool bIsAlwaysAutoColor :1; - sal_Bool bIsStopAnimatedText :1; - sal_Bool bIsStopAnimatedGraphics :1; - - SwAccessibilityOptions() : - bIsAlwaysAutoColor(sal_False), - bIsStopAnimatedText(sal_False), - bIsStopAnimatedGraphics(sal_False) {} - - inline sal_Bool IsAlwaysAutoColor() const { return bIsAlwaysAutoColor; } - inline void SetAlwaysAutoColor( sal_Bool b ) { bIsAlwaysAutoColor = b; } - - inline sal_Bool IsStopAnimatedGraphics() const { return bIsStopAnimatedText;} - inline void SetStopAnimatedGraphics( sal_Bool b ) { bIsStopAnimatedText = b; } - - inline sal_Bool IsStopAnimatedText() const { return bIsStopAnimatedGraphics; } - inline void SetStopAnimatedText( sal_Bool b ) { bIsStopAnimatedGraphics = b;} -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx deleted file mode 100644 index 315ba24461..0000000000 --- a/sw/inc/accmap.hxx +++ /dev/null @@ -1,305 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _ACCMAP_HXX -#define _ACCMAP_HXX - -#include <cppuhelper/weakref.hxx> -#include <com/sun/star/accessibility/XAccessible.hpp> -#include <rtl/ref.hxx> -#include <osl/mutex.hxx> -#include <svx/IAccessibleViewForwarder.hxx> -#include <svx/IAccessibleParent.hxx> -#include <tools/fract.hxx> - -#include <vector> - -class ViewShell; -class Rectangle; -class SwFrm; -class SwTxtFrm; -class SwPageFrm; -class SwAccessibleContext; -class SwAccessibleContextMap_Impl; -class SwAccessibleEventList_Impl; -class SwAccessibleEventMap_Impl; -class SwShapeList_Impl; -class SdrObject; -namespace accessibility { - class AccessibleShape; -} -class SwAccessibleShapeMap_Impl; -struct SwAccessibleEvent_Impl; -class SwAccessibleSelectedParas_Impl; -class SwRect; -class MapMode; -class SwAccPreviewData; -struct PrevwPage; -class Window; - -// real states for events -#define ACC_STATE_EDITABLE 0x01 -#define ACC_STATE_OPAQUE 0x02 - -// pseudo states for events -#define ACC_STATE_TEXT_ATTRIBUTE_CHANGED 0x0200 -#define ACC_STATE_TEXT_SELECTION_CHANGED 0x0100 -#define ACC_STATE_CARET 0x80 -#define ACC_STATE_RELATION_FROM 0x40 -#define ACC_STATE_RELATION_TO 0x20 - -#define ACC_STATE_RELATION_MASK 0x60 - -#define ACC_STATE_MASK 0x1F - -typedef sal_uInt16 tAccessibleStates; - -class SwAccessibleMap : public accessibility::IAccessibleViewForwarder, - public accessibility::IAccessibleParent -{ - mutable ::osl::Mutex maMutex; - ::osl::Mutex maEventMutex; - SwAccessibleContextMap_Impl *mpFrmMap; - SwAccessibleShapeMap_Impl *mpShapeMap; - SwShapeList_Impl *mpShapes; - SwAccessibleEventList_Impl *mpEvents; - SwAccessibleEventMap_Impl *mpEventMap; - // #i27301 data structure to keep information about - // accessible paragraph, which have a selection. - SwAccessibleSelectedParas_Impl* mpSelectedParas; - ViewShell *mpVSh; - /// for page preview: store preview data, VisArea, and mapping of - /// preview-to-display coordinates - SwAccPreviewData* mpPreview; - - ::com::sun::star::uno::WeakReference < ::com::sun::star::accessibility::XAccessible > mxCursorContext; - - sal_Int32 mnPara; - sal_Int32 mnFootnote; - sal_Int32 mnEndnote; - - - sal_Bool mbShapeSelected; - - void FireEvent( const SwAccessibleEvent_Impl& rEvent ); - - void AppendEvent( const SwAccessibleEvent_Impl& rEvent ); - - void InvalidateCursorPosition( - const ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible>& rAcc ); - void DoInvalidateShapeSelection(); - void DoInvalidateShapeFocus(); - void InvalidateShapeSelection(); - - void _InvalidateRelationSet( const SwFrm* pFrm, sal_Bool bFrom ); - - ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible> - _GetDocumentView( sal_Bool bPagePreview ); - - /** method to build up a new data structure of the accessible pararaphs, - which have a selection - - Important note: method has to used inside a mutual exclusive section - - @author OD - */ - SwAccessibleSelectedParas_Impl* _BuildSelectedParas(); - -public: - - SwAccessibleMap( ViewShell *pSh ); - ~SwAccessibleMap(); - - ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible> GetDocumentView(); - - ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible> GetDocumentPreview( - const std::vector<PrevwPage*>& _rPrevwPages, - const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, - const Size& _rPrevwWinSize ); - - ::rtl::Reference < SwAccessibleContext > GetContextImpl( - const SwFrm *pFrm, - sal_Bool bCreate = sal_True ); - ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible> GetContext( - const SwFrm *pFrm, - sal_Bool bCreate = sal_True ); - - ::rtl::Reference < ::accessibility::AccessibleShape > GetContextImpl( - const SdrObject *pObj, - SwAccessibleContext *pParentImpl, - sal_Bool bCreate = sal_True ); - ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible> GetContext( - const SdrObject *pObj, - SwAccessibleContext *pParentImpl, - sal_Bool bCreate = sal_True ); - - inline ViewShell* GetShell() const - { - return mpVSh; - } - - const SwRect& GetVisArea() const; - - /** get size of a dedicated preview page - - @author OD - - @param _nPrevwPageNum - input parameter - physical page number of page visible in the page preview - - @return an object of class <Size> - */ - Size GetPreViewPageSize( sal_uInt16 _nPrevwPageNum ) const; - - void RemoveContext( const SwFrm *pFrm ); - void RemoveContext( const SdrObject *pObj ); - - // Dispose frame and its children if bRecursive is set - void Dispose( const SwFrm* pFrm, - const SdrObject* pObj, - Window* pWindow, - sal_Bool bRecursive = sal_False ); - - void InvalidatePosOrSize( const SwFrm* pFrm, - const SdrObject* pObj, - Window* pWindow, - const SwRect& rOldFrm ); - - void InvalidateContent( const SwFrm *pFrm ); - - void InvalidateAttr( const SwTxtFrm& rTxtFrm ); - - void InvalidateCursorPosition( const SwFrm *pFrm ); - void InvalidateFocus(); - - void SetCursorContext( - const ::rtl::Reference < SwAccessibleContext >& rCursorContext ); - - // Invalidate state of whole tree. If an action is open, this call - // is processed when the last action ends. - void InvalidateStates( tAccessibleStates _nStates, - const SwFrm* _pFrm = 0 ); - - void InvalidateRelationSet( const SwFrm* pMaster, const SwFrm* pFollow ); - - /** invalidation CONTENT_FLOWS_FROM/_TO relation of a paragraph - - @author OD - - @param _rTxtFrm - input parameter - reference to paragraph, whose CONTENT_FLOWS_FROM/_TO - has to be invalidated. - - @param _bFrom - input parameter - boolean indicating, if relation CONTENT_FLOWS_FROM - (value <true>) or CONTENT_FLOWS_TO (value <false>) has to be invalidated. - */ - void InvalidateParaFlowRelation( const SwTxtFrm& _rTxtFrm, - const bool _bFrom ); - - /** invalidation of text selection of a paragraph - - @author OD - */ - void InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm ); - - /** invalidation of text selection of all paragraphs - - @author OD - */ - void InvalidateTextSelectionOfAllParas(); - - sal_Int32 GetChildIndex( const SwFrm& rParentFrm, - Window& rChild ) const; - - // update preview data (and fire events if necessary) - void UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages, - const Fraction& _rScale, - const SwPageFrm* _pSelectedPageFrm, - const Size& _rPrevwWinSize ); - - void InvalidatePreViewSelection( sal_uInt16 nSelPage ); - sal_Bool IsPageSelected( const SwPageFrm *pPageFrm ) const; - - void FireEvents(); - - - // IAccessibleViewForwarder - - virtual sal_Bool IsValid() const; - virtual Rectangle GetVisibleArea() const; - virtual Point LogicToPixel (const Point& rPoint) const; - virtual Size LogicToPixel (const Size& rSize) const; - virtual Point PixelToLogic (const Point& rPoint) const; - virtual Size PixelToLogic (const Size& rSize) const; - - // IAccessibleParent - virtual sal_Bool ReplaceChild ( - ::accessibility::AccessibleShape* pCurrentChild, - const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _rxShape, - const long _nIndex, - const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo - ) throw (::com::sun::star::uno::RuntimeException); - - // additional Core/Pixel conversions for internal use; also works - // for preview - Point PixelToCore (const Point& rPoint) const; - Rectangle CoreToPixel (const Rectangle& rRect) const; - -private: - /** get mapping mode for LogicToPixel and PixelToLogic conversions - - Replacement method <PreviewAdjust(..)> by new method <GetMapMode>. - Method returns mapping mode of current output device and adjusts it, - if the shell is in page/print preview. - Necessary, because <PreviewAdjust(..)> changes mapping mode at current - output device for mapping logic document positions to page preview window - positions and vice versa and doesn't take care to recover its changes. - - @author OD - - @param _rPoint - input parameter - constant reference to point to determine the mapping - mode adjustments for page/print preview. - - @param _orMapMode - output parameter - reference to the mapping mode, which is determined - by the method - */ - void GetMapMode( const Point& _rPoint, - MapMode& _orMapMode ) const; -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx deleted file mode 100644 index 61e3c665c8..0000000000 --- a/sw/inc/acmplwrd.hxx +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _ACMPLWRD_HXX -#define _ACMPLWRD_HXX - - -#define _SVSTDARR_STRINGSISORTDTOR -#include <svl/svstdarr.hxx> - -class SwDoc; -class SwAutoCompleteWord_Impl; -class SwAutoCompleteClient; - -class SwAutoCompleteWord -{ - friend class SwAutoCompleteClient; - - SvStringsISortDtor aWordLst; // contains extended strings carrying source information - SvPtrarr aLRULst; - - SwAutoCompleteWord_Impl* pImpl; - sal_uInt16 nMaxCount, nMinWrdLen; - bool bLockWordLst; - - void DocumentDying(const SwDoc& rDoc); -public: - SwAutoCompleteWord( sal_uInt16 nWords = 500, sal_uInt16 nMWrdLen = 10 ); - ~SwAutoCompleteWord(); - - sal_Bool InsertWord( const String& rWord, SwDoc& rDoc ); - - sal_Bool GetRange( const String& rWord, sal_uInt16& rStt, sal_uInt16& rEnd ) const; - - const String& operator[]( sal_uInt16 n ) const { return *aWordLst[ n ]; } - - bool IsLockWordLstLocked() const { return bLockWordLst; } - void SetLockWordLstLocked( bool bFlag ) { bLockWordLst = bFlag; } - - void SetMaxCount( sal_uInt16 n ); - - sal_uInt16 GetMinWordLen() const { return nMinWrdLen; } - void SetMinWordLen( sal_uInt16 n ); - - const SvStringsISortDtor& GetWordList() const { return aWordLst; } - void CheckChangedList( const SvStringsISortDtor& rNewLst ); -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx deleted file mode 100644 index 85e3911c8c..0000000000 --- a/sw/inc/anchoreddrawobject.hxx +++ /dev/null @@ -1,204 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _ANCHOREDDRAWOBJECT_HXX -#define _ANCHOREDDRAWOBJECT_HXX - -#include <anchoredobject.hxx> -#include <tools/gen.hxx> - -/** class for the positioning of drawing objects - - @author OD -*/ -class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject -{ - private: - // boolean, indicating that the object position has been invalidated - // and that a positioning has to be performed. - bool mbValidPos; - - // rectangle, keeping the last object rectangle after the postioning - Rectangle* mpLastObjRect; - - // boolean, indicating that anchored drawing object hasn't been attached - // to a anchor frame yet. Once, it is attached to a anchor frame the - // boolean changes its state. - bool mbNotYetAttachedToAnchorFrame; - - // boolean, indicating that anchored - // drawing object hasn't been positioned yet. Once, it's positioned the - // boolean changes its state. - bool mbNotYetPositioned; - - // boolean, indicating that after change of layout direction the - // anchored drawing object has to be captured on the page, if it exceeds - // the left or right page margin. - // Needed for compatibility option <DoNotCaptureDrawObjsOnPage> - bool mbCaptureAfterLayoutDirChange; - - /** method for the intrinsic positioning of a at-paragraph|at-character - anchored drawing object - - helper method for method <MakeObjPos> - - @author OD - */ - void _MakeObjPosAnchoredAtPara(); - - /** method for the intrinsic positioning of a at-page|at-frame anchored - drawing object - - helper method for method <MakeObjPos> - - @author OD - */ - void _MakeObjPosAnchoredAtLayout(); - - /** method to set positioning attributes (not for as-character anchored) - - During load the positioning attributes aren't set. - Thus, the positioning attributes are set by the current object geometry. - This method is also used for the conversion for drawing objects - (not anchored as-character) imported from OpenOffice.org file format - once and directly before the first positioning. - - @author OD - */ - void _SetPositioningAttr(); - - /** method to set internal anchor position of <SdrObject> instance - of the drawing object - - For drawing objects the internal anchor position of the <SdrObject> - instance has to be set. - Note: This adjustment is not be done for as-character anchored - drawing object - the positioning code takes care of this. - #i31698# - API for drawing objects in Writer has - been adjusted. Thus, this method will only set the internal anchor - position of the <SdrObject> instance to the anchor position given - by its anchor frame. - - @author OD - */ - void _SetDrawObjAnchor(); - - /** method to invalidate the given page frame - - @author OD - */ - void _InvalidatePage( SwPageFrm* _pPageFrm ); - - protected: - virtual void ObjectAttachedToAnchorFrame(); - - /** method to assure that anchored object is registered at the correct - page frame - - @author OD - */ - virtual void RegisterAtCorrectPage(); - - virtual bool _SetObjTop( const SwTwips _nTop); - virtual bool _SetObjLeft( const SwTwips _nLeft); - - virtual const SwRect GetObjBoundRect() const; - - public: - TYPEINFO(); - - SwAnchoredDrawObject(); - virtual ~SwAnchoredDrawObject(); - - // declaration of pure virtual methods of base class <SwAnchoredObject> - virtual void MakeObjPos(); - virtual void InvalidateObjPos(); - inline bool IsValidPos() const - { - return mbValidPos; - } - - // accessors to the format - virtual SwFrmFmt& GetFrmFmt(); - virtual const SwFrmFmt& GetFrmFmt() const; - - // accessors to the object area and its position - virtual const SwRect GetObjRect() const; - // Return value can be NULL. - const Rectangle* GetLastObjRect() const; - - void SetLastObjRect( const Rectangle& _rNewObjRect ); - - /** adjust positioning and alignment attributes for new anchor frame - - Set horizontal and vertical position/alignment to manual position - relative to anchor frame area using the anchor position of the - new anchor frame and the current absolute drawing object position. - Note: For correct Undo/Redo method should only be called inside a - Undo-/Redo-action. - - @author OD - - @param <_pNewAnchorFrm> - input parameter - new anchor frame for the anchored object. - - @param <_pNewObjRect> - optional input parameter - proposed new object rectangle. If not - provided the current object rectangle is taken. - */ - void AdjustPositioningAttr( const SwFrm* _pNewAnchorFrm, - const SwRect* _pNewObjRect = 0L ); - - /** method to notify background of drawing object - - @author OD - */ - virtual void NotifyBackground( SwPageFrm* _pPageFrm, - const SwRect& _rRect, - PrepareHint _eHint ); - - inline bool NotYetPositioned() const - { - return mbNotYetPositioned; - } - - // change of layout direction needs to be tracked - // for setting <mbCaptureAfterLayoutDirChange>. - virtual void UpdateLayoutDir(); - bool IsOutsidePage() const; - - // new Loop control - void ValidateThis() { mbValidPos = true; } - - /** The element name to show in the XML dump. - */ - virtual const char* getElementName( ) { return "SwAnchoredDrawObject"; } -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx deleted file mode 100644 index 27fe59d322..0000000000 --- a/sw/inc/anchoredobject.hxx +++ /dev/null @@ -1,585 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _ANCHOREDOBJECT_HXX -#define _ANCHOREDOBJECT_HXX - -#include <tools/rtti.hxx> -#include <swtypes.hxx> -#include <swrect.hxx> -#include <libxml/xmlwriter.h> - -class SdrObject; -class SwFrm; -class SwLayoutFrm; -class SwTxtFrm; - -class SwPageFrm; -class SwObjPositioningInProgress; - -class SwFrmFmt; -class SwFmtAnchor; - -/** wrapper class for the positioning of Writer fly frames and drawing objects - - Purpose of this class is to provide a unified interface for the positioning - of Writer fly frames (derived classes of <SwFlyFrm>) and of drawing objects - (derived classes of <SwDrawFrm>). - - @author OD -*/ -class SW_DLLPUBLIC SwAnchoredObject -{ - private: - // drawing object representing the anchored object in the drawing layer - SdrObject* mpDrawObj; - // frame the object is anchored at - SwFrm* mpAnchorFrm; - // #i28701 - page frame the object is registered at - // note: no page frame for as-character anchored objects - SwPageFrm* mpPageFrm; - // current relative position (relative to anchor position of anchor frame) - Point maRelPos; - - // for to-character anchored objects: - // Last known anchor character retangle. - // Used to decide, if invalidation has to been performed, if anchor position - // has changed, and used to position object. - SwRect maLastCharRect; - - // for to-character anchored objects: - // Last known top of line, in which the anchor character is in. - // Used to decide, if invalidation has to been performed, if anchor position - // has changed, and used to position object. - SwTwips mnLastTopOfLine; - - // for to-paragraph and to-character anchored objects: - // Layout frame vertical position is orient at - typically its the upper - // of the anchor frame, but it could also by the upper of a follow or - // a following layout frame in the text flow. - const SwLayoutFrm* mpVertPosOrientFrm; - - // i#i28701 boolean, indicating that the object - // positioning algorithm is in progress. - bool mbPositioningInProgress; - - // Booleans needed for the layout process. - // Values only of relevance for to-paragraph and to-character anchored - // floating screen object, for whose the 'straight-forward positioning - // process are applied - // Otherwise value of <mbConsiderForTextWrap> is treated as <true>, - // value of <mbPositionLocked> is treated as <false> and - // value of <mbRestartLayoutProcess> is treated as <false>. - // i#35911 - add boolean <mbClearEnvironment> - // Indicates that due to its position and wrapping style its layout - // environment is cleared - all content is moved forward. - // Treated as <false>, if not the 'straight-forward positioning process" - // is applied. - bool mbConsiderForTextWrap; - bool mbPositionLocked; - // boolean needed to keep position of - // anchored object locked due to special object positioning for sections. - bool mbKeepPositionLockedForSection; - - bool mbRestartLayoutProcess; - bool mbClearedEnvironment; - - // i#i3317 - boolean, indicating that temporarly - // the wrapping style influence of the anchored object has to be - // considered during its positioning. - // This boolean is used, if compatibility option 'Consider wrapping style - // influence on object positioning' is OFF and a positioning loop is - // detected in method <SwFlyAtCntFrm::MakeAll()> or method - // <SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()>. - // The boolean is reset to <false>, when the layout process for a - // page frame starts - see class <NotifyLayoutOfPageInProgress>. - bool mbTmpConsiderWrapInfluence; - - mutable SwRect maObjRectWithSpaces; - mutable bool mbObjRectWithSpacesValid; - mutable SwRect maLastObjRect; - - /** method to indicate, that positioning of anchored object is in progress - - note: method is implemented empty - - @author OD - */ - friend class SwObjPositioningInProgress; - inline void SetPositioningInProgress( const bool _bPosInProgress ) - { - mbPositioningInProgress = _bPosInProgress; - } - - - /** check anchor character rectangle - - helper method for method <CheckCharRectAndTopOfLine()> - For to-character anchored Writer fly frames the member <maLastCharRect> - is updated. This is checked for change and depending on the applied - positioning, it's decided, if the Writer fly frame has to be invalidated. - improvement - add second parameter <_rAnchorCharFrm> - - @author OD - - @param _rAnch - input parameter - reference to anchor position - - @param _rAnchorCharFrm - input parameter - reference to the text frame containing the anchor - character. - */ - void _CheckCharRect( const SwFmtAnchor& _rAnch, - const SwTxtFrm& _rAnchorCharFrm ); - - /** check top of line - - helper method for method <CheckCharRectAndTopOfLine()> - For to-character anchored Writer fly frames the member <mnLastTopOfLine> - is updated. This is checked for change and depending on the applied - positioning, it's decided, if the Writer fly frame has to be invalidated. - - @author OD - - @param _rAnch - input parameter - reference to anchor position - - @param _rAnchorCharFrm - input parameter - reference to the text frame containing the anchor - character. - */ - void _CheckTopOfLine( const SwFmtAnchor& _rAnch, - const SwTxtFrm& _rAnchorCharFrm ); - - // method <lcl_HideObj(..)> sets needed data structure values for the - // object positioning - friend bool lcl_HideObj( const SwTxtFrm& _rFrm, - const RndStdIds _eAnchorType, - const xub_StrLen _nObjAnchorPos, - SwAnchoredObject* _pAnchoredObj ); - protected: - SwAnchoredObject(); - - void SetVertPosOrientFrm( const SwLayoutFrm& _rVertPosOrientFrm ); - - /** method to assure that anchored object is registered at the correct - page frame - - @author OD - */ - virtual void RegisterAtCorrectPage() = 0; - - /** method to indicate, that anchored object is attached to a anchor frame - - @author OD - */ - virtual void ObjectAttachedToAnchorFrame(); - - /** method to determine, if other anchored objects, also attached at - to the anchor frame, have to consider its wrap influence. - - @author OD - */ - bool ConsiderObjWrapInfluenceOfOtherObjs() const; - - /** method to apply temporary consideration of wrapping style influence - to the anchored objects, which are anchored at the same anchor frame - - @author OD - */ - void SetTmpConsiderWrapInfluenceOfOtherObjs( const bool bTmpConsiderWrapInfluence ); - - virtual bool _SetObjTop( const SwTwips _nTop) = 0; - virtual bool _SetObjLeft( const SwTwips _nLeft) = 0; - - virtual const SwRect GetObjBoundRect() const = 0; - public: - TYPEINFO(); - - virtual ~SwAnchoredObject(); - - // accessors to member <mpDrawObj> - void SetDrawObj( SdrObject& _rDrawObj ); - const SdrObject* GetDrawObj() const; - SdrObject* DrawObj(); - - // accessors to member <mpAnchorFrm> - const SwFrm* GetAnchorFrm() const; - SwFrm* AnchorFrm(); - void ChgAnchorFrm( SwFrm* _pNewAnchorFrm ); - /** determine anchor frame containing the anchor position - - the anchor frame, which is determined, is <mpAnchorFrm> - for an at-page, at-frame or at-paragraph anchored object - and the anchor character frame for an at-character and as-character - anchored object. - - @author OD - */ - SwFrm* GetAnchorFrmContainingAnchPos(); - - SwPageFrm* GetPageFrm(); - const SwPageFrm* GetPageFrm() const; - void SetPageFrm( SwPageFrm* _pNewPageFrm ); - - /** method to determine the page frame, on which the 'anchor' of - the given anchored object is. - - Adjust meaning of method and thus its name: If the anchored object - or its anchor isn't correctly inserted in the layout, no page frame - can be found. Thus, the return type changed to be a pointer and can - be NULL. - - @author OD - - @param _rAnchoredObj - input parameter - anchored object, for which the page frame of its - 'anchor' has to be determined. - - @return SwPageFrm& - page frame, the 'anchor' of the given anchored object is on - */ - SwPageFrm* FindPageFrmOfAnchor(); - - /** get frame, which contains the anchor character, if the object - is anchored at-character or as-character. - - @author OD - - @return SwTxtFrm* - text frame containing the anchor character. It's NULL, if the object - isn't anchored at-character resp. as-character. - */ - SwTxtFrm* FindAnchorCharFrm(); - - // accessors to data of position calculation: - // frame vertical position is orient at - inline const SwLayoutFrm* GetVertPosOrientFrm() const - { - return mpVertPosOrientFrm; - } - // method to clear member <mpVertPosOrientFrm> - inline void ClearVertPosOrientFrm() - { - mpVertPosOrientFrm = 0L; - } - - /** check anchor character rectangle and top of line - - For to-character anchored Writer fly frames the members <maLastCharRect> - and <maLastTopOfLine> are updated. These are checked for change and - depending on the applied positioning, it's decided, if the Writer fly - frame has to be invalidated. - - @author OD - - @param _bCheckForParaPorInf - input parameter - boolean indicating, if check on paragraph portion - information has to be done. - */ - void CheckCharRectAndTopOfLine( const bool _bCheckForParaPorInf = true ); - - // accessors to member <maLastCharRect> - const SwRect& GetLastCharRect() const; - SwTwips GetRelCharX( const SwFrm* pFrm ) const; - SwTwips GetRelCharY( const SwFrm* pFrm ) const; - void AddLastCharY( long nDiff ); - void ResetLastCharRectHeight(); - - // accessor to member <nmLastTopOfLine> - SwTwips GetLastTopOfLine() const; - void AddLastTopOfLineY( SwTwips _nDiff ); - - /** reset members <maLastCharRect> and <mnLastTopOfLine> - - @author OD - */ - void ClearCharRectAndTopOfLine(); - - /** method to determine position for the object and set the position - at the object - - @author OD - */ - virtual void MakeObjPos() = 0; - - /** is positioning of anchored object in progress - - @author OD - */ - inline bool IsPositioningInProgress() const - { - return mbPositioningInProgress; - } - - /** method to determine, if invalidation of position is allowed - - @author OD - */ - bool InvalidationOfPosAllowed() const; - - /** method to invalidate position of the anchored object - - @author OD - */ - virtual void InvalidateObjPos() = 0; - - /** method to perform necessary invalidations for the positioning of - objects, for whose the wrapping style influence has to be considered - on the object positioning. - - @author OD - */ - void InvalidateObjPosForConsiderWrapInfluence( const bool _bNotifyBackgrd ); - - /** method to trigger notification of 'background' - - @author OD - */ - virtual void NotifyBackground( SwPageFrm* _pPageFrm, - const SwRect& _rRect, - PrepareHint _eHint ) = 0; - - // accessors to the current relative position (relative to anchor - // position of anchor frame) - const Point GetCurrRelPos() const; - void SetCurrRelPos( Point _aRelPos ); - - // accessors to the format - virtual SwFrmFmt& GetFrmFmt() = 0; - virtual const SwFrmFmt& GetFrmFmt() const = 0; - - // accessors to the object area and its position - virtual const SwRect GetObjRect() const = 0; - - void SetObjTop( const SwTwips _nTop); - void SetObjLeft( const SwTwips _nLeft); - - /** method update layout direction the layout direction, the anchored - object is assigned to - - method has typically to be called, if the anchored object gets its - anchor frame assigned and if the anchor frame changes its layout direction - - @author OD - */ - virtual void UpdateLayoutDir(); - - /** method to determine object area inclusive its spacing - - @author OD - */ - const SwRect& GetObjRectWithSpaces() const; - - inline void InvalidateObjRectWithSpaces() const - { - mbObjRectWithSpacesValid = false; - } - - /** method to determine, if wrapping style influence of the anchored - object has to be considered on the object positioning - - Note: result of this method also decides, if the boolean for the - layout process are of relevance. - - @author OD - */ - bool ConsiderObjWrapInfluenceOnObjPos() const; - - // accessors to booleans for layout process - bool ConsiderForTextWrap() const; - void SetConsiderForTextWrap( const bool _bConsiderForTextWrap ); - bool PositionLocked() const; - inline void LockPosition() - { - mbPositionLocked = true; - } - inline void UnlockPosition() - { - if ( !mbKeepPositionLockedForSection ) - { - mbPositionLocked = false; - } - } - - inline void SetKeepPosLocked( const bool _bKeepPosLocked ) - { - mbKeepPositionLockedForSection = _bKeepPosLocked; - } - - bool RestartLayoutProcess() const; - void SetRestartLayoutProcess( const bool _bRestartLayoutProcess ); - // accessors for <mbClearedEnvironment> - bool ClearedEnvironment() const; - void SetClearedEnvironment( const bool _bClearedEnvironment ); - - // reset booleans for layout process - inline void ResetLayoutProcessBools() - { - mbPositioningInProgress = false; - mbConsiderForTextWrap = false; - mbPositionLocked = false; - mbKeepPositionLockedForSection = false; - mbRestartLayoutProcess = false; - mbClearedEnvironment = false; - mbTmpConsiderWrapInfluence = false; - } - - /** method to determine, if due to anchored object size and wrapping - style, its layout environment is cleared. - - @author OD - */ - bool HasClearedEnvironment() const; - - /** method to update anchored object in the <SwSortedObjs> lists - - Method is not proposed to be called during a layout process is - running. It has been used on the change of the anchored object - attributes, which belongs the sort criteria of <SwSortedObjs>. - If document compatibility option 'Consider wrapping style influence - on object positioning' is ON, additionally all anchored objects - at the anchor frame and all following anchored objects on the page - frame are invalidated. - - @author OD - */ - void UpdateObjInSortedList(); - - /** method to determine, if a format on the anchored object is possible - - A format isn't possible, if anchored object is in an invisible layer. - Note: method is virtual to refine the conditions for the sub-classes. - - @author OD - */ - virtual bool IsFormatPossible() const; - - // accessors to member <mbTmpConsiderWrapInfluence> - void SetTmpConsiderWrapInfluence( const bool _bTmpConsiderWrapInfluence ); - bool IsTmpConsiderWrapInfluence() const; - - /** method to determine, if the anchored object is overlapping with a - previous column - - overlapping with a previous column means, that the object overlaps - with a column, which is a previous one of the column its anchor - frame is in. - Only applied for at-paragraph and at-character anchored objects. - - @author OD - */ - bool OverlapsPrevColumn() const; - - /** method to determine position of anchored object relative to - anchor frame - - Usage: Needed layout information for WW8 export - - @author OD - - @return Point - determined relative position - */ - Point GetRelPosToAnchorFrm() const; - - /** method to determine position of anchored object relative to - page frame - - Usage: Needed layout information for WW8 export - - If <_bFollowTextFlow> is set and object is anchored inside table, - the position relative to the table cell is determined. Output - parameter <_obRelToTableCell> reflects this situation - - @author OD - - @param _bFollowTextFlow - input parameter - boolean indicating, if the anchored object has to - follow the text flow. - - @param _obRelToTableCell - output parameter - boolean indicating, the determine position is - relative to the table cell - - @return Point - determined relative position - */ - Point GetRelPosToPageFrm( const bool _bFollowTextFlow, - bool& _obRelToTableCell ) const; - - /** method to determine position of anchored object relative to - anchor character - - Usage: Needed layout information for WW8 export - - @author OD - - @return Point - determined relative position - */ - Point GetRelPosToChar() const; - - /** method to determine position of anchored object relative to - top of line - - Usage: Needed layout information for WW8 export - - @author OD - - @return Point - determined relative position - */ - Point GetRelPosToLine() const; - - /** Dump a bunch of useful data to an XML representation to ease - layout understanding, debugging and testing. - */ - virtual void dumpAsXml( xmlTextWriterPtr pWriter ); - - /** The element name to show in the XML dump. - */ - virtual const char* getElementName( ) { return "SwAnchoredObject"; } -}; - -// ============================================================================ -// helper class for notify that positioning of an anchored object is in progress -// ============================================================================ -class SwObjPositioningInProgress -{ - private: - SwAnchoredObject* mpAnchoredObj; - // boolean indicating old state - // of anchored object regarding positioning in progress in order to - // consider nested usage of class <SwObjPositioningInProgress> - bool mbOldObjPositioningInProgress; - - public: - SwObjPositioningInProgress( SdrObject& _rSdrObj ); - SwObjPositioningInProgress( SwAnchoredObject& _rAnchoredObj ); - ~SwObjPositioningInProgress(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx deleted file mode 100644 index 1a1830f335..0000000000 --- a/sw/inc/authfld.hxx +++ /dev/null @@ -1,198 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_AUTHFLD_HXX -#define SW_AUTHFLD_HXX - -#include "swdllapi.h" -#include <fldbas.hxx> -#include <toxe.hxx> -#include <vector> - -class SwAuthDataArr; - -class SwAuthEntry -{ - String aAuthFields[AUTH_FIELD_END]; - sal_uInt16 nRefCount; -public: - SwAuthEntry() : nRefCount(0){} - SwAuthEntry( const SwAuthEntry& rCopy ); - sal_Bool operator==(const SwAuthEntry& rComp); - - inline const String& GetAuthorField(ToxAuthorityField ePos)const; - inline void SetAuthorField(ToxAuthorityField ePos, - const String& rField); - - void AddRef() { ++nRefCount; } - void RemoveRef() { --nRefCount; } - sal_uInt16 GetRefCount() { return nRefCount; } -}; - -struct SwTOXSortKey -{ - ToxAuthorityField eField; - sal_Bool bSortAscending; - SwTOXSortKey() : - eField(AUTH_FIELD_END), - bSortAscending(sal_True){} -}; - -class SwAuthorityField; -class SortKeyArr; - -class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType -{ - SwDoc* m_pDoc; - SwAuthDataArr* m_pDataArr; - std::vector<long> m_SequArr; - SortKeyArr* m_pSortKeyArr; - sal_Unicode m_cPrefix; - sal_Unicode m_cSuffix; - sal_Bool m_bIsSequence :1; - sal_Bool m_bSortByDocument :1; - LanguageType m_eLanguage; - String m_sSortAlgorithm; - - // @@@ private copy assignment, but public copy ctor? @@@ - const SwAuthorityFieldType& operator=( const SwAuthorityFieldType& ); - -protected: -virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ); - -public: - SwAuthorityFieldType(SwDoc* pDoc); - SwAuthorityFieldType( const SwAuthorityFieldType& ); - ~SwAuthorityFieldType(); - - virtual SwFieldType* Copy() const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ); - - inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; } - SwDoc* GetDoc(){ return m_pDoc; } - void RemoveField(long nHandle); - long AddField(const String& rFieldContents); - sal_Bool AddField(long nHandle); - void DelSequenceArray() - { - m_SequArr.clear(); - } - - const SwAuthEntry* GetEntryByHandle(long nHandle) const; - - void GetAllEntryIdentifiers( SvStringsDtor& rToFill )const; - const SwAuthEntry* GetEntryByIdentifier(const String& rIdentifier)const; - - bool ChangeEntryContent(const SwAuthEntry* pNewEntry); - // import interface - sal_uInt16 AppendField(const SwAuthEntry& rInsert); - long GetHandle(sal_uInt16 nPos); - - sal_uInt16 GetSequencePos(long nHandle); - - sal_Bool IsSequence() const {return m_bIsSequence;} - void SetSequence(sal_Bool bSet) - { - DelSequenceArray(); - m_bIsSequence = bSet; - } - - void SetPreSuffix( sal_Unicode cPre, sal_Unicode cSuf) - { - m_cPrefix = cPre; - m_cSuffix = cSuf; - } - sal_Unicode GetPrefix() const { return m_cPrefix;} - sal_Unicode GetSuffix() const { return m_cSuffix;} - - sal_Bool IsSortByDocument() const {return m_bSortByDocument;} - void SetSortByDocument(sal_Bool bSet) - { - DelSequenceArray(); - m_bSortByDocument = bSet; - } - - sal_uInt16 GetSortKeyCount() const ; - const SwTOXSortKey* GetSortKey(sal_uInt16 nIdx) const ; - void SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey nKeys[]); - - //initui.cxx - static const String& GetAuthFieldName(ToxAuthorityField eType); - static const String& GetAuthTypeName(ToxAuthorityType eType); - - LanguageType GetLanguage() const {return m_eLanguage;} - void SetLanguage(LanguageType nLang) {m_eLanguage = nLang;} - - const String& GetSortAlgorithm()const {return m_sSortAlgorithm;} - void SetSortAlgorithm(const String& rSet) {m_sSortAlgorithm = rSet;} - -}; - -class SwAuthorityField : public SwField -{ - long m_nHandle; - mutable long m_nTempSequencePos; - - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - SwAuthorityField(SwAuthorityFieldType* pType, const String& rFieldContents); - SwAuthorityField(SwAuthorityFieldType* pType, long nHandle); - ~SwAuthorityField(); - - const String& GetFieldText(ToxAuthorityField eField) const; - - virtual void SetPar1(const String& rStr); - virtual SwFieldType* ChgTyp( SwFieldType* ); - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ); - - long GetHandle() const { return m_nHandle; } - - virtual String GetDescription() const; -}; - -// --- inlines ----------------------------------------------------------- -inline const String& SwAuthEntry::GetAuthorField(ToxAuthorityField ePos)const -{ - OSL_ENSURE(AUTH_FIELD_END > ePos, "wrong index"); - return aAuthFields[ePos]; -} -inline void SwAuthEntry::SetAuthorField(ToxAuthorityField ePos, const String& rField) -{ - OSL_ENSURE(AUTH_FIELD_END > ePos, "wrong index"); - if(AUTH_FIELD_END > ePos) - aAuthFields[ePos] = rField; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/authratr.hxx b/sw/inc/authratr.hxx deleted file mode 100644 index c4d670f8e3..0000000000 --- a/sw/inc/authratr.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _AUTHRATR_HXX -#define _AUTHRATR_HXX - -#include <tools/solar.h> -#include <tools/color.hxx> -#include "swdllapi.h" - -#define COL_NONE TRGB_COLORDATA( 0x80, 0xFF, 0xFF, 0xFF ) - -class SW_DLLPUBLIC AuthorCharAttr -{ -public: - sal_uInt16 nItemId; - sal_uInt16 nAttr; - ColorData nColor; - - AuthorCharAttr(); - - inline sal_Bool operator == ( const AuthorCharAttr& rAttr ) const - { - return nItemId == rAttr.nItemId && nAttr == rAttr.nAttr && - nColor == rAttr.nColor; - } -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx deleted file mode 100644 index 9cd9f1e515..0000000000 --- a/sw/inc/bparr.hxx +++ /dev/null @@ -1,128 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _BPARR_HXX -#define _BPARR_HXX - -#include <tools/solar.h> -#include <osl/diagnose.h> -#include <swdllapi.h> - -struct BlockInfo; -class BigPtrArray; - -class BigPtrEntry -{ - friend class BigPtrArray; - BlockInfo* pBlock; - sal_uInt16 nOffset; -public: - virtual ~BigPtrEntry() {} -protected: - BigPtrEntry() : pBlock(0), nOffset(0) {} - - inline sal_uLong GetPos() const; - inline BigPtrArray& GetArray() const; -}; -typedef BigPtrEntry* ElementPtr; - - -typedef sal_Bool (*FnForEach)( const ElementPtr&, void* pArgs ); - -// 1000 entries per Block = a bit less then 4K -#define MAXENTRY 1000 - - -// number of entries that may remain free during compression -// this value is for the worst case; because we defined MAXBLOCK with ca 25% -// overhead, 80% = 800 entries are enough -// if complete compression is desired, 100 has to be specified -#define COMPRESSLVL 80 - -struct BlockInfo { // block info: - BigPtrArray* pBigArr; // in this array the block is located - ElementPtr* pData; // data block - sal_uLong nStart, nEnd; // start- and end index - sal_uInt16 nElem; // number of elements -}; - -class SW_DLLPUBLIC BigPtrArray -{ - BlockInfo** ppInf; // block info - sal_uLong nSize; // number of elements - sal_uInt16 nMaxBlock; // current max. number of blocks - sal_uInt16 nBlock; // number of blocks - sal_uInt16 nCur; // last block - - sal_uInt16 Index2Block( sal_uLong ) const; // block search - BlockInfo* InsBlock( sal_uInt16 ); // insert block - void BlockDel( sal_uInt16 ); // some blocks were deleted - void UpdIndex( sal_uInt16 ); // recalculate indices - -protected: - // fill all blocks - // the short parameter specifies in percent, how full the blocks should be - // made - sal_uInt16 Compress( short = COMPRESSLVL ); - -public: - BigPtrArray(); - ~BigPtrArray(); - - sal_uLong Count() const { return nSize; } - - void Insert( const ElementPtr& r, sal_uLong pos ); - void Remove( sal_uLong pos, sal_uLong n = 1 ); - void Move( sal_uLong from, sal_uLong to ); - void Replace( sal_uLong pos, const ElementPtr& r); - - ElementPtr operator[]( sal_uLong ) const; - void ForEach( FnForEach fn, void* pArgs = NULL ) - { - ForEach( 0, nSize, fn, pArgs ); - } - void ForEach( sal_uLong nStart, sal_uLong nEnd, FnForEach fn, void* pArgs = NULL ); -}; - - - -inline sal_uLong BigPtrEntry::GetPos() const -{ - OSL_ENSURE( this == pBlock->pData[ nOffset ], "element not in the block" ); - return pBlock->nStart + nOffset; -} - -inline BigPtrArray& BigPtrEntry::GetArray() const -{ - return *pBlock->pBigArr; -} - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx deleted file mode 100644 index 8f2ceb52cb..0000000000 --- a/sw/inc/breakit.hxx +++ /dev/null @@ -1,124 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _BREAKIT_HXX -#define _BREAKIT_HXX - -#include <tools/solar.h> -#include <i18npool/lang.h> -#include <com/sun/star/uno/Reference.h> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/i18n/XBreakIterator.hpp> -#include <com/sun/star/i18n/XScriptTypeDetector.hpp> -#include <com/sun/star/i18n/ForbiddenCharacters.hdl> -#include <swdllapi.h> - -class String; - -/************************************************************************* - * class SwBreakIt - *************************************************************************/ - - -class SW_DLLPUBLIC SwBreakIt -{ - com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF; - mutable com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > xBreak; - com::sun::star::uno::Reference< com::sun::star::i18n::XScriptTypeDetector > xCTLDetect; - - - com::sun::star::lang::Locale * m_pLocale; - com::sun::star::i18n::ForbiddenCharacters * m_pForbidden; - - LanguageType aLast; // language of the current locale - LanguageType aForbiddenLang; // language of the current forbiddenChar struct - - void _GetLocale( const LanguageType aLang ); - void _GetForbidden( const LanguageType aLang ); - - void createBreakIterator() const; - void createScriptTypeDetector(); - - // forbidden and not implemented. - SwBreakIt(); - SwBreakIt( const SwBreakIt &); - SwBreakIt & operator= ( const SwBreakIt &); - - // private (see @ _Create, _Delete). - explicit SwBreakIt( - const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rxMSF); - ~SwBreakIt(); - -public: - // private (see @ source/core/bastyp/init.cxx). - static void _Create( - const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rxMSF); - static void _Delete(); - -public: - static SwBreakIt * Get(); - - com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > GetBreakIter() - { - createBreakIterator(); - return xBreak; - } - - com::sun::star::uno::Reference< com::sun::star::i18n::XScriptTypeDetector > GetScriptTypeDetector() - { - createScriptTypeDetector(); - return xCTLDetect; - } - - const com::sun::star::lang::Locale& GetLocale( const LanguageType aLang ) - { - if( !m_pLocale || aLast != aLang ) - _GetLocale( aLang ); - return *m_pLocale; - } - - const com::sun::star::i18n::ForbiddenCharacters& GetForbidden( const LanguageType aLang ) - { - if( !m_pForbidden || aForbiddenLang != aLang ) - _GetForbidden( aLang ); - return *m_pForbidden; - } - - sal_uInt16 GetRealScriptOfText( const String& rTxt, xub_StrLen nPos ) const; - sal_uInt16 GetAllScriptsOfText( const String& rTxt ) const; -}; - -#define SW_BREAKITER() SwBreakIt::Get() -#define SW_XBREAKITER() SW_BREAKITER()->GetBreakIter() - -// @@@ backward compatibility @@@ -SW_DLLPUBLIC extern SwBreakIt* pBreakIt; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx deleted file mode 100644 index eab502e68f..0000000000 --- a/sw/inc/calbck.hxx +++ /dev/null @@ -1,263 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CALBCK_HXX -#define _CALBCK_HXX - -#include <tools/rtti.hxx> -#include "swdllapi.h" -#include <boost/noncopyable.hpp> - -class SwModify; -class SwClientIter; -class SfxPoolItem; -class SfxHint; - -/* - SwModify and SwClient cooperate in propagating attribute changes. - If an attribute changes, the change is notified to all dependent - formats and other interested objects, e.g. Nodes. The clients will detect - if the change affects them. It could be that the changed attribute is - overruled in the receiving object so that its change does not become - effective or that the receiver is not interested in the particular attribute - in general (though probably in other attributes of the SwModify object they - are registered in). - As SwModify objects are derived from SwClient, they can create a chain of SwClient - objects where changes can get propagated through. - Each SwClient can be registered at only one SwModify object, while each SwModify - object is connected to a list of SwClient objects. If an object derived from SwClient - wants to get notifications from more than one SwModify object, it must create additional - SwClient objects. The SwDepend class allows to handle their notifications in the same - notification callback as it forwards the Modify() calls it receives to a "master" - SwClient implementation. - The SwClientIter class allows to iterate over the SwClient objects registered at an - SwModify. For historical reasons its ability to use TypeInfo to restrict this iteration - to objects of a particular type created a lot of code that misuses SwClient-SwModify - relationships that basically should be used only for Modify() callbacks. - This is still subject to refactoring. - Until this gets resolved, new SwClientIter base code should be reduced to the absolute - minimum and it also should be wrapped by SwIterator templates that prevent that the - code gets polluted by pointer casts (see switerator.hxx). - */ - -// ---------- -// SwClient -// ---------- - -class SW_DLLPUBLIC SwClient : ::boost::noncopyable -{ - // avoids making the details of the linked list and the callback method public - friend class SwModify; - friend class SwClientIter; - - SwClient *pLeft, *pRight; // double-linked list of other clients - SwModify *pRegisteredIn; // event source - - // in general clients should not be removed when their SwModify sends out Modify() - // notifications; in some rare cases this is necessary, but only the concrete SwClient - // sub class will know that; this flag allows to make that known - bool mbIsAllowedToBeRemovedInModifyCall; - - // callbacks received from SwModify (friend class - so these methods can be private) - // should be called only from SwModify the client is registered in - // mba: IMHO these methods should be pure virtual - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint ); - -protected: - // single argument ctors shall be explicit. - explicit SwClient(SwModify *pToRegisterIn); - - // write access to pRegisteredIn shall be granted only to the object itself (protected access) - SwModify* GetRegisteredInNonConst() const { return pRegisteredIn; } - void SetIsAllowedToBeRemovedInModifyCall( bool bSet ) { mbIsAllowedToBeRemovedInModifyCall = bSet; } - -public: - - inline SwClient(); - virtual ~SwClient(); - - // in case an SwModify object is destroyed that itself is registered in another SwModify, - // its SwClient objects can decide to get registered to the latter instead by calling this method - void CheckRegistration( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue ); - - // controlled access to Modify method - // mba: this is still considered a hack and it should be fixed; the name makes grep-ing easier - void ModifyNotification( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue ) { Modify ( pOldValue, pNewValue ); } - void SwClientNotifyCall( const SwModify& rModify, const SfxHint& rHint ) { SwClientNotify( rModify, rHint ); } - - const SwModify* GetRegisteredIn() const { return pRegisteredIn; } - bool IsLast() const { return !pLeft && !pRight; } - - // needed for class SwClientIter - TYPEINFO(); - - // get information about attribute - virtual sal_Bool GetInfo( SfxPoolItem& ) const; -}; - -inline SwClient::SwClient() : - pLeft(0), pRight(0), pRegisteredIn(0), mbIsAllowedToBeRemovedInModifyCall(false) -{} - -// ---------- -// SwModify -// ---------- - -// class has a doubly linked list for dependencies -class SW_DLLPUBLIC SwModify: public SwClient -{ - SwClient* pRoot; // the start of the linked list of clients - sal_Bool bModifyLocked : 1; // don't broadcast changes now - sal_Bool bLockClientList : 1; // may be set when this instance notifies its clients - sal_Bool bInDocDTOR : 1; // workaround for problems when a lot of objects are destroyed - sal_Bool bInCache : 1; - sal_Bool bInSwFntCache : 1; - - // mba: IMHO this method should be pure virtual - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - SwModify(); - - // broadcasting: send notifications to all clients - void NotifyClients( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue ); - - // the same, but without setting bModifyLocked or checking for any of the flags - // mba: it would be interesting to know why this is necessary - // also allows to limit callback to certain type (HACK) - void ModifyBroadcast( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, TypeId nType = TYPE(SwClient) ); - - // a more universal broadcasting mechanism - void CallSwClientNotify( const SfxHint& rHint ) const; - - // single argument ctors shall be explicit. - explicit SwModify( SwModify *pToRegisterIn ); - virtual ~SwModify(); - - void Add(SwClient *pDepend); - SwClient* Remove(SwClient *pDepend); - const SwClient* GetDepends() const { return pRoot; } - - // get information about attribute - virtual sal_Bool GetInfo( SfxPoolItem& ) const; - - void LockModify() { bModifyLocked = sal_True; } - void UnlockModify() { bModifyLocked = sal_False; } - void SetInCache( sal_Bool bNew ) { bInCache = bNew; } - void SetInSwFntCache( sal_Bool bNew ) { bInSwFntCache = bNew; } - void SetInDocDTOR() { bInDocDTOR = sal_True; } - sal_Bool IsModifyLocked() const { return bModifyLocked; } - sal_Bool IsInDocDTOR() const { return bInDocDTOR; } - sal_Bool IsInCache() const { return bInCache; } - sal_Bool IsInSwFntCache() const { return bInSwFntCache; } - - void CheckCaching( const sal_uInt16 nWhich ); - bool IsLastDepend() { return pRoot && pRoot->IsLast(); } - int GetClientCount() const; -}; - -// ---------- -// SwDepend -// ---------- - -/* - * Helper class for objects that need to depend on more than one SwClient - */ -class SW_DLLPUBLIC SwDepend: public SwClient -{ - SwClient *pToTell; - -public: - SwDepend() : pToTell(0) {} - SwDepend(SwClient *pTellHim, SwModify *pDepend); - - SwClient* GetToTell() { return pToTell; } - - // get Client information - virtual sal_Bool GetInfo( SfxPoolItem & ) const; - -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue ); - virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint ); -}; - - -class SwClientIter -{ - friend SwClient* SwModify::Remove(SwClient *); // for pointer adjustments - friend void SwModify::Add(SwClient *pDepend); // for pointer adjustments - - const SwModify& rRoot; - - // the current object in an iteration - SwClient* pAct; - - // in case the current object is already removed, the next object in the list - // is marked down to become the current object in the next step - // this is necessary because iteration requires access to members of the current object - SwClient* pDelNext; - - // SwClientIter objects are tracked in linked list so that they can react - // when the current (pAct) or marked down (pDelNext) SwClient is removed - // from its SwModify - SwClientIter *pNxtIter; - - // iterator can be limited to return only SwClient objects of a certain type - TypeId aSrchId; - -public: - SW_DLLPUBLIC SwClientIter( const SwModify& ); - SW_DLLPUBLIC ~SwClientIter(); - - const SwModify& GetModify() const { return rRoot; } - - SwClient* operator++(int); - SwClient* GoStart(); - SwClient* GoEnd(); - - // returns the current SwClient object; - // in case this was already removed, the object marked down to become - // the next current one is returned - SwClient* operator()() const - { return pDelNext == pAct ? pAct : pDelNext; } - - // return "true" if an object was removed from a client chain in iteration - // adding objects to a client chain in iteration is forbidden - // SwModify::Add() asserts this - bool IsChanged() const { return pDelNext != pAct; } - - SW_DLLPUBLIC SwClient* First( TypeId nType ); - SW_DLLPUBLIC SwClient* Next(); - SW_DLLPUBLIC SwClient* Last( TypeId nType ); - SW_DLLPUBLIC SwClient* Previous(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx deleted file mode 100644 index fb512181cc..0000000000 --- a/sw/inc/calc.hxx +++ /dev/null @@ -1,242 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CALC_HXX -#define _CALC_HXX - -#include <svl/svarray.hxx> -#include <unotools/syslocale.hxx> - -#ifndef __SBX_SBXVALUE //autogen -#include <basic/sbxvar.hxx> -#endif -#include "swdllapi.h" - -class CharClass; -class LocaleDataWrapper; -class SwFieldType; -class SwDoc; - -#define TBLSZ 47 // should be a prime, because of hash table - -const sal_Unicode cListDelim = '|'; - -/****************************************************************************** - * Calculate Operations - ******************************************************************************/ -enum SwCalcOper -{ - CALC_NAME, CALC_NUMBER, CALC_ENDCALC, - CALC_PLUS='+', CALC_MINUS='-', CALC_MUL='*', - CALC_DIV='/', CALC_PRINT=';', CALC_ASSIGN='=', - CALC_LP='(', CALC_RP=')', CALC_PHD='%', - CALC_POW='^', - CALC_LISTOP = cListDelim, - CALC_NOT=256, CALC_AND=257, CALC_OR=258, - CALC_XOR=259, CALC_EQ=260, CALC_NEQ=261, - CALC_LEQ=262, CALC_GEQ=263, CALC_LES=264, - CALC_GRE=265, CALC_SUM=266, CALC_MEAN=267, - CALC_SQRT=268, CALC_MIN=269, CALC_MIN_IN=270, - CALC_MAX=271, CALC_MAX_IN=272, CALC_SIN=273, - CALC_COS=274, CALC_TAN=275, CALC_ASIN=276, - CALC_ACOS=278, CALC_ATAN=279, CALC_TDIF=280, - CALC_ROUND=281, CALC_DATE=282, CALC_MONTH=283, - CALC_DAY=284 -}; - -//-- Calculate Operations Strings ----------------------------------------- - -extern const sal_Char sCalc_Add[]; -extern const sal_Char sCalc_Sub[]; -extern const sal_Char sCalc_Mul[]; -extern const sal_Char sCalc_Div[]; -extern const sal_Char sCalc_Phd[]; -extern const sal_Char sCalc_Sqrt[]; -extern const sal_Char sCalc_Pow[]; -extern const sal_Char sCalc_Or[]; -extern const sal_Char sCalc_Xor[]; -extern const sal_Char sCalc_And[]; -extern const sal_Char sCalc_Not[]; -extern const sal_Char sCalc_Eq[]; -extern const sal_Char sCalc_Neq[]; -extern const sal_Char sCalc_Leq[]; -extern const sal_Char sCalc_Geq[]; -extern const sal_Char sCalc_L[]; -extern const sal_Char sCalc_G[]; -extern const sal_Char sCalc_Sum[]; -extern const sal_Char sCalc_Mean[]; -extern const sal_Char sCalc_Min[]; -extern const sal_Char sCalc_Max[]; -extern const sal_Char sCalc_Sin[]; -extern const sal_Char sCalc_Cos[]; -extern const sal_Char sCalc_Tan[]; -extern const sal_Char sCalc_Asin[]; -extern const sal_Char sCalc_Acos[]; -extern const sal_Char sCalc_Atan[]; -extern const sal_Char sCalc_Tdif[]; -extern const sal_Char sCalc_Round[]; -extern const sal_Char sCalc_Date[]; - -/****************************************************************************** - * Calculate ErrorCodes - ******************************************************************************/ -enum SwCalcError -{ - CALC_NOERR=0, - CALC_SYNTAX, // syntax error - CALC_ZERODIV, // division by zero - CALC_BRACK, // faulty brackets - CALC_POWERR, // overflow in power function - CALC_VARNFND, // variable was not found - CALC_OVERFLOW, // overflow - CALC_WRONGTIME // wrong time format -}; - -class SwSbxValue : public SbxValue -{ - bool bVoid; -public: - // always default to a number. otherwise it will become a SbxEMPTY - SwSbxValue( long n = 0 ) : bVoid(false) { PutLong( n ); } - SwSbxValue( const double& rD ) : bVoid(false) { PutDouble( rD ); } - SwSbxValue( const SwSbxValue& rVal ) : - SvRefBase( rVal ), - SbxValue( rVal ), - bVoid(rVal.bVoid) - {} - virtual ~SwSbxValue(); - - - sal_Bool GetBool() const; - double GetDouble() const; - SwSbxValue& MakeDouble(); - - bool IsVoidValue() {return bVoid;} - void SetVoidValue(bool bSet) {bVoid = bSet;} -}; - -/****************************************************************************** - * Calculate HashTables for VarTable und Operations - ******************************************************************************/ -struct SwHash -{ - SwHash( const String& rStr ); - virtual ~SwHash(); - String aStr; - SwHash *pNext; -}; - -struct SwCalcExp : public SwHash -{ - SwSbxValue nValue; - const SwFieldType* pFldType; - - SwCalcExp( const String& rStr, const SwSbxValue& rVal, - const SwFieldType* pFldType = 0 ); -}; - -SwHash* Find( const String& rSrch, SwHash** ppTable, - sal_uInt16 nTblSize, sal_uInt16* pPos = 0 ); - -void DeleteHashTable( SwHash** ppTable, sal_uInt16 nTblSize ); - -// if _CalcOp != 0, this is a valid operator -struct _CalcOp; -_CalcOp* FindOperator( const String& rSearch ); - -/****************************************************************************** - * class SwCalc - ******************************************************************************/ -class SwCalc -{ - SwHash* VarTable[ TBLSZ ]; - String aVarName, sCurrSym; - String sCommand; - SvPtrarr aRekurStk; - SwSbxValue nLastLeft; - SwSbxValue nNumberValue; - SwCalcExp aErrExpr; - xub_StrLen nCommandPos; - - SwDoc& rDoc; - SvtSysLocale m_aSysLocale; - const LocaleDataWrapper* pLclData; - CharClass* pCharClass; - - sal_uInt16 nListPor; - SwCalcOper eCurrOper; - SwCalcOper eCurrListOper; - SwCalcError eError; - - - SwCalcOper GetToken(); - SwSbxValue Expr(); - SwSbxValue Term(); - SwSbxValue Prim(); - - sal_Bool ParseTime( sal_uInt16*, sal_uInt16*, sal_uInt16* ); - - String GetColumnName( const String& rName ); - String GetDBName( const String& rName ); - - // dont call this methods - SwCalc( const SwCalc& ); - SwCalc& operator=( const SwCalc& ); - -public: - SwCalc( SwDoc& rD ); - ~SwCalc(); - - SwSbxValue Calculate( const String &rStr ); - String GetStrResult( const SwSbxValue& rValue, sal_Bool bRound = sal_True ); - String GetStrResult( double, sal_Bool bRound = sal_True ); - - SwCalcExp* VarInsert( const String& r ); - SwCalcExp* VarLook( const String &rStr, sal_uInt16 ins = 0 ); - void VarChange( const String& rStr, const SwSbxValue& rValue ); - void VarChange( const String& rStr, double ); - SwHash** GetVarTable() { return VarTable; } - - sal_Bool Push( const VoidPtr pPtr ); - void Pop( const VoidPtr pPtr ); - - void SetCalcError( SwCalcError eErr ) { eError = eErr; } - sal_Bool IsCalcError() const { return 0 != eError; } - - static bool Str2Double( const String& rStr, xub_StrLen& rPos, - double& rVal, - LocaleDataWrapper const*const pData = 0 ); - static bool Str2Double( const String& rStr, xub_StrLen& rPos, - double& rVal, SwDoc *const pDoc ); - - SW_DLLPUBLIC static sal_Bool IsValidVarName( const String& rStr, - String* pValidName = 0 ); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx deleted file mode 100644 index 38d40dbf50..0000000000 --- a/sw/inc/ccoll.hxx +++ /dev/null @@ -1,95 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CCOLL_HXX -#define _CCOLL_HXX - -#include <svl/poolitem.hxx> -#include <tools/string.hxx> -#include <sfx2/tabdlg.hxx> - -#include <vcl/fixed.hxx> - -#include <vcl/button.hxx> -#include <svtools/svtabbx.hxx> - -#include <vcl/lstbox.hxx> -#include <tools/resary.hxx> -#include "swdllapi.h" -#include "cmdid.h" - -#include <rtl/string.hxx> - -//*********************************************************** - -struct CollName { - sal_uLong nCnd; - sal_uLong nSubCond; - }; - -//*********************************************************** - -#define COND_COMMAND_COUNT 28 - -struct CommandStruct -{ - sal_uLong nCnd; - sal_uLong nSubCond; -}; - -//*********************************************************** - -sal_Int16 GetCommandContextIndex( const rtl::OUString &rContextName ); -rtl::OUString GetCommandContextByIndex( sal_Int16 nIndex ); - -//*********************************************************** - -class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem -{ - static CommandStruct aCmds[COND_COMMAND_COUNT]; - - String sStyles[COND_COMMAND_COUNT]; - -public: - SwCondCollItem(sal_uInt16 nWhich = FN_COND_COLL); - ~SwCondCollItem(); - - TYPEINFO(); - - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual int operator==( const SfxPoolItem& ) const; - - static const CommandStruct* GetCmds(); - - const String& GetStyle(sal_uInt16 nPos) const; - void SetStyle( const String* pStyle, sal_uInt16 nPos); - -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx deleted file mode 100644 index 31b3e5c9b1..0000000000 --- a/sw/inc/cellatr.hxx +++ /dev/null @@ -1,128 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CELLATR_HXX -#define _CELLATR_HXX - -#include <svl/intitem.hxx> -#include <svl/zforlist.hxx> -#include "swdllapi.h" -#include "format.hxx" -#include "cellfml.hxx" - -class SW_DLLPUBLIC SwTblBoxNumFormat : public SfxUInt32Item -{ - sal_Bool bAuto; // automatically given flag -public: - SwTblBoxNumFormat( sal_uInt32 nFormat = NUMBERFORMAT_TEXT, - sal_Bool bAuto = sal_False ); - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - - inline SwTblBoxNumFormat& operator=( const SwTblBoxNumFormat& rAttr ) - { - SetValue( rAttr.GetValue() ); - SetAutoFlag( rAttr.GetAutoFlag() ); - return *this; - } - - sal_Bool GetAutoFlag() const { return bAuto; } - void SetAutoFlag( sal_Bool bFlag = sal_True ) { bAuto = bFlag; } -}; - -class SwTblBoxFormula : public SfxPoolItem, public SwTableFormula -{ - SwModify* pDefinedIn; // Modify object where the formula is located - // can only be TableBoxFormat - -public: - SwTblBoxFormula( const String& rFormula ); - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - - inline const SwModify* GetDefinedIn() const { return pDefinedIn; } - inline void ChgDefinedIn( const SwModify* pNew ) - { pDefinedIn = (SwModify*)pNew; } - // BoxAttribut -> BoxStartNode - virtual const SwNode* GetNodeOfFormula() const; - - SwTableBox* GetTableBox(); - const SwTableBox* GetTableBox() const - { return ((SwTblBoxFormula*)this)->GetTableBox(); } - - void ChangeState( const SfxPoolItem* pItem ); - void Calc( SwTblCalcPara& rCalcPara, double& rValue ); -}; - -class SW_DLLPUBLIC SwTblBoxValue : public SfxPoolItem -{ - double nValue; -public: - SwTblBoxValue(); - SwTblBoxValue( const double aVal ); - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - - inline SwTblBoxValue& operator=( const SwTblBoxValue& rCmp ) - { - nValue = rCmp.nValue; - return *this; - } - - double GetValue() const { return nValue; } -}; - - - -//*************************************************************************** - -inline const SwTblBoxNumFormat &SwAttrSet::GetTblBoxNumFmt(sal_Bool bInP) const - { return (const SwTblBoxNumFormat&)Get( RES_BOXATR_FORMAT,bInP); } -inline const SwTblBoxFormula &SwAttrSet::GetTblBoxFormula(sal_Bool bInP) const - { return (const SwTblBoxFormula&)Get( RES_BOXATR_FORMULA,bInP); } -inline const SwTblBoxValue &SwAttrSet::GetTblBoxValue(sal_Bool bInP) const - { return (const SwTblBoxValue&)Get( RES_BOXATR_VALUE, bInP); } - -//*************************************************************************** - -inline const SwTblBoxNumFormat &SwFmt::GetTblBoxNumFmt(sal_Bool bInP) const - { return aSet.GetTblBoxNumFmt(bInP); } -inline const SwTblBoxFormula &SwFmt::GetTblBoxFormula(sal_Bool bInP) const - { return aSet.GetTblBoxFormula(bInP); } -inline const SwTblBoxValue &SwFmt::GetTblBoxValue(sal_Bool bInP) const - { return aSet.GetTblBoxValue(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx deleted file mode 100644 index 477ee3ebb6..0000000000 --- a/sw/inc/cellfml.hxx +++ /dev/null @@ -1,164 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CELLFML_HXX -#define _CELLFML_HXX - -#include <tools/string.hxx> - -class SwTable; -class SwNode; -class SwTableSortBoxes; -class SwSelBoxes; -class SwCalc; -class SwTableBox; -class SwTableFmlUpdate; -class SwDoc; -class String; - -class SwTblCalcPara -{ - const SwTableBox* pLastTblBox; - sal_uInt16 nStackCnt, nMaxSize; - -public: - SwTableSortBoxes *pBoxStk; // stack for recognizing recursion - SwCalc& rCalc; // current Calculator - const SwTable* pTbl; // current table - - SwTblCalcPara( SwCalc& rCalculator, const SwTable& rTable ); - ~SwTblCalcPara(); - - sal_Bool CalcWithStackOverflow(); - sal_Bool IsStackOverFlow() const { return nMaxSize == nStackCnt; } - sal_Bool IncStackCnt() { return nMaxSize == ++nStackCnt; } - void DecStackCnt() { if( nStackCnt ) --nStackCnt; } - void SetLastTblBox( const SwTableBox* pBox ) { pLastTblBox = pBox; } -}; - - - -class SwTableFormula -{ -typedef void (SwTableFormula:: *FnScanFormel)( const SwTable&, String&, - String&, String*, void* ) const; - - void BoxNmsToPtr( const SwTable&, String&, String&, String* = 0, - void* pPara = 0 ) const; - void PtrToBoxNms( const SwTable&, String&, String&, String* = 0, - void* pPara = 0 ) const; - void RelNmsToBoxNms( const SwTable&, String&, String&, String* = 0, - void* pPara = 0 ) const; - void RelBoxNmsToPtr( const SwTable&, String&, String&, String* = 0, - void* pPara = 0 ) const; - void BoxNmsToRelNm( const SwTable&, String&, String&, String* = 0, - void* pPara = 0 ) const; - void _MakeFormel( const SwTable&, String&, String&, String* = 0, - void* pPara = 0 ) const; - void _GetFmlBoxes( const SwTable&, String&, String&, String* = 0, - void* pPara = 0 ) const; - void _HasValidBoxes( const SwTable&, String&, String&, String* = 0, - void* pPara = 0 ) const; - void _SplitMergeBoxNm( const SwTable&, String&, String&, String* = 0, - void* pPara = 0 ) const; - - void GetBoxes( const SwTableBox& rStt, const SwTableBox& rEnd, - SwSelBoxes& rBoxes ) const; - String ScanString( FnScanFormel fnFormel, const SwTable& rTbl, - void* = 0 ) const; - - const SwTable* FindTable( SwDoc& rDoc, const String& rNm ) const; - -protected: - enum NameType { EXTRNL_NAME, INTRNL_NAME, REL_NAME }; - - String sFormel; // current formula - NameType eNmType; // current display method - sal_Bool bValidValue; // sal_True: recalculate formula - - // find the node in which the formula is located - // TextFeld -> TextNode, - // BoxAttribut -> BoxStartNode - // !!! has to be overloaded by every derivation !!! - virtual const SwNode* GetNodeOfFormula() const = 0; - - SwTableFormula( const String& rFormel ); - - String MakeFormel( SwTblCalcPara& rCalcPara ) const - { - return ScanString( &SwTableFormula::_MakeFormel, - *rCalcPara.pTbl, &rCalcPara ); - } - - static sal_uInt16 GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox ); - -public: - - SwTableFormula( const SwTableFormula& rCpy ) { *this = rCpy; } - virtual ~SwTableFormula(); - SwTableFormula& operator=( const SwTableFormula& rCpy ) - { - sFormel = rCpy.sFormel; - eNmType = rCpy.eNmType; - bValidValue = rCpy.bValidValue; - return *this; - } - - // create from the internal formula (for CORE) the external formula (for UI) - void PtrToBoxNm( const SwTable* pTbl ); - // create from the external formula the internal - void BoxNmToPtr( const SwTable* pTbl ); - // create from the external/internal formula the relative formula - void ToRelBoxNm( const SwTable* pTbl ); - // gets called before/after merging/splitting of tables - void ToSplitMergeBoxNm( SwTableFmlUpdate& rTblUpd ); - - bool IsIntrnlName() const { return eNmType == INTRNL_NAME; } - NameType GetNameType() const { return eNmType; } - - bool IsValid() const { return bValidValue; } - inline void ChgValid( bool bNew ) { bValidValue = bNew; } - - const String& GetFormula() const { return sFormel; } - void SetFormula( const String& rNew ) - { - sFormel = rNew; - bValidValue = false; - eNmType = EXTRNL_NAME; - } - - sal_uInt16 GetBoxesOfFormula( const SwTable& rTbl, SwSelBoxes& rBoxes ); - // are all boxes valid which this formula relies on? - bool HasValidBoxes() const; -}; - - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/charatr.hxx b/sw/inc/charatr.hxx deleted file mode 100644 index 2a3e3cbf6f..0000000000 --- a/sw/inc/charatr.hxx +++ /dev/null @@ -1,175 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CHARATR_HXX -#define _CHARATR_HXX - -#include <format.hxx> -#include <hintids.hxx> - - -// implementation of the character attribute methods of SwAttrSet - -inline const SvxPostureItem &SwAttrSet::GetPosture(sal_Bool bInP) const - { return (const SvxPostureItem&)Get( RES_CHRATR_POSTURE,bInP); } -inline const SvxPostureItem &SwAttrSet::GetCJKPosture(sal_Bool bInP) const - { return (const SvxPostureItem&)Get( RES_CHRATR_CJK_POSTURE,bInP); } -inline const SvxPostureItem &SwAttrSet::GetCTLPosture(sal_Bool bInP) const - { return (const SvxPostureItem&)Get( RES_CHRATR_CTL_POSTURE,bInP); } -inline const SvxWeightItem &SwAttrSet::GetWeight(sal_Bool bInP) const - { return (const SvxWeightItem&)Get( RES_CHRATR_WEIGHT,bInP); } -inline const SvxWeightItem &SwAttrSet::GetCJKWeight(sal_Bool bInP) const - { return (const SvxWeightItem&)Get( RES_CHRATR_CJK_WEIGHT,bInP); } -inline const SvxWeightItem &SwAttrSet::GetCTLWeight(sal_Bool bInP) const - { return (const SvxWeightItem&)Get( RES_CHRATR_CTL_WEIGHT,bInP); } -inline const SvxShadowedItem &SwAttrSet::GetShadowed(sal_Bool bInP) const - { return (const SvxShadowedItem&)Get( RES_CHRATR_SHADOWED,bInP); } -inline const SvxAutoKernItem &SwAttrSet::GetAutoKern(sal_Bool bInP) const - { return (const SvxAutoKernItem&)Get( RES_CHRATR_AUTOKERN,bInP); } -inline const SvxWordLineModeItem &SwAttrSet::GetWordLineMode(sal_Bool bInP) const - { return (const SvxWordLineModeItem&)Get( RES_CHRATR_WORDLINEMODE,bInP); } -inline const SvxContourItem &SwAttrSet::GetContour(sal_Bool bInP) const - { return (const SvxContourItem&)Get( RES_CHRATR_CONTOUR,bInP); } -inline const SvxKerningItem &SwAttrSet::GetKerning(sal_Bool bInP) const - { return (const SvxKerningItem&)Get( RES_CHRATR_KERNING,bInP); } -inline const SvxUnderlineItem &SwAttrSet::GetUnderline(sal_Bool bInP) const - { return (const SvxUnderlineItem&)Get( RES_CHRATR_UNDERLINE,bInP); } -inline const SvxOverlineItem &SwAttrSet::GetOverline(sal_Bool bInP) const - { return (const SvxOverlineItem&)Get( RES_CHRATR_OVERLINE,bInP); } -inline const SvxCrossedOutItem &SwAttrSet::GetCrossedOut(sal_Bool bInP) const - { return (const SvxCrossedOutItem&)Get( RES_CHRATR_CROSSEDOUT,bInP); } -inline const SvxFontHeightItem &SwAttrSet::GetSize(sal_Bool bInP) const - { return (const SvxFontHeightItem&)Get( RES_CHRATR_FONTSIZE,bInP); } -inline const SvxFontHeightItem &SwAttrSet::GetCJKSize(sal_Bool bInP) const - { return (const SvxFontHeightItem&)Get( RES_CHRATR_CJK_FONTSIZE,bInP); } -inline const SvxFontHeightItem &SwAttrSet::GetCTLSize(sal_Bool bInP) const - { return (const SvxFontHeightItem&)Get( RES_CHRATR_CTL_FONTSIZE,bInP); } -inline const SvxPropSizeItem &SwAttrSet::GetPropSize(sal_Bool bInP) const - { return (const SvxPropSizeItem&)Get( RES_CHRATR_PROPORTIONALFONTSIZE,bInP); } -inline const SvxFontItem &SwAttrSet::GetFont(sal_Bool bInP) const - { return (const SvxFontItem&)Get( RES_CHRATR_FONT,bInP); } -inline const SvxFontItem &SwAttrSet::GetCJKFont(sal_Bool bInP) const - { return (const SvxFontItem&)Get( RES_CHRATR_CJK_FONT,bInP); } -inline const SvxFontItem &SwAttrSet::GetCTLFont(sal_Bool bInP) const - { return (const SvxFontItem&)Get( RES_CHRATR_CTL_FONT,bInP); } -inline const SvxColorItem &SwAttrSet::GetColor(sal_Bool bInP) const - { return (const SvxColorItem&)Get( RES_CHRATR_COLOR,bInP); } -inline const SvxCharSetColorItem &SwAttrSet::GetCharSetColor(sal_Bool bInP) const - { return (const SvxCharSetColorItem&)Get( RES_CHRATR_CHARSETCOLOR,bInP); } -inline const SvxLanguageItem &SwAttrSet::GetLanguage(sal_Bool bInP) const - { return (const SvxLanguageItem&)Get( RES_CHRATR_LANGUAGE,bInP); } -inline const SvxLanguageItem &SwAttrSet::GetCJKLanguage(sal_Bool bInP) const - { return (const SvxLanguageItem&)Get( RES_CHRATR_CJK_LANGUAGE,bInP); } -inline const SvxLanguageItem &SwAttrSet::GetCTLLanguage(sal_Bool bInP) const - { return (const SvxLanguageItem&)Get( RES_CHRATR_CTL_LANGUAGE,bInP); } -inline const SvxEscapementItem &SwAttrSet::GetEscapement(sal_Bool bInP) const - { return (const SvxEscapementItem&)Get( RES_CHRATR_ESCAPEMENT,bInP); } -inline const SvxCaseMapItem &SwAttrSet::GetCaseMap(sal_Bool bInP) const - { return (const SvxCaseMapItem&)Get( RES_CHRATR_CASEMAP,bInP); } -inline const SvxNoHyphenItem &SwAttrSet::GetNoHyphenHere(sal_Bool bInP) const - { return (const SvxNoHyphenItem&)Get( RES_CHRATR_NOHYPHEN,bInP); } -inline const SvxBlinkItem &SwAttrSet::GetBlink(sal_Bool bInP) const - { return (const SvxBlinkItem&)Get( RES_CHRATR_BLINK,bInP); } -inline const SvxBrushItem &SwAttrSet::GetChrBackground( sal_Bool bInP ) const - { return (const SvxBrushItem&)Get( RES_CHRATR_BACKGROUND, bInP ); } -inline const SvxEmphasisMarkItem &SwAttrSet::GetEmphasisMark( sal_Bool bInP ) const - { return (const SvxEmphasisMarkItem&)Get( RES_CHRATR_EMPHASIS_MARK, bInP ); } -inline const SvxTwoLinesItem &SwAttrSet::Get2Lines( sal_Bool bInP ) const - { return (const SvxTwoLinesItem&)Get( RES_CHRATR_TWO_LINES, bInP ); } -inline const SvxCharScaleWidthItem &SwAttrSet::GetCharScaleW( sal_Bool bInP ) const - { return (const SvxCharScaleWidthItem&)Get( RES_CHRATR_SCALEW, bInP ); } -inline const SvxCharRotateItem &SwAttrSet::GetCharRotate( sal_Bool bInP ) const - { return (const SvxCharRotateItem&)Get( RES_CHRATR_ROTATE, bInP ); } -inline const SvxCharReliefItem &SwAttrSet::GetCharRelief( sal_Bool bInP ) const - { return (const SvxCharReliefItem&)Get( RES_CHRATR_RELIEF, bInP ); } -inline const SvxCharHiddenItem &SwAttrSet::GetCharHidden( sal_Bool bInP ) const - { return (const SvxCharHiddenItem&)Get( RES_CHRATR_HIDDEN, bInP ); } - -// implementation of the character attribute methods of SwFmt - -inline const SvxPostureItem &SwFmt::GetPosture(sal_Bool bInP) const - { return aSet.GetPosture(bInP); } -inline const SvxWeightItem &SwFmt::GetWeight(sal_Bool bInP) const - { return aSet.GetWeight(bInP); } -inline const SvxShadowedItem &SwFmt::GetShadowed(sal_Bool bInP) const - { return aSet.GetShadowed(bInP); } -inline const SvxAutoKernItem &SwFmt::GetAutoKern(sal_Bool bInP) const - { return aSet.GetAutoKern(bInP); } -inline const SvxWordLineModeItem &SwFmt::GetWordLineMode(sal_Bool bInP) const - { return aSet.GetWordLineMode(bInP); } -inline const SvxContourItem &SwFmt::GetContour(sal_Bool bInP) const - { return aSet.GetContour(bInP); } -inline const SvxKerningItem &SwFmt::GetKerning(sal_Bool bInP) const - { return aSet.GetKerning(bInP); } -inline const SvxUnderlineItem &SwFmt::GetUnderline(sal_Bool bInP) const - { return aSet.GetUnderline(bInP); } -inline const SvxOverlineItem &SwFmt::GetOverline(sal_Bool bInP) const - { return aSet.GetOverline(bInP); } -inline const SvxCrossedOutItem &SwFmt::GetCrossedOut(sal_Bool bInP) const - { return aSet.GetCrossedOut(bInP); } -inline const SvxFontHeightItem &SwFmt::GetSize(sal_Bool bInP) const - { return aSet.GetSize(bInP); } -inline const SvxPropSizeItem &SwFmt::GetPropSize(sal_Bool bInP) const - { return aSet.GetPropSize(bInP); } -inline const SvxFontItem &SwFmt::GetFont(sal_Bool bInP) const - { return aSet.GetFont(bInP); } -inline const SvxFontItem &SwFmt::GetCJKFont(sal_Bool bInP) const - { return aSet.GetCJKFont(bInP); } -inline const SvxFontItem &SwFmt::GetCTLFont(sal_Bool bInP) const - { return aSet.GetCTLFont(bInP); } -inline const SvxColorItem &SwFmt::GetColor(sal_Bool bInP) const - { return aSet.GetColor(bInP); } - inline const SvxCharSetColorItem &SwFmt::GetCharSetColor(sal_Bool bInP) const - { return aSet.GetCharSetColor(bInP); } -inline const SvxLanguageItem &SwFmt::GetLanguage(sal_Bool bInP) const - { return aSet.GetLanguage(bInP); } -inline const SvxEscapementItem &SwFmt::GetEscapement(sal_Bool bInP) const - { return aSet.GetEscapement(bInP); } -inline const SvxCaseMapItem &SwFmt::GetCaseMap(sal_Bool bInP) const - { return aSet.GetCaseMap(bInP); } -inline const SvxNoHyphenItem &SwFmt::GetNoHyphenHere(sal_Bool bInP) const - { return aSet.GetNoHyphenHere(bInP); } -inline const SvxBlinkItem &SwFmt::GetBlink(sal_Bool bInP) const - { return aSet.GetBlink(bInP); } -inline const SvxBrushItem &SwFmt::GetChrBackground(sal_Bool bInP) const - { return aSet.GetChrBackground(bInP); } -inline const SvxEmphasisMarkItem &SwFmt::GetEmphasisMark( sal_Bool bInP ) const - { return aSet.GetEmphasisMark(bInP); } -inline const SvxTwoLinesItem &SwFmt::Get2Lines( sal_Bool bInP ) const - { return aSet.Get2Lines(bInP); } -inline const SvxCharScaleWidthItem &SwFmt::GetCharScaleW( sal_Bool bInP ) const - { return aSet.GetCharScaleW(bInP); } -inline const SvxCharRotateItem &SwFmt::GetCharRotate( sal_Bool bInP ) const - { return aSet.GetCharRotate(bInP); } -inline const SvxCharReliefItem &SwFmt::GetCharRelief( sal_Bool bInP ) const - { return aSet.GetCharRelief(bInP); } -inline const SvxCharHiddenItem &SwFmt::GetCharHidden( sal_Bool bInP ) const - { return aSet.GetCharHidden(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/charfmt.hxx b/sw/inc/charfmt.hxx deleted file mode 100644 index 5509460fea..0000000000 --- a/sw/inc/charfmt.hxx +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CHARFMT_HXX -#define _CHARFMT_HXX - -#include <format.hxx> - -class SW_DLLPUBLIC SwCharFmt : public SwFmt -{ - friend class SwDoc; - friend class SwTxtFmtColl; - - SwCharFmt( SwAttrPool& rPool, const sal_Char* pFmtName, - SwCharFmt *pDerivedFrom ) - : SwFmt( rPool, pFmtName, aCharFmtSetRange, pDerivedFrom, RES_CHRFMT ) - {} - SwCharFmt( SwAttrPool& rPool, const String &rFmtName, - SwCharFmt *pDerivedFrom ) - : SwFmt( rPool, rFmtName, aCharFmtSetRange, pDerivedFrom, RES_CHRFMT ) - {} - - -public: - TYPEINFO(); // already in base class Client -}; - -namespace CharFmt -{ - extern const SfxItemSet* GetItemSet( const SfxPoolItem& rAttr ); - extern const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, sal_uInt16 nWhich ); - extern sal_Bool IsItemIncluded( const sal_uInt16 nWhich, const SwTxtAttr *pAttr ); -} - -#endif - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/chcmprse.hxx b/sw/inc/chcmprse.hxx deleted file mode 100644 index 169ea60ae5..0000000000 --- a/sw/inc/chcmprse.hxx +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CHCMPRSE_HXX -#define _CHCMPRSE_HXX - -enum SwCharCompressType{ CHARCOMPRESS_NONE, - CHARCOMPRESS_PUNCTUATION, - CHARCOMPRESS_PUNCTUATION_KANA }; - - -#endif -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/checkit.hxx b/sw/inc/checkit.hxx deleted file mode 100644 index 5e0a12561a..0000000000 --- a/sw/inc/checkit.hxx +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CHECKIT_HXX -#define _CHECKIT_HXX - -#include <com/sun/star/uno/Reference.h> - -#include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp> - -/************************************************************************* - * class SwCheckIt - * - * Wrapper for the XInputSequenceChecker - *************************************************************************/ - -class SwCheckIt -{ -public: - com::sun::star::uno::Reference < com::sun::star::i18n::XExtendedInputSequenceChecker > xCheck; - - SwCheckIt(); -}; - -extern SwCheckIt* pCheckIt; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx deleted file mode 100644 index c2e811bd2f..0000000000 --- a/sw/inc/chpfld.hxx +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_CHPFLD_HXX -#define SW_CHPFLD_HXX - -#include "fldbas.hxx" - - -class SwFrm; -class SwCntntNode; -class SwTxtNode; - - -enum SwChapterFormat -{ - CF_BEGIN, - CF_NUMBER = CF_BEGIN, // only the chapter number - CF_TITLE, // only the title - CF_NUM_TITLE, // number and title - CF_NUMBER_NOPREPST, // only chapter number without post-/prefix - CF_NUM_NOPREPST_TITLE, // chapter number without post-/prefix and title - CF_END -}; - -class SwChapterFieldType : public SwFieldType -{ -public: - SwChapterFieldType(); - - virtual SwFieldType* Copy() const; - -}; - -class SW_DLLPUBLIC SwChapterField : public SwField -{ - friend class SwChapterFieldType; - sal_uInt8 nLevel; - String sTitle, sNumber, sPre, sPost; - - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - SwChapterField(SwChapterFieldType*, sal_uInt32 nFmt = 0); - - // #i53420# - void ChangeExpansion( const SwFrm*, - const SwCntntNode*, - sal_Bool bSrchNum = sal_False); - void ChangeExpansion(const SwTxtNode &rNd, sal_Bool bSrchNum); - - inline sal_uInt8 GetLevel() const; - inline void SetLevel(sal_uInt8); - - inline const String& GetNumber() const; - inline const String& GetTitle() const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -inline sal_uInt8 SwChapterField::GetLevel() const { return nLevel; } -inline void SwChapterField::SetLevel(sal_uInt8 nLev) { nLevel = nLev; } -inline const String& SwChapterField::GetNumber() const { return sNumber; } -inline const String& SwChapterField::GetTitle() const { return sTitle; } - -#endif // SW_CHPFLD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/chrdlg.hrc b/sw/inc/chrdlg.hrc deleted file mode 100644 index b83fe3164a..0000000000 --- a/sw/inc/chrdlg.hrc +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CHRDLG_HRC -#define _CHRDLG_HRC - -#include "rcid.hrc" - -#define DLG_CHAR (RC_CHRDLG_BEGIN + 1) -#define DLG_PARA (RC_CHRDLG_BEGIN + 2) -#define DLG_PAGE (RC_CHRDLG_BEGIN + 3) -#define DLG_BREAK (RC_CHRDLG_BEGIN + 5) -#define DLG_PAGENUM (RC_CHRDLG_BEGIN + 6) -#define DLG_HEADER_FOOTER (RC_CHRDLG_BEGIN + 7) -#define DLG_DROPCAPS (RC_CHRDLG_BEGIN + 8) -#define DLG_DRAWCHAR (RC_CHRDLG_BEGIN + 9) -#define DLG_DRAWPARA (RC_CHRDLG_BEGIN + 10) - -// Tabpages -> now in globals.hrc - -#define STR_TEXTCOLL_HEADER (RC_CHRDLG_BEGIN + 2) -#define STR_PAGEFMT_HEADER (RC_CHRDLG_BEGIN + 4) -#define SW_STR_NONE (RC_CHRDLG_BEGIN + 5) - -#define MSG_ILLEGAL_PAGENUM (RC_CHRDLG_BEGIN + 1) - -#define CHRDLG_ACT_END DLG_DRAWPARA - -#if CHRDLG_ACT_END > RC_CHRDLG_END -#error Resource-Id overflow in #file, #line -#endif - -#define DLG_SWDROPCAPS (RC_CHRDLG_BEGIN + 11) - -#endif diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h deleted file mode 100644 index 501c721499..0000000000 --- a/sw/inc/cmdid.h +++ /dev/null @@ -1,1243 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - ************************************************************************/ - -/****************************************************************************** -Attention : "In this file C++ style // comments are not allowed as it will be -included in c-context files, so c++ style stuff will cause problems. -******************************************************************************/ - -#ifndef INCLUDED_SW_CMDID_H -#define INCLUDED_SW_CMDID_H - -#include <sfx2/sfx.hrc> - -#ifndef SW_UNOMID_H -#include <unomid.h> -#endif - -/* Flags that are being used in the slot definitions for the disable-features */ -#define SW_DISABLE_ON_PROTECTED_CURSOR 0x00000001 -#define SW_DISABLE_ON_MAILBOX_EDITOR 0x00000002 - -#define FN_FILE SID_SW_START -#define FN_EDIT (SID_SW_START + 100) -#define FN_VIEW (SID_SW_START + 200) -#define FN_INSERT (SID_SW_START + 300) -#define FN_FORMAT (SID_SW_START + 400) -#define FN_EXTRA (SID_SW_START + 600) -#define FN_WINDOW (SID_SW_START + 700) -#define FN_HELP (SID_SW_START + 800) -#define FN_SELECTION (SID_SW_START + 900) -#define FN_QUERY (SID_SW_START + 1000) -#define FN_ENVELP (SID_SW_START + 1050) -#define FN_PARAM (SID_SW_START + 1100) -#define FN_STAT (SID_SW_START + 1180) -#define FN_PRNOPT (SID_SW_START + 1200) -#define FN_PGPREVIEW (SID_SW_START + 1250) -#define FN_FRAME (SID_SW_START + 1300) -#define FN_INSERT2 (SID_SW_START + 1400) -#define FN_FORMAT2 (SID_SW_START + 1600) -#define FN_EDIT2 (SID_SW_START + 1800) -#define FN_QUERY2 (SID_SW_START + 2000) -#define FN_EXTRA2 (SID_SW_START + 2200) -#define FN_PARAM2 (SID_SW_START + 2400) -#define FN_NOTES (SID_SW_START + 2500) - - /* More accurately, this range should be from FN_EXTRA2 to FN_PARAM2-1, but - * FN_NUMBER_NEWSTART comes from FN_FORMAT2, and FN_PARAM_LINK_DISPLAY_NAME - * comes from FN_PARAM2 so we need to include FORMAT2, - * EDIT2 and QUERY2 and PARAM2 in the range...hopefully this will be fixed - * soon */ - -#define FN_UNO_RANGE_BEGIN FN_FORMAT2 -#define FN_UNO_RANGE_END (FN_PARAM2 + 199) - -#define HELP_OFFSET 1100 -#define CMD_STR_OFFSET 2200 -#define CMD_STR_OFFSET_MULTILANG 3300 -#define CMDID_END 5500 - -/*-------------------------------------------------------------------- - Region: File - --------------------------------------------------------------------*/ -#define FN_CLOSE_FILE (FN_FILE + 1 ) /* Close */ -#define FN_LAUNCH_REGISTRY (FN_FILE + 2 ) /* Registry */ - -#define FN_NEW_GLOBAL_DOC (FN_FILE + 4 ) /* Create Global Document */ -#define FN_NEW_FILE (FN_FILE + 5 ) /* New */ -#define FN_NEW_FILE_DLG (FN_FILE + 6 ) /* New dialog */ -#define FN_OPEN_FILE (FN_FILE + 7 ) /* Open */ -#define FN_EDIT_FILE (FN_FILE + 8 ) /* Open or ToTop */ - -#define FN_INETFILE (FN_FILE + 9 ) /* Internet File-Dialog */ - -#define FN_PRINT_FILE (FN_FILE + 10) /* Print */ -#define FN_PRINT_FILE_OPTIONS (FN_FILE + 11) /* Print file options */ -#define FN_SAVE_FILE_AS (FN_FILE + 12) /* Save as */ -#define FN_SAVE_FILE (FN_FILE + 13) /* Save */ -#define FN_SETUP_PRINTER (FN_FILE + 14) /* Printer setup */ -#define FN_SETUP_PRINTER_DLG (FN_FILE + 15) /* Printer setup dialog */ -#define FN_SHOW_PREVIEW (FN_FILE + 16) /* Print preview */ -#define FN_EXIT (FN_FILE + 17) /* Close Writer */ -#define FN_PRINT_CFG_DLG (FN_FILE + 18) /* Print configuration dialog */ - -#define FN_SAVE_ALL (FN_FILE + 23) /* Save all files */ -#define FN_NEW_FILE_DEFAULT (FN_FILE + 24) /* New file with default template */ -#define FN_PRINT_FILE_DEFAULT (FN_FILE + 25) /* Print with default settings */ -#define FN_LAUNCH_EQ_EDITOR (FN_FILE + 26) /* Equation editor */ -#define FN_CHANGE_PRINTER (FN_FILE + 27) /* Select printer */ -#define FN_FAX_END (FN_FILE + 29) /* Ready to fax, Id for PostMessage */ - -#define FN_SELECT_DATABASE (FN_FILE + 30) /* Database selection */ -#define FN_DOC_INFO_DLG (FN_FILE + 31) /* Document information dialog */ -#define FN_DOC_MGR_DLG (FN_FILE + 32) /* Document-Manager */ - -#define FN_GET_DOCSTAT (FN_FILE + 33) /* Get document statistics */ - -#define FN_SAVE_SELECTION (FN_FILE + 35) /* Save selection */ - -#define FN_OUTLINE_TO_IMPRESS (FN_FILE + 36) /* Send outline to impress */ -#define FN_OUTLINE_TO_CLIPBOARD (FN_FILE + 37) /* Send outline to clipboard */ - -#define FN_NEW_HTML_DOC (FN_FILE + 40 ) /* Create HTML document */ - -#define FN_APP_START (FN_FILE + 98) /* Macro for App.Start */ -#define FN_APP_END (FN_FILE + 99) /* Macro for App.End */ - -/*-------------------------------------------------------------------- - Region: Edit - --------------------------------------------------------------------*/ -#define FN_CLEAR (FN_EDIT + 1 ) /* Clear */ -#define FN_COPY (FN_EDIT + 2 ) /* Copy */ -#define FN_CUT (FN_EDIT + 3 ) /* Cut */ -#define FN_EDIT_FIELD (FN_EDIT + 4 ) /* Edit field */ -#define FN_EDIT_FIELD_DLG (FN_EDIT + 5 ) /* Edit field dialog */ -#define FN_EDIT_FILE_INFO (FN_EDIT + 6 ) /* Document information */ -#define FN_EDIT_FILE_INFO_DLG (FN_EDIT + 7 ) /* Document information Dialog */ -#define FN_EDIT_LINK (FN_EDIT + 8 ) /* Edit link */ -#define FN_EDIT_LINK_DLG (FN_EDIT + 9 ) /* Edit link dialog */ -#define FN_GOTO (FN_EDIT + 11) /* Go to */ - -#define FN_PASTE (FN_EDIT + 13) /* Paste */ -#define FN_PASTESPECIAL_DLG (FN_EDIT + 15) /* Paste special dialog */ -#define FN_NUMBER_BULLETS (FN_EDIT + 21) /* Bullets */ -#define FN_REPEAT (FN_EDIT + 22) /* Repeat last */ -#define FN_EDIT_IDX_ENTRY_DLG (FN_EDIT + 23) /* Edit Index-Entry */ -#define FN_UPDATE_FIELDS (FN_EDIT + 26) /* Update fields */ -#define FN_EXECUTE_MACROFIELD (FN_EDIT + 27) /* Execute macrofield */ -#define FN_EDIT_FORMULA (FN_EDIT + 28) /* Edit formula in RibbonBar */ -#define FN_CALC_TABLE (FN_EDIT + 29) - -/*-------------------------------------------------------------------- - Region: Bullets - --------------------------------------------------------------------*/ -#define FN_NUM_BULLET_DOWN (FN_EDIT + 30) /* Bullet down */ -#define FN_NUM_BULLET_UP (FN_EDIT + 31) /* Bullet up */ -#define FN_NUM_BULLET_PREV (FN_EDIT + 32) /* to previous bullet */ -#define FN_NUM_BULLET_NEXT (FN_EDIT + 33) /* to next bullet */ -#define FN_NUM_BULLET_MOVEUP (FN_EDIT + 34) /* move bullet up */ -#define FN_NUM_BULLET_MOVEDOWN (FN_EDIT + 35) /* move bullet down */ -#define FN_NUM_BULLET_NONUM (FN_EDIT + 36) /* bullet without number */ -#ifndef FN_NUM_BULLET_OFF //in SVX already -#define FN_NUM_BULLET_OFF (FN_EDIT + 37) /* turn off numbering */ -#endif - -#define FN_NUM_BULLET_OUTLINE_DOWN (FN_EDIT + 39) /* reduce in rank with sub points */ -#define FN_NUM_BULLET_OUTLINE_UP (FN_EDIT + 40) /* increase in rank with sub-items */ -#define FN_NUM_BULLET_OUTLINE_MOVEUP (FN_EDIT + 41) /* Push up with sub-items */ -#define FN_NUM_BULLET_OUTLINE_MOVEDOWN (FN_EDIT + 42) /* Push down with sub-items */ -#define FN_UPDATE_INPUTFIELDS (FN_EDIT + 43) /* Update input fields */ - -#define FN_NUM_OR_NONUM (FN_EDIT + 46) /* Number on/off */ - -#define FN_GOTO_NEXT_INPUTFLD (FN_EDIT + 47) /* go to next inputfield */ -#define FN_GOTO_PREV_INPUTFLD (FN_EDIT + 48) /* go to previous inputfield */ - -#define FN_REPEAT_SEARCH (FN_EDIT + 50) /* Search again */ -#define FN_REPEAT_REPLACE (FN_EDIT + 51) /* Repeat replace */ -#define FN_UPDATE_GRAFIC (FN_EDIT + 53) /* Change graphic */ -#define FN_SETTAB_ATCURPOS (FN_EDIT + 54) /* Set Tab at the current position */ -#define FN_SET_LR_IND_ATCURPOS (FN_EDIT + 55) /* EZE and LR set */ -#define FN_FRMCNT_TO_BODY (FN_EDIT + 56) /* Frame content to text */ -#define FN_UPDATE_TOXBASE (FN_EDIT + 57) /* Next TOC list refresh */ - -#define FN_REPAGINATE (FN_EDIT + 61) /* Force repagination */ -#define FN_EDIT_FOOTNOTE (FN_EDIT + 62) /* Edit footnote */ - -#define FN_EDIT_REGION (FN_EDIT + 65) /* Edit region */ -#define FN_GOTO_REFERENCE (FN_EDIT + 66) /* From Refmark to the reference */ - -// already defined in SVX -#define FN_NEXT_BOOKMARK (FN_EDIT + 68) /* */ -#define FN_PREV_BOOKMARK (FN_EDIT + 69) /* */ - -/*Navigator ToolBoxes*/ -#define FN_SELECT_BOOKMARK (FN_EDIT + 70) /**/ -#define FN_ITEM_DOWN (FN_EDIT + 71) /**/ -#define FN_ITEM_LEFT (FN_EDIT + 72) /**/ -#define FN_ITEM_RIGHT (FN_EDIT + 73) /**/ -#define FN_ITEM_UP (FN_EDIT + 74) /**/ -#define FN_DOWN (FN_EDIT + 75) /**/ - -#define FN_SELECT_FOOTER (FN_EDIT + 77) /**/ -#define FN_SELECT_FRAME (FN_EDIT + 78) /**/ -#define FN_SELECT_HEADER (FN_EDIT + 79) /**/ -#define FN_PAGENUMBER (FN_EDIT + 80) /**/ -#define FN_SELECT_AUTO_BOOKMARK (FN_EDIT + 81) /**/ -#define FN_SELECT_FOOTNOTE (FN_EDIT + 82) /**/ -#define FN_SELECT_SET_AUTO_BOOKMARK (FN_EDIT + 83) /**/ -#define FN_SELECT_TABLE (FN_EDIT + 84) /**/ -#define FN_SELECT_INDEX (FN_EDIT + 85) /**/ -#define FN_UP (FN_EDIT + 86) /**/ - -#define FN_EDIT_HEADER_FOOTER (FN_EDIT + 95) /* Toggle headers/footers edition*/ -#define FN_SELECT_PARA (FN_EDIT + 97) /* select paragraph*/ - -#define FN_SELECT_CONTENT (FN_EDIT + 99) /* Navigator - Content Type */ - -#define FN_UPDATE_ALL_LINKS (FN_EDIT2 + 24) /* update all links */ - -#define FN_REDLINE_SHOW (FN_EDIT2 + 26) /* show Redlining */ -#define FN_REDLINE_COMMENT (FN_EDIT2 + 27) /* comment Redlining */ - -#define FN_UPDATE_ALL (FN_EDIT2 + 28) /* FN_UPDATE_ALL_LINKS, - FN_UPDATE_FIELDS, - FN_UPDATE_TOX, - CalcLayout */ - -#define FN_REDLINE_ACCEPT (FN_EDIT2 + 29) /* Redlining Accept/Reject */ -#define FN_ATTR_COLUMNS (FN_EDIT2 + 31) /* SlotId for SwFmtCol */ -#define FN_EDIT_CURRENT_TOX (FN_EDIT2 + 32) /* edit current index */ -#define FN_EDIT_AUTH_ENTRY_DLG (FN_EDIT2 + 33) /* edit authorities entry*/ -#define FN_UPDATE_CHARTS (FN_EDIT2 + 34) /* update all charts */ - -#define FN_EDIT_HYPERLINK (FN_EDIT2 + 35) /* edit hyperlink */ -#define FN_NUM_CONTINUE (FN_EDIT2 + 36) /* continue previous numbering */ -#define FN_REDLINE_ACCEPT_DIRECT (FN_EDIT2 + 37) /* accept redline at current position*/ -#define FN_REDLINE_REJECT_DIRECT (FN_EDIT2 + 38) /* reject redline at current position*/ -#define FN_REMOVE_HYPERLINK (FN_EDIT2 + 39) /* remove hyperlink attribute */ -#define FN_COPY_HYPERLINK_LOCATION (FN_EDIT2 + 40) /* copy hyperlink URL to clipboard */ - -/*-------------------------------------------------------------------- - Region: Edit - --------------------------------------------------------------------*/ - -#define FN_REFRESH_VIEW (FN_VIEW + 1) /* Refresh/Redraw */ -#define FN_SHOW_OUTLINE_VIEW (FN_VIEW + 2) /* Show outline */ - -#define FN_DRAW_WRAP_DLG (FN_VIEW + 3) /* Draw Umlauf-Dlg */ - -#define FN_RULER (FN_VIEW + 11) /* Horizontal ruler */ - -#define FN_VIEW_GRAPHIC (FN_VIEW + 13) /* View graphic */ -#define FN_VIEW_BOUNDS (FN_VIEW + 14) /* View bounds */ -#define FN_VIEW_FIELDS (FN_VIEW + 15) /* View fields */ -#define FN_VLINEAL (FN_VIEW + 16) /* Vertical Liner */ -#define FN_VSCROLLBAR (FN_VIEW + 17) /* Vertical Scrollbar */ -#define FN_HSCROLLBAR (FN_VIEW + 18) /* Horizontal Scrollbar */ -#define FN_TOOLBOX_TOGGLE (FN_VIEW + 19) /* Toggle toolbox */ -#define FN_VIEWOPTIONS_ON (FN_VIEW + 20) /* Viewoptions group on */ -#define FN_VIEWOPTIONS_OFF (FN_VIEW + 21) /* Viewoptions group off */ -#define FN_CONTROLS_ON (FN_VIEW + 22) /* Controls group on */ -#define FN_CONTROLS_OFF (FN_VIEW + 23) /* Controls group off */ - -#define FN_VIEW_META_CHARS (FN_VIEW + 24) /* View meta chars */ -#define FN_VIEW_MARKS (FN_VIEW + 25) /* View marks */ -#define FN_VIEW_FIELDNAME (FN_VIEW + 26) /* View field names */ -#define FN_VIEW_TABLEGRID (FN_VIEW + 27) /* View tablegrid */ - -#define FN_SET_PAGE (FN_VIEW + 29) /* Set page template to paragraph */ - -#define FN_TOOLBOX_SWITCH (FN_VIEW + 30) /* Shell switch to text */ - -// more Navigator -#define FN_CONTENT_LB (FN_VIEW + 32) /**/ -#define FN_SHOW_CONTENT_BOX (FN_VIEW + 33) /**/ -#define FN_SHOW_ROOT (FN_VIEW + 34) /**/ -#define FN_DROP_REGION (FN_VIEW + 35) /**/ -#define FN_OUTLINE_LEVEL (FN_VIEW + 36) /**/ - -#define FN_PRINT_LAYOUT (FN_VIEW + 37) /* print layout */ - -#define FN_DROP_REGION_LINK (FN_VIEW + 38) /**/ -#define FN_DROP_REGION_COPY (FN_VIEW + 39) /**/ - -#define FN_SCROLL_NAVIGATION (FN_VIEW + 40) /* Navigation Controller in the scrollbar */ -#define FN_SCROLL_NEXT_PREV (FN_VIEW + 41) /* processes MoveType */ - -#define FN_VIEW_HIDDEN_PARA (FN_VIEW + 42) /* View hidden paragraphs */ -#define FN_VIEW_SMOOTH_SCROLL (FN_VIEW + 43) - -#define FN_GLOBAL_SWITCH (FN_VIEW + 44) /* Toggle between Global and Content */ -#define FN_GLOBAL_EDIT (FN_VIEW + 45) /* edit */ -#define FN_GLOBAL_UPDATE (FN_VIEW + 46) /* update */ -#define FN_GLOBAL_OPEN (FN_VIEW + 47) /* open */ -#define FN_GLOBAL_SAVE_CONTENT (FN_VIEW + 48) /* save content of link */ -#define FN_CREATE_NAVIGATION (FN_VIEW + 49) /* create Navigations-Controller */ -#define FN_PREVIEW_ZOOM (FN_VIEW + 51) /* create table controller for zoom */ - -#define FN_SET_MODOPT_TBLNUMFMT (FN_VIEW + 52) /* Number recognition in tables */ -#define FN_HSCROLL_METRIC (FN_VIEW + 53) /* Metric horizontal scrollbar */ -#define FN_VSCROLL_METRIC (FN_VIEW + 54) /* Metric vertical scrollbar */ -#define FN_VIEW_NOTES (FN_VIEW + 55) - -/*-------------------------------------------------------------------- - Region: Insert - --------------------------------------------------------------------*/ - -#define FN_INSERT_BOOKMARK (FN_INSERT + 2 ) /* Bookmark */ - -#define FN_INSERT_BREAK_DLG (FN_INSERT + 4 ) /* Break */ -#define FN_INSERT_COLUMN_BREAK (FN_INSERT + 5 ) /* Column break */ -#define FN_INSERT_DATE_TIME (FN_INSERT + 6 ) /* Date / Time */ -#define FN_INSERT_FIELD (FN_INSERT + 8 ) /* Textbefehl */ -#define FN_CHANGE_DBFIELD (FN_INSERT + 9 ) /* Change the database field */ - -#define FN_INSERT_CAPTION (FN_INSERT + 10) /* Caption */ -#define FN_INSERT_DBFIELD (FN_INSERT + 11) /* Insert database field - for recording */ -#define FN_INSERT_FOOTNOTE_DLG (FN_INSERT + 12) /* Footnote Dialog */ - -#define FN_INSERT_REF_FIELD (FN_INSERT + 13) /* Insert Reference Field */ - -#define FN_INSERT_HYPERLINK (FN_INSERT + 14) /* Character dialogue / hyperlink page */ - -#define FN_INSERT_INDEX (FN_INSERT + 16) /* Index entry */ -#define FN_INSERT_INDEX_DLG (FN_INSERT + 17) /* Index entry */ -#define FN_INSERT_LINEBREAK (FN_INSERT + 18) /* Newline */ -#define FN_INSERT_FIELD_DATA_ONLY (FN_INSERT + 19) /* Field dialog for mail merge*/ -#define FN_INSERT_OBJECT (FN_INSERT + 21) /* Object */ -#define FN_INSERT_OBJECT_DLG (FN_INSERT + 22) /* Object */ -#define FN_INSERT_PAGEBREAK (FN_INSERT + 23) /* Page break*/ -#define FN_INSERT_PAGENO (FN_INSERT + 24) /* Page Number */ -#define FN_INSERT_PARAGRAPH (FN_INSERT + 25) /* Paragraph */ -#define FN_INSERT_RECORD (FN_INSERT + 26) /* Insert record */ -#define FN_MERGE_RECORD (FN_INSERT + 27) /* Merge record */ -#define FN_INSERT_SYMBOL (FN_INSERT + 28) /* Special characters */ -#define FN_POSTIT (FN_INSERT + 29) /* Insert/edit PostIt */ -#define FN_INSERT_TABLE (FN_INSERT + 30) /* Insert Table */ -#define FN_INSERT_STRING (FN_INSERT+31) -#define FN_INSERT_COLS (FN_INSERT + 32) /* Insert Columns */ -#define FN_INSERT_FRAME_INTERACT (FN_INSERT + 33) /* Insert interactive frame */ -#define FN_INSERT_FRAME (FN_INSERT + 34) /* Insert Frame */ - -#define FN_INSERT_IDX_ENTRY_DLG (FN_INSERT + 35) /* insert index entry */ -#define FN_INSERT_FRAME_INTERACT_NOCOL (FN_INSERT + 36) /*insert interactive non column frame*/ - -#define FN_TOOL_GROUP (FN_INSERT + 47) /* Group objects */ -#define FN_TOOL_UNGROUP (FN_INSERT + 48) /* Remove Grouping */ - -#define FN_TOOL_ANKER (FN_INSERT + 49) /* Draw Anchor for object */ -#define FN_TOOL_ANKER_PAGE (FN_INSERT + 50) /* anchor Draw object to page */ -#define FN_TOOL_ANKER_PARAGRAPH (FN_INSERT + 51) /* anchor Draw object to paragraph */ -#define FN_TOOL_HIERARCHIE (FN_INSERT + 52) /* change hierarchy */ - -#define FN_MAILMERGE_WIZARD (FN_INSERT + 64) /* mail merge wizard */ -#define FN_QRY_OPEN_TABLE (FN_INSERT + 65) /* open database (Basic) */ -#define FN_TOOL_ANKER_FRAME (FN_INSERT + 66) /* anchor Draw-Object to frame*/ -#define FN_QRY_MERGE (FN_INSERT + 67) /* insert record (serial letter) */ -#define FN_MAILMERGE_CHILDWINDOW (FN_INSERT + 68) /* back-to-mail-merge-wizard child window*/ -#define FN_INSERT_SMA (FN_INSERT + 69) /* insert StarMath */ - -#define FN_QRY_GET_COLUMN_NAME (FN_INSERT + 70) /* number of columns (Basic) */ -#define FN_QRY_GET_COLUMN_TYPE (FN_INSERT + 71) /* retrieve type of database field (Basic) */ -#define FN_QRY_GET_COLUMN_TEXT (FN_INSERT + 72) /* content of current record (Basic) */ -#define FN_QRY_DEL_DEFINED_DB (FN_INSERT + 75) /* delete database definition */ - -#define FN_DRAWTEXT_ATTR_DLG (FN_INSERT + 76) /* position DrawText */ - -#define FN_QRY_APPEND_RECORD (FN_INSERT + 77) /* append new record */ -#define FN_QRY_UPDATE_RECORD (FN_INSERT + 78) /* change record row */ -#define FN_QRY_DELETE_RECORD (FN_INSERT + 79) /* delete record */ -#define FN_QRY_GET_PHYS_RECORD_ID (FN_INSERT + 80) /* get physical (absolute) record number (Basic) */ - -#define FN_TOOL_ANKER_CHAR (FN_INSERT + 84) /* anchor Draw object to charater */ - -#define FN_QRY_INSERT (FN_INSERT + 86) /* insert record selection in to text */ -#define FN_QRY_MERGE_FIELD (FN_INSERT + 87) /* insert record selection into fields */ -#define FN_QRY_INSERT_FIELD (FN_INSERT + 88) /* insert database field */ - -#define FN_INSERT_CTRL (FN_INSERT + 89) /* toolbar controller insert*/ -#define FN_INSERT_OBJ_CTRL (FN_INSERT + 90) /* toolbar controller (insert/object) */ -#define FN_INSERT_FIELD_CTRL (FN_INSERT + 91) /* toolbar controller insert/field commands */ - -#define FN_INSERT_FLD_DATE (FN_INSERT + 92) -#define FN_INSERT_FLD_TIME (FN_INSERT + 93) -#define FN_INSERT_FLD_PGNUMBER (FN_INSERT + 94) -#define FN_INSERT_FLD_PGCOUNT (FN_INSERT + 95) -#define FN_INSERT_FLD_TOPIC (FN_INSERT + 96) -#define FN_INSERT_FLD_TITLE (FN_INSERT + 97) -#define FN_INSERT_FLD_AUTHOR (FN_INSERT + 98) -#define FN_INSERT_FOOTNOTE (FN_INSERT + 99) - -/*-------------------------------------------------------------------- - Region: Paste (Part 2) - --------------------------------------------------------------------*/ - -#define FN_QRY_GET_ALL_DBNAME (FN_INSERT2 + 1) /* retrieve all configured database names */ -#define FN_QRY_GET_DBNAME_COUNT (FN_INSERT2 + 2) /* retrieve number of all configured database names */ -#define FN_QRY_GET_TABLE_NAME (FN_INSERT2 + 3) /* retrieve table name of a database */ -#define FN_QRY_GET_TABLE_COUNT (FN_INSERT2 + 4) /* retrieve number of tables of a database */ -#define FN_MAILMERGE_SENDMAIL_CHILDWINDOW (FN_INSERT2 + 5) /* child window provided by mailmerge */ - -#define FN_SBA_BRW_UPDATE (FN_INSERT2 + 7) /* insert records into fields */ -#define FN_SBA_BRW_INSERT (FN_INSERT2 + 8) /* insert records into text */ -#define FN_SBA_BRW_MERGE (FN_INSERT2 + 9) /* serial letter print */ -#define FN_JAVAEDIT (FN_INSERT2 + 10) /* edit script field */ -#define FN_INSERT_HRULER (FN_INSERT2 + 11) /* insert horizontal ruler */ -#define FN_TOOL_ANKER_AT_CHAR (FN_INSERT2 + 12) /* anchor object to character*/ - -#define FN_INSERT_PAGEHEADER (FN_INSERT2 + 13) /* insert default header */ -#define FN_INSERT_PAGEFOOTER (FN_INSERT2 + 14) /* insert default footer */ - -#define FN_INSERT_ENDNOTE (FN_INSERT2 + 18) /* insert endnote*/ -#define FN_INSERT_REGION (FN_INSERT2 + 19) /* Insert section */ - -#define FN_INSERT_MULTI_TOX (FN_INSERT2 + 20) /* insert any TOX */ -#define FN_INSERT_AUTH_ENTRY_DLG (FN_INSERT2 + 21) /* insert entry for table of authorities*/ - -/*-------------------------------------------------------------------- - Region: Format - --------------------------------------------------------------------*/ - -#define FN_AUTOFORMAT_APPLY (FN_FORMAT + 1 ) /* apply autoformat options */ -#define FN_AUTOFORMAT_AUTO (FN_FORMAT + 2 ) /* apply autoformat during user input */ -#define FN_GROW_FONT_SIZE (FN_FORMAT + 3 ) /* size */ -#define FN_SHRINK_FONT_SIZE (FN_FORMAT + 4 ) /* size */ -#define FN_UNDERLINE_DOUBLE (FN_FORMAT + 5 ) /* double underline */ -#define FN_AUTOFORMAT_REDLINE_APPLY (FN_FORMAT + 6 ) /* apply autoformat with Redlining */ -#define FN_SET_SUPER_SCRIPT (FN_FORMAT + 11) /* superscript */ -#define FN_SET_SUB_SCRIPT (FN_FORMAT + 12) /* subscript */ - -#define FN_SET_CASEMAP (FN_FORMAT + 14) /* CaseMap */ -#define FN_SET_LANGUAGE (FN_FORMAT + 15) /* language */ -#define FN_SET_KERNING (FN_FORMAT + 16) /* Kerning */ - -#define FN_INDENT_TO_TABSTOP (FN_FORMAT + 17) /* indent to tabstop */ -#define FN_FLIP_HORZ_GRAFIC (FN_FORMAT + 25) /* mirror horizontally */ -#define FN_FLIP_VERT_GRAFIC (FN_FORMAT + 26) /* mirror vertically */ -#define FN_SET_LINE_SPACE (FN_FORMAT + 27) /* parametrized line distance */ -#define FN_SET_ADJUST (FN_FORMAT + 28) /* parametrized alignemnt */ -#define FN_SET_LRMARGIN (FN_FORMAT + 29) /* left/right margin */ -#define FN_SET_ULMARGIN (FN_FORMAT + 30) /* upper/lower margin */ -#define FN_UNINDENT_TO_TABSTOP (FN_FORMAT + 31) /* indent to previous tabstop */ - -#define FN_SET_HYPHEN_ZONE (FN_FORMAT + 32) /* hyphenation */ -#define FN_SET_KEEP_TOGETHER (FN_FORMAT + 34) /* no hyphenation */ -#define FN_SET_KEEP_WITH_NEXT (FN_FORMAT + 35) /* keep together with following */ -#define FN_SET_WIDOW (FN_FORMAT + 36) /* Widows */ -#define FN_SET_ORPHAN (FN_FORMAT + 37) /* Orphans */ - -#define FN_REGISTER_COLLECTION (FN_FORMAT + 43) /* Referenzvorlage an der Seite */ -#define FN_REGISTER_MODE (FN_FORMAT + 44) /* Register mode on/off */ -#define FN_NUM_FORMAT_TABLE_DLG (FN_FORMAT + 45) /* number format in table */ -#define FN_FORMAT_BORDER_DLG (FN_FORMAT + 48) /* */ -#define FN_FORMAT_PAGE_COLUMN_DLG (FN_FORMAT + 49) /* columns per page */ -#define FN_FORMAT_BACKGROUND_DLG (FN_FORMAT + 50) /* background */ -#define FN_FORMAT_PAGE (FN_FORMAT + 51) /* page */ -#define FN_FORMAT_PAGE_DLG (FN_FORMAT + 52) /* page */ -#define FN_FORMAT_COLUMN (FN_FORMAT + 53) /* columns */ -#define FN_FORMAT_DROPCAPS (FN_FORMAT + 54) /* initials */ -#define FN_FORMAT_FRAME (FN_FORMAT + 55) /* frame */ -#define FN_FORMAT_FRAME_DLG (FN_FORMAT + 56) /* frame */ -#define FN_FORMAT_GRAFIC (FN_FORMAT + 57) /* graphic */ -#define FN_FORMAT_GRAFIC_DLG (FN_FORMAT + 58) /* graphic */ -#define FN_FORMAT_TABLE (FN_FORMAT + 59) /* table */ -#define FN_FORMAT_TABLE_DLG (FN_FORMAT + 60) /* table */ -#define FN_FORMAT_OLE_DLG (FN_FORMAT + 61) /* edit OLE */ - -#define FN_NEW_STYLE_BY_EXAMPLE (FN_FORMAT + 62) /* create style by example */ -#define FN_UPDATE_STYLE_BY_EXAMPLE (FN_FORMAT + 63) /* update style */ -#define FN_STYLE_SHEET_FRAME_DLG (FN_FORMAT + 64) /* frame style */ -#define FN_STYLE_SHEET_DOC_DLG (FN_FORMAT + 65) /* document style */ -#define FN_STYLE_SHEET_GRAFIK_DLG (FN_FORMAT + 66) /* document style */ -#define FN_FORMAT_FOOTNOTE (FN_FORMAT + 67) /* footnotes */ -#define FN_FORMAT_FOOTNOTE_DLG (FN_FORMAT + 68) /* footnote dialog */ - -// already defined in Svx -//#define FN_FORMAT_RESET (FN_FORMAT + 69) - -#define FN_FRAME_TO_TOP (FN_FORMAT + 70) -#define FN_FRAME_TO_BOTTOM (FN_FORMAT + 71) - -#define FN_FRAME_NOWRAP (FN_FORMAT + 72) -#define FN_FRAME_WRAP (FN_FORMAT + 73) -#define FN_FRAME_WRAPTHRU (FN_FORMAT + 74) - -#define FN_FRAME_ALIGN_HORZ_LEFT (FN_FORMAT + 75) -#define FN_FRAME_ALIGN_HORZ_RIGHT (FN_FORMAT + 76) -#define FN_FRAME_ALIGN_HORZ_CENTER (FN_FORMAT + 77) -#define FN_FRAME_ALIGN_VERT_TOP (FN_FORMAT + 78) -#define FN_FRAME_ALIGN_VERT_BOTTOM (FN_FORMAT + 79) -#define FN_FRAME_ALIGN_VERT_CENTER (FN_FORMAT + 80) - -#define FN_SET_FRM_POSITION (FN_FORMAT + 82)/* frame position -- " -- */ -#define FN_SET_FRM_OPTIONS (FN_FORMAT + 86)/* frame position -- " -- */ - -#define FN_SET_PAGE_STYLE (FN_FORMAT + 93) /* apply page style */ - -#define FN_FORMAT_TITLEPAGE_DLG (FN_FORMAT + 98) /* Title Page */ - -#define FN_TABLE_REP (FN_FORMAT + 99) /* TableRepresentation */ -#define FN_CONVERT_TEXT_TABLE (FN_FORMAT + 100) /* convert text <-> table */ -#define FN_TABLE_INSERT_ROW (FN_FORMAT + 101) /* */ -#define FN_TABLE_INSERT_COL (FN_FORMAT + 102) /* */ -#define FN_TABLE_DELETE_ROW (FN_FORMAT + 103) /* */ -#define FN_TABLE_DELETE_COL (FN_FORMAT + 104) /* */ -#define FN_TABLE_SPLIT_CELLS (FN_FORMAT + 105) /* */ -#define FN_TABLE_MERGE_CELLS (FN_FORMAT + 106) /* */ -#define FN_TABLE_SET_ROW_HEIGHT (FN_FORMAT + 107) /* */ -#define FN_TABLE_SET_COL_WIDTH (FN_FORMAT + 108) /* */ -#define FN_TABLE_SET_ULSPACE (FN_FORMAT + 109) /* table: set upper / lower offset */ -#define FN_OPTIMIZE_TABLE (FN_FORMAT + 110) /* ToolBoxItem for optimizing tables */ -#define FN_TABLE_SET_SHADOW (FN_FORMAT + 111) /* */ -#define FN_TABLE_GOTO_CELL (FN_FORMAT + 112) /* */ -#define FN_TABLE_SELECT_ROW (FN_FORMAT + 113) /* */ -#define FN_TABLE_SELECT_COL (FN_FORMAT + 114) /* */ -#define FN_TABLE_SELECT_ALL (FN_FORMAT + 115) /* */ -#define FN_TABLE_SET_READ_ONLY (FN_FORMAT + 116) /* protect table */ -#define FN_TABLE_SET_READ_ONLY_CELLS (FN_FORMAT + 117) /* protect table cells */ -#define FN_TABLE_UNSET_READ_ONLY_CELLS (FN_FORMAT + 119) /* undo table cell protection */ -#define FN_TABLE_HEADLINE_REPEAT (FN_FORMAT + 120) /* also used in SwXTextTable*/ -#define FN_TABLE_ADJUST_CELLS (FN_FORMAT + 121) /* */ - -#define FN_FRAME_UP (FN_FORMAT + 122) /* frame by one level up */ -#define FN_FRAME_DOWN (FN_FORMAT + 123) /* frame by one level down */ - -#define FN_TABLE_INSERT_CHART (FN_FORMAT + 124) - -#define FN_SET_FRM_LRSPACE (FN_FORMAT + 125) /* frame page offset */ -#define FN_SET_FRM_ULSPACE (FN_FORMAT + 126) /* frame head-/foot offset */ -#define FN_TABLE_SET_LRSPACE (FN_FORMAT + 127) /* Tabelle: linker / rechter Abstand einstellen */ -#define FN_TABLE_OPTIMAL_HEIGHT (FN_FORMAT + 128) /* optimal cell height */ -#define FN_TABLE_DELETE_TABLE (FN_FORMAT + 129) /* remove current table*/ -#define FN_TABLE_SELECT_CELL (FN_FORMAT + 130) /* selects the current table cell */ -#define FN_CONVERT_TEXT_TO_TABLE (FN_FORMAT + 131) /* convert selected text to table */ -#define FN_CONVERT_TABLE_TO_TEXT (FN_FORMAT + 132) /* convert a table to text */ -#define FN_TABLE_SORT_DIALOG (FN_FORMAT + 133) /* sorting in tables*/ - -/*-------------------------------------------------------------------- - Region: Page Template - --------------------------------------------------------------------*/ -#define FN_NEW_PAGE_STYLE (FN_FORMAT + 129) /* create page style */ -#define FN_PAGE_STYLE_SET_LR_MARGIN (FN_FORMAT + 130) /* left / right margin */ -#define FN_PAGE_STYLE_SET_UL_MARGIN (FN_FORMAT + 131) /* upper / lower margin */ -#define FN_PAGE_STYLE_SET_PAGE (FN_FORMAT + 134) /* */ -#define FN_PAGE_STYLE_SET_PAPER_SIZE (FN_FORMAT + 135) /* */ -#define FN_PAGE_STYLE_SET_PAPER_BIN (FN_FORMAT + 136) /* paper tray */ -#define FN_PAGE_STYLE_SET_NUMBER_FORMAT (FN_FORMAT + 137) /* */ -#define FN_PAGE_STYLE_SET_COLS (FN_FORMAT + 138) /* number of columns */ - -/* these Ids are only required by Help and are replaced by the Ids without _DLG - * for the dialog */ -#define FN_TABLE_INSERT_COL_DLG (FN_FORMAT + 142) /* */ -#define FN_TABLE_INSERT_ROW_DLG (FN_FORMAT + 143) /* */ - -#define FN_GOTO_NEXT_CELL (FN_FORMAT + 145) /* Table: go to next cell */ -#define FN_GOTO_PREV_CELL (FN_FORMAT + 146) /* Table: go to previous cell */ - -#define FN_TABLE_HEADLINE_COUNT (FN_FORMAT + 147) /* number of repeated headlines of tables */ - -/*-------------------------------------------------------------------- - Region: Ribbon - --------------------------------------------------------------------*/ - -#define FN_SET_BACKGROUND_COLOR (FN_FORMAT + 150) /* */ - -#define FN_SET_BORDER_POS (FN_FORMAT + 152) /* */ -#define FN_SET_BORDER_LINES (FN_FORMAT + 153) /* */ -#define FN_SET_BORDER_COLOR (FN_FORMAT + 154) /* */ - -#define FN_FORMULA_CALC (FN_FORMAT + 156) /* select formula */ -#define FN_FORMULA_CANCEL (FN_FORMAT + 157) /* don't apply formula */ -#define FN_FORMULA_APPLY (FN_FORMAT + 158) /* apply formula */ - -#define FN_TABLE_UNSET_READ_ONLY (FN_FORMAT + 159) /* undo cell protection for table */ - -#define FN_FORMULA_POSITION (FN_FORMAT + 160) /* position display*/ -#define FN_FORMULA_EDIT (FN_FORMAT + 161) /* edit-field */ - -#define FN_FRAME_WRAP_IDEAL (FN_FORMAT + 163) /* frame ideal wrapping */ -#define FN_FRAME_WRAPTHRU_TRANSP (FN_FORMAT + 164) /* frame transparent wrapping */ - -#define FN_FRAME_ALIGN_VERT_ROW_TOP (FN_FORMAT + 165) /* */ -#define FN_FRAME_ALIGN_VERT_ROW_BOTTOM (FN_FORMAT + 166) /* */ -#define FN_FRAME_ALIGN_VERT_ROW_CENTER (FN_FORMAT + 167) /* */ - -#define FN_FRAME_ALIGN_VERT_CHAR_TOP (FN_FORMAT + 168) /* */ -#define FN_FRAME_ALIGN_VERT_CHAR_BOTTOM (FN_FORMAT + 169) /* */ -#define FN_FRAME_ALIGN_VERT_CHAR_CENTER (FN_FORMAT + 170) /* */ - -#define FN_TABLE_SET_DEF_BORDER (FN_FORMAT + 171) /* set predefined border */ - -#define FN_FRAME_WRAP_LEFT (FN_FORMAT + 172) /* */ -#define FN_FRAME_WRAP_RIGHT (FN_FORMAT + 173) /* */ - -#define FN_TABLE_SET_ROW_AUTOHEIGHT (FN_FORMAT + 174) /* table: set minimal automatic row height */ - -#define FN_WRAP_ANCHOR_ONLY (FN_FORMAT + 181) /* wrap only for first paragraph */ - -#define FN_TABLE_BALANCE_CELLS (FN_FORMAT + 182) /* evenly distribute columns */ -#define FN_TABLE_BALANCE_ROWS (FN_FORMAT + 183) /* evenly distribute rows */ - -#define FN_FRAME_WRAP_CONTOUR (FN_FORMAT + 184) /* */ - -#define FN_TABLE_VERT_NONE (FN_FORMAT + 185) /* vertical alignment in table cells */ -#define FN_TABLE_VERT_CENTER (FN_FORMAT + 186) /* -"- */ -#define FN_TABLE_VERT_BOTTOM (FN_FORMAT + 187) /* -"- */ -#define FN_TABLE_SET_VERT_ALIGN (FN_FORMAT + 188) /* -"- */ -#define FN_TABLE_MODE_FIX (FN_FORMAT + 189) /* table mode */ -#define FN_TABLE_MODE_FIX_PROP (FN_FORMAT + 190) /* -"- */ -#define FN_TABLE_MODE_VARIABLE (FN_FORMAT + 191) /* -"- */ -#define FN_TABLE_BOX_TEXTDIRECTION (FN_FORMAT + 192) /* text direction of table cells */ - -#define FN_TABLE_AUTOSUM (FN_FORMAT + 195) /* */ -#define FN_SET_CONTROL_HANDLER (FN_FORMAT + 199) /* set macro */ - -#define FN_IS_IMAGE (FN_FORMAT2 + 6) /* numbering: with graphic? */ - -#define FN_GOTO_NEXT_REGION (FN_FORMAT2 + 9) /* */ -#define FN_GOTO_PREV_REGION (FN_FORMAT2 + 10) /* */ - -#define FN_GET_SBXCONTROL (FN_FORMAT2 + 11) /* */ -#define FN_ABSTRACT_NEWDOC (FN_FORMAT2 + 12) /* abstract in new document */ -#define FN_ABSTRACT_STARIMPRESS (FN_FORMAT2 + 13) /* abstract to StarImpress */ - -#define FN_NAME_SHAPE (FN_FORMAT2 + 14) /* Name shapes */ - -#define FN_TITLE_DESCRIPTION_SHAPE (FN_FORMAT2 + 15) /* shape title and description */ - -#define FN_NUMBER_FORMAT (FN_FORMAT2 + 120) /* set Boxen/NumberFormatter */ -#define FN_NUMBER_STANDARD (FN_FORMAT2 + 121) -#define FN_NUMBER_TWODEC (FN_FORMAT2 + 123) -#define FN_NUMBER_SCIENTIFIC (FN_FORMAT2 + 124) -#define FN_NUMBER_DATE (FN_FORMAT2 + 125) -#define FN_NUMBER_TIME (FN_FORMAT2 + 126) -#define FN_NUMBER_CURRENCY (FN_FORMAT2 + 127) -#define FN_NUMBER_PERCENT (FN_FORMAT2 + 128) - -#define FN_EXPORT_OLE (FN_FORMAT2 + 129) /* Export menu item */ -#define FN_EXPORT_OLE_AS_PDF (FN_FORMAT2 + 130) /* Export as PDF */ -#define FN_EXPORT_OLE_AS_GRAPHIC (FN_FORMAT2 + 131) /* Export as JPG */ - -#define FN_FRAME_CHAIN (FN_FORMAT2 + 136) -#define FN_FRAME_UNCHAIN (FN_FORMAT2 + 137) - -#define FN_NUMBER_NEWSTART (FN_FORMAT2 + 138) -#define FN_NUMBER_NEWSTART_AT (FN_FORMAT2 + 139) - -#define FN_FRAME_MIRROR_ON_EVEN_PAGES (FN_FORMAT2 + 140) -#define FN_GRAPHIC_MIRROR_ON_EVEN_PAGES (FN_FORMAT2 + 141) - -#define FN_TABLE_SPLIT_TABLE (FN_FORMAT2 + 142) -#define FN_SYNC_LABELS (FN_FORMAT2 + 143) - -#define FN_FORMAT_LINENUMBER (FN_FORMAT2 + 144) - -#define FN_TABLE_RELATIVE_WIDTH (FN_FORMAT2 + 147) /* UNO */ -#define FN_TABLE_WIDTH (FN_FORMAT2 + 148) /* UNO */ -#define FN_TABLE_IS_RELATIVE_WIDTH (FN_FORMAT2 + 149) /* UNO */ - -#define FN_INC_INDENT_OFFSET (FN_FORMAT2 + 150) -#define FN_DEC_INDENT_OFFSET (FN_FORMAT2 + 151) - -#define FN_TABLE_MERGE_TABLE (FN_FORMAT2 + 152) -#define FN_TABLE_ROW_SPLIT (FN_FORMAT2 + 153) - -#define FN_FORMAT_APPLY_HEAD1 (FN_FORMAT2 + 154) -#define FN_FORMAT_APPLY_HEAD2 (FN_FORMAT2 + 155) -#define FN_FORMAT_APPLY_HEAD3 (FN_FORMAT2 + 156) -#define FN_FORMAT_APPLY_DEFAULT (FN_FORMAT2 + 157) -#define FN_FORMAT_APPLY_TEXTBODY (FN_FORMAT2 + 158) -#define FN_REMOVE_DIRECT_CHAR_FORMATS (FN_FORMAT2 + 159) - -#define FN_SAVE_GRAPHIC (FN_FORMAT2 + 160) - -/*-------------------------------------------------------------------- - Region: Extras - --------------------------------------------------------------------*/ - -#define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* */ -#define FN_HYPHENATE_OPT_DLG (FN_EXTRA + 5 ) /* */ -#define FN_ADD_UNKNOWN (FN_EXTRA + 6 ) /* learn words */ -#define FN_DICTIONARY_DLG (FN_EXTRA + 8 ) /* dictionaries */ -#define FN_NUMBERING (FN_EXTRA + 9 ) /* numbering/bullets*/ -#define FN_NUMBERING_DLG (FN_EXTRA + 10) /* numbering/bullets */ -#define FN_NUMBERING_OUTLINE (FN_EXTRA + 11) /* */ -#define FN_NUMBERING_OUTLINE_DLG (FN_EXTRA + 12) /* */ -#define FN_SORTING_DLG (FN_EXTRA + 14) /* */ -#define FN_CALCULATE (FN_EXTRA + 15) /* */ -#define FN_GENERATE_TOC_DLG (FN_EXTRA + 16) /* table of contents */ -#define FN_GENERATE_INDEX_DLG (FN_EXTRA + 17) /* index */ -#define FN_GENERATE_DIR_DLG (FN_EXTRA + 18) /* */ -#define FN_GLOSSARY_DLG (FN_EXTRA + 20) /* text building blocks */ -#define FN_MACRO_CHOOSER (FN_EXTRA + 21) /* record macro */ - -#define FN_PLAY_MACRO (FN_EXTRA + 23) /* run macro */ -#define FN_LAUNCH_BASIC (FN_EXTRA + 25) /* run macro */ -#define FN_EXPAND_GLOSSARY (FN_EXTRA + 28) /* expand text building blocks */ -#define FN_CONFIG_TOOLBOX (FN_EXTRA + 29) /* configure toolbox*/ -#define FN_CONFIG_MENU (FN_EXTRA + 30) /* configure menu */ -#define FN_CONFIG_KEY (FN_EXTRA + 31) /* configure keyboard */ -#define FN_CHANGE_PAGENUM (FN_EXTRA + 34) /* change page numbers*/ - -#define FN_MACRO_POPUP (FN_EXTRA + 37) /* all macro functions*/ -#define FN_BULLET (FN_EXTRA + 38) /* bullet list */ - -// Region: Glossary - -#define FN_AUTO_CORRECT (FN_EXTRA + 49 ) /* Autocorrect from Basic */ - -#define FN_UPDATE_TOX (FN_EXTRA + 53) /* update all indices */ -#define FN_UPDATE_CUR_TOX (FN_EXTRA + 54) /* update current index */ -#define FN_REMOVE_CUR_TOX (FN_EXTRA + 55) /* remove the current TOX*/ - -#define FN_NAVIGATION_PI_GOTO_PAGE (FN_EXTRA + 59 ) /* goto page from navigation-PI */ - -#define FN_LETTER_WIZZARD (FN_EXTRA + 60 ) -#define FN_FAX_WIZZARD (FN_EXTRA + 61 ) -#define FN_MEMO_WIZZARD (FN_EXTRA + 62 ) -#define FN_AGENDA_WIZZARD (FN_EXTRA + 63 ) - -#define FN_SET_BASIC_METRIC (FN_EXTRA + 80) /* set default metric Basic */ - -#define FN_RESERVED_9 (FN_EXTRA + 86) /* place holder */ -#define FN_RESERVED_8 (FN_EXTRA + 87) /* place holder */ -#define FN_RESERVED_7 (FN_EXTRA + 88) /* place holder */ -#define FN_RESERVED_6 (FN_EXTRA + 89) /* place holder */ -#define FN_RESERVED_5 (FN_EXTRA + 90) /* place holder */ -#define FN_RESERVED_4 (FN_EXTRA + 91) /* place holder */ -#define FN_RESERVED_3 (FN_EXTRA + 92) /* place holder */ -#define FN_RESERVED_2 (FN_EXTRA + 93) /* place holder */ -#define FN_RESERVED_1 (FN_EXTRA + 94) /* place holder */ - -#define FN_COLLECTION_GROUP_CNT (FN_EXTRA + 96) -#define FN_COLLECTION_GROUP_IDX (FN_EXTRA + 97) -#define FN_COLL_TYPE (FN_EXTRA + 98) /* type for GlobalDoc-Collection*/ -#define FN_COLL_ADD (FN_EXTRA + 99) - -#define FN_COLL_TITLE (FN_EXTRA2 + 1) /* area name or index title */ -#define FN_SHADOWCURSOR (FN_EXTRA2 + 4) /* enable/disable Shadow Cursor */ - -#define FN_VIEW_IN_FRAME (FN_EXTRA2 + 8) /* the view is in a FrameDoc */ - -#define FN_UNO_PARA_STYLE (FN_EXTRA2 + 9) // starting here are UNI-Ids for the PropertyMap listed -#define FN_UNO_PAGE_STYLE (FN_EXTRA2 + 10) - -#define FN_UNO_FRAME_STYLE_NAME (FN_EXTRA2 + 12) -#define FN_UNO_NUM_START_VALUE (FN_EXTRA2 + 13) -#define FN_UNO_NUM_LEVEL (FN_EXTRA2 + 14) -#define FN_UNO_NUM_RULES (FN_EXTRA2 + 15) -#define FN_UNO_DOCUMENT_INDEX_MARK (FN_EXTRA2 + 16) -#define FN_UNO_DOCUMENT_INDEX (FN_EXTRA2 + 17) -#define FN_UNO_TEXT_FIELD (FN_EXTRA2 + 18) -#define FN_UNO_TEXT_TABLE (FN_EXTRA2 + 19) -#define FN_UNO_CELL (FN_EXTRA2 + 20) -#define FN_UNO_TEXT_FRAME (FN_EXTRA2 + 21) -#define FN_UNO_REFERENCE_MARK (FN_EXTRA2 + 22) -#define FN_UNO_TEXT_SECTION (FN_EXTRA2 + 23) -#define FN_UNO_FOOTNOTE (FN_EXTRA2 + 24) -#define FN_UNO_ENDNOTE (FN_EXTRA2 + 25) -#define FN_UNO_RANGE_COL_LABEL (FN_EXTRA2 + 26) -#define FN_UNO_RANGE_ROW_LABEL (FN_EXTRA2 + 27) -#define FN_UNO_TABLE_COLUMS (FN_EXTRA2 + 28) -#define FN_UNO_TABLE_BORDER (FN_EXTRA2 + 29) -#define FN_UNO_TABLE_COLUMN_SEPARATORS (FN_EXTRA2 + 30) -#define FN_UNO_TABLE_COLUMN_RELATIVE_SUM (FN_EXTRA2 + 31) -#define FN_UNO_TABLE_CELL_BACKGROUND (FN_EXTRA2 + 32) -#define FN_UNO_ROW_HEIGHT (FN_EXTRA2 + 33) -#define FN_UNO_ROW_AUTO_HEIGHT (FN_EXTRA2 + 34) -#define FN_UNO_HEADER (FN_EXTRA2 + 35) -#define FN_UNO_HEADER_LEFT (FN_EXTRA2 + 36) -#define FN_UNO_HEADER_RIGHT (FN_EXTRA2 + 37) -#define FN_UNO_FOOTER (FN_EXTRA2 + 38) -#define FN_UNO_FOOTER_LEFT (FN_EXTRA2 + 39) -#define FN_UNO_FOOTER_RIGHT (FN_EXTRA2 + 40) -#define FN_UNO_HEADER_BACKGROUND (FN_EXTRA2 + 41) -#define FN_UNO_HEADER_BOX (FN_EXTRA2 + 42) -#define FN_UNO_HEADER_LR_SPACE (FN_EXTRA2 + 43) -#define FN_UNO_HEADER_SHADOW (FN_EXTRA2 + 44) -#define FN_UNO_FOOTER_BACKGROUND (FN_EXTRA2 + 45) -#define FN_UNO_FOOTER_BOX (FN_EXTRA2 + 46) -#define FN_UNO_FOOTER_LR_SPACE (FN_EXTRA2 + 47) -#define FN_UNO_FOOTER_SHADOW (FN_EXTRA2 + 48) -#define FN_UNO_HEADER_BODY_DISTANCE (FN_EXTRA2 + 49) -#define FN_UNO_HEADER_IS_DYNAMIC_DISTANCE (FN_EXTRA2 + 50) -#define FN_UNO_FOOTER_BODY_DISTANCE (FN_EXTRA2 + 51) -#define FN_UNO_FOOTER_IS_DYNAMIC_DISTANCE (FN_EXTRA2 + 52) -#define FN_UNO_HEADER_SHARE_CONTENT (FN_EXTRA2 + 53) -#define FN_UNO_FOOTER_SHARE_CONTENT (FN_EXTRA2 + 54) -#define FN_UNO_HEADER_HEIGHT (FN_EXTRA2 + 55) -#define FN_UNO_FOOTER_HEIGHT (FN_EXTRA2 + 56) -#define FN_UNO_HEADER_ON (FN_EXTRA2 + 57) -#define FN_UNO_FOOTER_ON (FN_EXTRA2 + 58) -#define FN_UNO_FOLLOW_STYLE (FN_EXTRA2 + 59) - -#define FN_API_CALL (FN_EXTRA2 + 60) - -#define FN_UNO_IS_PHYSICAL (FN_EXTRA2 + 61) -#define FN_UNO_IS_AUTO_UPDATE (FN_EXTRA2 + 62) -#define FN_UNO_DISPLAY_NAME (FN_EXTRA2 + 63) - -#define FN_UNO_WRAP (FN_EXTRA2 + 64) -#define FN_UNO_ANCHOR_TYPES (FN_EXTRA2 + 65) -#define FN_UNO_PARA_CHAPTER_NUMBERING_LEVEL (FN_EXTRA2 + 66) -#define FN_UNO_PARA_CONDITIONAL_STYLE_NAME (FN_EXTRA2 + 67) - -#define FN_UNO_CATEGORY (FN_EXTRA2 + 68) -#define FN_UNO_IS_NUMBER (FN_EXTRA2 + 69) -#define FN_UNO_TEXT_WRAP (FN_EXTRA2 + 70) -#define FN_UNO_ANCHOR_TYPE (FN_EXTRA2 + 71) -#define FN_SKIP_HIDDEN_TEXT (FN_EXTRA2 + 72) -#define FN_SKIP_PROTECTED_TEXT (FN_EXTRA2 + 73) -#define FN_UNO_Z_ORDER (FN_EXTRA2 + 74) -#define FN_UNO_REDLINE_NODE_START (FN_EXTRA2 + 75) -#define FN_UNO_REDLINE_NODE_END (FN_EXTRA2 + 76) -#define FN_UNO_TEXT_PORTION_TYPE (FN_EXTRA2 + 77) -#define FN_UNO_CONTROL_CHARACTER (FN_EXTRA2 + 78) -#define FN_UNO_BOOKMARK (FN_EXTRA2 + 79) -#define FN_UNO_IS_COLLAPSED (FN_EXTRA2 + 80) -#define FN_UNO_IS_START (FN_EXTRA2 + 81) -#define FN_UNO_IS_AUTOMATIC_CONTOUR (FN_EXTRA2 + 82) -#define FN_UNO_IS_PIXEL_CONTOUR (FN_EXTRA2 + 83) -#define FN_UNO_ALTERNATIVE_TEXT (FN_EXTRA2 + 84) -#define FN_UNO_ACTUAL_SIZE (FN_EXTRA2 + 85) -#define FN_UNO_GRAPHIC_U_R_L (FN_EXTRA2 + 86) -#define FN_UNO_GRAPHIC_FILTER (FN_EXTRA2 + 87) -#define FN_UNO_CELL_NAME (FN_EXTRA2 + 88) -#define FN_INSERT_GLOSSARY (FN_EXTRA2 + 89) -#define FN_NEW_GLOSSARY (FN_EXTRA2 + 90) -#define FN_SET_ACT_GLOSSARY (FN_EXTRA2 + 91) - -#define FN_UNO_HEADER_EAT_SPACING (FN_EXTRA2 + 92) -#define FN_UNO_FOOTER_EAT_SPACING (FN_EXTRA2 + 93) -#define FN_UNO_CHARFMT_SEQUENCE (FN_EXTRA2 + 94) -#define FN_UNO_CLSID (FN_EXTRA2 + 95) -#define FN_UNO_MODEL (FN_EXTRA2 + 96) -#define FN_UNO_COMPONENT (FN_EXTRA2 + 97) -#define FN_WORDCOUNT_DIALOG (FN_EXTRA2 + 98) - -#define FN_XFORMS_DESIGN_MODE (FN_EXTRA2 + 100) - -#define FN_UNO_PARA_STYLE_CONDITIONS (FN_EXTRA2 + 101) -#define FN_UNO_GRAPHIC (FN_EXTRA2 + 102) - -#define FN_UNO_REPLACEMENT_GRAPHIC_URL (FN_EXTRA2 + 102) -#define FN_UNO_CELL_ROW_SPAN (FN_EXTRA2 + 103) -#define FN_UNO_TABLE_BORDER_DISTANCES (FN_EXTRA2 + 104) -#define FN_SPELL_GRAMMAR_DIALOG (FN_EXTRA2 + 105) -#define FN_UNO_STREAM_NAME (FN_EXTRA2 + 106) -#define FN_UNO_LIST_ID (FN_EXTRA2 + 107) -#define FN_UNO_REPLACEMENT_GRAPHIC (FN_EXTRA2 + 108) - -#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) -#define FN_UNO_META (FN_EXTRA2 + 112) -#define FN_UNO_NESTED_TEXT_CONTENT (FN_EXTRA2 + 113) -/* Edit Graphic with External Tool */ -#define FN_EXTERNAL_EDIT (FN_EXTRA2 + 114) - -/* Navigation buttons */ -#define FN_NAVIGATION_BACK (FN_EXTRA2 + 115) -#define FN_NAVIGATION_FORWARD (FN_EXTRA2 + 116) - - -// #i972: bool items to be passed to SwFrmPage for evaluation -#define FN_OLE_IS_MATH (FN_EXTRA2 + 114) -#define FN_MATH_BASELINE_ALIGNMENT (FN_EXTRA2 + 115) - -#define FN_EMBEDDED_OBJECT (FN_EXTRA2 + 116) - -/*------------------------------------------------ -------------------- - Area: Help - -------------------------------------------------- ------------------*/ -/*------------------------------------------------ -------------------- - Region: Traveling & Selection - -------------------------------------------------- ------------------*/ -#define FN_CHAR_LEFT (FN_SELECTION + 1 ) /* */ -#define FN_CHAR_RIGHT (FN_SELECTION + 2 ) /* */ -#define FN_LINE_UP (FN_SELECTION + 3 ) /* */ -#define FN_LINE_DOWN (FN_SELECTION + 4 ) /* */ -#define FN_START_OF_LINE (FN_SELECTION + 5 ) /* StartOfLine */ -#define FN_END_OF_LINE (FN_SELECTION + 6 ) /* EndOfLine */ -#define FN_START_OF_DOCUMENT (FN_SELECTION + 7 ) /* StartOfDocument */ -#define FN_START_OF_NEXT_PAGE (FN_SELECTION + 9 ) /* StartOfNextPage ??? */ -#define FN_END_OF_NEXT_PAGE (FN_SELECTION + 10) /* ??? */ -#define FN_START_OF_PREV_PAGE (FN_SELECTION + 11) /* StartOfPrevPage ??? */ -#define FN_END_OF_PREV_PAGE (FN_SELECTION + 12) /* ??? */ -#define FN_START_OF_PAGE (FN_SELECTION + 13) /* StartOfPage */ -#define FN_END_OF_PAGE (FN_SELECTION + 14) /* EndOfPage */ -#define FN_START_OF_WINDOW (FN_SELECTION + 15) /* StartOfWindow */ -#define FN_END_OF_WINDOW (FN_SELECTION + 16) /* EndOfWindow */ -#define FN_START_OF_COLUMN (FN_SELECTION + 17) /* StartOfColumn */ -#define FN_END_OF_COLUMN (FN_SELECTION + 18) /* EndOfColumn */ -#define FN_START_OF_PARA (FN_SELECTION + 19) /* StartOfPara */ -#define FN_END_OF_PARA (FN_SELECTION + 20) /* EndOfPara */ -#define FN_NEXT_WORD (FN_SELECTION + 21) /* NextWord */ -#define FN_PREV_WORD (FN_SELECTION + 22) /* PrevWord */ -#define FN_NEXT_SENT (FN_SELECTION + 23) /* NextSentence */ -#define FN_PREV_SENT (FN_SELECTION + 24) /* PrevSentence */ -#define FN_DELETE (FN_SELECTION + 25) /* Delete */ -#define FN_BACKSPACE (FN_SELECTION + 26) /* Backspace */ -#define FN_DELETE_SENT (FN_SELECTION + 27) /* DeleteToEndOfSentence */ -#define FN_DELETE_BACK_SENT (FN_SELECTION + 28) /* DeleteToStartOfSentence */ -#define FN_DELETE_WORD (FN_SELECTION + 29) /* DeleteToEndOfWord */ -#define FN_DELETE_BACK_WORD (FN_SELECTION + 30) /* DeleteToStartOfWord */ -#define FN_DELETE_LINE (FN_SELECTION + 31) /* DeleteToEndOfLine */ -#define FN_DELETE_BACK_LINE (FN_SELECTION + 32) /* DeleteToStartOfLine */ -#define FN_DELETE_PARA (FN_SELECTION + 33) /* DeleteToEndOfPara */ -#define FN_DELETE_BACK_PARA (FN_SELECTION + 34) /* DeleteToStartOfPara */ -#define FN_DELETE_WHOLE_LINE (FN_SELECTION + 35) /* DeleteLine ??? */ -#define FN_SET_INS_MODE (FN_SELECTION + 36) /* Insertmode / Overwrite */ -#define FN_PAGEUP (FN_SELECTION + 37) /* PageUpWithCursor */ -#define FN_PAGEDOWN (FN_SELECTION + 38) /* PageDownWithCursor */ -#define FN_SET_ADD_MODE (FN_SELECTION + 39) /* Selektionsmodus */ -#define FN_SET_EXT_MODE (FN_SELECTION + 40) /* Selektionsmodus */ -#define FN_ESCAPE (FN_SELECTION + 41) /* Normal */ -#define FN_SHIFT_BACKSPACE (FN_SELECTION + 42) /* like Backspace */ -#define FN_SELECT_WORD (FN_SELECTION + 43) /* select word*/ - -#define FN_GOTO_NEXT_OBJ (FN_SELECTION + 44) /* Goto next object */ -#define FN_GOTO_PREV_OBJ (FN_SELECTION + 45) /* Go to previous object */ - -#define FN_START_TABLE (FN_SELECTION + 47) /* to the beginning of the table */ -#define FN_END_TABLE (FN_SELECTION + 48) /* to the end of the table */ -#define FN_NEXT_TABLE (FN_SELECTION + 49) /* to the next table */ -#define FN_PREV_TABLE (FN_SELECTION + 50) /* to the previous table */ - -#define FN_START_OF_NEXT_COLUMN (FN_SELECTION + 51) /* to the start of the next column */ -#define FN_END_OF_NEXT_COLUMN (FN_SELECTION + 52) /* to the end of the next column */ -#define FN_START_OF_PREV_COLUMN (FN_SELECTION + 53) /* to the start of the previous column */ -#define FN_END_OF_PREV_COLUMN (FN_SELECTION + 54) /* to the end of the previous column */ - -#define FN_FOOTNOTE_TO_ANCHOR (FN_SELECTION + 55) /* from the footnote to the anchor */ -#define FN_NEXT_FOOTNOTE (FN_SELECTION + 56) /* to the next footnote */ -#define FN_PREV_FOOTNOTE (FN_SELECTION + 57) /* to the previous footnote */ - -#define FN_CNTNT_TO_NEXT_FRAME (FN_SELECTION + 58) /* from content to the next frame */ -#define FN_FRAME_TO_ANCHOR (FN_SELECTION + 59) /* from frame to the anchor */ - -#define FN_TO_HEADER (FN_SELECTION + 60) /* toggle between content and header */ -#define FN_TO_FOOTER (FN_SELECTION + 61) /* toggle between content and footer */ - -#define FN_IDX_MARK_TO_IDX (FN_SELECTION + 62) /* from the index mark to the index */ - -#define FN_TO_FOOTNOTE_AREA (FN_SELECTION + 63) /* jump into the appropriate footnote area */ - -#define FN_SET_BLOCK_MODE (FN_SELECTION + 64) /* selection mode: block */ - -#define FN_PREV_PARA (FN_SELECTION + 74) -#define FN_NEXT_PARA (FN_SELECTION + 75) - -#define FN_GOTO_NEXT_MARK (FN_SELECTION + 76) /* Go to next marker */ -#define FN_GOTO_PREV_MARK (FN_SELECTION + 77) /* Go to previous marker */ - -#define FN_NEXT_TOXMARK (FN_SELECTION + 83) /* to the next index mark */ -#define FN_PREV_TOXMARK (FN_SELECTION + 84) /* to the previous index mark */ -#define FN_NEXT_TBLFML (FN_SELECTION + 85) /* to the next table formula */ -#define FN_PREV_TBLFML (FN_SELECTION + 86) /* to the previous table formula */ -#define FN_NEXT_TBLFML_ERR (FN_SELECTION + 87) /* to the next broken table formula */ -#define FN_PREV_TBLFML_ERR (FN_SELECTION + 88) /* to the previous broken table formula */ - -#define FN_READONLY_SELECTION_MODE (FN_SELECTION + 89) /* switches text selection mode in readonly documents*/ -#define FN_SELECTION_MODE_DEFAULT (FN_SELECTION + 90) /* use default selection mode - not block mode */ -#define FN_SELECTION_MODE_BLOCK (FN_SELECTION + 91) /* switch on block selection */ - -/*-------------------------------------------------------------------- - QUERY-Block - --------------------------------------------------------------------*/ - -#define FN_IS_MODIFIED (FN_QUERY +16) /* Was the document modified? */ -#define FN_RESET_MODIFIED (FN_QUERY +17) /* Reset modified flag */ - -#define FN_GET_DOC_INFO (FN_QUERY +22) /* Wert Dokumentinfo erfragen */ -#define FN_GET_ERRNO (FN_QUERY +26) /* Get error number */ -#define FN_GET_DOCMAN_PATH (FN_QUERY +27) /* Get path to a group in Docmgr */ - -#define FN_TXTATR_INET (FN_QUERY +29) /* INet-Attribut */ -#define FN_EXECUTE_DRAG (FN_QUERY +30) /* Start drag and drop */ - -#define FN_GET_PRINT_AREA (FN_QUERY +32) /* Get attribute for printable area of page */ - -#define FN_GET_PARAGRAPH (FN_QUERY +48) /* Get Paragraph-Object from the text shell to the view */ - -#define FN_DB_FORM_LETTER (FN_QUERY2 + 0) /* form letter */ -#define FN_DB_INSERT_CONTENT (FN_QUERY2 + 1) /* merge data into fields*/ -#define FN_DB_INSERT_COLUMNS (FN_QUERY2 + 2) /* insert data into text/table/as fields*/ -#define FN_DB_CONNECTION_ANY (FN_QUERY2 + 3) -#define FN_DB_COLUMN_ANY (FN_QUERY2 + 4) -#define FN_DB_DATA_SOURCE_ANY (FN_QUERY2 + 5) -#define FN_DB_DATA_COMMAND_ANY (FN_QUERY2 + 6) -#define FN_DB_DATA_COMMAND_TYPE_ANY (FN_QUERY2 + 7) -#define FN_DB_DATA_COLUMN_NAME_ANY (FN_QUERY2 + 8) -#define FN_DB_DATA_SELECTION_ANY (FN_QUERY2 + 9) -#define FN_DB_DATA_CURSOR_ANY (FN_QUERY2 + 10) - -/*-------------------------------------------------------------------- - Region: Envelope - --------------------------------------------------------------------*/ - -#define FN_ENVELOP (FN_ENVELP ) - - -#define FN_DELETE_NOTE_AUTHOR (FN_NOTES+1) -#define FN_DELETE_ALL_NOTES (FN_NOTES+2) -#define FN_HIDE_NOTE (FN_NOTES+3) -#define FN_HIDE_NOTE_AUTHOR (FN_NOTES+4) -#define FN_HIDE_ALL_NOTES (FN_NOTES+5) - -#define FN_DELETE_COMMENT (FN_NOTES+6) -#define FN_REPLY (FN_NOTES+7) - -/*-------------------------------------------------------------------- - Region: Parameter - --------------------------------------------------------------------*/ - -#define FN_PARAM_TABLE_COLS (FN_PARAM) -#define FN_PARAM_TABLE_ROWS (FN_PARAM+1) -#define FN_PARAM_MOVE_COUNT (FN_PARAM+2) -#define FN_PARAM_MOVE_SELECTION (FN_PARAM+3) - -#define FN_PARAM_SEARCH_WORDONLY (FN_PARAM+5) -#define FN_PARAM_SEARCH_EXACT (FN_PARAM+6) -#define FN_PARAM_SEARCH_REGEXP (FN_PARAM+7) -#define FN_PARAM_SEARCH_BACKWARDS (FN_PARAM+8) -#define FN_PARAM_SEARCH_FINDALL (FN_PARAM+9) -#define FN_PARAM_SEARCH_SELECTION (FN_PARAM+10) -#define FN_PARAM_SEARCH_TEXT (FN_PARAM+11) -#define FN_PARAM_SEARCH_TEXTREPLACE (FN_PARAM+12) - -#define FN_PARAM_PARADLGLIMITS (FN_PARAM+15) -#define FN_PARAM_FRMMODE (FN_PARAM+16) - -#define FN_PARAM_ADDPRINTER (FN_PARAM+18) -#define FN_PARAM_GRID (FN_PARAM+19) -#define FN_PARAM_DOCDISP (FN_PARAM+20) -#define FN_PARAM_ELEM (FN_PARAM+21) -#define FN_PARAM_SWTEST (FN_PARAM+22) - -#define FN_PARAM_FTN_INFO (FN_PARAM+23) - -#define FN_PARAM_REGION_NAME (FN_PARAM+24) -#define FN_PARAM_REGION_CONDITION (FN_PARAM+25) -#define FN_PARAM_REGION_HIDDEN (FN_PARAM+26) -#define FN_PARAM_REGION_PROTECT (FN_PARAM+27) -#define FN_PARAM_REGION_EDIT_IN_READONLY (FN_PARAM+28) - -#define FN_PARAM_INSERT_AFTER (FN_PARAM+29) -#define FN_PARAM_INDEX_NAME (FN_PARAM+31) -#define FN_PARAM_INDEX_OPTIONS (FN_PARAM+32) -#define FN_PARAM_INDEX_FORMAT (FN_PARAM+33) -#define FN_PARAM_INDEX_LEVEL (FN_PARAM+34) -#define FN_PARAM_INDEX_TEMPLATE (FN_PARAM+35) -#define FN_PARAM_INDEX_ALTSTR (FN_PARAM+36) -#define FN_PARAM_INDEX_PRIMKEY (FN_PARAM+37) -#define FN_PARAM_INDEX_SECKEY (FN_PARAM+38) -#define FN_PARAM_WIDTH (FN_PARAM+39) -#define FN_PARAM_LOCATION (FN_PARAM+40) -#define FN_PARAM_DIR (FN_PARAM+41) -#define FN_PARAM_COUNT (FN_PARAM+42) -#define FN_PARAM_COLOR (FN_PARAM+43) - -#define FN_PARAM_TABLE_NAME (FN_PARAM+44) -#define FN_PARAM_TABLE_WIDTH (FN_PARAM+45) -#define FN_PARAM_TABLE_ULSPACE (FN_PARAM+46) -#define FN_PARAM_TABLE_LRSPACE (FN_PARAM+47) -#define FN_PARAM_TABLE_SHADOW (FN_PARAM+48) -#define FN_PARAM_TABLE_ALIGN (FN_PARAM+49) -#define FN_PARAM_TABLE_HEADLINE (FN_PARAM+50) -#define FN_PARAM_TABLE_SPACE (FN_PARAM+51) -#define FN_PARAM_TABLE_COLUMNS (FN_PARAM+52) - -#define FN_PARAM_GRF_CONNECT (FN_PARAM+53) -#define FN_PARAM_FIELD_TYPE (FN_PARAM+54) -#define FN_PARAM_FIELD_SUBTYPE (FN_PARAM+56) -#define FN_PARAM_FIELD_FORMAT (FN_PARAM+57) - -#define FN_PARAM_EVENT (FN_PARAM+68) -#define FN_PARAM_URL (FN_PARAM+69) -#define FN_PARAM_GRF_REALSIZE (FN_PARAM+70) -#define FN_PARAM_GRF_DIALOG (FN_PARAM+71) -#define FN_PARAM_GRF_CLIENTMAP (FN_PARAM+74) /* ClientMap */ -#define FN_PARAM_GRF_SERVERMAP (FN_PARAM+75) /* ServerMap */ -#define FN_PARAM_GRF_TARGETFRAME (FN_PARAM+76) /* TargetFrame */ -#define FN_INET_FIELD_MACRO (FN_PARAM+77) /* Id for URL-Field-Macros*/ - -#define FN_PARAM_PRINTER (FN_PARAM+78) /* Printer */ -#define FN_PARAM_STDFONTS (FN_PARAM+79) /* ConfigItem Standardfonts */ - -#define FN_PARAM_WRTSHELL (FN_PARAM2) /* SwWrtShell */ - -#define FN_COND_COLL (FN_PARAM2+1) /* Item for conditional templates */ -#define FN_PARAM_SELECTION (FN_PARAM2+2) /* selected word for format/character/hyperlink */ - -#define FN_PARAM_ACT_NUMBER (FN_PARAM2+3) /* PointerItem die aktuelle NumRule */ -#define FN_PARAM_CHILD_LEVELS (FN_PARAM2+4) /* are child levels used? */ - -#define FN_PARAM_NUM_PRESET (FN_PARAM2+5) /* predefined numbering */ - -#define FN_PARAM_HEIGHT (FN_PARAM2+6) /* Param for height */ -#define FN_PARAM_DIST (FN_PARAM2+7) /* and width, for metric transformation */ - -#define FN_PARAM_SHADOWCURSOR (FN_PARAM2+8) /* for ShadowCursor options */ - -#define FN_PARAM_ACT_NUMLEVEL (FN_PARAM2+9) /* BYTE-Item with current NumLevel */ - -#define FN_PARAM_10 (FN_PARAM2+11) - -#define FN_TEXT_RANGE (FN_PARAM2+12) /* TextRange Property*/ - -#define FN_PARAM_CRSR_IN_PROTECTED (FN_PARAM2+13) /* Cursor in protected areas */ -#define FN_PARAM_TOX_TYPE (FN_PARAM2+14) /* TOX type in tox dialog*/ -#define FN_PARAM_LINK_DISPLAY_NAME (FN_PARAM2+15) /* LinkDisplayName property*/ -#define FN_PARAM_NUM_LEVEL (FN_PARAM2+16) /* rtf filter*/ -#define FN_PARAM_COUNTOUR_PP (FN_PARAM2+17) /* contour PolyPolygon*/ - -#define FN_ANCHOR_POSITION (FN_PARAM2+18) /* AnchorPosition property */ -#define FN_DROP_TEXT (FN_PARAM2+18) /* text set in drop caps tab page - for recording */ -#define FN_DROP_CHAR_STYLE_NAME (FN_PARAM2+19) /* character style of drop caps - for recording */ -#define FN_PARAM_CHAIN_PREVIOUS (FN_PARAM2+20) /* Name of frame to be added as chain successor */ -#define FN_PARAM_CHAIN_NEXT (FN_PARAM2+21) /* Name of frame to be added as chain predecessor */ -#define FN_PARAM_DATABASE_PROPERTIES (FN_PARAM2+22) /* transport a Sequence<PropertyValue> containing database properties*/ -#define FN_SHAPE_TRANSFORMATION_IN_HORI_L2R (FN_PARAM2+23) -#define FN_SHAPE_POSITION_LAYOUT_DIR (FN_PARAM2+24) -#define FN_SHAPE_STARTPOSITION_IN_HORI_L2R (FN_PARAM2+25) -#define FN_SHAPE_ENDPOSITION_IN_HORI_L2R (FN_PARAM2+26) - -/*-------------------------------------------------------------------- - Bereich: Druckoptionen - --------------------------------------------------------------------*/ - -#define FN_PRNOPT_GRAPHIC (FN_PRNOPT + 1) -#define FN_PRNOPT_TABLE (FN_PRNOPT + 2) -#define FN_PRNOPT_LEFT_PAGE (FN_PRNOPT + 3) -#define FN_PRNOPT_RIGHT_PAGE (FN_PRNOPT + 4) -#define FN_PRNOPT_REVERSE (FN_PRNOPT + 5) -#define FN_PRNOPT_PAPER_FROM_SETUP (FN_PRNOPT + 6) -#define FN_PRNOPT_POSTITS (FN_PRNOPT + 8) - -#define FN_PRNOPT_BEGIN FN_PRNOPT_GRAPHIC -#define FN_PRNOPT_END FN_PRNOPT_POSTITS - -/*-------------------------------------------------------------------- - Description: Status: not more than 19! - --------------------------------------------------------------------*/ - -#define FN_STAT_PAGE (FN_STAT + 1) -#define FN_STAT_TEMPLATE (FN_STAT + 2) -#define FN_STAT_ZOOM (FN_STAT + 3) -#define FN_STAT_INSOVER (FN_STAT + 4) -#define FN_STAT_SELMODE (FN_STAT + 5) -#define FN_STAT_CONTEXT (FN_STAT + 7) -#define FN_STAT_BOOKMARK (FN_STAT + 8) /* For Popup Bookmarks*/ - -/*-------------------------------------------------------------------- - Region: Page preview - --------------------------------------------------------------------*/ - -#define FN_SHOW_TWO_PAGES (FN_PGPREVIEW + 1) -#ifndef FN_SHOW_MULTIPLE_PAGES -#define FN_SHOW_MULTIPLE_PAGES (FN_PGPREVIEW + 2) -#endif -#define FN_PRINT_PAGEPREVIEW (FN_PGPREVIEW + 3) -#define FN_CLOSE_PAGEPREVIEW (FN_PGPREVIEW + 4) -#define FN_SHOW_BOOKVIEW (FN_PGPREVIEW + 5) - -/*-------------------------------------------------------------------- - Region: Setting Attributes - --------------------------------------------------------------------*/ - -#define FN_OPAQUE (FN_FRAME + 1) -#define FN_SET_PROTECT (FN_FRAME + 2) -#define FN_SURROUND (FN_FRAME + 3) -#define FN_VERT_ORIENT (FN_FRAME + 4) -#define FN_HORI_ORIENT (FN_FRAME + 5) -#define FN_SET_FRM_NAME (FN_FRAME + 6) -#define FN_KEEP_ASPECT_RATIO (FN_FRAME + 7) -#define FN_GRF_KEEP_ZOOM (FN_FRAME + 8) - -#define FN_IID_COL1 (FN_FRAME + 13) -#define FN_IID_COL2 (FN_FRAME + 14) -#define FN_IID_COL3 (FN_FRAME + 15) -#define FN_IID_COLLEFT (FN_FRAME + 16) -#define FN_IID_COLRIGHT (FN_FRAME + 17) - -#define FN_SET_FRM_ALT_NAME (FN_FRAME + 18) -#define FN_UNO_TITLE (FN_FRAME + 19) -#define FN_UNO_DESCRIPTION (FN_FRAME + 20) - -//Member IDs for Fill / SetVariable of items -#define MID_STYLE 0xe0 -#define MID_PWIDTH 0xe1 -#define MID_ADJUST 0xe2 -#define MID_TDIST 0xe3 -#define MID_BDIST 0xe4 -#define MID_LINES 0xe5 -#define MID_CHARS 0xe6 -#define MID_DIST 0xe7 - -#define MID_1 0xe8 -#define MID_2 0xe9 -#define MID_3 0xea -#define MID_4 0xeb -#define MID_5 0xec -#define MID_6 0xed -#define MID_7 0xee -#define MID_8 0xef -#define MID_9 0xf0 -#define MID_A 0xf1 -#define MID_B 0xf2 -#define MID_C 0xf3 -#define MID_D 0xf4 -#define MID_E 0xf5 -#define MID_F 0xf6 -#define MID_10 0xf7 -#define MID_11 0xf8 -#define MID_12 0xf9 -#define MID_13 0xfa - -#ifndef SID_SW_DOCMAN_PATH -#define SID_SW_DOCMAN_PATH (SID_OFASLOTS_START + 6) -#endif - -// defines for Event-assignments per Macro -#define MAC_EVENT_MOUSEOVER 0x01 // -#define MAC_EVENT_MOUSECLICK 0x02 // -#define MAC_EVENT_MOUSEOUT 0x03 // -#define MAC_EVENT_OBJECT_SELECT 0x04 // -#define MAC_EVENT_KEYINPUT_ALPHA 0x05 // -#define MAC_EVENT_KEYINPUT_NOALPHA 0x06 // -#define MAC_EVENT_FRM_RESIZE 0x07 // -#define MAC_EVENT_FRM_MOVE 0x08 // -#define MAC_EVENT_IMAGE_LOAD 0x09 // -#define MAC_EVENT_IMAGE_ABORT 0x0a // -#define MAC_EVENT_IMAGE_ERROR 0x0b // - -#endif /* INCLUDED_SW_CMDID_H */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/colwd.hxx b/sw/inc/colwd.hxx deleted file mode 100644 index 034b991c74..0000000000 --- a/sw/inc/colwd.hxx +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _COLWD_HXX -#define _COLWD_HXX - - -#include <svx/stddlg.hxx> -#include <vcl/fixed.hxx> -#include <vcl/field.hxx> -#include <vcl/button.hxx> - - - -class SwTableFUNC; - -class SwTableWidthDlg : public SvxStandardDialog -{ - FixedLine aWidthFL; - FixedText aColFT; - NumericField aColEdit; - FixedText aWidthFT; - MetricField aWidthEdit; - OKButton aOKBtn; - CancelButton aCancelBtn; - HelpButton aHelpBtn; - SwTableFUNC &rFnc; - -protected: - virtual void Apply(); - DECL_LINK( LoseFocusHdl, Edit* pEdt=0 ); - -public: - SwTableWidthDlg(Window *pParent, SwTableFUNC &rFnc ); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/comcore.hrc b/sw/inc/comcore.hrc deleted file mode 100644 index e102a83df2..0000000000 --- a/sw/inc/comcore.hrc +++ /dev/null @@ -1,120 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _COMCORE_HRC -#define _COMCORE_HRC - -#include "rcid.hrc" - -// --------------- -// Strings -// --------------- - -#define STR_COMCORE_READERROR (RC_COMCORE_BEGIN + 0) -#define MSG_COMCORE_ASKSEARCH (RC_COMCORE_BEGIN + 1) -#define STR_TABLE_DEFNAME (RC_COMCORE_BEGIN + 2) -#define STR_GRAPHIC_DEFNAME (RC_COMCORE_BEGIN + 3) -#define STR_OBJECT_DEFNAME (RC_COMCORE_BEGIN + 4) -#define STR_FRAME_DEFNAME (RC_COMCORE_BEGIN + 5) -#define STR_REGION_DEFNAME (RC_COMCORE_BEGIN + 6) -#define STR_COMCORE_CANT_SHOW (RC_COMCORE_BEGIN + 7) -#define RID_GRAPHIC_REPLACEBMP (RC_COMCORE_BEGIN + 8) -#define RID_GRAPHIC_ERRORBMP (RC_COMCORE_BEGIN + 9) -#define STR_NUMRULE_DEFNAME (RC_COMCORE_BEGIN + 10) -#define STR_EMPTYPAGE (RC_COMCORE_BEGIN + 11) -#define RID_SHELLRES_AUTOFMTSTRS (RC_COMCORE_BEGIN + 12) -#define STR_MULT_INTERACT_HYPH_WARN (RC_COMCORE_BEGIN + 13) -#define STR_MULT_INTERACT_SPELL_WARN (RC_COMCORE_BEGIN + 14) -#define STR_SPELL_TITLE (RC_COMCORE_BEGIN + 15) -#define STR_HYPH_TITLE (RC_COMCORE_BEGIN + 16) -#define MSG_DISABLE_UNDO_QUESTION (RC_COMCORE_BEGIN + 17) -#define MSG_DISABLE_READLINE_QUESTION (RC_COMCORE_BEGIN + 18) - -#define STR_REDLINE_INSERT (RC_COMCORE_BEGIN + 19) -#define STR_REDLINE_DELETE (RC_COMCORE_BEGIN + 20) -#define STR_REDLINE_FORMAT (RC_COMCORE_BEGIN + 21) -#define STR_REDLINE_TABLE (RC_COMCORE_BEGIN + 22) -#define STR_REDLINE_FMTCOLL (RC_COMCORE_BEGIN + 23) -#define STR_CLIPBOARD (RC_COMCORE_BEGIN + 24) -#define STR_START_QUOTE (RC_COMCORE_BEGIN + 25) -#define STR_END_QUOTE (RC_COMCORE_BEGIN + 26) -#define STR_LDOTS (RC_COMCORE_BEGIN + 27) -#define STR_YIELDS (RC_COMCORE_BEGIN + 28) -#define STR_PARAGRAPHS (RC_COMCORE_BEGIN + 29) -#define STR_MULTISEL (RC_COMCORE_BEGIN + 30) -#define STR_REDLINE_MULTIPLE (RC_COMCORE_BEGIN + 31) -#define STR_N_REDLINES (RC_COMCORE_BEGIN + 32) -#define STR_FIELD (RC_COMCORE_BEGIN + 33) - -#define STR_FRAME (RC_COMCORE_BEGIN + 34) -#define STR_OLE (RC_COMCORE_BEGIN + 35) -#define STR_MATH_FORMULA (RC_COMCORE_BEGIN + 36) -#define STR_CHART (RC_COMCORE_BEGIN + 37) -#define STR_NOTE (RC_COMCORE_BEGIN + 38) -#define STR_REFERENCE (RC_COMCORE_BEGIN + 39) -#define STR_SCRIPT (RC_COMCORE_BEGIN + 40) -#define STR_AUTHORITY_ENTRY (RC_COMCORE_BEGIN + 41) -#define STR_SPECIALCHAR (RC_COMCORE_BEGIN + 42) -#define STR_FOOTNOTE (RC_COMCORE_BEGIN + 43) -#define STR_GRAPHIC (RC_COMCORE_BEGIN + 44) -#define STR_DRAWING_OBJECTS (RC_COMCORE_BEGIN + 45) -#define STR_TABLE_NAME (RC_COMCORE_BEGIN + 46) -#define STR_PARAGRAPH_UNDO (RC_COMCORE_BEGIN + 47) - -#define STR_HEADER (RC_COMCORE_BEGIN + 48) -#define STR_FOOTER (RC_COMCORE_BEGIN + 49) - -// defines for the Autoformat Redline Comments -#define STR_AUTOFMTREDL_DEL_EMPTY_PARA 0 -#define STR_AUTOFMTREDL_USE_REPLACE 1 -#define STR_AUTOFMTREDL_CPTL_STT_WORD 2 -#define STR_AUTOFMTREDL_CPTL_STT_SENT 3 -#define STR_AUTOFMTREDL_TYPO 4 -#define STR_AUTOFMTREDL_USER_STYLE 5 -#define STR_AUTOFMTREDL_BULLET 6 -#define STR_AUTOFMTREDL_UNDER 7 -#define STR_AUTOFMTREDL_BOLD 8 -#define STR_AUTOFMTREDL_FRACTION 9 -#define STR_AUTOFMTREDL_DETECT_URL 10 -#define STR_AUTOFMTREDL_DASH 11 -#define STR_AUTOFMTREDL_ORDINAL 12 -#define STR_AUTOFMTREDL_RIGHT_MARGIN 13 -#define STR_AUTOFMTREDL_SET_TMPL_TEXT 14 -#define STR_AUTOFMTREDL_SET_TMPL_INDENT 15 -#define STR_AUTOFMTREDL_SET_TMPL_NEG_INDENT 16 -#define STR_AUTOFMTREDL_SET_TMPL_TEXT_INDENT 17 -#define STR_AUTOFMTREDL_SET_TMPL_HEADLINE 18 -#define STR_AUTOFMTREDL_SET_NUMBULET 19 -#define STR_AUTOFMTREDL_DEL_MORELINES 20 -#define STR_AUTOFMTREDL_NON_BREAK_SPACE 21 -// !!!!!!!!!!!!!!!!!!!!!!!!!! alwats set the correct end !!!!!!!!!!!! -#define STR_AUTOFMTREDL_END 22 - - -#endif - - - diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx deleted file mode 100644 index 3dc677e81e..0000000000 --- a/sw/inc/crsrsh.hxx +++ /dev/null @@ -1,925 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_CRSRSH_HXX -#define SW_CRSRSH_HXX - -#include <com/sun/star/i18n/WordType.hpp> - -#include <tools/string.hxx> -#include <tools/link.hxx> -#include <tools/rtti.hxx> - -#include <IShellCursorSupplier.hxx> -#include "swdllapi.h" -#include <swtypes.hxx> // for SWPOSDOC -#include <viewsh.hxx> // for ViewShell -#include <calbck.hxx> // for SwClient -#include <cshtyp.hxx> // for CursorShell types -#include <crstate.hxx> // for CursorMove-States -#include <toxe.hxx> // SwTOXSearchDir -#include <tblsel.hxx> // SwTblSearchType -#include <viscrs.hxx> -#include <node.hxx> -#include <tblsel.hxx> -#include <IDocumentMarkAccess.hxx> - -class KeyCode; -class SfxItemSet; -class SfxPoolItem; -class SwCntntFrm; -class SwCrsrShell; -class SwCursor; -class SwField; -class SwFieldType; -class SwFmt; -class SwFmtFld; -class SwNodeIndex; -class SwPaM; -class SwShellCrsr; -class SwShellTableCrsr; -class SwTableNode; -class SwTxtFmtColl; -class SwVisCrsr; -class SwTxtINetFmt; -class SwFmtINetFmt; -class SwTxtAttr; -class SwTableBox; -class SwCellFrms; -class SwTOXMark; -class SwRedline; -class IBlockCursor; -class SwCntntNode; - -class SwPostItField; - -struct SwPosition; - -namespace com { namespace sun { namespace star { namespace util { - struct SearchOptions; -} } } } - -namespace com { namespace sun { namespace star { namespace text { - class XTextRange; -}}}} - -namespace com { namespace sun { namespace star { namespace container { - class XStringKeyMap; -}}}} - -// enum and struct to get informations via the Doc-Position - -struct SwContentAtPos -{ - enum IsAttrAtPos - { - SW_NOTHING = 0x0000, - SW_FIELD = 0x0001, - SW_CLICKFIELD = 0x0002, - SW_FTN = 0x0004, - SW_INETATTR = 0x0008, - SW_TABLEBOXFML = 0x0010, - SW_REDLINE = 0x0020, - SW_OUTLINE = 0x0040, - SW_TOXMARK = 0x0080, - SW_REFMARK = 0x0100, - SW_NUMLABEL = 0x0200, - SW_CONTENT_CHECK = 0x0400, - SW_SMARTTAG = 0x0800, - SW_FORMCTRL = 0x1000 -#if OSL_DEBUG_LEVEL > 1 - ,SW_CURR_ATTRS = 0x4000 // only for debugging - ,SW_TABLEBOXVALUE = 0x8000 // only for debugging -#endif - } eCntntAtPos; - - union { - const SwField* pFld; - const SfxPoolItem* pAttr; - const SwRedline* pRedl; - SwCntntNode * pNode; - const sw::mark::IFieldmark* pFldmark; - } aFnd; - - int nDist; - - String sStr; - const SwTxtAttr* pFndTxtAttr; - - SwContentAtPos( int eGetAtPos = 0xffff ) - : eCntntAtPos( (IsAttrAtPos)eGetAtPos ) - { - aFnd.pFld = 0; - pFndTxtAttr = 0; - nDist = 0; // #i23726# - } - - sal_Bool IsInProtectSect() const; - bool IsInRTLText()const; -}; - -// return values of SetCrsr (can be combined via ||) -const int CRSR_POSOLD = 0x01, // cursor stays at old position - CRSR_POSCHG = 0x02; // position changed by the layout - -// Helperfunction to resolve backward references in regular expressions - -String *ReplaceBackReferences( const com::sun::star::util::SearchOptions& rSearchOpt, SwPaM* pPam ); - -class SW_DLLPUBLIC SwCrsrShell - : public ViewShell - , public SwModify - , public ::sw::IShellCursorSupplier -{ - friend class SwCallLink; - friend class SwVisCrsr; - friend class SwSelPaintRects; - friend class SwChgLinkFlag; - - // requires the Crsr as InternalCrsr - friend sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& ); - -public: - - /* for calling UpdateCrsr */ - enum CrsrFlag { - UPDOWN = (1 << 0), // keep Up/Down on columns - SCROLLWIN = (1 << 1), // scroll window - CHKRANGE = (1 << 2), // check overlapping PaMs - NOCALRECT = (1 << 3), // don't recalculate CharRect - READONLY = (1 << 4) // make visible in spite of Readonly - }; - -private: - - SwRect aCharRect; // Char-SRectangle on which the cursor is located - Point aCrsrHeight; // height & offset from visible Cursor - Point aOldRBPos; // Right/Bottom of last VisArea - // (used in Invalidate by Cursor) - - Link aFlyMacroLnk; // Link will be called, if the Crsr is set - // into a fly. A macro can be then becalled - Link aChgLnk; // link will be called by every attribut/ - // format changes at cursor position. - Link aGrfArrivedLnk; // Link calls to UI if a graphic is arrived - - SwShellCrsr* pCurCrsr; // current cursor - SwShellCrsr* pCrsrStk; // stack for the cursor - SwVisCrsr *pVisCrsr; // the visible cursor - SwShellCrsr* pCrsrBack; // Backup cursor for header/footer edit mode - - IBlockCursor *pBlockCrsr; // interface of cursor for block (=rectangular) selection - - SwShellTableCrsr* pTblCrsr; // table Crsr; only in tables when the - // selection lays over 2 columns - - SwNodeIndex* pBoxIdx; // for recognizing of the changed - SwTableBox* pBoxPtr; // table row - - long nUpDownX; // try to move the cursor on up/down always - // in the same column - long nLeftFrmPos; - sal_uLong nAktNode; // save CursorPos at Start-Action - xub_StrLen nAktCntnt; - sal_uInt16 nAktNdTyp; - bool bAktSelection; - - /* - * Via the Method SttCrsrMove and EndCrsrMove this counter gets - * incremented/decremented. As long as the counter is inequal to 0, the - * current Cursor gets no update. This way, "complicated" cursor movements - * (via Find()) can be realised. - */ - sal_uInt16 nCrsrMove; - sal_uInt16 nBasicActionCnt; // Actions which are parenthesized by Basic - CrsrMoveState eMvState; // Status for Crsr-Travelling - GetCrsrOfst - - String sMarkedListId; - int nMarkedListLevel; - - sal_Bool bHasFocus : 1; // Shell is "active" in a window - sal_Bool bSVCrsrVis : 1; // SV-Cursor visible/invisible - sal_Bool bChgCallFlag : 1; // attribute change inside Start- and EndAction - sal_Bool bVisPortChgd : 1; // in VisPortChg-Call - // (used in Invalidate by the Cursor) - - sal_Bool bCallChgLnk : 1; // flag for derived classes - // TRUE -> call ChgLnk - // access only via SwChgLinkFlag - sal_Bool bAllProtect : 1; // Flag for areas - // TRUE -> everything protected / hidden - sal_Bool bInCMvVisportChgd : 1; // Flag for CrsrMoves - // TRUE -> view was moved - sal_Bool bGCAttr : 1; // TRUE -> non expanded attributes exist. - sal_Bool bIgnoreReadonly : 1; // TRUE -> make the cursor visible on next - // EndAction in spite of Readonly - sal_Bool bSelTblCells : 1; // TRUE -> select cells over the InputWin - sal_Bool bAutoUpdateCells : 1; // TRUE -> autoformat cells - sal_Bool bBasicHideCrsr : 1; // TRUE -> HideCrsr from Basic - sal_Bool bSetCrsrInReadOnly : 1;// TRUE -> Cursor is allowed in ReadOnly-Areas - sal_Bool bOverwriteCrsr : 1; // sal_True -> show Overwrite Crsr - - bool mbMacroExecAllowed : 1; - - SW_DLLPRIVATE void UpdateCrsr( sal_uInt16 eFlags - =SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE, - sal_Bool bIdleEnd = sal_False ); - - SW_DLLPRIVATE void _ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing ); - - /** Mark a certain list level of a certain list - - levels of a certain lists are marked now - - @param sListId list Id of the list whose level is marked - @param nLevel to be marked list level - - An empty sListId denotes that no level of a list is marked. - */ - SW_DLLPRIVATE void MarkListLevel( const String& sListId, - const int nLevel ); - - // private method(s) accessed from public inline method(s) must be exported. - sal_Bool LeftRight( sal_Bool, sal_uInt16, sal_uInt16, sal_Bool ); - SW_DLLPRIVATE sal_Bool UpDown( sal_Bool, sal_uInt16 ); - SW_DLLPRIVATE sal_Bool LRMargin( sal_Bool, sal_Bool bAPI = sal_False ); - SW_DLLPRIVATE sal_Bool IsAtLRMargin( sal_Bool, sal_Bool bAPI = sal_False ) const; - - SW_DLLPRIVATE short GetTextDirection( const Point* pPt = 0 ) const; - -typedef sal_Bool (SwCursor:: *FNCrsr)(); - SW_DLLPRIVATE sal_Bool CallCrsrFN( FNCrsr ); - - SW_DLLPRIVATE const SwRedline* _GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect ); - -protected: - - inline SwMoveFnCollection* MakeFindRange( sal_uInt16, sal_uInt16, SwPaM* ) const; - - /* - * Compare-Methode for the StackCursor and the current Cursor. - * The Methods return -1, 0, 1 for lower, equal, greater. The enum - * CrsrCompareType says which position is compared. - */ - enum CrsrCompareType { - StackPtStackMk, - StackPtCurrPt, - StackPtCurrMk, - StackMkCurrPt, - StackMkCurrMk, - CurrPtCurrMk - }; - int CompareCursor( CrsrCompareType eType ) const; - - // set all PaMs in OldNode to NewPos + Offset - void PaMCorrAbs(const SwNodeIndex &rOldNode, const SwPosition &rNewPos, - const xub_StrLen nOffset = 0 ); - - sal_Bool _SelTblRowOrCol( bool bRow, bool bRowSimple = false ); - - bool SetInFrontOfLabel( sal_Bool bNew ); - - void RefreshBlockCursor(); - - /** Updates the marked list level according to the cursor. - */ - SW_DLLPRIVATE void UpdateMarkedListLevel(); - -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - TYPEINFO(); - SwCrsrShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 ); - // disguised copy constructor - SwCrsrShell( SwCrsrShell& rShell, Window *pWin ); - virtual ~SwCrsrShell(); - - // create new cursor and append the old one - virtual SwPaM & CreateNewShellCursor(); - virtual SwPaM & GetCurrentShellCursor(); - - SwPaM * CreateCrsr(); - // delete the current cursor and make the following into the current - sal_Bool DestroyCrsr(); - // transform TableCursor to normal cursor, nullify Tablemode - void TblCrsrToCursor(); - // enter block mode, change normal cursor into block cursor - void CrsrToBlockCrsr(); - // leave block mode, change block cursor into normal cursor - void BlockCrsrToCrsr(); - - // SelAll() selects the document body content - // if ExtendedSelect() is called afterwards, the whole nodes array is selected - // only for usage in special cases allowed! - void ExtendedSelectAll(); - - SwPaM* GetCrsr( sal_Bool bMakeTblCrsr = sal_True ) const; - inline SwCursor* GetSwCrsr( sal_Bool bMakeTblCrsr = sal_True ) const; - // return only the current cursor - SwShellCrsr* _GetCrsr() { return pCurCrsr; } - const SwShellCrsr* _GetCrsr() const { return pCurCrsr; } - - // show passed cursor - for UNO - void SetSelection(const SwPaM& rCrsr); - - // remove all cursors from ContentNodes and set to 0 - void ParkCrsr( const SwNodeIndex &rIdx ); - - // return the current cursor stack - // (required in EditShell when deleting contents) - inline SwPaM* GetStkCrsr() const; - - // start parenthesing, hide SV-Cursor and selected areas - void StartAction(); - // end parenthesing, show SV-Cursor and selected areas - void EndAction( const sal_Bool bIdleEnd = sal_False ); - - // basic cursor travelling - long GetUpDownX() const { return nUpDownX; } - - sal_Bool Left( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual = sal_False ) - { return LeftRight( sal_True, nCnt, nMode, bAllowVisual ); } - sal_Bool Right( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual = sal_False ) - { return LeftRight( sal_False, nCnt, nMode, bAllowVisual ); } - sal_Bool Up( sal_uInt16 nCnt = 1 ) { return UpDown( sal_True, nCnt ); } - sal_Bool Down( sal_uInt16 nCnt = 1 ) { return UpDown( sal_False, nCnt ); } - sal_Bool LeftMargin() { return LRMargin( sal_True ); } - sal_Bool RightMargin(sal_Bool bAPI = sal_False) { return LRMargin( sal_False, bAPI ); } - sal_Bool SttEndDoc( sal_Bool bStt ); - - sal_Bool MovePage( SwWhichPage, SwPosPage ); - sal_Bool MovePara( SwWhichPara, SwPosPara ); - sal_Bool MoveSection( SwWhichSection, SwPosSection ); - sal_Bool MoveTable( SwWhichTable, SwPosTable ); - sal_Bool MoveColumn( SwWhichColumn, SwPosColumn ); - sal_Bool MoveRegion( SwWhichRegion, SwPosRegion ); - - sal_uLong Find( const com::sun::star::util::SearchOptions& rSearchOpt, - sal_Bool bSearchInNotes, - SwDocPositions eStart, SwDocPositions eEnde, - sal_Bool& bCancel, - FindRanges eRng, int bReplace = sal_False ); - - sal_uLong Find( const SwTxtFmtColl& rFmtColl, - SwDocPositions eStart, SwDocPositions eEnde, - sal_Bool& bCancel, - FindRanges eRng, const SwTxtFmtColl* pReplFmt = 0 ); - - sal_uLong Find( const SfxItemSet& rSet, sal_Bool bNoCollections, - SwDocPositions eStart, SwDocPositions eEnde, - sal_Bool& bCancel, - FindRanges eRng, - const com::sun::star::util::SearchOptions* pSearchOpt = 0, - const SfxItemSet* rReplSet = 0 ); - - // Position the Cursor - // return values: - // CRSR_POSCHG: when cursor was corrected from SPoint by the layout - // CRSR_POSOLD: when the cursor was not changed - int SetCrsr( const Point &rPt, sal_Bool bOnlyText = sal_False, bool bBlock = true ); - - /* - * Notification that the visible area was changed. aVisArea is reset, then - * scrolling is done. The passed Rectangle lays on pixel borders to avoid - * pixel errors. - */ - virtual void VisPortChgd( const SwRect & ); - - /* - * virtual paint method to make selection visible again after Paint - */ - void Paint( const Rectangle & rRect ); - - // Areas - inline void SetMark(); - inline sal_Bool HasMark(); - - void ClearMark(); - - /** - Ensure point and mark of the current PaM are in a specific order. - - @param bPointFirst TRUE: If the point is behind the mark then - swap the PaM. FALSE: If the mark is behind the point then swap - the PaM. - */ - void NormalizePam(sal_Bool bPointFirst = sal_True); - - void SwapPam(); - sal_Bool ChgCurrPam( const Point & rPt, - sal_Bool bTstOnly = sal_True, // test only, don't set - sal_Bool bTstHit = sal_False ); // only exact matches - void KillPams(); - - // story a copy of the cursor in the stack - void Push(); - /* - * Delete a cursor (controlled by bOldCrsr) - * - from stack or (bOldCrsr = TRUE) - * - delete the current one and replace it with the cursor from the - * stack - * Return: whether there was one left one the stack - */ - sal_Bool Pop( sal_Bool bOldCrsr = sal_True ); - /* - * Combine 2 Cursors. - * Delete the topmost from the stack and move its Mark into the current. - */ - void Combine(); - -#if OSL_DEBUG_LEVEL > 1 - void SttCrsrMove(); - void EndCrsrMove( const sal_Bool bIdleEnd = sal_False ); -#else - void SttCrsrMove() { ++nCrsrMove; StartAction(); } - void EndCrsrMove( const sal_Bool bIdleEnd = sal_False ) - { EndAction( bIdleEnd ); --nCrsrMove; } -#endif - - /* - * When the focus is lost the selected ranges are not displayed anymore. - * On the other hand, on receiving the focus all selected ranges are displayed again - * (ranges must be recalculated!). - */ - sal_Bool HasShFcs() const { return bHasFocus; } - void ShLooseFcs(); - void ShGetFcs( sal_Bool bUpdate = sal_True ); - - // Methods for displaying or hiding the visible text cursor. - void ShowCrsr(); - void HideCrsr(); - // Methods for displaying or hiding the selected ranges with visible cursor. - void ShowCrsrs( sal_Bool bCrsrVis ); - void HideCrsrs(); - - sal_Bool IsOverwriteCrsr() const { return bOverwriteCrsr; } - void SetOverwriteCrsr( sal_Bool bFlag ) { bOverwriteCrsr = bFlag; } - - // Return current frame in which the cursor is placed. - SwCntntFrm *GetCurrFrm( const sal_Bool bCalcFrm = sal_True ) const; - - //TRUE if cursor is hidden because of readonly. - //FALSE if it is working despite readonly. - sal_Bool IsCrsrReadonly() const; - - // Cursor is placed in something that is protected or selection contains - // something that is protected. - sal_Bool HasReadonlySel() const; - - // Can the cursor be set to read only ranges? - sal_Bool IsReadOnlyAvailable() const { return bSetCrsrInReadOnly; } - void SetReadOnlyAvailable( sal_Bool bFlag ); - sal_Bool IsOverReadOnlyPos( const Point& rPt ) const; - - sal_Bool IsOverHeaderFooterPos( const Point& rPt ) const; - - // Methods for aFlyMacroLnk. - void SetFlyMacroLnk( const Link& rLnk ) { aFlyMacroLnk = rLnk; } - const Link& GetFlyMacroLnk() const { return aFlyMacroLnk; } - - // Methods returning/altering link for changes of attributes/formates. - void SetChgLnk( const Link &rLnk ) { aChgLnk = rLnk; } - const Link& GetChgLnk() const { return aChgLnk; } - - // Methods returning/altering ling for "graphic completely loaded". - void SetGrfArrivedLnk( const Link &rLnk ) { aGrfArrivedLnk = rLnk; } - const Link& GetGrfArrivedLnk() const { return aGrfArrivedLnk; } - - //Call ChgLink. When within an action calling will be delayed. - void CallChgLnk(); - - // Check if the current cursor contains a selection, i.e. - // if Mark is set and SPoint and Mark are different. - sal_Bool HasSelection() const; - - // Check if a selection exists, i.e. if the current cursor comprises a selection. - inline sal_Bool IsSelection() const; - // returns if multiple cursors are available - inline sal_Bool IsMultiSelection() const; - - // Check if a complete paragraph was selected. - sal_Bool IsSelFullPara() const; - - // Check if selection is within one paragraph. - - //Should WaitPtr be activated for Clipboard. - sal_Bool ShouldWait() const; - - // Check if selection is within one paragraph. - inline sal_Bool IsSelOnePara() const; - - /* - * Returns SRectangle, at which the cursor is located. - */ - const SwRect &GetCharRect() const { return aCharRect; } - /* - * Returns if cursor is wholly or partly within visible range. - */ - sal_Bool IsCrsrVisible() const { return VisArea().IsOver( GetCharRect() ); } - - // Return current page number: - // TRUE: in which cursor is located. - // FALSE: which is visible at the upper margin. - void GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, - sal_Bool bAtCrsrPos = sal_True, const sal_Bool bCalcFrm = sal_True ); - // Determine how "empty pages" are handled - // (used in PhyPage). - sal_uInt16 GetNextPrevPageNum( sal_Bool bNext = sal_True ); - - // Move cursor at the bginning of page "nPage". - sal_Bool GotoPage( sal_uInt16 nPage ); - - sal_uInt16 GetPageCnt(); - - sal_Bool GoNextCrsr(); - - sal_Bool GoPrevCrsr(); - - // 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 ); - - // update Cursr, i.e. reset it into content should only be called when the - // cursor was set to a random position e.g. when deleting frames - void UpdateCrsrPos(); - - // get the selected text at the current cursor. it will be filled with - // fields etc. - String GetSelTxt() const; - // return only the text starting from the current cursor position (to the - // end of the node) - String GetText() const; - - // Check of SPoint or Mark of current cursor are placed within a table. - inline const SwTableNode* IsCrsrInTbl( sal_Bool bIsPtInTbl = sal_True ) const; - - inline Point& GetCrsrDocPos( sal_Bool bPoint = sal_True ) const; - inline sal_Bool IsCrsrPtAtEnd() const; - - inline const SwPaM* GetTblCrs() const; - inline SwPaM* GetTblCrs(); - - sal_Bool IsTblComplex() const; - sal_Bool IsTblComplexForChart(); - // get current table selection as text - String GetBoxNms() const; - - // set Crsr to the next/previous cell - sal_Bool GoNextCell( sal_Bool bAppendLine = sal_True ); - sal_Bool GoPrevCell(); - // go to this box (if available and inside of table) - sal_Bool GotoTable( const String& rName ); - - // select a table row, column or box (based on the current cursor) - sal_Bool SelTblRow() { return _SelTblRowOrCol( true ); } - sal_Bool SelTblCol() { return _SelTblRowOrCol( false ); } - sal_Bool SelTblBox(); - - sal_Bool SelTbl(); - - sal_Bool GotoNextNum(); - sal_Bool GotoPrevNum(); - - sal_Bool GotoOutline( const String& rName ); - // to the next/previous or the given OutlineNode - void GotoOutline( sal_uInt16 nIdx ); - // find the "outline position" in the nodes array of the current chapter - sal_uInt16 GetOutlinePos( sal_uInt8 nLevel = UCHAR_MAX ); - // select the given range of OutlineNodes. Optionally including the children - // the sal_uInt16s are the positions in OutlineNodes-Array (EditShell) - sal_Bool MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos, - sal_Bool bWithChilds = sal_False ); - - sal_Bool GotoNextOutline(); - sal_Bool GotoPrevOutline(); - - /** Delivers the current shell cursor - - Some operations have to run on the current cursor ring, - some on the pTblCrsr (if exist) or the current cursor ring and - some on the pTblCrsr or pBlockCrsr or the current cursor ring. - This small function checks the existence and delivers the wished cursor. - - @param bBlock [bool] - if the block cursor is of interest or not - - @return pTblCrsr if exist, - pBlockCrsr if exist and of interest (param bBlock) - otherwise pCurCrsr - */ - SwShellCrsr* getShellCrsr( bool bBlock ); - const SwShellCrsr* getShellCrsr( bool bBlock ) const - { return (const_cast<SwCrsrShell*>(this))->getShellCrsr( bBlock ); } - - bool IsBlockMode() const { return 0 != pBlockCrsr; } - const IBlockCursor* GetBlockCrsr() const { return pBlockCrsr; } - IBlockCursor* GetBlockCrsr() { return pBlockCrsr; } - - // is the Crsr in a table and is the selection over 2 columns - sal_Bool IsTableMode() const { return 0 != pTblCrsr; } - - const SwShellTableCrsr* GetTableCrsr() const { return pTblCrsr; } - SwShellTableCrsr* GetTableCrsr() { return pTblCrsr; } - sal_uInt16 UpdateTblSelBoxes(); - - sal_Bool GotoFtnTxt(); // jump from content to footnote - sal_Bool GotoFtnAnchor(); // jump from footnote to anchor - sal_Bool GotoPrevFtnAnchor(); - sal_Bool GotoNextFtnAnchor(); - - sal_Bool GotoFlyAnchor(); // jump from the frame to the anchor - sal_Bool GotoHeaderTxt(); // jump from the content to the header - sal_Bool GotoFooterTxt(); // jump from the content to the footer - // jump to the header/footer of the given or current PageDesc - sal_Bool SetCrsrInHdFt( sal_uInt16 nDescNo = USHRT_MAX, - sal_Bool bInHeader = sal_True ); - // is point of cursor in header/footer. pbInHeader return sal_True if it is - // in a headerframe otherwise in a footerframe - sal_Bool IsInHeaderFooter( sal_Bool* pbInHeader = 0 ) const; - - sal_Bool GotoNextTOXBase( const String* = 0 ); - sal_Bool GotoPrevTOXBase( const String* = 0 ); - sal_Bool GotoTOXMarkBase(); - // jump to the next or previous index entry - sal_Bool GotoNxtPrvTOXMark( sal_Bool bNext = sal_True ); - // jump to the next/previous index mark of this type - const SwTOXMark& GotoTOXMark( const SwTOXMark& rStart, SwTOXSearch eDir ); - - // jump to the next or previous table formula - // optionally only to broken formulas - sal_Bool GotoNxtPrvTblFormula( sal_Bool bNext = sal_True, - sal_Bool bOnlyErrors = sal_False ); - // jump to the next / previous hyperlink - inside text and also - // on graphics - sal_Bool SelectNxtPrvHyperlink( sal_Bool bNext = sal_True ); - - sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0, - sal_uInt16 nSeqNo = 0 ); - - // get the nth character from the start or end of the current selection - sal_Unicode GetChar( sal_Bool bEnd = sal_True, long nOffset = 0 ); - sal_Bool ExtendSelection( sal_Bool bEnd = sal_True, xub_StrLen nCount = 1 ); - - // Place only the visible cursor at the given position in the document. - // Return FALSE if SPoint was corrected by layout. - // (This is needed for displaying the Drag&Drop/Copy-Cursor.) - sal_Bool SetVisCrsr( const Point &rPt ); - inline void UnSetVisCrsr(); - - // jump to the next or previous field of the corresponding type - sal_Bool MoveFldType( const SwFieldType* pFldType, sal_Bool bNext, - sal_uInt16 nSubType = USHRT_MAX, - sal_uInt16 nResType = USHRT_MAX ); - sal_Bool GotoFld( const SwFmtFld& rFld ); - - // Return number of cursors in ring (The flag indicates whether - // only cursors containing selections are requested). - sal_uInt16 GetCrsrCnt( sal_Bool bAll = sal_True ) const; - - // Char Travelling - methods (in crstrvl1.cxx) - sal_Bool GoStartWord(); - sal_Bool GoEndWord(); - sal_Bool GoNextWord(); - sal_Bool GoPrevWord(); - sal_Bool GoNextSentence(); - sal_Bool GoPrevSentence(); - sal_Bool GoStartSentence(); - sal_Bool GoEndSentence(); - sal_Bool SelectWord( const Point* pPt = 0 ); - sal_Bool ExpandToSentenceBorders(); - - // get position from current cursor - sal_Bool IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const; - sal_Bool IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const; - sal_Bool IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const; - sal_Bool IsStartSentence() const; - sal_Bool IsEndSentence() const; - sal_Bool IsSttPara() const; - sal_Bool IsEndPara() const; - sal_Bool IsStartOfDoc() const; - sal_Bool IsEndOfDoc() const; - sal_Bool IsInFrontOfLabel() const; - sal_Bool IsAtLeftMargin() const { return IsAtLRMargin( sal_True ); } - sal_Bool IsAtRightMargin(sal_Bool bAPI = sal_False) const { return IsAtLRMargin( sal_False, bAPI ); } - - // delete all created cursors, set the table cursor and the last cursor to - // its TextNode (or StartNode?) - // They all get created on the next ::GetCrsr again - // Used for Drag&Drop/Clipboard-Paste in tables - sal_Bool ParkTblCrsr(); - - // Non expanded attributes? - sal_Bool IsGCAttr() const { return bGCAttr; } - void ClearGCAttr() { bGCAttr = sal_False; } - void UpdateAttr() { bGCAttr = sal_True; } - - // is the whole document protected/hidden (for UI...) - sal_Bool IsAllProtect() const { return bAllProtect; } - -#ifdef SW_CRSR_TIMER - // Set flag at VisCrsr. Is it triggered by Timer (TRUE) or directly (FALSE). - // Default is triggert by Timer. - sal_Bool ChgCrsrTimerFlag( sal_Bool bTimerOn = sal_True ); -#endif - - sal_Bool BasicActionPend() const { return nBasicActionCnt != nStartAction; } - - sal_Bool GotoRegion( const String& rName ); - - // show the current selection - virtual void MakeSelVisible(); - - // set the cursor to a NOT protected/hidden node - sal_Bool FindValidCntntNode( sal_Bool bOnlyText = sal_False ); - - sal_Bool GetContentAtPos( const Point& rPt, - SwContentAtPos& rCntntAtPos, - sal_Bool bSetCrsr = sal_False, - SwRect* pFldRect = 0 ); - - const SwPostItField* GetPostItFieldAtCursor() const; - - // get smart tags at point position - void GetSmartTagTerm( const Point& rPt, - SwRect& rSelectRect, - ::com::sun::star::uno::Sequence< rtl::OUString >& rSmartTagTypes, - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > >& rStringKeyMaps, - ::com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rRange ); - - // get smart tags at current cursor position - void GetSmartTagTerm( ::com::sun::star::uno::Sequence< rtl::OUString >& rSmartTagTypes, - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > >& rStringKeyMaps, - ::com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rRange ) const; - - sal_Bool IsPageAtPos( const Point &rPt ) const; - - sal_Bool SelectTxtAttr( sal_uInt16 nWhich, sal_Bool bExpand, const SwTxtAttr* pAttr = 0 ); - sal_Bool GotoINetAttr( const SwTxtINetFmt& rAttr ); - const SwFmtINetFmt* FindINetAttr( const String& rName ) const; - - sal_Bool CheckTblBoxCntnt( const SwPosition* pPos = 0 ); - void SaveTblBoxCntnt( const SwPosition* pPos = 0 ); - void ClearTblBoxCntnt(); - sal_Bool EndAllTblBoxEdit(); - - // gets called when a table selection gets created in UpdateCrsr without - // the UI knowing of it - virtual void NewCoreSelection(); - - void SetSelTblCells( sal_Bool bFlag ) { bSelTblCells = bFlag; } - sal_Bool IsSelTblCells() const { return bSelTblCells; } - - sal_Bool IsAutoUpdateCells() const { return bAutoUpdateCells; } - void SetAutoUpdateCells( sal_Bool bFlag ) { bAutoUpdateCells = bFlag; } - - sal_Bool GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode, - SwRect& rRect, short& rOrient ); - sal_Bool SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode ); - - const SwRedline* SelNextRedline(); - const SwRedline* SelPrevRedline(); - const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False ); - - // is cursor or the point in/over a vertical formatted text? - sal_Bool IsInVerticalText( const Point* pPt = 0 ) const; - // is cursor or the point in/over a right to left formatted text? - sal_Bool IsInRightToLeftText( const Point* pPt = 0 ) const; - - // If the current cursor position is inside a hidden range, the hidden range - // is selected and true is returned: - bool SelectHiddenRange(); - - // remove all invalid cursors - void ClearUpCrsrs(); - - inline void SetMacroExecAllowed( const bool _bMacroExecAllowed ) - { - mbMacroExecAllowed = _bMacroExecAllowed; - } - inline bool IsMacroExecAllowed() - { - return mbMacroExecAllowed; - } - - /** - Returns textual description of the current selection. - - - If the current selection is a multi-selection the result is - STR_MULTISEL. - - Else the result is the text of the selection. - - @return the textual description of the current selection - */ - String GetCrsrDescr() const; - - SwRect GetRectOfCurrentChar(); - - virtual void ToggleHeaderFooterEdit( ); -}; - -// Cursor Inlines: -inline SwMoveFnCollection* SwCrsrShell::MakeFindRange( - sal_uInt16 nStt, sal_uInt16 nEnd, SwPaM* pPam ) const -{ - return pCurCrsr->MakeFindRange( (SwDocPositions)nStt, (SwDocPositions)nEnd, pPam ); -} - -inline SwCursor* SwCrsrShell::GetSwCrsr( sal_Bool bMakeTblCrsr ) const -{ - return (SwCursor*)GetCrsr( bMakeTblCrsr ); -} - -inline SwPaM* SwCrsrShell::GetStkCrsr() const { return pCrsrStk; } - -inline void SwCrsrShell::SetMark() { pCurCrsr->SetMark(); } - -inline sal_Bool SwCrsrShell::HasMark() { return( pCurCrsr->HasMark() ); } - -inline sal_Bool SwCrsrShell::IsSelection() const -{ - return IsTableMode() || pCurCrsr->HasMark() || - pCurCrsr->GetNext() != pCurCrsr; -} -inline sal_Bool SwCrsrShell::IsMultiSelection() const -{ - return pCurCrsr->GetNext() != pCurCrsr; -} - -inline sal_Bool SwCrsrShell::IsSelOnePara() const -{ - return pCurCrsr == pCurCrsr->GetNext() && - pCurCrsr->GetPoint()->nNode == pCurCrsr->GetMark()->nNode; -} - -inline const SwTableNode* SwCrsrShell::IsCrsrInTbl( sal_Bool bIsPtInTbl ) const -{ - return pCurCrsr->GetNode( bIsPtInTbl )->FindTableNode(); -} - -inline sal_Bool SwCrsrShell::IsCrsrPtAtEnd() const -{ - return pCurCrsr->End() == pCurCrsr->GetPoint(); -} - -inline Point& SwCrsrShell::GetCrsrDocPos( sal_Bool bPoint ) const -{ - return bPoint ? pCurCrsr->GetPtPos() : pCurCrsr->GetMkPos(); -} - -inline const SwPaM* SwCrsrShell::GetTblCrs() const -{ - return pTblCrsr; -} - -inline SwPaM* SwCrsrShell::GetTblCrs() -{ - return pTblCrsr; -} - -inline void SwCrsrShell::UnSetVisCrsr() -{ - pVisCrsr->Hide(); - pVisCrsr->SetDragCrsr( sal_False ); -} - -#endif // _CRSRSH_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/crsskip.hxx b/sw/inc/crsskip.hxx deleted file mode 100644 index 40d6533364..0000000000 --- a/sw/inc/crsskip.hxx +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CRSSKIP_HXX -#define _CRSSKIP_HXX - -#include <tools/solar.h> - - -// define for cursor travelling normally in western text cells and chars do -// the same, but in complex text cell skip over legatures and char skip -// into it. -// These defines exist only to cut off the dependicies to I18N project. -const sal_uInt16 CRSR_SKIP_CHARS = 0; -const sal_uInt16 CRSR_SKIP_CELLS = 1; -const sal_uInt16 CRSR_SKIP_HIDDEN = 2; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx deleted file mode 100644 index bf0ed23664..0000000000 --- a/sw/inc/crstate.hxx +++ /dev/null @@ -1,218 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CRSTATE_HXX -#define _CRSTATE_HXX - -#include <com/sun/star/text/HoriOrientation.hpp> -#include <tools/gen.hxx> -#include <swtypes.hxx> -#include <swrect.hxx> - - -enum SwFillMode -{ - FILL_TAB, // default, fill with tabs - FILL_SPACE, // fill with spaces and tabs - FILL_MARGIN, // only align left, center, right - FILL_INDENT // by left paragraph indention -}; - -struct SwFillCrsrPos -{ - SwRect aCrsr; // position and size of the ShadowCursor - sal_uInt16 nParaCnt; // number of paragraphs to insert - sal_uInt16 nTabCnt; // number of tabs respectively size of indentation - sal_uInt16 nSpaceCnt; // number of spaces to insert - sal_uInt16 nColumnCnt; // number of necessary column breaks - sal_Int16 eOrient; // paragraph alignment - SwFillMode eMode; // desired fill-up rule - SwFillCrsrPos( SwFillMode eMd = FILL_TAB ) : - nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nColumnCnt( 0 ), - eOrient( com::sun::star::text::HoriOrientation::NONE ), eMode( eMd ) - {} -}; - -// Multiportion types: two lines, bidirectional, 270 degrees rotation, -// ruby portion and 90 degrees rotation -#define MT_TWOLINE 0 -#define MT_BIDI 1 -#define MT_ROT_270 3 -#define MT_RUBY 4 -#define MT_ROT_90 7 - -struct Sw2LinesPos -{ - SwRect aLine; // Position and size of the line - SwRect aPortion; // Position and size of the multi portion - SwRect aPortion2; // needed for nested multi portions - sal_uInt8 nMultiType; // Multiportion type -}; - -/** - * SwSpecialPos. This structure is used to pass some additional information - * during the call of SwTxtFrm::GetCharRect(). An SwSpecialPos defines a position - * inside a portion which does not have a representation in the core string or - * which is only represented by one position, e.g., field portions, - * number portions, ergo sum and quo vadis portions. - * - * nCharOfst - The offset inside the special portion. Fields and its - * follow fields are treated as one long special portion. - * nLineOfst - The number of lines between the beginning of the special - * portion and nCharOfst. A line offset required to be - * nCharOfst relative to the beginning of the line. - * nExtendRange - Setting this identifies portions which are in front or - * behind the core string (number portion, quo vadis) - * - * Examples 1) - * - * Get the position of the second character inside a number portion: - * nCharOfst = 2; nLineOfst = 0; nExtendRange = SP_EXTEND_RANGE_BEFORE; - * Call SwTxtFrm:::GetCharRect with core string position 0. - * - * Example 2) - * - * Field A - Length = 5 - * Follow field B - Length = 9 - * Get the position of the third character in follow field B, core position - * of field A is 33. - * nCharOfst = 7; nLineOfst = 0; nExtendRange = SP_EXTEND_RANGE_NONE; - * Call SwTxtFrm:::GetCharRect with core string position 33. - */ - -#define SP_EXTEND_RANGE_NONE 0 -#define SP_EXTEND_RANGE_BEFORE 1 -#define SP_EXTEND_RANGE_BEHIND 2 - -struct SwSpecialPos -{ - xub_StrLen nCharOfst; - sal_uInt16 nLineOfst; - sal_uInt8 nExtendRange; - - // #i27615# - SwSpecialPos() : nCharOfst(0), nLineOfst(0), - nExtendRange(SP_EXTEND_RANGE_NONE) - {} -}; - -// CrsrTravelling-States (for GetCrsrOfst) -enum CrsrMoveState -{ - MV_NONE, // default - MV_UPDOWN, // Crsr Up/Down - MV_RIGHTMARGIN, // at right margin - MV_LEFTMARGIN, // at left margin - MV_SETONLYTEXT, // stay with the cursor inside text - MV_TBLSEL // not in repeated headlines -}; - -// struct for later extensions -struct SwCrsrMoveState -{ - SwFillCrsrPos *pFill; // for automatic filling with tabs etc - Sw2LinesPos *p2Lines; // for selections inside/around 2line portions - SwSpecialPos* pSpecialPos; // for positions inside fields - Point aRealHeight; // contains then the position/height of the cursor - CrsrMoveState eState; - sal_uInt8 nCursorBidiLevel; - sal_Bool bStop :1; - sal_Bool bRealHeight :1; // should the real height be calculated? - sal_Bool bFieldInfo :1; // should be fields recognized? - sal_Bool bPosCorr :1; // Point had to be corrected - sal_Bool bFtnNoInfo :1; // recognized footnote numbering - sal_Bool bExactOnly :1; // let GetCrsrOfst look for exact matches only, - // i.e. never let it run into GetCntntPos - sal_Bool bFillRet :1; // only used temporary in FillMode - sal_Bool bSetInReadOnly :1; // ReadOnly areas may be entered - sal_Bool bRealWidth :1; // Calculation of the width required - sal_Bool b2Lines :1; // Check 2line portions and fill p2Lines - sal_Bool bNoScroll :1; // No scrolling of undersized textframes - sal_Bool bPosMatchesBounds :1; // GetCrsrOfst should not return the next - // position if screen position is inside second - // have of bound rect - - sal_Bool bCntntCheck :1; // #i43742# Cursor position over content? - - // #i27615# - /** - cursor in front of label - */ - sal_Bool bInFrontOfLabel :1; - sal_Bool bInNumPortion :1; // point is in number portion #i23726# - int nInNumPostionOffset; // distance from number portion's start - - SwCrsrMoveState( CrsrMoveState eSt = MV_NONE ) : - pFill( NULL ), - p2Lines( NULL ), - pSpecialPos( NULL ), - eState( eSt ), - nCursorBidiLevel( 0 ), - bStop( sal_False ), - bRealHeight( sal_False ), - bFieldInfo( sal_False ), - bPosCorr( sal_False ), - bFtnNoInfo( sal_False ), - bExactOnly( sal_False ), - bSetInReadOnly( sal_False ), - bRealWidth( sal_False ), - b2Lines( sal_False ), - bNoScroll( sal_False ), - bPosMatchesBounds( sal_False ), - bCntntCheck( sal_False ), // #i43742# - bInFrontOfLabel( sal_False ), // #i27615# - bInNumPortion(sal_False), // #i26726# - nInNumPostionOffset(0) // #i26726# - {} - SwCrsrMoveState( SwFillCrsrPos *pInitFill ) : - pFill( pInitFill ), - pSpecialPos( NULL ), - eState( MV_SETONLYTEXT ), - nCursorBidiLevel( 0 ), - bStop( sal_False ), - bRealHeight( sal_False ), - bFieldInfo( sal_False ), - bPosCorr( sal_False ), - bFtnNoInfo( sal_False ), - bExactOnly( sal_False ), - bSetInReadOnly( sal_False ), - bRealWidth( sal_False ), - b2Lines( sal_False ), - bNoScroll( sal_False ), - bPosMatchesBounds( sal_False ), - bCntntCheck( sal_False ), // #i43742# - bInFrontOfLabel( sal_False ), // #i27615# - bInNumPortion(sal_False), // #i23726# - nInNumPostionOffset(0) // #i23726# - {} -}; - - -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx deleted file mode 100644 index b4c68b8882..0000000000 --- a/sw/inc/cshtyp.hxx +++ /dev/null @@ -1,119 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _CSHTYP_HXX -#define _CSHTYP_HXX - -#include <tools/solar.h> -#include "swdllapi.h" - -class SwPaM; -class SwCntntFrm; -class SwLayoutFrm; - -// Structure for SwPaM. Contains the method-pointers for cursor movement. -struct SwMoveFnCollection; -typedef SwMoveFnCollection* SwMoveFn; - - -// Type definition for CrsrShell. -// Direction-parameter for MovePage (initialized in SwCntntFrm). -typedef SwLayoutFrm * (*SwWhichPage)( const SwLayoutFrm * ); -typedef SwCntntFrm * (*SwPosPage)( const SwLayoutFrm * ); -extern SwWhichPage fnPagePrev, fnPageCurr, fnPageNext; -extern SwPosPage fnPageStart, fnPageEnd; - -// Direction-parameter for MovePara (initialized in SwCntntFrm). -typedef SwMoveFnCollection* SwPosPara; -typedef sal_Bool (*SwWhichPara)( SwPaM&, SwPosPara ); -extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext; -extern SwPosPara fnParaStart, fnParaEnd; - -// Direction-parameter for MoveSection. -typedef SwMoveFnCollection* SwPosSection; -typedef sal_Bool (*SwWhichSection)( SwPaM&, SwPosSection ); -extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext; -extern SwPosSection fnSectionStart, fnSectionEnd; - -// Direction-parameter for MoveTable -typedef SwMoveFnCollection* SwPosTable; -typedef sal_Bool (*SwWhichTable)( SwPaM&, SwPosTable, sal_Bool bInReadOnly ); -extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext; -extern SwPosTable fnTableStart, fnTableEnd; - -// Direction-parameter for MoveColumn -typedef SwLayoutFrm * (*SwWhichColumn)( const SwLayoutFrm * ); -typedef SwCntntFrm * (*SwPosColumn)( const SwLayoutFrm * ); -extern SwWhichColumn fnColumnPrev, fnColumnCurr, fnColumnNext; -extern SwPosColumn fnColumnStart, fnColumnEnd; - -// Direction-parameter for MoveRegion (ranges!) -typedef SwMoveFnCollection* SwPosRegion; -typedef sal_Bool (*SwWhichRegion)( SwPaM&, SwPosRegion, sal_Bool bInReadOnly ); -extern SwWhichRegion fnRegionPrev, fnRegionCurr, fnRegionNext, fnRegionCurrAndSkip; -extern SwPosRegion fnRegionStart, fnRegionEnd; - - -/* - * The following combinations are allowed: - * - find one in body -> FND_IN_BODY - * - find all in body: -> FND_IN_BODYONLY | FND_IN_SELALL - * - find in selections: one/all -> FND_IN_SEL [ | FND_IN_SELALL ] - * - find not in body: one/all -> FND_IN_OTHER [ | FND_IN_SELALL ] - * - find all everywhere -> FND_IN_SELALL - */ -enum FindRanges -{ - FND_IN_BODY = 0x00, // Find "one" only in body text. - FND_IN_OTHER = 0x02, // Find "all" in Footer/Header/Fly... - FND_IN_SEL = 0x04, // Find in selections. - FND_IN_BODYONLY = 0x08, // Find only in body - only in combination with FND_IN_SELALL !!! - FND_IN_SELALL = 0x01 // All (only in non-body and selections). -}; - - -enum SwDocPositions -{ - DOCPOS_START, - DOCPOS_CURR, - DOCPOS_END, - DOCPOS_OTHERSTART, - DOCPOS_OTHEREND -}; - -SW_DLLPUBLIC SwWhichPara GetfnParaCurr(); -SW_DLLPUBLIC SwPosPara GetfnParaStart(); -SW_DLLPUBLIC SwPosPara GetfnParaEnd(); - -SW_DLLPUBLIC SwWhichTable GetfnTablePrev(); -SW_DLLPUBLIC SwWhichTable GetfnTableCurr(); -SW_DLLPUBLIC SwPosTable GetfnTableStart(); -SW_DLLPUBLIC SwPosTable GetfnTableEnd(); - -#endif // _CSHTYP_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx deleted file mode 100644 index 3110aeeb06..0000000000 --- a/sw/inc/dbfld.hxx +++ /dev/null @@ -1,335 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_DBFLD_HXX -#define SW_DBFLD_HXX - -#include "swdllapi.h" -#include "fldbas.hxx" -#include "swdbdata.hxx" - -class SwDoc; -class SwTxtFld; -class SwFrm; - -/*-------------------------------------------------------------------- - Database field. - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwDBFieldType : public SwValueFieldType -{ - SwDBData aDBData; // - String sName; // only used in ::GetName() ! - String sColumn; - long nRefCnt; - -public: - - SwDBFieldType(SwDoc* pDocPtr, const String& rColumnName, const SwDBData& rDBData); - ~SwDBFieldType(); - - virtual const String& GetName() const; - virtual SwFieldType* Copy() const; - - inline void AddRef() { nRefCnt++; } - void ReleaseRef(); - - const String& GetColumnName() const {return sColumn;} - const SwDBData& GetDBData() const {return aDBData;} - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - Classes derived from SwFields. They overlay the expand-function. - Content is formated according to the format (if available). - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwDBField : public SwValueField -{ - String aContent; - String sFieldCode; // contains Word's field code - sal_uInt16 nSubType; - sal_Bool bIsInBodyTxt : 1; - sal_Bool bValidValue : 1; - sal_Bool bInitialized : 1; - - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - SwDBField(SwDBFieldType*, sal_uLong nFmt = 0); - virtual ~SwDBField(); - - virtual SwFieldType* ChgTyp( SwFieldType* ); - - // Current text. - inline void SetExpansion(const String& rStr); - - virtual sal_uInt16 GetSubType() const; - virtual void SetSubType(sal_uInt16 nType); - - virtual String GetFieldName() const; - - // For calculations in expressions. - void ChgValue( double d, sal_Bool bVal ); - - // Get the evaluation via DBMgr string. - void Evaluate(); - - // Evaluation for header and footer. - void ChangeExpansion( const SwFrm*, const SwTxtFld* ); - void InitContent(); - void InitContent(const String& rExpansion); - - inline void ChgBodyTxtFlag( sal_Bool bIsInBody ); - - inline sal_Bool IsInitialized() const { return bInitialized; } - inline void ClearInitialized() { bInitialized = sal_False; } - inline void SetInitialized() { bInitialized = sal_True; } - - // Get name. - virtual const String& GetPar1() const; - - // access to the command string - const String& GetFieldCode() const - { return sFieldCode;} - void SetFieldCode(const String& rStr) - { sFieldCode = rStr; } - - // DBName - inline const SwDBData& GetDBData() const { return ((SwDBFieldType*)GetTyp())->GetDBData(); } - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -inline void SwDBField::SetExpansion(const String& rStr) - { aContent = rStr; } - -// set from UpdateExpFlds (the Node-Position is known there) -inline void SwDBField::ChgBodyTxtFlag( sal_Bool bIsInBody ) - { bIsInBodyTxt = bIsInBody; } - -/*-------------------------------------------------------------------- - Base class for all other database fields. - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwDBNameInfField : public SwField -{ - SwDBData aDBData; - sal_uInt16 nSubType; - -protected: - const SwDBData& GetDBData() const {return aDBData;} - SwDBData& GetDBData() {return aDBData;} - - SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFmt = 0); - -public: - // DBName - inline const SwDBData& GetRealDBData() { return aDBData; } - - SwDBData GetDBData(SwDoc* pDoc); - void SetDBData(const SwDBData& rDBData); - - virtual String GetFieldName() const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); - virtual sal_uInt16 GetSubType() const; - virtual void SetSubType(sal_uInt16 nType); -}; - -/*-------------------------------------------------------------------- - Database field next record. - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwDBNextSetFieldType : public SwFieldType -{ -public: - SwDBNextSetFieldType(); - - virtual SwFieldType* Copy() const; -}; - -/*-------------------------------------------------------------------- - Next data record with condition. - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwDBNextSetField : public SwDBNameInfField -{ - String aCond; - sal_Bool bCondValid; - -public: - SwDBNextSetField( SwDBNextSetFieldType*, - const String& rCond, const String& rDummy, const SwDBData& rDBData); - - virtual String Expand() const; - virtual SwField* Copy() const; - - void Evaluate(SwDoc*); - inline void SetCondValid(sal_Bool bCond); - inline sal_Bool IsCondValid() const; - - // Condition - virtual const String& GetPar1() const; - virtual void SetPar1(const String& rStr); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -inline sal_Bool SwDBNextSetField::IsCondValid() const - { return bCondValid; } - -inline void SwDBNextSetField::SetCondValid(sal_Bool bCond) - { bCondValid = bCond; } - -/*-------------------------------------------------------------------- - Database field next record. - --------------------------------------------------------------------*/ - -class SwDBNumSetFieldType : public SwFieldType -{ -public: - SwDBNumSetFieldType(); - - virtual SwFieldType* Copy() const; -}; - -/*-------------------------------------------------------------------- - Data record with number xxx. - Number is in nFormat (bit of a misuse!) - --------------------------------------------------------------------*/ - -class SwDBNumSetField : public SwDBNameInfField -{ - String aCond; - String aPar2; - sal_Bool bCondValid; - -public: - SwDBNumSetField(SwDBNumSetFieldType*, const String& rCond, const String& rDBNum, const SwDBData& rDBData); - - virtual String Expand() const; - virtual SwField* Copy() const; - - inline sal_Bool IsCondValid() const; - inline void SetCondValid(sal_Bool bCond); - void Evaluate(SwDoc*); - - // Condition - virtual const String& GetPar1() const; - virtual void SetPar1(const String& rStr); - - // Number of data record. - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - - // Number of data record is in nFormat!! - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -inline sal_Bool SwDBNumSetField::IsCondValid() const - { return bCondValid; } - -inline void SwDBNumSetField::SetCondValid(sal_Bool bCond) - { bCondValid = bCond; } - -/*-------------------------------------------------------------------- - Database name. - --------------------------------------------------------------------*/ - -class SwDBNameFieldType : public SwFieldType -{ - SwDoc *pDoc; -public: - SwDBNameFieldType(SwDoc*); - - String Expand(sal_uLong) const; - virtual SwFieldType* Copy() const; -}; - -/*-------------------------------------------------------------------- - Database field. - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwDBNameField : public SwDBNameInfField -{ -public: - SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData, sal_uLong nFmt = 0); - - virtual String Expand() const; - virtual SwField* Copy() const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - Number of data record. - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwDBSetNumberFieldType : public SwFieldType -{ -public: - SwDBSetNumberFieldType(); - - virtual SwFieldType* Copy() const; -}; - -/*-------------------------------------------------------------------- - Database field. - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwDBSetNumberField : public SwDBNameInfField -{ - long nNumber; - -public: - SwDBSetNumberField(SwDBSetNumberFieldType*, const SwDBData& rDBData, sal_uLong nFmt = 0); - - virtual String Expand() const; - virtual SwField* Copy() const; - void Evaluate(SwDoc*); - - inline long GetSetNumber() const; - inline void SetSetNumber(long nNum); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -inline long SwDBSetNumberField::GetSetNumber() const - { return nNumber; } - -inline void SwDBSetNumberField::SetSetNumber(long nNum) - { nNumber = nNum; } - -#endif // SW_DBFLD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx deleted file mode 100644 index b111808109..0000000000 --- a/sw/inc/dbgoutsw.hxx +++ /dev/null @@ -1,130 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 __DBGOUTSW_HXX -#define __DBGOUTSW_HXX - -#if OSL_DEBUG_LEVEL > 1 - -#include <boost/unordered_map.hpp> -#include <tox.hxx> -#include <cstdio> -class String; - -namespace rtl -{ -class OUString; -} -class SwNode; -class SwTxtAttr; -class SwpHints; -class SfxPoolItem; -class SfxItemSet; -struct SwPosition; -class SwPaM; -class SwNodeNum; -class SwUndo; -class SwRect; -class SwFrmFmt; -class SwFrmFmts; -class SwNodes; -class SwRewriter; -class SwNumRuleTbl; -class SwNumRule; -class SwOutlineNodes; -class SwTxtFmtColl; -class SwNodeRange; - -#define DBG_OUT_HERE printf("%s(%d):", __FILE__, __LINE__) -#define DBG_OUT_HERE_FN printf("%s(%d) %s:", __FILE__, __LINE__, __FUNCTION__) -#define DBG_OUT_HERE_LN printf("%s(%d)\n", __FILE__, __LINE__) -#define DBG_OUT_HERE_FN_LN printf("%s(%d) %s\n", __FILE__, __LINE__, __FUNCTION__) -#define DBG_OUT(x) printf("%s\n", dbg_out(x)) -#define DBG_OUT_LN(x) printf("%s(%d): %s\n", __FILE__, __LINE__, dbg_out(x)) -#define DBG_OUT_FN_LN(x) printf("%s: %s\n", __FUNCTION__, dbg_out(x)) - -extern bool bDbgOutStdErr; -extern bool bDbgOutPrintAttrSet; - -SW_DLLPUBLIC const char * dbg_out(const void * pVoid); -SW_DLLPUBLIC const char * dbg_out(const String & aStr); -SW_DLLPUBLIC const char * dbg_out(const ::rtl::OUString & aStr); -SW_DLLPUBLIC const char * dbg_out(const SwRect & rRect); -SW_DLLPUBLIC const char * dbg_out(const SwFrmFmt & rFrmFmt); -SW_DLLPUBLIC const char * dbg_out(const SwNode & rNode); -SW_DLLPUBLIC const char * dbg_out(const SwTxtAttr & rAttr); -SW_DLLPUBLIC const char * dbg_out(const SwpHints &rHints); -SW_DLLPUBLIC const char * dbg_out(const SfxPoolItem & rItem); -SW_DLLPUBLIC const char * dbg_out(const SfxPoolItem * pItem); -SW_DLLPUBLIC const char * dbg_out(const SfxItemSet & rSet); -SW_DLLPUBLIC const char * dbg_out(SwNodes & rNodes); -SW_DLLPUBLIC const char * dbg_out(const SwPosition & rPos); -SW_DLLPUBLIC const char * dbg_out(const SwPaM & rPam); -SW_DLLPUBLIC const char * dbg_out(const SwNodeNum & rNum); -SW_DLLPUBLIC const char * dbg_out(const SwUndo & rUndo); -SW_DLLPUBLIC const char * dbg_out(const SwRewriter & rRewriter); -SW_DLLPUBLIC const char * dbg_out(const SwNumRule & rRule); -SW_DLLPUBLIC const char * dbg_out(const SwTxtFmtColl & rFmt); -SW_DLLPUBLIC const char * dbg_out(const SwFrmFmts & rFrmFmts); -SW_DLLPUBLIC const char * dbg_out(const SwNumRuleTbl & rTbl); -SW_DLLPUBLIC const char * dbg_out(const SwNodeRange & rRange); - -template<typename tKey, typename tMember, typename fHashFunction> -String lcl_dbg_out(const boost::unordered_map<tKey, tMember, fHashFunction> & rMap) -{ - String aResult("[", RTL_TEXTENCODING_ASCII_US); - - typename boost::unordered_map<tKey, tMember, fHashFunction>::const_iterator aIt; - - for (aIt = rMap.begin(); aIt != rMap.end(); aIt++) - { - if (aIt != rMap.begin()) - aResult += String(", ", RTL_TEXTENCODING_ASCII_US); - - aResult += aIt->first; - - char sBuffer[256]; - sprintf(sBuffer, "(%p)", aIt->second); - aResult += String(sBuffer, RTL_TEXTENCODING_ASCII_US); - } - - aResult += String("]", RTL_TEXTENCODING_ASCII_US); - - return aResult; -} - -template<typename tKey, typename tMember, typename fHashFunction> -const char * dbg_out(const boost::unordered_map<tKey, tMember, fHashFunction> & rMap) -{ - return dbg_out(lcl_dbg_out(rMap)); -} -SW_DLLPUBLIC const char * dbg_out(const SwFormToken & rToken); -SW_DLLPUBLIC const char * dbg_out(const SwFormTokens & rTokens); -#endif // OSL_DEBUG_LEVEL > 1 -#endif // __DBGOUTSW_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx deleted file mode 100644 index c1e4e4b746..0000000000 --- a/sw/inc/dbmgr.hxx +++ /dev/null @@ -1,399 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWDBMGR_HXX -#define _SWDBMGR_HXX - - -#include <tools/string.hxx> -#include <tools/link.hxx> -#include <svl/svarray.hxx> -#include <com/sun/star/util/Date.hpp> -#include "swdllapi.h" -#include <swdbdata.hxx> -#include <com/sun/star/uno/Reference.h> -#include <com/sun/star/uno/Sequence.hxx> -#include <com/sun/star/lang/Locale.hpp> -#include <com/sun/star/beans/PropertyValue.hpp> -namespace com{namespace sun{namespace star{ - namespace sdbc{ - class XConnection; - class XStatement; - class XDataSource; - class XResultSet; - } - namespace beans{ - - class XPropertySet; - struct PropertyValue; - } - namespace sdbcx{ - class XColumnsSupplier; - } - namespace util{ - class XNumberFormatter; - } - namespace mail{ - class XSmtpService; - } -}}} -namespace svx { - class ODataAccessDescriptor; -} - -struct SwDBFormatData -{ - com::sun::star::util::Date aNullDate; - com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatter> xFormatter; - com::sun::star::lang::Locale aLocale; -}; - -class SwView; -class SwWrtShell; -class SfxProgress; -class ListBox; -class Button; -class SvNumberFormatter; -class SwDbtoolsClient; -class SwXMailMerge; -class SwMailMergeConfigItem; - -// ----------------------------------------------------------------------- - -enum DBMgrOptions -{ - DBMGR_MERGE, // Data records in fields. - DBMGR_INSERT, // Data records in text. - DBMGR_MERGE_MAILMERGE, // Print mail merge. - DBMGR_MERGE_MAILING, // Send mail merge as email. - DBMGR_MERGE_MAILFILES, // Save mail merg as files. - DBMGR_MERGE_DOCUMENTS, // Print merged documents. - DBMGR_MERGE_SINGLE_FILE // Save merge as single file. -}; - -// ----------------------------------------------------------------------- - -/*-------------------------------------------------------------------- - Administration of (new) logical databases. - --------------------------------------------------------------------*/ -#define SW_DB_SELECT_UNKNOWN 0 -#define SW_DB_SELECT_TABLE 1 -#define SW_DB_SELECT_QUERY 2 - -struct SwDSParam : public SwDBData -{ - com::sun::star::util::Date aNullDate; - - ::com::sun::star::uno::Reference<com::sun::star::util::XNumberFormatter> xFormatter; - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection; - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement> xStatement; - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xResultSet; - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aSelection; - sal_Bool bScrollable; - sal_Bool bEndOfDB; - sal_Bool bAfterSelection; - long nSelectionIndex; - - SwDSParam(const SwDBData& rData) : - SwDBData(rData), - bScrollable(sal_False), - bEndOfDB(sal_False), - bAfterSelection(sal_False), - nSelectionIndex(0) - {} - - SwDSParam(const SwDBData& rData, - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& xResSet, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rSelection) : - SwDBData(rData), - xResultSet(xResSet), - aSelection(rSelection), - bScrollable(sal_True), - bEndOfDB(sal_False), - bAfterSelection(sal_False), - nSelectionIndex(0) - {} - - void CheckEndOfDB() - { - if(bEndOfDB) - bAfterSelection = sal_True; - } -}; -typedef SwDSParam* SwDSParamPtr; -SV_DECL_PTRARR_DEL(SwDSParamArr, SwDSParamPtr, 0, 5) - -struct SwMergeDescriptor -{ - sal_uInt16 nMergeType; - SwWrtShell& rSh; - const ::svx::ODataAccessDescriptor& rDescriptor; - String sSaveToFilter; //export filter to save resulting files - String sSaveToFilterOptions; - com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSaveToFilterData; - - String sSubject; - String sAddressFromColumn; - String sMailBody; - String sAttachmentName; - ::com::sun::star::uno::Sequence< ::rtl::OUString > aCopiesTo; - ::com::sun::star::uno::Sequence< ::rtl::OUString > aBlindCopiesTo; - - ::com::sun::star::uno::Reference< com::sun::star::mail::XSmtpService > xSmtpServer; - - sal_Bool bSendAsHTML; - sal_Bool bSendAsAttachment; - - sal_Bool bPrintAsync; - sal_Bool bCreateSingleFile; - - SwMailMergeConfigItem* pMailMergeConfigItem; - - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aPrintOptions; - - SwMergeDescriptor( sal_uInt16 nType, SwWrtShell& rShell, ::svx::ODataAccessDescriptor& rDesc ) : - nMergeType(nType), - rSh(rShell), - rDescriptor(rDesc), - bSendAsHTML( sal_True ), - bSendAsAttachment( sal_False ), - bPrintAsync( sal_False ), - bCreateSingleFile( sal_False ), - pMailMergeConfigItem(0) - {} - -}; - -struct SwNewDBMgr_Impl; -class SwConnectionDisposedListener_Impl; -class AbstractMailMergeDlg; - -class SW_DLLPUBLIC SwNewDBMgr -{ -friend class SwConnectionDisposedListener_Impl; - - static SwDbtoolsClient* pDbtoolsClient; - - String sEMailAddrFld; // Mailing: Column name of email address. - String sSubject; // Mailing: Subject - String sAttached; // Mailing: Attached Files. - sal_uInt16 nMergeType; - sal_Bool bInitDBFields : 1; - sal_Bool bSingleJobs : 1; // Printing job when called from Basic. - sal_Bool bCancel : 1; // Mail merge save canceled. - - sal_Bool bInMerge : 1; //merge process active - sal_Bool bMergeSilent : 1; // suppress display of dialogs/boxes (used when called over API) - sal_Bool bMergeLock : 1; // prevent update of database fields while document is - // actually printed at the ViewShell - SwDSParamArr aDataSourceParams; - SwNewDBMgr_Impl* pImpl; - const SwXMailMerge* pMergeEvtSrc; // != 0 if mail merge events are to be send - - SW_DLLPRIVATE SwDSParam* FindDSData(const SwDBData& rData, sal_Bool bCreate); - SW_DLLPRIVATE SwDSParam* FindDSConnection(const ::rtl::OUString& rSource, sal_Bool bCreate); - - - SW_DLLPRIVATE DECL_LINK( PrtCancelHdl, Button * ); - - // Insert data record as text into document. - SW_DLLPRIVATE void ImportFromConnection( SwWrtShell* pSh); - - // Insert a single data record as text into document. - SW_DLLPRIVATE void ImportDBEntry(SwWrtShell* pSh); - - // merge to file _and_ merge to e-Mail - SW_DLLPRIVATE sal_Bool MergeMailFiles(SwWrtShell* pSh, - const SwMergeDescriptor& rMergeDescriptor ); - SW_DLLPRIVATE sal_Bool ToNextRecord(SwDSParam* pParam); - -public: - SwNewDBMgr(); - ~SwNewDBMgr(); - - // Current merge type. Cf. DBMgrOptions-enum. - inline sal_uInt16 GetMergeType() const { return nMergeType; } - inline void SetMergeType( sal_uInt16 nTyp ) { nMergeType = nTyp; } - - // MailMergeEvent source - const SwXMailMerge * GetMailMergeEvtSrc() const { return pMergeEvtSrc; } - void SetMailMergeEvtSrc( const SwXMailMerge *pSrc ) { pMergeEvtSrc = pSrc; } - - inline sal_Bool IsMergeSilent() const { return bMergeSilent != 0; } - inline void SetMergeSilent( sal_Bool bVal ) { bMergeSilent = bVal; } - - // Merging of data records into fields. - sal_Bool MergeNew( const SwMergeDescriptor& rMergeDesc ); - sal_Bool Merge(SwWrtShell* pSh); - - // Initialize data fields that lack name of database. - inline sal_Bool IsInitDBFields() const { return bInitDBFields; } - inline void SetInitDBFields(sal_Bool b) { bInitDBFields = b; } - - // Print / Save mail merge one by one or all together. - inline sal_Bool IsSingleJobs() const { return bSingleJobs; } - inline void SetSingleJobs(sal_Bool b) { bSingleJobs = b; } - - // Mailing: Set email data. - inline void SetEMailColumn(const String& sColName) { sEMailAddrFld = sColName; } - inline void SetSubject(const String& sSbj) { sSubject = sSbj; } - inline void SetAttachment(const String& sAtt) { sAttached = sAtt; } - - - // Fill listbox with all table names of a database. - sal_Bool GetTableNames(ListBox* pListBox, const String& rDBName ); - - // Fill listbox with all column names of a database table. - sal_Bool GetColumnNames(ListBox* pListBox, - const String& rDBName, const String& rTableName, sal_Bool bAppend = sal_False); - sal_Bool GetColumnNames(ListBox* pListBox, - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection, - const String& rTableName, sal_Bool bAppend = sal_False); - - sal_uLong GetColumnFmt( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> xSource, - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection, - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xColumn, - SvNumberFormatter* pNFmtr, - long nLanguage ); - - sal_uLong GetColumnFmt( const String& rDBName, - const String& rTableName, - const String& rColNm, - SvNumberFormatter* pNFmtr, - long nLanguage ); - sal_Int32 GetColumnType( const String& rDBName, - const String& rTableName, - const String& rColNm ); - - inline sal_Bool IsInMerge() const { return bInMerge; } - void EndMerge(); - - void ExecuteFormLetter(SwWrtShell& rSh, - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties, - sal_Bool bWithDataSourceBrowser = sal_False); - - void InsertText(SwWrtShell& rSh, - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties); - - // check if a data source is open - sal_Bool IsDataSourceOpen(const String& rDataSource, - const String& rTableOrQuery, sal_Bool bMergeOnly); - - // open the source while fields are updated - for the calculator only! - sal_Bool OpenDataSource(const String& rDataSource, const String& rTableOrQuery, - sal_Int32 nCommandType = -1, bool bCreate = false); - sal_uInt32 GetSelectedRecordId(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1); - sal_Bool GetColumnCnt(const String& rSourceName, const String& rTableName, - const String& rColumnName, sal_uInt32 nAbsRecordId, long nLanguage, - String& rResult, double* pNumber); - //create and store or find an already stored connection to a data source for use - //in SwFldMgr and SwDBTreeList - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> - RegisterConnection(::rtl::OUString& rSource); - - const SwDSParam* CreateDSData(const SwDBData& rData) - {return FindDSData(rData, sal_True);} - const SwDSParamArr& GetDSParamArray() const {return aDataSourceParams;} - - - //close all data sources - after fields were updated - void CloseAll(sal_Bool bIncludingMerge = sal_True); - - sal_Bool GetMergeColumnCnt(const String& rColumnName, sal_uInt16 nLanguage, - String &rResult, double *pNumber, sal_uInt32 *pFormat); - sal_Bool ToNextMergeRecord(); - sal_Bool ToNextRecord(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1); - - sal_Bool ExistsNextRecord()const; - sal_uInt32 GetSelectedRecordId(); - sal_Bool ToRecordId(sal_Int32 nSet); - - const SwDBData& GetAddressDBName(); - - static String GetDBField( - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xColumnProp, - const SwDBFormatData& rDBFormatData, - double *pNumber = NULL); - - static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> - GetConnection(const String& rDataSource, - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>& rxSource); - - static ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> - GetColumnSupplier(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>, - const String& rTableOrQuery, - sal_uInt8 eTableOrQuery = SW_DB_SELECT_UNKNOWN); - - static ::com::sun::star::uno::Sequence<rtl::OUString> GetExistingDatabaseNames(); - - /** - Loads a data source from file and registers it. Returns the registered name. - */ - static String LoadAndRegisterDataSource(); - - static SwDbtoolsClient& GetDbtoolsClient(); - // has to be called from _FinitUI() - static void RemoveDbtoolsClient(); - - /** try to get the data source from the given connection through the XChild interface. - If this is not possible, the data source will be created through its name. - @param _xConnection - The connection which should support the XChild interface. (not a must) - @param _sDataSourceName - The data source name will be used to create the data source when the connection can not be used for it. - @return - The data source. - */ - static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> - getDataSourceAsParent(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,const ::rtl::OUString& _sDataSourceName); - - /** creates a RowSet, which must be disposed after use. - @param _sDataSourceName - The data source name - @param _sCommand - The command. - @param _nCommandType - The type of the command. - @param _xConnection - The active connection which may be <NULL/>. - @return - The new created RowSet. - - */ - static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> - createCursor( const ::rtl::OUString& _sDataSourceName, - const ::rtl::OUString& _sCommand, - sal_Int32 _nCommandType, - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection - ); - //merge into one document - returns the number of merged docs - sal_Int32 MergeDocuments( SwMailMergeConfigItem& rMMConfig, SwView& rSourceView ); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc deleted file mode 100644 index 070c5a2a37..0000000000 --- a/sw/inc/dbui.hrc +++ /dev/null @@ -1,124 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _DBUI_HRC -#define _DBUI_HRC - -#include "rcid.hrc" - -// Dialoge -------------------------------------------------------------------- - -#define DLG_DBSELECTION (RC_DBUI_BEGIN) -#define DLG_PRINTMONITOR (RC_DBUI_BEGIN + 1) -#define DLG_AP_INSERT_DB_SEL (RC_DBUI_BEGIN + 2) - -#define DLG_MAILMERGEWIZARD (RC_DBUI_BEGIN + 3) -#define DLG_MM_DOCSELECT_PAGE (RC_DBUI_BEGIN + 4) -#define DLG_MM_OUTPUTTYPE_PAGE (RC_DBUI_BEGIN + 5) -#define DLG_MM_ADDRESSBLOCK_PAGE (RC_DBUI_BEGIN + 6) -#define DLG_MM_GREETINGS_PAGE (RC_DBUI_BEGIN + 7) -#define DLG_MM_PREPAREMERGE_PAGE (RC_DBUI_BEGIN + 8) -#define DLG_MM_MERGE_PAGE (RC_DBUI_BEGIN + 9) -#define DLG_MM_OUTPUT_PAGE (RC_DBUI_BEGIN + 10) -#define DLG_MM_ADDRESSLISTDIALOG (RC_DBUI_BEGIN + 11) -#define DLG_MM_SELECTDBTABLEDDIALOG (RC_DBUI_BEGIN + 12) -#define DLG_MM_DBTABLEPREVIEWDIALOG (RC_DBUI_BEGIN + 13) -#define DLG_MM_CREATEADDRESSLIST (RC_DBUI_BEGIN + 14) -#define DLG_MM_FIND_ENTRY (RC_DBUI_BEGIN + 15) -#define DLG_MM_ADD_RENAME_ENTRY (RC_DBUI_BEGIN + 16) -#define DLG_MM_CUSTOMIZE_ADDRESS_LIST (RC_DBUI_BEGIN + 17) -#define DLG_MM_CUSTOMIZEADDRESSBLOCK (RC_DBUI_BEGIN + 18) -#define DLG_MM_SELECTADDRESSBLOCK (RC_DBUI_BEGIN + 19) -#define DLG_MM_ASSIGNFIELDS (RC_DBUI_BEGIN + 20) - -#define DLG_MM_LAYOUT_PAGE (RC_DBUI_BEGIN + 22) -#define DLG_MM_COPYTO (RC_DBUI_BEGIN + 23) -#define DLG_MM_MAILBODY (RC_DBUI_BEGIN + 24) -#define DLG_MM_SENDMAILS (RC_DBUI_BEGIN + 25) -#define DLG_MAILMERGECHILD (RC_DBUI_BEGIN + 26) -#define DLG_MM_SAVEWARNING (RC_DBUI_BEGIN + 27) -#define DLG_MM_QUERY (RC_DBUI_BEGIN + 28) -#define DLG_MM_SENDWARNING (RC_DBUI_BEGIN + 29) -#define DLG_MM_CREATIONMONITOR (RC_DBUI_BEGIN + 30) -// Strings ------------------------------------------------------------------ - -#define STR_DB_EMAIL (RC_DBUI_BEGIN) -#define SA_ADDRESS_HEADER (RC_DBUI_BEGIN + 1) -#define STR_NOTASSIGNED (RC_DBUI_BEGIN + 2) -#define STR_FILTER_ALL (RC_DBUI_BEGIN + 3) -#define STR_FILTER_SXB (RC_DBUI_BEGIN + 4) -#define STR_FILTER_SXC (RC_DBUI_BEGIN + 5) -#define STR_FILTER_DBF (RC_DBUI_BEGIN + 6) -#define STR_FILTER_XLS (RC_DBUI_BEGIN + 7) -#define STR_FILTER_TXT (RC_DBUI_BEGIN + 8) -#define STR_FILTER_CSV (RC_DBUI_BEGIN + 9) -#define STR_FILTER_ALL_DATA (RC_DBUI_BEGIN + 10) -#define STR_FILTER_MDB (RC_DBUI_BEGIN + 11) -#define STR_FILTER_ACCDB (RC_DBUI_BEGIN + 12) - -// Bitmaps ------------------------------------------------------------------ - - -// Elements ----------------------------------------------------------------- - -#define TLB_DBLIST 1 -#define BTN_OK 2 -#define BTN_CANCEL 3 -#define BTN_HELP 4 - -#define FT_DOCNAME 5 -#define FT_PRINTING 6 -#define FT_PRINTER 7 -#define FT_PRINTINFO 8 -#define PB_CANCELPRNMON 9 -#define FT_SENDING 10 -#define STR_EMAILMON 11 -#define FT_STATUS 12 -#define FT_CREATEDOCUMENTS 13 -#define FT_PROGRESS 14 -#define FT_COUNTING 15 -#define STR_SAVEMON 16 -#define FT_SAVING 17 - -#define MM_PART_TITLE 0 -#define MM_PART_FIRSTNAME 1 -#define MM_PART_LASTNAME 2 -#define MM_PART_COMPANY 3 -#define MM_PART_ADDRESS_1 4 -#define MM_PART_ADDRESS_2 5 -#define MM_PART_CITY 6 -#define MM_PART_REGION 7 -#define MM_PART_ZIP 8 -#define MM_PART_COUNTRY 9 -#define MM_PART_PHONE_PRIVATE 10 -#define MM_PART_PHONE_BUSINESS 11 -#define MM_PART_E_MAIL 12 -#define MM_PART_GENDER 13 - -#endif - - diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx deleted file mode 100644 index 1da6eb38be..0000000000 --- a/sw/inc/dcontact.hxx +++ /dev/null @@ -1,493 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _DCONTACT_HXX -#define _DCONTACT_HXX - -#include <svx/svdobj.hxx> -#include <svx/svdovirt.hxx> -#include <swtypes.hxx> -#include <fmtanchr.hxx> -#include <frmfmt.hxx> -#include <list> - -#include "calbck.hxx" -#include <anchoreddrawobject.hxx> - -class SfxPoolItem; -class SwFrmFmt; -class SwFlyFrmFmt; -class SwFlyFrm; -class SwFrm; -class SwPageFrm; -class SwVirtFlyDrawObj; -class SwFmtAnchor; -class SwFlyDrawObj; -class SwRect; -class SwDrawContact; -struct SwPosition; -class SwIndex; -class SdrTextObj; - -// The other way round: Search format for given object. -// If object is a SwVirtFlyDrawObj the format will be obtained from it. -// If not it is a simple DrawObject. It has a UserCall which -// is client of the format we are looking for. -// Implementation in dcontact.cxx. -SW_DLLPUBLIC SwFrmFmt *FindFrmFmt( SdrObject *pObj ); -inline const SwFrmFmt *FindFrmFmt( const SdrObject *pObj ) -{ return ::FindFrmFmt( (SdrObject*)pObj ); } -sal_Bool HasWrap( const SdrObject* pObj ); - -void setContextWritingMode( SdrObject* pObj, SwFrm* pAnchor ); - -// When changes occur remove object from ContourCache. -// Implementation in TxtFly.cxx. -void ClrContourCache( const SdrObject *pObj ); - -// Returns BoundRect plus distance. -SwRect GetBoundRectOfAnchoredObj( const SdrObject* pObj ); - -// Returns UserCall of goup object (if applicable). -SwContact* GetUserCall( const SdrObject* ); - -// Returns TRUE if the SrdObject is a Marquee object. -sal_Bool IsMarqueeTextObj( const SdrObject& rObj ); - -// Base class for the following contact objects (frame + draw objects). -class SwContact : public SdrObjUserCall, public SwClient -{ - // boolean, indicating destruction of contact object - // important note: boolean has to be set at the beginning of each destructor - // in the subclasses using method <SetInDTOR()>. - bool mbInDTOR; - - /** method to move object to visible/invisible layer - - Implementation for the public method <MoveObjToVisibleLayer(..)> - and <MoveObjToInvisibleLayer(..)> - If object is in invisble respectively visible layer, its moved to - the corresponding visible respectively invisible layers. - For group object the members are individually moved to the corresponding - layer, because <SdrObjGroup::GetLayer()> does return 0, if members - aren't on the same layer as the group object, and - <SdrObjGroup::SetLayer(..)|NbcSetLayer(..)> sets also the layer of - the members. - - @author OD - - @param _bToVisible - input parameter - boolean indicating, if object has to be moved to - visible (== true) or invisible (== false) layer. - - @param _pDrawObj - input parameter, which will be changed - drawing object, which will - change its layer. - */ - void _MoveObjToLayer( const bool _bToVisible, - SdrObject* _pDrawObj ); - -protected: - void SetInDTOR(); - -public: - TYPEINFO(); - - //For reader. Only the connection is created. - SwContact( SwFrmFmt *pToRegisterIn ); - virtual ~SwContact(); - - virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const = 0; - virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj ) = 0; - - virtual const SdrObject *GetMaster() const = 0; - virtual SdrObject *GetMaster() = 0; - virtual void SetMaster( SdrObject* _pNewMaster ) = 0; - - SwFrmFmt *GetFmt(){ return (SwFrmFmt*)GetRegisteredIn(); } - const SwFrmFmt *GetFmt() const - { return (const SwFrmFmt*)GetRegisteredIn(); } - - bool IsInDTOR() const; - - /** method to move drawing object to corresponding visible layer - - uses method <_MoveObjToLayer(..)> - - @author OD - - @param _pDrawObj - drawing object, which will be moved to the visible layer - */ - virtual void MoveObjToVisibleLayer( SdrObject* _pDrawObj ); - - /** method to move drawing object to corresponding invisible layer - - uses method <_MoveObjToLayer(..)> - - @author OD - - @param _pDrawObj - drawing object, which will be moved to the visible layer - */ - virtual void MoveObjToInvisibleLayer( SdrObject* _pDrawObj ); - - // ------------------------------------------------------------------------- - // some virtual helper methods for information - // about the object (Writer fly frame resp. drawing object) - const SwFmtAnchor& GetAnchorFmt() const - { - OSL_ENSURE( GetFmt(), - "<SwContact::GetAnchorFmt()> - no frame format -> crash" ); - - return GetFmt()->GetAnchor(); - } - - RndStdIds GetAnchorId() const { return GetAnchorFmt().GetAnchorId(); } - bool ObjAnchoredAtPage() const { return GetAnchorId() == FLY_AT_PAGE; } - bool ObjAnchoredAtFly() const { return GetAnchorId() == FLY_AT_FLY; } - bool ObjAnchoredAtPara() const { return GetAnchorId() == FLY_AT_PARA; } - bool ObjAnchoredAtChar() const { return GetAnchorId() == FLY_AT_CHAR; } - bool ObjAnchoredAsChar() const { return GetAnchorId() == FLY_AS_CHAR; } - - const SwPosition& GetCntntAnchor() const - { - OSL_ENSURE( GetAnchorFmt().GetCntntAnchor(), - "<SwContact::GetCntntAnchor()> - no content anchor -> crash" ); - - return *(GetAnchorFmt().GetCntntAnchor()); - } - - const SwIndex& GetCntntAnchorIndex() const; - - // ------------------------------------------------------------------------- - - /** get data collection of anchored objects, handled by with contact - - */ - virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const = 0; - - /** get minimum order number of anchored objects handled by with contact - - */ - sal_uInt32 GetMinOrdNum() const; - - /** get maximum order number of anchored objects handled by with contact - - */ - sal_uInt32 GetMaxOrdNum() const; -}; - -// ContactObject for connection between frames (or their formats respectively) -// in SwClient and the drawobjects of Drawing (DsrObjUserCall). - -class SW_DLLPUBLIC SwFlyDrawContact : public SwContact -{ -private: - SwFlyDrawObj* mpMasterObj; - -protected: - // virtuelle Methoden von SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ); - -public: - TYPEINFO(); - - // Creates DrawObject and registers it with the Model. - SwFlyDrawContact( SwFlyFrmFmt* pToRegisterIn, SdrModel* pMod ); - virtual ~SwFlyDrawContact(); - - virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const; - virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj ); - - virtual const SdrObject* GetMaster() const; - virtual SdrObject* GetMaster(); - virtual void SetMaster( SdrObject* _pNewMaster ); - - // override methods to control Writer fly frames, - // which are linked, and to assure that all objects anchored at/inside the - // Writer fly frame are also made visible/invisible. - virtual void MoveObjToVisibleLayer( SdrObject* _pDrawObj ); - virtual void MoveObjToInvisibleLayer( SdrObject* _pDrawObj ); - - /** get data collection of anchored objects handled by with contact - */ - virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const; -}; - -// new class for re-direct methods calls at a 'virtual' -// drawing object to its referenced object. -class SwDrawVirtObj : public SdrVirtObj -{ - private: - // data for connection to writer layout - // anchored drawing object instance for the - // 'virtual' drawing object - SwAnchoredDrawObject maAnchoredDrawObj; - - // writer-drawing contact object the 'virtual' drawing object is controlled by. - // This object is also the <UserCall> of the drawing object, if it's - // inserted into the drawing layer. - SwDrawContact& mrDrawContact; - - using SdrVirtObj::GetPlusHdl; - - protected: - // AW: Need own sdr::contact::ViewContact since AnchorPos from parent is - // not used but something own (top left of new SnapRect minus top left - // of original SnapRect) - virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); - - public: - TYPEINFO(); - - SwDrawVirtObj( SdrObject& _rNewObj, - SwDrawContact& _rDrawContact ); - virtual ~SwDrawVirtObj(); - - // access to offset - virtual const Point GetOffset() const; - - virtual SwDrawVirtObj* Clone() const; - SwDrawVirtObj& operator= (const SwDrawVirtObj& rObj); - - // connection to writer layout - const SwAnchoredObject* GetAnchoredObj() const; - SwAnchoredObject* AnchoredObj(); - const SwFrm* GetAnchorFrm() const; - SwFrm* AnchorFrm(); - void RemoveFromWriterLayout(); - - // connection to drawing layer - void AddToDrawingPage(); - void RemoveFromDrawingPage(); - - // is 'virtual' drawing object connected to writer layout and - // to drawing layer. - bool IsConnected() const; - - virtual void NbcSetAnchorPos(const Point& rPnt); - - // All overloaded methods which need to use the offset - virtual void RecalcBoundRect(); - virtual ::basegfx::B2DPolyPolygon TakeXorPoly() const; - virtual ::basegfx::B2DPolyPolygon TakeContour() const; - virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const; - virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, sal_uInt16 nPlNum) const; - virtual void NbcMove(const Size& rSiz); - virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); - virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); - virtual void NbcMirror(const Point& rRef1, const Point& rRef2); - virtual void NbcShear(const Point& rRef, long nWink, double tn, bool bVShear); - virtual void Move(const Size& rSiz); - virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); - virtual void Rotate(const Point& rRef, long nWink, double sn, double cs); - virtual void Mirror(const Point& rRef1, const Point& rRef2); - virtual void Shear(const Point& rRef, long nWink, double tn, bool bVShear); - virtual void RecalcSnapRect(); - virtual const Rectangle& GetSnapRect() const; - virtual void SetSnapRect(const Rectangle& rRect); - virtual void NbcSetSnapRect(const Rectangle& rRect); - virtual const Rectangle& GetLogicRect() const; - virtual void SetLogicRect(const Rectangle& rRect); - virtual void NbcSetLogicRect(const Rectangle& rRect); - virtual Point GetSnapPoint(sal_uInt32 i) const; - virtual Point GetPoint(sal_uInt32 i) const; - virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i); - - virtual bool HasTextEdit() const; - - virtual SdrLayerID GetLayer() const; - virtual void NbcSetLayer(SdrLayerID nLayer); - virtual void SetLayer(SdrLayerID nLayer); - - // FullDrag support - virtual bool supportsFullDrag() const; - virtual SdrObject* getFullDragClone() const; - - virtual void SetBoundRectDirty(); - virtual const Rectangle& GetCurrentBoundRect() const; - virtual const Rectangle& GetLastBoundRect() const; -}; - -bool CheckControlLayer( const SdrObject *pObj ); - - -// ContactObject for connection of formats as representatives of draw objects -// in SwClient and the objects themselves in Drawing (SDrObjUserCall). -class NestedUserCallHdl; - -class SwDrawContact : public SwContact -{ - private: - // anchored drawing object instance for the - // 'master' drawing object - SwAnchoredDrawObject maAnchoredDrawObj; - - // data structure for collecting 'virtual' - // drawing object supporting drawing objects in headers/footers. - std::list<SwDrawVirtObj*> maDrawVirtObjs; - - // boolean indicating set 'master' drawing - // object has been cleared. - bool mbMasterObjCleared : 1; - - // internal flag to indicate that disconnect - // from layout is in progress - bool mbDisconnectInProgress : 1; - - // Needed data for handling of nested <SdrObjUserCall> events in - // method <_Changed(..)> - bool mbUserCallActive : 1; - // event type, which is handled for <mpSdrObjHandledByCurrentUserCall>. - // Note: value only valid, if <mbUserCallActive> is sal_True. - SdrUserCallType meEventTypeOfCurrentUserCall; - - friend class NestedUserCallHdl; - - // unary function used by <list> iterator to find a disconnected 'virtual' - // drawing object - struct UsedOrUnusedVirtObjPred - { - bool mbUsedPred; - UsedOrUnusedVirtObjPred( bool _bUsed ) : mbUsedPred( _bUsed ) {}; - bool operator() ( const SwDrawVirtObj* _pDrawVirtObj ) - { - if ( mbUsedPred ) - { - return _pDrawVirtObj->IsConnected(); - } - else - { - return !_pDrawVirtObj->IsConnected(); - } - } - }; - - // unary function used by <list> iterator to find a 'virtual' drawing - // object anchored at a given frame - struct VirtObjAnchoredAtFrmPred - { - const SwFrm* mpAnchorFrm; - VirtObjAnchoredAtFrmPred( const SwFrm& _rAnchorFrm ); - bool operator() ( const SwDrawVirtObj* _pDrawVirtObj ); - }; - - // method for adding/removing 'virtual' drawing object. - SwDrawVirtObj* CreateVirtObj(); - void DestroyVirtObj( SwDrawVirtObj* pVirtObj ); - void RemoveAllVirtObjs(); - - void _InvalidateObjs( const bool _bUpdateSortedObjsList = false ); - - // no copy-constructor and no assignment operator - SwDrawContact( const SwDrawContact& ); - SwDrawContact& operator=( const SwDrawContact& ); - - protected: - // virtuelle Methoden von SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ); - - public: - TYPEINFO(); - - SwDrawContact( SwFrmFmt *pToRegisterIn, SdrObject *pObj ); - virtual ~SwDrawContact(); - - virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const; - virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj ); - - virtual const SdrObject* GetMaster() const; - virtual SdrObject* GetMaster(); - virtual void SetMaster( SdrObject* _pNewMaster ); - - const SwFrm* GetAnchorFrm( const SdrObject* _pDrawObj = 0L ) const; - SwFrm* GetAnchorFrm( SdrObject* _pDrawObj = 0L ); - - inline const SwPageFrm* GetPageFrm() const - { - return maAnchoredDrawObj.GetPageFrm(); - } - inline SwPageFrm* GetPageFrm() - { - return maAnchoredDrawObj.GetPageFrm(); - } - void SetPageFrm( SwPageFrm* _pNewPageFrm ) - { - return maAnchoredDrawObj.SetPageFrm( _pNewPageFrm ); - } - void ChkPage(); - SwPageFrm* FindPage( const SwRect &rRect ); - - // Inserts SdrObject in the arrays of the layout ((SwPageFrm and SwFrm). - // The anchor is determined according to the attribute SwFmtAnchor. - // If required the object gets unregistered with the old anchor. - void ConnectToLayout( const SwFmtAnchor *pAnch = 0 ); - // method to insert 'master' drawing object - // into drawing page - void InsertMasterIntoDrawPage(); - - void DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer = true ); - // disconnect for a dedicated drawing object - - // could be 'master' or 'virtual'. - void DisconnectObjFromLayout( SdrObject* _pDrawObj ); - // method to remove 'master' drawing object - // from drawing page. - // To be used by the undo for delete of object. Call it after method - // <DisconnectFromLayout( bool = true )> is already performed. - // Note: <DisconnectFromLayout( bool )> no longer removes the 'master' - // drawing object from drawing page. - void RemoveMasterFromDrawPage(); - - // get drawing object ('master' or 'virtual') - // by frame. - SdrObject* GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm ); - - // Virtual methods of SdrObjUserCall. - virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect); - - // Used by Changed() and by UndoDraw. - // Notifies paragraphs that have to get out of the way. - void _Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle* pOldBoundRect); - - //Moves all SW-connections to new Master) - void ChangeMasterObject( SdrObject *pNewMaster ); - - SwDrawVirtObj* AddVirtObj(); - - void NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect ); - - /** get data collection of anchored objects, handled by with contact - */ - - static void GetTextObjectsFromFmt( std::list<SdrTextObj*>&, SwDoc* ); - virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx deleted file mode 100644 index 4b99259968..0000000000 --- a/sw/inc/ddefld.hxx +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_DDEFLD_HXX -#define SW_DDEFLD_HXX - -#include <sfx2/lnkbase.hxx> -#include "swdllapi.h" -#include "fldbas.hxx" - -class SwDoc; - -/*-------------------------------------------------------------------- - FieldType for DDE - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType -{ - String aName; - String aExpansion; - - ::sfx2::SvBaseLinkRef refLink; - SwDoc* pDoc; - - sal_uInt16 nRefCnt; - sal_Bool bCRLFFlag : 1; - sal_Bool bDeleted : 1; - - SW_DLLPRIVATE void _RefCntChgd(); - -public: - SwDDEFieldType( const String& rName, const String& rCmd, - sal_uInt16 = sfx2::LINKUPDATE_ONCALL ); - ~SwDDEFieldType(); - - const String& GetExpansion() const { return aExpansion; } - void SetExpansion( const String& rStr ) { aExpansion = rStr, - bCRLFFlag = sal_False; } - - virtual SwFieldType* Copy() const; - virtual const String& GetName() const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); - - String GetCmd() const; - void SetCmd( const String& rStr ); - - sal_uInt16 GetType() const { return refLink->GetUpdateMode(); } - void SetType( sal_uInt16 nType ) { refLink->SetUpdateMode( nType ); } - - sal_Bool IsDeleted() const { return bDeleted; } - void SetDeleted( sal_Bool b ) { bDeleted = b; } - - void UpdateNow() { refLink->Update(); } - void Disconnect() { refLink->Disconnect(); } - - const ::sfx2::SvBaseLink& GetBaseLink() const { return *refLink; } - ::sfx2::SvBaseLink& GetBaseLink() { return *refLink; } - - const SwDoc* GetDoc() const { return pDoc; } - SwDoc* GetDoc() { return pDoc; } - void SetDoc( SwDoc* pDoc ); - - void IncRefCnt() { if( !nRefCnt++ && pDoc ) _RefCntChgd(); } - void DecRefCnt() { if( !--nRefCnt && pDoc ) _RefCntChgd(); } - - void SetCRLFDelFlag( sal_Bool bFlag = sal_True ) { bCRLFFlag = bFlag; } -}; - -/*-------------------------------------------------------------------- - DDE-field - --------------------------------------------------------------------*/ - -class SwDDEField : public SwField -{ -private: - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - SwDDEField(SwDDEFieldType*); - ~SwDDEField(); - - // Get parameter via types. - // Name cannot be changed. - virtual const String& GetPar1() const; - - // Command - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); -}; - - -#endif // SW_DDEFLD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/dialog.hrc b/sw/inc/dialog.hrc deleted file mode 100644 index 8d3c82776c..0000000000 --- a/sw/inc/dialog.hrc +++ /dev/null @@ -1,87 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _DIALOG_HRC -#define _DIALOG_HRC - -#include "rcid.hrc" - -// Dialoge ****************************************************************** - -#define DLG_SAVE_REGISTRY_FILE (RC_DIALOG_BEGIN + 1) - -#define DLG_PASSWD (RC_DIALOG_BEGIN + 3) -#define DLG_PASTESPECIAL (RC_DIALOG_BEGIN + 5) -#define DLG_LINKS (RC_DIALOG_BEGIN + 6) -#define DLG_LINKEDIT (RC_DIALOG_BEGIN + 7) -#define DLG_INSERT_ABSTRACT (RC_DIALOG_BEGIN + 8) -#define DLG_ASCII_FILTER (RC_DIALOG_BEGIN + 9) -#define DLG_WORDCOUNT (RC_DIALOG_BEGIN + 10) -#define RID_QB_SPELL_CONTINUE (RC_DIALOG_BEGIN + 11) -#define STR_SPELLING_COMPLETED (RC_DIALOG_BEGIN + 12) - -// Strings ****************************************************************** - -#define STR_LINKEDIT_TEXT (RC_DIALOG_BEGIN + 1) - -#define STR_CLOSELINKMSG (RC_DIALOG_BEGIN + 3) -#define STR_PATH_NOT_FOUND (RC_DIALOG_BEGIN + 4) - -#define STR_FLT_SGV (RC_DIALOG_BEGIN + 8) - -#define STR_NEWDLG_NAME (RC_DIALOG_BEGIN + 10) - -// Controls ***************************************************************** - -#define CB_USE_PASSWD (RC_DIALOG_BEGIN ) -#define CB_READ_ONLY (RC_DIALOG_BEGIN + 1) - -// Bereiche ***************************************************************** - - -#define RC_REGIONSW_BEGIN (RC_DIALOG_BEGIN + 60) -#define RC_REGIONSW_END (RC_DIALOG_BEGIN + 79) - -#define RC_MACASSGN_BEGIN (RC_DIALOG_BEGIN + 80) -#define RC_MACASSGN_END (RC_DIALOG_BEGIN + 89) - -#define RC_DLG_ADDR (RC_DIALOG_BEGIN + 90) -#define RC_SWDLG_BACKGROUND (RC_DIALOG_BEGIN + 91) -#define RC_DLG_SWNUMFMTDLG (RC_DIALOG_BEGIN + 92) -#define RC_DLG_SWBORDERDLG (RC_DIALOG_BEGIN + 93) -#define RC_DLG_SWWRAPDLG (RC_DIALOG_BEGIN + 94) -#define RC_DLG_SWFLDEDITDLG (RC_DIALOG_BEGIN + 95) -// Ueberlaufpruefung ******************************************************** - -#define DIALOG_ACT_END RC_MACASSGN_END - -#if DIALOG_ACT_END > RC_DIALOG_END -#error Resource-Ueberlauf in #file, #line -#endif - -#endif - diff --git a/sw/inc/dlelstnr.hxx b/sw/inc/dlelstnr.hxx deleted file mode 100644 index 6e597d04c8..0000000000 --- a/sw/inc/dlelstnr.hxx +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _DLELSTNR_HXX_ -#define _DLELSTNR_HXX_ - -#include <cppuhelper/weak.hxx> -#include <com/sun/star/linguistic2/XDictionaryListEventListener.hpp> -#include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp> -#include <com/sun/star/frame/XTerminateListener.hpp> -#include <com/sun/star/frame/XDesktop.hpp> -#include <cppuhelper/implbase2.hxx> // helper for implementations - - -namespace com { namespace sun { namespace star { - namespace linguistic2 { - class XDictionaryList; - class XLinguServiceManager; - class XProofreadingIterator; - } - namespace frame { - class XTerminateListener; - } -} } } - -/////////////////////////////////////////////////////////////////////////// -// SwLinguServiceEventListener -// is a EventListener that triggers spellchecking -// and hyphenation when relevant changes (to the -// dictionaries of the dictionary list, or properties) were made. -// - -class SwLinguServiceEventListener : - public cppu::WeakImplHelper2 - < - com::sun::star::linguistic2::XLinguServiceEventListener, - com::sun::star::frame::XTerminateListener - > -{ - com::sun::star::uno::Reference< - com::sun::star::frame::XDesktop > xDesktop; - com::sun::star::uno::Reference< - com::sun::star::linguistic2::XLinguServiceManager > xLngSvcMgr; - com::sun::star::uno::Reference< - com::sun::star::linguistic2::XProofreadingIterator > xGCIterator; - - // disallow use of copy-constructor and assignment operator - SwLinguServiceEventListener(const SwLinguServiceEventListener &); - SwLinguServiceEventListener & operator = (const SwLinguServiceEventListener &); - -public: - SwLinguServiceEventListener(); - virtual ~SwLinguServiceEventListener(); - - // XEventListener - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::uno::RuntimeException); - - // XDictionaryListEventListener - virtual void SAL_CALL processDictionaryListEvent( const ::com::sun::star::linguistic2::DictionaryListEvent& rDicListEvent) throw( ::com::sun::star::uno::RuntimeException ); - - // XLinguServiceEventListener - virtual void SAL_CALL processLinguServiceEvent( const ::com::sun::star::linguistic2::LinguServiceEvent& rLngSvcEvent ) throw(::com::sun::star::uno::RuntimeException); - - // XTerminateListener - virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::uno::RuntimeException); -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/dobjfac.hxx b/sw/inc/dobjfac.hxx deleted file mode 100644 index 421d8eba30..0000000000 --- a/sw/inc/dobjfac.hxx +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _DOBJFAC_HXX -#define _DOBJFAC_HXX - -#include <tools/link.hxx> - -//----------------------- -// class SwObjectFactory -//----------------------- -class SdrObjFactory; - -class SwObjectFactory -{ -public: - DECL_LINK( MakeObject, SdrObjFactory * ); -}; - -extern SwObjectFactory aSwObjectFactory; - - -#endif // _DOBJFAC_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx deleted file mode 100644 index cdb53b0bf4..0000000000 --- a/sw/inc/doc.hxx +++ /dev/null @@ -1,2101 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_DOC_HXX -#define SW_DOC_HXX - -/** SwDoc interfaces */ - -#include <IInterface.hxx> -#include <IDocumentSettingAccess.hxx> -#include <IDocumentDeviceAccess.hxx> -#include <IDocumentMarkAccess.hxx> -#include <IDocumentRedlineAccess.hxx> -#include <IDocumentLinksAdministration.hxx> -#include <IDocumentFieldsAccess.hxx> -#include <IDocumentContentOperations.hxx> -#include <IDocumentStylePoolAccess.hxx> -#include <IDocumentLineNumberAccess.hxx> -#include <IDocumentStatistics.hxx> -#include <IDocumentState.hxx> -#include <IDocumentDrawModelAccess.hxx> -#include <IDocumentLayoutAccess.hxx> -#include <IDocumentTimerAccess.hxx> -#include <IDocumentChartDataProviderAccess.hxx> -#include <IDocumentOutlineNodes.hxx> -#include <IDocumentListItems.hxx> - -#include <IDocumentListsAccess.hxx> -class SwList; - -#include <IDocumentExternalData.hxx> -#define _SVSTDARR_STRINGSDTOR -#include <svl/svstdarr.hxx> -#include <com/sun/star/embed/XEmbeddedObject.hpp> -#include <com/sun/star/embed/XStorage.hpp> -#include <vcl/timer.hxx> -#include <sal/macros.h> -#include "swdllapi.h" -#include <swtypes.hxx> -#include <swatrset.hxx> -#include <toxe.hxx> // enums -#include <flyenum.hxx> -#include <itabenum.hxx> -#include <swdbdata.hxx> -#include <chcmprse.hxx> -#include <com/sun/star/linguistic2/XSpellChecker1.hpp> -#include <com/sun/star/linguistic2/XHyphenatedWord.hpp> -#include <rtl/ref.hxx> -#include <svx/svdtypes.hxx> -#include <sfx2/objsh.hxx> -#include <svl/style.hxx> -#include <editeng/numitem.hxx> -#include "comphelper/implementationreference.hxx" -#include <com/sun/star/chart2/data/XDataProvider.hpp> -#include <com/sun/star/linguistic2/XProofreadingIterator.hpp> -#include <com/sun/star/script/vba/XVBAEventProcessor.hpp> - -#include <boost/unordered_map.hpp> -#include <stringhash.hxx> - -#include <svtools/embedhlp.hxx> -#include <vector> -#include <set> -#include <map> -#include <memory> - -#include <boost/scoped_ptr.hpp> - -namespace editeng { class SvxBorderLine; } - -class SvxForbiddenCharactersTable; -class SwExtTextInput; -class DateTime; -class EditFieldInfo; -class JobSetup; -class Color; -class KeyCode; -class Outliner; -class OutputDevice; -class Point; -class SbxArray; -class SdrModel; -class SdrObject; -class SdrUndoAction; -class VirtualDevice; -class SfxPrinter; -class SvNumberFormatter; -class SvStringsSort; -class SvxMacro; -class SvxMacroTableDtor; -class SwAutoCompleteWord; -class SwAutoCorrExceptWord; -class SwCalc; -class SwCellFrm; -class SwCharFmt; -class SwCharFmts; -class SwConditionTxtFmtColl; -class SwCrsrShell; -class SwCursor; -class SwDBNameInfField; -class SwDocShell; -class SwDocUpdtFld; -class SwDrawFrmFmt; -class SwDrawView; -class SwEditShell; -class SwFieldType; -class SwField; -class SwTxtFld; -class SwFldTypes; -class SwFlyFrmFmt; -class SwFmt; -class SwFmtINetFmt; -class SwFmtRefMark; -class SwFrmFmt; -class SwFrmFmts; -class SwFtnIdxs; -class SwFtnInfo; -class SwEndNoteInfo; -class GraphicObject; -class SwGrfFmtColl; -class SwGrfFmtColls; -class SwLineNumberInfo; -class SwNewDBMgr; -class SwNoTxtNode; -class SwNodeIndex; -class SwNodeRange; -class SwNodes; -class SwNumRule; -class SwNumRuleTbl; -class SwPageDesc; -class SwPosFlyFrms; -class SwPagePreViewPrtData; -class SwRedline; -class SwRedlineTbl; -class SwRootFrm; -class SwRubyList; -class SwRubyListEntry; -class SwSectionFmt; -class SwSectionFmts; -class SwSectionData; -class SwSelBoxes; -class SwSpzFrmFmts; -class SwTOXBase; -class SwTOXBaseSection; -class SwTOXMark; -class SwTOXMarks; -class SwTOXType; -class SwTOXTypes; -class SwTabCols; -class SwTable; -class SwTableAutoFmt; -class SwTableBox; -class SwTableBoxFmt; -class SwTableFmt; -class SwTableLineFmt; -class SwTableNode; -class SwTextBlocks; -class SwTxtFmtColl; -class SwTxtFmtColls; -class SwURLStateChanged; -class SwUnoCrsr; -class SwUnoCrsrTbl; -class ViewShell; -class _SetGetExpFld; -class SwDrawContact; -class SwLayouter; -class SdrView; -class SdrMarkList; -class SwAuthEntry; -class SwLayoutCache; -class IStyleAccess; -struct SwCallMouseEvent; -struct SwDocStat; -struct SwHash; -struct SwSortOptions; -struct SwDefTOXBase_Impl; -class SwPrintData; -class SwPrintUIOptions; -class SdrPageView; -struct SwConversionArgs; -class SwRewriter; -class SwMsgPoolItem; -class SwChartDataProvider; -class SwChartLockController_Helper; -class IGrammarContact; -class SwPrintData; -class SwRenderData; -class SwPageFrm; -class SwViewOption; -class IDocumentUndoRedo; - -namespace sw { namespace mark { - class MarkManager; -}} -namespace sw { - class MetaFieldManager; - class UndoManager; - class IShellCursorSupplier; -} - -namespace com { namespace sun { namespace star { -namespace i18n { - struct ForbiddenCharacters; // comes from the I18N UNO interface -} -namespace uno { - template < class > class Sequence; -} -namespace container { - class XNameContainer; // for getXForms()/isXForms()/initXForms() methods -} -}}} - -namespace sfx2 { - class SvLinkSource; - class IXmlIdRegistry; - class LinkManager; -} - -// PageDescriptor-interface, Array because of inlines. -typedef SwPageDesc* SwPageDescPtr; -SV_DECL_PTRARR_DEL( SwPageDescs, SwPageDescPtr, 4, 4 ) - -// forward declaration -void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem ); - -// global function to start grammar checking in the document -void StartGrammarChecking( SwDoc &rDoc ); - -class SW_DLLPUBLIC SwDoc : - public IInterface, - public IDocumentSettingAccess, - public IDocumentDeviceAccess, - public IDocumentRedlineAccess, - public IDocumentLinksAdministration, - public IDocumentFieldsAccess, - public IDocumentContentOperations, - public IDocumentStylePoolAccess, - public IDocumentLineNumberAccess, - public IDocumentStatistics, - public IDocumentState, - public IDocumentDrawModelAccess, - public IDocumentLayoutAccess, - public IDocumentTimerAccess, - public IDocumentChartDataProviderAccess, - public IDocumentListItems, - public IDocumentOutlineNodes, - public IDocumentListsAccess, - public IDocumentExternalData -{ - - friend void _InitCore(); - friend void _FinitCore(); - - //---------------- private Member -------------------------------- - - // ------------------------------------------------------------------- - ::boost::scoped_ptr<SwNodes> m_pNodes; /// document content (Nodes Array) - SwAttrPool* mpAttrPool; // der Attribut Pool - SwPageDescs aPageDescs; // PageDescriptors - Link aOle2Link; // OLE 2.0-notification - /* @@@MAINTAINABILITY-HORROR@@@ - Timer should not be members of the model - */ - Timer aIdleTimer; // Own IdleTimer - Timer aOLEModifiedTimer; // Timer for update modified OLE-Objecs - SwDBData aDBData; // database descriptor - ::com::sun::star::uno::Sequence <sal_Int8 > aRedlinePasswd; - String sTOIAutoMarkURL; // ::com::sun::star::util::URL of table of index AutoMark file - SvStringsDtor aPatternNms; // Array for names of document-templates - com::sun::star::uno::Reference<com::sun::star::container::XNameContainer> - 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; - const ::boost::scoped_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager; - const ::boost::scoped_ptr< ::sw::UndoManager > m_pUndoManager; - - // ------------------------------------------------------------------- - // Pointer - //Default formats. - SwFrmFmt *pDfltFrmFmt; - SwFrmFmt *pEmptyPageFmt; // Format for the default empty page - SwFrmFmt *pColumnContFmt; // Format for column container - SwCharFmt *pDfltCharFmt; - SwTxtFmtColl *pDfltTxtFmtColl; // Defaultformatcollections - SwGrfFmtColl *pDfltGrfFmtColl; - - SwFrmFmts *pFrmFmtTbl; // Format table - SwCharFmts *pCharFmtTbl; - SwSpzFrmFmts *pSpzFrmFmtTbl; - SwSectionFmts *pSectionFmtTbl; - SwFrmFmts *pTblFrmFmtTbl; // For tables - SwTxtFmtColls *pTxtFmtCollTbl; // FormatCollections - SwGrfFmtColls *pGrfFmtCollTbl; - - SwTOXTypes *pTOXTypes; // Tables/indices - SwDefTOXBase_Impl * pDefTOXBases; // defaults of SwTOXBase's - - ViewShell *pCurrentView; // SwDoc should get a new member pCurrentView//swmod 071225 - SdrModel *pDrawModel; // StarView Drawing - - SwDocUpdtFld *pUpdtFlds; // Struct for updating fields - SwFldTypes *pFldTypes; - SwNewDBMgr *pNewDBMgr; // Pointer to the new DBMgr for - // evaluation of DB-fields. - - VirtualDevice *pVirDev; // can be used for formatting - SfxPrinter *pPrt; // can be used for formatting - SwPrintData *pPrtData; // Print configuration - - SwDoc *pGlossaryDoc; // Pointer to glossary-document. - - SwNumRule *pOutlineRule; - SwFtnInfo *pFtnInfo; - SwEndNoteInfo *pEndNoteInfo; - SwLineNumberInfo*pLineNumberInfo; - SwFtnIdxs *pFtnIdxs; - SwDocStat *pDocStat; // Statistics information. - SvxMacroTableDtor *pMacroTable; // table of macros. - - SwDocShell *pDocShell; // Ptr to SfxDocShell of Doc. - SfxObjectShellLock xTmpDocShell; // A temporary shell that is used to copy OLE-Nodes - - - sfx2::LinkManager *pLinkMgr; // List of linked stuff (graphics/DDE/OLE). - - SwAutoCorrExceptWord *pACEWord; // For the automated takeover of - // auto-corrected words that are "re-corrected". - SwURLStateChanged *pURLStateChgd; // SfxClient for changes in INetHistory - SvNumberFormatter *pNumberFormatter;// NumFormatter for tables / fields - - mutable SwNumRuleTbl *pNumRuleTbl; // List of all named NumRules. - - // Hash map to find numrules by name - mutable boost::unordered_map<String, SwNumRule *, StringHash> maNumRuleMap; - - typedef boost::unordered_map< String, SwList*, StringHash > tHashMapForLists; - // container to hold the lists of the text document - tHashMapForLists maLists; - // relation between list style and its default list - tHashMapForLists maListStyleLists; - - SwRedlineTbl *pRedlineTbl; // List of all Redlines. - String *pAutoFmtRedlnComment; // Comment for Redlines inserted via AutoFormat. - - SwUnoCrsrTbl *pUnoCrsrTbl; - - SwPagePreViewPrtData *pPgPViewPrtData; // Indenting / spacing for printing of page view. - SwPaM *pExtInputRing; - - SwLayouter *pLayouter; // ::com::sun::star::frame::Controller for complex layout formatting - // like footnote/endnote in sections - IStyleAccess *pStyleAccess; // handling of automatic styles - SwLayoutCache *pLayoutCache; // Layout cache to read and save with the - // document for a faster formatting - - SwModify *pUnoCallBack; - IGrammarContact *mpGrammarContact; // for grammar checking in paragraphs during editing - - mutable comphelper::ImplementationReference< SwChartDataProvider - , ::com::sun::star::chart2::data::XDataProvider > - aChartDataProviderImplRef; - SwChartLockController_Helper *pChartControllerHelper; - - // table of forbidden characters of this document - rtl::Reference<SvxForbiddenCharactersTable> xForbiddenCharsTable; - com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > mxVbaEvents; - com::sun::star::uno::Reference<com::sun::star::container::XNameContainer> m_xTemplateToProjectCache; -public: - struct lessThanNodeNum - { - bool operator()( const SwNodeNum* pNodeNumOne, - const SwNodeNum* pNodeNumTwo ) const; - }; - - typedef ::std::set< const SwNodeNum*, lessThanNodeNum > tImplSortedNodeNumList; -private: - tImplSortedNodeNumList* mpListItemsList; - - ::std::auto_ptr< ::sfx2::IXmlIdRegistry > m_pXmlIdRegistry; - - // ------------------------------------------------------------------- - // other - - sal_uInt16 nUndoCnt; // Count of Undo Actions. - sal_uInt16 nUndoSttEnd; // != 0 -> within parentheses. - - sal_uInt16 nAutoFmtRedlnCommentNo; // SeqNo for conjoining of AutoFmt-Redlines. - // by the UI. Managed by SwAutoFmt! - - sal_uInt16 nLinkUpdMode; // UpdateMode for links. - SwFldUpdateFlags eFldUpdMode; // Automatically Update Mode for fields/charts. - RedlineMode_t eRedlineMode; // Current Redline Mode. - SwCharCompressType eChrCmprType; // for ASIAN: compress punctuation/kana - - sal_Int32 mReferenceCount; - sal_Int32 mIdleBlockCount; - sal_Int8 nLockExpFld; // If != 0 UpdateExpFlds() has no effect! - - /* Draw Model Layer IDs - * LayerIds, Heaven == above document - * Hell == below document - * Controls == at the very top - */ - SdrLayerID nHeaven; - SdrLayerID nHell; - SdrLayerID nControls; - SdrLayerID nInvisibleHeaven; - SdrLayerID nInvisibleHell; - SdrLayerID nInvisibleControls; - - bool mbGlossDoc : 1; //TRUE: glossary document. - bool mbModified : 1; //TRUE: document has changed. - bool mbDtor : 1; //TRUE: is in SwDoc DTOR. - // and unfortunately temorarily also in - // SwSwgReader::InLayout() when flawed - // frames need deletion. - bool mbPageNums : 1; // TRUE: There are virtual page numbers. - bool mbLoaded : 1; // TRUE: Doc loaded. - bool mbUpdateExpFld : 1; // TRUE: Update expression fields. - bool mbNewDoc : 1; // TRUE: new Doc. - bool mbNewFldLst : 1; // TRUE: Rebuild field-list. - bool mbCopyIsMove : 1; // TRUE: Copy is a hidden Move. - bool mbVisibleLinks : 1; // TRUE: Links are inserted visibly. - bool mbInReading : 1; // TRUE: Document is in the process of being read. - bool mbInXMLImport : 1; // TRUE: During xml import, attribute portion building is not necessary. - bool mbUpdateTOX : 1; // TRUE: After loading document, update TOX. - bool mbInLoadAsynchron : 1; // TRUE: Document is in the process of being loaded asynchronously. - bool mbHTMLMode : 1; // TRUE: Document is in HTMLMode. - bool mbInCallModified : 1; // TRUE: in Set/Reset-Modified link. - bool mbIsGlobalDoc : 1; // TRUE: It's a global document. - bool mbGlblDocSaveLinks : 1; // TRUE: Save sections linked in global document. - bool mbIsLabelDoc : 1; // TRUE: It's a label document. - bool mbIsAutoFmtRedline : 1; // TRUE: Redlines are recorded by Autoformat. - bool mbOLEPrtNotifyPending : 1; // TRUE: Printer has changed. At creation of - // ::com::sun::star::sdbcx::View - // notification of OLE-Objects PrtOLENotify() is required. - bool mbAllOLENotify : 1; // True: Notification of all objects is required. - bool mbIsRedlineMove : 1; // True: Redlines are moved into to / out of the section. - bool mbInsOnlyTxtGlssry : 1; // True: insert 'only text' glossary into doc - bool mbContains_MSVBasic : 1; // True: MS-VBasic exist is in our storage - bool mbPurgeOLE : 1; // sal_True: Purge OLE-Objects - bool mbKernAsianPunctuation : 1; // sal_True: kerning also for ASIAN punctuation - bool mbReadlineChecked : 1; // sal_True: if the query was already shown - bool mbLinksUpdated : 1; // #i38810# - // flag indicating, that the links have been updated. - bool mbClipBoard : 1; // TRUE: this document represents the clipboard - bool mbColumnSelection : 1; // TRUE: this content has bee created by a column selection - // (clipboard docs only) - -#if OSL_DEBUG_LEVEL > 1 - bool mbXMLExport : 1; // sal_True: during XML export -#endif - - // Document flag to trigger conversion, which applys the workaround for documents, - // which uses a certain layout defect in OOo 1.x to layout the documents. - // This conversion is performed, when the frames for the layout are created. - // Thus, this document flag has to be set after load a document and before - // creating the document view. - bool mbApplyWorkaroundForB6375613 : 1; - - // - // COMPATIBILITY FLAGS START - // - // - // HISTORY OF THE COMPATIBILITY FLAGS: - // - // SO5: - // mbParaSpaceMax def = sal_False, sal_True since SO8 - // mbParaSpaceMaxAtPages def = sal_False, sal_True since SO8 - // - // SO6: - // mbTabCompat def = sal_False, sal_True since SO8 - // - // SO7: - // mbUseVirtualDevice def = sal_True - // mbAddFlyOffsets def = sal_False, hidden - // - // SO7pp1: - // bOldNumbering def = sal_False, hidden - // - // SO8: - // mbAddExternalLeading def = sal_True - // mbUseHiResolutionVirtualDevice def = sal_True, hidden - // mbOldLineSpacing def = sal_False - // mbAddParaSpacingToTableCells def = sal_True - // mbUseFormerObjectPos def = sal_False - // mbUseFormerTextWrapping def = sal_False - // mbConsiderWrapOnObjPos def = sal_False - // - // SO8pp1: - // mbIgnoreFirstLineIndentInNumbering def = sal_False, hidden - // mbDoNotJustifyLinesWithManualBreak def = sal_False, hidden - // mbDoNotResetParaAttrsForNumFont def = sal_False, hidden - // - // SO8pp3 - // mbDoNotCaptureDrawObjsOnPage def = sal_False, hidden - // - Relevant for drawing objects, which don't follow the text flow, but - // whose position is outside the page area: - // sal_False: Such drawing objects are captured on the page area of its anchor. - // sal_True: Such drawing objects can leave the page area, they aren't captured. - // mbTableRowKeep def = sal_False, hidden - // mbIgnoreTabsAndBlanksForLineCalculation def = sal_False, hidden - // mbClipAsCharacterAnchoredWriterFlyFrame def = sal_False, hidden - // - Introduced in order to re-activate clipping of as-character anchored - // Writer fly frames in method <SwFlyInCntFrm::MakeAll()> for documents, - // which are created with version prior SO8/OOo 2.0 - // - // SO8pp4 - // mbUnixForceZeroExtLeading def = sal_False, hidden - // - // SO8pu8 - // mbOldPrinterMetrics def = sal_False, hidden - // - // SO9 - // #i24363# tab stops relative to indent - // mbTabRelativeToIndent def = sal_True, hidden - // #i89181# suppress tab stop at left indent for paragraphs in lists, whose - // list level position and space mode equals LABEL_ALIGNMENT and whose list - // label is followed by a tab character. - // mbTabAtLeftIndentForParagraphsInList def = sal_False, hidden - - bool mbParaSpaceMax : 1; - bool mbParaSpaceMaxAtPages : 1; - bool mbTabCompat : 1; - bool mbUseVirtualDevice : 1; - bool mbAddFlyOffsets : 1; - bool mbAddExternalLeading : 1; - bool mbUseHiResolutionVirtualDevice : 1; - bool mbOldLineSpacing : 1; // #i11859# - bool mbAddParaSpacingToTableCells : 1; - bool mbUseFormerObjectPos : 1; // #i11860# - bool mbUseFormerTextWrapping : 1; - bool mbConsiderWrapOnObjPos : 1; // #i28701# - // sal_True: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos' - // floating screen objects as given by its - // attribute 'WrapInfluenceOnObjPos'. - bool mbMathBaselineAlignment : 1; // TL 2010-10-29 #i972# - - // non-ui-compatibility flags: - bool mbOldNumbering : 1; - bool mbIgnoreFirstLineIndentInNumbering : 1; // #i47448# - bool mbDoNotJustifyLinesWithManualBreak : 1; // #i49277# - bool mbDoNotResetParaAttrsForNumFont : 1; // #i53199# - bool mbTableRowKeep : 1; - bool mbIgnoreTabsAndBlanksForLineCalculation : 1; // #i3952# - bool mbDoNotCaptureDrawObjsOnPage : 1; // #i62875# - bool mbOutlineLevelYieldsOutlineRule : 1; - bool mbClipAsCharacterAnchoredWriterFlyFrames : 1; - bool mbUnixForceZeroExtLeading : 1; // #i60945# - bool mbOldPrinterMetrics : 1; - bool mbTabRelativeToIndent : 1; // #i24363# tab stops relative to indent - bool mbProtectForm : 1; - bool mbInvertBorderSpacing : 1; - bool mbCollapseEmptyCellPara : 1; - bool mbTabAtLeftIndentForParagraphsInList; // #i89181# - see above - bool mbSmallCapsPercentage66; - - bool mbLastBrowseMode : 1; - - sal_uInt32 n32DummyCompatabilityOptions1; - sal_uInt32 n32DummyCompatabilityOptions2; - // - // COMPATIBILITY FLAGS END - // - - sal_Bool mbStartIdleTimer; // idle timer mode start/stop - - static SwAutoCompleteWord *pACmpltWords; // List of all words for AutoComplete - - //---------------- private methods ------------------------------ - void checkRedlining(RedlineMode_t& _rReadlineMode); - - - DECL_LINK( AddDrawUndo, SdrUndoAction * ); - // DrawModel - void DrawNotifyUndoHdl(); // Because of CLOOKs - - // Only for internal use and therefore private. - // Copy a range within the same or to another document. - // Position may not lie within range! - bool CopyImpl( SwPaM&, SwPosition&, const bool MakeNewFrms /*= true */, - const bool bCopyAll, SwPaM *const pCpyRng /*= 0*/ ) const; - - SwFlyFrmFmt* _MakeFlySection( const SwPosition& rAnchPos, - const SwCntntNode& rNode, RndStdIds eRequestId, - const SfxItemSet* pFlyAttrSet, - SwFrmFmt* = 0 ); - - SwFlyFrmFmt* _InsNoTxtNode( const SwPosition&rPos, SwNoTxtNode*, - const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, - SwFrmFmt* = 0 ); - - void CopyFlyInFlyImpl( const SwNodeRange& rRg, - const xub_StrLen nEndContentIndex, - const SwNodeIndex& rStartIdx, - const bool bCopyFlyAtFly = false ) const; - sal_Int8 SetFlyFrmAnchor( SwFrmFmt& rFlyFmt, SfxItemSet& rSet, sal_Bool bNewFrms ); - - typedef SwFmt* (SwDoc:: *FNCopyFmt)( const String&, SwFmt*, sal_Bool, sal_Bool ); - SwFmt* CopyFmt( const SwFmt& rFmt, const SvPtrarr& rFmtArr, - FNCopyFmt fnCopyFmt, const SwFmt& rDfltFmt ); - void CopyFmtArr( const SvPtrarr& rSourceArr, SvPtrarr& rDestArr, - FNCopyFmt fnCopyFmt, SwFmt& rDfltFmt ); - void CopyPageDescHeaderFooterImpl( bool bCpyHeader, - const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt ); - SwFmt* FindFmtByName( const SvPtrarr& rFmtArr, - const String& rName ) const; - - VirtualDevice& CreateVirtualDevice_() const; - SfxPrinter& CreatePrinter_() const; - void PrtDataChanged(); // Printer or JobSetup altered. - // Care has to be taken of the necessary - // invalidations and notifications. - - // gcc: aFtnInfo::CopyCtor is private, therefore we too have to protect ourselves. - SwDoc( const SwDoc &); - - // For fields: - void _InitFieldTypes(); // Called by CTOR!! - void _MakeFldList( int eMode ); - - // Database fields: - void UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc ); - void AddUsedDBToList( SvStringsDtor& rDBNameList, - const SvStringsDtor& rUsedDBNames ); - void AddUsedDBToList( SvStringsDtor& rDBNameList, const String& rDBName ); - sal_Bool IsNameInArray( const SvStringsDtor& rOldNames, const String& rName ); - void GetAllDBNames( SvStringsDtor& rAllDBNames ); - void ReplaceUsedDBs( const SvStringsDtor& rUsedDBNames, - const String& rNewName, String& rFormel ); - SvStringsDtor& FindUsedDBs( const SvStringsDtor& rAllDBNames, - const String& rFormel, - SvStringsDtor& rUsedDBNames ); - - void InitDrawModel(); - void ReleaseDrawModel(); - - void _CreateNumberFormatter(); - - sal_Bool _UnProtectTblCells( SwTable& rTbl ); - - // Create sub-documents according to the given collection. - // If no collection is given, take chapter style of the 1st level. - bool SplitDoc( sal_uInt16 eDocType, const String& rPath, bool bOutline, - const SwTxtFmtColl* pSplitColl, int nOutlineLevel = 0 ); - - // Update charts of given table. - void _UpdateCharts( const SwTable& rTbl, ViewShell& rVSh ) const; - - sal_Bool _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry, - sal_uInt16 nMode ); - - // Our own 'IdleTimer' calls the following method - DECL_LINK( DoIdleJobs, Timer * ); - // CharTimer calls this method. - DECL_LINK( DoUpdateAllCharts, Timer * ); - DECL_LINK( DoUpdateModifiedOLE, Timer * ); - - SwFmt *_MakeCharFmt(const String &, SwFmt *, sal_Bool, sal_Bool ); - SwFmt *_MakeFrmFmt(const String &, SwFmt *, sal_Bool, sal_Bool ); - SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, sal_Bool, sal_Bool ); - - void InitTOXTypes(); - void Paste( const SwDoc& ); - bool DeleteAndJoinImpl(SwPaM&, const bool); - bool DeleteAndJoinWithRedlineImpl(SwPaM&, const bool unused = false); - bool DeleteRangeImpl(SwPaM&, const bool unused = false); - bool DeleteRangeImplImpl(SwPaM &); - bool ReplaceRangeImpl(SwPaM&, String const&, const bool); - -public: - - /** Life cycle - */ - SwDoc(); - ~SwDoc(); - - inline bool IsInDtor() const { return mbDtor; } - - /* @@@MAINTAINABILITY-HORROR@@@ - Implementation details made public. - */ - SwNodes & GetNodes() { return *m_pNodes; } - SwNodes const& GetNodes() const { return *m_pNodes; } - - /** IInterface - */ - virtual sal_Int32 acquire(); - virtual sal_Int32 release(); - virtual sal_Int32 getReferenceCount() const; - - /** IDocumentSettingAccess - */ - virtual bool get(/*[in]*/ DocumentSettingId id) const; - virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value); - virtual const com::sun::star::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const; - virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ); - virtual rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable(); - virtual const rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const; - virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const; - virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode ); - virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const; - virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags eMode ); - virtual SwCharCompressType getCharacterCompressionType() const; - virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType ); - - /** IDocumentDeviceAccess - */ - virtual SfxPrinter* getPrinter(/*[in]*/ bool bCreate ) const; - virtual void setPrinter(/*[in]*/ SfxPrinter* pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged ); - virtual VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate ) const; - virtual void setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOld, /*[in]*/ bool bCallVirDevDataChanged ); - virtual OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate ) const; - virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewHiRes ); - virtual const JobSetup* getJobsetup() const; - virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup ); - virtual const SwPrintData & getPrintData() const; - virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData); - - /** IDocumentMarkAccess - */ - IDocumentMarkAccess* getIDocumentMarkAccess(); - const IDocumentMarkAccess* getIDocumentMarkAccess() const; - - /** IDocumentRedlineAccess - */ - virtual RedlineMode_t GetRedlineMode() const; - virtual void SetRedlineMode_intern(/*[in]*/RedlineMode_t eMode); - virtual void SetRedlineMode(/*[in]*/RedlineMode_t eMode); - virtual bool IsRedlineOn() const; - virtual bool IsIgnoreRedline() const; - virtual bool IsInRedlines(const SwNode& rNode) const; - virtual const SwRedlineTbl& GetRedlineTbl() const; - virtual bool AppendRedline(/*[in]*/SwRedline* pPtr, /*[in]*/bool bCallDelete); - virtual bool SplitRedline(const SwPaM& rPam); - virtual bool DeleteRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bSaveInUndo, /*[in]*/sal_uInt16 nDelType); - virtual bool DeleteRedline(/*[in]*/const SwStartNode& rSection, /*[in]*/bool bSaveInUndo, /*[in]*/sal_uInt16 nDelType); - virtual sal_uInt16 GetRedlinePos(/*[in]*/const SwNode& rNode, /*[in]*/sal_uInt16 nType) const; - virtual void CompressRedlines(); - virtual const SwRedline* GetRedline(/*[in]*/const SwPosition& rPos, /*[in]*/sal_uInt16* pFndPos) const; - virtual bool IsRedlineMove() const; - virtual void SetRedlineMove(/*[in]*/bool bFlag); - virtual bool AcceptRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete); - virtual bool AcceptRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete); - virtual bool RejectRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete); - virtual bool RejectRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete); - virtual const SwRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const; - virtual const SwRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const; - virtual void UpdateRedlineAttr(); - virtual sal_uInt16 GetRedlineAuthor(); - virtual sal_uInt16 InsertRedlineAuthor(const String& rAuthor); - virtual bool SetRedlineComment(/*[in]*/const SwPaM& rPam, /*[in]*/const String& rComment); - virtual const ::com::sun::star::uno::Sequence <sal_Int8>& GetRedlinePassword() const; - virtual void SetRedlinePassword(/*[in]*/const ::com::sun::star::uno::Sequence <sal_Int8>& rNewPassword); - - /** IDocumentUndoRedo - */ - IDocumentUndoRedo & GetIDocumentUndoRedo(); - IDocumentUndoRedo const& GetIDocumentUndoRedo() const; - - /** IDocumentLinksAdministration - */ - virtual bool IsVisibleLinks() const; - virtual void SetVisibleLinks(bool bFlag); - virtual sfx2::LinkManager& GetLinkManager(); - virtual const sfx2::LinkManager& GetLinkManager() const; - virtual void UpdateLinks(sal_Bool bUI); - virtual bool GetData(const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any& rValue) const; - virtual bool SetData(const String& rItem, const String& rMimeType, const ::com::sun::star::uno::Any& rValue); - virtual ::sfx2::SvLinkSource* CreateLinkSource(const String& rItem); - virtual bool EmbedAllLinks(); - virtual void SetLinksUpdated(const bool bNewLinksUpdated); - virtual bool LinksUpdated() const; - - /** IDocumentFieldsAccess - */ - virtual const SwFldTypes *GetFldTypes() const; - virtual SwFieldType *InsertFldType(const SwFieldType &); - virtual SwFieldType *GetSysFldType( const sal_uInt16 eWhich ) const; - virtual SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName, bool bDbFieldMatching) const; - virtual void RemoveFldType(sal_uInt16 nFld); - virtual void UpdateFlds( SfxPoolItem* pNewHt, bool bCloseDB); - virtual void InsDeletedFldType(SwFieldType &); - virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich); - virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds); - virtual void UpdateRefFlds(SfxPoolItem* pHt); - virtual void UpdateTblFlds(SfxPoolItem* pHt); - virtual void UpdateExpFlds(SwTxtFld* pFld, bool bUpdateRefFlds); - virtual void UpdateUsrFlds(); - virtual void UpdatePageFlds(SfxPoolItem*); - virtual void LockExpFlds(); - virtual void UnlockExpFlds(); - virtual bool IsExpFldsLocked() const; - virtual SwDocUpdtFld& GetUpdtFlds() const; - virtual bool SetFieldsDirty(bool b, const SwNode* pChk, sal_uLong nLen); - virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime); - virtual void FldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt); - virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld); - virtual void FldsToExpand(SwHash**& ppTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld); - virtual bool IsNewFldLst() const; - virtual void SetNewFldLst( bool bFlag); - virtual void InsDelFldInFldLst(bool bIns, const SwTxtFld& rFld); - - /** Returns the field at a certain position. - @param rPos position to search at - @return pointer to field at the given position or NULL in case no field is found - */ - static SwField* GetField(const SwPosition& rPos); - - /** Returns the field at a certain position. - @param rPos position to search at - @return pointer to field at the given position or NULL in case no field is found - */ - static SwTxtFld* GetTxtFld(const SwPosition& rPos); - - /** IDocumentContentOperations - */ - virtual bool CopyRange(SwPaM&, SwPosition&, const bool bCopyAll) const; - virtual void DeleteSection(SwNode* pNode); - virtual bool DeleteRange(SwPaM&); - virtual bool DelFullPara(SwPaM&); - // Add optional parameter <bForceJoinNext>, default value <false> - // Needed for hiding of deletion redlines - virtual bool DeleteAndJoin( SwPaM&, - const bool bForceJoinNext = false ); - - virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags); - virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags); - virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags); - virtual bool Overwrite(const SwPaM &rRg, const String& rStr); - virtual bool InsertString(const SwPaM &rRg, const String&, - const enum InsertFlags nInsertMode = INS_EMPTYEXPAND ); - virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, - const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*); - virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrmFmt*); - virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*); - virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrmFmt*); - virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&, - const SetAttrMode nFlags); - virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&, - const SetAttrMode nFlags); - virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj); - virtual void TransliterateText(const SwPaM& rPaM, utl::TransliterationWrapper&); - virtual SwFlyFrmFmt* InsertOLE(const SwPaM &rRg, const String& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrmFmt*); - virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart); - virtual bool AppendTxtNode(SwPosition& rPos); - virtual void SetModified(SwPaM &rPaM); - virtual bool ReplaceRange(SwPaM& rPam, const String& rNewStr, - const bool bRegExReplace); - virtual void RemoveLeadingWhiteSpace(const SwPosition & rPos ); - - /** IDocumentStylePoolAccess - */ - virtual SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage = true ); - virtual SwFmt* GetFmtFromPool( sal_uInt16 nId ); - virtual SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId ); - virtual SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId ); - virtual SwPageDesc* GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage = true ); - virtual SwNumRule* GetNumRuleFromPool( sal_uInt16 nId ); - virtual bool IsPoolTxtCollUsed( sal_uInt16 nId ) const; - virtual bool IsPoolFmtUsed( sal_uInt16 nId ) const; - virtual bool IsPoolPageDescUsed( sal_uInt16 nId ) const; - - /** IDocumentLineNumberAccess - */ - virtual const SwLineNumberInfo& GetLineNumberInfo() const; - virtual void SetLineNumberInfo(const SwLineNumberInfo& rInfo); - - /** IDocumentStatistics - */ - virtual void DocInfoChgd(); - virtual const SwDocStat &GetDocStat() const; - virtual void SetDocStat(const SwDocStat& rStat); - virtual void UpdateDocStat(SwDocStat& rStat); - - /** IDocumentState - */ - virtual void SetModified(); - virtual void ResetModified(); - virtual bool IsModified() const; - virtual bool IsLoaded() const; - virtual bool IsUpdateExpFld() const; - virtual bool IsNewDoc() const; - virtual bool IsPageNums() const; - virtual void SetPageNums(bool b); - virtual void SetNewDoc(bool b); - virtual void SetUpdateExpFldStat(bool b); - virtual void SetLoaded(bool b); - - /** IDocumentDrawModelAccess - */ - virtual const SdrModel* GetDrawModel() const; - virtual SdrModel* GetDrawModel(); - virtual SdrLayerID GetHeavenId() const; - virtual SdrLayerID GetHellId() const; - virtual SdrLayerID GetControlsId() const; - virtual SdrLayerID GetInvisibleHeavenId() const; - virtual SdrLayerID GetInvisibleHellId() const; - virtual SdrLayerID GetInvisibleControlsId() const; - virtual void NotifyInvisibleLayers( SdrPageView& _rSdrPageView ); - virtual bool IsVisibleLayerId( const SdrLayerID& _nLayerId ) const; - virtual SdrLayerID GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisibleLayerId ); - virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId ); - virtual SdrModel* _MakeDrawModel(); - virtual SdrModel* GetOrCreateDrawModel(); - - /** IDocumentLayoutAccess - */ - virtual void SetCurrentViewShell( ViewShell* pNew );//swmod 071225 - virtual SwLayouter* GetLayouter(); - virtual const SwLayouter* GetLayouter() const; - virtual void SetLayouter( SwLayouter* pNew ); - virtual SwFrmFmt* MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet ); - virtual void DelLayoutFmt( SwFrmFmt *pFmt ); - virtual SwFrmFmt* CopyLayoutFmt( const SwFrmFmt& rSrc, const SwFmtAnchor& rNewAnchor, bool bSetTxtFlyAtt, bool bMakeFrms ); - virtual const ViewShell *GetCurrentViewShell() const; //swmod 080219 - virtual ViewShell *GetCurrentViewShell();//swmod 080219 It must be able to communicate to a ViewShell.This is going to be removerd later. - virtual const SwRootFrm *GetCurrentLayout() const; - virtual SwRootFrm *GetCurrentLayout();//swmod 080219 - virtual bool HasLayout() const; - - /** IDocumentTimerAccess - */ - virtual void StartIdling(); - virtual void StopIdling(); - virtual void BlockIdling(); - virtual void UnblockIdling(); - - /** IDocumentChartDataProviderAccess - */ - virtual SwChartDataProvider * GetChartDataProvider( bool bCreate = false ) const; - virtual void CreateChartInternalDataProviders( const SwTable *pTable ); - virtual SwChartLockController_Helper & GetChartControllerHelper(); - - /** IDocumentListItems - */ - virtual void addListItem( const SwNodeNum& rNodeNum ); - virtual void removeListItem( const SwNodeNum& rNodeNum ); - virtual String getListItemText( const SwNodeNum& rNodeNum, - const bool bWithNumber = true, - const bool bWithSpacesForLevel = false ) const; - virtual void getListItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const; - virtual void getNumItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const; - - /** IDocumentOutlineNodes - */ - virtual sal_Int32 getOutlineNodesCount() const; - virtual int getOutlineLevel( const sal_Int32 nIdx ) const; - virtual String getOutlineText( const sal_Int32 nIdx, - const bool bWithNumber, - const bool bWithSpacesForLevel ) const; - virtual SwTxtNode* getOutlineNode( const sal_Int32 nIdx ) const; - virtual void getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOutlineNodeList ) const; - - /** IDocumentListsAccess - */ - virtual SwList* createList( String sListId, - const String sDefaultListStyleName ); - virtual void deleteList( const String sListId ); - virtual SwList* getListByName( const String sListId ) const; - virtual SwList* createListForListStyle( const String sListStyleName ); - virtual SwList* getListForListStyle( const String sListStyleName ) const; - virtual void deleteListForListStyle( const String sListStyleName ); - virtual void trackChangeOfListStyleName( const String sListStyleName, - const String sNewListStyleName ); - - /** IDocumentExternalData */ - virtual void setExternalData(::sw::tExternalDataType eType, - ::sw::tExternalDataPointer pPayload); - virtual ::sw::tExternalDataPointer getExternalData(::sw::tExternalDataType eType); - - /** INextInterface here - */ - - DECL_STATIC_LINK( SwDoc, BackgroundDone, SvxBrushItem *); - DECL_LINK(CalcFieldValueHdl, EditFieldInfo*); - - /** OLE ??? - */ - bool IsOLEPrtNotifyPending() const { return mbOLEPrtNotifyPending; } - inline void SetOLEPrtNotifyPending( bool bSet = true ); - void PrtOLENotify( sal_Bool bAll ); //All or only marked - -#if OSL_DEBUG_LEVEL > 1 - bool InXMLExport() const { return mbXMLExport; } - void SetXMLExport( bool bFlag ) { mbXMLExport = bFlag; } -#endif - - // Returns positions of all FlyFrames in the document. - // If a Pam-Pointer is passed the FlyFrames attached to paragraphes - // have to be surrounded completely by ::com::sun::star::awt::Selection. - // ( Start < Pos < End ) !!! - // (Required for Writers.) - void GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts, const SwPaM* = 0, - sal_Bool bDrawAlso = sal_False, - sal_Bool bAsCharAlso = sal_False ) const; - - // Because swrtf.cxx and define private public here now. - SwFlyFrmFmt *MakeFlyFrmFmt (const String &rFmtName, SwFrmFmt *pDerivedFrom); - SwDrawFrmFmt *MakeDrawFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom); - - // From now on this interface has to be used for Flys. - // pAnchorPos must be set, if they are not attached to pages AND - // ::com::sun::star::chaos::Anchor is not already set at valid CntntPos - // in FlySet/FrmFmt. - /* new parameter bCalledFromShell - - sal_True: An existing adjust item at pAnchorPos is propagated to - the content node of the new fly section. That propagation only - takes place if there is no adjust item in the paragraph style - for the new fly section. - - sal_False: no propagation - */ - SwFlyFrmFmt* MakeFlySection( RndStdIds eAnchorType, - const SwPosition* pAnchorPos, - const SfxItemSet* pSet = 0, - SwFrmFmt *pParent = 0, - sal_Bool bCalledFromShell = sal_False ); - SwFlyFrmFmt* MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet, - const SwSelBoxes* pSelBoxes = 0, - SwFrmFmt *pParent = 0 ); - - void CopyWithFlyInFly( const SwNodeRange& rRg, - const xub_StrLen nEndContentIndex, - const SwNodeIndex& rInsPos, - sal_Bool bMakeNewFrms = sal_True, - sal_Bool bDelRedlines = sal_True, - sal_Bool bCopyFlyAtFly = sal_False ) const; - - sal_Bool SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet ); - - sal_Bool SetFrmFmtToFly( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFmt, - SfxItemSet* pSet = 0, sal_Bool bKeepOrient = sal_False ); - void SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt, - const String& sNewTitle ); - void SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt, - const String& sNewDescription ); - - /** Footnotes - */ - // Footnote information - const SwFtnInfo& GetFtnInfo() const { return *pFtnInfo; } - void SetFtnInfo(const SwFtnInfo& rInfo); - const SwEndNoteInfo& GetEndNoteInfo() const { return *pEndNoteInfo; } - void SetEndNoteInfo(const SwEndNoteInfo& rInfo); - SwFtnIdxs& GetFtnIdxs() { return *pFtnIdxs; } - const SwFtnIdxs& GetFtnIdxs() const { return *pFtnIdxs; } - // change footnotes in area - bool SetCurFtn( const SwPaM& rPam, const String& rNumStr, - sal_uInt16 nNumber, bool bIsEndNote ); - - /** Operations on the content of the document e.g. - spell-checking/hyphenating/word-counting - */ - ::com::sun::star::uno::Any - Spell( SwPaM&, ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XSpellChecker1 > &, - sal_uInt16* pPageCnt, sal_uInt16* pPageSt, bool bGrammarCheck, - SwConversionArgs *pConvArgs = 0 ) const; - - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XHyphenatedWord > - Hyphenate( SwPaM *pPam, const Point &rCrsrPos, - sal_uInt16* pPageCnt, sal_uInt16* pPageSt ); - - // count words in pam - void CountWords( const SwPaM& rPaM, SwDocStat& rStat ) const; - - // Glossary Document - void SetGlossDoc( bool bGlssDc = true ) { mbGlossDoc = bGlssDc; } - bool IsInsOnlyTextGlossary() const { return mbInsOnlyTxtGlssry; } - - void Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, sal_Bool bImpress ); - - void ChangeAuthorityData(const SwAuthEntry* pNewData); - - bool IsInCallModified() const { return mbInCallModified; } - sal_Bool IsInHeaderFooter( const SwNodeIndex& rIdx ) const; - short GetTextDirection( const SwPosition& rPos, - const Point* pPt = 0 ) const; - sal_Bool IsInVerticalText( const SwPosition& rPos, - const Point* pPt = 0 ) const; - - /** Database and DB-Manager - */ - void SetNewDBMgr( SwNewDBMgr* pNewMgr ) { pNewDBMgr = pNewMgr; } - SwNewDBMgr* GetNewDBMgr() const { return pNewDBMgr; } - void ChangeDBFields( const SvStringsDtor& rOldNames, - const String& rNewName ); - void SetInitDBFields(sal_Bool b); - - // Find out which databases are used by fields. - void GetAllUsedDB( SvStringsDtor& rDBNameList, - const SvStringsDtor* pAllDBNames = 0 ); - - void ChgDBData( const SwDBData& rNewData ); - SwDBData GetDBData(); - const SwDBData& GetDBDesc(); - const SwDBData& _GetDBDesc() const { return aDBData; } - - /** Some helper functions - */ - String GetUniqueGrfName() const; - String GetUniqueOLEName() const; - String GetUniqueFrameName() const; - - std::set<SwRootFrm*> GetAllLayouts();//swmod 080225 - - void SetFlyName( SwFlyFrmFmt& rFmt, const String& rName ); - const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_Int8 nNdTyp = 0 ) const; - - void GetGrfNms( const SwFlyFrmFmt& rFmt, String* pGrfName, - String* pFltName ) const; - - // Set a valid name for all Flys that have none (Called by Readers after reading). - void SetAllUniqueFlyNames(); - - // Reset attributes. All TxtHints and (if completely selected) all hard- - // formated stuff (auto-formats) are removed. - // Introduce new optional parameter <bSendDataChangedEvents> in order to - // control, if the side effect "send data changed events" is triggered or not. - void ResetAttrs( const SwPaM &rRg, - sal_Bool bTxtAttr = sal_True, - const std::set<sal_uInt16> &rAttrs = std::set<sal_uInt16>(), - const bool bSendDataChangedEvents = true ); - void RstTxtAttrs(const SwPaM &rRg, sal_Bool bInclRefToxMark = sal_False ); - - // Set attribute in given format. - // If Undo is activated, the old one is listed in Undo-History. - void SetAttr( const SfxPoolItem&, SwFmt& ); - void SetAttr( const SfxItemSet&, SwFmt& ); - - // method to reset a certain attribute at the given format - void ResetAttrAtFormat( const sal_uInt16 nWhichId, - SwFmt& rChangedFormat ); - - // Set attribute as new default attribute in current document. - // If Undo is activated, the old one is listed in Undo-History. - void SetDefault( const SfxPoolItem& ); - void SetDefault( const SfxItemSet& ); - - // Query default attribute in this document. - const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const; - - // Do not expand text attributes. - sal_Bool DontExpandFmt( const SwPosition& rPos, sal_Bool bFlag = sal_True ); - - /* Formats */ - const SwFrmFmts* GetFrmFmts() const { return pFrmFmtTbl; } - SwFrmFmts* GetFrmFmts() { return pFrmFmtTbl; } - const SwCharFmts* GetCharFmts() const { return pCharFmtTbl;} - - /* LayoutFormats (frames, DrawObjects), sometimes const sometimes not */ - const SwSpzFrmFmts* GetSpzFrmFmts() const { return pSpzFrmFmtTbl; } - SwSpzFrmFmts* GetSpzFrmFmts() { return pSpzFrmFmtTbl; } - - const SwFrmFmt *GetDfltFrmFmt() const { return pDfltFrmFmt; } - SwFrmFmt *GetDfltFrmFmt() { return pDfltFrmFmt; } - const SwFrmFmt *GetEmptyPageFmt() const { return pEmptyPageFmt; } - SwFrmFmt *GetEmptyPageFmt() { return pEmptyPageFmt; } - const SwFrmFmt *GetColumnContFmt() const{ return pColumnContFmt; } - SwFrmFmt *GetColumnContFmt() { return pColumnContFmt; } - const SwCharFmt *GetDfltCharFmt() const { return pDfltCharFmt;} - SwCharFmt *GetDfltCharFmt() { return pDfltCharFmt;} - - // Returns the interface of the management of (auto)styles - IStyleAccess& GetIStyleAccess() { return *pStyleAccess; } - - // Remove all language dependencies from all existing formats - void RemoveAllFmtLanguageDependencies(); - - SwFrmFmt *MakeFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom, - sal_Bool bBroadcast = sal_False, sal_Bool bAuto = sal_True); - void DelFrmFmt( SwFrmFmt *pFmt, sal_Bool bBroadcast = sal_False ); - SwFrmFmt* FindFrmFmtByName( const String& rName ) const - { return (SwFrmFmt*)FindFmtByName( (SvPtrarr&)*pFrmFmtTbl, rName ); } - - SwCharFmt *MakeCharFmt(const String &rFmtName, SwCharFmt *pDerivedFrom, - sal_Bool bBroadcast = sal_False, - sal_Bool bAuto = sal_True ); - void DelCharFmt(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False); - void DelCharFmt(SwCharFmt* pFmt, sal_Bool bBroadcast = sal_False); - SwCharFmt* FindCharFmtByName( const String& rName ) const - { return (SwCharFmt*)FindFmtByName( (SvPtrarr&)*pCharFmtTbl, rName ); } - - /* Formatcollections (styles) */ - // TXT - const SwTxtFmtColl* GetDfltTxtFmtColl() const { return pDfltTxtFmtColl; } - const SwTxtFmtColls *GetTxtFmtColls() const { return pTxtFmtCollTbl; } - SwTxtFmtColl *MakeTxtFmtColl( const String &rFmtName, - SwTxtFmtColl *pDerivedFrom, - sal_Bool bBroadcast = sal_False, - sal_Bool bAuto = sal_True ); - SwConditionTxtFmtColl* MakeCondTxtFmtColl( const String &rFmtName, - SwTxtFmtColl *pDerivedFrom, - sal_Bool bBroadcast = sal_False); - void DelTxtFmtColl(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False); - void DelTxtFmtColl( SwTxtFmtColl* pColl, sal_Bool bBroadcast = sal_False ); - // Add 4th optional parameter <bResetListAttrs>. - // 'side effect' of <SetTxtFmtColl> with <bReset = true> is that the hard - // attributes of the affected text nodes are cleared, except the break - // attribute, the page description attribute and the list style attribute. - // The new parameter <bResetListAttrs> indicates, if the list attributes - // (list style, restart at and restart with) are cleared as well in case - // that <bReset = true> and the paragraph style has a list style attribute set. - sal_Bool SetTxtFmtColl( const SwPaM &rRg, SwTxtFmtColl *pFmt, - bool bReset = true, - bool bResetListAttrs = false ); - SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const - { return (SwTxtFmtColl*)FindFmtByName( (SvPtrarr&)*pTxtFmtCollTbl, rName ); } - - void ChkCondColls(); - - // GRF - const SwGrfFmtColl* GetDfltGrfFmtColl() const { return pDfltGrfFmtColl; } - const SwGrfFmtColls *GetGrfFmtColls() const { return pGrfFmtCollTbl; } - SwGrfFmtColl *MakeGrfFmtColl(const String &rFmtName, - SwGrfFmtColl *pDerivedFrom); - SwGrfFmtColl* FindGrfFmtCollByName( const String& rName ) const - { return (SwGrfFmtColl*)FindFmtByName( (SvPtrarr&)*pGrfFmtCollTbl, rName ); } - - // Table formating - const SwFrmFmts* GetTblFrmFmts() const { return pTblFrmFmtTbl; } - SwFrmFmts* GetTblFrmFmts() { return pTblFrmFmtTbl; } - sal_uInt16 GetTblFrmFmtCount( sal_Bool bUsed ) const; - SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed ) const; - SwTableFmt* MakeTblFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom); - void DelTblFrmFmt( SwTableFmt* pFmt ); - SwTableFmt* FindTblFmtByName( const String& rName, sal_Bool bAll = sal_False ) const; - - //Access to frames. - //Iterate over Flys - forr Basic-Collections. - sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL) const; - SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL); - - // Copy formats in own arrays and return them. - SwFrmFmt *CopyFrmFmt ( const SwFrmFmt& ); - SwCharFmt *CopyCharFmt( const SwCharFmt& ); - SwTxtFmtColl* CopyTxtColl( const SwTxtFmtColl& rColl ); - SwGrfFmtColl* CopyGrfColl( const SwGrfFmtColl& rColl ); - - // Replace all formats with those from rSource. - void ReplaceStyles( SwDoc& rSource ); - - // Query if style (paragraph- / character- / frame- / page-) is used. - sal_Bool IsUsed( const SwModify& ) const; - sal_Bool IsUsed( const SwNumRule& ) const; - - // Set name of newly loaded document template. - sal_uInt16 SetDocPattern( const String& rPatternName ); - - // Return name of document template. Can be 0! - String* GetDocPattern( sal_uInt16 nPos ) const { return aPatternNms[nPos]; } - - // Delete all unreferenced field types. - void GCFieldTypes(); // impl. in docfld.cxx - - // Query / connect current document with glossary document. - void SetGlossaryDoc( SwDoc* pDoc ) { pGlossaryDoc = pDoc; } - - // travel over PaM Ring - sal_Bool InsertGlossary( SwTextBlocks& rBlock, const String& rEntry, - SwPaM& rPaM, SwCrsrShell* pShell = 0); - - // get the set of printable pages for the XRenderable API by - // evaluating the respective settings (see implementation) - void CalculatePagesForPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport, - sal_Int32 nDocPageCount ); - void UpdatePagesForPrintingWithPostItData( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport, - sal_Int32 nDocPageCount ); - void CalculatePagePairsForProspectPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, - sal_Int32 nDocPageCount ); - - // PageDescriptor interface. - sal_uInt16 GetPageDescCnt() const { return aPageDescs.Count(); } - const SwPageDesc& GetPageDesc( const sal_uInt16 i ) const { return *aPageDescs[i]; } - SwPageDesc* FindPageDescByName( const String& rName, - sal_uInt16* pPos = 0 ) const; - - // Copy the complete PageDesc - beyond document and "deep"! - // Optionally copying of PoolFmtId, -HlpId can be prevented. - void CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, - sal_Bool bCopyPoolIds = sal_True ); - - // Copy header (with contents) from SrcFmt to DestFmt - // (can also be copied into other document). - void CopyHeader( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt ) - { CopyPageDescHeaderFooterImpl( true, rSrcFmt, rDestFmt ); } - - // Copy footer (with contents) from SrcFmt to DestFmt. - // (can also be copied into other document). - void CopyFooter( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt ) - { CopyPageDescHeaderFooterImpl( false, rSrcFmt, rDestFmt ); } - - //For Reader. - - SwPageDesc * GetPageDesc( const String & rName ); - SwPageDesc& _GetPageDesc( sal_uInt16 i ) const { return *aPageDescs[i]; } - void ChgPageDesc( const String & rName, const SwPageDesc& ); - void ChgPageDesc( sal_uInt16 i, const SwPageDesc& ); - sal_Bool FindPageDesc( const String & rName, sal_uInt16 * pFound ); - void DelPageDesc( const String & rName, sal_Bool bBroadcast = sal_False); - void DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast = sal_False ); - void PreDelPageDesc(SwPageDesc * pDel); - sal_uInt16 MakePageDesc( const String &rName, const SwPageDesc* pCpy = 0, - sal_Bool bRegardLanguage = sal_True, - sal_Bool bBroadcast = sal_False); - void BroadcastStyleOperation(String rName, SfxStyleFamily eFamily, - sal_uInt16 nOp); - - // The html import sometimes overwrites the - // page sizes set in the page descriptions. This function is used to - // correct this. - void CheckDefaultPageFmt(); - - // Methods for tables/indices. - - sal_uInt16 GetCurTOXMark( const SwPosition& rPos, SwTOXMarks& ) const; - void DeleteTOXMark( const SwTOXMark* pTOXMark ); - const SwTOXMark& GotoTOXMark( const SwTOXMark& rCurTOXMark, - SwTOXSearch eDir, sal_Bool bInReadOnly ); - - //Insert/Renew table/indes. - const SwTOXBaseSection* InsertTableOf( const SwPosition& rPos, - const SwTOXBase& rTOX, - const SfxItemSet* pSet = 0, - sal_Bool bExpand = sal_False ); - const SwTOXBaseSection* InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd, - const SwTOXBase& rTOX, - const SfxItemSet* pSet = 0 ); - const SwTOXBase* GetCurTOX( const SwPosition& rPos ) const; - const SwAttrSet& GetTOXBaseAttrSet(const SwTOXBase& rTOX) const; - - sal_Bool DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes = sal_False ); - String GetUniqueTOXBaseName( const SwTOXType& rType, - const String* pChkStr = 0 ) const; - - sal_Bool SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName); - void SetTOXBaseProtection(const SwTOXBase& rTOXBase, sal_Bool bProtect); - - // After reading file update all tables/indices. - void SetUpdateTOX( bool bFlag = true ) { mbUpdateTOX = bFlag; } - bool IsUpdateTOX() const { return mbUpdateTOX; } - - const String& GetTOIAutoMarkURL() const {return sTOIAutoMarkURL;} - void SetTOIAutoMarkURL(const String& rSet) {sTOIAutoMarkURL = rSet;} - void ApplyAutoMark(); - - bool IsInReading() const { return mbInReading; } - void SetInReading( bool bNew ) { mbInReading = bNew; } - - bool IsClipBoard() const { return mbClipBoard; } - // N.B.: must be called right after constructor! (@see GetXmlIdRegistry) - void SetClipBoard( bool bNew ) { mbClipBoard = bNew; } - - bool IsColumnSelection() const { return mbColumnSelection; } - void SetColumnSelection( bool bNew ) { mbColumnSelection = bNew; } - - bool IsInXMLImport() const { return mbInXMLImport; } - void SetInXMLImport( bool bNew ) { mbInXMLImport = bNew; } - - // Manage types of tables/indices. - sal_uInt16 GetTOXTypeCount( TOXTypes eTyp ) const; - const SwTOXType* GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const; - sal_Bool DeleteTOXType( TOXTypes eTyp, sal_uInt16 nId ); - const SwTOXType* InsertTOXType( const SwTOXType& rTyp ); - const SwTOXTypes& GetTOXTypes() const { return *pTOXTypes; } - - const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate = sal_False ); - void SetDefaultTOXBase(const SwTOXBase& rBase); - - // Key for management of index. - sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const; - - // Sort table text. - sal_Bool SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions&); - sal_Bool SortText(const SwPaM&, const SwSortOptions&); - - // Correct the SwPosition-Objects that are registered with the document - // e. g. ::com::sun::star::text::Bookmarks or tables/indices. - // If bMoveCrsr is set move Crsr too. - - // Set everything in rOldNode on rNewPos + Offset. - void CorrAbs( const SwNodeIndex& rOldNode, const SwPosition& rNewPos, - const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False ); - - // Set everything in the range of [rStartNode, rEndNode] to rNewPos. - void CorrAbs( const SwNodeIndex& rStartNode, const SwNodeIndex& rEndNode, - const SwPosition& rNewPos, sal_Bool bMoveCrsr = sal_False ); - - // Set everything in this range from rRange to rNewPos. - void CorrAbs( const SwPaM& rRange, const SwPosition& rNewPos, - sal_Bool bMoveCrsr = sal_False ); - - // Set everything in rOldNode to relative Pos. - void CorrRel( const SwNodeIndex& rOldNode, const SwPosition& rNewPos, - const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False ); - - // Query / set rules for Outline. - inline SwNumRule* GetOutlineNumRule() const - { - return pOutlineRule; - } - void SetOutlineNumRule( const SwNumRule& rRule ); - void PropagateOutlineRule(); - - // Outline - promote / demote. - sal_Bool OutlineUpDown( const SwPaM& rPam, short nOffset = 1 ); - - // Ountline - move up / move down. - sal_Bool MoveOutlinePara( const SwPaM& rPam, short nOffset = 1); - - sal_Bool GotoOutline( SwPosition& rPos, const String& rName ) const; - - // Accept changes of outline styles for OUtlineRule. - // re-use unused 3rd parameter - // Add optional parameter <bResetIndentAttrs> - default value sal_False. - // If <bResetIndentAttrs> equals true, the indent attributes "before text" - // and "first line indent" are additionally reset at the provided PaM, if - // the list style makes use of the new list level attributes. - // introduce parameters <bCreateNewList> and <sContinuedListId> - // <bCreateNewList> indicates, if a new list is created by applying the - // given list style. - void SetNumRule( const SwPaM&, - const SwNumRule&, - const bool bCreateNewList, - const String sContinuedListId = String(), - sal_Bool bSetItem = sal_True, - const bool bResetIndentAttrs = false ); - void SetCounted( const SwPaM&, bool bCounted); - - void MakeUniqueNumRules(const SwPaM & rPaM); - - void SetNumRuleStart( const SwPosition& rPos, sal_Bool bFlag = sal_True ); - void SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt ); - - SwNumRule* GetCurrNumRule( const SwPosition& rPos ) const; - - const SwNumRuleTbl& GetNumRuleTbl() const { return *pNumRuleTbl; } - - /** - Add numbering rule to document. - - @param pRule rule to add - */ - void AddNumRule(SwNumRule * pRule); - - // add optional parameter <eDefaultNumberFormatPositionAndSpaceMode> - sal_uInt16 MakeNumRule( const String &rName, - const SwNumRule* pCpy = 0, - sal_Bool bBroadcast = sal_False, - const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode = - SvxNumberFormat::LABEL_WIDTH_AND_POSITION ); - sal_uInt16 FindNumRule( const String& rName ) const; - SwNumRule* FindNumRulePtr( const String& rName ) const; - - // Deletion only possible if ::com::sun::star::chaos::Rule is not used! - sal_Bool RenameNumRule(const String & aOldName, const String & aNewName, - sal_Bool bBroadcast = sal_False); - sal_Bool DelNumRule( const String& rName, sal_Bool bBroadCast = sal_False ); - String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const; - - void UpdateNumRule(); // Update all invalids. - void ChgNumRuleFmts( const SwNumRule& rRule, const String * pOldName = 0 ); - sal_Bool ReplaceNumRule( const SwPosition& rPos, const String& rOldRule, - const String& rNewRule ); - - // Goto next/previous on same level. - sal_Bool GotoNextNum( SwPosition&, sal_Bool bOverUpper = sal_True, - sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 ); - sal_Bool GotoPrevNum( SwPosition&, sal_Bool bOverUpper = sal_True, - sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 ); - - /** Searches for a text node with a numbering rule. - - add optional parameter <bInvestigateStartNode> - add output parameter <sListId> - - \param rPos position to start search - \param bForward - sal_True: search forward - - sal_False: search backward - \param bNum - sal_True: search for enumeration - - sal_False: search for itemize - \param bOutline - sal_True: search for outline numbering rule - - sal_False: search for non-outline numbering rule - \param nNonEmptyAllowed number of non-empty paragraphs allowed between - rPos and found paragraph - - @param sListId - output parameter - in case a list style is found, <sListId> holds the - list id, to which the text node belongs, which applies the found list style. - - @param bInvestigateStartNode - input parameter - boolean, indicating, if start node, determined by given - start position has to be investigated or not. - */ - const SwNumRule * SearchNumRule(const SwPosition & rPos, - const bool bForward, - const bool bNum, - const bool bOutline, - int nNonEmptyAllowed, - String& sListId, - const bool bInvestigateStartNode = false ); - - // Paragraphs without numbering but with indents. - sal_Bool NoNum( const SwPaM& ); - - // Delete, splitting of numbering list. - void DelNumRules( const SwPaM& ); - - // Invalidates all numrules - void InvalidateNumRules(); - - sal_Bool NumUpDown( const SwPaM&, sal_Bool bDown = sal_True ); - - // Move selected paragraphes (not only numberings) - // according to offsets. (if negative: go to doc start). - sal_Bool MoveParagraph( const SwPaM&, long nOffset = 1, sal_Bool bIsOutlMv = sal_False ); - - sal_Bool NumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bDel = sal_False); - - void StopNumRuleAnimations( OutputDevice* ); - - // Insert new table at position rPos (will be inserted before Node!). - // For AutoFormat at input: columns have to be set at predefined width. - // The array holds the positions of the columns (not their widths). - /* new parameter bCalledFromShell: - - sal_True: called from shell -> propagate existing adjust item at - rPos to every new cell. A existing adjust item in the table - heading or table contents paragraph style prevent that - propagation. - - sal_False: do not propagate - */ - const SwTable* InsertTable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER - const SwPosition& rPos, sal_uInt16 nRows, - sal_uInt16 nCols, short eAdjust, - const SwTableAutoFmt* pTAFmt = 0, - const std::vector<sal_uInt16> *pColArr = 0, - sal_Bool bCalledFromShell = sal_False, - sal_Bool bNewModel = sal_True ); - - // If index is in a table, return TableNode, else 0. - SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx ); - inline const SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx ) const; - - // Create a balanced table out of the selected range. - const SwTable* TextToTable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER, - const SwPaM& rRange, sal_Unicode cCh, - short eAdjust, - const SwTableAutoFmt* = 0 ); - - // text to table conversion - API support - const SwTable* TextToTable( const std::vector< std::vector<SwNodeRange> >& rTableNodes ); - - sal_Bool TableToText( const SwTableNode* pTblNd, sal_Unicode cCh ); - - // Create columns / rows in table. - sal_Bool InsertCol( const SwCursor& rCursor, - sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); - sal_Bool InsertCol( const SwSelBoxes& rBoxes, - sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); - sal_Bool InsertRow( const SwCursor& rCursor, - sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); - sal_Bool InsertRow( const SwSelBoxes& rBoxes, - sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); - - // Delete Colums/Rows in table. - sal_Bool DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn = false ); - sal_Bool DeleteRow( const SwCursor& rCursor ); - sal_Bool DeleteCol( const SwCursor& rCursor ); - - // Split / concatenate boxes in table. - sal_Bool SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert = sal_True, - sal_uInt16 nCnt = 1, sal_Bool bSameHeight = sal_False ); - - // Return enum TableMergeErr. - sal_uInt16 MergeTbl( SwPaM& rPam ); - String GetUniqueTblName() const; - sal_Bool IsInsTblFormatNum() const; - sal_Bool IsInsTblChangeNumFormat() const; - sal_Bool IsInsTblAlignNum() const; - - // From FEShell (for Undo and BModified). - void GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr, - const SwCellFrm* pBoxFrm = 0 ) const; - void SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly, - const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = 0 ); - void GetTabRows( SwTabCols &rFill, const SwCursor* pCrsr, - const SwCellFrm* pBoxFrm = 0 ) const; - void SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const SwCursor* pCrsr, - const SwCellFrm* pBoxFrm = 0 ); - - // Direct access for UNO. - void SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld, - const SwTableBox *pStart, sal_Bool bCurRowOnly); - - void SetRowsToRepeat( SwTable &rTable, sal_uInt16 nSet ); - - // AutoFormat for table/table selection. - sal_Bool SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew ); - - // Query attributes. - sal_Bool GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet ); - - void AppendUndoForInsertFromDB( const SwPaM& rPam, sal_Bool bIsTable ); - - sal_Bool SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType, - SwTwips nAbsDiff, SwTwips nRelDiff ); - SwTableBoxFmt* MakeTableBoxFmt(); - SwTableLineFmt* MakeTableLineFmt(); - - // Check if box has numerical valule. Change format of box if required. - void ChkBoxNumFmt( SwTableBox& rAktBox, sal_Bool bCallUpdate ); - void SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet ); - void ClearBoxNumAttrs( const SwNodeIndex& rNode ); - void ClearLineNumAttrs( SwPosition & rPos ); - - sal_Bool InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes, - const SwTable* pCpyTbl = 0, sal_Bool bCpyName = sal_False, - sal_Bool bCorrPos = sal_False ); - - sal_Bool UnProtectCells( const String& rTblName ); - sal_Bool UnProtectCells( const SwSelBoxes& rBoxes ); - sal_Bool UnProtectTbls( const SwPaM& rPam ); - sal_Bool HasTblAnyProtection( const SwPosition* pPos, - const String* pTblName = 0, - sal_Bool* pFullTblProtection = 0 ); - - // Split table at baseline position, i.e. create a new table. - sal_Bool SplitTable( const SwPosition& rPos, sal_uInt16 eMode = 0, - sal_Bool bCalcNewSize = sal_False ); - - // And vice versa: rPos must be in the table that remains. The flag indicates - // whether the current table is merged with the one before or behind it. - sal_Bool MergeTable( const SwPosition& rPos, sal_Bool bWithPrev = sal_True, - sal_uInt16 nMode = 0 ); - - // Make charts of given table update. - void UpdateCharts( const String &rName ) const; - - // Update all charts, for that exists any table. - void UpdateAllCharts() { DoUpdateAllCharts( 0 ); } - - // Table is renamed and refreshes charts. - void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName ); - - // Return the reference in document that is set for name. - const SwFmtRefMark* GetRefMark( const String& rName ) const; - - // Return RefMark via index - for UNO. - const SwFmtRefMark* GetRefMark( sal_uInt16 nIndex ) const; - - // Return names of all references that are set in document. - // If array pointer is 0 return only whether a RefMark is set in document. - sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const; - - // Insert label. If a FlyFormat is created, return it. - SwFlyFrmFmt* InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator, - const String& rNumberingSeparator, - const sal_Bool bBefore, const sal_uInt16 nId, const sal_uLong nIdx, - const String& rCharacterStyle, - const sal_Bool bCpyBrd = sal_True ); - SwFlyFrmFmt* InsertDrawLabel( - const String &rTxt, const String& rSeparator, const String& rNumberSeparator, - const sal_uInt16 nId, const String& rCharacterStyle, SdrObject& rObj ); - - // Query attribute pool. - const SwAttrPool& GetAttrPool() const { return *mpAttrPool; } - SwAttrPool& GetAttrPool() { return *mpAttrPool; } - - // Search an EditShell or, if appropriate, a ViewShell via layout. - SwEditShell* GetEditShell( ViewShell** ppSh = 0 ) const; - ::sw::IShellCursorSupplier * GetIShellCursorSupplier(); - - // OLE 2.0-notification. - inline void SetOle2Link(const Link& rLink) {aOle2Link = rLink;} - inline const Link& GetOle2Link() const {return aOle2Link;} - - // insert section (the ODF kind of section, not the nodesarray kind) - SwSection * InsertSwSection(SwPaM const& rRange, SwSectionData &, - SwTOXBase const*const pTOXBase = 0, - SfxItemSet const*const pAttr = 0, bool const bUpdate = true); - sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange, - const SwNode** ppSttNd = 0 ) const; - SwSection* GetCurrSection( const SwPosition& rPos ) const; - SwSectionFmts& GetSections() { return *pSectionFmtTbl; } - const SwSectionFmts& GetSections() const { return *pSectionFmtTbl; } - SwSectionFmt *MakeSectionFmt( SwSectionFmt *pDerivedFrom ); - void DelSectionFmt( SwSectionFmt *pFmt, sal_Bool bDelNodes = sal_False ); - void UpdateSection(sal_uInt16 const nSect, SwSectionData &, - SfxItemSet const*const = 0, bool const bPreventLinkUpdate = false); - String GetUniqueSectionName( const String* pChkStr = 0 ) const; - - /* @@@MAINTAINABILITY-HORROR@@@ - The model should not have anything to do with a shell. - Unnecessary compile/link time dependency. - */ - - // Pointer to SfxDocShell from Doc. Can be 0!! - SwDocShell* GetDocShell() { return pDocShell; } - const SwDocShell* GetDocShell() const { return pDocShell; } - void SetDocShell( SwDocShell* pDSh ); - - // in case during copying of embedded object a new shell is created, - // it should be set here and cleaned later - void SetTmpDocShell( SfxObjectShellLock rLock ) { xTmpDocShell = rLock; } - SfxObjectShellLock GetTmpDocShell() { return xTmpDocShell; } - - // For Autotexts? (Textbausteine) They have only one SVPersist at their disposal. - SfxObjectShell* GetPersist() const; - - // Pointer to storage of SfxDocShells. Can be 0!!! - ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetDocStorage(); - - // Query / set flag indicating if document is loaded asynchronously at this moment. - bool IsInLoadAsynchron() const { return mbInLoadAsynchron; } - void SetInLoadAsynchron( bool bFlag ) { mbInLoadAsynchron = bFlag; } - - sal_Bool SelectServerObj( const String& rStr, SwPaM*& rpPam, - SwNodeRange*& rpRange ) const; - - // For Drag&Move: (e.g. allow "moving" of RefMarks) - bool IsCopyIsMove() const { return mbCopyIsMove; } - void SetCopyIsMove( bool bFlag ) { mbCopyIsMove = bFlag; } - - SwDrawContact* GroupSelection( SdrView& ); - void UnGroupSelection( SdrView& ); - sal_Bool DeleteSelection( SwDrawView& ); - - // Invalidates OnlineSpell-WrongLists. - void SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong, sal_Bool bSmartTags ); - void InvalidateAutoCompleteFlag(); - - void SetCalcFieldValueHdl(Outliner* pOutliner); - - // Query if ::com::sun::star::util::URL was visited. - // Query via Doc, if only a ::com::sun::star::text::Bookmark has been given. - // In this case the document name has to be set in front. - sal_Bool IsVisitedURL( const String& rURL ) const; - - // Save current values for automatic registration of exceptions in Autocorrection. - void SetAutoCorrExceptWord( SwAutoCorrExceptWord* pNew ); - SwAutoCorrExceptWord* GetAutoCorrExceptWord() { return pACEWord; } - - const SwFmtINetFmt* FindINetAttr( const String& rName ) const; - - // Call into intransparent Basic; expect possible Return String. - sal_Bool ExecMacro( const SvxMacro& rMacro, String* pRet = 0, SbxArray* pArgs = 0 ); - - // Call into intransparent Basic / JavaScript. - sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent, - sal_Bool bChkPtr = sal_False, SbxArray* pArgs = 0, - const Link* pCallBack = 0 ); - - // Adjust left margin via object bar. - // linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von - // Numerierungen), optional kann man "um" den Offset stufen oder "auf" - // die Position gestuft werden (bModulus = sal_True). - void MoveLeftMargin( const SwPaM& rPam, sal_Bool bRight = sal_True, - sal_Bool bModulus = sal_True ); - - // Query NumberFormatter. - inline SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True ); - inline const SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True ) const; - - bool HasInvisibleContent() const; - /// delete invisible content, like hidden sections and paragraphs - bool RemoveInvisibleContent(); - /// restore the invisible content if it's available on the undo stack - bool RestoreInvisibleContent(); - - sal_Bool ConvertFieldsToText(); - - // Create sub-documents according to given collection. - // If no collection is given, use chapter styles for 1st level. - sal_Bool GenerateGlobalDoc( const String& rPath, - const SwTxtFmtColl* pSplitColl = 0 ); - sal_Bool GenerateGlobalDoc( const String& rPath, int nOutlineLevel = 0 ); - sal_Bool GenerateHTMLDoc( const String& rPath, - const SwTxtFmtColl* pSplitColl = 0 ); - sal_Bool GenerateHTMLDoc( const String& rPath, int nOutlineLevel = 0 ); - - // Compare two documents. - long CompareDoc( const SwDoc& rDoc ); - - // Merge two documents. - long MergeDoc( const SwDoc& rDoc ); - - // Set comment-text for Redline. It then comes in via AppendRedLine. - // Used by AutoFormat. 0-pointer resets mode. - // Sequence number is for conjoining of Redlines by the UI. - void SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo = 0 ); - - bool IsAutoFmtRedline() const { return mbIsAutoFmtRedline; } - void SetAutoFmtRedline( bool bFlag ) { mbIsAutoFmtRedline = bFlag; } - - // For AutoFormat: with Undo/Redlining. - void SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId, - const SfxItemSet* pSet = 0 ); - void SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& ); - - // Only for SW-textbloxks! Does not pay any attention to layout! - void ClearDoc(); // Deletes all content! - - // Query /set data for PagePreView. - const SwPagePreViewPrtData* GetPreViewPrtData() const { return pPgPViewPrtData; } - - // If pointer == 0 destroy pointer in document. - // Else copy object. - // Pointer is not transferred to ownership by document! - void SetPreViewPrtData( const SwPagePreViewPrtData* pData ); - - // update all modified OLE-Objects. The modification is called over the - // StarOne - Interface - void SetOLEObjModified() - { if( GetCurrentViewShell() ) aOLEModifiedTimer.Start(); } //swmod 071107//swmod 071225 - - // -------------------- Uno - Interfaces --------------------------- - const SwUnoCrsrTbl& GetUnoCrsrTbl() const { return *pUnoCrsrTbl; } - SwUnoCrsr* CreateUnoCrsr( const SwPosition& rPos, sal_Bool bTblCrsr = sal_False ); - - // -------------------- FeShell - Interfaces ----------------------- - // !!! These assume always an existing layout !!! - sal_Bool ChgAnchor( const SdrMarkList& _rMrkList, - RndStdIds _eAnchorType, - const sal_Bool _bSameOnly, - const sal_Bool _bPosCorr ); - - void SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew ); - void GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const; - void SetRowSplit( const SwCursor& rCursor, const SwFmtRowSplit &rNew ); - void GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ) const; - sal_Bool BalanceRowHeight( const SwCursor& rCursor, sal_Bool bTstOnly = sal_True ); - void SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew ); - sal_Bool GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const; - void SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ); - void SetTabLineStyle( const SwCursor& rCursor, - const Color* pColor, sal_Bool bSetLine, - const editeng::SvxBorderLine* pBorderLine ); - void GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const; - void SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew ); - sal_Bool GetBoxAttr( const SwCursor& rCursor, SfxPoolItem &rToFill ) const; - void SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign ); - sal_uInt16 GetBoxAlign( const SwCursor& rCursor ) const; - void AdjustCellWidth( const SwCursor& rCursor, sal_Bool bBalance = sal_False ); - - int Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest ); - int Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest ); - void Unchain( SwFrmFmt &rFmt ); - - // For Copy/Move from FrmShell. - SdrObject* CloneSdrObj( const SdrObject&, sal_Bool bMoveWithinDoc = sal_False, - sal_Bool bInsInPage = sal_True ); - - // - // -------------------- FeShell - Interface end ------------------ - - // Interface for TextInputData - for text input of Chinese and Japanese. - SwExtTextInput* CreateExtTextInput( const SwPaM& rPam ); - void DeleteExtTextInput( SwExtTextInput* pDel ); - SwExtTextInput* GetExtTextInput( const SwNode& rNd, - xub_StrLen nCntntPos = STRING_NOTFOUND) const; - SwExtTextInput* GetExtTextInput() const; - - // Interface for access to AutoComplete-List. - static SwAutoCompleteWord& GetAutoCompleteWords() { return *pACmpltWords; } - - bool ContainsMSVBasic() const { return mbContains_MSVBasic; } - void SetContainsMSVBasic( bool bFlag ) { mbContains_MSVBasic = bFlag; } - - // Interface for the list of Ruby - texts/attributes - sal_uInt16 FillRubyList( const SwPaM& rPam, SwRubyList& rList, - sal_uInt16 nMode ); - sal_uInt16 SetRubyList( const SwPaM& rPam, const SwRubyList& rList, - sal_uInt16 nMode ); - - void ReadLayoutCache( SvStream& rStream ); - void WriteLayoutCache( SvStream& rStream ); - SwLayoutCache* GetLayoutCache() const { return pLayoutCache; } - - /** Checks if any of the text node contains hidden characters. - Used for optimization. Changing the view option 'view hidden text' - has to trigger a reformatting only if some of the text is hidden. - */ - bool ContainsHiddenChars() const; - - // call back for API wrapper - SwModify* GetUnoCallBack() const; - - IGrammarContact* getGrammarContact() const { return mpGrammarContact; } - - /** Marks/Unmarks a list level of a certain list - - levels of a certain lists are marked now - - @param sListId list Id of the list whose level has to be marked/unmarked - @param nListLevel level to mark - @param bValue - sal_True mark the level - - sal_False unmark the level - */ - void MarkListLevel( const String& sListId, - const int nListLevel, - const sal_Bool bValue ); - - /** Marks/Unmarks a list level of a certain list - - levels of a certain lists are marked now - - @param rList list whose level has to be marked/unmarked - @param nListLevel level to mark - @param bValue - sal_True mark the level - - sal_False unmark the level - */ - void MarkListLevel( SwList& rList, - const int nListLevel, - const sal_Bool bValue ); - - // Change a format undoable. - void ChgFmt(SwFmt & rFmt, const SfxItemSet & rSet); - - void RenameFmt(SwFmt & rFmt, const String & sNewName, - sal_Bool bBroadcast = sal_False); - - // Change a TOX undoable. - void ChgTOX(SwTOXBase & rTOX, const SwTOXBase & rNew); - - /** - Returns a textual description of a PaM. - - @param rPaM the PaM to describe - - If rPaM only spans one paragraph the result is: - - '<text in the PaM>' - - <text in the PaM> is shortened to nUndoStringLength characters. - - If rPaM spans more than one paragraph the result is: - - paragraphs (STR_PARAGRAPHS) - - @return the textual description of rPaM - */ - String GetPaMDescr(const SwPaM & rPaM) const; - - sal_Bool IsFirstOfNumRule(SwPosition & rPos); - - // access methods for XForms model(s) - - /// access container for XForms model; will be NULL if !isXForms() - com::sun::star::uno::Reference<com::sun::star::container::XNameContainer> - getXForms() const; - - com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > GetGCIterator() const; - - /// is this an XForms document? - bool isXForms() const; - - /// initialize XForms models; turn this into an XForms document - void initXForms( bool bCreateDefaultModel ); - // access methods for XForms model(s) - - inline bool ApplyWorkaroundForB6375613() const - { - return mbApplyWorkaroundForB6375613; - } - void SetApplyWorkaroundForB6375613( bool p_bApplyWorkaroundForB6375613 ); - - //Update all the page masters - void SetDefaultPageMode(bool bSquaredPageMode); - sal_Bool IsSquaredPageMode() const; - - void Setn32DummyCompatabilityOptions1( sal_uInt32 CompatabilityOptions1 ) - { - n32DummyCompatabilityOptions1 = CompatabilityOptions1; - } - sal_uInt32 Getn32DummyCompatabilityOptions1( ) - { - return n32DummyCompatabilityOptions1; - } - void Setn32DummyCompatabilityOptions2( sal_uInt32 CompatabilityOptions2 ) - { - n32DummyCompatabilityOptions2 = CompatabilityOptions2; - } - sal_uInt32 Getn32DummyCompatabilityOptions2( ) - { - return n32DummyCompatabilityOptions2; - } - com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > GetVbaEventProcessor(); - void SetVBATemplateToProjectCache( com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xCache ) { m_xTemplateToProjectCache = xCache; }; - com::sun::star::uno::Reference< com::sun::star::container::XNameContainer > GetVBATemplateToProjectCache() { return m_xTemplateToProjectCache; }; - ::sfx2::IXmlIdRegistry& GetXmlIdRegistry(); - ::sw::MetaFieldManager & GetMetaFieldManager(); - ::sw::UndoManager & GetUndoManager(); - ::sw::UndoManager const& GetUndoManager() const; - SfxObjectShell* CreateCopy(bool bCallInitNew) const; -}; - -// This method is called in Dtor of SwDoc and deletes cache of ContourObjects. -void ClrContourCache(); - -inline const SwTableNode* SwDoc::IsIdxInTbl( const SwNodeIndex& rIdx ) const -{ - return ((SwDoc*)this)->IsIdxInTbl( rIdx ); -} - -inline SvNumberFormatter* SwDoc::GetNumberFormatter( sal_Bool bCreate ) -{ - if( bCreate && !pNumberFormatter ) - _CreateNumberFormatter(); - return pNumberFormatter; -} - -inline const SvNumberFormatter* SwDoc::GetNumberFormatter( sal_Bool bCreate ) const -{ - return ((SwDoc*)this)->GetNumberFormatter( bCreate ); -} - -inline void SwDoc::SetOLEPrtNotifyPending( bool bSet ) -{ - mbOLEPrtNotifyPending = bSet; - if( !bSet ) - mbAllOLENotify = sal_False; -} - -// namespace <docfunc> for functions and procedures working on a Writer document. -namespace docfunc -{ - /** method to check, if given Writer document contains at least one drawing object - - @author OD - - @param p_rDoc - input parameter - reference to the Writer document, which is investigated. - */ - bool ExistsDrawObjs( SwDoc& p_rDoc ); - - /** method to check, if given Writer document contains only drawing objects, - which are completely on its page. - - @author OD - - @param p_rDoc - input parameter - reference to the Writer document, which is investigated. - */ - bool AllDrawObjsOnPage( SwDoc& p_rDoc ); - - /** method to check, if the outline style has to written as a normal list style - - #i69627# - The outline style has to written as a normal list style, if a parent - paragraph style of one of the paragraph styles, which are assigned to - the list levels of the outline style, has a list style set or inherits - a list style from its parent paragraphs style. - This information is needed for the OpenDocument file format export. - - @author OD - - @param rDoc - input parameter - reference to the text document, which is investigated. - - @return boolean - indicating, if the outline style has to written as a normal list style - */ - bool HasOutlineStyleToBeWrittenAsNormalListStyle( SwDoc& rDoc ); -} -#endif //_DOC_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx deleted file mode 100644 index 457868c498..0000000000 --- a/sw/inc/docary.hxx +++ /dev/null @@ -1,126 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _DOCARY_HXX -#define _DOCARY_HXX - -#include <com/sun/star/i18n/ForbiddenCharacters.hpp> - -class SwFieldType; -class SwFrmFmt; -class SwCharFmt; -class SwTOXType; -class SwUndo; -class SwSectionFmt; -class SwNumRule; -class SwRedline; -class SwUnoCrsr; -class SwOLENode; - -namespace com { namespace sun { namespace star { namespace i18n { - struct ForbiddenCharacters; // comes from the I18N UNO interface -}}}} - -#include <tools/table.hxx> -#include <swtypes.hxx> -#include <svl/svarray.hxx> - -typedef SwFieldType* SwFldTypePtr; -#define GROW_FLDTYPES 16 - -// PageDescriptor-interface -// typedef SwPageDesc * SwPageDescPtr; -// SV_DECL_PTRARR_DEL(SwPageDescs, SwPageDescPtr,1,1); - -typedef SwFrmFmt* SwFrmFmtPtr; -SV_DECL_PTRARR_DEL(SwFrmFmts,SwFrmFmtPtr,4,4) - -// Specific frame formats (frames, DrawObjects). -SV_DECL_PTRARR_DEL(SwSpzFrmFmts,SwFrmFmtPtr,0,4) - -typedef SwCharFmt* SwCharFmtPtr; -SV_DECL_PTRARR_DEL(SwCharFmts,SwCharFmtPtr,4,4) - -SV_DECL_PTRARR_DEL( SwFldTypes, SwFldTypePtr, INIT_FLDTYPES, GROW_FLDTYPES ) - -typedef SwTOXType* SwTOXTypePtr; -SV_DECL_PTRARR_DEL( SwTOXTypes, SwTOXTypePtr, 0, 1 ) - -// Array of Undo-history. -typedef SwSectionFmt* SwSectionFmtPtr; -SV_DECL_PTRARR_DEL(SwSectionFmts,SwSectionFmtPtr,0,4) - - -typedef SwNumRule* SwNumRulePtr; -SV_DECL_PTRARR_DEL_VISIBILITY( SwNumRuleTbl, SwNumRulePtr, 0, 5, SW_DLLPUBLIC ) - -typedef SwRedline* SwRedlinePtr; -SV_DECL_PTRARR_SORT_DEL( _SwRedlineTbl, SwRedlinePtr, 0, 16 ) - -class SwRedlineTbl : private _SwRedlineTbl -{ -public: - SwRedlineTbl( sal_uInt8 nSize = 0, sal_uInt8 nG = 16 ) - : _SwRedlineTbl( nSize, nG ) {} - ~SwRedlineTbl() {} - - sal_Bool SavePtrInArr( SwRedlinePtr p ) { return _SwRedlineTbl::Insert( p ); } - - sal_Bool Insert( SwRedlinePtr& p, sal_Bool bIns = sal_True ); - sal_Bool Insert( SwRedlinePtr& p, sal_uInt16& rInsPos, sal_Bool bIns = sal_True ); - sal_Bool InsertWithValidRanges( SwRedlinePtr& p, sal_uInt16* pInsPos = 0 ); - - void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 ); - void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 ); - - // Search next or previous Redline with the same Seq. No. - // Search can be restricted via Lookahaed. - // Using 0 or USHRT_MAX makes search the whole array. - sal_uInt16 FindNextOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead = 20 ) const; - sal_uInt16 FindPrevOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead = 20 ) const; - sal_uInt16 FindNextSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos, - sal_uInt16 nLookahead = 20 ) const; - sal_uInt16 FindPrevSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos, - sal_uInt16 nLookahead = 20 ) const; - - using _SwRedlineTbl::Count; - using _SwRedlineTbl::operator[]; - using _SwRedlineTbl::GetObject; - using _SwRedlineTbl::Seek_Entry; - using _SwRedlineTbl::GetPos; -}; - -typedef SwUnoCrsr* SwUnoCrsrPtr; -SV_DECL_PTRARR_DEL( SwUnoCrsrTbl, SwUnoCrsrPtr, 0, 4 ) - -typedef SwOLENode* SwOLENodePtr; -SV_DECL_PTRARR(SwOLENodes,SwOLENodePtr,16,16) - - -#endif //_DOCARY_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/docfac.hxx b/sw/inc/docfac.hxx deleted file mode 100644 index 7a09f8e01b..0000000000 --- a/sw/inc/docfac.hxx +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _DOCFAC_HXX -#define _DOCFAC_HXX - -#include <tools/solar.h> - -class SwDoc; - -class SwDocFac -{ -protected: - SwDoc* pDoc; - -public: - SwDocFac( SwDoc *pDoc = 0 ); - ~SwDocFac(); - - // Document is created after calling Read(...). - SwDoc* GetDoc(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/dochdl.hrc b/sw/inc/dochdl.hrc deleted file mode 100644 index 8e5980e244..0000000000 --- a/sw/inc/dochdl.hrc +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _DOCHDL_HRC -#define _DOCHDL_HRC - -#include "rcid.hrc" - -#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) - -#define DLG_SEL_GLOS (RC_DOCHDL_BEGIN + 6) -#define STR_NO_TABLE (RC_DOCHDL_BEGIN + 7) - -#define STR_PRIVATETEXT (RC_DOCHDL_BEGIN + 8) -#define STR_PRIVATEGRAPHIC (RC_DOCHDL_BEGIN + 9) -#define STR_PRIVATEOLE (RC_DOCHDL_BEGIN + 10) -#define STR_DDEFORMAT (RC_DOCHDL_BEGIN + 11) - - -#define DOCHDL_ACT_END STR_DDEFORMAT - -#if DOCHDL_ACT_END > RC_DOCHDL_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#endif - diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx deleted file mode 100644 index 08d58e3a53..0000000000 --- a/sw/inc/docsh.hxx +++ /dev/null @@ -1,323 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWDOCSH_HXX -#define _SWDOCSH_HXX - -#include <rtl/ref.hxx> -#include <com/sun/star/frame/XController.hpp> -#include <com/sun/star/uno/Sequence.h> -#include <vcl/timer.hxx> -#include <sfx2/docfac.hxx> -#include <sfx2/objsh.hxx> -#include "swdllapi.h" -#include <swdll.hxx> -#include <shellid.hxx> - -#include <svl/lstner.hxx> -#include <svtools/embedhlp.hxx> - -class SwDoc; -class SfxDocumentInfoDialog; -class SfxStyleSheetBasePool; -class SfxInPlaceClient; -class FontList; -class SwView; -class SwWrtShell; -class SwFEShell; -class Reader; -class SwReader; -class SwCrsrShell; -class SwSrcView; -class SwPaM; -class SwgReaderOption; -class SwOLEObj; -class IDocumentDeviceAccess; -class IDocumentSettingAccess; -class IDocumentTimerAccess; -class IDocumentChartDataProviderAccess; - - -class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener -{ - SwDoc* pDoc; // Document. - rtl::Reference< SfxStyleSheetBasePool > mxBasePool; // Passing through for formats. - FontList* pFontList; // Current Fontlist. - - // For "historical reasons" nothing can be done without the WrtShell. - // Back-pointer on View (again "for historical reasons"). - // Back-pointer is valid until in Activate a new one is set - // or until it is deleted in the View's Dtor. - - SwView* pView; - SwWrtShell* pWrtShell; - - Timer aFinishedTimer; // Timer for checking graphics-links. - // If all are present, the doc is loaded completely. - - comphelper::EmbeddedObjectContainer* pOLEChildList; - sal_Int16 nUpdateDocMode; // contains the com::sun::star::document::UpdateDocMode - bool bInUpdateFontList; //prevent nested calls of UpdateFontList - bool bIsATemplate; //prevent nested calls of UpdateFontList - - // Methods for access to doc. - SW_DLLPRIVATE void AddLink(); - SW_DLLPRIVATE void RemoveLink(); - - // Catch hint for DocInfo. - SW_DLLPRIVATE virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - - // FileIO - SW_DLLPRIVATE virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); - SW_DLLPRIVATE virtual sal_Bool Load( SfxMedium& rMedium ); - SW_DLLPRIVATE virtual sal_Bool LoadFrom( SfxMedium& rMedium ); - SW_DLLPRIVATE virtual sal_Bool ConvertFrom( SfxMedium &rMedium ); - SW_DLLPRIVATE virtual sal_Bool ConvertTo( SfxMedium &rMedium ); - SW_DLLPRIVATE virtual sal_Bool SaveAs( SfxMedium& rMedium ); - SW_DLLPRIVATE virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); - - SW_DLLPRIVATE virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False ); - - - // Make DocInfo known to the Doc. - SW_DLLPRIVATE virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog( - Window *pParent, const SfxItemSet &); - // OLE-stuff - SW_DLLPRIVATE virtual void Draw( OutputDevice*, const JobSetup&, sal_uInt16); - - // Methods for StyleSheets - SW_DLLPRIVATE sal_uInt16 Edit( const String &rName, const String& rParent, sal_uInt16 nFamily, - sal_uInt16 nMask, sal_Bool bNew, - sal_Bool bColumn = sal_False, - SwWrtShell* pActShell = 0, - sal_Bool bBasic = sal_False ); - SW_DLLPRIVATE sal_uInt16 Delete(const String &rName, sal_uInt16 nFamily); - SW_DLLPRIVATE sal_uInt16 ApplyStyles(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell = 0, - sal_uInt16 nMode = 0 ); - SW_DLLPRIVATE sal_uInt16 DoWaterCan( const String &rName, sal_uInt16 nFamily); - SW_DLLPRIVATE sal_uInt16 UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell = 0); - SW_DLLPRIVATE sal_uInt16 MakeByExample(const String &rName, - sal_uInt16 nFamily, sal_uInt16 nMask, SwWrtShell* pShell = 0); - - SW_DLLPRIVATE void InitDraw(); - SW_DLLPRIVATE void SubInitNew(); // for InitNew and HtmlSourceMode. - - SW_DLLPRIVATE void RemoveOLEObjects(); - SW_DLLPRIVATE void CalcLayoutForOLEObjects(); - - SW_DLLPRIVATE void Init_Impl(); - SW_DLLPRIVATE DECL_STATIC_LINK( SwDocShell, IsLoadFinished, void* ); - - - using SfxObjectShell::GetVisArea; - using SfxObjectShell::GetStyleFamilyBitmap; - -protected: - /// override to update text fields - virtual void DoFlushDocInfo(); - -public: - using SotObject::GetInterface; - - // but we implement this ourselves. - SFX_DECL_INTERFACE(SW_DOCSHELL) - SFX_DECL_OBJECTFACTORY() - TYPEINFO(); - - static SfxInterface *_GetInterface() { return GetStaticInterface(); } - - static rtl::OUString GetEventName( sal_Int32 nId ); - - //Doc is required for SO data exchange! - SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED ); - SwDocShell( const sal_uInt64 i_nSfxCreationFlags ); - SwDocShell( SwDoc *pDoc, SfxObjectCreateMode eMode = SFX_CREATE_MODE_STANDARD ); - ~SwDocShell(); - - // OLE 2.0-notification. - DECL_LINK( Ole2ModifiedHdl, void * ); - - // OLE-stuff. - virtual void SetVisArea( const Rectangle &rRect ); - virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const; - virtual Printer *GetDocumentPrinter(); - virtual OutputDevice* GetDocumentRefDev(); - virtual void OnDocumentPrinterChanged( Printer * pNewPrinter ); - virtual sal_uLong GetMiscStatus() const; - - virtual void PrepareReload(); - virtual void SetModified( sal_Bool = sal_True ); - - // Dispatcher - void Execute(SfxRequest &); - void ExecStyleSheet(SfxRequest&); - void ExecDB(SfxRequest&); - - void GetState(SfxItemSet &); - void StateAlways(SfxItemSet &); - void StateStyleSheet(SfxItemSet&, SwWrtShell* pSh = 0 ); - - // returns Doc. But be careful! - inline SwDoc* GetDoc() { return pDoc; } - inline const SwDoc* GetDoc() const { return pDoc; } - IDocumentDeviceAccess* getIDocumentDeviceAccess(); - const IDocumentSettingAccess* getIDocumentSettingAccess() const; - IDocumentChartDataProviderAccess* getIDocumentChartDataProviderAccess(); - - - void UpdateFontList(); - void UpdateChildWindows(); - - // global IO. - virtual sal_Bool Save(); - - // For Style PI. - virtual SfxStyleSheetBasePool* GetStyleSheetPool(); - - // For Organizer. - virtual sal_Bool Insert(SfxObjectShell &rSource, - sal_uInt16 nSourceIdx1, - sal_uInt16 nSourceIdx2, - sal_uInt16 nSourceIdx3, - sal_uInt16& nIdx1, - sal_uInt16& nIdx2, - sal_uInt16& nIdx3, - sal_uInt16& nRemovedIdx); - - virtual sal_Bool Remove(sal_uInt16 nIdx1, - sal_uInt16 nIdx2 = INDEX_IGNORE, - sal_uInt16 nIdx3 = INDEX_IGNORE); - - virtual Bitmap GetStyleFamilyBitmap( SfxStyleFamily eFamily ); - - // Set View for actions via Shell. - void SetView(SwView* pVw); - const SwView *GetView() const { return pView; } - SwView *GetView() { return pView; } - - // Accress to the SwWrtShell belonging to SwView. - SwWrtShell *GetWrtShell() { return pWrtShell; } - const SwWrtShell *GetWrtShell() const { return pWrtShell; } - - // For Core - it knows the DocShell but not the WrtShell! - SwFEShell *GetFEShell(); - const SwFEShell *GetFEShell() const - { return ((SwDocShell*)this)->GetFEShell(); } - - - // For inserting document. - Reader* StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, - SwCrsrShell* pCrsrSh = 0, SwPaM* pPaM = 0); - - virtual long DdeGetData( const String& rItem, const String& rMimeType, - ::com::sun::star::uno::Any & rValue ); - virtual long DdeSetData( const String& rItem, const String& rMimeType, - const ::com::sun::star::uno::Any & rValue ); - virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const String& rItem ); - virtual void ReconnectDdeLink(SfxObjectShell& rServer); - - virtual void FillClass( SvGlobalName * pClassName, - sal_uInt32 * pClipFormat, - String * pAppName, - String * pLongUserName, - String * pUserName, - sal_Int32 nFileFormat, - sal_Bool bTemplate = sal_False ) const; - - virtual void LoadStyles( SfxObjectShell& rSource ); - - void _LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrentDocument ); - - // Display dialog for page style. If required display column page. - void FormatPage( const String& rPage, - sal_Bool bColumn = sal_False, - SwWrtShell* pActShell = 0 ); - - // #i59688# - // linked graphics are now loaded on demand. - // Thus, loading of linked graphics no longer needed and necessary for - // the load of document being finished. - - void LoadingFinished(); - - // Cancel transfer (called from SFX). - virtual void CancelTransfers(); - - // Re-read Doc from Html-source. - void ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView ); - - sal_Int16 GetUpdateDocMode() const {return nUpdateDocMode;} - - //Activate wait cursor for all windows of this document - //Optionally all dispatcher could be Locked - //Usually locking should be done using the class: SwWaitObject! - void EnterWait( sal_Bool bLockDispatcher ); - void LeaveWait( sal_Bool bLockDispatcher ); - - void ToggleBrowserMode(sal_Bool bOn, SwView* pView); - - sal_uLong LoadStylesFromFile( const String& rURL, SwgReaderOption& rOpt, - sal_Bool bUnoCall ); - void InvalidateModel(); - void ReactivateModel(); - - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > GetEventNames(); - - // #i20883# Digital Signatures and Encryption - virtual sal_uInt16 GetHiddenInformationState( sal_uInt16 nStates ); - - - // #i42634# Overwrites SfxObjectShell::UpdateLinks - // This new function is necessary to trigger update of links in docs - // read by the binary filter: - virtual void UpdateLinks(); - - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > - GetController(); - - SfxInPlaceClient* GetIPClient( const ::svt::EmbeddedObjectRef& xObjRef ); - SW_DLLPRIVATE sal_Bool IsTemplate() { return bIsATemplate; } - SW_DLLPRIVATE void SetIsTemplate( bool bValue ) { bIsATemplate = bValue; } - - virtual const ::sfx2::IXmlIdRegistry* GetXmlIdRegistry() const; - - // passwword protection for Writer (derived from SfxObjectShell) - // see also: FN_REDLINE_ON, FN_REDLINE_ON - virtual bool IsChangeRecording() const; - virtual bool HasChangeRecordProtection() const; - virtual void SetChangeRecording( bool bActivate ); - virtual bool SetProtectionPassword( const String &rPassword ); - virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash ); -}; - -class Graphic; -//implemented in source/ui/docvw/romenu.cxx -String ExportGraphic( const Graphic &rGraphic, const String &rGrfName ); - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/docstat.hxx b/sw/inc/docstat.hxx deleted file mode 100644 index 9ea7cffbf5..0000000000 --- a/sw/inc/docstat.hxx +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _DOCSTAT_HXX -#define _DOCSTAT_HXX - -#include <tools/solar.h> -#include "swdllapi.h" - - -struct SW_DLLPUBLIC SwDocStat -{ - sal_uInt16 nTbl; - sal_uInt16 nGrf; - sal_uInt16 nOLE; - sal_uLong nPage; - /// paragraphs for document statistic: non-empty and non-hidden ones - sal_uLong nPara; - /// all paragraphs, including empty/hidden ones - sal_uLong nAllPara; - sal_uLong nWord; - sal_uLong nChar; - sal_uLong nCharExcludingSpaces; - sal_Bool bModified; - - SwDocStat(); - void Reset(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx deleted file mode 100644 index e78c4bb1cf..0000000000 --- a/sw/inc/docstyle.hxx +++ /dev/null @@ -1,240 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _DOCSTYLE_HXX -#define _DOCSTYLE_HXX - -#include <rtl/ref.hxx> - -#ifndef _SVSTDARR_HXX -#define _SVSTDARR_STRINGSDTOR -#include <svl/svstdarr.hxx> -#endif -#include <svl/style.hxx> -#include <svl/itemset.hxx> -#include "swdllapi.h" - -class SwDoc; -class SwDocStyleSheetPool; -class SwPageDesc; -class SwCharFmt; -class SwTxtFmtColl; -class SwFrmFmt; -class SwNumRule; - -/*-------------------------------------------------------------------- - Local helper class. - --------------------------------------------------------------------*/ -class SwPoolFmtList : public SvStringsDtor -{ -public: - SwPoolFmtList() {} - void Append( char cChar, const String& rStr ); - void Erase(); -}; - - -/*-------------------------------------------------------------------- - Temporary StyleSheet. - --------------------------------------------------------------------*/ -class SW_DLLPUBLIC SwDocStyleSheet : public SfxStyleSheetBase -{ - friend class SwDocStyleSheetPool; - friend class SwStyleSheetIterator; - - SwCharFmt* pCharFmt; - SwTxtFmtColl* pColl; - SwFrmFmt* pFrmFmt; - const SwPageDesc* pDesc; - const SwNumRule* pNumRule; - - SwDoc& rDoc; - SfxItemSet aCoreSet; - - sal_Bool bPhysical; - - - // Make empty shell a real StyleSheet (Core). - SW_DLLPRIVATE void Create(); - - // Fill StyleSheet with data. - enum FillStyleType { - FillOnlyName, - FillAllInfo, - FillPhysical - }; - - SW_DLLPRIVATE sal_Bool FillStyleSheet( FillStyleType eFType ); - -protected: - virtual ~SwDocStyleSheet(); - -public: - SwDocStyleSheet( SwDoc& rDoc, - const String& rName, - SwDocStyleSheetPool& rPool, - SfxStyleFamily eFam, - sal_uInt16 nMask); - - SwDocStyleSheet( const SwDocStyleSheet& ); - - void Reset(); - - void SetMask(sal_uInt16 nMsk) { nMask = nMsk; } - void SetFamily(SfxStyleFamily eFam) { nFamily = eFam; } - - sal_Bool IsPhysical() const { return bPhysical; } - void SetPhysical(sal_Bool bPhys); - - // add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value sal_False, - // which indicates that the indent attributes at a paragraph style should - // be reset in case that a list style is applied to the paragraph style and - // no indent attributes are applied. - void SetItemSet( const SfxItemSet& rSet, - const bool bResetIndentAttrsAtParagraphStyle = false ); - - virtual SfxItemSet& GetItemSet(); - // new method for paragraph styles to merge indent attributes of applied list - // style into the given item set, if the list style indent attributes are applicable. - void MergeIndentAttrsOfListStyle( SfxItemSet& rSet ); - virtual const String& GetParent() const; - virtual const String& GetFollow() const; - - virtual sal_uLong GetHelpId( String& rFile ); - virtual void SetHelpId( const String& r, sal_uLong nId ); - - // Preset the members without physical access. - // Used by StyleSheetPool. - void PresetName(const String& rName) { aName = rName; } - void PresetNameAndFamily(const String& rName); - void PresetParent(const String& rName){ aParent = rName; } - void PresetFollow(const String& rName){ aFollow = rName; } - - virtual sal_Bool SetName( const String& rStr); - virtual sal_Bool SetParent( const String& rStr); - virtual sal_Bool SetFollow( const String& rStr); - - virtual sal_Bool HasFollowSupport() const; - virtual sal_Bool HasParentSupport() const; - virtual sal_Bool HasClearParentSupport() const; - virtual String GetDescription(); - virtual String GetDescription(SfxMapUnit eUnit); - - SwCharFmt* GetCharFmt(); - SwTxtFmtColl* GetCollection(); - SwFrmFmt* GetFrmFmt(); - const SwPageDesc* GetPageDesc(); - const SwNumRule* GetNumRule(); - void SetNumRule(const SwNumRule& rRule); - - virtual sal_Bool IsUsed() const; -}; - -/*-------------------------------------------------------------------- - Iterator for Pool. - --------------------------------------------------------------------*/ - -class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener -{ - rtl::Reference< SwDocStyleSheet > mxIterSheet; - rtl::Reference< SwDocStyleSheet > mxStyleSheet; - SwPoolFmtList aLst; - sal_uInt16 nLastPos; - sal_Bool bFirstCalled; - - void AppendStyleList(const SvStringsDtor& rLst, - sal_Bool bUsed, - sal_uInt16 nSection, - char cType); - -public: - SwStyleSheetIterator( SwDocStyleSheetPool* pBase, - SfxStyleFamily eFam, sal_uInt16 n=0xFFFF ); - virtual ~SwStyleSheetIterator(); - - virtual sal_uInt16 Count(); - virtual SfxStyleSheetBase *operator[](sal_uInt16 nIdx); - virtual SfxStyleSheetBase* First(); - virtual SfxStyleSheetBase* Next(); - virtual SfxStyleSheetBase* Find(const UniString& rStr); - - virtual void Notify( SfxBroadcaster&, const SfxHint& ); -}; - - -class SwDocStyleSheetPool : public SfxStyleSheetBasePool -{ - rtl::Reference< SwDocStyleSheet > mxStyleSheet; - SwDoc& rDoc; - sal_Bool bOrganizer : 1; // Organizer - - - virtual SfxStyleSheetBase* Create( const String&, SfxStyleFamily, sal_uInt16 nMask); - virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& ); - - using SfxStyleSheetBasePool::Find; - -public: - SwDocStyleSheetPool( SwDoc&, sal_Bool bOrganizer = sal_False ); - - virtual void Replace( SfxStyleSheetBase& rSource, - SfxStyleSheetBase& rTarget ); - virtual SfxStyleSheetBase& Make(const String&, SfxStyleFamily, sal_uInt16 nMask, sal_uInt16 nPos = 0xffff); - - virtual SfxStyleSheetBase* Find( const String&, SfxStyleFamily eFam, - sal_uInt16 n=0xFFFF ); - - virtual sal_Bool SetParent( SfxStyleFamily eFam, const String &rStyle, - const String &rParent ); - - virtual void Remove( SfxStyleSheetBase* pStyle); - - void SetOrganizerMode( sal_Bool bMode ) { bOrganizer = bMode; } - sal_Bool IsOrganizerMode() const { return bOrganizer; } - - virtual SfxStyleSheetIterator* CreateIterator( SfxStyleFamily, - sal_uInt16 nMask ); - - SwDoc& GetDoc() const { return rDoc; } - - void dispose(); - - virtual void SAL_CALL acquire( ) throw (); - virtual void SAL_CALL release( ) throw (); - -protected: - virtual ~SwDocStyleSheetPool(); - - //For not-so-clever compilers. -private: - SwDocStyleSheetPool( const SwDocStyleSheetPool& ); -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx deleted file mode 100644 index 47e3d1ea01..0000000000 --- a/sw/inc/docufld.hxx +++ /dev/null @@ -1,841 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_DOCUFLD_HXX -#define SW_DOCUFLD_HXX - - -#include <tools/date.hxx> -#include <tools/datetime.hxx> - - -#include <svl/macitem.hxx> - -#include "fldbas.hxx" -#include "numrule.hxx" - -class _SetGetExpFlds; -class SwTxtFld; -class SwFrm; -class OutlinerParaObject; -class SwTextAPIObject; - -enum SwAuthorFormat -{ - AF_BEGIN, - AF_NAME = AF_BEGIN, - AF_SHORTCUT, - AF_END, - AF_FIXED = 0x8000 -}; - -/*-------------------------------------------------------------------- - Subtype of document statistics. - --------------------------------------------------------------------*/ - -enum SwDocStatSubType -{ - DS_BEGIN, - DS_PAGE = DS_BEGIN, - DS_PARA, - DS_WORD, - DS_CHAR, - DS_TBL, - DS_GRF, - DS_OLE, - DS_END -}; - -typedef sal_uInt16 SwDocInfoSubType; -namespace nsSwDocInfoSubType -{ - // NB: these must denote consecutive integers! - // NB2: these are extended by 4 DI_INFO values for backward compatibility - // in filter/html/htmlfld.cxx, so make sure that DI_SUBTYPE_END - // really is the end, and is at least 4 less than DI_SUB_*! - const SwDocInfoSubType DI_SUBTYPE_BEGIN = 0; - const SwDocInfoSubType DI_TITEL = DI_SUBTYPE_BEGIN; - const SwDocInfoSubType DI_THEMA = 1; - const SwDocInfoSubType DI_KEYS = 2; - const SwDocInfoSubType DI_COMMENT = 3; - const SwDocInfoSubType DI_CREATE = 4; - const SwDocInfoSubType DI_CHANGE = 5; - const SwDocInfoSubType DI_PRINT = 6; - const SwDocInfoSubType DI_DOCNO = 7; - const SwDocInfoSubType DI_EDIT = 8; - const SwDocInfoSubType DI_CUSTOM = 9; - const SwDocInfoSubType DI_SUBTYPE_END = 10; - - - const SwDocInfoSubType DI_SUB_AUTHOR = 0x0100; - const SwDocInfoSubType DI_SUB_TIME = 0x0200; - const SwDocInfoSubType DI_SUB_DATE = 0x0300; - const SwDocInfoSubType DI_SUB_FIXED = 0x1000; - const SwDocInfoSubType DI_SUB_MASK = 0xff00; -} - - -enum RegInfoFormat // Only for loading of old documents!!! -{ - RF_AUTHOR, - RF_TIME, - RF_DATE, - RF_ALL -}; - -enum SwPageNumSubType -{ - PG_RANDOM, - PG_NEXT, - PG_PREV -}; - -enum SwExtUserSubType -{ - EU_COMPANY, - EU_FIRSTNAME, - EU_NAME, - EU_SHORTCUT, - EU_STREET, - EU_COUNTRY, - EU_ZIP, - EU_CITY, - EU_TITLE, - EU_POSITION, - EU_PHONE_PRIVATE, - EU_PHONE_COMPANY, - EU_FAX, - EU_EMAIL, - EU_STATE, - EU_FATHERSNAME, - EU_APARTMENT -}; - -enum SwJumpEditFormat -{ - JE_FMT_TEXT, - JE_FMT_TABLE, - JE_FMT_FRAME, - JE_FMT_GRAPHIC, - JE_FMT_OLE -}; - -/*-------------------------------------------------------------------- - Page number. - --------------------------------------------------------------------*/ - -class SwPageNumberFieldType : public SwFieldType -{ - sal_Int16 nNumberingType; - sal_uInt16 nNum, nMax; - sal_Bool bVirtuell; - -public: - SwPageNumberFieldType(); - - String& Expand( sal_uInt32 nFmt, short nOff, const String&, String& rRet ) const; - void ChangeExpansion( SwDoc* pDoc, sal_uInt16 nNum, sal_uInt16 nMax, - sal_Bool bVirtPageNum, const sal_Int16* pNumFmt = 0 ); - virtual SwFieldType* Copy() const; -}; - -/*-------------------------------------------------------------------- - Page numbering. - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwPageNumberField : public SwField -{ - String sUserStr; - sal_uInt16 nSubType; - short nOffset; - -public: - SwPageNumberField(SwPageNumberFieldType*, sal_uInt16 nSub = PG_RANDOM, - sal_uInt32 nFmt = 0, short nOff = 0); - - virtual String Expand() const; - virtual SwField* Copy() const; - - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - - virtual sal_uInt16 GetSubType() const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); - - const String& GetUserString() const { return sUserStr; } - void SetUserString( const String& rS ) { sUserStr = rS; } -}; - -/*-------------------------------------------------------------------- - Authors. - --------------------------------------------------------------------*/ - -class SwAuthorFieldType : public SwFieldType -{ -public: - SwAuthorFieldType(); - - String Expand(sal_uLong) const; - virtual SwFieldType* Copy() const; -}; - -/*-------------------------------------------------------------------- - Author field. - --------------------------------------------------------------------*/ - -class SwAuthorField : public SwField -{ - String aContent; - -public: - SwAuthorField(SwAuthorFieldType*, sal_uInt32 nFmt = 0); - - virtual String Expand() const; - virtual SwField* Copy() const; - - inline void SetExpansion(const String& rStr) { aContent = rStr; } - inline const String& GetContent() const { return aContent; } - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - Filename - --------------------------------------------------------------------*/ - -class SwFileNameFieldType : public SwFieldType -{ - SwDoc *pDoc; -public: - SwFileNameFieldType(SwDoc*); - - String Expand(sal_uLong) const; - virtual SwFieldType* Copy() const; -}; - -/*-------------------------------------------------------------------- - FileNameField - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwFileNameField : public SwField -{ - String aContent; - -public: - SwFileNameField(SwFileNameFieldType*, sal_uInt32 nFmt = 0); - - virtual String Expand() const; - virtual SwField* Copy() const; - - inline void SetExpansion(const String& rStr) { aContent = rStr; } - inline const String& GetContent() const { return aContent; } - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - TemplName - --------------------------------------------------------------------*/ - -class SwTemplNameFieldType : public SwFieldType -{ - SwDoc *pDoc; -public: - SwTemplNameFieldType(SwDoc*); - - String Expand(sal_uLong) const; - virtual SwFieldType* Copy() const; -}; - -/*-------------------------------------------------------------------- - TemplNameField - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwTemplNameField : public SwField -{ -public: - SwTemplNameField(SwTemplNameFieldType*, sal_uInt32 nFmt = 0); - - virtual String Expand() const; - virtual SwField* Copy() const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - - -/*-------------------------------------------------------------------- - Document statistics - --------------------------------------------------------------------*/ - -class SwDocStatFieldType : public SwFieldType -{ - SwDoc* pDoc; - sal_Int16 nNumberingType;//com::sun::star::style::NumberingType - -public: - SwDocStatFieldType(SwDoc*); - String Expand(sal_uInt16 nSubType, sal_uInt32 nFmt) const; - virtual SwFieldType* Copy() const; - - inline void SetNumFormat( sal_Int16 eFmt ) { nNumberingType = eFmt; } -}; - -/*-------------------------------------------------------------------- - DocStatField - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwDocStatField : public SwField -{ - sal_uInt16 nSubType; - -public: - SwDocStatField( SwDocStatFieldType*, - sal_uInt16 nSubType = 0, sal_uInt32 nFmt = 0); - - void ChangeExpansion( const SwFrm* pFrm ); - - virtual String Expand() const; - virtual SwField* Copy() const; - - virtual sal_uInt16 GetSubType() const; - virtual void SetSubType(sal_uInt16 nSub); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - Hidden text. - --------------------------------------------------------------------*/ - -class SwHiddenTxtFieldType : public SwFieldType -{ - sal_Bool bHidden; -public: - SwHiddenTxtFieldType(sal_Bool bSetHidden = sal_True); - - virtual SwFieldType* Copy() const; - - void SetHiddenFlag( sal_Bool bSetHidden = sal_True ); - inline sal_Bool GetHiddenFlag() const { return bHidden; } -}; - -/*-------------------------------------------------------------------- - HiddenTxtField - --------------------------------------------------------------------*/ - -class SwHiddenTxtField : public SwField -{ - String aTRUETxt; // Text if condition sal_True. - String aFALSETxt; // If condition false. - String aContent; // Evaluated DB-text. - - String aCond; // Condition. - sal_uInt16 nSubType; - - sal_Bool bCanToggle : 1; // Can field be toggled alone? - sal_Bool bIsHidden : 1; // Is it not visible? - sal_Bool bValid : 1; // Is DB-field evaluated? - - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - SwHiddenTxtField( SwHiddenTxtFieldType*, - sal_Bool bConditional, - const String& rCond, - const String& rTxt, - sal_Bool bHidden = sal_False, - sal_uInt16 nSubType = TYP_HIDDENTXTFLD); - - SwHiddenTxtField( SwHiddenTxtFieldType*, - const String& rCond, - const String& rTrue, - const String& rFalse, - sal_uInt16 nSubType = TYP_HIDDENTXTFLD); - - virtual String GetFieldName() const; - - void Evaluate(SwDoc*); - - inline void SetValue(sal_Bool bHidden) { bIsHidden = bHidden; } - String GetColumnName(const String& rName); - String GetDBName(const String& rName, SwDoc *pDoc); - - // Condition - virtual void SetPar1(const String& rStr); - virtual const String& GetPar1() const; - - // True/False - String - virtual void SetPar2(const String& rStr); - virtual String GetPar2() const; - - - virtual sal_uInt16 GetSubType() const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - Field that expands to an empty line (without height). - --------------------------------------------------------------------*/ - -class SwHiddenParaFieldType : public SwFieldType -{ -public: - SwHiddenParaFieldType(); - - virtual SwFieldType* Copy() const; -}; - -/*-------------------------------------------------------------------- - Hidded paragraph. - --------------------------------------------------------------------*/ - -class SwHiddenParaField : public SwField -{ - String aCond; - sal_Bool bIsHidden:1; -public: - // Direct input, delete old value. - SwHiddenParaField(SwHiddenParaFieldType*, const String& rCond); - - virtual String Expand() const; - virtual SwField* Copy() const; - - void SetHidden(sal_Bool bHidden) { bIsHidden = bHidden; } - sal_Bool IsHidden() const { return bIsHidden; } - - //Query, set condition. - virtual const String& GetPar1() const; - virtual void SetPar1(const String& rStr); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - Run Macro. - --------------------------------------------------------------------*/ - -class SwMacroFieldType : public SwFieldType -{ - SwDoc* pDoc; - -public: - SwMacroFieldType(SwDoc*); - - virtual SwFieldType* Copy() const; -}; - -/*-------------------------------------------------------------------- - MacroField. - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwMacroField : public SwField -{ - String aMacro; - String aText; - sal_Bool bIsScriptURL; - - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - // Direct input, delete old value. - SwMacroField( SwMacroFieldType*, const String& rLibAndName, - const String& rTxt); - - inline const String& GetMacro() const { return aMacro; } - String GetLibName() const; - String GetMacroName() const; - SvxMacro GetSvxMacro() const; - - virtual String GetFieldName() const; - - // Library and FileName - virtual const String& GetPar1() const; - virtual void SetPar1(const String& rStr); - - // Macrotext - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); - - static void CreateMacroString( String& rMacro, - const String& rMacroName, - const String& rLibraryName ); - - static sal_Bool isScriptURL( const String& str ); -}; - - -/*-------------------------------------------------------------------- - PostIts - --------------------------------------------------------------------*/ - -class SwPostItFieldType : public SwFieldType -{ -private: - SwDoc* mpDoc; -public: - SwPostItFieldType(SwDoc* pDoc); - - virtual SwFieldType* Copy() const; - SwDoc* GetDoc() {return mpDoc;}; -}; - -/*-------------------------------------------------------------------- - PostItField - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwPostItField : public SwField -{ - String sTxt; - String sAuthor; - DateTime aDateTime; - OutlinerParaObject* mpText; - SwTextAPIObject* m_pTextObject; - -public: - SwPostItField( SwPostItFieldType*, - const String& rAuthor, const String& rTxt, const DateTime& rDate); - ~SwPostItField(); - - virtual String Expand() const; - virtual SwField* Copy() const; - - inline const Date GetDate() const { return aDateTime.GetDate(); } - inline const Time GetTime() const { return aDateTime.GetTime(); } - - // Author - virtual const String& GetPar1() const; - virtual void SetPar1(const String& rStr); - - // Text - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - const String& GetTxt() const { return sTxt; } - - const OutlinerParaObject* GetTextObject() const; - void SetTextObject( OutlinerParaObject* pText ); - - sal_uInt32 GetNumberOfParagraphs() const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); - virtual String GetDescription() const; -}; - -/*-------------------------------------------------------------------- - DocumentInfo - --------------------------------------------------------------------*/ - -class SwDocInfoFieldType : public SwValueFieldType -{ -public: - SwDocInfoFieldType(SwDoc* pDc); - - String Expand(sal_uInt16 nSubType, sal_uInt32 nFormat, sal_uInt16 nLang, const String& rName) const; - virtual SwFieldType* Copy() const; -}; - -class SW_DLLPUBLIC SwDocInfoField : public SwValueField -{ - sal_uInt16 nSubType; - String aContent; - String aName; - - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, sal_uInt32 nFmt=0); - SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0); - - virtual void SetSubType(sal_uInt16); - virtual sal_uInt16 GetSubType() const; - virtual void SetLanguage(sal_uInt16 nLng); - virtual String GetFieldName() const; - String GetName() const { return aName; } - void SetName( const String& rName ) { aName = rName; } - inline void SetExpansion(const String& rStr) { aContent = rStr; } - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - Extended User settings. - --------------------------------------------------------------------*/ - - -class SwExtUserFieldType : public SwFieldType -{ - String aData; -public: - SwExtUserFieldType(); - - inline void SetData(const String& rStr) { aData = rStr; } - - String Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) const; - virtual SwFieldType* Copy() const; -}; - -class SwExtUserField : public SwField -{ - String aContent; - sal_uInt16 nType; - -public: - SwExtUserField(SwExtUserFieldType*, sal_uInt16 nSub, sal_uInt32 nFmt=0); - - virtual String Expand() const; - virtual SwField* Copy() const; - - virtual sal_uInt16 GetSubType() const; - virtual void SetSubType(sal_uInt16 nSub); - - inline void SetExpansion(const String& rStr) { aContent = rStr; } - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - - -/*-------------------------------------------------------------------- - Relative page numbers - field. - --------------------------------------------------------------------*/ - -class SwRefPageSetFieldType : public SwFieldType -{ -public: - SwRefPageSetFieldType(); - - virtual SwFieldType* Copy() const; - -protected: - // Overlay, because there is nothing to update! - virtual void Modify( const SfxPoolItem*, const SfxPoolItem * ); -}; - -/*-------------------------------------------------------------------- - Relative page numbering. - --------------------------------------------------------------------*/ - -class SwRefPageSetField : public SwField -{ - short nOffset; - sal_Bool bOn; - -public: - SwRefPageSetField( SwRefPageSetFieldType*, short nOff = 0, - sal_Bool bOn = sal_True ); - - virtual String Expand() const; - virtual SwField* Copy() const; - - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - - sal_Bool IsOn() const { return bOn; } - - short GetOffset() const { return nOffset; } - void SetOffset( short nOff ) { nOffset = nOff; } - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - Relative page numbers - query field. - --------------------------------------------------------------------*/ - -class SwRefPageGetFieldType : public SwFieldType -{ - SwDoc* pDoc; - sal_Int16 nNumberingType; - - void UpdateField( SwTxtFld* pTxtFld, _SetGetExpFlds& rSetList ); -protected: - // ueberlagert, um alle RefPageGet-Felder zu updaten - virtual void Modify( const SfxPoolItem*, const SfxPoolItem * ); -public: - SwRefPageGetFieldType( SwDoc* pDoc ); - virtual SwFieldType* Copy() const; - sal_uInt16 MakeSetList( _SetGetExpFlds& rTmpLst ); - SwDoc* GetDoc() const { return pDoc; } -}; - -/*-------------------------------------------------------------------- - Query relative page numbering. - --------------------------------------------------------------------*/ - -class SwRefPageGetField : public SwField -{ - String sTxt; -public: - SwRefPageGetField( SwRefPageGetFieldType*, sal_uInt32 nFmt ); - - virtual String Expand() const; - virtual SwField* Copy() const; - - void SetText( const String& rTxt ) { sTxt = rTxt; } - - void ChangeExpansion( const SwFrm* pFrm, const SwTxtFld* pFld ); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - Field to jump to and edit. - --------------------------------------------------------------------*/ - -class SwJumpEditFieldType : public SwFieldType -{ - SwDoc* pDoc; - SwDepend aDep; - -public: - SwJumpEditFieldType( SwDoc* pDoc ); - virtual SwFieldType* Copy() const; - - SwCharFmt* GetCharFmt(); -}; - -class SwJumpEditField : public SwField -{ - String sTxt, sHelp; -public: - SwJumpEditField( SwJumpEditFieldType*, sal_uInt32 nFormat, - const String& sText, const String& sHelp ); - - virtual String Expand() const; - virtual SwField* Copy() const; - - // Placeholder-Text - virtual const String& GetPar1() const; - virtual void SetPar1(const String& rStr); - - // Hint-Text - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - - SwCharFmt* GetCharFmt() const - { return ((SwJumpEditFieldType*)GetTyp())->GetCharFmt(); } - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - Script Fieldtype. - --------------------------------------------------------------------*/ - -class SwScriptFieldType : public SwFieldType -{ - SwDoc* pDoc; -public: - SwScriptFieldType( SwDoc* pDoc ); - - virtual SwFieldType* Copy() const; -}; - -/*-------------------------------------------------------------------- - ScriptField. - --------------------------------------------------------------------*/ - -class SwScriptField : public SwField -{ - String sType; // Type of Code (Java/VBScript/...) - String sCode; // Code as text. - // Code as JavaCode ? - - sal_Bool bCodeURL; // Code contains URL of a script. - -public: - SwScriptField( SwScriptFieldType*, const String& rType, - const String& rCode, sal_Bool bURL=sal_False ); - - virtual String GetDescription() const; - - virtual String Expand() const; - virtual SwField* Copy() const; - - // Type - virtual const String& GetPar1() const; - virtual void SetPar1(const String& rStr); - // Text - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - - sal_Bool IsCodeURL() const { return bCodeURL; } - void SetCodeURL( sal_Bool bURL ) { bCodeURL = bURL; } - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - Combined Character Fieldtype - --------------------------------------------------------------------*/ - -class SwCombinedCharFieldType : public SwFieldType -{ -public: - SwCombinedCharFieldType(); - - virtual SwFieldType* Copy() const; -}; - -/*-------------------------------------------------------------------- - ScriptField - --------------------------------------------------------------------*/ - -#define MAX_COMBINED_CHARACTERS 6 - -class SW_DLLPUBLIC SwCombinedCharField : public SwField -{ - String sCharacters; // combine these characters - -public: - SwCombinedCharField( SwCombinedCharFieldType*, const String& rChars ); - - virtual String Expand() const; - virtual SwField* Copy() const; - - // Characters - virtual const String& GetPar1() const; - virtual void SetPar1(const String& rStr); - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - - -#endif // SW_DOCUFLD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx deleted file mode 100644 index 670f98639e..0000000000 --- a/sw/inc/dpage.hxx +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _DPAGE_HXX -#define _DPAGE_HXX - -#include <svx/fmpage.hxx> -#include <svx/svdobj.hxx> - -class SdrPageGridFrameList; -class SwDrawDocument; -class SwDoc; - -class SwDPage : public FmFormPage, public SdrObjUserCall -{ - SdrPageGridFrameList* pGridLst; - SwDoc& rDoc; - -public: - SwDPage(SwDrawDocument& rNewModel, sal_Bool bMasterPage=sal_False); - ~SwDPage(); - - // #i3694# - // This GetOffset() method is not needed anymore, it even leads to errors. - // virtual Point GetOffset() const; - virtual SdrObject* ReplaceObject( SdrObject* pNewObj, sal_uLong nObjNum ); - - virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV, - const Rectangle *pRect) const; - - sal_Bool RequestHelp( Window* pWindow, SdrView* pView, const HelpEvent& rEvt ); - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage(); -}; - -#endif // _DPAGE_HXX - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/drawdoc.hxx b/sw/inc/drawdoc.hxx deleted file mode 100644 index e7f0c87462..0000000000 --- a/sw/inc/drawdoc.hxx +++ /dev/null @@ -1,65 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _DRAWDOC_HXX -#define _DRAWDOC_HXX - -#include <svx/fmmodel.hxx> - -class SwDoc; -class SwDocShell; - -//================================================================== - -class SwDrawDocument : public FmFormModel -{ - SwDoc* pDoc; -public: - SwDrawDocument( SwDoc* pDoc ); - ~SwDrawDocument(); - - const SwDoc& GetDoc() const { return *pDoc; } - SwDoc& GetDoc() { return *pDoc; } - - virtual SdrPage* AllocPage(bool bMasterPage); - - - // For "load on demand" of graphics in DrawingLayer. - virtual SvStream* GetDocumentStream( SdrDocumentStreamInfo& rInfo ) const; - - // For saving of rectangles as control-replacement for versions < 5.0. - virtual SdrLayerID GetControlExportLayerId( const SdrObject & ) const; - -protected: - // overload of <SdrModel::createUnoModel()> is needed to provide corresponding uno model. - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel(); -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/edglbldc.hxx b/sw/inc/edglbldc.hxx deleted file mode 100644 index 2454392e83..0000000000 --- a/sw/inc/edglbldc.hxx +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _EDGLBLDC_HXX -#define _EDGLBLDC_HXX - -#include <svl/svarray.hxx> - -class SwSection; -class SwTOXBase; -class SwTOXBaseSection; - -enum GlobalDocContentType { - GLBLDOC_UNKNOWN, - GLBLDOC_TOXBASE, - GLBLDOC_SECTION -}; - -class SwGlblDocContent -{ - GlobalDocContentType eType; - sal_uLong nDocPos; - union { - const SwTOXBase* pTOX; - const SwSection* pSect; - } PTR; - -public: - SwGlblDocContent( sal_uLong nPos ); - SwGlblDocContent( const SwTOXBaseSection* pTOX ); - SwGlblDocContent( const SwSection* pSect ); - - // Query contents. - GlobalDocContentType GetType() const { return eType; } - const SwSection* GetSection() const - { return GLBLDOC_SECTION == eType ? PTR.pSect : 0; } - const SwTOXBase* GetTOX() const - { return GLBLDOC_TOXBASE == eType ? PTR.pTOX : 0; } - sal_uLong GetDocPos() const { return nDocPos; } - - // For sorting. - inline int operator==( const SwGlblDocContent& rCmp ) const - { return GetDocPos() == rCmp.GetDocPos(); } - inline int operator<( const SwGlblDocContent& rCmp ) const - { return GetDocPos() < rCmp.GetDocPos(); } -}; - - -typedef SwGlblDocContent* SwGlblDocContentPtr; -SV_DECL_PTRARR_SORT_DEL( SwGlblDocContents, SwGlblDocContentPtr, 10, 10 ) - - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/edimp.hxx b/sw/inc/edimp.hxx deleted file mode 100644 index 15a205287f..0000000000 --- a/sw/inc/edimp.hxx +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _EDIMP_HXX -#define _EDIMP_HXX - -#include <tools/solar.h> -#include <svl/svarray.hxx> - -class SwPaM; -class SwNodeIndex; - -// Macros to iterate over all ranges. -#define PCURCRSR (_pStartCrsr) - -#define FOREACHPAM_START(pCURSH) \ - {\ - SwPaM *_pStartCrsr = (pCURSH)->GetCrsr(), *__pStartCrsr = _pStartCrsr; \ - do { - -#define FOREACHPAM_END() \ - } while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != __pStartCrsr ); \ - } - - - -struct SwPamRange -{ - sal_uLong nStart, nEnd; - - SwPamRange() : nStart( 0 ), nEnd( 0 ) {} - SwPamRange( sal_uLong nS, sal_uLong nE ) : nStart( nS ), nEnd( nE ) {} - - sal_Bool operator==( const SwPamRange& rRg ) - { return nStart == rRg.nStart ? sal_True : sal_False; } - sal_Bool operator<( const SwPamRange& rRg ) - { return nStart < rRg.nStart ? sal_True : sal_False; } -}; - -SV_DECL_VARARR_SORT( _SwPamRanges, SwPamRange, 0, 1 ) - -class SwPamRanges : private _SwPamRanges -{ -public: - SwPamRanges( const SwPaM& rRing ); - - void Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 ); - SwPaM& SetPam( sal_uInt16 nArrPos, SwPaM& rPam ); - - sal_uInt16 Count() const - { return _SwPamRanges::Count(); } - SwPamRange operator[]( sal_uInt16 nPos ) const - { return _SwPamRanges::operator[](nPos); } -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx deleted file mode 100644 index cb62642e85..0000000000 --- a/sw/inc/editsh.hxx +++ /dev/null @@ -1,948 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _EDITSH_HXX -#define _EDITSH_HXX - -#include <com/sun/star/text/HoriOrientation.hpp> -#include <com/sun/star/embed/XEmbeddedObject.hpp> -#include <tools/string.hxx> -#include <svl/svarray.hxx> -#include <vcl/font.hxx> -#include <editeng/swafopt.hxx> -#include "swdllapi.h" -#include <crsrsh.hxx> // For base class. -#include <itabenum.hxx> -#include <swdbdata.hxx> -#include <com/sun/star/linguistic2/XSpellAlternatives.hpp> -#include <com/sun/star/linguistic2/ProofreadingResult.hpp> -#include <fldupde.hxx> -#include <tblenum.hxx> -#include <IMark.hxx> - -#include <vector> -#include <set> -#include <swundo.hxx> -#include <svtools/embedhlp.hxx> - -class PolyPolygon; -class SwDoc; -class DateTime; -class CommandExtTextInputData; - -class SvNumberFormatter; -class SfxPoolItem; -class SfxItemSet; -class SvxAutoCorrect; - -class SwField; -class SwFieldType; -class SwDDEFieldType; -class SwNewDBMgr; - -struct SwDocStat; -class SvStringsDtor; -class SvStringsSort; -class SwAutoCompleteWord; - -class SwFmtRefMark; - -class SwNumRule; - -class SwTxtFmtColl; -class SwGrfNode; -class SwFlyFrmFmt; - -class SwFrmFmt; // For GetTxtNodeFmts(). -class SwCharFmt; -class SwExtTextInput; -class SwRootFrm; // For CTOR. -class Graphic; -class GraphicObject; -class SwFmtINetFmt; // InsertURL. -class SwTable; -class SwTextBlocks; // For GlossaryRW. -class SwFmtFtn; -class SwSection; -class SwSectionData; -class SwSectionFmt; -class SwTOXMarks; -class SwTOXBase; -class SwTOXType; -class SwTableAutoFmt; -class SwPageDesc; -class SwTxtINetFmt; -class SwSeqFldList; -class SwGlblDocContent; -class SwGlblDocContents; -class SwRedline; -class SwRedlineData; -class SwFtnInfo; -class SwEndNoteInfo; -class SwLineNumberInfo; -class SwAuthEntry; -class SwRewriter; -struct SwConversionArgs; - - -namespace com { namespace sun { namespace star { namespace uno { - template < class > class Sequence; -}}}} - -namespace svx{ -struct SpellPortion; -typedef std::vector<SpellPortion> SpellPortions; -} - -namespace sfx2{ -class LinkManager; -} - -namespace sw { - class UndoRedoContext; -} - -#define GETSELTXT_PARABRK_TO_BLANK 0 -#define GETSELTXT_PARABRK_KEEP 1 -#define GETSELTXT_PARABRK_TO_ONLYCR 2 - - -// For querying the INet-attributes for Navigator. -struct SwGetINetAttr -{ - String sText; - const SwTxtINetFmt& rINetAttr; - - SwGetINetAttr( const String& rTxt, const SwTxtINetFmt& rAttr ) - : sText( rTxt ), rINetAttr( rAttr ) - {} -}; -SV_DECL_PTRARR_DEL( SwGetINetAttrs, SwGetINetAttr*, 0, 5 ) - -// Types of forms of content. -#define CNT_TXT 0x0001 -#define CNT_GRF 0x0002 -#define CNT_OLE 0x0010 - -// Test USHORT for a defined form of content. -#define CNT_HasTxt(USH) ((USH)&CNT_TXT) -#define CNT_HasGrf(USH) ((USH)&CNT_GRF) -#define CNT_HasOLE(USH) ((USH)&CNT_OLE) - -class SW_DLLPUBLIC SwEditShell: public SwCrsrShell -{ - static SvxSwAutoFmtFlags* pAutoFmtFlags; - - // For the private methods DelRange and those of AutoCorrect. - friend class SwAutoFormat; - friend void _InitCore(); - friend void _FinitCore(); - // For the PamCorrAbs/-Rel methods. - friend class SwUndo; - - SW_DLLPRIVATE SfxPoolItem& _GetChrFmt( SfxPoolItem& ) const; - - // Returns pointer to a SwGrfNode - // that will be used by GetGraphic() and GetGraphicSize(). - SW_DLLPRIVATE SwGrfNode *_GetGrfNode() const ; - - SW_DLLPRIVATE void DeleteSel( SwPaM& rPam, sal_Bool* pUndo = 0 ); - - SW_DLLPRIVATE void _SetSectionAttr( SwSectionFmt& rSectFmt, const SfxItemSet& rSet ); - - using ViewShell::UpdateFlds; - using SwModify::GetInfo; - -public: - // Edit (all selected ranges). - void Insert( sal_Unicode, sal_Bool bOnlyCurrCrsr = sal_False ); - void Insert2( const String &, const bool bForceExpandHints = false ); - void Overwrite( const String & ); - - // Replace a selected range in a TextNode by given string. - // Meant for Search & Replace. - // bRegExpRplc - replace tabs (\\t) and insert found string (not \&). - // E.g.: Fnd: "zzz", Repl: "xx\t\\t..&..\&" - // --> "xx\t<Tab>..zzz..&" - sal_Bool Replace( const String& rNewStr, sal_Bool bRegExpRplc = sal_False ); - - // Delete content of all ranges. - // If whole nodes are selected, these nodes get deleted. - long Delete(); - - // Remove a complete paragraph. - sal_Bool DelFullPara(); - - // Change text to Upper/Lower/Hiragana/Katagana/... - void TransliterateText( sal_uInt32 nType ); - - // Count words in current selection. - void CountWords( SwDocStat& rStat ) const; - - // Delete non-visible content in the document. - // E.g. hidden ranges, hidden paragraphs. - sal_Bool RemoveInvisibleContent(); - - // Replace fields by text - mailmerge support. - sal_Bool ConvertFieldsToText(); - - // Set all numbering start points to a fixed value - mailmerge support. - void SetNumberingRestart(); - - // Embedds all local links (ranges/graphics). - sal_uInt16 GetLinkUpdMode(sal_Bool bDocSettings = sal_False) const; - void SetLinkUpdMode( sal_uInt16 nMode ); - - // Copy content of all ranges at current position of cursor to given Shell. - long Copy( SwEditShell* pDestShell = 0 ); - - // For copying via ClipBoard: - // If table is copied into table, move all cursors away from it. - // Copy and Paste must be in FEShell because of FlyFrames! - // Copy all selections and the document. - sal_Bool _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 ); - - long SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True ); - sal_Bool AppendTxtNode(); - void AutoFmtBySplitNode(); - - // If cursor is in a INetAttribute it will be deleted completely - // including the descriptive text (needed at drag & drop). - sal_Bool DelINetAttrWithText(); - - // If Cursor is at the end of a character style in which the DontExpand-flag - // is not yet set, the latter will be set (==> return TRUE). - sal_Bool DontExpandFmt(); - - // Apply / remove attributes. - // Returns attributs in required AttributeSet. - // When not unambiguous the set has a DONT_CARE !! - // 2nd optional parameter <bMergeIndentValuesOfNumRule>. - // If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of - // the corresponding list level of an applied list style is merged into - // the requested item set as a LR-SPACE item, if corresponding node has not - // its own indent attributes and the position-and-space mode of the list - // level is SvxNumberFormat::LABEL_ALIGNMENT. - sal_Bool GetCurAttr( SfxItemSet& , - const bool bMergeIndentValuesOfNumRule = false ) const; - void SetAttr( const SfxPoolItem&, sal_uInt16 nFlags = 0 ); - void SetAttr( const SfxItemSet&, sal_uInt16 nFlags = 0 ); - - // Set attribute as new default attribute in document. - void SetDefault( const SfxPoolItem& ); - - // Query default attribute of document. - const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const; - - void ResetAttr( const std::set<sal_uInt16> &attrs = std::set<sal_uInt16>() ); - void GCAttr(); - - // Returns the scripttpye of the selection. - sal_uInt16 GetScriptType() const; - - // Returns the language at current cursor position. - sal_uInt16 GetCurLang() const; - - // TABLE - sal_uInt16 GetTblFrmFmtCount( sal_Bool bUsed = sal_False ) const; - SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed = sal_False ) const; - String GetUniqueTblName() const; - - // CHAR - sal_uInt16 GetCharFmtCount() const; - SwCharFmt& GetCharFmt(sal_uInt16 nFmt) const; - SwCharFmt* GetCurCharFmt() const; - void FillByEx(SwCharFmt*, sal_Bool bReset = sal_False); - SwCharFmt* MakeCharFmt( const String& rName, SwCharFmt* pDerivedFrom = 0 ); - SwCharFmt* FindCharFmtByName( const String& rName ) const; - - - /* FormatCollections (new) - Explaining the general naming pattern: - * GetXXXCount() returns the count of xxx in the document. - * GetXXX(i) returns i-th xxx (ERR_RAISE if beyond range!). - * DelXXX(i) delets i-th xxx (ERR_RAISE if beyond range!). - * GetCurXXX() returns xxx that is valid at cursor or in ranges. - * returns 0, if not unanimuous. - * SetXXX() sets xxx at cursor or in ranges. - * MakeXXX() makes a xxx, derived from pDerivedFrom. - */ - - // TXT - SwTxtFmtColl& GetDfltTxtFmtColl() const; - sal_uInt16 GetTxtFmtCollCount() const; - SwTxtFmtColl& GetTxtFmtColl( sal_uInt16 nTxtFmtColl) const; - SwTxtFmtColl* GetCurTxtFmtColl() const; - - // #i62675# - // Add 2nd optional parameter <bResetListAttrs> - see also <SwDoc::SetTxtFmtColl(..)> - void SetTxtFmtColl( SwTxtFmtColl*, - bool bResetListAttrs = false ); - SwTxtFmtColl *MakeTxtFmtColl(const String &rFmtCollName, - SwTxtFmtColl *pDerivedFrom = 0); - void FillByEx(SwTxtFmtColl*, sal_Bool bReset = sal_False); - SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const; - - // Return "Auto-Collection" with given Id. If it does not exist create it. - SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId ); - - // Return required automatic format base class. - SwFmt* GetFmtFromPool( sal_uInt16 nId ); - - // Return required automatic page style. - SwPageDesc* GetPageDescFromPool( sal_uInt16 nId ); - - // Query if the paragraph-/character-/frame-/page-style is used. - sal_Bool IsUsed( const SwModify& ) const; - - // Return required automatic format. - SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId ) - { return (SwFrmFmt*)SwEditShell::GetFmtFromPool( nId ); } - SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId ) - { return (SwCharFmt*)SwEditShell::GetFmtFromPool( nId ); } - - void Insert2(SwField&, const bool bForceExpandHints = false); - SwField* GetCurFld() const; - - void UpdateFlds( SwField & ); // One single field. - - sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const; - SwFieldType* GetFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const; - SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName) const; - - void RemoveFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX); - void RemoveFldType(sal_uInt16 nResId, const String& rName); - - void FieldToText( SwFieldType* pType ); - - void ChangeAuthorityData(const SwAuthEntry* pNewData); - - // Database information. - SwDBData GetDBData() const; - const SwDBData& GetDBDesc() const; - void ChgDBData(const SwDBData& SwDBData); - void ChangeDBFields( const SvStringsDtor& rOldNames, - const String& rNewName ); - void GetAllUsedDB( SvStringsDtor& rDBNameList, - SvStringsDtor* pAllDBNames = 0 ); - - sal_Bool IsAnyDatabaseFieldInDoc()const; - - // Check whether DB fields point to an available data source and returns it. - sal_Bool IsFieldDataSourceAvailable(String& rUsedDataSource) const; - void UpdateExpFlds(sal_Bool bCloseDB = sal_False);// nur alle ExpressionFelder updaten - void SetFixFields( sal_Bool bOnlyTimeDate = sal_False, - const DateTime* pNewDateTime = 0 ); - void LockExpFlds(); - void UnlockExpFlds(); - - SwFldUpdateFlags GetFldUpdateFlags(sal_Bool bDocSettings = sal_False) const; - void SetFldUpdateFlags( SwFldUpdateFlags eFlags ); - - // For evaluation of DB fields (new DB-manager). - SwNewDBMgr* GetNewDBMgr() const; - - SwFieldType* InsertFldType(const SwFieldType &); - - // Changes in document? - sal_Bool IsModified() const; - void SetModified(); - void ResetModified(); - void SetUndoNoResetModified(); - - // Document - Statistics - void UpdateDocStat( SwDocStat& rStat ); - - void Insert(const SwTOXMark& rMark); - - void DeleteTOXMark(SwTOXMark* pMark); - - // Get all marks at current SPoint. - sal_uInt16 GetCurTOXMarks(SwTOXMarks& rMarks) const ; - - // Insert content table. Renew if required. - void InsertTableOf(const SwTOXBase& rTOX, - const SfxItemSet* pSet = 0); - sal_Bool UpdateTableOf(const SwTOXBase& rTOX, - const SfxItemSet* pSet = 0); - const SwTOXBase* GetCurTOX() const; - const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate = sal_False ); - void SetDefaultTOXBase(const SwTOXBase& rBase); - - sal_Bool IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const; - void SetTOXBaseReadonly(const SwTOXBase& rTOXBase, sal_Bool bReadonly); - - sal_uInt16 GetTOXCount() const; - const SwTOXBase* GetTOX( sal_uInt16 nPos ) const; - sal_Bool DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes = sal_False ); - - // After reading file update all content tables. - void SetUpdateTOX( sal_Bool bFlag = sal_True ); - sal_Bool IsUpdateTOX() const; - - // Manage types of content tables. - sal_uInt16 GetTOXTypeCount(TOXTypes eTyp) const; - const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const; - void InsertTOXType(const SwTOXType& rTyp); - - // AutoMark file - const String& GetTOIAutoMarkURL() const; - void SetTOIAutoMarkURL(const String& rSet); - void ApplyAutoMark(); - - // Key for managing index. - sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const; - - void SetOutlineNumRule(const SwNumRule&); - const SwNumRule* GetOutlineNumRule() const; - - sal_Bool OutlineUpDown( short nOffset = 1 ); - - sal_Bool MoveOutlinePara( short nOffset = 1); - - sal_Bool IsProtectedOutlinePara() const; - - // Returns numbering rulse pf current enumeration list (else FALSE). - const SwNumRule* GetCurNumRule() const; - - // If there is not already a numbering, set one, else change. - // Works with old and new rules. Update only differences. - // Add optional parameter <bResetIndentAttrs> (default value sal_False). - // If <bResetIndentAttrs> equals true, the indent attributes "before text" - // and "first line indent" are additionally reset at the current selection, - // if the list style makes use of the new list level attributes. - // introduce parameters <bCreateNewList> and <sContinuedListId> - // <bCreateNewList> indicates, if a new list is created by applying the - // given list style. - // If <bCreateNewList> equals sal_False, <sContinuedListId> may contain the - // list Id of a list, which has to be continued by applying the given list style. - void SetCurNumRule( const SwNumRule&, - const bool bCreateNewList /*= false*/, - const String sContinuedListId = String(), - const bool bResetIndentAttrs = false ); - - // Paragraphs without enumeration but with indents. - sal_Bool NoNum(); - - // Delete, split enumeration list. - void DelNumRules(); - - sal_Bool NumUpDown( sal_Bool bDown = sal_True ); - - sal_Bool MoveParagraph( long nOffset = 1); - sal_Bool MoveNumParas( sal_Bool bUpperLower, sal_Bool bUpperLeft ); - - // Switch on/off of numbering via Delete/Backspace. - sal_Bool NumOrNoNum( sal_Bool bDelete = sal_False, sal_Bool bChkStart = sal_True); - - // #i23726# - // #i90078# - // Remove unused default parameter <nLevel> and <bRelative>. - // Adjust method name and parameter name - void ChangeIndentOfAllListLevels( short nDiff ); - // Adjust method name - void SetIndent(short nIndent, const SwPosition & rPos); - sal_Bool IsFirstOfNumRule() const; - sal_Bool IsFirstOfNumRule(const SwPaM & rPaM) const; - - sal_Bool IsNoNum( sal_Bool bChkStart = sal_True ) const; - - // Return Num-Level of the node in which point of cursor is. - // Return values can be: NO_NUMBERING, - // 0..MAXLEVEL-1, NO_NUMLEVEL .. NO_NUMLEVEL|MAXLEVEL-1 - sal_uInt8 GetNumLevel() const; - - // Detect highest and lowest level to check moving of outline levels. - void GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower ); - - - // Get Outline level of current paragraph. - int GetCurrentParaOutlineLevel( ) const;// #outlinelevel add by zhaojianwei - - // i29560 - sal_Bool HasNumber() const; - sal_Bool HasBullet() const; - - String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const; - void ChgNumRuleFmts( const SwNumRule& rRule ); - - // Set (and query if) a numbering with StartFlag starts at current PointPos. - void SetNumRuleStart( sal_Bool bFlag = sal_True ); - sal_Bool IsNumRuleStart() const; - void SetNodeNumStart( sal_uInt16 nStt ); - - sal_uInt16 GetNodeNumStart() const; - - sal_Bool ReplaceNumRule( const String& rOldRule, const String& rNewRule ); - - // Searches for a text node with a numbering rule. - // in case a list style is found, <sListId> holds the list id, to which the - // text node belongs, which applies the found list style. - const SwNumRule * SearchNumRule(const bool bForward, - const bool bNum, - const bool bOutline, - int nNonEmptyAllowed, - String& sListId ); - - // Undo. - // Maintain UndoHistory in Document. - // Reset UndoHistory at Save, SaveAs, Create ??? - void DoUndo( sal_Bool bOn = sal_True ); - sal_Bool DoesUndo() const; - void DoGroupUndo( sal_Bool bUn = sal_True ); - sal_Bool DoesGroupUndo() const; - void DelAllUndoObj(); - - // Undo: set up Undo parenthesis, return nUndoId of this parenthesis. - SwUndoId StartUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 ); - - // Closes parenthesis of nUndoId, not used by UI. - SwUndoId EndUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 ); - - bool GetLastUndoInfo(::rtl::OUString *const o_pStr, - SwUndoId *const o_pId) const; - bool GetFirstRedoInfo(::rtl::OUString *const o_pStr) const; - SwUndoId GetRepeatInfo(::rtl::OUString *const o_pStr) const; - - /// is it forbidden to modify cursors via API calls? - bool CursorsLocked() const; - /// set selections to those contained in the UndoRedoContext - /// should only be called by sw::UndoManager! - void HandleUndoRedoContext(::sw::UndoRedoContext & rContext); - - bool Undo(sal_uInt16 const nCount = 1); - bool Redo(sal_uInt16 const nCount = 1); - bool Repeat(sal_uInt16 const nCount); - - - // For all views of this document. - void StartAllAction(); - void EndAllAction(); - - // To enable set up of StartActions and EndActions. - void CalcLayout(); - - // Determine form of content. Return Type at CurCrsr->SPoint. - sal_uInt16 GetCntType() const; - - // Are there frames, footnotes, etc. - sal_Bool HasOtherCnt() const; - - // Apply ViewOptions with Start-/EndAction. - virtual void ApplyViewOptions( const SwViewOption &rOpt ); - - // Query text within selection. - // Returns FALSE, if selected range is too large to be copied - // into string buffer or if other errors occur. - sal_Bool GetSelectedText( String &rBuf, - int nHndlParaBreak = GETSELTXT_PARABRK_TO_BLANK ); - - // Returns graphic, if CurCrsr->Point() points to a SwGrfNode - // (and mark is not set or points to the same graphic). - - const Graphic* GetGraphic( sal_Bool bWait = sal_True ) const; - const GraphicObject* GetGraphicObj() const; - - sal_Bool IsGrfSwapOut( sal_Bool bOnlyLinked = sal_False ) const; - sal_uInt16 GetGraphicType() const; - - const PolyPolygon *GetGraphicPolygon() const; - void SetGraphicPolygon( const PolyPolygon *pPoly ); - - // If there's an automatic, not manipulated polygon at the selected - // notxtnode, it has to be deleted, e.g. cause the object has changed. - void ClearAutomaticContour(); - - // Returns the size of a graphic in Twips if cursor is in a graphic. - sal_Bool GetGrfSize(Size&) const; - - // Returns name and filter of a graphic if the cursor is in a graphic, - // else give a rap on the knuckles! - // If a string-ptr != 0 return the respective name. - void GetGrfNms( String* pGrfName, String* pFltName, - const SwFlyFrmFmt* = 0 ) const; - - // Re-read if graphic is not ok. Current graphic is replaced by the new one. - void ReRead( const String& rGrfName, const String& rFltName, - const Graphic* pGraphic = 0, - const GraphicObject* pGrafObj = 0 ); - - // Unique identification of object (for ImageMapDlg). - void *GetIMapInventor() const; - - // #i73788# - // Remove default parameter, because method always called this default value. - Graphic GetIMapGraphic() const; // Returns a graphic for all Flys! - const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_uInt8 nNdTyp = 0 ) const; - - // Returns a ClientObject, if CurCrsr->Point() points to a SwOLENode - // (and mark is neither set not pointint to same ClientObject) - // else give rap on the knuckles. - svt::EmbeddedObjectRef& GetOLEObject() const; - - // Is there an OLEObject with this name (SwFmt)? - sal_Bool HasOLEObj( const String &rName ) const; - - // Returns pointer to the data of the chart in which Cursr is. - void SetChartName( const String &rName ); - - // Update content of all charts for table with given name. - void UpdateCharts( const String &rName ); - - String GetCurWord(); - - // Glossary from glossary document in current document. - // Styles only if not already existent. - void InsertGlossary( SwTextBlocks& rGlossary, const String& ); - - // Make current selection glossary and insert into glossary document - // including styles. - sal_uInt16 MakeGlossary( SwTextBlocks& rToFill, const String& rName, - const String& rShortName, sal_Bool bSaveRelFile = sal_False, - const String* pOnlyTxt=0 ); - - // Save complete content of doc as glossary. - sal_uInt16 SaveGlossaryDoc( SwTextBlocks& rGlossary, const String& rName, - const String& rShortName, - sal_Bool bSaveRelFile = sal_False, - sal_Bool bOnlyTxt = sal_False ); - - // Linguistics... - // Save selections. - void HyphStart( SwDocPositions eStart, SwDocPositions eEnde ); - - // restore selections. - void HyphEnd(); - com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> - HyphContinue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ); - - void HyphIgnore(); - - // For Inserting SoftHyphen. Position is offset within the syllabificated word. - void InsertSoftHyph( const xub_StrLen nHyphPos ); - - const SwTable& InsertTable( const SwInsertTableOptions& rInsTblOpts, // ALL_TBL_INS_ATTR - sal_uInt16 nRows, sal_uInt16 nCols, - sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL, - const SwTableAutoFmt* pTAFmt = 0 ); - - void InsertDDETable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER - SwDDEFieldType* pDDEType, - sal_uInt16 nRows, sal_uInt16 nCols, - sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL ); - - void UpdateTable(); - void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName ); - - SwFrmFmt *GetTableFmt(); - sal_Bool TextToTable( const SwInsertTableOptions& rInsTblOpts, //ALL_TBL_INS_ATTR - sal_Unicode cCh, - sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL, - const SwTableAutoFmt* pTAFmt = 0 ); - sal_Bool TableToText( sal_Unicode cCh ); - sal_Bool IsTextToTableAvailable() const; - - sal_Bool GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const; - void SetTblBoxFormulaAttrs( const SfxItemSet& rSet ); - - sal_Bool IsTableBoxTextFormat() const; - String GetTableBoxText() const; - - TblChgMode GetTblChgMode() const; - void SetTblChgMode( TblChgMode eMode ); - - // Split table at cursor position. - sal_Bool SplitTable( sal_uInt16 eMode ); - - // Merge tables. - - // Can Merge checks if Prev or Next are possible. - // If pointer pChkNxtPrv is passed possible direction is given. - sal_Bool CanMergeTable( sal_Bool bWithPrev = sal_True, sal_Bool* pChkNxtPrv = 0 ) const; - sal_Bool MergeTable( sal_Bool bWithPrev = sal_True, sal_uInt16 nMode = 0 ); - - // Set up InsertDB as table Undo. - void AppendUndoForInsertFromDB( sal_Bool bIsTable ); - - // Functions used for spell checking and text conversion. - - // Save selections. - void SpellStart( SwDocPositions eStart, SwDocPositions eEnde, - SwDocPositions eCurr, SwConversionArgs *pConvArgs = 0 ); - - // Restore selections. - void SpellEnd( SwConversionArgs *pConvArgs = 0, bool bRestoreSelection = true ); - ::com::sun::star::uno::Any SpellContinue( - sal_uInt16* pPageCnt, sal_uInt16* pPageSt, - SwConversionArgs *pConvArgs = 0 ); - - // Spells on a sentence basis - the SpellPortions are needed - // returns false if no error could be found. - bool SpellSentence(::svx::SpellPortions& rToFill, bool bIsGrammarCheck ); - - // Make SpellIter start with the current sentence when called next time. - void PutSpellingToSentenceStart(); - - // Moves the continuation position to the end of the currently checked sentence. - void MoveContinuationPosToEndOfCheckedSentence(); - - // Applies a changed sentence. - void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck); - - // Check SwSpellIter data to see if the last sentence got grammar checked. - bool HasLastSentenceGotGrammarChecked() const; - - // Is text conversion active somewhere else? - sal_Bool HasConvIter() const; - - // Is hyphenation active somewhere else? - sal_Bool HasHyphIter() const; - - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XSpellAlternatives > - GetCorrection( const Point* pPt, SwRect& rSelectRect ); - - - bool GetGrammarCorrection( ::com::sun::star::linguistic2::ProofreadingResult /*out*/ &rResult, - sal_Int32 /*out*/ &rErrorPosInText, - sal_Int32 /*out*/ &rErrorIndexInResult, - ::com::sun::star::uno::Sequence< rtl::OUString > /*out*/ &rSuggestions, - const Point* pPt, SwRect& rSelectRect ); - - void IgnoreGrammarErrorAt( SwPaM& rErrorPosition ); - void SetLinguRange( SwDocPositions eStart, SwDocPositions eEnde ); - - // Return reference set in document according to given name. - const SwFmtRefMark* GetRefMark( const String& rName ) const; - - // Return names of all references set in document. - // If ArrayPointer == 0 then return only whether a RefMark is set in document. - sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const; - - // Call AutoCorrect - void AutoCorrect( SvxAutoCorrect& rACorr, sal_Bool bInsertMode = sal_True, - sal_Unicode cChar = ' ' ); - sal_Bool GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, String& rWord ); - - // Set our styles according to the respective rules. - void AutoFormat( const SvxSwAutoFmtFlags* pAFlags = 0 ); - - static SvxSwAutoFmtFlags* GetAutoFmtFlags(); - static void SetAutoFmtFlags(SvxSwAutoFmtFlags *); - - // Calculates selection. - String Calculate(); - - sal_Bool InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, - sal_Bool bKeepSelection = sal_False ); - sal_uInt16 GetINetAttrs( SwGetINetAttrs& rArr ); - - String GetDropTxt( const sal_uInt16 nChars ) const; - void ReplaceDropTxt( const String &rStr ); - - // May an outline be moved or copied? - // Check whether it's in text body, not in table, and not read-only (move). - sal_Bool IsOutlineMovable( sal_uInt16 nIdx ) const; - sal_Bool IsOutlineCopyable( sal_uInt16 nIdx ) const; - - sal_uInt16 GetLineCount( sal_Bool bActPos = sal_True ); - - // Query and set footnote-text/number. Set.. to current SSelection! - sal_Bool GetCurFtn( SwFmtFtn* pToFillFtn = 0 ); - bool SetCurFtn( const SwFmtFtn& rFillFtn ); - bool HasFtns( bool bEndNotes = false ) const; - - sal_uInt16 GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false ); - // Return list of all footnotes and their first portions of text. - - SwSection const* InsertSection( - SwSectionData & rNewData, SfxItemSet const*const = 0 ); - sal_Bool IsInsRegionAvailable() const; - const SwSection* GetCurrSection() const; - - // Returns current range like Cet CurrSection(). But this function iterates - // also over frames and catches the range even if the cursor is positioned in - // a footnote the reference of which is in a columned range. - // If bOutOfTab is set, the range comprising the table is searched - // and not an inner one. - const SwSection* GetAnySection( sal_Bool bOutOfTab = sal_False, const Point* pPt = 0 ) const; - - sal_uInt16 GetSectionFmtCount() const; - sal_uInt16 GetSectionFmtPos( const SwSectionFmt& ) const; - const SwSectionFmt& GetSectionFmt(sal_uInt16 nFmt) const; - void DelSectionFmt( sal_uInt16 nFmt ); - void UpdateSection(sal_uInt16 const nSect, SwSectionData &, - SfxItemSet const*const = 0); - sal_Bool IsAnySectionInDoc( sal_Bool bChkReadOnly = sal_False, - sal_Bool bChkHidden = sal_False, - sal_Bool BChkTOX = sal_False ) const; - - String GetUniqueSectionName( const String* pChkStr = 0 ) const; - - // Set attributes. - void SetSectionAttr(const SfxItemSet& rSet, SwSectionFmt* pSectFmt = 0); - - // Search inside the cursor selection for full selected sections. - // if any part of section in the selection return 0. - // if more than one in the selection return the count. - sal_uInt16 GetFullSelectedSectionCount() const; - - // Special insert: Insert a new text node just before or after a section or - // table, if the cursor is positioned at the start/end of said - // section/table. The purpose of the method is to allow users to inert text - // at certain 'impossible' position, e.g. before a table at the document - // start or between to sections. - bool DoSpecialInsert(); - bool CanSpecialInsert() const; - - // Optimizing UI. - void SetNewDoc(sal_Bool bNew = sal_True); - - sfx2::LinkManager& GetLinkManager(); - inline const sfx2::LinkManager& GetLinkManager() const; - - // linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von - // Numerierungen), optional kann man "um" den Offset stufen oder "auf" - // die Position gestuft werden (bModulus = sal_True) - sal_Bool IsMoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True ) const; - void MoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True ); - - // Query NumberFormater from document. - SvNumberFormatter* GetNumberFormatter(); - const SvNumberFormatter* GetNumberFormatter() const - { return ((SwEditShell*)this)->GetNumberFormatter(); } - - // Interfaces for GlobalDocument. - sal_Bool IsGlobalDoc() const; - void SetGlblDocSaveLinks( sal_Bool bFlag = sal_True ); - sal_Bool IsGlblDocSaveLinks() const; - sal_uInt16 GetGlobalDocContent( SwGlblDocContents& rArr ) const; - sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos, - SwSectionData & rNew ); - sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos, - const SwTOXBase& rTOX ); - sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos ); - sal_Bool DeleteGlobalDocContent( const SwGlblDocContents& rArr, - sal_uInt16 nPos ); - sal_Bool MoveGlobalDocContent( const SwGlblDocContents& rArr , - sal_uInt16 nFromPos, sal_uInt16 nToPos, - sal_uInt16 nNewPos ); - sal_Bool GotoGlobalDocContent( const SwGlblDocContent& rPos ); - - // For Redlining. - sal_uInt16 GetRedlineMode() const; - void SetRedlineMode( sal_uInt16 eMode ); - sal_Bool IsRedlineOn() const; - sal_uInt16 GetRedlineCount() const; - const SwRedline& GetRedline( sal_uInt16 nPos ) const; - sal_Bool AcceptRedline( sal_uInt16 nPos ); - sal_Bool RejectRedline( sal_uInt16 nPos ); - - - // Search Redline for this Data and return position in array. - // If not found, return USHRT_MAX. - sal_uInt16 FindRedlineOfData( const SwRedlineData& ) const; - - - // Set comment to Redline at position. - sal_Bool SetRedlineComment( const String& rS ); - const SwRedline* GetCurrRedline() const; - - // Redline attributes have been changed. Updated views. - void UpdateRedlineAttr(); - - // Compare two documents. - long CompareDoc( const SwDoc& rDoc ); - - // Merge two documents. - long MergeDoc( const SwDoc& rDoc ); - - // Footnote attributes global to document. - const SwFtnInfo& GetFtnInfo() const; - void SetFtnInfo(const SwFtnInfo& rInfo); - const SwEndNoteInfo& GetEndNoteInfo() const; - void SetEndNoteInfo(const SwEndNoteInfo& rInfo); - - const SwLineNumberInfo &GetLineNumberInfo() const; - void SetLineNumberInfo( const SwLineNumberInfo& rInfo); - - // Labels: Synchronize ranges. - void SetLabelDoc( sal_Bool bFlag = sal_True ); - sal_Bool IsLabelDoc() const; - - // Interface for TextInputData - (for input of Japanese/Chinese chars.) - SwExtTextInput* CreateExtTextInput(LanguageType eInputLanguage); - String DeleteExtTextInput( SwExtTextInput* pDel = 0, sal_Bool bInsText = sal_True); - void SetExtTextInputData( const CommandExtTextInputData& ); - - // Interface for access to AutoComplete-list. - static SwAutoCompleteWord& GetAutoCompleteWords(); - - // Returns a scaling factor of selected text. Used for the rotated - // character attribut dialog. - sal_uInt16 GetScalingOfSelectedText() const; - - // Ctor/Dtor. - SwEditShell( SwDoc&, Window*, const SwViewOption *pOpt = 0 ); - - // Copy-Constructor in disguise. - SwEditShell( SwEditShell&, Window* ); - virtual ~SwEditShell(); - -private: - // For METWARE: no copying and no assignment. - SwEditShell(const SwEditShell &); - const SwEditShell &operator=(const SwEditShell &); -}; - -inline const sfx2::LinkManager& SwEditShell::GetLinkManager() const -{ return ((SwEditShell*)this)->GetLinkManager(); } - -// Class for automated call of Start- and EndAction(). -class SwActKontext { - SwEditShell *pSh; -public: - SwActKontext(SwEditShell *pShell); - ~SwActKontext(); -}; - -#define ACT_KONTEXT(x) SwActKontext _aActKontext_(x) - -// Class for automated call of Start- and EndCrsrMove(). -class SwMvKontext { - SwEditShell *pSh; -public: - SwMvKontext(SwEditShell *pShell ); - ~SwMvKontext(); -}; - -#define MV_KONTEXT(x) SwMvKontext _aMvKontext_(x) - - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/envelp.hrc b/sw/inc/envelp.hrc deleted file mode 100644 index 4617a6c71c..0000000000 --- a/sw/inc/envelp.hrc +++ /dev/null @@ -1,92 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _ENVELP_HRC -#define _ENVELP_HRC - -#include "rcid.hrc" - -// Dialoge -------------------------------------------------------------------- - -#define DLG_ENV (RC_ENVELP_BEGIN ) -#define DLG_LAB (RC_ENVELP_BEGIN + 1) - -#define TP_ENV_ENV (RC_ENVELP_BEGIN + 2) -#define TP_ENV_FMT (RC_ENVELP_BEGIN + 3) -#define TP_ENV_PRT (RC_ENVELP_BEGIN + 4) - -#define TP_LAB_LAB (RC_ENVELP_BEGIN + 5) -#define TP_LAB_FMT (RC_ENVELP_BEGIN + 6) -#define TP_LAB_PRT (RC_ENVELP_BEGIN + 7) - -#define DLG_MAILMERGE (RC_ENVELP_BEGIN + 8) - -#define DLG_SYNC_BTN (RC_ENVELP_BEGIN + 9) -#define DLG_SAVE_LABEL (RC_ENVELP_BEGIN + 10) - -// Bereiche ------------------------------------------------------------------- - -#define RC_ENVLOP_BEGIN (RC_ENVELP_BEGIN ) -#define RC_ENVLOP_END (RC_ENVELP_BEGIN + 9) - -#define RC_ENVFMT_BEGIN (RC_ENVELP_BEGIN + 10) -#define RC_ENVFMT_END (RC_ENVELP_BEGIN + 19) - -#define RC_ENVPRT_BEGIN (RC_ENVELP_BEGIN + 20) -#define RC_ENVPRT_END (RC_ENVELP_BEGIN + 39) - -#define RC_LABEL_BEGIN (RC_ENVELP_BEGIN + 40) -#define RC_LABEL_END (RC_ENVELP_BEGIN + 49) - -#define RC_LABFMT_BEGIN (RC_ENVELP_BEGIN + 50) -#define RC_LABFMT_END (RC_ENVELP_BEGIN + 59) - -#define RC_LABPRT_BEGIN (RC_ENVELP_BEGIN + 60) -#define RC_LABPRT_END (RC_ENVELP_BEGIN + 69) - -// Strings -------------------------------------------------------------------- - -#define STR_DATABASE_NOT_OPENED (RC_ENVLOP_BEGIN + 60) -#define STR_NO_DRIVERS (RC_ENVLOP_BEGIN + 61) -#define DLG_MERGE_CREATE (RC_ENVLOP_BEGIN + 62) -#define DLG_MERGE_FIELD_CONNECTIONS (RC_ENVLOP_BEGIN + 63) - -#define STR_BTN_NEW_DOC (RC_ENVLOP_BEGIN + 64) -#define STR_BTN_NEWDOC (RC_ENVLOP_BEGIN + 65) -#define STR_SENDER_TOKENS (RC_ENVLOP_BEGIN + 66) - -// Ueberlaufpruefung ---------------------------------------------------------- - -#define ENVELP_ACT_END STR_SENDER_TOKENS - -#if ENVELP_ACT_END > STR_SENDER_TOKENS -#error Resource-Ueberlauf in #file, #line -#endif - -#endif - - diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx deleted file mode 100644 index edfbcdcb9c..0000000000 --- a/sw/inc/expfld.hxx +++ /dev/null @@ -1,411 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_EXPFLD_HXX -#define SW_EXPFLD_HXX - -#include <svl/svarray.hxx> -#include "swdllapi.h" -#include <fldbas.hxx> -#include <cellfml.hxx> - -class SfxPoolItem; -class SwTxtNode; -class SwFrm; -struct SwPosition; -class SwTxtFld; -class SwDoc; -class SwFmtFld; -class _SetGetExpFlds; -class SwEditShell; - -// Forward declaration: get "BodyTxtNode" for exp.fld in Fly's headers/footers/footnotes. -const SwTxtNode* GetBodyTxtNode( const SwDoc& pDoc, SwPosition& rPos, - const SwFrm& rFrm ); - -void ReplacePoint(String& sTmpName, sal_Bool bWithCommandType = sal_False); - -struct _SeqFldLstElem -{ - String sDlgEntry; - sal_uInt16 nSeqNo; - - _SeqFldLstElem( const String& rStr, sal_uInt16 nNo ) - : sDlgEntry( rStr ), nSeqNo( nNo ) - {} -}; -SV_DECL_PTRARR_DEL( _SwSeqFldList, _SeqFldLstElem*, 10, 10 ) - -class SW_DLLPUBLIC SwSeqFldList : public _SwSeqFldList -{ -public: - SwSeqFldList() : _SwSeqFldList( 10, 10 ) {} - - sal_Bool InsertSort( _SeqFldLstElem* ); - sal_Bool SeekEntry( const _SeqFldLstElem& , sal_uInt16* pPos = 0 ); -}; - -class SwGetExpFieldType : public SwValueFieldType -{ -public: - SwGetExpFieldType(SwDoc* pDoc); - virtual SwFieldType* Copy() const; - - // Overlay, because get-field cannot be changed and therefore - // does not need to be updated. Update at changing of set-values! -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ); -}; - -class SW_DLLPUBLIC SwGetExpField : public SwFormulaField -{ - String sExpand; - sal_Bool bIsInBodyTxt; - sal_uInt16 nSubType; - - bool bLateInitialization; // #i82544# - - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - SwGetExpField( SwGetExpFieldType*, const String& rFormel, - sal_uInt16 nSubType = nsSwGetSetExpType::GSE_EXPR, sal_uLong nFmt = 0); - - virtual void SetValue( const double& rVal ); - virtual void SetLanguage(sal_uInt16 nLng); - - inline const String& GetExpStr() const; - inline void ChgExpStr(const String& rExpand); - - // Called by formating. - inline sal_Bool IsInBodyTxt() const; - - // Set by UpdateExpFlds where node position is known. - inline void ChgBodyTxtFlag( sal_Bool bIsInBody ); - - // For fields in header/footer/footnotes/flys: - // Only called by formating!! - void ChangeExpansion( const SwFrm&, const SwTxtFld& ); - - virtual String GetFieldName() const; - - // Change formula. - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - - virtual sal_uInt16 GetSubType() const; - virtual void SetSubType(sal_uInt16 nType); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); - - static sal_uInt16 GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc); - // #i82544# - void SetLateInitialization() { bLateInitialization = true;} -}; - -inline void SwGetExpField::ChgExpStr(const String& rExpand) - { sExpand = rExpand;} - -inline const String& SwGetExpField::GetExpStr() const - { return sExpand; } - -// Called by formating. -inline sal_Bool SwGetExpField::IsInBodyTxt() const - { return bIsInBodyTxt; } - -// Set by UpdateExpFlds where node position is known. -inline void SwGetExpField::ChgBodyTxtFlag( sal_Bool bIsInBody ) - { bIsInBodyTxt = bIsInBody; } - -class SwSetExpField; - -class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType -{ - String sName; - const SwNode* pOutlChgNd; - String sDelim; - sal_uInt16 nType; - sal_uInt8 nLevel; - sal_Bool bDeleted; - -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ); - -public: - SwSetExpFieldType( SwDoc* pDoc, const String& rName, - sal_uInt16 nType = nsSwGetSetExpType::GSE_EXPR ); - virtual SwFieldType* Copy() const; - virtual const String& GetName() const; - - inline void SetType(sal_uInt16 nTyp); - inline sal_uInt16 GetType() const; - - void SetSeqFormat(sal_uLong nFormat); - sal_uLong GetSeqFormat(); - - sal_Bool IsDeleted() const { return bDeleted; } - void SetDeleted( sal_Bool b ) { bDeleted = b; } - - // Overlay, because set-field takes care for its being updated by itself. - inline const String& GetSetRefName() const; - - sal_uInt16 SetSeqRefNo( SwSetExpField& rFld ); - - sal_uInt16 GetSeqFldList( SwSeqFldList& rList ); - String MakeSeqName( sal_uInt16 nSeqNo ); - - // Number sequence fields chapterwise if required. - const String& GetDelimiter() const { return sDelim; } - void SetDelimiter( const String& s ) { sDelim = s; } - sal_uInt8 GetOutlineLvl() const { return nLevel; } - void SetOutlineLvl( sal_uInt8 n ) { nLevel = n; } - void SetChapter( SwSetExpField& rFld, const SwNode& rNd ); - - // Member only for SwDoc::UpdateExpFld. - // It is needed only at runtime of sequence field types! - const SwNode* GetOutlineChgNd() const { return pOutlChgNd; } - void SetOutlineChgNd( const SwNode* p ) { pOutlChgNd = p; } - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -inline void SwSetExpFieldType::SetType( sal_uInt16 nTyp ) -{ - nType = nTyp; - EnableFormat( !(nType & (nsSwGetSetExpType::GSE_SEQ|nsSwGetSetExpType::GSE_STRING))); -} - -inline sal_uInt16 SwSetExpFieldType::GetType() const - { return nType; } - -inline const String& SwSetExpFieldType::GetSetRefName() const - { return sName; } - - -class SW_DLLPUBLIC SwSetExpField : public SwFormulaField -{ - String sExpand; - String aPText; - String aSeqText; - sal_Bool bInput; - sal_uInt16 nSeqNo; - sal_uInt16 nSubType; - - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - SwSetExpField(SwSetExpFieldType*, const String& rFormel, sal_uLong nFmt = 0); - - virtual void SetValue( const double& rVal ); - - inline const String& GetExpStr() const; - - inline void ChgExpStr( const String& rExpand ); - - inline void SetPromptText(const String& rStr); - inline const String& GetPromptText() const; - - inline void SetInputFlag(sal_Bool bInp); - inline sal_Bool GetInputFlag() const; - - virtual String GetFieldName() const; - - virtual sal_uInt16 GetSubType() const; - virtual void SetSubType(sal_uInt16 nType); - - inline sal_Bool IsSequenceFld() const; - - // Logical number, sequence fields. - inline void SetSeqNumber( sal_uInt16 n ) { nSeqNo = n; } - inline sal_uInt16 GetSeqNumber() const { return nSeqNo; } - - // Query name only. - virtual const String& GetPar1() const; - - // Query formula. - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -inline const String& SwSetExpField::GetExpStr() const - { return sExpand; } - -inline void SwSetExpField::ChgExpStr( const String& rExpand ) - { sExpand = rExpand; } - -inline void SwSetExpField::SetPromptText(const String& rStr) - { aPText = rStr; } - -inline const String& SwSetExpField::GetPromptText() const - { return aPText; } - -inline void SwSetExpField::SetInputFlag(sal_Bool bInp) - { bInput = bInp; } - -inline sal_Bool SwSetExpField::GetInputFlag() const - { return bInput; } - -inline sal_Bool SwSetExpField::IsSequenceFld() const - { return 0 != (nsSwGetSetExpType::GSE_SEQ & ((SwSetExpFieldType*)GetTyp())->GetType()); } - - -class SwInputFieldType : public SwFieldType -{ - SwDoc* pDoc; -public: - SwInputFieldType( SwDoc* pDoc ); - - virtual SwFieldType* Copy() const; - - SwDoc* GetDoc() const { return pDoc; } -}; - - -class SW_DLLPUBLIC SwInputField : public SwField -{ - String aContent; - String aPText; - String aHelp; - String aToolTip; - sal_uInt16 nSubType; - - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - // Direct input via dialog; delete old value. - SwInputField(SwInputFieldType*, const String& rContent , - const String& rPrompt, sal_uInt16 nSubType = 0, - sal_uLong nFmt = 0); - - virtual String GetFieldName() const; - - // Content - virtual const String& GetPar1() const; - virtual void SetPar1(const String& rStr); - - // aPromptText - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - - virtual String GetHelp() const; - virtual void SetHelp(const String & rStr); - - virtual String GetToolTip() const; - virtual void SetToolTip(const String & rStr); - - virtual sal_Bool isFormField() const; - - virtual sal_uInt16 GetSubType() const; - virtual void SetSubType(sal_uInt16 nSub); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - -/*-------------------------------------------------------------------- - Description: Sorted list of input fields and DropDown fields - --------------------------------------------------------------------*/ - -class SwInputFieldList -{ -public: - SwInputFieldList( SwEditShell* pShell, sal_Bool bBuildTmpLst = sal_False ); - ~SwInputFieldList(); - - sal_uInt16 Count() const; - SwField* GetField(sal_uInt16 nId); - - void GotoFieldPos(sal_uInt16 nId); - void PushCrsr(); - void PopCrsr(); - - // Put all that are new into SortLst for updating. Returns count. - // (For Glossary: only update its input-fields). - // Compare TmpLst with current fields. - sal_uInt16 BuildSortLst(); - - void RemoveUnselectedFlds(); - -private: - SwEditShell* pSh; - _SetGetExpFlds* pSrtLst; - SvPtrarr aTmpLst; -}; - -// Implementation in tblcalc.cxx. -class SwTblFieldType : public SwValueFieldType -{ -public: - SwTblFieldType(SwDoc* pDocPtr); - virtual SwFieldType* Copy() const; -}; - - -class SwTblField : public SwValueField, public SwTableFormula -{ - String sExpand; - sal_uInt16 nSubType; - - virtual String Expand() const; - virtual SwField* Copy() const; - - // Search TextNode containing the field. - virtual const SwNode* GetNodeOfFormula() const; - - String GetCommand(); - -public: - SwTblField( SwTblFieldType*, const String& rFormel, - sal_uInt16 nSubType = 0, sal_uLong nFmt = 0); - - virtual void SetValue( const double& rVal ); - virtual sal_uInt16 GetSubType() const; - virtual void SetSubType(sal_uInt16 nType); - - const String& GetExpStr() const { return sExpand; } - void ChgExpStr(const String& rStr) { sExpand = rStr; } - - void CalcField( SwTblCalcPara& rCalcPara ); - - virtual String GetFieldName() const; - - // The formula. - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); -}; - - -#endif // SW_EXPFLD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx deleted file mode 100644 index d7cd8aa257..0000000000 --- a/sw/inc/extinput.hxx +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _EXTINPUT_HXX -#define _EXTINPUT_HXX - -#include <pam.hxx> -#include <i18npool/lang.h> -#include <vector> - -class CommandExtTextInputData; - -class SwExtTextInput : public SwPaM -{ - std::vector<sal_uInt16> aAttrs; - String sOverwriteText; - sal_Bool bInsText : 1; - sal_Bool bIsOverwriteCursor : 1; - LanguageType eInputLanguage; -public: - SwExtTextInput( const SwPaM& rPam, Ring* pRing = 0 ); - virtual ~SwExtTextInput(); - - void SetInputData( const CommandExtTextInputData& rData ); - const std::vector<sal_uInt16>& GetAttrs() const { return aAttrs; } - void SetInsText( sal_Bool bFlag ) { bInsText = bFlag; } - sal_Bool IsOverwriteCursor() const { return bIsOverwriteCursor; } - void SetOverwriteCursor( sal_Bool bFlag ); - void SetLanguage(LanguageType eSet) { eInputLanguage = eSet;} -}; - -#endif //_EXTINPUT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx deleted file mode 100644 index 6f43cc9ad8..0000000000 --- a/sw/inc/fchrfmt.hxx +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FCHRFMT_HXX -#define _FCHRFMT_HXX - - -#include <svl/poolitem.hxx> -#include <calbck.hxx> -#include <format.hxx> - -class SwCharFmt; -class SwTxtCharFmt; -class IntlWrapper; - -// ATT_CHARFMT ********************************************* - - -class SW_DLLPUBLIC SwFmtCharFmt: public SfxPoolItem, public SwClient -{ - friend class SwTxtCharFmt; - SwTxtCharFmt* pTxtAttr; // My text attribute. - -public: - SwFmtCharFmt() : pTxtAttr(0) {} - - // single argument ctors shall be explicit. - explicit SwFmtCharFmt( SwCharFmt *pFmt ); - virtual ~SwFmtCharFmt(); - - // @@@ public copy ctor, but no copy assignment? - SwFmtCharFmt( const SwFmtCharFmt& rAttr ); -protected: - virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ); - -private: - // @@@ public copy ctor, but no copy assignment? - SwFmtCharFmt & operator= (const SwFmtCharFmt &); -public: - - TYPEINFO(); - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const; - - void SetCharFmt( SwFmt* pFmt ) { pFmt->Add(this); } - SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); } -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx deleted file mode 100644 index fa2008c2f3..0000000000 --- a/sw/inc/fesh.hxx +++ /dev/null @@ -1,780 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FESH_HXX -#define _FESH_HXX - -#include <com/sun/star/text/RelOrientation.hpp> -#include <com/sun/star/embed/XClassifiedObject.hpp> -#include <com/sun/star/embed/XEmbeddedObject.hpp> - -#include <svx/svdobj.hxx> -#include "swdllapi.h" -#include <editsh.hxx> -#include <flyenum.hxx> - -#include <svx/svdtypes.hxx> - -#include <svtools/embedhlp.hxx> - -#ifndef INCLUDED_VECTOR -#include <vector> -#define INCLUDED_VECTOR -#endif - -namespace editeng { class SvxBorderLine; } - -class SwFlyFrm; -class SwTabCols; -class SvxBrushItem; -class SvxFrameDirectionItem; -class SwTableAutoFmt; -class SwFrm; -class SwFmtFrmSize; -class SwFmtRowSplit; -class SdrObject; -class Color; -class Outliner; -class SotDataObject; -class SwFrmFmt; -struct SwSortOptions; -class SdrMarkList; - -namespace svx -{ - class ISdrObjectFilter; -} - - -// return values for GetFrmType() und GetSelFrmType(). -//! values can be combined via logival or -#define FRMTYPE_NONE (sal_uInt16) 0 -#define FRMTYPE_PAGE (sal_uInt16) 1 -#define FRMTYPE_HEADER (sal_uInt16) 2 -#define FRMTYPE_FOOTER (sal_uInt16) 4 -#define FRMTYPE_BODY (sal_uInt16) 8 -#define FRMTYPE_COLUMN (sal_uInt16) 16 -#define FRMTYPE_TABLE (sal_uInt16) 32 -#define FRMTYPE_FLY_FREE (sal_uInt16) 64 -#define FRMTYPE_FLY_ATCNT (sal_uInt16) 128 -#define FRMTYPE_FLY_INCNT (sal_uInt16) 256 -#define FRMTYPE_FOOTNOTE (sal_uInt16) 512 -#define FRMTYPE_FTNPAGE (sal_uInt16) 1024 -#define FRMTYPE_FLY_ANY (sal_uInt16) 2048 -#define FRMTYPE_DRAWOBJ (sal_uInt16) 4096 -#define FRMTYPE_COLSECT (sal_uInt16) 8192 -#define FRMTYPE_COLSECTOUTTAB (sal_uInt16) 16384 - -#define FRMTYPE_ANYCOLSECT ( FRMTYPE_COLSECT | FRMTYPE_COLSECTOUTTAB ) - -//! values can be combined via logival or -#define GOTOOBJ_DRAW_CONTROL (sal_uInt16) 1 -#define GOTOOBJ_DRAW_SIMPLE (sal_uInt16) 2 -#define GOTOOBJ_DRAW_ANY (sal_uInt16) 3 -#define GOTOOBJ_FLY_FRM (sal_uInt16) 4 -#define GOTOOBJ_FLY_GRF (sal_uInt16) 8 -#define GOTOOBJ_FLY_OLE (sal_uInt16) 16 -#define GOTOOBJ_FLY_ANY (sal_uInt16) 28 -#define GOTOOBJ_GOTO_ANY (sal_uInt16) 31 - -//! values can be combined via logival or -#define FLYPROTECT_CONTENT (sal_uInt16) 1 -#define FLYPROTECT_SIZE (sal_uInt16) 2 -#define FLYPROTECT_POS (sal_uInt16) 4 -#define FLYPROTECT_PARENT (sal_uInt16) 8 // Check only parents. -#define FLYPROTECT_FIXED (sal_uInt16) 16 // Only protection that cannot be withdrawn - // e.g. by OLE-server; also relevant for dialog. - -// For figuring out contents by position (D&D) -enum ObjCntType -{ - OBJCNT_NONE, - OBJCNT_FLY, - OBJCNT_GRF, - OBJCNT_OLE, - OBJCNT_SIMPLE, - OBJCNT_CONTROL, - OBJCNT_URLBUTTON, - - OBJCNT_GROUPOBJ, - OBJCNT_DONTCARE // Not determinable - different objects are selected. -}; - -//For GetAnyCurRect -enum CurRectType -{ - RECT_PAGE, // Rect of current page. - RECT_PAGE_CALC, // ... page will be formated if required. - RECT_PAGE_PRT, // Rect of current PrtArea of page. - RECT_FRM, // Rect of current frame. - RECT_FLY_EMBEDDED, // Rect of current FlyFrm. - RECT_FLY_PRT_EMBEDDED, // Rect of PrtArea of FlyFrm - RECT_SECTION, // Rect of current section. - RECT_OUTTABSECTION, // Rect of current section but outside of table. - RECT_SECTION_PRT, // Rect of current PrtArea of section. - RECT_OUTTABSECTION_PRT, // Rect of current PrtArea of section but outside table. - RECT_HEADERFOOTER, // Rect of current header/footer - RECT_HEADERFOOTER_PRT, // Rect of PrtArea of current headers/footers - - RECT_PAGES_AREA //Rect covering the pages area -}; - -struct SwGetCurColNumPara -{ - const SwFrmFmt* pFrmFmt; - const SwRect* pPrtRect, *pFrmRect; - SwGetCurColNumPara() : pFrmFmt( 0 ), pPrtRect( 0 ), pFrmRect( 0 ) {} -}; - -#define SW_PASTESDR_INSERT 1 -#define SW_PASTESDR_REPLACE 2 -#define SW_PASTESDR_SETATTR 3 - -#define SW_ADD_SELECT 1 -#define SW_ENTER_GROUP 2 -#define SW_LEAVE_FRAME 4 - -#define SW_MOVE_UP 0 -#define SW_MOVE_DOWN 1 -#define SW_MOVE_LEFT 2 -#define SW_MOVE_RIGHT 3 - -#define SW_TABCOL_NONE 0 -#define SW_TABCOL_HORI 1 -#define SW_TABCOL_VERT 2 -#define SW_TABROW_HORI 3 -#define SW_TABROW_VERT 4 - -#define SW_TABSEL_HORI 5 -#define SW_TABSEL_HORI_RTL 6 -#define SW_TABROWSEL_HORI 7 -#define SW_TABROWSEL_HORI_RTL 8 -#define SW_TABCOLSEL_HORI 9 -#define SW_TABSEL_VERT 10 -#define SW_TABROWSEL_VERT 11 -#define SW_TABCOLSEL_VERT 12 - -class SdrDropMarkerOverlay; - -class SW_DLLPUBLIC SwFEShell : public SwEditShell -{ - SdrDropMarkerOverlay *pChainFrom, *pChainTo; - sal_Bool bCheckForOLEInCaption; - - SW_DLLPRIVATE SwFlyFrm *FindFlyFrm() const; - SW_DLLPRIVATE SwFlyFrm *FindFlyFrm( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const; - - // Terminate actions for all shells and call ChangeLink. - SW_DLLPRIVATE void EndAllActionAndCall(); - - SW_DLLPRIVATE void ScrollTo( const Point &rPt ); - - SW_DLLPRIVATE void ChangeOpaque( SdrLayerID nLayerId ); - - // Used for mouse operations on a table: - // Returns a cell frame that is 'close' to rPt. - SW_DLLPRIVATE const SwFrm *GetBox( const Point &rPt, bool* pbRow = 0, bool* pbCol = 0 ) const; - - // 0 == not in any column. - SW_DLLPRIVATE sal_uInt16 _GetCurColNum( const SwFrm *pFrm, - SwGetCurColNumPara* pPara ) const; - - SW_DLLPRIVATE void _GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const; - SW_DLLPRIVATE void _GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const; - - SW_DLLPRIVATE sal_Bool ImpEndCreate(); - - SW_DLLPRIVATE ObjCntType GetObjCntType( const SdrObject& rObj ) const; - - // Methods for copying of draw objects. - SW_DLLPRIVATE sal_Bool CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, - const Point& rInsPt, sal_Bool bIsMove, - sal_Bool bSelectInsert ); - - // Get list of marked SdrObjects; - // helper method for GetSelFrmType, IsSelContainsControl. - SW_DLLPRIVATE const SdrMarkList* _GetMarkList() const; - - SW_DLLPRIVATE sal_Bool CheckHeadline( bool bRepeat ) const; - - using SwEditShell::Copy; - -public: - - using SwEditShell::Insert; - - TYPEINFO(); - SwFEShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 ); - SwFEShell( SwEditShell& rShell, Window *pWin ); - virtual ~SwFEShell(); - - // Copy and Paste methods for internal clipboard. - sal_Bool Copy( SwDoc* pClpDoc, const String* pNewClpTxt = 0 ); - sal_Bool Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames = sal_False); - - //Paste some pages into another doc - used in mailmerge. - sal_Bool PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage); - - // Copy-Method for Drag&Drop - sal_Bool Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt, - sal_Bool bIsMove = sal_False, sal_Bool bSelectInsert = sal_True ); - - void SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew = sal_False ); - - // Is selected frame within another frame? - const SwFrmFmt* IsFlyInFly(); - - - // If an object as been given, exactly this object is selected - // (instead of searching over position). - sal_Bool SelectObj( const Point& rSelPt, sal_uInt8 nFlag = 0, SdrObject *pObj = 0 ); - void DelSelectedObj(); - - // Move selection upwards or downwards (Z-Order). - // TRUE = to top or bottom. - // FALSE = run past one other. - void SelectionToTop ( sal_Bool bTop = sal_True ); - void SelectionToBottom( sal_Bool bBottom = sal_True ); - - short GetLayerId() const; // 1 Heaven, 0 Hell, -1 Ambiguous. - void SelectionToHeaven(); // Above document. - void SelectionToHell(); // Below document. - - // The following two methods return enum SdrHdlKind. - // Declared as int in order to spare including SVDRAW.HXX. - bool IsObjSelectable( const Point& rPt ); - int IsInsideSelectedObj( const Point& rPt ); //!! returns enum values - - // Test if there is a draw object at that position and if it should be selected. - // The 'should' is aimed at Writer text fly frames which may be in front of - // the draw object. - sal_Bool ShouldObjectBeSelected(const Point& rPt); - - sal_Bool MoveAnchor( sal_uInt16 nDir ); - - // Returns if Upper of frame at current position is section frame - // Currently only used by the rules. To be replaced by something more - // sophisticated one day. - bool IsDirectlyInSection() const; - - // For return valies see above FrmType. - // pPt: Cursr or DocPos respectively; bStopAtFly: Stop at flys or continue over anchor. - // Although (0,TRUE) is kind of a standard, the parameters are not defaulted here - // in order to force more conscious use especially of bStopAtFly. - sal_uInt16 GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const; - sal_uInt16 GetSelFrmType() const; //Selektion (Drawing) - - /** check whether selected frame contains a control; - * companion method to GetSelFrmType, used for preventing - * drag&drop of controls into header */ - bool IsSelContainsControl() const; - - ObjCntType GetObjCntType( const Point &rPt, SdrObject *&rpObj ) const; - ObjCntType GetObjCntTypeOfSelection( SdrObject** ppObj = 0 ) const; - - // For adjustment of PosAttr when anchor changes. - SwRect GetObjRect() const; - - // For moving flys with keyboard. - SwRect GetFlyRect() const; - // i#17567 - adjustments to allow negative vertical positions for fly frames anchored - // to paragraph or to character. - // i#18732 - adjustments for new option 'FollowTextFlow' - // i#22341 - adjustments for new vertical alignment at top of line - void CalcBoundRect( SwRect& _orRect, - const RndStdIds _nAnchorId, - const sal_Int16 _eHoriRelOrient = com::sun::star::text::RelOrientation::FRAME, - const sal_Int16 _eVertRelOrient = com::sun::star::text::RelOrientation::FRAME, - const SwPosition* _pToCharCntntPos = NULL, - const bool _bFollowTextFlow = false, - bool _bMirror = false, - Point* _opRef = NULL, - Size* _opPercent = NULL ) const; - - // Set size of draw objects. - void SetObjRect( const SwRect& rRect ); - - long BeginDrag( const Point *pPt, sal_Bool bProp ); - long Drag ( const Point *pPt, sal_Bool bProp ); - long EndDrag ( const Point *pPt, sal_Bool bProp ); - void BreakDrag(); - - //Methods for status line. - Point GetAnchorObjDiff() const; - Point GetObjAbsPos() const; - Size GetObjSize() const; - - // SS for envelopes: get all page-bound objects and set them to new page. - void GetPageObjs( SvPtrarr& rFillArr ); - void SetPageObjsNewPage( SvPtrarr& rFillArr, int nOffset = 1 ); - - // Show current selection (frame / draw object as required). - virtual void MakeSelVisible(); - - // Return FrmFmt of object that may be under Point. - // Object does not become selected! - const SwFrmFmt* GetFmtFromObj( const Point& rPt, SwRect** pRectToFill = 0 ) const; - - // Returns a format too, if the point is over the text of any fly. - const SwFrmFmt* GetFmtFromAnyObj( const Point& rPt ) const; - - // Which Protection is set at selected object? - //!! returns several flags in sal_uInt8 - sal_uInt8 IsSelObjProtected( sal_uInt16 /*FLYPROTECT_...*/ eType ) const; - - // Deliver graphic in rName besides graphic name. If graphic is - // linked give name with path. rbLink is TRUE if graphic is linked. - const Graphic *GetGrfAtPos( const Point &rDocPos, - String &rName, sal_Bool &rbLink ) const; - - const String GetObjTitle() const; - void SetObjTitle( const String& rTitle ); - const String GetObjDescription() const; - void SetObjDescription( const String& rDescription ); - - - sal_Bool IsFrmSelected() const; - sal_Bool GetFlyFrmAttr( SfxItemSet &rSet ) const; - sal_Bool SetFlyFrmAttr( SfxItemSet &rSet ); - sal_Bool ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet = 0 ); - const SwFrmFmt *NewFlyFrm( const SfxItemSet &rSet, sal_Bool bAnchValid = sal_False, - SwFrmFmt *pParent = 0 ); - void SetFlyPos( const Point &rAbsPos); - Point FindAnchorPos( const Point &rAbsPos, sal_Bool bMoveIt = sal_False ); - - // Determines whether a frame or its environment is vertically formatted and right-to-left. - // also determines, if frame or its environmane is in mongolianlayout (vertical left-to-right) - // - add output parameter <bVertL2R> - sal_Bool IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRightToLeft, sal_Bool& bVertL2R) const; - - SwFrmFmt* GetCurFrmFmt() const; //If frame then frame style, else 0. - void SetFrmFmt( SwFrmFmt *pFmt, sal_Bool bKeepOrient = sal_False, Point* pDocPos = 0 ); //If frame then set frame style. - const SwFlyFrm *GetCurrFlyFrm() const { return FindFlyFrm(); } - - // Find/delete fly containing the cursor. - SwFrmFmt* WizzardGetFly(); - - // Independent selecting of flys. - sal_Bool GotoNextFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY ) - { return GotoObj( sal_True, eType ); } - sal_Bool GotoPrevFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY) - { return GotoObj( sal_False, eType); } - - // Iterate over flys - for Basic-collections. - sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL ) const; - const SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL) const; - - // If a fly is selected, it draws cursor into the first CntntFrm. - const SwFrmFmt* SelFlyGrabCrsr(); - - //Get FlyFrameFormat; fuer UI Macro Anbindung an Flys - const SwFrmFmt* GetFlyFrmFmt() const; - SwFrmFmt* GetFlyFrmFmt(); - - // OLE. Server requires new size. Desired values are adjusted as frame attributes. - // If the values are not allowed, the formating clips and determines scaling. - // See CalcAndSetScale(). - // The return value is the applied size. - Size RequestObjectResize( const SwRect &rRect, const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ); - - //The layout has been changed, so the active object has to be moved after that - virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset ); - - // Client for OleObject has to be up-to-date regarding scaling. - // Implemented in WrtShell. - // If a pointer is passed on a size, this is the object's current core-size. - // Else the size is provided via GetCurFlyRect(). - virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj, - const SwRect *pFlyPrtRect = 0, - const SwRect *pFlyFrmRect = 0, - const bool bNoTxtFrmPrtAreaChanged = false ) = 0; - - // Connect objects with ActivateWhenVisible at Paint. - // Called by notxtfrm::Paint, implemented in wrtsh. - virtual void ConnectObj( svt::EmbeddedObjectRef&, - const SwRect &rPrt, - const SwRect &rFrm ) = 0; - - // Set visible range on object, if it is not yet visible. - void MakeObjVisible( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const; - - // Check resize of OLE-Object. - sal_Bool IsCheckForOLEInCaption() const { return bCheckForOLEInCaption; } - void SetCheckForOLEInCaption( sal_Bool bFlag ) { bCheckForOLEInCaption = bFlag; } - - // Set name at selected FlyFrame. - void SetFlyName( const String& rName ); - const String& GetFlyName() const; - - // get reference to OLE object (if there is one) for selected FlyFrame - const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef() const; - - // Created unique name for frame. - String GetUniqueGrfName() const; - String GetUniqueOLEName() const; - String GetUniqueFrameName() const; - - // Jump to named Fly (graphic/OLE). - sal_Bool GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL, - sal_Bool bSelFrame = sal_True ); - - // Position is a graphic with URL? - const SwFrmFmt* IsURLGrfAtPos( const Point& rPt, String* pURL = 0, - String *pTargetFrameName = 0, - String *pURLDescription = 0 ) const; - - // For Chain always connect Fly specified by format with that hit by point. - // rRect contains rect of Fly (for its highlight). - int Chainable( SwRect &rRect, const SwFrmFmt &rSource, const Point &rPt ) const; - int Chain( SwFrmFmt &rSource, const Point &rPt ); - int Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest ); - void Unchain( SwFrmFmt &rFmt ); - void HideChainMarker(); - void SetChainMarker(); - - Size GetGraphicDefaultSize() const; - - // Temporary work around for bug. - void CheckUnboundObjects(); - - // Attention: Ambiguities if multiple selections. - sal_Bool GetObjAttr( SfxItemSet &rSet ) const; - sal_Bool SetObjAttr( const SfxItemSet &rSet ); - - const SdrObject* GetBestObject( sal_Bool bNext, sal_uInt16 eType = GOTOOBJ_DRAW_ANY, sal_Bool bFlat = sal_True, const ::svx::ISdrObjectFilter* pFilter = NULL ); - sal_Bool GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY); - - // Set DragMode (e.g. Rotae), but do nothing when frame is selected. - void SetDragMode( sal_uInt16 eSdrDragMode ); - - sal_uInt16 IsObjSelected() const; // Returns object count, but doesn't count the objects in groups. - sal_Bool IsObjSelected( const SdrObject& rObj ) const; - - void EndTextEdit(); // Deletes object if required. - - // Anchor type of selected object, -1 if ambiguous or in case of frame selection. - // Else FLY_AT_PAGE or FLY_AT_PARA resp. from frmatr.hxx. - short GetAnchorId() const; - - // Process of creating draw objects. At the beginning object type is passed. - // At the end a Cmd can be passed. Here, SDRCREATE_RESTRAINTEND for end - // or SDRCREATE_NEXTPOINT for a polygon may be relevant. - // After RESTRAINTEND the object is created and selected. - // BreakCreate interrupts the process. In this case no object is selected. - sal_Bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos ); - sal_Bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor, const Point &); - void MoveCreate ( const Point &rPos ); - sal_Bool EndCreate ( sal_uInt16 eSdrCreateCmd ); - void BreakCreate(); - sal_Bool IsDrawCreate() const; - void CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, sal_uInt16 nSlotId); - - // Functions for Rubberbox, ti select Draw-Objects - sal_Bool BeginMark( const Point &rPos ); - void MoveMark ( const Point &rPos ); - sal_Bool EndMark (); - void BreakMark(); - - // Create and destroy group, don't when frame is selected. - sal_Bool IsGroupSelected(); // Can be a mixed selection! - void GroupSelection(); // Afterwards the group is selected. - void UnGroupSelection(); // The individual objects are selected, but - // it is possible that there are groups included. - - bool IsGroupAllowed() const; - - void MirrorSelection( sal_Bool bHorizontal ); //Vertical if FALSE. - - // frmatr.hxx. Here no enum because of dependencies. - // bool value only for internal use! Anchor is newly set according - // to current document position. Anchor is not re-set. - void ChgAnchor( int eAnchorId, sal_Bool bSameOnly = sal_False, - sal_Bool bPosCorr = sal_True ); - - sal_Bool SetDrawingAttr( SfxItemSet &rSet ); - - // Get selected DrawObj as graphics (MetaFile/Bitmap). - // Return value indicates if it was converted. - sal_Bool GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const; - - void Paste( SvStream& rStm, sal_uInt16 nAction, const Point* pPt = 0 ); - sal_Bool Paste( const Graphic &rGrf ); - sal_Bool Paste( SotDataObject& rObj, const Point& rPt ); - - sal_Bool IsAlignPossible() const; - void SetCalcFieldValueHdl(Outliner* pOutliner); - - void Insert(const String& rGrfName, - const String& rFltName, - const Graphic* pGraphic = 0, - const SfxItemSet* pFlyAttrSet = 0, - const SfxItemSet* pGrfAttrSet = 0, - SwFrmFmt* = 0 ); - - // Insertion of a drawing object which have to be already inserted in the DrawModel. - void InsertDrawObj( SdrObject& rDrawObj, - const Point& rInsertPosition ); - - sal_Bool ReplaceSdrObj( const String& rGrfName, const String& rFltName, - const Graphic* pGrf = 0 ); - - // --> #i972# - // for starmath formulas anchored 'as char' it alignes it baseline to baseline - // changing the previous vertical orientation - void AlignFormulaToBaseline( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly = 0 ); - - // aligns all formulas with anchor 'as char' to baseline - void AlignAllFormulasToBaseline(); - - - - // Provide information about content situated closes to given Point. - Point GetCntntPos( const Point& rPoint, sal_Bool bNext ) const; - - // Convert document position into position relative to the current page. - Point GetRelativePagePosition(const Point& rDocPos); - - // Hide or show layout-selection and pass call to CrsrSh. - void ShLooseFcs(); - void ShGetFcs( sal_Bool bUpdate = sal_True ); - - // PageDescriptor-interface - void ChgCurPageDesc( const SwPageDesc& ); - sal_uInt16 GetCurPageDesc( const sal_Bool bCalcFrm = sal_True ) const; - sal_uInt16 GetMousePageDesc( const Point &rPt ) const; - sal_uInt16 GetPageDescCnt() const; - SwPageDesc* FindPageDescByName( const String& rName, - sal_Bool bGetFromPool = sal_False, - sal_uInt16* pPos = 0 ); - - const SwPageDesc& GetPageDesc( sal_uInt16 i ) const; - void ChgPageDesc( sal_uInt16 i, const SwPageDesc& ); - // if inside all selection only one PageDesc, return this. - // Otherwise return 0 pointer - const SwPageDesc* GetSelectedPageDescs() const; - - const SwRect& GetAnyCurRect( CurRectType eType, - const Point* pPt = 0, - const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& = - ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >() ) const; - - - // Page number of the page containing Point, O if no page. - sal_uInt16 GetPageNumber( const Point &rPoint ) const; - sal_Bool GetPageNumber( long nYPos, sal_Bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, String &rDisplay ) const; - - SwFlyFrmFmt* InsertObject( const svt::EmbeddedObjectRef&, - const SfxItemSet* pFlyAttrSet = 0, - const SfxItemSet* pGrfAttrSet = 0, - SwFrmFmt* = 0 ); - sal_Bool FinishOLEObj(); //Shutdown server. - - void GetTblAttr( SfxItemSet & ) const; - void SetTblAttr( const SfxItemSet & ); - - sal_Bool HasWholeTabSelection() const; - - // Is content of a table cell or at least a table cell completely selected? - sal_Bool HasBoxSelection() const; - - sal_Bool InsertRow( sal_uInt16 nCnt, sal_Bool bBehind ); - sal_Bool InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ); // 0 == at the end. - sal_Bool DeleteCol(); - sal_Bool DeleteRow(); - - sal_Bool DeleteTblSel(); // Current selection, may be whole table. - - sal_uInt16 MergeTab(); // Merge selected parts of table. - // Return error via enum. - - // Split cell vertically or horizontally. - sal_Bool SplitTab( sal_Bool nVert = sal_True, sal_uInt16 nCnt = 1, sal_Bool bSameHeight = sal_False ); - sal_Bool Sort(const SwSortOptions&); //Sortieren. - - void SetRowHeight( const SwFmtFrmSize &rSz ); - - // Pointer must be detroyed by caller != 0. - void GetRowHeight( SwFmtFrmSize *&rpSz ) const; - - void SetRowSplit( const SwFmtRowSplit &rSz ); - void GetRowSplit( SwFmtRowSplit *&rpSz ) const; - - void SetBoxAlign( sal_uInt16 nOrient ); - sal_uInt16 GetBoxAlign() const; // USHRT_MAX if ambiguous. - - // Adjustment of Rowheights. Determine via bTstOnly if more than one row is selected. - sal_Bool BalanceRowHeight( sal_Bool bTstOnly ); - - void SetTabBorders( const SfxItemSet& rSet ); - void GetTabBorders( SfxItemSet& rSet) const; - void SetTabLineStyle(const Color* pColor, sal_Bool bSetLine = sal_False, const editeng::SvxBorderLine* pBorderLine = NULL); - - void SetTabBackground( const SvxBrushItem &rNew ); - void GetTabBackground( SvxBrushItem &rToFill ) const; - - void SetBoxBackground( const SvxBrushItem &rNew ); - sal_Bool GetBoxBackground( SvxBrushItem &rToFill ) const; //FALSE ambiguous. - - void SetBoxDirection( const SvxFrameDirectionItem& rNew ); - sal_Bool GetBoxDirection( SvxFrameDirectionItem& rToFill ) const; //FALSE ambiguous. - - void SetRowBackground( const SvxBrushItem &rNew ); - sal_Bool GetRowBackground( SvxBrushItem &rToFill ) const; //FALSE ambiguous. - - sal_uInt8 WhichMouseTabCol( const Point &rPt ) const; - void GetTabCols( SwTabCols &rToFill ) const; // Info about columns and margins. - void SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly = sal_True ); - void GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const; - void SetMouseTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly, - const Point &rPt ); - - // pEnd will be used during MouseMove - bool SelTblRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false ); - - void GetTabRows( SwTabCols &rToFill ) const; - void SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly ); - void GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const; - void SetMouseTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const Point &rPt ); - - void ProtectCells(); // If a table selection exists it is destroyed in case - // cursor is not allowed in readonly. - void UnProtectCells(); // Refers to table selection. - void UnProtectTbls(); // Unprotect all tables in selection. - sal_Bool HasTblAnyProtection( const String* pTblName = 0, - sal_Bool* pFullTblProtection = 0 ); - sal_Bool CanUnProtectCells() const; - - sal_uInt16 GetRowsToRepeat() const; - void SetRowsToRepeat( sal_uInt16 nNumOfRows ); - sal_uInt16 GetVirtPageNum( const sal_Bool bCalcFrm = sal_True ); - - //Returns the number of table rows currently selected - //if the selection start at the top of the table. - sal_uInt16 GetRowSelectionFromTop() const; - - sal_Bool IsInRepeatedHeadline() const { return CheckHeadline( true ); } - sal_Bool IsInHeadline() const { return CheckHeadline( false ); } - - // Adjusts cell widths in such a way, that their content - // does not need to be wrapped (if possible). - // bBalance provides for adjustment of selected columns. - void AdjustCellWidth( sal_Bool bBalance = sal_False ); - - // Not allowed if only empty cells are selected. - sal_Bool IsAdjustCellWidthAllowed( sal_Bool bBalance = sal_False ) const; - - // Adjustment of cell-widths; determine via bTstOnly if more than one cell is selected. - sal_Bool BalanceCellWidth( sal_Bool bTstOnly ); - - // AutoFormat for table/ table selection. - sal_Bool SetTableAutoFmt( const SwTableAutoFmt& rNew ); - - sal_Bool GetTableAutoFmt( SwTableAutoFmt& rGet ); - - sal_Bool SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff = 283 ); - - sal_Bool GetAutoSum( String& rFml ) const; - - // Phy: real page count. - // Virt: consider offset that may have been set by user. - sal_uInt16 GetPhyPageNum(); - - void SetNewPageOffset( sal_uInt16 nOffset ); - void SetPageOffset( sal_uInt16 nOffset ); //Changes last page offset. - sal_uInt16 GetPageOffset() const; //Returns last page offset. - - void InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator, - const String& rNumberSeparator, - const sal_Bool bBefore, const sal_uInt16 nId, - const String& rCharacterStyle, - const sal_Bool bCpyBrd = sal_True ); - - // The ruler needs some information too. - sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == not in any column. - sal_uInt16 GetCurMouseColNum( const Point &rPt, - SwGetCurColNumPara* pPara = 0 ) const; - sal_uInt16 GetCurTabColNum() const; //0 == not in any table. - sal_uInt16 GetCurMouseTabColNum( const Point &rPt ) const; - sal_uInt16 GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; // Current outer column. - - sal_Bool IsTableRightToLeft() const; - sal_Bool IsMouseTableRightToLeft( const Point &rPt ) const; - sal_Bool IsTableVertical() const; - - sal_Bool IsLastCellInRow() const; - - // Width of current range for column-dialog. - long GetSectionWidth( SwFmt& rFmt ) const; - - void GetConnectableFrmFmts - (SwFrmFmt & rFmt, const String & rReference, sal_Bool bSuccessors, - ::std::vector< String > & aPrevPageVec, - ::std::vector< String > & aThisPageVec, - ::std::vector< String > & aNextPageVec, - ::std::vector< String > & aRestVec); - - /** SwFEShell::GetShapeBackgrd - - method determines background color of the page the selected drawing - object is on and returns this color. - If no color is found, because no drawing object is selected or ..., - color COL_BLACK (default color on constructing object of class Color) - is returned. - - @author OD - - @returns an object of class Color - */ - const Color GetShapeBackgrd() const; - - /** Is default horizontal text direction for selected drawing object right-to-left - - Because drawing objects only painted for each page only, the default - horizontal text direction of a drawing object is given by the corresponding - page property. - - @author OD - - @returns boolean, indicating, if the horizontal text direction of the - page, the selected drawing object is on, is right-to-left. - */ - bool IsShapeDefaultHoriTextDirR2L() const; - - void ParkCursorInTab(); - - SwTxtNode * GetNumRuleNodeAtPos(const Point &rPot); - sal_Bool IsNumLabel( const Point &rPt, int nMaxOffset = -1 ); - - bool IsVerticalModeAtNdAndPos( const SwTxtNode& _rTxtNode, - const Point& _rDocPos ) const; - - virtual void ToggleHeaderFooterEdit( ); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx deleted file mode 100644 index 8267a95395..0000000000 --- a/sw/inc/fldbas.hxx +++ /dev/null @@ -1,433 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_FLDBAS_HXX -#define SW_FLDBAS_HXX - -#include <i18npool/lang.h> -#include <tools/string.hxx> -#include "swdllapi.h" -#include <calbck.hxx> -#include <com/sun/star/uno/Any.hxx> - -class SwDoc; -class SvStringsDtor; -class SvNumberFormatter; - - -enum RES_FIELDS -{ -// For old documents the Field-Which IDs must be preserved !!! - RES_FIELDS_BEGIN, - RES_DBFLD = RES_FIELDS_BEGIN, - RES_USERFLD, - RES_FILENAMEFLD, - RES_DBNAMEFLD, - RES_DATEFLD, - RES_TIMEFLD, - RES_PAGENUMBERFLD, - RES_AUTHORFLD, - RES_CHAPTERFLD, - RES_DOCSTATFLD, - RES_GETEXPFLD, - RES_SETEXPFLD, - RES_GETREFFLD, - RES_HIDDENTXTFLD, - RES_POSTITFLD, - RES_FIXDATEFLD, - RES_FIXTIMEFLD, - RES_REGFLD, - RES_VARREGFLD, - RES_SETREFFLD, - RES_INPUTFLD, - RES_MACROFLD, - RES_DDEFLD, - RES_TABLEFLD, - RES_HIDDENPARAFLD, - RES_DOCINFOFLD, - RES_TEMPLNAMEFLD, - RES_DBNEXTSETFLD, - RES_DBNUMSETFLD, - RES_DBSETNUMBERFLD, - RES_EXTUSERFLD, - RES_REFPAGESETFLD, - RES_REFPAGEGETFLD, - RES_INTERNETFLD, - RES_JUMPEDITFLD, - RES_SCRIPTFLD, - RES_DATETIMEFLD, - RES_AUTHORITY, //Table of authorities - RES_COMBINED_CHARS, - RES_DROPDOWN, - RES_FIELDS_END -}; - -// List of FieldTypes at UI. -enum SwFldTypesEnum -{ - TYP_BEGIN, - TYP_DATEFLD = TYP_BEGIN, // 0 - TYP_TIMEFLD, - TYP_FILENAMEFLD, - TYP_DBNAMEFLD, - TYP_CHAPTERFLD, - TYP_PAGENUMBERFLD, - TYP_DOCSTATFLD, - TYP_AUTHORFLD, - TYP_SETFLD, - TYP_GETFLD, - TYP_FORMELFLD, // 10 - TYP_HIDDENTXTFLD, - TYP_SETREFFLD, - TYP_GETREFFLD, - TYP_DDEFLD, - TYP_MACROFLD, - TYP_INPUTFLD, - TYP_HIDDENPARAFLD, - TYP_DOCINFOFLD, - TYP_DBFLD, - TYP_USERFLD, // 20 - TYP_POSTITFLD, - TYP_TEMPLNAMEFLD, - TYP_SEQFLD, - TYP_DBNEXTSETFLD, - TYP_DBNUMSETFLD, - TYP_DBSETNUMBERFLD, - TYP_CONDTXTFLD, - TYP_NEXTPAGEFLD, - TYP_PREVPAGEFLD, - TYP_EXTUSERFLD, // 30 - TYP_FIXDATEFLD, - TYP_FIXTIMEFLD, - TYP_SETINPFLD, - TYP_USRINPFLD, - TYP_SETREFPAGEFLD, - TYP_GETREFPAGEFLD, - TYP_INTERNETFLD, - TYP_JUMPEDITFLD, - TYP_SCRIPTFLD, // 40 - TYP_AUTHORITY, - TYP_COMBINED_CHARS, - TYP_DROPDOWN, - TYP_END -}; - - -enum SwFileNameFormat -{ - FF_BEGIN, - FF_NAME = FF_BEGIN, - FF_PATHNAME, - FF_PATH, - FF_NAME_NOEXT, - FF_UI_NAME, - FF_UI_RANGE, - FF_END, - FF_FIXED = 0x8000 -}; - -enum SwVarFormat -{ - VVF_CMD = 0x0010, // Show command. - VVF_INVISIBLE = 0x0040, // Invisible. - VVF_XXP = 0x0400, // 1234% - VVF_XX_XXP = 0x0800, // 1.234,56% - VVF_CLEAR = 0x000f, - -// From here new formats: - VVF_SYS = 0x2000, // Format for numbers from system. - VVF_X = 0x2100, // 1234 - VVF_X_X = 0x2200, // 1234.5 - VVF_X_XX = 0x2300, // 1245.56 - VVF_XX_X = 0x2400, // 1.234.5 - VVF_XX_XX = 0x2500, // 1.234.56 - VVF_XX_XXX = 0x2600, // 1.234.567 - VVF_SYS_CUR = 0x2700, // Format for currency from system. - VVF_CUR_X = 0x2800, // EUR 1234 - VVF_CUR_XX_XX = 0x2900, // EUR 1234.56 EUR 1234.00 - VVF_CUR_XX_X0 = 0x2a00, // EUR 1234.56 EUR 1234.-- - VVF_X_CUR = 0x2b00, // 1234 EUR - VVF_XX_XX_CUR = 0x2c00, // 1234.56 EUR 1234.00 EUR - VVF_XX_X0_CUR = 0x2d00, // 1234.56 EUR 1234.-- EUR -// Compatibility: - VF_CMD = VVF_CMD, - VF_INVISIBLE = VVF_INVISIBLE, - VF_XXP = VVF_XXP, - VF_XX_XXP = VVF_XX_XXP, - VF_VISIBLE = VVF_SYS, - VF_XX = VVF_X, - VF_XX_XX = VVF_XX_XX, - VF_XX_XX_CUR = VVF_SYS_CUR, - VF_CLEAR = VVF_CLEAR - -}; - -typedef sal_uInt16 SwGetSetExpType; -namespace nsSwGetSetExpType -{ - const SwGetSetExpType GSE_STRING = 0x0001; // String - const SwGetSetExpType GSE_EXPR = 0x0002; // Expression - const SwGetSetExpType GSE_INP = 0x0004; // InputField - const SwGetSetExpType GSE_SEQ = 0x0008; // Sequence - const SwGetSetExpType GSE_FORMULA = 0x0010; // Formula -} - -typedef sal_uInt16 SwExtendedSubType; -namespace nsSwExtendedSubType -{ - const SwExtendedSubType SUB_CMD = 0x0100; // Show command. - const SwExtendedSubType SUB_INVISIBLE = 0x0200; // Invisible. - const SwExtendedSubType SUB_OWN_FMT = 0x0400; // SwDBField: Don't accept formating from database. -} - -enum SwInputFieldSubType -{ - INP_TXT = 0x01, - INP_USR = 0x02, - INP_VAR = 0x03 -}; - - -enum SwUserType -{ - UF_STRING = 0x01, - UF_EXPR = 0x02 -}; - -enum SwDateTimeSubType -{ - FIXEDFLD = 1, - DATEFLD = 2, - TIMEFLD = 4 -}; - - -extern sal_uInt16 aTypeTab[]; - -// General tools. -String GetResult(double nVal, sal_uInt32 nNumFmt, sal_uInt16 nLang = LANGUAGE_SYSTEM); -void SetErrorStr(const String& rStr); -String FormatNumber(sal_uInt16 nNum, sal_uInt32 nFormat); - -// Instances of SwFields and those derived from it occur 0 to n times. -// For each class there is one instance of the associated type class. -// Base class of all field types is SwFieldType. - -class SW_DLLPUBLIC SwFieldType : public SwModify -{ - sal_uInt16 nWhich; - - friend void _FinitUI(); // In order to delete pointer! - static SvStringsDtor* pFldNames; - - static void _GetFldName(); // Sets up FldNames; fldmgr.cxx! - -protected: - // Single argument ctors shall be explicit. - explicit SwFieldType( sal_uInt16 nWhichId ); - -public: - - static const String& GetTypeStr( sal_uInt16 nTypeId ); - - // Only in derived classes. - virtual const String& GetName() const; - virtual SwFieldType* Copy() const = 0; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); - - sal_uInt16 Which() const { return nWhich; } - - inline void UpdateFlds() const; -}; - -inline void SwFieldType::UpdateFlds() const -{ - ((SwFieldType*)this)->ModifyNotification( 0, 0 ); -} - -// Base class of all fields. -// Type of field is queried via Which. -// Expanded content of field is queried via Expand(). -class SW_DLLPUBLIC SwField -{ -private: - mutable String m_Cache; // Cached expansion (for clipboard). - sal_uInt16 nLang; // Always change via SetLanguage! - sal_Bool bIsAutomaticLanguage; - sal_uInt32 nFormat; - - SwFieldType* pType; - - virtual String Expand() const = 0; - virtual SwField* Copy() const = 0; - -protected: - void SetFormat(sal_uInt32 nSet) {nFormat = nSet;} - - SwField(SwFieldType* pTyp, sal_uInt32 nFmt = 0, sal_uInt16 nLang = LANGUAGE_SYSTEM); - -public: - virtual ~SwField(); - - inline SwFieldType* GetTyp() const; - - // Set new type (used for copying among documents). - virtual SwFieldType* ChgTyp( SwFieldType* ); - - /** expand the field. - @param bCached return cached field value. - @remark most callers should use the cached field value. - this is because various fields need special handing - (ChangeExpansion()) to return correct values, and only - SwTxtFormatter::NewFldPortion() sets things up properly. - @return the generated text (suitable for display) - */ - String ExpandField(bool const bCached) const; - - // Returns name or content. - virtual String GetFieldName() const; - - SwField * CopyField() const; - - // ResId - sal_uInt16 Which() const -#if OSL_DEBUG_LEVEL > 1 - ; // implemented in fldbas.cxx -#else - { return pType->Which(); } -#endif - - // TYP_ID - sal_uInt16 GetTypeId() const; - virtual sal_uInt16 GetSubType() const; - virtual void SetSubType(sal_uInt16); - - // Language at field position. - inline sal_uInt16 GetLanguage() const; - virtual void SetLanguage(sal_uInt16 nLng); - - // Query parameters for dialog and for BASIC. - inline sal_uInt32 GetFormat() const; - virtual const String& GetPar1() const; - virtual String GetPar2() const; - - virtual String GetFormula() const; - - virtual void ChangeFormat(sal_uInt32 n); - virtual void SetPar1(const String& rStr); - virtual void SetPar2(const String& rStr); - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ); - - // Does the field possess an action on its ClickHandler? (e.g. INetFields, ...). - sal_Bool HasClickHdl() const; - sal_Bool IsFixed() const; - - sal_Bool IsAutomaticLanguage() const { return bIsAutomaticLanguage;} - void SetAutomaticLanguage(sal_Bool bSet){bIsAutomaticLanguage = bSet;} - - virtual String GetDescription() const; -}; - -inline SwFieldType* SwField::GetTyp() const - { return pType; } - -inline sal_uInt32 SwField::GetFormat() const - { return nFormat; } - -inline sal_uInt16 SwField::GetLanguage() const - { return nLang; } - - -//Fields containing values that have to be formated via number formatter. -class SwValueFieldType : public SwFieldType -{ - SwDoc* pDoc; - sal_Bool bUseFormat; // Use number formatter. - -protected: - SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId ); - SwValueFieldType( const SwValueFieldType& rTyp ); - -public: - inline SwDoc* GetDoc() const { return pDoc; } - inline void SetDoc(SwDoc* pNewDoc) { pDoc = pNewDoc; } - - inline sal_Bool UseFormat() const { return bUseFormat; } - inline void EnableFormat(sal_Bool bFormat = sal_True) { bUseFormat = bFormat; } - - String ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const; - void DoubleToString(String &rValue, const double &rVal, LanguageType eLng) const; - void DoubleToString(String &rValue, const double &rVal, sal_uInt32 nFmt) const; -}; - -class SW_DLLPUBLIC SwValueField : public SwField -{ - double fValue; - -protected: - SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, sal_uInt16 nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 ); - SwValueField( const SwValueField& rFld ); - -public: - virtual ~SwValueField(); - - virtual SwFieldType* ChgTyp( SwFieldType* ); - virtual void SetLanguage(sal_uInt16 nLng); - - inline SwDoc* GetDoc() const { return ((SwValueFieldType*)GetTyp())->GetDoc(); } - - virtual double GetValue() const; - virtual void SetValue( const double& rVal ); - - inline String ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const - { return ((SwValueFieldType*)GetTyp())->ExpandValue(rVal, nFmt, nLng); } - - static sal_uInt32 GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt); -}; - -class SW_DLLPUBLIC SwFormulaField : public SwValueField -{ - String sFormula; - -protected: - SwFormulaField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, const double fVal = 0.0 ); - SwFormulaField( const SwFormulaField& rFld ); - -public: - virtual String GetFormula() const; - void SetFormula(const String& rStr); - - void SetExpandedFormula(const String& rStr); - String GetExpandedFormula() const; -}; - -#endif // SW_FLDBAS_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx deleted file mode 100644 index 7c7699cf64..0000000000 --- a/sw/inc/flddat.hxx +++ /dev/null @@ -1,142 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_FLDDAT_HXX -#define SW_FLDDAT_HXX - -#include <tools/string.hxx> - -#include "fldbas.hxx" - -class DateTime; -class Date; -class Time; - - -enum SwDateFormat -{ - DF_BEGIN, - // new formats - DFF_SSYS = DF_BEGIN, - DFF_LSYS , - DFF_DMY , - DFF_DMYY , - DFF_DMMY , - DFF_DMMYY, - DFF_DMMMY , - DFF_DMMMYY, - DFF_DDMMY , - DFF_DDMMMY , - DFF_DDMMMYY , - DFF_DDDMMMY , - DFF_DDDMMMYY , - DFF_MY , - DFF_MD , - DFF_YMD , - DFF_YYMD , - DF_END , - // Compatibility - DF_SSYS = DFF_SSYS, - DF_LSYS = DFF_LSYS, - DF_SHORT = DFF_DMY, - DF_SCENT = DFF_DMYY, - DF_LMON = DFF_DMMYY, - DF_LMONTH = DFF_DMMMYY, - DF_LDAYMON = DFF_DDMMMYY, - DF_LDAYMONTH= DFF_DDDMMMYY -}; - -enum SwTimeFormat -{ - TF_BEGIN, - TF_SYSTEM=TF_BEGIN, - TF_SSMM_24, - TF_SSMM_12, - TF_END -}; - -enum SwTimeSubFormat -{ - TIME_FIX, - TIME_VAR -}; - -enum SwDateSubFormat -{ - DATE_FIX, - DATE_VAR -}; - - -class SwDateTimeFieldType : public SwValueFieldType -{ -public: - SwDateTimeFieldType(SwDoc* pDoc); - - virtual SwFieldType* Copy() const; -}; - - -class SW_DLLPUBLIC SwDateTimeField : public SwValueField -{ - sal_uInt16 nSubType; - long nOffset; // Offset in minutes. - - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - SwDateTimeField(SwDateTimeFieldType* pType, sal_uInt16 nSubType = DATEFLD, - sal_uLong nFmt = 0, sal_uInt16 nLng = 0); - - virtual sal_uInt16 GetSubType() const; - virtual void SetSubType(sal_uInt16 nSub); - - virtual double GetValue() const; - - virtual void SetPar2(const String& rStr); - virtual String GetPar2() const; - - inline sal_Bool IsDate() const - { return (nSubType & DATEFLD) != 0; } - - inline void SetOffset(long nMinutes) { nOffset = nMinutes; } - inline long GetOffset() const { return nOffset; } - - Date GetDate(sal_Bool bUseOffset = sal_False) const; - Time GetTime(sal_Bool bUseOffset = sal_False) const; - void SetDateTime(const DateTime& rDT); - static double GetDateTime(SwDoc* pDoc, const DateTime& rDT); - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId ); -}; - -#endif // SW_FLDDAT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx deleted file mode 100644 index dda1c0f6fb..0000000000 --- a/sw/inc/flddropdown.hxx +++ /dev/null @@ -1,277 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_FLDDROPDOWN_HXX -#define SW_FLDDROPDOWN_HXX - -#include "com/sun/star/uno/Sequence.hxx" -#include "swdllapi.h" -#include "fldbas.hxx" - -#include <vector> - -/** - Field type for dropdown boxes. -*/ -class SwDropDownFieldType : public SwFieldType -{ -public: - /** - Constructor - */ - SwDropDownFieldType(); - - /** - Destructor - */ - virtual ~SwDropDownFieldType(); - - /** - Create a copy of this field type. - - @return a copy of this type - */ - virtual SwFieldType * Copy () const; -}; - -/** - Dropdown field. - - The dropdown field contains a list of strings. At most one of them - can be selected. -*/ -class SW_DLLPUBLIC SwDropDownField : public SwField -{ - /** - the possible values (aka items) of the dropdown box - */ - std::vector<String> aValues; - - /** - the selected item - */ - String aSelectedItem; - - /** - the name of the field - */ - String aName; - - /** - help text - */ - String aHelp; - - /** - tool tip string - */ - String aToolTip; - - /** - Expands the field. - - The expanded value of the field is the value of the selected - item. If no item is selected, an empty string is returned. - - @return the expanded value of the field - */ - virtual String Expand() const; - - /** - Creates a copy of this field. - - @return the copy of this field - */ - virtual SwField * Copy() const; - -public: - /** - Constructor - - @param pTyp field type for this field - */ - SwDropDownField(SwFieldType * pTyp); - - /** - Copy constructor - - @param rSrc dropdown field to copy - */ - SwDropDownField(const SwDropDownField & rSrc); - - /** - Destructor - */ - virtual ~SwDropDownField(); - - /** - Returns the selected value. - - @see Expand - - @return the selected value - */ - virtual const String & GetPar1() const; - - /** - Returns the name of the field. - - @return the name of the field - */ - virtual String GetPar2() const; - - /** - Sets the selected value. - - If rStr is an item of the field that item will be - selected. Otherwise no item will be selected, i.e. the - resulting selection will be empty. - */ - virtual void SetPar1(const String & rStr); - - /** - Sets the name of the field. - - @param rStr the new name of the field - */ - virtual void SetPar2(const String & rStr); - - /** - Sets the items of the dropdown box. - - After setting the items the selection will be empty. - - @param rItems the new items - */ - void SetItems(const std::vector<String> & rItems); - - /** - Sets the items of the dropdown box. - - After setting the items the selection will be empty. - - @param rItems the new items - */ - void SetItems(const com::sun::star::uno::Sequence<rtl::OUString> & rItems); - - /** - Returns the items of the dropdown box. - - @return the items of the dropdown box - */ - com::sun::star::uno::Sequence<rtl::OUString> GetItemSequence() const; - - /** - Returns the selected item. - - @return the selected item - */ - const String & GetSelectedItem() const; - - /** - Returns the name of the field. - - @return the name of the field - */ - const String & GetName() const; - - /** - Returns the help text of the field. - - @return the help text of the field - */ - const String & GetHelp() const; - - /** - Returns the tool tip of the field. - - @return the tool tip of the field - */ - const String & GetToolTip() const; - - /** - Sets the selected item. - - If rItem is found in this dropdown field it is selected. If - rItem is not found the selection will be empty. - - @param rItem the item to be set - - @retval sal_True the selected item was successfully set - @retval sal_True failure (empty selection) - */ - sal_Bool SetSelectedItem(const String & rItem); - - /** - Sets the name of the field. - - @param rName the new name of the field - */ - void SetName(const String & rName); - - /** - Sets the help text of the field. - - @param rHelp the help text - */ - void SetHelp(const String & rHelp); - - /** - Sets the tool tip of the field. - - @param rToolTip the tool tip - */ - void SetToolTip(const String & rToolTip); - - /** - API: Gets a property value from the dropdown field. - - @param rVal return value - @param nMId - - FIELD_PROP_PAR1 Get selected item (String) - - FIELD_PROP_STRINGS Get all items (Sequence) - - FIELD_PROP_PAR3 Get the help text of the field. - - FIELD_PROP_PAR4 Get the tool tip of the field. - */ - virtual bool QueryValue(com::sun::star::uno::Any &rVal, sal_uInt16 nWhichId) const; - - /** - API: Sets a property value on the dropdown field. - - @param rVal value to set - @param nMId - - FIELD_PROP_PAR1 Set selected item (String) - - FIELD_PROP_STRINGS Set all items (Sequence) - - FIELD_PROP_PAR3 Set the help text of the field. - - FIELD_PROP_PAR4 Set the tool tip of the field. - */ - virtual bool PutValue(const com::sun::star::uno::Any &rVal, sal_uInt16 nWhichId); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fldinit.hxx b/sw/inc/fldinit.hxx deleted file mode 100644 index 22441403bc..0000000000 --- a/sw/inc/fldinit.hxx +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FLDINIT_HXX -#define _FLDINIT_HXX - -//Table for FieldInfo. - -void InitFieldInfo(); -void FinitFieldInfo(); - - -#endif // _FLDINIT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fldui.hrc b/sw/inc/fldui.hrc deleted file mode 100644 index e0fcdccf23..0000000000 --- a/sw/inc/fldui.hrc +++ /dev/null @@ -1,292 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FLDUI_HRC -#define _FLDUI_HRC - -#include "rcid.hrc" - - -#define DLG_FLD RC_FLDDLG_BEGIN -#define DLG_RECORD_MRG (RC_FLDDLG_BEGIN + 1) -#define DLG_RECORD_INS (RC_FLDDLG_BEGIN + 2) -#define DLG_FLD_EDIT (RC_FLDDLG_BEGIN + 3) -#define DLG_POSTIT (RC_FLDDLG_BEGIN + 4) -#define DLG_FLD_INPUT (RC_FLDDLG_BEGIN + 5) -#define DLG_BRCFG (RC_FLDDLG_BEGIN + 6) -#define DLG_BRSEEK (RC_FLDDLG_BEGIN + 7) -#define DLG_BRSORT (RC_FLDDLG_BEGIN + 8) -#define DLG_CHANGE_DB (RC_FLDDLG_BEGIN + 9) -#define DLG_JAVAEDIT (RC_FLDDLG_BEGIN + 10) -#define DLG_FLD_INSERT (RC_FLDDLG_BEGIN + 11) -#define DLG_FLD_DROPDOWN (RC_FLDDLG_BEGIN + 12) - -/*-------------------------------------------------------------------- - TypeId - --------------------------------------------------------------------*/ - -#define STR_TYPE_BEGIN RC_FLDDLG_BEGIN -#define STR_DATEFLD STR_TYPE_BEGIN -#define STR_TIMEFLD (STR_TYPE_BEGIN + 1) -#define STR_FILENAMEFLD (STR_TYPE_BEGIN + 2) -#define STR_DBNAMEFLD (STR_TYPE_BEGIN + 3) -#define STR_CHAPTERFLD (STR_TYPE_BEGIN + 4) -#define STR_PAGENUMBERFLD (STR_TYPE_BEGIN + 5) -#define STR_DOCSTATFLD (STR_TYPE_BEGIN + 6) -#define STR_AUTHORFLD (STR_TYPE_BEGIN + 7) -#define STR_SETFLD (STR_TYPE_BEGIN + 8) -#define STR_GETFLD (STR_TYPE_BEGIN + 9) -#define STR_FORMELFLD (STR_TYPE_BEGIN + 10) -#define STR_CONDTXTFLD (STR_TYPE_BEGIN + 11) -#define STR_SETREFFLD (STR_TYPE_BEGIN + 12) -#define STR_GETREFFLD (STR_TYPE_BEGIN + 13) -#define STR_DDEFLD (STR_TYPE_BEGIN + 14) -#define STR_MACROFLD (STR_TYPE_BEGIN + 15) -#define STR_INPUTFLD (STR_TYPE_BEGIN + 16) -#define STR_DOCINFOFLD (STR_TYPE_BEGIN + 17) -#define STR_DBFLD (STR_TYPE_BEGIN + 19) -#define STR_USERFLD (STR_TYPE_BEGIN + 20) -#define STR_POSTITFLD (STR_TYPE_BEGIN + 21) -#define STR_HIDDENPARAFLD (STR_TYPE_BEGIN + 22) - -#define STR_TEMPLNAMEFLD (STR_TYPE_BEGIN + 24) -#define STR_SEQFLD (STR_TYPE_BEGIN + 25) -#define STR_DBNEXTSETFLD (STR_TYPE_BEGIN + 26) -#define STR_DBNUMSETFLD (STR_TYPE_BEGIN + 27) -#define STR_DBSETNUMBERFLD (STR_TYPE_BEGIN + 28) -#define STR_PREVPAGEFLD (STR_TYPE_BEGIN + 29) -#define STR_NEXTPAGEFLD (STR_TYPE_BEGIN + 30) -#define STR_HIDDENTXTFLD (STR_TYPE_BEGIN + 31) -#define STR_EXTUSERFLD (STR_TYPE_BEGIN + 32) -#define STR_SETINPUTFLD (STR_TYPE_BEGIN + 33) -#define STR_USRINPUTFLD (STR_TYPE_BEGIN + 34) -#define STR_SETREFPAGEFLD (STR_TYPE_BEGIN + 35) -#define STR_GETREFPAGEFLD (STR_TYPE_BEGIN + 36) -#define STR_INTERNETFLD (STR_TYPE_BEGIN + 37) -#define STR_JUMPEDITFLD (STR_TYPE_BEGIN + 38) -#define STR_SCRIPTFLD (STR_TYPE_BEGIN + 39) -#define STR_AUTHORITY (STR_TYPE_BEGIN + 40) -#define STR_COMBINED_CHARS (STR_TYPE_BEGIN + 41) -#define STR_DROPDOWN (STR_TYPE_BEGIN + 42) -#define STR_CUSTOM (STR_TYPE_BEGIN + 43) -#define STR_TYPE_END (STR_TYPE_BEGIN + 44) - -/*-------------------------------------------------------------------- - SubTypes - --------------------------------------------------------------------*/ - -#define FLD_DATE_BEGIN STR_TYPE_END -#define FLD_DATE_FIX FLD_DATE_BEGIN -#define FLD_DATE_STD (FLD_DATE_BEGIN + 1) -#define FLD_DATE_END (FLD_DATE_BEGIN + 2) - -#define FLD_TIME_BEGIN FLD_DATE_END -#define FLD_TIME_FIX FLD_TIME_BEGIN -#define FLD_TIME_STD (FLD_TIME_BEGIN + 1) -#define FLD_TIME_END (FLD_TIME_BEGIN + 2) - -#define FLD_STAT_BEGIN FLD_TIME_END -#define FLD_STAT_PAGE FLD_STAT_BEGIN -#define FLD_STAT_PARA (FLD_STAT_BEGIN + 1) -#define FLD_STAT_WORD (FLD_STAT_BEGIN + 2) -#define FLD_STAT_CHAR (FLD_STAT_BEGIN + 3) -#define FLD_STAT_TABLE (FLD_STAT_BEGIN + 4) -#define FLD_STAT_GRF (FLD_STAT_BEGIN + 5) -#define FLD_STAT_OBJ (FLD_STAT_BEGIN + 6) -#define FLD_STAT_END (FLD_STAT_BEGIN + 7) - -#define FLD_INPUT_BEGIN FLD_STAT_END -#define FLD_INPUT_TEXT FLD_INPUT_BEGIN -#define FLD_INPUT_END (FLD_INPUT_BEGIN + 1) - -#define FLD_EU_BEGIN FLD_INPUT_END -#define FLD_EU_FIRMA FLD_EU_BEGIN -#define FLD_EU_VORNAME (FLD_EU_BEGIN + 1) -#define FLD_EU_NAME (FLD_EU_BEGIN + 2) -#define FLD_EU_ABK (FLD_EU_BEGIN + 3) -#define FLD_EU_STRASSE (FLD_EU_BEGIN + 4) -#define FLD_EU_LAND (FLD_EU_BEGIN + 5) -#define FLD_EU_PLZ (FLD_EU_BEGIN + 6) -#define FLD_EU_ORT (FLD_EU_BEGIN + 7) -#define FLD_EU_TITEL (FLD_EU_BEGIN + 8) -#define FLD_EU_POS (FLD_EU_BEGIN + 9) -#define FLD_EU_TELPRIV (FLD_EU_BEGIN + 10) -#define FLD_EU_TELFIRMA (FLD_EU_BEGIN + 11) -#define FLD_EU_FAX (FLD_EU_BEGIN + 12) -#define FLD_EU_EMAIL (FLD_EU_BEGIN + 13) -#define FLD_EU_STATE (FLD_EU_BEGIN + 14) -#define FLD_EU_END (FLD_EU_BEGIN + 15) - -#define FLD_PAGEREF_BEGIN FLD_EU_END -#define FLD_PAGEREF_OFF FLD_PAGEREF_BEGIN -#define FLD_PAGEREF_ON (FLD_PAGEREF_BEGIN+1) -#define FLD_PAGEREF_END (FLD_PAGEREF_BEGIN+2) - -/*---------------------------------------------------------- - Format-Id's - ----------------------------------------------------------*/ -// Text -#define FMT_TEXT FLD_PAGEREF_END - -// Numbers -#define FMT_NUM_BEGIN (FMT_TEXT + 1) -#define FMT_NUM_ABC FMT_NUM_BEGIN -#define FMT_NUM_SABC (FMT_NUM_BEGIN + 1) -#define FMT_NUM_ABC_N (FMT_NUM_BEGIN + 2) -#define FMT_NUM_SABC_N (FMT_NUM_BEGIN + 3) -#define FMT_NUM_ROMAN (FMT_NUM_BEGIN + 4) -#define FMT_NUM_SROMAN (FMT_NUM_BEGIN + 5) -#define FMT_NUM_ARABIC (FMT_NUM_BEGIN + 6) -#define FMT_NUM_PAGEDESC (FMT_NUM_BEGIN + 7) -#define FMT_NUM_PAGESPECIAL (FMT_NUM_BEGIN + 8) -#define FMT_NUM_END (FMT_NUM_BEGIN + 9) - -// AuthorFormat -#define FMT_AUTHOR_BEGIN FMT_NUM_END -#define FMT_AUTHOR_NAME FMT_AUTHOR_BEGIN -#define FMT_AUTHOR_SCUT (FMT_AUTHOR_BEGIN + 1) -#define FMT_AUTHOR_END (FMT_AUTHOR_BEGIN + 2) - -// Set variable -#define FMT_SETVAR_BEGIN FMT_AUTHOR_END -#define FMT_SETVAR_SYS (FMT_SETVAR_BEGIN + 0) -#define FMT_SETVAR_TEXT (FMT_SETVAR_BEGIN + 1) -#define FMT_SETVAR_END (FMT_SETVAR_BEGIN + 2) - -// Get variable -#define FMT_GETVAR_BEGIN FMT_SETVAR_END -#define FMT_GETVAR_TEXT (FMT_GETVAR_BEGIN + 0) -#define FMT_GETVAR_NAME (FMT_GETVAR_BEGIN + 1) -#define FMT_GETVAR_END (FMT_GETVAR_BEGIN + 2) - -// Userfield -#define FMT_USERVAR_BEGIN FMT_GETVAR_END -#define FMT_USERVAR_TEXT (FMT_USERVAR_BEGIN + 0) -#define FMT_USERVAR_CMD (FMT_USERVAR_BEGIN + 1) -#define FMT_USERVAR_END (FMT_USERVAR_BEGIN + 2) - -// Database field -#define FMT_DBFLD_BEGIN FMT_USERVAR_END -#define FMT_DBFLD_DB (FMT_DBFLD_BEGIN + 0) -#define FMT_DBFLD_SYS (FMT_DBFLD_BEGIN + 1) -#define FMT_DBFLD_END (FMT_DBFLD_BEGIN + 2) - -//FileNameFormat -// Attention, the last 4 formats do not exist in RTF (loss!) -#define FMT_FF_BEGIN FMT_DBFLD_END -#define FMT_FF_NAME FMT_FF_BEGIN -#define FMT_FF_PATHNAME (FMT_FF_BEGIN + 1) -#define FMT_FF_PATH (FMT_FF_BEGIN + 2) -#define FMT_FF_NAME_NOEXT (FMT_FF_BEGIN + 3) -#define FMT_FF_UI_NAME (FMT_FF_BEGIN + 4) -#define FMT_FF_UI_RANGE (FMT_FF_BEGIN + 5) -#define FMT_FF_END (FMT_FF_BEGIN + 6) - -// Registry-Format -#define FMT_REG_BEGIN FMT_FF_END -#define FMT_REG_AUTHOR FMT_REG_BEGIN -#define FMT_REG_TIME (FMT_REG_BEGIN + 1) -#define FMT_REG_DATE (FMT_REG_BEGIN + 2) -#define FMT_REG_END (FMT_REG_BEGIN + 3) - -// Chapter -#define FMT_CHAPTER_BEGIN FMT_REG_END -#define FMT_CHAPTER_NO FMT_CHAPTER_BEGIN -#define FMT_CHAPTER_NAME (FMT_CHAPTER_BEGIN + 1) -#define FMT_CHAPTER_NAMENO (FMT_CHAPTER_BEGIN + 2) -#define FMT_CHAPTER_NO_NOSEPARATOR (FMT_CHAPTER_BEGIN + 3) -#define FMT_CHAPTER_END (FMT_CHAPTER_BEGIN + 4) - -// DDE-Formats -#define FMT_DDE_BEGIN FMT_CHAPTER_END -#define FMT_DDE_NORMAL FMT_DDE_BEGIN -#define FMT_DDE_HOT (FMT_DDE_BEGIN + 1) -#define FMT_DDE_END (FMT_DDE_BEGIN + 2) - -#define FMT_REF_BEGIN FMT_DDE_END -#define FMT_REF_PAGE FMT_REF_BEGIN -#define FMT_REF_CHAPTER (FMT_REF_BEGIN + 1) -#define FMT_REF_TEXT (FMT_REF_BEGIN + 2) -#define FMT_REF_UPDOWN (FMT_REF_BEGIN + 3) -#define FMT_REF_PAGE_PGDSC (FMT_REF_BEGIN + 4) -#define FMT_REF_ONLYNUMBER (FMT_REF_BEGIN + 5) -#define FMT_REF_ONLYCAPTION (FMT_REF_BEGIN + 6) -#define FMT_REF_ONLYSEQNO (FMT_REF_BEGIN + 7) -#define FMT_REF_NUMBER (FMT_REF_BEGIN + 8) -#define FMT_REF_NUMBER_NO_CONTEXT (FMT_REF_BEGIN + 9) -#define FMT_REF_NUMBER_FULL_CONTEXT (FMT_REF_BEGIN + 10) -#define FMT_REF_END (FMT_REF_BEGIN + 11) - -// Placeholder -#define FMT_MARK_BEGIN FMT_REF_END -#define FMT_MARK_TEXT FMT_MARK_BEGIN -#define FMT_MARK_TABLE (FMT_MARK_BEGIN + 1) -#define FMT_MARK_FRAME (FMT_MARK_BEGIN + 2) -#define FMT_MARK_GRAFIC (FMT_MARK_BEGIN + 3) -#define FMT_MARK_OLE (FMT_MARK_BEGIN + 4) -#define FMT_MARK_END (FMT_MARK_BEGIN + 5) - -/*-------------------------------------------------------------------- - Global String-Resources - --------------------------------------------------------------------*/ - -#define STR_FLDUI FMT_MARK_END -#define STR_INSERT STR_FLDUI -#define STR_ALL (STR_FLDUI + 1) -#define STR_EXTRA (STR_FLDUI + 2) - -/*-------------------------------------------------------------------- - Buttons for Field-Edit-Dlg - --------------------------------------------------------------------*/ - -#define BTN_FLDEDT_PREV STR_EXTRA -#define BTN_FLDEDT_NEXT (STR_EXTRA + 1) -#define PB_FLDEDT_ADDRESS (STR_EXTRA + 2) - -/*-------------------------------------------------------------------- - Additional Strings - --------------------------------------------------------------------*/ - -#define STR_COND STR_EXTRA -#define STR_TEXT (STR_EXTRA + 1) -#define STR_DDE_CMD (STR_EXTRA + 2) -#define STR_INSTEXT (STR_EXTRA + 3) -#define STR_COMBCHRS_FT (STR_EXTRA + 4) -#define STR_PROMPT (STR_EXTRA + 5) -#define STR_MACNAME (STR_EXTRA + 6) -#define STR_SETNO (STR_EXTRA + 7) -#define STR_OFFSET (STR_EXTRA + 8) -#define STR_VALUE (STR_EXTRA + 9) - -#define STR_URLPROMPT (STR_EXTRA + 11) -#define STR_FORMULA (STR_EXTRA + 12) -#define STR_ALL_DATABASE (STR_EXTRA + 13) -#define STR_FLD_EDIT_DLG (STR_EXTRA + 14) - -#define FLDDLG_ACT_END (STR_FLD_EDIT_DLG) - - -#endif diff --git a/sw/inc/fldupde.hxx b/sw/inc/fldupde.hxx deleted file mode 100644 index d53d06e0cd..0000000000 --- a/sw/inc/fldupde.hxx +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FLDUPDE_HXX -#define _FLDUPDE_HXX - -enum SwFldUpdateFlags -{ - AUTOUPD_OFF, - AUTOUPD_FIELD_ONLY, - AUTOUPD_FIELD_AND_CHARTS, - AUTOUPD_GLOBALSETTING -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/flyenum.hxx b/sw/inc/flyenum.hxx deleted file mode 100644 index 0923ef9eef..0000000000 --- a/sw/inc/flyenum.hxx +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FLYENUM_HXX -#define _FLYENUM_HXX - -enum FlyCntType -{ - FLYCNTTYPE_ALL = 0, - FLYCNTTYPE_FRM, - FLYCNTTYPE_GRF, - FLYCNTTYPE_OLE - -}; - -// Return values for chainable and chain. -#define SW_CHAIN_OK 0 -#define SW_CHAIN_NOT_EMPTY 1 // Only empty frames may be connected. -#define SW_CHAIN_IS_IN_CHAIN 2 // Destination already in chain. -#define SW_CHAIN_WRONG_AREA 3 // Destination in section where it shouldn't be - // (header, footer). -#define SW_CHAIN_NOT_FOUND 4 // Destination and/or source not found. -#define SW_CHAIN_SOURCE_CHAINED 5 // Source already has a follow. -#define SW_CHAIN_SELF 6 // Self-chaining is not allowed. - - - -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/flypos.hxx b/sw/inc/flypos.hxx deleted file mode 100644 index 100559e900..0000000000 --- a/sw/inc/flypos.hxx +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FLYPOS_HXX -#define _FLYPOS_HXX - - -#include <svl/svarray.hxx> -#include <swdllapi.h> - -class SwFrmFmt; -class SwNodeIndex; - - -// For querying current flys in document. -class SW_DLLPUBLIC SwPosFlyFrm -{ - const SwFrmFmt* pFrmFmt; // FlyFrmFmt - SwNodeIndex* pNdIdx; // Index for node is sufficient. - sal_uInt32 nOrdNum; -public: - SwPosFlyFrm( const SwNodeIndex& , const SwFrmFmt*, sal_uInt16 nArrPos ); - virtual ~SwPosFlyFrm(); // Virtual for Writer (DLL !!) - - // Operators for sort array. - sal_Bool operator==( const SwPosFlyFrm& ); - sal_Bool operator<( const SwPosFlyFrm& ); - - const SwFrmFmt& GetFmt() const { return *pFrmFmt; } - const SwNodeIndex& GetNdIndex() const { return *pNdIdx; } - sal_uInt32 GetOrdNum() const { return nOrdNum; } -}; - -typedef SwPosFlyFrm* SwPosFlyFrmPtr; -SV_DECL_PTRARR_SORT_VISIBILITY( SwPosFlyFrms, SwPosFlyFrmPtr, 0, 40, SW_DLLPUBLIC ) - -#endif // _FLYPOS_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx deleted file mode 100644 index 6ea649856a..0000000000 --- a/sw/inc/fmtanchr.hxx +++ /dev/null @@ -1,92 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTANCHR_HXX -#define _FMTANCHR_HXX - -#include "swdllapi.h" -#include <hintids.hxx> -#include <swtypes.hxx> -#include <format.hxx> -#include <svl/poolitem.hxx> - -struct SwPosition; -class IntlWrapper; -#define IVER_FMTANCHOR_LONGIDX ((sal_uInt16)1) - -// FlyAnchors -class SW_DLLPUBLIC SwFmtAnchor: public SfxPoolItem -{ - SwPosition *pCntntAnchor; // 0 for page-bound frames. - // Index for paragraph-bound frames. - // Position for character-bound frames. - RndStdIds nAnchorId; - sal_uInt16 nPageNum; // Page number for page-bound frames. - - // #i28701# - getting anchor positions ordered - sal_uInt32 mnOrder; - static sal_uInt32 mnOrderCounter; - -public: - SwFmtAnchor( RndStdIds eRnd = FLY_AT_PAGE, sal_uInt16 nPageNum = 0 ); - SwFmtAnchor( const SwFmtAnchor &rCpy ); - ~SwFmtAnchor(); - - SwFmtAnchor &operator=( const SwFmtAnchor& ); - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - RndStdIds GetAnchorId() const { return nAnchorId; } - sal_uInt16 GetPageNum() const { return nPageNum; } - const SwPosition *GetCntntAnchor() const { return pCntntAnchor; } - // #i28701# - sal_uInt32 GetOrder() const; - - void SetType( RndStdIds nRndId ) { nAnchorId = nRndId; } - void SetPageNum( sal_uInt16 nNew ) { nPageNum = nNew; } - void SetAnchor( const SwPosition *pPos ); -}; - -inline const SwFmtAnchor &SwAttrSet::GetAnchor(sal_Bool bInP) const - { return static_cast<const SwFmtAnchor&>(Get(RES_ANCHOR, bInP)); } - - inline const SwFmtAnchor &SwFmt::GetAnchor(sal_Bool bInP) const - { return aSet.GetAnchor(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx deleted file mode 100644 index 288fcd035d..0000000000 --- a/sw/inc/fmtautofmt.hxx +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTAUTOFMT_HXX -#define _FMTAUTOFMT_HXX - - -#include <svl/poolitem.hxx> -#include <format.hxx> -#include <boost/shared_ptr.hpp> - -// ATT_AUTOFMT ********************************************* - - -class SwFmtAutoFmt: public SfxPoolItem -{ - boost::shared_ptr<SfxItemSet> mpHandle; - -public: - SwFmtAutoFmt( sal_uInt16 nWhich = RES_TXTATR_AUTOFMT ); - - // single argument ctors shall be explicit. - virtual ~SwFmtAutoFmt(); - - // @@@ public copy ctor, but no copy assignment? - SwFmtAutoFmt( const SwFmtAutoFmt& rAttr ); -private: - // @@@ public copy ctor, but no copy assignment? - SwFmtAutoFmt & operator= (const SwFmtAutoFmt &); -public: - - TYPEINFO(); - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - void SetStyleHandle( boost::shared_ptr<SfxItemSet> pHandle ) { mpHandle = pHandle; } - const boost::shared_ptr<SfxItemSet> GetStyleHandle() const { return mpHandle; } - boost::shared_ptr<SfxItemSet> GetStyleHandle() { return mpHandle; } -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx deleted file mode 100644 index ed9712f50e..0000000000 --- a/sw/inc/fmtclbl.hxx +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTCLBL_HXX -#define _FMTCLBL_HXX - - -#include <svl/eitem.hxx> -#include <hintids.hxx> -#include <format.hxx> -#include "swdllapi.h" - -class SW_DLLPUBLIC SwFmtNoBalancedColumns : public SfxBoolItem -{ -public: - SwFmtNoBalancedColumns( sal_Bool bFlag = sal_False ) - : SfxBoolItem( RES_COLUMNBALANCE, bFlag ) {} - - // "pure virtual methods" of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; -}; - - -inline const SwFmtNoBalancedColumns &SwAttrSet::GetBalancedColumns(sal_Bool bInP) const - { return (const SwFmtNoBalancedColumns&)Get( RES_COLUMNBALANCE, bInP ); } - -inline const SwFmtNoBalancedColumns &SwFmt::GetBalancedColumns(sal_Bool bInP) const - { return aSet.GetBalancedColumns( bInP ); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx deleted file mode 100644 index 5f62ae95a0..0000000000 --- a/sw/inc/fmtclds.hxx +++ /dev/null @@ -1,180 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTCLDS_HXX -#define _FMTCLDS_HXX - -#include <editeng/borderline.hxx> -#include <tools/color.hxx> -#include <svl/poolitem.hxx> -#include "swdllapi.h" -#include <hintids.hxx> -#include <format.hxx> - -// ColumnDescriptor -class SwColumn -{ - sal_uInt16 nWish; // Desired width, borders included. - // It is inversely proportional to the ratio of - // desired width environment / current width column. - sal_uInt16 nUpper; // Top border. - sal_uInt16 nLower; // Bottom border. - sal_uInt16 nLeft; // Left border. - sal_uInt16 nRight; // Right border. - -public: - SwColumn(); - - sal_Bool operator==( const SwColumn & ); - - - void SetWishWidth( sal_uInt16 nNew ) { nWish = nNew; } - void SetUpper( sal_uInt16 nNew ) { nUpper = nNew; } - void SetLower( sal_uInt16 nNew ) { nLower = nNew; } - void SetLeft ( sal_uInt16 nNew ) { nLeft = nNew; } - void SetRight( sal_uInt16 nNew ) { nRight = nNew; } - - sal_uInt16 GetWishWidth() const { return nWish; } - sal_uInt16 GetUpper() const { return nUpper; } - sal_uInt16 GetLower() const { return nLower; } - sal_uInt16 GetLeft () const { return nLeft; } - sal_uInt16 GetRight() const { return nRight; } -}; - -typedef SwColumn* SwColumnPtr; -SV_DECL_PTRARR_DEL( SwColumns, SwColumnPtr, 0, 2 ) - -enum SwColLineAdj -{ - COLADJ_NONE, - COLADJ_TOP, - COLADJ_CENTER, - COLADJ_BOTTOM -}; - -class SW_DLLPUBLIC SwFmtCol : public SfxPoolItem -{ - editeng::SvxBorderStyle eLineStyle; //style of the separator line - sal_uLong nLineWidth; // Width of the separator line. - Color aLineColor; // Color of the separator line. - - sal_uInt16 nLineHeight; // Percentile height of lines. - // (Based on height of columns including UL). - - SwColLineAdj eAdj; // Line will be adjusted top, centered or bottom. - - SwColumns aColumns; // Information concerning the columns. - sal_uInt16 nWidth; // Total desired width of all columns. - - sal_Bool bOrtho; // Only if this flag is set, the setting of GutterWidth will - // be accompanied by a "visual rearrangement". - // The flag must be reset if widths of columns or borders are changed. - // When it is set (again) the visual arrangement is recalculated. - // The flag is initially set. - - SW_DLLPRIVATE void Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct ); - -public: - SwFmtCol(); - SwFmtCol( const SwFmtCol& ); - ~SwFmtCol(); - - SwFmtCol& operator=( const SwFmtCol& ); - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - const SwColumns &GetColumns() const { return aColumns; } - SwColumns &GetColumns() { return aColumns; } - sal_uInt16 GetNumCols() const { return aColumns.Count(); } - - editeng::SvxBorderStyle GetLineStyle() const { return eLineStyle;} - sal_uLong GetLineWidth() const { return nLineWidth;} - const Color& GetLineColor() const { return aLineColor;} - - - SwColLineAdj GetLineAdj() const { return eAdj; } - sal_Bool IsOrtho() const { return bOrtho; } - sal_uInt16 GetWishWidth() const { return nWidth; } - sal_uInt8 GetLineHeight()const { return nLineHeight; } - - // Return USHRT_MAX if ambiguous. - // Return smallest width if bMin is true. - sal_uInt16 GetGutterWidth( sal_Bool bMin = sal_False ) const; - - void SetLineStyle(editeng::SvxBorderStyle eStyle) { eLineStyle = eStyle;} - void SetLineWidth(sal_uLong nLWidth) { nLineWidth = nLWidth;} - void SetLineColor(const Color& rCol ) { aLineColor = rCol;} - void SetLineHeight( sal_uInt8 nNew ) { nLineHeight = nNew; } - void SetLineAdj( SwColLineAdj eNew ){ eAdj = eNew; } - void SetWishWidth( sal_uInt16 nNew ) { nWidth = nNew; } - - // This function allows to (repeatedly) initialize the columns. - // The Ortho flag is set automatically. - void Init( sal_uInt16 nNumCols, sal_uInt16 nGutterWidth, sal_uInt16 nAct ); - - // Adjusts borders for columns in aColumns. - // If flag bOrtho is set, columns are visually re-arranged. - // If the flag is not set, columns widths are not changed and - // borders are adjusted. - void SetGutterWidth( sal_uInt16 nNew, sal_uInt16 nAct ); - - // This too re-arranges columns automatically if flag is set. - // Only in this case the second parameter is needed and evaluated. - void SetOrtho( sal_Bool bNew, sal_uInt16 nGutterWidth, sal_uInt16 nAct ); - - //For the reader - void _SetOrtho( sal_Bool bNew ) { bOrtho = bNew; } - - // Calculates current width of column nCol. - // The ratio of desired width of this column to return value is - // proportional to ratio of total desired value to nAct. - sal_uInt16 CalcColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const; - - // As above except that it returns the width of PrtArea - - // that corresponds to what constitutes the column for the user. - sal_uInt16 CalcPrtColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const; -}; - -inline const SwFmtCol &SwAttrSet::GetCol(sal_Bool bInP) const - { return (const SwFmtCol&)Get( RES_COL,bInP); } - -inline const SwFmtCol &SwFmt::GetCol(sal_Bool bInP) const - { return aSet.GetCol(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx deleted file mode 100644 index 744a5b9be6..0000000000 --- a/sw/inc/fmtcnct.hxx +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTCNCT_HXX -#define _FMTCNCT_HXX - -#include <hintids.hxx> -#include <svl/poolitem.hxx> -#include <format.hxx> -#include <calbck.hxx> - - -class SwFlyFrmFmt; -class IntlWrapper; - -// Connection (text flow) between two FlyFrms. -class SW_DLLPUBLIC SwFmtChain: public SfxPoolItem -{ - SwClient aPrev, // Previous SwFlyFrmFmt (if existent). - aNext; // Next SwFlyFrmFmt (if existent). - - -public: - SwFmtChain() : SfxPoolItem( RES_CHAIN ) {} - SwFmtChain( const SwFmtChain &rCpy ); - - inline SwFmtChain &operator=( const SwFmtChain& ); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - - SwFlyFrmFmt* GetPrev() const { return (SwFlyFrmFmt*)aPrev.GetRegisteredIn(); } - SwFlyFrmFmt* GetNext() const { return (SwFlyFrmFmt*)aNext.GetRegisteredIn(); } - - - void SetPrev( SwFlyFrmFmt *pFmt ); - void SetNext( SwFlyFrmFmt *pFmt ); -}; - -SwFmtChain &SwFmtChain::operator=( const SwFmtChain &rCpy ) -{ - SetPrev( rCpy.GetPrev() ); - SetNext( rCpy.GetNext() ); - return *this; -} - - -inline const SwFmtChain &SwAttrSet::GetChain(sal_Bool bInP) const - { return (const SwFmtChain&)Get( RES_CHAIN,bInP); } - -inline const SwFmtChain &SwFmt::GetChain(sal_Bool bInP) const - { return aSet.GetChain(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx deleted file mode 100644 index 595ced5a21..0000000000 --- a/sw/inc/fmtcntnt.hxx +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTCNTNT_HXX -#define _FMTCNTNT_HXX - -#include <svl/poolitem.hxx> -#include <hintids.hxx> -#include <format.hxx> - -class SwNodeIndex; -class SwStartNode; - - -// Cntnt, content of frame (header, footer, fly). -class SW_DLLPUBLIC SwFmtCntnt: public SfxPoolItem -{ - SwNodeIndex *pStartNode; - - SwFmtCntnt &operator=( const SwFmtCntnt & ); // Copying not allowed. - -public: - SwFmtCntnt( const SwStartNode* pStartNode = 0 ); - SwFmtCntnt( const SwFmtCntnt &rCpy ); - ~SwFmtCntnt(); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - - const SwNodeIndex *GetCntntIdx() const { return pStartNode; } - void SetNewCntntIdx( const SwNodeIndex *pIdx ); -}; - -inline const SwFmtCntnt &SwAttrSet::GetCntnt(sal_Bool bInP) const - { return (const SwFmtCntnt&)Get( RES_CNTNT,bInP); } - -inline const SwFmtCntnt &SwFmt::GetCntnt(sal_Bool bInP) const - { return aSet.GetCntnt(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx deleted file mode 100644 index 1f6f10004d..0000000000 --- a/sw/inc/fmtcol.hxx +++ /dev/null @@ -1,278 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTCOL_HXX -#define _FMTCOL_HXX - -#include <svl/svarray.hxx> -#include "swdllapi.h" -#include <format.hxx> -#include <swtypes.hxx> // For MAXLEVEL. - -class SwDoc; // For friend. - -class SwFmtColl : public SwFmt -{ -protected: - SwFmtColl( SwAttrPool& rPool, const sal_Char* pFmtName, - const sal_uInt16* pWhichRanges, SwFmtColl* pDerFrom, - sal_uInt16 nFmtWhich ) - : SwFmt( rPool, pFmtName, pWhichRanges, pDerFrom, nFmtWhich ) - { SetAuto( sal_False ); } - - SwFmtColl( SwAttrPool& rPool, const String &rFmtName, - const sal_uInt16* pWhichRanges, SwFmtColl* pDerFrom, - sal_uInt16 nFmtWhich ) - : SwFmt( rPool, rFmtName, pWhichRanges, pDerFrom, nFmtWhich ) - { SetAuto( sal_False ); } - -private: - - // For now don't copy and don't assign. - SwFmtColl(const SwFmtColl & ); - const SwFmtColl &operator=(const SwFmtColl &); -}; - -class SW_DLLPUBLIC SwTxtFmtColl: public SwFmtColl -{ - friend class SwDoc; - - SwTxtFmtColl(const SwTxtFmtColl & rRef); - - bool mbStayAssignedToListLevelOfOutlineStyle; - -protected: - - bool mbAssignedToOutlineStyle; - - SwTxtFmtColl *pNextTxtFmtColl; - - SwTxtFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName, - SwTxtFmtColl* pDerFrom = 0, - sal_uInt16 nFmtWh = RES_TXTFMTCOLL ) - : SwFmtColl( rPool, pFmtCollName, aTxtFmtCollSetRange, - pDerFrom, nFmtWh ), - mbStayAssignedToListLevelOfOutlineStyle( false ), - - mbAssignedToOutlineStyle(false) - { pNextTxtFmtColl = this; } - - SwTxtFmtColl( SwAttrPool& rPool, const String &rFmtCollName, - SwTxtFmtColl* pDerFrom = 0, - sal_uInt16 nFmtWh = RES_TXTFMTCOLL ) - : SwFmtColl( rPool, rFmtCollName, aTxtFmtCollSetRange, - pDerFrom, nFmtWh ), - - mbStayAssignedToListLevelOfOutlineStyle( false ), - - mbAssignedToOutlineStyle(false) - { pNextTxtFmtColl = this; } - - // To get UL- / LR- / FontHeight-changes. - virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ); - -public: - - TYPEINFO(); // Already in base class Client. - - inline void SetNextTxtFmtColl(SwTxtFmtColl& rNext); - SwTxtFmtColl& GetNextTxtFmtColl() const { return *pNextTxtFmtColl; } - - sal_Bool IsAtDocNodeSet() const; - - void SetAttrOutlineLevel( int ); - int GetAttrOutlineLevel() const; - int GetAssignedOutlineStyleLevel() const; - inline bool IsAssignedToListLevelOfOutlineStyle() const - { - return mbAssignedToOutlineStyle; - } - void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel); - void DeleteAssignmentToListLevelOfOutlineStyle(); - - // Override to recognize changes on the <SwNumRuleItem> and register/unregister - // the paragragh style at the corresponding <SwNumRule> instance. - virtual sal_Bool SetFmtAttr( const SfxPoolItem& rAttr ); - virtual sal_Bool SetFmtAttr( const SfxItemSet& rSet ); - virtual sal_Bool ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 ); - - // Override <ResetAllFmtAttr()> to stay assigned to list level of outline style. - virtual sal_uInt16 ResetAllFmtAttr(); - - inline bool StayAssignedToListLevelOfOutlineStyle() const - { - return mbStayAssignedToListLevelOfOutlineStyle; - } - - bool AreListLevelIndentsApplicable() const; - -/* - Is the functionality of character styles at paragraph styles needed? - If so, a second Attset for char-attributes has to be created - in TextNode and here in TxtCollection in order to make both - the inheritance of and the access to set attributes function correctly! - - virtual sal_Bool SetDerivedFrom( SwFmtColl* pDerFrom = 0 ); - - inline SwCharFmt* GetCharFmt() const; - inline sal_Bool IsCharFmtSet() const; - void SetCharFmt(SwCharFmt *); - void ResetCharFmt(); - inline sal_Bool SwTxtFmtColl::IsCharFmtSet() const - { - return aCharDepend.GetRegisteredIn() ? sal_True : sal_False; - } - inline SwCharFmt* SwTxtFmtColl::GetCharFmt() const - { - return (SwCharFmt*)aCharDepend.GetRegisteredIn(); - } -*/ -}; - -typedef SwTxtFmtColl* SwTxtFmtCollPtr; -SV_DECL_PTRARR(SwTxtFmtColls,SwTxtFmtCollPtr,2,4) - -class SwGrfFmtColl: public SwFmtColl -{ - friend class SwDoc; -protected: - SwGrfFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName, - SwGrfFmtColl* pDerFrom = 0 ) - : SwFmtColl( rPool, pFmtCollName, aGrfFmtCollSetRange, - pDerFrom, RES_GRFFMTCOLL ) - {} - - SwGrfFmtColl( SwAttrPool& rPool, const String &rFmtCollName, - SwGrfFmtColl* pDerFrom = 0 ) - : SwFmtColl( rPool, rFmtCollName, aGrfFmtCollSetRange, - pDerFrom, RES_GRFFMTCOLL ) - {} - -public: - TYPEINFO(); // Already in base class Client. -}; - -typedef SwGrfFmtColl* SwGrfFmtCollPtr; -SV_DECL_PTRARR(SwGrfFmtColls,SwGrfFmtCollPtr,2,4) - -// FEATURE::CONDCOLL -// Conditional styles. -enum Master_CollConditions -{ - PARA_IN_LIST = 0x0001, - PARA_IN_OUTLINE = 0x0002, - PARA_IN_FRAME = 0x0004, - PARA_IN_TABLEHEAD = 0x0008, - PARA_IN_TABLEBODY = 0x0010, - PARA_IN_SECTION = 0x0020, - PARA_IN_FOOTENOTE = 0x0040, - PARA_IN_FOOTER = 0x0080, - PARA_IN_HEADER = 0x0100, - PARA_IN_ENDNOTE = 0x0200, - // ... - USRFLD_EXPRESSION = (int)0x8000 -}; - -class SW_DLLPUBLIC SwCollCondition : public SwClient -{ - sal_uLong nCondition; - union - { - sal_uLong nSubCondition; - String* pFldExpression; - } aSubCondition; - -public: - TYPEINFO(); // Already in base class Client. - - SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond, - sal_uLong nSubCond = 0 ); - SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond, - const String& rSubExp ); - virtual ~SwCollCondition(); - - // @@@ public copy ctor, but no copy assignment? - SwCollCondition( const SwCollCondition& rCpy ); -private: - // @@@ public copy ctor, but no copy assignment? - SwCollCondition & operator= (const SwCollCondition &); -public: - - int operator==( const SwCollCondition& rCmp ) const; - int operator!=( const SwCollCondition& rCmp ) const - { return ! (*this == rCmp); } - - sal_uLong GetCondition() const { return nCondition; } - sal_uLong GetSubCondition() const { return aSubCondition.nSubCondition; } - const String* GetFldExpression() const - { return aSubCondition.pFldExpression; } - - void SetCondition( sal_uLong nCond, sal_uLong nSubCond ); - SwTxtFmtColl* GetTxtFmtColl() const { return (SwTxtFmtColl*)GetRegisteredIn(); } - void RegisterToFormat( SwFmt& ); -}; - -typedef SwCollCondition* SwCollConditionPtr; -SV_DECL_PTRARR_DEL( SwFmtCollConditions, SwCollConditionPtr, 0, 5 ) - -class SW_DLLPUBLIC SwConditionTxtFmtColl : public SwTxtFmtColl -{ - friend class SwDoc; -protected: - SwFmtCollConditions aCondColls; - - SwConditionTxtFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName, - SwTxtFmtColl* pDerFrom = 0 ) - : SwTxtFmtColl( rPool, pFmtCollName, pDerFrom, RES_CONDTXTFMTCOLL ) - {} - SwConditionTxtFmtColl( SwAttrPool& rPool, const String &rFmtCollName, - SwTxtFmtColl* pDerFrom = 0 ) - : SwTxtFmtColl( rPool, rFmtCollName, pDerFrom, RES_CONDTXTFMTCOLL ) - {} - -public: - TYPEINFO(); // Already in base class Client. - - virtual ~SwConditionTxtFmtColl(); - - const SwCollCondition* HasCondition( const SwCollCondition& rCond ) const; - const SwFmtCollConditions& GetCondColls() const { return aCondColls; } - void InsertCondition( const SwCollCondition& rCond ); - sal_Bool RemoveCondition( const SwCollCondition& rCond ); - - void SetConditions( const SwFmtCollConditions& ); -}; - -// FEATURE::CONDCOLL -// Inline implementations. -inline void SwTxtFmtColl::SetNextTxtFmtColl( SwTxtFmtColl& rNext ) -{ - pNextTxtFmtColl = &rNext; -} -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtcolfunc.hxx b/sw/inc/fmtcolfunc.hxx deleted file mode 100644 index 81bc39653d..0000000000 --- a/sw/inc/fmtcolfunc.hxx +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTCOLFUNC_HXX -#define _FMTCOLFUNC_HXX - -class SwFmt; -class SwNumRuleItem; - -// namespace <TxtFmtCollFunc> for functions and procedures working on -// paragraph styles (instances of <SwTxtFmtColl> -namespace TxtFmtCollFunc -{ - /** Checks, if assignment of paragraph style to list level of outline style - has to be deleted, and deletes the assignment, if needed. - - #i71574# - The assignment of a paragraph style to a list level of the outline style - has to be deleted, if the numbering rule, which is set at the paragraph - style isn't the outline style. - - @author OD - */ - void CheckTxtFmtCollForDeletionOfAssignmentToOutlineStyle( - SwFmt* pFmt, - const SwNumRuleItem* pNewNumRuleItem = 0L ); - - /** determines the list style, which directly set at the given paragraph style - - @author OD - - @param rTxtFmtColl - input parameter - paragraph style for which the list style should be retrieved - - @return pointer to <SwNumRule> instance, if the given paragraph style - has directly set a list style, 0 otherwise - */ - SwNumRule* GetNumRule( SwTxtFmtColl& rTxtFmtColl ); - - /** adds the given paragraph style at the directly set list style - - Note: If the given paragraph style has no directly set list style, nothing happens - - @param rTxtFmtColl - input parameter - paragraph style which is added to its directly set list style - - @author OD - */ - void AddToNumRule( SwTxtFmtColl& rTxtFmtColl ); - - /** removes te given paragraph style from the directly set list style - - Note: If the given paragraph style has no directly set list style, nothing happens - - @param rTxtFmtColl - input parameter - paragraph style which is removed from its directly set list style - - @author OD - */ - void RemoveFromNumRule( SwTxtFmtColl& rTxtFmtColl ); -} -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx deleted file mode 100644 index 677cda3cc1..0000000000 --- a/sw/inc/fmteiro.hxx +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTEIRO_HXX -#define _FMTEIRO_HXX - - -#include <svl/eitem.hxx> -#include <hintids.hxx> -#include <format.hxx> -#include "swdllapi.h" - -class IntlWrapper; - -class SW_DLLPUBLIC SwFmtEditInReadonly : public SfxBoolItem -{ -public: - SwFmtEditInReadonly( sal_uInt16 nId = RES_EDIT_IN_READONLY, - sal_Bool bPrt = sal_False ) : SfxBoolItem( nId, bPrt ) {} - - // "pure virtual methos" of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; -}; - -inline const SwFmtEditInReadonly &SwAttrSet::GetEditInReadonly(sal_Bool bInP) const - { return (const SwFmtEditInReadonly&)Get( RES_EDIT_IN_READONLY,bInP); } - -inline const SwFmtEditInReadonly &SwFmt::GetEditInReadonly(sal_Bool bInP) const - { return aSet.GetEditInReadonly(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx deleted file mode 100644 index b9854c7aef..0000000000 --- a/sw/inc/fmtflcnt.hxx +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTFLCNT_HXX -#define _FMTFLCNT_HXX - - -#include <svl/poolitem.hxx> - -class SwFrmFmt; -class SwTxtFlyCnt; -// ATT_FLYCNT - -class SwFmtFlyCnt : public SfxPoolItem -{ - friend class SwTxtFlyCnt; - SwTxtFlyCnt* pTxtAttr; - SwFrmFmt* pFmt; // My Fly/DrawFrame-format. - // protected CopyCtor - SwFmtFlyCnt& operator=(const SwFmtFlyCnt& rFlyCnt); - -public: - SwFmtFlyCnt( SwFrmFmt *pFrmFmt ); - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - - inline SwFrmFmt *GetFrmFmt() const { return pFmt; } - // For Undo: delete the FlyFrmFormat "logically"; it is kept in Undo-object. - inline void SetFlyFmt( SwFrmFmt* pNew = 0 ) { pFmt = pNew; } - - const SwTxtFlyCnt *GetTxtFlyCnt() const { return pTxtAttr; } - SwTxtFlyCnt *GetTxtFlyCnt() { return pTxtAttr; } - - bool Sw3ioExportAllowed() const; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx deleted file mode 100644 index f7b7c0cf61..0000000000 --- a/sw/inc/fmtfld.hxx +++ /dev/null @@ -1,127 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTFLD_HXX -#define _FMTFLD_HXX - -#include <list> -#include <svl/poolitem.hxx> -#include <svl/brdcst.hxx> -#include <svl/smplhint.hxx> - -#include "swdllapi.h" -#include <calbck.hxx> - -class SwField; -class SwTxtFld; -class SwView; -class SwFieldType; - -// ATT_FLD -class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBroadcaster -{ - friend class SwTxtFld; - friend void _InitCore(); - - SwField *pField; - SwTxtFld* pTxtAttr; - - SwFmtFld(); // Default attibute. - - // Protected CopyCtor. - // @@@ copy construction allowed, but copy assignment is not? @@@ - SwFmtFld& operator=(const SwFmtFld& rFld); - -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint ); - -public: - TYPEINFO(); - - // Single argument constructors shall be explicit. - explicit SwFmtFld( const SwField &rFld ); - - // @@@ copy construction allowed, but copy assignment is not? @@@ - SwFmtFld( const SwFmtFld& rAttr ); - - virtual ~SwFmtFld(); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - - virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const; - - const SwField *GetFld() const { return pField; } - SwField *GetFld() { return pField; } - - /** - Sets current field. - - @param pField new field - - @attention The current field will be destroyed before setting the new field. - */ - void SetFld(SwField * pField); - - const SwTxtFld *GetTxtFld() const { return pTxtAttr; } - SwTxtFld *GetTxtFld() { return pTxtAttr; } - - void RegisterToFieldType( SwFieldType& ); - sal_Bool IsFldInDoc() const; - sal_Bool IsProtect() const; -}; - -class SW_DLLPUBLIC SwFmtFldHint : public SfxHint -{ -#define SWFMTFLD_INSERTED 1 -#define SWFMTFLD_REMOVED 2 -#define SWFMTFLD_FOCUS 3 -#define SWFMTFLD_CHANGED 4 -#define SWFMTFLD_LANGUAGE 5 - - const SwFmtFld* pFld; - sal_Int16 nWhich; - const SwView* pView; - -public: - SwFmtFldHint( const SwFmtFld* p, sal_Int16 n, const SwView* pV = 0) - : pFld(p) - , nWhich(n) - , pView(pV) - {} - - TYPEINFO(); - const SwFmtFld* GetField() const { return pFld; } - sal_Int16 Which() const { return nWhich; } - const SwView* GetView() const { return pView; } -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx deleted file mode 100644 index 766d44e1f3..0000000000 --- a/sw/inc/fmtfollowtextflow.hxx +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTFOLLOWTEXTFLOW_HXX -#define _FMTFOLLOWTEXTFLOW_HXX - - -#include <svl/eitem.hxx> -#include <hintids.hxx> -#include <format.hxx> -#include "swdllapi.h" - -class IntlWrapper; - -class SW_DLLPUBLIC SwFmtFollowTextFlow : public SfxBoolItem -{ -public: - SwFmtFollowTextFlow( sal_Bool bFlag = sal_False ) - : SfxBoolItem( RES_FOLLOW_TEXT_FLOW, bFlag ) {} - - TYPEINFO(); - - // "pure virtual methods" of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; -}; - - -#if !(defined(MACOSX) && ( __GNUC__ < 3 )) -// GrP moved to gcc_outl.cxx; revisit with gcc3 -inline const SwFmtFollowTextFlow &SwAttrSet::GetFollowTextFlow(sal_Bool bInP) const - { return (const SwFmtFollowTextFlow&)Get( RES_FOLLOW_TEXT_FLOW, bInP ); } - -inline const SwFmtFollowTextFlow &SwFmt::GetFollowTextFlow(sal_Bool bInP) const - { return aSet.GetFollowTextFlow( bInP ); } -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx deleted file mode 100644 index 1457b11595..0000000000 --- a/sw/inc/fmtfordr.hxx +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTFORDR_HXX -#define _FMTFORDR_HXX - -#include <svl/eitem.hxx> -#include <hintids.hxx> -#include <format.hxx> - - -enum SwFillOrder -{ - SW_FILL_ORDER_BEGIN, - ATT_TOP_DOWN = SW_FILL_ORDER_BEGIN, - ATT_BOTTOM_UP, - ATT_LEFT_TO_RIGHT, - ATT_RIGHT_TO_LEFT, - SW_FILL_ORDER_END -}; - -class SwFmtFillOrder: public SfxEnumItem -{ -public: - SwFmtFillOrder( SwFillOrder = ATT_TOP_DOWN ); - inline SwFmtFillOrder &operator=( const SwFmtFillOrder &rCpy ); - - // "Pure virtual methods" of SfxPoolItem. - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual sal_uInt16 GetValueCount() const; - - SwFillOrder GetFillOrder() const { return SwFillOrder(GetValue()); } -}; - -inline SwFmtFillOrder &SwFmtFillOrder::operator=( const SwFmtFillOrder &rCpy ) -{ - SetValue( rCpy.GetValue() ); - return *this; -} - -inline const SwFmtFillOrder &SwAttrSet::GetFillOrder(sal_Bool bInP) const - { return (const SwFmtFillOrder&)Get( RES_FILL_ORDER,bInP); } - -inline const SwFmtFillOrder &SwFmt::GetFillOrder(sal_Bool bInP) const - { return aSet.GetFillOrder(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx deleted file mode 100644 index 2e8f4b1724..0000000000 --- a/sw/inc/fmtfsize.hxx +++ /dev/null @@ -1,115 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTFSIZE_HXX -#define _FMTFSIZE_HXX - -#include <tools/gen.hxx> -#include <svl/poolitem.hxx> -#include "swdllapi.h" -#include <hintids.hxx> -#include <swtypes.hxx> -#include <format.hxx> - -class IntlWrapper; - -//Frame size. - -enum SwFrmSize -{ - ATT_VAR_SIZE, // Frame is variable in Var-direction. - ATT_FIX_SIZE, // Frame cannot be moved in Var-direction. - ATT_MIN_SIZE // Value in Var-direction gives minimum - // (can be exceeded but not be less). -}; - -class SW_DLLPUBLIC SwFmtFrmSize: public SfxPoolItem -{ - Size aSize; - SwFrmSize eFrmHeightType; - SwFrmSize eFrmWidthType; - sal_uInt8 nWidthPercent; - sal_uInt8 nHeightPercent; - - // For tables: width can be given in percent. - - // For frames: height and/or width may be given in percent. - // If only one of these percentage values is given, the value 0xFF - // used instead of the missing percentage value indicates this side - // being proportional to the given one. - // The calculation in this case is based upon the values in Size. - // Percentages are always related to the environment in which - // the object is placed (PrtArea) and to the screen width - // minus borders in BrowseView if the environment is the page. - - - -public: - SwFmtFrmSize( SwFrmSize eSize = ATT_VAR_SIZE, - SwTwips nWidth = 0, SwTwips nHeight = 0 ); - SwFmtFrmSize& operator=( const SwFmtFrmSize& rCpy ); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - SwFrmSize GetHeightSizeType() const { return eFrmHeightType; } - void SetHeightSizeType( SwFrmSize eSize ) { eFrmHeightType = eSize; } - - SwFrmSize GetWidthSizeType() const { return eFrmWidthType; } - void SetWidthSizeType( SwFrmSize eSize ) { eFrmWidthType = eSize; } - - const Size& GetSize() const { return aSize; } - void SetSize( const Size &rNew ) { aSize = rNew; } - - SwTwips GetHeight() const { return aSize.Height(); } - SwTwips GetWidth() const { return aSize.Width(); } - void SetHeight( const SwTwips nNew ) { aSize.Height() = nNew; } - void SetWidth ( const SwTwips nNew ) { aSize.Width() = nNew; } - - sal_uInt8 GetHeightPercent() const{ return nHeightPercent; } - sal_uInt8 GetWidthPercent() const { return nWidthPercent; } - void SetHeightPercent( sal_uInt8 n ) { nHeightPercent = n; } - void SetWidthPercent ( sal_uInt8 n ) { nWidthPercent = n; } -}; - -inline const SwFmtFrmSize &SwAttrSet::GetFrmSize(sal_Bool bInP) const - { return (const SwFmtFrmSize&)Get( RES_FRM_SIZE,bInP); } - -inline const SwFmtFrmSize &SwFmt::GetFrmSize(sal_Bool bInP) const - { return aSet.GetFrmSize(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx deleted file mode 100644 index 7ae980331e..0000000000 --- a/sw/inc/fmtftn.hxx +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTFTN_HXX -#define _FMTFTN_HXX - -#include <tools/string.hxx> -#include <svl/poolitem.hxx> -#include "swdllapi.h" - -class SwDoc; -class SwTxtFtn; - -// ATT_FTN - -class SW_DLLPUBLIC SwFmtFtn: public SfxPoolItem -{ - friend class SwTxtFtn; - SwTxtFtn* pTxtAttr; // My TextAttribute. - String aNumber; // User-defined 'Number'. - sal_uInt16 nNumber; //Automatische Nummerierung - bool m_bEndNote; // Is it an End note? - - // Protected CopyCtor. - SwFmtFtn& operator=(const SwFmtFtn& rFtn); - SwFmtFtn( const SwFmtFtn& ); - -public: - SwFmtFtn( bool bEndNote = false ); - virtual ~SwFmtFtn(); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - - const String &GetNumStr() const { return aNumber; } - const sal_uInt16 &GetNumber() const { return nNumber; } - bool IsEndNote() const { return m_bEndNote;} - - void SetNumStr( const String& rStr ) { aNumber = rStr; } - void SetNumber( sal_uInt16 nNo ) { nNumber = nNo; } - void SetEndNote( bool b ); - - void SetNumber( const SwFmtFtn& rFtn ) - { nNumber = rFtn.nNumber; aNumber = rFtn.aNumber; } - - const SwTxtFtn *GetTxtFtn() const { return pTxtAttr; } - SwTxtFtn *GetTxtFtn() { return pTxtAttr; } - - void GetFtnText( String& rStr ) const; - - // Returns string to be displayed of footnote / endnote. - String GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrs = sal_False ) const; -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx deleted file mode 100644 index f08ce4ec17..0000000000 --- a/sw/inc/fmtftntx.hxx +++ /dev/null @@ -1,132 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTFTNTX_HXX -#define _FMTFTNTX_HXX - -#include <svl/eitem.hxx> -#include <hintids.hxx> -#include <format.hxx> -#include <numrule.hxx> -#include "swdllapi.h" - -enum SwFtnEndPosEnum -{ - FTNEND_ATPGORDOCEND, // at page or document end - FTNEND_ATTXTEND, // at end of the current text end - FTNEND_ATTXTEND_OWNNUMSEQ, // -""- and with own number sequence - FTNEND_ATTXTEND_OWNNUMANDFMT, // -""- and with own numberformat - FTNEND_ATTXTEND_END -}; - - -class SW_DLLPUBLIC SwFmtFtnEndAtTxtEnd : public SfxEnumItem -{ - String sPrefix; - String sSuffix; - SvxNumberType aFmt; - sal_uInt16 nOffset; - -protected: - SwFmtFtnEndAtTxtEnd( sal_uInt16 nWhichL, SwFtnEndPosEnum ePos ) - : SfxEnumItem( nWhichL, sal::static_int_cast< sal_uInt16 >(ePos) ), nOffset( 0 ) - {} - SwFmtFtnEndAtTxtEnd( const SwFmtFtnEndAtTxtEnd& rAttr ) - : SfxEnumItem( rAttr ), sPrefix( rAttr.sPrefix ), - sSuffix( rAttr.sSuffix ), aFmt( rAttr.aFmt ), - nOffset( rAttr.nOffset ) - {} - -public: - virtual sal_uInt16 GetValueCount() const; - - virtual int operator==( const SfxPoolItem& ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - inline sal_Bool IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); } - - SwFmtFtnEndAtTxtEnd & operator=( const SwFmtFtnEndAtTxtEnd & rAttr ); - - sal_Int16 GetNumType() const { return aFmt.GetNumberingType(); } - void SetNumType( sal_Int16 eType ) { aFmt.SetNumberingType(eType); } - - const SvxNumberType& GetSwNumType() const { return aFmt; } - - sal_uInt16 GetOffset() const { return nOffset; } - void SetOffset( sal_uInt16 nOff ) { nOffset = nOff; } - - const String& GetPrefix() const { return sPrefix; } - void SetPrefix(const String& rSet) { sPrefix = rSet; } - - const String& GetSuffix() const { return sSuffix; } - void SetSuffix(const String& rSet) { sSuffix = rSet; } -}; - -class SW_DLLPUBLIC SwFmtFtnAtTxtEnd : public SwFmtFtnEndAtTxtEnd -{ -public: - SwFmtFtnAtTxtEnd( SwFtnEndPosEnum ePos = FTNEND_ATPGORDOCEND ) - : SwFmtFtnEndAtTxtEnd( RES_FTN_AT_TXTEND, ePos ) - {} - - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; -}; - -class SW_DLLPUBLIC SwFmtEndAtTxtEnd : public SwFmtFtnEndAtTxtEnd -{ -public: - SwFmtEndAtTxtEnd( SwFtnEndPosEnum ePos = FTNEND_ATPGORDOCEND ) - : SwFmtFtnEndAtTxtEnd( RES_END_AT_TXTEND, ePos ) - { - SetNumType( SVX_NUM_ROMAN_LOWER ); - } - - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; -}; - -inline const SwFmtFtnAtTxtEnd &SwAttrSet::GetFtnAtTxtEnd(sal_Bool bInP) const - { return (const SwFmtFtnAtTxtEnd&)Get( RES_FTN_AT_TXTEND, bInP); } -inline const SwFmtEndAtTxtEnd &SwAttrSet::GetEndAtTxtEnd(sal_Bool bInP) const - { return (const SwFmtEndAtTxtEnd&)Get( RES_END_AT_TXTEND, bInP); } - - -inline const SwFmtFtnAtTxtEnd &SwFmt::GetFtnAtTxtEnd(sal_Bool bInP) const - { return aSet.GetFtnAtTxtEnd(bInP); } -inline const SwFmtEndAtTxtEnd &SwFmt::GetEndAtTxtEnd(sal_Bool bInP) const - { return aSet.GetEndAtTxtEnd(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx deleted file mode 100644 index d80ae41b9f..0000000000 --- a/sw/inc/fmthdft.hxx +++ /dev/null @@ -1,118 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTHDFT_HXX -#define _FMTHDFT_HXX - -#include <hintids.hxx> -#include <format.hxx> -#include <svl/poolitem.hxx> -#include <calbck.hxx> - -class SwFrmFmt; -class IntlWrapper; -class SwFmt; - -//Header, for PageFormats -//Client of FrmFmt discribing the header. - -class SW_DLLPUBLIC SwFmtHeader: public SfxPoolItem, public SwClient -{ - sal_Bool bActive; // Only for controlling (creation of content). - -public: - SwFmtHeader( sal_Bool bOn = sal_False ); - SwFmtHeader( SwFrmFmt *pHeaderFmt ); - SwFmtHeader( const SwFmtHeader &rCpy ); - ~SwFmtHeader(); - SwFmtHeader& operator=( const SwFmtHeader &rCpy ); - - TYPEINFO(); - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - const SwFrmFmt *GetHeaderFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - SwFrmFmt *GetHeaderFmt() { return (SwFrmFmt*)GetRegisteredIn(); } - - void RegisterToFormat( SwFmt& rFmt ); - sal_Bool IsActive() const { return bActive; } - void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; } -}; - -//Footer, for pageformats -//Client of FrmFmt describing the footer - -class SW_DLLPUBLIC SwFmtFooter: public SfxPoolItem, public SwClient -{ - sal_Bool bActive; // Only for controlling (creation of content). - -public: - SwFmtFooter( sal_Bool bOn = sal_False ); - SwFmtFooter( SwFrmFmt *pFooterFmt ); - SwFmtFooter( const SwFmtFooter &rCpy ); - ~SwFmtFooter(); - SwFmtFooter& operator=( const SwFmtFooter &rCpy ); - - TYPEINFO(); - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - const SwFrmFmt *GetFooterFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - SwFrmFmt *GetFooterFmt() { return (SwFrmFmt*)GetRegisteredIn(); } - - void RegisterToFormat( SwFmt& rFmt ); - sal_Bool IsActive() const { return bActive; } - void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; } -}; - -inline const SwFmtHeader &SwAttrSet::GetHeader(sal_Bool bInP) const - { return (const SwFmtHeader&)Get( RES_HEADER,bInP); } -inline const SwFmtFooter &SwAttrSet::GetFooter(sal_Bool bInP) const - { return (const SwFmtFooter&)Get( RES_FOOTER,bInP); } - -inline const SwFmtHeader &SwFmt::GetHeader(sal_Bool bInP) const - { return aSet.GetHeader(bInP); } -inline const SwFmtFooter &SwFmt::GetFooter(sal_Bool bInP) const - { return aSet.GetFooter(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx deleted file mode 100644 index 07fc7018b4..0000000000 --- a/sw/inc/fmtinfmt.hxx +++ /dev/null @@ -1,112 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTINFMT_HXX -#define _FMTINFMT_HXX - -#include <tools/string.hxx> -#include <svl/poolitem.hxx> -#include "swdllapi.h" - -class SvxMacro; -class SvxMacroTableDtor; -class SwTxtINetFmt; -class IntlWrapper; - -// ATT_INETFMT - -class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem -{ - friend class SwTxtINetFmt; - - String aURL; // URL. - String aTargetFrame; // Target frame for URL. - String aINetFmt; - String aVisitedFmt; - String aName; // Name of the link. - SvxMacroTableDtor* pMacroTbl; - SwTxtINetFmt* pTxtAttr; // My TextAttribute. - sal_uInt16 nINetId; - sal_uInt16 nVisitedId; -public: - SwFmtINetFmt( const String& rURL, const String& rTarget ); - SwFmtINetFmt( const SwFmtINetFmt& rAttr ); - SwFmtINetFmt(); // For TypeInfo. - virtual ~SwFmtINetFmt(); - - TYPEINFO(); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ); - - - const SwTxtINetFmt* GetTxtINetFmt() const { return pTxtAttr; } - SwTxtINetFmt* GetTxtINetFmt() { return pTxtAttr; } - - const String& GetValue() const { return aURL; } - - const String& GetName() const { return aName; } - void SetName( const String& rNm ) { aName = rNm; } - - const String& GetTargetFrame() const { return aTargetFrame; } - - const String& GetINetFmt() const { return aINetFmt; } - void SetINetFmt( const String& rNm ) { aINetFmt = rNm; } - - const String& GetVisitedFmt() const { return aVisitedFmt; } - void SetVisitedFmt( const String& rNm ) { aVisitedFmt = rNm; } - - sal_uInt16 GetINetFmtId() const { return nINetId; } - void SetINetFmtId( sal_uInt16 nNew ) { nINetId = nNew; } - - sal_uInt16 GetVisitedFmtId() const { return nVisitedId; } - void SetVisitedFmtId( sal_uInt16 nNew ) { nVisitedId = nNew; } - - // Set a new MacroTable or clear the current one. - void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 ); - const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; } - - // Macro getter and setter. - void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro ); - const SvxMacro* GetMacro( sal_uInt16 nEvent ) const; -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx deleted file mode 100644 index b491b3a294..0000000000 --- a/sw/inc/fmtline.hxx +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_FMTLINE_HXX -#define SW_FMTLINE_HXX - - -#include <svl/poolitem.hxx> -#include <hintids.hxx> -#include <format.hxx> -#include "swdllapi.h" - -class IntlWrapper; - -class SW_DLLPUBLIC SwFmtLineNumber: public SfxPoolItem -{ - sal_uLong nStartValue :24; // Starting value for the paragraph. 0 == no starting value. - sal_uLong bCountLines :1; // Also count lines of paragraph. - -public: - SwFmtLineNumber(); - ~SwFmtLineNumber(); - - TYPEINFO(); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - sal_uLong GetStartValue() const { return nStartValue; } - sal_Bool IsCount() const { return bCountLines != 0; } - - void SetStartValue( sal_uLong nNew ) { nStartValue = nNew; } - void SetCountLines( sal_Bool b ) { bCountLines = b; } -}; - -inline const SwFmtLineNumber &SwAttrSet::GetLineNumber(sal_Bool bInP) const - { return (const SwFmtLineNumber&)Get( RES_LINENUMBER,bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx deleted file mode 100644 index 0fbef844e0..0000000000 --- a/sw/inc/fmtlsplt.hxx +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTTSPLT_HXX -#define _FMTTSPLT_HXX - -#include <svl/eitem.hxx> -#include <hintids.hxx> -#include <format.hxx> -#include "swdllapi.h" - -class IntlWrapper; - -class SW_DLLPUBLIC SwFmtLayoutSplit : public SfxBoolItem -{ -public: - SwFmtLayoutSplit( sal_Bool bSplit = sal_True ) : SfxBoolItem( RES_LAYOUT_SPLIT, bSplit ) {} - - // "pure virtual methods" of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; -}; - -inline const SwFmtLayoutSplit &SwAttrSet::GetLayoutSplit(sal_Bool bInP) const - { return (const SwFmtLayoutSplit&)Get( RES_LAYOUT_SPLIT,bInP); } - -inline const SwFmtLayoutSplit &SwFmt::GetLayoutSplit(sal_Bool bInP) const - { return aSet.GetLayoutSplit(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx deleted file mode 100644 index 96bf2590fa..0000000000 --- a/sw/inc/fmtmeta.hxx +++ /dev/null @@ -1,230 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_FMTMETA_HXX -#define SW_FMTMETA_HXX - -#include <cppuhelper/weakref.hxx> - -#include <svl/poolitem.hxx> -#include <sfx2/Metadatable.hxx> - -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> - -#include <vector> - - -namespace com { namespace sun { namespace star { - namespace text { - class XTextField; - } -}}} - - -/** - * The classes that make up a meta entity are: - * <dl> - * <dt>SwTxtMeta</dt><dd>the text hint</dd> - * <dt>SwFmtMeta</dt><dd>the pool item</dd> - * <dt>sw::Meta</dt><dd>the metadatable entity itself</dd> - * <dt>SwXMeta</dt><dd>the UNO wrapper object</dd> - * </dl> - * - * The text hint contains the pool item (as usual) and has a pointer to the - * text node at which it is attached. - * The pool item has a shared pointer to the metadatable entity, and a reverse - * pointer to the text attribute at which it is attached. - * The pool item is non-poolable; it may only be attached to one text - * attribute. - * Of all the pool items that refer to a metadatable entity, only one may be - * in the document content at any time. Others may be in the undo array, or in - * undo objects. - * The metadatable entity has a reverse pointer to the pool item that is - * currently in the document. It also registers as a client at the text node - * at which it is attached via this pool item and its text attribute. - * The UNO wrapper object registers as a client at the metadatable entity. - * - * Copying the metadatable entity proceeds in the following way: - * <ol> - * <li>The pool item is cloned (because it is non-poolable); the clone - * points to the same metadatable entity, but the metadatable entity's - * reverse pointer is unchanged.</li> - * <li>The DoCopy() method is called at the new pool item: - * it will clone the metadatable entity (using RegisterAsCopyOf). - * This is necessary, because first, a metadatable entity may - * only be inserted once into a document, and second, the copy may be - * inserted into a different document than the source document!</li> - * <li>A new text hint is created, taking over the new pool item.</li> - * <li>The text hint is inserted into the hints array of some text node.</li> - * </ol> - */ - -class SwTxtMeta; -class SwXMeta; -class SwXMetaField; -namespace sw { - class Meta; -} - -class SwFmtMeta - : public SfxPoolItem -{ -private: - friend class SwTxtMeta; // needs SetTxtAttr, DoCopy - friend class ::sw::Meta; // needs m_pTxtAttr - - ::boost::shared_ptr< ::sw::Meta > m_pMeta; - SwTxtMeta * m_pTxtAttr; - - SwTxtMeta * GetTxtAttr() { return m_pTxtAttr; } - void SetTxtAttr(SwTxtMeta * const i_pTxtAttr); - - /// this method <em>must</em> be called when the hint is actually copied - void DoCopy(::sw::MetaFieldManager & i_rTargetDocManager, - SwTxtNode & i_rTargetTxtNode); - - explicit SwFmtMeta( const sal_uInt16 i_nWhich ); - -public: - // takes ownership - explicit SwFmtMeta( ::boost::shared_ptr< ::sw::Meta > const & i_pMeta, - const sal_uInt16 i_nWhich ); - virtual ~SwFmtMeta(); - - // SfxPoolItem - virtual int operator==( const SfxPoolItem & ) const; - virtual SfxPoolItem * Clone( SfxItemPool *pPool = 0 ) const; - - /// notify clients registered at m_pMeta that this meta is being (re-)moved - void NotifyChangeTxtNode(SwTxtNode *const pTxtNode); - static SwFmtMeta * CreatePoolDefault( const sal_uInt16 i_nWhich ); - ::sw::Meta * GetMeta() { return m_pMeta.get(); } -}; - - -namespace sw { - -class MetaFieldManager; - -class Meta - : public ::sfx2::Metadatable - , public SwModify -{ -protected: - friend class ::SwFmtMeta; // SetFmtMeta, NotifyChangeTxtNode - friend class ::SwXMeta; // GetTxtNode, GetTxtAttr, Get/SetXMeta - - ::com::sun::star::uno::WeakReference< - ::com::sun::star::rdf::XMetadatable> m_wXMeta; - - SwFmtMeta * m_pFmt; - SwTxtNode * m_pTxtNode; - - SwTxtMeta * GetTxtAttr() const; - SwTxtNode * GetTxtNode() const; // returns 0 if not in document (undo) - - SwFmtMeta * GetFmtMeta() const { return m_pFmt; } - void SetFmtMeta( SwFmtMeta * const i_pFmt ) { m_pFmt = i_pFmt; }; - - void NotifyChangeTxtNodeImpl(); - void NotifyChangeTxtNode(SwTxtNode *const pTxtNode); - - ::com::sun::star::uno::WeakReference< - ::com::sun::star::rdf::XMetadatable> const& GetXMeta() const - { return m_wXMeta; } - void SetXMeta(::com::sun::star::uno::Reference< - ::com::sun::star::rdf::XMetadatable> const& xMeta) - { m_wXMeta = xMeta; } - - // SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ); - -public: - explicit Meta(SwFmtMeta * const i_pFmt = 0); - virtual ~Meta(); - - // sfx2::Metadatable - virtual ::sfx2::IXmlIdRegistry& GetRegistry(); - virtual bool IsInClipboard() const; - virtual bool IsInUndo() const; - virtual bool IsInContent() const; - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::rdf::XMetadatable > MakeUnoObject(); -}; - -class MetaField - : public Meta -{ -private: - friend class ::SwFmtMeta; - friend class ::SwXMetaField; - friend class ::sw::MetaFieldManager; - - sal_uInt32 m_nNumberFormat; - bool m_bIsFixedLanguage; - - sal_uInt32 GetNumberFormat(::rtl::OUString const & rContent) const; - void SetNumberFormat(sal_uInt32 nNumberFormat); - bool IsFixedLanguage() const { return m_bIsFixedLanguage; } - void SetIsFixedLanguage(bool b) { m_bIsFixedLanguage = b; } - - explicit MetaField(SwFmtMeta * const i_pFmt = 0, - const sal_uInt32 nNumberFormat = SAL_MAX_UINT32, - const bool bIsFixedLanguage = false ); - -public: - /// get prefix/suffix from the RDF repository. @throws RuntimeException - void GetPrefixAndSuffix( - ::rtl::OUString *const o_pPrefix, ::rtl::OUString *const o_pSuffix); -}; - -/** knows all meta-fields in the document. */ -class MetaFieldManager - : private ::boost::noncopyable -{ -private: - typedef ::std::vector< ::boost::weak_ptr<MetaField> > MetaFieldList_t; - MetaFieldList_t m_MetaFields; - -public: - MetaFieldManager(); - ::boost::shared_ptr<MetaField> makeMetaField( - SwFmtMeta * const i_pFmt = 0, - const sal_uInt32 nNumberFormat = SAL_MAX_UINT32, - const bool bIsFixedLanguage = false ); - /// get all meta fields - ::std::vector< ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextField> > getMetaFields(); -}; - -} // namespace sw - -#endif // SW_FMTMETA_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx deleted file mode 100644 index c839dd8fc5..0000000000 --- a/sw/inc/fmtornt.hxx +++ /dev/null @@ -1,144 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTORNT_HXX -#define _FMTORNT_HXX - -#include <com/sun/star/text/HoriOrientation.hpp> -#include <com/sun/star/text/VertOrientation.hpp> -#include <com/sun/star/text/RelOrientation.hpp> -#include "swdllapi.h" -#include <hintids.hxx> -#include <swtypes.hxx> -#include <format.hxx> -#include <svl/poolitem.hxx> - - -class IntlWrapper; - -#define IVER_VERTORIENT_REL ((sal_uInt16)0x0001) - -class SW_DLLPUBLIC SwFmtVertOrient: public SfxPoolItem -{ - SwTwips nYPos; // Contains *always* the current RelPos. - sal_Int16 eOrient; - sal_Int16 eRelation; -public: - TYPEINFO(); - SwFmtVertOrient( SwTwips nY = 0, sal_Int16 eVert = com::sun::star::text::VertOrientation::NONE, - sal_Int16 eRel = com::sun::star::text::RelOrientation::PRINT_AREA ); - inline SwFmtVertOrient &operator=( const SwFmtVertOrient &rCpy ); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - sal_Int16 GetVertOrient() const { return eOrient; } - sal_Int16 GetRelationOrient() const { return eRelation; } - void SetVertOrient( sal_Int16 eNew ) { eOrient = eNew; } - void SetRelationOrient( sal_Int16 eNew ) { eRelation = eNew; } - - SwTwips GetPos() const { return nYPos; } - void SetPos( SwTwips nNew ) { nYPos = nNew; } -}; - -// SwFmtHoriOrient; how and towards what does the FlyFrm orient itself horizontally? - -#define IVER_HORIORIENT_TOGGLE ((sal_uInt16)0x0001) -#define IVER_HORIORIENT_REL ((sal_uInt16)0x0002) - -class SW_DLLPUBLIC SwFmtHoriOrient: public SfxPoolItem -{ - SwTwips nXPos; // Contains *always* the current RelPos. - sal_Int16 eOrient; - sal_Int16 eRelation; - sal_Bool bPosToggle : 1; // Flip position on even pages. -public: - TYPEINFO(); - SwFmtHoriOrient( SwTwips nX = 0, sal_Int16 eHori = com::sun::star::text::HoriOrientation::NONE, - sal_Int16 eRel = com::sun::star::text::RelOrientation::PRINT_AREA, sal_Bool bPos = sal_False ); - inline SwFmtHoriOrient &operator=( const SwFmtHoriOrient &rCpy ); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - sal_Int16 GetHoriOrient() const { return eOrient; } - sal_Int16 GetRelationOrient() const { return eRelation; } - void SetHoriOrient( sal_Int16 eNew ) { eOrient = eNew; } - void SetRelationOrient( sal_Int16 eNew ) { eRelation = eNew; } - - SwTwips GetPos() const { return nXPos; } - void SetPos( SwTwips nNew ) { nXPos = nNew; } - - sal_Bool IsPosToggle() const { return bPosToggle; } - void SetPosToggle( sal_Bool bNew ) { bPosToggle = bNew; } -}; - -inline SwFmtVertOrient &SwFmtVertOrient::operator=( const SwFmtVertOrient &rCpy ) -{ - nYPos = rCpy.GetPos(); - eOrient = rCpy.GetVertOrient(); - eRelation = rCpy.GetRelationOrient(); - return *this; -} -inline SwFmtHoriOrient &SwFmtHoriOrient::operator=( const SwFmtHoriOrient &rCpy ) -{ - nXPos = rCpy.GetPos(); - eOrient = rCpy.GetHoriOrient(); - eRelation = rCpy.GetRelationOrient(); - bPosToggle = rCpy.IsPosToggle(); - return *this; -} - -inline const SwFmtVertOrient &SwAttrSet::GetVertOrient(sal_Bool bInP) const - { return (const SwFmtVertOrient&)Get( RES_VERT_ORIENT,bInP); } -inline const SwFmtHoriOrient &SwAttrSet::GetHoriOrient(sal_Bool bInP) const - { return (const SwFmtHoriOrient&)Get( RES_HORI_ORIENT,bInP); } - -inline const SwFmtVertOrient &SwFmt::GetVertOrient(sal_Bool bInP) const - { return aSet.GetVertOrient(bInP); } -inline const SwFmtHoriOrient &SwFmt::GetHoriOrient(sal_Bool bInP) const - { return aSet.GetHoriOrient(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx deleted file mode 100644 index 5fab0fb54c..0000000000 --- a/sw/inc/fmtpdsc.hxx +++ /dev/null @@ -1,106 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTPDSC_HXX -#define _FMTPDSC_HXX - - -#include <svl/poolitem.hxx> -#include "swdllapi.h" -#include <hintids.hxx> -#include <format.hxx> -#include <calbck.hxx> - -class SwPageDesc; -class SwHistory; -class SwPaM; -class IntlWrapper; -class SwEndNoteInfo; - -// Pagedescriptor -// Client of SwPageDesc that is "described" by the attribute. - -#define IVER_FMTPAGEDESC_NOAUTO ((sal_uInt16)0x0001) -#define IVER_FMTPAGEDESC_LONGPAGE ((sal_uInt16)0x0002) - -class SW_DLLPUBLIC SwFmtPageDesc : public SfxPoolItem, public SwClient -{ - // This "Doc"-function is made friend in order to be able - // to set the auto-flag after copying!! - friend sal_Bool InsAttr( SwDoc*, const SwPaM &, const SfxItemSet&, sal_uInt16, - SwHistory* ); - sal_uInt16 nNumOffset; // Offset page number. - sal_uInt16 nDescNameIdx; // SW3-Reader: stringpool-index of style name. - SwModify* pDefinedIn; // Points to the object in which the - // attribute was set (CntntNode/Format). -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ); - virtual void SwClientNotify( const SwModify&, const SfxHint& rHint ); - -public: - SwFmtPageDesc( const SwPageDesc *pDesc = 0 ); - SwFmtPageDesc( const SwFmtPageDesc &rCpy ); - SwFmtPageDesc &operator=( const SwFmtPageDesc &rCpy ); - ~SwFmtPageDesc(); - - TYPEINFO(); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - SwPageDesc *GetPageDesc() { return (SwPageDesc*)GetRegisteredIn(); } - const SwPageDesc *GetPageDesc() const { return (SwPageDesc*)GetRegisteredIn(); } - - sal_uInt16 GetNumOffset() const { return nNumOffset; } - void SetNumOffset( sal_uInt16 nNum ) { nNumOffset = nNum; } - - // Query / set where attribute is anchored. - inline const SwModify* GetDefinedIn() const { return pDefinedIn; } - void ChgDefinedIn( const SwModify* pNew ) { pDefinedIn = (SwModify*)pNew; } - void RegisterToEndNotInfo( SwEndNoteInfo& ); - void RegisterToPageDesc( SwPageDesc& ); - bool KnowsPageDesc() const; -}; - - -inline const SwFmtPageDesc &SwAttrSet::GetPageDesc(sal_Bool bInP) const - { return (const SwFmtPageDesc&)Get( RES_PAGEDESC,bInP); } - -inline const SwFmtPageDesc &SwFmt::GetPageDesc(sal_Bool bInP) const - { return aSet.GetPageDesc(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx deleted file mode 100644 index 9738c803be..0000000000 --- a/sw/inc/fmtrfmrk.hxx +++ /dev/null @@ -1,66 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTRFMRK_HXX -#define _FMTRFMRK_HXX - - -#include <tools/string.hxx> -#include <svl/poolitem.hxx> - -class SwTxtRefMark; - -// ATT_REFMARK - -class SwFmtRefMark : public SfxPoolItem -{ - friend class SwTxtRefMark; - SwTxtRefMark* pTxtAttr; - - // Protected CopyCtor. - SwFmtRefMark& operator=(const SwFmtRefMark& rRefMark); - String aRefName; - -public: - SwFmtRefMark( const String& rTxt ); - SwFmtRefMark( const SwFmtRefMark& rRefMark ); - ~SwFmtRefMark( ); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - - const SwTxtRefMark *GetTxtRefMark() const { return pTxtAttr; } - SwTxtRefMark *GetTxtRefMark() { return pTxtAttr; } - - inline String &GetRefName() { return aRefName; } - inline const String &GetRefName() const { return aRefName; } -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtrowsplt.hxx b/sw/inc/fmtrowsplt.hxx deleted file mode 100644 index e140eb90d8..0000000000 --- a/sw/inc/fmtrowsplt.hxx +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTROWSPLT_HXX -#define _FMTROWSPLT_HXX - -#include <svl/eitem.hxx> -#include "swdllapi.h" -#include <hintids.hxx> -#include <format.hxx> - -class IntlWrapper; - -class SW_DLLPUBLIC SwFmtRowSplit : public SfxBoolItem -{ -public: - SwFmtRowSplit( sal_Bool bSplit = sal_True ) : SfxBoolItem( RES_ROW_SPLIT, bSplit ) {} - - // "pure virtual methods" of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; -}; - -inline const SwFmtRowSplit &SwAttrSet::GetRowSplit(sal_Bool bInP) const - { return (const SwFmtRowSplit&)Get( RES_ROW_SPLIT,bInP); } - -inline const SwFmtRowSplit &SwFmt::GetRowSplit(sal_Bool bInP) const - { return aSet.GetRowSplit(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx deleted file mode 100644 index ec6c08a8e1..0000000000 --- a/sw/inc/fmtruby.hxx +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTRUBY_HXX -#define _FMTRUBY_HXX - - -#include <tools/string.hxx> -#include <svl/poolitem.hxx> - -class SwTxtRuby; - -class SW_DLLPUBLIC SwFmtRuby : public SfxPoolItem -{ - friend class SwTxtRuby; - - String sRubyTxt; // The ruby txt. - String sCharFmtName; // Name of the charformat. - SwTxtRuby* pTxtAttr; // The TextAttribute. - sal_uInt16 nCharFmtId; // PoolId of the charformat. - sal_uInt16 nPosition; // Position of the Ruby-character. - sal_uInt16 nAdjustment; // Specific adjustment of the Ruby-ch. - -public: - SwFmtRuby( const String& rRubyTxt ); - SwFmtRuby( const SwFmtRuby& rAttr ); - virtual ~SwFmtRuby(); - - SwFmtRuby& operator=( const SwFmtRuby& rAttr ); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ); - - - const SwTxtRuby* GetTxtRuby() const { return pTxtAttr; } - SwTxtRuby* GetTxtRuby() { return pTxtAttr; } - - const String& GetText() const { return sRubyTxt; } - void SetText( const String& rTxt ) { sRubyTxt = rTxt; } - - const String& GetCharFmtName() const { return sCharFmtName; } - void SetCharFmtName( const String& rNm ) { sCharFmtName = rNm; } - - sal_uInt16 GetCharFmtId() const { return nCharFmtId; } - void SetCharFmtId( sal_uInt16 nNew ) { nCharFmtId = nNew; } - - sal_uInt16 GetPosition() const { return nPosition; } - void SetPosition( sal_uInt16 nNew ) { nPosition = nNew; } - - sal_uInt16 GetAdjustment() const { return nAdjustment; } - void SetAdjustment( sal_uInt16 nNew ) { nAdjustment = nNew; } -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx deleted file mode 100644 index 8cf0a9a77f..0000000000 --- a/sw/inc/fmtsrnd.hxx +++ /dev/null @@ -1,90 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTSRND_HXX -#define _FMTSRND_HXX - -#include "swdllapi.h" -#include <hintids.hxx> -#include <format.hxx> -#include <svl/eitem.hxx> - -#include <fmtsrndenum.hxx> -class IntlWrapper; - -// SwFmtSurround: How document content under the frame shall behave. -class SW_DLLPUBLIC SwFmtSurround: public SfxEnumItem -{ - sal_Bool bAnchorOnly :1; - sal_Bool bContour :1; - sal_Bool bOutside :1; -public: - SwFmtSurround( SwSurround eNew = SURROUND_PARALLEL ); - SwFmtSurround( const SwFmtSurround & ); - inline SwFmtSurround &operator=( const SwFmtSurround &rCpy ); - - // "Pure virtual Methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual sal_uInt16 GetValueCount() const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - - SwSurround GetSurround()const { return SwSurround( GetValue() ); } - sal_Bool IsAnchorOnly() const { return bAnchorOnly; } - sal_Bool IsContour() const { return bContour; } - sal_Bool IsOutside() const { return bOutside; } - void SetSurround ( SwSurround eNew ){ SfxEnumItem::SetValue( sal_uInt16( eNew ) ); } - void SetAnchorOnly( sal_Bool bNew ) { bAnchorOnly = bNew; } - void SetContour( sal_Bool bNew ) { bContour = bNew; } - void SetOutside( sal_Bool bNew ) { bOutside = bNew; } -}; - -inline SwFmtSurround &SwFmtSurround::operator=( const SwFmtSurround &rCpy ) -{ - bAnchorOnly = rCpy.IsAnchorOnly(); - bContour = rCpy.IsContour(); - bOutside = rCpy.IsOutside(); - SfxEnumItem::SetValue( rCpy.GetValue() ); - return *this; -} - -inline const SwFmtSurround &SwAttrSet::GetSurround(sal_Bool bInP) const - { return (const SwFmtSurround&)Get( RES_SURROUND,bInP); } - -inline const SwFmtSurround &SwFmt::GetSurround(sal_Bool bInP) const - { return aSet.GetSurround(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtsrndenum.hxx b/sw/inc/fmtsrndenum.hxx deleted file mode 100644 index 314c32b654..0000000000 --- a/sw/inc/fmtsrndenum.hxx +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTSRNDENUM_HXX -#define _FMTSRNDENUM_HXX - -enum SwSurround { - SURROUND_BEGIN, - SURROUND_NONE = SURROUND_BEGIN, - SURROUND_THROUGHT, - SURROUND_PARALLEL, - SURROUND_IDEAL, - SURROUND_LEFT, - SURROUND_RIGHT, - SURROUND_END -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtui.hrc b/sw/inc/fmtui.hrc deleted file mode 100644 index 04d914534b..0000000000 --- a/sw/inc/fmtui.hrc +++ /dev/null @@ -1,89 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTUI_HRC -#define _FMTUI_HRC - -#include "rcid.hrc" - - -#define DLG_FMTENTRY (RC_FMTUI_BEGIN) -#define DLG_NEW_FILE (RC_FMTUI_BEGIN + 1) -#define STR_PAGE_STD (RC_FMTUI_BEGIN + 2) -#define STR_PAGE_BORDER (RC_FMTUI_BEGIN + 3) -#define STR_PAGE_HEADER (RC_FMTUI_BEGIN + 4) -#define STR_PAGE_FOOTER (RC_FMTUI_BEGIN + 5) -#define STR_PAGE_COLUMN (RC_FMTUI_BEGIN + 6) -#define STR_PAGE_FOOTNOTE (RC_FMTUI_BEGIN + 7) -#define STR_PAGE_TEXTGRID (RC_FMTUI_BEGIN + 8) - -#define DLG_STD_CHAR (RC_FMTUI_BEGIN + 15) - -#define MN_TEXT (RC_FMTUI_BEGIN + 20) -#define MN_GRAFIC (RC_FMTUI_BEGIN + 21) -#define MN_TABLE (RC_FMTUI_BEGIN + 22) - -#define MN_REGION (RC_FMTUI_BEGIN + 24) -#define MN_REGION_SUB (RC_FMTUI_BEGIN + 25) - - -#define DLG_DOC_STYLE (RC_FMTUI_BEGIN + 26) -#define DLG_NEW_COLL (RC_FMTUI_BEGIN + 28) - -#define DLG_TEMPLATE_PI (RC_FMTUI_BEGIN + 29) -#define DLG_HELP_ID (RC_FMTUI_BEGIN + 30) - -#define STR_OVERWRITE (RC_FMTUI_BEGIN + 32) -#define ST_CUSTOMIZE 1 - -// Do not change relations to base 2!!! -#define DLG_TEMPLATE_BASE (RC_FMTUI_BEGIN + 40) -#define DLG_TEMPLATE_1 (RC_FMTUI_BEGIN + 41) -#define DLG_TEMPLATE_2 (RC_FMTUI_BEGIN + 42) -#define DLG_TEMPLATE_3 (RC_FMTUI_BEGIN + 44) -#define DLG_TEMPLATE_4 (RC_FMTUI_BEGIN + 48) -#define DLG_TEMPLATE_5 (RC_FMTUI_BEGIN + 56) - - -#if DLG_TEMPLATE_5 > RC_FMTUI_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#define TEMPLATEPI_IDX_ALL 1 -#define TEMPLATEPI_IDX_USED 2 -#define TEMPLATEPI_IDX_USER 3 -#define TEMPLATEPI_IDX_AUTOMATIC 4 -#define TEMPLATEPI_IDX_TEXT 5 -#define TEMPLATEPI_IDX_CHAPTER 6 -#define TEMPLATEPI_IDX_LIST 7 -#define TEMPLATEPI_IDX_IDX 8 -#define TEMPLATEPI_IDX_EXTRA 9 - - - -#endif - diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx deleted file mode 100644 index ad38f6136c..0000000000 --- a/sw/inc/fmturl.hxx +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTURL_HXX -#define _FMTURL_HXX - -#include <svl/poolitem.hxx> -#include "swdllapi.h" -#include <hintids.hxx> -#include <format.hxx> - -class ImageMap; -class IntlWrapper; - -// URL, ServerMap und ClientMap - -class SW_DLLPUBLIC SwFmtURL: public SfxPoolItem -{ - String sTargetFrameName; // Target frame for URL. - String sURL; // Simple URL. - String sName; // Name of the anchor. - ImageMap *pMap; // ClientSide images. - - sal_Bool bIsServerMap; // A ServerSideImageMap with the URL. - - SwFmtURL& operator=( const SwFmtURL& ); - -public: - SwFmtURL(); - - // @@@ copy construction allowed, but assigment is not? @@@ - SwFmtURL( const SwFmtURL& ); - - virtual ~SwFmtURL(); - - // "Pure virtual methods" of SfxPoolItem. - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; } - void SetURL( const String &rURL, sal_Bool bServerMap ); - void SetMap( const ImageMap *pM ); // Pointer will be copied. - - const String &GetTargetFrameName()const { return sTargetFrameName; } - const String &GetURL() const { return sURL; } - sal_Bool IsServerMap() const { return bIsServerMap; } - const ImageMap *GetMap() const { return pMap; } - ImageMap *GetMap() { return pMap; } - - const String& GetName() const { return sName; } - void SetName( const String& rNm ) { sName = rNm; } -}; - - -inline const SwFmtURL &SwAttrSet::GetURL(sal_Bool bInP) const - { return (const SwFmtURL&)Get( RES_URL,bInP); } - -inline const SwFmtURL &SwFmt::GetURL(sal_Bool bInP) const - { return aSet.GetURL(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx deleted file mode 100644 index 954de40494..0000000000 --- a/sw/inc/fmtwrapinfluenceonobjpos.hxx +++ /dev/null @@ -1,78 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FMTWRAPINFLUENCEONOBJPOS_HXX -#define _FMTWRAPINFLUENCEONOBJPOS_HXX - -#include <hintids.hxx> -#include <format.hxx> -#include <svl/poolitem.hxx> -#include <com/sun/star/text/WrapInfluenceOnPosition.hpp> - -class SW_DLLPUBLIC SwFmtWrapInfluenceOnObjPos: public SfxPoolItem -{ -private: - sal_Int16 mnWrapInfluenceOnPosition; - -public: - TYPEINFO(); - - // #i35017# - constant name has changed - SwFmtWrapInfluenceOnObjPos( - sal_Int16 _nWrapInfluenceOnPosition = - com::sun::star::text::WrapInfluenceOnPosition::ONCE_CONCURRENT ); - SwFmtWrapInfluenceOnObjPos( - const SwFmtWrapInfluenceOnObjPos& _rCpy ); - ~SwFmtWrapInfluenceOnObjPos(); - - SwFmtWrapInfluenceOnObjPos& operator=( - const SwFmtWrapInfluenceOnObjPos& _rSource ); - - // pure virtual methods of class <SfxPoolItem> - virtual int operator==( const SfxPoolItem& _rAttr ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - // direct accessors to data - void SetWrapInfluenceOnObjPos( sal_Int16 _nWrapInfluenceOnPosition ); - // #i35017# - add parameter <_bIterativeAsOnceConcurrent> - // to control, if value <ITERATIVE> has to be treated as <ONCE_CONCURRENT> - sal_Int16 GetWrapInfluenceOnObjPos( - const bool _bIterativeAsOnceConcurrent = false ) const; -}; - -inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(sal_Bool bInP) const - { return (const SwFmtWrapInfluenceOnObjPos&)Get( RES_WRAP_INFLUENCE_ON_OBJPOS,bInP); } - - inline const SwFmtWrapInfluenceOnObjPos& SwFmt::GetWrapInfluenceOnObjPos(sal_Bool bInP) const - { return aSet.GetWrapInfluenceOnObjPos(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx deleted file mode 100644 index b1ad412019..0000000000 --- a/sw/inc/format.hxx +++ /dev/null @@ -1,345 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FORMAT_HXX -#define _FORMAT_HXX - -#include <tools/solar.h> -#include "swdllapi.h" -#include <swatrset.hxx> // For SfxItemPool/-Set, Attr forward decl. -#include <calbck.hxx> // For SwModify. -#include <hintids.hxx> - -class IDocumentSettingAccess; -class IDocumentDrawModelAccess; -class IDocumentLayoutAccess; -class IDocumentTimerAccess; -class IDocumentFieldsAccess; -class IDocumentChartDataProviderAccess; -class SwDoc; - -class SW_DLLPUBLIC SwFmt : public SwModify -{ - String aFmtName; - SwAttrSet aSet; - - sal_uInt16 nWhichId; - sal_uInt16 nFmtId; // Format-ID for reading / writing. - sal_uInt16 nPoolFmtId; // Id for "automatically" created formats. - // (is not hard attribution!!!) - sal_uInt16 nPoolHelpId; // HelpId for this Pool-style. - sal_uInt8 nPoolHlpFileId; // FilePos to Doc to these style helps. - sal_Bool bWritten : 1; // TRUE: already written. - sal_Bool bAutoFmt : 1; // FALSE: it is a template. - // default is true! - sal_Bool bFmtInDTOR : 1; // TRUE: Format becomes deleted. In order to be able - // to recognize this in FmtChg-message!! - sal_Bool bAutoUpdateFmt : 1;// TRUE: Set attributes of a whole paragraph - // at format (UI-side!). - -protected: - SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, - const sal_uInt16* pWhichRanges, SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich ); - SwFmt( SwAttrPool& rPool, const String &rFmtNm, const sal_uInt16* pWhichRanges, - SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich ); - SwFmt( const SwFmt& rFmt ); - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue ); - -public: - TYPEINFO(); // Already in base class Client. - - virtual ~SwFmt(); - SwFmt &operator=(const SwFmt&); - - // for Querying of Writer-functions. - sal_uInt16 Which() const { return nWhichId; } - - - // Query format information. - virtual sal_Bool GetInfo( SfxPoolItem& ) const; - - // Copy attributes even among documents. - void CopyAttrs( const SwFmt&, sal_Bool bReplace=sal_True ); - - // Delete all attributes that are not in rFmt. - void DelDiffs( const SfxItemSet& rSet ); - void DelDiffs( const SwFmt& rFmt ) { DelDiffs( rFmt.GetAttrSet() ); } - - // 0 is Default. - sal_Bool SetDerivedFrom(SwFmt *pDerivedFrom = 0); - - // If bInParents is FALSE, search only in this format for attribute. - inline const SfxPoolItem& GetFmtAttr( sal_uInt16 nWhich, - sal_Bool bInParents = sal_True ) const; - inline SfxItemState GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent = sal_True, - const SfxPoolItem **ppItem = 0 ) const; - virtual sal_Bool SetFmtAttr( const SfxPoolItem& rAttr ); - virtual sal_Bool SetFmtAttr( const SfxItemSet& rSet ); - virtual sal_Bool ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 ); - - // Takes all hints from Delta-Array, - // returns count of deleted hints. - virtual sal_uInt16 ResetAllFmtAttr(); - - inline SwFmt* DerivedFrom() const { return (SwFmt*)GetRegisteredIn(); } - inline sal_Bool IsDefault() const { return DerivedFrom() == 0; } - - inline const String& GetName() const { return aFmtName; } - void SetName( const String& rNewName, sal_Bool bBroadcast=sal_False ); - inline void SetName( const sal_Char* pNewName, - sal_Bool bBroadcast=sal_False); - - // For querying the attribute array. - inline const SwAttrSet& GetAttrSet() const { return aSet; } - - // Das Doc wird jetzt am SwAttrPool gesetzt. Dadurch hat man es immer - // im Zugriff. - const SwDoc *GetDoc() const { return aSet.GetDoc(); } - SwDoc *GetDoc() { return aSet.GetDoc(); } - - /// Provides access to the document settings interface. - const IDocumentSettingAccess* getIDocumentSettingAccess() const; - - /// Provides access to the document draw model interface. - const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const; - IDocumentDrawModelAccess* getIDocumentDrawModelAccess(); - - /// Provides access to the document layout interface. - const IDocumentLayoutAccess* getIDocumentLayoutAccess() const; - IDocumentLayoutAccess* getIDocumentLayoutAccess(); - - /// Provides access to the document idle timer interface. - IDocumentTimerAccess* getIDocumentTimerAccess(); - - /// Provides access to the document idle timer interface. - IDocumentFieldsAccess* getIDocumentFieldsAccess(); - - /// Gives access to the chart data-provider. - IDocumentChartDataProviderAccess* getIDocumentChartDataProviderAccess(); - - // Get and set Pool style IDs. - sal_uInt16 GetPoolFmtId() const { return nPoolFmtId; } - void SetPoolFmtId( sal_uInt16 nId ) { nPoolFmtId = nId; } - - // Get and set Help-IDs for document templates. - sal_uInt16 GetPoolHelpId() const { return nPoolHelpId; } - void SetPoolHelpId( sal_uInt16 nId ) { nPoolHelpId = nId; } - sal_uInt8 GetPoolHlpFileId() const { return nPoolHlpFileId; } - void SetPoolHlpFileId( sal_uInt8 nId ) { nPoolHlpFileId = nId; } - - // Get attribute-description. Returns passed string. - void GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const - { aSet.GetPresentation( ePres, eCoreMetric, ePresMetric, rText ); } - - // Format-ID for reading/writing: - void ResetWritten() { bWritten = sal_False; } - - // Query / set AutoFmt-flag. - sal_Bool IsAuto() const { return bAutoFmt; } - void SetAuto( sal_Bool bNew = sal_False ) { bAutoFmt = bNew; } - - // Query / set bAutoUpdateFmt-flag. - sal_Bool IsAutoUpdateFmt() const { return bAutoUpdateFmt; } - void SetAutoUpdateFmt( sal_Bool bNew = sal_True ) { bAutoUpdateFmt = bNew; } - - sal_Bool IsFmtInDTOR() const { return bFmtInDTOR; } - - // GetMethods: Bool indicates whether to search only in Set (FALSE) - // or also in Parents. - // If nothing is found the defaulted attribute is returned. - - // Character-attributes - implemented in charatr.hxx - inline const SvxPostureItem &GetPosture( sal_Bool = sal_True ) const; - inline const SvxWeightItem &GetWeight( sal_Bool = sal_True ) const; - inline const SvxShadowedItem &GetShadowed( sal_Bool = sal_True ) const; - inline const SvxAutoKernItem &GetAutoKern( sal_Bool = sal_True ) const; - inline const SvxWordLineModeItem &GetWordLineMode( sal_Bool = sal_True ) const; - inline const SvxContourItem &GetContour( sal_Bool = sal_True ) const; - inline const SvxKerningItem &GetKerning( sal_Bool = sal_True ) const; - inline const SvxUnderlineItem &GetUnderline( sal_Bool = sal_True ) const; - inline const SvxOverlineItem &GetOverline( sal_Bool = sal_True ) const; - inline const SvxCrossedOutItem &GetCrossedOut( sal_Bool = sal_True ) const; - inline const SvxFontHeightItem &GetSize( sal_Bool = sal_True ) const; - inline const SvxPropSizeItem &GetPropSize( sal_Bool = sal_True ) const; - inline const SvxFontItem &GetFont( sal_Bool = sal_True ) const; - inline const SvxColorItem &GetColor( sal_Bool = sal_True ) const; - inline const SvxCharSetColorItem &GetCharSetColor( sal_Bool = sal_True ) const; - inline const SvxLanguageItem &GetLanguage( sal_Bool = sal_True ) const; - inline const SvxEscapementItem &GetEscapement( sal_Bool = sal_True ) const; - inline const SvxCaseMapItem &GetCaseMap( sal_Bool = sal_True ) const; - inline const SvxNoHyphenItem &GetNoHyphenHere( sal_Bool = sal_True ) const; - inline const SvxBlinkItem &GetBlink( sal_Bool = sal_True ) const; - inline const SvxBrushItem &GetChrBackground( sal_Bool = sal_True ) const; - - inline const SvxFontItem &GetCJKFont( sal_Bool = sal_True ) const; - inline const SvxFontHeightItem &GetCJKSize( sal_Bool = sal_True ) const; - inline const SvxLanguageItem &GetCJKLanguage( sal_Bool = sal_True ) const; - inline const SvxPostureItem &GetCJKPosture( sal_Bool = sal_True ) const; - inline const SvxWeightItem &GetCJKWeight( sal_Bool = sal_True ) const; - inline const SvxFontItem &GetCTLFont( sal_Bool = sal_True ) const; - inline const SvxFontHeightItem &GetCTLSize( sal_Bool = sal_True ) const; - inline const SvxLanguageItem &GetCTLLanguage( sal_Bool = sal_True ) const; - inline const SvxPostureItem &GetCTLPosture( sal_Bool = sal_True ) const; - inline const SvxWeightItem &GetCTLWeight( sal_Bool = sal_True ) const; - inline const SfxBoolItem &GetWritingDirection( sal_Bool = sal_True ) const; - inline const SvxEmphasisMarkItem &GetEmphasisMark( sal_Bool = sal_True ) const; - inline const SvxTwoLinesItem &Get2Lines( sal_Bool = sal_True ) const; - inline const SvxCharScaleWidthItem &GetCharScaleW( sal_Bool = sal_True ) const; - inline const SvxCharRotateItem &GetCharRotate( sal_Bool = sal_True ) const; - inline const SvxCharReliefItem &GetCharRelief( sal_Bool = sal_True ) const; - inline const SvxCharHiddenItem &GetCharHidden( sal_Bool = sal_True ) const; - - // Frame-attributes - implemented in frmatr.hxx. - inline const SwFmtFillOrder &GetFillOrder( sal_Bool = sal_True ) const; - inline const SwFmtFrmSize &GetFrmSize( sal_Bool = sal_True ) const; - inline const SwFmtHeader &GetHeader( sal_Bool = sal_True ) const; - inline const SwFmtFooter &GetFooter( sal_Bool = sal_True ) const; - inline const SwFmtSurround &GetSurround( sal_Bool = sal_True ) const; - inline const SwFmtHoriOrient &GetHoriOrient( sal_Bool = sal_True ) const; - inline const SwFmtAnchor &GetAnchor( sal_Bool = sal_True ) const; - inline const SwFmtCol &GetCol( sal_Bool = sal_True ) const; - inline const SvxPaperBinItem &GetPaperBin( sal_Bool = sal_True ) const; - inline const SvxLRSpaceItem &GetLRSpace( sal_Bool = sal_True ) const; - inline const SvxULSpaceItem &GetULSpace( sal_Bool = sal_True ) const; - inline const SwFmtCntnt &GetCntnt( sal_Bool = sal_True ) const; - inline const SvxPrintItem &GetPrint( sal_Bool = sal_True ) const; - inline const SvxOpaqueItem &GetOpaque( sal_Bool = sal_True ) const; - inline const SvxProtectItem &GetProtect( sal_Bool = sal_True ) const; - inline const SwFmtVertOrient &GetVertOrient( sal_Bool = sal_True ) const; - inline const SvxBoxItem &GetBox( sal_Bool = sal_True ) const; - inline const SvxFmtKeepItem &GetKeep( sal_Bool = sal_True ) const; - inline const SvxBrushItem &GetBackground( sal_Bool = sal_True ) const; - inline const SvxShadowItem &GetShadow( sal_Bool = sal_True ) const; - inline const SwFmtPageDesc &GetPageDesc( sal_Bool = sal_True ) const; - inline const SvxFmtBreakItem &GetBreak( sal_Bool = sal_True ) const; - inline const SvxMacroItem &GetMacro( sal_Bool = sal_True ) const; - inline const SwFmtURL &GetURL( sal_Bool = sal_True ) const; - inline const SwFmtEditInReadonly &GetEditInReadonly( sal_Bool = sal_True ) const; - inline const SwFmtLayoutSplit &GetLayoutSplit( sal_Bool = sal_True ) const; - inline const SwFmtRowSplit &GetRowSplit( sal_Bool = sal_True ) const; - inline const SwFmtChain &GetChain( sal_Bool = sal_True ) const; - inline const SwFmtLineNumber &GetLineNumber( sal_Bool = sal_True ) const; - inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( sal_Bool = sal_True ) const; - inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( sal_Bool = sal_True ) const; - inline const SwFmtNoBalancedColumns &GetBalancedColumns( sal_Bool = sal_True ) const; - inline const SvxFrameDirectionItem &GetFrmDir( sal_Bool = sal_True ) const; - inline const SwTextGridItem &GetTextGrid( sal_Bool = sal_True ) const; - inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( sal_Bool = sal_True ) const; - // #i18732# - inline const SwFmtFollowTextFlow &GetFollowTextFlow(sal_Bool = sal_True) const; - // #i28701# - inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(sal_Bool = sal_True) const; - - // Graphics-attributes - implemented in grfatr.hxx - inline const SwMirrorGrf &GetMirrorGrf( sal_Bool = sal_True ) const; - inline const SwCropGrf &GetCropGrf( sal_Bool = sal_True ) const; - inline const SwRotationGrf &GetRotationGrf(sal_Bool = sal_True ) const; - inline const SwLuminanceGrf &GetLuminanceGrf(sal_Bool = sal_True ) const; - inline const SwContrastGrf &GetContrastGrf(sal_Bool = sal_True ) const; - inline const SwChannelRGrf &GetChannelRGrf(sal_Bool = sal_True ) const; - inline const SwChannelGGrf &GetChannelGGrf(sal_Bool = sal_True ) const; - inline const SwChannelBGrf &GetChannelBGrf(sal_Bool = sal_True ) const; - inline const SwGammaGrf &GetGammaGrf(sal_Bool = sal_True ) const; - inline const SwInvertGrf &GetInvertGrf(sal_Bool = sal_True ) const; - inline const SwTransparencyGrf &GetTransparencyGrf(sal_Bool = sal_True ) const; - inline const SwDrawModeGrf &GetDrawModeGrf(sal_Bool = sal_True ) const; - - // Paragraph-attributes - implemented in paratr.hxx. - inline const SvxLineSpacingItem &GetLineSpacing( sal_Bool = sal_True ) const; - inline const SvxAdjustItem &GetAdjust( sal_Bool = sal_True ) const; - inline const SvxFmtSplitItem &GetSplit( sal_Bool = sal_True ) const; - inline const SwRegisterItem &GetRegister( sal_Bool = sal_True ) const; - inline const SwNumRuleItem &GetNumRule( sal_Bool = sal_True ) const; - inline const SvxWidowsItem &GetWidows( sal_Bool = sal_True ) const; - inline const SvxOrphansItem &GetOrphans( sal_Bool = sal_True ) const; - inline const SvxTabStopItem &GetTabStops( sal_Bool = sal_True ) const; - inline const SvxHyphenZoneItem &GetHyphenZone( sal_Bool = sal_True ) const; - inline const SwFmtDrop &GetDrop( sal_Bool = sal_True ) const; - inline const SvxScriptSpaceItem &GetScriptSpace(sal_Bool = sal_True) const; - inline const SvxHangingPunctuationItem &GetHangingPunctuation(sal_Bool = sal_True) const; - inline const SvxForbiddenRuleItem &GetForbiddenRule(sal_Bool = sal_True) const; - inline const SvxParaVertAlignItem &GetParaVertAlign(sal_Bool = sal_True) const; - inline const SvxParaGridItem &GetParaGrid(sal_Bool = sal_True) const; - inline const SwParaConnectBorderItem &GetParaConnectBorder(sal_Bool = sal_True ) const; - - // TableBox attributes - implemented in cellatr.hxx. - inline const SwTblBoxNumFormat &GetTblBoxNumFmt( sal_Bool = sal_True ) const; - inline const SwTblBoxFormula &GetTblBoxFormula( sal_Bool = sal_True ) const; - inline const SwTblBoxValue &GetTblBoxValue( sal_Bool = sal_True ) const; - - /** SwFmt::IsBackgroundTransparent - - Virtual method to determine, if background of format is transparent. - Default implementation returns false. Thus, subclasses have to overload - method, if the specific subclass can have a transparent background. - - @author OD - - @return false, default implementation - */ - virtual sal_Bool IsBackgroundTransparent() const; - - /** SwFmt::IsShadowTransparent - - Virtual method to determine, if shadow of format is transparent. - Default implementation returns false. Thus, subclasses have to overload - method, if the specific subclass can have a transparent shadow. - - @author OD - - @return false, default implementation - */ - virtual sal_Bool IsShadowTransparent() const; -}; - -// --------------- inline Implementations ------------------------ - -inline const SfxPoolItem& SwFmt::GetFmtAttr( sal_uInt16 nWhich, - sal_Bool bInParents ) const -{ - return aSet.Get( nWhich, bInParents ); -} - -inline void SwFmt::SetName( const sal_Char* pNewName, - sal_Bool bBroadcast ) -{ - String aTmp( String::CreateFromAscii( pNewName ) ); - SetName( aTmp, bBroadcast ); -} - -inline SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent, - const SfxPoolItem **ppItem ) const -{ - return aSet.GetItemState( nWhich, bSrchInParent, ppItem ); -} - -#undef inline - -#endif // _FORMAT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/frmatr.hxx b/sw/inc/frmatr.hxx deleted file mode 100644 index 30ebaaa94f..0000000000 --- a/sw/inc/frmatr.hxx +++ /dev/null @@ -1,96 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FRMATR_HXX -#define _FRMATR_HXX - -#include <hintids.hxx> // IDs of attributes before frmitems to make sure -#include <format.hxx> // they are available for implementation of the inlines. - -// Inlines - - -// Implementation of FrameAttribute methods of SwAttrSet. -inline const SvxPaperBinItem &SwAttrSet::GetPaperBin(sal_Bool bInP) const - { return (const SvxPaperBinItem&)Get( RES_PAPER_BIN,bInP); } -inline const SvxLRSpaceItem &SwAttrSet::GetLRSpace(sal_Bool bInP) const - { return (const SvxLRSpaceItem&)Get( RES_LR_SPACE,bInP); } -inline const SvxULSpaceItem &SwAttrSet::GetULSpace(sal_Bool bInP) const - { return (const SvxULSpaceItem&)Get( RES_UL_SPACE,bInP); } -inline const SvxPrintItem &SwAttrSet::GetPrint(sal_Bool bInP) const - { return (const SvxPrintItem&)Get( RES_PRINT,bInP); } -inline const SvxOpaqueItem &SwAttrSet::GetOpaque(sal_Bool bInP) const - { return (const SvxOpaqueItem&)Get( RES_OPAQUE,bInP); } -inline const SvxProtectItem &SwAttrSet::GetProtect(sal_Bool bInP) const - { return (const SvxProtectItem&)Get( RES_PROTECT,bInP); } -inline const SvxBoxItem &SwAttrSet::GetBox(sal_Bool bInP) const - { return (const SvxBoxItem&)Get( RES_BOX,bInP); } -inline const SvxFmtKeepItem &SwAttrSet::GetKeep(sal_Bool bInP) const - { return (const SvxFmtKeepItem&)Get( RES_KEEP,bInP); } -inline const SvxBrushItem &SwAttrSet::GetBackground(sal_Bool bInP) const - { return (const SvxBrushItem&)Get( RES_BACKGROUND,bInP); } -inline const SvxShadowItem &SwAttrSet::GetShadow(sal_Bool bInP) const - { return (const SvxShadowItem&)Get( RES_SHADOW,bInP); } -inline const SvxFmtBreakItem &SwAttrSet::GetBreak(sal_Bool bInP) const - { return (const SvxFmtBreakItem&)Get( RES_BREAK,bInP); } -inline const SvxMacroItem &SwAttrSet::GetMacro(sal_Bool bInP) const - { return (const SvxMacroItem&)Get( RES_FRMMACRO,bInP); } -inline const SvxFrameDirectionItem &SwAttrSet::GetFrmDir(sal_Bool bInP) const - { return (const SvxFrameDirectionItem&)Get( RES_FRAMEDIR,bInP); } - - -// Implementation of FrameAttribute methods of SwFmt. -inline const SvxPaperBinItem &SwFmt::GetPaperBin(sal_Bool bInP) const - { return aSet.GetPaperBin(bInP); } -inline const SvxLRSpaceItem &SwFmt::GetLRSpace(sal_Bool bInP) const - { return aSet.GetLRSpace(bInP); } -inline const SvxULSpaceItem &SwFmt::GetULSpace(sal_Bool bInP) const - { return aSet.GetULSpace(bInP); } -inline const SvxPrintItem &SwFmt::GetPrint(sal_Bool bInP) const - { return aSet.GetPrint(bInP); } -inline const SvxOpaqueItem &SwFmt::GetOpaque(sal_Bool bInP) const - { return aSet.GetOpaque(bInP); } -inline const SvxProtectItem &SwFmt::GetProtect(sal_Bool bInP) const - { return aSet.GetProtect(bInP); } -inline const SvxBoxItem &SwFmt::GetBox(sal_Bool bInP) const - { return aSet.GetBox(bInP); } -inline const SvxFmtKeepItem &SwFmt::GetKeep(sal_Bool bInP) const - { return aSet.GetKeep(bInP); } -inline const SvxBrushItem &SwFmt::GetBackground(sal_Bool bInP) const - { return aSet.GetBackground(bInP); } -inline const SvxShadowItem &SwFmt::GetShadow(sal_Bool bInP) const - { return aSet.GetShadow(bInP); } -inline const SvxFmtBreakItem &SwFmt::GetBreak(sal_Bool bInP) const - { return aSet.GetBreak(bInP); } -inline const SvxMacroItem &SwFmt::GetMacro(sal_Bool bInP) const - { return aSet.GetMacro(bInP); } -inline const SvxFrameDirectionItem &SwFmt::GetFrmDir(sal_Bool bInP) const - { return aSet.GetFrmDir(bInP); } - -#endif //_FRMATR_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx deleted file mode 100644 index 5cd6ae7a2a..0000000000 --- a/sw/inc/frmfmt.hxx +++ /dev/null @@ -1,305 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FRMFMT_HXX -#define _FRMFMT_HXX - -#include <com/sun/star/text/PositionLayoutDir.hpp> -#include <cppuhelper/weakref.hxx> -#include <tools/gen.hxx> -#include <format.hxx> -#include "swdllapi.h" - -class SwFlyFrm; -class SwAnchoredObject; -class Graphic; -class Point; -class ImageMap; -class IMapObject; -class SwRect; -class SwContact; -class SdrObject; - -class SW_DLLPUBLIC SwFrmFmt: public SwFmt -{ - friend class SwDoc; - friend class SwPageDesc; // Is allowed to call protected CTor. - - ::com::sun::star::uno::WeakReference< - ::com::sun::star::uno::XInterface> m_wXObject; - -protected: - SwFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, - SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT, - const sal_uInt16* pWhichRange = 0 ) - : SwFmt( rPool, pFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange), - pDrvdFrm, nFmtWhich ) - {} - - SwFrmFmt( SwAttrPool& rPool, const String &rFmtNm, - SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT, - const sal_uInt16* pWhichRange = 0 ) - : SwFmt( rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange), - pDrvdFrm, nFmtWhich ) - {} - - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue ); - -public: - TYPEINFO(); // Already in base class Client. - - // Destroys all Frms in aDepend (Frms are identified via PTR_CAST). - virtual void DelFrms(); - - // Creates the views. - virtual void MakeFrms(); - - virtual Graphic MakeGraphic( ImageMap* pMap = NULL ); - - // Returns the IMapObject defined at format (Fly) - // in the ImageMap at position Point. - // rPoint - test on DocPosition. - // pFly - optional FlyFrame, in case it is already known. - IMapObject* GetIMapObject( const Point& rPoint, - const SwFlyFrm *pFly = 0 ) const; - - - // Returns the real size of the frame - or an empty rectangle - // if no layout exists. - // If pPoint is given, look for the frame closest to it. - SwRect FindLayoutRect( const sal_Bool bPrtArea = sal_False, - const Point* pPoint = 0, - const sal_Bool bCalcFrm = sal_False ) const; - - // Searches SdrObject. SdrObjUserCall is client of the format. - // The UserCall knows its SdrObject. - SwContact *FindContactObj(); - const SwContact *FindContactObj() const - { return ((SwFrmFmt*)this)->FindContactObj(); } - - // Returns the SdrObject, that ist connected to the ContactObject. - // Only DrawFrmFmts are connected to the "real SdrObject". FlyFrmFmts - // are connected to a Master and all FlyFrms has the "real SdrObject". - // "Real SdrObject" has position and a Z-order. - SdrObject *FindSdrObject(); - const SdrObject *FindSdrObject() const - { return ((SwFrmFmt*)this)->FindSdrObject(); } - - SdrObject *FindRealSdrObject(); - const SdrObject *FindRealSdrObject() const - { return ((SwFrmFmt*)this)->FindRealSdrObject(); } - - sal_Bool IsLowerOf( const SwFrmFmt& rFmt ) const; - - enum tLayoutDir - { - HORI_L2R, - HORI_R2L, - VERT_R2L, - VERT_L2R // Not supported yet. - }; - - virtual SwFrmFmt::tLayoutDir GetLayoutDir() const; - virtual void SetLayoutDir( const SwFrmFmt::tLayoutDir _eLayoutDir ); - - virtual sal_Int16 GetPositionLayoutDir() const; - virtual void SetPositionLayoutDir( const sal_Int16 _nPositionLayoutDir ); - - virtual String GetDescription() const; - - SW_DLLPRIVATE ::com::sun::star::uno::WeakReference< - ::com::sun::star::uno::XInterface> const& GetXObject() const - { return m_wXObject; } - SW_DLLPRIVATE void SetXObject(::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface> const& xObject) - { m_wXObject = xObject; } - - DECL_FIXEDMEMPOOL_NEWDEL_DLL(SwFrmFmt) - void RegisterToFormat( SwFmt& rFmt ); -}; - -// The FlyFrame-Format - -class SW_DLLPUBLIC SwFlyFrmFmt: public SwFrmFmt -{ - friend class SwDoc; - - // Both not existent. - // it stores the previous position of Prt rectangle from RequestObjectResize - // so it can be used to move frames of non-resizable objects to align them correctly - // when they get borders (this is done in SwWrtShell::CalcAndGetScale) - Point m_aLastFlyFrmPrtRectPos; - - SwFlyFrmFmt( const SwFlyFrmFmt &rCpy ); - SwFlyFrmFmt &operator=( const SwFlyFrmFmt &rCpy ); - -protected: - SwFlyFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, - SwFrmFmt *pDrvdFrm ) - : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FLYFRMFMT ) - {} - SwFlyFrmFmt( SwAttrPool& rPool, const String &rFmtNm, - SwFrmFmt *pDrvdFrm ) - : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FLYFRMFMT ) - {} - -public: - TYPEINFO(); - ~SwFlyFrmFmt(); - - // Creates the views. - virtual void MakeFrms(); - - SwFlyFrm* GetFrm( const Point* pDocPos = 0, - const sal_Bool bCalcFrm = sal_False ) const; - - SwAnchoredObject* GetAnchoredObj( const Point* pDocPos = 0, - const sal_Bool bCalcFrm = sal_False ) const; - - virtual Graphic MakeGraphic( ImageMap* pMap = NULL ); - - virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const; - - const String GetObjTitle() const; - void SetObjTitle( const String& rTitle, - bool bBroadcast = false ); - const String GetObjDescription() const; - void SetObjDescription( const String& rDescription, - bool bBroadcast = false ); - - /** SwFlyFrmFmt::IsBackgroundTransparent - - Overloading virtual method and its default implementation, - because format of fly frame provides transparent backgrounds. - Method determines, if background of fly frame is transparent. - - @author OD - - @return true, if background color is transparent, but not "no fill" - or a existing background graphic is transparent. - */ - virtual sal_Bool IsBackgroundTransparent() const; - - /** SwFlyFrmFmt::IsBackgroundBrushInherited - - Method to determine, if the brush for drawing the - background is "inherited" from its parent/grandparent. - This is the case, if no background graphic is set and the background - color is "no fill"/"auto fill" - - @author OD - - @return true, if background brush is "inherited" from parent/grandparent - */ - sal_Bool IsBackgroundBrushInherited() const; - - const Point & GetLastFlyFrmPrtRectPos() const { return m_aLastFlyFrmPrtRectPos; } - void SetLastFlyFrmPrtRectPos( const Point &rPoint ) { m_aLastFlyFrmPrtRectPos = rPoint; } - - DECL_FIXEDMEMPOOL_NEWDEL(SwFlyFrmFmt) -}; - -//The DrawFrame-Format - -class SW_DLLPUBLIC SwDrawFrmFmt: public SwFrmFmt -{ - friend class SwDoc; - - mutable const SdrObject * pSdrObjCached; - mutable String sSdrObjCachedComment; - - // Both not existent. - SwDrawFrmFmt( const SwDrawFrmFmt &rCpy ); - SwDrawFrmFmt &operator=( const SwDrawFrmFmt &rCpy ); - - SwFrmFmt::tLayoutDir meLayoutDir; - - sal_Int16 mnPositionLayoutDir; - - bool mbPosAttrSet; - -protected: - SwDrawFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, - SwFrmFmt *pDrvdFrm ) - : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_DRAWFRMFMT ), - pSdrObjCached(NULL), - - meLayoutDir( SwFrmFmt::HORI_L2R ), - - mnPositionLayoutDir( com::sun::star::text::PositionLayoutDir::PositionInLayoutDirOfAnchor ), - - mbPosAttrSet( false ) - - {} - SwDrawFrmFmt( SwAttrPool& rPool, const String &rFmtNm, - SwFrmFmt *pDrvdFrm ) - : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_DRAWFRMFMT ), - pSdrObjCached(NULL), - meLayoutDir( SwFrmFmt::HORI_L2R ), - - mnPositionLayoutDir( com::sun::star::text::PositionLayoutDir::PositionInLayoutDirOfAnchor ), - - mbPosAttrSet( false ) - {} - -public: - TYPEINFO(); - ~SwDrawFrmFmt(); - - // DrawObjects are removed from the arrays at the layout. - // The DrawObjects are marked as deleted. - virtual void DelFrms(); - - // Register DrawObjects in the arrays at layout. - // Reset delete marks. - virtual void MakeFrms(); - - virtual Graphic MakeGraphic( ImageMap* pMap = NULL ); - - virtual SwFrmFmt::tLayoutDir GetLayoutDir() const; - virtual void SetLayoutDir( const SwFrmFmt::tLayoutDir _eLayoutDir ); - - virtual sal_Int16 GetPositionLayoutDir() const; - virtual void SetPositionLayoutDir( const sal_Int16 _nPositionLayoutDir ); - - inline bool IsPosAttrSet() const { return mbPosAttrSet; } - inline void PosAttrSet() { mbPosAttrSet = true; } - - inline void ResetPosAttr() - { - mbPosAttrSet = false; - } - - virtual String GetDescription() const; - - DECL_FIXEDMEMPOOL_NEWDEL(SwDrawFrmFmt); -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx deleted file mode 100644 index 87a7e40261..0000000000 --- a/sw/inc/ftnidx.hxx +++ /dev/null @@ -1,78 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FTNIDX_HXX -#define _FTNIDX_HXX - -#include <svl/svstdarr.hxx> -#include <vector> - -class SwTxtFtn; -class SwNodeIndex; -class SwSectionNode; - -// Everywhere where NodeIndex is used, the header files missing here -// are already included. Therefore put here as defines only and -// not as inline methods (saves compile time). -#define _SwTxtFtn_GetIndex( pFIdx ) (pFIdx->GetTxtNode().GetIndex()) - - -typedef SwTxtFtn* SwTxtFtnPtr; -SV_DECL_PTRARR_SORT( _SwFtnIdxs, SwTxtFtnPtr, 0, 10 ) - -class SwFtnIdxs : public _SwFtnIdxs -{ -public: - SwFtnIdxs() {} - - void UpdateFtn( const SwNodeIndex& rStt ); // Update all from pos. - void UpdateAllFtn(); // Update all footnotes. - - SwTxtFtn* SeekEntry( const SwNodeIndex& rIdx, sal_uInt16* pPos = 0 ) const; -}; - - -class SwUpdFtnEndNtAtEnd -{ - SvPtrarr aFtnSects, aEndSects; - std::vector<sal_uInt16> aFtnNums, aEndNums; - -public: - SwUpdFtnEndNtAtEnd() : aFtnSects( 0, 4 ), aEndSects( 0, 4 ) {} - - static const SwSectionNode* FindSectNdWithEndAttr( - const SwTxtFtn& rTxtFtn ); - - sal_uInt16 GetNumber( const SwTxtFtn& rTxtFtn, const SwSectionNode& rNd ); - sal_uInt16 ChkNumber( const SwTxtFtn& rTxtFtn ); -}; - - - -#endif // _FTNIDX_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx deleted file mode 100644 index 0e0ec5603c..0000000000 --- a/sw/inc/ftninfo.hxx +++ /dev/null @@ -1,119 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _FTNINFO_HXX -#define _FTNINFO_HXX - -#include <tools/string.hxx> -#include "swdllapi.h" -#include <calbck.hxx> -#include <editeng/numitem.hxx> - -class SwTxtFmtColl; -class SwPageDesc; -class SwCharFmt; -class SwDoc; - -class SW_DLLPUBLIC SwEndNoteInfo : public SwClient -{ - SwDepend aPageDescDep; - SwDepend aCharFmtDep, aAnchorCharFmtDep; - String sPrefix; - String sSuffix; -protected: - bool m_bEndNote; - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ); - -public: - SvxNumberType aFmt; - sal_uInt16 nFtnOffset; - - void ChgPageDesc( SwPageDesc *pDesc ); - SwPageDesc* GetPageDesc( SwDoc &rDoc ) const; - bool KnowsPageDesc() const; - bool DependsOn( const SwPageDesc* ) const; - - void SetFtnTxtColl(SwTxtFmtColl& rColl); - SwTxtFmtColl* GetFtnTxtColl() const { return (SwTxtFmtColl*) GetRegisteredIn(); } // can be 0. - - SwCharFmt* GetCharFmt(SwDoc &rDoc) const; - void SetCharFmt( SwCharFmt* ); - SwClient *GetCharFmtDep() const { return (SwClient*)&aCharFmtDep; } - - SwCharFmt* GetAnchorCharFmt(SwDoc &rDoc) const; - void SetAnchorCharFmt( SwCharFmt* ); - SwClient *GetAnchorCharFmtDep() const { return (SwClient*)&aAnchorCharFmtDep; } - - SwEndNoteInfo & operator=(const SwEndNoteInfo&); - sal_Bool operator==( const SwEndNoteInfo &rInf ) const; - - SwEndNoteInfo( SwTxtFmtColl *pTxtColl = 0); - SwEndNoteInfo(const SwEndNoteInfo&); - - const String& GetPrefix() const { return sPrefix; } - const String& GetSuffix() const { return sSuffix; } - - void SetPrefix(const String& rSet) { sPrefix = rSet; } - void SetSuffix(const String& rSet) { sSuffix = rSet; } - void ReleaseCollection() { if ( GetRegisteredInNonConst() ) GetRegisteredInNonConst()->Remove( this ); } -}; - -enum SwFtnPos -{ - // Momentarily only PAGE and CHAPTER. CHAPTER == document-endnotes. - FTNPOS_PAGE = 1, - FTNPOS_CHAPTER = 8 -}; - -enum SwFtnNum -{ - FTNNUM_PAGE, FTNNUM_CHAPTER, FTNNUM_DOC -}; - -class SW_DLLPUBLIC SwFtnInfo: public SwEndNoteInfo -{ - using SwEndNoteInfo::operator ==; - -public: - String aQuoVadis; - String aErgoSum; - SwFtnPos ePos; - SwFtnNum eNum; - - - SwFtnInfo& operator=(const SwFtnInfo&); - - sal_Bool operator==( const SwFtnInfo &rInf ) const; - - SwFtnInfo(SwTxtFmtColl* pTxtColl = 0); - SwFtnInfo(const SwFtnInfo&); -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc deleted file mode 100644 index 1956e3906a..0000000000 --- a/sw/inc/globals.hrc +++ /dev/null @@ -1,291 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _GLOBALS_HRC -#define _GLOBALS_HRC - - - -#include "rcid.hrc" - -// STRINGS ----------------------------------------------------------- - -#define STR_DLLNOTFOUND (RC_GLOBALS_BEGIN + 0) -#define STR_FMT_STD (RC_GLOBALS_BEGIN + 1) -#define STR_LOAD_GLOBAL_DOC (RC_GLOBALS_BEGIN + 2) - -#define STR_SEPARATOR (RC_GLOBALS_BEGIN + 4) - - -#define STR_BASIC_IMPORT (RC_GLOBALS_BEGIN + 5) -#define STR_BASIC_BEGIN (RC_GLOBALS_BEGIN + 6) -#define STR_BASIC_END (RC_GLOBALS_BEGIN + 7) -#define STR_BASIC_REC_LIB (RC_GLOBALS_BEGIN + 8) -#define STR_TEMPLATE_WILDCARD (RC_GLOBALS_BEGIN + 9) -#define STR_DOC_STAT (RC_GLOBALS_BEGIN + 10) - -#define STR_PAGE (RC_GLOBALS_BEGIN + 14) -#define STR_PRINTOPTUI (RC_GLOBALS_BEGIN + 15) - -//EventStrings - -#define STR_EVENT_OBJECT_SELECT ( RC_GLOBALS_BEGIN + 17 ) -#define STR_EVENT_START_INS_GLOSSARY ( RC_GLOBALS_BEGIN + 18 ) -#define STR_EVENT_END_INS_GLOSSARY ( RC_GLOBALS_BEGIN + 19 ) -#define STR_EVENT_MOUSEOVER_OBJECT ( RC_GLOBALS_BEGIN + 20 ) -#define STR_EVENT_MOUSECLICK_OBJECT ( RC_GLOBALS_BEGIN + 21 ) -#define STR_EVENT_MOUSEOUT_OBJECT ( RC_GLOBALS_BEGIN + 22 ) -#define STR_EVENT_IMAGE_LOAD ( RC_GLOBALS_BEGIN + 23 ) -#define STR_EVENT_IMAGE_ABORT ( RC_GLOBALS_BEGIN + 24 ) -#define STR_EVENT_IMAGE_ERROR ( RC_GLOBALS_BEGIN + 25 ) -#define STR_EVENT_FRM_KEYINPUT_A ( RC_GLOBALS_BEGIN + 26 ) -#define STR_EVENT_FRM_KEYINPUT_NOA ( RC_GLOBALS_BEGIN + 27 ) -#define STR_EVENT_FRM_RESIZE ( RC_GLOBALS_BEGIN + 28 ) -#define STR_EVENT_FRM_MOVE ( RC_GLOBALS_BEGIN + 29 ) - -// Strings for frame alignment in Popup -#define STR_TOP_BASE (RC_GLOBALS_BEGIN + 30) -#define STR_BOTTOM_BASE (RC_GLOBALS_BEGIN + 31) -#define STR_CENTER_BASE (RC_GLOBALS_BEGIN + 32) -#define STR_TOP (RC_GLOBALS_BEGIN + 33) -#define STR_BOTTOM (RC_GLOBALS_BEGIN + 34) -#define STR_CENTER_HORI (RC_GLOBALS_BEGIN + 35) -#define STR_CENTER_VERT (RC_GLOBALS_BEGIN + 36) - -#define STR_LOAD_HTML_DOC (RC_GLOBALS_BEGIN + 37) - -#define STR_AUTH (RC_GLOBALS_BEGIN + 38) -#define STR_TBL (RC_GLOBALS_BEGIN + 39) -#define STR_TOO (RC_GLOBALS_BEGIN + 40) -#define STR_TOILL (RC_GLOBALS_BEGIN + 41) - -// more Strings - -// BITMAPS ----------------------------------------------------------- - -#define RES_TABL (RC_GLOBALS_BEGIN + 1) -#define RES_TABR (RC_GLOBALS_BEGIN + 2) -#define RES_TABD (RC_GLOBALS_BEGIN + 3) -#define RES_TABC (RC_GLOBALS_BEGIN + 4) - -// DIALOGS ----------------------------------------------------------- - -#define DLG_LISTBOX (RC_GLOBALS_BEGIN + 1) -#define DLG_THESAURUS (RC_GLOBALS_BEGIN + 2) -#define DLG_SPECIAL (RC_GLOBALS_BEGIN + 3) - -// QUERYBOX --------------------------------------------------------- - -#define DLG_WRAP (RC_GLOBALS_BEGIN + 4) -#define DLG_BODY (RC_GLOBALS_BEGIN + 5) -#define DLG_PRT_FIELDNAME (RC_GLOBALS_BEGIN + 6) - -// INFOBOX ------------------------------------------------------------ - -#define ERR_CLPBRD_READ (RC_GLOBALS_BEGIN + 1) -#define ERR_CLPBRD_WRITE (RC_GLOBALS_BEGIN + 2) -#define MSG_ERROR_PASSWD (RC_GLOBALS_BEGIN + 3) - - -// ACC --------------------------------------------------------------- - -#define FN_CHAR_LEFT_SEL (RC_GLOBALS_BEGIN + 1) // -#define FN_CHAR_RIGHT_SEL (RC_GLOBALS_BEGIN + 2) // -#define FN_LINE_UP_SEL (RC_GLOBALS_BEGIN + 3) // -#define FN_LINE_DOWN_SEL (RC_GLOBALS_BEGIN + 4) // -#define FN_START_OF_LINE_SEL (RC_GLOBALS_BEGIN + 5) // StartOfLine -#define FN_END_OF_LINE_SEL (RC_GLOBALS_BEGIN + 6) // EndOfLine -#define FN_START_OF_DOCUMENT_SEL (RC_GLOBALS_BEGIN + 7) // StartOfDocument -#define FN_END_OF_DOCUMENT_SEL (RC_GLOBALS_BEGIN + 8) // EndOfDocument -#define FN_START_OF_NEXT_PAGE_SEL (RC_GLOBALS_BEGIN + 9) // StartOfNextPage ??? -#define FN_END_OF_NEXT_PAGE_SEL (RC_GLOBALS_BEGIN + 10) // ??? -#define FN_START_OF_PREV_PAGE_SEL (RC_GLOBALS_BEGIN + 11) // StartOfPrevPage ??? -#define FN_END_OF_PREV_PAGE_SEL (RC_GLOBALS_BEGIN + 12) // ??? -#define FN_START_OF_PAGE_SEL (RC_GLOBALS_BEGIN + 13) // StartOfPage -#define FN_END_OF_PAGE_SEL (RC_GLOBALS_BEGIN + 14) // EndOfPage -#define FN_START_OF_WINDOW_SEL (RC_GLOBALS_BEGIN + 15) // StartOfWindow -#define FN_END_OF_WINDOW_SEL (RC_GLOBALS_BEGIN + 16) // EndOfWindow -#define FN_START_OF_COLUMN_SEL (RC_GLOBALS_BEGIN + 17) // StartOfColumn -#define FN_END_OF_COLUMN_SEL (RC_GLOBALS_BEGIN + 18) // EndOfColumn -#define FN_START_OF_PARA_SEL (RC_GLOBALS_BEGIN + 19) // StartOfPara -#define FN_END_OF_PARA_SEL (RC_GLOBALS_BEGIN + 20) // EndOfPara -#define FN_NEXT_WORD_SEL (RC_GLOBALS_BEGIN + 21) // NextWord -#define FN_PREV_WORD_SEL (RC_GLOBALS_BEGIN + 22) // PrevWord -#define FN_NEXT_SENT_SEL (RC_GLOBALS_BEGIN + 23) // NextSentence -#define FN_PREV_SENT_SEL (RC_GLOBALS_BEGIN + 24) // PrevSentence - -#define FN_START_OF_NEXT_COLUMN_SEL (RC_GLOBALS_BEGIN + 25) -#define FN_END_OF_NEXT_COLUMN_SEL (RC_GLOBALS_BEGIN + 26) -#define FN_START_OF_PREV_COLUMN_SEL (RC_GLOBALS_BEGIN + 27) -#define FN_END_OF_PREV_COLUMN_SEL (RC_GLOBALS_BEGIN + 28) -#define FN_PAGEUP_SEL (RC_GLOBALS_BEGIN + 29) -#define FN_PAGEDOWN_SEL (RC_GLOBALS_BEGIN + 30) - -// TABPAGES ----------------------------------------------------------- - -#define TP_PAGE_STD (RC_GLOBALS_BEGIN + 1) -#define TP_PAGE_EXT (RC_GLOBALS_BEGIN + 2) - -#define TP_PARA_STD (RC_GLOBALS_BEGIN + 3) -#define TP_PARA_EXT (RC_GLOBALS_BEGIN + 4) - -#define TP_FRAME_STD (RC_GLOBALS_BEGIN + 5) -#define TP_FRAME_EXT (RC_GLOBALS_BEGIN + 6) - -#define TP_CHAR_STD (RC_GLOBALS_BEGIN + 7) -#define TP_CHAR_EXT (RC_GLOBALS_BEGIN + 8) - -#define TP_TABULATOR (RC_GLOBALS_BEGIN + 9) -#define TP_DROPCAPS (RC_GLOBALS_BEGIN + 10) -#define TP_BACKGROUND (RC_GLOBALS_BEGIN + 11) -#define TP_BORDER (RC_GLOBALS_BEGIN + 12) -#define TP_COLUMN (RC_GLOBALS_BEGIN + 13) - -#define TP_DOC_STAT (RC_GLOBALS_BEGIN + 15) - -#define TP_HEADER_PAGE (RC_GLOBALS_BEGIN + 16) -#define TP_FOOTER_PAGE (RC_GLOBALS_BEGIN + 17) -#define TP_FOOTNOTE_PAGE (RC_GLOBALS_BEGIN + 18) - -#define TP_OPTGENERAL_PAGE (RC_GLOBALS_BEGIN + 19) // Sfx-pages -#define TP_OPTSAVE_PAGE (RC_GLOBALS_BEGIN + 20) -#define TP_OPTPATH_PAGE (RC_GLOBALS_BEGIN + 21) -#define TP_OPTSPELL_PAGE (RC_GLOBALS_BEGIN + 22) -// Sw-pages -#define SW_EDIT_OPTIONS_TDLG (RC_GLOBALS_BEGIN + 23) -#define SW_BROWSER_OPTIONS_TDLG (RC_GLOBALS_BEGIN + 24) -#define TP_OPTTEST_PAGE (RC_GLOBALS_BEGIN + 25) -#define TP_OPTPRINT_PAGE (RC_GLOBALS_BEGIN + 26) -#define TP_OPTCOLOR_PAGE (RC_GLOBALS_BEGIN + 27) - -#define SW_OPTIONS_TDLG (RC_GLOBALS_BEGIN + 28) -#define SW_OPTIONS_TDLG_ELEM (RC_GLOBALS_BEGIN + 29) -#define SW_OPTIONS_TDLG_PRINT (RC_GLOBALS_BEGIN + 30) - -#define TP_FRM_STD (RC_GLOBALS_BEGIN + 31) - -#define TP_OPTGRID_PAGE (RC_GLOBALS_BEGIN + 33) - -#define TP_FORMAT_TABLE (RC_GLOBALS_BEGIN + 34) -#define TP_GRF_EXT (RC_GLOBALS_BEGIN + 35) - -#define DLG_FRM_STD (RC_GLOBALS_BEGIN + 36) -#define DLG_FRM_GRF (RC_GLOBALS_BEGIN + 37) -#define DLG_FRM_OLE (RC_GLOBALS_BEGIN + 38) - -#define RID_INPUT_TOOLBOX (RC_GLOBALS_BEGIN + 39) - -#define TP_MACRO_ASSIGN (RC_GLOBALS_BEGIN + 40) -#define TP_FRM_URL (RC_GLOBALS_BEGIN + 42) -#define TP_CHAR_URL (RC_GLOBALS_BEGIN + 43) - -#define TP_LAYOUT_OPT (RC_GLOBALS_BEGIN + 44) -#define TP_CONTENT_OPT (RC_GLOBALS_BEGIN + 45) -#define TP_HTML_OPT (RC_GLOBALS_BEGIN + 46) -#define TP_STD_FONT (RC_GLOBALS_BEGIN + 47) -#define TP_CONDCOLL (RC_GLOBALS_BEGIN + 48) - -#define TP_FRM_WRAP (RC_GLOBALS_BEGIN + 49) -#define TP_FRM_ADD (RC_GLOBALS_BEGIN + 51) - -#define TP_TABLE_TEXTFLOW (RC_GLOBALS_BEGIN + 52) - -#define TP_AUTOFMT_BY_INPUT (RC_GLOBALS_BEGIN + 53) -#define TP_AUTOFMT_APPLY (RC_GLOBALS_BEGIN + 54) - -#define TP_PARA_ALIGN (RC_GLOBALS_BEGIN + 55) -#define TP_OPTTABLE_PAGE (RC_GLOBALS_BEGIN + 56) - -#define TP_NUMBER (RC_GLOBALS_BEGIN + 57) - -#define DLG_NUM_BULLET (RC_GLOBALS_BEGIN + 58) -#define TP_PICK_SINGLE_NUM (RC_GLOBALS_BEGIN + 59) -#define TP_PICK_BULLET (RC_GLOBALS_BEGIN + 60) -#define TP_PICK_NUM (RC_GLOBALS_BEGIN + 61) -#define TP_PICK_BMP (RC_GLOBALS_BEGIN + 62) - -#define TP_FLD_DB (RC_GLOBALS_BEGIN + 64) -#define TP_FLD_DOKINF (RC_GLOBALS_BEGIN + 65) -#define TP_FLD_VAR (RC_GLOBALS_BEGIN + 66) -#define TP_FLD_DOK (RC_GLOBALS_BEGIN + 67) -#define TP_FLD_FUNC (RC_GLOBALS_BEGIN + 68) -#define TP_FLD_REF (RC_GLOBALS_BEGIN + 69) - -#define TP_OPTSHDWCRSR (RC_GLOBALS_BEGIN + 70) -#define TP_NUM_OPTIONS (RC_GLOBALS_BEGIN + 71) -#define TP_NUM_POSITION (RC_GLOBALS_BEGIN + 72) -#define TP_NUMPARA (RC_GLOBALS_BEGIN + 73) - -#define TP_REDLINE_OPT (RC_GLOBALS_BEGIN + 74) - -#define TP_LINENUMBERING (RC_GLOBALS_BEGIN + 75) -#define TP_OUTLINE_NUM (RC_GLOBALS_BEGIN + 76) - -#define TP_OPTINSERT_PAGE (RC_GLOBALS_BEGIN + 77) -#define TP_OPTCAPTION_PAGE (RC_GLOBALS_BEGIN + 78) -#define DLG_SVXTEST_NUM_BULLET (RC_GLOBALS_BEGIN + 79) -#define TP_OPTLOAD_PAGE (RC_GLOBALS_BEGIN + 80) -#define TP_INSERT_TOX (RC_GLOBALS_BEGIN + 81) -#define TP_TOX_FORM_ENTRY (RC_GLOBALS_BEGIN + 82) -#define TP_TOX_FORM_STYLES (RC_GLOBALS_BEGIN + 83) -#define DLG_INSERT_TOX_TABDLG (RC_GLOBALS_BEGIN + 84) -#define TP_INSERT_SECTION (RC_GLOBALS_BEGIN + 85) -#define DLG_INSERT_SECTION (RC_GLOBALS_BEGIN + 86) -#define DLG_SECTION_PROPERTIES (RC_GLOBALS_BEGIN + 87) -#define DLG_RENAME_XNAMED (RC_GLOBALS_BEGIN + 88) -#define DLG_MULTI_TOX (RC_GLOBALS_BEGIN + 89) -#define TP_TOX_SELECT (RC_GLOBALS_BEGIN + 90) -#define TP_TOX_ENTRY (RC_GLOBALS_BEGIN + 91) -#define TP_TOX_STYLES (RC_GLOBALS_BEGIN + 92) -#define TP_VISITING_CARDS (RC_GLOBALS_BEGIN + 93) -#define DLG_ADD_IDX_STYLES (RC_GLOBALS_BEGIN + 94) -#define TP_PRIVATE_DATA (RC_GLOBALS_BEGIN + 95) -#define TP_BUSINESS_DATA (RC_GLOBALS_BEGIN + 96) -#define TP_SECTION_FTNENDNOTES (RC_GLOBALS_BEGIN + 97) -#define TP_CHAR_POS (RC_GLOBALS_BEGIN + 98) -#define TP_CHAR_TWOLN (RC_GLOBALS_BEGIN + 99) -#define TP_PARA_ASIAN (RC_GLOBALS_BEGIN + 100) -#define TP_TEXTGRID_PAGE (RC_GLOBALS_BEGIN + 101) -#define TP_SECTION_INDENTS (RC_GLOBALS_BEGIN + 102) -#define TP_OPTCOMPATIBILITY_PAGE (RC_GLOBALS_BEGIN + 103) -#define TP_MAILCONFIG (RC_GLOBALS_BEGIN + 104) -#define TP_TITLEPAGE (RC_GLOBALS_BEGIN + 105) -//maximum: RC_GLOBALS_BEGIN + 120 - - -#if STR_DOC_STAT > RC_GLOBALS_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#define SID_PREVIEWFLAG_TYPE (RC_GLOBALS_BEGIN + 114) -#define SID_FONTMODE_TYPE (RC_GLOBALS_BEGIN + 115) -#define SID_FAX_LIST (RC_GLOBALS_BEGIN + 116) -#define SID_WRT_SHELL (RC_GLOBALS_BEGIN + 117) - -#define DLG_LINE_NUMBERING (RC_GLOBALS_BEGIN + 118) -#define DLG_TITLEPAGE (RC_GLOBALS_BEGIN + 119) -#endif // _GLOBALS_HRC diff --git a/sw/inc/globdoc.hxx b/sw/inc/globdoc.hxx deleted file mode 100644 index 4f91c086ca..0000000000 --- a/sw/inc/globdoc.hxx +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWGLOBDOCSH_HXX -#define _SWGLOBDOCSH_HXX - -#include <swdll.hxx> -#include "docsh.hxx" - -class SwGlobalDocShell : public SwDocShell -{ -public: - - SFX_DECL_OBJECTFACTORY(); - TYPEINFO(); - - SwGlobalDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED); - ~SwGlobalDocShell(); - - virtual void FillClass( SvGlobalName * pClassName, - sal_uInt32 * pClipFormat, - String * pAppName, - String * pLongUserName, - String * pUserName, - sal_Int32 nFileFormat, - sal_Bool bTemplate = sal_False ) const; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx deleted file mode 100644 index ef240ff92a..0000000000 --- a/sw/inc/grfatr.hxx +++ /dev/null @@ -1,373 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _GRFATR_HXX -#define _GRFATR_HXX - -#include <hintids.hxx> // For the WhichIds @@@ must be included first @@@ -#include <tools/gen.hxx> -#include <svl/eitem.hxx> -#include <svl/intitem.hxx> -#include <svx/grfcrop.hxx> -#include "swdllapi.h" -#include <swatrset.hxx> // For inlines. -#include <format.hxx> // For inlines. - -/****************************************************************************** - * class SwMirrorGrf - ******************************************************************************/ - -enum MirrorGraph -{ -RES_MIRROR_GRAPH_BEGIN, - RES_MIRROR_GRAPH_DONT = RES_MIRROR_GRAPH_BEGIN, - RES_MIRROR_GRAPH_VERT, - RES_MIRROR_GRAPH_HOR, - RES_MIRROR_GRAPH_BOTH, -RES_MIRROR_GRAPH_END -}; - -class SW_DLLPUBLIC SwMirrorGrf : public SfxEnumItem -{ - sal_Bool bGrfToggle; // Flip graphics on even pages. - -public: - SwMirrorGrf( MirrorGraph eMiro = RES_MIRROR_GRAPH_DONT ) - : SfxEnumItem( RES_GRFATR_MIRRORGRF, static_cast< sal_uInt16 >(eMiro) ), bGrfToggle( sal_False ) - {} - SwMirrorGrf( const SwMirrorGrf &rMirrorGrf ) - : SfxEnumItem( RES_GRFATR_MIRRORGRF, rMirrorGrf.GetValue()), - bGrfToggle( rMirrorGrf.IsGrfToggle() ) - {} - - // pure virtual methods of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - - // pure virtual methods of SfxEnumItem - virtual sal_uInt16 GetValueCount() const; - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ); - - inline SwMirrorGrf& operator=( const SwMirrorGrf& rMirrorGrf ) - { - SfxEnumItem::SetValue( rMirrorGrf.GetValue() ); - bGrfToggle = rMirrorGrf.IsGrfToggle(); - return *this; - } - - inline sal_Bool IsGrfToggle() const { return bGrfToggle; } - inline void SetGrfToggle( sal_Bool bNew ) { bGrfToggle = bNew; } -}; - - -/****************************************************************************** - * class SwAttrCropGrf - ******************************************************************************/ - -class SW_DLLPUBLIC SwCropGrf : public SvxGrfCrop -{ -public: - TYPEINFO(); - SwCropGrf(); - SwCropGrf( sal_Int32 nLeft, sal_Int32 nRight, - sal_Int32 nTop, sal_Int32 nBottom ); - - // "pure virtual methods" of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; -}; - -class SwRotationGrf : public SfxUInt16Item -{ - Size aUnrotatedSize; -public: - SwRotationGrf( sal_Int16 nVal = 0 ) - : SfxUInt16Item( RES_GRFATR_ROTATION, nVal ) - {} - SwRotationGrf( sal_Int16 nVal, const Size& rSz ) - : SfxUInt16Item( RES_GRFATR_ROTATION, nVal ), aUnrotatedSize( rSz ) - {} - - // pure virtual methods from SfxInt16Item - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ); - - void SetUnrotatedSize( const Size& rSz ) { aUnrotatedSize = rSz; } - const Size& GetUnrotatedSize() const { return aUnrotatedSize; } -}; - -class SW_DLLPUBLIC SwLuminanceGrf : public SfxInt16Item -{ -public: - SwLuminanceGrf( sal_Int16 nVal = 0 ) - : SfxInt16Item( RES_GRFATR_LUMINANCE, nVal ) - {} - - // pure virtual methods from SfxInt16Item - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; -}; - -class SW_DLLPUBLIC SwContrastGrf : public SfxInt16Item -{ -public: - SwContrastGrf( sal_Int16 nVal = 0 ) - : SfxInt16Item( RES_GRFATR_CONTRAST, nVal ) - {} - - // pure virtual methods from SfxInt16Item - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; -}; - -class SwChannelGrf : public SfxInt16Item -{ -protected: - SwChannelGrf( sal_Int16 nVal, sal_uInt16 nWhichL ) - : SfxInt16Item( nWhichL, nVal ) - {} - -public: - // pure virtual methods from SfxInt16Item - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; -}; - -class SwChannelRGrf : public SwChannelGrf -{ -public: - SwChannelRGrf( sal_Int16 nVal = 0 ) - : SwChannelGrf( nVal, RES_GRFATR_CHANNELR ) - {} - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; -}; -class SwChannelGGrf : public SwChannelGrf -{ -public: - SwChannelGGrf( sal_Int16 nVal = 0 ) - : SwChannelGrf( nVal, RES_GRFATR_CHANNELG ) - {} - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; -}; -class SwChannelBGrf : public SwChannelGrf -{ -public: - SwChannelBGrf( sal_Int16 nVal = 0 ) - : SwChannelGrf( nVal, RES_GRFATR_CHANNELB ) - {} - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; -}; - -class SW_DLLPUBLIC SwGammaGrf : public SfxPoolItem -{ - double nValue; -public: - TYPEINFO(); - SwGammaGrf() : SfxPoolItem( RES_GRFATR_GAMMA ), nValue( 1.0 ) - {} - - SwGammaGrf( const double& rVal ) - : SfxPoolItem( RES_GRFATR_GAMMA ), nValue( rVal ) - {} - - inline SwGammaGrf& operator=( const SwGammaGrf& rCopy ) - { - SetValue( rCopy.GetValue() ); - return *this; - } - - // pure virtual methods from SfxEnumItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ); - - - const double& GetValue() const { return nValue; } - void SetValue( const double& rVal ) { nValue = rVal; } -}; - -class SwInvertGrf: public SfxBoolItem -{ -public: - SwInvertGrf( sal_Bool bVal = sal_False ) - : SfxBoolItem( RES_GRFATR_INVERT, bVal ) - {} - - // pure virtual methods from SfxInt16Item - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; -}; - -class SwTransparencyGrf : public SfxByteItem -{ -public: - SwTransparencyGrf( sal_Int8 nVal = 0 ) - : SfxByteItem( RES_GRFATR_TRANSPARENCY, nVal ) - {} - - // pure virtual methods from SfxInt16Item - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ); -}; - -class SW_DLLPUBLIC SwDrawModeGrf : public SfxEnumItem -{ -public: - SwDrawModeGrf( sal_uInt16 nMode = 0 ) - : SfxEnumItem( RES_GRFATR_DRAWMODE, nMode ) - {} - - // pure virtual methods of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - - // pure virtual methods of SfxEnumItem - virtual sal_uInt16 GetValueCount() const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - sal_uInt8 nMemberId = 0 ); -}; - - - -/****************************************************************************** - * Implementation of graphics attributes methods of SwAttr - ******************************************************************************/ - -inline const SwMirrorGrf &SwAttrSet::GetMirrorGrf(sal_Bool bInP) const - { return (const SwMirrorGrf&)Get( RES_GRFATR_MIRRORGRF,bInP); } -inline const SwCropGrf &SwAttrSet::GetCropGrf(sal_Bool bInP) const - { return (const SwCropGrf&)Get( RES_GRFATR_CROPGRF,bInP); } -inline const SwRotationGrf &SwAttrSet::GetRotationGrf(sal_Bool bInP) const - { return (const SwRotationGrf&)Get( RES_GRFATR_ROTATION,bInP); } -inline const SwLuminanceGrf &SwAttrSet::GetLuminanceGrf(sal_Bool bInP) const - { return (const SwLuminanceGrf&)Get( RES_GRFATR_LUMINANCE,bInP); } -inline const SwContrastGrf &SwAttrSet::GetContrastGrf(sal_Bool bInP) const - { return (const SwContrastGrf&)Get( RES_GRFATR_CONTRAST,bInP); } -inline const SwChannelRGrf &SwAttrSet::GetChannelRGrf(sal_Bool bInP) const - { return (const SwChannelRGrf&)Get( RES_GRFATR_CHANNELR,bInP); } -inline const SwChannelGGrf &SwAttrSet::GetChannelGGrf(sal_Bool bInP) const - { return (const SwChannelGGrf&)Get( RES_GRFATR_CHANNELG,bInP); } -inline const SwChannelBGrf &SwAttrSet::GetChannelBGrf(sal_Bool bInP) const - { return (const SwChannelBGrf&)Get( RES_GRFATR_CHANNELB,bInP); } -inline const SwGammaGrf &SwAttrSet::GetGammaGrf(sal_Bool bInP) const - { return (const SwGammaGrf&)Get( RES_GRFATR_GAMMA,bInP); } -inline const SwInvertGrf &SwAttrSet::GetInvertGrf(sal_Bool bInP) const - { return (const SwInvertGrf&)Get( RES_GRFATR_INVERT,bInP); } -inline const SwTransparencyGrf &SwAttrSet::GetTransparencyGrf(sal_Bool bInP) const - { return (const SwTransparencyGrf&)Get( RES_GRFATR_TRANSPARENCY,bInP); } -inline const SwDrawModeGrf &SwAttrSet::GetDrawModeGrf(sal_Bool bInP) const - { return (const SwDrawModeGrf&)Get( RES_GRFATR_DRAWMODE,bInP); } - -/****************************************************************************** - * Implementation of graphics attributes methods of SwFmt - ******************************************************************************/ - -inline const SwMirrorGrf &SwFmt::GetMirrorGrf(sal_Bool bInP) const - { return aSet.GetMirrorGrf(bInP); } -inline const SwCropGrf &SwFmt::GetCropGrf(sal_Bool bInP) const - { return aSet.GetCropGrf(bInP); } -inline const SwRotationGrf &SwFmt::GetRotationGrf(sal_Bool bInP) const - { return aSet.GetRotationGrf(bInP); } -inline const SwLuminanceGrf &SwFmt::GetLuminanceGrf(sal_Bool bInP) const - { return aSet.GetLuminanceGrf( bInP); } -inline const SwContrastGrf &SwFmt::GetContrastGrf(sal_Bool bInP) const - { return aSet.GetContrastGrf( bInP); } -inline const SwChannelRGrf &SwFmt::GetChannelRGrf(sal_Bool bInP) const - { return aSet.GetChannelRGrf( bInP); } -inline const SwChannelGGrf &SwFmt::GetChannelGGrf(sal_Bool bInP) const - { return aSet.GetChannelGGrf( bInP); } -inline const SwChannelBGrf &SwFmt::GetChannelBGrf(sal_Bool bInP) const - { return aSet.GetChannelBGrf( bInP); } -inline const SwGammaGrf &SwFmt::GetGammaGrf(sal_Bool bInP) const - { return aSet.GetGammaGrf( bInP); } -inline const SwInvertGrf &SwFmt::GetInvertGrf(sal_Bool bInP) const - { return aSet.GetInvertGrf( bInP); } -inline const SwTransparencyGrf &SwFmt::GetTransparencyGrf(sal_Bool bInP) const - { return aSet.GetTransparencyGrf( bInP); } -inline const SwDrawModeGrf &SwFmt::GetDrawModeGrf(sal_Bool bInP) const - { return aSet.GetDrawModeGrf(bInP); } - - -#endif // _GRFATR_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h deleted file mode 100644 index 621e2d916a..0000000000 --- a/sw/inc/helpid.h +++ /dev/null @@ -1,997 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - ************************************************************************/ -#include "swcommands.h" -#include <svx/svxcommands.h> -#include <sfx2/sfxcommands.h> - -#define HID_BIB_BASE "SW_HID_BIB_BASE" -#define HID_DBSEL "SW_HID_DBSEL" -#define HID_DBEDIT "SW_HID_DBEDIT" -#define HID_PRINT_OPTION "SW_HID_PRINT_OPTION" -#define HID_MERGE_PRINTMONITOR "SW_HID_MERGE_PRINTMONITOR" -#define HID_FLD_INPUT "SW_HID_FLD_INPUT" -#define HID_CONFIG_MISC "SW_HID_CONFIG_MISC" -#define HID_CONFIG_PATH "SW_HID_CONFIG_PATH" -#define HID_CONFIG_TB "SW_HID_CONFIG_TB" -#define HID_PG_FOOTNOTE "SW_HID_PG_FOOTNOTE" -#define HID_FORMAT_GRAPHIC "SW_HID_FORMAT_GRAPHIC" -#define HID_FILTERSTATUS "SW_HID_FILTERSTATUS" -#define HID_DOCINFO_EDT "SW_HID_DOCINFO_EDT" -#define HID_DBLOGON "SW_HID_DBLOGON" -#define HID_MAC_ASSIGN "SW_HID_MAC_ASSIGN" -#define HID_CONFIG_MN "SW_HID_CONFIG_MN" -#define HID_PAPERSIZE "SW_HID_PAPERSIZE" -#define HID_PASSWD "SW_HID_PASSWD" -#define HID_SPELLING_OPTIONS "SW_HID_SPELLING_OPTIONS" -#define HID_HYPHENATE_OPTIONS "SW_HID_HYPHENATE_OPTIONS" -#define HID_FORMAT_COLUMN "SW_HID_FORMAT_COLUMN" -#define HID_CONFIG_SAVE "SW_HID_CONFIG_SAVE" -#define HID_NUM_NAMES "SW_HID_NUM_NAMES" -#define HID_SYMBOL_SELECT "SW_HID_SYMBOL_SELECT" -#define HID_CONFIG_KY "SW_HID_CONFIG_KY" -#define HID_LINKEDIT "SW_HID_LINKEDIT" -#define HID_GRAPHIC_PREVIEW "SW_HID_GRAPHIC_PREVIEW" -#define HID_DICTIONARY "SW_HID_DICTIONARY" -#define HID_SET_STYLE "SW_HID_SET_STYLE" -#define HID_RIBBONBAR "SW_HID_RIBBONBAR" -#define HID_STATUSLINE "SW_HID_STATUSLINE" -#define HID_DOCBAR "SW_HID_DOCBAR" -#define HID_VRULER "SW_HID_VRULER" -#define HID_MAKRO_WINDOW "SW_HID_MAKRO_WINDOW" -#define HID_ENVELOP_FORMAT "SW_HID_ENVELOP_FORMAT" -#define HID_ENVELOP_PRINTER "SW_HID_ENVELOP_PRINTER" - -#define HID_HEADER_FOOTER_DLG "SW_HID_HEADER_FOOTER_DLG" -#define HID_GRID_DLG "SW_HID_GRID_DLG" -#define HID_USER_ADDRESS_DLG "SW_HID_USER_ADDRESS_DLG" -#define HID_SELECT_FAX_DLG "SW_HID_SELECT_FAX_DLG" - -#define HID_LABEL_FORMAT "SW_HID_LABEL_FORMAT" -#define HID_BRSORT "SW_HID_BRSORT" -#define HID_BRSEEK "SW_HID_BRSEEK" -#define HID_BRCFG "SW_HID_BRCFG" - -#define HID_FORMEDT_CONTENT "SW_HID_FORMEDT_CONTENT" -#define HID_FORMEDT_USER "SW_HID_FORMEDT_USER" -#define HID_FORMEDT_INDEX "SW_HID_FORMEDT_INDEX" - -#define HID_SCRL_PAGEUP "SW_HID_SCRL_PAGEUP" -#define HID_SCRL_PAGEDOWN "SW_HID_SCRL_PAGEDOWN" - -#define HID_DRAW_WIN "SW_HID_DRAW_WIN" -#define HID_EDIT_WIN "SW_HID_EDIT_WIN" - -#define HID_INSERT_CTRL "SW_HID_INSERT_CTRL" // TbxControl Einfuegen -#define HID_INSERT_OBJ_CTRL "SW_HID_INSERT_OBJ_CTRL" -#define HID_INSERT_FIELD_CTRL "SW_HID_INSERT_FIELD_CTRL" - -#define HID_SOURCEVIEW "SW_HID_SOURCEVIEW" -#define HID_TBL_OPT_CTRL "SW_HID_TBL_OPT_CTRL" -#define HID_AUTOFORMAT_CLB "SW_HID_AUTOFORMAT_CLB" - -#define HID_SCRL_NAVI "SW_HID_SCRL_NAVI" -#define HID_NAVI_DRAG_HYP "SW_HID_NAVI_DRAG_HYP" -#define HID_NAVI_DRAG_LINK "SW_HID_NAVI_DRAG_LINK" -#define HID_NAVI_DRAG_COPY "SW_HID_NAVI_DRAG_COPY" -#define HID_NAVI_OUTLINES "SW_HID_NAVI_OUTLINES" - -#define HID_AUTOFORMAT_EXEC "SW_HID_AUTOFORMAT_EXEC" -#define HID_AUTOFORMAT_CLOSE "SW_HID_AUTOFORMAT_CLOSE" - -#define HID_PAGEPREVIEW "SW_HID_PAGEPREVIEW" -#define HID_SOURCE_EDITWIN "SW_HID_SOURCE_EDITWIN" - -// Dialog Help-IDs - -#define HID_CONVERT_FROM "SW_HID_CONVERT_FROM" -#define HID_CONVERT_TO "SW_HID_CONVERT_TO" -#define HID_EDIT_POSTIT "SW_HID_EDIT_POSTIT" -#define HID_INSERT_CHART "SW_HID_INSERT_CHART" -#define HID_PAGE_PREVIEW "SW_HID_PAGE_PREVIEW" -#define HID_INSERT_HYPERLINK "SW_HID_INSERT_HYPERLINK" -#define HID_NAVIGATOR_TREELIST "SW_HID_NAVIGATOR_TREELIST" -#define HID_DLG_CAPTION "SW_HID_DLG_CAPTION" -#define HID_DLG_GLOSS_DECIDE "SW_HID_DLG_GLOSS_DECIDE" -#define HID_NAVIGATOR_TOOLBOX "SW_HID_NAVIGATOR_TOOLBOX" -#define HID_NAVIGATOR_LISTBOX "SW_HID_NAVIGATOR_LISTBOX" -#define HID_NUM_BULLET_DLG "SW_HID_NUM_BULLET_DLG" -#define HID_VS_SINGLENUM "SW_HID_VS_SINGLENUM" -#define HID_VS_NUM "SW_HID_VS_NUM" -#define HID_VS_BULLET "SW_HID_VS_BULLET" -#define HID_VS_NUMBMP "SW_HID_VS_NUMBMP" -#define HID_VS_RULER "SW_HID_VS_RULER" -#define HID_RULER_DIALOG "SW_HID_RULER_DIALOG" -#define HID_INSERT_ABSTRACT "SW_HID_INSERT_ABSTRACT" -#define HID_NAVI_TBX1 "SW_HID_NAVI_TBX1" -#define HID_NAVI_TBX2 "SW_HID_NAVI_TBX2" -#define HID_NAVI_TBX3 "SW_HID_NAVI_TBX3" -#define HID_NAVI_TBX4 "SW_HID_NAVI_TBX4" -#define HID_NAVI_TBX5 "SW_HID_NAVI_TBX5" -#define HID_NAVI_TBX6 "SW_HID_NAVI_TBX6" -#define HID_NAVI_TBX7 "SW_HID_NAVI_TBX7" -#define HID_NAVI_TBX8 "SW_HID_NAVI_TBX8" -#define HID_NAVI_TBX9 "SW_HID_NAVI_TBX9" -#define HID_NAVI_TBX10 "SW_HID_NAVI_TBX10" -#define HID_NAVI_TBX11 "SW_HID_NAVI_TBX11" -#define HID_NAVI_TBX12 "SW_HID_NAVI_TBX12" -#define HID_NAVI_TBX13 "SW_HID_NAVI_TBX13" -#define HID_NAVI_TBX14 "SW_HID_NAVI_TBX14" -#define HID_NAVI_TBX15 "SW_HID_NAVI_TBX15" -#define HID_NAVI_VS "SW_HID_NAVI_VS" -#define HID_NUM_FORMAT_BTN "SW_HID_NUM_FORMAT_BTN" -#define HID_PPREV_ZOOM "SW_HID_PPREV_ZOOM" -#define HID_NAVI_TBX16 "SW_HID_NAVI_TBX16" -#define HID_LTEMPL_TEXT "SW_HID_LTEMPL_TEXT" -#define HID_LTEMPL_FRAME "SW_HID_LTEMPL_FRAME" -#define HID_LTEMPL_PAGE "SW_HID_LTEMPL_PAGE" -#define HID_LTEMPL_OVERRIDE "SW_HID_LTEMPL_OVERRIDE" -#define HID_LTEMPL_TEMPLATES "SW_HID_LTEMPL_TEMPLATES" -#define HID_NAVI_TBX17 "SW_HID_NAVI_TBX17" -#define HID_NAVI_TBX18 "SW_HID_NAVI_TBX18" -#define HID_NAVI_TBX19 "SW_HID_NAVI_TBX19" -#define HID_NAVI_TBX20 "SW_HID_NAVI_TBX20" -#define HID_NAVI_TBX21 "SW_HID_NAVI_TBX21" -#define HID_NAVI_TBX22 "SW_HID_NAVI_TBX22" -#define HID_NAVI_TBX23 "SW_HID_NAVI_TBX23" -#define HID_NAVI_TBX24 "SW_HID_NAVI_TBX24" -#define HID_NAVIGATOR_GLOBAL_TOOLBOX "SW_HID_NAVIGATOR_GLOBAL_TOOLBOX" -#define HID_NAVIGATOR_GLOB_TREELIST "SW_HID_NAVIGATOR_GLOB_TREELIST" -#define HID_GLOS_GROUP_TREE "SW_HID_GLOS_GROUP_TREE" -#define HID_GLBLTREE_UPDATE "SW_HID_GLBLTREE_UPDATE" -#define HID_GLBLTREE_INSERT "SW_HID_GLBLTREE_INSERT" -#define HID_GLBLTREE_EDIT "SW_HID_GLBLTREE_EDIT" -#define HID_GLBLTREE_DEL "SW_HID_GLBLTREE_DEL" -#define HID_GLBLTREE_INS_IDX "SW_HID_GLBLTREE_INS_IDX" -#define HID_GLBLTREE_INS_CNTIDX "SW_HID_GLBLTREE_INS_CNTIDX" -#define HID_GLBLTREE_INS_USRIDX "SW_HID_GLBLTREE_INS_USRIDX" -#define HID_GLBLTREE_INS_FILE "SW_HID_GLBLTREE_INS_FILE" -#define HID_GLBLTREE_INS_NEW_FILE "SW_HID_GLBLTREE_INS_NEW_FILE" -#define HID_GLBLTREE_INS_TEXT "SW_HID_GLBLTREE_INS_TEXT" -#define HID_GLBLTREE_UPD_SEL "SW_HID_GLBLTREE_UPD_SEL" -#define HID_GLBLTREE_UPD_IDX "SW_HID_GLBLTREE_UPD_IDX" -#define HID_GLBLTREE_UPD_LINK "SW_HID_GLBLTREE_UPD_LINK" -#define HID_GLBLTREEUPD_ALL "SW_HID_GLBLTREEUPD_ALL" -#define HID_NUM_OUTL_NAMED_NUMS "SW_HID_NUM_OUTL_NAMED_NUMS" -#define HID_NUM_OUTL_NUM_SAVEAS "SW_HID_NUM_OUTL_NUM_SAVEAS" -#define HID_NUM_NAMED_NUMS "SW_HID_NUM_NAMED_NUMS" -#define HID_NUM_NUM_SAVEAS "SW_HID_NUM_NUM_SAVEAS" -#define HID_NUM_STD_NUMBER "SW_HID_NUM_STD_NUMBER" -#define HID_NUM_DEL_NUMBER "SW_HID_NUM_DEL_NUMBER" -#define HID_NUM_STD_BULLET "SW_HID_NUM_STD_BULLET" -#define HID_NUM_DEL_BULLET "SW_HID_NUM_DEL_BULLET" -#define HID_NAVI_CONTENT "SW_HID_NAVI_CONTENT" -#define HID_NAVI_GLOBAL "SW_HID_NAVI_GLOBAL" -#define HID_LTEMPL_NUMBERING "SW_HID_LTEMPL_NUMBERING" -#define HID_FLDVAR_APPLY "SW_HID_FLDVAR_APPLY" -#define HID_FLDVAR_DELETE "SW_HID_FLDVAR_DELETE" -#define HID_FLDEDT_ADDRESS "SW_HID_FLDEDT_ADDRESS" -#define HID_SORT_ACTION "SW_HID_SORT_ACTION" -#define HID_SORT_AUTHOR "SW_HID_SORT_AUTHOR" -#define HID_SORT_DATE "SW_HID_SORT_DATE" -#define HID_SORT_COMMENT "SW_HID_SORT_COMMENT" -#define HID_SW_SORT_POSITION "SW_HID_SW_SORT_POSITION" -#define HID_SYNC_BTN "SW_HID_SYNC_BTN" -#define HID_EDIT_COMMENT "SW_HID_EDIT_COMMENT" -#define HID_SEL_TEMPLATE "SW_HID_SEL_TEMPLATE" -#define HID_DLG_SEQUENCE_OPTION "SW_HID_DLG_SEQUENCE_OPTION" -#define HID_DLG_FLDEDT_NEXT "SW_HID_DLG_FLDEDT_NEXT" -#define HID_DLG_FLDEDT_PREV "SW_HID_DLG_FLDEDT_PREV" -#define HID_DLG_FLDEDT_ADDRESS "SW_HID_DLG_FLDEDT_ADDRESS" -#define HID_DLG_PRV_PRT_OPTIONS "SW_HID_DLG_PRV_PRT_OPTIONS" - -#define HID_FILEDLG_CHARDLG "SW_HID_FILEDLG_CHARDLG" -#define HID_FILEDLG_LOADTEMPLATE "SW_HID_FILEDLG_LOADTEMPLATE" -#define HID_FILEDLG_ROMENU "SW_HID_FILEDLG_ROMENU" -#define HID_FILEDLG_MAILMRGE1 "SW_HID_FILEDLG_MAILMRGE1" -#define HID_FILEDLG_MAILMRGE2 "SW_HID_FILEDLG_MAILMRGE2" -#define HID_FILEDLG_FRMPAGE "SW_HID_FILEDLG_FRMPAGE" -#define HID_FILEDLG_SRCVIEW "SW_HID_FILEDLG_SRCVIEW" -#define HID_FILEDLG_WIZDOKU "SW_HID_FILEDLG_WIZDOKU" -#define HID_PREVIEW_ZOOM "SW_HID_PREVIEW_ZOOM" - -#define HID_REDLINE_AUTOFMT_ACCEPT "SW_HID_REDLINE_AUTOFMT_ACCEPT" -#define HID_MULTI_TOX_DLG "SW_HID_MULTI_TOX_DLG" -#define HID_ASCII_FILTER "SW_HID_ASCII_FILTER" -#define HID_GLBLTREE_EDIT_LINK "SW_HID_GLBLTREE_EDIT_LINK" -#define HID_FORMAT_NAME_OBJECT_NAME "SW_HID_FORMAT_NAME_OBJECT_NAME" -#define HID_REFSELECTION_TOOLTIP "SW_HID_REFSELECTION_TOOLTIP" // #i83479# - - -// TabPage Help-IDs - -#define HID_DROPCAPS "SW_HID_DROPCAPS" -#define HID_FRM_EXT "SW_HID_FRM_EXT" -#define HID_FRM_STD "SW_HID_FRM_STD" -#define HID_GRF_EXT "SW_HID_GRF_EXT" -#define HID_COLUMN "SW_HID_COLUMN" -#define HID_DOC_STAT "SW_HID_DOC_STAT" -#define HID_MACROASSIGN "SW_HID_MACROASSIGN" -#define HID_FOOTNOTE_PAGE "SW_HID_FOOTNOTE_PAGE" -#define HID_OPTDOCDISP_PAGE "SW_HID_OPTDOCDISP_PAGE" -#define HID_OPTGRID_PAGE "SW_HID_OPTGRID_PAGE" -#define HID_OPTTEST_PAGE "SW_HID_OPTTEST_PAGE" -#define HID_OPTPRINT_PAGE "SW_HID_OPTPRINT_PAGE" -#define HID_FORMAT_TABLE "SW_HID_FORMAT_TABLE" -#define HID_TABLE_COLUMN "SW_HID_TABLE_COLUMN" -#define HID_LAB_LAB "SW_HID_LAB_LAB" -#define HID_LAB_PRT "SW_HID_LAB_PRT" -#define HID_ENV_PRT "SW_HID_ENV_PRT" -#define HID_LAB_FMT "SW_HID_LAB_FMT" -#define HID_ENV_ENV "SW_HID_ENV_ENV" -#define HID_ENV_FMT "SW_HID_ENV_FMT" -#define HID_FRM_URL "SW_HID_FRM_URL" -#define HID_CHAR_URL "SW_HID_CHAR_URL" -#define HID_CONTENT_OPT "SW_HID_CONTENT_OPT" -#define HID_LAYOUT_OPT "SW_HID_LAYOUT_OPT" -#define HID_STD_FONT "SW_HID_STD_FONT" -#define HID_COND_COLL "SW_HID_COND_COLL" -#define HID_FRM_ADD "SW_HID_FRM_ADD" -#define HID_TABLE_TEXTFLOW "SW_HID_TABLE_TEXTFLOW" -#define HID_AUTOFMT_BY_INPUT "SW_HID_AUTOFMT_BY_INPUT" -#define HID_AUTOFMT_APPLY "SW_HID_AUTOFMT_APPLY" -#define HID_OPTTABLE_PAGE "SW_HID_OPTTABLE_PAGE" -#define HID_PICK_SINGLE_NUM "SW_HID_PICK_SINGLE_NUM" -#define HID_PICK_BULLET "SW_HID_PICK_BULLET" -#define HID_PICK_NUM "SW_HID_PICK_NUM" -#define HID_PICK_BMP "SW_HID_PICK_BMP" - -#define HID_FLD_DB "SW_HID_FLD_DB" -#define HID_FLD_DOKINF "SW_HID_FLD_DOKINF" -#define HID_FLD_VAR "SW_HID_FLD_VAR" -#define HID_FLD_DOK "SW_HID_FLD_DOK" -#define HID_FLD_FUNC "SW_HID_FLD_FUNC" -#define HID_FLD_REF "SW_HID_FLD_REF" -#define HID_OPTSHDWCRSR "SW_HID_OPTSHDWCRSR" -#define HID_NUM_OPTIONS "SW_HID_NUM_OPTIONS" -#define HID_NUM_POSITION "SW_HID_NUM_POSITION" -#define HID_NUMPARA "SW_HID_NUMPARA" -#define HID_FOOTNOTE_OPTIONS "SW_HID_FOOTNOTE_OPTIONS" -#define HID_ENDNOTE_OPTIONS "SW_HID_ENDNOTE_OPTIONS" -#define HID_REDLINE_OPT "SW_HID_REDLINE_OPT" -#define HID_LINENUMBERING "SW_HID_LINENUMBERING" -#define HID_REDLINE_ACCEPT "SW_HID_REDLINE_ACCEPT" -#define HID_EDIT_FLD_DB "SW_HID_EDIT_FLD_DB" -#define HID_EDIT_FLD_DOKINF "SW_HID_EDIT_FLD_DOKINF" -#define HID_EDIT_FLD_VAR "SW_HID_EDIT_FLD_VAR" -#define HID_EDIT_FLD_DOK "SW_HID_EDIT_FLD_DOK" -#define HID_EDIT_FLD_FUNC "SW_HID_EDIT_FLD_FUNC" -#define HID_EDIT_FLD_REF "SW_HID_EDIT_FLD_REF" -#define HID_REDLINE_CTRL "SW_HID_REDLINE_CTRL" -#define HID_TP_OUTLINE_NUM "SW_HID_TP_OUTLINE_NUM" -#define HID_OPTINSERT_PAGE "SW_HID_OPTINSERT_PAGE" -#define HID_OPTCAPTION_PAGE "SW_HID_OPTCAPTION_PAGE" -#define HID_OPTLOAD_PAGE "SW_HID_OPTLOAD_PAGE" -#define HID_INSERT_TOX_PAGE "SW_HID_INSERT_TOX_PAGE" -#define HID_TOX_FORM_ENTRY_PAGE "SW_HID_TOX_FORM_ENTRY_PAGE" -#define HID_TOX_FORM_STYLES_PAGE "SW_HID_TOX_FORM_STYLES_PAGE" -#define HID_INSERT_TOX_TABDLG "SW_HID_INSERT_TOX_TABDLG" -#define HID_INSERT_SECTION_PAGE "SW_HID_INSERT_SECTION_PAGE" -#define HID_INSERT_SECTION_DLG "SW_HID_INSERT_SECTION_DLG" -#define HID_SECTION_PROPERTIES_DLG "SW_HID_SECTION_PROPERTIES_DLG" -#define HID_RENAME_XNAMED "SW_HID_RENAME_XNAMED" -#define HID_TP_TOX_SELECT "SW_HID_TP_TOX_SELECT" -#define HID_TP_TOX_ENTRY "SW_HID_TP_TOX_ENTRY" -#define HID_TOX_STYLES_PAGE "SW_HID_TOX_STYLES_PAGE" -#define HID_TP_VISITING_CARDS "SW_HID_TP_VISITING_CARDS" -#define HID_DLG_ADD_IDX_STYLES "SW_HID_DLG_ADD_IDX_STYLES" -#define HID_ADD_STYLES_TLB "SW_HID_ADD_STYLES_TLB" -#define HID_OLE_CHECKLB "SW_HID_OLE_CHECKLB" -#define HID_DLG_CREATE_AUTH_ENTRY "SW_HID_DLG_CREATE_AUTH_ENTRY" -#define HID_TP_PRIVATE_DATA "SW_HID_TP_PRIVATE_DATA" - -#define HID_TP_BUSINESS_DATA "SW_HID_TP_BUSINESS_DATA" -#define HID_SECTION_FTNENDNOTES_PAGE "SW_HID_SECTION_FTNENDNOTES_PAGE" -#define HID_TEXTGRID_PAGE "SW_HID_TEXTGRID_PAGE" -#define HID_OPTCOMPATIBILITY_PAGE "SW_HID_OPTCOMPATIBILITY_PAGE" -#define HID_COMPATIBILITY_OPTIONS_BOX "SW_HID_COMPATIBILITY_OPTIONS_BOX" - -// AutoPilot Help-IDs - -#define HID_LETTER_PAGE1 "SW_HID_LETTER_PAGE1" -#define HID_LETTER_PAGE2 "SW_HID_LETTER_PAGE2" -#define HID_LETTER_PAGE3 "SW_HID_LETTER_PAGE3" -#define HID_LETTER_PAGE4 "SW_HID_LETTER_PAGE4" -#define HID_LETTER_PAGE5 "SW_HID_LETTER_PAGE5" -#define HID_LETTER_PAGE6 "SW_HID_LETTER_PAGE6" -#define HID_LETTER_PAGE7 "SW_HID_LETTER_PAGE7" -#define HID_LETTER_PAGE8 "SW_HID_LETTER_PAGE8" -#define HID_LETTER_PAGE9 "SW_HID_LETTER_PAGE9" - -#define HID_FAX_PAGE1 "SW_HID_FAX_PAGE1" -#define HID_FAX_PAGE2 "SW_HID_FAX_PAGE2" -#define HID_FAX_PAGE3 "SW_HID_FAX_PAGE3" -#define HID_FAX_PAGE4 "SW_HID_FAX_PAGE4" -#define HID_FAX_PAGE5 "SW_HID_FAX_PAGE5" -#define HID_FAX_PAGE6 "SW_HID_FAX_PAGE6" -#define HID_FAX_PAGE7 "SW_HID_FAX_PAGE7" -#define HID_FAX_PAGE8 "SW_HID_FAX_PAGE8" - -#define HID_MEMO_PAGE1 "SW_HID_MEMO_PAGE1" -#define HID_MEMO_PAGE2 "SW_HID_MEMO_PAGE2" -#define HID_MEMO_PAGE3 "SW_HID_MEMO_PAGE3" -#define HID_MEMO_PAGE4 "SW_HID_MEMO_PAGE4" -#define HID_MEMO_PAGE5 "SW_HID_MEMO_PAGE5" - -#define HID_AGENDA_PAGE1 "SW_HID_AGENDA_PAGE1" -#define HID_AGENDA_PAGE2 "SW_HID_AGENDA_PAGE2" -#define HID_AGENDA_PAGE3 "SW_HID_AGENDA_PAGE3" -#define HID_AGENDA_PAGE4 "SW_HID_AGENDA_PAGE4" -#define HID_AGENDA_PAGE5 "SW_HID_AGENDA_PAGE5" -#define HID_AGENDA_PAGE6 "SW_HID_AGENDA_PAGE6" - -#define HID_AUTOPILOT_NEXT "SW_HID_AUTOPILOT_NEXT" -#define HID_AUTOPILOT_PREV "SW_HID_AUTOPILOT_PREV" -#define HID_AUTOPILOT_OK "SW_HID_AUTOPILOT_OK" - -// HelpIds for Menu - -#define HID_MN_SUB_TBLROW "SW_HID_MN_SUB_TBLROW" -#define HID_MN_SUB_TBLCOL "SW_HID_MN_SUB_TBLCOL" -#define HID_MN_SUB_AUTOFORMAT "SW_HID_MN_SUB_AUTOFORMAT" -#define HID_MN_SUB_TOOLBAR "SW_HID_MN_SUB_TOOLBAR" -#define HID_MN_SUB_FIELD "SW_HID_MN_SUB_FIELD" -#define HID_MN_SUB_GRAPHIC "SW_HID_MN_SUB_GRAPHIC" -#define HID_MN_SUB_TEMPLATES "SW_HID_MN_SUB_TEMPLATES" -#define HID_MN_SUB_ARRANGE "SW_HID_MN_SUB_ARRANGE" -#define HID_MN_SUB_SPELLING "SW_HID_MN_SUB_SPELLING" -#define HID_MN_SUB_UPDATE "SW_HID_MN_SUB_UPDATE" -#define HID_MN_SUB_MIRROR "SW_HID_MN_SUB_MIRROR" -#define HID_MN_SUB_ALIGN "SW_HID_MN_SUB_ALIGN" -#define HID_MN_SUB_OPTIONS "SW_HID_MN_SUB_OPTIONS" - -#define HID_MN_CALC_PHD "SW_HID_MN_CALC_PHD" -#define HID_MN_CALC_SQRT "SW_HID_MN_CALC_SQRT" -#define HID_MN_CALC_OR "SW_HID_MN_CALC_OR" -#define HID_MN_CALC_XOR "SW_HID_MN_CALC_XOR" -#define HID_MN_CALC_AND "SW_HID_MN_CALC_AND" -#define HID_MN_CALC_NOT "SW_HID_MN_CALC_NOT" -#define HID_MN_CALC_EQ "SW_HID_MN_CALC_EQ" -#define HID_MN_CALC_NEQ "SW_HID_MN_CALC_NEQ" -#define HID_MN_CALC_LEQ "SW_HID_MN_CALC_LEQ" -#define HID_MN_CALC_GEQ "SW_HID_MN_CALC_GEQ" -#define HID_MN_CALC_LES "SW_HID_MN_CALC_LES" -#define HID_MN_CALC_GRE "SW_HID_MN_CALC_GRE" -#define HID_MN_CALC_SUM "SW_HID_MN_CALC_SUM" -#define HID_MN_CALC_MEAN "SW_HID_MN_CALC_MEAN" -#define HID_MN_CALC_MIN "SW_HID_MN_CALC_MIN" -#define HID_MN_CALC_MAX "SW_HID_MN_CALC_MAX" -#define HID_MN_CALC_SIN "SW_HID_MN_CALC_SIN" -#define HID_MN_CALC_COS "SW_HID_MN_CALC_COS" -#define HID_MN_CALC_TAN "SW_HID_MN_CALC_TAN" -#define HID_MN_CALC_ASIN "SW_HID_MN_CALC_ASIN" -#define HID_MN_CALC_ACOS "SW_HID_MN_CALC_ACOS" -#define HID_MN_CALC_ATAN "SW_HID_MN_CALC_ATAN" -#define HID_MN_CALC_POW "SW_HID_MN_CALC_POW" -#define HID_MN_CALC_LISTSEP "SW_HID_MN_CALC_LISTSEP" -#define HID_MN_POP_OPS "SW_HID_MN_POP_OPS" -#define HID_MN_POP_STATISTICS "SW_HID_MN_POP_STATISTICS" -#define HID_MN_POP_FUNC "SW_HID_MN_POP_FUNC" -#define HID_MN_RSC_END "SW_HID_MN_RSC_END" -#define HID_MN_CALC_ROUND "SW_HID_MN_CALC_ROUND" -#define HID_MN_SUB_MACRO "SW_HID_MN_SUB_MACRO" - -#define HID_MN_READONLY_SAVEGRAPHIC "SW_HID_MN_READONLY_SAVEGRAPHIC" -#define HID_MN_READONLY_GRAPHICTOGALLERY "SW_HID_MN_READONLY_GRAPHICTOGALLERY" -#define HID_MN_READONLY_TOGALLERYLINK "SW_HID_MN_READONLY_TOGALLERYLINK" -#define HID_MN_READONLY_TOGALLERYCOPY "SW_HID_MN_READONLY_TOGALLERYCOPY" -#define HID_MN_READONLY_SAVEBACKGROUND "SW_HID_MN_READONLY_SAVEBACKGROUND" -#define HID_MN_READONLY_BACKGROUNDTOGALLERY "SW_HID_MN_READONLY_BACKGROUNDTOGALLERY" -#define HID_MN_READONLY_COPYLINK "SW_HID_MN_READONLY_COPYLINK" -#define HID_MN_READONLY_COPYGRAPHIC "SW_HID_MN_READONLY_COPYGRAPHIC" -#define HID_MN_READONLY_LOADGRAPHIC "SW_HID_MN_READONLY_LOADGRAPHIC" -#define HID_MN_READONLY_GRAPHICOFF "SW_HID_MN_READONLY_GRAPHICOFF" -#define HID_MN_READONLY_PLUGINOFF "SW_HID_MN_READONLY_PLUGINOFF" - -#define HID_MD_GLOS_DEFINE "SW_HID_MD_GLOS_DEFINE" -#define HID_MD_GLOS_REPLACE "SW_HID_MD_GLOS_REPLACE" -#define HID_MD_GLOS_RENAME "SW_HID_MD_GLOS_RENAME" -#define HID_MD_GLOS_DELETE "SW_HID_MD_GLOS_DELETE" -#define HID_MD_GLOS_EDIT "SW_HID_MD_GLOS_EDIT" -#define HID_MD_GLOS_MACRO "SW_HID_MD_GLOS_MACRO" -#define HID_LINGU_ADD_WORD "SW_HID_LINGU_ADD_WORD" -#define HID_LINGU_IGNORE_WORD "SW_HID_LINGU_IGNORE_WORD" -#define HID_LINGU_SPELLING_DLG "SW_HID_LINGU_SPELLING_DLG" -#define HID_LINGU_AUTOCORR "SW_HID_LINGU_AUTOCORR" -#define HID_LINGU_REPLACE "SW_HID_LINGU_REPLACE" -#define HID_MD_GLOS_CATEGORY "SW_HID_MD_GLOS_CATEGORY" -#define HID_REGION_TREE "SW_HID_REGION_TREE" -#define HID_LINGU_WORD_LANGUAGE "SW_HID_LINGU_WORD_LANGUAGE" -#define HID_LINGU_PARA_LANGUAGE "SW_HID_LINGU_PARA_LANGUAGE" -#define HID_MD_GLOS_DEFINE_TEXT "SW_HID_MD_GLOS_DEFINE_TEXT" -#define HID_DLG_PASSWD_SECTION "SW_HID_DLG_PASSWD_SECTION" -#define HID_MD_COPY_TO_CLIPBOARD "SW_HID_MD_COPY_TO_CLIPBOARD" -#define HID_MD_GLOS_IMPORT "SW_HID_MD_GLOS_IMPORT" -#define HID_SMARTTAG_MAIN "SW_HID_SMARTTAG_MAIN" // SMARTTAGS -#define HID_LINGU_IGNORE_SELECTION "SW_HID_LINGU_IGNORE_SELECTION" // grammar check context menu - -// More Help-IDs - -#define HID_CLOSE_FILE "SW_HID_CLOSE_FILE" -#define HID_LAUNCH_REGISTRY "SW_HID_LAUNCH_REGISTRY" -#define HID_MERGE_FILE "SW_HID_MERGE_FILE" -#define HID_MERGE_FILE_DLG "SW_HID_MERGE_FILE_DLG" -#define HID_NEW_FILE "SW_HID_NEW_FILE" -#define HID_OPEN_FILE "SW_HID_OPEN_FILE" -#define HID_OPEN_LASTVERSION "SW_HID_OPEN_LASTVERSION" -#define HID_PRINT_FILE "SW_HID_PRINT_FILE" -#define HID_PRINT_FILE_OPTIONS "SW_HID_PRINT_FILE_OPTIONS" -#define HID_SAVE_FILE_AS "SW_HID_SAVE_FILE_AS" -#define HID_SAVE_FILE "SW_HID_SAVE_FILE" -#define HID_SETUP_PRINTER_DLG "SW_HID_SETUP_PRINTER_DLG" -#define HID_EXIT "SW_HID_EXIT" -#define HID_CREATE_DOCUMENT "SW_HID_CREATE_DOCUMENT" -#define HID_DOCSTAT_DLG "SW_HID_DOCSTAT_DLG" -#define HID_LOAD_TEMPLATE_DLG "SW_HID_LOAD_TEMPLATE_DLG" -#define HID_SAVE_ALL "SW_HID_SAVE_ALL" -#define HID_NEW_FILE_DEFAULT "SW_HID_NEW_FILE_DEFAULT" -#define HID_PRINT_FILE_DEFAULT "SW_HID_PRINT_FILE_DEFAULT" -#define HID_FAX "SW_HID_FAX" -#define HID_SELECT_DATABASE "SW_HID_SELECT_DATABASE" -#define HID_DOC_INFO_DLG "SW_HID_DOC_INFO_DLG" -#define HID_DOC_MGR_DLG "SW_HID_DOC_MGR_DLG" -#define HID_OPTCAPTION_CLB "SW_HID_OPTCAPTION_CLB" - -#define HID_COPY "SW_HID_COPY" -#define HID_CUT "SW_HID_CUT" -#define HID_EDIT_FIELD "SW_HID_EDIT_FIELD" -#define HID_EDIT_FILE_INFO_DLG "SW_HID_EDIT_FILE_INFO_DLG" -#define HID_EDIT_LINK_DLG "SW_HID_EDIT_LINK_DLG" -#define HID_EDIT_OBJECT "SW_HID_EDIT_OBJECT" -#define HID_GOTO "SW_HID_GOTO" -#define HID_SET_FIELD_VALUE "SW_HID_SET_FIELD_VALUE" -#define HID_PASTE "SW_HID_PASTE" -#define HID_REDO "SW_HID_REDO" -#define HID_SEARCH "SW_HID_SEARCH" -#define HID_REPLACE "SW_HID_REPLACE" -#define HID_SELECT_ALL "SW_HID_SELECT_ALL" -#define HID_UNDO "SW_HID_UNDO" -#define HID_REPEAT "SW_HID_REPEAT" -#define HID_BUFFER_UPDATE "SW_HID_BUFFER_UPDATE" -#define HID_UPDATE_FIELDS "SW_HID_UPDATE_FIELDS" -#define HID_EXECUTE_MACROFIELD "SW_HID_EXECUTE_MACROFIELD" -#define HID_EDIT_FORMULA "SW_HID_EDIT_FORMULA" -#define HID_CALC_TABLE "SW_HID_CALC_TABLE" -#define HID_NUM_BULLET_DOWN "SW_HID_NUM_BULLET_DOWN" -#define HID_NUM_BULLET_UP "SW_HID_NUM_BULLET_UP" -#define HID_NUM_BULLET_PREV "SW_HID_NUM_BULLET_PREV" -#define HID_NUM_BULLET_NEXT "SW_HID_NUM_BULLET_NEXT" -#define HID_NUM_BULLET_MOVEUP "SW_HID_NUM_BULLET_MOVEUP" -#define HID_NUM_BULLET_MOVEDOWN "SW_HID_NUM_BULLET_MOVEDOWN" -#define HID_NUM_BULLET_NONUM "SW_HID_NUM_BULLET_NONUM" -#define HID_NUM_BULLET_OFF "SW_HID_NUM_BULLET_OFF" -#define HID_NUM_BULLET_ON "SW_HID_NUM_BULLET_ON" -#define HID_NUM_BULLET_OUTLINE_DOWN "SW_HID_NUM_BULLET_OUTLINE_DOWN" -#define HID_NUM_BULLET_OUTLINE_UP "SW_HID_NUM_BULLET_OUTLINE_UP" -#define HID_NUM_BULLET_OUTLINE_MOVEUP "SW_HID_NUM_BULLET_OUTLINE_MOVEUP" -#define HID_NUM_BULLET_OUTLINE_MOVEDOWN "SW_HID_NUM_BULLET_OUTLINE_MOVEDOWN" -#define HID_UPDATE_INPUTFIELDS "SW_HID_UPDATE_INPUTFIELDS" -#define HID_NUM_NUMBERING_ON "SW_HID_NUM_NUMBERING_ON" -#define HID_REPEAT_SEARCH "SW_HID_REPEAT_SEARCH" -#define HID_REPAGINATE "SW_HID_REPAGINATE" - -#define HID_REFRESH_VIEW "SW_HID_REFRESH_VIEW" -#define HID_RIBBON "SW_HID_RIBBON" -#define HID_RULER "SW_HID_RULER" -#define HID_TOOLBOX "SW_HID_TOOLBOX" -#define HID_VIEW_BOUNDS "SW_HID_VIEW_BOUNDS" -#define HID_VIEW_FIELDS "SW_HID_VIEW_FIELDS" -#define HID_VLINEAL "SW_HID_VLINEAL" -#define HID_VSCROLLBAR "SW_HID_VSCROLLBAR" -#define HID_HSCROLLBAR "SW_HID_HSCROLLBAR" -#define HID_VIEW_META_CHARS "SW_HID_VIEW_META_CHARS" -#define HID_VIEW_MARKS "SW_HID_VIEW_MARKS" -#define HID_VIEW_FIELDNAME "SW_HID_VIEW_FIELDNAME" -#define HID_VIEW_TABLEGRID "SW_HID_VIEW_TABLEGRID" -#define HID_ZOOM "SW_HID_ZOOM" - -#define HID_DELETE_BOOKMARK "SW_HID_DELETE_BOOKMARK" -#define HID_INSERT_BREAK "SW_HID_INSERT_BREAK" -#define HID_INSERT_COLUMN_BREAK "SW_HID_INSERT_COLUMN_BREAK" -#define HID_INSERT_FILE "SW_HID_INSERT_FILE" -#define HID_INSERT_FOOTNOTE "SW_HID_INSERT_FOOTNOTE" -#define HID_INSERT_GRAFIC "SW_HID_INSERT_GRAFIC" -#define HID_INSERT_LINEBREAK "SW_HID_INSERT_LINEBREAK" -#define HID_INSERT_MERGEFIELD_DLG "SW_HID_INSERT_MERGEFIELD_DLG" -#define HID_INSERT_OBJECT_DLG "SW_HID_INSERT_OBJECT_DLG" -#define HID_INSERT_PAGEBREAK "SW_HID_INSERT_PAGEBREAK" -#define HID_INSERT_RECORD "SW_HID_INSERT_RECORD" -#define HID_MERGE_RECORD "SW_HID_MERGE_RECORD" -#define HID_INSERT_SYMBOL "SW_HID_INSERT_SYMBOL" -#define HID_INSERT_STRING "SW_HID_INSERT_STRING" -#define HID_INSERT_COLS "SW_HID_INSERT_COLS" -#define HID_INSERT_FRAME_INTERACT "SW_HID_INSERT_FRAME_INTERACT" -#define HID_INSERT_FRAME "SW_HID_INSERT_FRAME" -#define HID_INSERT_IDX_ENTRY "SW_HID_INSERT_IDX_ENTRY" -#define HID_INSERT_USERIDX_ENTRY "SW_HID_INSERT_USERIDX_ENTRY" -#define HID_INSERT_CNTNTIDX_ENTRY "SW_HID_INSERT_CNTNTIDX_ENTRY" -#define HID_INSERT_SOFT_HYPHEN "SW_HID_INSERT_SOFT_HYPHEN" -#define HID_INSERT_HARD_SPACE "SW_HID_INSERT_HARD_SPACE" - -#define HID_SET_FONT "SW_HID_SET_FONT" -#define HID_SET_FONT_SIZE "SW_HID_SET_FONT_SIZE" -#define HID_GROW_FONT_SIZE "SW_HID_GROW_FONT_SIZE" -#define HID_SHRINK_FONT_SIZE "SW_HID_SHRINK_FONT_SIZE" -#define HID_SET_BOLD "SW_HID_SET_BOLD" -#define HID_SET_ITALIC "SW_HID_SET_ITALIC" -#define HID_SET_SHADOW "SW_HID_SET_SHADOW" -#define HID_SET_OUTLINE "SW_HID_SET_OUTLINE" -#define HID_SET_UNDERLINE "SW_HID_SET_UNDERLINE" -#define HID_SET_STRIKEOUT "SW_HID_SET_STRIKEOUT" -#define HID_SET_SUPER_SCRIPT "SW_HID_SET_SUPER_SCRIPT" -#define HID_SET_SUB_SCRIPT "SW_HID_SET_SUB_SCRIPT" -#define HID_SET_COLOR "SW_HID_SET_COLOR" -#define HID_SET_CASEMAP "SW_HID_SET_CASEMAP" -#define HID_SET_LANGUAGE "SW_HID_SET_LANGUAGE" -#define HID_SET_KERNING "SW_HID_SET_KERNING" -#define HID_INDENT_TO_TABSTOP "SW_HID_INDENT_TO_TABSTOP" -#define HID_SET_LEFT_PARA "SW_HID_SET_LEFT_PARA" -#define HID_SET_RIGHT_PARA "SW_HID_SET_RIGHT_PARA" -#define HID_SET_CENTER_PARA "SW_HID_SET_CENTER_PARA" -#define HID_SET_JUSTIFY_PARA "SW_HID_SET_JUSTIFY_PARA" -#define HID_SET_LINE_SPACE_1 "SW_HID_SET_LINE_SPACE_1" -#define HID_SET_LINE_SPACE_15 "SW_HID_SET_LINE_SPACE_15" -#define HID_SET_LINE_SPACE_2 "SW_HID_SET_LINE_SPACE_2" -#define HID_FLIP_HORZ_GRAFIC "SW_HID_FLIP_HORZ_GRAFIC" -#define HID_FLIP_VERT_GRAFIC "SW_HID_FLIP_VERT_GRAFIC" -#define HID_SET_ADJUST "SW_HID_SET_ADJUST" -#define HID_SET_LRMARGIN "SW_HID_SET_LRMARGIN" -#define HID_SET_ULMARGIN "SW_HID_SET_ULMARGIN" -#define HID_UNINDENT_TO_TABSTOP "SW_HID_UNINDENT_TO_TABSTOP" -#define HID_SET_HYPHEN_ZONE "SW_HID_SET_HYPHEN_ZONE" -#define HID_SET_PAGE_BREAK "SW_HID_SET_PAGE_BREAK" -#define HID_SET_KEEP_TOGETHER "SW_HID_SET_KEEP_TOGETHER" -#define HID_SET_WIDOW "SW_HID_SET_WIDOW" -#define HID_SET_ORPHAN "SW_HID_SET_ORPHAN" -#define HID_FORMAT_SHADOW "SW_HID_FORMAT_SHADOW" -#define HID_FORMAT_BORDER "SW_HID_FORMAT_BORDER" -#define HID_FORMAT_CHAR_DLG "SW_HID_FORMAT_CHAR_DLG" -#define HID_FORMAT_PARA_DLG "SW_HID_FORMAT_PARA_DLG" -#define HID_FORMAT_TAB "SW_HID_FORMAT_TAB" -#define HID_FORMAT_TAB_DLG "SW_HID_FORMAT_TAB_DLG" -#define HID_FORMAT_BORDER_DLG "SW_HID_FORMAT_BORDER_DLG" -#define HID_FORMAT_BACKGROUND "SW_HID_FORMAT_BACKGROUND" -#define HID_FORMAT_BACKGROUND_DLG "SW_HID_FORMAT_BACKGROUND_DLG" -#define HID_FORMAT_PAGE "SW_HID_FORMAT_PAGE" -#define HID_FORMAT_PAGE_DLG "SW_HID_FORMAT_PAGE_DLG" -#define HID_FORMAT_DROPCAPS "SW_HID_FORMAT_DROPCAPS" -#define HID_FORMAT_FRAME_DLG "SW_HID_FORMAT_FRAME_DLG" -#define HID_FORMAT_GRAFIC_DLG "SW_HID_FORMAT_GRAFIC_DLG" -#define HID_FORMAT_TABLE_DLG "SW_HID_FORMAT_TABLE_DLG" -#define HID_NEW_STYLE_BY_EXAMPLE "SW_HID_NEW_STYLE_BY_EXAMPLE" -#define HID_UPDATE_STYLE_BY_EXAMPLE "SW_HID_UPDATE_STYLE_BY_EXAMPLE" -#define HID_STYLE_SHEET_FRAME_DLG "SW_HID_STYLE_SHEET_FRAME_DLG" -#define HID_STYLE_SHEET_DOC_DLG "SW_HID_STYLE_SHEET_DOC_DLG" -#define HID_FORMAT_RESET "SW_HID_FORMAT_RESET" -#define HID_FRAME_TO_TOP "SW_HID_FRAME_TO_TOP" -#define HID_FRAME_TO_BOTTOM "SW_HID_FRAME_TO_BOTTOM" -#define HID_FRAME_NOWRAP "SW_HID_FRAME_NOWRAP" -#define HID_FRAME_WRAP "SW_HID_FRAME_WRAP" -#define HID_FRAME_WRAPTHRU "SW_HID_FRAME_WRAPTHRU" -#define HID_FRAME_ALIGN_HORZ_LEFT "SW_HID_FRAME_ALIGN_HORZ_LEFT" -#define HID_FRAME_ALIGN_HORZ_RIGHT "SW_HID_FRAME_ALIGN_HORZ_RIGHT" -#define HID_FRAME_ALIGN_HORZ_CENTER "SW_HID_FRAME_ALIGN_HORZ_CENTER" -#define HID_FRAME_ALIGN_VERT_TOP "SW_HID_FRAME_ALIGN_VERT_TOP" -#define HID_FRAME_ALIGN_VERT_BOTTOM "SW_HID_FRAME_ALIGN_VERT_BOTTOM" -#define HID_FRAME_ALIGN_VERT_CENTER "SW_HID_FRAME_ALIGN_VERT_CENTER" -#define HID_SET_FRM_SIZE "SW_HID_SET_FRM_SIZE" -#define HID_SET_FRM_POSITION "SW_HID_SET_FRM_POSITION" -#define HID_SET_FRM_ANCHOR "SW_HID_SET_FRM_ANCHOR" -#define HID_SET_FRM_WRAP "SW_HID_SET_FRM_WRAP" -#define HID_SET_FRM_DIST "SW_HID_SET_FRM_DIST" -#define HID_SET_FRM_OPTIONS "SW_HID_SET_FRM_OPTIONS" -#define HID_SET_GRF_MIRROR "SW_HID_SET_GRF_MIRROR" -#define HID_SET_TABLE_WIDTH "SW_HID_SET_TABLE_WIDTH" -#define HID_SET_TABLE_ALIGN "SW_HID_SET_TABLE_ALIGN" -#define HID_SET_CHAR_STYLE "SW_HID_SET_CHAR_STYLE" -#define HID_SET_PARA_STYLE "SW_HID_SET_PARA_STYLE" -#define HID_SET_PAGE_STYLE "SW_HID_SET_PAGE_STYLE" -#define HID_SET_FRM_MACRO "SW_HID_SET_FRM_MACRO" -#define HID_SET_FRM_COLUMNS "SW_HID_SET_FRM_COLUMNS" -#define HID_SET_FRM_COLUMN_WIDTH "SW_HID_SET_FRM_COLUMN_WIDTH" -#define HID_UPDATE_STYLES_DIRECT "SW_HID_UPDATE_STYLES_DIRECT" - -#define HID_TABLE_INSERT_ROW "SW_HID_TABLE_INSERT_ROW" -#define HID_TABLE_DELETE_ROW "SW_HID_TABLE_DELETE_ROW" -#define HID_TABLE_DELETE_COL "SW_HID_TABLE_DELETE_COL" -#define HID_TABLE_MERGE_CELLS "SW_HID_TABLE_MERGE_CELLS" -#define HID_AUTOFMT_TABLE "SW_HID_AUTOFMT_TABLE" -#define HID_SWDLG_STRINPUT "SW_HID_SWDLG_STRINPUT" -#define HID_TABLE_SET_ULSPACE "SW_HID_TABLE_SET_ULSPACE" -#define HID_TABLE_SET_GRID "SW_HID_TABLE_SET_GRID" -#define HID_TABLE_SET_SHADOW "SW_HID_TABLE_SET_SHADOW" -#define HID_TABLE_SELECT_ROW "SW_HID_TABLE_SELECT_ROW" -#define HID_TABLE_SELECT_COL "SW_HID_TABLE_SELECT_COL" -#define HID_TABLE_SELECT_ALL "SW_HID_TABLE_SELECT_ALL" -#define HID_TABLE_SET_READ_ONLY_CELLS "SW_HID_TABLE_SET_READ_ONLY_CELLS" -#define HID_TABLE_UNSET_READ_ONLY_CELLS "SW_HID_TABLE_UNSET_READ_ONLY_CELLS" -#define HID_PAGE_STYLE_SET_COLS "SW_HID_PAGE_STYLE_SET_COLS" -#define HID_SET_PROP_LINE_SPACE "SW_HID_SET_PROP_LINE_SPACE" -#define HID_SET_ABS_LINE_SPACE "SW_HID_SET_ABS_LINE_SPACE" - -#define HID_SPELLING_DLG "SW_HID_SPELLING_DLG" -#define HID_THESAURUS_DLG "SW_HID_THESAURUS_DLG" -#define HID_HYPHENATE_OPT_DLG "SW_HID_HYPHENATE_OPT_DLG" -#define HID_SORTING "SW_HID_SORTING" -#define HID_SORTING_DLG "SW_HID_SORTING_DLG" -#define HID_CALCULATE "SW_HID_CALCULATE" -#define HID_RECORD_MACRO_DLG "SW_HID_RECORD_MACRO_DLG" -#define HID_PLAY_MACRO_DLG "SW_HID_PLAY_MACRO_DLG" -#define HID_CONFIG_DLG "SW_HID_CONFIG_DLG" -#define HID_EXPAND_GLOSSARY "SW_HID_EXPAND_GLOSSARY" -#define HID_RENAME_GLOSSARY "SW_HID_RENAME_GLOSSARY" -#define HID_CONFIG_MENU "SW_HID_CONFIG_MENU" -#define HID_CONFIG_KEY "SW_HID_CONFIG_KEY" -#define HID_ASSIGN_LOCAL_MACRO_DLG "SW_HID_ASSIGN_LOCAL_MACRO_DLG" -#define HID_COMPILE_MACRO "SW_HID_COMPILE_MACRO" -#define HID_CONFIG_VIEWOPTIONS "SW_HID_CONFIG_VIEWOPTIONS" -#define HID_CONFIG_COLORS "SW_HID_CONFIG_COLORS" -#define HID_INSERT_GLOSSARY "SW_HID_INSERT_GLOSSARY" -#define HID_AUTO_CORRECT "SW_HID_AUTO_CORRECT" -#define HID_AUTO_CORRECT_DLG "SW_HID_AUTO_CORRECT_DLG" -#define HID_HELP_PI "SW_HID_HELP_PI" -#define HID_NAVIGATION_PI "SW_HID_NAVIGATION_PI" -#define HID_TEMPLATE_PI "SW_HID_TEMPLATE_PI" -#define HID_ADDR_PI "SW_HID_ADDR_PI" -#define HID_NAVIGATION_PI_GOTO_PAGE "SW_HID_NAVIGATION_PI_GOTO_PAGE" -#define HID_LETTER_WIZZARD "SW_HID_LETTER_WIZZARD" -#define HID_FAX_WIZZARD "SW_HID_FAX_WIZZARD" -#define HID_MEMO_WIZZARD "SW_HID_MEMO_WIZZARD" -#define HID_AGENDA_WIZZARD "SW_HID_AGENDA_WIZZARD" - -#define HID_NEW_WINDOW "SW_HID_NEW_WINDOW" -#define HID_ARRANGE_ALL_WIN "SW_HID_ARRANGE_ALL_WIN" -#define HID_ARRANGE_CASCADE_WIN "SW_HID_ARRANGE_CASCADE_WIN" -#define HID_ARRANGE_HORZ_WIN "SW_HID_ARRANGE_HORZ_WIN" -#define HID_ARRANGE_VERT_WIN "SW_HID_ARRANGE_VERT_WIN" - -#define HID_SHOW_HELP_INDEX "SW_HID_SHOW_HELP_INDEX" -#define HID_SHOW_KEYBOARD_HELP "SW_HID_SHOW_KEYBOARD_HELP" -#define HID_SHOW_HELP_MANUAL "SW_HID_SHOW_HELP_MANUAL" -#define HID_SHOW_UPDATE_HELP "SW_HID_SHOW_UPDATE_HELP" - -#define HID_CHAR_LEFT "SW_HID_CHAR_LEFT" -#define HID_CHAR_RIGHT "SW_HID_CHAR_RIGHT" -#define HID_LINE_UP "SW_HID_LINE_UP" -#define HID_LINE_DOWN "SW_HID_LINE_DOWN" -#define HID_START_OF_LINE "SW_HID_START_OF_LINE" -#define HID_END_OF_LINE "SW_HID_END_OF_LINE" -#define HID_START_OF_DOCUMENT "SW_HID_START_OF_DOCUMENT" -#define HID_END_OF_DOCUMENT "SW_HID_END_OF_DOCUMENT" -#define HID_START_OF_NEXT_PAGE "SW_HID_START_OF_NEXT_PAGE" -#define HID_END_OF_NEXT_PAGE "SW_HID_END_OF_NEXT_PAGE" -#define HID_START_OF_PREV_PAGE "SW_HID_START_OF_PREV_PAGE" -#define HID_END_OF_PREV_PAGE "SW_HID_END_OF_PREV_PAGE" -#define HID_START_OF_PAGE "SW_HID_START_OF_PAGE" -#define HID_END_OF_PAGE "SW_HID_END_OF_PAGE" -#define HID_START_OF_COLUMN "SW_HID_START_OF_COLUMN" -#define HID_END_OF_COLUMN "SW_HID_END_OF_COLUMN" -#define HID_START_OF_PARA "SW_HID_START_OF_PARA" -#define HID_END_OF_PARA "SW_HID_END_OF_PARA" -#define HID_NEXT_WORD "SW_HID_NEXT_WORD" -#define HID_PREV_WORD "SW_HID_PREV_WORD" -#define HID_NEXT_SENT "SW_HID_NEXT_SENT" -#define HID_PREV_SENT "SW_HID_PREV_SENT" -#define HID_DELETE "SW_HID_DELETE" -#define HID_BACKSPACE "SW_HID_BACKSPACE" -#define HID_DELETE_SENT "SW_HID_DELETE_SENT" -#define HID_DELETE_BACK_SENT "SW_HID_DELETE_BACK_SENT" -#define HID_DELETE_WORD "SW_HID_DELETE_WORD" -#define HID_DELETE_BACK_WORD "SW_HID_DELETE_BACK_WORD" -#define HID_DELETE_LINE "SW_HID_DELETE_LINE" -#define HID_DELETE_BACK_LINE "SW_HID_DELETE_BACK_LINE" -#define HID_DELETE_PARA "SW_HID_DELETE_PARA" -#define HID_DELETE_BACK_PARA "SW_HID_DELETE_BACK_PARA" -#define HID_DELETE_WHOLE_LINE "SW_HID_DELETE_WHOLE_LINE" -#define HID_SET_INS_MODE "SW_HID_SET_INS_MODE" -#define HID_PAGEUP "SW_HID_PAGEUP" -#define HID_PAGEDOWN "SW_HID_PAGEDOWN" -#define HID_SET_ADD_MODE "SW_HID_SET_ADD_MODE" -#define HID_SET_EXT_MODE "SW_HID_SET_EXT_MODE" -#define HID_ESCAPE "SW_HID_ESCAPE" -#define HID_SELECT_WORD "SW_HID_SELECT_WORD" -#define HID_START_TABLE "SW_HID_START_TABLE" -#define HID_END_TABLE "SW_HID_END_TABLE" -#define HID_NEXT_TABLE "SW_HID_NEXT_TABLE" -#define HID_PREV_TABLE "SW_HID_PREV_TABLE" -#define HID_START_OF_NEXT_COLUMN "SW_HID_START_OF_NEXT_COLUMN" -#define HID_END_OF_NEXT_COLUMN "SW_HID_END_OF_NEXT_COLUMN" -#define HID_START_OF_PREV_COLUMN "SW_HID_START_OF_PREV_COLUMN" -#define HID_END_OF_PREV_COLUMN "SW_HID_END_OF_PREV_COLUMN" -#define HID_FOOTNOTE_TO_ANCHOR "SW_HID_FOOTNOTE_TO_ANCHOR" -#define HID_NEXT_FOOTNOTE "SW_HID_NEXT_FOOTNOTE" -#define HID_PREV_FOOTNOTE "SW_HID_PREV_FOOTNOTE" -#define HID_CNTNT_TO_NEXT_FRAME "SW_HID_CNTNT_TO_NEXT_FRAME" -#define HID_FRAME_TO_ANCHOR "SW_HID_FRAME_TO_ANCHOR" -#define HID_TO_HEADER "SW_HID_TO_HEADER" -#define HID_TO_FOOTER "SW_HID_TO_FOOTER" -#define HID_IDX_MARK_TO_IDX "SW_HID_IDX_MARK_TO_IDX" - -#define HID_ENVELOP "SW_HID_ENVELOP" -#define HID_LABEL "SW_HID_LABEL" -#define HID_ENVELOP_PRINT "SW_HID_ENVELOP_PRINT" - -#define HID_NAVIGATION_IMGBTN "SW_HID_NAVIGATION_IMGBTN" -#define HID_ENVELOP_INSERT "SW_HID_ENVELOP_INSERT" - -#define HID_WEBTOOLS_TOOLBOX "SW_HID_WEBTOOLS_TOOLBOX" -#define HID_WEBTEXT_TOOLBOX "SW_HID_WEBTEXT_TOOLBOX" -#define HID_WEBFRAME_TOOLBOX "SW_HID_WEBFRAME_TOOLBOX" -#define HID_TEXT_TOOLBOX "SW_HID_TEXT_TOOLBOX" -#define HID_TABLE_TOOLBOX "SW_HID_TABLE_TOOLBOX" -#define HID_FRAME_TOOLBOX "SW_HID_FRAME_TOOLBOX" -#define HID_GRAFIK_TOOLBOX "SW_HID_GRAFIK_TOOLBOX" -#define HID_OLE_TOOLBOX "SW_HID_OLE_TOOLBOX" -#define HID_DRAW_TOOLBOX "SW_HID_DRAW_TOOLBOX" -#define HID_BEZIER_TOOLBOX "SW_HID_BEZIER_TOOLBOX" -#define HID_DRAW_TEXT_TOOLBOX "SW_HID_DRAW_TEXT_TOOLBOX" -#define HID_NUM_TOOLBOX "SW_HID_NUM_TOOLBOX" -#define HID_TOOLS_TOOLBOX "SW_HID_TOOLS_TOOLBOX" -#define HID_SRCVIEW_TOOLBOX "SW_HID_SRCVIEW_TOOLBOX" - -#define HID_LABEL_INSERT "SW_HID_LABEL_INSERT" -#define HID_CALC_TOOLBOX "SW_HID_CALC_TOOLBOX" -#define HID_PVIEW_TOOLBOX "SW_HID_PVIEW_TOOLBOX" - -#define HID_FIELD_INSERT "SW_HID_FIELD_INSERT" -#define HID_FIELD_CLOSE "SW_HID_FIELD_CLOSE" - -#define HID_COND_COLL_TABLIST "SW_HID_COND_COLL_TABLIST" - -#define HID_DB_SELECTION_TLB "SW_HID_DB_SELECTION_TLB" -#define HID_FIELD_DINF_TYPE "SW_HID_FIELD_DINF_TYPE" - -#define HID_DRAWFORM_TOOLBOX "SW_HID_DRAWFORM_TOOLBOX" -#define HID_SELECT_TEMPLATE "SW_HID_SELECT_TEMPLATE" - -#define HID_AP_INSERT_DB_SEL "SW_HID_AP_INSERT_DB_SEL" -#define HID_WEBGRAPHIC_TOOLBOX "SW_HID_WEBGRAPHIC_TOOLBOX" -#define HID_OUTLINE_FORM "SW_HID_OUTLINE_FORM" -#define HID_NUM_RESET "SW_HID_NUM_RESET" - -#define HID_AUTOFORMAT_REJECT "SW_HID_AUTOFORMAT_REJECT" -#define HID_AUTOFORMAT_ACCEPT "SW_HID_AUTOFORMAT_ACCEPT" -#define HID_AUTOFORMAT_EDIT_CHG "SW_HID_AUTOFORMAT_EDIT_CHG" - -//insert index/entries/Pattern buttons and edits -#define HID_TOX_ENTRY_BUTTON "SW_HID_TOX_ENTRY_BUTTON" -#define HID_TOX_ENTRY_EDIT "SW_HID_TOX_ENTRY_EDIT" - -#define HID_DLG_NEW_USER_IDX "SW_HID_DLG_NEW_USER_IDX" -#define HID_INSERT_IDX_MRK_OK "SW_HID_INSERT_IDX_MRK_OK" -#define HID_INSERT_IDX_MRK_CLOSE "SW_HID_INSERT_IDX_MRK_CLOSE" -#define HID_INSERT_AUTH_MRK_OK "SW_HID_INSERT_AUTH_MRK_OK" -#define HID_INSERT_AUTH_MRK_CLOSE "SW_HID_INSERT_AUTH_MRK_CLOSE" -#define HID_INSERT_IDX_MRK_DELETE "SW_HID_INSERT_IDX_MRK_DELETE" -#define HID_INSERT_IDX_MRK_NEW "SW_HID_INSERT_IDX_MRK_NEW" -#define HID_INSERT_IDX_MRK_PREV "SW_HID_INSERT_IDX_MRK_PREV" -#define HID_INSERT_IDX_MRK_PREV_SAME "SW_HID_INSERT_IDX_MRK_PREV_SAME" -#define HID_INSERT_IDX_MRK_NEXT "SW_HID_INSERT_IDX_MRK_NEXT" -#define HID_INSERT_IDX_MRK_NEXT_SAME "SW_HID_INSERT_IDX_MRK_NEXT_SAME" -#define HID_INSERT_IDX_MRK_TYPE "SW_HID_INSERT_IDX_MRK_TYPE" -#define HID_INSERT_IDX_MRK_ENTRY "SW_HID_INSERT_IDX_MRK_ENTRY" -#define HID_INSERT_IDX_MRK_PRIM_KEY "SW_HID_INSERT_IDX_MRK_PRIM_KEY" -#define HID_INSERT_IDX_MRK_SEC_KEY "SW_HID_INSERT_IDX_MRK_SEC_KEY" -#define HID_INSERT_IDX_MRK_LEVEL "SW_HID_INSERT_IDX_MRK_LEVEL" -#define HID_INSERT_IDX_MRK_MAIN_ENTRY "SW_HID_INSERT_IDX_MRK_MAIN_ENTRY" -#define HID_INSERT_IDX_MRK_APPLY_ALL "SW_HID_INSERT_IDX_MRK_APPLY_ALL" -#define HID_INSERT_AUTH_MRK_ENTRY "SW_HID_INSERT_AUTH_MRK_ENTRY" -#define HID_INSERT_AUTH_MRK_CREATE_ENTRY "SW_HID_INSERT_AUTH_MRK_CREATE_ENTRY" -#define HID_INSERT_AUTH_MRK_EDIT_ENTRY "SW_HID_INSERT_AUTH_MRK_EDIT_ENTRY" -#define HID_TOKEN_WINDOW "SW_HID_TOKEN_WINDOW" - -#define HID_AUTH_FIELD_IDENTIFIER "SW_HID_AUTH_FIELD_IDENTIFIER" -#define HID_AUTH_FIELD_AUTHORITY_TYPE "SW_HID_AUTH_FIELD_AUTHORITY_TYPE" -#define HID_AUTH_FIELD_ADDRESS "SW_HID_AUTH_FIELD_ADDRESS" -#define HID_AUTH_FIELD_ANNOTE "SW_HID_AUTH_FIELD_ANNOTE" -#define HID_AUTH_FIELD_AUTHOR "SW_HID_AUTH_FIELD_AUTHOR" -#define HID_AUTH_FIELD_BOOKTITLE "SW_HID_AUTH_FIELD_BOOKTITLE" -#define HID_AUTH_FIELD_CHAPTER "SW_HID_AUTH_FIELD_CHAPTER" -#define HID_AUTH_FIELD_EDITION "SW_HID_AUTH_FIELD_EDITION" -#define HID_AUTH_FIELD_EDITOR "SW_HID_AUTH_FIELD_EDITOR" -#define HID_AUTH_FIELD_HOWPUBLISHED "SW_HID_AUTH_FIELD_HOWPUBLISHED" -#define HID_AUTH_FIELD_INSTITUTION "SW_HID_AUTH_FIELD_INSTITUTION" -#define HID_AUTH_FIELD_JOURNAL "SW_HID_AUTH_FIELD_JOURNAL" -#define HID_AUTH_FIELD_MONTH "SW_HID_AUTH_FIELD_MONTH" -#define HID_AUTH_FIELD_NOTE "SW_HID_AUTH_FIELD_NOTE" -#define HID_AUTH_FIELD_NUMBER "SW_HID_AUTH_FIELD_NUMBER" -#define HID_AUTH_FIELD_ORGANIZATIONS "SW_HID_AUTH_FIELD_ORGANIZATIONS" -#define HID_AUTH_FIELD_PAGES "SW_HID_AUTH_FIELD_PAGES" -#define HID_AUTH_FIELD_PUBLISHER "SW_HID_AUTH_FIELD_PUBLISHER" -#define HID_AUTH_FIELD_SCHOOL "SW_HID_AUTH_FIELD_SCHOOL" -#define HID_AUTH_FIELD_SERIES "SW_HID_AUTH_FIELD_SERIES" -#define HID_AUTH_FIELD_TITLE "SW_HID_AUTH_FIELD_TITLE" -#define HID_AUTH_FIELD_REPORT_TYPE "SW_HID_AUTH_FIELD_REPORT_TYPE" -#define HID_AUTH_FIELD_VOLUME "SW_HID_AUTH_FIELD_VOLUME" -#define HID_AUTH_FIELD_YEAR "SW_HID_AUTH_FIELD_YEAR" -#define HID_AUTH_FIELD_URL "SW_HID_AUTH_FIELD_URL" -#define HID_AUTH_FIELD_CUSTOM1 "SW_HID_AUTH_FIELD_CUSTOM1" -#define HID_AUTH_FIELD_CUSTOM2 "SW_HID_AUTH_FIELD_CUSTOM2" -#define HID_AUTH_FIELD_CUSTOM3 "SW_HID_AUTH_FIELD_CUSTOM3" -#define HID_AUTH_FIELD_CUSTOM4 "SW_HID_AUTH_FIELD_CUSTOM4" -#define HID_AUTH_FIELD_CUSTOM5 "SW_HID_AUTH_FIELD_CUSTOM5" -#define HID_AUTH_FIELD_ISBN "SW_HID_AUTH_FIELD_ISBN" - -#define HID_AUTH_MARK_DLG_FROM_COMP_RB "SW_HID_AUTH_MARK_DLG_FROM_COMP_RB" -#define HID_AUTH_MARK_DLG_FROM_DOC_RB "SW_HID_AUTH_MARK_DLG_FROM_DOC_RB" -#define HID_AUTH_MARK_DLG_ID_LISTBOX "SW_HID_AUTH_MARK_DLG_ID_LISTBOX" - -#define HID_INSERT_INDEX_ENTRY_LEVEL_LB "SW_HID_INSERT_INDEX_ENTRY_LEVEL_LB" -#define HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE "SW_HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE" -#define HID_INSERT_IDX_MRK_SRCH_WORDONLY "SW_HID_INSERT_IDX_MRK_SRCH_WORDONLY" -#define HID_DLG_CREATE_AUTOMARK "SW_HID_DLG_CREATE_AUTOMARK" -#define HID_BUSINESS_CARD_CONTENT "SW_HID_BUSINESS_CARD_CONTENT" -#define HID_SAVE_LABEL_DLG "SW_HID_SAVE_LABEL_DLG" -#define HID_BUSINESS_FMT_PAGE "SW_HID_BUSINESS_FMT_PAGE" -#define HID_BUSINESS_FMT_PAGE_CONT "SW_HID_BUSINESS_FMT_PAGE_CONT" -#define HID_BUSINESS_FMT_PAGE_SHEET "SW_HID_BUSINESS_FMT_PAGE_SHEET" -#define HID_BUSINESS_FMT_PAGE_BRAND "SW_HID_BUSINESS_FMT_PAGE_BRAND" -#define HID_BUSINESS_FMT_PAGE_TYPE "SW_HID_BUSINESS_FMT_PAGE_TYPE" -#define HID_SEND_MASTER_DIALOG "SW_HID_SEND_MASTER_DIALOG" -#define HID_SEND_MASTER_CTRL_PUSHBUTTON_OK "SW_HID_SEND_MASTER_CTRL_PUSHBUTTON_OK" -#define HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL "SW_HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL" -#define HID_SEND_MASTER_CTRL_LISTBOX_FILTER "SW_HID_SEND_MASTER_CTRL_LISTBOX_FILTER" -#define HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW "SW_HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW" -#define HID_SEND_MASTER_CTRL_EDIT_FILEURL "SW_HID_SEND_MASTER_CTRL_EDIT_FILEURL" -#define HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION "SW_HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION" -#define HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE "SW_HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE" -#define HID_SEND_MASTER_CTRL_DUMMY "SW_HID_SEND_MASTER_CTRL_DUMMY" - -#define HID_SEND_HTML_DIALOG "SW_HID_SEND_HTML_DIALOG" -#define HID_SEND_HTML_CTRL_PUSHBUTTON_OK "SW_HID_SEND_HTML_CTRL_PUSHBUTTON_OK" -#define HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL "SW_HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL" -#define HID_SEND_HTML_CTRL_LISTBOX_FILTER "SW_HID_SEND_HTML_CTRL_LISTBOX_FILTER" -#define HID_SEND_HTML_CTRL_CONTROL_FILEVIEW "SW_HID_SEND_HTML_CTRL_CONTROL_FILEVIEW" -#define HID_SEND_HTML_CTRL_EDIT_FILEURL "SW_HID_SEND_HTML_CTRL_EDIT_FILEURL" -#define HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION "SW_HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION" -#define HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE "SW_HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE" -#define HID_SEND_HTML_CTRL_DUMMY "SW_HID_SEND_HTML_CTRL_DUMMY" - -#define HID_INSERT_IDX_MRK_PHONETIC_READING "SW_HID_INSERT_IDX_MRK_PHONETIC_READING" -#define HID_COLUMN_VALUESET "SW_HID_COLUMN_VALUESET" -#define HID_PVIEW_ZOOM_LB "SW_HID_PVIEW_ZOOM_LB" -#define HID_MAIL_MERGE_SELECT "SW_HID_MAIL_MERGE_SELECT" -#define HID_MAIL_MERGE_CREATE_FROM "SW_HID_MAIL_MERGE_CREATE_FROM" -#define HID_MAIL_MERGE_INSERT_FIELDS "SW_HID_MAIL_MERGE_INSERT_FIELDS" -#define HID_PRINT_AS_MERGE "SW_HID_PRINT_AS_MERGE" -#define HID_MERGE_SOURCE_UNAVAILABLE "SW_HID_MERGE_SOURCE_UNAVAILABLE" -#define HID_DATA_SOURCES_UNAVAILABLE "SW_HID_DATA_SOURCES_UNAVAILABLE" -#define HID_MODULE_TOOLBOX "SW_HID_MODULE_TOOLBOX" -#define HID_SECTION_INDENTS_PAGE "SW_HID_SECTION_INDENTS_PAGE" - -#define HID_FLD_DROPDOWN "SW_HID_FLD_DROPDOWN" -#define HID_MM_DOCSELECTPAGE "SW_HID_MM_DOCSELECTPAGE" -#define HID_MM_OUTPUTTYPEPAGE "SW_HID_MM_OUTPUTTYPEPAGE" -#define HID_MM_ADDRESSBLOCKPAGE "SW_HID_MM_ADDRESSBLOCKPAGE" -#define HID_MM_GREETINGSPAGE "SW_HID_MM_GREETINGSPAGE" -#define HID_MM_PREPAREMERGEPAGE "SW_HID_MM_PREPAREMERGEPAGE" -#define HID_MM_MERGEPAGE "SW_HID_MM_MERGEPAGE" -#define HID_MM_OUTPUTPAGE "SW_HID_MM_OUTPUTPAGE" -#define HID_MM_ADDRESSLISTDIALOG "SW_HID_MM_ADDRESSLISTDIALOG" -#define HID_MM_SELECTDBTABLEDDIALOG "SW_HID_MM_SELECTDBTABLEDDIALOG" -#define HID_MM_SELECTDBTABLEDDIALOG_LISTBOX "SW_HID_MM_SELECTDBTABLEDDIALOG_LISTBOX" -#define HID_MM_DBTABLEPREVIEWDIALOG "SW_HID_MM_DBTABLEPREVIEWDIALOG" -#define HID_MM_CREATEADDRESSLIST "SW_HID_MM_CREATEADDRESSLIST" -#define HID_MM_FIND_ENTRY "SW_HID_MM_FIND_ENTRY" -#define HID_MM_ADD_RENAME_ENTRY "SW_HID_MM_ADD_RENAME_ENTRY" -#define HID_MM_CUSTOMIZE_ADDRESS_LIST "SW_HID_MM_CUSTOMIZE_ADDRESS_LIST" -#define HID_MM_CUSTOMIZEADDRESSBLOCK "SW_HID_MM_CUSTOMIZEADDRESSBLOCK" -#define HID_MM_SELECTADDRESSBLOCK "SW_HID_MM_SELECTADDRESSBLOCK" -#define HID_MM_ASSIGNFIELDS "SW_HID_MM_ASSIGNFIELDS" -#define HID_MM_MAILNOTINSTALLED "SW_HID_MM_MAILNOTINSTALLED" -#define HID_MM_LAYOUT_PAGE "SW_HID_MM_LAYOUT_PAGE" -#define HID_MM_COPYTO "SW_HID_MM_COPYTO" -#define HID_MM_ADDRESSLIST_HB "SW_HID_MM_ADDRESSLIST_HB" -#define HID_MM_ADDRESSLIST_TLB "SW_HID_MM_ADDRESSLIST_TLB" -#define HID_TP_MAILCONFIG "SW_HID_TP_MAILCONFIG" -#define HID_MM_TESTACCOUNTSETTINGS "SW_HID_MM_TESTACCOUNTSETTINGS" -#define HID_MM_TESTACCOUNTSETTINGS_TLB "SW_HID_MM_TESTACCOUNTSETTINGS_TLB" -#define HID_MM_TESTACCOUNTSETTINGS_HB "SW_HID_MM_TESTACCOUNTSETTINGS_HB" -#define HID_MM_MAILBODY "SW_HID_MM_MAILBODY" -#define HID_MM_SENDMAILS "SW_HID_MM_SENDMAILS" -#define HID_MM_SENDMAILS_STATUSLB "SW_HID_MM_SENDMAILS_STATUSLB" -#define HID_MAILMERGECHILD "SW_HID_MAILMERGECHILD" -#define HID_MM_CUSTOMFIELDS "SW_HID_MM_CUSTOMFIELDS" -#define HID_DLG_WORDCOUNT "SW_HID_DLG_WORDCOUNT" -#define HID_MM_MAILSTATUS_TLB "SW_HID_MM_MAILSTATUS_TLB" -#define HID_RETURN_TO_MAILMERGE "SW_HID_RETURN_TO_MAILMERGE" -#define HID_MM_SAVEWARNING "SW_HID_MM_SAVEWARNING" -#define HID_MM_QUERY "SW_HID_MM_QUERY" -#define HID_MM_SENDWARNING "SW_HID_MM_SENDWARNING" -#define HID_MM_SERVERAUTHENTICATION "SW_HID_MM_SERVERAUTHENTICATION" - -#define HID_MEDIA_TOOLBOX "SW_HID_MEDIA_TOOLBOX" -#define HID_NID_TBL "SW_HID_NID_TBL" -#define HID_NID_FRM "SW_HID_NID_FRM" -#define HID_NID_GRF "SW_HID_NID_GRF" -#define HID_NID_OLE "SW_HID_NID_OLE" -#define HID_NID_PGE "SW_HID_NID_PGE" -#define HID_NID_OUTL "SW_HID_NID_OUTL" -#define HID_NID_MARK "SW_HID_NID_MARK" -#define HID_NID_DRW "SW_HID_NID_DRW" -#define HID_NID_CTRL "SW_HID_NID_CTRL" -#define HID_NID_PREV "SW_HID_NID_PREV" -#define HID_NID_REG "SW_HID_NID_REG" -#define HID_NID_BKM "SW_HID_NID_BKM" -#define HID_NID_SEL "SW_HID_NID_SEL" -#define HID_NID_FTN "SW_HID_NID_FTN" -#define HID_NID_POSTIT "SW_HID_NID_POSTIT" -#define HID_NID_SRCH_REP "SW_HID_NID_SRCH_REP" -#define HID_NID_INDEX_ENTRY "SW_HID_NID_INDEX_ENTRY" -#define HID_NID_TABLE_FORMULA "SW_HID_NID_TABLE_FORMULA" -#define HID_NID_TABLE_FORMULA_ERROR "SW_HID_NID_TABLE_FORMULA_ERROR" -#define HID_NID_NEXT "SW_HID_NID_NEXT" -#define HID_MM_NEXT_PAGE "SW_HID_MM_NEXT_PAGE" -#define HID_MM_PREV_PAGE "SW_HID_MM_PREV_PAGE" -#define HID_MM_GREETINGS_CB_PERSONALIZED "SW_HID_MM_GREETINGS_CB_PERSONALIZED" -#define HID_MM_GREETINGS_LB_FEMALE "SW_HID_MM_GREETINGS_LB_FEMALE" -#define HID_MM_GREETINGS_PB_FEMALE "SW_HID_MM_GREETINGS_PB_FEMALE" -#define HID_MM_GREETINGS_LB_MALE "SW_HID_MM_GREETINGS_LB_MALE" -#define HID_MM_GREETINGS_PB_MALE "SW_HID_MM_GREETINGS_PB_MALE" -#define HID_MM_GREETINGS_LB_FEMALECOLUMN "SW_HID_MM_GREETINGS_LB_FEMALECOLUMN" -#define HID_MM_GREETINGS_CB_FEMALEFIELD "SW_HID_MM_GREETINGS_CB_FEMALEFIELD" -#define HID_MM_GREETINGS_CB_NEUTRAL "SW_HID_MM_GREETINGS_CB_NEUTRAL" -#define HID_MM_BODY_CB_PERSONALIZED "SW_HID_MM_BODY_CB_PERSONALIZED" -#define HID_MM_BODY_LB_FEMALE "SW_HID_MM_BODY_LB_FEMALE" -#define HID_MM_BODY_PB_FEMALE "SW_HID_MM_BODY_PB_FEMALE" -#define HID_MM_BODY_LB_MALE "SW_HID_MM_BODY_LB_MALE" -#define HID_MM_BODY_PB_MALE "SW_HID_MM_BODY_PB_MALE" -#define HID_MM_BODY_LB_FEMALECOLUMN "SW_HID_MM_BODY_LB_FEMALECOLUMN" -#define HID_MM_BODY_CB_FEMALEFIELD "SW_HID_MM_BODY_CB_FEMALEFIELD" -#define HID_MM_BODY_CB_NEUTRAL "SW_HID_MM_BODY_CB_NEUTRAL" -#define HID_MM_ASSIGN_FIELDS "SW_HID_MM_ASSIGN_FIELDS" -#define HID_MM_HEADER_0 "SW_HID_MM_HEADER_0" -#define HID_MM_HEADER_1 "SW_HID_MM_HEADER_1" -#define HID_MM_HEADER_2 "SW_HID_MM_HEADER_2" -#define HID_MM_HEADER_3 "SW_HID_MM_HEADER_3" -#define HID_MM_HEADER_4 "SW_HID_MM_HEADER_4" -#define HID_MM_HEADER_5 "SW_HID_MM_HEADER_5" -#define HID_MM_HEADER_6 "SW_HID_MM_HEADER_6" -#define HID_MM_HEADER_7 "SW_HID_MM_HEADER_7" -#define HID_MM_HEADER_8 "SW_HID_MM_HEADER_8" -#define HID_MM_HEADER_9 "SW_HID_MM_HEADER_9" -#define HID_MM_HEADER_10 "SW_HID_MM_HEADER_10" -#define HID_MM_HEADER_11 "SW_HID_MM_HEADER_11" -#define HID_MM_HEADER_12 "SW_HID_MM_HEADER_12" -#define HID_MM_HEADER_13 "SW_HID_MM_HEADER_13" - -#define HID_ITM_HOR_LEFT "SW_HID_ITM_HOR_LEFT" -#define HID_ITM_HOR_CNTR "SW_HID_ITM_HOR_CNTR" -#define HID_ITM_HOR_RGHT "SW_HID_ITM_HOR_RGHT" -#define HID_ITM_VER_LEFT "SW_HID_ITM_VER_LEFT" -#define HID_ITM_VER_CNTR "SW_HID_ITM_VER_CNTR" -#define HID_ITM_VER_RGHT "SW_HID_ITM_VER_RGHT" - -#define HID_TBX_FORMULA_CALC "SW_HID_TBX_FORMULA_CALC" -#define HID_TBX_FORMULA_CANCEL "SW_HID_TBX_FORMULA_CANCEL" -#define HID_TBX_FORMULA_APPLY "SW_HID_TBX_FORMULA_APPLY" - -#define HID_TITLEPAGE "SW_HID_TITLEPAGE" - -#define HID_NAVIGATION_TOOLBOX "SW_HID_NAVIGATION_TOOLBOX" - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx deleted file mode 100644 index 3763d1d4d2..0000000000 --- a/sw/inc/hfspacingitem.hxx +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_HF_EAT_SPACINGITEM_HXX -#define _SW_HF_EAT_SPACINGITEM_HXX - - -#include <svl/eitem.hxx> -#include <hintids.hxx> -#include <format.hxx> - -class IntlWrapper; - -class SW_DLLPUBLIC SwHeaderAndFooterEatSpacingItem : public SfxBoolItem -{ -public: - SwHeaderAndFooterEatSpacingItem( sal_uInt16 nId = RES_HEADER_FOOTER_EAT_SPACING, - sal_Bool bPrt = sal_False ) : SfxBoolItem( nId, bPrt ) {} - - // "pure virtual methods" of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; -}; - -inline const SwHeaderAndFooterEatSpacingItem &SwAttrSet::GetHeaderAndFooterEatSpacing(sal_Bool bInP) const - { return (const SwHeaderAndFooterEatSpacingItem&)Get( RES_HEADER_FOOTER_EAT_SPACING,bInP); } - -inline const SwHeaderAndFooterEatSpacingItem &SwFmt::GetHeaderAndFooterEatSpacing(sal_Bool bInP) const - { return aSet.GetHeaderAndFooterEatSpacing(bInP); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx deleted file mode 100644 index 1ad8964a42..0000000000 --- a/sw/inc/hhcwrp.hxx +++ /dev/null @@ -1,122 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _HHCWRP_HXX -#define _HHCWRP_HXX - -#include <editeng/hangulhanja.hxx> -#include <pam.hxx> - -class SwView; -class Window; -class SwWrtShell; -struct SwConversionArgs; - -////////////////////////////////////////////////////////////////////// - -class SwHHCWrapper : public editeng::HangulHanjaConversion -{ - SwView * pView; - Window* pWin; - SwWrtShell &rWrtShell; - - SwConversionArgs *pConvArgs; // object for arguments (and results) needed - // to find of next convertible text portion - - xub_StrLen nLastPos; // starting position of the last found text part - // (needs to be sth that gets not moved like - // SwPaM or SwPosition by replace operations!) - sal_Int32 nUnitOffset; - - sal_uInt16 nPageCount; // page count for progress bar - sal_uInt16 nPageStart; // first checked page - - sal_Bool bIsDrawObj; - sal_Bool bIsStart; - sal_Bool bIsOtherCntnt; - sal_Bool bStartChk; - sal_Bool bIsSelection; // true if only the selected text should be converted - sal_Bool bInfoBox; // true if message should be displayed at the end - sal_Bool bIsConvSpecial; // true if special regions: header, footer, ... should be converted - sal_Bool bStartDone; - sal_Bool bEndDone; - - // from SvxSpellWrapper copied and modified - sal_Bool ConvNext_impl(); // former SpellNext - sal_Bool FindConvText_impl(); // former FindSpellError - - // from SwSpellWrapper copied and modified - sal_Bool HasOtherCnt_impl(); - void ConvStart_impl( SwConversionArgs *pConvArgs, SvxSpellArea eSpell ); // former SpellStart - void ConvEnd_impl( SwConversionArgs *pConvArgs ); // former SpellEnd - sal_Bool ConvContinue_impl( SwConversionArgs *pConvArgs ); // former SpellContinue - - void SelectNewUnit_impl( const sal_Int32 nUnitStart, - const sal_Int32 nUnitEnd ); - void ChangeText( const String &rNewText, - const ::rtl::OUString& rOrigText, - const ::com::sun::star::uno::Sequence< sal_Int32 > *pOffsets, - SwPaM *pCrsr ); - void ChangeText_impl( const String &rNewText, sal_Bool bKeepAttributes ); - - inline sal_Bool IsDrawObj() { return bIsDrawObj; } - inline void SetDrawObj( sal_Bool bNew ) { bIsDrawObj = bNew; } - -protected: - virtual void GetNextPortion( ::rtl::OUString& rNextPortion, - LanguageType& rLangOfPortion, - sal_Bool bAllowImplicitChangesForNotConvertibleText ); - virtual void HandleNewUnit( const sal_Int32 nUnitStart, - const sal_Int32 nUnitEnd ); - virtual void ReplaceUnit( - const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd, - const ::rtl::OUString& rOrigText, - const ::rtl::OUString& rReplaceWith, - const ::com::sun::star::uno::Sequence< sal_Int32 > &rOffsets, - ReplacementAction eAction, - LanguageType *pNewUnitLanguage ); - - virtual sal_Bool HasRubySupport() const; - -public: - SwHHCWrapper( - SwView* pView, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMSF, - LanguageType nSourceLanguage, LanguageType nTargetLanguage, - const Font *pTargetFont, - sal_Int32 nConvOptions, sal_Bool bIsInteractive, - sal_Bool bStart, sal_Bool bOther, sal_Bool bSelection ); - - virtual ~SwHHCWrapper(); - - void Convert(); -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx deleted file mode 100644 index 463072b46a..0000000000 --- a/sw/inc/hintids.hxx +++ /dev/null @@ -1,475 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _HINTIDS_HXX -#define _HINTIDS_HXX - -#include <tools/solar.h> -#include <sal/types.h> // for sal_Unicode -#include "swdllapi.h" - -// For SwTxtHints without end index the following char is added: - -#define CH_TXTATR_BREAKWORD ((sal_Unicode)0x01) -#define CH_TXTATR_INWORD ((sal_Unicode)0x02) -#define CH_TXTATR_TAB ((sal_Unicode)'\t') -#define CH_TXTATR_NEWLINE ((sal_Unicode)'\n') -#define CH_TXT_ATR_FIELDSTART ((sal_Unicode)0x04) -#define CH_TXT_ATR_FIELDEND ((sal_Unicode)0x05) -#define CH_TXT_ATR_SUBST_FIELDSTART ("[") -#define CH_TXT_ATR_SUBST_FIELDEND ("]") -#define CH_TXT_ATR_FORMELEMENT ((sal_Unicode)0x06) - -/* - * Enums for the hints - */ - -#define HINT_BEGIN 1 - -#define POOLATTR_BEGIN HINT_BEGIN -#define POOLATTR_END RES_UNKNOWNATR_END - -// Ranges for the IDs of the format-attributes. -// Which-values for character-format attributes. -enum RES_CHRATR -{ -RES_CHRATR_BEGIN = HINT_BEGIN, - RES_CHRATR_CASEMAP = RES_CHRATR_BEGIN, // 1 - RES_CHRATR_CHARSETCOLOR, // 2 - RES_CHRATR_COLOR, // 3 - RES_CHRATR_CONTOUR, // 4 - RES_CHRATR_CROSSEDOUT, // 5 - RES_CHRATR_ESCAPEMENT, // 6 - RES_CHRATR_FONT, // 7 - RES_CHRATR_FONTSIZE, // 8 - RES_CHRATR_KERNING, // 9 - RES_CHRATR_LANGUAGE, // 10 - RES_CHRATR_POSTURE, // 11 - RES_CHRATR_PROPORTIONALFONTSIZE, // 12 - RES_CHRATR_SHADOWED, // 13 - RES_CHRATR_UNDERLINE, // 14 - RES_CHRATR_WEIGHT, // 15 - RES_CHRATR_WORDLINEMODE, // 16 - RES_CHRATR_AUTOKERN, // 17 - RES_CHRATR_BLINK, // 18 - RES_CHRATR_NOHYPHEN, // 19 - RES_CHRATR_NOLINEBREAK, // 20 - RES_CHRATR_BACKGROUND, // 21 - RES_CHRATR_CJK_FONT, // 22 - RES_CHRATR_CJK_FONTSIZE, // 23 - RES_CHRATR_CJK_LANGUAGE, // 24 - RES_CHRATR_CJK_POSTURE, // 25 - RES_CHRATR_CJK_WEIGHT, // 26 - RES_CHRATR_CTL_FONT, // 27 - RES_CHRATR_CTL_FONTSIZE, // 28 - RES_CHRATR_CTL_LANGUAGE, // 29 - RES_CHRATR_CTL_POSTURE, // 30 - RES_CHRATR_CTL_WEIGHT, // 31 - RES_CHRATR_ROTATE, // 32 - RES_CHRATR_EMPHASIS_MARK, // 33 - RES_CHRATR_TWO_LINES, // 34 - RES_CHRATR_SCALEW, // 35 - RES_CHRATR_RELIEF, // 36 - RES_CHRATR_HIDDEN, // 37 - RES_CHRATR_OVERLINE, // 38 - RES_CHRATR_DUMMY1, // 39 - RES_CHRATR_DUMMY2, // 40 -RES_CHRATR_END -}; - -// this Attribute used only in a TextNodes SwpAttr-Array -enum RES_TXTATR -{ -RES_TXTATR_BEGIN = RES_CHRATR_END, - -/** text attributes with start and end. - #i105453#: - Hints (SwTxtAttr) with the same start and end position are sorted by - WhichId, i.e., the TXTATR constants defined here. - The text formatting (SwAttrIter) poses some requirements on TXTATR order: - - AUTOFMT must precede CHARFMT, so that auto style can overwrite char style. - - INETFMT must precede CHARFMT, so that link style can overwrite char style. - (this is actually surprising: CHARFMT hints are not split at INETFMT - hints on insertion, but on exporting to ODF. if CHARFMT would precede - INETFMT, then exporting and importing will effectively change precedence) - - Nesting hints (SwTxtAttrNesting) also have requirements on TXTATR order, - to ensure proper nesting (because CJK_RUBY and INETFMT have no CH_TXTATR): - - INETFMT should precede CJK_RUBY (for UNO API it does not matter...) - - META and METAFIELD must precede CJK_RUBY and INETFMT - */ -RES_TXTATR_WITHEND_BEGIN = RES_TXTATR_BEGIN , - RES_TXTATR_REFMARK = RES_TXTATR_WITHEND_BEGIN, // 41 - RES_TXTATR_TOXMARK, // 42 - RES_TXTATR_META, // 43 - RES_TXTATR_METAFIELD, // 44 - RES_TXTATR_AUTOFMT, // 45 - RES_TXTATR_INETFMT, // 46 - RES_TXTATR_CHARFMT, // 47 - RES_TXTATR_CJK_RUBY, // 48 - RES_TXTATR_UNKNOWN_CONTAINER, // 49 - RES_TXTATR_DUMMY5, // 50 -RES_TXTATR_WITHEND_END, - -// all TextAttributes without an end -RES_TXTATR_NOEND_BEGIN = RES_TXTATR_WITHEND_END, - RES_TXTATR_FIELD = RES_TXTATR_NOEND_BEGIN, // 51 - RES_TXTATR_FLYCNT, // 52 - RES_TXTATR_FTN, // 53 - RES_TXTATR_DUMMY4, // 54 - RES_TXTATR_DUMMY3, // 55 - RES_TXTATR_DUMMY1, // 56 - RES_TXTATR_DUMMY2, // 57 -RES_TXTATR_NOEND_END, -RES_TXTATR_END = RES_TXTATR_NOEND_END -}; - -enum RES_PARATR -{ -RES_PARATR_BEGIN = RES_TXTATR_END, - RES_PARATR_LINESPACING = RES_PARATR_BEGIN, // 58 - RES_PARATR_ADJUST, // 59 - RES_PARATR_SPLIT, // 60 - RES_PARATR_ORPHANS, // 61 - RES_PARATR_WIDOWS, // 62 - RES_PARATR_TABSTOP, // 63 - RES_PARATR_HYPHENZONE, // 64 - RES_PARATR_DROP, // 65 - RES_PARATR_REGISTER, // 66 - RES_PARATR_NUMRULE, // 67 - RES_PARATR_SCRIPTSPACE, // 68 - RES_PARATR_HANGINGPUNCTUATION, // 69 - RES_PARATR_FORBIDDEN_RULES, // 70 - RES_PARATR_VERTALIGN, // 71 - RES_PARATR_SNAPTOGRID, // 72 - RES_PARATR_CONNECT_BORDER, // 73 - RES_PARATR_OUTLINELEVEL, // 74 -RES_PARATR_END -}; - -// list attributes for paragraphs. -// intentionally these list attributes are not contained in paragraph styles -enum RES_PARATR_LIST -{ -RES_PARATR_LIST_BEGIN = RES_PARATR_END, - RES_PARATR_LIST_ID = RES_PARATR_LIST_BEGIN, // 75 - RES_PARATR_LIST_LEVEL, // 76 - RES_PARATR_LIST_ISRESTART, // 77 - RES_PARATR_LIST_RESTARTVALUE, // 78 - RES_PARATR_LIST_ISCOUNTED, // 79 -RES_PARATR_LIST_END -}; - -enum RES_FRMATR -{ -RES_FRMATR_BEGIN = RES_PARATR_LIST_END, - RES_FILL_ORDER = RES_FRMATR_BEGIN, // 80 - RES_FRM_SIZE, // 81 - RES_PAPER_BIN, // 82 - RES_LR_SPACE, // 83 - RES_UL_SPACE, // 84 - RES_PAGEDESC, // 85 - RES_BREAK, // 86 - RES_CNTNT, // 87 - RES_HEADER, // 88 - RES_FOOTER, // 89 - RES_PRINT, // 90 - RES_OPAQUE, // 91 - RES_PROTECT, // 92 - RES_SURROUND, // 93 - RES_VERT_ORIENT, // 94 - RES_HORI_ORIENT, // 95 - RES_ANCHOR, // 96 - RES_BACKGROUND, // 97 - RES_BOX, // 98 - RES_SHADOW, // 99 - RES_FRMMACRO, // 100 - RES_COL, // 101 - RES_KEEP, // 102 - RES_URL, // 103 - RES_EDIT_IN_READONLY, // 104 - RES_LAYOUT_SPLIT, // 105 - RES_CHAIN, // 106 - RES_TEXTGRID, // 107 - RES_LINENUMBER , // 108 - RES_FTN_AT_TXTEND, // 109 - RES_END_AT_TXTEND, // 110 - RES_COLUMNBALANCE, // 111 - RES_FRAMEDIR, // 112 - RES_HEADER_FOOTER_EAT_SPACING, // 113 - RES_ROW_SPLIT, // 114 - RES_FOLLOW_TEXT_FLOW, // 115 - RES_COLLAPSING_BORDERS, // 116 - RES_WRAP_INFLUENCE_ON_OBJPOS, // 117 - RES_AUTO_STYLE, // 118 - RES_FRMATR_STYLE_NAME, // 119 - RES_FRMATR_CONDITIONAL_STYLE_NAME, // 120 -RES_FRMATR_END -}; - -enum RES_GRFATR -{ -RES_GRFATR_BEGIN = RES_FRMATR_END, - RES_GRFATR_MIRRORGRF = RES_GRFATR_BEGIN, // 121 - RES_GRFATR_CROPGRF, // 122 - - RES_GRFATR_ROTATION, // 123 - RES_GRFATR_LUMINANCE, // 124 - RES_GRFATR_CONTRAST, // 125 - RES_GRFATR_CHANNELR, // 126 - RES_GRFATR_CHANNELG, // 127 - RES_GRFATR_CHANNELB, // 128 - RES_GRFATR_GAMMA, // 129 - RES_GRFATR_INVERT, // 130 - RES_GRFATR_TRANSPARENCY, // 131 - RES_GRFATR_DRAWMODE, // 132 - - RES_GRFATR_DUMMY1, // 133 - RES_GRFATR_DUMMY2, // 134 - RES_GRFATR_DUMMY3, // 135 - RES_GRFATR_DUMMY4, // 136 - RES_GRFATR_DUMMY5, // 137 -RES_GRFATR_END -}; - -enum RES_BOXATR -{ -RES_BOXATR_BEGIN = RES_GRFATR_END, - RES_BOXATR_FORMAT = RES_BOXATR_BEGIN, // 138 - RES_BOXATR_FORMULA, // 139 - RES_BOXATR_VALUE, // 140 -RES_BOXATR_END -}; - -enum RES_UNKNOWNATR -{ -RES_UNKNOWNATR_BEGIN = RES_BOXATR_END, - RES_UNKNOWNATR_CONTAINER = RES_UNKNOWNATR_BEGIN,// 141 -RES_UNKNOWNATR_END -}; - - - -// Format IDs -enum RES_FMT -{ -RES_FMT_BEGIN = RES_UNKNOWNATR_END, - RES_CHRFMT = RES_FMT_BEGIN, - RES_FRMFMT, - RES_FLYFRMFMT, - RES_TXTFMTCOLL, - RES_GRFFMTCOLL, - RES_DRAWFRMFMT, - RES_CONDTXTFMTCOLL, -RES_FMT_END -}; - -// ID's for Messages in the Formats -enum RES_MSG -{ -RES_MSG_BEGIN = RES_FMT_END, - RES_OBJECTDYING = RES_MSG_BEGIN, - RES_FMT_CHG, - RES_ATTRSET_CHG, - RES_FRM_SIZECHG, - RES_TXTATR_FLDCHG, - RES_TXTATR_EMPTYCHG, - RES_INS_CHR, - RES_INS_TXT, - RES_DEL_CHR, - RES_DEL_TXT, - RES_UPDATE_ATTR, - RES_PAGEDESC_FTNINFO, - RES_REFMARKFLD_UPDATE, - RES_DOCPOS_UPDATE, - RES_TABLEFML_UPDATE, - RES_UPDATEDDETBL, - RES_TBLHEADLINECHG, - RES_AUTOFMT_DOCNODE, - RES_REPAINT, - RES_DOC_DTOR, - RES_SECTION_HIDDEN, - RES_SECTION_NOT_HIDDEN, - RES_GRAPHIC_ARRIVED, - RES_GRAPHIC_PIECE_ARRIVED, - RES_HIDDENPARA_PRINT, - RES_CONDCOLL_CONDCHG, - RES_VIRTPAGENUM_INFO, - RES_GETLOWERNUMLEVEL, - RES_RESET_FMTWRITTEN, - RES_REMOVE_UNO_OBJECT, - RES_GRF_REREAD_AND_INCACHE, - RES_SECTION_RESETHIDDENFLAG, - RES_FINDNEARESTNODE, - RES_CONTENT_VISIBLE, - RES_FOOTNOTE_DELETED, - RES_REFMARK_DELETED, - RES_TOXMARK_DELETED, - RES_GRAPHIC_SWAPIN, - RES_FIELD_DELETED, - RES_NAME_CHANGED, - RES_TITLE_CHANGED, - RES_DESCRIPTION_CHANGED, - RES_UNOCURSOR_LEAVES_SECTION, - RES_LINKED_GRAPHIC_STREAM_ARRIVED, -RES_MSG_END -}; - -// An ID for the RTF-reader. The stylesheets are treated like attributes, -// i.e. there is a StyleSheet-attribute. To avoid collision with other -// Which()-values, the value is listed here. (The help system too defines -// new attributes!) -enum RES_FLTRATTR -{ -RES_FLTRATTR_BEGIN = RES_MSG_END, - RES_FLTR_STYLESHEET = RES_FLTRATTR_BEGIN, - RES_FLTR_BOOKMARK, - RES_FLTR_ANCHOR, - RES_FLTR_BORDER, - RES_FLTR_NUMRULE, - RES_FLTR_NUMRULE_NUM, - RES_FLTR_SDR_ANCHOR, - RES_FLTR_TOX, - RES_FLTR_SECTION, - RES_FLTR_REDLINE, - RES_FLTR_SCRIPTTYPE, -RES_FLTRATTR_END -}; - -#define RES_TBX_DUMMY RES_FLTRATTR_END + 1 - -#define HINT_END RES_TBX_DUMMY - -// Error recognition!! -#define INVALID_HINT HINT_END -#define RES_WHICHHINT_END HINT_END - - -inline bool isATR(const sal_uInt16 nWhich) -{ - return (RES_CHRATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich); -} -inline bool isCHRATR(const sal_uInt16 nWhich) -{ - return (RES_CHRATR_BEGIN <= nWhich) && (RES_CHRATR_END > nWhich); -} -inline bool isTXTATR_WITHEND(const sal_uInt16 nWhich) -{ - return (RES_TXTATR_WITHEND_BEGIN <= nWhich) - && (RES_TXTATR_WITHEND_END > nWhich); -} -inline bool isTXTATR_NOEND(const sal_uInt16 nWhich) -{ - return (RES_TXTATR_NOEND_BEGIN <= nWhich) - && (RES_TXTATR_NOEND_END > nWhich); -} -inline bool isTXTATR(const sal_uInt16 nWhich) -{ - return (RES_TXTATR_BEGIN <= nWhich) && (RES_TXTATR_END > nWhich); -} -inline bool isPARATR(const sal_uInt16 nWhich) -{ - return (RES_PARATR_BEGIN <= nWhich) && (RES_PARATR_END > nWhich); -} -inline bool isPARATR_LIST(const sal_uInt16 nWhich) -{ - return (RES_PARATR_LIST_BEGIN <= nWhich) && (RES_PARATR_LIST_END > nWhich); } -inline bool isFRMATR(const sal_uInt16 nWhich) -{ - return (RES_FRMATR_BEGIN <= nWhich) && (RES_FRMATR_END > nWhich); -} -inline bool isGRFATR(const sal_uInt16 nWhich) -{ - return (RES_GRFATR_BEGIN <= nWhich) && (RES_GRFATR_END > nWhich); -} -inline bool isBOXATR(const sal_uInt16 nWhich) -{ - return (RES_BOXATR_BEGIN <= nWhich) && (RES_BOXATR_END > nWhich); -} -inline bool isUNKNOWNATR(const sal_uInt16 nWhich) -{ - return (RES_UNKNOWNATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich); -} - - -// Take the respective default attribute from the statistical default -// attributes table over the Which-value. -// If none exists, return a 0 pointer!!! -// This function is implemented in Init.cxx. It is declared here as external -// in order to allow the formats to access it. -// Inline in PRODUCT. -class SfxPoolItem; -struct SfxItemInfo; -typedef SfxPoolItem* SwDfltAttrTab[ POOLATTR_END - POOLATTR_BEGIN ]; - -extern SwDfltAttrTab aAttrTab; -extern SfxItemInfo aSlotTab[]; - -SW_DLLPUBLIC const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich ); - -SW_DLLPUBLIC sal_uInt16 GetWhichOfScript( sal_uInt16 nWhich, sal_uInt16 nScript ); - -// return for the given TextAttribute without an end the correct character. -// This function returns -// CH_TXTATR_BREAKWORD for Textattribute which breaks a word (default) -// CH_TXTATR_INWORD for Textattribute which dont breaks a word -class SwTxtAttr; -sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr ); - -// all Sets defined in init.cxx - -// AttrSet-Range for the 3 Break-Attribute -extern sal_uInt16 aBreakSetRange[]; -// AttrSet-Range for TxtFmtColl -extern sal_uInt16 aTxtFmtCollSetRange[]; -// AttrSet-Range for GrfFmtColl -extern sal_uInt16 aGrfFmtCollSetRange[]; -// AttrSet-Range for TextNode -SW_DLLPUBLIC extern sal_uInt16 aTxtNodeSetRange[]; -// AttrSet-Range for NoTxtNode -extern sal_uInt16 aNoTxtNodeSetRange[]; -// AttrSet-Range for SwTable -extern sal_uInt16 aTableSetRange[]; -// AttrSet-Range for SwTableLine -extern sal_uInt16 aTableLineSetRange[]; -// AttrSet-Range for SwTableBox -extern sal_uInt16 aTableBoxSetRange[]; -// AttrSet-Range for SwFrmFmt -SW_DLLPUBLIC extern sal_uInt16 aFrmFmtSetRange[]; -// AttrSet-Range for SwCharFmt -extern sal_uInt16 aCharFmtSetRange[]; -// AttrSet-Range for the autostyles -extern sal_uInt16 aCharAutoFmtSetRange[]; -// AttrSet-Range for SwPageDescFmt -extern sal_uInt16 aPgFrmFmtSetRange[]; - -// check if ID is InRange of AttrSet-Ids -sal_Bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId ); - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx deleted file mode 100644 index dd187e82bf..0000000000 --- a/sw/inc/hints.hxx +++ /dev/null @@ -1,253 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _HINTS_HXX -#define _HINTS_HXX - -#include <tools/table.hxx> -#include <swatrset.hxx> - -class SwFmt; -class OutputDevice; -class SwTable; -class SwNode; -class SwNodes; -class SwCntntNode; -class SwPageFrm; -class SwFrm; -class SwTxtNode; -class SwHistory; - -// Base class for all Message-Hints: -// "Overhead" of SfxPoolItem is handled here -class SwMsgPoolItem : public SfxPoolItem -{ -public: - SwMsgPoolItem( sal_uInt16 nWhich ); - - // "Overhead" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; -}; - - -// --------------------------------------- -// SwPtrMsgPoolItem (old SwObjectDying!) -// --------------------------------------- - -class SwPtrMsgPoolItem : public SwMsgPoolItem -{ -public: - void * pObject; - - SwPtrMsgPoolItem( sal_uInt16 nId, void * pObj ) - : SwMsgPoolItem( nId ), pObject( pObj ) - {} -}; - - - -/* - * SwFmtChg is sent when a format has changed to another format. 2 Hints are always sent - * the old and the new format - */ -class SwFmtChg: public SwMsgPoolItem -{ -public: - SwFmt *pChangedFmt; - SwFmtChg( SwFmt *pFmt ); -}; - - -class SwInsTxt: public SwMsgPoolItem -{ -public: - xub_StrLen nPos; - xub_StrLen nLen; - - SwInsTxt( xub_StrLen nP, xub_StrLen nL ); -}; - -class SwDelChr: public SwMsgPoolItem -{ -public: - xub_StrLen nPos; - - SwDelChr( xub_StrLen nP ); -}; - -class SwDelTxt: public SwMsgPoolItem -{ -public: - xub_StrLen nStart; - xub_StrLen nLen; - - SwDelTxt( xub_StrLen nS, xub_StrLen nL ); -}; - -class SwUpdateAttr: public SwMsgPoolItem -{ -public: - xub_StrLen nStart; - xub_StrLen nEnd; - sal_uInt16 nWhichAttr; - SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, sal_uInt16 nW ); -}; - - -// SwRefMarkFldUpdate is sent when the referencemarks should be updated. -// To determine Page- / chapternumbers the current frame has to be asked. -// For this we need the current outputdevice -class SwRefMarkFldUpdate : public SwMsgPoolItem -{ -public: - const OutputDevice* pOut; // pointer to the current output device - SwRefMarkFldUpdate( const OutputDevice* ); -}; - -// SwDocPosUpdate is sent to signal that only the frames from or to a specified document-global position -// have to be updated. At the moment this is only needed when updating pagenumber fields. -class SwDocPosUpdate : public SwMsgPoolItem -{ -public: - const long nDocPos; - SwDocPosUpdate( const long nDocPos ); -}; - -// SwTableFmlUpdate is sent when the table has to be newly calculated or when a table itself is merged or splitted -enum TableFmlUpdtFlags { TBL_CALC = 0, - TBL_BOXNAME, - TBL_BOXPTR, - TBL_RELBOXNAME, - TBL_MERGETBL, - TBL_SPLITTBL - }; -class SwTableFmlUpdate : public SwMsgPoolItem -{ -public: - const SwTable* pTbl; // Pointer to the current table - union { - const SwTable* pDelTbl; // Merge: Pointer to the table to be removed - const String* pNewTblNm; // Split: the name of the new table - } DATA; - SwHistory* pHistory; - sal_uInt16 nSplitLine; // Split: from this BaseLine on will be splitted - TableFmlUpdtFlags eFlags; - sal_Bool bModified : 1; - sal_Bool bBehindSplitLine : 1; - - SwTableFmlUpdate( const SwTable* ); -}; - - -class SwAutoFmtGetDocNode: public SwMsgPoolItem -{ -public: - const SwCntntNode* pCntntNode; - const SwNodes* pNodes; - - SwAutoFmtGetDocNode( const SwNodes* pNds ); -}; - -/* - * SwAttrSetChg is sent when something has changed in the SwAttrSet rTheChgdSet. - * 2 Hints are always sent, the old and the new items in the rTheChgdSet. - */ -class SwAttrSetChg: public SwMsgPoolItem -{ - sal_Bool bDelSet; - SwAttrSet* pChgSet; // what has changed - const SwAttrSet* pTheChgdSet; // is only used to compare -public: - SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet ); - SwAttrSetChg( const SwAttrSetChg& ); - ~SwAttrSetChg(); - - // What has changed - const SwAttrSet* GetChgSet() const { return pChgSet; } - SwAttrSet* GetChgSet() { return pChgSet; } - - // Where it has changed - const SwAttrSet* GetTheChgdSet() const { return pTheChgdSet; } - - sal_uInt16 Count() const { return pChgSet->Count(); } - void ClearItem( sal_uInt16 nWhichL = 0 ) -#if OSL_DEBUG_LEVEL > 1 - ; -#else - { pChgSet->ClearItem( nWhichL ); } -#endif -}; - -class SwCondCollCondChg: public SwMsgPoolItem -{ -public: - SwFmt *pChangedFmt; - SwCondCollCondChg( SwFmt *pFmt ); -}; - -class SwVirtPageNumInfo: public SwMsgPoolItem -{ - const SwPageFrm *pPage; - const SwPageFrm *pOrigPage; - const SwFrm *pFrm; - // Multiple attributes can be attached to a single paragraph / table - // The frame, in the end, has to decide which attribute takes effect and which physical page it involves -public: - SwVirtPageNumInfo( const SwPageFrm *pPg ); - - const SwPageFrm *GetPage() { return pPage; } - const SwPageFrm *GetOrigPage() { return pOrigPage;} - const SwFrm *GetFrm() { return pFrm; } - void SetInfo( const SwPageFrm *pPg, - const SwFrm *pF ) { pFrm = pF, pPage = pPg; } -}; - -class SwFindNearestNode : public SwMsgPoolItem -{ - const SwNode *pNd, *pFnd; -public: - SwFindNearestNode( const SwNode& rNd ); - void CheckNode( const SwNode& rNd ); - - const SwNode* GetFoundNode() const { return pFnd; } -}; - -class SwStringMsgPoolItem : public SwMsgPoolItem -{ - String sStr; -public: - - const String& GetString() const { return sStr; } - - SwStringMsgPoolItem( sal_uInt16 nId, const String& rStr ) - : SwMsgPoolItem( nId ), sStr( rStr ) - {} -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx deleted file mode 100644 index e92140829a..0000000000 --- a/sw/inc/htmltbl.hxx +++ /dev/null @@ -1,475 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _HTMLTBL_HXX -#define _HTMLTBL_HXX - - -#include <vcl/timer.hxx> -#include <editeng/svxenum.hxx> - -#include "swtypes.hxx" -#include "node.hxx" // For SwStartNode - - -class SwTableBox; -class SwTable; -class SwHTMLTableLayout; -class SwDoc; -class SwFrmFmt; - -#define HTMLTABLE_RESIZE_NOW (ULONG_MAX) - -class SwHTMLTableLayoutCnts -{ - SwHTMLTableLayoutCnts *pNext; // The next content. - - // Only one of the following two pointers may be set! - SwTableBox *pBox; // A Box. - SwHTMLTableLayout *pTable; // A "table within a table". - - // During first run there are still no boxes. In this case - // pStartNode is used instead of pBox. - const SwStartNode *pStartNode; - - // The following counters indicate how often a pass has been - // done for this content. Therefore they are compared against - // a reference value. If 255 is reached the continue with 0. - // This avoids reinitialization on every resize. - sal_uInt8 nPass1Done; // How many times has Pass 1 been called? - sal_uInt8 nWidthSet; // How many times has the width been set? - - sal_Bool bNoBreakTag; // <NOBR>-Tag over complete content. - -public: - - SwHTMLTableLayoutCnts( const SwStartNode* pSttNd, SwHTMLTableLayout* pTab, - sal_Bool bNoBreakTag, SwHTMLTableLayoutCnts* pNxt ); - - ~SwHTMLTableLayoutCnts(); - - void SetTableBox( SwTableBox *pBx ) { pBox = pBx; } - SwTableBox *GetTableBox() const { return pBox; } - - SwHTMLTableLayout *GetTable() const { return pTable; } - - const SwStartNode *GetStartNode() const; - - // Calculation of next node. - SwHTMLTableLayoutCnts *GetNext() const { return pNext; } - - void SetWidthSet( sal_uInt8 nRef ) { nWidthSet = nRef; } - sal_Bool IsWidthSet( sal_uInt8 nRef ) const { return nRef==nWidthSet; } - - void SetPass1Done( sal_uInt8 nRef ) { nPass1Done = nRef; } - sal_Bool IsPass1Done( sal_uInt8 nRef ) const { return nRef==nPass1Done; } - - sal_Bool HasNoBreakTag() const { return bNoBreakTag; } -}; - -class SwHTMLTableLayoutCell -{ - SwHTMLTableLayoutCnts *pContents; // Content of cell. - - sal_uInt16 nRowSpan; // ROWSPAN of cell. - sal_uInt16 nColSpan; // COLSPAN of cell. - sal_uInt16 nWidthOption;// Given width of cell in Twip or %. - - sal_Bool bPrcWidthOption : 1;// nWidth is %-value. - sal_Bool bNoWrapOption : 1; // NOWRAP-option. - -public: - - SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts, - sal_uInt16 nRSpan, sal_uInt16 nCSpan, - sal_uInt16 nWidthOpt, sal_Bool bPrcWdthOpt, - sal_Bool nNWrapOpt ); - - ~SwHTMLTableLayoutCell(); - - // Set or get content of a cell. - void SetContents( SwHTMLTableLayoutCnts *pCnts ) { pContents = pCnts; } - SwHTMLTableLayoutCnts *GetContents() const { return pContents; } - - inline void SetProtected(); - - // Set or get ROWSPAN/COLSPAN of cell. - void SetRowSpan( sal_uInt16 nRSpan ) { nRowSpan = nRSpan; } - sal_uInt16 GetRowSpan() const { return nRowSpan; } - sal_uInt16 GetColSpan() const { return nColSpan; } - - sal_uInt16 GetWidthOption() const { return nWidthOption; } - sal_Bool IsPrcWidthOption() const { return bPrcWidthOption; } - - sal_Bool HasNoWrapOption() const { return bNoWrapOption; } -}; - -class SwHTMLTableLayoutColumn -{ - - // Interim values of AutoLayoutPass1, - sal_uLong nMinNoAlign, nMaxNoAlign, nAbsMinNoAlign; - - // Results of AutoLayoutPass1 - sal_uLong nMin, nMax; - - // Results of Pass 2. - sal_uInt16 nAbsColWidth; // In Twips. - sal_uInt16 nRelColWidth; // In Twips or relative to USHRT_MAX. - - sal_uInt16 nWidthOption; // Options of <COL> or <TD>/<TH>. - - sal_Bool bRelWidthOption : 1; - sal_Bool bLeftBorder : 1; - -public: - - SwHTMLTableLayoutColumn( sal_uInt16 nColWidthOpt, sal_Bool bRelColWidthOpt, - sal_Bool bLBorder ); - - ~SwHTMLTableLayoutColumn() {} - - inline void MergeCellWidthOption( sal_uInt16 nWidth, sal_Bool bPrc ); - inline void SetWidthOption( sal_uInt16 nWidth, sal_Bool bRelWidth, sal_Bool bTest ); - - sal_uInt16 GetWidthOption() const { return nWidthOption; } - sal_Bool IsRelWidthOption() const { return bRelWidthOption; } - - inline void MergeMinMaxNoAlign( sal_uLong nMin, sal_uLong nMax, sal_uLong nAbsMin ); - sal_uLong GetMinNoAlign() const { return nMinNoAlign; } - sal_uLong GetMaxNoAlign() const { return nMaxNoAlign; } - sal_uLong GetAbsMinNoAlign() const { return nAbsMinNoAlign; } - inline void ClearPass1Info( sal_Bool bWidthOpt ); - - inline void SetMinMax( sal_uLong nMin, sal_uLong nMax ); - void SetMax( sal_uLong nVal ) { nMax = nVal; } - void AddToMin( sal_uLong nVal ) { nMin += nVal; } - void AddToMax( sal_uLong nVal ) { nMax += nVal; } - sal_uLong GetMin() const { return nMin; } - sal_uLong GetMax() const { return nMax; } - - void SetAbsColWidth( sal_uInt16 nWidth ) { nAbsColWidth = nWidth; } - sal_uInt16 GetAbsColWidth() const { return nAbsColWidth; } - - void SetRelColWidth( sal_uInt16 nWidth ) { nRelColWidth = nWidth; } - sal_uInt16 GetRelColWidth() const { return nRelColWidth; } - - sal_Bool HasLeftBorder() const { return bLeftBorder; } -}; - -class SwHTMLTableLayout -{ - Timer aResizeTimer; // Timer for DelayedResize. - - SwHTMLTableLayoutColumn **aColumns; - SwHTMLTableLayoutCell **aCells; - - const SwTable *pSwTable; // SwTable (Top-Table only). - SwTableBox *pLeftFillerBox; // Left filler-box (table in table only). - SwTableBox *pRightFillerBox; // Right filler-box (table in Table only). - - sal_uLong nMin; // Minimal width of table (Twips). - sal_uLong nMax; // Maximal width of table (Twips). - - sal_uInt16 nRows; // Row count. - sal_uInt16 nCols; // Column count. - - sal_uInt16 nLeftMargin; // Space to left margin (from paragraph). - sal_uInt16 nRightMargin; // Space to left margin (from paragraph). - - sal_uInt16 nInhAbsLeftSpace; // Space inherited from surrounding box - sal_uInt16 nInhAbsRightSpace; // that was added to boxes. - - sal_uInt16 nRelLeftFill; // Width of boxes relative to alignment - sal_uInt16 nRelRightFill; // of tables in tables. - - sal_uInt16 nRelTabWidth; // Relative width of table. - - sal_uInt16 nWidthOption; // Width of table (in Twips oder %). - sal_uInt16 nCellPadding; // Space to contents (in Twips). - sal_uInt16 nCellSpacing; // Cell spacing (in Twips). - sal_uInt16 nBorder; // Line strength of outer border, or rather the - // space needed for it as calculated by Netscape. - - sal_uInt16 nLeftBorderWidth; - sal_uInt16 nRightBorderWidth; - sal_uInt16 nInhLeftBorderWidth; - sal_uInt16 nInhRightBorderWidth; - sal_uInt16 nBorderWidth; - - sal_uInt16 nDelayedResizeAbsAvail; // Param for delayed Resize. - sal_uInt16 nLastResizeAbsAvail; - - sal_uInt8 nPass1Done; // Reference-values for - sal_uInt8 nWidthSet; // the runs through loop. - - SvxAdjust eTableAdjust; // Alignment of table. - - sal_Bool bColsOption : 1; // Table has a COLS-option. - sal_Bool bColTags : 1; // Tabelle has COL/COLGRP-tags. - sal_Bool bPrcWidthOption : 1; // Width is given in percent. - sal_Bool bUseRelWidth : 1; // SwTable gets relative width. - - sal_Bool bMustResize : 1; // Table width must be defined. - sal_Bool bExportable : 1; // Layout may be used for export. - sal_Bool bBordersChanged : 1; // Borders have been changed. - sal_Bool bMayBeInFlyFrame : 1; // Table could be within frame. - - sal_Bool bDelayedResizeRecalc : 1; // Param for delayed Resize. - sal_Bool bMustNotResize : 1; // Table may not be resized. - sal_Bool bMustNotRecalc : 1; // Table may not be adapted to its contents. - - void AddBorderWidth( sal_uLong &rMin, sal_uLong &rMax, sal_uLong& rAbsMin, - sal_uInt16 nCol, sal_uInt16 nColSpan, - sal_Bool bSwBorders=sal_True ) const; - void SetBoxWidth( SwTableBox *pBox, sal_uInt16 nCol, sal_uInt16 nColSpan ) const; - - const SwStartNode *GetAnyBoxStartNode() const; - SwFrmFmt *FindFlyFrmFmt() const; - const SwDoc *GetDoc() const { return GetAnyBoxStartNode()->GetDoc(); } - - void ClearPass1Info() { nMin = nMax = 0; } - - void _Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False ); - - DECL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void* ); - - static sal_uInt16 GetBrowseWidthByVisArea( const SwDoc& rDoc ); -public: - - SwHTMLTableLayout( const SwTable *pSwTbl, - sal_uInt16 nRows, sal_uInt16 nCols, sal_Bool bColsOpt, sal_Bool ColTgs, - sal_uInt16 nWidth, sal_Bool bPrcWidth, sal_uInt16 nBorderOpt, - sal_uInt16 nCellPad, sal_uInt16 nCellSp, SvxAdjust eAdjust, - sal_uInt16 nLMargin, sal_uInt16 nRMargin, sal_uInt16 nBWidth, - sal_uInt16 nLeftBWidth, sal_uInt16 nRightBWidth, - sal_uInt16 nInhLeftBWidth, sal_uInt16 nInhRightBWidth ); - - ~SwHTMLTableLayout(); - - sal_uInt16 GetLeftCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan, - sal_Bool bSwBorders=sal_True ) const; - sal_uInt16 GetRightCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan, - sal_Bool bSwBorders=sal_True ) const; - inline sal_uInt16 GetInhCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const; - - inline void SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight ); - - - void GetAvail( sal_uInt16 nCol, sal_uInt16 nColSpan, sal_uInt16& rAbsAvail, - sal_uInt16& rRelAvail ) const; - - void AutoLayoutPass1(); - void AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAvail, - sal_uInt16 nAbsLeftSpace, sal_uInt16 nAbsRightSpace, - sal_uInt16 nParentInhSpace ); - void SetWidths( sal_Bool bCallPass2=sal_False, sal_uInt16 nAbsAvail=0, - sal_uInt16 nRelAvail=0, sal_uInt16 nAbsLeftSpace=0, - sal_uInt16 nAbsRightSpace=0, - sal_uInt16 nParentInhSpace=0 ); - - inline SwHTMLTableLayoutColumn *GetColumn( sal_uInt16 nCol ) const; - inline void SetColumn( SwHTMLTableLayoutColumn *pCol, sal_uInt16 nCol ); - - inline SwHTMLTableLayoutCell *GetCell( sal_uInt16 nRow, sal_uInt16 nCol ) const; - inline void SetCell( SwHTMLTableLayoutCell *pCell, sal_uInt16 nRow, sal_uInt16 nCol ); - - void SetLeftFillerBox( SwTableBox *pBox ) { pLeftFillerBox = pBox; } - void SetRightFillerBox( SwTableBox *pBox ) { pRightFillerBox = pBox; } - - sal_uLong GetMin() const { return nMin; } - sal_uLong GetMax() const { return nMax; } - sal_uInt16 GetRelLeftFill() const { return nRelLeftFill; } - sal_uInt16 GetRelRightFill() const { return nRelRightFill; } - - inline long GetBrowseWidthMin() const; - - sal_Bool HasColsOption() const { return bColsOption; } - sal_Bool HasColTags() const { return bColTags; } - - sal_Bool IsTopTable() const { return pSwTable != 0; } - - void SetMustResize( sal_Bool bSet ) { bMustResize = bSet; } - void SetMustNotResize( sal_Bool bSet ) { bMustNotResize = bSet; } - void SetMustNotRecalc( sal_Bool bSet ) { bMustNotRecalc = bSet; } - - // Recalculation of table widths for available width that has been passed. - // - If bRecalc is set, contents of boxes are included into calculation. - // - If bForce is set, table will be recalculated even if this was - // disallowed by SetMustNotResize. - // - If nDelay > 0 the calculation is delayed accordingly. Resizing calls - // occuring during delay-time are ignored, but the delay may be counted - // under certain circumstances. - // - If nDelay == HTMLTABLE_RESIZE_NOW, resize immediately and do not - // consider any resize-calls that might possibly be in order. - // - The return value indicates whether the table has been changed. - sal_Bool Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False, sal_Bool bForce=sal_False, - sal_uLong nDelay=0 ); - - void BordersChanged( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False ); - - // Calculate available width. This works only if a layout or a - // ViewShell exists. Otherwise returns 0. - // This is needed by HTML-filter because it doesn't have access to the layout.) - static sal_uInt16 GetBrowseWidth( const SwDoc& rDoc ); - - // Calculates available width by table-frame. - sal_uInt16 GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const; - - // Calculates available width by the table-frame or - // static GetBrowseWidth if no layout exists. - sal_uInt16 GetBrowseWidthByTable( const SwDoc& rDoc ) const; - - // For Export. - sal_uInt16 GetWidthOption() const { return nWidthOption; } - sal_Bool HasPrcWidthOption() const { return bPrcWidthOption; } - - sal_uInt16 GetCellPadding() const { return nCellPadding; } - sal_uInt16 GetCellSpacing() const { return nCellSpacing; } - sal_uInt16 GetBorder() const { return nBorder; } - - sal_uInt16 GetRowCount() const { return nRows; } - sal_uInt16 GetColCount() const { return nCols; } - - void SetExportable( sal_Bool bSet ) { bExportable = bSet; } - sal_Bool IsExportable() const { return bExportable; } - - sal_Bool HaveBordersChanged() const { return bBordersChanged; } - - void SetMayBeInFlyFrame( sal_Bool bSet ) { bMayBeInFlyFrame = bSet; } - sal_Bool MayBeInFlyFrame() const { return bMayBeInFlyFrame; } -}; - -inline void SwHTMLTableLayoutCell::SetProtected() -{ - nRowSpan = 1; - nColSpan = 1; - - pContents = 0; -} - -inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( sal_uLong nCMin, - sal_uLong nCMax, sal_uLong nAbsMin ) -{ - if( nCMin > nMinNoAlign ) - nMinNoAlign = nCMin; - if( nCMax > nMaxNoAlign ) - nMaxNoAlign = nCMax; - if( nAbsMin > nAbsMinNoAlign ) - nAbsMinNoAlign = nAbsMin; -} - -inline void SwHTMLTableLayoutColumn::ClearPass1Info( sal_Bool bWidthOpt ) -{ - nMinNoAlign = nMaxNoAlign = nAbsMinNoAlign = MINLAY; - nMin = nMax = 0; - if( bWidthOpt ) - { - nWidthOption = 0; - bRelWidthOption = sal_False; - } -} - -inline void SwHTMLTableLayoutColumn::MergeCellWidthOption( - sal_uInt16 nWidth, sal_Bool bRel ) -{ - if( !nWidthOption || - (bRel==bRelWidthOption && nWidthOption < nWidth) ) - { - nWidthOption = nWidth; - bRelWidthOption = bRel; - } -} - -inline void SwHTMLTableLayoutColumn::SetMinMax( sal_uLong nMn, sal_uLong nMx ) -{ - nMin = nMn; - nMax = nMx; -} - -inline sal_uInt16 SwHTMLTableLayout::GetInhCellSpace( sal_uInt16 nCol, - sal_uInt16 nColSpan ) const -{ - sal_uInt16 nSpace = 0; - if( nCol==0 ) - nSpace = nSpace + sal::static_int_cast< sal_uInt16 >(nInhAbsLeftSpace); - if( nCol+nColSpan==nCols ) - nSpace = nSpace + sal::static_int_cast< sal_uInt16 >(nInhAbsRightSpace); - - return nSpace; -} - -inline SwHTMLTableLayoutColumn *SwHTMLTableLayout::GetColumn( sal_uInt16 nCol ) const -{ - return aColumns[nCol]; -} - -inline void SwHTMLTableLayoutColumn::SetWidthOption( - sal_uInt16 nWidth, sal_Bool bRelWidth, sal_Bool bTest ) -{ - if( bTest && bRelWidthOption==bRelWidth ) - { - if( nWidth > nWidthOption ) - nWidthOption = nWidth; - } - else - nWidthOption = nWidth; - bRelWidthOption = bRelWidth; -} - -inline void SwHTMLTableLayout::SetColumn( SwHTMLTableLayoutColumn *pCol, sal_uInt16 nCol ) -{ - aColumns[nCol] = pCol; -} - -inline SwHTMLTableLayoutCell *SwHTMLTableLayout::GetCell( sal_uInt16 nRow, sal_uInt16 nCol ) const -{ - return aCells[nRow*nCols+nCol]; -} - -inline void SwHTMLTableLayout::SetCell( SwHTMLTableLayoutCell *pCell, - sal_uInt16 nRow, sal_uInt16 nCol ) -{ - aCells[nRow*nCols+nCol] = pCell; -} - -inline long SwHTMLTableLayout::GetBrowseWidthMin() const -{ - return (long)( (!nWidthOption || bPrcWidthOption) ? nMin : nRelTabWidth ); -} - -void SwHTMLTableLayout::SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight ) -{ - nInhLeftBorderWidth = nLeft; - nInhRightBorderWidth = nRight; -} - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/index.hrc b/sw/inc/index.hrc deleted file mode 100644 index a057c6c31c..0000000000 --- a/sw/inc/index.hrc +++ /dev/null @@ -1,66 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - ************************************************************************/ - -/* For DesignEditor -#define RC_INDEX_BEGIN 256 -*/ - -#ifndef _INDEX_HRC -#define _INDEX_HRC - -#include "rcid.hrc" - -#define DLG_FORMEDT (RC_INDEX_BEGIN + 0) -#define DLG_IDX (RC_INDEX_BEGIN + 1) -#define DLG_USRIDX (RC_INDEX_BEGIN + 2) -#define DLG_INSIDXMARK (RC_INDEX_BEGIN + 3) -#define DLG_CNTTABLE (RC_INDEX_BEGIN + 4) -#define DLG_MULTMRK (RC_INDEX_BEGIN + 5) - -#define STR_TITLE (RC_INDEX_BEGIN + 6) -#define STR_ALPHA (RC_INDEX_BEGIN + 7) -#define STR_LEVEL (RC_INDEX_BEGIN + 8) - -#define DLG_INSAUTHMARK (RC_INDEX_BEGIN + 9) -#define DLG_CREATE_AUTH_ENTRY (RC_INDEX_BEGIN + 10) -#define DLG_EDIT_IDXMARK (RC_INDEX_BEGIN + 11) -#define DLG_EDIT_AUTHMARK (RC_INDEX_BEGIN + 12) - -#define STR_IDXMRK_INSERT (RC_INDEX_BEGIN + 13) -#define STR_IDXMRK_EDIT (RC_INDEX_BEGIN + 14) -#define STR_AUTHMRK_EDIT (RC_INDEX_BEGIN + 15) -#define STR_AUTHMRK_INSERT (RC_INDEX_BEGIN + 16) - -#define DLG_NEW_USER_IDX (RC_INDEX_BEGIN + 17) - -#define STR_FILE_NOT_FOUND (RC_INDEX_BEGIN + 18) -#define DLG_CHANGE_AUTH_ENTRY (RC_INDEX_BEGIN + 19) -#define DLG_CREATE_AUTOMARK (RC_INDEX_BEGIN + 20) - -#define DLG_EDIT_IDXMARK_CJK (RC_INDEX_BEGIN + 21) -#define DLG_INSIDXMARK_CJK (RC_INDEX_BEGIN + 22) -#endif // _INDEX_HRC diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx deleted file mode 100644 index d93d73799d..0000000000 --- a/sw/inc/index.hxx +++ /dev/null @@ -1,212 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _INDEX_HXX -#define _INDEX_HXX - -#include <limits.h> -#include <tools/solar.h> -#include <tools/rtti.hxx> // for RTTI of SwIndexReg -#include <tools/string.hxx> // for xub_StrLen -#include <swdllapi.h> - -#define INVALID_INDEX STRING_NOTFOUND - -// Maximal count of indices in IndexArray (for testing on overflows). -class SwIndex; -class SwIndexReg; -struct SwPosition; - -#if OSL_DEBUG_LEVEL > 1 -#define INLINE -#else -#define INLINE inline -#endif - -class SW_DLLPUBLIC SwIndex -{ - friend class SwIndexReg; - -#if OSL_DEBUG_LEVEL > 1 - static int nSerial; - int MySerial; -#endif - - xub_StrLen nIndex; - SwIndexReg* pArray; - SwIndex *pNext, *pPrev; - - SwIndex& ChgValue( const SwIndex& rIdx, xub_StrLen nNewValue ); - void Remove(); - -public: - explicit SwIndex(SwIndexReg *const pReg, xub_StrLen const nIdx = 0); - SwIndex( const SwIndex & ); - SwIndex( const SwIndex &, short nDiff ); - ~SwIndex() { Remove(); } - - INLINE xub_StrLen operator++(); - INLINE xub_StrLen operator--(); - INLINE xub_StrLen operator++(int); - INLINE xub_StrLen operator--(int); - - INLINE xub_StrLen operator+=( xub_StrLen ); - INLINE xub_StrLen operator-=( xub_StrLen ); - INLINE xub_StrLen operator+=( const SwIndex& ); - INLINE xub_StrLen operator-=( const SwIndex& ); - - INLINE sal_Bool operator<( const SwIndex& ) const; - INLINE sal_Bool operator<=( const SwIndex& ) const; - INLINE sal_Bool operator>( const SwIndex& ) const; - INLINE sal_Bool operator>=( const SwIndex& ) const; - sal_Bool operator==( const SwIndex& rSwIndex ) const - { return (nIndex == rSwIndex.nIndex) && (pArray == rSwIndex.pArray); } - - sal_Bool operator!=( const SwIndex& rSwIndex ) const - { return (nIndex != rSwIndex.nIndex) || (pArray != rSwIndex.pArray); } - - sal_Bool operator<( xub_StrLen nWert ) const { return nIndex < nWert; } - sal_Bool operator<=( xub_StrLen nWert ) const { return nIndex <= nWert; } - sal_Bool operator>( xub_StrLen nWert ) const { return nIndex > nWert; } - sal_Bool operator>=( xub_StrLen nWert ) const { return nIndex >= nWert; } - sal_Bool operator==( xub_StrLen nWert ) const { return nIndex == nWert; } - sal_Bool operator!=( xub_StrLen nWert ) const { return nIndex != nWert; } - - INLINE SwIndex& operator=( xub_StrLen ); - SwIndex& operator=( const SwIndex & ); - - xub_StrLen GetIndex() const { return nIndex; } - - // Assignments without creating a temporary object. - SwIndex &Assign(SwIndexReg *,xub_StrLen); - - // Returns pointer to IndexArray (for RTTI at SwIndexReg). - const SwIndexReg* GetIdxReg() const { return pArray; } -}; - -#undef INLINE - -class SwIndexReg -{ - friend class SwIndex; - friend bool lcl_PosOk(const SwPosition & aPos); - - const SwIndex *pFirst, *pLast, *pMiddle; - - // A global array for holding indices that need to be "swapped" temporarily - // or do not know a valid array (SwPaM/SwPosition!). - friend void _InitCore(); - friend void _FinitCore(); - static SwIndexReg* pEmptyIndexArray; - -protected: - virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen, - const bool bNegative = false, const bool bDelete = false ); - - void ChkArr(); - - sal_Bool HasAnyIndex() const { return 0 != pFirst; } - -public: - SwIndexReg(); - virtual ~SwIndexReg(); - - // rtti, abgeleitete moegens gleichtun oder nicht. Wenn sie es gleichtun - // kann ueber das SwIndexReg typsicher gecastet werden. - TYPEINFO(); - - void MoveTo( SwIndexReg& rArr ); -}; - -#if !defined(OSL_DEBUG_LEVEL) || OSL_DEBUG_LEVEL < 2 - -inline xub_StrLen SwIndex::operator++() -{ - return ChgValue( *this, nIndex+1 ).nIndex; -} -inline xub_StrLen SwIndex::operator--() -{ - return ChgValue( *this, nIndex-1 ).nIndex; -} -inline xub_StrLen SwIndex::operator++(int) -{ - xub_StrLen nOldIndex = nIndex; - ChgValue( *this, nIndex+1 ); - return nOldIndex; -} -inline xub_StrLen SwIndex::operator--(int) -{ - xub_StrLen nOldIndex = nIndex; - ChgValue( *this, nIndex-1 ); - return nOldIndex; -} - -inline xub_StrLen SwIndex::operator+=( xub_StrLen nWert ) -{ - return ChgValue( *this, nIndex + nWert ).nIndex; -} -inline xub_StrLen SwIndex::operator-=( xub_StrLen nWert ) -{ - return ChgValue( *this, nIndex - nWert ).nIndex; -} -inline xub_StrLen SwIndex::operator+=( const SwIndex& rIndex ) -{ - return ChgValue( *this, nIndex + rIndex.nIndex ).nIndex; -} -inline xub_StrLen SwIndex::operator-=( const SwIndex& rIndex ) -{ - return ChgValue( *this, nIndex - rIndex.nIndex ).nIndex; -} - -inline sal_Bool SwIndex::operator<( const SwIndex& rIndex ) const -{ - return nIndex < rIndex.nIndex; -} -inline sal_Bool SwIndex::operator<=( const SwIndex& rIndex ) const -{ - return nIndex <= rIndex.nIndex; -} -inline sal_Bool SwIndex::operator>( const SwIndex& rIndex ) const -{ - return nIndex > rIndex.nIndex; -} -inline sal_Bool SwIndex::operator>=( const SwIndex& rIndex ) const -{ - return nIndex >= rIndex.nIndex; -} -inline SwIndex& SwIndex::operator=( xub_StrLen nWert ) -{ - if( nIndex != nWert ) - ChgValue( *this, nWert ); - return *this; -} - -#endif // PRODUCT - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/inetfld.hxx b/sw/inc/inetfld.hxx deleted file mode 100644 index 67f2c0bc85..0000000000 --- a/sw/inc/inetfld.hxx +++ /dev/null @@ -1,108 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_INETFLD_HXX -#define SW_INETFLD_HXX - - -#include "fldbas.hxx" - -class SvxMacro; -class SvxMacroTableDtor; -class SwINetField; -class SwCharFmt; -class SwDoc; - -// InterNet-FieldType -> Load document with URL - -class SwINetFieldType : public SwFieldType -{ - SwDepend aNormalFmt; - SwDepend aVisitFmt; - SwDoc* pDoc; - -public: - SwINetFieldType( SwDoc* pDoc ); - - virtual SwFieldType* Copy() const; - - SwCharFmt* GetCharFmt( const SwINetField& rFld ); - - SwDoc* GetDoc() const { return pDoc; } -}; - - -// InterNet-Field -> Load document with URL - -class SwINetField : public SwField -{ - friend class SwINetFieldType; - - String sTargetFrameName; // Frame to put the URL. - String sURL; - String sText; - SvxMacroTableDtor* pMacroTbl; - - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - // Direct input, delete old value. - SwINetField( SwINetFieldType* pTyp, sal_uInt16 nFmt, - const String& rURL, const String& rText ); - virtual ~SwINetField(); - - virtual String GetFieldName() const; - - // URL - virtual const String& GetPar1() const; - virtual void SetPar1(const String& rStr); - - // Information text. - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - - // Current character format. - SwCharFmt* GetCharFmt(); - const SwCharFmt* GetCharFmt() const - { return ((SwINetField*)this)->GetCharFmt(); } - - const String& GetTargetFrameName() const { return sTargetFrameName; } - void SetTargetFrameName( const String& rNm ) { sTargetFrameName = rNm; } - - // Set new or delete old MacroTable. - void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 ); - const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; } - - void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro ); - const SvxMacro* GetMacro( sal_uInt16 nEvent ) const; -}; - - -#endif // SW_INETFLD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/init.hxx b/sw/inc/init.hxx deleted file mode 100644 index f268b01366..0000000000 --- a/sw/inc/init.hxx +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _INIT_HXX -#define _INIT_HXX - -class ViewShell; - -void _InitCore(); // bastyp/init.cxx -void _FinitCore(); - -void _InitFilter(); // basflt/fltini.cxx -void _FinitFilter(); - -// layout/newfrm.cxx -void _FrmInit(); -void _FrmFinit(); -void SetShell( ViewShell *pSh ); - -// text/txtfrm.cxx -void _TextInit(); -void _TextFinit(); - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/io.hxx b/sw/inc/io.hxx deleted file mode 100644 index fb82acf6f9..0000000000 --- a/sw/inc/io.hxx +++ /dev/null @@ -1,158 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - ************************************************************************/ - -// Special class for IO. Used for system-independent representation -// (change of byte-order, conversion of characters) -// Writes in binary format for efficiency. -#ifndef _IO_HXX -#define _IO_HXX - -#ifdef UNX -#include <unistd.h> -#else -#include <io.h> -#endif - -#include <fcntl.h> - -#include <sys/types.h> -#include <sys/stat.h> - - -#include <vcl/keycod.hxx> -#include <tools/stream.hxx> - - -class SwIOin { -private: - SvFileStream aStr; //$ ifstream -public: - // Stream is created in respective mode. - SwIOin(const String &rFilename, StreamMode nMode = - STREAM_READ | STREAM_NOCREATE ); - - SwIOin& operator>>(char& val); - SwIOin& operator>>(unsigned char& val); - SwIOin& operator>>(char* val); - SwIOin& operator>>(unsigned char* val); - SwIOin& operator>>(short& val); - SwIOin& operator>>(unsigned short& val); - SwIOin& operator>>(long& val); - SwIOin& operator>>(unsigned long& val); - String ReadString(); - KeyCode ReadKeyCode(); - // Can be extended for more arrays of base types. - // nLen is count of elements. - SwIOin& Read(char *buf, unsigned nLen); - - int operator!() { return aStr.GetError() != SVSTREAM_OK; } - SvFileStream &operator()() { - return aStr; - } -}; - -class SwIOout { -private: - void _write(const char *buf, unsigned size); - SvFileStream aStr; //$ ofstream -public: - // Stream is created in respective mode. - SwIOout( const String &rFilename, StreamMode nMode = - STREAM_WRITE | STREAM_NOCREATE ); - SwIOout& operator<<(char val); - SwIOout& operator<<(unsigned char val); - SwIOout& operator<<(char* val); - SwIOout& operator<<(unsigned char* val); - SwIOout& operator<<(short val); - SwIOout& operator<<(unsigned short val); - SwIOout& operator<<(long val); - SwIOout& operator<<(unsigned long val); - SwIOout& operator<<(const String &); - SwIOout& operator<<(const KeyCode &); - // Can be extended for more arrays of base types. - // nLen is count of elements. - SwIOout& Write(const char *buf, unsigned nLen); - - int operator!() { return aStr.GetError() != SVSTREAM_OK; } - SvFileStream &operator()() { - return aStr; - } -}; - - -class SwIOinout { -private: - SvFileStream aStr; //$ fstream - -public: - // Stream is created in respective mode. - SwIOinout(const String &rFilename, StreamMode nMode = - STREAM_READWRITE | STREAM_NOCREATE ); - - SwIOinout& operator>>(char& val); - SwIOinout& operator>>(unsigned char& val); - SwIOinout& operator>>(char* val); - SwIOinout& operator>>(unsigned char* val); - SwIOinout& operator>>(short& val); - SwIOinout& operator>>(unsigned short& val); - SwIOinout& operator>>(long& val); - SwIOinout& operator>>(unsigned long& val); - String ReadString(); - KeyCode ReadKeyCode(); - // Can be extended for more arrays of base types. - // nLen is count of elements. - SwIOinout& Read(char *buf, unsigned nLen); - SwIOinout& Read(unsigned short *buf, unsigned nLen ); - - SwIOinout& operator<<(char val); - SwIOinout& operator<<(unsigned char val); - SwIOinout& operator<<(char* val); - SwIOinout& operator<<(unsigned char* val); - SwIOinout& operator<<(short val); - SwIOinout& operator<<(unsigned short val); - SwIOinout& operator<<(long val); - SwIOinout& operator<<(unsigned long val); - SwIOinout& operator<<(const String &); - SwIOinout& operator<<(const KeyCode &); - // Can be extended for more arrays of base types. - // nLen is count of elements. - SwIOinout& Write(const char *buf, unsigned nLen); - - int operator!() { return aStr.GetError() != SVSTREAM_OK; } - SvFileStream &operator()() { - return aStr; - } - - sal_Bool Ok(); -}; - - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx deleted file mode 100644 index 7ac99aea44..0000000000 --- a/sw/inc/iodetect.hxx +++ /dev/null @@ -1,132 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _IODETECT_HXX_ -#define _IODETECT_HXX_ - -#include <sfx2/docfilt.hxx> -#include <sfx2/docfile.hxx> -#include <sfx2/fcontnr.hxx> -#include <osl/endian.h> -#include <tools/string.hxx> -#include <swddllapi.h> - -#define FILTER_RTF "RTF" // RTF filter -#define sRtfWH "WH_RTF" -#define FILTER_TEXT "TEXT" // text filter with default codeset -#define FILTER_BAS "BAS" // StarBasic (identical to ANSI) -#define FILTER_WW8 "CWW8" // WinWord 97 filter -#define FILTER_TEXT_DLG "TEXT_DLG" // text filter with encoding dialog -#define FILTER_XML "CXML" // XML filter -#define FILTER_XMLV "CXMLV" // XML filter -#define FILTER_XMLVW "CXMLVWEB" // XML filter -#define sHTML "HTML" -#define sWW1 "WW1" -#define sWW5 "WW6" -#define sWW6 "CWW6" - -#define sSWRITER "swriter" -#define sSWRITERWEB "swriter/web" - -struct SwIoDetect -{ - const sal_Char* pName; - sal_uInt16 nLen; - - inline SwIoDetect( const sal_Char *pN, sal_uInt16 nL ) - : pName( pN ), nLen( nL ) - {} - - inline int IsFilter( const String& rNm ) const - { - return pName && rNm.EqualsAscii( pName, 0, nLen ); - } - - const sal_Char* IsReader( const sal_Char* pHeader, sal_uLong nLen_, - const String &rFileName, const String& rUserData ) const; -}; - -enum ReaderWriterEnum { - READER_WRITER_RTF, - READER_WRITER_BAS, - READER_WRITER_WW6, - READER_WRITER_WW8, - READER_WRITER_RTF_WH, - READER_WRITER_HTML, - READER_WRITER_WW1, - READER_WRITER_WW5, - READER_WRITER_XML, - READER_WRITER_TEXT_DLG, - READER_WRITER_TEXT, - MAXFILTER -}; - -extern SWD_DLLPUBLIC SwIoDetect aFilterDetect[]; - -// The following class is a wrapper for basic i/o functions of Writer 3.0. -// Everything is static. All filter names mentioned are Writer-internal -// names, i.e. the names in front of the equality sign in INSTALL.INI, like SWG -// or ASCII. - -class SwIoSystem -{ -public: - // find for an internal format name the corresponding filter entry - SWD_DLLPUBLIC static const SfxFilter* - GetFilterOfFormat( const String& rFormat, - const SfxFilterContainer* pCnt = 0 ); - - // Detect for the given file which filter should be used. The filter name - // is returned. If no filter could be found, the name of the ASCII filter - // is returned! - SWD_DLLPUBLIC static const SfxFilter* - GetFileFilter( const String& rFileName, - const String& rPrefFltName, - SfxMedium* pMedium = 0 ); - - // Detect whether the given file is in the given format. - // For now, only our own filters are supported! - static sal_Bool IsFileFilter( SfxMedium& rMedium, const String& rFmtName, - const SfxFilter** ppFlt = 0 ); - - static sal_Bool IsValidStgFilter( SotStorage& , const SfxFilter& ); - static sal_Bool IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter); - - SWD_DLLPUBLIC static bool - IsDetectableText( const sal_Char* pBuf, sal_uLong &rLen, - CharSet *pCharSet=0, bool *pSwap=0, LineEnd *pLineEnd=0, bool bEncodedFilter = false ); - - static const SfxFilter* GetTextFilter( const sal_Char* pBuf, sal_uLong nLen ); - - SWD_DLLPUBLIC static const String - GetSubStorageName( const SfxFilter& rFltr ); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/istyleaccess.hxx b/sw/inc/istyleaccess.hxx deleted file mode 100644 index 24a049bf53..0000000000 --- a/sw/inc/istyleaccess.hxx +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _ISTYLEACCESS_HXX -#define _ISTYLEACCESS_HXX - -#include <vector> -#include <svl/stylepool.hxx> - -/*-------------------------------------------------------------------- - Management of (automatic) styles - --------------------------------------------------------------------*/ - -class SwStyleHandle; - -class IStyleAccess -{ -public: - - enum SwAutoStyleFamily - { - AUTO_STYLE_CHAR, - AUTO_STYLE_RUBY, - AUTO_STYLE_PARA, - AUTO_STYLE_NOTXT - }; - - virtual ~IStyleAccess() {} - - virtual StylePool::SfxItemSet_Pointer_t getAutomaticStyle( const SfxItemSet& rSet, - SwAutoStyleFamily eFamily ) = 0; - virtual void getAllStyles( std::vector<StylePool::SfxItemSet_Pointer_t> &rStyles, - SwAutoStyleFamily eFamily ) = 0; - // It's slow to iterate through a stylepool looking for a special name, but if - // the style has been inserted via "cacheAutomaticStyle" instead of "getAutomaticStyle", - // it's faster - virtual StylePool::SfxItemSet_Pointer_t getByName( const rtl::OUString& rName, - SwAutoStyleFamily eFamily ) = 0; - // insert the style to the pool and the cache (used during import) - virtual StylePool::SfxItemSet_Pointer_t cacheAutomaticStyle( const SfxItemSet& rSet, - SwAutoStyleFamily eFamily ) = 0; - // To release the cached styles (shared_pointer!) - virtual void clearCaches() = 0; -}; - -#endif // _ISTYLEACCESS_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/itabenum.hxx b/sw/inc/itabenum.hxx deleted file mode 100644 index 9b5ce3effe..0000000000 --- a/sw/inc/itabenum.hxx +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _ITABENUM_HXX -#define _ITABENUM_HXX - -#include <tools/solar.h> - -namespace tabopts -{ - const sal_uInt16 DEFAULT_BORDER = 0x01; - const sal_uInt16 HEADLINE = 0x02; - const sal_uInt16 SPLIT_LAYOUT = 0x08; - const sal_uInt16 HEADLINE_NO_BORDER = HEADLINE | SPLIT_LAYOUT; - const sal_uInt16 ALL_TBL_INS_ATTR = DEFAULT_BORDER | HEADLINE | SPLIT_LAYOUT; -} - -struct SwInsertTableOptions -{ - sal_uInt16 mnInsMode; - sal_uInt16 mnRowsToRepeat; - - SwInsertTableOptions( sal_uInt16 nInsMode, sal_uInt16 nRowsToRepeat ) : - mnInsMode( nInsMode ), mnRowsToRepeat( nRowsToRepeat ) {}; -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx deleted file mode 100644 index 71ecc41747..0000000000 --- a/sw/inc/lineinfo.hxx +++ /dev/null @@ -1,110 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_LINEINFO_HXX -#define SW_LINEINFO_HXX - -#include "calbck.hxx" -#include <editeng/numitem.hxx> -#include "swdllapi.h" - -class SwCharFmt; -class IDocumentStylePoolAccess; - -enum LineNumberPosition -{ - LINENUMBER_POS_LEFT, - LINENUMBER_POS_RIGHT, - LINENUMBER_POS_INSIDE, - LINENUMBER_POS_OUTSIDE -}; - -class SW_DLLPUBLIC SwLineNumberInfo : public SwClient //purpose of derivation from SwClient: - //character style for displaying the numbers. -{ - SvxNumberType aType; //e.g. roman linenumbers - String aDivider; //String for aditional interval (vert. lines user defined) - sal_uInt16 nPosFromLeft; //Position for paint - sal_uInt16 nCountBy; //Paint only for every n line - sal_uInt16 nDividerCountBy; //Interval for display of an user defined - //string every n lines - LineNumberPosition ePos; //Where should the display occur (number and divicer) - sal_Bool bPaintLineNumbers; //Should anything be displayed? - sal_Bool bCountBlankLines; //Count empty lines? - sal_Bool bCountInFlys; //Count also within FlyFrames? - sal_Bool bRestartEachPage; //Restart counting at the first paragraph of each page - //(even on follows when paragraphs are splitted) -protected: - virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ); - -public: - SwLineNumberInfo(); - SwLineNumberInfo(const SwLineNumberInfo&); - - SwLineNumberInfo& operator=(const SwLineNumberInfo&); - sal_Bool operator==( const SwLineNumberInfo& rInf ) const; - - SwCharFmt *GetCharFmt( IDocumentStylePoolAccess& rIDSPA ) const; - void SetCharFmt( SwCharFmt* ); - - const SvxNumberType &GetNumType() const { return aType; } - void SetNumType( SvxNumberType aNew ){ aType = aNew; } - - const String &GetDivider() const { return aDivider; } - void SetDivider( const String &r ) { aDivider = r; } - sal_uInt16 GetDividerCountBy() const { return nDividerCountBy; } - void SetDividerCountBy( sal_uInt16 n ) { nDividerCountBy = n; } - - sal_uInt16 GetPosFromLeft() const { return nPosFromLeft; } - void SetPosFromLeft( sal_uInt16 n) { nPosFromLeft = n; } - - sal_uInt16 GetCountBy() const { return nCountBy; } - void SetCountBy( sal_uInt16 n) { nCountBy = n; } - - LineNumberPosition GetPos() const { return ePos; } - void SetPos( LineNumberPosition eP ){ ePos = eP; } - - sal_Bool IsPaintLineNumbers() const { return bPaintLineNumbers; } - void SetPaintLineNumbers( sal_Bool b ){ bPaintLineNumbers = b; } - - sal_Bool IsCountBlankLines() const { return bCountBlankLines; } - void SetCountBlankLines( sal_Bool b ) { bCountBlankLines = b; } - - sal_Bool IsCountInFlys() const { return bCountInFlys; } - void SetCountInFlys( sal_Bool b ) { bCountInFlys = b; } - - sal_Bool IsRestartEachPage() const { return bRestartEachPage; } - void SetRestartEachPage( sal_Bool b ) { bRestartEachPage = b; } - - bool HasCharFormat() const { return GetRegisteredIn() != 0; } -}; - - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/linkenum.hxx b/sw/inc/linkenum.hxx deleted file mode 100644 index 0c196ec26d..0000000000 --- a/sw/inc/linkenum.hxx +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _LINKENUM_HXX -#define _LINKENUM_HXX - -enum UpdateLinks -{ - NEVER, - MANUAL, - AUTOMATIC, - GLOBALSETTING -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx deleted file mode 100644 index ba87f02cc3..0000000000 --- a/sw/inc/list.hxx +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 LIST_HXX_INCLUDED -#define LIST_HXX_INCLUDED - -#include <tools/string.hxx> - -class SwNumRule; -class SwNodes; -class SwNodeNum; - -class SwListImpl; - -class SwList -{ - public: - SwList( const String sListId, - SwNumRule& rDefaultListStyle, - const SwNodes& rNodes ); - ~SwList(); - - const String GetListId() const; - - const String GetDefaultListStyleName() const; - - void InsertListItem( SwNodeNum& rNodeNum, - const int nLevel ); - void RemoveListItem( SwNodeNum& rNodeNum ); - - void InvalidateListTree(); - void ValidateListTree(); - - void MarkListLevel( const int nListLevel, - const sal_Bool bValue ); - - bool IsListLevelMarked( const int nListLevel ) const; - - private: - // no copy constructor and no assignment operator - SwList( const SwList& ); - SwList& operator=( const SwList& ); - - SwListImpl* mpListImpl; -}; -#endif // LIST_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/listfunc.hxx b/sw/inc/listfunc.hxx deleted file mode 100644 index 50678d9345..0000000000 --- a/sw/inc/listfunc.hxx +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 LISTFUNC_HXX_INCLUDED -#define LISTFUNC_HXX_INCLUDED - -class SwDoc; - -namespace listfunc -{ - const String CreateUniqueListId( const SwDoc& rDoc ); -} - -#endif // LISTFUNC_HXX_INCLUDED - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx deleted file mode 100644 index 63d2f0d86d..0000000000 --- a/sw/inc/mdiexp.hxx +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _MDIEXP_HXX -#define _MDIEXP_HXX - -#include <tools/solar.h> -#include <tblenum.hxx> -#include <layout/layout.hxx> -#include <swdllapi.h> - -class UniString; -class SwRect; -class Size; -class Dialog; -class ViewShell; -class SwDoc; -class SwDocShell; - -extern void ScrollMDI(ViewShell* pVwSh, const SwRect &, sal_uInt16 nRangeX, sal_uInt16 nRangeY); -extern sal_Bool IsScrollMDI(ViewShell* pVwSh, const SwRect &); -extern void SizeNotify(ViewShell* pVwSh, const Size &); - -// Update of status bar during an action. -extern void PageNumNotify( ViewShell* pVwSh, - sal_uInt16 nPhyNum, - sal_uInt16 nVirtNum, - const UniString& rPg ); - -enum FlyMode { FLY_DRAG_START, FLY_DRAG, FLY_DRAG_END }; -extern void FrameNotify( ViewShell* pVwSh, FlyMode eMode = FLY_DRAG ); - -SW_DLLPUBLIC void StartProgress ( sal_uInt16 nMessId, long nStartVal, long nEndVal, SwDocShell *pDocSh = 0 ); -SW_DLLPUBLIC void EndProgress ( SwDocShell *pDocSh = 0 ); -SW_DLLPUBLIC void SetProgressState ( long nPosition, SwDocShell *pDocShell ); -void SetProgressText ( sal_uInt16 nMessId, SwDocShell *pDocShell ); -void RescheduleProgress( SwDocShell *pDocShell ); - -void EnableCmdInterface(sal_Bool bEnable = sal_True); - -LAYOUT_NS Dialog* GetSearchDialog(); - -void RepaintPagePreview( ViewShell* pVwSh, const SwRect& rRect ); - -// ndgrf.cxx -// Delete all QuickDraw-bitmaps of the specific Document. -void DelAllGrfCacheEntries( SwDoc* pDoc ); - -// Read ChgMode for tables from configuration. -TblChgMode GetTblChgDefaultMode(); - -sal_Bool JumpToSwMark( ViewShell* pVwSh, const UniString& rMark ); - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx deleted file mode 100644 index c8a5e3540e..0000000000 --- a/sw/inc/modcfg.hxx +++ /dev/null @@ -1,329 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _MODOPT_HXX -#define _MODOPT_HXX - -#include <tools/string.hxx> -#include <tools/wintypes.hxx> -#include <vcl/field.hxx> -#include <svl/svarray.hxx> -#include <unotools/configitem.hxx> -#include "swdllapi.h" -#include "authratr.hxx" -#include <SwCapObjType.hxx> -#include "tblenum.hxx" -#include "itabenum.hxx" -#include <tools/globname.hxx> -class SwModuleOptions; - -class InsCaptionOpt; -typedef InsCaptionOpt* InsCaptionOptPtr; -SV_DECL_PTRARR_SORT_DEL(InsCapOptArr, InsCaptionOptPtr, 0, 5) - -class InsCaptionOptArr : public InsCapOptArr -{ - friend class SwModuleOptions; - friend class SwInsertConfig; -protected: - InsCaptionOpt* Find(const SwCapObjType eType, const SvGlobalName *pOleId = 0) const; -}; - -class SwRevisionConfig : public utl::ConfigItem -{ - friend class SwModuleOptions; - - AuthorCharAttr aInsertAttr; //Revision/TextDisplay/Insert/Attribute // Redlining: Author-Zeichenattribute - //Revision/TextDisplay/Insert/Color - AuthorCharAttr aDeletedAttr; //Revision/TextDisplay/Delete/Attribute - //Revision/TextDisplay/Delete/Color - AuthorCharAttr aFormatAttr; //Revision/TextDisplay/ChangeAttribute/Attribute - //Revision/TextDisplay/ChangeAttribute/Color - sal_uInt16 nMarkAlign; //Revision/LinesChanged/Mark - Color aMarkColor; //Revision/LinesChanged/Color - - const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames(); - public: - SwRevisionConfig(); - ~SwRevisionConfig(); - - virtual void Commit(); - virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); - void Load(); - void SetModified(){ConfigItem::SetModified();} -}; - -class SwInsertConfig : public utl::ConfigItem -{ - friend class SwModuleOptions; - - InsCaptionOptArr* pCapOptions; - InsCaptionOpt* pOLEMiscOpt; - - SvGlobalName aGlobalNames[5]; - - sal_Bool bInsWithCaption; //Insert/Caption/Automatic - sal_Bool bCaptionOrderNumberingFirst; //#i61007# caption order starting with numbering - - SwInsertTableOptions aInsTblOpts; - sal_Bool bIsWeb; - - const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames(); - public: - SwInsertConfig(sal_Bool bWeb); - ~SwInsertConfig(); - - virtual void Commit(); - virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); - void Load(); - void SetModified(){ConfigItem::SetModified();} -}; - -class SwTableConfig : public utl::ConfigItem -{ - friend class SwModuleOptions; - - sal_uInt16 nTblHMove; //int Table/Shift/Row - sal_uInt16 nTblVMove; //int Table/Shift/Column - sal_uInt16 nTblHInsert; //int Table/Insert/Row - sal_uInt16 nTblVInsert; //int Table/Insert/Column - TblChgMode eTblChgMode; //int Table/Change/Effect - - sal_Bool bInsTblFormatNum; // Table/Input/NumberRecognition // Automatic recognition of numbers. - sal_Bool bInsTblChangeNumFormat; // Table/Input/NumberFormatRecognition // Automatic recognition of number formats. - sal_Bool bInsTblAlignNum; // Table/Input/Alignment // Align numbers. - - const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames(); - public: - SwTableConfig(sal_Bool bWeb); - ~SwTableConfig(); - - virtual void Commit(); - virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); - void Load(); - void SetModified(){ConfigItem::SetModified();} -}; - -class SwMiscConfig : public utl::ConfigItem -{ - friend class SwModuleOptions; - - String sWordDelimiter; // Statistics/WordNumber/Delimiter - sal_Bool bDefaultFontsInCurrDocOnly; // DefaultFont/Document - sal_Bool bShowIndexPreview ; // Index/ShowPreview - sal_Bool bGrfToGalleryAsLnk; // Misc/GraphicToGalleryAsLink - sal_Bool bNumAlignSize; // Numbering/Graphic/KeepRatio - sal_Bool bSinglePrintJob; // FormLetter/PrintOutput/SinglePrintJobs - sal_Bool bIsNameFromColumn; // FormLetter/FileOutput/FileName/Generation - sal_Bool bAskForMailMergeInPrint; // Ask if documents containing fields should be 'mailmerged' - sal_Int16 nMailingFormats; // FormLetter/MailingOutput/Formats - String sNameFromColumn; // FormLetter/FileOutput/FileName/FromDatabaseField (string!) - String sMailingPath; // FormLetter/FileOutput/Path - String sMailName; // FormLetter/FileOutput/FileName/FromManualSetting (string!) - - const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames(); - public: - SwMiscConfig(); - ~SwMiscConfig(); - - virtual void Commit(); - virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); - void Load(); - void SetModified(){ConfigItem::SetModified();} -}; - -class SW_DLLPUBLIC SwModuleOptions -{ - SwRevisionConfig aRevisionConfig; - SwInsertConfig aInsertConfig; - SwInsertConfig aWebInsertConfig; - - SwTableConfig aTableConfig; - SwTableConfig aWebTableConfig; - - SwMiscConfig aMiscConfig; - - //fiscus: don't show tips of text fields - it's not part of the configuration! - sal_Bool bHideFieldTips : 1; - -public: - SwModuleOptions(); - - TblChgMode GetTblMode() const { return aTableConfig.eTblChgMode;} - void SetTblMode( TblChgMode eSet ) { aTableConfig.eTblChgMode = eSet; - aTableConfig.SetModified();} - - sal_uInt16 GetTblHMove() const { return aTableConfig.nTblHMove;} - void SetTblHMove( sal_uInt16 nSet ) { aTableConfig.nTblHMove = nSet; - aTableConfig.SetModified();} - - sal_uInt16 GetTblVMove() const { return aTableConfig.nTblVMove;} - void SetTblVMove( sal_uInt16 nSet ) { aTableConfig.nTblVMove = nSet; - aTableConfig.SetModified();} - - sal_uInt16 GetTblHInsert() const {return aTableConfig.nTblHInsert;} - void SetTblHInsert( sal_uInt16 nSet ) { aTableConfig.nTblHInsert = nSet; - aTableConfig.SetModified();} - - sal_uInt16 GetTblVInsert() const {return aTableConfig.nTblVInsert;} - void SetTblVInsert( sal_uInt16 nSet ) { aTableConfig.nTblVInsert = nSet; - aTableConfig.SetModified();} - - const AuthorCharAttr &GetInsertAuthorAttr() const { return aRevisionConfig.aInsertAttr; } - void SetInsertAuthorAttr( AuthorCharAttr &rAttr ) { aRevisionConfig.aInsertAttr = rAttr; - aRevisionConfig.SetModified();} - - const AuthorCharAttr &GetDeletedAuthorAttr() const { return aRevisionConfig.aDeletedAttr; } - void SetDeletedAuthorAttr( AuthorCharAttr &rAttr ) { aRevisionConfig.aDeletedAttr = rAttr; - aRevisionConfig.SetModified();} - - const AuthorCharAttr &GetFormatAuthorAttr() const { return aRevisionConfig.aFormatAttr; } - void SetFormatAuthorAttr( AuthorCharAttr &rAttr ) { aRevisionConfig.aFormatAttr = rAttr; - aRevisionConfig.SetModified();} - - sal_uInt16 GetMarkAlignMode() const { return aRevisionConfig.nMarkAlign; } - void SetMarkAlignMode(sal_uInt16 nMode) { aRevisionConfig.nMarkAlign = nMode; - aRevisionConfig.SetModified();} - - const Color& GetMarkAlignColor() const { return aRevisionConfig.aMarkColor; } - void SetMarkAlignColor(const Color &rColor) { aRevisionConfig.aMarkColor = rColor; - aRevisionConfig.SetModified();} - - sal_Bool IsInsWithCaption(sal_Bool bHTML) const - { return bHTML ? sal_False : aInsertConfig.bInsWithCaption; } - void SetInsWithCaption( sal_Bool bHTML, sal_Bool b ) - { if(!bHTML) - aInsertConfig.bInsWithCaption = b; - aInsertConfig.SetModified();} - - sal_Bool IsCaptionOrderNumberingFirst() const { return aInsertConfig.bCaptionOrderNumberingFirst; } - void SetCaptionOrderNumberingFirst( sal_Bool bSet ) - { - if(aInsertConfig.bCaptionOrderNumberingFirst != bSet) - { - aInsertConfig.bCaptionOrderNumberingFirst = bSet; - aInsertConfig.SetModified(); - } - } - - sal_Bool IsInsTblFormatNum(sal_Bool bHTML) const - { return bHTML ? aWebTableConfig.bInsTblFormatNum : aTableConfig.bInsTblFormatNum; } - void SetInsTblFormatNum( sal_Bool bHTML, sal_Bool b ) - { bHTML ? (aWebTableConfig.bInsTblFormatNum = b) : (aTableConfig.bInsTblFormatNum = b); - bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();} - - sal_Bool IsInsTblChangeNumFormat(sal_Bool bHTML) const - { return bHTML ? aWebTableConfig.bInsTblChangeNumFormat : aTableConfig.bInsTblChangeNumFormat; } - void SetInsTblChangeNumFormat( sal_Bool bHTML, sal_Bool b ) - { bHTML ? (aWebTableConfig.bInsTblChangeNumFormat = b) : (aTableConfig.bInsTblChangeNumFormat = b); - bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();} - - - sal_Bool IsInsTblAlignNum(sal_Bool bHTML) const - { return bHTML ? aWebTableConfig.bInsTblAlignNum : aTableConfig.bInsTblAlignNum; } - void SetInsTblAlignNum( sal_Bool bHTML, sal_Bool b ) - { bHTML ? (aWebTableConfig.bInsTblAlignNum = b) : (aTableConfig.bInsTblAlignNum = b); - bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();;} - - SwInsertTableOptions GetInsTblFlags(sal_Bool bHTML) const - { return bHTML ? aWebInsertConfig.aInsTblOpts : aInsertConfig.aInsTblOpts;} - void SetInsTblFlags( sal_Bool bHTML, const SwInsertTableOptions& rOpts ) { - bHTML ? (aWebInsertConfig.aInsTblOpts = rOpts) : (aInsertConfig.aInsTblOpts = rOpts); - bHTML ? aWebInsertConfig.SetModified() : aInsertConfig.SetModified();} - - const InsCaptionOpt* GetCapOption(sal_Bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId); - sal_Bool SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt); - - - sal_Bool IsGrfToGalleryAsLnk() const { return aMiscConfig.bGrfToGalleryAsLnk; } - void SetGrfToGalleryAsLnk( sal_Bool b ) { aMiscConfig.bGrfToGalleryAsLnk = b; - aMiscConfig.SetModified();} - - sal_Int16 GetMailingFormats() const { return aMiscConfig.nMailingFormats;} - void SetMailingFormats( sal_Int16 nSet ) { aMiscConfig.nMailingFormats = nSet; - aMiscConfig.SetModified();} - - sal_Bool IsSinglePrintJob() const { return aMiscConfig.bSinglePrintJob; } - void SetSinglePrintJob( sal_Bool b ) { aMiscConfig.bSinglePrintJob = b; - aMiscConfig.SetModified();} - - sal_Bool IsNumAlignSize() const { return aMiscConfig.bNumAlignSize; } - void SetNumAlignSize( sal_Bool b ) { aMiscConfig.bNumAlignSize = b; - aMiscConfig.SetModified();} - - sal_Bool IsNameFromColumn() const { return aMiscConfig.bIsNameFromColumn; } - void SetIsNameFromColumn( sal_Bool bSet ) - { - aMiscConfig.SetModified(); - aMiscConfig.bIsNameFromColumn = bSet; - } - - sal_Bool IsAskForMailMerge() const { return aMiscConfig.bAskForMailMergeInPrint;} - void SetAskForMailMerge(sal_Bool bSet) - { - aMiscConfig.SetModified(); - aMiscConfig.bAskForMailMergeInPrint = bSet; - } - - - const String& GetNameFromColumn() const { return aMiscConfig.sNameFromColumn; } - void SetNameFromColumn( const String& rSet ) { aMiscConfig.sNameFromColumn = rSet; - aMiscConfig.SetModified();} - - String GetMailingPath() const { return aMiscConfig.sMailingPath; } - void SetMailingPath(const String& sPath) { aMiscConfig.sMailingPath = sPath; - aMiscConfig.SetModified();} - - String GetMailName() const { return aMiscConfig.sMailName; } - void SetMailName(const String& sName){ aMiscConfig.sMailName = sName; - aMiscConfig.SetModified();} - - const String &GetWordDelimiter() const { return aMiscConfig.sWordDelimiter; } - void SetWordDelimiter(const String& sDelim) { aMiscConfig.sWordDelimiter = sDelim; - aMiscConfig.SetModified();} - - //convert word delimiter from or to user interface - static String ConvertWordDelimiter(const String& rDelim, sal_Bool bFromUI); - - sal_Bool IsShowIndexPreview() const {return aMiscConfig.bShowIndexPreview;} - void SetShowIndexPreview(sal_Bool bSet) - {aMiscConfig.bShowIndexPreview = bSet; - aMiscConfig.SetModified();} - - sal_Bool IsDefaultFontInCurrDocOnly() const { return aMiscConfig.bDefaultFontsInCurrDocOnly;} - void SetDefaultFontInCurrDocOnly(sal_Bool bSet) - { - aMiscConfig.bDefaultFontsInCurrDocOnly = bSet; - aMiscConfig.SetModified(); - } - - sal_Bool IsHideFieldTips() const {return bHideFieldTips;} - void SetHideFieldTips(sal_Bool bSet) {bHideFieldTips = bSet;} -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/modeltoviewhelper.hxx b/sw/inc/modeltoviewhelper.hxx deleted file mode 100644 index 1d8bcb0649..0000000000 --- a/sw/inc/modeltoviewhelper.hxx +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _MODELTOVIEWHELPER_HXX -#define _MODELTOVIEWHELPER_HXX - -#include <sal/types.h> - -#include <vector> - -/** Some helpers for converting model strings to view strings. - - A paragraph string does not have its fields expanded, i.e., they are - represented by a special character inside the string with an additional - attribute assigned to it. For some tasks (e.g., SmartTags) it is required - to expand the fields to get the string as it appears in the view. Two - helper functions are provided to convert model positions to view positions - and vice versa. -*/ -namespace ModelToViewHelper -{ - /** For each field in the model string, there is an entry in the conversion - map. The first value of the ConversionMapEntry points to the field - position in the model string, the second value points to the associated - position in the view string. The last entry in the conversion map - denotes the lengths of the model resp. view string. - */ - typedef std::pair< sal_uInt32 , sal_uInt32 > ConversionMapEntry; - typedef std::vector< ConversionMapEntry > ConversionMap; - - /** This struct defines a position in the model string. - - The 'main' position is given by mnPos. If there's a field located at - this position, mbIsField is set and mnSubPos denotes the position inside - that field. - */ - struct ModelPosition - { - sal_uInt32 mnPos; - sal_uInt32 mnSubPos; - bool mbIsField; - - ModelPosition() : mnPos(0), mnSubPos(0), mbIsField(false) {} - }; - - /** Converts a model position into a view position - - @param pMap - pMap is the conversion map required for the calculation. If pMap is - 0, no conversion takes place, i.e., it is assumed that the model - string is identical to the view string. - - @param nPos - nPos denotes a position in the model string which should be - converted. Note that converting model positions inside fields is - not supported, therefore nPos is not of type ModelPosition. - - @return - the position of nPos in the view string. In case the conversion - could not be performed (e.g., because there is not ConversionMap or - nPos is behind the last entry in the conversion map) nPos will - be returned. - */ - sal_uInt32 ConvertToViewPosition( const ConversionMap* pMap, sal_uInt32 nModelPos ); - - /** Converts a view position into a model position - - @param pMap - pMap is the conversion map required for the calculation. If pMap is - 0, no conversion takes place, i.e., it is assumed that the model - string is identical to the view string. - - @param nPos - nPos denotes a position in the view string which should be - converted. - - @return - the position of nPos in the model string. In case the conversion - could not be performed (e.g., because there is not ConversionMap or - nPos is behind the last entry in the conversion map) a model - model position with mnPos = nPos and mnIsField = false will be - returned. - */ - ModelPosition ConvertToModelPosition( const ConversionMap* pMap, sal_uInt32 nViewPos ); -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx deleted file mode 100644 index 0629dc2697..0000000000 --- a/sw/inc/ndarr.hxx +++ /dev/null @@ -1,340 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_NDARR_HXX -#define SW_NDARR_HXX - -#include <vector> - -#include <boost/utility.hpp> - -#include <com/sun/star/embed/XEmbeddedObject.hpp> - -#include <svl/svarray.hxx> -#include <svtools/embedhlp.hxx> - -#include <bparr.hxx> -#include <ndtyp.hxx> - -class Graphic; -class GraphicObject; -class String; -class SwAttrSet; -class SfxItemSet; -class SwCntntNode; -class SwDoc; -class SwGrfFmtColl; -class SwGrfNode; -class SwHistory; -class SwNode; -class SwNodeIndex; -class SwNodeRange; -class SwOLENode; -class SwOutlineNodes; -class SwPaM; -class SwSectionData; -class SwSectionFmt; -class SwTOXBase; -class SwSectionNode; -class SwStartNode; -class SwTableBoxFmt; -class SwTableFmt; -class SwTableLine; -class SwTableLineFmt; -class SwTableNode; -class SwTblToTxtSaves; -class SwTxtFmtColl; -class SwTxtNode; -class SwUndoTblToTxt; -class SwUndoTxtToTbl; -struct SwPosition; - -// -------------------- -// class SwNodes -// -------------------- - -typedef SwNode * SwNodePtr; -typedef sal_Bool (*FnForEach_SwNodes)( const SwNodePtr&, void* pArgs ); - -SV_DECL_PTRARR_SORT( SwOutlineNodes, SwNodePtr, 0, 10 ) - -class SW_DLLPUBLIC SwNodes - : private BigPtrArray - , private ::boost::noncopyable -{ - friend class SwDoc; - friend class SwNode; - friend class SwNodeIndex; - - SwNodeIndex* pRoot; // List of all indices on nodes. - - void InsertNode( const SwNodePtr pNode, - const SwNodeIndex& rPos ); - void InsertNode( const SwNodePtr pNode, - sal_uLong nPos ); - - SwDoc* pMyDoc; // This Doc contains the nodes-array. - - SwNode *pEndOfPostIts, *pEndOfInserts, // These are the fixed ranges. - *pEndOfAutotext, *pEndOfRedlines, - *pEndOfContent; - - mutable SwOutlineNodes* pOutlineNds; // Array of all outline nodes. - - sal_Bool bInNodesDel : 1; // In Case of recursive calling. - // Do not update Num/Outline. - sal_Bool bInDelUpdOutl : 1; // Flag for updating of Outline. - sal_Bool bInDelUpdNum : 1; // Flag for updating of Outline. - - // For administering indices. - void RegisterIndex( SwNodeIndex& rIdx ); - void DeRegisterIndex( SwNodeIndex& rIdx ); - void RemoveNode( sal_uLong nDelPos, sal_uLong nLen, sal_Bool bDel ); - - // Actions on the nodes. - void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd ); - void DelNodes( const SwNodeIndex& rStart, sal_uLong nCnt = 1 ); - - void ChgNode( SwNodeIndex& rDelPos, sal_uLong nSize, - SwNodeIndex& rInsPos, sal_Bool bNewFrms ); - - void UpdtOutlineIdx( const SwNode& ); // Update all OutlineNodes starting from Node. - - void _CopyNodes( const SwNodeRange&, const SwNodeIndex&, - sal_Bool bNewFrms = sal_True, sal_Bool bTblInsDummyNode = sal_False ) const; - void _DelDummyNodes( const SwNodeRange& rRg ); - -protected: - SwNodes( SwDoc* pDoc ); - -public: - ~SwNodes(); - - typedef ::std::vector<SwNodeRange> NodeRanges_t; - typedef ::std::vector<NodeRanges_t> TableRanges_t; - - SwNodePtr operator[]( sal_uLong n ) const - { return (SwNodePtr)BigPtrArray::operator[] ( n ); } - - sal_uLong Count() const { return BigPtrArray::Count(); } - void ForEach( FnForEach_SwNodes fnForEach, void* pArgs = 0 ) - { - BigPtrArray::ForEach( 0, BigPtrArray::Count(), - (FnForEach) fnForEach, pArgs ); - } - void ForEach( sal_uLong nStt, sal_uLong nEnd, FnForEach_SwNodes fnForEach, void* pArgs = 0 ) - { - BigPtrArray::ForEach( nStt, nEnd, (FnForEach) fnForEach, pArgs ); - } - void ForEach( const SwNodeIndex& rStart, const SwNodeIndex& rEnd, - FnForEach_SwNodes fnForEach, void* pArgs = 0 ); - - // A still empty section. - SwNode& GetEndOfPostIts() const { return *pEndOfPostIts; } - // Section fpr all footnotes. - SwNode& GetEndOfInserts() const { return *pEndOfInserts; } - // Section for all Flys/Header/Footers. - SwNode& GetEndOfAutotext() const { return *pEndOfAutotext; } - // Section for all Redlines. - SwNode& GetEndOfRedlines() const { return *pEndOfRedlines; } - // This is the last EndNode of a special section. After it - // there is only the regular ContentSection (i.e. the BodyText). - SwNode& GetEndOfExtras() const { return *pEndOfRedlines; } - // Regular ContentSection (i.e. the BodyText). - SwNode& GetEndOfContent() const { return *pEndOfContent; } - - // Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) - // Implementation in doc.hxx (because one needs to know Doc for it) ! - sal_Bool IsDocNodes() const; - - sal_uInt16 GetSectionLevel(const SwNodeIndex &rIndex) const; - void Delete(const SwNodeIndex &rPos, sal_uLong nNodes = 1); - - sal_Bool _MoveNodes( const SwNodeRange&, SwNodes& rNodes, const SwNodeIndex&, - sal_Bool bNewFrms = sal_True ); - void MoveRange( SwPaM&, SwPosition&, SwNodes& rNodes ); - - void _Copy( const SwNodeRange& rRg, const SwNodeIndex& rInsPos, - sal_Bool bNewFrms = sal_True ) const - { _CopyNodes( rRg, rInsPos, bNewFrms ); } - - void SectionUp( SwNodeRange *); - void SectionDown( SwNodeRange *pRange, SwStartNodeType = SwNormalStartNode ); - - sal_Bool CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const; - - void GoStartOfSection(SwNodeIndex *) const; - void GoEndOfSection(SwNodeIndex *) const; - - SwCntntNode* GoNext(SwNodeIndex *) const; - SwCntntNode* GoPrevious(SwNodeIndex *) const; - - // Go to next/previous Cntnt/Table-node for which LayoutFrames exist. - // While doing this do not leave Header/Footer/Frame etc. - SwNode* GoNextWithFrm(SwNodeIndex *) const; - SwNode* GoPreviousWithFrm(SwNodeIndex *) const; - - // Go to next content-node that is not protected or hidden - // (Both set FALSE ==> GoNext/GoPrevious!!!). - SwCntntNode* GoNextSection( SwNodeIndex *, int bSkipHidden = sal_True, - int bSkipProtect = sal_True ) const; - SwCntntNode* GoPrevSection( SwNodeIndex *, int bSkipHidden = sal_True, - int bSkipProtect = sal_True ) const; - - // Create an empty section of Start- and EndNote. It may be called - // only if a new section with content is to be created, - // e.g. at filters/Undo/... - SwStartNode* MakeEmptySection( const SwNodeIndex& rIdx, - SwStartNodeType = SwNormalStartNode ); - - // Implementations of "Make...Node" are in the given .cxx-files. - SwTxtNode *MakeTxtNode( const SwNodeIndex & rWhere, - SwTxtFmtColl *pColl, - SwAttrSet* pAutoAttr = 0 ); // in ndtxt.cxx - SwStartNode* MakeTextSection( const SwNodeIndex & rWhere, - SwStartNodeType eSttNdTyp, - SwTxtFmtColl *pColl, - SwAttrSet* pAutoAttr = 0 ); - - SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere, - const String& rGrfName, - const String& rFltName, - const Graphic* pGraphic, - SwGrfFmtColl *pColl, - SwAttrSet* pAutoAttr = 0, - sal_Bool bDelayed = sal_False ); // in ndgrf.cxx - - SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere, - const GraphicObject& rGrfObj, - SwGrfFmtColl *pColl, - SwAttrSet* pAutoAttr = 0 ); // in ndgrf.cxx - - SwOLENode *MakeOLENode( const SwNodeIndex & rWhere, - const svt::EmbeddedObjectRef&, - SwGrfFmtColl *pColl, - SwAttrSet* pAutoAttr = 0 ); // in ndole.cxx - SwOLENode *MakeOLENode( const SwNodeIndex & rWhere, - const String &rName, - sal_Int64 nAspect, - SwGrfFmtColl *pColl, - SwAttrSet* pAutoAttr ); // in ndole.cxx - - // Array of all OutlineNodes. - const SwOutlineNodes& GetOutLineNds() const; - - //void UpdateOutlineNode( const SwNode&, sal_uInt8 nOldLevel, sal_uInt8 nNewLevel );//#outline level,removed by zhaojianwei - - // Update all Nodes - Rule/Format-Change. - void UpdateOutlineNode(SwNode & rNd); - - // Insert nodes for tables. If Lines is given, create the matrix - // from lines and boxes, else only the count of boxes. - - // New parameter pAttrSet: If pAttrSet is non-null and contains an - // adjust item it is propagated to the table cells. If there is an - // adjust in pCntntTxtColl or pHeadlineTxtColl this adjust item - // overrides the item in pAttrSet. - - SwTableNode* InsertTable( const SwNodeIndex& rNdIdx, - sal_uInt16 nBoxes, SwTxtFmtColl* pCntntTxtColl, - sal_uInt16 nLines = 0, sal_uInt16 nRepeat = 0, - SwTxtFmtColl* pHeadlineTxtColl = 0, - const SwAttrSet * pAttrSet = 0); - - // Create balanced table from selected range. - SwTableNode* TextToTable( const SwNodeRange& rRange, sal_Unicode cCh, - SwTableFmt* pTblFmt, - SwTableLineFmt* pLineFmt, - SwTableBoxFmt* pBoxFmt, - SwTxtFmtColl* pTxtColl, - SwUndoTxtToTbl* pUndo = 0 ); - - SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange); - - //create a table from a vector of NodeRanges - API support - SwTableNode* TextToTable( const TableRanges_t& rTableNodes, - SwTableFmt* pTblFmt, - SwTableLineFmt* pLineFmt, - SwTableBoxFmt* pBoxFmt, - SwTxtFmtColl* pTxtColl - /*, SwUndo... pUndo*/ ); - - - // Create regular text from what was table. - sal_Bool TableToText( const SwNodeRange& rRange, sal_Unicode cCh, - SwUndoTblToTxt* = 0 ); - // Is in untbl.cxx and may called only by Undo-object. - SwTableNode* UndoTableToText( sal_uLong nStt, sal_uLong nEnd, - const SwTblToTxtSaves& rSavedData ); - - // Insert a new box in the line before InsPos. Its format - // is taken from the following one (or from the previous one if we are - // at the end). In the line there must be a box already. - sal_Bool InsBoxen( SwTableNode*, SwTableLine*, SwTableBoxFmt*, - // Formats for TextNode of box. - SwTxtFmtColl*, const SfxItemSet* pAutoAttr, - sal_uInt16 nInsPos, sal_uInt16 nCnt = 1 ); - // Splits a table at the base-line which contains the index. - // All base lines behind it are moved to a new table/ -node. - // Is the flag bCalcNewSize set to TRUE, the new SSize for both - // tables is calculated from the Maximum of the boxes, provided - // SSize is set "absolute" (LONG_MAX). - // (Momentarily this is needed only for the RTF-parser.) - SwTableNode* SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter = sal_True, - sal_Bool bCalcNewSize = sal_False ); - // Two Tables that are following one another are merged. - sal_Bool MergeTable( const SwNodeIndex& rPos, sal_Bool bWithPrev = sal_True, - sal_uInt16 nMode = 0, SwHistory* pHistory = 0 ); - - // Insert a new SwSection. - SwSectionNode* InsertTextSection(SwNodeIndex const& rNdIdx, - SwSectionFmt& rSectionFmt, - SwSectionData const&, - SwTOXBase const*const pTOXBase, - SwNodeIndex const*const pEnde, - bool const bInsAtStart = true, - bool const bCreateFrms = true); - - // Which Doc contains the nodes-array? - SwDoc* GetDoc() { return pMyDoc; } - const SwDoc* GetDoc() const { return pMyDoc; } - - // Search previous / next content node or table node with frames. - // If no end is given begin with the FrameIndex, else start search - // with that before rFrmIdx and pEnd at the back. - // If no valid node is found, return 0. rFrmIdx points to the node with frames. - SwNode* FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx, - const SwNode* pEnd = 0 ) const; - - SwNode * DocumentSectionStartNode(SwNode * pNode) const; - SwNode * DocumentSectionEndNode(SwNode * pNode) const; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx deleted file mode 100644 index 1ac591510d..0000000000 --- a/sw/inc/ndgrf.hxx +++ /dev/null @@ -1,242 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _NDGRF_HXX -#define _NDGRF_HXX -#include <sfx2/lnkbase.hxx> -#include <svtools/grfmgr.hxx> -#include <ndnotxt.hxx> -#include <com/sun/star/embed/XStorage.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> -class SwAsyncRetrieveInputStreamThreadConsumer; - -class SwGrfFmtColl; -class SwDoc; -class GraphicAttr; -class SvStorage; - -// SwGrfNode -class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode -{ - friend class SwNodes; - - GraphicObject aGrfObj; - ::sfx2::SvBaseLinkRef refLink; // If graphics only as link then pointer is set. - Size nGrfSize; - String aNewStrmName; // SW3/XML: new stream name (either SW3 stream - // name or package url) - String aLowResGrf; // HTML: LowRes graphics (substitute until regular HighRes graphics is loaded). - sal_Bool bTransparentFlagValid :1; - sal_Bool bInSwapIn :1; - - sal_Bool bGrafikArrived :1; - sal_Bool bChgTwipSize :1; - sal_Bool bChgTwipSizeFromPixel :1; - sal_Bool bLoadLowResGrf :1; - sal_Bool bFrameInPaint :1; // To avoid Start-/EndActions in Paint via SwapIn. - sal_Bool bScaleImageMap :1; // Scale image map in SetTwipSize. - - boost::shared_ptr< SwAsyncRetrieveInputStreamThreadConsumer > mpThreadConsumer; - bool mbLinkedInputStreamReady; - com::sun::star::uno::Reference<com::sun::star::io::XInputStream> mxInputStream; - sal_Bool mbIsStreamReadOnly; - - SwGrfNode( const SwNodeIndex& rWhere, - const String& rGrfName, const String& rFltName, - const Graphic* pGraphic, - SwGrfFmtColl* pGrfColl, - SwAttrSet* pAutoAttr = 0 ); - // Ctor for reading (SW/G) without graphics. - SwGrfNode( const SwNodeIndex& rWhere, - const String& rGrfName, const String& rFltName, - SwGrfFmtColl* pGrfColl, - SwAttrSet* pAutoAttr = 0 ); - SwGrfNode( const SwNodeIndex& rWhere, - const GraphicObject& rGrfObj, - SwGrfFmtColl* pGrfColl, - SwAttrSet* pAutoAttr = 0 ); - - void InsertLink( const String& rGrfName, const String& rFltName ); - sal_Bool ImportGraphic( SvStream& rStrm ); - sal_Bool HasStreamName() const { return aGrfObj.HasUserData(); } - // adjust return type and rename method to - // indicate that its an private one. - - // embedded graphic stream couldn't be inside a 3.1 - 5.2 storage any more. - // Thus, return value isn't needed any more. - void _GetStreamStorageNames( String& rStrmName, String& rStgName ) const; - - void DelStreamName(); - DECL_LINK( SwapGraphic, GraphicObject* ); - - /** helper method to determine stream for the embedded graphic. - - Important note: caller of this method has to handle the thrown exceptions - Storage, which should contain the stream of the embedded graphic, is - provided via parameter. Otherwise the returned stream will be closed - after the the method returns, because its parent stream is closed and deleted. - Proposed name of embedded graphic stream is also provided by parameter. - - @author OD - - @param _refPics - input parameter - reference to storage, which should contain the - embedded graphic stream. - - @param _aStrmName - input parameter - proposed name of the embedded graphic stream. - - @return SvStream* - new created stream of the embedded graphic, which has to be destroyed - after its usage. Could be NULL, if the stream isn't found. - */ - SvStream* _GetStreamForEmbedGrf( - const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _refPics, - String& _aStrmName ) const; - - /** helper method to get a substorage of the document storage for readonly access. - - A substorage with the specified name will be opened readonly. If the provided - name is empty the root storage will be returned. - - @param _aStgName - input parameter - name of substorage. Can be empty. - - @return XStorage - reference to substorage or the root storage - */ - ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > _GetDocSubstorageOrRoot( - const String& aStgName ) const; - -public: - virtual ~SwGrfNode(); - const Graphic& GetGrf() const { return aGrfObj.GetGraphic(); } - const GraphicObject& GetGrfObj() const { return aGrfObj; } - GraphicObject& GetGrfObj() { return aGrfObj; } - - virtual SwCntntNode *SplitCntntNode( const SwPosition & ); - - virtual Size GetTwipSize() const; -#ifndef _FESHVIEW_ONLY_INLINE_NEEDED - void SetTwipSize( const Size& rSz ); - - sal_Bool IsTransparent() const; - - inline sal_Bool IsAnimated() const { return aGrfObj.IsAnimated(); } - - inline sal_Bool IsChgTwipSize() const { return bChgTwipSize; } - inline sal_Bool IsChgTwipSizeFromPixel() const { return bChgTwipSizeFromPixel; } - inline void SetChgTwipSize( sal_Bool b, sal_Bool bFromPx=sal_False ) { bChgTwipSize = b; bChgTwipSizeFromPixel = bFromPx; } - - inline sal_Bool IsGrafikArrived() const { return bGrafikArrived; } - inline void SetGrafikArrived( sal_Bool b ) { bGrafikArrived = b; } - - inline sal_Bool IsFrameInPaint() const { return bFrameInPaint; } - inline void SetFrameInPaint( sal_Bool b ) { bFrameInPaint = b; } - - inline sal_Bool IsScaleImageMap() const { return bScaleImageMap; } - inline void SetScaleImageMap( sal_Bool b ) { bScaleImageMap = b; } -#endif - // in ndcopy.cxx - virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const; -#ifndef _FESHVIEW_ONLY_INLINE_NEEDED - - // Re-read in case graphic was not OK. The current one - // gets replaced by the new one. - sal_Bool ReRead( const String& rGrfName, const String& rFltName, - const Graphic* pGraphic = 0, - const GraphicObject* pGrfObj = 0, - sal_Bool bModify = sal_True ); - // Loading of graphic immediately before displaying. - short SwapIn( sal_Bool bWaitForData = sal_False ); - // Remove graphic in order to free memory. - short SwapOut(); - // Access to storage stream-name. - void SetStreamName( const String& r ) { aGrfObj.SetUserData( r ); } - void SetNewStreamName( const String& r ) { aNewStrmName = r; } - // Is this node selected by any shell? - sal_Bool IsSelected() const; -#endif - - // Communicate to graphic that node is in Undo-range. - virtual sal_Bool SavePersistentData(); - virtual sal_Bool RestorePersistentData(); - -#ifndef _FESHVIEW_ONLY_INLINE_NEEDED - - // Query link-data. - sal_Bool IsGrfLink() const { return refLink.Is(); } - inline sal_Bool IsLinkedFile() const; - inline sal_Bool IsLinkedDDE() const; - ::sfx2::SvBaseLinkRef GetLink() const { return refLink; } - sal_Bool GetFileFilterNms( String* pFileNm, String* pFilterNm ) const; - void ReleaseLink(); - - // Scale an image-map: the image-map becomes zoomed in / out by - // factor between graphic-size and border-size. - void ScaleImageMap(); - - // Returns the with our graphic attributes filled Graphic-Attr-Structure. - GraphicAttr& GetGraphicAttr( GraphicAttr&, const SwFrm* pFrm ) const; - -#endif - boost::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > GetThreadConsumer(); - bool IsLinkedInputStreamReady() const; - void TriggerAsyncRetrieveInputStream(); - void ApplyInputStream( - com::sun::star::uno::Reference<com::sun::star::io::XInputStream> xInputStream, - const sal_Bool bIsStreamReadOnly ); - void UpdateLinkWithInputStream(); - bool IsAsyncRetrieveInputStreamPossible() const; -}; - - -// Inline methods from Node.hxx - it is only now that we know TxtNode!! -inline SwGrfNode *SwNode::GetGrfNode() -{ - return ND_GRFNODE == nNodeType ? (SwGrfNode*)this : 0; -} -inline const SwGrfNode *SwNode::GetGrfNode() const -{ - return ND_GRFNODE == nNodeType ? (const SwGrfNode*)this : 0; -} - -#ifndef _FESHVIEW_ONLY_INLINE_NEEDED -inline sal_Bool SwGrfNode::IsLinkedFile() const -{ - return refLink.Is() && OBJECT_CLIENT_GRF == refLink->GetObjType(); -} -inline sal_Bool SwGrfNode::IsLinkedDDE() const -{ - return refLink.Is() && OBJECT_CLIENT_DDE == refLink->GetObjType(); -} -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx deleted file mode 100644 index 9a33978f40..0000000000 --- a/sw/inc/ndhints.hxx +++ /dev/null @@ -1,226 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _NDHINTS_HXX -#define _NDHINTS_HXX - - -#include <svl/svarray.hxx> -#include <tools/mempool.hxx> - -#include "swtypes.hxx" - -class SwTxtNode; -class SwRegHistory; // Is in RolBck.hxx. -class SwTxtAttr; -class SwTxtAttrNesting; - -class SfxPoolItem; -class SfxItemSet; -class SwDoc; - -typedef enum { - COPY = true, - NEW = false, -} CopyOrNew_t; - -// if COPY then pTxtNode must be given! -SW_DLLPRIVATE SwTxtAttr * -MakeTxtAttr( SwDoc & rDoc, SfxPoolItem & rNew, - xub_StrLen const nStt, xub_StrLen const nEnd, - CopyOrNew_t const bIsCopy = NEW, SwTxtNode *const pTxtNode = 0); -SW_DLLPRIVATE SwTxtAttr * -MakeTxtAttr( SwDoc & rDoc, const SfxItemSet & rSet, - xub_StrLen nStt, xub_StrLen nEnd ); - -// create redline dummy text hint that must not be inserted into hints array -SW_DLLPRIVATE SwTxtAttr* -MakeRedlineTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr ); - - -// Class SwpHints is derived indirectly via SwpHts, because only the -// class SwTxtNode should be allowed to insert and remove attributes. -// Other classes like the Frames are given only reading access via -// the index-operator. -// Size when created is 1 because an array is created only if -// also a hint is inserted. - - // Class SwpHtStart/End - - -SV_DECL_PTRARR_SORT(SwpHtStart,SwTxtAttr*,1,1) -SV_DECL_PTRARR_SORT(SwpHtEnd,SwTxtAttr*,1,1) - -// Class SwpHintsArr - - -/// the Hints array -class SwpHintsArray -{ - -protected: - SwpHtStart m_HintStarts; - SwpHtEnd m_HintEnds; - - //FIXME: why are the non-const methods public? -public: - void Insert( const SwTxtAttr *pHt ); - void DeleteAtPos( const sal_uInt16 nPosInStart ); - bool Resort(); - SwTxtAttr * Cut( const sal_uInt16 nPosInStart ); - - inline const SwTxtAttr * GetStart( const sal_uInt16 nPos ) const - { return m_HintStarts[nPos]; } - inline const SwTxtAttr * GetEnd ( const sal_uInt16 nPos ) const - { return m_HintEnds [nPos]; } - inline SwTxtAttr * GetStart( const sal_uInt16 nPos ) - { return m_HintStarts[nPos]; } - inline SwTxtAttr * GetEnd ( const sal_uInt16 nPos ) - { return m_HintEnds [nPos]; } - - inline sal_uInt16 GetEndCount() const { return m_HintEnds .Count(); } - inline sal_uInt16 GetStartCount() const { return m_HintStarts.Count(); } - - inline sal_uInt16 GetStartOf( const SwTxtAttr *pHt ) const; - inline sal_uInt16 GetPos( const SwTxtAttr *pHt ) const - { return m_HintStarts.GetPos( pHt ); } - - inline SwTxtAttr * GetTextHint( const sal_uInt16 nIdx ) - { return GetStart(nIdx); } - inline const SwTxtAttr * operator[]( const sal_uInt16 nIdx ) const - { return m_HintStarts[nIdx]; } - inline sal_uInt16 Count() const { return m_HintStarts.Count(); } - -#if OSL_DEBUG_LEVEL > 1 - bool Check() const; -#endif -}; - - -// Class SwpHints - - -// public interface -class SwpHints : public SwpHintsArray -{ -private: - SwRegHistory* m_pHistory; // for Undo - - bool m_bFontChange : 1; // font change - // true: the Node is in Split and Frames are moved - bool m_bInSplitNode : 1; - // m_bHasHiddenParaField is invalid, call CalcHiddenParaField() - bool m_bCalcHiddenParaField : 1; - bool m_bHasHiddenParaField : 1; // HiddenParaFld - bool m_bFootnote : 1; // footnotes - bool m_bDDEFields : 1; // the TextNode has DDE fields - - // records a new attibute in m_pHistory. - void NoteInHistory( SwTxtAttr *pAttr, const bool bNew = false ); - - void CalcFlags( ); - - // Delete methods may only be called by the TextNode! - // Because the TextNode also guarantees removal of the Character for - // attributes without an end. - friend class SwTxtNode; - void DeleteAtPos( const sal_uInt16 nPos ); - // Delete the given Hint. The Hint must actually be in the array! - void Delete( SwTxtAttr* pTxtHt ); - - inline void SetInSplitNode(bool bInSplit) { m_bInSplitNode = bInSplit; } - inline void SetCalcHiddenParaField() { m_bCalcHiddenParaField = true; } - inline void SetHiddenParaField( const bool bNew ) - { m_bHasHiddenParaField = bNew; } - inline bool HasHiddenParaField() const - { - if ( m_bCalcHiddenParaField ) - { - (const_cast<SwpHints*>(this))->CalcHiddenParaField(); - } - return m_bHasHiddenParaField; - } - - void InsertNesting(SwTxtAttrNesting & rNewHint); - bool TryInsertNesting(SwTxtNode & rNode, SwTxtAttrNesting & rNewHint); - void BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint, - const SetAttrMode nMode ); - bool MergePortions( SwTxtNode& rNode ); - -public: - SwpHints(); - - inline bool CanBeDeleted() const { return !Count(); } - - // register a History, which receives all attribute changes (for Undo) - void Register( SwRegHistory* pHist ) { m_pHistory = pHist; } - // deregister the currently registered History - void DeRegister() { Register(0); } - SwRegHistory* GetHistory() const { return m_pHistory; } - - /// try to insert the hint - /// @return true iff hint successfully inserted - bool TryInsertHint( SwTxtAttr * const pHint, SwTxtNode & rNode, - const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT ); - - inline bool HasFtn() const { return m_bFootnote; } - inline bool IsInSplitNode() const { return m_bInSplitNode; } - - // calc current value of m_bHasHiddenParaField, returns true iff changed - bool CalcHiddenParaField(); - - DECL_FIXEDMEMPOOL_NEWDEL(SwpHints) -}; - -// Output operator for text hints. -SvStream &operator<<(SvStream &aS, const SwpHints &rHints); //$ ostream - - -// Inline Implementations - - -inline sal_uInt16 SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const -{ - sal_uInt16 nPos; - if ( !m_HintStarts.Seek_Entry( pHt, &nPos ) ) - { - nPos = USHRT_MAX; - } - return nPos; -} - -inline SwTxtAttr *SwpHintsArray::Cut( const sal_uInt16 nPosInStart ) -{ - SwTxtAttr *pHt = GetTextHint(nPosInStart); - DeleteAtPos( nPosInStart ); - return pHt; -} - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx deleted file mode 100644 index a2830235f1..0000000000 --- a/sw/inc/ndindex.hxx +++ /dev/null @@ -1,240 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_NDINDEX_HXX -#define SW_NDINDEX_HXX - -#include <limits.h> - -#include <tools/solar.h> - -#include <node.hxx> - - -class SwNode; -class SwNodes; - -class SW_DLLPUBLIC SwNodeIndex -{ - friend void SwNodes::RegisterIndex( SwNodeIndex& ); - friend void SwNodes::DeRegisterIndex( SwNodeIndex& ); - friend void SwNodes::RemoveNode( sal_uLong, sal_uLong, sal_Bool ); - -#if OSL_DEBUG_LEVEL > 1 - static int nSerial; - int MySerial; -#endif - - SwNode* pNd; - SwNodeIndex *pNext, *pPrev; - - void Remove(); - - // These are not allowed! - SwNodeIndex( SwNodes& rNds, sal_uInt16 nIdx ); - SwNodeIndex( SwNodes& rNds, int nIdx ); - -public: - SwNodeIndex( SwNodes& rNds, sal_uLong nIdx = 0 ); - SwNodeIndex( const SwNodeIndex &, long nDiff = 0 ); - SwNodeIndex( const SwNode&, long nDiff = 0 ); - ~SwNodeIndex() { Remove(); } - - inline sal_uLong operator++(); - inline sal_uLong operator--(); - inline sal_uLong operator++(int); - inline sal_uLong operator--(int); - - inline sal_uLong operator+=( sal_uLong ); - inline sal_uLong operator-=( sal_uLong ); - inline sal_uLong operator+=( const SwNodeIndex& ); - inline sal_uLong operator-=( const SwNodeIndex& ); - - inline sal_Bool operator< ( const SwNodeIndex& ) const; - inline sal_Bool operator<=( const SwNodeIndex& ) const; - inline sal_Bool operator> ( const SwNodeIndex& ) const; - inline sal_Bool operator>=( const SwNodeIndex& ) const; - inline sal_Bool operator==( const SwNodeIndex& ) const; - inline sal_Bool operator!=( const SwNodeIndex& ) const; - - inline sal_Bool operator< ( sal_uLong nWert ) const; - inline sal_Bool operator<=( sal_uLong nWert ) const; - inline sal_Bool operator> ( sal_uLong nWert ) const; - inline sal_Bool operator>=( sal_uLong nWert ) const; - inline sal_Bool operator==( sal_uLong nWert ) const; - inline sal_Bool operator!=( sal_uLong nWert ) const; - - inline SwNodeIndex& operator=( sal_uLong ); - SwNodeIndex& operator=( const SwNodeIndex& ); - SwNodeIndex& operator=( const SwNode& ); - - // Return value of index as sal_uLong. - inline sal_uLong GetIndex() const; - - // Enables assignments without creation of a temporary object. - SwNodeIndex& Assign( SwNodes& rNds, sal_uLong ); - SwNodeIndex& Assign( const SwNode& rNd, long nOffset = 0 ); - - // Gets pointer on NodesArray. - inline const SwNodes& GetNodes() const; - inline SwNodes& GetNodes(); - - SwNode& GetNode() const { return *pNd; } -}; - -// SwRange - -class SW_DLLPUBLIC SwNodeRange -{ -public: - SwNodeIndex aStart; - SwNodeIndex aEnd; - - SwNodeRange( const SwNodeIndex &rS, const SwNodeIndex &rE ); - SwNodeRange( const SwNodeRange &rRange ); - - SwNodeRange( SwNodes& rArr, sal_uLong nSttIdx = 0, sal_uLong nEndIdx = 0 ); - SwNodeRange( const SwNodeIndex& rS, long nSttDiff, - const SwNodeIndex& rE, long nEndDiff = 0 ); - SwNodeRange( const SwNode& rS, long nSttDiff, - const SwNode& rE, long nEndDiff = 0 ); -}; - - - - -// For inlines node.hxx is needed which in turn needs this one. -// Therefore all inlines accessing pNd are implemented here. - -inline sal_uLong SwNodeIndex::GetIndex() const -{ - return pNd->GetIndex(); -} -inline const SwNodes& SwNodeIndex::GetNodes() const -{ - return pNd->GetNodes(); -} -inline SwNodes& SwNodeIndex::GetNodes() -{ - return pNd->GetNodes(); -} -inline sal_Bool SwNodeIndex::operator< ( sal_uLong nWert ) const -{ - return pNd->GetIndex() < nWert; -} -inline sal_Bool SwNodeIndex::operator<=( sal_uLong nWert ) const -{ - return pNd->GetIndex() <= nWert; -} -inline sal_Bool SwNodeIndex::operator> ( sal_uLong nWert ) const -{ - return pNd->GetIndex() > nWert; -} -inline sal_Bool SwNodeIndex::operator>=( sal_uLong nWert ) const -{ - return pNd->GetIndex() >= nWert; -} -inline sal_Bool SwNodeIndex::operator==( sal_uLong nWert ) const -{ - return pNd->GetIndex() == nWert; -} -inline sal_Bool SwNodeIndex::operator!=( sal_uLong nWert ) const -{ - return pNd->GetIndex() != nWert; -} -inline sal_Bool SwNodeIndex::operator<( const SwNodeIndex& rIndex ) const -{ - return pNd->GetIndex() < rIndex.GetIndex(); -} -inline sal_Bool SwNodeIndex::operator<=( const SwNodeIndex& rIndex ) const -{ - return pNd->GetIndex() <= rIndex.GetIndex(); -} -inline sal_Bool SwNodeIndex::operator>( const SwNodeIndex& rIndex ) const -{ - return pNd->GetIndex() > rIndex.GetIndex(); -} -inline sal_Bool SwNodeIndex::operator>=( const SwNodeIndex& rIndex ) const -{ - return pNd->GetIndex() >= rIndex.GetIndex(); -} -inline sal_Bool SwNodeIndex::operator==( const SwNodeIndex& rIdx ) const -{ - return pNd == rIdx.pNd; -} -inline sal_Bool SwNodeIndex::operator!=( const SwNodeIndex& rIdx ) const -{ - return pNd != rIdx.pNd; -} - -inline sal_uLong SwNodeIndex::operator++() -{ - return ( pNd = GetNodes()[ pNd->GetIndex()+1 ] )->GetIndex(); -} -inline sal_uLong SwNodeIndex::operator--() -{ - return ( pNd = GetNodes()[ pNd->GetIndex()-1 ] )->GetIndex(); -} -inline sal_uLong SwNodeIndex::operator++(int) -{ - sal_uLong nOldIndex = pNd->GetIndex(); - pNd = GetNodes()[ nOldIndex + 1 ]; - return nOldIndex; -} -inline sal_uLong SwNodeIndex::operator--(int) -{ - sal_uLong nOldIndex = pNd->GetIndex(); - pNd = GetNodes()[ nOldIndex - 1 ]; - return nOldIndex; -} - -inline sal_uLong SwNodeIndex::operator+=( sal_uLong nWert ) -{ - return ( pNd = GetNodes()[ pNd->GetIndex() + nWert ] )->GetIndex(); -} -inline sal_uLong SwNodeIndex::operator-=( sal_uLong nWert ) -{ - return ( pNd = GetNodes()[ pNd->GetIndex() - nWert ] )->GetIndex(); -} -inline sal_uLong SwNodeIndex::operator+=( const SwNodeIndex& rIndex ) -{ - return ( pNd = GetNodes()[ pNd->GetIndex() + rIndex.GetIndex() ] )->GetIndex(); -} -inline sal_uLong SwNodeIndex::operator-=( const SwNodeIndex& rIndex ) -{ - return ( pNd = GetNodes()[ pNd->GetIndex() - rIndex.GetIndex() ] )->GetIndex(); -} - -inline SwNodeIndex& SwNodeIndex::operator=( sal_uLong nWert ) -{ - pNd = GetNodes()[ nWert ]; - return *this; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx deleted file mode 100644 index 28e785cf5e..0000000000 --- a/sw/inc/ndnotxt.hxx +++ /dev/null @@ -1,116 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _NDNOTXT_HXX -#define _NDNOTXT_HXX - -#include "node.hxx" - -class PolyPolygon; - -// SwNoTxtNode - -class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode -{ - friend class SwNodes; - friend class SwNoTxtFrm; - - PolyPolygon *pContour; - sal_Bool bAutomaticContour : 1; // automatic contour polygon, not manipulated - sal_Bool bContourMapModeValid : 1; // contour map mode is not the graphics's - // prefered map mode, but either - // MM100 or or pixel - sal_Bool bPixelContour : 1; // contour map mode is invalid and pixel. - - // Creates for all derivations an AttrSet with ranges for frame- and - // graphics-attributes (only called by SwCntntNode). - virtual void NewAttrSet( SwAttrPool& ); - - SwNoTxtNode( const SwNoTxtNode& ); // Not allowed. - SwNoTxtNode &operator=( const SwNoTxtNode& ); // Not allowed. - -protected: - SwNoTxtNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType, - SwGrfFmtColl *pGrColl, SwAttrSet* pAutoAttr = 0 ); - -public: - ~SwNoTxtNode(); - - virtual SwCntntFrm *MakeFrm( SwFrm* ); - - inline SwGrfFmtColl *GetGrfColl() const { return (SwGrfFmtColl*)GetRegisteredIn(); } - - virtual Size GetTwipSize() const = 0; - - virtual sal_Bool SavePersistentData(); - virtual sal_Bool RestorePersistentData(); - - const String GetTitle() const; - void SetTitle( const String& rTitle, - bool bBroadcast = false ); - const String GetDescription() const; - void SetDescription( const String& rDescription, - bool bBroadcast = false ); - - void SetContour( const PolyPolygon *pPoly, - sal_Bool bAutomatic = sal_False ); - const PolyPolygon *HasContour() const; - sal_Bool _HasContour() const { return pContour!=0; }; - void GetContour( PolyPolygon &rPoly ) const; - void CreateContour(); - - void SetAutomaticContour( sal_Bool bSet ) { bAutomaticContour = bSet; } - sal_Bool HasAutomaticContour() const { return bAutomaticContour; } - - // set either a MM100 or pixel contour - void SetContourAPI( const PolyPolygon *pPoly ); - - // get either a MM100 or pixel contour, return sal_False if no contour is set. - sal_Bool GetContourAPI( PolyPolygon &rPoly ) const; - - void SetPixelContour( sal_Bool bSet ) { bPixelContour = bSet; } - sal_Bool IsPixelContour() const; - - sal_Bool IsContourMapModeValid() const { return bContourMapModeValid; } - - // Obtains the graphic with SwapIn for GrfNode via GetData for OLE. - Graphic GetGraphic() const; -}; - -// Inline methods from Node.hxx - we know TxtNode only here!! -inline SwNoTxtNode *SwNode::GetNoTxtNode() -{ - return ND_NOTXTNODE & nNodeType ? (SwNoTxtNode*)this : 0; -} -inline const SwNoTxtNode *SwNode::GetNoTxtNode() const -{ - return ND_NOTXTNODE & nNodeType ? (const SwNoTxtNode*)this : 0; -} - -#endif // _NDNOTXT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx deleted file mode 100644 index f5ef2483ae..0000000000 --- a/sw/inc/ndole.hxx +++ /dev/null @@ -1,171 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _NDOLE_HXX -#define _NDOLE_HXX - -#include <ndnotxt.hxx> - -#include <svtools/embedhlp.hxx> - -class SwGrfFmtColl; -class SwDoc; -class SwOLENode; - -class SwOLEListener_Impl; -class SwEmbedObjectLink; -class SW_DLLPUBLIC SwOLEObj -{ - friend class SwOLENode; - - const SwOLENode* pOLENd; - SwOLEListener_Impl* pListener; - - // Either ref or name are known. If only name is known, ref is obtained - // on demand by GetOleRef() from Sfx. - svt::EmbeddedObjectRef xOLERef; - String aName; - - SwOLEObj( const SwOLEObj& rObj ); // Not allowed. - SwOLEObj(); - - void SetNode( SwOLENode* pNode ); - -public: - SwOLEObj( const svt::EmbeddedObjectRef& pObj ); - SwOLEObj( const String &rName, sal_Int64 nAspect ); - ~SwOLEObj(); - - sal_Bool UnloadObject(); - static sal_Bool UnloadObject( ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > xObj, - const SwDoc* pDoc, - sal_Int64 nAspect ); - - String GetDescription(); - -#ifndef _FESHVIEW_ONLY_INLINE_NEEDED - const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef(); - svt::EmbeddedObjectRef& GetObject(); - const String& GetCurrentPersistName() const { return aName; } - sal_Bool IsOleRef() const; // To avoid unneccessary loading of object. -#endif -}; - - - -// SwOLENode - -class SW_DLLPUBLIC SwOLENode: public SwNoTxtNode -{ - friend class SwNodes; - mutable SwOLEObj aOLEObj; - Graphic* pGraphic; - String sChartTblName; // with chart objects: name of referenced table. - sal_Bool bOLESizeInvalid; // Should be considered at SwDoc::PrtOLENotify - // (e.g. copied). Is not persistent. - - SwEmbedObjectLink* mpObjectLink; - String maLinkURL; - - SwOLENode( const SwNodeIndex &rWhere, - const svt::EmbeddedObjectRef&, - SwGrfFmtColl *pGrfColl, - SwAttrSet* pAutoAttr = 0 ); - - SwOLENode( const SwNodeIndex &rWhere, - const String &rName, - sal_Int64 nAspect, - SwGrfFmtColl *pGrfColl, - SwAttrSet* pAutoAttr = 0 ); - - // aOLEObj has a private Copy-Ctor. We need one too: - SwOLENode( const SwOLENode & ); - - using SwNoTxtNode::GetGraphic; - -public: - const SwOLEObj& GetOLEObj() const { return aOLEObj; } - SwOLEObj& GetOLEObj() { return aOLEObj; } - ~SwOLENode(); - - virtual SwCntntNode *SplitCntntNode( const SwPosition & ); - - // Is in ndcopy.cxx. - virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const; - - virtual Size GetTwipSize() const; - - Graphic* GetGraphic(); - - void GetNewReplacement(); - - virtual sal_Bool SavePersistentData(); - virtual sal_Bool RestorePersistentData(); - - sal_Bool IsInGlobalDocSection() const; - sal_Bool IsOLEObjectDeleted() const; - - sal_Bool IsOLESizeInvalid() const { return bOLESizeInvalid; } - void SetOLESizeInvalid( sal_Bool b ){ bOLESizeInvalid = b; } - - sal_Int64 GetAspect() const { return aOLEObj.GetObject().GetViewAspect(); } - void SetAspect( sal_Int64 nAspect) { aOLEObj.GetObject().SetViewAspect( nAspect ); } - - // Remove OLE-object from "memory". - // inline void Unload() { aOLEObj.Unload(); } - String GetDescription() const { return aOLEObj.GetDescription(); } - - sal_Bool UpdateLinkURL_Impl(); - void BreakFileLink_Impl(); - void DisconnectFileLink_Impl(); - - void CheckFileLink_Impl(); - - // #i99665# - bool IsChart() const; - - -#ifndef _FESHVIEW_ONLY_INLINE_NEEDED - const String& GetChartTblName() const { return sChartTblName; } - void SetChartTblName( const String& rNm ) { sChartTblName = rNm; } -#endif -}; - - -// Inline methods from Node.hxx - we know TxtNode only here!! -inline SwOLENode *SwNode::GetOLENode() -{ - return ND_OLENODE == nNodeType ? (SwOLENode*)this : 0; -} -inline const SwOLENode *SwNode::GetOLENode() const -{ - return ND_OLENODE == nNodeType ? (const SwOLENode*)this : 0; -} - -#endif // _NDOLE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx deleted file mode 100644 index 0b8f9f7a0e..0000000000 --- a/sw/inc/ndtxt.hxx +++ /dev/null @@ -1,864 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_NDTXT_HXX -#define SW_NDTXT_HXX - -#include <cppuhelper/weakref.hxx> - -#include "swdllapi.h" -#include <node.hxx> -#include <hintids.hxx> -#include <ndhints.hxx> -#include <modeltoviewhelper.hxx> -#include <SwNumberTreeTypes.hxx> -#include <IDocumentContentOperations.hxx> -#include <osl/diagnose.h> - -#include <sfx2/Metadatable.hxx> - -#include <vector> -#include <set> - -class SfxHint; -class SwNumRule; -class SwNodeNum; -class SwList; -class SvxLRSpaceItem; - -namespace utl { - class TransliterationWrapper; -} - -class SwTxtFmtColl; -class SwCntntFrm; -class SwTxtFld; // For GetTxtFld(). -class SfxItemSet; -class SwUndoTransliterate; - -struct SwSpellArgs; // for Spell(), splargs.hxx -struct SwConversionArgs; // for Convert(), splargs.hxx -class SwInterHyphInfo; // for Hyphenate(), splargs.hxx -class SwWrongList; // For OnlineSpelling. -class SwGrammarMarkUp; -class OutputDevice; -class SwScriptInfo; -struct SwDocStat; -struct SwParaIdleData_Impl; - -namespace com { namespace sun { namespace star { - namespace uno { - template < class > class Sequence; - } - namespace text { class XTextContent; } -} } } - -typedef std::set< xub_StrLen > SwSoftPageBreakList; - -// SwTxtNode -class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable -{ - - // For creating the first TextNode. - friend class SwDoc; // CTOR and AppendTxtNode() - friend class SwNodes; - friend class SwTxtFrm; - friend class SwScriptInfo; - - // May be 0. It is only then not 0 if it contains hard attributes. - // Therefore: never access directly! - SwpHints *m_pSwpHints; - - mutable SwNodeNum* mpNodeNum; // Numbering for this paragraph. - - XubString m_Text; - - SwParaIdleData_Impl* m_pParaIdleData_Impl; - - // Some of the chars this para are hidden. Paragraph has to be reformatted - // on changing the view to print preview. - mutable bool m_bContainsHiddenChars : 1; - // The whole paragraph is hidden because of the hidden text attribute - mutable bool m_bHiddenCharsHidePara : 1; - // The last two flags have to be recalculated if this flag is set: - mutable bool m_bRecalcHiddenCharFlags : 1; - - mutable bool m_bLastOutlineState : 1; - bool m_bNotifiable; - - // sal_uInt8 nOutlineLevel; //#outline level, removed by zhaojianwei. - bool mbEmptyListStyleSetDueToSetOutlineLevelAttr; - - // boolean, indicating that a <SetAttr(..)> or <ResetAttr(..)> or - // <ResetAllAttr(..)> method is running. - // Needed to avoid duplicate handling of attribute change actions. - bool mbInSetOrResetAttr; - - // pointer to the list, to whose the text node is added to - SwList* mpList; - - ::std::auto_ptr< ::rtl::OUString > m_pNumStringCache; - - ::com::sun::star::uno::WeakReference< - ::com::sun::star::text::XTextContent> m_wXParagraph; - - SW_DLLPRIVATE SwTxtNode( const SwNodeIndex &rWhere, SwTxtFmtColl *pTxtColl, - const SfxItemSet* pAutoAttr = 0 ); - - // Copies the attributes at nStart to pDest. - SW_DLLPRIVATE void CopyAttr( SwTxtNode *pDest, const xub_StrLen nStart, const xub_StrLen nOldPos); - - SW_DLLPRIVATE SwTxtNode* _MakeNewTxtNode( const SwNodeIndex&, sal_Bool bNext = sal_True, - sal_Bool bChgFollow = sal_True ); - - SW_DLLPRIVATE void CutImpl( - SwTxtNode * const pDest, const SwIndex & rDestStart, - const SwIndex & rStart, /*const*/ xub_StrLen nLen, - const bool bUpdate = true ); - - // Move all comprising hard attributes to the AttrSet of the paragraph. - SW_DLLPRIVATE void MoveTxtAttr_To_AttrSet(); // Called by SplitNode. - - // Create the specific AttrSet. - SW_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& ); - - SW_DLLPRIVATE void Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt, - xub_StrLen nEndPos, sal_Bool bExpandFlds ) const; - - // Optimization: Asking for information about hidden characters at SwScriptInfo - // updates these flags. - inline bool IsCalcHiddenCharFlags() const - { return m_bRecalcHiddenCharFlags; } - inline void SetHiddenCharAttribute( bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars ) const - { - m_bHiddenCharsHidePara = bNewHiddenCharsHidePara; - m_bContainsHiddenChars = bNewContainsHiddenChars; - m_bRecalcHiddenCharFlags = false; - } - - SW_DLLPRIVATE void CalcHiddenCharFlags() const; - - SW_DLLPRIVATE SwNumRule * _GetNumRule(sal_Bool bInParent = sal_True) const; - - SW_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM, - LanguageType nLang, sal_uInt16 nLangWhichId, - const Font *pFont, sal_uInt16 nFontWhichId ); - - // - // Start: Data collected during idle time - // - SW_DLLPRIVATE void SetParaNumberOfWords( sal_uLong nTmpWords ) const; - SW_DLLPRIVATE sal_uLong GetParaNumberOfWords() const; - SW_DLLPRIVATE void SetParaNumberOfChars( sal_uLong nTmpChars ) const; - SW_DLLPRIVATE sal_uLong GetParaNumberOfChars() const; - SW_DLLPRIVATE void SetParaNumberOfCharsExcludingSpaces( sal_uLong nTmpChars ) const; - SW_DLLPRIVATE sal_uLong GetParaNumberOfCharsExcludingSpaces() const; - SW_DLLPRIVATE void InitSwParaStatistics( bool bNew ); - - /** create number for this text node, if not already existing - - @return number of this node - */ - SwNodeNum* CreateNum() const; - - inline void TryDeleteSwpHints(); - - SW_DLLPRIVATE void impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet); - -public: - bool IsWordCountDirty() const; - bool IsWrongDirty() const; - bool IsGrammarCheckDirty() const; - bool IsSmartTagDirty() const; // SMARTTAGS - bool IsAutoCompleteWordDirty() const; - void SetWordCountDirty( bool bNew ) const; - void SetWrongDirty( bool bNew ) const; - void SetGrammarCheckDirty( bool bNew ) const; - void SetSmartTagDirty( bool bNew ) const; // SMARTTAGS - void SetAutoCompleteWordDirty( bool bNew ) const; - void SetWrong( SwWrongList* pNew, bool bDelete = true ); - SwWrongList* GetWrong(); - const SwWrongList* GetWrong() const; - void SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete = true ); - SwGrammarMarkUp* GetGrammarCheck(); - // SMARTTAGS - void SetSmartTags( SwWrongList* pNew, bool bDelete = true ); - SwWrongList* GetSmartTags(); - - // - // End: Data collected during idle time - // -protected: - // fuers Umhaengen der TxtFmtCollections (Outline-Nummerierung!!) - virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ); - virtual void SwClientNotify( const SwModify&, const SfxHint& ); - -public: - using SwCntntNode::GetAttr; - - const String& GetTxt() const { return m_Text; } - - // getters for SwpHints - inline SwpHints &GetSwpHints(); - inline const SwpHints &GetSwpHints() const; - inline SwpHints *GetpSwpHints() { return m_pSwpHints; } - inline const SwpHints *GetpSwpHints() const { return m_pSwpHints; } - inline bool HasHints() const { return m_pSwpHints ? true : false; } - inline SwpHints &GetOrCreateSwpHints(); - - virtual ~SwTxtNode(); - - virtual xub_StrLen Len() const; - - // Is in itratr. - void GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs, - OutputDevice* pOut = 0 ) const; - - // overriding to handle change of certain paragraph attributes - virtual sal_Bool SetAttr( const SfxPoolItem& ); - virtual sal_Bool SetAttr( const SfxItemSet& rSet ); - virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 ); - virtual sal_Bool ResetAttr( const std::vector<sal_uInt16>& rWhichArr ); - virtual sal_uInt16 ResetAllAttr(); - - /// insert text content - void InsertText( const XubString & rStr, const SwIndex & rIdx, - const enum IDocumentContentOperations::InsertFlags nMode - = IDocumentContentOperations::INS_DEFAULT ); - - /** delete text content - ATTENTION: must not be called with a range that overlaps the start of - an attribute with both extent and dummy char - */ - void EraseText ( const SwIndex &rIdx, const xub_StrLen nCount = STRING_LEN, - const enum IDocumentContentOperations::InsertFlags nMode - = IDocumentContentOperations::INS_DEFAULT ); - - /** delete all attributes. - If neither pSet nor nWhich is given, delete all attributes (except - refmarks, toxmarks, meta) in range. - @param rIdx start position - @param nLen range in which attributes will be deleted - @param pSet if not 0, delete only attributes contained in pSet - @param nWhich if not 0, delete only attributes with matching which - @param bInclRefToxMark - refmarks, toxmarks, and metas will be ignored unless this is true - ATTENTION: setting bInclRefToxMark is only allowed from UNDO! - */ - void RstAttr( const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich = 0, - const SfxItemSet* pSet = 0, sal_Bool bInclRefToxMark = sal_False ); - void GCAttr(); - - // Delete text attribute (needs to be deregistered at Pool!) - void DestroyAttr( SwTxtAttr* pAttr ); - - // delete all attributes from SwpHintsArray. - void ClearSwpHintsArr( bool bDelFields ); - - /// Insert pAttr into hints array. @return true iff inserted successfully - bool InsertHint( SwTxtAttr * const pAttr, - const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT ); - /// create new text attribute from rAttr and insert it - /// @return inserted hint; 0 if not sure the hint is inserted - SwTxtAttr* InsertItem( SfxPoolItem& rAttr, - const xub_StrLen nStart, const xub_StrLen nEnd, - const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT ); - - // Set these attributes at TextNode. If the whole range is comprised - // set them only in AutoAttrSet (SwCntntNode::SetAttr). - sal_Bool SetAttr( const SfxItemSet& rSet, - xub_StrLen nStt, xub_StrLen nEnd, - const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT ); - // Query the attributes of textnode over the range. - // Introduce 4th optional parameter <bMergeIndentValuesOfNumRule>. - // If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of - // the corresponding list level of an applied list style is merged into - // the requested item set as a LR-SPACE item, if <bOnlyTxtAttr> == sal_False, - // corresponding node has not its own indent attributes and the - // position-and-space mode of the list level is SvxNumberFormat::LABEL_ALIGNMENT. - sal_Bool GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd, - sal_Bool bOnlyTxtAttr = sal_False, - sal_Bool bGetFromChrFmt = sal_True, - const bool bMergeIndentValuesOfNumRule = false ) const; - - // Convey attributes of an AttrSet (AutoFmt) to SwpHintsArray. - void FmtToTxtAttr( SwTxtNode* pNd ); - - /// delete all attributes of type nWhich at nStart (opt. end nEnd) - void DeleteAttributes( const sal_uInt16 nWhich, - const xub_StrLen nStart, const xub_StrLen nEnd = 0 ); - /// delete the attribute pTxtAttr - void DeleteAttribute ( SwTxtAttr * const pTxtAttr ); - - // Actions on text and attributes. - // introduce optional parameter to control, if all attributes have to be copied. - void CopyText( SwTxtNode * const pDest, - const SwIndex &rStart, - const xub_StrLen nLen, - const bool bForceCopyOfAllAttrs = false ); - void CopyText( SwTxtNode * const pDest, - const SwIndex &rDestStart, - const SwIndex &rStart, - xub_StrLen nLen, - const bool bForceCopyOfAllAttrs = false ); - - void CutText(SwTxtNode * const pDest, - const SwIndex & rStart, const xub_StrLen nLen); - inline void CutText(SwTxtNode * const pDest, const SwIndex &rDestStart, - const SwIndex & rStart, const xub_StrLen nLen); - - /// replace nDelLen characters at rStart with rText - void ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen, - const XubString& rText ); - void ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen, const XubString& rText, - const ::com::sun::star::uno::Sequence<sal_Int32>& rOffsets ); - - // Virtual methods from CntntNode. - virtual SwCntntFrm *MakeFrm( SwFrm* ); - virtual SwCntntNode *SplitCntntNode( const SwPosition & ); - virtual SwCntntNode *JoinNext(); - virtual SwCntntNode *JoinPrev(); - - SwCntntNode *AppendNode( const SwPosition & ); - - // When appropriate set DontExpand-flag at INet or character styles respectively. - sal_Bool DontExpandFmt( const SwIndex& rIdx, bool bFlag = true, - sal_Bool bFmtToTxtAttributes = sal_True ); - - enum GetTxtAttrMode { - DEFAULT, /// DEFAULT: (Start < nIndex <= End) - EXPAND, /// EXPAND : (Start <= nIndex < End) - PARENT, /// PARENT : (Start < nIndex < End) - }; - - /** get the innermost text attribute covering position nIndex. - @param nWhich only attribute with this id is returned. - @param eMode the predicate for matching (@see GetTxtAttrMode). - - ATTENTION: this function is not well-defined for those - hints of which several may cover a single position, like - RES_TXTATR_CHARFMT, RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK - */ - SwTxtAttr *GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich, - enum GetTxtAttrMode const eMode = DEFAULT) const; - - /** get the innermost text attributes covering position nIndex. - @param nWhich only attributes with this id are returned. - @param eMode the predicate for matching (@see GetTxtAttrMode). - */ - ::std::vector<SwTxtAttr *> GetTxtAttrsAt(xub_StrLen const nIndex, - RES_TXTATR const nWhich, - enum GetTxtAttrMode const eMode = DEFAULT) const; - - /** get the text attribute at position nIndex which owns - the dummy character CH_TXTATR_* at that position, if one exists. - @param nIndex the position in the text - @param nWhich if different from RES_TXTATR_END, return only - attribute with given which id - @return the text attribute at nIndex of type nWhich, if it exists - */ - SwTxtAttr *GetTxtAttrForCharAt( const xub_StrLen nIndex, - const RES_TXTATR nWhich = RES_TXTATR_END ) const; - - XubString GetCurWord(xub_StrLen) const; - sal_uInt16 Spell(SwSpellArgs*); - sal_uInt16 Convert( SwConversionArgs & ); - - inline SwTxtFmtColl *GetTxtColl() const; - virtual SwFmtColl *ChgFmtColl( SwFmtColl* ); - void _ChgTxtCollUpdateNum( const SwTxtFmtColl* pOld, - const SwTxtFmtColl* pNew ); - - // Copy collection with all auto formats to dest-node. - // The latter might be in an other document! - // (Method in ndcopy.cxx!!). - void CopyCollFmt( SwTxtNode& rDestNd ); - - //const SwNodeNum* _GetNodeNum() const { return pNdNum; } - - // - // BEGIN OF BULLET/NUMBERING/OUTLINE STUFF: - // - - /** - Returns numbering rule of this text node. - - @param bInParent serach in parent attributes, too - - @return numbering rule of this text node or NULL if none is set - */ - SwNumRule *GetNumRule(sal_Bool bInParent = sal_True) const; - - inline const SwNodeNum* GetNum() const - { - return mpNodeNum; - } - - SwNumberTree::tNumberVector GetNumberVector() const; - - /** - Returns if this text node is an outline. - - @retval true this text node is an outline - @retval false else - */ - bool IsOutline() const; - - bool IsOutlineStateChanged() const; - - void UpdateOutlineState(); - - /** Returns if this text node may be numbered. - - A text node may be numbered if - - it has no SwNodeNum - - it has a SwNodeNum and it has a numbering rule and the according - SwNumFmt defines a numbering type that is an enumeration. - - @retval sal_True this text node may be numbered - @retval sal_False else - */ - //sal_Bool MayBeNumbered() const; - - /** - Notify this textnode that its numbering rule has changed. - */ - void NumRuleChgd(); - - /** Returns outline of numbering string - - Introduce parameter <_bInclPrefixAndSuffixStrings> in order to control, - if the prefix and the suffix strings have to been included or not. - - @param _bInclPrefixAndSuffixStrings - optional input parameter - boolean indicating, if the prefix and the - suffix strings have to been included or not. default value = <true> - - @param _nRestrictToThisLevel - optional input parameter - unsigned integer indicating the maximum outline - level to which the output string must be restricted to. Default value is - MAXLEVEL - */ - XubString GetNumString( const bool _bInclPrefixAndSuffixStrings = true, const unsigned int _nRestrictToThisLevel = MAXLEVEL ) const; - - /** - Returns the additional indents of this text node and its numbering. - - @param bTxtLeft ??? - - @return additional indents - */ - long GetLeftMarginWithNum( sal_Bool bTxtLeft = sal_False ) const; - - /** - Returns the combined first line indent of this text node and - its numbering. - - @param the first line indent of this text node taking the - numbering into account (return parameter) - - @retval sal_True this node has SwNodeNum and has numbering rule - @retval sal_False else - */ - sal_Bool GetFirstLineOfsWithNum( short& rFirstOffset ) const; - - SwTwips GetAdditionalIndentForStartingNewList() const; - - void ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const; - - /** return left margin for tab stop position calculation - - Needed for text formatting - Method considers new list level attributes, which also can provide a left margin value - - @author OD - */ - long GetLeftMarginForTabCalculation() const; - - /** Returns if this text node has a number. - - This text node has a number if it has a SwNodeNum and a - numbering rule and the numbering format specified for the - level of the SwNodeNum is of an enumeration type. - - @retval sal_True This text node has a number. - @retval sal_False else - */ - sal_Bool HasNumber() const; - - /** Returns if this text node has a bullet. - - This text node has a bullet if it has a SwNodeNum and a - numbering rule and the numbering format specified for the - level of the SwNodeNum is of a bullet type. - - @retval sal_True This text node has a bullet. - @retval sal_False else - */ - sal_Bool HasBullet() const; - - /** Returns is this text node is numbered. - - This node is numbered if it has a SwNodeNum and it has a - numbering rule and has not a hidden SwNodeNum. - - ATTENTION: Returns sal_True even if the SwNumFmt has type - SVX_NUM_NUMBER_NONE. - - @retval sal_True This node is numbered. - @retval sal_False else - */ - sal_Bool IsNumbered() const; - - /** Returns if this text node has a marked label. - - @retval true This text node has a marked label. - @retval false else - */ - bool HasMarkedLabel() const; - - /** Sets the list level of this text node. - - Side effect, when the text node is a list item: - The text node's representation in the list tree (<SwNodeNum> instance) - is updated. - - @param nLevel level to set - */ - void SetAttrListLevel(int nLevel); - - bool HasAttrListLevel() const; - - int GetAttrListLevel() const; - - /** Returns the actual list level of this text node, when it is a list item - - @return the actual list level of this text node, if it is a list item, - -1 otherwise - */ - int GetActualListLevel() const; - - /** - Returns outline level of this text node. - - If a text node has an outline number (i.e. it has an SwNodeNum - and a outline numbering rule) the outline level is the level of - this SwNodeNum. - - If a text node has no outline number and has a paragraph style - attached the outline level is the outline level of the - paragraph style. - - Otherwise the text node has no outline level (NO_NUMBERING). - - NOTE: The outline level of text nodes is subject to change. The - plan is to have an SwTxtNode::nOutlineLevel member that is - updated from a paragraph style upon appliance of that paragraph - style. - - @return outline level or NO_NUMBERING if there is no outline level - */ - int GetAttrOutlineLevel() const;//#OutlineLevel,added by zhaojianwei - - /** - Sets the out line level *at* a text node. - - @param nLevel the level to be set - - If the text node has an outline number the level is set at the - outline number. - - If the text node has no outline number but has a paragraph - style applied the outline level is set at the paragraph style. - - NOTE: This is subject to change, see GetOutlineLevel. - */ - void SetAttrOutlineLevel(int nLevel);//#OutlineLevel,added by zhaojianwei - - bool IsEmptyListStyleDueToSetOutlineLevelAttr(); - void SetEmptyListStyleDueToSetOutlineLevelAttr(); - void ResetEmptyListStyleDueToResetOutlineLevelAttr(); - - /** - Returns the width of leading tabs/blanks in this paragraph. - This space will be converted into numbering indent if the paragraph - is set to be numbered. - - @return the width of the leading whitespace - */ - sal_uInt16 GetWidthOfLeadingTabs() const; - - /** - Returns if the paragraph has a visible numbering or bullet. - This includes all kinds of numbering/bullet/outlines. - Note: This function returns false, if the numbering format is - SVX_NUM_NUMBER_NONE or if the numbering/bullet has been deleted. - - @return sal_True if the paragraph has a visible numbering/bullet/outline - */ - bool HasVisibleNumberingOrBullet() const; - - void SetListId( const String sListId ); - String GetListId() const; - - /** Determines, if the list level indent attributes can be applied to the - paragraph. - - The list level indents can be applied to the paragraph under the one - of following conditions: - - the list style is directly applied to the paragraph and the paragraph - has no own indent attributes. - - the list style is applied to the paragraph through one of its paragraph - styles, the paragraph has no own indent attributes and on the paragraph - style hierarchy from the paragraph to the paragraph style with the - list style no indent attributes are found. - - @author OD - - @return boolean - */ - bool AreListLevelIndentsApplicable() const; - - /** Retrieves the list tab stop position, if the paragraph's list level defines - one and this list tab stop has to merged into the tap stops of the paragraph - - @author OD - - @param nListTabStopPosition - output parameter - containing the list tab stop position - - @return boolean - indicating, if a list tab stop position is provided - */ - bool GetListTabStopPosition( long& nListTabStopPosition ) const; - - /** Retrieves the character following the list label, if the paragraph's - list level defines one. - - @author OD - - @return XubString - the list tab stop position - */ - XubString GetLabelFollowedBy() const; - - // - // END OF BULLET/NUMBERING/OUTLINE STUFF: - // - - void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const; - - sal_uInt16 GetLang( const xub_StrLen nBegin, const xub_StrLen nLen = 0, - sal_uInt16 nScript = 0 ) const; - - // in ndcopy.cxx - sal_Bool IsSymbol( const xub_StrLen nBegin ) const; // In itratr.cxx. - virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const; - - // Interactive hyphenation: we find TxtFrm and call its CalcHyph. - sal_Bool Hyphenate( SwInterHyphInfo &rHyphInf ); - void DelSoftHyph( const xub_StrLen nStart, const xub_StrLen nEnd ); - - // add 4th optional parameter <bAddSpaceAfterListLabelStr> indicating, - // when <bWithNum = true> that a space is inserted after the string for - // the list label. - // add 5th optional parameter <bWithSpacesForLevel> indicating, if additional - // spaces are inserted in front of the expanded text string depending on - // the list level. - XubString GetExpandTxt( const xub_StrLen nIdx = 0, - const xub_StrLen nLen = STRING_LEN, - const bool bWithNum = false, - const bool bAddSpaceAfterListLabelStr = false, - const bool bWithSpacesForLevel = false ) const; - sal_Bool GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0, - xub_StrLen nIdx = 0, xub_StrLen nLen = STRING_LEN, - sal_Bool bWithNum = sal_False, sal_Bool bWithFtn = sal_True, - sal_Bool bReplaceTabsWithSpaces = sal_False ) const; - - const ModelToViewHelper::ConversionMap* - BuildConversionMap( rtl::OUString& rExpandText ) const; - - XubString GetRedlineTxt( xub_StrLen nIdx = 0, - xub_StrLen nLen = STRING_LEN, - sal_Bool bExpandFlds = sal_False, - sal_Bool bWithNum = sal_False ) const; - - // Returns actual count of initial chars for initial-function. - // If nWishLen == 0 that of first word. - sal_uInt16 GetDropLen( sal_uInt16 nWishLen) const; - - // Passes back info needed on the dropcap dimensions - bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const; - - // Hidden Paragraph Field: - inline bool CalcHiddenParaField() - { return m_pSwpHints ? m_pSwpHints->CalcHiddenParaField() : false; } - // set CalcVisible flags - inline void SetCalcHiddenParaField() - { if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); } - - // is the paragraph visible? - inline bool HasHiddenParaField() const - { return m_pSwpHints ? m_pSwpHints->HasHiddenParaField() : false; } - - // - // Hidden Paragraph Field: - // - inline bool HasHiddenCharAttribute( bool bWholePara ) const - { - if ( m_bRecalcHiddenCharFlags ) - CalcHiddenCharFlags(); - return bWholePara ? m_bHiddenCharsHidePara : m_bContainsHiddenChars; - } - - inline void SetCalcHiddenCharFlags() const - { m_bRecalcHiddenCharFlags = true; } - - // - // Returns if the node is hidden due to - // 1. HiddenParaField - // 2. HiddenCharAttribute - // 3. HiddenSection - // - bool IsHidden() const; - - TYPEINFO(); // fuer rtti - - // override SwIndexReg - virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen, - const bool bNegative = false, const bool bDelete = false ); - - // change text to Upper/Lower/Hiragana/Katagana/... - void TransliterateText( utl::TransliterationWrapper& rTrans, - xub_StrLen nStart, xub_StrLen nEnd, - SwUndoTransliterate* pUndo = 0 ); - - // count words in given range - void CountWords( SwDocStat& rStat, xub_StrLen nStart, xub_StrLen nEnd ) const; - - // Checks some global conditions like loading or destruction of document - // to economize notifications - bool IsNotificationEnabled() const; - - // Checks a temporary notification blocker and the global conditons of IsNotificationEnabled() - bool IsNotifiable() const; - - void SetListRestart( bool bRestart ); - bool IsListRestart() const; - - void SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNum ); - bool HasAttrListRestartValue() const; - SwNumberTree::tSwNumTreeNumber GetAttrListRestartValue() const; - SwNumberTree::tSwNumTreeNumber GetActualListStartValue() const; - - void SetCountedInList( bool bCounted ); - bool IsCountedInList() const; - - void AddToList(); - void RemoveFromList(); - bool IsInList() const; - - bool IsFirstOfNumRule() const; - - sal_uInt16 GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) const; - - SW_DLLPRIVATE ::com::sun::star::uno::WeakReference< - ::com::sun::star::text::XTextContent> const& GetXParagraph() const - { return m_wXParagraph; } - SW_DLLPRIVATE void SetXParagraph(::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent> const& xParagraph) - { m_wXParagraph = xParagraph; } - - // sfx2::Metadatable - virtual ::sfx2::IXmlIdRegistry& GetRegistry(); - virtual bool IsInClipboard() const; - virtual bool IsInUndo() const; - virtual bool IsInContent() const; - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::rdf::XMetadatable > MakeUnoObject(); - - bool IsCollapse() const; - - DECL_FIXEDMEMPOOL_NEWDEL(SwTxtNode) -}; - -//----------------------------------------------------------------------------- - -inline SwpHints & SwTxtNode::GetSwpHints() -{ - OSL_ASSERT( m_pSwpHints ); - return *m_pSwpHints; -} -inline const SwpHints &SwTxtNode::GetSwpHints() const -{ - OSL_ASSERT( m_pSwpHints ); - return *m_pSwpHints; -} - -inline SwpHints& SwTxtNode::GetOrCreateSwpHints() -{ - if ( !m_pSwpHints ) - { - m_pSwpHints = new SwpHints; - } - return *m_pSwpHints; -} - -inline void SwTxtNode::TryDeleteSwpHints() -{ - if ( m_pSwpHints && m_pSwpHints->CanBeDeleted() ) - { - DELETEZ( m_pSwpHints ); - } -} - -inline SwTxtFmtColl* SwTxtNode::GetTxtColl() const -{ - return static_cast<SwTxtFmtColl*>(const_cast<SwModify*>(GetRegisteredIn())); -} - -// For IBM-Compiler do not inline this because of 42876 -#ifndef ICC -// Inline methods from Node.hxx - we know TxtNode only now!! -inline SwTxtNode *SwNode::GetTxtNode() -{ - return ND_TEXTNODE == nNodeType ? static_cast<SwTxtNode*>(this) : 0; -} -inline const SwTxtNode *SwNode::GetTxtNode() const -{ - return ND_TEXTNODE == nNodeType ? static_cast<const SwTxtNode*>(this) : 0; -} -#endif - -inline void -SwTxtNode::CutText(SwTxtNode * const pDest, const SwIndex & rDestStart, - const SwIndex & rStart, const xub_StrLen nLen) -{ - CutImpl( pDest, rDestStart, rStart, nLen, true ); -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ndtyp.hxx b/sw/inc/ndtyp.hxx deleted file mode 100644 index fb982ea766..0000000000 --- a/sw/inc/ndtyp.hxx +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _NDTYP_HXX -#define _NDTYP_HXX - -#include <tools/solar.h> - -// IDs for different nodes. The member indicating the type of node is -// in base class. -const sal_uInt8 ND_ENDNODE = 0x01; -const sal_uInt8 ND_STARTNODE = 0x02; -const sal_uInt8 ND_TABLENODE = 0x06; -const sal_uInt8 ND_TEXTNODE = 0x08; -const sal_uInt8 ND_GRFNODE = 0x10; -const sal_uInt8 ND_OLENODE = 0x20; - -const sal_uInt8 ND_CONTENTNODE = 0x38; // ContentNode (one of the 3 bits). -const sal_uInt8 ND_NOTXTNODE = 0x30; // NoTxtNode (one of the 2 bits). - -const sal_uInt8 ND_SECTIONNODE = 0x42; -// For internal use only!! -const sal_uInt8 ND_SECTIONDUMMY = 0x40; //(ND_SECTIONNODE & ~ND_STARTNODE); - -// Special types of StartNodes that are not derivations but keep -// "sections" together. -enum SwStartNodeType -{ - SwNormalStartNode = 0, - SwTableBoxStartNode, - SwFlyStartNode, - SwFootnoteStartNode, - SwHeaderStartNode, - SwFooterStartNode -}; - -// is the node the first and/or last node of a section? -// This information is used for the export filters. Our layout never have a -// distance before or after if the node is the first or last in a section. -const sal_uInt8 ND_HAS_PREV_LAYNODE = 0x01; -const sal_uInt8 ND_HAS_NEXT_LAYNODE = 0x02; - - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/newhdl.hxx b/sw/inc/newhdl.hxx deleted file mode 100644 index 652ade6260..0000000000 --- a/sw/inc/newhdl.hxx +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _NEWHDL_HXX -#define _NEWHDL_HXX - -#include <tools/link.hxx> - -// ---------------------------------------------------------------------------- - -extern void SW_NEW_HDL(); - -class SwNewHdl -{ - friend void SW_NEW_HDL(); -private: - char* pWarnMem; - char* pExceptMem; - Link aWarnLnk; - Link aErrLnk; -public: - void SetWarnLnk( const Link &rLink ); - void SetErrLnk( const Link &rLink ); - - sal_Bool TryWarnMem(); - - sal_Bool Flush_WarnMem(); - sal_Bool Flush_ExceptMem(); - - SwNewHdl(); - ~SwNewHdl(); -}; - -/****************************************************************************** - * INLINE - ******************************************************************************/ -inline void SwNewHdl::SetWarnLnk( const Link &rLink ) -{ - aWarnLnk = rLink; -} - -inline void SwNewHdl::SetErrLnk( const Link &rLink ) -{ - aErrLnk = rLink; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx deleted file mode 100644 index 53141d4ee6..0000000000 --- a/sw/inc/node.hxx +++ /dev/null @@ -1,749 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_NODE_HXX -#define SW_NODE_HXX - -#include <vector> - -#include <boost/utility.hpp> -#include <boost/shared_ptr.hpp> - -#include <tools/mempool.hxx> -#include <tools/gen.hxx> - -#include "swdllapi.h" -#include <ndarr.hxx> -#include <ndtyp.hxx> -#include <index.hxx> -#include <fmtcol.hxx> - -// --------------------- -// forward declarations -// --------------------- - -class SvUShorts; -class SwCntntFrm; -class SwCntntNode; -class SwDoc; -class SwEndNode; -class SwFrm; -class SwFrmFmt; -class SwGrfNode; -class SwNoTxtNode; -class SwNodeIndex; -class SwOLENode; -class SwRect; -class SwSection; -class SwSectionFmt; -class SwTOXBase; -class SwSectionNode; -class SwStartNode; -class SwTabFrm; -class SwRootFrm; -class SwTable; -class SwTableNode; -class SwTableBox; -class SwTxtNode; -class SwPageDesc; -class ViewShell; -struct SwPosition; -class IStyleAccess; -class IDocumentSettingAccess; -class IDocumentDeviceAccess; -class IDocumentMarkAccess; -class IDocumentRedlineAccess; -class IDocumentStylePoolAccess; -class IDocumentLineNumberAccess; -class IDocumentLinksAdministration; -class IDocumentFieldsAccess; -class IDocumentContentOperations; -class IDocumentListItems; -class SwOLENodes; - -// -------------------- -// class SwNode -// -------------------- -class SW_DLLPUBLIC SwNode : private /* public*/ BigPtrEntry -{ - friend class SwNodes; - -#if OSL_DEBUG_LEVEL > 1 - static long nSerial; - long nMySerial; -#endif - - sal_uInt8 nNodeType; - - // For text nodes: level of auto format. Was put here because we had still free bits. - sal_uInt8 nAFmtNumLvl : 3; - sal_Bool bSetNumLSpace : 1; // For numbering: TRUE: set indent. - sal_Bool bIgnoreDontExpand : 1; // for Text Attributes - ignore the flag - -protected: - SwStartNode* pStartOfSection; - - SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNodeId ); - - // for the initial StartNode - SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNodeId ); - -public: - virtual ~SwNode(); - -#if OSL_DEBUG_LEVEL > 1 - long int GetSerial() const { return nMySerial; } -#endif - - sal_uInt16 GetSectionLevel() const; - - inline sal_uLong StartOfSectionIndex() const; - inline const SwStartNode* StartOfSectionNode() const { return pStartOfSection; } - inline SwStartNode* StartOfSectionNode() { return pStartOfSection; } - - inline sal_uLong EndOfSectionIndex() const; - inline const SwEndNode* EndOfSectionNode() const; - inline SwEndNode* EndOfSectionNode(); - - inline sal_uInt8 GetAutoFmtLvl() const { return nAFmtNumLvl; } - inline void SetAutoFmtLvl( sal_uInt8 nVal ) { nAFmtNumLvl = nVal; } - - inline sal_Bool IsSetNumLSpace() const { return bSetNumLSpace; } - inline void SetNumLSpace( sal_Bool bFlag ) { bSetNumLSpace = bFlag; } - - inline sal_Bool IsIgnoreDontExpand() const { return bIgnoreDontExpand; } - inline void SetIgnoreDontExpand( sal_Bool bNew ) { bIgnoreDontExpand = bNew; } - - sal_uInt8 GetNodeType() const { return nNodeType; } - - inline SwStartNode *GetStartNode(); - inline const SwStartNode *GetStartNode() const; - inline SwCntntNode *GetCntntNode(); - inline const SwCntntNode *GetCntntNode() const; - inline SwEndNode *GetEndNode(); - inline const SwEndNode *GetEndNode() const; -#ifndef ICC - inline -#endif - SwTxtNode *GetTxtNode(); - -#ifndef ICC - inline -#endif - const SwTxtNode *GetTxtNode() const; - inline SwOLENode *GetOLENode(); - inline const SwOLENode *GetOLENode() const; - inline SwNoTxtNode *GetNoTxtNode(); - inline const SwNoTxtNode *GetNoTxtNode() const; - inline SwGrfNode *GetGrfNode(); - inline const SwGrfNode *GetGrfNode() const; - inline SwTableNode *GetTableNode(); - inline const SwTableNode *GetTableNode() const; - inline SwSectionNode *GetSectionNode(); - inline const SwSectionNode *GetSectionNode() const; - - inline sal_Bool IsStartNode() const; - inline sal_Bool IsCntntNode() const; - inline sal_Bool IsEndNode() const; - inline sal_Bool IsTxtNode() const; - inline sal_Bool IsTableNode() const; - inline sal_Bool IsSectionNode() const; - inline sal_Bool IsOLENode() const; - inline sal_Bool IsNoTxtNode() const; - inline sal_Bool IsGrfNode() const; - - /** - Checks if this node is in redlines. - - @retval sal_True this node is in redlines - @retval sal_False else - */ - sal_Bool IsInRedlines() const; - - // Search table node, in which it is. If it is in no table - // return 0. - SwTableNode *FindTableNode(); - inline const SwTableNode *FindTableNode() const; - - // Search section node, in which it is. If it is in no section - // return 0. - SwSectionNode *FindSectionNode(); - inline const SwSectionNode *FindSectionNode() const; - - SwStartNode* FindSttNodeByType( SwStartNodeType eTyp ); - inline const SwStartNode* FindSttNodeByType( SwStartNodeType eTyp ) const; - - const SwStartNode* FindTableBoxStartNode() const - { return FindSttNodeByType( SwTableBoxStartNode ); } - const SwStartNode* FindFlyStartNode() const - { return FindSttNodeByType( SwFlyStartNode ); } - const SwStartNode* FindFootnoteStartNode() const - { return FindSttNodeByType( SwFootnoteStartNode ); } - const SwStartNode* FindHeaderStartNode() const - { return FindSttNodeByType( SwHeaderStartNode ); } - const SwStartNode* FindFooterStartNode() const - { return FindSttNodeByType( SwFooterStartNode ); } - - // Node is in which nodes-array/doc? - inline SwNodes& GetNodes(); - inline const SwNodes& GetNodes() const; - inline SwDoc* GetDoc(); - inline const SwDoc* GetDoc() const; - - /** Provides access to the document setting interface - */ - const IDocumentSettingAccess* getIDocumentSettingAccess() const; - - /** Provides access to the document device interface - */ - const IDocumentDeviceAccess* getIDocumentDeviceAccess() const; - - /** Provides access to the document bookmark interface - */ - const IDocumentMarkAccess* getIDocumentMarkAccess() const; - - /** Provides access to the document redline interface - */ - const IDocumentRedlineAccess* getIDocumentRedlineAccess() const; - - /** Provides access to the document style pool interface - */ - const IDocumentStylePoolAccess* getIDocumentStylePoolAccess() const; - - /** Provides access to the document line number information interface - */ - const IDocumentLineNumberAccess* getIDocumentLineNumberAccess() const; - - /** Provides access to the document draw model interface - */ - const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const; - - /** Provides access to the document layout interface - */ - const IDocumentLayoutAccess* getIDocumentLayoutAccess() const; - IDocumentLayoutAccess* getIDocumentLayoutAccess(); - - /** Provides access to the document links administration interface - */ - const IDocumentLinksAdministration* getIDocumentLinksAdministration() const; - IDocumentLinksAdministration* getIDocumentLinksAdministration(); - - /** Provides access to the document fields administration interface - */ - const IDocumentFieldsAccess* getIDocumentFieldsAccess() const; - IDocumentFieldsAccess* getIDocumentFieldsAccess(); - - /** Provides access to the document content operations interface - */ - IDocumentContentOperations* getIDocumentContentOperations(); - - /** Provides access to the document automatic styles interface - */ - IStyleAccess& getIDocumentStyleAccess(); - - /** Provides access to the document's numbered items interface - - @author OD - */ - IDocumentListItems& getIDocumentListItems(); - - // Is node in the visible area of the Shell? - sal_Bool IsInVisibleArea( ViewShell* pSh = 0 ) const; - // Is node in an protected area? - sal_Bool IsInProtectSect() const; - // Is node in something that is protected (range, frame, - // table cells ... including anchor in case of frames or footnotes)? - sal_Bool IsProtect() const; - - // Search PageDesc with which this node is formated. If layout is existent - // search over layout, else only the hard way is left: search over the nodes - // to the front!! - const SwPageDesc* FindPageDesc( sal_Bool bCalcLay, sal_uInt32* pPgDescNdIdx = 0 ) const; - - // If node is in a fly return the respective format. - SwFrmFmt* GetFlyFmt() const; - - // If node is in a table return the respective table box. - SwTableBox* GetTblBox() const; - - inline sal_uLong GetIndex() const { return GetPos(); } - - const SwTxtNode* FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const; - - sal_uInt8 HasPrevNextLayNode() const; - -private: - // Private constructor because copying is never allowed!! - SwNode( const SwNode & rNodes ); - SwNode & operator= ( const SwNode & rNodes ); -}; - -// -------------------- -// class SwStartNode -// -------------------- -class SwStartNode: public SwNode -{ - friend class SwNode; - friend class SwNodes; - friend class SwEndNode; // to set the theEndOfSection !! - - SwEndNode* pEndOfSection; - SwStartNodeType eSttNdTyp; - - // for the initial StartNode - SwStartNode( SwNodes& rNodes, sal_uLong nPos ); - -protected: - SwStartNode( const SwNodeIndex &rWhere, - const sal_uInt8 nNodeType = ND_STARTNODE, - SwStartNodeType = SwNormalStartNode ); -public: - DECL_FIXEDMEMPOOL_NEWDEL(SwStartNode) - - SwStartNodeType GetStartNodeType() const { return eSttNdTyp; } - - // Call ChkCondcoll to all ContentNodes of section. - void CheckSectionCondColl() const; - -private: - // Private constructor because copying is never allowed!! - SwStartNode( const SwStartNode & rNode ); - SwStartNode & operator= ( const SwStartNode & rNode ); -}; - - -// -------------------- -// class SwEndNode -// -------------------- -class SwEndNode : public SwNode -{ - friend class SwNodes; - friend class SwTableNode; // To enable creation of its EndNote. - friend class SwSectionNode; // To enable creation of its EndNote. - - // for the initial StartNode - SwEndNode( SwNodes& rNodes, sal_uLong nPos, SwStartNode& rSttNd ); - -protected: - SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd ); - - DECL_FIXEDMEMPOOL_NEWDEL(SwEndNode) - -private: - // Private constructor because copying is never allowed!! - SwEndNode( const SwEndNode & rNode ); - SwEndNode & operator= ( const SwEndNode & rNode ); -}; - - -// -------------------- -// SwCntntNode -// -------------------- -class SW_DLLPUBLIC SwCntntNode: public SwModify, public SwNode, public SwIndexReg -{ - -//FEATURE::CONDCOLL - SwDepend* pCondColl; -//FEATURE::CONDCOLL - mutable bool mbSetModifyAtAttr; - -protected: - SwCntntNode( const SwNodeIndex &rWhere, const sal_uInt8 nNodeType, - SwFmtColl *pFmtColl ); - virtual ~SwCntntNode(); - - // Attribute-set for all auto attributes of a CntntNode. - // (e.g. TxtNode or NoTxtNode). - boost::shared_ptr<const SfxItemSet> mpAttrSet; - - // Make respective nodes create the specific AttrSets. - virtual void NewAttrSet( SwAttrPool& ) = 0; - - // There some functions that like to remove items from the internal - // SwAttrSet (handle): - sal_uInt16 ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds ); - - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - TYPEINFO(); //Already contained in base class Client. - - // MakeFrm will be called for a certain layout - // pSib is another SwFrm of the same layout (e.g. the SwRootFrm itself, a sibling, the parent) - virtual SwCntntFrm *MakeFrm( SwFrm* pSib ) = 0; - - virtual SwCntntNode *SplitCntntNode(const SwPosition & ) = 0; - - virtual SwCntntNode *JoinNext(); - virtual SwCntntNode *JoinPrev(); - // Is it possible to join two nodes? - // In pIdx the second position can be returned. - int CanJoinNext( SwNodeIndex* pIdx =0 ) const; - int CanJoinPrev( SwNodeIndex* pIdx =0 ) const; - - void MakeStartIndex( SwIndex * pIdx ) { pIdx->Assign( this, 0 ); } - void MakeEndIndex( SwIndex * pIdx ) { pIdx->Assign( this, Len() ); } - - sal_Bool GoNext(SwIndex *, sal_uInt16 nMode ) const; - sal_Bool GoPrevious(SwIndex *, sal_uInt16 nMode ) const; - - // Replacement for good old GetFrm(..): - SwCntntFrm *getLayoutFrm( const SwRootFrm*, - const Point* pDocPos = 0, - const SwPosition *pPos = 0, - const sal_Bool bCalcFrm = sal_True ) const; - // Returns the real size of the frame or an empty rectangle if - // no layout exists. Needed for export filters. - SwRect FindLayoutRect( const sal_Bool bPrtArea = sal_False, - const Point* pPoint = 0, - const sal_Bool bCalcFrm = sal_False ) const; - SwRect FindPageFrmRect( const sal_Bool bPrtArea = sal_False, - const Point* pPoint = 0, - const sal_Bool bCalcFrm = sal_False ) const; - - // Method creates all views of document for given node. The content - // frames that are created are put in the respective layout. - void MakeFrms( SwCntntNode& rNode ); - - // Method deletes all vies of document for the node. The content- - // frames are removed from the respective layout. - void DelFrms(); - - // Returns count of elements of node content. Default is 1. - // There are differences between text node and formula node. - virtual xub_StrLen Len() const; - - virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const = 0; - - // Get information from Client. - virtual sal_Bool GetInfo( SfxPoolItem& ) const; - - // SS for PoolItems: hard attributation. - - // If bInParent is FALSE search for attribute only in this node. - const SfxPoolItem& GetAttr( sal_uInt16 nWhich, sal_Bool bInParent=sal_True ) const; - sal_Bool GetAttr( SfxItemSet& rSet, sal_Bool bInParent=sal_True ) const; - // made virtual - virtual sal_Bool SetAttr( const SfxPoolItem& ); - virtual sal_Bool SetAttr( const SfxItemSet& rSet ); - virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 ); - virtual sal_Bool ResetAttr( const std::vector<sal_uInt16>& rWhichArr ); - virtual sal_uInt16 ResetAllAttr(); - - // Obtains attribute that is not delivered via conditional style! - const SfxPoolItem* GetNoCondAttr( sal_uInt16 nWhich, sal_Bool bInParents ) const; - - // Does node has already its own auto-attributes? - // Access to SwAttrSet. - inline const SwAttrSet &GetSwAttrSet() const; - inline const SwAttrSet *GetpSwAttrSet() const { return static_cast<const SwAttrSet*>(mpAttrSet.get()); } - inline sal_Bool HasSwAttrSet() const { return mpAttrSet ? sal_True : sal_False; } - - virtual SwFmtColl* ChgFmtColl( SwFmtColl* ); - SwFmtColl* GetFmtColl() const { return (SwFmtColl*)GetRegisteredIn(); } - -//FEATURE::CONDCOLL - inline SwFmtColl& GetAnyFmtColl() const; - void SetCondFmtColl( SwFmtColl* ); - inline SwFmtColl* GetCondFmtColl() const; - - sal_Bool IsAnyCondition( SwCollCondition& rTmp ) const; - void ChkCondColl(); -//FEATURE::CONDCOLL - - // Invalidates NumRule at the node. NumRule is updated - // on EndAction of a Shell at the latest. - sal_Bool InvalidateNumRule(); - - // determines the text direction for a certain - // position. Return -1, if text direction could *not* be determined. - short GetTextDirection( const SwPosition& rPos, - const Point* pPt ) const; - - inline void SetModifyAtAttr( bool bSetModifyAtAttr ) const { mbSetModifyAtAttr = bSetModifyAtAttr; } - inline bool GetModifyAtAttr() const { return mbSetModifyAtAttr; } - - static SwOLENodes* CreateOLENodesArray( const SwFmtColl& rColl, bool bOnlyWithInvalidSize ); - -private: - // Private constructor because copying is never allowed!! - SwCntntNode( const SwCntntNode & rNode ); - SwCntntNode & operator= ( const SwCntntNode & rNode ); -}; - - - -//--------- -// SwTableNode -//--------- -class SW_DLLPUBLIC SwTableNode : public SwStartNode, public SwModify -{ - friend class SwNodes; - SwTable* pTable; -protected: - virtual ~SwTableNode(); - -public: - SwTableNode( const SwNodeIndex & ); - - const SwTable& GetTable() const { return *pTable; } - SwTable& GetTable() { return *pTable; } - SwTabFrm *MakeFrm( SwFrm* ); - - // Creates the frms for the table node (i.e. the TabFrms). - void MakeFrms( SwNodeIndex* pIdxBehind ); - - // Method deletes all views of document for the node. - // The content frames are removed from the respective layout. - void DelFrms(); - - // Method creates all views of the document for the previous node. - // The content frames that are created are put into the respective layout. - void MakeFrms( const SwNodeIndex & rIdx ); - - SwTableNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const; - void SetNewTable( SwTable* , sal_Bool bNewFrames=sal_True ); - -private: - // Private constructor because copying is never allowed!! - SwTableNode( const SwTableNode & rNode ); - SwTableNode & operator= ( const SwTableNode & rNode ); -}; - - -//--------- -// SwSectionNode -//--------- -class SwSectionNode - : public SwStartNode - , private ::boost::noncopyable -{ - friend class SwNodes; - -private: - ::std::auto_ptr<SwSection> const m_pSection; - -protected: - virtual ~SwSectionNode(); - -public: - SwSectionNode(SwNodeIndex const&, - SwSectionFmt & rFmt, SwTOXBase const*const pTOXBase); - - const SwSection& GetSection() const { return *m_pSection; } - SwSection& GetSection() { return *m_pSection; } - - SwFrm *MakeFrm( SwFrm* ); - - // Creates the frms for the SectionNode (i.e. the SectionFrms). - // On default the frames are created until the end of the range. - // When another NodeIndex pEnd is passed a MakeFrms is called up to it. - // Used by TableToText. - void MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = NULL ); - - // Method deletes all views of document for the node. The - // content frames are removed from the respective layout. - void DelFrms(); - - // Method creates all views of document for the previous node. - // The content frames created are put into the respective layout. - void MakeFrms( const SwNodeIndex & rIdx ); - - SwSectionNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const; - - // Set pointer in format of section on itself. - void NodesArrChgd(); - - // ueberprueft bei _nicht_ versteckten Bereichen, ob es Inhalt gibt, der - // _nicht_ in einem versteckten (Unter-)Bereich liegt - // Check for not hidden areas whether there is content that is not in - // a hidden sub-area. - sal_Bool IsCntntHidden() const; - - -}; - - - -inline SwEndNode *SwNode::GetEndNode() -{ - return ND_ENDNODE == nNodeType ? (SwEndNode*)this : 0; -} -inline const SwEndNode *SwNode::GetEndNode() const -{ - return ND_ENDNODE == nNodeType ? (const SwEndNode*)this : 0; -} -inline SwStartNode *SwNode::GetStartNode() -{ - return ND_STARTNODE & nNodeType ? (SwStartNode*)this : 0; -} -inline const SwStartNode *SwNode::GetStartNode() const -{ - return ND_STARTNODE & nNodeType ? (const SwStartNode*)this : 0; -} -inline SwTableNode *SwNode::GetTableNode() -{ - return ND_TABLENODE == nNodeType ? (SwTableNode*)this : 0; -} -inline const SwTableNode *SwNode::GetTableNode() const -{ - return ND_TABLENODE == nNodeType ? (const SwTableNode*)this : 0; -} -inline SwSectionNode *SwNode::GetSectionNode() -{ - return ND_SECTIONNODE == nNodeType ? (SwSectionNode*)this : 0; -} -inline const SwSectionNode *SwNode::GetSectionNode() const -{ - return ND_SECTIONNODE == nNodeType ? (const SwSectionNode*)this : 0; -} -inline SwCntntNode *SwNode::GetCntntNode() -{ - return ND_CONTENTNODE & nNodeType ? (SwCntntNode*)this : 0; -} -inline const SwCntntNode *SwNode::GetCntntNode() const -{ - return ND_CONTENTNODE & nNodeType ? (const SwCntntNode*)this : 0; -} - - -inline sal_Bool SwNode::IsStartNode() const -{ - return ND_STARTNODE & nNodeType ? sal_True : sal_False; -} -inline sal_Bool SwNode::IsCntntNode() const -{ - return ND_CONTENTNODE & nNodeType ? sal_True : sal_False; -} -inline sal_Bool SwNode::IsEndNode() const -{ - return ND_ENDNODE == nNodeType ? sal_True : sal_False; -} -inline sal_Bool SwNode::IsTxtNode() const -{ - return ND_TEXTNODE == nNodeType ? sal_True : sal_False; -} -inline sal_Bool SwNode::IsTableNode() const -{ - return ND_TABLENODE == nNodeType ? sal_True : sal_False; -} -inline sal_Bool SwNode::IsSectionNode() const -{ - return ND_SECTIONNODE == nNodeType ? sal_True : sal_False; -} -inline sal_Bool SwNode::IsNoTxtNode() const -{ - return ND_NOTXTNODE & nNodeType ? sal_True : sal_False; -} -inline sal_Bool SwNode::IsOLENode() const -{ - return ND_OLENODE == nNodeType ? sal_True : sal_False; -} -inline sal_Bool SwNode::IsGrfNode() const -{ - return ND_GRFNODE == nNodeType ? sal_True : sal_False; -} - -inline const SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp ) const -{ - return ((SwNode*)this)->FindSttNodeByType( eTyp ); -} -inline const SwTableNode* SwNode::FindTableNode() const -{ - return ((SwNode*)this)->FindTableNode(); -} -inline const SwSectionNode* SwNode::FindSectionNode() const -{ - return ((SwNode*)this)->FindSectionNode(); -} -inline sal_uLong SwNode::StartOfSectionIndex() const -{ - return pStartOfSection->GetIndex(); -} -inline sal_uLong SwNode::EndOfSectionIndex() const -{ - const SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection; - return pStNd->pEndOfSection->GetIndex(); -} -inline const SwEndNode* SwNode::EndOfSectionNode() const -{ - const SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection; - return pStNd->pEndOfSection; -} -inline SwEndNode* SwNode::EndOfSectionNode() -{ - SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection; - return pStNd->pEndOfSection; -} - -inline SwNodes& SwNode::GetNodes() -{ - return (SwNodes&)GetArray(); -} -inline const SwNodes& SwNode::GetNodes() const -{ - return (SwNodes&)GetArray(); -} - -inline SwDoc* SwNode::GetDoc() -{ - return GetNodes().GetDoc(); -} -inline const SwDoc* SwNode::GetDoc() const -{ - return GetNodes().GetDoc(); -} - -inline SwFmtColl* SwCntntNode::GetCondFmtColl() const -{ - return pCondColl ? (SwFmtColl*)pCondColl->GetRegisteredIn() : 0; -} - - -inline SwFmtColl& SwCntntNode::GetAnyFmtColl() const -{ - return pCondColl && pCondColl->GetRegisteredIn() - ? *(SwFmtColl*)pCondColl->GetRegisteredIn() - : *(SwFmtColl*)GetRegisteredIn(); -} - -inline const SwAttrSet& SwCntntNode::GetSwAttrSet() const -{ - return mpAttrSet ? *GetpSwAttrSet() : GetAnyFmtColl().GetAttrSet(); -} - -//FEATURE::CONDCOLL - -inline const SfxPoolItem& SwCntntNode::GetAttr( sal_uInt16 nWhich, - sal_Bool bInParents ) const -{ - return GetSwAttrSet().Get( nWhich, bInParents ); -} -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx deleted file mode 100644 index 26d0eff8ef..0000000000 --- a/sw/inc/numrule.hxx +++ /dev/null @@ -1,320 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _NUMRULE_HXX -#define _NUMRULE_HXX - -#include <tools/link.hxx> -#include <tools/gen.hxx> -#include <tools/string.hxx> -#include <editeng/svxenum.hxx> -#include <editeng/numitem.hxx> -#include "swdllapi.h" -#include <swtypes.hxx> -#include <calbck.hxx> -#include <hints.hxx> -#include <boost/unordered_map.hpp> -#include <stringhash.hxx> -#include <SwNumberTreeTypes.hxx> -#include <vector> - -class SwTxtFmtColl; -class IDocumentListsAccess; -class SwNodeNum; -class Font; -class SvxBrushItem; -class SvxNumRule; -class SwCharFmt; -class SwDoc; -class SwFmtVertOrient; -class SwTxtNode; - -const sal_Unicode cBulletChar = 0x2022; // Character for lists. - -class SW_DLLPUBLIC SwNumFmt : public SvxNumberFormat, public SwClient -{ - SwFmtVertOrient* pVertOrient; - - SW_DLLPRIVATE void UpdateNumNodes( SwDoc* pDoc ); - SW_DLLPRIVATE virtual void NotifyGraphicArrived(); - - using SvxNumberFormat::operator ==; - using SvxNumberFormat::operator !=; - -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ); - -public: - SwNumFmt(); - SwNumFmt( const SwNumFmt& ); - SwNumFmt( const SvxNumberFormat&, SwDoc* pDoc); - - virtual ~SwNumFmt(); - - SwNumFmt& operator=( const SwNumFmt& ); - - sal_Bool operator==( const SwNumFmt& ) const; - sal_Bool operator!=( const SwNumFmt& r ) const { return !(*this == r); } - - SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); } - void SetCharFmt( SwCharFmt* ); - void ForgetCharFmt(); - - virtual void SetCharFmtName(const String& rSet); - virtual const String& GetCharFmtName()const; - - virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = 0, const sal_Int16* pOrient = 0); - - virtual void SetVertOrient(sal_Int16 eSet); - virtual sal_Int16 GetVertOrient() const; - const SwFmtVertOrient* GetGraphicOrientation() const; - - sal_Bool IsEnumeration() const; // #i22362# - sal_Bool IsItemize() const; // #i29560# -}; - -class SwPaM; -enum SwNumRuleType { OUTLINE_RULE = 0, NUM_RULE = 1, RULE_END = 2 }; -class SW_DLLPUBLIC SwNumRule -{ - -public: - typedef std::vector< SwTxtNode* > tTxtNodeList; - typedef std::vector< SwTxtFmtColl* > tParagraphStyleList; -private: - friend void _FinitCore(); - -#if OSL_DEBUG_LEVEL > 1 - long int nSerial; - static long int nInstances; -#endif - - static SwNumFmt* aBaseFmts [ RULE_END ][ MAXLEVEL ]; - static sal_uInt16 aDefNumIndents[ MAXLEVEL ]; - // default list level properties for position-and-space mode LABEL_ALIGNMENT - static SwNumFmt* aLabelAlignmentBaseFmts [ RULE_END ][ MAXLEVEL ]; - static sal_uInt16 nRefCount; - static char* pDefOutlineName; - - SwNumFmt* aFmts[ MAXLEVEL ]; - - /** container for associated text nodes */ - tTxtNodeList maTxtNodeList; - - /** container for associated paragraph styles */ - tParagraphStyleList maParagraphStyleList; - - /** boost::unordered_map containing "name->rule" relation */ - boost::unordered_map<String, SwNumRule *, StringHash> * pNumRuleMap; - - String sName; - SwNumRuleType eRuleType; - sal_uInt16 nPoolFmtId; // Id-for NumRules created "automatically" - sal_uInt16 nPoolHelpId; // HelpId for this Pool-style. - sal_uInt8 nPoolHlpFileId; // FilePos at Doc on style helps. - sal_Bool bAutoRuleFlag : 1; - sal_Bool bInvalidRuleFlag : 1; - sal_Bool bContinusNum : 1; // Continuous numbering without levels. - sal_Bool bAbsSpaces : 1; // Levels represent absolute indents. - bool mbCountPhantoms; - - const SvxNumberFormat::SvxNumPositionAndSpaceMode meDefaultNumberFormatPositionAndSpaceMode; - String msDefaultListId; - -public: - // add parameter <eDefaultNumberFormatPositionAndSpaceMode> - SwNumRule( const String& rNm, - const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode, - SwNumRuleType = NUM_RULE, - sal_Bool bAutoFlg = sal_True ); - - SwNumRule( const SwNumRule& ); - ~SwNumRule(); - - SwNumRule& operator=( const SwNumRule& ); - sal_Bool operator==( const SwNumRule& ) const; - sal_Bool operator!=( const SwNumRule& r ) const { return !(*this == r); } - - const SwNumFmt* GetNumFmt( sal_uInt16 i ) const; - const SwNumFmt& Get( sal_uInt16 i ) const; - - void Set( sal_uInt16 i, const SwNumFmt* ); - void Set( sal_uInt16 i, const SwNumFmt& ); - String MakeNumString( const SwNodeNum&, sal_Bool bInclStrings = sal_True, - sal_Bool bOnlyArabic = sal_False ) const; - // - add optional parameter <_nRestrictToThisLevel> in order to - // restrict returned string to this level. - String MakeNumString( const SwNumberTree::tNumberVector & rNumVector, - const sal_Bool bInclStrings = sal_True, - const sal_Bool bOnlyArabic = sal_False, - const unsigned int _nRestrictToThisLevel = MAXLEVEL ) const; - String MakeRefNumString( const SwNodeNum& rNodeNum, - const bool bInclSuperiorNumLabels = false, - const sal_uInt8 nRestrictInclToThisLevel = 0 ) const; - - /** Returns list of associated text nodes. - - @return list of associated text nodes - */ - void GetTxtNodeList( SwNumRule::tTxtNodeList& rTxtNodeList ) const; - SwNumRule::tTxtNodeList::size_type GetTxtNodeListSize() const; - - void AddTxtNode( SwTxtNode& rTxtNode ); - void RemoveTxtNode( SwTxtNode& rTxtNode ); - - SwNumRule::tParagraphStyleList::size_type GetParagraphStyleListSize() const; - void AddParagraphStyle( SwTxtFmtColl& rTxtFmtColl ); - void RemoveParagraphStyle( SwTxtFmtColl& rTxtFmtColl ); - - inline void SetDefaultListId( const String sDefaultListId ) - { - msDefaultListId = sDefaultListId; - } - inline String GetDefaultListId() const - { - return msDefaultListId; - } - /** - Register this rule in a "name->numrule" map. - - @param pNumRuleMap map to register in - */ - void SetNumRuleMap( - boost::unordered_map<String, SwNumRule *, StringHash>* pNumRuleMap ); - - static char* GetOutlineRuleName() { return pDefOutlineName; } - - static sal_uInt16 GetNumIndent( sal_uInt8 nLvl ); - static sal_uInt16 GetBullIndent( sal_uInt8 nLvl ); - - SwNumRuleType GetRuleType() const { return eRuleType; } - void SetRuleType( SwNumRuleType eNew ) { eRuleType = eNew; - bInvalidRuleFlag = sal_True; } - - // A kind of copy-constructor to make sure the num formats are - // attached to the correctCharFormats of a document!! - // (Copies the NumFormats and returns itself). - SwNumRule& CopyNumRule( SwDoc*, const SwNumRule& ); - - // Tests whether the CharFormats are from the given doc - // and copies them if appropriate. - void CheckCharFmts( SwDoc* pDoc ); - - const String& GetName() const { return sName; } - - void SetName( const String& rNm, - IDocumentListsAccess& rDocListAccess ); - - sal_Bool IsAutoRule() const { return bAutoRuleFlag; } - void SetAutoRule( sal_Bool bFlag ) { bAutoRuleFlag = bFlag; } - - sal_Bool IsInvalidRule() const { return bInvalidRuleFlag; } - void SetInvalidRule( sal_Bool bFlag ); - - sal_Bool IsContinusNum() const { return bContinusNum; } - void SetContinusNum( sal_Bool bFlag ) { bContinusNum = bFlag; } - - sal_Bool IsAbsSpaces() const { return bAbsSpaces; } - void SetAbsSpaces( sal_Bool bFlag ) { bAbsSpaces = bFlag; } - - sal_Bool IsOutlineRule() const { return eRuleType == OUTLINE_RULE; } - - bool IsCountPhantoms() const; - void SetCountPhantoms(bool bCountPhantoms); - - // Query and set PoolFormat IDs. - sal_uInt16 GetPoolFmtId() const { return nPoolFmtId; } - void SetPoolFmtId( sal_uInt16 nId ) { nPoolFmtId = nId; } - - // Query and set Help-IDs for document styles. - sal_uInt16 GetPoolHelpId() const { return nPoolHelpId; } - void SetPoolHelpId( sal_uInt16 nId ) { nPoolHelpId = nId; } - sal_uInt8 GetPoolHlpFileId() const { return nPoolHlpFileId; } - void SetPoolHlpFileId( sal_uInt8 nId ) { nPoolHlpFileId = nId; } - - void SetSvxRule(const SvxNumRule&, SwDoc* pDoc); - SvxNumRule MakeSvxNumRule() const; - - // change indent of all list levels by given difference - void ChangeIndent( const short nDiff ); - // set indent of certain list level to given value - void SetIndent( const short nNewIndent, - const sal_uInt16 nListLevel ); - // set indent of first list level to given value and change other list level's - // indents accordingly - void SetIndentOfFirstListLevelAndChangeOthers( const short nNewIndent ); - - void Validate(); -}; - -// namespace for static functions and methods for numbering and bullets -namespace numfunc -{ - /** retrieve font family name used for the default bullet list characters - - @author OD - */ - const String& GetDefBulletFontname(); - - /** determine if default bullet font is user defined - - The default bullet font is user defined, if it is given in the user configuration - - @author OD - */ - bool IsDefBulletFontUserDefined(); - - /** retrieve font used for the default bullet list characters - - @author OD - */ - SW_DLLPUBLIC const Font& GetDefBulletFont(); - - /** retrieve unicode of character used for the default bullet list for the given list level - - @author OD - */ - sal_Unicode GetBulletChar( sal_uInt8 nLevel ); - - /** configuration, if at first position of the first list item the <TAB>-key - increased the indent of the complete list or only demotes this list item. - The same for <SHIFT-TAB>-key at the same position for decreasing the - indent of the complete list or only promotes this list item. - - @author OD - */ - sal_Bool ChangeIndentOnTabAtFirstPosOfFirstListItem(); - - /** - @author OD - */ - SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode(); -} - -#endif // _NUMRULE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx deleted file mode 100644 index 5423f93418..0000000000 --- a/sw/inc/pagedesc.hxx +++ /dev/null @@ -1,345 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _PAGEDESC_HXX -#define _PAGEDESC_HXX - -#include <tools/fract.hxx> -#include <tools/color.hxx> -#include <tools/string.hxx> -#include "swdllapi.h" -#include <swtypes.hxx> // For SwTwips. -#include <frmfmt.hxx> -#include <editeng/numitem.hxx> -#include <editeng/borderline.hxx> - -class SfxPoolItem; -class SwTxtFmtColl; -class SwNode; - -// Separator line adjustment. -enum SwFtnAdj -{ - FTNADJ_LEFT, - FTNADJ_CENTER, - FTNADJ_RIGHT -}; - -// Footnote information. -class SW_DLLPUBLIC SwPageFtnInfo -{ - SwTwips nMaxHeight; //maximum height of the footnote area. - sal_uLong nLineWidth; //width of separator line - editeng::SvxBorderStyle eLineStyle; // Style of the separator line - Color aLineColor; //color of the separator line - Fraction aWidth; //percentage width of the separator line. - SwFtnAdj eAdj; //line adjustment. - SwTwips nTopDist; //distance between body and separator. - SwTwips nBottomDist; //distance between separator and first footnote - -public: - SwTwips GetHeight() const { return nMaxHeight; } - sal_uLong GetLineWidth() const { return nLineWidth; } - const Color& GetLineColor() const { return aLineColor;} - editeng::SvxBorderStyle GetLineStyle() const { return eLineStyle; } - const Fraction& GetWidth() const { return aWidth; } - SwFtnAdj GetAdj() const { return eAdj; } - SwTwips GetTopDist()const { return nTopDist; } - SwTwips GetBottomDist() const { return nBottomDist; } - - void SetHeight( SwTwips nNew ) { nMaxHeight = nNew; } - void SetLineWidth(sal_uLong nSet ) { nLineWidth = nSet; } - void SetLineStyle( editeng::SvxBorderStyle eSet ) { eLineStyle = eSet; } - void SetLineColor(const Color& rCol ) { aLineColor = rCol;} - void SetWidth( const Fraction &rNew){ aWidth = rNew; } - void SetAdj ( SwFtnAdj eNew ) { eAdj = eNew; } - void SetTopDist ( SwTwips nNew ) { nTopDist = nNew; } - void SetBottomDist( SwTwips nNew ) { nBottomDist = nNew; } - - SwPageFtnInfo(); - SwPageFtnInfo( const SwPageFtnInfo& ); - SwPageFtnInfo& operator=( const SwPageFtnInfo& ); - - sal_Bool operator ==( const SwPageFtnInfo& ) const; -}; - -/* - * Use of UseOnPage (eUse) and of FrmFmts - * - * RIGHT - aMaster only for right hand (odd) pages, left hand (even) pages - * always empty. - * LEFT - aLeft for left-hand pages, right-hand pages always empty. - * aLeft is a copy of master. - * ALL - aMaster for right hand pages, aLeft for left hand pages. - * - aLeft is a copy of master. - * MIRROR - aMaster for right hand pages, aLeft for left hand pagers. - * aLeft is a copy of master, margins are mirrored. - * - * UI works exclusively on master! aLeft is adjusted on Chg at document - * according to eUse. - * - * In order to simplify the work of the filters some more values are placed - * into eUse: - * - * HEADERSHARE - Content of header is equal on left and right hand pages. - * FOOTERSHARE - Content of footer is equal on left and right hand pages. - * - * The values are masked out in the respective getter and setter methods. - * Access to complete eUse including the information on header and footer - * via ReadUseOn(), WriteUseOn() (fuer Filter und CopyCTor)! - * - * The Frmformats for header/footer are adjusted by the UI according to - * the attributes for header and footer at master (height, margin, back- - * ground ...) - * Header/footer for left hand pages are copied or mirrored (Chg at - * document). - * The respective attribute for content is cared for automatically on Chg at - * document (contents are created or removed according to SHARE-information). - */ - -typedef sal_uInt16 UseOnPage; -namespace nsUseOnPage -{ - const UseOnPage PD_NONE = 0x0000; // For internal use only. - const UseOnPage PD_LEFT = 0x0001; - const UseOnPage PD_RIGHT = 0x0002; - const UseOnPage PD_ALL = 0x0003; - const UseOnPage PD_MIRROR = 0x0007; - const UseOnPage PD_HEADERSHARE = 0x0040; - const UseOnPage PD_FOOTERSHARE = 0x0080; - const UseOnPage PD_NOHEADERSHARE = 0x00BF; // For internal use only. - const UseOnPage PD_NOFOOTERSHARE = 0x007F; // For internal use only. -} - -class SW_DLLPUBLIC SwPageDesc : public SwModify -{ - friend class SwDoc; - friend class SwUndoPageDescExt; - - String aDescName; - SvxNumberType aNumType; - SwFrmFmt aMaster; - SwFrmFmt aLeft; - SwDepend aDepend; // Because of grid alignment (Registerhaltigkeit). - SwPageDesc *pFollow; - sal_uInt16 nRegHeight; // Sentence spacing and fontascent of style. - sal_uInt16 nRegAscent; // For grid alignment (Registerhaltigkeit). - UseOnPage eUse; - sal_Bool bLandscape; - - // Footnote information. - SwPageFtnInfo aFtnInfo; - - // Called for mirroring of Chg (doc). - // No adjustment at any other place. - SW_DLLPRIVATE void Mirror(); - - SW_DLLPRIVATE void ResetAllAttr( sal_Bool bLeft ); - - SW_DLLPRIVATE SwPageDesc(const String&, SwFrmFmt*, SwDoc *pDc ); - -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue ); - -public: - const String &GetName() const { return aDescName; } - void SetName( const String& rNewName ) { aDescName = rNewName; } - - sal_Bool GetLandscape() const { return bLandscape; } - void SetLandscape( sal_Bool bNew ) { bLandscape = bNew; } - - const SvxNumberType &GetNumType() const { return aNumType; } - void SetNumType( const SvxNumberType& rNew ) { aNumType = rNew; } - - const SwPageFtnInfo &GetFtnInfo() const { return aFtnInfo; } - SwPageFtnInfo &GetFtnInfo() { return aFtnInfo; } - void SetFtnInfo( const SwPageFtnInfo &rNew ) { aFtnInfo = rNew; } - - inline sal_Bool IsHeaderShared() const; - inline sal_Bool IsFooterShared() const; - inline void ChgHeaderShare( sal_Bool bNew ); - inline void ChgFooterShare( sal_Bool bNew ); - - inline void SetUseOn( UseOnPage eNew ); - inline UseOnPage GetUseOn() const; - - void WriteUseOn( UseOnPage eNew ) { eUse = eNew; } - UseOnPage ReadUseOn () const { return eUse; } - - SwFrmFmt &GetMaster() { return aMaster; } - SwFrmFmt &GetLeft() { return aLeft; } - const SwFrmFmt &GetMaster() const { return aMaster; } - const SwFrmFmt &GetLeft() const { return aLeft; } - - // Reset all attrs of the format but keep the ones a pagedesc - // cannot live without. - inline void ResetAllMasterAttr(); - inline void ResetAllLeftAttr(); - - // Layout uses the following methods to obtain a format in order - // to be able to create a page. - inline SwFrmFmt *GetRightFmt(); - inline const SwFrmFmt *GetRightFmt() const; - inline SwFrmFmt *GetLeftFmt(); - inline const SwFrmFmt *GetLeftFmt() const; - - sal_uInt16 GetRegHeight() const { return nRegHeight; } - sal_uInt16 GetRegAscent() const { return nRegAscent; } - void SetRegHeight( sal_uInt16 nNew ){ nRegHeight = nNew; } - void SetRegAscent( sal_uInt16 nNew ){ nRegAscent = nNew; } - - inline void SetFollow( const SwPageDesc* pNew ); - const SwPageDesc* GetFollow() const { return pFollow; } - SwPageDesc* GetFollow() { return pFollow; } - - void SetRegisterFmtColl( const SwTxtFmtColl* rFmt ); - const SwTxtFmtColl* GetRegisterFmtColl() const; - void RegisterChange(); - - // Query and set PoolFormat-Id. - sal_uInt16 GetPoolFmtId() const { return aMaster.GetPoolFmtId(); } - void SetPoolFmtId( sal_uInt16 nId ) { aMaster.SetPoolFmtId( nId ); } - sal_uInt16 GetPoolHelpId() const { return aMaster.GetPoolHelpId(); } - void SetPoolHelpId( sal_uInt16 nId ) { aMaster.SetPoolHelpId( nId ); } - sal_uInt8 GetPoolHlpFileId() const { return aMaster.GetPoolHlpFileId(); } - void SetPoolHlpFileId( sal_uInt8 nId ) { aMaster.SetPoolHlpFileId( nId ); } - - // Query information from Client. - virtual sal_Bool GetInfo( SfxPoolItem& ) const; - - const SwFrmFmt* GetPageFmtOfNode( const SwNode& rNd, - sal_Bool bCheckForThisPgDc = sal_True ) const; - sal_Bool IsFollowNextPageOfNode( const SwNode& rNd ) const; - - //Given a SwNode return the pagedesc in use at that location. - static const SwPageDesc* GetPageDescOfNode(const SwNode& rNd); - - SwPageDesc& operator=( const SwPageDesc& ); - - SwPageDesc( const SwPageDesc& ); - ~SwPageDesc(); -}; - -inline void SwPageDesc::SetFollow( const SwPageDesc* pNew ) -{ - pFollow = pNew ? (SwPageDesc*)pNew : this; -} - -inline sal_Bool SwPageDesc::IsHeaderShared() const -{ - return eUse & nsUseOnPage::PD_HEADERSHARE ? sal_True : sal_False; -} -inline sal_Bool SwPageDesc::IsFooterShared() const -{ - return eUse & nsUseOnPage::PD_FOOTERSHARE ? sal_True : sal_False; -} -inline void SwPageDesc::ChgHeaderShare( sal_Bool bNew ) -{ - if ( bNew ) - eUse = (UseOnPage) (eUse | nsUseOnPage::PD_HEADERSHARE); - else - eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOHEADERSHARE); -} -inline void SwPageDesc::ChgFooterShare( sal_Bool bNew ) -{ - if ( bNew ) - eUse = (UseOnPage) (eUse | nsUseOnPage::PD_FOOTERSHARE); - else - eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOFOOTERSHARE); -} -inline void SwPageDesc::SetUseOn( UseOnPage eNew ) -{ - UseOnPage eTmp = nsUseOnPage::PD_NONE; - if ( eUse & nsUseOnPage::PD_HEADERSHARE ) - eTmp = nsUseOnPage::PD_HEADERSHARE; - if ( eUse & nsUseOnPage::PD_FOOTERSHARE ) - eTmp = (UseOnPage) (eTmp | nsUseOnPage::PD_FOOTERSHARE); - eUse = (UseOnPage) (eTmp | eNew); - -} -inline UseOnPage SwPageDesc::GetUseOn() const -{ - UseOnPage eRet = eUse; - eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOHEADERSHARE); - eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOFOOTERSHARE); - return eRet; -} - -inline void SwPageDesc::ResetAllMasterAttr() -{ - ResetAllAttr( sal_False ); -} - -inline void SwPageDesc::ResetAllLeftAttr() -{ - ResetAllAttr( sal_True ); -} - -inline SwFrmFmt *SwPageDesc::GetRightFmt() -{ - return nsUseOnPage::PD_RIGHT & eUse ? &aMaster : 0; -} -inline const SwFrmFmt *SwPageDesc::GetRightFmt() const -{ - return nsUseOnPage::PD_RIGHT & eUse ? &aMaster : 0; -} -inline SwFrmFmt *SwPageDesc::GetLeftFmt() -{ - return nsUseOnPage::PD_LEFT & eUse ? &aLeft : 0; -} -inline const SwFrmFmt *SwPageDesc::GetLeftFmt() const -{ - return nsUseOnPage::PD_LEFT & eUse ? &aLeft : 0; -} - -class SwPageDescExt -{ - SwPageDesc aPageDesc; - SwDoc * pDoc; - String sFollow; - - void SetPageDesc(const SwPageDesc & aPageDesc); - -public: - SwPageDescExt(const SwPageDesc & rPageDesc, SwDoc * pDoc); - SwPageDescExt(const SwPageDescExt & rSrc); - ~SwPageDescExt(); - - SwPageDescExt & operator = (const SwPageDescExt & rSrc); - SwPageDescExt & operator = (const SwPageDesc & rSrc); - - const String & GetName() const; - - operator SwPageDesc() const; // #i7983# -}; - - -SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName); - -#endif //_PAGEDESC_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/pageiter.hxx b/sw/inc/pageiter.hxx deleted file mode 100644 index b6e8c13e19..0000000000 --- a/sw/inc/pageiter.hxx +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _PAGEITER_HXX -#define _PAGEITER_HXX - -#include <tools/solar.h> - -class SwDoc; -class SwPageFrm; -struct SwPosition; -class SwPageDesc; - -class SwPageIter { - const SwDoc &rPDoc; - const SwPageFrm *pPage; - -public: - SwPageIter( const SwDoc &rDoc, const SwPosition &rStartPos ); - - sal_Bool IsEnd() const { return 0 == pPage; } - sal_Bool NextPage(); - const SwPageDesc* GetPageDesc() const; - sal_Bool Seek( const SwPosition &rPos ); - sal_Bool GetPosition( SwPosition &rPos ) const; -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx deleted file mode 100644 index 200ad61827..0000000000 --- a/sw/inc/pagepreviewlayout.hxx +++ /dev/null @@ -1,566 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -#ifndef _PAGEPREVIEWLAYOUT_HXX -#define _PAGEPREVIEWLAYOUT_HXX - -// template class <std::vector> -#include <vector> -// datatypes sal_xyz -#include <sal/types.h> -// classes <Point>, <Size> and <Rectangle> -#include <tools/gen.hxx> -// datatype <SwTwips> -#include <swtypes.hxx> - -class ViewShell; -class SwRootFrm; -class SwPageFrm; -class Fraction; -struct PrevwPage; - -// ============================================================================= -/** page preview functionality in the writer - - @author OD -*/ -class SwPagePreviewLayout -{ -private: - friend class ViewShell; - - // number of horizontal and vertical twips for spacing between the pages. - const SwTwips mnXFree; - const SwTwips mnYFree; - - // view shell the print preview is generated for. - ViewShell& mrParentViewShell; - // top layout frame of the layout for accessing the pages - const SwRootFrm& mrLayoutRootFrm; - - // boolean indicating, if the layout information (number of columns and rows) - // are valid. - bool mbLayoutInfoValid; - // boolean indicating, if the the calculated print preview layout sizes - // ( windows size in twips, maximal page size, column width, row height, - // width and height of a print preview page, size of the print preview - // document ) are valid - bool mbLayoutSizesValid; - // boolean indicating, if the the paint information ( physical number of - // start page, start column and row, paint offsets, rectangle visible of - // the print preview document. - bool mbPaintInfoValid; - - Size maWinSize; - sal_uInt16 mnCols; - sal_uInt16 mnRows; - sal_uInt16 mnPages; - // #i18143# - the book preview is controlled by this flag - bool mbBookPreview; - bool mbBookPreviewModeToggled; - - Size maMaxPageSize; - Rectangle maPreviewDocRect; - SwTwips mnColWidth; - SwTwips mnRowHeight; - SwTwips mnPrevwLayoutWidth; - SwTwips mnPrevwLayoutHeight; - bool mbDoesLayoutColsFitIntoWindow; - bool mbDoesLayoutRowsFitIntoWindow; - - sal_uInt16 mnPaintPhyStartPageNum; - sal_uInt16 mnPaintStartCol; - sal_uInt16 mnPaintStartRow; - bool mbNoPageVisible; - Point maPaintStartPageOffset; - Point maPaintPreviewDocOffset; - Point maAdditionalPaintOffset; - Rectangle maPaintedPrevwDocRect; - sal_uInt16 mnSelectedPageNum; - - std::vector<PrevwPage*> maPrevwPages; - - // #i22014# - internal booleans to indicate, that a new print - // preview layout has been created during a paint. - mutable bool mbInPaint; - mutable bool mbNewLayoutDuringPaint; - - bool mbPrintEmptyPages; - - /** clear internal data about current page preview - - @author OD - */ - void _Clear(); - - /** helper method to clear preview page layout sizes - - @author OD - */ - void _ClearPrevwLayoutSizes(); - - /** helper method to clear data in preview page vectors - - @author OD - */ - void _ClearPrevwPageData(); - - /** calculate page preview layout sizes - - @author OD - */ - void _CalcPrevwLayoutSizes(); - - /** apply new zoom at given view shell - - @author OD - - @param _aNewZoom - input parameter - new zoom percentage - */ - void _ApplyNewZoomAtViewShell( sal_uInt8 _aNewZoom ); - - /** calculate additional paint offset - - helper method called by <Prepare> in order to calculate an additional - paint offset to center output in given window size. - The booleans <mbDoesLayoutRowsFitIntoWindow> and <mbDoesLayoutColsFitIntoWindow> - are also determined. - preconditions: - (1) preview layout is given (number of rows and columns). - (2) window size is given. - (3) height of row and width of column are calculated. - (4) paint offset of start page is calculated. - - @author OD - */ - void _CalcAdditionalPaintOffset(); - - /** calculate painted preview document rectangle - - helper method called by <Prepare> in order to calculate the rectangle, - which will be painted for the document arranged by the given preview - layout. - preconditions: - (1) paint offset of document preview is calculated. - (2) size of document preview is calculated. - (3) additional paint offset is calculated - see <_CalcAdditionalPaintOffset>. - - @author OD - */ - void _CalcDocPrevwPaintRect(); - - /** determines preview data for a given page and a given preview offset - - - @author OD - - @param _rPage - input parameter - constant reference to page frame, for which the - preview data will be calculated. - - @param _rPrevwOffset - input parameter - constant reference to the offset the given page has - in the current preview window. - Note: Offset can be negative. - - @param _opPrevwPage - output parameter - calculated preview data. - - @return boolean, indicating, if calculation was successful. - */ - bool _CalcPreviewDataForPage( const SwPageFrm& _rPage, - const Point& _rPrevwOffset, - PrevwPage* _opPrevwPage ); - - /** calculate preview pages - - helper method called by <Prepare> in order to determine which pages - will be visible in the current preview and calculate the data needed - to paint these pages. Also the accessible pages with its needed data - are determined. - - @author OD - */ - void _CalcPreviewPages(); - - /** get preview page by physical page number - - @author OD - - @param _nPageNum - input parameter - physical page number of page, for which the preview - page will be returned. - - @return pointer to preview page of current preview pages. If page doesn't - belongs to current preview pages, <0> is returned. - */ - const PrevwPage* _GetPrevwPageByPageNum( const sal_uInt16 _nPageNum ) const; - - /** paint selection mark at page - - @author OD - */ - void _PaintSelectMarkAtPage( const PrevwPage* _aSelectedPrevwPage ) const; - -public: - /** constructor of <SwPagePreviewLayout> - - @author OD - - @param _rParentViewShell - input parameter - reference to the view shell the page preview - layout belongs to. Reference will be hold as member <mrParentViewShell>. - Adjustments/Changes at this view shell: - (1) Adjustment of the mapping mode at the output device. - (2) Change of the zoom at the view options. - (3) Preparations for paint of the page preview. - - @param _rLayoutRootFrm - input parameter - constant reference to the root frame of the layout. - Reference will be hold as member <mrLayoutRootFrm> in order to get - access to the page frames. - */ - SwPagePreviewLayout( ViewShell& _rParentViewShell, - const SwRootFrm& _rLayoutRootFrm ); - - /** destructor of <SwPagePreviewLayout> - - @author - */ - inline ~SwPagePreviewLayout() - { - _ClearPrevwPageData(); - } - - /** init page preview layout - - initialize the page preview settings for a given layout. - side effects: - (1) If parameter <_bCalcScale> is true, mapping mode with calculated - scaling is set at the output device and the zoom at the view options of - the given view shell is set with the calculated scaling. - - @author OD - - @param _nCols - input parameter - initial number of page columns in the preview. - - @param _nRows - input parameter - initial number of page rows in the preview. - - @param _rPxWinSize - input parameter - window size in which the preview will be displayed and - for which the scaling will be calculated. - - @param _bCalcScale - input parameter - control, if method should calculate the needed - scaling for the proposed preview layout for the given window size - and sets the scaling at the output device and the view options. - - @return boolean, indicating, if preview layout is successful initialized. - */ - bool Init( const sal_uInt16 _nCols, - const sal_uInt16 _nRows, - const Size& _rPxWinSize, - const bool _bCalcScale - ); - - /** method to adjust page preview layout to document changes - - @author OD - - @return boolean, indicating, if preview layout is successful initialized. - */ - bool ReInit(); - - /** prepare paint of page preview - - With the valid preview layout settings - calculated and set by method - <Init(..)> - the paint of a specific part of the virtual preview - document is prepared. The corresponding part is given by either - a start page (parameter <_nProposedStartPageNum>) or a absolute position - (parameter <_aProposedStartPoint>). - The accessibility preview will also be updated via a corresponding - method call. - - @author OD - - @param _nProposedStartPageNum [0..<number of document pages>] - input parameter - proposed number of page, which should be painted in - the left-top-corner in the current output device. input parameter - <_bStartWithPageAtFirstCol> influences, if proposed page is actual - painted in the left-top-corner. - - @param _nProposedStartPos [(0,0)..<PreviewDocumentSize>] - input parameter - proposed absolute position in the virtual preview - document, which should be painted in the left-top-corner in the current - output device. - - @param _rPxWinSize - input parameter - pixel size of window the preview will be painted in. - - @param _onStartPageNum - output parameter - physical number of page, which will be painted in the - left-top-corner in the current output device. - - @param _orDocPreviewPaintRect - output parameter - rectangle of preview document, which will be painted. - - @param _bStartWithPageAtFirstCol - input parameter with default value "true" - controls, if start page - is set to page in first column the proposed start page is located. - - @return boolean, indicating, if prepare of preview paint was successful. - */ - bool Prepare( const sal_uInt16 _nProposedStartPageNum, - const Point _aProposedStartPos, - const Size& _rPxWinSize, - sal_uInt16& _onStartPageNum, - Rectangle& _orDocPreviewPaintRect, - const bool _bStartWithPageAtFirstCol = true - ); - - /** get selected page number - - @author OD - */ - inline sal_uInt16 SelectedPage() - { - return mnSelectedPageNum; - } - - /** set selected page number - - @author OD - */ - inline void SetSelectedPage( sal_uInt16 _nSelectedPageNum ) - { - mnSelectedPageNum = _nSelectedPageNum; - } - - /** paint prepared preview - - @author OD - - @param _aOutRect - input parameter - Twip rectangle of window, which should be painted. - - @return boolean, indicating, if paint of preview was performed - */ - bool Paint( const Rectangle _aOutRect ) const; - - /** repaint pages on page preview - - method to invalidate visible pages due to changes in a different - view shell. - - @author OD - */ - void Repaint( const Rectangle _aInvalidCoreRect ) const; - - /** paint to mark new selected page - - Perform paint for current selected page in order to unmark it. - Set new selected page and perform paint to mark this page. - - @author OD - - @param _nNewSelectedPage - input parameter - physical number of page, which will be marked as selected. - */ - void MarkNewSelectedPage( const sal_uInt16 _nSelectedPage ); - - /** calculate start position for new scale - - calculate new start position for a new scale. Calculation bases on the - current visible part of the document arranged in the given preview layout. - preconditions: - (1) new scaling is already set at the given output device. - - @author OD - - @return Point, start position for new scale - */ - Point GetPreviewStartPosForNewScale( const Fraction& _aNewScale, - const Fraction& _aOldScale, - const Size& _aNewWinSize ) const; - - /** determines, if page with given page number is visible in preview - - @author OD - - @param _nPageNum - input parameter - physical number of page, for which it will be - determined, if it is visible. - - @return boolean, indicating, if page with given page number is visible - in preview. - */ - bool IsPageVisible( const sal_uInt16 _nPageNum ) const; - - /** calculate data to bring new selected page into view. - - @author OD - - @param _nHoriMove - input parameter - positive/negative number of columns the current - selected page have to be moved. - - @param _nVertMove - input parameter - positive/negative number of rows the current - selected page have to be moved. - - @param _orNewSelectedPage - output parameter - number of new selected page - - @param _orNewStartPage - output parameter - number of new start page - - @param _orNewStartPos - output parameter - new start position in document preview - - @return boolean - indicating, that move was sucessful. - */ - bool CalcStartValuesForSelectedPageMove( const sal_Int16 _nHoriMove, - const sal_Int16 _nVertMove, - sal_uInt16& _orNewSelectedPage, - sal_uInt16& _orNewStartPage, - Point& _orNewStartPos ) const; - - /** checks, if given position is inside a shown document page - - @author OD - - @param _aPrevwPos - input parameter - position inside the visible preview window. - - @param _orDocPos - output parameter - corresponding position in the document, if given - preview position is inside a shown document page, not an empty page. - If not, it's value is <Point( 0, 0 )>. - - @param _obPosInEmptyPage - output parameter - indicates, that given preview position lays inside - an shown empty page. - - @param _onPageNum - output parameter - corresponding physical number of page, if given - preview position is inside a shown document page, considers also empty - pages. If not, it's value is <0>. - - @return boolean - indicating, that given preview position lays inside - a shown document preview page, not an empty page. - */ - bool IsPrevwPosInDocPrevwPage( const Point _aPrevwPos, - Point& _orDocPos, - bool& _obPosInEmptyPage, - sal_uInt16& _onPageNum ) const; - - inline bool DoesPreviewLayoutRowsFitIntoWindow() const - { - return mbDoesLayoutRowsFitIntoWindow; - } - - inline bool DoesPreviewLayoutColsFitIntoWindow() const - { - return mbDoesLayoutColsFitIntoWindow; - } - - inline bool PreviewLayoutValid() const - { - return mbLayoutInfoValid && mbLayoutSizesValid && mbPaintInfoValid; - } - - /** determine preview window page scroll amount - - @author OD - - @param _nWinPagesToScroll - input parameter - number of preview window pages the scroll amount has - to be calculated for. Negative values for preview window page up - scrolling, positive values for preview window page down scrolling. - - @return scroll amount in SwTwips - */ - SwTwips GetWinPagesScrollAmount( const sal_Int16 _nWinPagesToScroll ) const; - - /** determine row the page with the given number is in - - @author OD - - @param _nPageNum - input parameter - physical page number of page, for which the row in - preview layout has to be calculated. - - @return number of row the page with the given physical page number is in - */ - sal_uInt16 GetRowOfPage( sal_uInt16 _nPageNum ) const; - - /** determine column the page with the given number is in - - @author OD - - @param _nPageNum - input parameter - physical page number of page, for which the column in - preview layout has to be calculated. - - @return number of column the page with the given physical page number is in - */ - sal_uInt16 GetColOfPage( sal_uInt16 _nPageNum ) const; - - Size GetPrevwDocSize() const; - - /** get size of a preview page by its physical page number - - @author OD - - @param _nPageNum - input parameter - pysical page number of preview page, for which the - page size has to be returned. - - @return an object of class <Size> - */ - Size GetPrevwPageSizeByPageNum( sal_uInt16 _nPageNum ) const; - - /** get virtual page number by its physical page number - - @author OD - - @param _nPageNum - input parameter - pysical page number of preview page, for which the - virtual page number has to be determined. - - @return virtual page number of page given by its physical page number, - if the page is in the current preview pages vector, otherwise 0. - */ - sal_uInt16 GetVirtPageNumByPageNum( sal_uInt16 _nPageNum ) const; - - /** enable/disable book preview - - @author OD - */ - bool SetBookPreviewMode( const bool _bEnableBookPreview, - sal_uInt16& _onStartPageNum, - Rectangle& _orDocPreviewPaintRect ); - - /** Convert relative to absolute page numbers (see PrintEmptyPages) - - @author FME - */ - sal_uInt16 ConvertRelativeToAbsolutePageNum( sal_uInt16 _nRelPageNum ) const; - - /** Convert absolute to relative page numbers (see PrintEmptyPages) - - @author FME - */ - sal_uInt16 ConvertAbsoluteToRelativePageNum( sal_uInt16 _nAbsPageNum ) const; - - /** get the number of preview pages - - @author FME - */ - sal_uInt16 GetNumberOfPreviewPages() { return sal::static_int_cast< sal_uInt16 >(maPrevwPages.size()); } -}; - -#endif // _PAGEPREVIEWLAYOUT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx deleted file mode 100644 index 93984d9fda..0000000000 --- a/sw/inc/pam.hxx +++ /dev/null @@ -1,282 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _PAM_HXX -#define _PAM_HXX - -#include <stddef.h> // For MemPool. -#include <tools/gen.hxx> -#include <tools/mempool.hxx> -#include <cshtyp.hxx> // For function definitions. -#include <ring.hxx> // Super class. -#include <index.hxx> // For SwIndex. -#include <ndindex.hxx> // For SwNodeIndex. -#include "swdllapi.h" - -class SwFmt; -class SfxPoolItem; -class SfxItemSet; -class SwDoc; -class SwNode; -class SwCntntNode; -class SwPaM; - -namespace com { namespace sun { namespace star { namespace util { - struct SearchOptions; -} } } } - -namespace utl { - class TextSearch; -} - -struct SW_DLLPUBLIC SwPosition -{ - SwNodeIndex nNode; - SwIndex nContent; - - SwPosition( const SwNodeIndex &rNode, const SwIndex &rCntnt ); - explicit SwPosition( const SwNodeIndex &rNode ); - explicit SwPosition( const SwNode& rNode ); - explicit SwPosition( SwCntntNode& rNode, const xub_StrLen nOffset = 0 ); - - SwPosition( const SwPosition & ); - SwPosition &operator=(const SwPosition &); - - /** - Returns the document this position is in. - - @return the document this position is in. - */ - SwDoc * GetDoc() const; - - sal_Bool operator < (const SwPosition &) const; - sal_Bool operator > (const SwPosition &) const; - sal_Bool operator <=(const SwPosition &) const; - sal_Bool operator >=(const SwPosition &) const; - sal_Bool operator ==(const SwPosition &) const; - sal_Bool operator !=(const SwPosition &) const; -}; - - -// Result of comparing positions. -enum SwComparePosition { - POS_BEFORE, // Pos1 before Pos2. - POS_BEHIND, // Pos1 behind Pos2. - POS_INSIDE, // Pos1 completely contained in Pos2. - POS_OUTSIDE, // Pos2 completely contained in Pos1. - POS_EQUAL, // Pos1 is as large as Pos2. - POS_OVERLAP_BEFORE, // Pos1 overlaps Pos2 at the beginning. - POS_OVERLAP_BEHIND, // Pos1 overlaps Pos2 at the end. - POS_COLLIDE_START, // Pos1 start touches at Pos2 end. - POS_COLLIDE_END // Pos1 end touches at Pos2 start. -}; -SwComparePosition ComparePosition( - const SwPosition& rStt1, const SwPosition& rEnd1, - const SwPosition& rStt2, const SwPosition& rEnd2 ); - -SwComparePosition ComparePosition( - const unsigned long nStt1, const unsigned long nEnd1, - const unsigned long nStt2, const unsigned long nEnd2 ); - - -// SwPointAndMark / SwPaM -struct SwMoveFnCollection; -typedef SwMoveFnCollection* SwMoveFn; -SW_DLLPUBLIC extern SwMoveFn fnMoveForward; // SwPam::Move()/Find() default argument. -SW_DLLPUBLIC extern SwMoveFn fnMoveBackward; - -typedef sal_Bool (*SwGoInDoc)( SwPaM& rPam, SwMoveFn fnMove ); -SW_DLLPUBLIC extern SwGoInDoc fnGoDoc; -extern SwGoInDoc fnGoSection; -SW_DLLPUBLIC extern SwGoInDoc fnGoNode; -SW_DLLPUBLIC extern SwGoInDoc fnGoCntnt; // SwPam::Move() default argument. -extern SwGoInDoc fnGoCntntCells; -extern SwGoInDoc fnGoCntntSkipHidden; -extern SwGoInDoc fnGoCntntCellsSkipHidden; - -void _InitPam(); - -class SW_DLLPUBLIC SwPaM : public Ring -{ - SwPosition m_Bound1; - SwPosition m_Bound2; - SwPosition * m_pPoint; // points at either m_Bound1 or m_Bound2 - SwPosition * m_pMark; // points at either m_Bound1 or m_Bound2 - bool m_bIsInFrontOfLabel; - - SwPaM* MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg = 0 ); - -public: - SwPaM( const SwPosition& rPos, SwPaM* pRing = 0 ); - SwPaM( const SwPosition& rMk, const SwPosition& rPt, SwPaM* pRing = 0 ); - SwPaM( const SwNodeIndex& rMk, const SwNodeIndex& rPt, - long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = 0 ); - SwPaM( const SwNode& rMk, const SwNode& rPt, - long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = 0 ); - SwPaM( const SwNodeIndex& rMk, xub_StrLen nMkCntnt, - const SwNodeIndex& rPt, xub_StrLen nPtCntnt, SwPaM* pRing = 0 ); - SwPaM( const SwNode& rMk, xub_StrLen nMkCntnt, - const SwNode& rPt, xub_StrLen nPtCntnt, SwPaM* pRing = 0 ); - SwPaM( const SwNode& rNd, xub_StrLen nCntnt = 0, SwPaM* pRing = 0 ); - SwPaM( const SwNodeIndex& rNd, xub_StrLen nCntnt = 0, SwPaM* pRing = 0 ); - virtual ~SwPaM(); - - // @@@ semantic: no copy ctor. - SwPaM( SwPaM & ); - // @@@ semantic: no copy assignment for super class Ring. - SwPaM& operator=( const SwPaM & ); - - // Movement of cursor. - sal_Bool Move( SwMoveFn fnMove = fnMoveForward, - SwGoInDoc fnGo = fnGoCntnt ); - - // Search. - sal_uInt8 Find( const com::sun::star::util::SearchOptions& rSearchOpt, - sal_Bool bSearchInNotes, - utl::TextSearch& rSTxt, - SwMoveFn fnMove = fnMoveForward, - const SwPaM *pPam =0, sal_Bool bInReadOnly = sal_False); - sal_Bool Find( const SwFmt& rFmt, - SwMoveFn fnMove = fnMoveForward, - const SwPaM *pPam =0, sal_Bool bInReadOnly = sal_False); - sal_Bool Find( const SfxPoolItem& rAttr, sal_Bool bValue = sal_True, - SwMoveFn fnMove = fnMoveForward, - const SwPaM *pPam =0, sal_Bool bInReadOnly = sal_False ); - sal_Bool Find( const SfxItemSet& rAttr, sal_Bool bNoColls, - SwMoveFn fnMove, - const SwPaM *pPam, sal_Bool bInReadOnly, sal_Bool bMoveFirst ); - - bool DoSearch( const com::sun::star::util::SearchOptions& rSearchOpt, utl::TextSearch& rSTxt, - SwMoveFn fnMove, sal_Bool bSrchForward, sal_Bool bRegSearch, sal_Bool bChkEmptyPara, sal_Bool bChkParaEnd, - xub_StrLen &nStart, xub_StrLen &nEnde,xub_StrLen nTxtLen,SwNode* pNode, SwPaM* pPam); - - inline bool IsInFrontOfLabel() const { return m_bIsInFrontOfLabel; } - inline void _SetInFrontOfLabel( bool bNew ) { m_bIsInFrontOfLabel = bNew; } - - virtual void SetMark(); - - void DeleteMark() - { - if (m_pMark != m_pPoint) - { - // clear the mark position; this helps if mark's SwIndex is - // registered at some node, and that node is then deleted - *m_pMark = SwPosition( SwNodeIndex( GetNode()->GetNodes() ) ); - m_pMark = m_pPoint; - } - } -#if OSL_DEBUG_LEVEL > 1 - void Exchange(); - -#else - void Exchange() - { - if (m_pPoint != m_pMark) - { - SwPosition *pTmp = m_pPoint; - m_pPoint = m_pMark; - m_pMark = pTmp; - } - } -#endif - - /** A PaM marks a selection if Point and Mark are distinct positions. - @return true iff the PaM spans a selection - */ - bool HasMark() const { return m_pPoint == m_pMark ? false : true; } - - const SwPosition *GetPoint() const { return m_pPoint; } - SwPosition *GetPoint() { return m_pPoint; } - const SwPosition *GetMark() const { return m_pMark; } - SwPosition *GetMark() { return m_pMark; } - - const SwPosition *Start() const - { return (*m_pPoint) <= (*m_pMark) ? m_pPoint : m_pMark; } - SwPosition *Start() - { return (*m_pPoint) <= (*m_pMark) ? m_pPoint : m_pMark; } - - const SwPosition *End() const - { return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; } - SwPosition *End() - { return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; } - - /// @return current Node at Point/Mark - SwNode * GetNode ( bool bPoint = true ) const - { - return &( bPoint ? m_pPoint->nNode : m_pMark->nNode ).GetNode(); - } - - /// @return current ContentNode at Point/Mark - SwCntntNode* GetCntntNode( bool bPoint = true ) const - { - return GetNode(bPoint)->GetCntntNode(); - } - - /** - Normalizes PaM, i.e. sort point and mark. - - @param bPointFirst sal_True: If the point is behind the mark then swap. - sal_False: If the mark is behind the point then swap. - */ - SwPaM & Normalize(sal_Bool bPointFirst = sal_True); - - /// @return the document (SwDoc) at which the PaM is registered - SwDoc* GetDoc() const { return m_pPoint->nNode.GetNode().GetDoc(); } - - SwPosition& GetBound( bool bOne = true ) - { return bOne ? m_Bound1 : m_Bound2; } - const SwPosition& GetBound( bool bOne = true ) const - { return bOne ? m_Bound1 : m_Bound2; } - - // Get number of page which contains cursor. - sal_uInt16 GetPageNum( sal_Bool bAtPoint = sal_True, const Point* pLayPos = 0 ); - - // Is in something protected (readonly) or selection contains - // something protected. - sal_Bool HasReadonlySel( bool bFormView ) const; - - sal_Bool ContainsPosition(const SwPosition & rPos) - { return *Start() <= rPos && rPos <= *End(); } - - static sal_Bool Overlap(const SwPaM & a, const SwPaM & b); - - static sal_Bool LessThan(const SwPaM & a, const SwPaM & b); - - DECL_FIXEDMEMPOOL_NEWDEL(SwPaM); - - String GetTxt() const; - void InvalidatePaM(); -}; - - -sal_Bool CheckNodesRange( const SwNodeIndex&, const SwNodeIndex&, sal_Bool ); -sal_Bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove ); - - -#endif // _PAM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx deleted file mode 100644 index 7bda10100e..0000000000 --- a/sw/inc/paratr.hxx +++ /dev/null @@ -1,278 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _PARATR_HXX -#define _PARATR_HXX -#include <svl/eitem.hxx> -#include <svl/stritem.hxx> -#include "swdllapi.h" -#include <hintids.hxx> -#include <calbck.hxx> -#include <swatrset.hxx> -#include <format.hxx> -#include <swtypes.hxx> -#include <editeng/adjitem.hxx> - -class SwCharFmt; -class IntlWrapper; - -#define DROP_WHOLEWORD ((sal_uInt16)0x0001) - -// If SwFmtDrop is a Client, it is the CharFmt that describes the font for the -// DropCaps. If it is not a Client, formating uses the CharFmt of the paragraph. -// If the CharFmt is modified, this change is propagated to the paragraphs -// via the Modify of SwFmtDrop. -class SW_DLLPUBLIC SwFmtDrop: public SfxPoolItem, public SwClient -{ - SwModify* pDefinedIn; // Modify-Object, that contains DropCaps. - // Can only be TxtFmtCollection/TxtNode. - sal_uInt16 nDistance; // Distance to beginning of text. - sal_uInt16 nReadFmt; // For Sw3-Reader: CharFormat-Id (load Pool!). - sal_uInt8 nLines; // Line count. - sal_uInt8 nChars; // Character count. - sal_Bool bWholeWord; // First word with initials. -public: - TYPEINFO(); // Already in base class SwClient. - - SwFmtDrop(); - virtual ~SwFmtDrop(); - - // @@@ public copy ctor, but no copy assignment? - SwFmtDrop( const SwFmtDrop & ); -private: - // @@@ public copy ctor, but no copy assignment? - SwFmtDrop & operator= (const SwFmtDrop &); - -protected: - virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ); - -public: - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - inline sal_uInt8 GetLines() const { return nLines; } - inline sal_uInt8 &GetLines() { return nLines; } - - inline sal_uInt8 GetChars() const { return nChars; } - inline sal_uInt8 &GetChars() { return nChars; } - - inline sal_Bool GetWholeWord() const { return bWholeWord; } - inline sal_uInt8 &GetWholeWord() { return bWholeWord; } - - inline sal_uInt16 GetDistance() const { return nDistance; } - inline sal_uInt16 &GetDistance() { return nDistance; } - - inline const SwCharFmt *GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); } - inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)GetRegisteredIn(); } - void SetCharFmt( SwCharFmt *pNew ); - // Get information from Client. - virtual sal_Bool GetInfo( SfxPoolItem& ) const; - - // Get and set Modify pointer. - inline const SwModify* GetDefinedIn() const { return pDefinedIn; } - inline void ChgDefinedIn( const SwModify* pNew ) - { pDefinedIn = (SwModify*)pNew; } -}; - -class SwRegisterItem : public SfxBoolItem -{ -public: - TYPEINFO(); - - inline SwRegisterItem( const sal_Bool bRegister = sal_False ); - - // @@@ public copy assignment, but no copy ctor? - inline SwRegisterItem& operator=( const SwRegisterItem& rRegister ); - - // "pure virtual methods" of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; -}; - -inline SwRegisterItem::SwRegisterItem( const sal_Bool bRegister ) : - SfxBoolItem( RES_PARATR_REGISTER, bRegister ) -{} - -inline SwRegisterItem& SwRegisterItem::operator=( - const SwRegisterItem& rRegister ) -{ - SetValue( rRegister.GetValue() ); - return *this; -} - -class SW_DLLPUBLIC SwNumRuleItem : public SfxStringItem -{ -public: - TYPEINFO(); - - SwNumRuleItem() - : SfxStringItem( RES_PARATR_NUMRULE, aEmptyStr ) {} - - SwNumRuleItem( const String& rRuleName ) - : SfxStringItem( RES_PARATR_NUMRULE, rRuleName ) {} - - SwNumRuleItem( const SwNumRuleItem& rCpy ) - : SfxStringItem( RES_PARATR_NUMRULE, rCpy.GetValue() ) {} - - SwNumRuleItem& operator=( const SwNumRuleItem& rCpy ) - { SetValue( rCpy.GetValue() ); return *this; } - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ); -}; - -class SwParaConnectBorderItem : public SfxBoolItem -{ -public: - TYPEINFO(); - - inline SwParaConnectBorderItem( const sal_Bool bConnect = sal_True ); - - // @@@ public copy assignment, but no copy ctor? - inline SwParaConnectBorderItem& operator=( const SwParaConnectBorderItem& rConnect ); - - // "pure virtual methods" of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; -}; - -inline SwParaConnectBorderItem::SwParaConnectBorderItem( const sal_Bool bConnect ) : - SfxBoolItem( RES_PARATR_CONNECT_BORDER, bConnect ) -{} - -inline SwParaConnectBorderItem& SwParaConnectBorderItem::operator=( - const SwParaConnectBorderItem& rConnect ) -{ - SetValue( rConnect.GetValue() ); - return *this; -} - - - -/****************************************************************************** - * Implementation of paragraph-attributes methods of SwAttrSet - ******************************************************************************/ - -inline const SvxLineSpacingItem &SwAttrSet::GetLineSpacing(sal_Bool bInP) const - { return (const SvxLineSpacingItem&)Get( RES_PARATR_LINESPACING,bInP); } -inline const SvxAdjustItem &SwAttrSet::GetAdjust(sal_Bool bInP) const - { return (const SvxAdjustItem&)Get( RES_PARATR_ADJUST,bInP); } -inline const SvxFmtSplitItem &SwAttrSet::GetSplit(sal_Bool bInP) const - { return (const SvxFmtSplitItem&)Get( RES_PARATR_SPLIT,bInP); } -inline const SwRegisterItem &SwAttrSet::GetRegister(sal_Bool bInP) const - { return (const SwRegisterItem&)Get( RES_PARATR_REGISTER,bInP); } -inline const SvxWidowsItem &SwAttrSet::GetWidows(sal_Bool bInP) const - { return (const SvxWidowsItem&)Get( RES_PARATR_WIDOWS,bInP); } -inline const SvxOrphansItem &SwAttrSet::GetOrphans(sal_Bool bInP) const - { return (const SvxOrphansItem&)Get( RES_PARATR_ORPHANS,bInP); } -inline const SvxTabStopItem &SwAttrSet::GetTabStops(sal_Bool bInP) const - { return (const SvxTabStopItem&)Get( RES_PARATR_TABSTOP,bInP); } -inline const SvxHyphenZoneItem &SwAttrSet::GetHyphenZone(sal_Bool bInP) const - { return (const SvxHyphenZoneItem&)Get(RES_PARATR_HYPHENZONE,bInP); } -inline const SwFmtDrop &SwAttrSet::GetDrop(sal_Bool bInP) const - { return (const SwFmtDrop&)Get(RES_PARATR_DROP,bInP); } -inline const SwNumRuleItem &SwAttrSet::GetNumRule(sal_Bool bInP) const - { return (const SwNumRuleItem&)Get(RES_PARATR_NUMRULE,bInP); } -inline const SvxScriptSpaceItem& SwAttrSet::GetScriptSpace(sal_Bool bInP) const - { return (const SvxScriptSpaceItem&)Get(RES_PARATR_SCRIPTSPACE,bInP); } -inline const SvxHangingPunctuationItem &SwAttrSet::GetHangingPunctuation(sal_Bool bInP) const - { return (const SvxHangingPunctuationItem&)Get(RES_PARATR_HANGINGPUNCTUATION,bInP); } -inline const SvxForbiddenRuleItem &SwAttrSet::GetForbiddenRule(sal_Bool bInP) const - { return (const SvxForbiddenRuleItem&)Get(RES_PARATR_FORBIDDEN_RULES, bInP); } -inline const SvxParaVertAlignItem &SwAttrSet::GetParaVertAlign(sal_Bool bInP) const - { return (const SvxParaVertAlignItem&)Get( RES_PARATR_VERTALIGN, bInP ); } -inline const SvxParaGridItem &SwAttrSet::GetParaGrid(sal_Bool bInP) const - { return (const SvxParaGridItem&)Get( RES_PARATR_SNAPTOGRID, bInP ); } -inline const SwParaConnectBorderItem &SwAttrSet::GetParaConnectBorder(sal_Bool bInP) const - { return (const SwParaConnectBorderItem&)Get( RES_PARATR_CONNECT_BORDER, bInP ); } - -/****************************************************************************** - * Implementation of paragraph-attributes methods of SwFmt - ******************************************************************************/ - -inline const SvxLineSpacingItem &SwFmt::GetLineSpacing(sal_Bool bInP) const - { return aSet.GetLineSpacing(bInP); } -inline const SvxAdjustItem &SwFmt::GetAdjust(sal_Bool bInP) const - { return aSet.GetAdjust(bInP); } -inline const SvxFmtSplitItem &SwFmt::GetSplit(sal_Bool bInP) const - { return aSet.GetSplit(bInP); } -inline const SwRegisterItem &SwFmt::GetRegister(sal_Bool bInP) const - { return aSet.GetRegister(bInP); } -inline const SvxWidowsItem &SwFmt::GetWidows(sal_Bool bInP) const - { return aSet.GetWidows(bInP); } -inline const SvxOrphansItem &SwFmt::GetOrphans(sal_Bool bInP) const - { return aSet.GetOrphans(bInP); } -inline const SvxTabStopItem &SwFmt::GetTabStops(sal_Bool bInP) const - { return aSet.GetTabStops(bInP); } -inline const SvxHyphenZoneItem &SwFmt::GetHyphenZone(sal_Bool bInP) const - { return aSet.GetHyphenZone(bInP); } -inline const SwFmtDrop &SwFmt::GetDrop(sal_Bool bInP) const - { return aSet.GetDrop(bInP); } -inline const SwNumRuleItem &SwFmt::GetNumRule(sal_Bool bInP) const - { return aSet.GetNumRule(bInP); } -inline const SvxScriptSpaceItem& SwFmt::GetScriptSpace(sal_Bool bInP) const - { return aSet.GetScriptSpace(bInP) ; } -inline const SvxHangingPunctuationItem &SwFmt::GetHangingPunctuation(sal_Bool bInP) const - { return aSet.GetHangingPunctuation(bInP) ; } -inline const SvxForbiddenRuleItem &SwFmt::GetForbiddenRule(sal_Bool bInP) const - { return (const SvxForbiddenRuleItem&)aSet.Get(RES_PARATR_FORBIDDEN_RULES, bInP); } -inline const SvxParaVertAlignItem &SwFmt::GetParaVertAlign(sal_Bool bInP) const - { return (const SvxParaVertAlignItem&)aSet.Get( RES_PARATR_VERTALIGN, bInP ); } -inline const SvxParaGridItem &SwFmt::GetParaGrid(sal_Bool bInP) const - { return (const SvxParaGridItem&)aSet.Get( RES_PARATR_SNAPTOGRID, bInP ); } -inline const SwParaConnectBorderItem &SwFmt::GetParaConnectBorder(sal_Bool bInP) const - { return (const SwParaConnectBorderItem&)aSet.Get( RES_PARATR_CONNECT_BORDER, bInP ); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/pausethreadstarting.hxx b/sw/inc/pausethreadstarting.hxx deleted file mode 100644 index 9399002213..0000000000 --- a/sw/inc/pausethreadstarting.hxx +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _PAUSETHREADSTARTING_HXX -#define _PAUSETHREADSTARTING_HXX - -/** Helper class to pause starting of threads during existence of an instance - of this class - - #i73788# - - @author OD -*/ -class SwPauseThreadStarting -{ - public: - - SwPauseThreadStarting(); - ~SwPauseThreadStarting(); - - private: - - bool mbPausedThreadStarting; -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/pch/precompiled_sw.cxx b/sw/inc/pch/precompiled_sw.cxx deleted file mode 100644 index 5dc3a1dc39..0000000000 --- a/sw/inc/pch/precompiled_sw.cxx +++ /dev/null @@ -1,31 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - ************************************************************************/ - -#include "precompiled_sw.hxx" - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx deleted file mode 100644 index d577822dc8..0000000000 --- a/sw/inc/pch/precompiled_sw.hxx +++ /dev/null @@ -1,998 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): Generated on 2006-09-01 17:50:13.279643 - -#ifdef PRECOMPILED_HEADERS - -//---MARKER--- - -#include "sal/config.h" -#include "sal/types.h" - -#include "avmedia/mediaitem.hxx" -#include "avmedia/mediaplayer.hxx" -#include "avmedia/mediatoolbox.hxx" -#include "avmedia/mediawindow.hxx" - -#include "basegfx/numeric/ftools.hxx" - -#include "basic/basmgr.hxx" -#include "basic/sbmeth.hxx" -#include "basic/sbmod.hxx" -#include "basic/sbstar.hxx" -#include "basic/sbx.hxx" -#include "basic/sbxobj.hxx" -#include "basic/sbxvar.hxx" - -#include "boost/shared_ptr.hpp" - -#include "com/sun/star/accessibility/AccessibleEventId.hpp" -#include "com/sun/star/accessibility/AccessibleRelation.hpp" -#include "com/sun/star/accessibility/AccessibleRelationType.hpp" -#include "com/sun/star/accessibility/AccessibleRole.hpp" -#include "com/sun/star/accessibility/AccessibleStateType.hpp" -#include "com/sun/star/accessibility/AccessibleTableModelChange.hpp" -#include "com/sun/star/accessibility/AccessibleTableModelChangeType.hpp" -#include "com/sun/star/accessibility/AccessibleTextType.hpp" -#include "com/sun/star/accessibility/XAccessible.hpp" -#include "com/sun/star/accessibility/XAccessibleEditableText.hpp" -#include "com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp" -#include "com/sun/star/accessibility/XAccessibleHyperlink.hpp" -#include "com/sun/star/accessibility/XAccessibleHypertext.hpp" -#include "com/sun/star/accessibility/XAccessibleImage.hpp" -#include "com/sun/star/accessibility/XAccessibleRelationSet.hpp" -#include "com/sun/star/accessibility/XAccessibleSelection.hpp" -#include "com/sun/star/accessibility/XAccessibleStateSet.hpp" -#include "com/sun/star/accessibility/XAccessibleTable.hpp" -#include "com/sun/star/accessibility/XAccessibleTextAttributes.hpp" -#include "com/sun/star/accessibility/XAccessibleValue.hpp" -#include "com/sun/star/awt/MessageBoxCommand.hpp" -#include "com/sun/star/awt/PosSize.hpp" -#include "com/sun/star/awt/ScrollBarOrientation.hpp" -#include "com/sun/star/awt/Size.hpp" -#include "com/sun/star/awt/Style.hpp" -#include "com/sun/star/awt/TextAlign.hpp" -#include "com/sun/star/awt/VclWindowPeerAttribute.hpp" -#include "com/sun/star/awt/XBitmap.hpp" -#include "com/sun/star/awt/XButton.hpp" -#include "com/sun/star/awt/XCheckBox.hpp" -#include "com/sun/star/awt/XComboBox.hpp" -#include "com/sun/star/awt/XControlModel.hpp" -#include "com/sun/star/awt/XCurrencyField.hpp" -#include "com/sun/star/awt/XDateField.hpp" -#include "com/sun/star/awt/XDialog.hpp" -#include "com/sun/star/awt/XFileDialog.hpp" -#include "com/sun/star/awt/XFixedText.hpp" -#include "com/sun/star/awt/XImageButton.hpp" -#include "com/sun/star/awt/XLayoutConstrains.hpp" -#include "com/sun/star/awt/XListBox.hpp" -#include "com/sun/star/awt/XMessageBox.hpp" -#include "com/sun/star/awt/XNumericField.hpp" -#include "com/sun/star/awt/XPatternField.hpp" -#include "com/sun/star/awt/XRadioButton.hpp" -#include "com/sun/star/awt/XScrollBar.hpp" -#include "com/sun/star/awt/XSpinField.hpp" -#include "com/sun/star/awt/XTabControllerModel.hpp" -#include "com/sun/star/awt/XTextArea.hpp" -#include "com/sun/star/awt/XTextComponent.hpp" -#include "com/sun/star/awt/XTextEditField.hpp" -#include "com/sun/star/awt/XTextLayoutConstrains.hpp" -#include "com/sun/star/awt/XTimeField.hpp" -#include "com/sun/star/awt/XVclContainer.hpp" -#include "com/sun/star/awt/XVclContainerPeer.hpp" -#include "com/sun/star/beans/NamedValue.hpp" -#include "com/sun/star/beans/PropertyAttribute.hpp" -#include "com/sun/star/beans/PropertyChangeEvent.hpp" -#include "com/sun/star/beans/PropertyState.hpp" -#include "com/sun/star/beans/PropertyValue.hpp" -#include "com/sun/star/beans/PropertyValues.hpp" -#include "com/sun/star/beans/UnknownPropertyException.hpp" -#include "com/sun/star/beans/XFastPropertySet.hpp" -#include "com/sun/star/beans/XMultiPropertySet.hpp" -#include "com/sun/star/beans/XMultiPropertyStates.hpp" -#include "com/sun/star/beans/XPropertyAccess.hpp" -#include "com/sun/star/beans/XPropertyChangeListener.hpp" -#include "com/sun/star/beans/XPropertyContainer.hpp" -#include "com/sun/star/beans/XPropertySet.hpp" -#include "com/sun/star/beans/XPropertySetInfo.hpp" -#include "com/sun/star/beans/XPropertyState.hpp" -#include "com/sun/star/beans/XPropertyStateChangeListener.hpp" -#include "com/sun/star/chart/XChartData.hpp" -#include "com/sun/star/chart/XChartDataArray.hpp" -#include "com/sun/star/container/XChild.hpp" -#include "com/sun/star/container/XContainer.hpp" -#include "com/sun/star/container/XContainerListener.hpp" -#include "com/sun/star/container/XContentEnumerationAccess.hpp" -#include "com/sun/star/container/XElementAccess.hpp" -#include "com/sun/star/container/XEnumeration.hpp" -#include "com/sun/star/container/XEnumerationAccess.hpp" -#include "com/sun/star/container/XHierarchicalNameAccess.hpp" -#include "com/sun/star/container/XIndexAccess.hpp" -#include "com/sun/star/container/XIndexContainer.hpp" -#include "com/sun/star/container/XIndexReplace.hpp" -#include "com/sun/star/container/XNameAccess.hpp" -#include "com/sun/star/container/XNameContainer.hpp" -#include "com/sun/star/container/XNamed.hpp" -#include "com/sun/star/container/XSet.hpp" -#include "com/sun/star/datatransfer/XTransferable.hpp" -#include "com/sun/star/datatransfer/XTransferableSupplier.hpp" -#include "com/sun/star/datatransfer/clipboard/XClipboard.hpp" -#include "com/sun/star/datatransfer/clipboard/XClipboardListener.hpp" -#include "com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp" -#include "com/sun/star/document/PrinterIndependentLayout.hpp" -#include "com/sun/star/document/RedlineDisplayType.hpp" -#include "com/sun/star/document/UpdateDocMode.hpp" -#include "com/sun/star/document/XDocumentInfoSupplier.hpp" -#include "com/sun/star/document/XDocumentInsertable.hpp" -#include "com/sun/star/document/XEmbeddedObjectSupplier.hpp" -#include "com/sun/star/document/XEmbeddedObjectSupplier2.hpp" -#include "com/sun/star/document/XEventBroadcaster.hpp" -#include "com/sun/star/document/XEventsSupplier.hpp" -#include "com/sun/star/document/XExporter.hpp" -#include "com/sun/star/document/XExtendedFilterDetection.hpp" -#include "com/sun/star/document/XFilter.hpp" -#include "com/sun/star/document/XImporter.hpp" -#include "com/sun/star/document/XLinkTargetSupplier.hpp" -#include "com/sun/star/document/XRedlinesSupplier.hpp" -#include "com/sun/star/drawing/ColorMode.hpp" -#include "com/sun/star/drawing/HomogenMatrix3.hpp" -#include "com/sun/star/drawing/PointSequence.hpp" -#include "com/sun/star/drawing/PointSequenceSequence.hpp" -#include "com/sun/star/drawing/XConnectableShape.hpp" -#include "com/sun/star/drawing/XConnectorShape.hpp" -#include "com/sun/star/drawing/XControlShape.hpp" -#include "com/sun/star/drawing/XDrawPage.hpp" -#include "com/sun/star/drawing/XDrawPageSupplier.hpp" -#include "com/sun/star/drawing/XShape.hpp" -#include "com/sun/star/drawing/XShapeAligner.hpp" -#include "com/sun/star/drawing/XShapeArranger.hpp" -#include "com/sun/star/drawing/XShapeGroup.hpp" -#include "com/sun/star/drawing/XShapeMirror.hpp" -#include "com/sun/star/drawing/XShapes.hpp" -#include "com/sun/star/drawing/XUniversalShapeDescriptor.hpp" -#include "com/sun/star/embed/Aspects.hpp" -#include "com/sun/star/embed/ElementModes.hpp" -#include "com/sun/star/embed/EmbedMisc.hpp" -#include "com/sun/star/embed/EmbedStates.hpp" -#include "com/sun/star/embed/NoVisualAreaSizeException.hpp" -#include "com/sun/star/embed/XClassifiedObject.hpp" -#include "com/sun/star/embed/XComponentSupplier.hpp" -#include "com/sun/star/embed/XEmbedObjectClipboardCreator.hpp" -#include "com/sun/star/embed/XEmbedObjectCreator.hpp" -#include "com/sun/star/embed/XEmbedPersist.hpp" -#include "com/sun/star/embed/XEmbeddedObject.hpp" -#include "com/sun/star/embed/XLinkCreator.hpp" -#include "com/sun/star/embed/XLinkageSupport.hpp" -#include "com/sun/star/embed/XStorage.hpp" -#include "com/sun/star/embed/XTransactedObject.hpp" -#include "com/sun/star/embed/XVisualObject.hpp" -#include "com/sun/star/form/FormButtonType.hpp" -#include "com/sun/star/form/FormComponentType.hpp" -#include "com/sun/star/form/FormSubmitEncoding.hpp" -#include "com/sun/star/form/FormSubmitMethod.hpp" -#include "com/sun/star/form/ListSourceType.hpp" -#include "com/sun/star/form/XForm.hpp" -#include "com/sun/star/form/XFormComponent.hpp" -#include "com/sun/star/form/XFormsSupplier.hpp" -#include "com/sun/star/form/XImageProducerSupplier.hpp" -#include "com/sun/star/frame/DispatchDescriptor.hpp" -#include "com/sun/star/frame/DispatchResultState.hpp" -#include "com/sun/star/frame/FrameSearchFlag.hpp" -#include "com/sun/star/frame/XComponentLoader.hpp" -#include "com/sun/star/frame/XController.hpp" -#include "com/sun/star/frame/XDesktop.hpp" -#include "com/sun/star/frame/XDispatch.hpp" -#include "com/sun/star/frame/XDispatchHelper.hpp" -#include "com/sun/star/frame/XDispatchProvider.hpp" -#include "com/sun/star/frame/XDispatchProviderInterception.hpp" -#include "com/sun/star/frame/XDispatchProviderInterceptor.hpp" -#include "com/sun/star/frame/XFrame.hpp" -#include "com/sun/star/frame/XLayoutManager.hpp" -#include "com/sun/star/frame/XModel.hpp" -#include "com/sun/star/frame/XNotifyingDispatch.hpp" -#include "com/sun/star/frame/XStorable.hpp" -#include "com/sun/star/frame/XTerminateListener.hpp" -#include "com/sun/star/i18n/Boundary.hpp" -#include "com/sun/star/i18n/BreakType.hpp" -#include "com/sun/star/i18n/CharacterIteratorMode.hpp" -#include "com/sun/star/i18n/CollatorOptions.hpp" -#include "com/sun/star/i18n/ForbiddenCharacters.hpp" -#include "com/sun/star/i18n/InputSequenceCheckMode.hpp" -#include "com/sun/star/i18n/ScriptType.hpp" -#include "com/sun/star/i18n/TextConversionOption.hpp" -#include "com/sun/star/i18n/TransliterationModules.hpp" -#include "com/sun/star/i18n/WordType.hpp" -#include "com/sun/star/i18n/XBreakIterator.hpp" -#include "com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp" -#include "com/sun/star/i18n/XExtendedInputSequenceChecker.hpp" -#include "com/sun/star/i18n/XForbiddenCharacters.hpp" -#include "com/sun/star/io/XActiveDataControl.hpp" -#include "com/sun/star/io/XActiveDataSource.hpp" -#include "com/sun/star/io/XInputStream.hpp" -#include "com/sun/star/io/XOutputStream.hpp" -#include "com/sun/star/io/XSeekable.hpp" -#include "com/sun/star/lang/DisposedException.hpp" -#include "com/sun/star/lang/EventObject.hpp" -#include "com/sun/star/lang/Locale.hpp" -#include "com/sun/star/lang/ServiceNotRegisteredException.hpp" -#include "com/sun/star/lang/WrappedTargetRuntimeException.hpp" -#include "com/sun/star/lang/XComponent.hpp" -#include "com/sun/star/lang/XEventListener.hpp" -#include "com/sun/star/lang/XInitialization.hpp" -#include "com/sun/star/lang/XMultiServiceFactory.hpp" -#include "com/sun/star/lang/XServiceInfo.hpp" -#include "com/sun/star/lang/XSingleServiceFactory.hpp" -#include "com/sun/star/lang/XUnoTunnel.hpp" -#include "com/sun/star/linguistic2/DictionaryListEventFlags.hpp" -#include "com/sun/star/linguistic2/LinguServiceEventFlags.hpp" -#include "com/sun/star/linguistic2/XDictionary.hpp" -#include "com/sun/star/linguistic2/XDictionaryList.hpp" -#include "com/sun/star/linguistic2/XDictionaryListEventListener.hpp" -#include "com/sun/star/linguistic2/XHyphenatedWord.hpp" -#include "com/sun/star/linguistic2/XHyphenator.hpp" -#include "com/sun/star/linguistic2/XLinguServiceEventListener.hpp" -#include "com/sun/star/linguistic2/XLinguServiceManager.hpp" -#include "com/sun/star/linguistic2/XSpellAlternatives.hpp" -#include "com/sun/star/linguistic2/XSpellChecker1.hpp" -#include "com/sun/star/linguistic2/XThesaurus.hpp" -#include "com/sun/star/mail/MailAttachment.hpp" -#include "com/sun/star/mail/MailServiceType.hpp" -#include "com/sun/star/mail/XAuthenticator.hpp" -#include "com/sun/star/mail/XConnectionListener.hpp" -#include "com/sun/star/mail/XMailMessage.hpp" -#include "com/sun/star/mail/XMailService.hpp" -#include "com/sun/star/mail/XSmtpService.hpp" -#include "com/sun/star/packages/WrongPasswordException.hpp" -#include "com/sun/star/packages/zip/ZipIOException.hpp" -#include "com/sun/star/scanner/ScannerContext.hpp" -#include "com/sun/star/scanner/XScannerManager.hpp" -#include "com/sun/star/script/XEventAttacher.hpp" -#include "com/sun/star/script/XEventAttacherManager.hpp" -#include "com/sun/star/script/XLibraryContainer.hpp" -#include "com/sun/star/sdb/CommandType.hpp" -#include "com/sun/star/sdb/SQLContext.hpp" -#include "com/sun/star/sdb/XColumn.hpp" -#include "com/sun/star/sdb/XCompletedConnection.hpp" -#include "com/sun/star/sdb/XCompletedExecution.hpp" -#include "com/sun/star/sdb/XDatabaseAccess.hpp" -#include "com/sun/star/sdb/XDocumentDataSource.hpp" -#include "com/sun/star/sdb/XQueriesSupplier.hpp" -#include "com/sun/star/sdb/XResultSetAccess.hpp" -#include "com/sun/star/sdb/XSingleSelectQueryComposer.hpp" -#include "com/sun/star/sdbc/DataType.hpp" -#include "com/sun/star/sdbc/ResultSetType.hpp" -#include "com/sun/star/sdbc/XCloseable.hpp" -#include "com/sun/star/sdbc/XConnection.hpp" -#include "com/sun/star/sdbc/XDataSource.hpp" -#include "com/sun/star/sdbc/XResultSet.hpp" -#include "com/sun/star/sdbc/XRow.hpp" -#include "com/sun/star/sdbc/XRowSet.hpp" -#include "com/sun/star/sdbcx/XColumnsSupplier.hpp" -#include "com/sun/star/sdbcx/XRowLocate.hpp" -#include "com/sun/star/sdbcx/XTablesSupplier.hpp" -#include "com/sun/star/sheet/XCellRangeData.hpp" -#include "com/sun/star/style/BreakType.hpp" -#include "com/sun/star/style/DropCapFormat.hpp" -#include "com/sun/star/style/GraphicLocation.hpp" -#include "com/sun/star/style/LineNumberPosition.hpp" -#include "com/sun/star/style/LineSpacing.hpp" -#include "com/sun/star/style/LineSpacingMode.hpp" -#include "com/sun/star/style/NumberingType.hpp" -#include "com/sun/star/style/PageStyleLayout.hpp" -#include "com/sun/star/style/ParagraphAdjust.hpp" -#include "com/sun/star/style/ParagraphStyleCategory.hpp" -#include "com/sun/star/style/VerticalAlignment.hpp" -#include "com/sun/star/style/XStyle.hpp" -#include "com/sun/star/style/XStyleFamiliesSupplier.hpp" -#include "com/sun/star/style/XStyleLoader.hpp" -#include "com/sun/star/table/CellContentType.hpp" -#include "com/sun/star/table/TableSortField.hpp" -#include "com/sun/star/table/XAutoFormattable.hpp" -#include "com/sun/star/table/XCellRange.hpp" -#include "com/sun/star/task/XInteractionHandler.hpp" -#include "com/sun/star/task/XJob.hpp" -#include "com/sun/star/task/XStatusIndicatorFactory.hpp" -#include "com/sun/star/text/BibliographyDataField.hpp" -#include "com/sun/star/text/ChapterFormat.hpp" -#include "com/sun/star/text/ControlCharacter.hpp" -#include "com/sun/star/text/DocumentStatistic.hpp" -#include "com/sun/star/text/FilenameDisplayFormat.hpp" -#include "com/sun/star/text/FootnoteNumbering.hpp" -#include "com/sun/star/text/GraphicCrop.hpp" -#include "com/sun/star/text/HoriOrientation.hpp" -#include "com/sun/star/text/HoriOrientationFormat.hpp" -#include "com/sun/star/text/HorizontalAdjust.hpp" -#include "com/sun/star/text/InvalidTextContentException.hpp" -#include "com/sun/star/text/MailMergeEvent.hpp" -#include "com/sun/star/text/MailMergeType.hpp" -#include "com/sun/star/text/NotePrintMode.hpp" -#include "com/sun/star/text/PageNumberType.hpp" -#include "com/sun/star/text/PlaceholderType.hpp" -#include "com/sun/star/text/PositionLayoutDir.hpp" -#include "com/sun/star/text/ReferenceFieldPart.hpp" -#include "com/sun/star/text/ReferenceFieldSource.hpp" -#include "com/sun/star/text/RelOrientation.hpp" -#include "com/sun/star/text/RubyAdjust.hpp" -#include "com/sun/star/text/SectionFileLink.hpp" -#include "com/sun/star/text/SetVariableType.hpp" -#include "com/sun/star/text/SizeType.hpp" -#include "com/sun/star/text/TableColumnSeparator.hpp" -#include "com/sun/star/text/TemplateDisplayFormat.hpp" -#include "com/sun/star/text/TextContentAnchorType.hpp" -#include "com/sun/star/text/TextGridMode.hpp" -#include "com/sun/star/text/UserDataPart.hpp" -#include "com/sun/star/text/UserFieldFormat.hpp" -#include "com/sun/star/text/VertOrientation.hpp" -#include "com/sun/star/text/VertOrientationFormat.hpp" -#include "com/sun/star/text/WrapInfluenceOnPosition.hpp" -#include "com/sun/star/text/WrapTextMode.hpp" -#include "com/sun/star/text/XAutoTextContainer.hpp" -#include "com/sun/star/text/XAutoTextEntry.hpp" -#include "com/sun/star/text/XAutoTextGroup.hpp" -#include "com/sun/star/text/XBookmarksSupplier.hpp" -#include "com/sun/star/text/XChapterNumberingSupplier.hpp" -#include "com/sun/star/text/XDefaultNumberingProvider.hpp" -#include "com/sun/star/text/XDependentTextField.hpp" -#include "com/sun/star/text/XDocumentIndex.hpp" -#include "com/sun/star/text/XDocumentIndexMark.hpp" -#include "com/sun/star/text/XDocumentIndexesSupplier.hpp" -#include "com/sun/star/text/XEndnotesSettingsSupplier.hpp" -#include "com/sun/star/text/XEndnotesSupplier.hpp" -#include "com/sun/star/text/XFootnote.hpp" -#include "com/sun/star/text/XFootnotesSettingsSupplier.hpp" -#include "com/sun/star/text/XFootnotesSupplier.hpp" -#include "com/sun/star/text/XLineNumberingProperties.hpp" -#include "com/sun/star/text/XMailMergeBroadcaster.hpp" -#include "com/sun/star/text/XMailMergeListener.hpp" -#include "com/sun/star/text/XModule.hpp" -#include "com/sun/star/text/XNumberingTypeInfo.hpp" -#include "com/sun/star/text/XPageCursor.hpp" -#include "com/sun/star/text/XPagePrintable.hpp" -#include "com/sun/star/text/XParagraphCursor.hpp" -#include "com/sun/star/text/XReferenceMarksSupplier.hpp" -#include "com/sun/star/text/XRelativeTextContentInsert.hpp" -#include "com/sun/star/text/XRelativeTextContentRemove.hpp" -#include "com/sun/star/text/XRubySelection.hpp" -#include "com/sun/star/text/XSentenceCursor.hpp" -#include "com/sun/star/text/XText.hpp" -#include "com/sun/star/text/XTextColumns.hpp" -#include "com/sun/star/text/XTextContent.hpp" -#include "com/sun/star/text/XTextCursor.hpp" -#include "com/sun/star/text/XTextDocument.hpp" -#include "com/sun/star/text/XTextEmbeddedObject.hpp" -#include "com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp" -#include "com/sun/star/text/XTextField.hpp" -#include "com/sun/star/text/XTextFieldsSupplier.hpp" -#include "com/sun/star/text/XTextFrame.hpp" -#include "com/sun/star/text/XTextFramesSupplier.hpp" -#include "com/sun/star/text/XTextGraphicObjectsSupplier.hpp" -#include "com/sun/star/text/XTextRange.hpp" -#include "com/sun/star/text/XTextRangeCompare.hpp" -#include "com/sun/star/text/XTextSection.hpp" -#include "com/sun/star/text/XTextSectionsSupplier.hpp" -#include "com/sun/star/text/XTextTable.hpp" -#include "com/sun/star/text/XTextTableCursor.hpp" -#include "com/sun/star/text/XTextTablesSupplier.hpp" -#include "com/sun/star/text/XTextViewCursor.hpp" -#include "com/sun/star/text/XTextViewCursorSupplier.hpp" -#include "com/sun/star/text/XWordCursor.hpp" -#include "com/sun/star/ucb/CommandAbortedException.hpp" -#include "com/sun/star/ucb/InteractiveAppException.hpp" -#include "com/sun/star/ucb/TransferInfo.hpp" -#include "com/sun/star/ucb/XCommandEnvironment.hpp" -#include "com/sun/star/ucb/XContent.hpp" -#include "com/sun/star/ucb/XContentIdentifier.hpp" -#include "com/sun/star/ucb/XContentProvider.hpp" -#include "com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp" -#include "com/sun/star/ui/dialogs/ExecutableDialogResults.hpp" -#include "com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp" -#include "com/sun/star/ui/dialogs/ListboxControlActions.hpp" -#include "com/sun/star/ui/dialogs/TemplateDescription.hpp" -#include "com/sun/star/ui/dialogs/XExecutableDialog.hpp" -#include "com/sun/star/ui/dialogs/XFilePicker.hpp" -#include "com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp" -#include "com/sun/star/ui/dialogs/XFilterManager.hpp" -#include "com/sun/star/ui/dialogs/XFolderPicker.hpp" -#include "com/sun/star/uno/Any.h" -#include "com/sun/star/uno/Any.hxx" -#include "com/sun/star/uno/Exception.hpp" -#include "com/sun/star/uno/Reference.h" -#include "com/sun/star/uno/Reference.hxx" -#include "com/sun/star/uno/RuntimeException.hpp" -#include "com/sun/star/uno/Sequence.h" -#include "com/sun/star/uno/Sequence.hxx" -#include "com/sun/star/uno/XCurrentContext.hpp" -#include "com/sun/star/uno/XNamingService.hpp" -#include "com/sun/star/uri/XUriReferenceFactory.hpp" -#include "com/sun/star/uri/XVndSunStarScriptUrl.hpp" -#include "com/sun/star/util/CloseVetoException.hpp" -#include "com/sun/star/util/Date.hpp" -#include "com/sun/star/util/DateTime.hpp" -#include "com/sun/star/util/DateTimeRange.hpp" -#include "com/sun/star/util/SearchFlags.hpp" -#include "com/sun/star/util/SearchOptions.hpp" -#include "com/sun/star/util/Time.hpp" -#include "com/sun/star/util/XArchiver.hpp" -#include "com/sun/star/util/XCloseable.hpp" -#include "com/sun/star/util/XLinkUpdate.hpp" -#include "com/sun/star/util/XModifiable.hpp" -#include "com/sun/star/util/XModifyBroadcaster.hpp" -#include "com/sun/star/util/XModifyListener.hpp" -#include "com/sun/star/util/XNumberFormatTypes.hpp" -#include "com/sun/star/util/XNumberFormatsSupplier.hpp" -#include "com/sun/star/util/XPropertyReplace.hpp" -#include "com/sun/star/util/XRefreshListener.hpp" -#include "com/sun/star/util/XRefreshable.hpp" -#include "com/sun/star/util/XReplaceDescriptor.hpp" -#include "com/sun/star/util/XReplaceable.hpp" -#include "com/sun/star/util/XSortable.hpp" -#include "com/sun/star/util/XURLTransformer.hpp" -#include "com/sun/star/util/XUpdatable.hpp" -#include "com/sun/star/view/DocumentZoomType.hpp" -#include "com/sun/star/view/XLineCursor.hpp" -#include "com/sun/star/view/XPrintSettingsSupplier.hpp" -#include "com/sun/star/view/XRenderable.hpp" -#include "com/sun/star/view/XScreenCursor.hpp" -#include "com/sun/star/view/XSelectionChangeListener.hpp" -#include "com/sun/star/view/XSelectionSupplier.hpp" -#include "com/sun/star/view/XViewCursor.hpp" -#include "com/sun/star/view/XViewSettingsSupplier.hpp" -#include "com/sun/star/xforms/XFormsSupplier.hpp" -#include "com/sun/star/xforms/XFormsUIHelper1.hpp" -#include "com/sun/star/xforms/XModel.hpp" -#include "com/sun/star/xml/sax/InputSource.hpp" -#include "com/sun/star/xml/sax/XAttributeList.hpp" -#include "com/sun/star/xml/sax/XDocumentHandler.hpp" -#include "com/sun/star/xml/sax/XParser.hpp" - -#include "comphelper/ChainablePropertySet.hxx" -#include "comphelper/ChainablePropertySetInfo.hxx" -#include "comphelper/MasterPropertySet.hxx" -#include "comphelper/MasterPropertySetInfo.hxx" -#include "comphelper/SettingsHelper.hxx" -#include "comphelper/TypeGeneration.hxx" -#include "comphelper/accessibleeventnotifier.hxx" -#include "comphelper/accessiblekeybindinghelper.hxx" -#include "comphelper/classids.hxx" -#include "comphelper/embeddedobjectcontainer.hxx" -#include "comphelper/mediadescriptor.hxx" -#include "comphelper/processfactory.hxx" -#include "comphelper/seqstream.hxx" -#include "comphelper/storagehelper.hxx" -#include "comphelper/types.hxx" -#include "comphelper/uno3.hxx" - - -#include "cppuhelper/bootstrap.hxx" -#include "cppuhelper/compbase1.hxx" -#include "cppuhelper/factory.hxx" -#include "cppuhelper/implbase1.hxx" -#include "cppuhelper/implbase10.hxx" -#include "cppuhelper/implbase11.hxx" -#include "cppuhelper/implbase2.hxx" -#include "cppuhelper/implbase3.hxx" -#include "cppuhelper/implbase4.hxx" -#include "cppuhelper/implbase5.hxx" -#include "cppuhelper/implbase6.hxx" -#include "cppuhelper/implbase7.hxx" -#include "cppuhelper/implbase8.hxx" -#include "cppuhelper/implbase9.hxx" -#include "cppuhelper/implbase_ex.hxx" -#include "cppuhelper/implbase_ex_post.hxx" -#include "cppuhelper/implbase_ex_pre.hxx" -#include "cppuhelper/interfacecontainer.hxx" -#include "cppuhelper/weak.hxx" -#include "cppuhelper/weakref.hxx" - -#include "framework/interaction.hxx" - -#include "svtools/grfmgr.hxx" -#include "svl/mailenum.hxx" - -#include "i18npool/lang.h" -#include "i18npool/mslangid.hxx" - -#include "linguistic/lngprops.hxx" - -#include "osl/conditn.hxx" -#include "osl/diagnose.h" -#include "osl/endian.h" -#include "osl/file.hxx" -#include "osl/interlck.h" -#include "osl/module.h" -#include "osl/module.hxx" -#include "osl/mutex.hxx" -#include "osl/thread.hxx" - -#include "rsc/rscsfx.hxx" - -#include "rtl/logfile.hxx" -#include "rtl/math.hxx" -#include "rtl/memory.h" -#include "rtl/string.h" -#include "rtl/string.hxx" -#include "rtl/tencinfo.h" -#include "rtl/textenc.h" -#include "rtl/ustrbuf.hxx" -#include "rtl/ustring.h" -#include "rtl/ustring.hxx" -#include "rtl/uuid.h" - -#include "salhelper/condition.hxx" - -#include "sfx2/app.hxx" -#include "sfx2/appuno.hxx" -#include "sfx2/basedlgs.hxx" -#include "sfx2/bindings.hxx" -#include "sfx2/childwin.hxx" -#include "sfx2/ctrlitem.hxx" -#include "sfx2/dinfdlg.hxx" -#include "sfx2/dispatch.hxx" -#include "sfx2/docfilt.hxx" -#include "sfx2/docinf.hxx" -#include "sfx2/dockwin.hxx" -#include "sfx2/doctempl.hxx" -#include "sfx2/event.hxx" -#include "sfx2/fcontnr.hxx" -#include "sfx2/filedlghelper.hxx" -#include "sfx2/frame.hxx" -#include "sfx2/frmdescr.hxx" -#include "sfx2/imagemgr.hxx" -#include "sfx2/imgmgr.hxx" -#include "sfx2/linkmgr.hxx" -#include "sfx2/linksrc.hxx" -#include "sfx2/lnkbase.hxx" -#include "sfx2/mieclip.hxx" -#include "sfx2/mnumgr.hxx" -#include "sfx2/module.hxx" -#include "sfx2/msg.hxx" -#include "sfx2/msgpool.hxx" -#include "sfx2/new.hxx" -#include "sfx2/newstyle.hxx" -#include "sfx2/objface.hxx" -#include "sfx2/objitem.hxx" -#include "sfx2/passwd.hxx" -#include "sfx2/printer.hxx" -#include "sfx2/prnmon.hxx" -#include "sfx2/progress.hxx" -#include "sfx2/request.hxx" -#include "sfx2/sfx.hrc" -#include "sfx2/sfxdefs.hxx" -#include "sfx2/sfxdlg.hxx" -#include "sfx2/sfxhelp.hxx" -#include "sfx2/sfxsids.hrc" -#include "sfx2/sfxuno.hxx" -#include "sfx2/shell.hxx" -#include "sfx2/styfitem.hxx" -#include "sfx2/styledlg.hxx" -#include "sfx2/tabdlg.hxx" -#include "sfx2/tbxctrl.hxx" -#include "sfx2/templdlg.hxx" -#include "sfx2/tplpitem.hxx" -#include "sfx2/viewfac.hxx" -#include "sfx2/viewfrm.hxx" -#include "sfx2/viewsh.hxx" - -#include "sot/clsids.hxx" -#include "sot/exchange.hxx" -#include "sot/factory.hxx" -#include "sot/filelist.hxx" -#include "sot/formats.hxx" -#include "sot/stg.hxx" -#include "sot/storage.hxx" -#include "sot/storinfo.hxx" - -#include "svtools/FilterConfigItem.hxx" -#include "svl/PasswordHelper.hxx" -#include "svtools/accessibilityoptions.hxx" -#include "svl/aeitem.hxx" -#include "svl/cjkoptions.hxx" -#include "unotools/cmdoptions.hxx" -#include "svl/cntnrsrt.hxx" -#include "svtools/collatorres.hxx" -#include "svtools/colorcfg.hxx" -#include "unotools/compatibility.hxx" -#include "svtools/controldims.hrc" -#include "svl/ctloptions.hxx" -#include "svtools/ctrlbox.hxx" -#include "svtools/ctrltool.hxx" -#include "svtools/editbrowsebox.hxx" -#include "svtools/ehdl.hxx" -#include "svl/eitem.hxx" -#include "svtools/embedhlp.hxx" -#include "svtools/embedtransfer.hxx" -#include "svtools/filter.hxx" -#include "svl/flagitem.hxx" -#include "unotools/fltrcfg.hxx" -#include "svl/fstathelper.hxx" -#include "svl/globalnameitem.hxx" -#include "svtools/headbar.hxx" -#include "svtools/htmlkywd.hxx" -#include "svtools/htmltokn.h" -#include "svl/imageitm.hxx" -#include "svtools/imap.hxx" -#include "svtools/indexentryres.hxx" -#include "svl/inethist.hxx" -#include "svtools/inetimg.hxx" -#include "svtools/insdlg.hxx" -#include "svl/intitem.hxx" -#include "svl/isethint.hxx" -#include "svl/itemiter.hxx" -#include "svl/itempool.hxx" -#include "svl/itemprop.hxx" -#include "svl/itemset.hxx" -#include "svl/languageoptions.hxx" -#include "svl/lckbitem.hxx" -#include "unotools/lingucfg.hxx" -#include "unotools/linguprops.hxx" -#include "svl/lstner.hxx" -#include "unotools/misccfg.hxx" -#include "unotools/moduleoptions.hxx" -#include "svl/numuno.hxx" -#include "svl/ownlist.hxx" -#include "svtools/parhtml.hxx" -#include "unotools/pathoptions.hxx" -#include "svl/poolitem.hxx" -#include "svtools/prgsbar.hxx" -#include "svtools/prnsetup.hxx" -#include "svl/ptitem.hxx" -#include "svl/rectitem.hxx" -#include "svtools/rtfkeywd.hxx" -#include "svtools/rtfout.hxx" -#include "svtools/rtftoken.h" -#include "svtools/ruler.hxx" -#include "unotools/saveopt.hxx" -#include "svtools/scriptedtext.hxx" -#include "svtools/sfxecode.hxx" -#include "svl/slstitm.hxx" -#include "svl/smplhint.hxx" -#include "svtools/soerr.hxx" -#include "svl/solar.hrc" -#include "unotools/sourceviewconfig.hxx" -#include "svtools/stdctrl.hxx" -#include "svl/stritem.hxx" -#include "svl/style.hrc" -#include "svl/style.hxx" -#include "svl/svarray.hxx" -#include "svtools/svmedit.hxx" -#include "svtools/svparser.hxx" -#include "svl/svstdarr.hxx" -#include "svtools/svtabbx.hxx" -#include "svtools/svtreebx.hxx" -#include "unotools/syslocale.hxx" -#include "svtools/textview.hxx" -#include "svtools/transfer.hxx" -#include "svtools/txtattr.hxx" -#include "svtools/txtcmp.hxx" -#include "svl/undo.hxx" -#include "unotools/undoopt.hxx" -#include "svtools/unoevent.hxx" -#include "svtools/unoimap.hxx" -#include "svl/urihelper.hxx" -#include "svl/urlbmk.hxx" -#include "unotools/useroptions.hxx" -#include "svtools/valueset.hxx" -#include "svl/visitem.hxx" -#include "svl/whiter.hxx" -#include "svtools/xtextedt.hxx" - -#include "svx/IAccessibleParent.hxx" -#include "svx/IAccessibleViewForwarder.hxx" -#include "svx/SpellDialogChildWindow.hxx" -#include "editeng/SpellPortions.hxx" -#include "editeng/UnoForbiddenCharsTable.hxx" -#include "editeng/acorrcfg.hxx" -#include "svx/anchorid.hxx" -#include "svl/asiancfg.hxx" -#include "svx/checklbx.hxx" -#include "svx/clipboardctl.hxx" -#include "svx/clipfmtitem.hxx" -#include "svx/contdlg.hxx" -#include "svx/ctredlin.hxx" -#include "svx/dataaccessdescriptor.hxx" -#include "svx/dialmgr.hxx" -#include "svx/dialogs.hrc" -#include "svx/dlgutil.hxx" -#include "editeng/editdata.hxx" -#include "editeng/editeng.hxx" -#include "editeng/editobj.hxx" -#include "editeng/editstat.hxx" -#include "editeng/editview.hxx" -#include "editeng/eeitem.hxx" -#include "filter/msfilter/escherex.hxx" -#include "svx/extrusionbar.hxx" -#include "svx/extrusioncolorcontrol.hxx" -#include "svx/fillctrl.hxx" -#include "svx/flagsdef.hxx" -#include "editeng/flstitem.hxx" -#include "svx/fmdmod.hxx" -#include "svx/fmglob.hxx" -#include "svx/fmobjfac.hxx" -#include "svx/fmpage.hxx" -#include "svx/fntctrl.hxx" -#include "svx/fontwork.hxx" -#include "svx/fontworkbar.hxx" -#include "svx/fontworkgallery.hxx" -#include "editeng/forbiddencharacterstable.hxx" -#include "svx/formatpaintbrushctrl.hxx" -#include "editeng/frmdir.hxx" -#include "svx/galbrws.hxx" -#include "svx/gallery.hxx" -#include "svx/globlmn.hrc" -#include "svx/grafctrl.hxx" -#include "editeng/hangulhanja.hxx" -#include "svx/hdft.hxx" -#include "svtools/htmlcfg.hxx" -#include "svx/htmlmode.hxx" -#include "svx/hyperdlg.hxx" -#include "svx/imapdlg.hxx" -#include "editeng/itemtype.hxx" -#include "svx/langbox.hxx" -#include "svx/layctrl.hxx" -#include "svx/lboxctrl.hxx" -#include "svx/linectrl.hxx" -#include "filter/msfilter/mscodec.hxx" -#include "filter/msfilter/msdffimp.hxx" -#include "filter/msfilter/msfiltertracer.hxx" -#include "filter/msfilter/msocximex.hxx" -#include "filter/msfilter/msoleexp.hxx" -#include "editeng/numitem.hxx" -#include "svx/numvset.hxx" -#include "svx/objfac3d.hxx" -#include "svx/ofaitem.hxx" -#include "svx/optgenrl.hxx" -#include "svx/optgrid.hxx" -#include "editeng/outliner.hxx" -#include "editeng/outlobj.hxx" -#include "svx/pagectrl.hxx" -#include "editeng/paperinf.hxx" -#include "svx/paraprev.hxx" -#include "svx/pfiledlg.hxx" -#include "svx/prtqry.hxx" -#include "svx/rectenum.hxx" -#include "svx/rotmodit.hxx" -#include "svx/rubydialog.hxx" -#include "svx/ruler.hxx" -#include "svx/rulritem.hxx" -#include "editeng/scripttypeitem.hxx" -#include "svx/sdgcoitm.hxx" -#include "svx/sdggaitm.hxx" -#include "svx/sdginitm.hxx" -#include "svx/sdgluitm.hxx" -#include "svx/sdgmoitm.hxx" -#include "svx/sdgtritm.hxx" -#include "svx/sdr/contact/displayinfo.hxx" -#include "svx/sdr/contact/objectcontactofobjlistpainter.hxx" -#include "svx/sdr/contact/viewcontactofsdrmediaobj.hxx" -#include "svx/sdr/properties/defaultproperties.hxx" -#include "svx/sdtaaitm.hxx" -#include "svx/sdtacitm.hxx" -#include "svx/sdtaditm.hxx" -#include "svx/sdtagitm.hxx" -#include "svx/sdtaitm.hxx" -#include "svx/sdtakitm.hxx" -#include "svx/simptabl.hxx" -#include "editeng/splwrap.hxx" -#include "svx/srchdlg.hxx" -#include "svx/stddlg.hxx" -#include "svx/strarray.hxx" -#include "svx/xflasit.hxx" -#include "svx/xflclit.hxx" -#include "svx/xflgrit.hxx" -#include "svx/xflhtit.hxx" -#include "svx/xfltrit.hxx" -#include "svx/xftadit.hxx" -#include "svx/xftdiit.hxx" -#include "svx/xftmrit.hxx" -#include "svx/xftouit.hxx" -#include "svx/xftsfit.hxx" -#include "svx/xftshcit.hxx" -#include "svx/xftshit.hxx" -#include "svx/xftshxy.hxx" -#include "svx/xftstit.hxx" -#include "svx/xgrad.hxx" -#include "svx/xlineit.hxx" -#include "svx/xlineit0.hxx" -#include "svx/xlnclit.hxx" -#include "svx/xlndsit.hxx" -#include "svx/xlnedit.hxx" -#include "svx/xlnstit.hxx" -#include "svx/xlnwtit.hxx" -#include "svx/xmleohlp.hxx" -#include "svx/xmlexchg.hxx" -#include "svx/xmlgrhlp.hxx" -#include "svx/xoutbmp.hxx" -#include "svx/xpoly.hxx" -#include "svx/xtable.hxx" -#include "svx/xtextit0.hxx" -#include "svx/zoomitem.hxx" - -#include "sys/stat.h" -#include "sys/types.h" - -#include "toolkit/helper/vclunohelper.hxx" -#include "toolkit/unohlp.hxx" - -#include "tools/bigint.hxx" -#include "tools/cachestr.hxx" -#include "tools/color.hxx" -#include "tools/date.hxx" -#include "tools/datetime.hxx" -#include "tools/errcode.hxx" -#include "tools/errinf.hxx" -#include "tools/fract.hxx" -#include "tools/gen.hxx" -#include "tools/globname.hxx" -#include "tools/link.hxx" -#include "tools/mempool.hxx" -#include "tools/multisel.hxx" -#include "tools/poly.hxx" -#include "tools/rc.hxx" -#include "tools/ref.hxx" -#include "tools/resary.hxx" -#include "tools/resid.hxx" -#include "tools/resmgr.hxx" -#include "tools/rtti.hxx" -#include "tools/shl.hxx" -#include "tools/solar.h" -#include "tools/stream.hxx" -#include "tools/string.hxx" -#include "tools/table.hxx" -#include "tools/tempfile.hxx" -#include "tools/time.hxx" -#include "tools/urlobj.hxx" - -#include "ucbhelper/commandenvironment.hxx" -#include "ucbhelper/content.hxx" -#include "ucbhelper/contentbroker.hxx" -#include "ucbhelper/contentidentifier.hxx" - -#include "unicode/ubidi.h" - -#include "uno/lbnames.h" - -#include "unotools/accessiblerelationsethelper.hxx" -#include "unotools/accessiblestatesethelper.hxx" -#include "unotools/calendarwrapper.hxx" -#include "unotools/charclass.hxx" -#include "unotools/collatorwrapper.hxx" -#include "unotools/configitem.hxx" -#include "unotools/configmgr.hxx" -#include "unotools/confignode.hxx" -#include "unotools/configpathes.hxx" -#include "unotools/intlwrapper.hxx" -#include "unotools/localedatawrapper.hxx" -#include "unotools/localfilehelper.hxx" -#include "unotools/processfactory.hxx" -#include "unotools/streamwrap.hxx" -#include "unotools/tempfile.hxx" -#include "unotools/transliterationwrapper.hxx" -#include "unotools/ucbstreamhelper.hxx" - -#include "vcl/bitmap.hxx" -#include "vcl/button.hxx" -#include "vcl/cmdevt.h" -#include "vcl/cmdevt.hxx" -#include "vcl/combobox.hxx" -#include "vcl/cursor.hxx" -#include "vcl/cvtgrf.hxx" -#include "vcl/dialog.hxx" -#include "vcl/edit.hxx" -#include "vcl/event.hxx" -#include "vcl/field.hxx" -#include "vcl/fixed.hxx" -#include "tools/fldunit.hxx" -#include "vcl/font.hxx" -#include "unotools/fontcvt.hxx" -#include "vcl/graph.hxx" -#include "vcl/group.hxx" -#include "vcl/help.hxx" -#include "vcl/image.hxx" -#include "vcl/button.hxx" -#include "vcl/inputctx.hxx" -#include "vcl/jobset.hxx" -#include "vcl/keycod.hxx" -#include "vcl/keycodes.hxx" -#include "vcl/lstbox.hxx" -#include "vcl/mapmod.hxx" -#include "vcl/menu.hxx" -#include "vcl/menubtn.hxx" -#include "vcl/metric.hxx" -#include "vcl/mnemonic.hxx" -#include "vcl/morebtn.hxx" -#include "vcl/msgbox.hxx" -#include "vcl/outdev.hxx" -#include "vcl/pdfextoutdevdata.hxx" -#include "vcl/print.hxx" -#include "vcl/region.hxx" -#include "vcl/salbtype.hxx" -#include "vcl/scrbar.hxx" -#include "vcl/settings.hxx" -#include "vcl/sound.hxx" -#include "vcl/status.hxx" -#include "vcl/svapp.hxx" -#include "vcl/syswin.hxx" -#include "vcl/timer.hxx" -#include "vcl/toolbox.hxx" -#include "vcl/vclenum.hxx" -#include "vcl/virdev.hxx" -#include "vcl/waitobj.hxx" -#include "vcl/window.hxx" -#include "tools/wintypes.hxx" -#include "vcl/wrkwin.hxx" - -#include "rtl/ref.hxx" - -#include "xmloff/DocumentSettingsContext.hxx" -#include "xmloff/ProgressBarHelper.hxx" -#include "xmloff/XMLBase64ImportContext.hxx" -#include "xmloff/XMLFilterServiceNames.h" -#include "xmloff/XMLFontAutoStylePool.hxx" -#include "xmloff/XMLFontStylesContext.hxx" -#include "xmloff/XMLGraphicsDefaultStyle.hxx" -#include "xmloff/XMLTextListAutoStylePool.hxx" -#include "xmloff/XMLTextMasterPageExport.hxx" -#include "xmloff/XMLTextMasterStylesContext.hxx" -#include "xmloff/XMLTextShapeImportHelper.hxx" -#include "xmloff/XMLTextShapeStyleContext.hxx" -#include "xmloff/XMLTextTableContext.hxx" -#include "xmloff/attrlist.hxx" -#include "xmloff/families.hxx" -#include "xmloff/functional.hxx" -#include "xmloff/i18nmap.hxx" -#include "xmloff/maptype.hxx" -#include "xmloff/nmspmap.hxx" -#include "xmloff/numehelp.hxx" -#include "xmloff/prhdlfac.hxx" -#include "xmloff/prstylei.hxx" -#include "xmloff/txtparae.hxx" -#include "xmloff/txtprmap.hxx" -#include "xmloff/txtstyli.hxx" -#include "xmloff/uniref.hxx" -#include "xmloff/xformsimport.hxx" -#include "xmloff/xmlaustp.hxx" -#include "xmloff/xmlement.hxx" -#include "xmloff/xmlexp.hxx" -#include "xmloff/xmlictxt.hxx" -#include "xmloff/xmlmetae.hxx" -#include "xmloff/xmlmetai.hxx" -#include "xmloff/xmlnmspe.hxx" -#include "xmloff/xmlprmap.hxx" -#include "xmloff/xmlscripti.hxx" -#include "xmloff/xmlstyle.hxx" -#include "xmloff/xmltabe.hxx" -#include "xmloff/xmltkmap.hxx" -#include "xmloff/xmltoken.hxx" -#include "xmloff/xmltypes.hxx" -#include "xmloff/xmluconv.hxx" -//---MARKER--- - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/poolfmt.awk b/sw/inc/poolfmt.awk deleted file mode 100644 index 658ab044a7..0000000000 --- a/sw/inc/poolfmt.awk +++ /dev/null @@ -1,86 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# 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. -# -#************************************************************************* - -# -# This awk-script generates a cxx-file, that dumps all PoolIDs of the template. -# It is needed for HelpPI. -# Usage: awk -f poolid.awk poolfmt.hxx > poolid.cxx -# cl poolid.cxx -# poolid.exe > ???.hrc -# - -function Header() { - print "// This is an outputfile of an awk-script: $Workfile: poolfmt.awk $" - print "#include <solar.h> " - print - print "#include <stdio.h>" - print "#include <stdlib.h>" - print - print "#pragma hdrstop" - print - print "#include <iostream.hxx> " - print "#include \"poolfmt.hxx\"" - print -} - -function Main() { - print - print "void main( int , char *[] ) {" - sStr = "#define" - print " int nSize = (sizeof(ppPoolIds) / sizeof(PoolFmtIds)) - 1;" - print " for( int n = 0; n < nSize; n++ )" - print " printf( \"" sStr " %s\\t%8d\\n\", ppPoolIds[ n ].pStr, ppPoolIds[ n ].nId );" - print "}" -} - -function TableHead() { - print - print "struct PoolFmtIds { int nId; const char* pStr; };" - print "static PoolFmtIds ppPoolIds[] = {" -} - -function TableTail() { - print " 0, \"\" };" - print -} - -BEGIN { - Header(); - TableHead(); -} - -/^[ \t]*RES_/ && !index( $1, "_BEGIN" ) && !index( $1, "_END" ) && !index( $1, "_POOL_" ) { - sStr = $1; - split( $1, sStr, "," ); - print " " sStr[1] ", \"" sStr[1] "\"," -} - -END { - TableTail(); - Main(); -} - diff --git a/sw/inc/poolfmt.hrc b/sw/inc/poolfmt.hrc deleted file mode 100644 index e9e48caf39..0000000000 --- a/sw/inc/poolfmt.hrc +++ /dev/null @@ -1,288 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _POOLFMT_HRC -#define _POOLFMT_HRC - -#include "rcid.hrc" - -// --------------- -// die Formate -// --------------- - -// Zeichenvorlagen: -#define STR_POOLCHR_FOOTNOTE (RC_POOLCHRFMT_BEGIN+ 0) -#define STR_POOLCHR_PAGENO (RC_POOLCHRFMT_BEGIN+ 1) -#define STR_POOLCHR_LABEL (RC_POOLCHRFMT_BEGIN+ 2) -#define STR_POOLCHR_DROPCAPS (RC_POOLCHRFMT_BEGIN+ 3) -#define STR_POOLCHR_NUM_LEVEL (RC_POOLCHRFMT_BEGIN+ 4) -#define STR_POOLCHR_BUL_LEVEL (RC_POOLCHRFMT_BEGIN+ 5) -#define STR_POOLCHR_INET_NORMAL (RC_POOLCHRFMT_BEGIN+ 6) -#define STR_POOLCHR_INET_VISIT (RC_POOLCHRFMT_BEGIN+ 7) -#define STR_POOLCHR_JUMPEDIT (RC_POOLCHRFMT_BEGIN+ 8) -#define STR_POOLCHR_TOXJUMP (RC_POOLCHRFMT_BEGIN+ 9) -#define STR_POOLCHR_ENDNOTE (RC_POOLCHRFMT_BEGIN+ 10) -#define STR_POOLCHR_LINENUM (RC_POOLCHRFMT_BEGIN+ 11) -#define STR_POOLCHR_IDX_MAIN_ENTRY (RC_POOLCHRFMT_BEGIN+ 12) -#define STR_POOLCHR_FOOTNOTE_ANCHOR (RC_POOLCHRFMT_BEGIN+ 13) -#define STR_POOLCHR_ENDNOTE_ANCHOR (RC_POOLCHRFMT_BEGIN+ 14) -#define STR_POOLCHR_RUBYTEXT (RC_POOLCHRFMT_BEGIN+ 15) -#define STR_POOLCHR_VERT_NUM (RC_POOLCHRFMT_BEGIN+ 16) - -#define STR_POOLCHR_HTML_EMPHASIS (RC_POOLCHRFMT_HTML_BEGIN+ 0) -#define STR_POOLCHR_HTML_CITIATION (RC_POOLCHRFMT_HTML_BEGIN+ 1) -#define STR_POOLCHR_HTML_STRONG (RC_POOLCHRFMT_HTML_BEGIN+ 2) -#define STR_POOLCHR_HTML_CODE (RC_POOLCHRFMT_HTML_BEGIN+ 3) -#define STR_POOLCHR_HTML_SAMPLE (RC_POOLCHRFMT_HTML_BEGIN+ 4) -#define STR_POOLCHR_HTML_KEYBOARD (RC_POOLCHRFMT_HTML_BEGIN+ 5) -#define STR_POOLCHR_HTML_VARIABLE (RC_POOLCHRFMT_HTML_BEGIN+ 6) -#define STR_POOLCHR_HTML_DEFINSTANCE (RC_POOLCHRFMT_HTML_BEGIN+ 7) -#define STR_POOLCHR_HTML_TELETYPE (RC_POOLCHRFMT_HTML_BEGIN+ 8) - -// Rahmen-Vorlagen: -#define STR_POOLFRM_FRAME (RC_POOLFRMFMT_BEGIN+ 0) -#define STR_POOLFRM_GRAPHIC (RC_POOLFRMFMT_BEGIN+ 1) -#define STR_POOLFRM_OLE (RC_POOLFRMFMT_BEGIN+ 2) -#define STR_POOLFRM_FORMEL (RC_POOLFRMFMT_BEGIN+ 3) -#define STR_POOLFRM_MARGINAL (RC_POOLFRMFMT_BEGIN+ 4) -#define STR_POOLFRM_WATERSIGN (RC_POOLFRMFMT_BEGIN+ 5) -#define STR_POOLFRM_LABEL (RC_POOLFRMFMT_BEGIN+ 6) - -// --------------- -// die Vorlagen -// --------------- -// Gruppe Text -#define STR_POOLCOLL_STANDARD (RC_POOLCOLL_TEXT_BEGIN+ 0) -#define STR_POOLCOLL_TEXT (RC_POOLCOLL_TEXT_BEGIN+ 1) -#define STR_POOLCOLL_TEXT_IDENT (RC_POOLCOLL_TEXT_BEGIN+ 2) -#define STR_POOLCOLL_TEXT_NEGIDENT (RC_POOLCOLL_TEXT_BEGIN+ 3) -#define STR_POOLCOLL_TEXT_MOVE (RC_POOLCOLL_TEXT_BEGIN+ 4) -#define STR_POOLCOLL_GREETING (RC_POOLCOLL_TEXT_BEGIN+ 5) -#define STR_POOLCOLL_SIGNATURE (RC_POOLCOLL_TEXT_BEGIN+ 6) -#define STR_POOLCOLL_CONFRONTATION (RC_POOLCOLL_TEXT_BEGIN+ 7) -#define STR_POOLCOLL_MARGINAL (RC_POOLCOLL_TEXT_BEGIN+ 8) - - // Untergruppierung Ueberschriften -#define STR_POOLCOLL_HEADLINE_BASE (RC_POOLCOLL_TEXT_BEGIN+ 9) -#define STR_POOLCOLL_HEADLINE1 (RC_POOLCOLL_TEXT_BEGIN+ 10) -#define STR_POOLCOLL_HEADLINE2 (RC_POOLCOLL_TEXT_BEGIN+ 11) -#define STR_POOLCOLL_HEADLINE3 (RC_POOLCOLL_TEXT_BEGIN+ 12) -#define STR_POOLCOLL_HEADLINE4 (RC_POOLCOLL_TEXT_BEGIN+ 13) -#define STR_POOLCOLL_HEADLINE5 (RC_POOLCOLL_TEXT_BEGIN+ 14) -#define STR_POOLCOLL_HEADLINE6 (RC_POOLCOLL_TEXT_BEGIN+ 15) -#define STR_POOLCOLL_HEADLINE7 (RC_POOLCOLL_TEXT_BEGIN+ 16) -#define STR_POOLCOLL_HEADLINE8 (RC_POOLCOLL_TEXT_BEGIN+ 17) -#define STR_POOLCOLL_HEADLINE9 (RC_POOLCOLL_TEXT_BEGIN+ 18) -#define STR_POOLCOLL_HEADLINE10 (RC_POOLCOLL_TEXT_BEGIN+ 19) - -// Gruppe Listen -#define STR_POOLCOLL_NUMBUL_BASE (RC_POOLCOLL_LISTS_BEGIN+ 0) - // Untergruppe Nummerierung -#define STR_POOLCOLL_NUM_LEVEL1S (RC_POOLCOLL_LISTS_BEGIN+ 1) -#define STR_POOLCOLL_NUM_LEVEL1 (RC_POOLCOLL_LISTS_BEGIN+ 2) -#define STR_POOLCOLL_NUM_LEVEL1E (RC_POOLCOLL_LISTS_BEGIN+ 3) -#define STR_POOLCOLL_NUM_NONUM1 (RC_POOLCOLL_LISTS_BEGIN+ 4) -#define STR_POOLCOLL_NUM_LEVEL2S (RC_POOLCOLL_LISTS_BEGIN+ 5) -#define STR_POOLCOLL_NUM_LEVEL2 (RC_POOLCOLL_LISTS_BEGIN+ 6) -#define STR_POOLCOLL_NUM_LEVEL2E (RC_POOLCOLL_LISTS_BEGIN+ 7) -#define STR_POOLCOLL_NUM_NONUM2 (RC_POOLCOLL_LISTS_BEGIN+ 8) -#define STR_POOLCOLL_NUM_LEVEL3S (RC_POOLCOLL_LISTS_BEGIN+ 9) -#define STR_POOLCOLL_NUM_LEVEL3 (RC_POOLCOLL_LISTS_BEGIN+ 10) -#define STR_POOLCOLL_NUM_LEVEL3E (RC_POOLCOLL_LISTS_BEGIN+ 11) -#define STR_POOLCOLL_NUM_NONUM3 (RC_POOLCOLL_LISTS_BEGIN+ 12) -#define STR_POOLCOLL_NUM_LEVEL4S (RC_POOLCOLL_LISTS_BEGIN+ 13) -#define STR_POOLCOLL_NUM_LEVEL4 (RC_POOLCOLL_LISTS_BEGIN+ 14) -#define STR_POOLCOLL_NUM_LEVEL4E (RC_POOLCOLL_LISTS_BEGIN+ 15) -#define STR_POOLCOLL_NUM_NONUM4 (RC_POOLCOLL_LISTS_BEGIN+ 16) -#define STR_POOLCOLL_NUM_LEVEL5S (RC_POOLCOLL_LISTS_BEGIN+ 17) -#define STR_POOLCOLL_NUM_LEVEL5 (RC_POOLCOLL_LISTS_BEGIN+ 18) -#define STR_POOLCOLL_NUM_LEVEL5E (RC_POOLCOLL_LISTS_BEGIN+ 19) -#define STR_POOLCOLL_NUM_NONUM5 (RC_POOLCOLL_LISTS_BEGIN+ 20) - - // Untergruppe Aufzaehlung -#define STR_POOLCOLL_BUL_LEVEL1S (RC_POOLCOLL_LISTS_BEGIN+ 21) -#define STR_POOLCOLL_BUL_LEVEL1 (RC_POOLCOLL_LISTS_BEGIN+ 22) -#define STR_POOLCOLL_BUL_LEVEL1E (RC_POOLCOLL_LISTS_BEGIN+ 23) -#define STR_POOLCOLL_BUL_NONUM1 (RC_POOLCOLL_LISTS_BEGIN+ 24) -#define STR_POOLCOLL_BUL_LEVEL2S (RC_POOLCOLL_LISTS_BEGIN+ 25) -#define STR_POOLCOLL_BUL_LEVEL2 (RC_POOLCOLL_LISTS_BEGIN+ 26) -#define STR_POOLCOLL_BUL_LEVEL2E (RC_POOLCOLL_LISTS_BEGIN+ 27) -#define STR_POOLCOLL_BUL_NONUM2 (RC_POOLCOLL_LISTS_BEGIN+ 28) -#define STR_POOLCOLL_BUL_LEVEL3S (RC_POOLCOLL_LISTS_BEGIN+ 29) -#define STR_POOLCOLL_BUL_LEVEL3 (RC_POOLCOLL_LISTS_BEGIN+ 30) -#define STR_POOLCOLL_BUL_LEVEL3E (RC_POOLCOLL_LISTS_BEGIN+ 31) -#define STR_POOLCOLL_BUL_NONUM3 (RC_POOLCOLL_LISTS_BEGIN+ 32) -#define STR_POOLCOLL_BUL_LEVEL4S (RC_POOLCOLL_LISTS_BEGIN+ 33) -#define STR_POOLCOLL_BUL_LEVEL4 (RC_POOLCOLL_LISTS_BEGIN+ 34) -#define STR_POOLCOLL_BUL_LEVEL4E (RC_POOLCOLL_LISTS_BEGIN+ 35) -#define STR_POOLCOLL_BUL_NONUM4 (RC_POOLCOLL_LISTS_BEGIN+ 36) -#define STR_POOLCOLL_BUL_LEVEL5S (RC_POOLCOLL_LISTS_BEGIN+ 37) -#define STR_POOLCOLL_BUL_LEVEL5 (RC_POOLCOLL_LISTS_BEGIN+ 38) -#define STR_POOLCOLL_BUL_LEVEL5E (RC_POOLCOLL_LISTS_BEGIN+ 39) -#define STR_POOLCOLL_BUL_NONUM5 (RC_POOLCOLL_LISTS_BEGIN+ 40) - -// Sonderbereiche - // Untergruppe Header -#define STR_POOLCOLL_HEADER (RC_POOLCOLL_EXTRA_BEGIN+ 0) -#define STR_POOLCOLL_HEADERL (RC_POOLCOLL_EXTRA_BEGIN+ 1) -#define STR_POOLCOLL_HEADERR (RC_POOLCOLL_EXTRA_BEGIN+ 2) - - // Untergruppe Footer -#define STR_POOLCOLL_FOOTER (RC_POOLCOLL_EXTRA_BEGIN+ 3) -#define STR_POOLCOLL_FOOTERL (RC_POOLCOLL_EXTRA_BEGIN+ 4) -#define STR_POOLCOLL_FOOTERR (RC_POOLCOLL_EXTRA_BEGIN+ 5) - - // Untergruppe Tabelle -#define STR_POOLCOLL_TABLE (RC_POOLCOLL_EXTRA_BEGIN+ 6) -#define STR_POOLCOLL_TABLE_HDLN (RC_POOLCOLL_EXTRA_BEGIN+ 7) - - // Untergruppe Labels -#define STR_POOLCOLL_LABEL (RC_POOLCOLL_EXTRA_BEGIN+ 8) -#define STR_POOLCOLL_LABEL_ABB (RC_POOLCOLL_EXTRA_BEGIN+ 9) -#define STR_POOLCOLL_LABEL_TABLE (RC_POOLCOLL_EXTRA_BEGIN+ 10) -#define STR_POOLCOLL_LABEL_FRAME (RC_POOLCOLL_EXTRA_BEGIN+ 11) - - // sonstiges -#define STR_POOLCOLL_FRAME (RC_POOLCOLL_EXTRA_BEGIN+ 12) -#define STR_POOLCOLL_FOOTNOTE (RC_POOLCOLL_EXTRA_BEGIN+ 13) -#define STR_POOLCOLL_JAKETADRESS (RC_POOLCOLL_EXTRA_BEGIN+ 14) -#define STR_POOLCOLL_SENDADRESS (RC_POOLCOLL_EXTRA_BEGIN+ 15) -#define STR_POOLCOLL_ENDNOTE (RC_POOLCOLL_EXTRA_BEGIN+ 16) - -#define STR_POOLCOLL_LABEL_DRAWING (RC_POOLCOLL_EXTRA_BEGIN+ 17) - -// Gruppe Verzeichnisse -#define STR_POOLCOLL_REGISTER_BASE (RC_POOLCOLL_REGISTER_BEGIN+ 0) - // Untergruppe Index-Verzeichnisse -#define STR_POOLCOLL_TOX_IDXH (RC_POOLCOLL_REGISTER_BEGIN+ 1) -#define STR_POOLCOLL_TOX_IDX1 (RC_POOLCOLL_REGISTER_BEGIN+ 2) -#define STR_POOLCOLL_TOX_IDX2 (RC_POOLCOLL_REGISTER_BEGIN+ 3) -#define STR_POOLCOLL_TOX_IDX3 (RC_POOLCOLL_REGISTER_BEGIN+ 4) -#define STR_POOLCOLL_TOX_IDXBREAK (RC_POOLCOLL_REGISTER_BEGIN+ 5) - - // Untergruppe Inhalts-Verzeichnisse -#define STR_POOLCOLL_TOX_CNTNTH (RC_POOLCOLL_REGISTER_BEGIN+ 6) -#define STR_POOLCOLL_TOX_CNTNT1 (RC_POOLCOLL_REGISTER_BEGIN+ 7) -#define STR_POOLCOLL_TOX_CNTNT2 (RC_POOLCOLL_REGISTER_BEGIN+ 8) -#define STR_POOLCOLL_TOX_CNTNT3 (RC_POOLCOLL_REGISTER_BEGIN+ 9) -#define STR_POOLCOLL_TOX_CNTNT4 (RC_POOLCOLL_REGISTER_BEGIN+ 10) -#define STR_POOLCOLL_TOX_CNTNT5 (RC_POOLCOLL_REGISTER_BEGIN+ 11) - - // Untergruppe Benutzer-Verzeichnisse: -#define STR_POOLCOLL_TOX_USERH (RC_POOLCOLL_REGISTER_BEGIN+ 12) -#define STR_POOLCOLL_TOX_USER1 (RC_POOLCOLL_REGISTER_BEGIN+ 13) -#define STR_POOLCOLL_TOX_USER2 (RC_POOLCOLL_REGISTER_BEGIN+ 14) -#define STR_POOLCOLL_TOX_USER3 (RC_POOLCOLL_REGISTER_BEGIN+ 15) -#define STR_POOLCOLL_TOX_USER4 (RC_POOLCOLL_REGISTER_BEGIN+ 16) -#define STR_POOLCOLL_TOX_USER5 (RC_POOLCOLL_REGISTER_BEGIN+ 17) - - // Untergruppe Inhalts-Verzeichnisse mehr Ebenen 5 - 10 -#define STR_POOLCOLL_TOX_CNTNT6 (RC_POOLCOLL_REGISTER_BEGIN+ 18) -#define STR_POOLCOLL_TOX_CNTNT7 (RC_POOLCOLL_REGISTER_BEGIN+ 19) -#define STR_POOLCOLL_TOX_CNTNT8 (RC_POOLCOLL_REGISTER_BEGIN+ 20) -#define STR_POOLCOLL_TOX_CNTNT9 (RC_POOLCOLL_REGISTER_BEGIN+ 21) -#define STR_POOLCOLL_TOX_CNTNT10 (RC_POOLCOLL_REGISTER_BEGIN+ 22) - -// illustrations index -#define STR_POOLCOLL_TOX_ILLUSH (RC_POOLCOLL_REGISTER_BEGIN+ 23) -#define STR_POOLCOLL_TOX_ILLUS1 (RC_POOLCOLL_REGISTER_BEGIN+ 24) - -// object index -#define STR_POOLCOLL_TOX_OBJECTH (RC_POOLCOLL_REGISTER_BEGIN+ 25) -#define STR_POOLCOLL_TOX_OBJECT1 (RC_POOLCOLL_REGISTER_BEGIN+ 26) - -// tables index -#define STR_POOLCOLL_TOX_TABLESH (RC_POOLCOLL_REGISTER_BEGIN+ 27) -#define STR_POOLCOLL_TOX_TABLES1 (RC_POOLCOLL_REGISTER_BEGIN+ 28) - -// index of authorities -#define STR_POOLCOLL_TOX_AUTHORITIESH (RC_POOLCOLL_REGISTER_BEGIN+ 29) -#define STR_POOLCOLL_TOX_AUTHORITIES1 (RC_POOLCOLL_REGISTER_BEGIN+ 30) - - // Untergruppe Benutzer-Verzeichnisse mehr Ebenen 5 - 10 -#define STR_POOLCOLL_TOX_USER6 (RC_POOLCOLL_REGISTER_BEGIN+ 31) -#define STR_POOLCOLL_TOX_USER7 (RC_POOLCOLL_REGISTER_BEGIN+ 32) -#define STR_POOLCOLL_TOX_USER8 (RC_POOLCOLL_REGISTER_BEGIN+ 33) -#define STR_POOLCOLL_TOX_USER9 (RC_POOLCOLL_REGISTER_BEGIN+ 34) -#define STR_POOLCOLL_TOX_USER10 (RC_POOLCOLL_REGISTER_BEGIN+ 35) - - -// Gruppe Kapitel/Dokument -#define STR_POOLCOLL_DOC_TITEL (RC_POOLCOLL_DOC_BEGIN+ 0) -#define STR_POOLCOLL_DOC_SUBTITEL (RC_POOLCOLL_DOC_BEGIN+ 1) - -// Gruppe HTML-Vorlagen -#define STR_POOLCOLL_HTML_BLOCKQUOTE (RC_POOLCOLL_HTML_BEGIN+ 0) -#define STR_POOLCOLL_HTML_PRE (RC_POOLCOLL_HTML_BEGIN+ 1) -#define STR_POOLCOLL_HTML_HR (RC_POOLCOLL_HTML_BEGIN+ 2) -#define STR_POOLCOLL_HTML_DD (RC_POOLCOLL_HTML_BEGIN+ 3) -#define STR_POOLCOLL_HTML_DT (RC_POOLCOLL_HTML_BEGIN+ 4) - -//----------------- -// Page styles -//----------------- -#define STR_POOLPAGE_STANDARD (RC_POOLPAGEDESC_BEGIN+ 0) -#define STR_POOLPAGE_FIRST (RC_POOLPAGEDESC_BEGIN+ 1) -#define STR_POOLPAGE_LEFT (RC_POOLPAGEDESC_BEGIN+ 2) -#define STR_POOLPAGE_RIGHT (RC_POOLPAGEDESC_BEGIN+ 3) -#define STR_POOLPAGE_JAKET (RC_POOLPAGEDESC_BEGIN+ 4) -#define STR_POOLPAGE_REGISTER (RC_POOLPAGEDESC_BEGIN+ 5) -#define STR_POOLPAGE_HTML (RC_POOLPAGEDESC_BEGIN+ 6) -#define STR_POOLPAGE_FOOTNOTE (RC_POOLPAGEDESC_BEGIN+ 7) -#define STR_POOLPAGE_ENDNOTE (RC_POOLPAGEDESC_BEGIN+ 8) -#define STR_POOLPAGE_LANDSCAPE (RC_POOLPAGEDESC_BEGIN+ 9) - -//----------------- -// Numbering styles -//----------------- -#define STR_POOLNUMRULE_NUM1 (RC_POOLNUMRULE_BEGIN+ 0) -#define STR_POOLNUMRULE_NUM2 (RC_POOLNUMRULE_BEGIN+ 1) -#define STR_POOLNUMRULE_NUM3 (RC_POOLNUMRULE_BEGIN+ 2) -#define STR_POOLNUMRULE_NUM4 (RC_POOLNUMRULE_BEGIN+ 3) -#define STR_POOLNUMRULE_NUM5 (RC_POOLNUMRULE_BEGIN+ 4) -#define STR_POOLNUMRULE_BUL1 (RC_POOLNUMRULE_BEGIN+ 5) -#define STR_POOLNUMRULE_BUL2 (RC_POOLNUMRULE_BEGIN+ 6) -#define STR_POOLNUMRULE_BUL3 (RC_POOLNUMRULE_BEGIN+ 7) -#define STR_POOLNUMRULE_BUL4 (RC_POOLNUMRULE_BEGIN+ 8) -#define STR_POOLNUMRULE_BUL5 (RC_POOLNUMRULE_BEGIN+ 9) -//IAccessibility2 Impplementaton 2009----- -//Solution:Define column item's accessible name ID. -#define STR_COLUMN_VALUESET_ITEM0 (RC_POOLNUMRULE_BEGIN + 10 ) -#define STR_COLUMN_VALUESET_ITEM1 (RC_POOLNUMRULE_BEGIN + 11 ) -#define STR_COLUMN_VALUESET_ITEM2 (RC_POOLNUMRULE_BEGIN + 12 ) -#define STR_COLUMN_VALUESET_ITEM3 (RC_POOLNUMRULE_BEGIN + 13 ) -#define STR_COLUMN_VALUESET_ITEM4 (RC_POOLNUMRULE_BEGIN + 14 ) -//-----IAccessibility2 Impplementaton 2009 -//----------------- -// Paragraph styles -//----------------- -#define STR_POOLPARSTYLE_HEAD1 (STR_POOLPARSTYLE_BEGIN+ 0) -#define STR_POOLPARSTYLE_HEAD2 (STR_POOLPARSTYLE_BEGIN+ 1) -#define STR_POOLPARSTYLE_HEAD3 (STR_POOLPARSTYLE_BEGIN+ 2) -#define STR_POOLPARSTYLE_DEFAULT (STR_POOLPARSTYLE_BEGIN+ 3) -#define STR_POOLPARSTYLE_TEXTBODY (STR_POOLPARSTYLE_BEGIN+ 4) - -#endif diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx deleted file mode 100644 index 07a777f671..0000000000 --- a/sw/inc/poolfmt.hxx +++ /dev/null @@ -1,435 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _POOLFMT_HXX -#define _POOLFMT_HXX - -#include <limits.h> -#include <tools/solar.h> -#include <editeng/frmdir.hxx> - -// POOLCOLL-IDs: -// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ -// !User! Range ! 0 ! Offset ! -// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ -// -// Range: 1 - text -// 2 - lists -// 3 - special ranges -// 4 - indices -// 5 - chapter / document -// 6 - HTML-styles. - -// Other IDs: -// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ -// !User! Range ! 1 ! Offset ! -// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ -// Range: 0 - character styles -// 1 - frame styles -// 2 - page styles -// 3 - paragraph styles (?) -// 4 - graphics styles (?) - -// For all IDs we have: -// Origin: 0 -pool -// 1 -user -// Offset: within the group - - -// Attention: New IDs can only be added to the ends of the groups. -// These IDs are read and written by the Reader/Writer. -// They are only aware of the Offset to Start. - -// Mask for recognition of COLLPOOL-IDs: - -const sal_uInt16 POOLGRP_NOCOLLID = (1 << 10); - -// POLLCOLL-groups: - -const sal_uInt16 USER_FMT = (1 << 15); -const sal_uInt16 POOL_FMT = (0 << 15); - -const sal_uInt16 COLL_TEXT_BITS = (1 << 11); -const sal_uInt16 COLL_LISTS_BITS = (2 << 11); -const sal_uInt16 COLL_EXTRA_BITS = (3 << 11); -const sal_uInt16 COLL_REGISTER_BITS = (4 << 11); -const sal_uInt16 COLL_DOC_BITS = (5 << 11); -const sal_uInt16 COLL_HTML_BITS = (6 << 11); -const sal_uInt16 COLL_GET_RANGE_BITS = (15 << 11); - -// Other groups: - -const sal_uInt16 POOLGRP_CHARFMT = (0 << 11) + POOLGRP_NOCOLLID; -const sal_uInt16 POOLGRP_FRAMEFMT = (1 << 11) + POOLGRP_NOCOLLID; -const sal_uInt16 POOLGRP_PAGEDESC = (2 << 11) + POOLGRP_NOCOLLID; -const sal_uInt16 POOLGRP_NUMRULE = (3 << 11) + POOLGRP_NOCOLLID; - -// Recognize whether it's a user defined style or not: -const sal_uInt16 POOL_IDUSER_FMT = - USHRT_MAX & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID); - -inline sal_Bool IsPoolUserFmt( sal_uInt16 nId ) -{ - return POOL_IDUSER_FMT == - (nId & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID)) - ? sal_True : sal_False; -} - - - -// IDs for the ranges. -enum RES_POOLFMT -{ -RES_POOLFMT_BEGIN = 1, -RES_POOL_CHRFMT = RES_POOLFMT_BEGIN, -RES_POOL_FRMFMT, -RES_POOL_TXTCOLL, -RES_POOL_PAGEFMT, - -RES_POOL_PARFMT, -RES_POOL_GRFFMT, -RES_POOLFMT_END -}; - -// Ranges for the IDs of the formats. - -// IDs for character styles. -enum RES_POOL_CHRFMT_TYPE -{ -RES_POOLCHR_BEGIN = POOLGRP_CHARFMT, -RES_POOLCHR_NORMAL_BEGIN = POOLGRP_CHARFMT, - -RES_POOLCHR_FOOTNOTE = RES_POOLCHR_NORMAL_BEGIN, // Footnote. -RES_POOLCHR_PAGENO, // Pages/field. -RES_POOLCHR_LABEL, // Label. -RES_POOLCHR_DROPCAPS, // Dropcaps. -RES_POOLCHR_NUM_LEVEL, // Numbering symbols -RES_POOLCHR_BUL_LEVEL, // Bullets. - -RES_POOLCHR_INET_NORMAL, // Internet normal. -RES_POOLCHR_INET_VISIT, // Internet visited. -RES_POOLCHR_JUMPEDIT, // Placeholder. -RES_POOLCHR_TOXJUMP, // Jump from index. -RES_POOLCHR_ENDNOTE, // Endnote. -RES_POOLCHR_LINENUM, // Line numbering. -RES_POOLCHR_IDX_MAIN_ENTRY, // Main entry in indices. -RES_POOLCHR_FOOTNOTE_ANCHOR, // Footnote anchor. -RES_POOLCHR_ENDNOTE_ANCHOR, // Endnote anchor. -RES_POOLCHR_RUBYTEXT, // Rubytext. -RES_POOLCHR_VERT_NUM, // Vertical numbering symbols. - -RES_POOLCHR_NORMAL_END, - -RES_POOLCHR_HTML_BEGIN = RES_POOLCHR_BEGIN + 50, // HTML-styles. -RES_POOLCHR_HTML_EMPHASIS= RES_POOLCHR_HTML_BEGIN, -RES_POOLCHR_HTML_CITIATION, -RES_POOLCHR_HTML_STRONG, -RES_POOLCHR_HTML_CODE, -RES_POOLCHR_HTML_SAMPLE, -RES_POOLCHR_HTML_KEYBOARD, -RES_POOLCHR_HTML_VARIABLE, -RES_POOLCHR_HTML_DEFINSTANCE, -RES_POOLCHR_HTML_TELETYPE, -RES_POOLCHR_HTML_END, - -RES_POOLCHR_END = RES_POOLCHR_HTML_END -}; - - -// IDs for frame styles. -enum RES_POOL_FRMFMT_TYPE -{ -RES_POOLFRM_BEGIN = POOLGRP_FRAMEFMT, - -RES_POOLFRM_FRAME = RES_POOLFRM_BEGIN, // Frame. -RES_POOLFRM_GRAPHIC, // Graphics. -RES_POOLFRM_OLE, // OLE. -RES_POOLFRM_FORMEL, // Formula. -RES_POOLFRM_MARGINAL, // Marginalia. -RES_POOLFRM_WATERSIGN, // Watermark. -RES_POOLFRM_LABEL, // Labels. - -RES_POOLFRM_END -}; - -// IDs for page styles. -enum RES_POOL_PAGEFMT_TYPE -{ -RES_POOLPAGE_BEGIN = POOLGRP_PAGEDESC, - -RES_POOLPAGE_STANDARD = RES_POOLPAGE_BEGIN, // Standard page. -RES_POOLPAGE_FIRST, // First page. -RES_POOLPAGE_LEFT, // Left page. -RES_POOLPAGE_RIGHT, // Right page. -RES_POOLPAGE_JAKET, // Envelope. -RES_POOLPAGE_REGISTER, // Index. -RES_POOLPAGE_HTML, // HTML. -RES_POOLPAGE_FOOTNOTE, // Footnote at end of document. -RES_POOLPAGE_ENDNOTE, // Endnote page. -RES_POOLPAGE_LANDSCAPE, // Landscape page style. - -RES_POOLPAGE_END -}; - -// IDs for list styles. -enum RES_POOL_NUMRULE_TYPE -{ -RES_POOLNUMRULE_BEGIN = POOLGRP_NUMRULE, -RES_POOLNUMRULE_NUM1 = RES_POOLNUMRULE_BEGIN, // NumRule Numbering 1. -RES_POOLNUMRULE_NUM2, // NumRule Numbering 2. -RES_POOLNUMRULE_NUM3, // NumRule Numbering 3. -RES_POOLNUMRULE_NUM4, // NumRule Numbering 4. -RES_POOLNUMRULE_NUM5, // NumRule Numbering 5. -RES_POOLNUMRULE_BUL1, // NumRule Bullets 1. -RES_POOLNUMRULE_BUL2, // NumRule Bullets 2. -RES_POOLNUMRULE_BUL3, // NumRule Bullets 3. -RES_POOLNUMRULE_BUL4, // NumRule Bullets 4. -RES_POOLNUMRULE_BUL5, // NumRule Bullets 5. -RES_POOLNUMRULE_END -}; - -// IDs for paragraph styles. -enum RES_POOL_COLLFMT_TYPE -{ -// Group text. -RES_POOLCOLL_TEXT_BEGIN = COLL_TEXT_BITS, - -RES_POOLCOLL_STANDARD = RES_POOLCOLL_TEXT_BEGIN, // Standard. -RES_POOLCOLL_TEXT, // Text body. -RES_POOLCOLL_TEXT_IDENT, // Text body first line indent. -RES_POOLCOLL_TEXT_NEGIDENT, // Text body hanging indent. -RES_POOLCOLL_TEXT_MOVE, // Text body indent. -RES_POOLCOLL_GREETING, // Complimentary close. -RES_POOLCOLL_SIGNATURE, // Signature. -RES_POOLCOLL_CONFRONTATION, // List indent. -RES_POOLCOLL_MARGINAL, // Marginalia. - -// Subgroup headings. -RES_POOLCOLL_HEADLINE_BASE, // Base heading. -RES_POOLCOLL_HEADLINE1, // Heading 1. -RES_POOLCOLL_HEADLINE2, // Heading 2. -RES_POOLCOLL_HEADLINE3, // Heading 3. -RES_POOLCOLL_HEADLINE4, // Heading 4. -RES_POOLCOLL_HEADLINE5, // Heading 5. -RES_POOLCOLL_HEADLINE6, // Heading 6. -RES_POOLCOLL_HEADLINE7, // Heading 7. -RES_POOLCOLL_HEADLINE8, // Heading 8. -RES_POOLCOLL_HEADLINE9, // Heading 9. -RES_POOLCOLL_HEADLINE10, // Heading 10. - -RES_POOLCOLL_TEXT_END, - - -// Group lists. -RES_POOLCOLL_LISTS_BEGIN = COLL_LISTS_BITS, - -RES_POOLCOLL_NUMBUL_BASE = RES_POOLCOLL_LISTS_BEGIN, // Base list. - -// Subgroup numberings. -RES_POOLCOLL_NUM_LEVEL1S, // Start 1st level. -RES_POOLCOLL_NUM_LEVEL1, // 1st level. -RES_POOLCOLL_NUM_LEVEL1E, // End 1st level. -RES_POOLCOLL_NUM_NONUM1, // No numbering. -RES_POOLCOLL_NUM_LEVEL2S, // Start 2nd level. -RES_POOLCOLL_NUM_LEVEL2, // 2nd level. -RES_POOLCOLL_NUM_LEVEL2E, // End 2nd level. -RES_POOLCOLL_NUM_NONUM2, // No numbering. -RES_POOLCOLL_NUM_LEVEL3S, // Start 3rd level. -RES_POOLCOLL_NUM_LEVEL3, // 3rd level. -RES_POOLCOLL_NUM_LEVEL3E, // End 3rd level. -RES_POOLCOLL_NUM_NONUM3, // No numbering. -RES_POOLCOLL_NUM_LEVEL4S, // Start 4th level. -RES_POOLCOLL_NUM_LEVEL4, // 4th level. -RES_POOLCOLL_NUM_LEVEL4E, // End 4th level. -RES_POOLCOLL_NUM_NONUM4, // No numbering. -RES_POOLCOLL_NUM_LEVEL5S, // Start 5th level. -RES_POOLCOLL_NUM_LEVEL5, // 5th level. -RES_POOLCOLL_NUM_LEVEL5E, // End 5th level. -RES_POOLCOLL_NUM_NONUM5, // No numbering. - - -//Subgroup bullets. -RES_POOLCOLL_BUL_LEVEL1S, // Start 1st level. -RES_POOLCOLL_BUL_LEVEL1, // 1st level. -RES_POOLCOLL_BUL_LEVEL1E, // End 1st level -RES_POOLCOLL_BUL_NONUM1, // No numbering. -RES_POOLCOLL_BUL_LEVEL2S, // Start 2nd level. -RES_POOLCOLL_BUL_LEVEL2, // 2nd level. -RES_POOLCOLL_BUL_LEVEL2E, // End 2nd level. -RES_POOLCOLL_BUL_NONUM2, // No numbering. -RES_POOLCOLL_BUL_LEVEL3S, // Start 3rd level. -RES_POOLCOLL_BUL_LEVEL3, // 3rd Level. -RES_POOLCOLL_BUL_LEVEL3E, // End 3rd level. -RES_POOLCOLL_BUL_NONUM3, // No numbering. -RES_POOLCOLL_BUL_LEVEL4S, // Start 4th level. -RES_POOLCOLL_BUL_LEVEL4, // 4th level. -RES_POOLCOLL_BUL_LEVEL4E, // End 4th level. -RES_POOLCOLL_BUL_NONUM4, // No numbering. -RES_POOLCOLL_BUL_LEVEL5S, // Start 5th level. -RES_POOLCOLL_BUL_LEVEL5, // 5th level. -RES_POOLCOLL_BUL_LEVEL5E, // End 5th Level. -RES_POOLCOLL_BUL_NONUM5, // No numbering. - -RES_POOLCOLL_LISTS_END, - - -// Special ranges. -RES_POOLCOLL_EXTRA_BEGIN = COLL_EXTRA_BITS, - -// Subgroup header. -RES_POOLCOLL_HEADER = RES_POOLCOLL_EXTRA_BEGIN, // Header Left&Right. -RES_POOLCOLL_HEADERL, // Header Left. -RES_POOLCOLL_HEADERR, // Header Right. - -// Subgroup footer. -RES_POOLCOLL_FOOTER, // Footer Left&Right. -RES_POOLCOLL_FOOTERL, // Footer Left. -RES_POOLCOLL_FOOTERR, // Footer Right. - -// Subgroup table. -RES_POOLCOLL_TABLE, // Table of Contents. -RES_POOLCOLL_TABLE_HDLN, // Table of Contents - heading. - - -// Subgroup labels. -RES_POOLCOLL_LABEL, // Base labels. -RES_POOLCOLL_LABEL_ABB, // Label illustration. -RES_POOLCOLL_LABEL_TABLE, // Label table. -RES_POOLCOLL_LABEL_FRAME, // Label frame. - -// Other stuff. -RES_POOLCOLL_FRAME, // Frames. -RES_POOLCOLL_FOOTNOTE, // Footnotes. -RES_POOLCOLL_JAKETADRESS, // Addressee. -RES_POOLCOLL_SENDADRESS, // Sender. -RES_POOLCOLL_ENDNOTE, // Endnotes. - -RES_POOLCOLL_LABEL_DRAWING, // Label drawing objects. -RES_POOLCOLL_EXTRA_END, - - -// Group indices. -RES_POOLCOLL_REGISTER_BEGIN = COLL_REGISTER_BITS, - -RES_POOLCOLL_REGISTER_BASE = RES_POOLCOLL_REGISTER_BEGIN, // Base index. - -// Subgroup index tables. -RES_POOLCOLL_TOX_IDXH, // Header. -RES_POOLCOLL_TOX_IDX1, // 1st level. -RES_POOLCOLL_TOX_IDX2, // 2nd level. -RES_POOLCOLL_TOX_IDX3, // 3rd level. -RES_POOLCOLL_TOX_IDXBREAK, // Separator. - -// Subgroup table of contents. -RES_POOLCOLL_TOX_CNTNTH, // Header. -RES_POOLCOLL_TOX_CNTNT1, // Content 1st level. -RES_POOLCOLL_TOX_CNTNT2, // Content 2nd level. -RES_POOLCOLL_TOX_CNTNT3, // Content 3rd level. -RES_POOLCOLL_TOX_CNTNT4, // Content 4th level. -RES_POOLCOLL_TOX_CNTNT5, // Content 5th level. - - -// Subgroup user indices. -RES_POOLCOLL_TOX_USERH, // Header. -RES_POOLCOLL_TOX_USER1, // 1st level. -RES_POOLCOLL_TOX_USER2, // 2nd level. -RES_POOLCOLL_TOX_USER3, // 3rd level. -RES_POOLCOLL_TOX_USER4, // 4th level. -RES_POOLCOLL_TOX_USER5, // 5th level. - - -RES_POOLCOLL_TOX_CNTNT6, // Content 6th level. -RES_POOLCOLL_TOX_CNTNT7, // Content 7th level. -RES_POOLCOLL_TOX_CNTNT8, // Content 8th level. -RES_POOLCOLL_TOX_CNTNT9, // Content 9th level. -RES_POOLCOLL_TOX_CNTNT10, // Content 10th level. - -// illustrations index. -RES_POOLCOLL_TOX_ILLUSH, // Illustrations header. -RES_POOLCOLL_TOX_ILLUS1, // Illustrations all levels. - -// object index. -RES_POOLCOLL_TOX_OBJECTH, // Objects header. -RES_POOLCOLL_TOX_OBJECT1, // Objects all levels. - -// tables index. -RES_POOLCOLL_TOX_TABLESH, // Tables header. -RES_POOLCOLL_TOX_TABLES1, // Tables all levels. - -// index of authorities. -RES_POOLCOLL_TOX_AUTHORITIESH, // Authorities header. -RES_POOLCOLL_TOX_AUTHORITIES1, // Authorities all levels. - -// user index 6..10. -RES_POOLCOLL_TOX_USER6, // 6th level. -RES_POOLCOLL_TOX_USER7, // 7th level. -RES_POOLCOLL_TOX_USER8, // 8th level. -RES_POOLCOLL_TOX_USER9, // 9th level. -RES_POOLCOLL_TOX_USER10, // 10th level. - -RES_POOLCOLL_REGISTER_END, - - -// Group chapter / document. -RES_POOLCOLL_DOC_BEGIN = COLL_DOC_BITS, - -RES_POOLCOLL_DOC_TITEL = RES_POOLCOLL_DOC_BEGIN, // Doc. titel. -RES_POOLCOLL_DOC_SUBTITEL, // Doc. subtitel. - -RES_POOLCOLL_DOC_END, - -// Group HTML-styles. -RES_POOLCOLL_HTML_BEGIN = COLL_HTML_BITS, - -RES_POOLCOLL_HTML_BLOCKQUOTE = RES_POOLCOLL_HTML_BEGIN, -RES_POOLCOLL_HTML_PRE, -RES_POOLCOLL_HTML_HR, -RES_POOLCOLL_HTML_DD, -RES_POOLCOLL_HTML_DT, - -RES_POOLCOLL_HTML_END - -// End of text styles collection. -}; - - -// Query defined parent of a POOL-ID -// Returns 0 if standard -// USHRT_MAX if no parent -// the parent in all other cases. -sal_uInt16 GetPoolParent( sal_uInt16 nId ); - -SvxFrameDirection GetDefaultFrameDirection(sal_uLong nLanguage); - -inline sal_Bool IsConditionalByPoolId(sal_uInt16 nId) - { - return RES_POOLCOLL_TEXT == nId; - } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx deleted file mode 100644 index 6552a5680a..0000000000 --- a/sw/inc/postithelper.hxx +++ /dev/null @@ -1,141 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _POSTITHELPER_HXX -#define _POSTITHELPER_HXX - -#include <swrect.hxx> -#include <fmtfld.hxx> -#include <redline.hxx> -#include <vector> -#include <vcl/window.hxx> -#include <SidebarWindowsTypes.hxx> -#include <svl/brdcst.hxx> - -class SwTxtFld; -class SwRootFrm; -class SwPostIt; -class String; -class SwPostItMgr; -class SwEditWin; -namespace sw { namespace sidebarwindows { - class SwSidebarWin; -} } - -struct SwPosition; - -typedef sal_Int64 SwPostItBits; - -struct SwLayoutInfo -{ - const SwFrm* mpAnchorFrm; - SwRect mPosition; - SwRect mPageFrame; - SwRect mPagePrtArea; - unsigned long mnPageNumber; - sw::sidebarwindows::SidebarPosition meSidebarPosition; - sal_uInt16 mRedlineAuthor; - - SwLayoutInfo() - : mpAnchorFrm(0) - , mPosition() - , mPageFrame() - , mPagePrtArea() - , mnPageNumber(1) - , meSidebarPosition(sw::sidebarwindows::SIDEBAR_NONE) - , mRedlineAuthor(0) - {} -}; - -namespace SwPostItHelper -{ - enum SwLayoutStatus - { - INVISIBLE, VISIBLE, INSERTED, DELETED, NONE, HIDDEN - }; - - SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwPosition& ); - long getLayoutHeight( const SwRootFrm* pRoot ); - void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode ); - unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& ); -} - -class SwSidebarItem -{ -public: - sw::sidebarwindows::SwSidebarWin* pPostIt; - bool bShow; - bool bFocus; - - SwPostItHelper::SwLayoutStatus mLayoutStatus; - SwLayoutInfo maLayoutInfo; - - SwSidebarItem( const bool aShow, - const bool aFocus) - : pPostIt(0) - , bShow(aShow) - , bFocus(aFocus) - , mLayoutStatus( SwPostItHelper::INVISIBLE ) - , maLayoutInfo() - {} - virtual ~SwSidebarItem(){} - virtual SwPosition GetAnchorPosition() const = 0; - virtual bool UseElement() = 0; - virtual SwFmtFld* GetFmtFld() const = 0; - virtual SfxBroadcaster* GetBroadCaster() const = 0; - virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin, - WinBits nBits, - SwPostItMgr& aMgr, - SwPostItBits aBits) = 0; -}; - -class SwAnnotationItem: public SwSidebarItem -{ - private: - SwFmtFld* pFmtFld; - - public: - SwAnnotationItem( SwFmtFld* p, - const bool aShow, - const bool aFocus) - : SwSidebarItem( aShow, aFocus ) - , pFmtFld(p) - {} - virtual ~SwAnnotationItem() {} - virtual SwPosition GetAnchorPosition() const; - virtual bool UseElement(); - virtual SwFmtFld* GetFmtFld() const {return pFmtFld;} - virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pFmtFld); } - virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin, - WinBits nBits, - SwPostItMgr& aMgr, - SwPostItBits aBits); -}; - -#endif // _POSTITHELPER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx deleted file mode 100644 index 14dc680ec7..0000000000 --- a/sw/inc/printdata.hxx +++ /dev/null @@ -1,338 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_PRINTDATA_HXX -#define SW_PRINTDATA_HXX - - -#include <sal/types.h> -#include <rtl/ustring.hxx> -#include <vcl/print.hxx> - -#include <set> -#include <map> -#include <vector> -#include <utility> - -class SwPageFrm; -class SwDoc; -class SwDocShell; -class ViewShell; -class _SetGetExpFlds; -class SwViewOption; -class OutputDevice; -class SwViewOptionAdjust_Impl; -class SwPrtOptions; -class ViewShell; -class SfxViewShell; - -// forward declarations -class SwPrintUIOptions; -class SwRenderData; - -//////////////////////////////////////////////////////////// - - -class SwPrintData -{ - const SwPrintUIOptions * m_pPrintUIOptions; // not owner - const SwRenderData * m_pRenderData; // not owner - -public: - - sal_Bool bPrintGraphic, bPrintTable, bPrintDraw, bPrintControl, bPrintPageBackground, - bPrintBlackFont, - //#i81434# - printing of hidden text - bPrintHiddenText, bPrintTextPlaceholder, - bPrintLeftPages, bPrintRightPages, bPrintReverse, bPrintProspect, - bPrintProspectRTL, - bPrintSingleJobs, bPaperFromSetup, - // Print empty pages - bPrintEmptyPages, - - // #i56195# no field update while printing mail merge documents - bUpdateFieldsInPrinting, - bModified; - - sal_Int16 nPrintPostIts; - rtl::OUString sFaxName; - - SwPrintData() - { - m_pPrintUIOptions = NULL; - m_pRenderData = NULL; - - bPrintGraphic = - bPrintTable = - bPrintDraw = - bPrintControl = - bPrintLeftPages = - bPrintRightPages = - bPrintPageBackground = - bPrintEmptyPages = - bUpdateFieldsInPrinting = sal_True; - - bPaperFromSetup = - bPrintReverse = - bPrintProspect = - bPrintProspectRTL = - bPrintSingleJobs = - bModified = - bPrintBlackFont = - bPrintHiddenText = - bPrintTextPlaceholder = sal_False; - - nPrintPostIts = 0; - } - - virtual ~SwPrintData() {} - - sal_Bool operator==(const SwPrintData& rData)const - { - return - bPrintGraphic == rData.bPrintGraphic && - bPrintTable == rData.bPrintTable && - bPrintDraw == rData.bPrintDraw && - bPrintControl == rData.bPrintControl && - bPrintPageBackground== rData.bPrintPageBackground && - bPrintBlackFont == rData.bPrintBlackFont && - bPrintLeftPages == rData.bPrintLeftPages && - bPrintRightPages == rData.bPrintRightPages && - bPrintReverse == rData.bPrintReverse && - bPrintProspect == rData.bPrintProspect && - bPrintProspectRTL == rData.bPrintProspectRTL && - bPrintSingleJobs == rData.bPrintSingleJobs && - bPaperFromSetup == rData.bPaperFromSetup && - bPrintEmptyPages == rData.bPrintEmptyPages && - bUpdateFieldsInPrinting == rData.bUpdateFieldsInPrinting && - nPrintPostIts == rData.nPrintPostIts && - sFaxName == rData.sFaxName && - bPrintHiddenText == rData.bPrintHiddenText && - bPrintTextPlaceholder == rData.bPrintTextPlaceholder; - } - - // Note: in the context where this class ist used the pointers should always be valid - // during the lifetime of this object - const SwPrintUIOptions & GetPrintUIOptions() const { return *m_pPrintUIOptions; } - const SwRenderData & GetRenderData() const { return *m_pRenderData; } - void SetPrintUIOptions( const SwPrintUIOptions *pOpt ) { m_pPrintUIOptions = pOpt; } - void SetRenderData( const SwRenderData *pData ) { m_pRenderData = pData; } - - sal_Bool IsPrintGraphic() const { return bPrintGraphic; } - sal_Bool IsPrintTable() const { return bPrintTable; } - sal_Bool IsPrintDraw() const { return bPrintDraw; } - sal_Bool IsPrintControl() const { return bPrintControl; } - sal_Bool IsPrintLeftPage() const { return bPrintLeftPages; } - sal_Bool IsPrintRightPage() const { return bPrintRightPages; } - sal_Bool IsPrintReverse() const { return bPrintReverse; } - sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; } - sal_Bool IsPrintEmptyPages() const { return bPrintEmptyPages; } - sal_Bool IsPrintProspect() const { return bPrintProspect; } - sal_Bool IsPrintProspectRTL() const { return bPrintProspectRTL; } - sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; } - sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; } - sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; } - sal_Int16 GetPrintPostIts() const { return nPrintPostIts; } - const rtl::OUString GetFaxName() const { return sFaxName; } - sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; } - sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; } - - void SetPrintGraphic( sal_Bool b ) { doSetModified(); bPrintGraphic = b; } - void SetPrintTable( sal_Bool b ) { doSetModified(); bPrintTable = b; } - void SetPrintDraw( sal_Bool b ) { doSetModified(); bPrintDraw = b; } - void SetPrintControl( sal_Bool b ) { doSetModified(); bPrintControl = b; } - void SetPrintLeftPage( sal_Bool b ) { doSetModified(); bPrintLeftPages = b; } - void SetPrintRightPage( sal_Bool b ) { doSetModified(); bPrintRightPages = b; } - void SetPrintReverse( sal_Bool b ) { doSetModified(); bPrintReverse = b; } - void SetPaperFromSetup( sal_Bool b ) { doSetModified(); bPaperFromSetup = b; } - void SetPrintEmptyPages( sal_Bool b ) { doSetModified(); bPrintEmptyPages = b; } - void SetPrintPostIts( sal_Int16 n ) { doSetModified(); nPrintPostIts = n; } - void SetPrintProspect( sal_Bool b ) { doSetModified(); bPrintProspect = b; } - void SetPrintProspect_RTL( sal_Bool b ) { doSetModified(); bPrintProspectRTL = b; } - void SetPrintPageBackground( sal_Bool b ) { doSetModified(); bPrintPageBackground = b; } - void SetPrintBlackFont( sal_Bool b ) { doSetModified(); bPrintBlackFont = b; } - void SetPrintSingleJobs( sal_Bool b ) { doSetModified(); bPrintSingleJobs = b; } - void SetFaxName( const rtl::OUString& rSet ) { sFaxName = rSet; } - void SetPrintHiddenText( sal_Bool b ) { doSetModified(); bPrintHiddenText = b; } - void SetPrintTextPlaceholder( sal_Bool b ) { doSetModified(); bPrintTextPlaceholder = b; } - - virtual void doSetModified () { bModified = sal_True;} -}; - - -//////////////////////////////////////////////////////////// - - -class SwPrintUIOptions : public vcl::PrinterOptionsHelper -{ - OutputDevice* m_pLast; - const SwPrintData & m_rDefaultPrintData; - -public: - SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts, const SwPrintData &rDefaultPrintData ); - virtual ~SwPrintUIOptions(); - - bool processPropertiesAndCheckFormat( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rNewProp ); - - bool IsPrintFormControls() const { return getBoolValue( "PrintControls", m_rDefaultPrintData.bPrintControl ); } - bool IsPrintPageBackground() const { return getBoolValue( "PrintPageBackground", m_rDefaultPrintData.bPrintPageBackground ); } - bool IsPrintProspect() const { return getBoolValue( "PrintProspect", m_rDefaultPrintData.bPrintProspect ); } - bool IsPrintProspectRTL() const { return getIntValue( "PrintProspectRTL", m_rDefaultPrintData.bPrintProspectRTL ) ? true : false; } - bool IsPrintTextPlaceholders() const { return getBoolValue( "PrintTextPlaceholder", m_rDefaultPrintData.bPrintTextPlaceholder ); } - bool IsPrintHiddenText() const { return getBoolValue( "PrintHiddenText", m_rDefaultPrintData.bPrintHiddenText ); } - bool IsPrintWithBlackTextColor() const { return getBoolValue( "PrintBlackFonts", m_rDefaultPrintData.bPrintBlackFont ); } - sal_Int16 GetPrintPostItsType() const { return static_cast< sal_Int16 >(getIntValue( "PrintAnnotationMode", m_rDefaultPrintData.nPrintPostIts )); } - bool IsPaperFromSetup() const { return getBoolValue( "PrintPaperFromSetup", m_rDefaultPrintData.bPaperFromSetup ); } - bool IsPrintReverse() const { return false; /*handled by print dialog now*/ } - - bool IsPrintLeftPages() const; - bool IsPrintRightPages() const; - bool IsPrintEmptyPages( bool bIsPDFExport ) const; - bool IsPrintTables() const; - bool IsPrintGraphics() const; - bool IsPrintDrawings() const; -}; - - -//////////////////////////////////////////////////////////// - -// A class that stores temporary data that is needed for rendering the document. -// Usually this data is created when 'getRendererCount' is called and -// and it is used in the 'render' function of that same interface -class SwRenderData -{ - // pages valid for printing (according to the current settings) - // and their respective start frames (see getRendererCount in unotxdoc.cxx) - // This set of pages does NOT depend on the 'PageRange' that is used as a printing option! - std::set< sal_Int32 > m_aValidPages; // the set of possible pages (see StringRangeEnumerator::getRangesFromString ) - std::map< sal_Int32, const SwPageFrm * > m_aValidStartFrames; // the map of start frames for those pages - - // printer paper tray to use for each of the m_aValidPages above - std::map< sal_Int32, sal_Int32 > m_aPrinterPaperTrays; - - // vector of pages and their order to be printed (duplicates and any order allowed!) - // (see 'render' in unotxdoc.cxx) - std::vector< sal_Int32 > m_aPagesToPrint; - - std::vector< const SwPageFrm * > m_aPostItStartFrames; - - // for prospect printing: the pairs of pages to be printed together on a single prospect page. - // -1 indicates a half page to be left empty. - std::vector< std::pair< sal_Int32, sal_Int32 > > m_aPagePairs; - - rtl::OUString m_aPageRange; - - // the view options to be applied for printing - SwViewOptionAdjust_Impl * m_pViewOptionAdjust; - - SwPrintData * m_pPrtOptions; - -public: - - // PostIt relevant data - _SetGetExpFlds * m_pPostItFields; // an array of "_SetGetExpFld *" sorted by page and line numbers - SwDoc * m_pPostItDoc; - ViewShell * m_pPostItShell; - -public: - SwRenderData(); - ~SwRenderData(); - - - bool HasPostItData() const { return m_pPostItShell != 0 && m_pPostItDoc != 0; } - void CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev ); - void DeletePostItData(); - - bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; } - bool NeedNewViewOptionAdjust( const ViewShell& ) const; - void ViewOptionAdjustStart( ViewShell &rSh, const SwViewOption &rViewOptions ); - void ViewOptionAdjust( SwPrintData const* const pPrtOptions ); - void ViewOptionAdjustStop(); - - bool HasSwPrtOptions() const { return m_pPrtOptions != 0; } - void SetSwPrtOptions(SwPrintData *const pOpt) { m_pPrtOptions = pOpt; } - SwPrintData const* GetSwPrtOptions() const { return m_pPrtOptions; } - SwPrintData & GetSwPrtOptionsRef() { return *m_pPrtOptions; } - void MakeSwPrtOptions( SwPrintData & rOptions, const SwDocShell *pDocShell, - const SwPrintUIOptions *pOpt, const SwRenderData *pData, bool bIsPDFExport ); - - - typedef std::map< sal_Int32, const SwPageFrm * > ValidStartFramesMap_t; - typedef std::vector< std::pair< sal_Int32, sal_Int32 > > PagePairsVec_t; - - std::set< sal_Int32 > & GetValidPagesSet() { return m_aValidPages; } - const std::set< sal_Int32 > & GetValidPagesSet() const { return m_aValidPages; } - ValidStartFramesMap_t & GetValidStartFrames() { return m_aValidStartFrames; } - const ValidStartFramesMap_t & GetValidStartFrames() const { return m_aValidStartFrames; } - - // a map for printer paper tray numbers to use for each document page - // a value of -1 for the tray means that there is no specific tray defined - std::map< sal_Int32, sal_Int32 >& GetPrinterPaperTrays() { return m_aPrinterPaperTrays; } - const std::map< sal_Int32, sal_Int32 >& GetPrinterPaperTrays() const { return m_aPrinterPaperTrays; } - - // used for 'normal' printing - // A page value of 0 as entry indicates that this page is not from the document but - // from the post-it document. (See also GetPostItStartFrame below) - std::vector< sal_Int32 > & GetPagesToPrint() { return m_aPagesToPrint; } - const std::vector< sal_Int32 > & GetPagesToPrint() const { return m_aPagesToPrint; } - - // used for 'normal' printing with post-its - // - if the map entry will be NULL then the respective page to be printed is from - // the document. In that case use the value from GetPagesToPrint at the same index to - // get the phys. page number to be printed, and then retrieve the start frame to use - // from GetValidStartFrms. - // - If the entry is not NULL it is the start frame of the page from the post-it document - // that is to be printed - std::vector< const SwPageFrm * > & GetPostItStartFrames() { return m_aPostItStartFrames; } - const std::vector< const SwPageFrm * > & GetPostItStartFrames() const { return m_aPostItStartFrames; } - - // used for prospect printing only - PagePairsVec_t & GetPagePairsForProspectPrinting() { return m_aPagePairs; } - const PagePairsVec_t & GetPagePairsForProspectPrinting() const { return m_aPagePairs; } - - rtl::OUString GetPageRange() const { return m_aPageRange; } - void SetPageRange( const rtl::OUString &rRange ) { m_aPageRange = rRange; } -}; - - -//////////////////////////////////////////////////////////// - -// last remnants of swprtopt.hxx: -#define POSTITS_NONE 0 -#define POSTITS_ONLY 1 -#define POSTITS_ENDDOC 2 -#define POSTITS_ENDPAGE 3 - -namespace sw { - -void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb); - -} // namespace sw - -#endif // SW_PRINTDATA_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/prtopt.hxx b/sw/inc/prtopt.hxx deleted file mode 100644 index ee2454db44..0000000000 --- a/sw/inc/prtopt.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _PRTOPT_HXX -#define _PRTOPT_HXX - -#include <unotools/configitem.hxx> -#include <printdata.hxx> - -class SwPrintOptions : public SwPrintData, public utl::ConfigItem -{ - sal_Bool bIsWeb; - - com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); -public: - SwPrintOptions(sal_Bool bWeb); - virtual ~SwPrintOptions(); - - virtual void Commit(); - virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); - virtual void doSetModified( ) { bModified = sal_True; SetModified();} - - SwPrintOptions& operator=(const SwPrintData& rData) - { - SwPrintData::operator=( rData ); - SetModified(); - return *this; - } -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/pvprtdat.hxx b/sw/inc/pvprtdat.hxx deleted file mode 100644 index d16c525c93..0000000000 --- a/sw/inc/pvprtdat.hxx +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _PVPRTDAT_HXX -#define _PVPRTDAT_HXX - - -#include <tools/solar.h> - -class SwPagePreViewPrtData -{ - sal_uLong nLeftSpace, nRightSpace, nTopSpace, nBottomSpace, - nHorzSpace, nVertSpace; - sal_uInt8 nRow, nCol; - sal_Bool bLandscape : 1; - sal_Bool bStretch : 1; -public: - SwPagePreViewPrtData() - : nLeftSpace(0), nRightSpace(0), nTopSpace(0), nBottomSpace(0), - nHorzSpace(0), nVertSpace(0), nRow(1), nCol(1), - bLandscape(0),bStretch(0) - {} - - sal_uLong GetLeftSpace() const { return nLeftSpace; } - void SetLeftSpace( sal_uLong n ) { nLeftSpace = n; } - - sal_uLong GetRightSpace() const { return nRightSpace; } - void SetRightSpace( sal_uLong n ) { nRightSpace = n; } - - sal_uLong GetTopSpace() const { return nTopSpace; } - void SetTopSpace( sal_uLong n ) { nTopSpace = n; } - - sal_uLong GetBottomSpace() const { return nBottomSpace; } - void SetBottomSpace( sal_uLong n ) { nBottomSpace = n; } - - sal_uLong GetHorzSpace() const { return nHorzSpace; } - void SetHorzSpace( sal_uLong n ) { nHorzSpace = n; } - - sal_uLong GetVertSpace() const { return nVertSpace; } - void SetVertSpace( sal_uLong n ) { nVertSpace = n; } - - sal_uInt8 GetRow() const { return nRow; } - void SetRow(sal_uInt8 n ) { nRow = n; } - - sal_uInt8 GetCol() const { return nCol; } - void SetCol( sal_uInt8 n ) { nCol = n; } - - sal_Bool GetLandscape() const { return bLandscape; } - void SetLandscape( sal_Bool b ) { bLandscape = b; } -}; - - -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc deleted file mode 100644 index 4a4abe9e97..0000000000 --- a/sw/inc/rcid.hrc +++ /dev/null @@ -1,276 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _RDIC_HRC -#define _RDIC_HRC - -#ifndef _SFXSIDS_HRC //autogen -#include <sfx2/sfxsids.hrc> -#endif - -#define IMAGE_MASK_COLOR Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; } -// ---------------------------------------------------------------- -// Bereiche fuer die UI-Verzeichnisse -// ---------------------------------------------------------------- - -#define RC_BASE RID_SW_START // From solar.hrc - -#define RC_APP RC_BASE -#define RC_DIALOG (RC_BASE + 200) -#define RC_DOCVW (RC_BASE + 300) -#define RC_WEB (RC_BASE + 400) -#define RC_GLOBDOC (RC_BASE + 500) -#define RC_VIEW (RC_BASE + 600) -#define RC_CHRDLG (RC_BASE + 700) -#define RC_RIBBAR (RC_BASE + 720) -#define RC_GLOBALS (RC_BASE + 800) -#define RC_FMTUI (RC_BASE + 920) -#define RC_FRMDLG (RC_BASE + 1000) -#define RC_FLDDLG (RC_BASE + 1100) -#define RC_UTLUI (RC_BASE + 1250) -#define RC_ATTR (RC_BASE + 1350) -#define RC_TABLE (RC_BASE + 1450) -#define RC_CONFIG (RC_BASE + 1550) -#define RC_MISC (RC_BASE + 1650) -#define RC_WRTSH (RC_BASE + 1750) -#define RC_INDEX (RC_BASE + 1950) -#define RC_DBUI (RC_BASE + 2050) -#define RC_DOCHDL (RC_BASE + 2150) -#define RC_POOLCHRFMT (RC_BASE + 2250) -#define RC_POOLHTMLCHRFMT (RC_BASE + 2290) -#define RC_POOLFRMFMT (RC_BASE + 2330) -#define RC_POOLTXTCOLL (RC_BASE + 2360) -#define RC_POOLPAGEDESC (RC_BASE + 2550) -#define RC_POOLNUMRULE (RC_BASE + 2650) -#define RC_ENVELP (RC_BASE + 2750) -#define RC_STATLIN_STR (RC_BASE + 2850) -#define RC_COMMON_CORE (RC_BASE + 2950) -#define RC_WIZARD (RC_BASE + 3050) -#define RC_POPUPS (RC_BASE + 3150) -#define RC_SHELLS (RC_BASE + 3250) -#define RC_CFGITEMS (RC_BASE + 3350) -#define RC_LINGU (RC_BASE + 3450) -#define RC_ACCESS (RC_BASE + 3550) -#define STR_POOLPARSTYLE (RC_BASE + 3650) -#define RC_UNDO (RC_BASE + 3750) -#define RC_SMARTTAG (RC_BASE + 3950) // SMARTTAGS -#define RC_UNOCORE (RC_BASE + 4050) -#define RC_ANNOTATION (RC_BASE + 4150) -#define RC_PAGEFRM (RC_BASE + 4250) - -/*-------------------------------------------------------------------- - Beschreibung: Bereiche ausspannen - --------------------------------------------------------------------*/ - -// App-Verzeichnis -#define RC_APP_BEGIN RC_APP -#define RC_APP_END (RC_APP_BEGIN + 199) - -// Dialog-Verzeichnis -#define RC_DIALOG_BEGIN RC_DIALOG -#define RC_DIALOG_END (RC_DIALOG_BEGIN + 99) - -// Editwin & Co -#define RC_DOCVW_BEGIN RC_DOCVW -#define RC_DOCVW_END (RC_DOCVW_BEGIN + 99) - -// Annotation -#define RC_ANNOTATION_BEGIN RC_ANNOTATION -#define RC_ANNOTATION_END (RC_ANNOTATION_BEGIN + 99) - -// Page frame -#define RC_PAGEFRM_BEGIN RC_PAGEFRM -#define RC_PAGEFRM_END (RC_PAGEFRM + 99) - -// SW/Web -#define RC_WEB_BEGIN RC_WEB -#define RC_WEB_END (RC_WEB_BEGIN + 199) - -//Globaldocument -#define RC_GLOBDOC_BEGIN RC_GLOBDOC -#define RC_GLOBDOC_END (RC_GLOBDOC_BEGIN + 99) - -// UI-View -#define RC_VIEW_BEGIN RC_VIEW -#define RC_VIEW_END (RC_VIEW_BEGIN + 99) - -// Zeichen Absatz Tab-Dialog -#define RC_CHRDLG_BEGIN RC_CHRDLG -#define RC_CHRDLG_END (RC_CHRDLG_BEGIN + 19) - -// Unsere Shell -#define RC_WRTSH_BEGIN RC_WRTSH -#define RC_WRTSH_END (RC_WRTSH_BEGIN + 49) - -// Verzeichnisse -#define RC_INDEX_BEGIN RC_INDEX -#define RC_INDEX_END (RC_INDEX + 99) - -// -#define RC_RIBBAR_BEGIN RC_RIBBAR -#define RC_RIBBAR_END (RC_RIBBAR_BEGIN + 79) - -// globale Ressourcen -#define RC_GLOBALS_BEGIN RC_GLOBALS -#define RC_GLOBALS_END (RC_GLOBALS_BEGIN + 120) - -// Format-Vorlagen -#define RC_FMTUI_BEGIN RC_FMTUI -#define RC_FMTUI_END (RC_FMTUI_BEGIN + 69) - - -// Grafik Dialoge -#define RC_GRFDLG_BEGIN RC_GRFDLG -#define RC_GRFDLG_END (RC_GRFDLG_BEGIN + 99) - -// ???? -#define RC_FSTDLG_BEGIN RC_FSTDLG -#define RC_FSTDLG_END (RC_FSTDLG_BEGIN + 99) - -// Rahmen Dialoge -#define RC_FRMDLG_BEGIN RC_FRMDLG -#define RC_FRMDLG_END (RC_FRMDLG_BEGIN + 99) - -// Feld Dialoge -#define RC_FLDDLG_BEGIN RC_FLDDLG -#define RC_FLDDLG_END (RC_FLDDLG_BEGIN + 149) - -// Utilities UI -#define RC_UTLUI_BEGIN RC_UTLUI -#define RC_UTLUI_END (RC_UTLUI + 99) - -// Utilities UI-Attribute -#define RC_ATTR_BEGIN RC_ATTR -#define RC_ATTR_END (RC_ATTR + 99) - -// Tabellen -#define RC_TABLE_BEGIN RC_TABLE -#define RC_TABLE_END (RC_TABLE + 99) - -// Konfiguration -#define RC_CONFIG_BEGIN RC_CONFIG -#define RC_CONFIG_END (RC_CONFIG + 99) - - -// Verschiedenes -#define RC_MISC_BEGIN RC_MISC -#define RC_MISC_END (RC_MISC + 99) - -// DBMgr -#define RC_DBUI_BEGIN RC_DBUI -#define RC_DBUI_END (RC_DBUI + 99) - -// Der Rest der Imp-Klassen -#define RC_DOCHDL_BEGIN RC_DOCHDL -#define RC_DOCHDL_END (RC_DOCHDL + 99) - -// Zeichenvorlagen -#define RC_POOLCHRFMT_BEGIN RC_POOLCHRFMT -#define RC_POOLCHRFMT_END (RC_POOLCHRFMT + 29) -#define RC_POOLCHRFMT_HTML_BEGIN RC_POOLHTMLCHRFMT -#define RC_POOLCHRFMT_HTML_END (RC_POOLHTMLCHRFMT+ 30) - - -// Rahmenvorlagen -#define RC_POOLFRMFMT_BEGIN RC_POOLFRMFMT -#define RC_POOLFRMFMT_END (RC_POOLFRMFMT + 20) - -// Collections -#define RC_POOLTXTCOLL_BEGIN RC_POOLTXTCOLL - -#define RC_POOLCOLL_TEXT_BEGIN RC_POOLTXTCOLL -#define RC_POOLCOLL_TEXT_END (RC_POOLTXTCOLL + 19) -#define RC_POOLCOLL_LISTS_BEGIN (RC_POOLTXTCOLL + 20) -#define RC_POOLCOLL_LISTS_END (RC_POOLTXTCOLL + 69) -#define RC_POOLCOLL_EXTRA_BEGIN (RC_POOLTXTCOLL + 70) -#define RC_POOLCOLL_EXTRA_END (RC_POOLTXTCOLL + 89) -#define RC_POOLCOLL_REGISTER_BEGIN (RC_POOLTXTCOLL + 90) -#define RC_POOLCOLL_REGISTER_END (RC_POOLTXTCOLL + 119) -#define RC_POOLCOLL_DOC_BEGIN (RC_POOLTXTCOLL + 130) -#define RC_POOLCOLL_DOC_END (RC_POOLTXTCOLL + 139) -#define RC_POOLCOLL_HTML_BEGIN (RC_POOLTXTCOLL + 140) -#define RC_POOLCOLL_HTML_END (RC_POOLTXTCOLL + 169) - -#define RC_POOLTXTCOLL_END RC_POOLCOLL_HTML_END - -// Poolvorlagen Seite -#define RC_POOLPAGEDESC_BEGIN RC_POOLPAGEDESC -#define RC_POOLPAGEDESC_END (RC_POOLPAGEDESC + 10) - -// Poolvorlagen Numerierung -#define RC_POOLNUMRULE_BEGIN RC_POOLNUMRULE -#define RC_POOLNUMRULE_END (RC_POOLNUMRULE + 10) - -// Pooltemplate Paragraph -#define STR_POOLPARSTYLE_BEGIN STR_POOLPARSTYLE -#define STR_POOLPARSTYLE_END (STR_POOLPARSTYLE + 9) - -// Envelp-Verzeichnis -#define RC_ENVELP_BEGIN (RC_ENVELP ) -#define RC_ENVELP_END (RC_ENVELP + 99) - -// Statuszeile mit Laufbalken -#define RC_STATLIN_STR_BEGIN (RC_STATLIN_STR) -#define RC_STATLIN_STR_END (RC_STATLIN_STR + 49) - -// Gemeinsame Core-Strings -#define RC_COMCORE_BEGIN (RC_COMMON_CORE) -#define RC_COMCORE_END (RC_COMMON_CORE + 59) - -// Shell-Verzeichnis -#define RC_SHELLS_BEGIN RC_SHELLS -#define RC_SHELLS_END (RC_SHELLS + 99) - -// PopUpMenu's -#define RC_POPUPS_BEGIN RC_POPUPS -#define RC_POPUPS_END (RC_POPUPS + 99) - -// Strings fuer ConfigItems in div. Verzeichnissen -#define RC_CFGITEMS_BEGIN RC_CFGITEMS -#define RC_CFGITEMS_END (RC_CFGITEMS + 99) - -// Lingu -#define RC_LINGU_BEGIN RC_LINGU -#define RC_LINGU_END (RC_LINGU + 99) - -// Accessibility -#define RC_ACCESS_BEGIN RC_ACCESS -#define RC_ACCESS_END (RC_ACCESS + 99) - -// Undos -#define RC_UNDO_BEGIN RC_UNDO -#define RC_UNDO_END (RC_UNDO + 199) - -// SMARTTAGS -// Smarttags -#define RC_SMARTTAG_BEGIN RC_SMARTTAG -#define RC_SMARTTAG_END (RC_SMARTTAG + 99) - -// unocore -#define RC_UNOCORE_BEGIN RC_UNOCORE -#define RC_UNOCORE_END (RC_UNOCORE + 10) - -#endif diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx deleted file mode 100644 index 45cd65c468..0000000000 --- a/sw/inc/redline.hxx +++ /dev/null @@ -1,315 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _REDLINE_HXX -#define _REDLINE_HXX - -#include <tools/datetime.hxx> -#include <tools/string.hxx> - -#include <pam.hxx> - -#include <IDocumentRedlineAccess.hxx> - -#include <svl/smplhint.hxx> -#include <vector> - -class SfxItemSet; -class SwView; - -class SwRedlineExtraData -{ - SwRedlineExtraData( const SwRedlineExtraData& ); - SwRedlineExtraData& operator=( const SwRedlineExtraData& ); - -protected: - SwRedlineExtraData() {} - -public: - virtual ~SwRedlineExtraData(); - virtual SwRedlineExtraData* CreateNew() const = 0; - - virtual void Accept( SwPaM& rPam ) const; - virtual void Reject( SwPaM& rPam ) const; - virtual int operator == ( const SwRedlineExtraData& ) const; -}; - -class SwRedlineExtraData_FmtColl : public SwRedlineExtraData -{ - String sFmtNm; - SfxItemSet* pSet; - sal_uInt16 nPoolId; -public: - SwRedlineExtraData_FmtColl( const String& rColl, sal_uInt16 nPoolFmtId, - const SfxItemSet* pSet = 0 ); - virtual ~SwRedlineExtraData_FmtColl(); - virtual SwRedlineExtraData* CreateNew() const; - virtual void Reject( SwPaM& rPam ) const; - virtual int operator == ( const SwRedlineExtraData& ) const; - - void SetItemSet( const SfxItemSet& rSet ); -}; - -class SwRedlineExtraData_Format : public SwRedlineExtraData -{ - std::vector<sal_uInt16> aWhichIds; - - SwRedlineExtraData_Format( const SwRedlineExtraData_Format& rCpy ); - -public: - SwRedlineExtraData_Format( const SfxItemSet& rSet ); - virtual ~SwRedlineExtraData_Format(); - virtual SwRedlineExtraData* CreateNew() const; - virtual void Reject( SwPaM& rPam ) const; - virtual int operator == ( const SwRedlineExtraData& ) const; -}; - - -class SW_DLLPUBLIC SwRedlineData -{ - friend class SwRedline; - SwRedlineData* pNext; // Points to other data. - SwRedlineExtraData* pExtraData; - - String sComment; - DateTime aStamp; - RedlineType_t eType; - sal_uInt16 nAuthor, nSeqNo; - -public: - SwRedlineData( RedlineType_t eT, sal_uInt16 nAut ); - SwRedlineData( const SwRedlineData& rCpy, sal_Bool bCpyNext = sal_True ); - - // For sw3io: pNext/pExtraData are taken over. - SwRedlineData( RedlineType_t eT, sal_uInt16 nAut, const DateTime& rDT, - const String& rCmnt, SwRedlineData* pNxt, - SwRedlineExtraData* pExtraData = 0 ); - - ~SwRedlineData(); - - int operator==( const SwRedlineData& rCmp ) const - { - return nAuthor == rCmp.nAuthor && - eType == rCmp.eType && - sComment == rCmp.sComment && - (( !pNext && !rCmp.pNext ) || - ( pNext && rCmp.pNext && *pNext == *rCmp.pNext )) && - (( !pExtraData && !rCmp.pExtraData ) || - ( pExtraData && rCmp.pExtraData && - *pExtraData == *rCmp.pExtraData )); - } - int operator!=( const SwRedlineData& rCmp ) const - { return !operator==( rCmp ); } - - RedlineType_t GetType() const - { return ((RedlineType_t)(eType & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); } - RedlineType_t GetRealType() const { return eType; } - sal_uInt16 GetAuthor() const { return nAuthor; } - const String& GetComment() const { return sComment; } - const DateTime& GetTimeStamp() const { return aStamp; } - inline const SwRedlineData* Next() const{ return pNext; } - - void SetComment( const String& rS ) { sComment = rS; } - void SetTimeStamp( const DateTime& rDT ) { aStamp = rDT; } - - void SetAutoFmtFlag() - { eType = (RedlineType_t)(eType | nsRedlineType_t::REDLINE_FORM_AUTOFMT); } - int CanCombine( const SwRedlineData& rCmp ) const - { - return nAuthor == rCmp.nAuthor && - eType == rCmp.eType && - sComment == rCmp.sComment && - GetTimeStamp() == rCmp.GetTimeStamp() && - (( !pNext && !rCmp.pNext ) || - ( pNext && rCmp.pNext && - pNext->CanCombine( *rCmp.pNext ))) && - (( !pExtraData && !rCmp.pExtraData ) || - ( pExtraData && rCmp.pExtraData && - *pExtraData == *rCmp.pExtraData )); - } - - // ExtraData gets copied, the pointer is therefore not taken over by - // the RedlilneObject - void SetExtraData( const SwRedlineExtraData* pData ); - const SwRedlineExtraData* GetExtraData() const { return pExtraData; } - - // For UI-side pooling of Redline-actions. - // At the moment only used for Autoformat with Redline. - // Value != 0 means there can be others! - sal_uInt16 GetSeqNo() const { return nSeqNo; } - void SetSeqNo( sal_uInt16 nNo ) { nSeqNo = nNo; } - - String GetDescr() const; -}; - - -class SW_DLLPUBLIC SwRedline : public SwPaM -{ - SwRedlineData* pRedlineData; - SwNodeIndex* pCntntSect; - sal_Bool bDelLastPara : 1; - sal_Bool bIsLastParaDelete : 1; - sal_Bool bIsVisible : 1; - - void MoveToSection(); - void CopyToSection(); - void DelCopyOfSection(); - void MoveFromSection(); - -public: - SwRedline( RedlineType_t eType, const SwPaM& rPam ); - SwRedline( const SwRedlineData& rData, const SwPaM& rPam ); - SwRedline( const SwRedlineData& rData, const SwPosition& rPos ); - // For sw3io: pData is taken over! - SwRedline(SwRedlineData* pData, const SwPosition& rPos, sal_Bool bVsbl, - sal_Bool bDelLP, sal_Bool bIsPD) : - SwPaM( rPos ), pRedlineData( pData ), pCntntSect( 0 ), - bDelLastPara( bDelLP ), bIsLastParaDelete( bIsPD ), bIsVisible( bVsbl ) - {} - SwRedline( const SwRedline& ); - virtual ~SwRedline(); - - SwNodeIndex* GetContentIdx() const { return pCntntSect; } - // For Undo. - void SetContentIdx( const SwNodeIndex* ); - - sal_Bool IsVisible() const { return bIsVisible; } - sal_Bool IsDelLastPara() const { return bDelLastPara; } - - // sal_Bool indicates whether after setting of Pos no range is spanned. - // -> sal-True else range and sal-False. - void SetStart( const SwPosition& rPos, SwPosition* pSttPtr = 0 ) - { - if( !pSttPtr ) pSttPtr = Start(); - *pSttPtr = rPos; - } - void SetEnd( const SwPosition& rPos, SwPosition* pEndPtr = 0 ) - { - if( !pEndPtr ) pEndPtr = End(); - *pEndPtr = rPos; - } - // Do we have a valid selection? - sal_Bool HasValidRange() const; - - const SwRedlineData& GetRedlineData(sal_uInt16 nPos = 0) const; - int operator==( const SwRedlineData& rCmp ) const - { return *pRedlineData == rCmp; } - int operator!=( const SwRedlineData& rCmp ) const - { return *pRedlineData != rCmp; } - void SetAutoFmtFlag() { pRedlineData->SetAutoFmtFlag(); } - - sal_uInt16 GetStackCount() const; - sal_uInt16 GetAuthor( sal_uInt16 nPos = 0) const; - const String& GetAuthorString( sal_uInt16 nPos = 0 ) const; - const DateTime& GetTimeStamp( sal_uInt16 nPos = 0) const; - RedlineType_t GetRealType( sal_uInt16 nPos = 0 ) const; - RedlineType_t GetType( sal_uInt16 nPos = 0) const - { return ( (RedlineType_t)(GetRealType( nPos ) & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); } - const String& GetComment( sal_uInt16 nPos = 0 ) const; - - void SetComment( const String& rS ) { pRedlineData->SetComment( rS ); } - - // ExtraData gets copied, the pointer is therefor not taken over by - // the RedLineObject. - void SetExtraData( const SwRedlineExtraData* pData ) - { pRedlineData->SetExtraData( pData ); } - const SwRedlineExtraData* GetExtraData() const - { return pRedlineData->GetExtraData(); } - - // For UI-side pooling of Redline-actions. - // At the moment only used for Autoformat with Redline. - // Value != 0 means there can be others! - sal_uInt16 GetSeqNo() const { return pRedlineData->GetSeqNo(); } - void SetSeqNo( sal_uInt16 nNo ) { pRedlineData->SetSeqNo( nNo ); } - - // At Hide/ShowOriginal the list is traversed two times in order to - // hide the Del-Redlines via Copy and Delete. - // Otherwise at Move the attribution would be handled incorrectly. - // All other callers must always give 0. - void CallDisplayFunc( sal_uInt16 nLoop = 0 ); - void Show( sal_uInt16 nLoop = 0 ); - void Hide( sal_uInt16 nLoop = 0 ); - void ShowOriginal( sal_uInt16 nLoop = 0 ); - - // Calculates the intersection with text node number nNdIdx. - void CalcStartEnd( sal_uLong nNdIdx, sal_uInt16& nStart, sal_uInt16& nEnd ) const; - - void InvalidateRange(); // Initiate the layout. - - sal_Bool IsOwnRedline( const SwRedline& rRedl ) const - { return GetAuthor() == rRedl.GetAuthor(); } - sal_Bool CanCombine( const SwRedline& rRedl ) const; - - void PushData( const SwRedline& rRedl, sal_Bool bOwnAsNext = sal_True ); - sal_Bool PopData(); - - /** - Returns textual description of this a redline data element of - this redline. - - @param nPos index of the redline data element to describe - - The textual description of the selected element contains the - kind of redline and the possibly shortened text of the redline. - - @return textual description of the selected redline data element - */ - String GetDescr(sal_uInt16 nPos = 0); - - int operator==( const SwRedline& ) const; - int operator<( const SwRedline& ) const; -}; - -class SW_DLLPUBLIC SwRedlineHint : public SfxHint -{ -#define SWREDLINE_INSERTED 1 -#define SWREDLINE_REMOVED 2 -#define SWREDLINE_FOCUS 3 -#define SWREDLINE_CHANGED 4 -#define SWREDLINE_LANGUAGE 5 - - const SwRedline* pRedline; - sal_Int16 nWhich; - const SwView* pView; - -public: - SwRedlineHint( const SwRedline* p, sal_Int16 n, const SwView* pV = 0) - : pRedline(p) - , nWhich(n) - , pView(pV) - {} - - TYPEINFO(); - const SwRedline* GetRedline() const { return pRedline; } - sal_Int16 Which() const { return nWhich; } - const SwView* GetView() const { return pView; } -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/redlnaut.hxx b/sw/inc/redlnaut.hxx deleted file mode 100644 index 79f2d4d5d0..0000000000 --- a/sw/inc/redlnaut.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _REDLNAUT_HXX -#define _REDLNAUT_HXX - -#include <tools/string.hxx> -#include <tools/color.hxx> - -#include "swtypes.hxx" - -class SfxItemSet; -class SwAttrPool; - -class SwRedlineAuthor -{ - String sAuthor; - Color aChgLineColor; - SfxItemSet *pInsAttrSet, *pDelAttrSet, *pFmtAttrSet; - short eChgLineOrient; - sal_uInt8 cDelChar; -public: - SwRedlineAuthor( SwAttrPool& rPool, const String& ); - SwRedlineAuthor( const SwRedlineAuthor& ); - ~SwRedlineAuthor(); - - SwRedlineAuthor& operator=( const SwRedlineAuthor& ); -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx deleted file mode 100644 index 7226d8379a..0000000000 --- a/sw/inc/reffld.hxx +++ /dev/null @@ -1,159 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_REFFLD_HXX -#define SW_REFFLD_HXX - -#include <fldbas.hxx> - -class SfxPoolItem; -class SwDoc; -class SwTxtNode; -class SwTxtFld; - -enum REFERENCESUBTYPE -{ - REF_SETREFATTR = 0, - REF_SEQUENCEFLD, - REF_BOOKMARK, - REF_OUTLINE, - REF_FOOTNOTE, - REF_ENDNOTE -}; - -enum REFERENCEMARK -{ - REF_BEGIN, - REF_PAGE = REF_BEGIN, - REF_CHAPTER, - REF_CONTENT, - REF_UPDOWN, - REF_PAGE_PGDESC, - REF_ONLYNUMBER, - REF_ONLYCAPTION, - REF_ONLYSEQNO, - // --> #i81002# - // new reference format types for referencing bookmarks and set references - REF_NUMBER, - REF_NUMBER_NO_CONTEXT, - REF_NUMBER_FULL_CONTEXT, - REF_END -}; - - -// Get reference. - -class SwGetRefFieldType : public SwFieldType -{ - SwDoc* pDoc; -protected: - // Overlay in order to update all ref-fields. - virtual void Modify( const SfxPoolItem*, const SfxPoolItem * ); -public: - SwGetRefFieldType(SwDoc* pDoc ); - virtual SwFieldType* Copy() const; - - SwDoc* GetDoc() const { return pDoc; } - - void MergeWithOtherDoc( SwDoc& rDestDoc ); - - static SwTxtNode* FindAnchor( SwDoc* pDoc, const String& rRefMark, - sal_uInt16 nSubType, sal_uInt16 nSeqNo, - sal_uInt16* pStt, sal_uInt16* pEnd = 0 ); -}; - - -class SW_DLLPUBLIC SwGetRefField : public SwField -{ -private: - String sSetRefName; - String sTxt; - sal_uInt16 nSubType; - sal_uInt16 nSeqNo; - - virtual String Expand() const; - virtual SwField* Copy() const; - - // #i81002# - String MakeRefNumStr( const SwTxtNode& rTxtNodeOfField, - const SwTxtNode& rTxtNodeOfReferencedItem, - const sal_uInt32 nRefNumFormat ) const; - -public: - SwGetRefField( SwGetRefFieldType*, const String& rSetRef, - sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uLong nFmt ); - - virtual ~SwGetRefField(); - - virtual String GetFieldName() const; - - const String& GetSetRefName() const { return sSetRefName; } - - // #i81002# - // The <SwTxtFld> instance, which represents the text attribute for the - // <SwGetRefField> instance, has to be passed to the method. - // This <SwTxtFld> instance is needed for the reference format type REF_UPDOWN - // and REF_NUMBER. - // Note: This instance may be NULL (field in Undo/Redo). This will cause - // no update for these reference format types. - void UpdateField( const SwTxtFld* pFldTxtAttr ); - - void SetExpand( const String& rStr ) { sTxt = rStr; } - - // Get/set sub type. - virtual sal_uInt16 GetSubType() const; - virtual void SetSubType( sal_uInt16 n ); - - // --> #i81002# - bool IsRefToHeadingCrossRefBookmark() const; - bool IsRefToNumItemCrossRefBookmark() const; - const SwTxtNode* GetReferencedTxtNode() const; - // #i85090# - String GetExpandedTxtOfReferencedTxtNode() const; - - - // Get/set SequenceNo (of interest only for REF_SEQUENCEFLD). - sal_uInt16 GetSeqNo() const { return nSeqNo; } - void SetSeqNo( sal_uInt16 n ) { nSeqNo = n; } - - // Name of reference. - virtual const String& GetPar1() const; - virtual void SetPar1(const String& rStr); - - virtual String GetPar2() const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ); - - void ConvertProgrammaticToUIName(); - - virtual String GetDescription() const; -}; - - -#endif // SW_REFFLD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx deleted file mode 100644 index 8249e45643..0000000000 --- a/sw/inc/ring.hxx +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _RING_HXX -#define _RING_HXX - -#include <swdllapi.h> -#include <swtypes.hxx> - -class SW_DLLPUBLIC Ring -{ - Ring *pNext; - Ring* pPrev; // In order to speed up inserting and deleting. - -protected: - Ring() { pNext = this; pPrev = this; } - Ring( Ring * ); -public: - virtual ~Ring(); - void MoveTo( Ring *pDestRing ); - void MoveRingTo( Ring *pDestRing ); - - Ring* GetNext() const { return pNext; } - Ring* GetPrev() const { return pPrev; } - - sal_uInt32 numberOf() const; -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/rubylist.hxx b/sw/inc/rubylist.hxx deleted file mode 100644 index 1341f147ee..0000000000 --- a/sw/inc/rubylist.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _RUBYLIST_HXX -#define _RUBYLIST_HXX - -#include <svl/svarray.hxx> -#include <swtypes.hxx> -#include <fmtruby.hxx> - -class SwRubyListEntry -{ - String sText; - SwFmtRuby aRubyAttr; -public: - SwRubyListEntry() : aRubyAttr( aEmptyStr ) {} - ~SwRubyListEntry(); - - const String& GetText() const { return sText; } - void SetText( const String& rStr ) { sText = rStr; } - - const SwFmtRuby& GetRubyAttr() const { return aRubyAttr; } - SwFmtRuby& GetRubyAttr() { return aRubyAttr; } - void SetRubyAttr( const SwFmtRuby& rAttr ) { aRubyAttr = rAttr; } -}; - -typedef SwRubyListEntry* SwRubyListEntryPtr; -SV_DECL_PTRARR_DEL( SwRubyList, SwRubyListEntryPtr, 0, 32 ) - - -#endif //_RUBYLIST_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx deleted file mode 100644 index bc0ccb83e3..0000000000 --- a/sw/inc/section.hxx +++ /dev/null @@ -1,401 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SECTION_HXX -#define _SECTION_HXX - -#include <boost/utility.hpp> - -#include <com/sun/star/uno/Sequence.h> - -#include <tools/rtti.hxx> -#include <tools/ref.hxx> -#include <svl/svarray.hxx> -#include <svl/smplhint.hxx> -#include <sfx2/lnkbase.hxx> -#include <sfx2/Metadatable.hxx> - -#include <frmfmt.hxx> - - -namespace com { namespace sun { namespace star { - namespace text { class XTextSection; } -} } } - - -class SwSectionFmt; -class SwDoc; -class SwSection; -class SwSectionNode; -class SwTOXBase; - -#ifndef SW_DECL_SWSERVEROBJECT_DEFINED -#define SW_DECL_SWSERVEROBJECT_DEFINED -SV_DECL_REF( SwServerObject ) -#endif - -SV_DECL_PTRARR( SwSections, SwSection*, 0, 4 ) - -enum SectionType { CONTENT_SECTION, - TOX_HEADER_SECTION, - TOX_CONTENT_SECTION, - DDE_LINK_SECTION = OBJECT_CLIENT_DDE, - FILE_LINK_SECTION = OBJECT_CLIENT_FILE - }; - -enum LinkCreateType -{ - CREATE_NONE, // Do nothing. - CREATE_CONNECT, // Connect created link. - CREATE_UPDATE // Connect created link and update it. -}; - -class SW_DLLPUBLIC SwSectionData -{ -private: - SectionType m_eType; - - String m_sSectionName; - String m_sCondition; - String m_sLinkFileName; - String m_sLinkFilePassword; // Must be changed to Sequence. - ::com::sun::star::uno::Sequence <sal_Int8> m_Password; - - /// It seems this flag caches the current final "hidden" state. - bool m_bHiddenFlag : 1; - /// Flags that correspond to attributes in the format: - /// may have different value than format attribute: - /// format attr has value for this section, while flag is - /// effectively ORed with parent sections! - bool m_bProtectFlag : 1; - // Edit in readonly sections. - bool m_bEditInReadonlyFlag : 1; - - bool m_bHidden : 1; // All paragraphs hidden? - bool m_bCondHiddenFlag : 1; // Hiddenflag for condition. - bool m_bConnectFlag : 1; // Connected to server? - -public: - - SwSectionData(SectionType const eType, String const& rName); - explicit SwSectionData(SwSection const&); - SwSectionData(SwSectionData const&); - SwSectionData & operator=(SwSectionData const&); - bool operator==(SwSectionData const&) const; - - String const& GetSectionName() const { return m_sSectionName; } - void SetSectionName(String const& rName){ m_sSectionName = rName; } - SectionType GetType() const { return m_eType; } - void SetType(SectionType const eNew) { m_eType = eNew; } - - bool IsHidden() const { return m_bHidden; } - void SetHidden(bool const bFlag = true) { m_bHidden = bFlag; } - - bool IsHiddenFlag() const { return m_bHiddenFlag; } - SW_DLLPRIVATE void - SetHiddenFlag(bool const bFlag) { m_bHiddenFlag = bFlag; } - bool IsProtectFlag() const { return m_bProtectFlag; } - SW_DLLPRIVATE void - SetProtectFlag(bool const bFlag) { m_bProtectFlag = bFlag; } - bool IsEditInReadonlyFlag() const { return m_bEditInReadonlyFlag; } - void SetEditInReadonlyFlag(bool const bFlag) - { m_bEditInReadonlyFlag = bFlag; } - - void SetCondHidden(bool const bFlag = true) { m_bCondHiddenFlag = bFlag; }; - bool IsCondHidden() const { return m_bCondHiddenFlag; } - - String const& GetCondition() const { return m_sCondition; } - void SetCondition(String const& rNew) { m_sCondition = rNew; } - - String const& GetLinkFileName() const { return m_sLinkFileName; }; - void SetLinkFileName(String const& rNew, String const* pPassWd = 0) - { - m_sLinkFileName = rNew; - if (pPassWd) { SetLinkFilePassword(*pPassWd); } - } - - String const& GetLinkFilePassword() const { return m_sLinkFilePassword; } - void SetLinkFilePassword(String const& rS) { m_sLinkFilePassword = rS; } - - ::com::sun::star::uno::Sequence<sal_Int8> const& GetPassword() const - { return m_Password; } - void SetPassword(::com::sun::star::uno::Sequence<sal_Int8> const& rNew) - { m_Password = rNew; } - bool IsLinkType() const - { return (DDE_LINK_SECTION == m_eType) || (FILE_LINK_SECTION == m_eType); } - - bool IsConnectFlag() const { return m_bConnectFlag; } - void SetConnectFlag(bool const bFlag = true){ m_bConnectFlag = bFlag; } -}; - -class SW_DLLPUBLIC SwSection - : public SwClient -{ - // In order to correctly maintain the flag when creating/deleting frames. - friend class SwSectionNode; - // The "read CTOR" of SwSectionFrm have to change the Hiddenflag. - friend class SwSectionFrm; - -private: - SwSectionData m_Data; - - SwServerObjectRef m_RefObj; // Set if DataServer. - ::sfx2::SvBaseLinkRef m_RefLink; - - SW_DLLPRIVATE void ImplSetHiddenFlag( - bool const bHidden, bool const bCondition); - -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ); - -public: - TYPEINFO(); // rtti - - SwSection(SectionType const eType, String const& rName, - SwSectionFmt & rFormat); - virtual ~SwSection(); - - bool DataEquals(SwSectionData const& rCmp) const; - - void SetSectionData(SwSectionData const& rData); - - String const& GetSectionName() const { return m_Data.GetSectionName(); } - void SetSectionName(String const& rName){ m_Data.SetSectionName(rName); } - SectionType GetType() const { return m_Data.GetType(); } - void SetType(SectionType const eType) { return m_Data.SetType(eType); } - - SwSectionFmt* GetFmt() { return (SwSectionFmt*)GetRegisteredIn(); } - SwSectionFmt* GetFmt() const { return (SwSectionFmt*)GetRegisteredIn(); } - - // Set hidden/protected -> update the whole tree! - // (Attributes/flags are set/get.) - bool IsHidden() const { return m_Data.IsHidden(); } - void SetHidden (bool const bFlag = true); - bool IsProtect() const; - void SetProtect(bool const bFlag = true); - bool IsEditInReadonly() const; - void SetEditInReadonly(bool const bFlag = true); - - // Get internal flags (state including parents, not what is - // currently set at section!). - bool IsHiddenFlag() const { return m_Data.IsHiddenFlag(); } - bool IsProtectFlag() const { return m_Data.IsProtectFlag(); } - bool IsEditInReadonlyFlag() const { return m_Data.IsEditInReadonlyFlag(); } - - void SetCondHidden(bool const bFlag = true); - bool IsCondHidden() const { return m_Data.IsCondHidden(); } - // Query (also for parents) if this section is to be hidden. - sal_Bool CalcHiddenFlag() const; - - - inline SwSection* GetParent() const; - - String const& GetCondition() const { return m_Data.GetCondition(); } - void SetCondition(String const& rNew) { m_Data.SetCondition(rNew); } - - const String& GetLinkFileName() const; - void SetLinkFileName(String const& rNew, String const*const pPassWd = 0); - // Password of linked file (only valid during runtime!) - String const& GetLinkFilePassword() const - { return m_Data.GetLinkFilePassword(); } - void SetLinkFilePassword(String const& rS) - { m_Data.SetLinkFilePassword(rS); } - - // Get / set password of this section - ::com::sun::star::uno::Sequence<sal_Int8> const& GetPassword() const - { return m_Data.GetPassword(); } - void SetPassword(::com::sun::star::uno::Sequence <sal_Int8> const& rNew) - { m_Data.SetPassword(rNew); } - - // Data server methods. - void SetRefObject( SwServerObject* pObj ); - const SwServerObject* GetObject() const { return & m_RefObj; } - SwServerObject* GetObject() { return & m_RefObj; } - bool IsServer() const { return m_RefObj.Is(); } - - // Methods for linked ranges. - sal_uInt16 GetUpdateType() const { return m_RefLink->GetUpdateMode(); } - void SetUpdateType(sal_uInt16 const nType ) - { m_RefLink->SetUpdateMode(nType); } - - bool IsConnected() const { return m_RefLink.Is(); } - void UpdateNow() { m_RefLink->Update(); } - void Disconnect() { m_RefLink->Disconnect(); } - - const ::sfx2::SvBaseLink& GetBaseLink() const { return *m_RefLink; } - ::sfx2::SvBaseLink& GetBaseLink() { return *m_RefLink; } - - void CreateLink( LinkCreateType eType ); - - void MakeChildLinksVisible( const SwSectionNode& rSectNd ); - - bool IsLinkType() const { return m_Data.IsLinkType(); } - - // Flags for UI. Did connection work? - bool IsConnectFlag() const { return m_Data.IsConnectFlag(); } - void SetConnectFlag(bool const bFlag = true) - { m_Data.SetConnectFlag(bFlag); } - - // Return the TOX base class if the section is a TOX section - const SwTOXBase* GetTOXBase() const; - - void BreakLink(); - -}; - -/** Hint used to notify the deletion of SwSectionFrm objects with or without - keeping the content of the frame #i117863#. - */ -class SwSectionFrmMoveAndDeleteHint : public SfxSimpleHint -{ - public: - SwSectionFrmMoveAndDeleteHint( const sal_Bool bSaveCntnt ) - : SfxSimpleHint( SFX_HINT_DYING ) - , mbSaveCntnt( bSaveCntnt ) - {} - - ~SwSectionFrmMoveAndDeleteHint() - {} - - sal_Bool IsSaveCntnt() const - { - return mbSaveCntnt; - } - - private: - const sal_Bool mbSaveCntnt; -}; - -enum SectionSort { SORTSECT_NOT, SORTSECT_NAME, SORTSECT_POS }; - -class SW_DLLPUBLIC SwSectionFmt - : public SwFrmFmt - , public ::sfx2::Metadatable -{ - friend class SwDoc; - - /** Why does this exist in addition to the m_wXObject in SwFrmFmt? - in case of an index, both a SwXDocumentIndex and a SwXTextSection - register at this SwSectionFmt, so we need to have two refs. - */ - ::com::sun::star::uno::WeakReference< - ::com::sun::star::text::XTextSection> m_wXTextSection; - - SW_DLLPRIVATE void UpdateParent(); // Parent has been changed. - -protected: - SwSectionFmt( SwSectionFmt* pDrvdFrm, SwDoc *pDoc ); - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ); - -public: - TYPEINFO(); // Already contained in base class client. - ~SwSectionFmt(); - - // Deletes all Frms in aDepend (Frms are recognized via PTR_CAST). - virtual void DelFrms(); - - // Creates views. - virtual void MakeFrms(); - - // Get information from Format. - virtual sal_Bool GetInfo( SfxPoolItem& ) const; - - SwSection* GetSection() const; - inline SwSectionFmt* GetParent() const; - inline SwSection* GetParentSection() const; - - // All sections that are derived from this one: - // - sorted according to name or position or unsorted - // - all of them or only those that are in the normal Nodes-array. - sal_uInt16 GetChildSections( SwSections& rArr, - SectionSort eSort = SORTSECT_NOT, - sal_Bool bAllSections = sal_True ) const; - - - // Query whether section is in Nodes-array or in UndoNodes-array. - sal_Bool IsInNodesArr() const; - - SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false); - const SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false) const - { return const_cast<SwSectionFmt *>(this) - ->GetSectionNode(bEvenIfInUndo); } - - // Is section a valid one for global document? - const SwSection* GetGlobalDocSection() const; - - SW_DLLPRIVATE ::com::sun::star::uno::WeakReference< - ::com::sun::star::text::XTextSection> const& GetXTextSection() const - { return m_wXTextSection; } - SW_DLLPRIVATE void SetXTextSection(::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextSection> const& xTextSection) - { m_wXTextSection = xTextSection; } - - // sfx2::Metadatable - virtual ::sfx2::IXmlIdRegistry& GetRegistry(); - virtual bool IsInClipboard() const; - virtual bool IsInUndo() const; - virtual bool IsInContent() const; - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::rdf::XMetadatable > MakeUnoObject(); - -}; - -// -------------- inlines --------------------------------- - -inline SwSection* SwSection::GetParent() const -{ - SwSectionFmt* pFmt = GetFmt(); - SwSection* pRet = 0; - if( pFmt ) - pRet = pFmt->GetParentSection(); - return pRet; -} - -inline SwSectionFmt* SwSectionFmt::GetParent() const -{ - SwSectionFmt* pRet = 0; - if( GetRegisteredIn() ) - pRet = PTR_CAST( SwSectionFmt, GetRegisteredIn() ); - return pRet; -} - -inline SwSection* SwSectionFmt::GetParentSection() const -{ - SwSectionFmt* pParent = GetParent(); - SwSection* pRet = 0; - if( pParent ) - { - pRet = pParent->GetSection(); - } - return pRet; -} - - -#endif /* _SECTION_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/shellid.hxx b/sw/inc/shellid.hxx deleted file mode 100644 index ee5ec2b6a0..0000000000 --- a/sw/inc/shellid.hxx +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SHELLID_HXX -#define _SHELLID_HXX - -#include <sfx2/shell.hxx> - -// Mapping for UI-parameters - -#define SW_BASESHELL (SFX_INTERFACE_SW_START + 1) -#define SW_TEXTSHELL (SFX_INTERFACE_SW_START + 2) -#define SW_LISTSHELL (SFX_INTERFACE_SW_START + 3) -#define SW_TABSHELL (SFX_INTERFACE_SW_START + 4) -#define SW_FRAMESHELL (SFX_INTERFACE_SW_START + 5) -#define SW_GRFSHELL (SFX_INTERFACE_SW_START + 6) -#define SW_OLESHELL (SFX_INTERFACE_SW_START + 7) -#define SW_DRAWSHELL (SFX_INTERFACE_SW_START + 8) -#define SW_DRWTXTSHELL (SFX_INTERFACE_SW_START + 9) - -#define SW_INTERFACE_MODULE (SFX_INTERFACE_SW_START + 10) -#define SW_DOCSHELL (SFX_INTERFACE_SW_START + 11) -#define SW_VIEWSHELL (SFX_INTERFACE_SW_START + 12) -#define SW_PAGEPREVIEW (SFX_INTERFACE_SW_START + 13) -#define SW_GLOSDOCSHELL (SFX_INTERFACE_SW_START + 14) -#define SW_SRC_VIEWSHELL (SFX_INTERFACE_SW_START + 15) - -#define SW_BEZIERSHELL (SFX_INTERFACE_SW_START + 16) -#define SW_DRAWBASESHELL (SFX_INTERFACE_SW_START + 17) -#define SW_DRAWFORMSHELL (SFX_INTERFACE_SW_START + 18) - -#define SW_WEBDOCSHELL (SFX_INTERFACE_SW_START + 19) -#define SW_WEBVIEWSHELL (SFX_INTERFACE_SW_START + 20) -#define SW_WEBBASESHELL (SFX_INTERFACE_SW_START + 21) -#define SW_WEBTEXTSHELL (SFX_INTERFACE_SW_START + 22) -#define SW_WEBFRAMESHELL (SFX_INTERFACE_SW_START + 23) -#define SW_WEBGLOSDOCSHELL (SFX_INTERFACE_SW_START + 24) -#define SW_WEBLISTSHELL (SFX_INTERFACE_SW_START + 25) -#define SW_WEBTABSHELL (SFX_INTERFACE_SW_START + 26) -#define SW_WEBGRFSHELL (SFX_INTERFACE_SW_START + 27) -#define SW_WEBOLESHELL (SFX_INTERFACE_SW_START + 28) -#define SW_WEBDRAWBASESHELL (SFX_INTERFACE_SW_START + 29) -#define SW_WEBDRAWFORMSHELL (SFX_INTERFACE_SW_START + 30) - -#define SW_MEDIASHELL (SFX_INTERFACE_SW_START + 31) -#define SW_ANNOTATIONSHELL (SFX_INTERFACE_SW_START + 32) - -#define SW_NAVIGATIONSHELL (SFX_INTERFACE_SW_START + 33) -#endif // _UIPARAM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx deleted file mode 100644 index 4955b759fc..0000000000 --- a/sw/inc/shellio.hxx +++ /dev/null @@ -1,601 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_SHELLIO_HXX -#define SW_SHELLIO_HXX - -#include <memory> -#include <boost/utility.hpp> - -#include <com/sun/star/uno/Reference.h> -#include <com/sun/star/embed/XStorage.hpp> -#include <sfx2/docfile.hxx> -#include <sfx2/fcontnr.hxx> -#include <sot/formats.hxx> -#include <sot/storage.hxx> -#include <svtools/parhtml.hxx> -#include <tools/string.hxx> -#include <tools/date.hxx> -#include <tools/time.hxx> -#include <tools/datetime.hxx> -#include <tools/ref.hxx> -#include <tools/urlobj.hxx> -#include <swdllapi.h> -#include <swtypes.hxx> -#include <docfac.hxx> // SwDocFac -#include <iodetect.hxx> - -class SfxFilterContainer; -class SfxFilter; -class SfxItemPool; -class SfxItemSet; -class SfxMedium; -class SvPtrarr; -class SvStream; -class SvStrings; -class SvxFontItem; -class SvxMacroTableDtor; -class SwCntntNode; -class SwCrsrShell; -class SwDoc; -class SwPaM; -class SwTextBlocks; -struct SwPosition; -struct Writer_Impl; - -// Defines the count of chars at which a paragraph read via ASCII/W4W-Reader -// is forced to wrap. It has to be always greater than 200!!! -#define MAX_ASCII_PARA 10000 - - -class SW_DLLPUBLIC SwAsciiOptions -{ - String sFont; - rtl_TextEncoding eCharSet; - sal_uInt16 nLanguage; - LineEnd eCRLF_Flag; - -public: - - const String& GetFontName() const { return sFont; } - void SetFontName( const String& rFont ) { sFont = rFont; } - - rtl_TextEncoding GetCharSet() const { return eCharSet; } - void SetCharSet( rtl_TextEncoding nVal ) { eCharSet = nVal; } - - sal_uInt16 GetLanguage() const { return nLanguage; } - void SetLanguage( sal_uInt16 nVal ) { nLanguage = nVal; } - - LineEnd GetParaFlags() const { return eCRLF_Flag; } - void SetParaFlags( LineEnd eVal ) { eCRLF_Flag = eVal; } - - void Reset() - { - sFont.Erase(); - eCRLF_Flag = GetSystemLineEnd(); - eCharSet = ::gsl_getSystemTextEncoding(); - nLanguage = 0; - } - // for the automatic conversion (mail/news/...) - void ReadUserData( const String& ); - void WriteUserData( String& ); - - SwAsciiOptions() { Reset(); } -}; - -/**************** SwReader/Reader ************************/ -// Base class of possible options for a special reader. -class Reader; -// Calls reader with its options, document, cursor etc. -class SwReader; -// SwRead is pointer to the read-options base class. -typedef Reader *SwRead; - -class SwgReaderOption -{ - SwAsciiOptions aASCIIOpts; - union - { - sal_Bool bFmtsOnly; - struct - { - sal_Bool bFrmFmts: 1; - sal_Bool bPageDescs: 1; - sal_Bool bTxtFmts: 1; - sal_Bool bNumRules: 1; - sal_Bool bMerge:1; - } Fmts; - } What; - -public: - void ResetAllFmtsOnly() { What.bFmtsOnly = 0; } - sal_Bool IsFmtsOnly() const { return What.bFmtsOnly; } - - sal_Bool IsFrmFmts() const { return What.Fmts.bFrmFmts; } - void SetFrmFmts( const sal_Bool bNew) { What.Fmts.bFrmFmts = bNew; } - - sal_Bool IsPageDescs() const { return What.Fmts.bPageDescs; } - void SetPageDescs( const sal_Bool bNew) { What.Fmts.bPageDescs = bNew; } - - sal_Bool IsTxtFmts() const { return What.Fmts.bTxtFmts; } - void SetTxtFmts( const sal_Bool bNew) { What.Fmts.bTxtFmts = bNew; } - - sal_Bool IsNumRules() const { return What.Fmts.bNumRules; } - void SetNumRules( const sal_Bool bNew) { What.Fmts.bNumRules = bNew; } - - sal_Bool IsMerge() const { return What.Fmts.bMerge; } - void SetMerge( const sal_Bool bNew ) { What.Fmts.bMerge = bNew; } - - const SwAsciiOptions& GetASCIIOpts() const { return aASCIIOpts; } - void SetASCIIOpts( const SwAsciiOptions& rOpts ) { aASCIIOpts = rOpts; } - void ResetASCIIOpts() { aASCIIOpts.Reset(); } - - SwgReaderOption() - { ResetAllFmtsOnly(); aASCIIOpts.Reset(); } -}; - -class SwReader: public SwDocFac -{ - SvStream* pStrm; - SotStorageRef pStg; - com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg; - SfxMedium* pMedium; // Who wants to obtain a Medium (W4W). - - SwPaM* pCrsr; - String aFileName; - String sBaseURL; - -public: - - // Initial reading. Document is created only at Read(...) - // or in case it is given, into that. - // Special case for Load with Sw3Reader. - SwReader( SfxMedium&, const String& rFilename, SwDoc *pDoc = 0 ); - - // Read into existing document. - // Document and position in document are taken from SwPaM. - SwReader( SvStream&, const String& rFilename, const String& rBaseURL, SwPaM& ); - SwReader( SfxMedium&, const String& rFilename, SwPaM& ); - SwReader( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFilename, SwPaM& ); - - // The only export interface is SwReader::Read(...)!!! - sal_Bool NeedsPasswd( const Reader& ); - sal_Bool CheckPasswd( const String&, const Reader& ); - sal_uLong Read( const Reader& ); - - // Ask for glossaries. - sal_Bool HasGlossaries( const Reader& ); - sal_Bool ReadGlossaries( const Reader&, SwTextBlocks&, sal_Bool bSaveRelFiles ); - - const String& GetBaseURL() const { return sBaseURL;} - -protected: - void SetBaseURL( const String& rURL ) { sBaseURL = rURL; } -}; - - - -/**************** Special Readers ************************/ - -// Special Readers can be both!! (Excel, W4W, .. ). -#define SW_STREAM_READER 1 -#define SW_STORAGE_READER 2 - -class SW_DLLPUBLIC Reader -{ - friend class SwReader; - SwDoc* pTemplate; - String aTemplateNm; - - Date aDStamp; - Time aTStamp; - DateTime aChkDateTime; - -protected: - SvStream* pStrm; - SotStorageRef pStg; - com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg; - SfxMedium* pMedium; // Who wants to obtain a Medium (W4W). - - SwgReaderOption aOpt; - sal_Bool bInsertMode : 1; - sal_Bool bTmplBrowseMode : 1; - sal_Bool bReadUTF8: 1; // Interprete stream as UTF-8. - sal_Bool bBlockMode: 1; - sal_Bool bOrganizerMode : 1; - sal_Bool bHasAskTemplateName : 1; - sal_Bool bIgnoreHTMLComments : 1; - - virtual String GetTemplateName() const; - -public: - Reader(); - virtual ~Reader(); - - virtual int GetReaderType(); - SwgReaderOption& GetReaderOpt() { return aOpt; } - - virtual void SetFltName( const String& rFltNm ); - static void SetNoOutlineNum( SwDoc& rDoc ); - - // Adapt item-set of a Frm-Format to the old format. - static void ResetFrmFmtAttrs( SfxItemSet &rFrmSet ); - - // Adapt Frame-/Graphics-/OLE- styles to the old format - // (without borders etc.). - static void ResetFrmFmts( SwDoc& rDoc ); - - // Load filter template, set it and release it again. - SwDoc* GetTemplateDoc(); - sal_Bool SetTemplate( SwDoc& rDoc ); - void ClearTemplate(); - void SetTemplateName( const String& rDir ); - void MakeHTMLDummyTemplateDoc(); - - sal_Bool IsReadUTF8() const { return bReadUTF8; } - void SetReadUTF8( sal_Bool bSet ) { bReadUTF8 = bSet; } - - sal_Bool IsBlockMode() const { return bBlockMode; } - void SetBlockMode( sal_Bool bSet ) { bBlockMode = bSet; } - - sal_Bool IsOrganizerMode() const { return bOrganizerMode; } - void SetOrganizerMode( sal_Bool bSet ) { bOrganizerMode = bSet; } - - void SetIgnoreHTMLComments( sal_Bool bSet ) { bIgnoreHTMLComments = bSet; } - - virtual sal_Bool HasGlossaries() const; - virtual sal_Bool ReadGlossaries( SwTextBlocks&, sal_Bool bSaveRelFiles ) const; - - // Read the sections of the document, which is equal to the medium. - // Returns the count of it - virtual sal_uInt16 GetSectionList( SfxMedium& rMedium, - SvStrings& rStrings ) const; - - SotStorageRef getSotStorageRef() { return pStg; }; - void setSotStorageRef(SotStorageRef pStgRef) { pStg = pStgRef; }; - -private: - virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &)=0; - - // Everyone who does not need the streams / storages open - // has to overload the method (W4W!!). - virtual int SetStrmStgPtr(); -}; - -class AsciiReader: public Reader -{ - friend class SwReader; - virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &); -public: - AsciiReader(): Reader() {} -}; - -class SW_DLLPUBLIC StgReader : public Reader -{ - String aFltName; - -protected: - sal_uLong OpenMainStream( SotStorageStreamRef& rRef, sal_uInt16& rBuffSize ); -public: - virtual int GetReaderType(); - const String& GetFltName() { return aFltName; } - virtual void SetFltName( const String& r ); -}; - - -// The given stream has to be created dynamically and must -// be requested via Stream() before the instance is deleted! - -class SwImpBlocks; - -class SW_DLLPUBLIC SwTextBlocks -{ - SwImpBlocks* pImp; - sal_uLong nErr; - -public: - SwTextBlocks( const String& ); - ~SwTextBlocks(); - - void Flush(){} - - SwDoc* GetDoc(); - void ClearDoc(); // Delete Doc-contents. - const String& GetName(); - void SetName( const String& ); - sal_uLong GetError() const { return nErr; } - - String GetBaseURL() const; - void SetBaseURL( const String& rURL ); - - sal_Bool IsOld() const; - sal_uLong ConvertToNew(); // Convert text modules. - - sal_uInt16 GetCount() const; // Get count text modules. - sal_uInt16 GetIndex( const String& ) const; // Get index of short names. - sal_uInt16 GetLongIndex( const String& ) const; // Get index of long names. - const String& GetShortName( sal_uInt16 ) const; // Get short name for index. - const String& GetLongName( sal_uInt16 ) const; // Get long name for index. - - sal_Bool Delete( sal_uInt16 ); - sal_uInt16 Rename( sal_uInt16, const String*, const String* ); - sal_uLong CopyBlock( SwTextBlocks& rSource, String& rSrcShort, - const String& rLong ); - - sal_Bool BeginGetDoc( sal_uInt16 ); // Read text modules. - void EndGetDoc(); // Release text modules. - - sal_Bool BeginPutDoc( const String&, const String& ); // Begin save. - sal_uInt16 PutDoc(); // End save. - - sal_uInt16 PutText( const String&, const String&, const String& ); // Save (short name, text). - - sal_Bool IsOnlyTextBlock( sal_uInt16 ) const; - sal_Bool IsOnlyTextBlock( const String& rShort ) const; - - const String& GetFileName() const; // Filename of pImp. - sal_Bool IsReadOnly() const; // ReadOnly-flag of pImp. - - sal_Bool GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTbl ); - sal_Bool SetMacroTable( sal_uInt16 nIdx, const SvxMacroTableDtor& rMacroTbl ); - - sal_Bool StartPutMuchBlockEntries(); - void EndPutMuchBlockEntries(); -}; - -// BEGIN source/filter/basflt/fltini.cxx - -extern void _InitFilter(); -extern void _FinitFilter(); - -extern SwRead ReadAscii, /*ReadSwg, ReadSw3, */ReadHTML, ReadXML; - -SW_DLLPUBLIC SwRead SwGetReaderXML(); - -// END source/filter/basflt/fltini.cxx - - -extern sal_Bool SetHTMLTemplate( SwDoc &rDoc ); //For templates from HTML before loading shellio.cxx. - - - - - -// Base-class of all writers. - -class IDocumentSettingAccess; -class IDocumentStylePoolAccess; - -class SW_DLLPUBLIC Writer - : public SvRefBase - , private ::boost::noncopyable -{ - SwAsciiOptions aAscOpts; - String sBaseURL; - - void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont ); - void _AddFontItems( SfxItemPool& rPool, sal_uInt16 nWhichId ); - - ::std::auto_ptr<Writer_Impl> m_pImpl; - -protected: - - SwPaM* pOrigPam; // Last Pam that has to be processed. - const String* pOrigFileName; - - void ResetWriter(); - sal_Bool CopyNextPam( SwPaM ** ); - - void PutNumFmtFontsInAttrPool(); - void PutEditEngFontsInAttrPool( sal_Bool bIncl_CJK_CTL = sal_True ); - - virtual sal_uLong WriteStream() = 0; - void SetBaseURL( const String& rURL ) { sBaseURL = rURL; } - - IDocumentSettingAccess* getIDocumentSettingAccess(); - const IDocumentSettingAccess* getIDocumentSettingAccess() const; - - IDocumentStylePoolAccess* getIDocumentStylePoolAccess(); - const IDocumentStylePoolAccess* getIDocumentStylePoolAccess() const; - -public: - SwDoc* pDoc; - SwPaM* pCurPam; - sal_Bool bWriteAll : 1; - sal_Bool bShowProgress : 1; - sal_Bool bWriteClipboardDoc : 1; - sal_Bool bWriteOnlyFirstTable : 1; - sal_Bool bASCII_ParaAsCR : 1; - sal_Bool bASCII_ParaAsBlanc : 1; - sal_Bool bASCII_NoLastLineEnd : 1; - sal_Bool bUCS2_WithStartChar : 1; - sal_Bool bExportPargraphNumbering : 1; - - sal_Bool bBlock : 1; - sal_Bool bOrganizerMode : 1; - - Writer(); - virtual ~Writer(); - - virtual sal_uLong Write( SwPaM&, SfxMedium&, const String* = 0 ); - sal_uLong Write( SwPaM&, SvStream&, const String* = 0 ); - virtual sal_uLong Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 ); - virtual sal_uLong Write( SwPaM&, SotStorage&, const String* = 0 ); - - virtual void SetPasswd( const String& ); - virtual void SetVersion( const String&, long ); - virtual sal_Bool IsStgWriter() const; - - void SetShowProgress( sal_Bool bFlag = sal_False ) { bShowProgress = bFlag; } - - const String* GetOrigFileName() const { return pOrigFileName; } - - const SwAsciiOptions& GetAsciiOptions() const { return aAscOpts; } - void SetAsciiOptions( const SwAsciiOptions& rOpt ) { aAscOpts = rOpt; } - - const String& GetBaseURL() const { return sBaseURL;} - - // Look up next bookmark position from bookmark-table. - 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(); - // Search alle Bookmarks in the range and return it in the Array. - sal_uInt16 GetBookmarks( const SwCntntNode& rNd, - xub_StrLen nStt, xub_StrLen nEnd, - SvPtrarr& rArr ); - - // Create new PaM at position. - static SwPaM * NewSwPaM(SwDoc & rDoc, - sal_uLong const nStartIdx, sal_uLong const nEndIdx); - - // If applicable copy a local file into internet. - sal_Bool CopyLocalFileToINet( String& rFileNm ); - - - // Stream-specific routines. Do not use in storage-writer! - - // Optimizing output on stream. - SvStream& OutLong( SvStream& rStrm, long nVal ); - SvStream& OutULong( SvStream& rStrm, sal_uLong nVal ); - - inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); } - inline SvStream& OutULong( sal_uLong nVal ) { return OutULong( Strm(), nVal ); } - - void SetStream(SvStream *const pStream); - SvStream& Strm(); - - void SetOrganizerMode( sal_Bool bSet ) { bOrganizerMode = bSet; } -}; - -#ifndef SW_DECL_WRITER_DEFINED -#define SW_DECL_WRITER_DEFINED -SV_DECL_REF(Writer) -#endif -SV_IMPL_REF(Writer) - -// Base class for all storage writers. -class SW_DLLPUBLIC StgWriter : public Writer -{ -protected: - String aFltName; - SotStorageRef pStg; - com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg; - - // Create error at call. - virtual sal_uLong WriteStream(); - virtual sal_uLong WriteStorage() = 0; - virtual sal_uLong WriteMedium( SfxMedium& ) = 0; - - using Writer::Write; - -public: - StgWriter() : Writer() {} - - virtual sal_Bool IsStgWriter() const; - - virtual sal_uLong Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 ); - virtual sal_uLong Write( SwPaM&, SotStorage&, const String* = 0 ); - - SotStorage& GetStorage() const { return *pStg; } -}; - - -// Interface class for general access on special writers. - -class SwWriter -{ - SvStream* pStrm; - SotStorageRef pStg; - com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg; - SfxMedium* pMedium; - - SwPaM* pOutPam; - SwCrsrShell *pShell; - SwDoc &rDoc; - - sal_Bool bWriteAll; - -public: - sal_uLong Write( WriterRef& rxWriter, const String* = 0); - - SwWriter( SvStream&, SwCrsrShell &,sal_Bool bWriteAll = sal_False ); - SwWriter( SvStream&, SwDoc & ); - SwWriter( SvStream&, SwPaM &, sal_Bool bWriteAll = sal_False ); - - SwWriter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, SwDoc& ); - - SwWriter( SfxMedium&, SwCrsrShell &,sal_Bool bWriteAll = sal_False ); - SwWriter( SfxMedium&, SwDoc & ); -}; - - - -typedef Reader* (*FnGetReader)(); -typedef void (*FnGetWriter)(const String&, const String& rBaseURL, WriterRef&); -sal_uLong SaveOrDelMSVBAStorage( SfxObjectShell&, SotStorage&, sal_Bool, const String& ); -sal_uLong GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS ); - -struct SwReaderWriterEntry -{ - Reader* pReader; - FnGetReader fnGetReader; - FnGetWriter fnGetWriter; - sal_Bool bDelReader; - - SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, sal_Bool bDel ) - : pReader( NULL ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel ) - {} - - /// Get access to the reader. - Reader* GetReader(); - - /// Get access to the writer. - void GetWriter( const String& rNm, const String& rBaseURL, WriterRef& xWrt ) const; -}; - -namespace SwReaderWriter -{ - /// Return reader based on ReaderWriterEnum. - Reader* GetReader( ReaderWriterEnum eReader ); - - /// Return reader based on the name. - Reader* GetReader( const String& rFltName ); - - /// Return writer based on the name. - void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xWrt ); -} - -void GetRTFWriter( const String&, const String&, WriterRef& ); -void GetASCWriter( const String&, const String&, WriterRef& ); -void GetHTMLWriter( const String&, const String&, WriterRef& ); -void GetXMLWriter( const String&, const String&, WriterRef& ); -void GetWW8Writer( const String&, const String&, WriterRef& ); - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx deleted file mode 100644 index 80f1235d76..0000000000 --- a/sw/inc/shellres.hxx +++ /dev/null @@ -1,120 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SHELLRES_HXX -#define _SHELLRES_HXX - - -#include <tools/string.hxx> - -#include <vcl/bitmap.hxx> - -#ifndef _SVSTDARR_HXX -#define _SVSTDARR_STRINGSDTOR -#include <svl/svstdarr.hxx> -#endif - -struct SW_DLLPUBLIC ShellResource : public Resource -{ - String aPostItAuthor; - String aPostItPage; - String aPostItLine; - - // Calc error-strings. - String aCalc_Syntax; - String aCalc_ZeroDiv; - String aCalc_Brack; - String aCalc_Pow; - String aCalc_VarNFnd; - String aCalc_Overflow; - String aCalc_WrongTime; - String aCalc_Default; - String aCalc_Error; - - // For GetRefField - up/down. - String aGetRefFld_Up; - String aGetRefFld_Down; - // For GetRefField - referenced item not found. - String aGetRefFld_RefItemNotFound; - // For dynamic menu - string "all". - String aStrAllPageHeadFoot; - // For some list boxes - string "none" - String aStrNone; - // For fixed fields. - String aFixedStr; - // Custom fields of type css::util::Duration. - String sDurationFormat; - - //Names of TOXs. - String aTOXIndexName; - String aTOXUserName; - String aTOXContentName; - String aTOXIllustrationsName; - String aTOXObjectsName; - String aTOXTablesName; - String aTOXAuthoritiesName; - - String aHyperlinkClick; - - SvStringsDtor aDocInfoLst; - - // The autoFormat-Redline comments. - inline const SvStringsDtor& GetAutoFmtNameLst() const; - - enum PageNameMode - { - NORMAL_PAGE, - FIRST_PAGE, - FOLLOW_PAGE - }; - // Returns for the specific filter the new names of pagedescs - // This method is for the old code of the specific filters with - // now localized names. - String GetPageDescName( sal_uInt16 nNo, PageNameMode eMode ); - - ShellResource(); - ~ShellResource(); - -private: - void _GetAutoFmtNameLst() const; - SvStringsDtor *pAutoFmtNameLst; - String sPageDescFirstName; - String sPageDescFollowName; - String sPageDescName; -}; - -inline const SvStringsDtor& ShellResource::GetAutoFmtNameLst() const -{ - if( !pAutoFmtNameLst ) - _GetAutoFmtNameLst(); - return *pAutoFmtNameLst; -} - - -#endif //_SHELLRES_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/sortopt.hxx b/sw/inc/sortopt.hxx deleted file mode 100644 index 12066e2db1..0000000000 --- a/sw/inc/sortopt.hxx +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SORTOPT_HXX -#define _SORTOPT_HXX - - -#include <svl/svarray.hxx> -#include <tools/string.hxx> -#include "swdllapi.h" - -enum SwSortOrder { SRT_ASCENDING, SRT_DESCENDING }; -enum SwSortDirection { SRT_COLUMNS, SRT_ROWS }; - - -struct SW_DLLPUBLIC SwSortKey -{ - SwSortKey(); - SwSortKey( sal_uInt16 nId, const String& rSrtType, SwSortOrder eOrder ); - SwSortKey( const SwSortKey& rOld ); - - String sSortType; - SwSortOrder eSortOrder; - sal_uInt16 nColumnId; - sal_Bool bIsNumeric; -}; - -SV_DECL_PTRARR(SwSortKeys, SwSortKey*, 3, 1) - -struct SW_DLLPUBLIC SwSortOptions -{ - SwSortOptions(); - ~SwSortOptions(); - SwSortOptions(const SwSortOptions& rOpt); - - SwSortKeys aKeys; - SwSortDirection eDirection; - sal_Unicode cDeli; - sal_uInt16 nLanguage; - sal_Bool bTable; - sal_Bool bIgnoreCase; -}; - -#endif // _SORTOPT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx deleted file mode 100644 index 678a8d336b..0000000000 --- a/sw/inc/splargs.hxx +++ /dev/null @@ -1,183 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SPLARGS_HXX -#define _SPLARGS_HXX - -#include <i18npool/lang.h> -#include <tools/solar.h> -#include <tools/gen.hxx> -#include <limits.h> // USHRT_MAX -#include <tools/string.hxx> - -class SwTxtNode; -class SwIndex; -class SpellCheck; -class Font; -#include <com/sun/star/linguistic2/XSpellAlternatives.hpp> -#include <com/sun/star/linguistic2/XSpellChecker1.hpp> -#include <com/sun/star/linguistic2/XHyphenatedWord.hpp> - -/************************************************************************* - * struct SwArgsBase - *************************************************************************/ - - -struct SwArgsBase // used for text conversion (Hangul/Hanja, ...) -{ - SwTxtNode *pStartNode; - SwIndex *pStartIdx; - SwTxtNode *pEndNode; - SwIndex *pEndIdx; - - SwArgsBase( - SwTxtNode* pStart, SwIndex& rStart, - SwTxtNode* pEnd, SwIndex& rEnd ) - : pStartNode( pStart ), pStartIdx( &rStart ), - pEndNode( pEnd ), pEndIdx( &rEnd ) - {} - - void SetStart(SwTxtNode* pStart, SwIndex& rStart ) - { - pStartNode = pStart; pStartIdx = &rStart ; - } - - void SetEnd( SwTxtNode* pEnd, SwIndex& rEnd ) - { - pEndNode = pEnd; pEndIdx = &rEnd ; - } -}; - -/************************************************************************* - * struct SwConversionArgs - * used for text conversion (Hangul/Hanja, Simplified/Traditional Chinese, ...) - *************************************************************************/ - -struct SwConversionArgs : SwArgsBase -{ - rtl::OUString aConvText; // convertible text found - LanguageType nConvSrcLang; // (source) language to look for - LanguageType nConvTextLang; // language of aConvText (if the latter one was found) - - // used for chinese translation - LanguageType nConvTargetLang; // target language of text to be changed - const Font *pTargetFont; // target font of text to be changed - // explicitly enables or disables application of the above two - sal_Bool bAllowImplicitChangesForNotConvertibleText; - - SwConversionArgs( LanguageType nLang, - SwTxtNode* pStart, SwIndex& rStart, - SwTxtNode* pEnd, SwIndex& rEnd ) - : SwArgsBase( pStart, rStart, pEnd, rEnd ), - nConvSrcLang( nLang ), - nConvTextLang( LANGUAGE_NONE ), - nConvTargetLang( LANGUAGE_NONE ), - pTargetFont( NULL ), - bAllowImplicitChangesForNotConvertibleText( sal_False ) - {} -}; - -/************************************************************************* - * struct SwSpellArgs - *************************************************************************/ - -struct SwSpellArgs : SwArgsBase -{ - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XSpellChecker1 > xSpeller; - - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XSpellAlternatives > xSpellAlt; - - bool bIsGrammarCheck; - - SwSpellArgs(::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XSpellChecker1 > &rxSplChk, - SwTxtNode* pStart, SwIndex& rStart, - SwTxtNode* pEnd, SwIndex& rEnd, - bool bGrammar ) - : SwArgsBase( pStart, rStart, pEnd, rEnd ), - xSpeller( rxSplChk ), - bIsGrammarCheck( bGrammar ) - {} -}; - -/************************************************************************* - * class SwInterHyphInfo - *************************************************************************/ - -// Parameter-class for Hyphenate. -// docedt.cxx: SwDoc::Hyphenate() -// txtedt.cxx: SwTxtNode::Hyphenate() -// txthyph.cxx: SwTxtFrm::Hyphenate() - -class SwInterHyphInfo -{ - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XHyphenatedWord > xHyphWord; - const Point aCrsrPos; - sal_Bool bAuto : 1; - sal_Bool bNoLang : 1; - sal_Bool bCheck : 1; -public: - xub_StrLen nStart; - xub_StrLen nLen; - xub_StrLen nWordStart; - xub_StrLen nWordLen; - xub_StrLen nHyphPos; - sal_uInt16 nMinTrail; - - inline SwInterHyphInfo( const Point &rCrsrPos, - const sal_uInt16 nStartPos = 0, - const sal_uInt16 nLength = USHRT_MAX ) - : aCrsrPos( rCrsrPos ), - bAuto(sal_False), bNoLang(sal_False), bCheck(sal_False), - nStart(nStartPos), nLen(nLength), - nWordStart(0), nWordLen(0), - nHyphPos(0), nMinTrail(0) - { } - inline xub_StrLen GetEnd() const - { return STRING_LEN == nLen ? nLen : nStart + nLen; } - inline const Point *GetCrsrPos() const - { return aCrsrPos.X() || aCrsrPos.Y() ? &aCrsrPos : 0; } - inline sal_Bool IsCheck() const { return bCheck; } - inline void SetCheck( const sal_Bool bNew ) { bCheck = bNew; } - inline void SetNoLang( const sal_Bool bNew ) { bNoLang = bNew; } - - inline void - SetHyphWord(const ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XHyphenatedWord > &rxHW) - { xHyphWord = rxHW; } - inline ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XHyphenatedWord > - GetHyphWord() { return xHyphWord; } -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/statstr.hrc b/sw/inc/statstr.hrc deleted file mode 100644 index 84e58fa582..0000000000 --- a/sw/inc/statstr.hrc +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _STATSTR_HRC -#define _STATSTR_HRC - -#include "rcid.hrc" - -#define STR_STATSTR_W4WREAD (RC_STATLIN_STR + 0) -#define STR_STATSTR_W4WWRITE (RC_STATLIN_STR + 1) -#define STR_STATSTR_SWGREAD (RC_STATLIN_STR + 2) -#define STR_STATSTR_SWGWRITE (RC_STATLIN_STR + 3) -#define STR_STATSTR_REFORMAT (RC_STATLIN_STR + 4) -#define STR_STATSTR_AUTOFORMAT (RC_STATLIN_STR + 5) -#define STR_STATSTR_IMPGRF (RC_STATLIN_STR + 6) -#define STR_STATSTR_SEARCH (RC_STATLIN_STR + 7) -#define STR_STATSTR_FORMAT (RC_STATLIN_STR + 8) -#define STR_STATSTR_PRINT (RC_STATLIN_STR + 9) -#define STR_STATSTR_LAYOUTINIT (RC_STATLIN_STR + 10) -#define STR_STATSTR_LETTER (RC_STATLIN_STR + 11) -#define STR_STATSTR_SPELL (RC_STATLIN_STR + 12) -#define STR_STATSTR_HYPHEN (RC_STATLIN_STR + 13) -#define STR_STATSTR_TOX_INSERT (RC_STATLIN_STR + 14) -#define STR_STATSTR_TOX_UPDATE (RC_STATLIN_STR + 15) -#define STR_STATSTR_SUMMARY (RC_STATLIN_STR + 16) -#define STR_STATSTR_SWGPRTOLENOTIFY (RC_STATLIN_STR + 17) - -#endif - - - diff --git a/sw/inc/stringhash.hxx b/sw/inc/stringhash.hxx deleted file mode 100644 index fcdc1d6094..0000000000 --- a/sw/inc/stringhash.hxx +++ /dev/null @@ -1,107 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _STRINGHASH_HXX -#define _STRINGHASH_HXX - -#include <tools/string.hxx> - -struct StringEq -{ - sal_Bool operator() ( const String *r1, - const String *r2) const - { - return r1->Equals(*r2); - } -}; - -struct StringEqRef -{ - sal_Bool operator() (const String &r1, const String &r2) const - { - return r1.Equals(r2); - } -}; - -struct StringHash -{ - size_t operator() ( const String *rString) const - { - sal_Int32 h, nLen; - h = nLen = rString->Len(); - const sal_Unicode *pStr = rString->GetBuffer(); - - if ( nLen < 16 ) - while ( nLen-- > 0 ) - h = (h*37) + *(pStr++); - else - { - sal_Int32 nSkip; - const sal_Unicode* pEndStr = pStr+nLen-5; - - /* only sample some characters */ - /* the first 3, some characters between, and the last 5 */ - h = (h*39) + *(pStr++); - h = (h*39) + *(pStr++); - h = (h*39) + *(pStr++); - - nSkip = nLen / nLen < 32 ? 4 : 8; - nLen -= 8; - while ( nLen > 0 ) - { - h = (h*39) + ( *pStr ); - pStr += nSkip; - nLen -= nSkip; - } - - h = (h*39) + *(pEndStr++); - h = (h*39) + *(pEndStr++); - h = (h*39) + *(pEndStr++); - h = (h*39) + *(pEndStr++); - h = (h*39) + *(pEndStr++); - } - return h; - } - - size_t operator() (const String & rStr) const - { - return (*this)(&rStr); - } -}; - -struct StringHashRef -{ - size_t operator () (const String &rStr) const - { - StringHash aStrHash; - - return aStrHash(&rStr); - } -}; -#endif // _STRINGHASH_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/sw_primitivetypes2d.hxx b/sw/inc/sw_primitivetypes2d.hxx deleted file mode 100644 index 5c03627704..0000000000 --- a/sw/inc/sw_primitivetypes2d.hxx +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 INCLUDED_SW_PRIMITIVETYPES2D_HXX -#define INCLUDED_SW_PRIMITIVETYPES2D_HXX - -#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> - -////////////////////////////////////////////////////////////////////////////// - -#define PRIMITIVE2D_ID_SWVIRTFLYDRAWOBJPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SW| 0) -#define PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 1) -#define PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 2) - -////////////////////////////////////////////////////////////////////////////// - -#endif // INCLUDED_SW_PRIMITIVETYPES2D_HXX - -////////////////////////////////////////////////////////////////////////////// -// eof - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx deleted file mode 100644 index 2902fc4202..0000000000 --- a/sw/inc/swabstdlg.hxx +++ /dev/null @@ -1,504 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_ABSTDLG_HXX -#define _SW_ABSTDLG_HXX - - -#include <tools/solar.h> -#include <tools/string.hxx> -#include <sfx2/sfxdlg.hxx> -#include <svx/svxdlg.hxx> -#include <vcl/syswin.hxx> -#include <globals.hrc> -#include <com/sun/star/uno/Reference.h> -#include <com/sun/star/uno/Sequence.h> -#include <com/sun/star/frame/XModel.hpp> -#include <com/sun/star/frame/XController.hpp> -#include <com/sun/star/text/XTextCursor.hpp> -#include <com/sun/star/container/XNameAccess.hpp> -#include <com/sun/star/awt/XControl.hpp> -#include <com/sun/star/container/XNamed.hpp> -#include "swunodef.hxx" -#include "itabenum.hxx" - -class SfxViewFrame; -class SfxBindings; -class SfxItemSet; -class ResId; -class Window; -class String; -class SfxItemPool; -class SfxStyleSheetBase; -class SwGlossaryHdl; -class SwField; - -class SwLabFmtPage; -class SwLabRec; -class SwAsciiOptions; -class SwDocShell; -class SvStream; -class SwWrtShell; -class SfxRequest; -class SwView; -class SwTableAutoFmt; -class SwTOXMgr; -class SwForm; -struct CurTOXType; -class SwTOXDescription; -class SwTOXBase; -class SwSectionData; -struct SwDBData; -class SwField; -class Printer; -class SwLabItem; -class SwNewDBMgr; -class SwTableFUNC; -class SwChildWinWrapper; -struct SfxChildWinInfo; -class SwTOXMark; -struct SwDocStat; -#include <cnttab.hxx> //add for struct CurTOXType - -namespace com{namespace sun{namespace star{ - namespace frame{ - class XFrame; - } - namespace sdbcx{ - class XColumnsSupplier; - } - namespace sdbc{ - class XDataSource; - class XConnection; - class XResultSet; - } -}}} - -typedef void (*SwLabDlgMethod) (::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& xModel, const SwLabItem& rItem); - -typedef String (*GlossaryGetCurrGroup)(); -typedef void (*GlossarySetActGroup)(const String& rNewGroup); - -class AbstractGlossaryDlg : public VclAbstractDialog //add for SwGlossaryDlg -{ -public: - virtual String GetCurrGrpName() const = 0; - virtual String GetCurrShortName() const = 0; -}; - -class AbstractFldInputDlg : public VclAbstractDialog //add for SwFldInputDlg -{ -public: - //from class SalFrame - virtual void SetWindowState( const ByteString& rStr ) = 0; - virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const = 0; -}; - -class AbstractInsFootNoteDlg : public VclAbstractDialog //add for SwInsFootNoteDlg -{ -public: - virtual String GetFontName() = 0; - virtual sal_Bool IsEndNote() = 0; - virtual String GetStr() = 0; - //from class Window - virtual void SetHelpId( const rtl::OString& sHelpId ) = 0; - virtual void SetText( const XubString& rStr ) = 0; -}; - -class AbstractInsertGrfRulerDlg : public VclAbstractDialog //add for SwInsertGrfRulerDlg -{ -public: - virtual String GetGraphicName() = 0; - virtual sal_Bool IsSimpleLine() = 0; - virtual sal_Bool HasImages() const = 0; -}; - -class AbstractInsTableDlg : public VclAbstractDialog //add for SwInsTableDlg -{ -public: - virtual void GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol, - SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName, - SwTableAutoFmt *& prTAFmt ) = 0; -}; - -class AbstractJavaEditDialog : public VclAbstractDialog //add for SwJavaEditDialog -{ -public: - virtual String GetText() = 0; - virtual String GetType() = 0; - virtual sal_Bool IsUrl() = 0; - virtual sal_Bool IsNew() = 0; - virtual sal_Bool IsUpdate() = 0; -}; - -class AbstractMailMergeDlg : public VclAbstractDialog //add for SwMailMergeDlg -{ -public: - virtual sal_uInt16 GetMergeType() = 0; - virtual const ::rtl::OUString& GetSaveFilter() const = 0; - virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const = 0; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const = 0; - virtual bool IsSaveIndividualDocs() const = 0; - virtual bool IsGenerateFromDataBase() const = 0; - virtual String GetColumnName() const = 0; - virtual String GetPath() const = 0; - -}; -class AbstractMailMergeCreateFromDlg : public VclAbstractDialog //add for SwMailMergeCreateFromDlg -{ -public: - virtual sal_Bool IsThisDocument() const = 0; -}; -class AbstractMailMergeFieldConnectionsDlg : public VclAbstractDialog //add for SwMailMergeFieldConnectionsDlg -{ -public: - virtual sal_Bool IsUseExistingConnections() const = 0; -}; - -class AbstractMultiTOXTabDialog : public VclAbstractDialog //add for SwMultiTOXTabDialog -{ -public: - virtual SwForm* GetForm(CurTOXType eType) = 0; - virtual CurTOXType GetCurrentTOXType() const = 0; - virtual SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes) = 0; - //from SfxTabDialog - virtual const SfxItemSet* GetOutputItemSet() const = 0; -}; - -class AbstractEditRegionDlg : public VclAbstractDialog //add for SwEditRegionDlg -{ -public: - virtual void SelectSection(const String& rSectionName) = 0; -}; -class AbstractInsertSectionTabDialog : public VclAbstractDialog //add for SwInsertSectionTabDialog -{ -public: - virtual void SetSectionData(SwSectionData const& rSect) = 0; -}; - -class AbstractSwWordCountDialog : public VclAbstractDialog -{ -public: - virtual void SetValues(const SwDocStat& rCurrent, const SwDocStat& rDoc) = 0; -}; - -class AbstractSwInsertAbstractDlg : public VclAbstractDialog // add for SwInsertAbstractDlg -{ -public: - virtual sal_uInt8 GetLevel() const = 0; - virtual sal_uInt8 GetPara() const = 0; -}; - -class AbstractSwAsciiFilterDlg : public VclAbstractDialog // add for SwAsciiFilterDlg -{ -public: - virtual void FillOptions( SwAsciiOptions& rOptions ) = 0; - -}; - -class AbstractSwBreakDlg : public VclAbstractDialog // add for SwBreakDlg -{ -public: - virtual String GetTemplateName() = 0; - virtual sal_uInt16 GetKind() = 0; - virtual sal_uInt16 GetPageNumber() = 0; - -}; - -class AbstractSplitTableDialog : public VclAbstractDialog // add for -{ -public: - virtual sal_uInt16 GetSplitMode() = 0; -}; - -class AbstractSwConvertTableDlg : public VclAbstractDialog // add for SwConvertTableDlg -{ -public: - virtual void GetValues( sal_Unicode& rDelim, - SwInsertTableOptions& rInsTblFlags, - SwTableAutoFmt *& prTAFmt ) = 0; -}; - -class AbstractSwInsertDBColAutoPilot : public VclAbstractDialog // add for SwInsertDBColAutoPilot -{ -public: - - virtual void DataToDoc( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rSelection, - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> rxSource, - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection, - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xResultSet) = 0; -}; - -class AbstractDropDownFieldDialog : public VclAbstractDialog //add for DropDownFieldDialog -{ -public: - virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const = 0; //this method inherit from SystemWindow - virtual void SetWindowState( const ByteString& rStr ) =0;//this method inherit from SystemWindow -}; - -class AbstractSwLabDlg : public SfxAbstractTabDialog //add for SwLabDlg -{ -public: - virtual const String& GetBusinessCardStr() const = 0; - virtual Printer *GetPrt() =0; -}; - -class AbstractSwSelGlossaryDlg : public VclAbstractDialog //add for SwSelGlossaryDlg -{ -public: - virtual void InsertGlos(const String &rRegion, const String &rGlosName) = 0; // inline - virtual sal_uInt16 GetSelectedIdx() const = 0; // inline - virtual void SelectEntryPos(sal_uInt16 nIdx) = 0; // inline -}; - -class AbstractSwSplitTableDlg :public VclAbstractDialog //add for SwSplitTableDlg -{ -public: - virtual sal_Bool IsHorizontal() const = 0; - virtual sal_Bool IsProportional() const = 0; - virtual long GetCount() const = 0; -}; - -class AbstractSwAutoFormatDlg : public VclAbstractDialog //add for SwAutoFormatDlg -{ -public: - virtual void FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const = 0; -}; - -class AbstractSwFldDlg : public SfxAbstractTabDialog //add for SwFldDlg -{ -public: - virtual void Start( sal_Bool bShow = sal_True ) = 0; //this method from sfxtabdialog - virtual void Initialize(SfxChildWinInfo *pInfo) = 0; - virtual void ReInitDlg() = 0; - virtual void ActivateDatabasePage() = 0; - virtual void ShowPage( sal_uInt16 nId ) = 0;// this method from SfxTabDialog - virtual Window * GetWindow() = 0; //this method is added for return a Window type pointer -}; - -class AbstractSwRenameXNamedDlg : public VclAbstractDialog //add for SwRenameXNamedDlg -{ -public: - virtual void SetForbiddenChars( const String& rSet ) = 0; - virtual void SetAlternativeAccess( - STAR_REFERENCE( container::XNameAccess ) & xSecond, - STAR_REFERENCE( container::XNameAccess ) & xThird ) = 0; -}; - -class AbstractSwModalRedlineAcceptDlg : public VclAbstractDialog //add for SwModalRedlineAcceptDlg -{ -public: - virtual void AcceptAll( sal_Bool bAccept ) = 0; -}; - -class AbstractMarkFloatDlg : public VclAbstractDialog //add for SwIndexMarkFloatDlg & SwAuthMarkFloatDlg -{ -public: - virtual void ReInitDlg(SwWrtShell& rWrtShell) = 0; - virtual Window * GetWindow() = 0; //this method is added for return a Window type pointer -}; - -#define RET_LOAD_DOC 100 -#define RET_EDIT_DOC 101 -#define RET_EDIT_RESULT_DOC 102 -#define RET_TARGET_CREATED 103 -#define RET_REMOVE_TARGET 104 -#define RET_APPLY_TEMPLATE 105 - -class SwView; -class SwMailMergeConfigItem; - -class AbstractMailMergeWizard : public VclAbstractDialog2 -{ -public: - virtual void SetReloadDocument(const String& rURL) = 0; - virtual const String& GetReloadDocument() const = 0; - virtual sal_Bool ShowPage( sal_uInt16 nLevel ) = 0; - virtual sal_uInt16 GetRestartPage() const = 0; -}; - - -// Swabstract fractory -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 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 - - virtual AbstractSwBreakDlg * CreateSwBreakDlg( Window *pParent, SwWrtShell &rSh,int nResId ) = 0; // add for SwBreakDlg - virtual VclAbstractDialog * CreateSwChangeDBDlg( SwView& rVw, int nResId ) = 0; //add for SwChangeDBDlg - virtual SfxAbstractTabDialog * CreateSwCharDlg( Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg - const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False) = 0; - virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg ( SwView& rView , int nResId, bool bToTable) = 0; //add for SwConvertTableDlg - virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId) = 0; //add for SwCaptionDialog - - virtual AbstractSwInsertDBColAutoPilot* CreateSwInsertDBColAutoPilot( SwView& rView, // add for SwInsertDBColAutoPilot - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> rxSource, - com::sun::star::uno::Reference<com::sun::star::sdbcx::XColumnsSupplier> xColSupp, - const SwDBData& rData, int nResId) = 0; - virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId) = 0;//add for SwFootNoteOptionDlg - - virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog - SwField* pField,int nResId, sal_Bool bNextButton = sal_False ) = 0; - virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert,int nResId ) = 0; //add for SwEnvDlg - - - virtual AbstractSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg - SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId ) = 0; - - virtual SwLabDlgMethod GetSwLabDlgStaticMethod () =0;//add for SwLabDlg - - virtual SfxAbstractTabDialog* CreateSwParaDlg ( Window *pParent, //add for SwParaDlg - SwView& rVw, - const SfxItemSet& rCoreSet, - sal_uInt8 nDialogMode, - int nResId, - const String *pCollName = 0, - sal_Bool bDraw = sal_False, - sal_uInt16 nDefPage = 0) = 0; - - virtual AbstractSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ) = 0; //add for SwSelGlossaryDlg - - virtual VclAbstractDialog * CreateVclAbstractDialog ( Window * pParent, SwWrtShell &rSh, int nResId ) = 0; //add for SwTableHeightDlg SwSortDlg - virtual AbstractSplitTableDialog * CreateSplitTblDialog ( Window * pParent, SwWrtShell &rSh ) = 0; //add for SwSplitTblDlg - - virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, //add for SwAutoFormatDlg - int nResId, - sal_Bool bSetAutoFmt = sal_True, - const SwTableAutoFmt* pSelFmt = 0 ) = 0; - virtual SfxAbstractDialog * CreateSwBorderDlg ( Window* pParent, SfxItemSet& rSet, sal_uInt16 nType, int nResId ) = 0;//add for SwBorderDlg - virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_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 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; - virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId ) = 0; //add for SwModalRedlineAcceptDlg - - virtual VclAbstractDialog* CreateSwVclDialog( int nResId, Window* pParent, sal_Bool& rWithPrev ) = 0; //add for SwMergeTblDlg - virtual SfxAbstractTabDialog* CreateFrmTabDialog( int nResId, - SfxViewFrame *pFrame, Window *pParent, - const SfxItemSet& rCoreSet, - sal_Bool bNewFrm = sal_True, - sal_uInt16 nResType = DLG_FRM_STD, - sal_Bool bFmt = sal_False, - sal_uInt16 nDefPage = 0, - const String* pFmtStr = 0) = 0; //add for SwFrmDlg - virtual SfxAbstractTabDialog* CreateTemplateDialog( int nResId, - Window* pParent, - SfxStyleSheetBase& rBase, - sal_uInt16 nRegion, - sal_Bool bColumn = sal_False, - SwWrtShell* pActShell = 0, - sal_Bool bNew = sal_False ) = 0; //add for SwTemplateDlg - virtual AbstractGlossaryDlg* CreateGlossaryDlg( int nResId, - SfxViewFrame* pViewFrame, - SwGlossaryHdl* pGlosHdl, - SwWrtShell *pWrtShell) = 0; //add for SwGlossaryDlg - virtual AbstractFldInputDlg* CreateFldInputDlg( int nResId, - Window *pParent, SwWrtShell &rSh, - SwField* pField, sal_Bool bNextButton = sal_False ) = 0; //add for SwFldInputDlg - virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId, - Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False) = 0; //add for SwInsFootNoteDlg - virtual VclAbstractDialog* CreateTitlePageDlg ( Window * pParent ) = 0; - virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId, - SwView& rView, sal_Bool bCol = sal_False ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg - virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId, - Window * pParent ) = 0; //add for SwInsertGrfRulerDlg - virtual AbstractInsTableDlg* CreateInsTableDlg( int nResId, - SwView& rView ) = 0; //add for SwInsTableDlg - virtual AbstractJavaEditDialog* CreateJavaEditDialog( int nResId, - Window* pParent, SwWrtShell* pWrtSh ) = 0; //add for SwJavaEditDialog - virtual AbstractMailMergeDlg* CreateMailMergeDlg( int nResId, - Window* pParent, SwWrtShell& rSh, - const String& rSourceName, - const String& rTblName, - sal_Int32 nCommandType, - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& xConnection, - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >* pSelection = 0 ) = 0; //add for SwMailMergeDlg - virtual AbstractMailMergeCreateFromDlg* CreateMailMergeCreateFromDlg( int nResId, - Window* pParent ) = 0; //add for SwMailMergeCreateFromDlg - virtual AbstractMailMergeFieldConnectionsDlg* CreateMailMergeFieldConnectionsDlg( int nResId, - Window* pParent ) = 0; //add for SwMailMergeFieldConnectionsDlg - virtual VclAbstractDialog* CreateMultiTOXMarkDlg( int nResId, - Window* pParent, SwTOXMgr &rTOXMgr ) = 0; //add for SwMultiTOXMarkDlg - virtual SfxAbstractTabDialog* CreateSwTabDialog( int nResId, - Window* pParent, - const SfxItemSet* pSwItemSet, - SwWrtShell &) = 0; //add for SwSvxNumBulletTabDialog, SwOutlineTabDialog - virtual AbstractMultiTOXTabDialog* CreateMultiTOXTabDialog( int nResId, - Window* pParent, const SfxItemSet& rSet, - SwWrtShell &rShell, - SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX, - sal_Bool bGlobal = sal_False) = 0; //add for SwMultiTOXTabDialog - virtual AbstractEditRegionDlg* CreateEditRegionDlg( int nResId, - Window* pParent, SwWrtShell& rWrtSh ) = 0; //add for SwEditRegionDlg - virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId, - Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh ) = 0; //add for SwInsertSectionTabDialog - virtual AbstractMarkFloatDlg* CreateIndexMarkFloatDlg( int nResId, - SfxBindings* pBindings, - SfxChildWindow* pChild, - Window *pParent, - SfxChildWinInfo* pInfo, - sal_Bool bNew=sal_True) = 0; //add for SwIndexMarkFloatDlg - virtual AbstractMarkFloatDlg* CreateAuthMarkFloatDlg( int nResId, - SfxBindings* pBindings, - SfxChildWindow* pChild, - Window *pParent, - SfxChildWinInfo* pInfo, - sal_Bool bNew=sal_True) = 0; //add for SwAuthMarkFloatDlg - virtual VclAbstractDialog * CreateIndexMarkModalDlg( int nResId, - Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark ) = 0; //add for SwIndexMarkModalDlg - - virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem) = 0; - - //add for static func in SwGlossaryDlg - virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( sal_uInt16 nId ) = 0; - virtual GlossarySetActGroup SetGlossaryActGroupFunc( sal_uInt16 nId ) = 0; - - // for tabpage - virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0; - virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) = 0; -}; - -#endif -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swacorr.hxx b/sw/inc/swacorr.hxx deleted file mode 100644 index af11eb4aa8..0000000000 --- a/sw/inc/swacorr.hxx +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWACORR_HXX -#define _SWACORR_HXX - -#include <editeng/svxacorr.hxx> - -#include <com/sun/star/uno/Reference.h> -#include <com/sun/star/embed/XStorage.hpp> - -class SwAutoCorrect : public SvxAutoCorrect -{ - using SvxAutoCorrect::PutText; - -protected: - // Return replacement text (only for SWG-format, all others can be obtained from wordlist!). - // rShort is stream-name - encrypted! - virtual sal_Bool GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& , const String& rFileName, const String& rShort, String& rLong ); - - // Text with attributes (only SWG-format!). - // rShort is stream-name - encrypted! - virtual sal_Bool PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFileName, const String& rShort, SfxObjectShell& , - String& ); - -public: - TYPEINFO(); - - SwAutoCorrect( const SvxAutoCorrect& rACorr ); - virtual ~SwAutoCorrect(); -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx deleted file mode 100644 index bebda02aef..0000000000 --- a/sw/inc/swatrset.hxx +++ /dev/null @@ -1,348 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWATRSET_HXX -#define _SWATRSET_HXX -#include <tools/solar.h> -#include <tools/mempool.hxx> -#include <svl/itemset.hxx> -#include <svl/itempool.hxx> -#include <swdllapi.h> - -class SwModify; -class SwDoc; -class OutputDevice; -class IDocumentSettingAccess; -class SfxBoolItem; -class SvxPostureItem; -class SvxWeightItem; -class SvxShadowedItem; -class SvxAutoKernItem; -class SvxWordLineModeItem; -class SvxContourItem; -class SvxKerningItem; -class SvxUnderlineItem; -class SvxOverlineItem; -class SvxCrossedOutItem; -class SvxFontHeightItem; -class SvxPropSizeItem; -class SvxFontItem; -class SvxColorItem; -class SvxCharSetColorItem; -class SvxLanguageItem; -class SvxEscapementItem; -class SvxCaseMapItem; -class SvxNoHyphenItem; -class SvxBlinkItem; -class SvxEmphasisMarkItem; -class SvxTwoLinesItem; -class SvxCharScaleWidthItem; -class SvxCharRotateItem; -class SvxCharReliefItem; -class SvxCharHiddenItem; - -// Frame attributes -class SwFmtFillOrder; -class SwFmtFrmSize; -class SvxPaperBinItem; -class SvxLRSpaceItem; -class SvxULSpaceItem; -class SwFmtCntnt; -class SwFmtHeader; -class SwFmtFooter; -class SvxPrintItem; -class SvxOpaqueItem; -class SvxProtectItem; -class SwFmtSurround; -class SwFmtVertOrient; -class SwFmtHoriOrient; -class SwFmtAnchor; -class SvxBoxItem; -class SvxBrushItem; -class SvxShadowItem; -class SwFmtPageDesc; -class SvxFmtBreakItem; -class SwFmtCol; -class SvxMacroItem; -class SvxFmtKeepItem; -class SwFmtURL; -class SwFmtLineNumber; -class SwFmtEditInReadonly; -class SwFmtLayoutSplit; -class SwFmtRowSplit; -class SwFmtChain; -class SwFmtFtnAtTxtEnd; -class SwFmtEndAtTxtEnd; -class SwFmtNoBalancedColumns; -class SvxFrameDirectionItem; -class SwTextGridItem; -class SwHeaderAndFooterEatSpacingItem; -class SwFmtFollowTextFlow; -class SwFmtWrapInfluenceOnObjPos; - -// Graphic attributes -class SwMirrorGrf; -class SwCropGrf; -class SwRotationGrf; -class SwLuminanceGrf; -class SwContrastGrf; -class SwChannelRGrf; -class SwChannelGGrf; -class SwChannelBGrf; -class SwGammaGrf; -class SwInvertGrf; -class SwTransparencyGrf; -class SwDrawModeGrf; - -// Paragraph attributes -class SvxLineSpacingItem; -class SvxAdjustItem; -class SvxFmtSplitItem; -class SwRegisterItem; -class SwNumRuleItem; -class SvxWidowsItem; -class SvxOrphansItem; -class SvxTabStopItem; -class SvxHyphenZoneItem; -class SwFmtDrop; -class SvxScriptSpaceItem; -class SvxHangingPunctuationItem; -class SvxForbiddenRuleItem; -class SvxParaVertAlignItem; -class SvxParaGridItem; -class SwParaConnectBorderItem; - -// TableBox attributes -class SwTblBoxNumFormat; -class SwTblBoxFormula; -class SwTblBoxValue; - -class SwAttrPool : public SfxItemPool -{ - friend void _InitCore(); // For creating/deleting of version maps. - friend void _FinitCore(); - static sal_uInt16* pVersionMap1; - static sal_uInt16* pVersionMap2; - static sal_uInt16* pVersionMap3; - static sal_uInt16* pVersionMap4; - // due to extension of attribute set a new version - // map for binary filter is necessary (version map 5). - static sal_uInt16* pVersionMap5; - static sal_uInt16* pVersionMap6; - - SwDoc* pDoc; - -public: - SwAttrPool( SwDoc* pDoc ); -protected: - virtual ~SwAttrPool(); -public: - - SwDoc* GetDoc() { return pDoc; } - const SwDoc* GetDoc() const { return pDoc; } - - static sal_uInt16* GetVersionMap1() { return pVersionMap1; } - static sal_uInt16* GetVersionMap2() { return pVersionMap2; } - static sal_uInt16* GetVersionMap3() { return pVersionMap3; } - static sal_uInt16* GetVersionMap6() { return pVersionMap4; } -}; - - -class SW_DLLPUBLIC SwAttrSet : public SfxItemSet -{ - // Pointer for Modify-System - SwAttrSet *pOldSet, *pNewSet; - - // Notification-Callback - virtual void Changed( const SfxPoolItem& rOld, const SfxPoolItem& rNew ); - - void PutChgd( const SfxPoolItem& rI ) { SfxItemSet::PutDirect( rI ); } -public: - SwAttrSet( SwAttrPool&, sal_uInt16 nWhich1, sal_uInt16 nWhich2 ); - SwAttrSet( SwAttrPool&, const sal_uInt16* nWhichPairTable ); - SwAttrSet( const SwAttrSet& ); - - virtual SfxItemSet* Clone(sal_Bool bItems = sal_True, SfxItemPool *pToPool = 0) const; - - int Put_BC( const SfxPoolItem& rAttr, SwAttrSet* pOld, SwAttrSet* pNew ); - int Put_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew ); - - // Delete an item or a range. - sal_uInt16 ClearItem_BC( sal_uInt16 nWhich, SwAttrSet* pOld, SwAttrSet* pNew ); - sal_uInt16 ClearItem_BC( sal_uInt16 nWhich1, sal_uInt16 nWhich2, - SwAttrSet* pOld = 0, SwAttrSet* pNew = 0 ); - - int Intersect_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew ); - - void GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const; - - SwAttrPool* GetPool() const { return (SwAttrPool*)SfxItemSet::GetPool(); } - - // Copy attributes, if necessary across documents. - void CopyToModify( SwModify& rMod ) const; - - // Special treatment for some attributes. - // Set Modify-pointer (the old pDefinedIn) at the following attributes: - // - SwFmtDropCaps - // - SwFmtPageDesc - // (Is called at insert in formats/nodes.) - // Second version is for the SwAttrSet handles of SwCntntNode. - bool SetModifyAtAttr( const SwModify* pModify ); - - // Document is set at SwAttrPool. Therefore it is always accessible. - const SwDoc *GetDoc() const { return GetPool()->GetDoc(); } - SwDoc *GetDoc() { return GetPool()->GetDoc(); } - - // Get methods: bool indicates whether to search only in Set (sal_False) - // or also in parents. If nothing is found then default attribute is returned. - // Character attributes. Implementation in charatr.hxx. - inline const SvxPostureItem &GetPosture( sal_Bool = sal_True ) const; - inline const SvxWeightItem &GetWeight( sal_Bool = sal_True ) const; - inline const SvxShadowedItem &GetShadowed( sal_Bool = sal_True ) const; - inline const SvxAutoKernItem &GetAutoKern( sal_Bool = sal_True ) const; - inline const SvxWordLineModeItem &GetWordLineMode( sal_Bool = sal_True ) const; - inline const SvxContourItem &GetContour( sal_Bool = sal_True ) const; - inline const SvxKerningItem &GetKerning( sal_Bool = sal_True ) const; - inline const SvxUnderlineItem &GetUnderline( sal_Bool = sal_True ) const; - inline const SvxOverlineItem &GetOverline( sal_Bool = sal_True ) const; - inline const SvxCrossedOutItem &GetCrossedOut( sal_Bool = sal_True ) const; - inline const SvxFontHeightItem &GetSize( sal_Bool = sal_True ) const; - inline const SvxPropSizeItem &GetPropSize( sal_Bool = sal_True ) const; - inline const SvxFontItem &GetFont( sal_Bool = sal_True ) const; - inline const SvxColorItem &GetColor( sal_Bool = sal_True ) const; - inline const SvxCharSetColorItem &GetCharSetColor( sal_Bool = sal_True ) const; - inline const SvxLanguageItem &GetLanguage( sal_Bool = sal_True ) const; - inline const SvxEscapementItem &GetEscapement( sal_Bool = sal_True ) const; - inline const SvxCaseMapItem &GetCaseMap( sal_Bool = sal_True ) const; - inline const SvxNoHyphenItem &GetNoHyphenHere( sal_Bool = sal_True ) const; - inline const SvxBlinkItem &GetBlink( sal_Bool = sal_True ) const; - inline const SvxBrushItem &GetChrBackground( sal_Bool = sal_True ) const; - inline const SvxFontItem &GetCJKFont( sal_Bool = sal_True ) const; - inline const SvxFontHeightItem &GetCJKSize( sal_Bool = sal_True ) const; - inline const SvxLanguageItem &GetCJKLanguage( sal_Bool = sal_True ) const; - inline const SvxPostureItem &GetCJKPosture( sal_Bool = sal_True ) const; - inline const SvxWeightItem &GetCJKWeight( sal_Bool = sal_True ) const; - inline const SvxFontItem &GetCTLFont( sal_Bool = sal_True ) const; - inline const SvxFontHeightItem &GetCTLSize( sal_Bool = sal_True ) const; - inline const SvxLanguageItem &GetCTLLanguage( sal_Bool = sal_True ) const; - inline const SvxPostureItem &GetCTLPosture( sal_Bool = sal_True ) const; - inline const SvxWeightItem &GetCTLWeight( sal_Bool = sal_True ) const; - inline const SfxBoolItem &GetWritingDirection( sal_Bool = sal_True ) const; - inline const SvxEmphasisMarkItem &GetEmphasisMark( sal_Bool = sal_True ) const; - inline const SvxTwoLinesItem &Get2Lines( sal_Bool = sal_True ) const; - inline const SvxCharScaleWidthItem &GetCharScaleW( sal_Bool = sal_True ) const; - inline const SvxCharRotateItem &GetCharRotate( sal_Bool = sal_True ) const; - inline const SvxCharReliefItem &GetCharRelief( sal_Bool = sal_True ) const; - inline const SvxCharHiddenItem &GetCharHidden( sal_Bool = sal_True ) const; - - // Frame attributes. Implementation in frmatr.hxx. - inline const SwFmtFillOrder &GetFillOrder( sal_Bool = sal_True ) const; - inline const SwFmtFrmSize &GetFrmSize( sal_Bool = sal_True ) const; - inline const SvxPaperBinItem &GetPaperBin( sal_Bool = sal_True ) const; - inline const SvxLRSpaceItem &GetLRSpace( sal_Bool = sal_True ) const; - inline const SvxULSpaceItem &GetULSpace( sal_Bool = sal_True ) const; - inline const SwFmtCntnt &GetCntnt( sal_Bool = sal_True ) const; - inline const SwFmtHeader &GetHeader( sal_Bool = sal_True ) const; - inline const SwFmtFooter &GetFooter( sal_Bool = sal_True ) const; - inline const SvxPrintItem &GetPrint( sal_Bool = sal_True ) const; - inline const SvxOpaqueItem &GetOpaque( sal_Bool = sal_True ) const; - inline const SvxProtectItem &GetProtect( sal_Bool = sal_True ) const; - inline const SwFmtSurround &GetSurround( sal_Bool = sal_True ) const; - inline const SwFmtVertOrient &GetVertOrient( sal_Bool = sal_True ) const; - inline const SwFmtHoriOrient &GetHoriOrient( sal_Bool = sal_True ) const; - inline const SwFmtAnchor &GetAnchor( sal_Bool = sal_True ) const; - inline const SvxBoxItem &GetBox( sal_Bool = sal_True ) const; - inline const SvxFmtKeepItem &GetKeep( sal_Bool = sal_True ) const; - inline const SvxBrushItem &GetBackground( sal_Bool = sal_True ) const; - inline const SvxShadowItem &GetShadow( sal_Bool = sal_True ) const; - inline const SwFmtPageDesc &GetPageDesc( sal_Bool = sal_True ) const; - inline const SvxFmtBreakItem &GetBreak( sal_Bool = sal_True ) const; - inline const SwFmtCol &GetCol( sal_Bool = sal_True ) const; - inline const SvxMacroItem &GetMacro( sal_Bool = sal_True ) const; - inline const SwFmtURL &GetURL( sal_Bool = sal_True ) const; - inline const SwFmtEditInReadonly &GetEditInReadonly( sal_Bool = sal_True ) const; - inline const SwFmtLayoutSplit &GetLayoutSplit( sal_Bool = sal_True ) const; - inline const SwFmtRowSplit &GetRowSplit( sal_Bool = sal_True ) const; - inline const SwFmtChain &GetChain( sal_Bool = sal_True ) const; - inline const SwFmtLineNumber &GetLineNumber( sal_Bool = sal_True ) const; - inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( sal_Bool = sal_True ) const; - inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( sal_Bool = sal_True ) const; - inline const SwFmtNoBalancedColumns &GetBalancedColumns( sal_Bool = sal_True ) const; - inline const SvxFrameDirectionItem &GetFrmDir( sal_Bool = sal_True ) const; - inline const SwTextGridItem &GetTextGrid( sal_Bool = sal_True ) const; - inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( sal_Bool = sal_True ) const; - inline const SwFmtFollowTextFlow &GetFollowTextFlow(sal_Bool = sal_True) const; - inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(sal_Bool = sal_True) const; - - // Graphic attributes - implementation in grfatr.hxx - inline const SwMirrorGrf &GetMirrorGrf( sal_Bool = sal_True ) const; - inline const SwCropGrf &GetCropGrf( sal_Bool = sal_True ) const; - inline const SwRotationGrf &GetRotationGrf(sal_Bool = sal_True ) const; - inline const SwLuminanceGrf &GetLuminanceGrf(sal_Bool = sal_True ) const; - inline const SwContrastGrf &GetContrastGrf(sal_Bool = sal_True ) const; - inline const SwChannelRGrf &GetChannelRGrf(sal_Bool = sal_True ) const; - inline const SwChannelGGrf &GetChannelGGrf(sal_Bool = sal_True ) const; - inline const SwChannelBGrf &GetChannelBGrf(sal_Bool = sal_True ) const; - inline const SwGammaGrf &GetGammaGrf(sal_Bool = sal_True ) const; - inline const SwInvertGrf &GetInvertGrf(sal_Bool = sal_True ) const; - inline const SwTransparencyGrf &GetTransparencyGrf(sal_Bool = sal_True ) const; - inline const SwDrawModeGrf &GetDrawModeGrf(sal_Bool = sal_True ) const; - - // Paragraph attributes - implementation in paratr.hxx - inline const SvxLineSpacingItem &GetLineSpacing( sal_Bool = sal_True ) const; - inline const SvxAdjustItem &GetAdjust( sal_Bool = sal_True ) const; - inline const SvxFmtSplitItem &GetSplit( sal_Bool = sal_True ) const; - inline const SwRegisterItem &GetRegister( sal_Bool = sal_True ) const; - inline const SwNumRuleItem &GetNumRule( sal_Bool = sal_True ) const; - inline const SvxWidowsItem &GetWidows( sal_Bool = sal_True ) const; - inline const SvxOrphansItem &GetOrphans( sal_Bool = sal_True ) const; - inline const SvxTabStopItem &GetTabStops( sal_Bool = sal_True ) const; - inline const SvxHyphenZoneItem &GetHyphenZone( sal_Bool = sal_True ) const; - inline const SwFmtDrop &GetDrop( sal_Bool = sal_True ) const; - inline const SvxScriptSpaceItem &GetScriptSpace(sal_Bool = sal_True) const; - inline const SvxHangingPunctuationItem &GetHangingPunctuation(sal_Bool = sal_True) const; - inline const SvxForbiddenRuleItem &GetForbiddenRule(sal_Bool = sal_True) const; - inline const SvxParaVertAlignItem &GetParaVertAlign(sal_Bool = sal_True) const; - inline const SvxParaGridItem &GetParaGrid(sal_Bool = sal_True) const; - inline const SwParaConnectBorderItem &GetParaConnectBorder(sal_Bool = sal_True ) const; - - // Tablebox attributes - implementation in cellatr.hxx - inline const SwTblBoxNumFormat &GetTblBoxNumFmt( sal_Bool = sal_True ) const; - inline const SwTblBoxFormula &GetTblBoxFormula( sal_Bool = sal_True ) const; - inline const SwTblBoxValue &GetTblBoxValue( sal_Bool = sal_True ) const; - - DECL_FIXEDMEMPOOL_NEWDEL(SwAttrSet) -}; - -//Helper for filters to find true lineheight of a font -SW_DLLPUBLIC long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess, - const SwAttrSet &rSet, - const OutputDevice &rOut, sal_Int16 nScript); -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx deleted file mode 100644 index bc21f95818..0000000000 --- a/sw/inc/swbaslnk.hxx +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWBASLNK_HXX -#define _SWBASLNK_HXX - -#include <sfx2/lnkbase.hxx> - -class SwNode; -class SwCntntNode; -class ReReadThread; -long GrfNodeChanged( void* pLink, void* pCaller ); - -class SwBaseLink : public ::sfx2::SvBaseLink -{ - friend long GrfNodeChanged( void* pLink, void* pCaller ); - - SwCntntNode* pCntntNode; - sal_Bool bSwapIn : 1; - sal_Bool bNoDataFlag : 1; - sal_Bool bIgnoreDataChanged : 1; - ReReadThread* m_pReReadThread; - -protected: - SwBaseLink(): m_pReReadThread(0) {} - - SwBaseLink( const String& rNm, sal_uInt16 nObjectType, ::sfx2::SvLinkSource* pObj, - SwCntntNode* pNode = 0 ) - : ::sfx2::SvBaseLink( rNm, nObjectType, pObj ), pCntntNode( pNode ), - bSwapIn( sal_False ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ), - m_pReReadThread(0) - {} - -public: - TYPEINFO(); - - SwBaseLink( sal_uInt16 nMode, sal_uInt16 nFormat, SwCntntNode* pNode = 0 ) - : ::sfx2::SvBaseLink( nMode, nFormat ), pCntntNode( pNode ), - bSwapIn( sal_False ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ), - m_pReReadThread(0) - {} - virtual ~SwBaseLink(); - - virtual ::sfx2::SvBaseLink::UpdateResult DataChanged( - const String& rMimeType, const ::com::sun::star::uno::Any & rValue ); - - virtual void Closed(); - - virtual const SwNode* GetAnchor() const; - - SwCntntNode *GetCntntNode() { return pCntntNode; } - - // For graphics only. - sal_Bool SwapIn( sal_Bool bWaitForData = sal_False, sal_Bool bNativFormat = sal_False ); - - sal_Bool Connect() { return 0 != SvBaseLink::GetRealObject(); } - - // Only for graphics-links (for switching between DDE / Grf-link). - void SetObjType( sal_uInt16 nType ) { SvBaseLink::SetObjType( nType ); } - - sal_Bool IsRecursion( const SwBaseLink* pChkLnk ) const; - virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0, - xub_StrLen nEnd = STRING_NOTFOUND ) const; - - void SetNoDataFlag() { bNoDataFlag = sal_True; } - sal_Bool ChkNoDataFlag() { sal_Bool bRet = bNoDataFlag; bNoDataFlag = sal_False; return bRet; } - sal_Bool IsNoDataFlag() const { return bNoDataFlag; } -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swcalwrp.hxx b/sw/inc/swcalwrp.hxx deleted file mode 100644 index 421a526010..0000000000 --- a/sw/inc/swcalwrp.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWCALWRP_HXX -#define _SWCALWRP_HXX - -#include <i18npool/lang.h> -#include <tools/string.hxx> -#include <unotools/calendarwrapper.hxx> -#include <salhelper/singletonref.hxx> - -class SwCalendarWrapper : public CalendarWrapper -{ - String sUniqueId; - sal_uInt16 nLang; - -public: - SwCalendarWrapper( const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory > & xMSF = ::comphelper::getProcessServiceFactory() ) - : CalendarWrapper( xMSF ), nLang( LANGUAGE_SYSTEM ) - {} - - void LoadDefaultCalendar( sal_uInt16 nLang ); -}; - - -salhelper::SingletonRef<SwCalendarWrapper>* s_getCalendarWrapper(); - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx deleted file mode 100644 index b78d9b4d11..0000000000 --- a/sw/inc/swcli.hxx +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWCLI_HXX -#define _SWCLI_HXX -#include <com/sun/star/embed/XEmbeddedObject.hpp> - -#include <svtools/embedhlp.hxx> - -#include <sfx2/ipclient.hxx> - -class SwView; -class SwEditWin; - -class SwOleClient : public SfxInPlaceClient -{ - sal_Bool bInDoVerb; - sal_Bool bOldCheckForOLEInCaption; - - virtual void ObjectAreaChanged(); - virtual void RequestNewObjectArea( Rectangle& ); - virtual void ViewChanged(); - virtual void MakeVisible(); - -public: - SwOleClient( SwView *pView, SwEditWin *pWin, const svt::EmbeddedObjectRef& ); - - void SetInDoVerb( sal_Bool bFlag ) { bInDoVerb = bFlag; } - - sal_Bool IsCheckForOLEInCaption() const { return bOldCheckForOLEInCaption; } - - virtual void FormatChanged(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swcommands.h b/sw/inc/swcommands.h deleted file mode 100644 index 77b30ca59f..0000000000 --- a/sw/inc/swcommands.h +++ /dev/null @@ -1,437 +0,0 @@ -/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * 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_SWCOMMANDS_HRC
-#define SW_SWCOMMANDS_HRC
-
-#define CMD_SID_CREATE_SW_DRAWVIEW ".uno:CreateSWDrawView"
-#define CMD_FN_REDLINE_ACCEPT ".uno:AcceptTrackedChanges"
-#define CMD_FN_REDLINE_ON ".uno:TrackChanges"
-#define CMD_FN_ADD_UNKNOWN ".uno:AddAllUnknownWords"
-#define CMD_FN_FRAME_ALIGN_VERT_BOTTOM ".uno:AlignBottom"
-#define CMD_FN_FRAME_ALIGN_VERT_CHAR_BOTTOM ".uno:AlignCharBottom"
-#define CMD_FN_FRAME_ALIGN_VERT_CHAR_TOP ".uno:AlignCharTop"
-#define CMD_FN_FRAME_ALIGN_HORZ_CENTER ".uno:AlignHorizontalCenter"
-#define CMD_FN_FRAME_ALIGN_HORZ_LEFT ".uno:AlignLeft"
-#define CMD_FN_FRAME_ALIGN_HORZ_RIGHT ".uno:AlignRight"
-#define CMD_FN_FRAME_ALIGN_VERT_ROW_BOTTOM ".uno:AlignRowBottom"
-#define CMD_FN_FRAME_ALIGN_VERT_ROW_TOP ".uno:AlignRowTop"
-#define CMD_FN_FRAME_ALIGN_VERT_TOP ".uno:AlignTop"
-#define CMD_FN_FRAME_ALIGN_VERT_CENTER ".uno:AlignVerticalCenter"
-#define CMD_FN_FRAME_ALIGN_VERT_CHAR_CENTER ".uno:AlignVerticalCharCenter"
-#define CMD_FN_FRAME_ALIGN_VERT_ROW_CENTER ".uno:AlignVerticalRowCenter"
-#define CMD_FN_EDIT_AUTH_ENTRY_DLG ".uno:AuthoritiesEntryDialog"
-#define CMD_FN_AUTOFORMAT_APPLY ".uno:AutoFormatApply"
-#define CMD_FN_AUTOFORMAT_REDLINE_APPLY ".uno:AutoFormatRedlineApply"
-#define CMD_FN_TABLE_AUTOSUM ".uno:AutoSum"
-#define CMD_SID_ATTR_CHAR_COLOR_BACKGROUND ".uno:BackColor"
-#define CMD_FN_FORMAT_BACKGROUND_DLG ".uno:BackgroundDialog"
-#define CMD_FN_BACKSPACE ".uno:SwBackspace"
-#define CMD_FN_FORMAT_BORDER_DLG ".uno:BorderDialog"
-#define CMD_FN_NUMBER_BULLETS ".uno:BulletsAndNumberingDialog"
-#define CMD_FN_CALC_TABLE ".uno:Calc"
-#define CMD_FN_CALCULATE ".uno:CalculateSel"
-#define CMD_FN_TABLE_VERT_BOTTOM ".uno:CellVertBottom"
-#define CMD_FN_TABLE_VERT_CENTER ".uno:CellVertCenter"
-#define CMD_FN_TABLE_VERT_NONE ".uno:CellVertTop"
-#define CMD_FN_FRAME_CHAIN ".uno:ChainFrames"
-#define CMD_FN_CHANGE_DBFIELD ".uno:ChangeDatabaseField"
-#define CMD_FN_NUMBERING_OUTLINE_DLG ".uno:ChapterNumberingDialog"
-#define CMD_SID_ATTR_CHAR_COLOR_BACKGROUND_EXT ".uno:CharBackgroundExt"
-#define CMD_SID_ATTR_CHAR_COLOR_EXT ".uno:CharColorExt"
-#define CMD_FN_CHAR_LEFT_SEL ".uno:CharLeftSel"
-#define CMD_FN_CHAR_RIGHT_SEL ".uno:CharRightSel"
-#define CMD_FN_CLOSE_PAGEPREVIEW ".uno:ClosePreview"
-#define CMD_FN_REDLINE_COMMENT ".uno:CommentChangeTracking"
-#define CMD_FN_VIEW_META_CHARS ".uno:ControlCodes"
-#define CMD_FN_CONVERT_TEXT_TABLE ".uno:ConvertTableText"
-#define CMD_FN_ABSTRACT_NEWDOC ".uno:CreateAbstract"
-#define CMD_FN_DEC_INDENT_OFFSET ".uno:DecrementIndentValue"
-#define CMD_FN_NUM_BULLET_DOWN ".uno:DecrementLevel"
-#define CMD_FN_NUM_BULLET_OUTLINE_DOWN ".uno:DecrementSubLevels"
-#define CMD_FN_TABLE_DELETE_COL ".uno:DeleteColumns"
-#define CMD_FN_TABLE_DELETE_ROW ".uno:DeleteRows"
-#define CMD_FN_DELETE_WHOLE_LINE ".uno:DelLine"
-#define CMD_FN_DELETE_LINE ".uno:DelToEndOfLine"
-#define CMD_FN_DELETE_PARA ".uno:DelToEndOfPara"
-#define CMD_FN_DELETE_SENT ".uno:DelToEndOfSentence"
-#define CMD_FN_DELETE_WORD ".uno:DelToEndOfWord"
-#define CMD_FN_DELETE_BACK_LINE ".uno:DelToStartOfLine"
-#define CMD_FN_DELETE_BACK_PARA ".uno:DelToStartOfPara"
-#define CMD_FN_DELETE_BACK_SENT ".uno:DelToStartOfSentence"
-#define CMD_FN_DELETE_BACK_WORD ".uno:DelToStartOfWord"
-#define CMD_FN_TABLE_BALANCE_CELLS ".uno:DistributeColumns"
-#define CMD_FN_TABLE_BALANCE_ROWS ".uno:DistributeRows"
-#define CMD_FN_EDIT_CURRENT_TOX ".uno:EditCurIndex"
-#define CMD_FN_GLOSSARY_DLG ".uno:EditGlossary"
-#define CMD_FN_EDIT_HYPERLINK ".uno:EditHyperlink"
-#define CMD_FN_EDIT_REGION ".uno:EditRegion"
-#define CMD_FN_END_OF_DOCUMENT_SEL ".uno:EndOfDocumentSel"
-#define CMD_FN_END_OF_LINE_SEL ".uno:EndOfLineSel"
-#define CMD_FN_END_OF_PARA_SEL ".uno:EndOfParaSel"
-#define CMD_FN_TABLE_SELECT_COL ".uno:EntireColumn"
-#define CMD_FN_TABLE_SELECT_ROW ".uno:EntireRow"
-#define CMD_FN_ESCAPE ".uno:Escape"
-#define CMD_FN_EXECUTE_MACROFIELD ".uno:ExecuteMacroField"
-#define CMD_FN_EXPAND_GLOSSARY ".uno:ExpandGlossary"
-#define CMD_FN_EDIT_FIELD ".uno:FieldDialog"
-#define CMD_FN_VIEW_FIELDNAME ".uno:Fieldnames"
-#define CMD_FN_VIEW_FIELDS ".uno:Fields"
-#define CMD_FN_FLIP_HORZ_GRAFIC ".uno:FlipHorizontal"
-#define CMD_FN_FLIP_VERT_GRAFIC ".uno:FlipVertical"
-#define CMD_SID_ATTR_CHAR_COLOR2 ".uno:FontColor"
-#define CMD_FN_FORMAT_FOOTNOTE_DLG ".uno:FootnoteDialog"
-#define CMD_FN_EDIT_FOOTNOTE ".uno:EditFootnote"
-#define CMD_FN_FORMAT_COLUMN ".uno:FormatColumns"
-#define CMD_FN_FORMAT_DROPCAPS ".uno:FormatDropcap"
-#define CMD_FN_FORMAT_FRAME_DLG ".uno:FrameDialog"
-#define CMD_FN_LINE_DOWN ".uno:GoDown"
-#define CMD_FN_CHAR_LEFT ".uno:GoLeft"
-#define CMD_FN_CHAR_RIGHT ".uno:GoRight"
-#define CMD_FN_FRAME_TO_ANCHOR ".uno:GoToAnchor"
-#define CMD_FN_END_TABLE ".uno:GoToEnd"
-#define CMD_FN_END_OF_COLUMN ".uno:GoToEndOfColumn"
-#define CMD_FN_END_OF_DOCUMENT ".uno:GoToEndOfDoc"
-#define CMD_FN_END_OF_LINE ".uno:GoToEndOfLine"
-#define CMD_FN_END_OF_NEXT_COLUMN ".uno:GoToEndOfNextColumn"
-#define CMD_FN_END_OF_NEXT_PAGE ".uno:GoToEndOfNextPage"
-#define CMD_FN_END_OF_NEXT_PAGE_SEL ".uno:GoToEndOfNextPageSel"
-#define CMD_FN_END_OF_PAGE ".uno:GoToEndOfPage"
-#define CMD_FN_END_OF_PAGE_SEL ".uno:GoToEndOfPageSel"
-#define CMD_FN_END_OF_PARA ".uno:GoToEndOfPara"
-#define CMD_FN_END_OF_PREV_COLUMN ".uno:GoToEndOfPrevColumn"
-#define CMD_FN_END_OF_PREV_PAGE ".uno:GoToEndOfPrevPage"
-#define CMD_FN_END_OF_PREV_PAGE_SEL ".uno:GoToEndOfPrevPageSel"
-#define CMD_FN_NEXT_TOXMARK ".uno:GotoNextIndexMark"
-#define CMD_FN_GOTO_NEXT_INPUTFLD ".uno:GotoNextInputField"
-#define CMD_FN_GOTO_NEXT_OBJ ".uno:GotoNextObject"
-#define CMD_FN_NEXT_PARA ".uno:GoToNextPara"
-#define CMD_FN_GOTO_NEXT_MARK ".uno:GotoNextPlacemarker"
-#define CMD_FN_NEXT_SENT ".uno:GoToNextSentence"
-#define CMD_FN_NEXT_SENT_SEL ".uno:GotoNextSentenceSel"
-#define CMD_FN_NEXT_TBLFML ".uno:GotoNextTableFormula"
-#define CMD_FN_NEXT_WORD ".uno:GoToNextWord"
-#define CMD_FN_NEXT_TBLFML_ERR ".uno:GotoNextWrongTableFormula"
-#define CMD_FN_NAVIGATION_PI_GOTO_PAGE ".uno:GotoPage"
-#define CMD_FN_PREV_TOXMARK ".uno:GotoPrevIndexMark"
-#define CMD_FN_GOTO_PREV_INPUTFLD ".uno:GotoPrevInputField"
-#define CMD_FN_GOTO_PREV_OBJ ".uno:GotoPrevObject"
-#define CMD_FN_PREV_PARA ".uno:GoToPrevPara"
-#define CMD_FN_GOTO_PREV_MARK ".uno:GotoPrevPlacemarker"
-#define CMD_FN_PREV_SENT ".uno:GoToPrevSentence"
-#define CMD_FN_PREV_SENT_SEL ".uno:GotoPrevSentenceSel"
-#define CMD_FN_PREV_TBLFML ".uno:GotoPrevTableFormula"
-#define CMD_FN_PREV_WORD ".uno:GoToPrevWord"
-#define CMD_FN_PREV_TBLFML_ERR ".uno:GotoPrevWrongTableFormula"
-#define CMD_FN_START_TABLE ".uno:GoToStartOfTable"
-#define CMD_FN_START_OF_COLUMN ".uno:GoToStartOfColumn"
-#define CMD_FN_START_OF_DOCUMENT ".uno:GoToStartOfDoc"
-#define CMD_FN_START_OF_LINE ".uno:GoToStartOfLine"
-#define CMD_FN_START_OF_NEXT_COLUMN ".uno:GoToStartOfNextColumn"
-#define CMD_FN_START_OF_NEXT_PAGE ".uno:GoToStartOfNextPage"
-#define CMD_FN_START_OF_NEXT_PAGE_SEL ".uno:GoToStartOfNextPageSel"
-#define CMD_FN_START_OF_PAGE ".uno:GoToStartOfPage"
-#define CMD_FN_START_OF_PAGE_SEL ".uno:GoToStartOfPageSel"
-#define CMD_FN_START_OF_PARA ".uno:GoToStartOfPara"
-#define CMD_FN_START_OF_PREV_COLUMN ".uno:GoToStartOfPrevColumn"
-#define CMD_FN_START_OF_PREV_PAGE ".uno:GoToStartOfPrevPage"
-#define CMD_FN_START_OF_PREV_PAGE_SEL ".uno:GoToStartOfPrevPageSel"
-#define CMD_FN_LINE_UP ".uno:GoUp"
-#define CMD_FN_VIEW_GRAPHIC ".uno:Graphic"
-#define CMD_FN_FORMAT_GRAFIC_DLG ".uno:GraphicDialog"
-#define CMD_FN_SAVE_GRAPHIC ".uno:SaveGraphic"
-#define CMD_FN_EXTERNAL_EDIT ".uno:ExternalEdit"
-#define CMD_FN_EXPORT_OLE_AS_PDF ".uno:ExportOleAsPDF"
-#define CMD_FN_EXPORT_OLE_AS_GRAPHIC ".uno:ExportOleAsGraphic"
-#define CMD_FN_GROW_FONT_SIZE ".uno:Grow"
-#define CMD_FN_HSCROLLBAR ".uno:HScroll"
-#define CMD_SID_HTML_MODE ".uno:HtmlMode"
-#define CMD_FN_HYPHENATE_OPT_DLG ".uno:Hyphenate"
-#define CMD_FN_INC_INDENT_OFFSET ".uno:IncrementIndentValue"
-#define CMD_FN_NUM_BULLET_UP ".uno:IncrementLevel"
-#define CMD_FN_NUM_BULLET_OUTLINE_UP ".uno:IncrementSubLevels"
-#define CMD_FN_EDIT_IDX_ENTRY_DLG ".uno:IndexEntryDialog"
-#define CMD_FN_IDX_MARK_TO_IDX ".uno:IndexMarkToIndex"
-#define CMD_FN_POSTIT ".uno:InsertAnnotation"
-#define CMD_FN_INSERT_FLD_AUTHOR ".uno:InsertAuthorField"
-#define CMD_FN_INSERT_AUTH_ENTRY_DLG ".uno:InsertAuthoritiesEntry"
-#define CMD_FN_INSERT_BOOKMARK ".uno:InsertBookmark"
-#define CMD_FN_INSERT_BREAK_DLG ".uno:InsertBreak"
-#define CMD_FN_INSERT_CAPTION ".uno:InsertCaptionDialog"
-#define CMD_FN_INSERT_COLUMN_BREAK ".uno:InsertColumnBreak"
-#define CMD_FN_TABLE_INSERT_COL_DLG ".uno:InsertColumnDialog"
-#define CMD_FN_TABLE_INSERT_COL ".uno:InsertColumns"
-#define CMD_FN_INSERT_REGION ".uno:InsertSection"
-#define CMD_FN_INSERT_CTRL ".uno:InsertCtrl"
-#define CMD_FN_INSERT_FLD_DATE ".uno:InsertDateField"
-#define CMD_FN_INSERT_ENDNOTE ".uno:InsertEndnote"
-#define CMD_FN_ENVELOP ".uno:InsertEnvelope"
-#define CMD_FN_INSERT_FIELD ".uno:InsertField"
-#define CMD_FN_INSERT_FIELD_CTRL ".uno:InsertFieldCtrl"
-#define CMD_FN_INSERT_FOOTNOTE_DLG ".uno:InsertFootnoteDialog"
-#define CMD_FN_INSERT_FOOTNOTE ".uno:InsertFootnote"
-#define CMD_FN_EDIT_FORMULA ".uno:InsertFormula"
-#define CMD_FN_INSERT_FRAME ".uno:InsertFrame"
-#define CMD_FN_INSERT_FRAME_INTERACT ".uno:InsertFrameInteract"
-#define CMD_FN_INSERT_FRAME_INTERACT_NOCOL ".uno:InsertFrameInteractNoColumns"
-#define CMD_FN_INSERT_HRULER ".uno:InsertGraphicRuler"
-#define CMD_FN_INSERT_HYPERLINK ".uno:InsertHyperlinkDlg"
-#define CMD_FN_INSERT_IDX_ENTRY_DLG ".uno:InsertIndexesEntry"
-#define CMD_FN_INSERT_LINEBREAK ".uno:InsertLinebreak"
-#define CMD_FN_INSERT_MULTI_TOX ".uno:InsertMultiIndex"
-#define CMD_FN_NUM_BULLET_NONUM ".uno:InsertNeutralParagraph"
-#define CMD_FN_INSERT_OBJ_CTRL ".uno:InsertObjCtrl"
-#define CMD_FN_INSERT_OBJECT_DLG ".uno:InsertObjectDialog"
-#define CMD_FN_INSERT_SMA ".uno:InsertObjectStarMath"
-#define CMD_FN_INSERT_PAGEBREAK ".uno:InsertPagebreak"
-#define CMD_FN_INSERT_FLD_PGCOUNT ".uno:InsertPageCountField"
-#define CMD_FN_INSERT_PAGEFOOTER ".uno:InsertPageFooter"
-#define CMD_FN_INSERT_PAGEHEADER ".uno:InsertPageHeader"
-#define CMD_FN_INSERT_FLD_PGNUMBER ".uno:InsertPageNumberField"
-#define CMD_FN_INSERT_BREAK ".uno:InsertPara"
-#define CMD_FN_INSERT_REF_FIELD ".uno:InsertReferenceField"
-#define CMD_FN_TABLE_INSERT_ROW_DLG ".uno:InsertRowDialog"
-#define CMD_FN_TABLE_INSERT_ROW ".uno:InsertRows"
-#define CMD_FN_JAVAEDIT ".uno:InsertScript"
-#define CMD_FN_INSERT_TABLE ".uno:InsertTable"
-#define CMD_FN_INSERT_FLD_TIME ".uno:InsertTimeField"
-#define CMD_FN_INSERT_FLD_TITLE ".uno:InsertTitleField"
-#define CMD_FN_INSERT_FLD_TOPIC ".uno:InsertTopicField"
-#define CMD_FN_NUM_BULLET_NEXT ".uno:JumpDownThisLevel"
-#define CMD_FN_END_DOC_DIRECT ".uno:JumpToEndOfDoc"
-#define CMD_FN_TO_FOOTER ".uno:JumpToFooter"
-#define CMD_FN_FOOTNOTE_TO_ANCHOR ".uno:JumpToFootnoteOrAnchor"
-#define CMD_FN_TO_HEADER ".uno:JumpToHeader"
-#define CMD_FN_NEXT_BOOKMARK ".uno:JumpToNextBookmark"
-#define CMD_FN_NEXT_FOOTNOTE ".uno:JumpToNextFootnote"
-#define CMD_FN_CNTNT_TO_NEXT_FRAME ".uno:JumpToNextFrame"
-#define CMD_FN_GOTO_NEXT_REGION ".uno:JumpToNextRegion"
-#define CMD_FN_NEXT_TABLE ".uno:JumpToNextTable"
-#define CMD_FN_PREV_BOOKMARK ".uno:JumpToPrevBookmark"
-#define CMD_FN_PREV_FOOTNOTE ".uno:JumpToPrevFootnote"
-#define CMD_FN_GOTO_PREV_REGION ".uno:JumpToPrevRegion"
-#define CMD_FN_PREV_TABLE ".uno:JumpToPrevTable"
-#define CMD_FN_GOTO_REFERENCE ".uno:JumpToReference"
-#define CMD_FN_START_DOC_DIRECT ".uno:JumpToStartOfDoc"
-#define CMD_FN_NUM_BULLET_PREV ".uno:JumpUpThisLevel"
-#define CMD_FN_LINE_DOWN_SEL ".uno:LineDownSel"
-#define CMD_FN_LINE_NUMBERING_DLG ".uno:LineNumberingDialog"
-#define CMD_FN_LINE_UP_SEL ".uno:LineUpSel"
-#define CMD_FN_EDIT_LINK_DLG ".uno:LinkDialog"
-#define CMD_SID_TEMPLATE_LOAD ".uno:LoadStyles"
-#define CMD_FN_VIEW_MARKS ".uno:Marks"
-#define CMD_FN_TABLE_MERGE_CELLS ".uno:MergeCells"
-#define CMD_FN_QRY_MERGE ".uno:MergeDialog"
-#define CMD_FN_MAILMERGE_WIZARD ".uno:MailMergeWizard"
-#define CMD_FN_TABLE_MERGE_TABLE ".uno:MergeTable"
-#define CMD_FN_FORMAT_APPLY_HEAD1 ".uno:ApplyStyleHead1"
-#define CMD_FN_FORMAT_APPLY_HEAD2 ".uno:ApplyStyleHead2"
-#define CMD_FN_FORMAT_APPLY_HEAD3 ".uno:ApplyStyleHead3"
-#define CMD_FN_FORMAT_APPLY_DEFAULT ".uno:ApplyStyleDefault"
-#define CMD_FN_FORMAT_APPLY_TEXTBODY ".uno:ApplyStyleTextbody"
-#define CMD_FN_GRAPHIC_MIRROR_ON_EVEN_PAGES ".uno:MirrorGraphicOnEvenPages"
-#define CMD_FN_FRAME_MIRROR_ON_EVEN_PAGES ".uno:MirrorOnEvenPages"
-#define CMD_FN_NUM_BULLET_MOVEDOWN ".uno:MoveDown"
-#define CMD_FN_NUM_BULLET_OUTLINE_MOVEDOWN ".uno:MoveDownSubItems"
-#define CMD_FN_NUM_BULLET_MOVEUP ".uno:MoveUp"
-#define CMD_FN_NUM_BULLET_OUTLINE_MOVEUP ".uno:MoveUpSubItems"
-#define CMD_FN_TITLE_DESCRIPTION_SHAPE ".uno:ObjectTitleDescription"
-#define CMD_FN_NAME_SHAPE ".uno:NameGroup"
-#define CMD_FN_NEW_GLOBAL_DOC ".uno:NewGlobalDoc"
-#define CMD_FN_NEW_HTML_DOC ".uno:NewHtmlDoc"
-#define CMD_FN_NUMBER_FORMAT ".uno:NumberFormat"
-#define CMD_FN_NUMBER_CURRENCY ".uno:NumberFormatCurrency"
-#define CMD_FN_NUMBER_DATE ".uno:NumberFormatDate"
-#define CMD_FN_NUMBER_TWODEC ".uno:NumberFormatDecimal"
-#define CMD_FN_NUMBER_PERCENT ".uno:NumberFormatPercent"
-#define CMD_FN_NUMBER_SCIENTIFIC ".uno:NumberFormatScientific"
-#define CMD_FN_NUMBER_STANDARD ".uno:NumberFormatStandard"
-#define CMD_FN_NUMBER_TIME ".uno:NumberFormatTime"
-#define CMD_FN_NUMBER_NEWSTART ".uno:NumberingStart"
-#define CMD_FN_NUM_OR_NONUM ".uno:NumberOrNoNumber"
-#define CMD_FN_FRAME_DOWN ".uno:ObjectBackOne"
-#define CMD_FN_FRAME_UP ".uno:ObjectForwardOne"
-#define CMD_FN_AUTOFORMAT_AUTO ".uno:OnlineAutoFormat"
-#define CMD_FN_OPTIMIZE_TABLE ".uno:OptimizeTable"
-#define CMD_FN_FORMAT_PAGE_COLUMN_DLG ".uno:PageColumnDialog"
-#define CMD_FN_FORMAT_PAGE_DLG ".uno:PageDialog"
-#define CMD_FN_PAGEDOWN ".uno:PageDown"
-#define CMD_FN_PAGEDOWN_SEL ".uno:PageDownSel"
-#define CMD_FN_CHANGE_PAGENUM ".uno:PageOffset"
-#define CMD_FN_SET_PAGE_STYLE ".uno:PageStyleApply"
-#define CMD_FN_STAT_TEMPLATE ".uno:PageStyleName"
-#define CMD_FN_PAGEUP ".uno:PageUp"
-#define CMD_FN_PAGEUP_SEL ".uno:PageUpSel"
-#define CMD_FN_PREVIEW_ZOOM ".uno:PreviewZoom"
-#define CMD_FN_PRINT_LAYOUT ".uno:PrintLayout"
-#define CMD_FN_PRINT_PAGEPREVIEW ".uno:PrintPagePreView"
-#define CMD_FN_TABLE_SET_READ_ONLY_CELLS ".uno:Protect"
-#define CMD_FN_REDLINE_PROTECT ".uno:ProtectTraceChangeMode"
-#define CMD_FN_REFRESH_VIEW ".uno:RefreshView"
-#define CMD_FN_NUM_BULLET_OFF ".uno:RemoveBullets"
-#define CMD_FN_REMOVE_CUR_TOX ".uno:RemoveTableOf"
-#define CMD_FN_REPAGINATE ".uno:Repaginate"
-#define CMD_FN_REPEAT_SEARCH ".uno:RepeatSearch"
-#define CMD_FN_FORMAT_RESET ".uno:ResetAttributes"
-#define CMD_FN_TABLE_UNSET_READ_ONLY ".uno:ResetTableProtection"
-#define CMD_FN_RULER ".uno:Ruler"
-#define CMD_FN_QRY_INSERT ".uno:SbaInsert"
-#define CMD_FN_QRY_INSERT_FIELD ".uno:SbaInsertField"
-#define CMD_FN_QRY_MERGE_FIELD ".uno:SbaMerge"
-#define CMD_FN_SCROLL_NAVIGATION ".uno:ScrollNavigation"
-#define CMD_FN_SCROLL_NEXT_PREV ".uno:ScrollNextPrev"
-#define CMD_FN_TABLE_SELECT_ALL ".uno:SelectTable"
-#define CMD_FN_STAT_SELMODE ".uno:SelectionMode"
-#define CMD_FN_SELECT_PARA ".uno:SelectText"
-#define CMD_FN_SELECT_WORD ".uno:SelectWord"
-#define CMD_FN_ABSTRACT_STARIMPRESS ".uno:SendAbstractToStarImpress"
-#define CMD_FN_OUTLINE_TO_CLIPBOARD ".uno:SendOutlineToClipboard"
-#define CMD_FN_OUTLINE_TO_IMPRESS ".uno:SendOutlineToStarImpress"
-#define CMD_FN_TOOL_ANKER_AT_CHAR ".uno:SetAnchorAtChar"
-#define CMD_FN_TOOL_ANKER_CHAR ".uno:SetAnchorToChar"
-#define CMD_FN_TOOL_ANKER_FRAME ".uno:SetAnchorToFrame"
-#define CMD_FN_TOOL_ANKER_PAGE ".uno:SetAnchorToPage"
-#define CMD_FN_TOOL_ANKER_PARAGRAPH ".uno:SetAnchorToPara"
-#define CMD_FN_TABLE_SET_COL_WIDTH ".uno:SetColumnWidth"
-#define CMD_FN_SET_EXT_MODE ".uno:SetExtSelection"
-#define CMD_FN_SET_ADD_MODE ".uno:SetMultiSelection"
-#define CMD_FN_TABLE_ADJUST_CELLS ".uno:SetOptimalColumnWidth"
-#define CMD_FN_TABLE_OPTIMAL_HEIGHT ".uno:SetOptimalRowHeight"
-#define CMD_FN_TABLE_SET_ROW_HEIGHT ".uno:SetRowHeight"
-#define CMD_FN_SHADOWCURSOR ".uno:ShadowCursor"
-#define CMD_FN_SHIFT_BACKSPACE ".uno:ShiftBackspace"
-#define CMD_FN_SHOW_MULTIPLE_PAGES ".uno:ShowMultiplePages"
-#define CMD_FN_VIEW_NOTES ".uno:ShowAnnotations"
-#define CMD_FN_VIEW_HIDDEN_PARA ".uno:ShowHiddenParagraphs"
-#define CMD_FN_REDLINE_SHOW ".uno:ShowTrackedChanges"
-#define CMD_FN_SHOW_TWO_PAGES ".uno:ShowTwoPages"
-#define CMD_FN_SHOW_BOOKVIEW ".uno:ShowBookview"
-#define CMD_FN_SHRINK_FONT_SIZE ".uno:Shrink"
-#define CMD_FN_SORTING_DLG ".uno:SortDialog"
-#define CMD_FN_TABLE_SPLIT_CELLS ".uno:SplitCell"
-#define CMD_FN_TABLE_SPLIT_TABLE ".uno:SplitTable"
-#define CMD_FN_AUTO_CORRECT ".uno:StartAutoCorrect"
-#define CMD_FN_START_OF_DOCUMENT_SEL ".uno:StartOfDocumentSel"
-#define CMD_FN_START_OF_LINE_SEL ".uno:StartOfLineSel"
-#define CMD_FN_START_OF_PARA_SEL ".uno:StartOfParaSel"
-#define CMD_FN_STAT_BOOKMARK ".uno:StateBookmark"
-#define CMD_FN_STAT_PAGE ".uno:StatePageNumber"
-#define CMD_FN_STAT_ZOOM ".uno:StateZoom"
-#define CMD_FN_SET_SUB_SCRIPT ".uno:SubScript"
-#define CMD_FN_SET_SUPER_SCRIPT ".uno:SuperScript"
-#define CMD_FN_SBA_BRW_INSERT ".uno:SwBrwInsert"
-#define CMD_FN_SBA_BRW_MERGE ".uno:SwMailMerge"
-#define CMD_FN_SBA_BRW_UPDATE ".uno:SwUpdate"
-#define CMD_FN_SYNC_LABELS ".uno:SynchronizeLabelsDlg"
-#define CMD_FN_VIEW_TABLEGRID ".uno:TableBoundaries"
-#define CMD_FN_FORMAT_TABLE_DLG ".uno:TableDialog"
-#define CMD_FN_TABLE_MODE_FIX ".uno:TableModeFix"
-#define CMD_FN_TABLE_MODE_FIX_PROP ".uno:TableModeFixProp"
-#define CMD_FN_TABLE_MODE_VARIABLE ".uno:TableModeVariable"
-#define CMD_FN_NUM_FORMAT_TABLE_DLG ".uno:TableNumberFormatDialog"
-#define CMD_FN_SET_MODOPT_TBLNUMFMT ".uno:TableNumberRecognition"
-#define CMD_FN_DRAWTEXT_ATTR_DLG ".uno:TextAttributes"
-#define CMD_FN_DRAW_WRAP_DLG ".uno:TextWrap"
-#define CMD_FN_THESAURUS_DLG ".uno:ThesaurusDialog"
-#define CMD_FN_TOOL_ANKER ".uno:ToggleAnchorType"
-#define CMD_FN_TOOL_HIERARCHIE ".uno:ToggleObjectLayer"
-#define CMD_FN_UNDERLINE_DOUBLE ".uno:UnderlineDouble"
-#define CMD_FN_FRAME_UNCHAIN ".uno:UnhainFrames"
-#define CMD_FN_TABLE_UNSET_READ_ONLY_CELLS ".uno:UnsetCellsReadOnly"
-#define CMD_FN_UPDATE_ALL ".uno:UpdateAll"
-#define CMD_FN_UPDATE_TOX ".uno:UpdateAllIndexes"
-#define CMD_FN_UPDATE_ALL_LINKS ".uno:UpdateAllLinks"
-#define CMD_FN_UPDATE_CHARTS ".uno:UpdateCharts"
-#define CMD_FN_UPDATE_CUR_TOX ".uno:UpdateCurIndex"
-#define CMD_FN_UPDATE_FIELDS ".uno:UpdateFields"
-#define CMD_FN_UPDATE_INPUTFIELDS ".uno:UpdateInputFields"
-#define CMD_FN_VIEW_BOUNDS ".uno:ViewBounds"
-#define CMD_FN_VLINEAL ".uno:VRuler"
-#define CMD_FN_VSCROLLBAR ".uno:VScroll"
-#define CMD_FN_PREV_WORD_SEL ".uno:WordLeftSel"
-#define CMD_FN_NEXT_WORD_SEL ".uno:WordRightSel"
-#define CMD_FN_WRAP_ANCHOR_ONLY ".uno:WrapAnchorOnly"
-#define CMD_FN_FRAME_WRAP_CONTOUR ".uno:WrapContour"
-#define CMD_FN_FRAME_WRAP_IDEAL ".uno:WrapIdeal"
-#define CMD_FN_FRAME_WRAP_LEFT ".uno:WrapLeft"
-#define CMD_FN_FRAME_NOWRAP ".uno:WrapOff"
-#define CMD_FN_FRAME_WRAP ".uno:WrapOn"
-#define CMD_FN_FRAME_WRAP_RIGHT ".uno:WrapRight"
-#define CMD_FN_FRAME_WRAPTHRU ".uno:WrapThrough"
-#define CMD_FN_FRAME_WRAPTHRU_TRANSP ".uno:WrapThroughTransparent"
-#define CMD_FN_INSERT_STRING ".uno:InsertText"
-#define CMD_SID_ATTR_PARA_NUMRULE ".uno:NumRule"
-#define CMD_SID_ATTR_PARA_OUTLINE_LEVEL ".uno:OutlineLevel"
-#define CMD_FN_NUMBER_NEWSTART_AT ".uno:NumNewStartAt"
-#define CMD_FN_FORMAT_LINENUMBER ".uno:LineNumber"
-#define CMD_SID_ATTR_PARA_PAGENUM ".uno:PageNumber"
-#define CMD_SID_ATTR_PARA_REGISTER ".uno:RegisterTrue"
-#define CMD_FN_TO_FOOTNOTE_AREA ".uno:JumpToFootnoteArea"
-#define CMD_FN_TXTATR_INET ".uno:HyperlinkAttributes"
-#define CMD_FN_INSERT_GLOSSARY ".uno:InsertGlossary"
-#define CMD_FN_NEW_GLOSSARY ".uno:NewGlossary"
-#define CMD_FN_SET_ACT_GLOSSARY ".uno:SetActGlossaryGroup"
-#define CMD_FN_DELETE_BOOKMARK ".uno:DeleteBookmark"
-#define CMD_FN_DROP_TEXT ".uno:SetDropCapText"
-#define CMD_FN_DROP_CHAR_STYLE_NAME ".uno:SetDropCapCharStyleName"
-#define CMD_FN_READONLY_SELECTION_MODE ".uno:SelectTextMode"
-#define CMD_FN_INSERT_DBFIELD ".uno:InsertDBField"
-#define CMD_FN_GOTO_NEXT_CELL ".uno:JumpToNextCell"
-#define CMD_FN_GOTO_PREV_CELL ".uno:JumpToPrevCell"
-#define CMD_FN_INSERT_FIELD_DATA_ONLY ".uno:InsertFieldDataOnly"
-#define CMD_SID_ATTR_BRUSH_ROW ".uno:TableRowBackground"
-#define CMD_SID_ATTR_BRUSH_TABLE ".uno:TableBackground"
-#define CMD_FN_TABLE_ROW_SPLIT ".uno:RowSplit"
-#define CMD_FN_MAILMERGE_CHILDWINDOW ".uno:MailmergeChildWindow"
-#define CMD_FN_WORDCOUNT_DIALOG ".uno:WordCountDialog"
-#define CMD_FN_MAILMERGE_SENDMAIL_CHILDWINDOW ".uno:SendMailChildWindow"
-#define CMD_FN_TABLE_DELETE_TABLE ".uno:DeleteTable"
-#define CMD_FN_TABLE_SELECT_CELL ".uno:EntireCell"
-#define CMD_FN_CONVERT_TABLE_TO_TEXT ".uno:ConvertTableToText"
-#define CMD_FN_CONVERT_TEXT_TO_TABLE ".uno:ConvertTextToTable"
-#define CMD_FN_TABLE_HEADLINE_REPEAT ".uno:HeadingRowsRepeat"
-#define CMD_FN_TABLE_SORT_DIALOG ".uno:TableSort"
-#define CMD_FN_XFORMS_DESIGN_MODE ".uno:SwitchXFormsDesignMode"
-#define CMD_FN_REMOVE_DIRECT_CHAR_FORMATS ".uno:RemoveDirectCharFormats"
-#define CMD_FN_NUM_CONTINUE ".uno:ContinueNumbering"
-#define CMD_FN_SELECTION_MODE_DEFAULT ".uno:SelectionModeDefault"
-#define CMD_FN_DELETE_NOTE ".uno:DeleteNote"
-#define CMD_FN_REPLY ".uno:ReplyNote"
-#define CMD_FN_DELETE_COMMENT ".uno:DeleteComment"
-#define CMD_FN_DELETE_NOTE_AUTHOR ".uno:DeleteAuthor"
-#define CMD_FN_DELETE_ALL_NOTES ".uno:DeleteAllNotes"
-#define CMD_FN_HIDE_NOTE ".uno:HideNote"
-#define CMD_FN_HIDE_NOTE_AUTHOR ".uno:HideAuthor"
-#define CMD_SID_ATTR_VIEWLAYOUT ".uno:ViewLayout"
-#define CMD_FN_HIDE_ALL_NOTES ".uno:HideAllNotes"
-#define CMD_FN_SELECTION_MODE_BLOCK ".uno:SelectionModeBlock"
-#define CMD_FN_SPELL_GRAMMAR_DIALOG ".uno:SpellingAndGrammarDialog"
-#define CMD_FN_REDLINE_ACCEPT_DIRECT ".uno:AcceptTracedChange"
-#define CMD_FN_REDLINE_REJECT_DIRECT ".uno:RejectTracedChange"
-#define CMD_FN_REMOVE_HYPERLINK ".uno:RemoveHyperlink"
-#define CMD_FN_COPY_HYPERLINK_LOCATION ".uno:CopyHyperlinkLocation"
-
-#endif
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx deleted file mode 100644 index 203c7e0d89..0000000000 --- a/sw/inc/swcrsr.hxx +++ /dev/null @@ -1,317 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWCRSR_HXX -#define _SWCRSR_HXX - -#include <com/sun/star/i18n/WordType.hpp> - -#include <pam.hxx> -#include <tblsel.hxx> -#include <cshtyp.hxx> - - -struct _SwCursor_SavePos; - -namespace com { namespace sun { namespace star { namespace util { - struct SearchOptions; -} } } } - - -// Base structure for parameters of the find-methods. -// Returns values of found-call. -const int FIND_NOT_FOUND = 0; -const int FIND_FOUND = 1; -const int FIND_NO_RING = 2; - -struct SwFindParas -{ - virtual int Find( SwPaM*, SwMoveFn, const SwPaM*, sal_Bool ) = 0; - virtual int IsReplaceMode() const = 0; -}; - -typedef sal_uInt16 SwCursorSelOverFlags; -namespace nsSwCursorSelOverFlags -{ - const SwCursorSelOverFlags SELOVER_NONE = 0x00; - const SwCursorSelOverFlags SELOVER_CHECKNODESSECTION = 0x01; - const SwCursorSelOverFlags SELOVER_TOGGLE = 0x02; - const SwCursorSelOverFlags SELOVER_ENABLEREVDIREKTION = 0x04; - const SwCursorSelOverFlags SELOVER_CHANGEPOS = 0x08; -} - -class SwCursor : public SwPaM -{ - friend class SwCrsrSaveState; - - _SwCursor_SavePos* pSavePos; - long mnRowSpanOffset; // required for travelling in tabs with rowspans - sal_uInt8 nCursorBidiLevel; // bidi level of the cursor - bool mbColumnSelection; // true: cursor is aprt of a column selection - - sal_uLong FindAll( SwFindParas& , SwDocPositions, SwDocPositions, FindRanges, sal_Bool& bCancel ); - - using SwPaM::Find; - -protected: - virtual _SwCursor_SavePos* CreateNewSavePos() const; - void SaveState(); - void RestoreState(); - - const _SwCursor_SavePos* GetSavePos() const { return pSavePos; } - - virtual const SwCntntFrm* DoSetBidiLevelLeftRight( - sal_Bool & io_rbLeft, sal_Bool bVisualAllowed, sal_Bool bInsertCrsr); - virtual void DoSetBidiLevelUpDown(); - virtual bool IsSelOvrCheck(int eFlags); - -public: - // single argument ctors shall be explicit. - SwCursor( const SwPosition &rPos, SwPaM* pRing, bool bColumnSel ); - virtual ~SwCursor(); - - // @@@ semantic: no copy ctor. - SwCursor( SwCursor& rCpy); - -public: - - virtual SwCursor* Create( SwPaM* pRing = 0 ) const; - - virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO - virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 ); - - void FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const; - SwMoveFnCollection* MakeFindRange( SwDocPositions, SwDocPositions, - SwPaM* ) const; - - - sal_uLong Find( const com::sun::star::util::SearchOptions& rSearchOpt, - sal_Bool bSearchInNotes, - SwDocPositions nStart, SwDocPositions nEnde, - sal_Bool& bCancel, - FindRanges = FND_IN_BODY, - int bReplace = sal_False ); - sal_uLong Find( const SwTxtFmtColl& rFmtColl, - SwDocPositions nStart, SwDocPositions nEnde, - sal_Bool& bCancel, - FindRanges = FND_IN_BODY, - const SwTxtFmtColl* pReplFmt = 0 ); - sal_uLong Find( const SfxItemSet& rSet, sal_Bool bNoCollections, - SwDocPositions nStart, SwDocPositions nEnde, - sal_Bool& bCancel, - FindRanges = FND_IN_BODY, - const com::sun::star::util::SearchOptions* pSearchOpt = 0, - const SfxItemSet* rReplSet = 0 ); - - // UI versions - sal_Bool IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const; - sal_Bool IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const; - sal_Bool IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const; - sal_Bool IsStartEndSentence( bool bEnd ) const; - sal_Bool GoStartWord(); - sal_Bool GoEndWord(); - sal_Bool GoNextWord(); - sal_Bool GoPrevWord(); - sal_Bool SelectWord( ViewShell* pViewShell, const Point* pPt = 0 ); - - // API versions of above functions (will be used with a different - // WordType for the break iterator) - sal_Bool IsStartWordWT( sal_Int16 nWordType ) const; - sal_Bool IsEndWordWT( sal_Int16 nWordType ) const; - sal_Bool IsInWordWT( sal_Int16 nWordType ) const; - sal_Bool GoStartWordWT( sal_Int16 nWordType ); - sal_Bool GoEndWordWT( sal_Int16 nWordType ); - sal_Bool GoNextWordWT( sal_Int16 nWordType ); - sal_Bool GoPrevWordWT( sal_Int16 nWordType ); - sal_Bool SelectWordWT( ViewShell* pViewShell, sal_Int16 nWordType, const Point* pPt = 0 ); - - enum SentenceMoveType - { - NEXT_SENT, - PREV_SENT, - START_SENT, - END_SENT - }; - sal_Bool GoSentence(SentenceMoveType eMoveType); - sal_Bool GoNextSentence(){return GoSentence(NEXT_SENT);} - sal_Bool GoEndSentence(){return GoSentence(END_SENT);} - sal_Bool GoPrevSentence(){return GoSentence(PREV_SENT);} - sal_Bool GoStartSentence(){return GoSentence(START_SENT);} - sal_Bool ExpandToSentenceBorders(); - - virtual sal_Bool LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, - sal_Bool bAllowVisual, sal_Bool bSkipHidden, sal_Bool bInsertCrsr ); - sal_Bool UpDown( sal_Bool bUp, sal_uInt16 nCnt, Point* pPt, long nUpDownX ); - sal_Bool LeftRightMargin( sal_Bool bLeftMargin, sal_Bool bAPI = sal_False ); - sal_Bool IsAtLeftRightMargin( sal_Bool bLeftMargin, sal_Bool bAPI = sal_False ) const; - sal_Bool SttEndDoc( sal_Bool bSttDoc ); - sal_Bool GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt ); - - sal_Bool Left( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual, sal_Bool bSkipHidden ) - { return LeftRight( sal_True, nCnt, nMode, bAllowVisual, bSkipHidden, sal_False ); } - sal_Bool Right( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual, sal_Bool bSkipHidden ) - { return LeftRight( sal_False, nCnt, nMode, bAllowVisual, bSkipHidden, sal_False ); } - sal_Bool GoNextCell( sal_uInt16 nCnt = 1 ) { return GoPrevNextCell( sal_True, nCnt ); } - sal_Bool GoPrevCell( sal_uInt16 nCnt = 1 ) { return GoPrevNextCell( sal_False, nCnt ); } - virtual sal_Bool GotoTable( const String& rName ); - sal_Bool GotoTblBox( const String& rName ); - sal_Bool GotoRegion( const String& rName ); - sal_Bool GotoFtnAnchor(); - sal_Bool GotoFtnTxt(); - sal_Bool GotoNextFtnAnchor(); - sal_Bool GotoPrevFtnAnchor(); - sal_Bool GotoNextFtnCntnt(); - sal_Bool GotoPrevFtnCntnt(); - - sal_Bool MovePara( SwWhichPara, SwPosPara ); - sal_Bool MoveSection( SwWhichSection, SwPosSection ); - sal_Bool MoveTable( SwWhichTable, SwPosTable ); - sal_Bool MoveRegion( SwWhichRegion, SwPosRegion ); - - // Is there a selection of content in table? - // Return value indicates if cursor remains at its old position. - virtual sal_Bool IsSelOvr( int eFlags = - ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | - nsSwCursorSelOverFlags::SELOVER_TOGGLE | - nsSwCursorSelOverFlags::SELOVER_CHANGEPOS )); - virtual sal_Bool IsInProtectTable( sal_Bool bMove = sal_False, - sal_Bool bChgCrsr = sal_True ); - sal_Bool IsNoCntnt() const; - - /** Restore cursor state to the one saved by SwCrsrSaveState **/ - void RestoreSavePos(); - - // sal_True: cursor can be set at this position. - virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const; - - // Is cursor allowed in ready only ranges? - virtual bool IsReadOnlyAvailable() const; - - virtual sal_Bool IsSkipOverProtectSections() const; - virtual sal_Bool IsSkipOverHiddenSections() const; - - sal_uInt8 GetCrsrBidiLevel() const { return nCursorBidiLevel; } - void SetCrsrBidiLevel( sal_uInt8 nNewLevel ) { nCursorBidiLevel = nNewLevel; } - - bool IsColumnSelection() const { return mbColumnSelection; } - void SetColumnSelection( bool bNew ) { mbColumnSelection = bNew; } - - long GetCrsrRowSpanOffset() const { return mnRowSpanOffset; } - void SetCrsrRowSpanOffset( long nNew ) { mnRowSpanOffset = nNew; } - - DECL_FIXEDMEMPOOL_NEWDEL( SwCursor ) -}; - - -/** - A helper class to save cursor state (position). Create SwCrsrSaveState - object to save current state, use SwCursor::RestoreSavePos() to actually - restore cursor state to the saved state (SwCrsrSaveState destructor only - removes the saved state from an internal stack). It is possible to stack - several SwCrsrSaveState objects. -**/ -class SwCrsrSaveState -{ - SwCursor& rCrsr; -public: - SwCrsrSaveState( SwCursor& rC ) : rCrsr( rC ) { rC.SaveState(); } - ~SwCrsrSaveState() { rCrsr.RestoreState(); } -}; - -// internal, used by SwCursor::SaveState() etc. -struct _SwCursor_SavePos -{ - sal_uLong nNode; - xub_StrLen nCntnt; - _SwCursor_SavePos* pNext; - - _SwCursor_SavePos( const SwCursor& rCrsr ) - : nNode( rCrsr.GetPoint()->nNode.GetIndex() ), - nCntnt( rCrsr.GetPoint()->nContent.GetIndex() ), - pNext( 0 ) - {} - virtual ~_SwCursor_SavePos() {} - - DECL_FIXEDMEMPOOL_NEWDEL( _SwCursor_SavePos ) -}; - - - -class SwTableCursor : public virtual SwCursor -{ - -protected: - sal_uLong nTblPtNd, nTblMkNd; - xub_StrLen nTblPtCnt, nTblMkCnt; - SwSelBoxes aSelBoxes; - sal_Bool bChg : 1; - sal_Bool bParked : 1; // Table-cursor was parked. - - virtual bool IsSelOvrCheck(int eFlags); - -public: - SwTableCursor( const SwPosition &rPos, SwPaM* pRing = 0 ); - SwTableCursor( SwTableCursor& ); - virtual ~SwTableCursor(); - - virtual sal_Bool LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, - sal_Bool bAllowVisual, sal_Bool bSkipHidden, sal_Bool bInsertCrsr ); - virtual sal_Bool GotoTable( const String& rName ); - - void InsertBox( const SwTableBox& rTblBox ); - void DeleteBox( sal_uInt16 nPos ) { aSelBoxes.Remove( nPos ); bChg = sal_True; } - sal_uInt16 GetBoxesCount() const { return aSelBoxes.Count(); } - const SwSelBoxes& GetBoxes() const { return aSelBoxes; } - - // Creates cursor for all boxes. - SwCursor* MakeBoxSels( SwCursor* pAktCrsr ); - // Any boxes protected? - sal_Bool HasReadOnlyBoxSel() const; - - // Has table cursor been changed? If so, save new values immediately. - sal_Bool IsCrsrMovedUpdt(); - // Has table cursor been changed? - sal_Bool IsCrsrMoved() const - { - return nTblMkNd != GetMark()->nNode.GetIndex() || - nTblPtNd != GetPoint()->nNode.GetIndex() || - nTblMkCnt != GetMark()->nContent.GetIndex() || - nTblPtCnt != GetPoint()->nContent.GetIndex(); - } - - sal_Bool IsChgd() const { return bChg; } - - // Park table cursor at start node of boxes. - void ParkCrsr(); - - bool NewTableSelection(); - void ActualizeSelection( const SwSelBoxes &rBoxes ); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swdbdata.hxx b/sw/inc/swdbdata.hxx deleted file mode 100644 index 8478cb5a77..0000000000 --- a/sw/inc/swdbdata.hxx +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWDBDATA_HXX -#define _SWDBDATA_HXX - -#include <tools/solar.h> -#include <rtl/ustring.hxx> - -// contains the description of a data source -struct SwDBData -{ - ::rtl::OUString sDataSource; - ::rtl::OUString sCommand; //table, query or statement - sal_Int32 nCommandType; //com::sun::star::sdb::CommandType - SwDBData() : - nCommandType(0){} - - sal_Bool operator !=(const SwDBData& rCmp) const - {return rCmp.sDataSource != sDataSource || rCmp.sCommand != sCommand || rCmp.nCommandType != nCommandType;} - sal_Bool operator ==(const SwDBData& rCmp) const - {return rCmp.sDataSource == sDataSource && rCmp.sCommand == sCommand && rCmp.nCommandType == nCommandType;} -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swdbtoolsclient.hxx b/sw/inc/swdbtoolsclient.hxx deleted file mode 100644 index 02aad4af04..0000000000 --- a/sw/inc/swdbtoolsclient.hxx +++ /dev/null @@ -1,78 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWDBTOOLSCLIENT_HXX -#define _SWDBTOOLSCLIENT_HXX - -#include <connectivity/virtualdbtools.hxx> -#include <osl/mutex.hxx> -#include <osl/module.h> -#include "swdllapi.h" - -/* - Client to use the dbtools library as load-on-call -*/ -class SW_DLLPUBLIC SwDbtoolsClient -{ -private: - ::rtl::Reference< ::connectivity::simple::IDataAccessTools > m_xDataAccessTools; - ::rtl::Reference< ::connectivity::simple::IDataAccessTypeConversion > m_xAccessTypeConversion; - ::rtl::Reference< ::connectivity::simple::IDataAccessToolsFactory > m_xDataAccessFactory; - - SW_DLLPRIVATE static void registerClient(); - SW_DLLPRIVATE static void revokeClient(); - SW_DLLPRIVATE void getFactory(); - - SW_DLLPRIVATE ::rtl::Reference< ::connectivity::simple::IDataAccessTools > getDataAccessTools(); - SW_DLLPRIVATE ::rtl::Reference< ::connectivity::simple::IDataAccessTypeConversion > getAccessTypeConversion(); - -public: - SwDbtoolsClient(); - ~SwDbtoolsClient(); - - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > getDataSource( - const ::rtl::OUString& _rsRegisteredName, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory - ); - - sal_Int32 getDefaultNumberFormat( - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn, - const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatTypes >& _rxTypes, - const ::com::sun::star::lang::Locale& _rLocale - ); - - ::rtl::OUString getFormattedValue( - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxColumn, - const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter>& _rxFormatter, - const ::com::sun::star::lang::Locale& _rLocale, - const ::com::sun::star::util::Date& _rNullDate - ); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx deleted file mode 100644 index 7a0c0c5778..0000000000 --- a/sw/inc/swddetbl.hxx +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWDDETBL_HXX -#define _SWDDETBL_HXX - -#include "swtable.hxx" - -class SwDDEFieldType; - -class SwDDETable : public SwTable -{ - SwDepend aDepend; -public: - TYPEINFO(); - - // Ctor moves all lines/boxes from SwTable to it. - // After that SwTable is empty and has to be deleted. - SwDDETable( SwTable& rTable, SwDDEFieldType* pDDEType, - sal_Bool bUpdate = sal_True ); - ~SwDDETable(); - - void ChangeContent(); - sal_Bool NoDDETable(); - - SwDDEFieldType* GetDDEFldType(); - inline const SwDDEFieldType* GetDDEFldType() const; -protected: - virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ); - virtual void SwClientNotify( const SwModify&, const SfxHint& ); -}; - - -// ----------- Inlines ----------------------------- - -inline const SwDDEFieldType* SwDDETable::GetDDEFldType() const -{ - return ((SwDDETable*)this)->GetDDEFldType(); -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swddllapi.h b/sw/inc/swddllapi.h deleted file mode 100644 index c967c08ce6..0000000000 --- a/sw/inc/swddllapi.h +++ /dev/null @@ -1,16 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -#ifndef INCLUDED_SWDDLLAPI_H -#define INCLUDED_SWDDLLAPI_H - -#include "sal/types.h" - -#if defined(SWD_DLLIMPLEMENTATION) -#define SWD_DLLPUBLIC SAL_DLLPUBLIC_EXPORT -#else -#define SWD_DLLPUBLIC SAL_DLLPUBLIC_IMPORT -#endif -#define SWD_DLLPRIVATE SAL_DLLPRIVATE - -#endif /* INCLUDED_SWDDLLAPI_H */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swdll.hxx b/sw/inc/swdll.hxx deleted file mode 100644 index 67c11e9446..0000000000 --- a/sw/inc/swdll.hxx +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_SWDLL_HXX -#define SW_SWDLL_HXX - -#include <sfx2/sfxdefs.hxx> -#include <sfx2/module.hxx> - -/** - * This class is a wrapper for a Load-On-Demand-DLL. One instance - * per SfxApplication will be created for the runtime of - * SfxApplication-subclass::Main(). -*/ -namespace SwGlobals -{ - void ensure(); -} - -#define SW_DLL() ( *(SwModule**) GetAppData(SHL_WRITER) ) - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swdllapi.h b/sw/inc/swdllapi.h deleted file mode 100644 index a17f20ac16..0000000000 --- a/sw/inc/swdllapi.h +++ /dev/null @@ -1,16 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -#ifndef INCLUDED_SWDLLAPI_H -#define INCLUDED_SWDLLAPI_H - -#include "sal/types.h" - -#if defined(SW_DLLIMPLEMENTATION) -#define SW_DLLPUBLIC SAL_DLLPUBLIC_EXPORT -#else -#define SW_DLLPUBLIC SAL_DLLPUBLIC_IMPORT -#endif -#define SW_DLLPRIVATE SAL_DLLPRIVATE - -#endif /* INCLUDED_SWDLLAPI_H */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swerror.h b/sw/inc/swerror.h deleted file mode 100644 index 1cad5249b7..0000000000 --- a/sw/inc/swerror.h +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWSWERROR_H -#define _SWSWERROR_H - -#include <tools/errcode.hxx> - -#define ERROR_SW_BASE (ERRCODE_AREA_SW) -#define ERROR_SW_READ_BASE (ERROR_SW_BASE | ERRCODE_CLASS_READ) -#define ERROR_SW_WRITE_BASE (ERROR_SW_BASE | ERRCODE_CLASS_WRITE) - -#define WARN_SW_BASE (ERRCODE_AREA_SW | ERRCODE_WARNING_MASK) -#define WARN_SW_READ_BASE (WARN_SW_BASE | ERRCODE_CLASS_READ ) -#define WARN_SW_WRITE_BASE (WARN_SW_BASE | ERRCODE_CLASS_WRITE ) - - -// Import Errors -#define ERR_SWG_FILE_FORMAT_ERROR (ERROR_SW_READ_BASE | 1 ) -#define ERR_SWG_READ_ERROR (ERROR_SW_READ_BASE | 2 ) - -#define ERR_SW6_INPUT_FILE (ERROR_SW_READ_BASE | 4 ) -#define ERR_SW6_NOWRITER_FILE (ERROR_SW_READ_BASE | 5 ) -#define ERR_SW6_UNEXPECTED_EOF (ERROR_SW_READ_BASE | 6 ) -#define ERR_SW6_PASSWD (ERROR_SW_READ_BASE | 7 ) - -#define ERR_WW6_NO_WW6_FILE_ERR (ERROR_SW_READ_BASE | 8 ) -#define ERR_WW6_FASTSAVE_ERR (ERROR_SW_READ_BASE | 9 ) - -#define ERR_FORMAT_ROWCOL (ERROR_SW_READ_BASE | 12) - -#define ERR_SWG_NEW_VERSION (ERROR_SW_READ_BASE | 13) -#define ERR_WW8_NO_WW8_FILE_ERR (ERROR_SW_READ_BASE | 14) - -#define ERR_FORMAT_FILE_ROWCOL (ERROR_SW_READ_BASE | 15) - -// Export errors -#define ERR_SWG_WRITE_ERROR (ERROR_SW_WRITE_BASE | 30 ) -#define ERR_SWG_OLD_GLOSSARY (ERROR_SW_WRITE_BASE | 31 ) -#define ERR_WRITE_ERROR_FILE (ERROR_SW_WRITE_BASE | 35 ) - -// Import/Export errors -#define ERR_SWG_INTERNAL_ERROR (ERROR_SW_BASE | 50 ) - -#define ERR_TXTBLOCK_NEWFILE_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_LOCKING | 55 ) - -// other errors and errorclasses -#define ERR_AUTOPATH_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_PATH | 55 ) -#define ERR_TBLSPLIT_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 56 ) -#define ERR_TBLINSCOL_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 57 ) -#define ERR_TBLDDECHG_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 58 ) - -// ----- Warnings --------------------------- - -// Import - Warnings -#define WARN_SWG_NO_DRAWINGS (WARN_SW_READ_BASE | 70 ) -#define WARN_WW6_FASTSAVE_ERR (WARN_SW_READ_BASE | 71 ) -// continued below - -// Import & Export - Warnings -#define WARN_SWG_FEATURES_LOST (WARN_SW_BASE | 72 ) -#define WARN_SWG_OLE (WARN_SW_BASE | 73 ) -#define WARN_SWG_POOR_LOAD (WARN_SW_BASE | 74 ) - -// Export warnings -#define WARN_SWG_HTML_NO_MACROS (WARN_SW_WRITE_BASE |75) -#define WARN_WRITE_ERROR_FILE (WARN_SW_WRITE_BASE |76) - -// More Import & Export - Warnings -#define WARN_FORMAT_FILE_ROWCOL (WARN_SW_READ_BASE | 77) - -#ifndef __RSC - -inline bool IsWarning( sal_uLong nErr ) -{ - return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr ); -} - -inline bool IsError( sal_uLong nErr ) -{ - return nErr && 0 == ( ERRCODE_WARNING_MASK & nErr ); -} - -#endif - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx deleted file mode 100644 index 8c6e8967a1..0000000000 --- a/sw/inc/swevent.hxx +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWEVENT_HXX -#define _SWEVENT_HXX - -#include <tools/solar.h> -#include <sfx2/sfx.hrc> - -#define SW_EVENT_OBJECT_SELECT ( EVENT_APP_START + 0 ) -#define SW_EVENT_START_INS_GLOSSARY ( EVENT_APP_START + 1 ) -#define SW_EVENT_END_INS_GLOSSARY ( EVENT_APP_START + 2 ) -#define SW_EVENT_MAIL_MERGE ( EVENT_APP_START + 3 ) -#define SW_EVENT_FRM_KEYINPUT_ALPHA ( EVENT_APP_START + 4 ) -#define SW_EVENT_FRM_KEYINPUT_NOALPHA ( EVENT_APP_START + 5 ) -#define SW_EVENT_FRM_RESIZE ( EVENT_APP_START + 6 ) -#define SW_EVENT_FRM_MOVE ( EVENT_APP_START + 7 ) -#define SW_EVENT_PAGE_COUNT ( EVENT_APP_START + 8 ) -#define SW_EVENT_MAIL_MERGE_END ( EVENT_APP_START + 9 ) -#define SW_EVENT_FIELD_MERGE ( EVENT_APP_START + 10 ) -#define SW_EVENT_FIELD_MERGE_FINISHED ( EVENT_APP_START + 11 ) -#define SW_EVENT_LAYOUT_FINISHED ( EVENT_APP_START + 12 ) - -#define STR_SW_EVENT_PAGE_COUNT 0 -#define STR_SW_EVENT_MAIL_MERGE 1 -#define STR_SW_EVENT_MAIL_MERGE_END 2 -#define STR_SW_EVENT_FIELD_MERGE 3 -#define STR_SW_EVENT_FIELD_MERGE_FINISHED 4 -#define STR_SW_EVENT_LAYOUT_FINISHED 5 -#define STR_SW_EVENT_OBJECT_SELECT 6 -#define STR_SW_EVENT_START_INS_GLOSSARY 7 -#define STR_SW_EVENT_END_INS_GLOSSARY 8 -#define STR_SW_EVENT_FRM_KEYINPUT_ALPHA 9 -#define STR_SW_EVENT_FRM_KEYINPUT_NOALPHA 10 -#define STR_SW_EVENT_FRM_RESIZE 11 -#define STR_SW_EVENT_FRM_MOVE 12 - -class SwFrmFmt; -class SwFmtINetFmt; -class IMapObject; - -// Enum for objects that call events into Basic or JavaScript. -enum SwCallEventObjectType -{ - EVENT_OBJECT_NONE = 0, // Null is nothing at all. - EVENT_OBJECT_IMAGE, - EVENT_OBJECT_INETATTR, - EVENT_OBJECT_URLITEM, - EVENT_OBJECT_IMAGEMAP -}; - -// Structure for the exchange between UI/CORE. - -struct SwCallMouseEvent -{ - SwCallEventObjectType eType; - union - { - // EVENT_OBJECT_IMAGE/EVENT_OBJECT_URLITEM - const SwFrmFmt* pFmt; - - // EVENT_OBJECT_INETATTR - const SwFmtINetFmt* pINetAttr; - - // EVENT_OBJECT_IMAGEMAP - struct - { - const SwFrmFmt* pFmt; - const IMapObject* pIMapObj; - } IMAP; - } PTR; - - SwCallMouseEvent() - : eType( EVENT_OBJECT_NONE ) - { PTR.pFmt = 0; PTR.IMAP.pIMapObj = 0; } - - void Set( SwCallEventObjectType eTyp, const SwFrmFmt* pFmt ) - { eType = eTyp; PTR.pFmt = pFmt; PTR.IMAP.pIMapObj = 0; } - - void Set( const SwFrmFmt* pFmt, const IMapObject* pIMapObj ) - { eType = EVENT_OBJECT_IMAGEMAP; PTR.pFmt = pFmt; PTR.IMAP.pIMapObj = pIMapObj; } - - void Set( const SwFmtINetFmt* pINetAttr ) - { eType = EVENT_OBJECT_INETATTR; PTR.pINetAttr = pINetAttr; PTR.IMAP.pIMapObj = 0; } - - int operator==( const SwCallMouseEvent& rEvent ) const - { - return eType == rEvent.eType && - PTR.pFmt == rEvent.PTR.pFmt && - PTR.IMAP.pIMapObj == rEvent.PTR.IMAP.pIMapObj; - } - int operator!=( const SwCallMouseEvent& rEvent ) const - { return !( *this == rEvent ); } - - void Clear() - { eType = EVENT_OBJECT_NONE; PTR.pFmt = 0; PTR.IMAP.pIMapObj = 0; } - - sal_Bool HasEvent() const { return EVENT_OBJECT_NONE != eType; } -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swfltopt.hxx b/sw/inc/swfltopt.hxx deleted file mode 100644 index d9f35def68..0000000000 --- a/sw/inc/swfltopt.hxx +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWFTLOPT_HXX -#define _SWFTLOPT_HXX - -#include <unotools/configitem.hxx> - -class SW_DLLPUBLIC SwFilterOptions : public utl::ConfigItem -{ -public: - SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames, - sal_uInt32* pValues ); - - void GetValues( sal_uInt16 nCnt, const sal_Char** ppNames, - sal_uInt32* pValues ); - virtual void Commit(); - virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swgstr.hxx b/sw/inc/swgstr.hxx deleted file mode 100644 index 3152d577e0..0000000000 --- a/sw/inc/swgstr.hxx +++ /dev/null @@ -1,152 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWGSTR_HXX -#define _SWGSTR_HXX - -#include <tools/stream.hxx> - -typedef long long3; // For documentation: 3-byte-longs. - -#define MAX_BEGIN 64 // Maximum block nesting. -#define PASSWDLEN 16 // Maximum password length. - -// New version with SvStreams. - -// Functionality for passwords and encoding. - -class swcrypter { -protected: - sal_Char cPasswd[ PASSWDLEN ]; // Password buffer. - sal_Bool bPasswd; // sal_True if with password. - void encode( sal_Char*, sal_uInt16 ); // Encode/decode buffer. -public: - swcrypter(); - sal_Bool setpasswd( const String& ); // Set password. - void copypasswd( const sal_Char* ); // Set password directly. - const sal_Char* getpasswd() { return cPasswd; } -}; - -// Reader/Writer-stream base class with buffer administration for texts -// ans special I/O for 3-byte-longs. - -class swstreambase : public swcrypter { -protected: - SvStream* pStrm; // The actual stream. - sal_Char* pBuf; // Temporary buffer. - sal_uInt16 nBuflen; // Length of temporary buffer. - short nLong; // Long-length (3 or 4). - sal_Bool bTempStrm; // sal_True: delete stream. - void checkbuf( sal_uInt16 ); // Test buffer length. - - swstreambase( SvStream& ); - - swstreambase( const swstreambase& ); - int operator=( const swstreambase& ); -public: - ~swstreambase(); - SvStream& Strm() { return *pStrm; } - void clear(); // Delete buffer. - - // Supplementary functions for I/O of LONGs as 3-byte numbers. - - void long3() { nLong = 3; } - void long4() { nLong = 4; } - - - // Alias and helper functions. - - void seek( long nPos ) { pStrm->Seek( nPos ); } - long tell() { return pStrm->Tell(); } - long filesize(); - - void setbad(); - int good() { return ( pStrm->GetError() == SVSTREAM_OK ); } - int operator!() { return ( pStrm->GetError() != SVSTREAM_OK ); } - int eof() { return pStrm->IsEof(); } - - sal_uInt8 get(); - void get( void* p, sal_uInt16 n ) { pStrm->Read( (sal_Char*) p, n ); } - - inline swstreambase& operator>>( sal_Char& ); - inline swstreambase& operator>>( sal_uInt8& ); - inline swstreambase& operator>>( short& ); - inline swstreambase& operator>>( sal_uInt16& ); - swstreambase& operator>>( long& ); - inline swstreambase& operator>>( sal_uLong& ); -}; - -inline swstreambase& swstreambase::operator>>( sal_Char& c ) -{ - *pStrm >> c; return *this; -} - -inline swstreambase& swstreambase::operator>>( sal_uInt8& c ) -{ - *pStrm >> c; return *this; -} - -inline swstreambase& swstreambase::operator>>( short& c ) -{ - *pStrm >> c; return *this; -} - -inline swstreambase& swstreambase::operator>>( sal_uInt16& c ) -{ - *pStrm >> c; return *this; -} - -inline swstreambase& swstreambase::operator>>( sal_uLong& c ) -{ - return *this >> (long&) c; -} - -class swistream : public swstreambase { - sal_uInt8 cType; // Record type. - sal_uLong nOffset; // Record offset portion. -public: - swistream( SvStream& ); - - sal_uInt8 peek(); // Test 1 byte. - sal_uInt8 next(); // Block start. - sal_uInt8 cur() { return cType; } // Current block. - sal_uInt8 skipnext(); // Skip record. - void undonext(); // Undo next(). - long getskip() { return nOffset; } - void skip( long = -1L ); // Skip block. - sal_Char* text(); // Read text string (after BEGIN). - long size(); // Current record length. - -private: - swistream( const swistream& ); - int operator=( const swistream& ); -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swhints.hxx b/sw/inc/swhints.hxx deleted file mode 100644 index b97a7941fc..0000000000 --- a/sw/inc/swhints.hxx +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_HINTS_HXX -#define SW_HINTS_HXX - -#include <svl/smplhint.hxx> - -#define SW_BROADCASTID_START SFX_HINT_USER00 -#define SW_BROADCAST_DRAWVIEWS_CREATED SW_BROADCASTID_START - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/switerator.hxx b/sw/inc/switerator.hxx deleted file mode 100644 index 963a13ce3b..0000000000 --- a/sw/inc/switerator.hxx +++ /dev/null @@ -1,47 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWITERATOR_HXX -#define _SWITERATOR_HXX - -#include <calbck.hxx> -#include <osl/diagnose.h> - -template< class TElementType, class TSource > class SwIterator -{ - SwClientIter aClientIter; -public: - - SwIterator( const TSource& rSrc ) : aClientIter(rSrc) { OSL_ENSURE( TElementType::IsOf( TYPE(SwClient) ), "Incompatible types!" ); } - TElementType* First() { SwClient* p = aClientIter.First(TYPE(TElementType)); return PTR_CAST(TElementType,p); } - TElementType* Last() { SwClient* p = aClientIter.Last( TYPE(TElementType)); return PTR_CAST(TElementType,p); } - TElementType* Next() { SwClient* p = aClientIter.Next(); return PTR_CAST(TElementType,p); } - TElementType* Previous() { SwClient* p = aClientIter.Previous(); return PTR_CAST(TElementType,p); } - static TElementType* FirstElement( const TSource& rMod ) { SwClient* p = SwClientIter(rMod).First(TYPE(TElementType)); return PTR_CAST(TElementType,p); } - bool IsChanged() { return aClientIter.IsChanged(); } -}; - -#endif diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx deleted file mode 100644 index 7828e8de48..0000000000 --- a/sw/inc/swmodule.hxx +++ /dev/null @@ -1,278 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWMODULE_HXX -#define _SWMODULE_HXX -#include <tools/link.hxx> -#include <tools/string.hxx> -#include <tools/fldunit.hxx> -#include <svl/lstner.hxx> -#include <unotools/options.hxx> -#include <sfx2/module.hxx> - -#include <tools/shl.hxx> -#include "swdllapi.h" -#include "shellid.hxx" -#include <fldupde.hxx> -#include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp> -#include <com/sun/star/linguistic2/XLanguageGuessing.hpp> - -class SvStringsDtor; -class Color; -class SfxItemSet; -class SfxRequest; -class SfxErrorHandler; -class SwDBConfig; -class SwModuleOptions; -class SwMasterUsrPref; -class SwViewOption; -class SwView; -class SwWrtShell; -class SwPrintOptions; -class SwChapterNumRules; -class SwStdFontConfig; -class SwNavigationConfig; -class SwTransferable; -class SwToolbarConfigItem; -class SwAttrPool; -namespace svtools{ class ColorConfig;} -class SvtAccessibilityOptions; -class SvtCTLOptions; -class SvtUserOptions; -class SvtUndoOptions; - -struct SwDBData; -#define VIEWOPT_DEST_VIEW 0 -#define VIEWOPT_DEST_TEXT 1 -#define VIEWOPT_DEST_WEB 2 -#define VIEWOPT_DEST_VIEW_ONLY 3 //ViewOptions are set only at ::com::sun::star::sdbcx::View, not at the appl. - -namespace com{ namespace sun{ namespace star{ namespace scanner{ - class XScannerManager; -}}}} - -class SW_DLLPUBLIC SwModule: public SfxModule, public SfxListener, public utl::ConfigurationListener -{ - String sActAuthor; - - // ConfigItems - SwModuleOptions* pModuleConfig; - SwMasterUsrPref* pUsrPref; - SwMasterUsrPref* pWebUsrPref; - SwPrintOptions* pPrtOpt; - SwPrintOptions* pWebPrtOpt; - SwChapterNumRules* pChapterNumRules; - SwStdFontConfig* pStdFontConfig; - SwNavigationConfig* pNavigationConfig; - SwToolbarConfigItem*pToolbarConfig; //For stacked toolbars. Which one was visible? - SwToolbarConfigItem*pWebToolbarConfig; - SwDBConfig* pDBConfig; - svtools::ColorConfig* pColorConfig; - SvtAccessibilityOptions* pAccessibilityOptions; - SvtCTLOptions* pCTLOptions; - SvtUserOptions* pUserOptions; - SvtUndoOptions* pUndoOptions; - - SfxErrorHandler* pErrorHdl; - - SwAttrPool *pAttrPool; - - // Current view is held here in order to avoid one's being forced - // to work via GetActiveView. - // View is valid until destroyed in Activate or exchanged. - SwView* pView; - - // List of all Redline-authors. - SvStringsDtor* pAuthorNames; - - // DictionaryList listener to trigger spellchecking or hyphenation - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLinguServiceEventListener > xLngSvcEvtListener; - ::com::sun::star::uno::Reference< - ::com::sun::star::scanner::XScannerManager > m_xScannerManager; - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLanguageGuessing > m_xLanguageGuesser; - - sal_Bool bAuthorInitialised : 1; - sal_Bool bEmbeddedLoadSave : 1; - - // Catch hint for DocInfo. - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); - -protected: - // Envelopes, labels. - void InsertEnv(SfxRequest&); - void InsertLab(SfxRequest&, sal_Bool bLabel); - -public: - // public Data - used for internal Clipboard / Drag & Drop / XSelection - SwTransferable *pDragDrop, *pXSelection; - - TYPEINFO(); - SFX_DECL_INTERFACE(SW_INTERFACE_MODULE) - - // This Ctor only for SW-Dll. - SwModule( SfxObjectFactory* pFact, - SfxObjectFactory* pWebFact, - SfxObjectFactory* pGlobalFact ); - - ~SwModule(); - - // Set view for internal use only. It is public only for technical reasons. - inline void SetView(SwView* pVw) { pView = pVw; } - inline SwView* GetView() { return pView; } - - // Handler for slots. - void StateOther(SfxItemSet &); - - void ExecOther(SfxRequest &); // Fields, formula... - - // Modify user settings. - const SwMasterUsrPref *GetUsrPref(sal_Bool bWeb) const; - const SwViewOption* GetViewOption(sal_Bool bWeb); - void ApplyUsrPref(const SwViewOption &, SwView*, - sal_uInt16 nDest = VIEWOPT_DEST_VIEW ); - void ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb ); - void ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bool bWeb ); - void ApplyFldUpdateFlags(SwFldUpdateFlags eFldFlags); - void ApplyLinkMode(sal_Int32 nNewLinkMode); - - // Default page mode for text grid. - void ApplyDefaultPageMode(sal_Bool bIsSquaredPageMode); - - void ApplyUserCharUnit(sal_Bool bApplyChar, sal_Bool bWeb); // apply_char_unit - - // Create ConfigItems. - SwModuleOptions* GetModuleConfig() { return pModuleConfig;} - SwPrintOptions* GetPrtOptions(sal_Bool bWeb); - SwChapterNumRules* GetChapterNumRules(); - SwStdFontConfig* GetStdFontConfig() { return pStdFontConfig; } - SwNavigationConfig* GetNavigationConfig(); - SwToolbarConfigItem*GetToolbarConfig() { return pToolbarConfig; } - SwToolbarConfigItem*GetWebToolbarConfig() { return pWebToolbarConfig; } - SwDBConfig* GetDBConfig(); - svtools::ColorConfig& GetColorConfig(); - SvtAccessibilityOptions& GetAccessibilityOptions(); - SvtCTLOptions& GetCTLOptions(); - SvtUserOptions& GetUserOptions(); - SvtUndoOptions& GetUndoOptions(); - - // Iterate over views. - static SwView* GetFirstView(); - static SwView* GetNextView(SwView*); - - sal_Bool IsEmbeddedLoadSave() const { return bEmbeddedLoadSave; } - void SetEmbeddedLoadSave( sal_Bool bFlag ) { bEmbeddedLoadSave = bFlag; } - - void ShowDBObj( SwView& rView, const SwDBData& rData, sal_Bool bOnlyIfAvailable = sal_False); - - // Table modi. - sal_Bool IsInsTblFormatNum(sal_Bool bHTML) const; - sal_Bool IsInsTblChangeNumFormat(sal_Bool bHTML) const; - sal_Bool IsInsTblAlignNum(sal_Bool bHTML) const; - - // Redlining. - sal_uInt16 GetRedlineAuthor(); - const String& GetRedlineAuthor(sal_uInt16 nPos); - sal_uInt16 InsertRedlineAuthor(const String& rAuthor); - void SetRedlineAuthor(const String& rAuthor); // for unit tests - - void GetInsertAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet); - void GetDeletedAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet); - void GetFormatAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet); - - sal_uInt16 GetRedlineMarkPos(); - const Color& GetRedlineMarkColor(); - - // Return defined DocStat - WordDelimiter. - const String& GetDocStatWordDelim() const; - - // Pass metric of ModuleConfig (for HTML-export). - sal_uInt16 GetMetric( sal_Bool bWeb ) const; - - // Pass update-statuses. - sal_uInt16 GetLinkUpdMode( sal_Bool bWeb ) const; - SwFldUpdateFlags GetFldUpdateFlags( sal_Bool bWeb ) const; - - // Virtual methods for options dialog. - virtual SfxItemSet* CreateItemSet( sal_uInt16 nId ); - virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ); - virtual SfxTabPage* CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet ); - - // Pool is created here and set at SfxShell. - void InitAttrPool(); - // Delete pool before it is too late. - void RemoveAttrPool(); - - // Invalidates online spell-wrong-lists if necessary. - void CheckSpellChanges( sal_Bool bOnlineSpelling, - sal_Bool bIsSpellWrongAgain, sal_Bool bIsSpellAllAgain, sal_Bool bSmartTags ); - - inline ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLinguServiceEventListener > - GetLngSvcEvtListener(); - inline void SetLngSvcEvtListener( ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLinguServiceEventListener > & xLstnr); - void CreateLngSvcEvtListener(); - - ::com::sun::star::uno::Reference< - ::com::sun::star::scanner::XScannerManager > - GetScannerManager(); - - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLanguageGuessing > - GetLanguageGuesser(); -}; - - -inline ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLinguServiceEventListener > - SwModule::GetLngSvcEvtListener() -{ - return xLngSvcEvtListener; -} - -inline void SwModule::SetLngSvcEvtListener( - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLinguServiceEventListener > & xLstnr) -{ - xLngSvcEvtListener = xLstnr; -} - - -// Access to SwModule, the ::com::sun::star::sdbcx::View and the shell. - -#define SW_MOD() ( *(SwModule**) GetAppData(SHL_WRITER)) - -SW_DLLPUBLIC SwView* GetActiveView(); -SW_DLLPUBLIC SwWrtShell* GetActiveWrtShell(); - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx deleted file mode 100644 index 3edf310e1b..0000000000 --- a/sw/inc/swrect.hxx +++ /dev/null @@ -1,363 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWRECT_HXX -#define _SWRECT_HXX -#include <osl/diagnose.h> -#include <tools/gen.hxx> -class SvStream; - -class SwRect -{ - Point m_Point; - Size m_Size; - - -public: - inline SwRect(); - inline SwRect( const SwRect &rRect ); - inline SwRect( const Point& rLT, const Size& rSize ); - inline SwRect( const Point& rLT, const Point& rRB ); - inline SwRect( long X, long Y, long Width, long Height ); - - //SV-SS e.g. SwRect( pWin->GetClipRect() ); - SwRect( const Rectangle &rRect ); - - //Set-Methods - inline void Chg( const Point& rNP, const Size &rNS ); - inline void Pos( const Point& rNew ); - inline void Pos( const long nNewX, const long nNewY ); - inline void SSize( const Size& rNew ); - inline void SSize( const long nHeight, const long nWidth ); - inline void Width( long nNew ); - inline void Height( long nNew ); - inline void Left( const long nLeft ); - inline void Right( const long nRight ); - inline void Top( const long nTop ); - inline void Bottom( const long nBottom ); - - //Get-Methods - inline const Point &Pos() const; - inline const Size &SSize() const; - inline long Width() const; - inline long Height() const; - inline long Left() const; - inline long Right() const; - inline long Top() const; - inline long Bottom() const; - - // In order to be able to access the members of Pos and SSize from the layout side. - inline Point &Pos(); - inline Size &SSize(); - - Point Center() const; - - void Justify(); - - SwRect &Union( const SwRect& rRect ); - SwRect &Intersection( const SwRect& rRect ); - - // Same as Intersection, only assume that Rects are overlapping! - SwRect &_Intersection( const SwRect &rRect ); - inline SwRect GetIntersection( const SwRect& rRect ) const; - - sal_Bool IsInside( const Point& rPOINT ) const; - sal_Bool IsNear(const Point& rPoint, long nTolerance ) const; - sal_Bool IsInside( const SwRect& rRect ) const; - sal_Bool IsOver( const SwRect& rRect ) const; - inline sal_Bool HasArea() const; - inline sal_Bool IsEmpty() const; - inline void Clear(); - - inline SwRect &operator = ( const SwRect &rRect ); - - inline sal_Bool operator == ( const SwRect& rRect ) const; - inline sal_Bool operator != ( const SwRect& rRect ) const; - - inline SwRect &operator+=( const Point &rPt ); - inline SwRect &operator-=( const Point &rPt ); - - inline SwRect &operator+=( const Size &rSz ); - inline SwRect &operator-=( const Size &rSz ); - - //SV-SS e.g. pWin->DrawRect( aSwRect.SVRect() ); - inline Rectangle SVRect() const; - - // Output operator for debugging. - friend SvStream &operator<<( SvStream &rStream, const SwRect &rRect ); - - - void _Top( const long nTop ); - void _Bottom( const long nBottom ); - void _Left( const long nLeft ); - void _Right( const long nRight ); - void _Width( const long nNew ); - void _Height( const long nNew ); - long _Top() const; - long _Bottom() const; - long _Left() const; - long _Right() const; - long _Width() const; - long _Height() const; - void SubTop( const long nSub ); - void AddBottom( const long nAdd ); - void SubLeft( const long nSub ); - void AddRight( const long nAdd ); - void AddWidth( const long nAdd ); - void AddHeight( const long nAdd ); - void SetPosX( const long nNew ); - void SetPosY( const long nNew ); - void SetLeftAndWidth( long nLeft, long nNew ); - void SetTopAndHeight( long nTop, long nNew ); - void SetRightAndWidth( long nRight, long nNew ); - void SetBottomAndHeight( long nBottom, long nNew ); - void SetUpperLeftCorner( const Point& rNew ); - void SetUpperRightCorner( const Point& rNew ); - void SetLowerLeftCorner( const Point& rNew ); - const Size _Size() const; - const Point TopLeft() const; - const Point TopRight() const; - const Point BottomLeft() const; - const Point BottomRight() const; - const Size SwappedSize() const; - long GetLeftDistance( long ) const; - long GetBottomDistance( long ) const; - long GetRightDistance( long ) const; - long GetTopDistance( long ) const; - sal_Bool OverStepLeft( long ) const; - sal_Bool OverStepBottom( long ) const; - sal_Bool OverStepTop( long ) const; - sal_Bool OverStepRight( long ) const; -}; - -// Implementation in swrect.cxx -extern SvStream &operator<<( SvStream &rStream, const SwRect &rRect ); - -typedef void (SwRect:: *SwRectSet)( const long nNew ); -typedef long (SwRect:: *SwRectGet)() const; -typedef const Point (SwRect:: *SwRectPoint)() const; -typedef const Size (SwRect:: *SwRectSize)() const; -typedef sal_Bool (SwRect:: *SwRectMax)( long ) const; -typedef long (SwRect:: *SwRectDist)( long ) const; -typedef void (SwRect:: *SwRectSetTwice)( long, long ); -typedef void (SwRect:: *SwRectSetPos)( const Point& ); - -// Set-Methods -inline void SwRect::Chg( const Point& rNP, const Size &rNS ) -{ - m_Point = rNP; - m_Size = rNS; -} -inline void SwRect::Pos( const Point& rNew ) -{ - m_Point = rNew; -} -inline void SwRect::Pos( const long nNewX, const long nNewY ) -{ - m_Point.setX(nNewX); - m_Point.setY(nNewY); -} -inline void SwRect::SSize( const Size& rNew ) -{ - m_Size = rNew; -} -inline void SwRect::SSize( const long nNewHeight, const long nNewWidth ) -{ - m_Size.setWidth(nNewWidth); - m_Size.setHeight(nNewHeight); -} -inline void SwRect::Width( long nNew ) -{ - m_Size.setWidth(nNew); -} -inline void SwRect::Height( long nNew ) -{ - m_Size.setHeight(nNew); -} -inline void SwRect::Left( const long nLeft ) -{ - m_Size.Width() += m_Point.getX() - nLeft; - m_Point.setX(nLeft); -} -inline void SwRect::Right( const long nRight ) -{ - m_Size.setWidth(nRight - m_Point.getX() + 1); -} -inline void SwRect::Top( const long nTop ) -{ - m_Size.Height() += m_Point.getY() - nTop; - m_Point.setY(nTop); -} -inline void SwRect::Bottom( const long nBottom ) -{ - m_Size.setHeight(nBottom - m_Point.getY() + 1); -} - -// Get-Methods -inline const Point &SwRect::Pos() const -{ - return m_Point; -} -inline Point &SwRect::Pos() -{ - return m_Point; -} -inline const Size &SwRect::SSize() const -{ - return m_Size; -} -inline Size &SwRect::SSize() -{ - return m_Size; -} -inline long SwRect::Width() const -{ - return m_Size.Width(); -} -inline long SwRect::Height() const -{ - return m_Size.Height(); -} -inline long SwRect::Left() const -{ - return m_Point.X(); -} -inline long SwRect::Right() const -{ - return m_Size.getWidth() ? m_Point.getX() + m_Size.getWidth() - 1 : m_Point.getX(); -} -inline long SwRect::Top() const -{ - return m_Point.Y(); -} -inline long SwRect::Bottom() const -{ - return m_Size.getHeight() ? m_Point.getY() + m_Size.getHeight() - 1 : m_Point.getY(); -} - -// operators -inline SwRect &SwRect::operator = ( const SwRect &rRect ) -{ - m_Point = rRect.m_Point; - m_Size = rRect.m_Size; - return *this; -} -inline sal_Bool SwRect::operator == ( const SwRect& rRect ) const -{ - return (m_Point == rRect.m_Point && m_Size == rRect.m_Size); -} -inline sal_Bool SwRect::operator != ( const SwRect& rRect ) const -{ - return (m_Point != rRect.m_Point || m_Size != rRect.m_Size); -} - -inline SwRect &SwRect::operator+=( const Point &rPt ) -{ - m_Point += rPt; - return *this; -} -inline SwRect &SwRect::operator-=( const Point &rPt ) -{ - m_Point -= rPt; - return *this; -} - -inline SwRect &SwRect::operator+=( const Size &rSz ) -{ - m_Size.Width() += rSz.Width(); - m_Size.Height() += rSz.Height(); - return *this; -} -inline SwRect &SwRect::operator-=( const Size &rSz ) -{ - m_Size.Width() -= rSz.Width(); - m_Size.Height() -= rSz.Height(); - return *this; -} - - -// other -inline Rectangle SwRect::SVRect() const -{ - OSL_ENSURE( !IsEmpty(), "SVRect() without Width or Height" ); - return Rectangle( m_Point.getX(), m_Point.getY(), - m_Point.getX() + m_Size.getWidth() - 1, //Right() - m_Point.getY() + m_Size.getHeight() - 1 ); //Bottom() -} - -inline SwRect SwRect::GetIntersection( const SwRect& rRect ) const -{ - return SwRect( *this ).Intersection( rRect ); -} - -inline sal_Bool SwRect::HasArea() const -{ - return !IsEmpty(); -} -inline sal_Bool SwRect::IsEmpty() const -{ - return !(m_Size.getHeight() && m_Size.getWidth()); -} -inline void SwRect::Clear() -{ - m_Point.setX(0); - m_Point.setY(0); - m_Size.setWidth(0); - m_Size.setHeight(0); -} - -// constructors -inline SwRect::SwRect() : - m_Point( 0, 0 ), - m_Size( 0, 0 ) -{ -} -inline SwRect::SwRect( const SwRect &rRect ) : - m_Point( rRect.m_Point ), - m_Size( rRect.m_Size ) -{ -} -inline SwRect::SwRect( const Point& rLT, const Size& rSize ) : - m_Point( rLT ), - m_Size( rSize ) -{ -} -inline SwRect::SwRect( const Point& rLT, const Point& rRB ) : - m_Point( rLT ), - m_Size( rRB.X() - rLT.X() + 1, rRB.Y() - rLT.Y() + 1 ) -{ -} -inline SwRect::SwRect( long X, long Y, long W, long H ) : - m_Point( X, Y ), - m_Size( W, H ) -{ -} - - -#endif //_SWRECT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swregion.hxx b/sw/inc/swregion.hxx deleted file mode 100644 index 51cc17ae38..0000000000 --- a/sw/inc/swregion.hxx +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWREGION_HXX -#define _SWREGION_HXX - -#include <svl/svarray.hxx> - -#include "swrect.hxx" - -SV_DECL_VARARR( SwRects, SwRect, 20, 8 ) - -class SwRegionRects : public SwRects -{ - SwRect aOrigin; // Copy of StartRect. - - inline void InsertRect( const SwRect &rRect, const sal_uInt16 nPos, sal_Bool &rDel); - -public: - SwRegionRects( const SwRect& rStartRect, sal_uInt16 nInit = 20, - sal_uInt16 nGrow = 8 ); - - // For punching from aOrigin. - void operator-=( const SwRect& rRect ); - - // From holes to areas, from areas to holes. - void Invert(); - - // Combine adjacent rectangles. - void Compress( sal_Bool bFuzzy = sal_True ); - - inline const SwRect &GetOrigin() const { return aOrigin; } - inline void ChangeOrigin( const SwRect &rRect ) { aOrigin = rRect; } -}; - -#endif //_SWREGION_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swserv.hxx b/sw/inc/swserv.hxx deleted file mode 100644 index 632132902b..0000000000 --- a/sw/inc/swserv.hxx +++ /dev/null @@ -1,95 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWSERV_HXX -#define _SWSERV_HXX - -#include <sfx2/linksrc.hxx> -#include <IMark.hxx> - -class SwSectionNode; -class SwBaseLink; -class SwTableNode; -struct SwPosition; -class SwPaM; - -class SwServerObject : public ::sfx2::SvLinkSource -{ - using sfx2::SvLinkSource::SendDataChanged; - -protected: - enum ServerModes { BOOKMARK_SERVER, TABLE_SERVER, SECTION_SERVER, NONE_SERVER } eType; - union { - ::sw::mark::IMark* pBkmk; - SwTableNode* pTblNd; - SwSectionNode* pSectNd; - } CNTNT_TYPE; - - SwServerObject(); - -public: - SwServerObject( ::sw::mark::IMark& rBookmark ) - : eType( BOOKMARK_SERVER ) - { - CNTNT_TYPE.pBkmk = &rBookmark; - } - SwServerObject( SwTableNode& rTableNd ) - : eType( TABLE_SERVER ) - { - CNTNT_TYPE.pTblNd = &rTableNd; - } - SwServerObject( SwSectionNode& rSectNd ) - : eType( SECTION_SERVER ) - { - CNTNT_TYPE.pSectNd = &rSectNd; - } - virtual ~SwServerObject(); - - virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData, - const String & rMimeType, - sal_Bool bSynchron = sal_False ); - - sal_Bool SetData( const String & rMimeType, - const ::com::sun::star::uno::Any& rData ); - - virtual void SendDataChanged( const SwPosition& rPos ); - virtual void SendDataChanged( const SwPaM& rRange ); - - sal_Bool IsLinkInServer( const SwBaseLink* ) const; - - void SetNoServer(); - void SetDdeBookmark( ::sw::mark::IMark& rBookmark); -}; - -#ifndef SW_DECL_SWSERVEROBJECT_DEFINED -#define SW_DECL_SWSERVEROBJECT_DEFINED -SV_DECL_REF( SwServerObject ) -#endif - -#endif // _SWSERV_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swstyle.h b/sw/inc/swstyle.h deleted file mode 100644 index d909b6454c..0000000000 --- a/sw/inc/swstyle.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWSTYLE_H -#define _SWSTYLE_H - - -#define SWSTYLEBIT_TEXT 0x0001 -#define SWSTYLEBIT_CHAPTER 0x0002 -#define SWSTYLEBIT_LIST 0x0004 -#define SWSTYLEBIT_IDX 0x0008 -#define SWSTYLEBIT_EXTRA 0x0010 -#define SWSTYLEBIT_HTML 0x0020 -#define SWSTYLEBIT_CONDCOLL 0x0040 - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx deleted file mode 100644 index bd2dafeee6..0000000000 --- a/sw/inc/swtable.hxx +++ /dev/null @@ -1,499 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWTABLE_HXX -#define _SWTABLE_HXX -#include <tools/mempool.hxx> -#include <tools/ref.hxx> -#include <svl/svarray.hxx> -#include <tblenum.hxx> -#include <swtypes.hxx> -#include <calbck.hxx> -#include <swrect.hxx> - -#if OSL_DEBUG_LEVEL > 1 -class SwStartNode; -#include <memory> -#include <boost/noncopyable.hpp> -#else -#include <node.hxx> // For StartNode->GetMyIndex. -#endif - -class SwFmt; -class Color; -class SwFrmFmt; -class SwTableFmt; -class SwTableLineFmt; -class SwTableBoxFmt; -class SwHTMLTableLayout; -class SwTableLine; -class SwTableBox; -class SwTableNode; -class SwTabCols; -class SwDoc; -class SwSelBoxes; -class SwTblCalcPara; -class SwChartLines; -struct SwPosition; -class SwNodeIndex; -class SwNode; -class SfxPoolItem; -class SwUndoTblMerge; -class SwUndo; -class SwPaM; -class SwTableBox_Impl; -class SwUndoTblCpyTbl; -class SwBoxSelection; -struct SwSaveRowSpan; -struct Parm; - -#ifndef SW_DECL_SWSERVEROBJECT_DEFINED -#define SW_DECL_SWSERVEROBJECT_DEFINED -SV_DECL_REF( SwServerObject ) -#endif - -SV_DECL_PTRARR_DEL(SwTableLines, SwTableLine*, 10, 20) -SV_DECL_PTRARR_DEL(SwTableBoxes, SwTableBox*, 25, 50) - -// Save content-bearing box-pointers additionally in a sorted array -// (for calculation in table). -typedef SwTableBox* SwTableBoxPtr; -SV_DECL_PTRARR_SORT( SwTableSortBoxes, SwTableBoxPtr, 25, 50 ) -typedef SwTableLine* SwTableLinePtr; - -class SW_DLLPUBLIC SwTable: public SwClient //Client of FrmFmt. -{ - - -protected: - SwTableLines aLines; - SwTableSortBoxes aSortCntBoxes; - SwServerObjectRef refObj; // In case DataServer -> pointer is set. - - SwHTMLTableLayout *pHTMLLayout; - - // Usually, the table node of a SwTable can be accessed by getting a box - // out of aSortCntBoxes, which know their SwStartNode. But in some rare - // cases, we need to know the table node of a SwTable, before the table - // boxes have been build (SwTableNode::MakeCopy with tables in tables). - SwTableNode* pTableNode; - - // Should that be adjustable for every table? - TblChgMode eTblChgMode; - - sal_uInt16 nGrfsThatResize; // Count of Grfs that initiate a resize of table - // at HTML-import. - sal_uInt16 nRowsToRepeat; // Number of rows to repeat on every page. - - sal_Bool bModifyLocked :1; - sal_Bool bNewModel :1; // sal_False: old SubTableModel; sal_True: new RowSpanModel -#if OSL_DEBUG_LEVEL > 1 - bool bDontChangeModel; // This is set by functions (like Merge()) to forbid a laet model change. -#endif - - sal_Bool IsModifyLocked(){ return bModifyLocked;} - - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ); - -public: - enum SearchType - { - SEARCH_NONE, // Default: expand to rectangle - SEARCH_ROW, // row selection - SEARCH_COL // column selection - }; - - TYPEINFO(); - - // single argument ctors shall be explicit. - explicit SwTable( SwTableFmt* ); - virtual ~SwTable(); - - // @@@ public copy ctor, but no copy assignment? - SwTable( const SwTable& rTable ); // kein Copy der Lines !! -private: - // @@@ public copy ctor, but no copy assignment? - SwTable & operator= (const SwTable &); - // no default ctor. - SwTable(); - sal_Bool OldMerge( SwDoc*, const SwSelBoxes&, SwTableBox*, SwUndoTblMerge* ); - sal_Bool OldSplitRow( SwDoc*, const SwSelBoxes&, sal_uInt16, sal_Bool ); - sal_Bool NewMerge( SwDoc*, const SwSelBoxes&, const SwSelBoxes& rMerged, - SwTableBox*, SwUndoTblMerge* ); - sal_Bool NewSplitRow( SwDoc*, const SwSelBoxes&, sal_uInt16, sal_Bool ); - SwBoxSelection* CollectBoxSelection( const SwPaM& rPam ) const; - void InsertSpannedRow( SwDoc* pDoc, sal_uInt16 nIdx, sal_uInt16 nCnt ); - sal_Bool _InsertRow( SwDoc*, const SwSelBoxes&, sal_uInt16 nCnt, sal_Bool bBehind ); - sal_Bool NewInsertCol( SwDoc*, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool ); - void _FindSuperfluousRows( SwSelBoxes& rBoxes, SwTableLine*, SwTableLine* ); - void AdjustWidths( const long nOld, const long nNew ); - void NewSetTabCols( Parm &rP, const SwTabCols &rNew, const SwTabCols &rOld, - const SwTableBox *pStart, sal_Bool bCurRowOnly ); - -public: - - SwHTMLTableLayout *GetHTMLTableLayout() { return pHTMLLayout; } - const SwHTMLTableLayout *GetHTMLTableLayout() const { return pHTMLLayout; } - void SetHTMLTableLayout( SwHTMLTableLayout *p ); //Change of property! - - sal_uInt16 IncGrfsThatResize() { return ++nGrfsThatResize; } - sal_uInt16 DecGrfsThatResize() { return nGrfsThatResize ? --nGrfsThatResize : 0; } - - void LockModify() { bModifyLocked = sal_True; } // Must be used always - void UnlockModify() { bModifyLocked = sal_False;} // in pairs! - - void SetTableModel( sal_Bool bNew ){ bNewModel = bNew; } - sal_Bool IsNewModel() const { return bNewModel; } - - sal_uInt16 GetRowsToRepeat() const { return Min( GetTabLines().Count(), nRowsToRepeat ); } - sal_uInt16 _GetRowsToRepeat() const { return nRowsToRepeat; } - void SetRowsToRepeat( sal_uInt16 nNumOfRows ) { nRowsToRepeat = nNumOfRows; } - - bool IsHeadline( const SwTableLine& rLine ) const; - - SwTableLines &GetTabLines() { return aLines; } - const SwTableLines &GetTabLines() const { return aLines; } - - SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); } - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - SwTableFmt* GetTableFmt() const { return (SwTableFmt*)GetRegisteredIn(); } - - void GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart, - sal_Bool bHidden = sal_False, sal_Bool bCurRowOnly = sal_False ) const; - void SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld, - const SwTableBox *pStart, sal_Bool bCurRowOnly ); - -// The following functions are for new table model only... - void CreateSelection( const SwPaM& rPam, SwSelBoxes& rBoxes, - const SearchType eSearchType, bool bProtect ) const; - void CreateSelection( const SwNode* pStart, const SwNode* pEnd, - SwSelBoxes& rBoxes, const SearchType eSearchType, bool bProtect ) const; - void ExpandSelection( SwSelBoxes& rBoxes ) const; - // When a table is splitted into two tables, the row spans which overlaps - // the split have to be corrected and stored for undo - // SwSavRowSpan is the structure needed by Undo to undo the split operation - // CleanUpRowSpan corrects the (top of the) second table and delviers the structure - // for Undo - SwSaveRowSpan* CleanUpTopRowSpan( sal_uInt16 nSplitLine ); - // RestoreRowSpan is called by Undo to restore the old row span values - void RestoreRowSpan( const SwSaveRowSpan& ); - // CleanUpBottomRowSpan corrects the overhanging row spans at the end of the first table - void CleanUpBottomRowSpan( sal_uInt16 nDelLines ); - - -// The following functions are "pseudo-virtual", i.e. they are different for old and new table model -// It's not allowed to change the table model after the first call of one of these functions. - - sal_Bool Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged, - SwTableBox* pMergeBox, SwUndoTblMerge* pUndo = 0 ) - { -#if OSL_DEBUG_LEVEL > 1 - bDontChangeModel = true; -#endif - return bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) : - OldMerge( pDoc, rBoxes, pMergeBox, pUndo ); - } - sal_Bool SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1, - sal_Bool bSameHeight = sal_False ) - { -#if OSL_DEBUG_LEVEL > 1 - bDontChangeModel = true; -#endif - return bNewModel ? NewSplitRow( pDoc, rBoxes, nCnt, bSameHeight ) : - OldSplitRow( pDoc, rBoxes, nCnt, bSameHeight ); - } - bool PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes, - SwSelBoxes& rMerged, SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo ); - void ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax ) const; - void PrepareDeleteCol( long nMin, long nMax ); - - sal_Bool InsertCol( SwDoc*, const SwSelBoxes& rBoxes, - sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); - sal_Bool InsertRow( SwDoc*, const SwSelBoxes& rBoxes, - sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True ); - sal_Bool AppendRow( SwDoc* pDoc, sal_uInt16 nCnt = 1 ); - void PrepareDelBoxes( const SwSelBoxes& rBoxes ); - sal_Bool DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged, - SwUndo* pUndo, const sal_Bool bDelMakeFrms, const sal_Bool bCorrBorder ); - sal_Bool SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1 ); - sal_Bool Merge( const SwSelBoxes& rBoxes, - SwTableBox* pMergeBox, SwUndoTblMerge* = 0 ); - - void FindSuperfluousRows( SwSelBoxes& rBoxes ) - { _FindSuperfluousRows( rBoxes, 0, 0 ); } - void CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const; - - SwTableSortBoxes& GetTabSortBoxes() { return aSortCntBoxes; } - const SwTableSortBoxes& GetTabSortBoxes() const { return aSortCntBoxes; } - - // Read 1st number and delete it from string (used by GetTblBox and SwTblFld). - - // #i80314# - // add 3rd parameter in order to control validation check on <rStr> - static sal_uInt16 _GetBoxNum( String& rStr, - sal_Bool bFirst = sal_False, - const bool bPerformValidCheck = false ); - - // Search content-bearing box with that name. - - // #i80314# - // add 2nd parameter in order to control validation check in called method - // <_GetBoxNum(..)> - const SwTableBox* GetTblBox( const String& rName, - const bool bPerformValidCheck = false ) const; - // Copy selected boxes to another document. - sal_Bool MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&, - sal_Bool bCpyNds = sal_True, sal_Bool bCpyName = sal_False ) const; - // Copy table in this (implemented in TBLRWCL.CXX). - sal_Bool InsTable( const SwTable& rCpyTbl, const SwNodeIndex&, - SwUndoTblCpyTbl* pUndo = 0 ); - sal_Bool InsTable( const SwTable& rCpyTbl, const SwSelBoxes&, - SwUndoTblCpyTbl* pUndo = 0 ); - sal_Bool InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes&, - SwUndoTblCpyTbl* pUndo ); - // Copy headline of table (with content!) into an other one. - sal_Bool CopyHeadlineIntoTable( SwTableNode& rTblNd ); - - // Get box, whose start index is set on nBoxStt. - SwTableBox* GetTblBox( sal_uLong nSttIdx ); - const SwTableBox* GetTblBox( sal_uLong nSttIdx ) const - { return ((SwTable*)this)->GetTblBox( nSttIdx ); } - - // Returns sal_True if table contains nestings. - sal_Bool IsTblComplex() const; - - // Returns sal_True if table or selection is balanced. - sal_Bool IsTblComplexForChart( const String& rSel, - SwChartLines* pGetCLines = 0 ) const; - - // Search all content-bearing boxes of the base line on which this box stands. - // rBoxes as a return value for immediate use. - // steht. rBoxes auch als Return-Wert, um es gleich weiter zu benutzen - // bToTop = sal_True -> up to base line, sal_False-> else only line of box. - SwSelBoxes& SelLineFromBox( const SwTableBox* pBox, - SwSelBoxes& rBoxes, sal_Bool bToTop = sal_True ) const; - - // Get information from client. - virtual sal_Bool GetInfo( SfxPoolItem& ) const; - - // Search in format for registered table. - static SwTable * FindTable( SwFrmFmt const*const pFmt ); - - // Clean up structure a bit. - void GCLines(); - - // Returns the table node via aSortCntBoxes or pTableNode. - SwTableNode* GetTableNode() const; - void SetTableNode( SwTableNode* pNode ) { pTableNode = pNode; } - - // Data server methods. - void SetRefObject( SwServerObject* ); - const SwServerObject* GetObject() const { return &refObj; } - SwServerObject* GetObject() { return &refObj; } - - // Fill data for chart. - void UpdateCharts() const; - - TblChgMode GetTblChgMode() const { return eTblChgMode; } - void SetTblChgMode( TblChgMode eMode ) { eTblChgMode = eMode; } - - sal_Bool SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType, - SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo ); - sal_Bool SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType, - SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo ); - void RegisterToFormat( SwFmt& rFmt ); -#if OSL_DEBUG_LEVEL > 1 - void CheckConsistency() const; -#endif -}; - -class SW_DLLPUBLIC SwTableLine: public SwClient // Client of FrmFmt. -{ - SwTableBoxes aBoxes; - SwTableBox *pUpper; - -public: - TYPEINFO(); - - SwTableLine() : pUpper(0) {} - - SwTableLine( SwTableLineFmt*, sal_uInt16 nBoxes, SwTableBox *pUp ); - virtual ~SwTableLine(); - - SwTableBoxes &GetTabBoxes() { return aBoxes; } - const SwTableBoxes &GetTabBoxes() const { return aBoxes; } - - SwTableBox *GetUpper() { return pUpper; } - const SwTableBox *GetUpper() const { return pUpper; } - void SetUpper( SwTableBox *pNew ) { pUpper = pNew; } - - - SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); } - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - - // Creates a own FrmFmt if more lines depend on it. - SwFrmFmt* ClaimFrmFmt(); - void ChgFrmFmt( SwTableLineFmt* pNewFmt ); - - // Search next/previous box with content. - SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0, - sal_Bool bOvrTblLns=sal_True ) const; - SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0, - sal_Bool bOvrTblLns=sal_True ) const; - - SwTwips GetTableLineHeight( bool& bLayoutAvailable ) const; - - bool hasSoftPageBreak() const; - void RegisterToFormat( SwFmt& rFmt ); -}; - -class SW_DLLPUBLIC SwTableBox: public SwClient //Client of FrmFmt. -{ - friend class SwNodes; // Transpose index. - friend void DelBoxNode(SwTableSortBoxes&); // Delete StartNode* ! - friend class SwXMLTableContext; - - // Not implemented (any more). - SwTableBox( const SwTableBox & ); - SwTableBox &operator=( const SwTableBox &); // Does not exist. - - SwTableLines aLines; - const SwStartNode * pSttNd; - SwTableLine *pUpper; - SwTableBox_Impl* pImpl; - - // In case Format contains formulas/values already, - // a new one must be created for the new box. - SwTableBoxFmt* CheckBoxFmt( SwTableBoxFmt* ); - -public: - TYPEINFO(); - - SwTableBox() : pSttNd(0), pUpper(0), pImpl(0) {} - - SwTableBox( SwTableBoxFmt*, sal_uInt16 nLines, SwTableLine *pUp = 0 ); - SwTableBox( SwTableBoxFmt*, const SwStartNode&, SwTableLine *pUp = 0 ); - SwTableBox( SwTableBoxFmt*, const SwNodeIndex&, SwTableLine *pUp = 0 ); - virtual ~SwTableBox(); - - SwTableLines &GetTabLines() { return aLines; } - const SwTableLines &GetTabLines() const { return aLines; } - - SwTableLine *GetUpper() { return pUpper; } - const SwTableLine *GetUpper() const { return pUpper; } - void SetUpper( SwTableLine *pNew ) { pUpper = pNew; } - - SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); } - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - - // Creates its own FrmFmt if more boxes depend on it. - SwFrmFmt* ClaimFrmFmt(); - void ChgFrmFmt( SwTableBoxFmt *pNewFmt ); - - const SwStartNode *GetSttNd() const { return pSttNd; } - sal_uLong GetSttIdx() const -#if OSL_DEBUG_LEVEL > 1 - ; -#else - { return pSttNd ? pSttNd->GetIndex() : 0; } -#endif - - // Search next/previous box with content. - SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0, - sal_Bool bOvrTblLns=sal_True ) const; - SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0, - sal_Bool bOvrTblLns=sal_True ) const; - // Return name of this box. It is determined dynamically and - // is calculated from the position in the lines/boxes/table. - String GetName() const; - // Return "value" of box (for calculating in table). - double GetValue( SwTblCalcPara& rPara ) const; - - sal_Bool IsInHeadline( const SwTable* pTbl = 0 ) const; - - // Contains box contents, that can be formated as a number? - sal_Bool HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex, - sal_Bool& rIsEmptyTxtNd ) const; - sal_uLong IsValidNumTxtNd( sal_Bool bCheckAttr = sal_True ) const; - // If a table formula is set, test if box contents is congruent with number. - // (For Redo of change of NumFormat!). - sal_Bool IsNumberChanged() const; - - // Is that a formula box or a box with numeric contents (AutoSum)? - // What it is is indicated by the return value - the WhichId of the attribute. - // Empty boxes have the return value USHRT_MAX !! - sal_uInt16 IsFormulaOrValueBox() const; - - // Loading of a document requires an actualisation of cells with values - void ActualiseValueBox(); - - DECL_FIXEDMEMPOOL_NEWDEL(SwTableBox) - - // Access on internal data - currently used for the NumFormatter. - inline const Color* GetSaveUserColor() const; - inline const Color* GetSaveNumFmtColor() const; - inline void SetSaveUserColor(const Color* p ); - inline void SetSaveNumFmtColor( const Color* p ); - - long getRowSpan() const; - void setRowSpan( long nNewRowSpan ); - bool getDummyFlag() const; - void setDummyFlag( bool bDummy ); - - SwTableBox& FindStartOfRowSpan( const SwTable&, sal_uInt16 nMaxStep = USHRT_MAX ); - const SwTableBox& FindStartOfRowSpan( const SwTable& rTable, - sal_uInt16 nMaxStep = USHRT_MAX ) const - { return const_cast<SwTableBox*>(this)->FindStartOfRowSpan( rTable, nMaxStep ); } - - SwTableBox& FindEndOfRowSpan( const SwTable&, sal_uInt16 nMaxStep = USHRT_MAX ); - const SwTableBox& FindEndOfRowSpan( const SwTable& rTable, - sal_uInt16 nMaxStep = USHRT_MAX ) const - { return const_cast<SwTableBox*>(this)->FindEndOfRowSpan( rTable, nMaxStep ); } - void RegisterToFormat( SwFmt& rFmt ) ; - void ForgetFrmFmt(); -}; - -class SwCellFrm; -class SW_DLLPUBLIC SwTableCellInfo : public ::boost::noncopyable -{ - struct Impl; - ::std::auto_ptr<Impl> m_pImpl; - - const SwCellFrm * getCellFrm() const ; - -public: - SwTableCellInfo(const SwTable * pTable); - ~SwTableCellInfo(); - - bool getNext(); - SwRect getRect() const; - const SwTableBox * getTableBox() const; -}; - -#endif //_SWTABLE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx deleted file mode 100644 index e723563738..0000000000 --- a/sw/inc/swtblfmt.hxx +++ /dev/null @@ -1,102 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWTBLFMT_HXX -#define _SWTBLFMT_HXX - -#include <frmfmt.hxx> - -class SwDoc; - -class SW_DLLPUBLIC SwTableFmt : public SwFrmFmt -{ - friend class SwDoc; - -protected: - SwTableFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, - SwFrmFmt *pDrvdFrm ) - : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableSetRange ) - {} - SwTableFmt( SwAttrPool& rPool, const String &rFmtNm, - SwFrmFmt *pDrvdFrm ) - : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableSetRange ) - {} - - -public: - TYPEINFO(); // Already in base class Content. - - DECL_FIXEDMEMPOOL_NEWDEL(SwTableFmt) -}; - -class SwTableLineFmt : public SwFrmFmt -{ - friend class SwDoc; - -protected: - SwTableLineFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, - SwFrmFmt *pDrvdFrm ) - : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange ) - {} - SwTableLineFmt( SwAttrPool& rPool, const String &rFmtNm, - SwFrmFmt *pDrvdFrm ) - : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange ) - {} - -public: - TYPEINFO(); // Already in base class Content. - - DECL_FIXEDMEMPOOL_NEWDEL(SwTableLineFmt) -}; - -class SW_DLLPUBLIC SwTableBoxFmt : public SwFrmFmt -{ - friend class SwDoc; - -protected: - SwTableBoxFmt( SwAttrPool& rPool, const sal_Char* pFmtNm, - SwFrmFmt *pDrvdFrm ) - : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange ) - {} - SwTableBoxFmt( SwAttrPool& rPool, const String &rFmtNm, - SwFrmFmt *pDrvdFrm ) - : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange ) - {} - - // For recognition of changes (especially TableBoxAttribute). - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue ); - -public: - TYPEINFO(); // Already in base class Content. - - DECL_FIXEDMEMPOOL_NEWDEL(SwTableBoxFmt) -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx deleted file mode 100644 index a820e85532..0000000000 --- a/sw/inc/swtypes.hxx +++ /dev/null @@ -1,321 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWTYPES_HXX -#define _SWTYPES_HXX -#include <tools/solar.h> -#include <SwGetPoolIdFromName.hxx> - -#ifndef INCLUDED_LIMITS_H -#include <limits.h> //For LONG_MAX. -#define INCLUDED_LIMITS_H -#endif - -#include <com/sun/star/uno/Reference.h> -#include "swdllapi.h" -#include <i18npool/lang.h> - -namespace com { namespace sun { namespace star { - namespace linguistic2{ - class XDictionaryList; - class XSpellChecker1; - class XHyphenator; - class XThesaurus; - } - namespace beans{ - class XPropertySet; - } -}}} -namespace utl{ - class TransliterationWrapper; -} - -class Size; -class ResMgr; -class UniString; -class ByteString; -class SwPathFinder; -class Graphic; -class OutputDevice; -class CharClass; -class LocaleDataWrapper; -class CollatorWrapper; - -typedef long SwTwips; -#define INVALID_TWIPS LONG_MAX -#define TWIPS_MAX (LONG_MAX - 1) - -#define MM50 283 // 1/2 cm in TWIPS. - -const SwTwips cMinHdFtHeight = 56; - -#define MINFLY 23 // Minimal size for FlyFrms. -#define MINLAY 23 // Minimal size for other Frms. - -// Default column distance of two text columns corresponds to 0.3 cm. -#define DEF_GUTTER_WIDTH (MM50 / 5 * 3) - -// Minimal distance (distance to text) for border attribute -// in order not to crock up aligned lines. -// 28 Twips == 0,4mm -#define MIN_BORDER_DIST 28 - -// Minimal document border. -const SwTwips lMinBorder = 1134; - -// Margin left and above document. -// Half of it is gap between the pages. -#define DOCUMENTBORDER 568L -#define GAPBETWEENPAGES 284L - -#define UNDO_ACTION_COUNT 20 - -// Constant strings. -SW_DLLPUBLIC extern UniString aEmptyStr; // "" -extern ByteString aEmptyByteStr; // "" -SW_DLLPUBLIC extern UniString aDotStr; // '.' - -// For inserting of captions (what and where to insert). -// It's here because it is not big enough to justify its own hxx -// and does not seem to fit somewhere else. -enum SwLabelType -{ - LTYPE_TABLE, // Caption for a table. - LTYPE_OBJECT, // Caption for a graphic or OLE. - LTYPE_FLY, // Caption for a text frame. - LTYPE_DRAW // Caption for a draw object. -}; - - -const sal_uInt8 OLD_MAXLEVEL = 5; -const sal_uInt8 MAXLEVEL = 10; // Was: numrule.hxx. -const sal_uInt8 NO_NUM = 200; // Was: numrule.hxx. - - -// For paragraphs with NO_NUM but on different levels. -// This makes the NO_NUM inapplicable. -const sal_uInt8 NO_NUMLEVEL = 0x20; // "or" with the levels. - - -// Some helper functions as macros or inlines. - -// One kilobyte is 1024 bytes: -#define KB 1024 - -#define SET_CURR_SHELL( shell ) CurrShell aCurr( shell ) - -// pPathFinder is initialized by the UI. -// The class delivers all paths needed. -extern SwPathFinder *pPathFinder; - -// Values for indents at numbering and bullet lists. -// (For more levels the values have to be multiplied with the levels+1; -// levels 0 ..4!) - -const sal_uInt16 lBullIndent = 1440/4; -const short lBullFirstLineOffset = -lBullIndent; -const sal_uInt16 lNumIndent = 1440/4; -const short lNumFirstLineOffset = -lNumIndent; -const short lOutlineMinTextDistance = 216; // 0.15 inch = 0.38 cm - -// Count of SystemField-types of SwDoc. -#define INIT_FLDTYPES 32 - -// Count of predefined Seq-field types. It is always the last -// fields before INIT_FLDTYPES. -#define INIT_SEQ_FLDTYPES 4 - -// The former Rendevouz-IDs live on: -// There are IDs for the anchors (SwFmtAnchor) and some others -// that are only of importance for interfaces (SwDoc). -enum RndStdIds -{ - FLY_AT_PARA, // Anchored at paragraph. - FLY_AS_CHAR, // Anchored as character. - FLY_AT_PAGE, // Anchored at page. - FLY_AT_FLY, // Anchored at frame. - FLY_AT_CHAR, // Anchored at character. - - RND_STD_HEADER, - RND_STD_FOOTER, - RND_STD_HEADERL, - RND_STD_HEADERR, - RND_STD_FOOTERL, - RND_STD_FOOTERR, - - RND_DRAW_OBJECT // A draw-Object! For the SwDoc-interface only! -}; - - -extern ResMgr* pSwResMgr; // Is in swapp0.cxx. -#define SW_RES(i) ResId(i,*pSwResMgr) -#define SW_RESSTR(i) UniString(ResId(i,*pSwResMgr)) - -::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XSpellChecker1 > GetSpellChecker(); -::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XHyphenator > GetHyphenator(); -::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XThesaurus > GetThesaurus(); -::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > GetLinguPropertySet(); - -// Returns the twip size of this graphic. -SW_DLLPUBLIC Size GetGraphicSizeTwip( const Graphic&, OutputDevice* pOutDev ); - - -// Separator for jumps to different content types in document. -const sal_Unicode cMarkSeperator = '|'; -extern const sal_Char* pMarkToTable; // Strings are -extern const sal_Char* pMarkToFrame; // in Init.cxx. -extern const sal_Char* pMarkToRegion; -SW_DLLPUBLIC extern const sal_Char* pMarkToOutline; -extern const sal_Char* pMarkToText; -extern const sal_Char* pMarkToGraphic; -extern const sal_Char* pMarkToOLE; - -#ifndef DB_DELIM // This is defined in OFA! -#define DB_DELIM ((sal_Unicode)0xff) // Database <-> table separator. -#endif - - -typedef sal_uInt16 SetAttrMode; - -namespace nsSetAttrMode -{ - const SetAttrMode SETATTR_DEFAULT = 0x0000; // Default. - const SetAttrMode SETATTR_DONTEXPAND = 0x0001; // Don't expand text attribute any further. - const SetAttrMode SETATTR_DONTREPLACE = 0x0002; // Don't replace another text attribute. - - const SetAttrMode SETATTR_NOTXTATRCHR = 0x0004; // Don't insert 0xFF at attributes with no end. - const SetAttrMode SETATTR_NOHINTADJUST = 0x0008; // No merging of ranges. - const SetAttrMode SETATTR_NOFORMATATTR = 0x0010; // Do not change into format attribute. - const SetAttrMode SETATTR_DONTCHGNUMRULE = 0x0020; // Do not change NumRule. - const SetAttrMode SETATTR_APICALL = 0x0040; // Called from API (all UI related - // functionality will be disabled). - /// Force hint expand (only matters for hints with CH_TXTATR). - const SetAttrMode SETATTR_FORCEHINTEXPAND= 0x0080; - /// The inserted item is a copy -- intended for use in ndtxt.cxx. - const SetAttrMode SETATTR_IS_COPY = 0x0100; -} - -// Conversion Twip <-> 1/100 mm for UNO - -#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L)) -#define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L)) -#define TWIP_TO_MM100_UNSIGNED(TWIP) ((((TWIP)*127L+36L)/72L)) -#define MM100_TO_TWIP_UNSIGNED(MM100) ((((MM100)*72L+63L)/127L)) - -#define SW_ISPRINTABLE( c ) ( c >= ' ' && 127 != c ) - -#ifndef SW_CONSTASCII_DECL -#define SW_CONSTASCII_DECL( n, s ) n[sizeof(s)] -#endif -#ifndef SW_CONSTASCII_DEF -#define SW_CONSTASCII_DEF( n, s ) n[sizeof(s)] = s -#endif - - -#define CHAR_HARDBLANK ((sal_Unicode)0x00A0) -#define CHAR_HARDHYPHEN ((sal_Unicode)0x2011) -#define CHAR_SOFTHYPHEN ((sal_Unicode)0x00AD) -#define CHAR_RLM ((sal_Unicode)0x200F) -#define CHAR_LRM ((sal_Unicode)0x200E) -#define CHAR_ZWSP ((sal_Unicode)0x200B) -#define CHAR_ZWNBSP ((sal_Unicode)0x2060) - - -// Returns the APP - CharClass instance - used for all ToUpper/ToLower/... -SW_DLLPUBLIC CharClass& GetAppCharClass(); -SW_DLLPUBLIC LanguageType GetAppLanguage(); - - -#if 0 -// I18N doesn't get this right, can't specify more than one to ignore -#define SW_COLLATOR_IGNORES ( \ - ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_CASE | \ - ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_KANA | \ - ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_WIDTH ) -#else -#define SW_COLLATOR_IGNORES ( \ - ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_CASE ) -#endif - -SW_DLLPUBLIC CollatorWrapper& GetAppCollator(); -SW_DLLPUBLIC CollatorWrapper& GetAppCaseCollator(); - -SW_DLLPUBLIC const ::utl::TransliterationWrapper& GetAppCmpStrIgnore(); - -// Official shortcut for Prepare() regarding notification of Content by the Layout. -// Content provides for calculation of minimal requirements at the next call of ::Format(). -enum PrepareHint -{ - PREP_BEGIN, // BEGIN. - PREP_CLEAR = PREP_BEGIN,// Reformat completely. - PREP_WIDOWS_ORPHANS, // Only check for widows and orphans and split in case of need. - PREP_FIXSIZE_CHG, // FixSize has changed. - PREP_FOLLOW_FOLLOWS, // Follow is now possibly adjacent. - PREP_ADJUST_FRM, // Adjust size via grow/shrink without formating. - PREP_FLY_CHGD, // A FlyFrm has changed its size. - PREP_FLY_ATTR_CHG, // A FlyFrm hat has changed its attributes - // (e. g. wrap). - PREP_FLY_ARRIVE, // A FlyFrm now overlaps range. - PREP_FLY_LEAVE, // A FlyFrm has left range. - PREP_FTN, // Invalidation of footnotes. - PREP_POS_CHGD, // Position of Frm has changed. - // (Check for Fly-break). In void* of Prepare() - // a sal_Bool& is passed. If this is sal_True, - // it indicateds that a format has been executed. - PREP_UL_SPACE, // UL-Space has changed, TxtFrms have to - // re-calculate line space. - PREP_MUST_FIT, // Make frm fit (split) even if the attributes do - // not allow that (e.g. "keep together"). - PREP_WIDOWS, // A follow realizes that the orphan rule will be applied - // for it and sends a PREP_WIDOWS to its predecessor - // (Master/Follow). - PREP_QUOVADIS, // If a footnote has to be split between two paragraphs - // the last on the page has to receive a QUOVADIS in or- - // der to format the text into it. - PREP_BOSS_CHGD, // If a Frm changes its column/page this additional - // Prepare is sended to POS_CHGD in MoveFwd/Bwd - // (join Ftn-numbers etc.) - // Direction is communicated via pVoid: - // MoveFwd: pVoid == 0 - // MoveBwd: pVoid == pOldPage - PREP_SWAP, // Swap graphic; for graphics in visible area. - PREP_REGISTER, // Invalidate frames with registers. - PREP_FTN_GONE, // A Follow loses its footnote, possibly its first line can move up. - PREP_MOVEFTN, // A footnote changes its page. Its contents receives at first a - // height of zero in order to avoid too much noise. At formating - // it checks whether it fits and if necessary changes its page again. - PREP_ERGOSUM, // Needed because of movement in FtnFrms. Check QuoVadis/ErgoSum. - PREP_END // END. -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx deleted file mode 100644 index 68b29d06f8..0000000000 --- a/sw/inc/swundo.hxx +++ /dev/null @@ -1,186 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 SWUNDO_HXX -#define SWUNDO_HXX - -#include <vector> - -#include <rtl/ustring.hxx> - - -typedef ::std::vector< ::rtl::OUString > SwUndoComments_t; - - -// The IDs for StdActions. -enum SwUndoId -{ - UNDO_EMPTY = 0, - UNDO_STD_BEGIN = 1, - UNDO_START = UNDO_STD_BEGIN, // 1 - UNDO_END, // 2 - REPEAT_START, // All UndoIDs between REPEAT_START and - // REPEAT_END are Repeat-enabled !! - UNDO_DELETE = REPEAT_START, // 3 - UNDO_INSERT, // 4 - UNDO_OVERWRITE, // 5 - UNDO_SPLITNODE, // 6 - UNDO_INSATTR, // 7 - UNDO_SETFMTCOLL, // 8 - UNDO_RESETATTR, // 9 - UNDO_INSFMTATTR, // 10 - UNDO_INSDOKUMENT, // 11 - UNDO_COPY, // 12 - UNDO_INSTABLE, // 13 - UNDO_TABLETOTEXT, // 14 - UNDO_TEXTTOTABLE, // 15 - UNDO_SORT_TXT, // 16 - UNDO_INSLAYFMT, // 17 - UNDO_TABLEHEADLINE, // 18 - UNDO_INSSECTION, // 19 - UNDO_OUTLINE_LR, // 20 - UNDO_OUTLINE_UD, // 21 - UNDO_INSNUM, // 22 - UNDO_NUMUP, // 23 - UNDO_MOVENUM, // 24 - UNDO_INSDRAWFMT, // 25 - UNDO_NUMORNONUM, // 26 - UNDO_INC_LEFTMARGIN, // 27 - UNDO_DEC_LEFTMARGIN, // 28 - UNDO_INSERTLABEL, // 29 - UNDO_SETNUMRULESTART, // 30 - UNDO_CHGFTN, // 31 - UNDO_REDLINE, // 32 - UNDO_ACCEPT_REDLINE, // 33 - UNDO_REJECT_REDLINE, // 34 - UNDO_SPLIT_TABLE, // 35 - UNDO_DONTEXPAND, // 36 - UNDO_AUTOCORRECT, // 37 - UNDO_MERGE_TABLE, // 38 - UNDO_TRANSLITERATE, // 39 - - UNDO_PASTE_CLIPBOARD, // 40 - UNDO_TYPING, // 41 - UNDO_REPEAT_DUMMY_6, // 42 - UNDO_REPEAT_DUMMY_7, // 43 - UNDO_REPEAT_DUMMY_8, // 44 - UNDO_REPEAT_DUMMY_9, // 45 - REPEAT_END, - - UNDO_MOVE = REPEAT_END, // 46 - UNDO_INSGLOSSARY, // 47 - UNDO_DELBOOKMARK, // 48 - UNDO_INSBOOKMARK, // 49 - UNDO_SORT_TBL, // 50 - UNDO_DELLAYFMT, // 51 - UNDO_AUTOFORMAT, // 52 - UNDO_REPLACE, // 53 - UNDO_DELSECTION, // 54 - UNDO_CHGSECTION, // 55 - UNDO_CHGSECTIONPASSWD, // 56 - UNDO_SETDEFTATTR, // 57 - UNDO_DELNUM, // 58 - UNDO_DRAWUNDO, // 59 - UNDO_DRAWGROUP, // 60 - UNDO_DRAWUNGROUP, // 61 - UNDO_DRAWDELETE, // 62 - UNDO_REREAD, // 63 - UNDO_DELGRF, // 64 - UNDO_DELOLE, // 65 - UNDO_TABLE_ATTR, // 66 - UNDO_TABLE_AUTOFMT, // 67 - UNDO_TABLE_INSCOL, // 68 - UNDO_TABLE_INSROW, // 69 - UNDO_TABLE_DELBOX, // 70 - UNDO_TABLE_SPLIT, // 71 - UNDO_TABLE_MERGE, // 72 - UNDO_TBLNUMFMT, // 73 - UNDO_INSTOX, // 74 - UNDO_CLEARTOXRANGE, // 75 - UNDO_TBLCPYTBL, // 76 - UNDO_CPYTBL, // 77 - UNDO_INS_FROM_SHADOWCRSR, // 78 - UNDO_CHAINE, // 79 - UNDO_UNCHAIN, // 80 - UNDO_FTNINFO, // 81 - UNDO_ENDNOTEINFO, // 82 - UNDO_COMPAREDOC, // 83 - UNDO_SETFLYFRMFMT, // 84 - UNDO_SETRUBYATTR, // 85 - - UNDO_TMPAUTOCORR, // 86 - UNDO_TOXCHANGE, // 87 - UNDO_CREATE_PAGEDESC, // 88 - UNDO_CHANGE_PAGEDESC, // 89 - UNDO_DELETE_PAGEDESC, // 90 - UNDO_HEADER_FOOTER, // 91 #i7983# - UNDO_FIELD, // 92 - UNDO_TXTFMTCOL_CREATE, // 93 - UNDO_TXTFMTCOL_DELETE, // 94 - UNDO_TXTFMTCOL_RENAME, // 95 - UNDO_CHARFMT_CREATE, // 96 - UNDO_CHARFMT_DELETE, // 97 - UNDO_CHARFMT_RENAME, // 98 - UNDO_FRMFMT_CREATE, // 99 - UNDO_FRMFMT_DELETE, // 100 - UNDO_FRMFMT_RENAME, // 101 - UNDO_NUMRULE_CREATE,// 102 - UNDO_NUMRULE_DELETE,// 103 - UNDO_NUMRULE_RENAME,// 104 - UNDO_BOOKMARK_RENAME, // 105 - UNDO_INDEX_ENTRY_INSERT, // 106 - UNDO_INDEX_ENTRY_DELETE, // 107 - UNDO_COL_DELETE, // 108 - UNDO_ROW_DELETE, // 109 - UNDO_RENAME_PAGEDESC, // 110 - UNDO_NUMDOWN, // 111 - // --> #i73249# - UNDO_FLYFRMFMT_TITLE, // 112 - UNDO_FLYFRMFMT_DESCRIPTION, // 113 - UNDO_STD_END= UNDO_FLYFRMFMT_DESCRIPTION, - - // UI undo ID's... - UNDO_UI_REPLACE = UNDO_STD_END + 1, - UNDO_UI_INSERT_PAGE_BREAK, - UNDO_UI_INSERT_COLUMN_BREAK, - UNDO_UI_PLAY_MACRO, - UNDO_UI_INSERT_ENVELOPE, - UNDO_UI_DRAG_AND_COPY, - UNDO_UI_DRAG_AND_MOVE, - UNDO_UI_INSERT_RULER, - UNDO_UI_INSERT_CHART, - UNDO_UI_INSERT_FOOTNOTE, - UNDO_UI_INSERT_URLBTN, - UNDO_UI_INSERT_URLTXT, - UNDO_UI_DELETE_INVISIBLECNTNT, - UNDO_UI_REPLACE_STYLE -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swunodef.hxx b/sw/inc/swunodef.hxx deleted file mode 100644 index 842de9aa8a..0000000000 --- a/sw/inc/swunodef.hxx +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWUNODEF_HXX -#define _SWUNODEF_HXX - -#define STAR_NMSPC ::com::sun::star -#define UNO_NMSPC STAR_NMSPC::uno -#define CLIP_NMSPC STAR_NMSPC::datatransfer::clipboard - -#define STAR_REFERENCE(aType) UNO_NMSPC::Reference< STAR_NMSPC::aType > - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx deleted file mode 100644 index fa0d2621af..0000000000 --- a/sw/inc/swunohelper.hxx +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWUNOHELPER_HXX -#define _SWUNOHELPER_HXX - -#include <tools/solar.h> -#include <sal/types.h> -#include "swdllapi.h" - -namespace com { namespace sun { namespace star { - namespace uno { - class Any; - } -}}} - -class String; -class SvStrings; -class SvPtrarr; - -namespace SWUnoHelper { - -// calls over the compherl the getEnumAsInt32 function and handle the -// exceptions. -sal_Int32 GetEnumAsInt32( const com::sun::star::uno::Any& rVal ); - - -// methods for UCB actions: - // delete the file under this URL -SW_DLLPUBLIC sal_Bool UCB_DeleteFile( const String& rURL ); - - // copy/move the file to a new location -sal_Bool UCB_CopyFile( const String& rURL, const String& rNewURL, - sal_Bool bCopyIsMove = sal_False ); - - // is the URL on the current system case sentive? -SW_DLLPUBLIC sal_Bool UCB_IsCaseSensitiveFileName( const String& rURL ); - - // is the URL readonly? -SW_DLLPUBLIC sal_Bool UCB_IsReadOnlyFileName( const String& rURL ); - - // get a list of files from the folder of the URL - // options: pExtension = 0 -> all, else this specific extension - // pDateTime != 0 -> returns also the modified date/time of - // the files in a SvPtrarr --> - // !! objects must be deleted from the caller!! -sal_Bool UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList, - const String* pExtension = 0, - SvPtrarr* pDateTimeList = 0 ); - - // is the URL an existing file? -SW_DLLPUBLIC sal_Bool UCB_IsFile( const String& rURL ); - - // is the URL a existing directory? -sal_Bool UCB_IsDirectory( const String& rURL ); -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swurl.hxx b/sw/inc/swurl.hxx deleted file mode 100644 index 88fea6238c..0000000000 --- a/sw/inc/swurl.hxx +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWURL_HXX -#define _SWURL_HXX - -#include <tools/solar.h> - - -class UniString; -class ViewShell; - -#define URLLOAD_NOFILTER 0x0000 -#define URLLOAD_NEWVIEW 0x8000 - - -void LoadURL( const UniString& rName, ViewShell* pSh, - sal_uInt16 nFilter = URLLOAD_NOFILTER, - const UniString *pTargetFrameName = 0 ); - - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swwait.hxx b/sw/inc/swwait.hxx deleted file mode 100644 index 412e8f47cc..0000000000 --- a/sw/inc/swwait.hxx +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWWAIT_HXX -#define _SWWAIT_HXX - -#include <tools/solar.h> -#include "swdllapi.h" - -class SwDocShell; - -class SW_DLLPUBLIC SwWait -{ - SwDocShell &rDoc; - sal_Bool bLock; -public: - SwWait( SwDocShell &rDocShell, sal_Bool bLockDispatcher ); - ~SwWait(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx deleted file mode 100644 index c873cba9df..0000000000 --- a/sw/inc/tabcol.hxx +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TABCOL_HXX -#define _TABCOL_HXX - -#include <tools/solar.h> - -#ifndef INCLUDED_VECTOR -#include <vector> -#define INCLUDED_VECTOR -#endif -#include "swdllapi.h" - -struct SwTabColsEntry -{ - long nPos; - long nMin; - long nMax; - sal_Bool bHidden; // For each entry a flag, hidden or not. - // If the flag bHidden is sal_True column separator - // is not in current line. It must maintained - // but it may not be displayed. -}; - -typedef std::vector< SwTabColsEntry > SwTabColsEntries; - -class SW_DLLPUBLIC SwTabCols -{ - long nLeftMin, // Leftmost border (reference point) for - // document coordinates. - // All other values are relative to this point! - nLeft, // Left border of table. - nRight, // Right border of table. - nRightMax; // Maximum right border of table. - - bool bLastRowAllowedToChange; // If the last row of the table frame - // is split across pages, it may not - // change its size. - - SwTabColsEntries aData; - - //For the CopyCTor. - const SwTabColsEntries& GetData() const { return aData; } - -public: - SwTabCols( sal_uInt16 nSize = 0 ); - SwTabCols( const SwTabCols& ); - SwTabCols &operator=( const SwTabCols& ); - sal_Bool operator==( const SwTabCols& rCmp ) const; - long& operator[]( sal_uInt16 nPos ) { return aData[nPos].nPos; } - long operator[]( sal_uInt16 nPos ) const { return aData[nPos].nPos; } - sal_uInt16 Count() const { return sal::static_int_cast< sal_uInt16 >(aData.size()); } - - sal_Bool IsHidden( sal_uInt16 nPos ) const { return aData[nPos].bHidden; } - void SetHidden( sal_uInt16 nPos, sal_Bool bValue ) { aData[nPos].bHidden = bValue; } - - void Insert( long nValue, sal_Bool bValue, sal_uInt16 nPos ); - void Insert( long nValue, long nMin, long nMax, sal_Bool bValue, sal_uInt16 nPos ); - void Remove( sal_uInt16 nPos, sal_uInt16 nAnz = 1 ); - - const SwTabColsEntry& GetEntry( sal_uInt16 nPos ) const { return aData[nPos]; } - SwTabColsEntry& GetEntry( sal_uInt16 nPos ) { return aData[nPos]; } - - long GetLeftMin() const { return nLeftMin; } - long GetLeft() const { return nLeft; } - long GetRight() const { return nRight; } - long GetRightMax()const { return nRightMax;} - - void SetLeftMin ( long nNew ) { nLeftMin = nNew; } - void SetLeft ( long nNew ) { nLeft = nNew; } - void SetRight ( long nNew ) { nRight = nNew; } - void SetRightMax( long nNew ) { nRightMax = nNew;} - - bool IsLastRowAllowedToChange() const { return bLastRowAllowedToChange; } - void SetLastRowAllowedToChange( bool bNew ) { bLastRowAllowedToChange = bNew; } -}; - -#endif //_TABCOL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx deleted file mode 100644 index 7e091d853a..0000000000 --- a/sw/inc/tblafmt.hxx +++ /dev/null @@ -1,264 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TBLAFMT_HXX -#define _TBLAFMT_HXX -/************************************************************************* -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - The structure of table auto formatting should not be changed. It is used - by different code of Writer and Calc. If a change is necessary, the - source code of both applications must be changed! - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -**************************************************************************/ - -#include <svl/svarray.hxx> -#include "hintids.hxx" // _Always_ before the solar-items! -#include <svx/algitem.hxx> -#include <editeng/fontitem.hxx> -#include <editeng/fhgtitem.hxx> -#include <editeng/wghtitem.hxx> -#include <editeng/postitem.hxx> -#include <editeng/udlnitem.hxx> -#include <editeng/crsditem.hxx> -#include <editeng/cntritem.hxx> -#include <editeng/shdditem.hxx> -#include <editeng/colritem.hxx> -#include <editeng/boxitem.hxx> -#include <editeng/brshitem.hxx> -#include <editeng/adjitem.hxx> -#include <editeng/justifyitem.hxx> -#include <svx/rotmodit.hxx> -#include <svl/intitem.hxx> -#include <editeng/bolnitem.hxx> -#include "swdllapi.h" - -struct SwAfVersions; - -class SvNumberFormatter; - -class SwBoxAutoFmt -{ - // common attributes of Calc and Writer - // --- from 641 on: CJK and CTL font settings - SvxFontItem aFont; - SvxFontHeightItem aHeight; - SvxWeightItem aWeight; - SvxPostureItem aPosture; - - SvxFontItem aCJKFont; - SvxFontHeightItem aCJKHeight; - SvxWeightItem aCJKWeight; - SvxPostureItem aCJKPosture; - - SvxFontItem aCTLFont; - SvxFontHeightItem aCTLHeight; - SvxWeightItem aCTLWeight; - SvxPostureItem aCTLPosture; - - SvxUnderlineItem aUnderline; - SvxOverlineItem aOverline; - SvxCrossedOutItem aCrossedOut; - SvxContourItem aContour; - SvxShadowedItem aShadowed; - SvxColorItem aColor; - SvxBoxItem aBox; - SvxLineItem aTLBR; - SvxLineItem aBLTR; - SvxBrushItem aBackground; - - // Writer specific - SvxAdjustItem aAdjust; - - // Calc specific - SvxHorJustifyItem aHorJustify; - SvxVerJustifyItem aVerJustify; - SfxBoolItem aStacked; - SvxMarginItem aMargin; - SfxBoolItem aLinebreak; - SfxInt32Item aRotateAngle; - SvxRotateModeItem aRotateMode; - - // number format - String sNumFmtString; - LanguageType eSysLanguage, eNumFmtLanguage; - -public: - SwBoxAutoFmt(); - SwBoxAutoFmt( const SwBoxAutoFmt& rNew ); - ~SwBoxAutoFmt(); - - int operator==( const SwBoxAutoFmt& rCmp ) const; - SwBoxAutoFmt& operator=( const SwBoxAutoFmt& rNew ); - - // The get-methods. - const SvxFontItem &GetFont() const { return aFont; } - const SvxFontHeightItem &GetHeight() const { return aHeight; } - const SvxWeightItem &GetWeight() const { return aWeight; } - const SvxPostureItem &GetPosture() const { return aPosture; } - const SvxFontItem &GetCJKFont() const { return aCJKFont; } - const SvxFontHeightItem &GetCJKHeight() const { return aCJKHeight; } - const SvxWeightItem &GetCJKWeight() const { return aCJKWeight; } - const SvxPostureItem &GetCJKPosture() const { return aCJKPosture; } - const SvxFontItem &GetCTLFont() const { return aCTLFont; } - const SvxFontHeightItem &GetCTLHeight() const { return aCTLHeight; } - const SvxWeightItem &GetCTLWeight() const { return aCTLWeight; } - const SvxPostureItem &GetCTLPosture() const { return aCTLPosture; } - const SvxUnderlineItem &GetUnderline() const { return aUnderline; } - const SvxOverlineItem &GetOverline() const { return aOverline; } - const SvxCrossedOutItem &GetCrossedOut() const { return aCrossedOut; } - const SvxContourItem &GetContour() const { return aContour; } - const SvxShadowedItem &GetShadowed() const { return aShadowed; } - const SvxColorItem &GetColor() const { return aColor; } - const SvxAdjustItem &GetAdjust() const { return aAdjust; } - const SvxBoxItem &GetBox() const { return aBox; } - const SvxLineItem &GetTLBR() const { return aTLBR; } - const SvxLineItem &GetBLTR() const { return aBLTR; } - const SvxBrushItem &GetBackground() const { return aBackground; } - void GetValueFormat( String& rFmt, LanguageType& rLng, LanguageType& rSys ) const - { rFmt = sNumFmtString; rLng = eNumFmtLanguage; rSys = eSysLanguage; } - - // The set-methods. - void SetFont( const SvxFontItem& rNew ) { aFont = rNew; } - void SetHeight( const SvxFontHeightItem& rNew ) { aHeight = rNew; } - void SetWeight( const SvxWeightItem& rNew ) { aWeight = rNew; } - void SetPosture( const SvxPostureItem& rNew ) { aPosture = rNew; } - void SetCJKFont( const SvxFontItem& rNew ) { aCJKFont = rNew; } - void SetCJKHeight( const SvxFontHeightItem& rNew ) { aCJKHeight = rNew; } - void SetCJKWeight( const SvxWeightItem& rNew ) { aCJKWeight = rNew; } - void SetCJKPosture( const SvxPostureItem& rNew ) { aCJKPosture = rNew; } - void SetCTLFont( const SvxFontItem& rNew ) { aCTLFont = rNew; } - void SetCTLHeight( const SvxFontHeightItem& rNew ) { aCTLHeight = rNew; } - void SetCTLWeight( const SvxWeightItem& rNew ) { aCTLWeight = rNew; } - void SetCTLPosture( const SvxPostureItem& rNew ) { aCTLPosture = rNew; } - void SetUnderline( const SvxUnderlineItem& rNew ) { aUnderline = rNew; } - void SetOverline( const SvxOverlineItem& rNew ) { aOverline = rNew; } - void SetCrossedOut( const SvxCrossedOutItem& rNew ) { aCrossedOut = rNew; } - void SetContour( const SvxContourItem& rNew ) { aContour = rNew; } - void SetShadowed( const SvxShadowedItem& rNew ) { aShadowed = rNew; } - void SetColor( const SvxColorItem& rNew ) { aColor = rNew; } - void SetAdjust( const SvxAdjustItem& rNew ) - { - aAdjust.SetAdjust( rNew.GetAdjust() ); - aAdjust.SetOneWord( rNew.GetOneWord() ); - aAdjust.SetLastBlock( rNew.GetLastBlock() ); - } - void SetBox( const SvxBoxItem& rNew ) { aBox = rNew; } - void SetBackground( const SvxBrushItem& rNew ) { aBackground = rNew; } - void SetValueFormat( const String& rFmt, LanguageType eLng, LanguageType eSys ) - { sNumFmtString = rFmt; eNumFmtLanguage = eLng; eSysLanguage = eSys; } - - sal_Bool Load( SvStream& rStream, const SwAfVersions& rVersions, sal_uInt16 nVer ); - sal_Bool Save( SvStream& rStream ) const; - sal_Bool SaveVerionNo( SvStream& rStream ) const; - -#ifdef READ_OLDVERS - // load old version. - sal_Bool LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] ); -#endif -}; - -class SW_DLLPUBLIC SwTableAutoFmt -{ - friend void _FinitCore(); // To destroy dflt. pointer. - static SwBoxAutoFmt* pDfltBoxAutoFmt; - - String aName; - sal_uInt16 nStrResId; - - // Common flags of Calc and Writer. - sal_Bool bInclFont : 1; - sal_Bool bInclJustify : 1; - sal_Bool bInclFrame : 1; - sal_Bool bInclBackground : 1; - sal_Bool bInclValueFormat : 1; - - // Calc specific flags. - sal_Bool bInclWidthHeight : 1; - - SwBoxAutoFmt* aBoxAutoFmt[ 16 ]; - -public: - SwTableAutoFmt( const String& rName ); - SwTableAutoFmt( const SwTableAutoFmt& rNew ); - ~SwTableAutoFmt(); - - SwTableAutoFmt& operator=( const SwTableAutoFmt& rNew ); - - void SetBoxFmt( const SwBoxAutoFmt& rNew, sal_uInt8 nPos ); - const SwBoxAutoFmt& GetBoxFmt( sal_uInt8 nPos ) const; - - void SetName( const String& rNew ) { aName = rNew; nStrResId = USHRT_MAX; } - const String& GetName() const { return aName; } - - enum UpdateFlags { UPDATE_CHAR = 1, UPDATE_BOX = 2, UPDATE_ALL = 3 }; - SwBoxAutoFmt& UpdateFromSet( sal_uInt8 nPos, const SfxItemSet& rSet, - UpdateFlags eFlags, SvNumberFormatter* ); - void UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet, UpdateFlags eFlags, - SvNumberFormatter* ) const ; - - sal_Bool IsFont() const { return bInclFont; } - sal_Bool IsJustify() const { return bInclJustify; } - sal_Bool IsFrame() const { return bInclFrame; } - sal_Bool IsBackground() const { return bInclBackground; } - sal_Bool IsValueFormat() const { return bInclValueFormat; } - - void SetFont( const sal_Bool bNew ) { bInclFont = bNew; } - void SetJustify( const sal_Bool bNew ) { bInclJustify = bNew; } - void SetFrame( const sal_Bool bNew ) { bInclFrame = bNew; } - void SetBackground( const sal_Bool bNew ) { bInclBackground = bNew; } - void SetValueFormat( const sal_Bool bNew ) { bInclValueFormat = bNew; } - void SetWidthHeight( const sal_Bool bNew ) { bInclWidthHeight = bNew; } - - sal_Bool Load( SvStream& rStream, const SwAfVersions& ); - sal_Bool Save( SvStream& rStream ) const; - -#ifdef READ_OLDVERS - // Load old versions. - sal_Bool LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] ); -#endif -}; - -typedef SwTableAutoFmt* SwTableAutoFmtPtr ; -SV_DECL_PTRARR_DEL( _SwTableAutoFmtTbl, SwTableAutoFmtPtr, 1, 5 ) - -class SW_DLLPUBLIC SwTableAutoFmtTbl : public _SwTableAutoFmtTbl -{ - SW_DLLPRIVATE sal_Bool Load( SvStream& rStream ); - SW_DLLPRIVATE sal_Bool Save( SvStream& rStream ) const; - -public: - SwTableAutoFmtTbl(); - - sal_Bool Load(); - sal_Bool Save() const; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/tblenum.hxx b/sw/inc/tblenum.hxx deleted file mode 100644 index ecd5b14ae5..0000000000 --- a/sw/inc/tblenum.hxx +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TBLENUM_HXX -#define _TBLENUM_HXX - - -// For changing table columns/rows widths/heights. -typedef sal_uInt16 TblChgWidthHeightType; - -namespace nsTblChgWidthHeightType -{ - const TblChgWidthHeightType WH_COL_LEFT = 0; - const TblChgWidthHeightType WH_COL_RIGHT = 1; - const TblChgWidthHeightType WH_ROW_TOP = 2; - const TblChgWidthHeightType WH_ROW_BOTTOM = 3; - const TblChgWidthHeightType WH_CELL_LEFT = 4; - const TblChgWidthHeightType WH_CELL_RIGHT = 5; - const TblChgWidthHeightType WH_CELL_TOP = 6; - const TblChgWidthHeightType WH_CELL_BOTTOM = 7; - - - // The following can "or"ed into. - const TblChgWidthHeightType WH_FLAG_INSDEL = 0x4000; // Insert/Del-mode: the Bigger-Flag - // tells what happens: - // bBigger -> box gets removed. - // !bBigger-> box gets inserted. - const TblChgWidthHeightType WH_FLAG_BIGGER = 0x8000; // Box becomes larger -> else smaller. -} - -enum TblChgMode -{ - TBLFIX_CHGABS, // Table fixed width, change neighbour. - TBLFIX_CHGPROP, // Table fixed width, change all neighbours. - TBLVAR_CHGABS // Table variable, change all neighbours. -}; - - -enum SplitTbl_HeadlineOption -{ - HEADLINE_NONE = 0, // Leave everything in place. - HEADLINE_BORDERCOPY, // von der davor obere Line der vorhergehen Line - HEADLINE_CNTNTCOPY, // Copy 1st line with all contents. - HEADLINE_BOXATTRCOPY, // Copy box attributs of 1st line. - HEADLINE_BOXATRCOLLCOPY // Copy box attributes and paragraph styles of 1st line. -}; - -enum TableMergeErr -{ - TBLMERGE_OK, - TBLMERGE_NOSELECTION, - TBLMERGE_TOOCOMPLEX -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx deleted file mode 100644 index 037736ec65..0000000000 --- a/sw/inc/tblsel.hxx +++ /dev/null @@ -1,230 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TBLSEL_HXX -#define _TBLSEL_HXX - -#include <svl/svarray.hxx> -#include <swtable.hxx> -#include <swrect.hxx> -#include "swdllapi.h" - -class SwCrsrShell; -class SwCursor; -class SwTableCursor; -class SwFrm; -class SwTabFrm; -class SwTableBox; -class SwTableLine; -class SwLayoutFrm; -class SwPaM; -class SwNode; -class SwTable; -class SwUndoTblMerge; -class SwCellFrm; - -SV_DECL_PTRARR( SwCellFrms, SwCellFrm*, 16, 16 ) -SV_DECL_PTRARR_SORT( SwSelBoxes, SwTableBoxPtr, 10, 20 ) - - -// Collects all boxes in table that are selected. -// Selection gets extended in given direction according to enum-parameter. -// Boxes are collected via the Layout; works correctly if tables are split. -// (Cf. MakeSelUnions().) -typedef sal_uInt16 SwTblSearchType; -namespace nsSwTblSearchType -{ - const SwTblSearchType TBLSEARCH_NONE = 0x1; // No extension. - const SwTblSearchType TBLSEARCH_ROW = 0x2; // Extend to rows. - const SwTblSearchType TBLSEARCH_COL = 0x3; // Extend to columns. - - // As flag to the other values! - const SwTblSearchType TBLSEARCH_PROTECT = 0x8; // Collect protected boxes too. - const SwTblSearchType TBLSEARCH_NO_UNION_CORRECT = 0x10; // Do not correct collected Union. -} - -SW_DLLPUBLIC void GetTblSel( const SwCrsrShell& rShell, SwSelBoxes& rBoxes, - const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE ); - -void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, - const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE ); - - -// As before, but don't start from selection but from Start- EndFrms. -void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, - SwSelBoxes& rBoxes, SwCellFrms* pCells, - const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE ); - -// As before but directly via PaMs. -void GetTblSelCrs( const SwCrsrShell& rShell, SwSelBoxes& rBoxes ); -void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes ); - -// Collect boxes relevant for auto sum. -sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& ); - -// Check if the SelBoxes contains protected Boxes. -sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes ); - -// Check if selection is balanced. -SV_DECL_PTRARR( SwChartBoxes, SwTableBoxPtr, 16, 16) -SV_DECL_PTRARR_DEL( SwChartLines, SwChartBoxes*, 25, 50) - -sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd, - SwChartLines* pGetCLines = 0 ); - -// Check if cell is part of SSelection. -// (Became a function, in order to make sure that GetTblSel() and MakeTblCrsr() -// have always the same concept of the selection. -sal_Bool IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell ); - -// Determine boxes to be merged. -// In this process the rectangle gets "adapted" on the base of the layout, -// i.e. boxes are added if some overlap at the sides. -// Additionally a new box is created and filled with the relevant content. -void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, - SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo = 0 ); - -// Check if selected boxes allow for a valid merge. -sal_uInt16 CheckMergeSel( const SwPaM& rPam ); -sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes ); - -sal_Bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam ); - -// Check if Split or InsertCol lead to a box becoming smaller than MINLAY. -sal_Bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv, - const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE ); -sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, - const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE ); - -// For working on tab selection also for split tables. -class SwSelUnion -{ - SwRect aUnion; // The rectangle enclosing the selection. - SwTabFrm *pTable; // The (Follow-)Table for the Union. - -public: - SwSelUnion( const SwRect &rRect, SwTabFrm *pTab ) : - aUnion( rRect ), pTable( pTab ) {} - - const SwRect& GetUnion() const { return aUnion; } - SwRect& GetUnion() { return aUnion; } - const SwTabFrm *GetTable() const { return pTable; } - SwTabFrm *GetTable() { return pTable; } -}; - -SV_DECL_PTRARR_DEL( SwSelUnions, SwSelUnion*, 10, 20 ) - -// Gets the tables involved in a table selection and the union-rectangles of the selections -// - also for split tables. -// If a parameter is passed that != nsSwTblSearchType::TBLSEARCH_NONE -// the selection is extended in the given direction. -void MakeSelUnions( SwSelUnions&, const SwLayoutFrm *pStart, - const SwLayoutFrm *pEnd, - const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE ); - - - -// These classes copy the current table selections (rBoxes) into a -// separate structure while keeping the table structure. - -class _FndBox; -class _FndLine; - -SV_DECL_PTRARR_DEL( _FndBoxes, _FndBox*, 10, 20 ) -SV_DECL_PTRARR_DEL( _FndLines, _FndLine*,10, 20 ) - -class _FndBox -{ - SwTableBox* pBox; - _FndLines aLines; - _FndLine* pUpper; - - SwTableLine *pLineBefore; // For deleting/restoring the layout. - SwTableLine *pLineBehind; - -public: - _FndBox( SwTableBox* pB, _FndLine* pFL ) : - pBox(pB), pUpper(pFL), pLineBefore( 0 ), pLineBehind( 0 ) {} - - const _FndLines& GetLines() const { return aLines; } - _FndLines& GetLines() { return aLines; } - const SwTableBox* GetBox() const { return pBox; } - SwTableBox* GetBox() { return pBox; } - const _FndLine* GetUpper() const { return pUpper; } - _FndLine* GetUpper() { return pUpper; } - - void SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable ); - void SetTableLines( const SwTable &rTable ); - void DelFrms ( SwTable &rTable ); - void MakeFrms( SwTable &rTable ); - void MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, - const sal_Bool bBehind ); - sal_Bool AreLinesToRestore( const SwTable &rTable ) const; - - void ClearLineBehind() { pLineBehind = 0; } -}; - - -class _FndLine -{ - SwTableLine* pLine; - _FndBoxes aBoxes; - _FndBox* pUpper; -public: - _FndLine(SwTableLine* pL, _FndBox* pFB=0) : pLine(pL), pUpper(pFB) {} - const _FndBoxes& GetBoxes() const { return aBoxes; } - _FndBoxes& GetBoxes() { return aBoxes; } - const SwTableLine* GetLine() const { return pLine; } - SwTableLine* GetLine() { return pLine; } - const _FndBox* GetUpper() const { return pUpper; } - _FndBox* GetUpper() { return pUpper; } - - void SetUpper( _FndBox* pUp ) { pUpper = pUp; } -}; - - -struct _FndPara -{ - const SwSelBoxes& rBoxes; - _FndLine* pFndLine; - _FndBox* pFndBox; - - _FndPara( const SwSelBoxes& rBxs, _FndBox* pFB ) - : rBoxes(rBxs), pFndLine(0), pFndBox(pFB) {} - _FndPara( const _FndPara& rPara, _FndBox* pFB ) - : rBoxes(rPara.rBoxes), pFndLine(rPara.pFndLine), pFndBox(pFB) {} - _FndPara( const _FndPara& rPara, _FndLine* pFL ) - : rBoxes(rPara.rBoxes), pFndLine(pFL), pFndBox(rPara.pFndBox) {} -}; - -sal_Bool _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara ); -SW_DLLPUBLIC sal_Bool _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara ); - - -#endif // _TBLSEL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx deleted file mode 100644 index 22d05e05c9..0000000000 --- a/sw/inc/tgrditem.hxx +++ /dev/null @@ -1,122 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_TGRDITEM_HXX -#define SW_TGRDITEM_HXX - -#include <tools/color.hxx> -#include <svl/poolitem.hxx> -#include "swdllapi.h" -#include <hintids.hxx> -#include <format.hxx> - -class IntlWrapper; - -enum SwTextGrid { GRID_NONE, GRID_LINES_ONLY, GRID_LINES_CHARS }; - -class SW_DLLPUBLIC SwTextGridItem : public SfxPoolItem -{ - Color aColor; - sal_uInt16 nLines; - sal_uInt16 nBaseHeight, nRubyHeight; - SwTextGrid eGridType; - sal_Bool bRubyTextBelow; - sal_Bool bPrintGrid; - sal_Bool bDisplayGrid; - - //for textgrid enhancement - sal_uInt16 nBaseWidth; - sal_Bool bSnapToChars; - sal_Bool bSquaredMode; -public: - SwTextGridItem(); - virtual ~SwTextGridItem(); - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, - const IntlWrapper* pIntl = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - - SwTextGridItem& operator=( const SwTextGridItem& ); - - const Color& GetColor() const { return aColor; } - void SetColor( const Color& rCol ) { aColor = rCol; } - - sal_uInt16 GetLines() const { return nLines; } - void SetLines( sal_uInt16 nNew ) { nLines = nNew; } - - sal_uInt16 GetBaseHeight() const { return nBaseHeight; } - void SetBaseHeight( sal_uInt16 nNew ) { nBaseHeight = nNew; } - - sal_uInt16 GetRubyHeight() const { return nRubyHeight; } - void SetRubyHeight( sal_uInt16 nNew ) { nRubyHeight = nNew; } - - SwTextGrid GetGridType() const { return eGridType; } - void SetGridType( SwTextGrid eNew ) { eGridType = eNew; } - - sal_Bool IsRubyTextBelow() const { return bRubyTextBelow; } - sal_Bool GetRubyTextBelow() const { return bRubyTextBelow; } - void SetRubyTextBelow( sal_Bool bNew ) { bRubyTextBelow = bNew; } - - sal_Bool IsPrintGrid() const { return bPrintGrid; } - sal_Bool GetPrintGrid() const { return bPrintGrid; } - void SetPrintGrid( sal_Bool bNew ) { bPrintGrid = bNew; } - - sal_Bool IsDisplayGrid() const { return bDisplayGrid; } - sal_Bool GetDisplayGrid() const { return bDisplayGrid; } - void SetDisplayGrid( sal_Bool bNew ) { bDisplayGrid = bNew; } - - //for textgrid enhancement - sal_uInt16 GetBaseWidth() const { return nBaseWidth;} - void SetBaseWidth( sal_uInt16 nNew ) { nBaseWidth = nNew; } - - sal_Bool IsSnapToChars() const { return bSnapToChars; } - sal_Bool GetSnapToChars() const { return bSnapToChars; } - void SetSnapToChars( sal_Bool bNew ) { bSnapToChars = bNew; } - - sal_Bool IsSquaredMode() const { return bSquaredMode; } - sal_Bool GetSquaredMode() const { return bSquaredMode; } - void SetSquaredMode( sal_Bool bNew ) { bSquaredMode = bNew; } - void SwitchPaperMode(sal_Bool bNew ); - - void Init(); -}; - -inline const SwTextGridItem &SwAttrSet::GetTextGrid(sal_Bool bInP) const - { return (const SwTextGridItem&)Get( RES_TEXTGRID, bInP ); } -inline const SwTextGridItem &SwFmt::GetTextGrid(sal_Bool bInP) const - { return (const SwTextGridItem&)aSet.Get( RES_TEXTGRID, bInP ); } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx deleted file mode 100644 index b3ec8371d5..0000000000 --- a/sw/inc/tox.hxx +++ /dev/null @@ -1,782 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_TOX_HXX -#define SW_TOX_HXX - -#include <cppuhelper/weakref.hxx> - -#include <i18npool/lang.h> -#include <tools/string.hxx> -#include <osl/diagnose.h> - -#include <editeng/svxenum.hxx> -#include <svl/svarray.hxx> -#include <svl/poolitem.hxx> -#include "swdllapi.h" -#include <swtypes.hxx> -#include <toxe.hxx> -#include <calbck.hxx> - -#ifndef INCLUDED_VECTOR -#include <vector> // #i21237# -#define INCLUDED_VECTOR -#endif - - -namespace com { namespace sun { namespace star { - namespace text { class XDocumentIndexMark; } -} } } - -class SwTOXType; -class SwTOXMark; -class SwTxtTOXMark; -class SwDoc; - -SV_DECL_PTRARR(SwTOXMarks, SwTOXMark*, 0, 10) - -/*-------------------------------------------------------------------- - Description: Entry of content index, alphabetical index or user defined index - --------------------------------------------------------------------*/ - -#define IVER_TOXMARK_STRPOOL ((sal_uInt16)1) -#define IVER_TOXMARK_NEWTOX ((sal_uInt16)2) - -class SW_DLLPUBLIC SwTOXMark - : public SfxPoolItem - , public SwModify -{ - friend void _InitCore(); - friend class SwTxtTOXMark; - - String aAltText; // Text of caption is different. - String aPrimaryKey, aSecondaryKey; - - // three more strings for phonetic sorting - String aTextReading; - String aPrimaryKeyReading; - String aSecondaryKeyReading; - - SwTxtTOXMark* pTxtAttr; - - sal_uInt16 nLevel; - sal_Bool bAutoGenerated : 1; // generated using a concordance file - sal_Bool bMainEntry : 1; // main entry emphasized by character style - - ::com::sun::star::uno::WeakReference< - ::com::sun::star::text::XDocumentIndexMark> m_wXDocumentIndexMark; - - SwTOXMark(); // to create the dflt. atr. in _InitCore - -protected: - // SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ); - -public: - TYPEINFO(); // rtti - - // single argument ctors shall be explicit. - explicit SwTOXMark( const SwTOXType* pTyp ); - virtual ~SwTOXMark(); - - SwTOXMark( const SwTOXMark& rCopy ); - SwTOXMark& operator=( const SwTOXMark& rCopy ); - - // "pure virtual methods" of SfxPoolItem - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - - void InvalidateTOXMark(); - - String GetText() const; - - inline sal_Bool IsAlternativeText() const; - inline const String& GetAlternativeText() const; - - inline void SetAlternativeText( const String& rAlt ); - - // content or user defined index - inline void SetLevel(sal_uInt16 nLevel); - inline sal_uInt16 GetLevel() const; - - // for alphabetical index only - inline void SetPrimaryKey(const String& rStr ); - inline void SetSecondaryKey(const String& rStr); - inline void SetTextReading(const String& rStr); - inline void SetPrimaryKeyReading(const String& rStr ); - inline void SetSecondaryKeyReading(const String& rStr); - - inline const String& GetPrimaryKey() const; - inline const String& GetSecondaryKey() const; - inline const String& GetTextReading() const; - inline const String& GetPrimaryKeyReading() const; - inline const String& GetSecondaryKeyReading() const; - - sal_Bool IsAutoGenerated() const {return bAutoGenerated;} - void SetAutoGenerated(sal_Bool bSet) {bAutoGenerated = bSet;} - - sal_Bool IsMainEntry() const {return bMainEntry;} - void SetMainEntry(sal_Bool bSet) { bMainEntry = bSet;} - - inline const SwTOXType* GetTOXType() const; - - const SwTxtTOXMark* GetTxtTOXMark() const { return pTxtAttr; } - SwTxtTOXMark* GetTxtTOXMark() { return pTxtAttr; } - - SW_DLLPRIVATE ::com::sun::star::uno::WeakReference< - ::com::sun::star::text::XDocumentIndexMark> const& GetXTOXMark() const - { return m_wXDocumentIndexMark; } - SW_DLLPRIVATE void SetXTOXMark(::com::sun::star::uno::Reference< - ::com::sun::star::text::XDocumentIndexMark> const& xMark) - { m_wXDocumentIndexMark = xMark; } - void DeRegister() { GetRegisteredInNonConst()->Remove( this ); } - void RegisterToTOXType( SwTOXType& rMark ); - static void InsertTOXMarks( SwTOXMarks& aMarks, const SwTOXType& rType ); -}; - -/*-------------------------------------------------------------------- - Description: index types - --------------------------------------------------------------------*/ - -class SwTOXType : public SwModify -{ -public: - SwTOXType(TOXTypes eTyp, const String& aName); - - // @@@ public copy ctor, but no copy assignment? - SwTOXType(const SwTOXType& rCopy); - - inline const String& GetTypeName() const; - inline TOXTypes GetType() const; - -private: - String aName; - TOXTypes eType; - - // @@@ public copy ctor, but no copy assignment? - SwTOXType & operator= (const SwTOXType &); -}; - -/*-------------------------------------------------------------------- - Description: Structure of the index lines - --------------------------------------------------------------------*/ - -#define FORM_TITLE 0 -#define FORM_ALPHA_DELIMITTER 1 -#define FORM_PRIMARY_KEY 2 -#define FORM_SECONDARY_KEY 3 -#define FORM_ENTRY 4 - -/* - Pattern structure - - <E#> - entry number <E# CharStyleName,PoolId> - <ET> - entry text <ET CharStyleName,PoolId> - <E> - entry text and number <E CharStyleName,PoolId> - <T> - tab stop <T,,Position,Adjust> - <C> - chapter info n = {0, 1, 2, 3, 4 } values of SwChapterFormat <C CharStyleName,PoolId> - <TX> - text token <X CharStyleName,PoolId, TOX_STYLE_DELIMITERTextContentTOX_STYLE_DELIMITER> - <#> - Page number <# CharStyleName,PoolId> - <LS> - Link start <LS> - <LE> - Link end <LE> - <A00> - Authority entry field <A02 CharStyleName, PoolId> - */ - -// These enum values are stored and must not be changed! -enum FormTokenType -{ - TOKEN_ENTRY_NO, - TOKEN_ENTRY_TEXT, - TOKEN_ENTRY, - TOKEN_TAB_STOP, - TOKEN_TEXT, - TOKEN_PAGE_NUMS, - TOKEN_CHAPTER_INFO, - TOKEN_LINK_START, - TOKEN_LINK_END, - TOKEN_AUTHORITY, - TOKEN_END -}; - -struct SW_DLLPUBLIC SwFormToken -{ - String sText; - String sCharStyleName; - SwTwips nTabStopPosition; - FormTokenType eTokenType; - sal_uInt16 nPoolId; - SvxTabAdjust eTabAlign; - sal_uInt16 nChapterFormat; //SwChapterFormat; - sal_uInt16 nOutlineLevel;//the maximum permitted outline level in numbering - sal_uInt16 nAuthorityField; //enum ToxAuthorityField - sal_Unicode cTabFillChar; - sal_Bool bWithTab; // sal_True: do generate tab - // character only the tab stop - // #i21237# - - SwFormToken(FormTokenType eType ) : - nTabStopPosition(0), - eTokenType(eType), - nPoolId(USHRT_MAX), - eTabAlign( SVX_TAB_ADJUST_LEFT ), - nChapterFormat(0 /*CF_NUMBER*/), - nOutlineLevel(MAXLEVEL), //default to maximum outline level - nAuthorityField(0 /*AUTH_FIELD_IDENTIFIER*/), - cTabFillChar(' '), - bWithTab(sal_True) // #i21237# - {} - - String GetString() const; -}; - -struct SwFormTokenEqualToFormTokenType -{ - FormTokenType eType; - - SwFormTokenEqualToFormTokenType(FormTokenType _eType) : eType(_eType) {} - bool operator()(const SwFormToken & rToken) - { - return rToken.eTokenType == eType; - } -}; - -/** - Functor that appends the string representation of a given token to a string. - - @param _rText string to append the string representation to - @param rToken token whose string representation is appended -*/ -struct SwFormTokenToString -{ - String & rText; - SwFormTokenToString(String & _rText) : rText(_rText) {} - void operator()(const SwFormToken & rToken) { rText += rToken.GetString(); } -}; - -/// Vector of tokens. -typedef std::vector<SwFormToken> SwFormTokens; - -/** - Helper class that converts vectors of tokens to strings and vice - versa. - */ -class SW_DLLPUBLIC SwFormTokensHelper -{ - /// the tokens - SwFormTokens aTokens; - - /** - Builds a token from its string representation. - - @sPattern the whole pattern - @nCurPatternPos starting position of the token - - @return the token - */ - SW_DLLPRIVATE SwFormToken BuildToken( const String & sPattern, - xub_StrLen & nCurPatternPos ) const; - - /** - Returns the string of a token. - - @param sPattern the whole pattern - @param nStt starting position of the token - - @return the string representation of the token - */ - SW_DLLPRIVATE String SearchNextToken( const String & sPattern, - xub_StrLen nStt ) const; - - /** - Returns the type of a token. - - @param sToken the string representation of the token - @param pTokenLen return parameter the length of the head of the token - - If pTokenLen is non-NULL the length of the token's head is - written to *pTokenLen - - @return the type of the token - */ - SW_DLLPRIVATE FormTokenType GetTokenType(const String & sToken, - xub_StrLen * pTokenLen) const; - -public: - /** - contructor - - @param rTokens vector of tokens - */ - SwFormTokensHelper(const SwFormTokens & rTokens) : aTokens(rTokens) {} - - /** - constructor - - @param rStr string representation of the tokens - */ - SwFormTokensHelper(const String & rStr); - - /** - Returns vector of tokens. - - @return vector of tokens - */ - const SwFormTokens & GetTokens() const { return aTokens; } -}; - -class SW_DLLPUBLIC SwForm -{ - SwFormTokens aPattern[ AUTH_TYPE_END + 1 ]; // #i21237# - String aTemplate[ AUTH_TYPE_END + 1 ]; - - TOXTypes eType; - sal_uInt16 nFormMaxLevel; - - sal_Bool bGenerateTabPos : 1; - sal_Bool bIsRelTabPos : 1; - sal_Bool bCommaSeparated : 1; - -public: - SwForm( TOXTypes eTOXType = TOX_CONTENT ); - SwForm( const SwForm& rForm ); - - SwForm& operator=( const SwForm& rForm ); - - inline void SetTemplate(sal_uInt16 nLevel, const String& rName); - inline const String& GetTemplate(sal_uInt16 nLevel) const; - - // #i21237# - void SetPattern(sal_uInt16 nLevel, const SwFormTokens& rName); - void SetPattern(sal_uInt16 nLevel, const String& rStr); - const SwFormTokens& GetPattern(sal_uInt16 nLevel) const; - - // fill tab stop positions from template to pattern - // #i21237# - void AdjustTabStops(SwDoc& rDoc, - sal_Bool bInsertNewTabStops = sal_False); - - inline TOXTypes GetTOXType() const; - inline sal_uInt16 GetFormMax() const; - - sal_Bool IsRelTabPos() const { return bIsRelTabPos; } - void SetRelTabPos( sal_Bool b ) { bIsRelTabPos = b; } - - sal_Bool IsCommaSeparated() const { return bCommaSeparated;} - void SetCommaSeparated( sal_Bool b) { bCommaSeparated = b;} - - static sal_uInt16 GetFormMaxLevel( TOXTypes eType ); - - static const sal_Char* aFormEntry; // <E> - static sal_uInt8 nFormEntryLen; // 3 characters - static const sal_Char* aFormTab; // <T> - static sal_uInt8 nFormTabLen; // 3 characters - static const sal_Char* aFormPageNums; // <P> - static sal_uInt8 nFormPageNumsLen; // 3 characters - static const sal_Char* aFormLinkStt; // <LS> - static sal_uInt8 nFormLinkSttLen; // 4 characters - static const sal_Char* aFormLinkEnd; // <LE> - static sal_uInt8 nFormLinkEndLen; // 4 characters - static const sal_Char* aFormEntryNum; // <E#> - static sal_uInt8 nFormEntryNumLen; // 4 characters - static const sal_Char* aFormEntryTxt; // <ET> - static sal_uInt8 nFormEntryTxtLen; // 4 characters - static const sal_Char* aFormChapterMark; // <C> - static sal_uInt8 nFormChapterMarkLen; // 3 characters - static const sal_Char* aFormText; // <TX> - static sal_uInt8 nFormTextLen; // 4 characters - static const sal_Char* aFormAuth; // <Axx> xx - decimal enum value - static sal_uInt8 nFormAuthLen; // 3 characters -}; - -/*-------------------------------------------------------------------- - Description: Content to create indexes of - --------------------------------------------------------------------*/ - -typedef sal_uInt16 SwTOXElement; -namespace nsSwTOXElement -{ - const SwTOXElement TOX_MARK = 1; - const SwTOXElement TOX_OUTLINELEVEL = 2; - const SwTOXElement TOX_TEMPLATE = 4; - const SwTOXElement TOX_OLE = 8; - const SwTOXElement TOX_TABLE = 16; - const SwTOXElement TOX_GRAPHIC = 32; - const SwTOXElement TOX_FRAME = 64; - const SwTOXElement TOX_SEQUENCE = 128; -} - -typedef sal_uInt16 SwTOIOptions; -namespace nsSwTOIOptions -{ - const SwTOIOptions TOI_SAME_ENTRY = 1; - const SwTOIOptions TOI_FF = 2; - const SwTOIOptions TOI_CASE_SENSITIVE = 4; - const SwTOIOptions TOI_KEY_AS_ENTRY = 8; - const SwTOIOptions TOI_ALPHA_DELIMITTER = 16; - const SwTOIOptions TOI_DASH = 32; - const SwTOIOptions TOI_INITIAL_CAPS = 64; -} - -//which part of the caption is to be displayed -enum SwCaptionDisplay -{ - CAPTION_COMPLETE, - CAPTION_NUMBER, - CAPTION_TEXT -}; - -typedef sal_uInt16 SwTOOElements; -namespace nsSwTOOElements -{ - const SwTOOElements TOO_MATH = 0x01; - const SwTOOElements TOO_CHART = 0x02; - const SwTOOElements TOO_CALC = 0x08; - const SwTOOElements TOO_DRAW_IMPRESS = 0x10; - const SwTOOElements TOO_OTHER = 0x80; -} - -#define TOX_STYLE_DELIMITER ((sal_Unicode)0x01) - -/*-------------------------------------------------------------------- - Description: Class for all indexes - --------------------------------------------------------------------*/ - -class SW_DLLPUBLIC SwTOXBase : public SwClient -{ - SwForm aForm; // description of the lines - String aName; // unique name - String aTitle; // title - - String sMainEntryCharStyle; // name of the character style applied to main index entries - - String aStyleNames[MAXLEVEL]; // (additional) style names TOX_CONTENT, TOX_USER - String sSequenceName; // FieldTypeName of a caption sequence - - LanguageType eLanguage; - String sSortAlgorithm; - - union { - sal_uInt16 nLevel; // consider outline levels - sal_uInt16 nOptions; // options of alphabetical index - } aData; - - sal_uInt16 nCreateType; // sources to create the index from - sal_uInt16 nOLEOptions; // OLE sources - SwCaptionDisplay eCaptionDisplay; // - sal_Bool bProtected : 1; // index protected ? - sal_Bool bFromChapter : 1; // create from chapter or document - sal_Bool bFromObjectNames : 1; // create a table or object index - // from the names rather than the caption - sal_Bool bLevelFromChapter : 1; // User index: get the level from the source chapter -public: - SwTOXBase( const SwTOXType* pTyp, const SwForm& rForm, - sal_uInt16 nCreaType, const String& rTitle ); - SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = 0 ); - virtual ~SwTOXBase(); - - virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const; - - // a kind of CopyCtor - check if the TOXBase is at TOXType of the doc. - // If not, so create it an copy all other used things. The return is this - SwTOXBase& CopyTOXBase( SwDoc*, const SwTOXBase& ); - - const SwTOXType* GetTOXType() const; // - - sal_uInt16 GetCreateType() const; // creation types - - const String& GetTOXName() const {return aName;} - void SetTOXName(const String& rSet) {aName = rSet;} - - const String& GetTitle() const; // Title - const String& GetTypeName() const; // Name - const SwForm& GetTOXForm() const; // description of the lines - - void SetCreate(sal_uInt16); - void SetTitle(const String& rTitle); - void SetTOXForm(const SwForm& rForm); - - TOXTypes GetType() const; - - const String& GetMainEntryCharStyle() const {return sMainEntryCharStyle;} - void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;} - - // content index only - inline void SetLevel(sal_uInt16); // consider outline level - inline sal_uInt16 GetLevel() const; - - // alphabetical index only - inline sal_uInt16 GetOptions() const; // alphabetical index options - inline void SetOptions(sal_uInt16 nOpt); - - // index of objects - sal_uInt16 GetOLEOptions() const {return nOLEOptions;} - void SetOLEOptions(sal_uInt16 nOpt) {nOLEOptions = nOpt;} - - // index of objects - - // user defined index only - inline void SetTemplateName(const String& rName); // Absatzlayout beachten - - const String& GetStyleNames(sal_uInt16 nLevel) const - { - OSL_ENSURE( nLevel < MAXLEVEL, "Which level?"); - return aStyleNames[nLevel]; - } - void SetStyleNames(const String& rSet, sal_uInt16 nLevel) - { - OSL_ENSURE( nLevel < MAXLEVEL, "Which level?"); - aStyleNames[nLevel] = rSet; - } - sal_Bool IsFromChapter() const { return bFromChapter;} - void SetFromChapter(sal_Bool bSet) { bFromChapter = bSet;} - - sal_Bool IsFromObjectNames() const {return bFromObjectNames;} - void SetFromObjectNames(sal_Bool bSet) {bFromObjectNames = bSet;} - - sal_Bool IsLevelFromChapter() const {return bLevelFromChapter;} - void SetLevelFromChapter(sal_Bool bSet) {bLevelFromChapter = bSet;} - - sal_Bool IsProtected() const { return bProtected; } - void SetProtected(sal_Bool bSet) { bProtected = bSet; } - - const String& GetSequenceName() const {return sSequenceName;} - void SetSequenceName(const String& rSet) {sSequenceName = rSet;} - - SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;} - void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;} - - sal_Bool IsTOXBaseInReadonly() const; - - const SfxItemSet* GetAttrSet() const; - void SetAttrSet( const SfxItemSet& ); - - LanguageType GetLanguage() const {return eLanguage;} - void SetLanguage(LanguageType nLang) {eLanguage = nLang;} - - const String& GetSortAlgorithm()const {return sSortAlgorithm;} - void SetSortAlgorithm(const String& rSet) {sSortAlgorithm = rSet;} - // #i21237# - void AdjustTabStops(SwDoc & rDoc, sal_Bool bDefaultRightTabStop); - SwTOXBase& operator=(const SwTOXBase& rSource); - void RegisterToTOXType( SwTOXType& rMark ); -}; - - -/*-------------------------------------------------------------------- - Description: Inlines - --------------------------------------------------------------------*/ - -// -//SwTOXMark -// -inline const String& SwTOXMark::GetAlternativeText() const - { return aAltText; } - -inline const SwTOXType* SwTOXMark::GetTOXType() const - { return (SwTOXType*)GetRegisteredIn(); } - -inline sal_Bool SwTOXMark::IsAlternativeText() const - { return aAltText.Len() > 0; } - -inline void SwTOXMark::SetAlternativeText(const String& rAlt) -{ - aAltText = rAlt; -} - -inline void SwTOXMark::SetLevel( sal_uInt16 nLvl ) -{ - OSL_ENSURE( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); - nLevel = nLvl; -} - -inline void SwTOXMark::SetPrimaryKey( const String& rKey ) -{ - OSL_ENSURE( GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); - aPrimaryKey = rKey; -} - -inline void SwTOXMark::SetSecondaryKey( const String& rKey ) -{ - OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); - aSecondaryKey = rKey; -} - -inline void SwTOXMark::SetTextReading( const String& rTxt ) -{ - OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); - aTextReading = rTxt; -} - -inline void SwTOXMark::SetPrimaryKeyReading( const String& rKey ) -{ - OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); - aPrimaryKeyReading = rKey; -} - -inline void SwTOXMark::SetSecondaryKeyReading( const String& rKey ) -{ - OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); - aSecondaryKeyReading = rKey; -} - -inline sal_uInt16 SwTOXMark::GetLevel() const -{ - OSL_ENSURE( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); - return nLevel; -} - -inline const String& SwTOXMark::GetPrimaryKey() const -{ - OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); - return aPrimaryKey; -} - -inline const String& SwTOXMark::GetSecondaryKey() const -{ - OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); - return aSecondaryKey; -} - -inline const String& SwTOXMark::GetTextReading() const -{ - OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); - return aTextReading; -} - -inline const String& SwTOXMark::GetPrimaryKeyReading() const -{ - OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); - return aPrimaryKeyReading; -} - -inline const String& SwTOXMark::GetSecondaryKeyReading() const -{ - OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); - return aSecondaryKeyReading; -} - -// -//SwForm -// -inline void SwForm::SetTemplate(sal_uInt16 nLevel, const String& rTemplate) -{ - OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX"); - aTemplate[nLevel] = rTemplate; -} - -inline const String& SwForm::GetTemplate(sal_uInt16 nLevel) const -{ - OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX"); - return aTemplate[nLevel]; -} - -inline TOXTypes SwForm::GetTOXType() const -{ - return eType; -} - -inline sal_uInt16 SwForm::GetFormMax() const -{ - return nFormMaxLevel; -} - - -// -//SwTOXType -// -inline const String& SwTOXType::GetTypeName() const - { return aName; } - -inline TOXTypes SwTOXType::GetType() const - { return eType; } - -// -// SwTOXBase -// -inline const SwTOXType* SwTOXBase::GetTOXType() const - { return (SwTOXType*)GetRegisteredIn(); } - -inline sal_uInt16 SwTOXBase::GetCreateType() const - { return nCreateType; } - -inline const String& SwTOXBase::GetTitle() const - { return aTitle; } - -inline const String& SwTOXBase::GetTypeName() const - { return GetTOXType()->GetTypeName(); } - -inline const SwForm& SwTOXBase::GetTOXForm() const - { return aForm; } - -inline void SwTOXBase::AdjustTabStops(SwDoc & rDoc, sal_Bool bDefaultRightTabStop) -{ - aForm.AdjustTabStops(rDoc, bDefaultRightTabStop); -} - -inline void SwTOXBase::SetCreate(sal_uInt16 nCreate) - { nCreateType = nCreate; } - -inline void SwTOXBase::SetTOXForm(const SwForm& rForm) - { aForm = rForm; } - -inline TOXTypes SwTOXBase::GetType() const - { return GetTOXType()->GetType(); } - -inline void SwTOXBase::SetLevel(sal_uInt16 nLev) -{ - OSL_ENSURE(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); - aData.nLevel = nLev; -} - -inline sal_uInt16 SwTOXBase::GetLevel() const -{ - OSL_ENSURE(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp"); - return aData.nLevel; -} - -inline void SwTOXBase::SetTemplateName(const String& rName) -{ - OSL_FAIL("SwTOXBase::SetTemplateName obsolete"); - aStyleNames[0] = rName; -} - -inline sal_uInt16 SwTOXBase::GetOptions() const -{ - OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); - return aData.nOptions; -} - -inline void SwTOXBase::SetOptions(sal_uInt16 nOpt) -{ - OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp"); - aData.nOptions = nOpt; -} - - -#endif // SW_TOX_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/toxe.hxx b/sw/inc/toxe.hxx deleted file mode 100644 index 25f0e928f3..0000000000 --- a/sw/inc/toxe.hxx +++ /dev/null @@ -1,127 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TOXE_HXX -#define _TOXE_HXX - -enum SwTOXSearch -{ - TOX_NXT, - TOX_PRV, - TOX_SAME_NXT, - TOX_SAME_PRV -}; - -enum SwTOIKeyType -{ - TOI_PRIMARY, - TOI_SECONDARY -}; - -enum TOXTypes -{ - TOX_INDEX, - TOX_USER, - TOX_CONTENT, - TOX_ILLUSTRATIONS, - TOX_OBJECTS, - TOX_TABLES, - TOX_AUTHORITIES -}; -// this enum contains all types of sources -enum ToxAuthorityType -{ - //BiBTeX - fields - AUTH_TYPE_ARTICLE, - AUTH_TYPE_BOOK, - AUTH_TYPE_BOOKLET, - AUTH_TYPE_CONFERENCE, - AUTH_TYPE_INBOOK, - AUTH_TYPE_INCOLLECTION, - AUTH_TYPE_INPROCEEDINGS, - AUTH_TYPE_JOURNAL, - AUTH_TYPE_MANUAL, - AUTH_TYPE_MASTERSTHESIS, - AUTH_TYPE_MISC, - AUTH_TYPE_PHDTHESIS, - AUTH_TYPE_PROCEEDINGS, - AUTH_TYPE_TECHREPORT, - AUTH_TYPE_UNPUBLISHED, - //additional types - AUTH_TYPE_EMAIL, - AUTH_TYPE_WWW, - AUTH_TYPE_CUSTOM1, - AUTH_TYPE_CUSTOM2, - AUTH_TYPE_CUSTOM3, - AUTH_TYPE_CUSTOM4, - AUTH_TYPE_CUSTOM5, - AUTH_TYPE_END -}; - -//this enum contains the fields of an authority entry -enum ToxAuthorityField -{ - AUTH_FIELD_IDENTIFIER, - AUTH_FIELD_AUTHORITY_TYPE, //ToxAuthorityType - //BibTex types - AUTH_FIELD_ADDRESS, - AUTH_FIELD_ANNOTE, - AUTH_FIELD_AUTHOR, - AUTH_FIELD_BOOKTITLE, - AUTH_FIELD_CHAPTER, - AUTH_FIELD_EDITION, - AUTH_FIELD_EDITOR, - AUTH_FIELD_HOWPUBLISHED, - AUTH_FIELD_INSTITUTION, - AUTH_FIELD_JOURNAL, - AUTH_FIELD_MONTH, - AUTH_FIELD_NOTE, - AUTH_FIELD_NUMBER, - AUTH_FIELD_ORGANIZATIONS, - AUTH_FIELD_PAGES, - AUTH_FIELD_PUBLISHER, - AUTH_FIELD_SCHOOL, - AUTH_FIELD_SERIES, - AUTH_FIELD_TITLE, - AUTH_FIELD_REPORT_TYPE, - AUTH_FIELD_VOLUME, - AUTH_FIELD_YEAR, - //additional types - AUTH_FIELD_URL, - AUTH_FIELD_CUSTOM1, - AUTH_FIELD_CUSTOM2, - AUTH_FIELD_CUSTOM3, - AUTH_FIELD_CUSTOM4, - AUTH_FIELD_CUSTOM5, - AUTH_FIELD_ISBN, - AUTH_FIELD_END -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/toxinit.hxx b/sw/inc/toxinit.hxx deleted file mode 100644 index 44e981cb63..0000000000 --- a/sw/inc/toxinit.hxx +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TOXINIT_HXX -#define _TOXINIT_HXX - -class UniString; - -void SetTOUTableStr(const UniString& rStr); -void SetTOUGraphicStr(const UniString& rStr); -void SetTOUOLEStr(const UniString& rStr); - - -#endif // _TOXINIT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/toxwrap.hxx b/sw/inc/toxwrap.hxx deleted file mode 100644 index 05bda63f1a..0000000000 --- a/sw/inc/toxwrap.hxx +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TOXWRAP_HXX -#define _TOXWRAP_HXX - -#include <tools/solar.h> -#include <com/sun/star/lang/Locale.hpp> -#include <com/sun/star/uno/Reference.hxx> -#include <swunodef.hxx> -#include "swdllapi.h" - -namespace com { namespace sun { namespace star { -namespace i18n { - class XExtendedIndexEntrySupplier; -} -namespace lang { - class XMultiServiceFactory; -} -}}} - - -class String; - -class SW_DLLPUBLIC IndexEntrySupplierWrapper -{ - STAR_NMSPC::lang::Locale aLcl; - STAR_NMSPC::uno::Reference < com::sun::star::i18n::XExtendedIndexEntrySupplier > xIES; - -public: - IndexEntrySupplierWrapper(); - ~IndexEntrySupplierWrapper(); - - void SetLocale( const STAR_NMSPC::lang::Locale& rLocale ) { aLcl = rLocale; } - - String GetIndexKey( const String& rTxt, const String& rTxtReading, - const STAR_NMSPC::lang::Locale& rLocale ) const; - - String GetFollowingText( sal_Bool bMorePages ) const; - - STAR_NMSPC::uno::Sequence< ::rtl::OUString > - GetAlgorithmList( const STAR_NMSPC::lang::Locale& rLcl ) const; - - sal_Bool LoadAlgorithm( const STAR_NMSPC::lang::Locale& rLcl, - const String& sSortAlgorithm, long nOptions ) const; - - sal_Int16 CompareIndexEntry( const String& rTxt1, const String& rTxtReading1, - const STAR_NMSPC::lang::Locale& rLcl1, - const String& rTxt2, const String& rTxtReading2, - const STAR_NMSPC::lang::Locale& rLcl2 ) const; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx deleted file mode 100644 index ac16b48fe2..0000000000 --- a/sw/inc/txatbase.hxx +++ /dev/null @@ -1,246 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TXATBASE_HXX -#define _TXATBASE_HXX - -#include <tools/solar.h> -#include <svl/poolitem.hxx> -#include <hintids.hxx> - -#include <boost/utility.hpp> - - -class SfxItemPool; -class SvXMLAttrContainerItem; -class SwFmtRuby; -class SwFmtCharFmt; -class SwFmtAutoFmt; -class SwFmtINetFmt; -class SwFmtFld; -class SwFmtFtn; -class SwFmtFlyCnt; -class SwTOXMark; -class SwFmtRefMark; -class SwFmtMeta; - - -class SwTxtAttr : private boost::noncopyable -{ -private: - SfxPoolItem * const m_pAttr; - xub_StrLen m_nStart; - bool m_bDontExpand : 1; - bool m_bLockExpandFlag : 1; - - bool m_bDontMoveAttr : 1; // refmarks, toxmarks - bool m_bCharFmtAttr : 1; // charfmt, inet - bool m_bOverlapAllowedAttr : 1; // refmarks, toxmarks - bool m_bPriorityAttr : 1; // attribute has priority (redlining) - bool m_bDontExpandStart : 1; // don't expand start at paragraph start (ruby) - bool m_bNesting : 1; // SwTxtAttrNesting - bool m_bHasDummyChar : 1; // without end + meta - -protected: - SwTxtAttr( SfxPoolItem& rAttr, xub_StrLen nStart ); - virtual ~SwTxtAttr(); - - void SetLockExpandFlag( bool bFlag ) { m_bLockExpandFlag = bFlag; } - void SetDontMoveAttr( bool bFlag ) { m_bDontMoveAttr = bFlag; } - void SetCharFmtAttr( bool bFlag ) { m_bCharFmtAttr = bFlag; } - void SetOverlapAllowedAttr( bool bFlag ){ m_bOverlapAllowedAttr = bFlag; } - void SetDontExpandStartAttr(bool bFlag) { m_bDontExpandStart = bFlag; } - void SetNesting(const bool bFlag) { m_bNesting = bFlag; } - void SetHasDummyChar(const bool bFlag) { m_bHasDummyChar = bFlag; } - -public: - - /// destroy instance - static void Destroy( SwTxtAttr * pToDestroy, SfxItemPool& rPool ); - - /// start position - xub_StrLen* GetStart() { return & m_nStart; } - const xub_StrLen* GetStart() const { return & m_nStart; } - - /// end position - virtual xub_StrLen* GetEnd(); - inline const xub_StrLen* GetEnd() const; - /// end (if available), else start - inline const xub_StrLen* GetAnyEnd() const; - - inline void SetDontExpand( bool bDontExpand ); - bool DontExpand() const { return m_bDontExpand; } - bool IsLockExpandFlag() const { return m_bLockExpandFlag; } - bool IsDontMoveAttr() const { return m_bDontMoveAttr; } - bool IsCharFmtAttr() const { return m_bCharFmtAttr; } - bool IsOverlapAllowedAttr() const { return m_bOverlapAllowedAttr; } - bool IsPriorityAttr() const { return m_bPriorityAttr; } - void SetPriorityAttr( bool bFlag ) { m_bPriorityAttr = bFlag; } - bool IsDontExpandStartAttr() const { return m_bDontExpandStart; } - bool IsNesting() const { return m_bNesting; } - bool HasDummyChar() const { return m_bHasDummyChar; } - - inline const SfxPoolItem& GetAttr() const; - inline SfxPoolItem& GetAttr(); - inline sal_uInt16 Which() const { return GetAttr().Which(); } - - virtual int operator==( const SwTxtAttr& ) const; - - inline const SwFmtCharFmt &GetCharFmt() const; - inline const SwFmtAutoFmt &GetAutoFmt() const; - inline const SwFmtFld &GetFld() const; - inline const SwFmtFtn &GetFtn() const; - inline const SwFmtFlyCnt &GetFlyCnt() const; - inline const SwTOXMark &GetTOXMark() const; - inline const SwFmtRefMark &GetRefMark() const; - inline const SwFmtINetFmt &GetINetFmt() const; - inline const SwFmtRuby &GetRuby() const; - inline const SwFmtMeta &GetMeta() const; - -}; - -class SwTxtAttrEnd : public SwTxtAttr -{ -protected: - xub_StrLen m_nEnd; - -public: - SwTxtAttrEnd( SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd ); - - using SwTxtAttr::GetEnd; - virtual xub_StrLen* GetEnd(); -}; - - -// --------------- Inline Implementations ------------------------ - -inline const xub_StrLen* SwTxtAttr::GetEnd() const -{ - return const_cast<SwTxtAttr * >(this)->GetEnd(); -} - -inline const xub_StrLen* SwTxtAttr::GetAnyEnd() const -{ - const xub_StrLen* pEnd = GetEnd(); - return pEnd ? pEnd : GetStart(); -} - -inline const SfxPoolItem& SwTxtAttr::GetAttr() const -{ - OSL_ENSURE( m_pAttr, "SwTxtAttr: where is my attribute?" ); - return *m_pAttr; -} - -inline SfxPoolItem& SwTxtAttr::GetAttr() -{ - return const_cast<SfxPoolItem&>( - const_cast<const SwTxtAttr*>(this)->GetAttr()); -} - -inline void SwTxtAttr::SetDontExpand( bool bDontExpand ) -{ - if ( !m_bLockExpandFlag ) - { - m_bDontExpand = bDontExpand; - } -} - -//------------------------------------------------------------------------ - -inline const SwFmtCharFmt& SwTxtAttr::GetCharFmt() const -{ - OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_CHARFMT, - "Wrong attribute" ); - return (const SwFmtCharFmt&)(*m_pAttr); -} - -inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const -{ - OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_AUTOFMT, - "Wrong attribute" ); - return (const SwFmtAutoFmt&)(*m_pAttr); -} - -inline const SwFmtFld& SwTxtAttr::GetFld() const -{ - OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD, - "Wrong attribute" ); - return (const SwFmtFld&)(*m_pAttr); -} - -inline const SwFmtFtn& SwTxtAttr::GetFtn() const -{ - OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_FTN, "Wrong attribute" ); - return (const SwFmtFtn&)(*m_pAttr); -} - -inline const SwFmtFlyCnt& SwTxtAttr::GetFlyCnt() const -{ - OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_FLYCNT, - "Wrong attribute" ); - return (const SwFmtFlyCnt&)(*m_pAttr); -} - -inline const SwTOXMark& SwTxtAttr::GetTOXMark() const -{ - OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_TOXMARK, - "Wrong attribute" ); - return (const SwTOXMark&)(*m_pAttr); -} - -inline const SwFmtRefMark& SwTxtAttr::GetRefMark() const -{ - OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_REFMARK, - "Wrong attribute" ); - return (const SwFmtRefMark&)(*m_pAttr); -} - -inline const SwFmtINetFmt& SwTxtAttr::GetINetFmt() const -{ - OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_INETFMT, - "Wrong attribute" ); - return (const SwFmtINetFmt&)(*m_pAttr); -} - -inline const SwFmtRuby& SwTxtAttr::GetRuby() const -{ - OSL_ENSURE( m_pAttr && m_pAttr->Which() == RES_TXTATR_CJK_RUBY, - "Wrong attribute" ); - return (const SwFmtRuby&)(*m_pAttr); -} - -inline const SwFmtMeta& SwTxtAttr::GetMeta() const -{ - OSL_ENSURE( m_pAttr && (m_pAttr->Which() == RES_TXTATR_META || - m_pAttr->Which() == RES_TXTATR_METAFIELD), - "Wrong attribute" ); - return (const SwFmtMeta&)(*m_pAttr); -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx deleted file mode 100644 index 7c9906bce8..0000000000 --- a/sw/inc/txatritr.hxx +++ /dev/null @@ -1,102 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TXATRITR_HXX -#define _TXATRITR_HXX - -#include <tools/solar.h> -#include <sal/types.h> -#include <svl/svarray.hxx> -#include <editeng/langitem.hxx> -#include <hintids.hxx> - -class String; -class SwTxtNode; -class SwTxtAttr; -class SfxPoolItem; - - -class SwScriptIterator -{ - const String& rText; - xub_StrLen nChgPos; - sal_uInt16 nCurScript; - sal_Bool bForward; - -public: - SwScriptIterator( const String& rStr, xub_StrLen nStart = 0, - sal_Bool bFrwrd = sal_True ); - - sal_Bool Next(); - - sal_uInt16 GetCurrScript() const { return nCurScript; } - xub_StrLen GetScriptChgPos() const { return nChgPos; } - const String& GetText() const { return rText; } -}; - - -class SwTxtAttrIterator -{ - SwScriptIterator aSIter; - SvPtrarr aStack; - const SwTxtNode& rTxtNd; - const SfxPoolItem *pParaItem, *pCurItem; - xub_StrLen nChgPos; - sal_uInt16 nAttrPos, nWhichId; - sal_Bool bIsUseGetWhichOfScript; - - void AddToStack( const SwTxtAttr& rAttr ); - void SearchNextChg(); - -public: - SwTxtAttrIterator( const SwTxtNode& rTxtNd, sal_uInt16 nWhichId, - xub_StrLen nStart = 0, sal_Bool bUseGetWhichOfScript = sal_True ); - - sal_Bool Next(); - - const SfxPoolItem& GetAttr() const { return *pCurItem; } - xub_StrLen GetChgPos() const { return nChgPos; } -}; - - -class SwLanguageIterator : public SwTxtAttrIterator -{ -public: - SwLanguageIterator( const SwTxtNode& rTxtNode, xub_StrLen nStart = 0, - sal_uInt16 nWhich = RES_CHRATR_LANGUAGE, - sal_Bool bUseGetWhichOfScript = sal_True ) - : SwTxtAttrIterator( rTxtNode, nWhich, nStart, bUseGetWhichOfScript ) - {} - - sal_uInt16 GetLanguage() const - { return ((SvxLanguageItem&)GetAttr()).GetValue(); } -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx deleted file mode 100644 index f8be8c39ba..0000000000 --- a/sw/inc/txtatr.hxx +++ /dev/null @@ -1,131 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TXTATR_HXX -#define _TXTATR_HXX - -#include <txatbase.hxx> // SwTxtAttr/SwTxtAttrEnd -#include <calbck.hxx> - - -class SwTxtNode; // For SwTxtFld. -class SwCharFmt; - -namespace sw { - class MetaFieldManager; -} - - -// ATT_CHARFMT ********************************************* - -class SwTxtCharFmt : public SwTxtAttrEnd -{ - SwTxtNode * m_pTxtNode; - sal_uInt16 m_nSortNumber; - -public: - SwTxtCharFmt( SwFmtCharFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); - virtual ~SwTxtCharFmt( ); - - // Passed from SwFmtCharFmt (no derivation from SwClient!). - void ModifyNotification( const SfxPoolItem*, const SfxPoolItem* ); - bool GetInfo( SfxPoolItem& rInfo ) const; - - // get and set TxtNode pointer - void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; } - - void SetSortNumber( sal_uInt16 nSortNumber ) { m_nSortNumber = nSortNumber; } - sal_uInt16 GetSortNumber() const { return m_nSortNumber; } -}; - - -// ****************************** - -class SwTxtAttrNesting : public SwTxtAttrEnd -{ -protected: - SwTxtAttrNesting( SfxPoolItem & i_rAttr, - const xub_StrLen i_nStart, const xub_StrLen i_nEnd ); - virtual ~SwTxtAttrNesting(); -}; - -class SwTxtMeta : public SwTxtAttrNesting -{ -private: - SwTxtMeta( SwFmtMeta & i_rAttr, - const xub_StrLen i_nStart, const xub_StrLen i_nEnd ); - -public: - static SwTxtMeta * CreateTxtMeta( - ::sw::MetaFieldManager & i_rTargetDocManager, - SwTxtNode *const i_pTargetTxtNode, - SwFmtMeta & i_rAttr, - xub_StrLen const i_nStart, xub_StrLen const i_nEnd, - bool const i_bIsCopy); - - virtual ~SwTxtMeta(); - - void ChgTxtNode(SwTxtNode * const pNode); -}; - - -// ****************************** - -class SW_DLLPUBLIC SwTxtRuby : public SwTxtAttrNesting, public SwClient -{ - SwTxtNode* m_pTxtNode; -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); -public: - SwTxtRuby( SwFmtRuby& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); - virtual ~SwTxtRuby(); - TYPEINFO(); - - virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const; - - SW_DLLPRIVATE void InitRuby(SwTxtNode & rNode); - - /// Get and set TxtNode pointer. - const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; } - inline const SwTxtNode& GetTxtNode() const; - void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; } - - SwCharFmt* GetCharFmt(); - const SwCharFmt* GetCharFmt() const - { return (const_cast<SwTxtRuby*>(this))->GetCharFmt(); } -}; - - -inline const SwTxtNode& SwTxtRuby::GetTxtNode() const -{ - OSL_ENSURE( m_pTxtNode, "SwTxtRuby: where is my TxtNode?" ); - return *m_pTxtNode; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/txtflcnt.hxx b/sw/inc/txtflcnt.hxx deleted file mode 100644 index ddde9a5527..0000000000 --- a/sw/inc/txtflcnt.hxx +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TXTFLCNT_HXX -#define _TXTFLCNT_HXX - -#include <txatbase.hxx> - -class SwFlyInCntFrm; -class SwFrm; -class SwTxtNode; -class SwDoc; - -// SWTXT_FLYCNT ******************************** -// Attribute for line-bound frames (without end index). - -class SwTxtFlyCnt : public SwTxtAttr -{ - SwFlyInCntFrm *_GetFlyFrm( const SwFrm *pCurrFrm ); - -public: - SwTxtFlyCnt( SwFmtFlyCnt& rAttr, xub_StrLen nStart ); - - // Sets anchor in pFmt and - void SetAnchor( const SwTxtNode *pNode ); - - inline SwFlyInCntFrm *GetFlyFrm( const SwFrm *pCurrFrm ); - inline const SwFlyInCntFrm *GetFlyFrm( const SwFrm *pCurrFrm ) const; - - // creates for itself a new FlyFrameFormat. - void CopyFlyFmt( SwDoc* pDoc ); -}; - -inline SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm ) -{ - return _GetFlyFrm( pCurrFrm ); -} - -inline const SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm ) const -{ - return (const_cast<SwTxtFlyCnt*>(this))->_GetFlyFrm( pCurrFrm ); -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx deleted file mode 100644 index 4b06c3ff05..0000000000 --- a/sw/inc/txtfld.hxx +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TXTFLD_HXX -#define _TXTFLD_HXX - -#include <txatbase.hxx> -#include <tools/string.hxx> -#include <pam.hxx> - -class SwTxtNode; - -// ATT_FLD *********************************** - -class SwTxtFld : public SwTxtAttr -{ - mutable String m_aExpand; - SwTxtNode * m_pTxtNode; - -public: - SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart); - virtual ~SwTxtFld(); - - void CopyFld( SwTxtFld *pDest ) const; - void Expand() const; - inline void ExpandAlways(); - - // get and set TxtNode pointer - SwTxtNode* GetpTxtNode() const { return m_pTxtNode; } - inline SwTxtNode& GetTxtNode() const; - void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; } - // enable notification that field content has changed and needs reformatting - void NotifyContentChange(SwFmtFld& rFmtFld); - - /** - Returns position of this field. - - @return position of this field. Has to be deleted explicitly. - */ -}; - -inline SwTxtNode& SwTxtFld::GetTxtNode() const -{ - OSL_ENSURE( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" ); - return *m_pTxtNode; -} - -inline void SwTxtFld::ExpandAlways() -{ - m_aExpand += ' '; - Expand(); -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx deleted file mode 100644 index 216ef34242..0000000000 --- a/sw/inc/txtftn.hxx +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TXTFTN_HXX -#define _TXTFTN_HXX - -#include <txatbase.hxx> - -class SwNodeIndex; -class SwTxtNode; -class SwNodes; -class SwDoc; -class SwFrm; - -// ATT_FTN ********************************************************** - -class SW_DLLPUBLIC SwTxtFtn : public SwTxtAttr -{ - SwNodeIndex * m_pStartNode; - SwTxtNode * m_pTxtNode; - sal_uInt16 m_nSeqNo; - -public: - SwTxtFtn( SwFmtFtn& rAttr, xub_StrLen nStart ); - virtual ~SwTxtFtn(); - - inline SwNodeIndex *GetStartNode() const { return m_pStartNode; } - void SetStartNode( const SwNodeIndex *pNode, sal_Bool bDelNodes = sal_True ); - void SetNumber( const sal_uInt16 nNumber, const String* = 0 ); - void CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const; - - // Get and set TxtNode pointer. - inline const SwTxtNode& GetTxtNode() const; - void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; } - - // Create a new empty TextSection for this footnote. - void MakeNewTextSection( SwNodes& rNodes ); - - // Delete the FtnFrame from page. - void DelFrms( const SwFrm* ); - - // Check conditional paragraph styles. - void CheckCondColl(); - - // For references to footnotes. - sal_uInt16 SetSeqRefNo(); - void SetSeqNo( sal_uInt16 n ) { m_nSeqNo = n; } // For Readers. - sal_uInt16 GetSeqRefNo() const { return m_nSeqNo; } - - static void SetUniqueSeqRefNo( SwDoc& rDoc ); -}; - -inline const SwTxtNode& SwTxtFtn::GetTxtNode() const -{ - OSL_ENSURE( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" ); - return *m_pTxtNode; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx deleted file mode 100644 index 7c335bc24f..0000000000 --- a/sw/inc/txtinet.hxx +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TXTINET_HXX -#define _TXTINET_HXX - -#include <txatbase.hxx> -#include <txtatr.hxx> -#include <calbck.hxx> - -class SwTxtNode; -class SwCharFmt; - -// ATT_INETFMT ********************************************* - -class SW_DLLPUBLIC SwTxtINetFmt : public SwTxtAttrNesting, public SwClient -{ - SwTxtNode * m_pTxtNode; - bool m_bVisited : 1; // visited link? - bool m_bVisitedValid : 1; // is m_bVisited valid? - -protected: -virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - SwTxtINetFmt( SwFmtINetFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd ); - virtual ~SwTxtINetFmt(); - TYPEINFO(); - - virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const; - - SW_DLLPRIVATE void InitINetFmt(SwTxtNode & rNode); - - // get and set TxtNode pointer - const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; } - inline const SwTxtNode& GetTxtNode() const; - void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; } - - SwCharFmt* GetCharFmt(); - const SwCharFmt* GetCharFmt() const - { return const_cast<SwTxtINetFmt*>(this)->GetCharFmt(); } - - bool IsVisited() const { return m_bVisited; } - void SetVisited( bool bNew ) { m_bVisited = bNew; } - - bool IsVisitedValid() const { return m_bVisitedValid; } - void SetVisitedValid( bool bNew ) { m_bVisitedValid = bNew; } - - sal_Bool IsProtect() const; -}; - -inline const SwTxtNode& SwTxtINetFmt::GetTxtNode() const -{ - OSL_ENSURE( m_pTxtNode, "SwTxtINetFmt: where is my TxtNode?" ); - return *m_pTxtNode; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx deleted file mode 100644 index a359ce6c88..0000000000 --- a/sw/inc/txtrfmrk.hxx +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TXTRFMRK_HXX -#define _TXTRFMRK_HXX - -#include <txatbase.hxx> - -class SwTxtNode; - -// SWTXT_REFMARK ************************************* -// Attribute for content-/position references in text. - -class SwTxtRefMark : public SwTxtAttrEnd -{ - SwTxtNode * m_pTxtNode; - xub_StrLen * m_pEnd; // end is optional (point reference) - -public: - SwTxtRefMark( SwFmtRefMark& rAttr, - xub_StrLen const nStart, xub_StrLen const*const pEnd = 0); - - virtual xub_StrLen * GetEnd(); // SwTxtAttr - inline const xub_StrLen * GetEnd() const { return m_pEnd; } - - // get and set TxtNode pointer - inline const SwTxtNode& GetTxtNode() const; - void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; } -}; - -inline const SwTxtNode& SwTxtRefMark::GetTxtNode() const -{ - OSL_ENSURE( m_pTxtNode, "SwTxtRefMark: where is my TxtNode?" ); - return *m_pTxtNode; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx deleted file mode 100644 index a864dfa107..0000000000 --- a/sw/inc/txttxmrk.hxx +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _TXTTXMRK_HXX -#define _TXTTXMRK_HXX - -#include <txatbase.hxx> - -class SwTxtNode; -class SwDoc; - -// SWTXT_TOXMARK ******************************* -// Attribute for indices/tables of contents. - -class SwTxtTOXMark : public SwTxtAttrEnd -{ - SwTxtNode * m_pTxtNode; - xub_StrLen * m_pEnd; // 0 if SwTOXMark without AlternativeText - -public: - SwTxtTOXMark( SwTOXMark& rAttr, - xub_StrLen const nStart, xub_StrLen const*const pEnd = 0); - virtual ~SwTxtTOXMark(); - - virtual xub_StrLen *GetEnd(); // SwTxtAttr - inline const xub_StrLen* GetEnd() const { return m_pEnd; } - - void CopyTOXMark( SwDoc* pDestDoc ); - - // get and set TxtNode pointer - inline const SwTxtNode* GetpTxtNd() const { return m_pTxtNode; } - inline const SwTxtNode& GetTxtNode() const; - void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; } -}; - -inline const SwTxtNode& SwTxtTOXMark::GetTxtNode() const -{ - OSL_ENSURE( m_pTxtNode, "SwTxtTOXMark: where is my TxtNode?" ); - return *m_pTxtNode; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx deleted file mode 100644 index a2e9cf8829..0000000000 --- a/sw/inc/undobj.hxx +++ /dev/null @@ -1,330 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNDOBJ_HXX -#define SW_UNDOBJ_HXX - -#include <vector> - -#include <boost/shared_ptr.hpp> - -#include <svl/undo.hxx> - -#include <SwRewriter.hxx> -#include <swundo.hxx> - -class SwHistory; -class SwIndex; -class SwPaM; -struct SwPosition; -class SwDoc; -class SwTxtFmtColl; -class SwFrmFmt; -class SwNodeIndex; -class SwNodeRange; -class SwRedlineData; -class SwRedlineSaveDatas; - -namespace sw { - class UndoRedoContext; - class RepeatContext; -} - -class SwUndo - : public SfxUndoAction -{ - SwUndoId const m_nId; - sal_uInt16 nOrigRedlineMode; - -protected: - bool bCacheComment; - mutable String * pComment; - - void RemoveIdxFromSection( SwDoc&, sal_uLong nSttIdx, sal_uLong* pEndIdx = 0 ); - void RemoveIdxFromRange( SwPaM& rPam, sal_Bool bMoveNext ); - void RemoveIdxRel( sal_uLong, const SwPosition& ); - - static sal_Bool CanRedlineGroup( SwRedlineSaveDatas& rCurr, - const SwRedlineSaveDatas& rCheck, - sal_Bool bCurrIsEnd ); - - /** - Returns the rewriter for this object. - - @return the rewriter for this object - */ - virtual SwRewriter GetRewriter() const; - - // return type is sal_uInt16 because this overrides SfxUndoAction::GetId() - virtual sal_uInt16 GetId() const { return static_cast<sal_uInt16>(m_nId); } - - // the 4 methods that derived classes have to override - // base implementation does nothing - virtual void RepeatImpl( ::sw::RepeatContext & ); - virtual bool CanRepeatImpl( ::sw::RepeatContext & ) const; -public: // should not be public, but ran into trouble in untbl.cxx - virtual void UndoImpl( ::sw::UndoRedoContext & ) = 0; - virtual void RedoImpl( ::sw::UndoRedoContext & ) = 0; - -private: - // SfxUndoAction - virtual void Undo(); - virtual void Redo(); - virtual void UndoWithContext(SfxUndoContext &); - virtual void RedoWithContext(SfxUndoContext &); - virtual void Repeat(SfxRepeatTarget &); - virtual sal_Bool CanRepeat(SfxRepeatTarget &) const; - -public: - SwUndo(SwUndoId const nId); - virtual ~SwUndo(); - - /** - Returns textual comment for this undo object. - - The textual comment is created from the resource string - corresponding to this object's ID. The rewriter of this object - is applied to the resource string to get the final comment. - - @return textual comment for this undo object - */ - virtual String GetComment() const; - - // UndoObject remembers which mode was turned on. - // In Undo/Redo/Repeat this remembered mode is switched on. - sal_uInt16 GetRedlineMode() const { return nOrigRedlineMode; } - void SetRedlineMode( sal_uInt16 eMode ) { nOrigRedlineMode = eMode; } - - bool IsDelBox() const; - - // Save and set Redline data. - static sal_Bool FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData, - sal_Bool bDelRange = sal_True, sal_Bool bCopyNext = sal_True ); - static sal_Bool FillSaveDataForFmt( const SwPaM& , SwRedlineSaveDatas& ); - static void SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData ); - static sal_Bool HasHiddenRedlines( const SwRedlineSaveDatas& rSData ); -}; - -typedef sal_uInt16 DelCntntType; -namespace nsDelCntntType -{ - const DelCntntType DELCNT_FTN = 0x01; - const DelCntntType DELCNT_FLY = 0x02; - const DelCntntType DELCNT_TOC = 0x04; - const DelCntntType DELCNT_BKM = 0x08; - const DelCntntType DELCNT_ALL = 0x0F; - const DelCntntType DELCNT_CHKNOCNTNT = 0x80; -} - -/// will DelCntntIndex destroy a frame anchored at character at rAnchorPos? -bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos, - SwPosition const & rStart, SwPosition const & rEnd, - DelCntntType const nDelCntntType = nsDelCntntType::DELCNT_ALL); - - -// This class has to be inherited into an Undo-object if it saves content -// for Redo/Undo... -class SwUndoSaveCntnt -{ -protected: - - SwHistory* pHistory; - - // Needed for deletion of content. For Redo content is moved into the - // UndoNodesArray. These methods insert a separator for the attributes - // at the end of a TextNode. So the attributes do not get expanded. - // MoveTo: moves from the NodesArray into the UndoNodesArray. - // MoveFrom: moves from the UndoNodesArray into the NodesArray. - void MoveToUndoNds( SwPaM& rPam, - SwNodeIndex* pNodeIdx = 0, SwIndex* pCntIdx = 0, - sal_uLong* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 ); - void MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx, xub_StrLen nCntntIdx, - SwPosition& rInsPos, - sal_uLong* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 ); - - // These two methods move the SPoint back/forth from PaM. With it - // a range can be spanned for Undo/Redo. (In this case the SPoint - // is before the manipulated range!!) - // The flag indicates if there is content before the SPoint. - sal_Bool MovePtBackward( SwPaM& rPam ); - void MovePtForward( SwPaM& rPam, sal_Bool bMvBkwrd ); - - // Before moving stuff into UndoNodes-Array care has to be taken that - // the content-bearing attributes are removed from the nodes-array. - void DelCntntIndex( const SwPosition& pMark, const SwPosition& pPoint, - DelCntntType nDelCntntType = nsDelCntntType::DELCNT_ALL ); - -public: - SwUndoSaveCntnt(); - ~SwUndoSaveCntnt(); -}; - -// Save a complete section in nodes-array. -class SwUndoSaveSection : private SwUndoSaveCntnt -{ - SwNodeIndex *pMvStt; - SwRedlineSaveDatas* pRedlSaveData; - sal_uLong nMvLen; // Index into UndoNodes-Array. - sal_uLong nStartPos; - -protected: - SwNodeIndex* GetMvSttIdx() const { return pMvStt; } - sal_uLong GetMvNodeCnt() const { return nMvLen; } - -public: - SwUndoSaveSection(); - ~SwUndoSaveSection(); - - void SaveSection( SwDoc* pDoc, const SwNodeIndex& rSttIdx ); - void SaveSection( SwDoc* pDoc, const SwNodeRange& rRange ); - void RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, sal_uInt16 nSectType ); - void RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos ); - - const SwHistory* GetHistory() const { return pHistory; } - SwHistory* GetHistory() { return pHistory; } -}; - - -// This class saves the PaM as sal_uInt16's and is able to restore it -// into a PaM. -class SwUndRng -{ -public: - sal_uLong nSttNode, nEndNode; - xub_StrLen nSttCntnt, nEndCntnt; - - SwUndRng(); - SwUndRng( const SwPaM& ); - - void SetValues( const SwPaM& rPam ); - void SetPaM( SwPaM&, sal_Bool bCorrToCntnt = sal_False ) const; - SwPaM & AddUndoRedoPaM( - ::sw::UndoRedoContext &, bool const bCorrToCntnt = false) const; -}; - - -class SwUndoInsLayFmt; - -// base class for insertion of Document, Glossaries and Copy -class SwUndoInserts : public SwUndo, public SwUndRng, private SwUndoSaveCntnt -{ - SwTxtFmtColl *pTxtFmtColl, *pLastNdColl; - SvPtrarr* pFrmFmts; - ::std::vector< ::boost::shared_ptr<SwUndoInsLayFmt> > m_FlyUndos; - SwRedlineData* pRedlData; - sal_Bool bSttWasTxtNd; -protected: - sal_uLong nNdDiff; - SwPosition *pPos; // Content for Redo. - sal_uInt16 nSetPos; // Start in the history list. - - SwUndoInserts( SwUndoId nUndoId, const SwPaM& ); -public: - virtual ~SwUndoInserts(); - - virtual void UndoImpl( ::sw::UndoRedoContext & ); - virtual void RedoImpl( ::sw::UndoRedoContext & ); - virtual void RepeatImpl( ::sw::RepeatContext & ); - - // Set destination range after reading. - void SetInsertRange( const SwPaM&, sal_Bool bScanFlys = sal_True, - sal_Bool bSttWasTxtNd = sal_True ); -}; - -class SwUndoInsDoc : public SwUndoInserts -{ -public: - SwUndoInsDoc( const SwPaM& ); -}; - -class SwUndoCpyDoc : public SwUndoInserts -{ -public: - SwUndoCpyDoc( const SwPaM& ); -}; - -//-------------------------------------------------------------------- - -class SwUndoFlyBase : public SwUndo, private SwUndoSaveSection -{ -protected: - SwFrmFmt* pFrmFmt; // The saved FlyFormat. - sal_uLong nNdPgPos; - xub_StrLen nCntPos; // Page at/in paragraph. - sal_uInt16 nRndId; - sal_Bool bDelFmt; // Delete saved format. - - void InsFly(::sw::UndoRedoContext & rContext, bool bShowSel = true); - void DelFly( SwDoc* ); - - SwUndoFlyBase( SwFrmFmt* pFormat, SwUndoId nUndoId ); - - SwNodeIndex* GetMvSttIdx() const { return SwUndoSaveSection::GetMvSttIdx(); } - sal_uLong GetMvNodeCnt() const { return SwUndoSaveSection::GetMvNodeCnt(); } - -public: - virtual ~SwUndoFlyBase(); - -}; - -class SwUndoInsLayFmt : public SwUndoFlyBase -{ - sal_uLong mnCrsrSaveIndexPara; // Cursor position - xub_StrLen mnCrsrSaveIndexPos; // for undo -public: - SwUndoInsLayFmt( SwFrmFmt* pFormat, sal_uLong nNodeIdx, xub_StrLen nCntIdx ); - - virtual ~SwUndoInsLayFmt(); - - virtual void UndoImpl( ::sw::UndoRedoContext & ); - virtual void RedoImpl( ::sw::UndoRedoContext & ); - virtual void RepeatImpl( ::sw::RepeatContext & ); - - String GetComment() const; - -}; - -class SwUndoDelLayFmt : public SwUndoFlyBase -{ - sal_Bool bShowSelFrm; -public: - SwUndoDelLayFmt( SwFrmFmt* pFormat ); - - virtual void UndoImpl( ::sw::UndoRedoContext & ); - virtual void RedoImpl( ::sw::UndoRedoContext & ); - - void RedoForRollback(); - - void ChgShowSel( sal_Bool bNew ) { bShowSelFrm = bNew; } - - virtual SwRewriter GetRewriter() const; - -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unoatxt.hxx b/sw/inc/unoatxt.hxx deleted file mode 100644 index 0efebbcf72..0000000000 --- a/sw/inc/unoatxt.hxx +++ /dev/null @@ -1,303 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOATXT_HXX -#define _UNOATXT_HXX - -#include <com/sun/star/text/XAutoTextGroup.hpp> -#include <com/sun/star/text/XAutoTextEntry.hpp> -#include <com/sun/star/text/XAutoTextContainer.hpp> -#include <com/sun/star/text/XText.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/container/XNamed.hpp> -#include <com/sun/star/container/XIndexAccess.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/document/XEventsSupplier.hpp> -#include <svl/itemprop.hxx> -#include <svl/lstner.hxx> -#include <cppuhelper/implbase3.hxx> // helper for implementations -#include <cppuhelper/implbase4.hxx> // helper for implementations -#include <cppuhelper/implbase5.hxx> // helper for implementations -#include <cppuhelper/implbase6.hxx> // helper for implementations -#include <svtools/unoevent.hxx> -class SwTextBlocks; -class SwGlossaries; -class SwDoc; -class SwDocShell; -class SwXBodyText; - -#ifndef SW_DECL_SWDOCSHELL_DEFINED -#define SW_DECL_SWDOCSHELL_DEFINED -#include <tools/ref.hxx> -SV_DECL_REF( SwDocShell ) -#endif - - -/****************************************************************************** - * - ******************************************************************************/ -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > - SAL_CALL SwXAutoTextContainer_createInstance( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & ) throw ( ::com::sun::star::uno::Exception ); - -class SwXAutoTextContainer : public cppu::WeakImplHelper3 -< - ::com::sun::star::text::XAutoTextContainer, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::container::XIndexAccess -> -{ - SwGlossaries *pGlossaries; - -protected: - virtual ~SwXAutoTextContainer(); // ref-counted objects are not to be deleted from outside -> protected dtor - -public: - SwXAutoTextContainer(); - - //XIndexAccess - virtual sal_Int32 SAL_CALL getCount( ) 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 ); - - //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); - - //XAutoTextContainer - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextGroup > SAL_CALL insertNewByName(const rtl::OUString& aGroupName) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeByName(const rtl::OUString& aGroupName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - -}; - -class SwXAutoTextGroup : public cppu::WeakImplHelper6 -< - ::com::sun::star::text::XAutoTextGroup, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::container::XIndexAccess, - ::com::sun::star::container::XNamed, - ::com::sun::star::lang::XUnoTunnel -> -{ - const SfxItemPropertySet* pPropSet; - SwGlossaries* pGlossaries; - rtl::OUString sName; - String m_sGroupName; // prefix m_ to disambiguate from some local vars in the implementation - -protected: - virtual ~SwXAutoTextGroup(); // ref-counted objects are not to be deleted from outside -> protected dtor - -public: - SwXAutoTextGroup(const rtl::OUString& rName, SwGlossaries* pGloss); - - - 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); - - //XAutoTextGroup - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getTitles(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL renameByName(const rtl::OUString& aElementName, const rtl::OUString& aNewElementName, const rtl::OUString& aNewElementTitle) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextEntry > SAL_CALL insertNewByName(const rtl::OUString& aName, const rtl::OUString& aTitle, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeByName(const rtl::OUString& aEntryName) throw( ::com::sun::star::container::NoSuchElementException, ::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 ); - - //XIndexAccess - virtual sal_Int32 SAL_CALL getCount( ) 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 ); - - //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 sal_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); - - // - void Invalidate(); -}; - -class SwXAutoTextEntry - :public SfxListener - ,public cppu::WeakImplHelper5 - < - ::com::sun::star::text::XAutoTextEntry, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::text::XText, - ::com::sun::star::document::XEventsSupplier - > -{ - SwGlossaries* pGlossaries; - String sGroupName; - String sEntryName; - SwDocShellRef xDocSh; - SwXBodyText* pBodyText; - com::sun::star::uno::Reference < com::sun::star::lang::XServiceInfo> xBodyText; - - void EnsureBodyText () - { - if ( !pBodyText ) - GetBodyText(); - } - void GetBodyText (); - -protected: - /** ensure that the current content (which may only be in-memory so far) is flushed to the auto text group file - - <p>If somebody modifies an auto text via this class, then this is not directly reflected to the respective - glossaries file (on disk), instead we hold a copy of this text (in [p|x]BodyText). On the other hand, - in applyTo, we do not work with this _copy_, but just tell the target for the application to insert - the content which we're responsible for - and this target doesn't know about our copy, but only - about the persistent version.</br> - So we need to ensure that before somebody else does something with our auto text, we flush our - (in-memory) copy to disk.</p> - - */ - void implFlushDocument( bool _bCloseDoc = false ); - - // SfxListener overridables - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - -protected: - virtual ~SwXAutoTextEntry(); // ref-counted objects are not to be deleted from outside -> protected dtor - -public: - SwXAutoTextEntry(SwGlossaries* , const String& rGroupName, const String& rEntryName); - - 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); - - //XText - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const rtl::OUString& aString, sal_Bool bAbsorb) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL insertControlCharacter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL insertTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent, sal_Bool bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - - //XTextRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException ); - - //XAutoTextEntry - virtual void SAL_CALL applyTo(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange)throw( ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - // XEventsSupplier - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw( ::com::sun::star::uno::RuntimeException ); - - void Invalidate() {pGlossaries = 0;} - const SwGlossaries* GetGlossaries() { return pGlossaries; } - const String& GetGroupName() {return sGroupName;} - const String& GetEntryName() {return sEntryName;} -}; - - -/** Implement the XNameAccess for the AutoText events */ -class SwAutoTextEventDescriptor : public SvBaseEventDescriptor -{ - ::rtl::OUString sSwAutoTextEventDescriptor; - - SwXAutoTextEntry& rAutoTextEntry; - - using SvBaseEventDescriptor::replaceByName; - using SvBaseEventDescriptor::getByName; - -public: - SwAutoTextEventDescriptor( SwXAutoTextEntry& rAutoText ); - - ~SwAutoTextEventDescriptor(); - - virtual rtl::OUString SAL_CALL getImplementationName(void) - throw( ::com::sun::star::uno::RuntimeException ); - -protected: - - virtual void replaceByName( - const sal_uInt16 nEvent, /// item ID of event - const SvxMacro& rMacro) /// event (will be copied) - throw( - ::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::container::NoSuchElementException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - virtual void getByName( - SvxMacro& rMacro, /// macro to be filled - const sal_uInt16 nEvent ) /// item ID of event - throw( - ::com::sun::star::container::NoSuchElementException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx deleted file mode 100644 index 85a864e92b..0000000000 --- a/sw/inc/unobaseclass.hxx +++ /dev/null @@ -1,169 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNOBASECLASS_HXX -#define SW_UNOBASECLASS_HXX - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/container/XEnumeration.hpp> - -#include <cppuhelper/implbase2.hxx> - - -class SfxPoolItem; -class SwClient; -class SwDoc; - - -typedef ::cppu::WeakImplHelper2 -< ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::container::XEnumeration -> -SwSimpleEnumeration_Base; - -enum CursorType -{ - CURSOR_INVALID, - CURSOR_BODY, - CURSOR_FRAME, - CURSOR_TBLTEXT, - CURSOR_FOOTNOTE, - CURSOR_HEADER, - CURSOR_FOOTER, - CURSOR_REDLINE, - CURSOR_ALL, // for Search&Replace - CURSOR_SELECTION, // create a paragraph enumeration from - // a text range or cursor - CURSOR_SELECTION_IN_TABLE, - CURSOR_META, // meta/meta-field -}; - -/* - Start/EndAction or Start/EndAllAction -*/ -class UnoActionContext -{ - private: - SwDoc * m_pDoc; - - public: - UnoActionContext(SwDoc *const pDoc); - ~UnoActionContext(); - - void InvalidateDocument() { m_pDoc = 0; } -}; - -/* - interrupt Actions for a little while -*/ -class UnoActionRemoveContext -{ - private: - SwDoc *const m_pDoc; - - public: - UnoActionRemoveContext(SwDoc *const pDoc); - ~UnoActionRemoveContext(); -}; - -/// helper function for implementing SwClient::Modify -void ClientModify(SwClient* pClient, const SfxPoolItem *pOld, const SfxPoolItem *pNew); - - -#include <boost/utility.hpp> -#include <osl/diagnose.h> -#include <osl/mutex.hxx> -#include <vcl/svapp.hxx> - -namespace sw { - - template<typename T> class UnoImplPtr - : private ::boost::noncopyable - { - private: - T * m_p; - - public: - UnoImplPtr(T *const i_p) - : m_p(i_p) - { - OSL_ENSURE(i_p, "UnoImplPtr: null"); - } - - ~UnoImplPtr() - { - SolarMutexGuard g; - delete m_p; // #i105557#: call dtor with locked solar mutex - m_p = 0; - } - - T & operator * () const { return *m_p; } - - T * operator ->() const { return m_p; } - - T * get () const { return m_p; } - }; - - template< class C > C * - UnoTunnelGetImplementation( - ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XUnoTunnel > const & xUnoTunnel) - { - if (!xUnoTunnel.is()) { return 0; } - C *const pC( reinterpret_cast< C* >( - ::sal::static_int_cast< sal_IntPtr >( - xUnoTunnel->getSomething(C::getUnoTunnelId())))); - return pC; - } - - template< class C > sal_Int64 - UnoTunnelImpl(const ::com::sun::star::uno::Sequence< sal_Int8 > & rId, - C *const pThis) - { - if ((rId.getLength() == 16) && - (0 == rtl_compareMemory(C::getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16))) - { - return ::sal::static_int_cast< sal_Int64 >( - reinterpret_cast< sal_IntPtr >(pThis) ); - } - return 0; - } - - ::com::sun::star::uno::Sequence< ::rtl::OUString > - GetSupportedServiceNamesImpl( - size_t const nServices, char const*const pServices[]); - sal_Bool SupportsServiceImpl( - size_t const nServices, char const*const pServices[], - ::rtl::OUString const & rServiceName); - -} // namespace sw - -#endif // SW_UNOBASECLASS_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unobookmark.hxx b/sw/inc/unobookmark.hxx deleted file mode 100644 index b10012d329..0000000000 --- a/sw/inc/unobookmark.hxx +++ /dev/null @@ -1,287 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNOBOOKMARK_HXX -#define SW_UNOBOOKMARK_HXX - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/container/XNamed.hpp> -#include <com/sun/star/text/XTextContent.hpp> -#include <com/sun/star/text/XFormField.hpp> - -#include <cppuhelper/implbase5.hxx> - -#include <sfx2/Metadatable.hxx> - -#include <unobaseclass.hxx> -#include <IDocumentMarkAccess.hxx> - - -class SwDoc; - - -typedef ::cppu::ImplInheritanceHelper5 -< ::sfx2::MetadatableMixin -, ::com::sun::star::lang::XUnoTunnel -, ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::beans::XPropertySet -, ::com::sun::star::container::XNamed -, ::com::sun::star::text::XTextContent -> SwXBookmark_Base; - -class SwXBookmark - : public SwXBookmark_Base -{ - -private: - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - -protected: - - 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); - - const ::sw::mark::IMark* GetBookmark() const; - - void registerInMark( SwXBookmark& rXMark, ::sw::mark::IMark* const pMarkBase ); - - virtual ~SwXBookmark(); - - /// @param pDoc and pMark != 0, but not & because of ImplInheritanceHelper - SwXBookmark(::sw::mark::IMark *const pMark, SwDoc *const pDoc); - -public: - - /// descriptor - SwXBookmark(); - - static ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent> - CreateXBookmark(SwDoc & rDoc, ::sw::mark::IMark & rBookmark); - - /// @return IMark for this, but only if it lives in pDoc - static ::sw::mark::IMark const* GetBookmarkInDoc(SwDoc const*const pDoc, - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XUnoTunnel> & xUT); - - // MetadatableMixin - virtual ::sfx2::Metadatable* GetCoreObject(); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::frame::XModel > GetModel(); - - 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 >& rIdentifier) - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException); - - // XComponent - virtual void SAL_CALL dispose() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - 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& rPropertyName, - const ::com::sun::star::uno::Any& rValue) - 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& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( - const ::rtl::OUString& rPropertyName, - 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& rPropertyName, - 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 addVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - // XNamed - virtual ::rtl::OUString SAL_CALL getName() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setName(const ::rtl::OUString& rName) - 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); - -}; - -class SwXFieldmarkParameters - : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XNameContainer> - , private SwClient -{ - public: - SwXFieldmarkParameters(::sw::mark::IFieldmark* const pFieldmark) - { - pFieldmark->Add(this); - } - - // XNameContainer - virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeByName( const ::rtl::OUString& Name ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - // XNameReplace - virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - // XNameAccess - virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) 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( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) 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); - protected: - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ); - private: - ::sw::mark::IFieldmark::parameter_map_t* getCoreParameters() throw (::com::sun::star::uno::RuntimeException); -}; - -typedef cppu::ImplInheritanceHelper1< SwXBookmark, - ::com::sun::star::text::XFormField > SwXFieldmark_Base; - -class SwXFieldmark - : public SwXFieldmark_Base -{ - -private: - ::sw::mark::ICheckboxFieldmark* getCheckboxFieldmark(); - bool isReplacementObject; -public: - - static ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent> - CreateXFieldmark( SwDoc & rDoc, ::sw::mark::IMark & rMark ); - - SwXFieldmark(bool isReplacementObject, - ::sw::mark::IMark* 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 getFieldType(void) - throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setFieldType(const ::rtl::OUString& description ) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getParameters( ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Any& rValue) - 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& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); -}; - -class SwXODFCheckboxField : public SwXFieldmark -{ -public: - SwXODFCheckboxField( ::sw::mark::IMark* pBkm = 0, SwDoc* pDoc = 0) : SwXFieldmark(true, - pBkm, pDoc) {} -}; -#endif // SW_UNOBOOKMARK_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx deleted file mode 100644 index edd6c267a5..0000000000 --- a/sw/inc/unochart.hxx +++ /dev/null @@ -1,434 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOCHART_HXX -#define _UNOCHART_HXX - -#include <map> -#include <set> - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/chart2/data/XDataProvider.hpp> -#include <com/sun/star/chart2/data/XDataSource.hpp> -#include <com/sun/star/chart2/data/XDataSequence.hpp> -#include <com/sun/star/chart2/data/XTextualDataSequence.hpp> -#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp> -#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp> -#include <com/sun/star/chart2/data/XRangeXMLConversion.hpp> -#include <com/sun/star/chart2/data/DataSequenceRole.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/util/XCloneable.hpp> -#include <com/sun/star/lang/XComponent.hpp> -#include <com/sun/star/lang/XEventListener.hpp> -#include <com/sun/star/util/XModifiable.hpp> -#include <com/sun/star/util/XModifyBroadcaster.hpp> -#include <com/sun/star/util/XModifyListener.hpp> -#include <com/sun/star/chart/ChartDataRowSource.hpp> - -#include <cppuhelper/interfacecontainer.h> //OMultiTypeInterfaceContainerHelper -#include <cppuhelper/implbase2.hxx> // helper for implementations -#include <cppuhelper/implbase4.hxx> // helper for implementations -#include <cppuhelper/implbase6.hxx> // helper for implementations -#include <cppuhelper/implbase10.hxx> // helper for implementations -#include <cppuhelper/weakref.hxx> - -#include <tools/string.hxx> -#include <tools/link.hxx> -#include <vcl/timer.hxx> - -#include <calbck.hxx> - - -class SfxItemPropertySet; -class SwDoc; -class SwTable; -class SwTableBox; -class SwUnoCrsr; -struct SwRangeDescriptor; -class SwSelBoxes; -class SwFrmFmt; - -////////////////////////////////////////////////////////////////////// - -sal_Bool FillRangeDescriptor( SwRangeDescriptor &rDesc, const String &rCellRangeName ); - -////////////////////////////////////////////////////////////////////// - -class SwChartHelper -{ -public: - static void DoUpdateAllCharts( SwDoc* pDoc ); -}; - -////////////////////////////////////////////////////////////////////// - -class SwChartLockController_Helper -{ - SwDoc *pDoc; - - DECL_LINK( DoUnlockAllCharts, Timer * ); - Timer aUnlockTimer; // timer to unlock chart controllers - bool bIsLocked; - - - // disallow use of d-tor, copy c-tor and assignment operator - SwChartLockController_Helper( const SwChartLockController_Helper & ); - SwChartLockController_Helper & operator = ( const SwChartLockController_Helper & ); - - void LockUnlockAllCharts( sal_Bool bLock ); - void LockAllCharts() { LockUnlockAllCharts( sal_True ); }; - void UnlockAllCharts() { LockUnlockAllCharts( sal_False ); }; - -public: - SwChartLockController_Helper( SwDoc *pDocument ); - ~SwChartLockController_Helper(); - - void StartOrContinueLocking(); - void Disconnect(); -}; - -////////////////////////////////////////////////////////////////////// - -typedef cppu::WeakImplHelper4 -< - ::com::sun::star::chart2::data::XDataProvider, - ::com::sun::star::chart2::data::XRangeXMLConversion, - ::com::sun::star::lang::XComponent, - ::com::sun::star::lang::XServiceInfo -> -SwChartDataProviderBaseClass; - -class SwChartDataProvider : - public SwChartDataProviderBaseClass, - public SwClient -{ - - // used to keep weak-references to all data-sequences of a single table - // see set definition below... - struct lt_DataSequenceRef - { - bool operator()( ::com::sun::star::uno::WeakReference< ::com::sun::star::chart2::data::XDataSequence > xWRef1, ::com::sun::star::uno::WeakReference< ::com::sun::star::chart2::data::XDataSequence > xWRef2 ) const - { - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > xRef1( xWRef1 ); - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > xRef2( xWRef2 ); - return xRef1.get() < xRef2.get(); - } - }; - typedef std::set< ::com::sun::star::uno::WeakReference < ::com::sun::star::chart2::data::XDataSequence >, lt_DataSequenceRef > Set_DataSequenceRef_t; - - // map of data-sequence sets for each table - struct lt_SwTable_Ptr - { - bool operator()( const SwTable *p1, const SwTable *p2 ) const - { - return p1 < p2; - } - }; - typedef std::map< const SwTable *, Set_DataSequenceRef_t, lt_SwTable_Ptr > Map_Set_DataSequenceRef_t; - - - // map of all data-sequences provided directly or indirectly (e.g. via - // data-source) by this object. Since there is only one object of this type - // for each document it should hold references to all used data-sequences for - // all tables of the document. - mutable Map_Set_DataSequenceRef_t aDataSequences; - - ::cppu::OInterfaceContainerHelper aEvtListeners; - const SwDoc * pDoc; - sal_Bool bDisposed; - - - // disallow use of c-tor and assignment operator - SwChartDataProvider( const SwChartDataProvider & ); - SwChartDataProvider & operator = ( const SwChartDataProvider & ); - - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > SAL_CALL Impl_createDataSource( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments, sal_Bool bTestOnly = sal_False ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL Impl_createDataSequenceByRangeRepresentation( const ::rtl::OUString& aRangeRepresentation, sal_Bool bTestOnly = sal_False ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - rtl::OUString GetBrokenCellRangeForExport( const rtl::OUString &rCellRangeRepresentation ); - -protected: - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - SwChartDataProvider( const SwDoc* pDoc ); - virtual ~SwChartDataProvider(); - - // XDataProvider - virtual ::sal_Bool SAL_CALL createDataSourcePossible( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > SAL_CALL createDataSource( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL detectArguments( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource >& xDataSource ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL createDataSequenceByRangeRepresentationPossible( const ::rtl::OUString& aRangeRepresentation ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL createDataSequenceByRangeRepresentation( const ::rtl::OUString& aRangeRepresentation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XRangeSelection > SAL_CALL getRangeSelection( ) throw (::com::sun::star::uno::RuntimeException); - - // XRangeXMLConversion - virtual ::rtl::OUString SAL_CALL convertRangeToXML( const ::rtl::OUString& aRangeRepresentation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL convertRangeFromXML( const ::rtl::OUString& aXMLRange ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - // XComponent - virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) 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); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_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( ) throw (::com::sun::star::uno::RuntimeException); - - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - - void AddDataSequence( const SwTable &rTable, ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > &rxDataSequence ); - void RemoveDataSequence( const SwTable &rTable, ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > &rxDataSequence ); - - // will send modifdied events for all data-sequences of the table - void InvalidateTable( const SwTable *pTable ); - sal_Bool DeleteBox( const SwTable *pTable, const SwTableBox &rBox ); - void DisposeAllDataSequences( const SwTable *pTable ); - - // functionality needed to get notified about new added rows/cols - void AddRowCols( const SwTable &rTable, const SwSelBoxes& rBoxes, sal_uInt16 nLines, sal_Bool bBehind ); -}; - -////////////////////////////////////////////////////////////////////// - -typedef cppu::WeakImplHelper2 -< - ::com::sun::star::chart2::data::XDataSource, - ::com::sun::star::lang::XServiceInfo -> -SwChartDataSourceBaseClass; - -class SwChartDataSource : - public SwChartDataSourceBaseClass -{ - com::sun::star::uno::Sequence< - com::sun::star::uno::Reference< - com::sun::star::chart2::data::XLabeledDataSequence > > aLDS; - - // disallow use of c-tor and assignment operator - SwChartDataSource( const SwChartDataSource & ); - SwChartDataSource & operator = ( const SwChartDataSource & ); - -public: - SwChartDataSource( const com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::chart2::data::XLabeledDataSequence > > &rLDS ); - virtual ~SwChartDataSource(); - - // XDataSource - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences( ) throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_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( ) throw (::com::sun::star::uno::RuntimeException); -}; - -////////////////////////////////////////////////////////////////////// - -typedef cppu::WeakImplHelper10 -< - ::com::sun::star::chart2::data::XDataSequence, - ::com::sun::star::chart2::data::XTextualDataSequence, - ::com::sun::star::chart2::data::XNumericalDataSequence, - ::com::sun::star::util::XCloneable, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::util::XModifiable, - ::com::sun::star::lang::XEventListener, - ::com::sun::star::lang::XComponent -> -SwChartDataSequenceBaseClass; - -class SwChartDataSequence : - public SwChartDataSequenceBaseClass, - public SwClient -{ - ::cppu::OInterfaceContainerHelper aEvtListeners; - ::cppu::OInterfaceContainerHelper aModifyListeners; - ::com::sun::star::chart2::data::DataSequenceRole aRole; - - String aRowLabelText; - String aColLabelText; - - // holds a reference to the data-provider to guarantee it's lifetime last as - // long as the pointer may be used. - ::com::sun::star::uno::Reference< com::sun::star::chart2::data::XDataProvider > xDataProvider; - SwChartDataProvider * pDataProvider; - - SwUnoCrsr* pTblCrsr; // cursor spanned over cells to use - SwDepend aCursorDepend; //the cursor is removed after the doc has been removed - - const SfxItemPropertySet* _pPropSet; - - sal_Bool bDisposed; - - // disallow use of c-tor and assignment operator - SwChartDataSequence( const SwChartDataSequence &rObj ); - SwChartDataSequence & operator = ( const SwChartDataSequence & ); - -protected: - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - SwChartDataSequence( SwChartDataProvider &rProvider, - SwFrmFmt &rTblFmt, - SwUnoCrsr *pTableCursor ); - virtual ~SwChartDataSequence(); - - 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); - - // XDataSequence - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getData( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getSourceRangeRepresentation( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL generateLabel( ::com::sun::star::chart2::data::LabelOrigin eLabelOrigin ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL getNumberFormatKeyByIndex( ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - - // XTextualDataSequence - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getTextualData( ) throw (::com::sun::star::uno::RuntimeException); - - // XNumericalDataSequence - virtual ::com::sun::star::uno::Sequence< double > SAL_CALL getNumericalData( ) throw (::com::sun::star::uno::RuntimeException); - - // XCloneable - virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) 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); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_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( ) throw (::com::sun::star::uno::RuntimeException); - - // XModifiable - virtual ::sal_Bool SAL_CALL isModified( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setModified( ::sal_Bool bModified ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException); - - // XModifyBroadcaster - virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); - - // XEventListener - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); - - // XComponent - virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) 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); - - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - sal_Bool DeleteBox( const SwTableBox &rBox ); - - void FillRangeDesc( SwRangeDescriptor &rRangeDesc ) const; - bool ExtendTo( bool bExtendCol, sal_Int32 nFirstNew, sal_Int32 nCount ); -}; - -////////////////////////////////////////////////////////////////////// - -typedef cppu::WeakImplHelper6 -< - ::com::sun::star::chart2::data::XLabeledDataSequence, - ::com::sun::star::util::XCloneable, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::util::XModifyListener, - ::com::sun::star::util::XModifyBroadcaster, - ::com::sun::star::lang::XComponent -> -SwChartLabeledDataSequenceBaseClass; - -class SwChartLabeledDataSequence : - public SwChartLabeledDataSequenceBaseClass -{ - ::cppu::OInterfaceContainerHelper aEvtListeners; - ::cppu::OInterfaceContainerHelper aModifyListeners; - - ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::data::XDataSequence > xData; - ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::data::XDataSequence > xLabels; - - sal_Bool bDisposed; - - // disallow use of c-tor and assignment operator - SwChartLabeledDataSequence( const SwChartLabeledDataSequence & ); - SwChartLabeledDataSequence & operator = ( const SwChartLabeledDataSequence & ); - - void SetDataSequence( ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& rxDest, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& rxSource ); - - -public: - SwChartLabeledDataSequence(); - virtual ~SwChartLabeledDataSequence(); - - // XLabeledDataSequence - virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getValues( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setValues( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getLabel( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setLabel( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence ) throw (::com::sun::star::uno::RuntimeException); - - // XCloneable - virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_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( ) throw (::com::sun::star::uno::RuntimeException); - - // XEventListener - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); - - // XModifyListener - virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); - - // XModifyBroadcaster - virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); - - // XComponent - virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) 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); -}; - -////////////////////////////////////////////////////////////////////// - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx deleted file mode 100644 index 7abf9d7256..0000000000 --- a/sw/inc/unocoll.hxx +++ /dev/null @@ -1,552 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOCOLL_HXX -#define _UNOCOLL_HXX -#include <tools/solar.h> -#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> -#include <cppuhelper/implbase1.hxx> // helper for implementations -#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> -#include "swdllapi.h" -/*************************************************** - *************************************************** - * - ***************************************************/ -class SwDoc; -class SwFrmFmt; -namespace com{namespace sun {namespace star {namespace text -{ - class XTextTable; - class XTextSection; - class XFootnote; -}}}} -class SwXFrame; -class SwFrmFmt; -class SwFmtFtn; -class XBookmark; -class SwXReferenceMark; -class SwSectionFmt; -class SwFmtRefMark; -class SwXReferenceMark; -class SwXBookmark; - -class SwUnoCollection -{ - SwDoc* pDoc; - sal_Bool bObjectValid; - - public: - SwUnoCollection(SwDoc* p) : - pDoc(p), - bObjectValid(sal_True){} - - virtual void Invalidate(); - sal_Bool IsValid() const {return bObjectValid;} - - - SwDoc* GetDoc() const {return pDoc;} -}; - -#define SW_SERVICE_TYPE_TEXTTABLE 0 -#define SW_SERVICE_TYPE_TEXTFRAME 1 -#define SW_SERVICE_TYPE_GRAPHIC 2 -#define SW_SERVICE_TYPE_OLE 3 -#define SW_SERVICE_TYPE_BOOKMARK 4 -#define SW_SERVICE_TYPE_FOOTNOTE 5 -#define SW_SERVICE_TYPE_ENDNOTE 6 -#define SW_SERVICE_TYPE_INDEXMARK 7 -#define SW_SERVICE_TYPE_INDEX 8 -#define SW_SERVICE_REFERENCE_MARK 9 -#define SW_SERVICE_STYLE_CHARACTER_STYLE 10 -#define SW_SERVICE_STYLE_PARAGRAPH_STYLE 11 -#define SW_SERVICE_STYLE_FRAME_STYLE 12 -#define SW_SERVICE_STYLE_PAGE_STYLE 13 -#define SW_SERVICE_STYLE_NUMBERING_STYLE 14 -#define SW_SERVICE_CONTENT_INDEX_MARK 15 -#define SW_SERVICE_CONTENT_INDEX 16 -#define SW_SERVICE_USER_INDEX_MARK 17 -#define SW_SERVICE_USER_INDEX 18 -#define SW_SERVICE_TEXT_SECTION 19 -#define SW_SERVICE_FIELDTYPE_DATETIME 20 -#define SW_SERVICE_FIELDTYPE_USER 21 -#define SW_SERVICE_FIELDTYPE_SET_EXP 22 -#define SW_SERVICE_FIELDTYPE_GET_EXP 23 -#define SW_SERVICE_FIELDTYPE_FILE_NAME 24 -#define SW_SERVICE_FIELDTYPE_PAGE_NUM 25 -#define SW_SERVICE_FIELDTYPE_AUTHOR 26 -#define SW_SERVICE_FIELDTYPE_CHAPTER 27 -#define SW_SERVICE_FIELDTYPE_DUMMY_0 28 -#define SW_SERVICE_FIELDTYPE_GET_REFERENCE 29 -#define SW_SERVICE_FIELDTYPE_CONDITIONED_TEXT 30 -#define SW_SERVICE_FIELDTYPE_ANNOTATION 31 -#define SW_SERVICE_FIELDTYPE_INPUT 32 -#define SW_SERVICE_FIELDTYPE_MACRO 33 -#define SW_SERVICE_FIELDTYPE_DDE 34 -#define SW_SERVICE_FIELDTYPE_HIDDEN_PARA 35 -#define SW_SERVICE_FIELDTYPE_DOC_INFO 36 -#define SW_SERVICE_FIELDTYPE_TEMPLATE_NAME 37 -#define SW_SERVICE_FIELDTYPE_USER_EXT 38 -#define SW_SERVICE_FIELDTYPE_REF_PAGE_SET 39 -#define SW_SERVICE_FIELDTYPE_REF_PAGE_GET 40 -#define SW_SERVICE_FIELDTYPE_JUMP_EDIT 41 -#define SW_SERVICE_FIELDTYPE_SCRIPT 42 -#define SW_SERVICE_FIELDTYPE_DATABASE_NEXT_SET 43 -#define SW_SERVICE_FIELDTYPE_DATABASE_NUM_SET 44 -#define SW_SERVICE_FIELDTYPE_DATABASE_SET_NUM 45 -#define SW_SERVICE_FIELDTYPE_DATABASE 46 -#define SW_SERVICE_FIELDTYPE_DATABASE_NAME 47 -#define SW_SERVICE_FIELDTYPE_TABLE_FORMULA 48 -#define SW_SERVICE_FIELDTYPE_PAGE_COUNT 49 -#define SW_SERVICE_FIELDTYPE_PARAGRAPH_COUNT 50 -#define SW_SERVICE_FIELDTYPE_WORD_COUNT 51 -#define SW_SERVICE_FIELDTYPE_CHARACTER_COUNT 52 -#define SW_SERVICE_FIELDTYPE_TABLE_COUNT 53 -#define SW_SERVICE_FIELDTYPE_GRAPHIC_OBJECT_COUNT 54 -#define SW_SERVICE_FIELDTYPE_EMBEDDED_OBJECT_COUNT 55 -#define SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_AUTHOR 56 -#define SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_DATE_TIME 57 -#define SW_SERVICE_FIELDTYPE_DOCINFO_EDIT_TIME 58 -#define SW_SERVICE_FIELDTYPE_DOCINFO_DESCRIPTION 59 -#define SW_SERVICE_FIELDTYPE_DOCINFO_CREATE_AUTHOR 60 -#define SW_SERVICE_FIELDTYPE_DOCINFO_CREATE_DATE_TIME 61 -#define SW_SERVICE_FIELDTYPE_DUMMY_O 62 -#define SW_SERVICE_FIELDTYPE_DUMMY_1 63 -#define SW_SERVICE_FIELDTYPE_DUMMY_2 64 -#define SW_SERVICE_FIELDTYPE_DUMMY_3 65 -#define SW_SERVICE_FIELDTYPE_DOCINFO_CUSTOM 66 -#define SW_SERVICE_FIELDTYPE_DOCINFO_PRINT_AUTHOR 67 -#define SW_SERVICE_FIELDTYPE_DOCINFO_PRINT_DATE_TIME 68 -#define SW_SERVICE_FIELDTYPE_DOCINFO_KEY_WORDS 69 -#define SW_SERVICE_FIELDTYPE_DOCINFO_SUBJECT 70 -#define SW_SERVICE_FIELDTYPE_DOCINFO_TITLE 71 -#define SW_SERVICE_FIELDTYPE_DOCINFO_REVISION 72 -#define SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY 73 -#define SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS 74 -#define SW_SERVICE_FIELDTYPE_DROPDOWN 75 -#define SW_SERVICE_FIELDTYPE_METAFIELD 76 -#define SW_SERVICE_FIELDTYPE_DUMMY_4 77 -#define SW_SERVICE_FIELDTYPE_DUMMY_5 78 -#define SW_SERVICE_FIELDTYPE_DUMMY_6 79 -#define SW_SERVICE_FIELDTYPE_DUMMY_7 80 -#define SW_SERVICE_FIELDMASTER_USER 81 -#define SW_SERVICE_FIELDMASTER_DDE 82 -#define SW_SERVICE_FIELDMASTER_SET_EXP 83 -#define SW_SERVICE_FIELDMASTER_DATABASE 84 -#define SW_SERVICE_FIELDMASTER_BIBLIOGRAPHY 85 -#define SW_SERVICE_FIELDMASTER_DUMMY2 86 -#define SW_SERVICE_FIELDMASTER_DUMMY3 87 -#define SW_SERVICE_FIELDMASTER_DUMMY4 88 -#define SW_SERVICE_FIELDMASTER_DUMMY5 89 -#define SW_SERVICE_INDEX_ILLUSTRATIONS 90 -#define SW_SERVICE_INDEX_OBJECTS 91 -#define SW_SERVICE_INDEX_TABLES 92 -#define SW_SERVICE_INDEX_BIBLIOGRAPHY 93 -#define SW_SERVICE_PARAGRAPH 94 -#define SW_SERVICE_FIELDTYPE_INPUT_USER 95 -#define SW_SERVICE_FIELDTYPE_HIDDEN_TEXT 96 -#define SW_SERVICE_STYLE_CONDITIONAL_PARAGRAPH_STYLE 97 -#define SW_SERVICE_NUMBERING_RULES 98 -#define SW_SERVICE_TEXT_COLUMNS 99 -#define SW_SERVICE_INDEX_HEADER_SECTION 100 -#define SW_SERVICE_DEFAULTS 101 -#define SW_SERVICE_IMAP_RECTANGLE 102 -#define SW_SERVICE_IMAP_CIRCLE 103 -#define SW_SERVICE_IMAP_POLYGON 104 -#define SW_SERVICE_TYPE_TEXT_GRAPHIC 105 -#define SW_SERVICE_CHART2_DATA_PROVIDER 106 -#define SW_SERVICE_TYPE_FIELDMARK 107 -#define SW_SERVICE_TYPE_FORMFIELDMARK 108 -#define SW_SERVICE_TYPE_META 109 -#define SW_SERVICE_VBAOBJECTPROVIDER 110 -#define SW_SERVICE_VBACODENAMEPROVIDER 111 -#define SW_SERVICE_VBAPROJECTNAMEPROVIDER 112 -#define SW_SERVICE_VBAGLOBALS 113 - -#define SW_SERVICE_LAST SW_SERVICE_VBAGLOBALS - -#define SW_SERVICE_INVALID USHRT_MAX - -// -// case-corrected versions of service-names (see #i67811) -// -#define CSS_TEXT_TEXTFIELD_DATE_TIME "com.sun.star.text.textfield.DateTime" -#define CSS_TEXT_TEXTFIELD_USER "com.sun.star.text.textfield.User" -#define CSS_TEXT_TEXTFIELD_SET_EXPRESSION "com.sun.star.text.textfield.SetExpression" -#define CSS_TEXT_TEXTFIELD_GET_EXPRESSION "com.sun.star.text.textfield.GetExpression" -#define CSS_TEXT_TEXTFIELD_FILE_NAME "com.sun.star.text.textfield.FileName" -#define CSS_TEXT_TEXTFIELD_PAGE_NUMBER "com.sun.star.text.textfield.PageNumber" -#define CSS_TEXT_TEXTFIELD_AUTHOR "com.sun.star.text.textfield.Author" -#define CSS_TEXT_TEXTFIELD_CHAPTER "com.sun.star.text.textfield.Chapter" -#define CSS_TEXT_TEXTFIELD_GET_REFERENCE "com.sun.star.text.textfield.GetReference" -#define CSS_TEXT_TEXTFIELD_CONDITIONAL_TEXT "com.sun.star.text.textfield.ConditionalText" -#define CSS_TEXT_TEXTFIELD_ANNOTATION "com.sun.star.text.textfield.Annotation" -#define CSS_TEXT_TEXTFIELD_INPUT "com.sun.star.text.textfield.Input" -#define CSS_TEXT_TEXTFIELD_MACRO "com.sun.star.text.textfield.Macro" -#define CSS_TEXT_TEXTFIELD_DDE "com.sun.star.text.textfield.DDE" -#define CSS_TEXT_TEXTFIELD_HIDDEN_PARAGRAPH "com.sun.star.text.textfield.HiddenParagraph" -#define CSS_TEXT_TEXTFIELD_TEMPLATE_NAME "com.sun.star.text.textfield.TemplateName" -#define CSS_TEXT_TEXTFIELD_EXTENDED_USER "com.sun.star.text.textfield.ExtendedUser" -#define CSS_TEXT_TEXTFIELD_REFERENCE_PAGE_SET "com.sun.star.text.textfield.ReferencePageSet" -#define CSS_TEXT_TEXTFIELD_REFERENCE_PAGE_GET "com.sun.star.text.textfield.ReferencePageGet" -#define CSS_TEXT_TEXTFIELD_JUMP_EDIT "com.sun.star.text.textfield.JumpEdit" -#define CSS_TEXT_TEXTFIELD_SCRIPT "com.sun.star.text.textfield.Script" -#define CSS_TEXT_TEXTFIELD_DATABASE_NEXT_SET "com.sun.star.text.textfield.DatabaseNextSet" -#define CSS_TEXT_TEXTFIELD_DATABASE_NUMBER_OF_SET "com.sun.star.text.textfield.DatabaseNumberOfSet" -#define CSS_TEXT_TEXTFIELD_DATABASE_SET_NUMBER "com.sun.star.text.textfield.DatabaseSetNumber" -#define CSS_TEXT_TEXTFIELD_DATABASE "com.sun.star.text.textfield.Database" -#define CSS_TEXT_TEXTFIELD_DATABASE_NAME "com.sun.star.text.textfield.DatabaseName" -#define CSS_TEXT_TEXTFIELD_TABLE_FORMULA "com.sun.star.text.textfield.TableFormula" -#define CSS_TEXT_TEXTFIELD_PAGE_COUNT "com.sun.star.text.textfield.PageCount" -#define CSS_TEXT_TEXTFIELD_PARAGRAPH_COUNT "com.sun.star.text.textfield.ParagraphCount" -#define CSS_TEXT_TEXTFIELD_WORD_COUNT "com.sun.star.text.textfield.WordCount" -#define CSS_TEXT_TEXTFIELD_CHARACTER_COUNT "com.sun.star.text.textfield.CharacterCount" -#define CSS_TEXT_TEXTFIELD_TABLE_COUNT "com.sun.star.text.textfield.TableCount" -#define CSS_TEXT_TEXTFIELD_GRAPHIC_OBJECT_COUNT "com.sun.star.text.textfield.GraphicObjectCount" -#define CSS_TEXT_TEXTFIELD_EMBEDDED_OBJECT_COUNT "com.sun.star.text.textfield.EmbeddedObjectCount" -#define CSS_TEXT_TEXTFIELD_DOCINFO_CHANGE_AUTHOR "com.sun.star.text.textfield.docinfo.ChangeAuthor" -#define CSS_TEXT_TEXTFIELD_DOCINFO_CHANGE_DATE_TIME "com.sun.star.text.textfield.docinfo.ChangeDateTime" -#define CSS_TEXT_TEXTFIELD_DOCINFO_EDIT_TIME "com.sun.star.text.textfield.docinfo.EditTime" -#define CSS_TEXT_TEXTFIELD_DOCINFO_DESCRIPTION "com.sun.star.text.textfield.docinfo.Description" -#define CSS_TEXT_TEXTFIELD_DOCINFO_CREATE_AUTHOR "com.sun.star.text.textfield.docinfo.CreateAuthor" -#define CSS_TEXT_TEXTFIELD_DOCINFO_CREATE_DATE_TIME "com.sun.star.text.textfield.docinfo.CreateDateTime" -#define CSS_TEXT_TEXTFIELD_DOCINFO_PRINT_AUTHOR "com.sun.star.text.textfield.docinfo.PrintAuthor" -#define CSS_TEXT_TEXTFIELD_DOCINFO_PRINT_DATE_TIME "com.sun.star.text.textfield.docinfo.PrintDateTime" -#define CSS_TEXT_TEXTFIELD_DOCINFO_KEY_WORDS "com.sun.star.text.textfield.docinfo.KeyWords" -#define CSS_TEXT_TEXTFIELD_DOCINFO_SUBJECT "com.sun.star.text.textfield.docinfo.Subject" -#define CSS_TEXT_TEXTFIELD_DOCINFO_TITLE "com.sun.star.text.textfield.docinfo.Title" -#define CSS_TEXT_TEXTFIELD_DOCINFO_REVISION "com.sun.star.text.textfield.docinfo.Revision" -#define CSS_TEXT_TEXTFIELD_DOCINFO_CUSTOM "com.sun.star.text.textfield.docinfo.Custom" -#define CSS_TEXT_TEXTFIELD_BIBLIOGRAPHY "com.sun.star.text.textfield.Bibliography" -#define CSS_TEXT_TEXTFIELD_COMBINED_CHARACTERS "com.sun.star.text.textfield.CombinedCharacters" -#define CSS_TEXT_TEXTFIELD_DROP_DOWN "com.sun.star.text.textfield.DropDown" -#define CSS_TEXT_TEXTFIELD_INPUT_USER "com.sun.star.text.textfield.InputUser" -#define CSS_TEXT_TEXTFIELD_HIDDEN_TEXT "com.sun.star.text.textfield.HiddenText" -#define CSS_TEXT_FIELDMASTER_USER "com.sun.star.text.fieldmaster.User" -#define CSS_TEXT_FIELDMASTER_DDE "com.sun.star.text.fieldmaster.DDE" -#define CSS_TEXT_FIELDMASTER_SET_EXPRESSION "com.sun.star.text.fieldmaster.SetExpression" -#define CSS_TEXT_FIELDMASTER_DATABASE "com.sun.star.text.fieldmaster.Database" -#define CSS_TEXT_FIELDMASTER_BIBLIOGRAPHY "com.sun.star.text.fieldmaster.Bibliography" - - -class SwXServiceProvider -{ -public: - static rtl::OUString GetProviderName(sal_uInt16 nObjectType); - static sal_uInt16 GetProviderType(const rtl::OUString& rServiceName); - static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > MakeInstance(sal_uInt16 nObjectType, SwDoc* pDoc); - static ::com::sun::star::uno::Sequence<rtl::OUString> GetAllServiceNames(); - -}; - -typedef -cppu::WeakImplHelper3 -< - ::com::sun::star::container::XNameAccess, - ::com::sun::star::container::XIndexAccess, - ::com::sun::star::lang::XServiceInfo -> -SwCollectionBaseClass; -class SW_DLLPUBLIC SwXTextTables : public SwCollectionBaseClass, - public SwUnoCollection -{ -protected: - virtual ~SwXTextTables(); -public: - SwXTextTables(SwDoc* pDoc); - - - //XIndexAccess - virtual sal_Int32 SAL_CALL getCount( ) 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 ); - - //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 sal_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 ); -}; - -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 SwXFramesBaseClass, - public SwUnoCollection -{ - const FlyCntType eType; -protected: - virtual ~SwXFrames(); -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 ); - - //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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - FlyCntType GetType()const{return eType;} - static SwXFrame* GetObject( SwFrmFmt& rFmt, FlyCntType eType ); - -}; - -class SwXTextFrames : public SwXFrames -{ -protected: - virtual ~SwXTextFrames(); -public: - SwXTextFrames(SwDoc* pDoc); - - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - -}; - -class SwXTextGraphicObjects : public SwXFrames -{ -protected: - virtual ~SwXTextGraphicObjects(); -public: - SwXTextGraphicObjects(SwDoc* pDoc); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - -}; - -class SwXTextEmbeddedObjects : public SwXFrames -{ -protected: - virtual ~SwXTextEmbeddedObjects(); -public: - SwXTextEmbeddedObjects(SwDoc* pDoc); - - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - -}; - -class SwXTextSections : public SwCollectionBaseClass, - public SwUnoCollection -{ -protected: - virtual ~SwXTextSections(); -public: - SwXTextSections(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 ); - - //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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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::uno::Reference< ::com::sun::star::text::XTextSection> GetObject( SwSectionFmt& rFmt ); -}; - -class SwXBookmarks : public SwCollectionBaseClass, - public SwUnoCollection -{ - 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 ); - - //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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - -}; - -class SwXNumberingRulesCollection : public cppu::WeakImplHelper1 -< - ::com::sun::star::container::XIndexAccess ->, - public SwUnoCollection -{ -protected: - virtual ~SwXNumberingRulesCollection(); - -public: - SwXNumberingRulesCollection( SwDoc* pDoc ); - - //XIndexAccess - virtual sal_Int32 SAL_CALL 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 ); - - //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); -}; - -typedef -cppu::WeakImplHelper2 -< - ::com::sun::star::container::XIndexAccess, - ::com::sun::star::lang::XServiceInfo -> -SwSimpleIndexAccessBaseClass; - -class SwXFootnotes : public SwSimpleIndexAccessBaseClass, - public SwUnoCollection -{ - const bool m_bEndnote; - -protected: - virtual ~SwXFootnotes(); -public: - SwXFootnotes(sal_Bool bEnd, SwDoc* pDoc); - - //XIndexAccess - virtual sal_Int32 SAL_CALL 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 ); - - //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 sal_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::uno::Reference< ::com::sun::star::text::XFootnote> GetObject( SwDoc& rDoc, const SwFmtFtn& rFmt ); -}; - -class SwXReferenceMarks : public SwCollectionBaseClass, - public SwUnoCollection -{ -protected: - virtual ~SwXReferenceMarks(); -public: - SwXReferenceMarks(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 ); - - //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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 SwXReferenceMark* GetObject( SwDoc* pDoc, const SwFmtRefMark* pMark ); -}; - -#endif - - - - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unocore.hrc b/sw/inc/unocore.hrc deleted file mode 100644 index 67ef961aa3..0000000000 --- a/sw/inc/unocore.hrc +++ /dev/null @@ -1,48 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOCORE_HRC -#define _UNOCORE_HRC - -#include "rcid.hrc" - -#define STR_CHART2_ROW_LABEL_TEXT (RC_UNOCORE_BEGIN + 1) -#define STR_CHART2_COL_LABEL_TEXT (RC_UNOCORE_BEGIN + 2) -#define STR_STYLE_FAMILY_CHARACTER (RC_UNOCORE_BEGIN + 3) -#define STR_STYLE_FAMILY_PARAGRAPH (RC_UNOCORE_BEGIN + 4) -#define STR_STYLE_FAMILY_FRAME (RC_UNOCORE_BEGIN + 5) -#define STR_STYLE_FAMILY_PAGE (RC_UNOCORE_BEGIN + 6) -#define STR_STYLE_FAMILY_NUMBERING (RC_UNOCORE_BEGIN + 7) - -#define UNOCORE_ACT_END STR_STYLE_FAMILY_NUMBERING - -#if UNOCORE_ACT_END > RC_UNOCORE_END -#error Resource-Id Ueberlauf in #file, #line -#endif - -#endif - diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx deleted file mode 100644 index e6d64b3d87..0000000000 --- a/sw/inc/unocrsr.hxx +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOCRSR_HXX -#define _UNOCRSR_HXX -#include <swcrsr.hxx> -#include <calbck.hxx> - - -class SwUnoCrsr : public virtual SwCursor, public SwModify -{ - sal_Bool bRemainInSection : 1; - sal_Bool bSkipOverHiddenSections : 1; - sal_Bool bSkipOverProtectSections : 1; - -public: - SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 ); - virtual ~SwUnoCrsr(); - -protected: - - virtual const SwCntntFrm* DoSetBidiLevelLeftRight( - sal_Bool & io_rbLeft, sal_Bool bVisualAllowed, sal_Bool bInsertCrsr); - virtual void DoSetBidiLevelUpDown(); - -public: - - // Does a selection of content exist in table? - // Return value indicates if the cursor remains at its old position. - virtual sal_Bool IsSelOvr( int eFlags = - ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | - nsSwCursorSelOverFlags::SELOVER_TOGGLE | - nsSwCursorSelOverFlags::SELOVER_CHANGEPOS )); - - virtual bool IsReadOnlyAvailable() const; - - sal_Bool IsRemainInSection() const { return bRemainInSection; } - void SetRemainInSection( sal_Bool bFlag ) { bRemainInSection = bFlag; } - - virtual sal_Bool IsSkipOverProtectSections() const - { return bSkipOverProtectSections; } - void SetSkipOverProtectSections( sal_Bool bFlag ) - { bSkipOverProtectSections = bFlag; } - - virtual sal_Bool IsSkipOverHiddenSections() const - { return bSkipOverHiddenSections; } - void SetSkipOverHiddenSections( sal_Bool bFlag ) - { bSkipOverHiddenSections = bFlag; } - - // make copy of cursor - virtual SwUnoCrsr * Clone() const; - - DECL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr ) -}; - - - -class SwUnoTableCrsr : public virtual SwUnoCrsr, public virtual SwTableCursor -{ - // The selection has the same order as the table boxes, i.e. - // if something is deleted from the one array at a certain position - // it has also to be deleted from the other! - SwCursor aTblSel; - - using SwTableCursor::MakeBoxSels; - -public: - SwUnoTableCrsr( const SwPosition& rPos ); - virtual ~SwUnoTableCrsr(); - - // Does a selection of content exist in table? - // Return value indicates if the cursor remains at its old position. - virtual sal_Bool IsSelOvr( int eFlags = - ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | - nsSwCursorSelOverFlags::SELOVER_TOGGLE | - nsSwCursorSelOverFlags::SELOVER_CHANGEPOS )); - - virtual SwUnoTableCrsr * Clone() const; - - void MakeBoxSels(); - - SwCursor& GetSelRing() { return aTblSel; } - const SwCursor& GetSelRing() const { return aTblSel; } -}; - - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx deleted file mode 100644 index 8778efebe9..0000000000 --- a/sw/inc/unocrsrhelper.hxx +++ /dev/null @@ -1,215 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOCRSRHELPER_HXX -#define _UNOCRSRHELPER_HXX - -#include <map> - -#include <com/sun/star/beans/XPropertyState.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> - -#include <swtypes.hxx> -#include <pam.hxx> - - -class String; -class SfxItemSet; -class SfxItemPropertySet; -struct SfxItemPropertySimpleEntry; -class SwTxtNode; -class SwPaM; -class SwCursor; -class SwUnoCrsr; -class SwFmtColl; -struct SwSortOptions; -class SwDoc; - -namespace com{ namespace sun{ namespace star{ - namespace uno{ - class Any; - } - namespace beans{ - struct PropertyValue; - } - namespace text { - class XTextContent; - } -}}} - -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_SWX_TEXT_PORTION_TOLERANT -}; - -namespace SwUnoCursorHelper -{ - // 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( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const com::sun::star::uno::Any& rAny ); - bool FillValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const com::sun::star::uno::Any*& pAny ); - }; - - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > - GetNestedTextContent(SwTxtNode & rTextNode, xub_StrLen const nIndex, - bool const bParent); - - sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry - , SwPaM& rPam - , com::sun::star::uno::Any *pAny - , com::sun::star::beans::PropertyState& eState - , const SwTxtNode* pNode = 0 ); - - void GetCurPageStyle(SwPaM& rPaM, String &rString); - - inline sal_Bool IsStartOfPara(SwPaM& rUnoCrsr) - { return rUnoCrsr.GetPoint()->nContent == 0;} - inline sal_Bool IsEndOfPara(SwPaM& rUnoCrsr) - { return rUnoCrsr.GetCntntNode() && - rUnoCrsr.GetPoint()->nContent == rUnoCrsr.GetCntntNode()->Len();} - - 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 - ) throw( com::sun::star::lang::IllegalArgumentException, com::sun::star::io::IOException, com::sun::star::uno::RuntimeException ); - - void getNumberingProperty( - SwPaM& rPam, - com::sun::star::beans::PropertyState& eState, - com::sun::star::uno::Any *pAny ); - - void setNumberingProperty( - const com::sun::star::uno::Any& rValue, - SwPaM& rPam); - - sal_Int16 IsNodeNumStart( - SwPaM& rPam, - com::sun::star::beans::PropertyState& eState); - - sal_Bool DocInsertStringSplitCR( SwDoc &rDoc, - const SwPaM &rNewCursor, const String &rText, - const bool bForceExpandHints ); - void makeRedline( SwPaM& rPaM, 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); - - - /// @param bTableMode: attributes should be applied to a table selection - void SetCrsrAttr(SwPaM & rPam, const SfxItemSet & rSet, - const SetAttrMode nAttrMode, - const bool bTableMode = false); - void GetCrsrAttr(SwPaM & rPam, SfxItemSet & rSet, - const bool bOnlyTxtAttr = false, - const bool bGetFromChrFmt = true); - void GetTextFromPam(SwPaM & rPam, ::rtl::OUString & rBuffer); - SwFmtColl * GetCurTxtFmtColl(SwPaM & rPam, const bool bConditional); - - void SelectPam(SwPaM & rPam, const bool bExpand); - void SetString(SwCursor & rCursor, const ::rtl::OUString & rString); - - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > - CreateSortDescriptor(const bool bFromTable); - sal_Bool ConvertSortProperties( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& rDescriptor, - SwSortOptions & rSortOpt); - - /// @param bTableMode: attributes should be applied to a table selection - void SetPropertyValue( - SwPaM& rPaM, - const SfxItemPropertySet & rPropSet, - const ::rtl::OUString & rPropertyName, - const ::com::sun::star::uno::Any & rValue, - const SetAttrMode nAttrMode = nsSetAttrMode::SETATTR_DEFAULT, - const bool bTableMode = false) - 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::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); - ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyState > GetPropertyStates( - SwPaM & rPaM, - const SfxItemPropertySet & rPropSet, - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames, - const SwGetPropertyStatesCaller eCaller = - SW_PROPERTY_STATE_CALLER_DEFAULT) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - ::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); - void SetPropertyToDefault( - SwPaM & rPaM, - const SfxItemPropertySet & rPropSet, - const ::rtl::OUString & rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - ::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); - - bool SetPageDesc( - const ::com::sun::star::uno::Any& rValue, - SwDoc & rDoc, SfxItemSet & rSet); - void SetTxtFmtColl(const ::com::sun::star::uno::Any & rAny, SwPaM & rPaM) - throw (::com::sun::star::lang::IllegalArgumentException); - bool SetCursorPropertyValue( - SfxItemPropertySimpleEntry const& rEntry, - ::com::sun::star::uno::Any const& rValue, - SwPaM & rPam, SfxItemSet & rItemSet) - throw (::com::sun::star::lang::IllegalArgumentException); - -} // namespace SwUnoCursorHelper - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx deleted file mode 100644 index a563319d89..0000000000 --- a/sw/inc/unodraw.hxx +++ /dev/null @@ -1,320 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNODRAW_HXX -#define _UNODRAW_HXX - -#include <svx/fmdpage.hxx> -#include <calbck.hxx> -#include <frmfmt.hxx> -#include <com/sun/star/text/XTextContent.hpp> -#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp> -#include <com/sun/star/drawing/XShape.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> -#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 -#include <cppuhelper/implbase6.hxx> // helper for implementations -#include <com/sun/star/container/XEnumerationAccess.hpp> -#include <com/sun/star/drawing/HomogenMatrix3.hpp> -#include <svl/itemprop.hxx> - -class SdrMarkList; -class SdrView; -class SwDoc; - -class SwFmDrawPage : public SvxFmDrawPage -{ - SdrPageView* pPageView; -protected: - - // Create a SdrObject according to a description. Can be used by derived classes to - // support own ::com::sun::star::drawing::Shapes (e.g. controls). - virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape ) throw (); - -public: - SwFmDrawPage( SdrPage* pPage ); - virtual ~SwFmDrawPage() throw (); - - const SdrMarkList& PreGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > & xShapes); - void PreUnGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > xShapeGroup); - - SdrView* GetDrawView() {return mpView;} - SdrPageView* GetPageView(); - void RemovePageView(); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetInterface( SdrObject* pObj ); - - // The following method is called when a SvxShape-object is to be created. - // Derived classes may obtain at this point a derivation or an object - // that is aggregating a SvxShape. - virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw (); -}; - -typedef cppu::WeakAggImplHelper4 -< - ::com::sun::star::container::XEnumerationAccess, - ::com::sun::star::drawing::XDrawPage, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::drawing::XShapeGrouper -> -SwXDrawPageBaseClass; -class SwXDrawPage : public SwXDrawPageBaseClass -{ - SwDoc* pDoc; - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > xPageAgg; - SwFmDrawPage* pDrawPage; -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); - - //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 ); - - //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); - - //XShapes - virtual void SAL_CALL add(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL remove(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape) throw( ::com::sun::star::uno::RuntimeException ); - - //XShapeGrouper - virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > SAL_CALL group(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > & xShapes) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL ungroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > & aGroup) throw( ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - SwFmDrawPage* GetSvxPage(); - // renamed and outlined to detect where it's called - void InvalidateSwDoc(); // {pDoc = 0;} -}; - -class SwShapeDescriptor_Impl; -class SwXGroupShape; -typedef -cppu::WeakAggImplHelper6 -< - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::beans::XPropertyState, - ::com::sun::star::text::XTextContent, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::drawing::XShape -> -SwXShapeBaseClass; -class SwXShape : public SwXShapeBaseClass, - public SwClient -{ - friend class SwHTMLImageWatcher; - friend class SwHTMLParser; - friend class SwXGroupShape; - friend class SwXDrawPage; - - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > xShapeAgg; - // reference to <XShape>, determined in the - // constructor by <queryAggregation> at <xShapeAgg>. - ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape; - - const SfxItemPropertySet* m_pPropSet; - const SfxItemPropertyMapEntry* m_pPropertyMapEntries; - com::sun::star::uno::Sequence< sal_Int8 >* pImplementationId; - - SwShapeDescriptor_Impl* pImpl; - - sal_Bool m_bDescriptor; - - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - - SvxShape* GetSvxShape(); - - /** method to determine top group object - - @author OD - */ - SdrObject* _GetTopGroupObj( SvxShape* _pSvxShape = 0L ); - - /** method to determine position according to the positioning attributes - - @author OD - */ - com::sun::star::awt::Point _GetAttrPosition(); - - /** method to convert the position (translation) of the drawing object to - the layout direction horizontal left-to-right. - - @author OD - */ - ::com::sun::star::awt::Point _ConvertPositionToHoriL2R( - const ::com::sun::star::awt::Point _aObjPos, - const ::com::sun::star::awt::Size _aObjSize ); - - /** method to convert the transformation of the drawing object to the layout - direction, the drawing object is in - - @author OD - */ - ::com::sun::star::drawing::HomogenMatrix3 _ConvertTransformationToLayoutDir( - ::com::sun::star::drawing::HomogenMatrix3 _aMatrixInHoriL2R ); - - /** method to adjust the positioning properties - - @author OD - - @param _aPosition - input parameter - point representing the new shape position. The position - has to be given in the layout direction the shape is in and relative to - its position alignment areas. - */ - void _AdjustPositionProperties( const ::com::sun::star::awt::Point _aPosition ); - - /** method to convert start or end position of the drawing object to the - Writer specific position, which is the attribute position in layout direction - - @author OD - */ - ::com::sun::star::awt::Point _ConvertStartOrEndPosToLayoutDir( - const ::com::sun::star::awt::Point& aStartOrEndPos ); - - /** method to convert PolyPolygonBezier of the drawing object to the - Writer specific position, which is the attribute position in layout direction - - @author OD - */ - ::com::sun::star::drawing::PolyPolygonBezierCoords _ConvertPolyPolygonBezierToLayoutDir( - const ::com::sun::star::drawing::PolyPolygonBezierCoords& aPath ); - - /** method to get property from aggregation object - - @author OD - */ - ::com::sun::star::uno::Any _getPropAtAggrObj( const ::rtl::OUString& _rPropertyName ) - throw( ::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - -protected: - virtual ~SwXShape(); - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - SwXShape(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xShape); - - - TYPEINFO(); - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - 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); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) 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); - - - //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); - - //XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::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(void) 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 ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - virtual ::com::sun::star::awt::Point SAL_CALL getPosition( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getShapeType( ) throw (::com::sun::star::uno::RuntimeException); - - SwShapeDescriptor_Impl* GetDescImpl() {return pImpl;} - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > GetAggregationInterface() {return xShapeAgg;} - - // helper - static void AddExistingShapeToFmt( SdrObject& _rObj ); -}; - -class SwXGroupShape : - public SwXShape, - public ::com::sun::star::drawing::XShapes -{ -protected: - virtual ~SwXGroupShape(); -public: - SwXGroupShape(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xShape); - - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw(); - virtual void SAL_CALL release( ) throw(); - - //XShapes - virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) 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 ); - - //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); -}; -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unoevent.hxx b/sw/inc/unoevent.hxx deleted file mode 100644 index 10f5743075..0000000000 --- a/sw/inc/unoevent.hxx +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOEVENT_HXX -#define _UNOEVENT_HXX - -#include <svtools/unoevent.hxx> -#include <svl/macitem.hxx> - - -class SvxMacroItem; -class SvxMacro; -class SwXFrame; -class SwXTextFrame; -class SwXTextGraphicObject; -class SwXTextEmbeddedObject; -class SwXFrameStyle; -class SwFmtINetFmt; - - - -class SwHyperlinkEventDescriptor : public SvDetachedEventDescriptor -{ - const ::rtl::OUString sImplName; - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) - throw( ::com::sun::star::uno::RuntimeException ); -protected: - virtual ~SwHyperlinkEventDescriptor(); -public: - - SwHyperlinkEventDescriptor(); - - - - void copyMacrosFromINetFmt(const SwFmtINetFmt& aFmt); - void copyMacrosIntoINetFmt(SwFmtINetFmt& aFmt); - - void copyMacrosFromNameReplace( - ::com::sun::star::uno::Reference< - ::com::sun::star::container::XNameReplace> & xReplace); -}; - - - -// SwEventDescriptor for -// 1) SwXTextFrame -// 2) SwXGraphicObject -// 3) SwXEmbeddedObject -// All these objects are an SwXFrame, so they can use a common implementation -class SwFrameEventDescriptor : public SvEventDescriptor -{ - ::rtl::OUString sSwFrameEventDescriptor; - - SwXFrame& rFrame; - -public: - SwFrameEventDescriptor( SwXTextFrame& rFrameRef ); - SwFrameEventDescriptor( SwXTextGraphicObject& rGraphicRef ); - SwFrameEventDescriptor( SwXTextEmbeddedObject& rObjectRef ); - - ~SwFrameEventDescriptor(); - - virtual rtl::OUString SAL_CALL getImplementationName(void) - throw( ::com::sun::star::uno::RuntimeException ); - -protected: - virtual void setMacroItem(const SvxMacroItem& rItem); - virtual const SvxMacroItem& getMacroItem(); - virtual sal_uInt16 getMacroItemWhich() const; -}; - -class SwFrameStyleEventDescriptor : public SvEventDescriptor -{ - ::rtl::OUString sSwFrameStyleEventDescriptor; - - SwXFrameStyle& rStyle; - -public: - SwFrameStyleEventDescriptor( SwXFrameStyle& rStyleRef ); - - ~SwFrameStyleEventDescriptor(); - - virtual rtl::OUString SAL_CALL getImplementationName(void) - throw( ::com::sun::star::uno::RuntimeException ); - -protected: - virtual void setMacroItem(const SvxMacroItem& rItem); - virtual const SvxMacroItem& getMacroItem(); - virtual sal_uInt16 getMacroItemWhich() const; -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unoevtlstnr.hxx b/sw/inc/unoevtlstnr.hxx deleted file mode 100644 index 7bbc23251a..0000000000 --- a/sw/inc/unoevtlstnr.hxx +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOEVTLSTNR_HXX -#define _UNOEVTLSTNR_HXX - -#include <svl/svarray.hxx> -#include <com/sun/star/uno/Reference.h> - -namespace com{namespace sun{namespace star{ - namespace lang - { - class XEventListener; - } -}}} - -// Managing the EventListeners. - -typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > * XEventListenerPtr; -SV_DECL_PTRARR(SwEvtLstnrArray, XEventListenerPtr, 4, 4) - -class SwEventListenerContainer -{ - protected: - SwEvtLstnrArray* pListenerArr; - ::com::sun::star::uno::XInterface* pxParent; - public: - SwEventListenerContainer( ::com::sun::star::uno::XInterface* pxParent); - ~SwEventListenerContainer(); - - void AddListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener); - sal_Bool RemoveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener); - void Disposing(); -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx deleted file mode 100644 index 278e50b591..0000000000 --- a/sw/inc/unofield.hxx +++ /dev/null @@ -1,316 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOFIELD_HXX -#define _UNOFIELD_HXX - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/util/XRefreshable.hpp> -#include <com/sun/star/util/XUpdatable.hpp> -#include <com/sun/star/text/XDependentTextField.hpp> - -#include <cppuhelper/implbase5.hxx> - -#include <calbck.hxx> -#include <unocoll.hxx> -#include <RefreshListenerContainer.hxx> - - -class SwFieldType; -class SwDoc; -class SwFmtFld; -class SwField; -class SwSetExpField; -class SwTextAPIObject; - -class SwXFieldMaster : public cppu::WeakImplHelper4 -< - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::lang::XComponent ->, - public SwClient -{ - SwEventListenerContainer aLstnrCntnr; - sal_uInt16 nResTypeId; - SwDoc* m_pDoc; - - sal_Bool m_bIsDescriptor; - - String sParam1; //Content / Database / NumberingSeparator - String sParam2; // - /DataTablename - String sParam3; // - /DataFieldName - String sParam4; - String sParam5; // - /DataBaseURL - String sParam6; // - /DataBaseResource - double fParam1; // Value / - - sal_Int8 nParam1; // ChapterNumberingLevel - sal_Bool bParam1; // IsExpression - sal_Int32 nParam2; - -protected: - virtual ~SwXFieldMaster(); - //SwClient -virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - - SwXFieldMaster(SwDoc* pDoc, sal_uInt16 nResId); - SwXFieldMaster(SwFieldType& rType, SwDoc* pDoc); - - - TYPEINFO(); - - 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); - - //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); - - //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 ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 rtl::OUString GetProgrammaticName(const SwFieldType& rType, SwDoc& rDoc); - static rtl::OUString LocalizeFormula(const SwSetExpField& rFld, const rtl::OUString& rFormula, sal_Bool bQuery); - - SwFieldType* GetFldType(sal_Bool bDontCreate = sal_False) const; - SwDoc* GetDoc() {return m_pDoc;} - - sal_Bool IsDescriptor()const {return m_bIsDescriptor;} - sal_uInt16 GetResId() const {return nResTypeId;} -}; - -struct SwFieldProperties_Impl; -class SwXTextField : public cppu::WeakImplHelper5 -< - ::com::sun::star::text::XDependentTextField, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::util::XUpdatable ->, - public SwClient -{ - SwEventListenerContainer aLstnrCntnr; - const SwFmtFld* pFmtFld; - SwDoc* m_pDoc; - SwTextAPIObject* m_pTextObject; - - sal_Bool m_bIsDescriptor; - SwClient m_aFieldTypeClient; // required to access field master of not yet inserted fields - sal_Bool m_bCallUpdate; - sal_uInt16 m_nServiceId; - SwFieldProperties_Impl* m_pProps; - String m_sTypeName; - - - //SwFieldType* GetFldType() const { return (SwFieldType*)GetRegisteredIn(); } - SwDoc* GetDoc() {return m_pDoc;} -protected: - virtual ~SwXTextField(); - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - SwXTextField(sal_uInt16 nServiceId, SwDoc* pDoc=0); - SwXTextField(const SwFmtFld& rFmt, SwDoc* pDoc); - - - TYPEINFO(); - - 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); - - //XDependentTextField - virtual void SAL_CALL attachTextFieldMaster(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xFieldMaster) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getTextFieldMaster(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XTextField - virtual rtl::OUString SAL_CALL getPresentation(sal_Bool bShowCommand) 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(void) 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 ); - - //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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - //XUpdatable - virtual void SAL_CALL update( ) throw (::com::sun::star::uno::RuntimeException); - - 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 ); - - const SwField* GetField() const; - const SwFmtFld* GetFldFmt(){return GetField() ? pFmtFld : 0; }; - - void Invalidate(); - - /// @return an SwXTextField, either an already existing one or a new one - static SwXTextField* CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt); -}; - -typedef -cppu::WeakImplHelper2 -< - ::com::sun::star::container::XNameAccess, - ::com::sun::star::lang::XServiceInfo -> -SwXTextFieldMastersBaseClass; -class SwXTextFieldMasters : public SwXTextFieldMastersBaseClass, - public SwUnoCollection -{ -protected: - virtual ~SwXTextFieldMasters(); -public: - SwXTextFieldMasters(SwDoc* pDoc); - - - //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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 sal_Bool getInstanceName(const SwFieldType& rFldType, String& rName); -}; - -typedef -cppu::WeakImplHelper3 -< - ::com::sun::star::container::XEnumerationAccess, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::util::XRefreshable -> -SwXTextFieldTypesBaseClass; -class SwXTextFieldTypes : public SwXTextFieldTypesBaseClass, - public SwUnoCollection -{ - SwRefreshListenerContainer aRefreshCont; -protected: - virtual ~SwXTextFieldTypes(); -public: - SwXTextFieldTypes(SwDoc* pDoc); - - - //XEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) 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); - - // ::com::sun::star::util::XRefreshable - virtual void SAL_CALL refresh( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addRefreshListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener >& l ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeRefreshListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener >& l ) throw(::com::sun::star::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - // SwUnoCollection - virtual void Invalidate(); -}; - -class SwXFieldEnumeration : public cppu::WeakImplHelper2 -< - ::com::sun::star::container::XEnumeration, - ::com::sun::star::lang::XServiceInfo ->, - public SwClient -{ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextField > > aItems; - sal_Int32 nNextIndex; // index of next element to be returned - - SwDoc* pDoc; - -protected: - virtual ~SwXFieldEnumeration(); - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); -public: - SwXFieldEnumeration(SwDoc* pDoc); - - //XEnumeration - virtual sal_Bool SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - -}; -#endif - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unoflatpara.hxx b/sw/inc/unoflatpara.hxx deleted file mode 100644 index bafb2cace1..0000000000 --- a/sw/inc/unoflatpara.hxx +++ /dev/null @@ -1,149 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOFLATPARA_HXX -#define _UNOFLATPARA_HXX - -#include <cppuhelper/implbase1.hxx> -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/text/XFlatParagraph.hpp> -#include <com/sun/star/text/XFlatParagraphIterator.hpp> -#include <calbck.hxx> -#include <modeltoviewhelper.hxx> -#include <unotextmarkup.hxx> - -#include <set> - -namespace css = com::sun::star; - -namespace com { namespace sun { namespace star { namespace container { - class XStringKeyMap; -} } } } - -class SwTxtNode; -class SwDoc; - -/****************************************************************************** - * SwXFlatParagraph - ******************************************************************************/ - -class SwXFlatParagraph: - public ::cppu::WeakImplHelper2 - < - css::text::XFlatParagraph, - css::lang::XUnoTunnel - >, - public SwXTextMarkup -{ -public: - SwXFlatParagraph( SwTxtNode& rTxtNode, rtl::OUString aExpandText, const ModelToViewHelper::ConversionMap* pConversionMap ); - virtual ~SwXFlatParagraph(); - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw(); - virtual void SAL_CALL release( ) throw(); - - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - // text::XTextMarkup: - virtual css::uno::Reference< css::container::XStringKeyMap > SAL_CALL getMarkupInfoContainer() throw (css::uno::RuntimeException); - virtual void SAL_CALL commitTextMarkup(::sal_Int32 nType, const ::rtl::OUString & aIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const css::uno::Reference< css::container::XStringKeyMap > & xMarkupInfoContainer) throw (css::uno::RuntimeException); - - // text::XFlatParagraph: - virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL isModified() throw (css::uno::RuntimeException); - virtual void SAL_CALL setChecked(::sal_Int32 nType, ::sal_Bool bVal) throw (css::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL isChecked(::sal_Int32 nType) throw (css::uno::RuntimeException); - virtual css::lang::Locale SAL_CALL getLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException); - virtual css::lang::Locale SAL_CALL getPrimaryLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException); - virtual void SAL_CALL changeText(::sal_Int32 nPos, ::sal_Int32 nLen, const ::rtl::OUString & aNewText, const css::uno::Sequence< css::beans::PropertyValue > & aAttributes) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException); - virtual void SAL_CALL changeAttributes(::sal_Int32 nPos, ::sal_Int32 nLen, const css::uno::Sequence< css::beans::PropertyValue > & aAttributes) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException); - virtual css::uno::Sequence< ::sal_Int32 > SAL_CALL getLanguagePortions() throw (css::uno::RuntimeException); - - const SwTxtNode* getTxtNode() const; - - static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); - - // XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 >& rId) - throw (css::uno::RuntimeException); - -private: - SwXFlatParagraph( const SwXFlatParagraph & ); // not defined - SwXFlatParagraph & operator = ( const SwXFlatParagraph & ); // not defined - - rtl::OUString maExpandText; -}; - -/****************************************************************************** - * SwXFlatParagraphIterator - ******************************************************************************/ - -class SwXFlatParagraphIterator: - public ::cppu::WeakImplHelper1 - < - css::text::XFlatParagraphIterator - >, - public SwClient // to get notified when doc is closed... -{ -public: - SwXFlatParagraphIterator( SwDoc& rDoc, sal_Int32 nType, sal_Bool bAutomatic ); - virtual ~SwXFlatParagraphIterator(); - - // text::XFlatParagraphIterator: - virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getFirstPara() throw (css::uno::RuntimeException); - virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getNextPara() throw (css::uno::RuntimeException); - virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getLastPara() throw (css::uno::RuntimeException); - virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getParaBefore(const css::uno::Reference< css::text::XFlatParagraph > & xPara) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException); - virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getParaAfter(const css::uno::Reference< css::text::XFlatParagraph > & xPara) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException); - -protected: - // SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ); - -private: - SwXFlatParagraphIterator( const SwXFlatParagraphIterator & ); // not defined - SwXFlatParagraphIterator & operator =(const SwXFlatParagraphIterator & ); // not defined - - // container to hold the 'hard' references as long as necessary and valid - std::set< css::uno::Reference< css::text::XFlatParagraph > > m_aFlatParaList; - - SwDoc* mpDoc; - const sal_Int32 mnType; - const sal_Bool mbAutomatic; - - sal_uLong mnCurrentNode; // used for non-automatic mode - sal_uLong mnStartNode; // used for non-automatic mode - sal_uLong mnEndNode; // used for non-automatic mode - sal_Bool mbWrapped; // used for non-automatic mode -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unofootnote.hxx b/sw/inc/unofootnote.hxx deleted file mode 100644 index 78e7704bb9..0000000000 --- a/sw/inc/unofootnote.hxx +++ /dev/null @@ -1,227 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNOFOOTNOTE_HXX -#define SW_UNOFOOTNOTE_HXX - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/container/XEnumerationAccess.hpp> -#include <com/sun/star/text/XTextContent.hpp> -#include <com/sun/star/text/XFootnote.hpp> - -#include <cppuhelper/implbase5.hxx> - -#include <unotext.hxx> - - -class SwDoc; -class SwModify; -class SwFmtFtn; - -typedef ::cppu::WeakImplHelper5 -< ::com::sun::star::lang::XUnoTunnel -, ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::beans::XPropertySet -, ::com::sun::star::container::XEnumerationAccess -, ::com::sun::star::text::XFootnote -> SwXFootnote_Base; - -class SwXFootnote - : public SwXFootnote_Base - , public SwXText -{ - -private: - - friend class SwXFootnotes; - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - -protected: - - virtual const SwStartNode *GetStartNode() const; - - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCursor > - CreateCursor() - throw (::com::sun::star::uno::RuntimeException); - - virtual ~SwXFootnote(); - - SwXFootnote(SwDoc & rDoc, const SwFmtFtn & rFmt); - -public: - - SwXFootnote(const bool bEndnote); - - static SwXFootnote * - CreateXFootnote(SwDoc & rDoc, SwFmtFtn const& rFootnoteFmt); - /// may return 0 - static SwXFootnote * - GetXFootnote(SwModify const& rUnoCB, SwFmtFtn const& rFootnoteFmt); - - // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type& rType) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw() { OWeakObject::release(); } - - // XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > - SAL_CALL getTypes() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL - getImplementationId() - throw (::com::sun::star::uno::RuntimeException); - - 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 >& rIdentifier) - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException); - - // XComponent - virtual void SAL_CALL dispose() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - 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& rPropertyName, - const ::com::sun::star::uno::Any& rValue) - 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& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( - const ::rtl::OUString& rPropertyName, - 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& rPropertyName, - 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 addVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::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); - - // XEnumerationAccess - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::container::XEnumeration > SAL_CALL - createEnumeration() - 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); - - // XFootnote - virtual ::rtl::OUString SAL_CALL getLabel() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setLabel(const ::rtl::OUString& rLabel) - throw (::com::sun::star::uno::RuntimeException); - - // XSimpleText - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCursor > SAL_CALL - createTextCursor() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCursor > SAL_CALL - createTextCursorByRange( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xTextPosition) - throw (::com::sun::star::uno::RuntimeException); - -}; - -#endif // SW_UNOFOOTNOTE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx deleted file mode 100644 index 42d10dbc9c..0000000000 --- a/sw/inc/unoframe.hxx +++ /dev/null @@ -1,369 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOFRAME_HXX -#define _UNOFRAME_HXX - -#include <com/sun/star/beans/XPropertyState.hpp> -#include <com/sun/star/container/XNamed.hpp> -#include <com/sun/star/container/XEnumerationAccess.hpp> -#include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp> -#include <com/sun/star/text/XTextFrame.hpp> -#include <com/sun/star/drawing/XShape.hpp> -#include <com/sun/star/util/XModifyListener.hpp> -#include <com/sun/star/frame/XModel.hpp> -#include <com/sun/star/document/XEventsSupplier.hpp> - -#include <cppuhelper/implbase1.hxx> -#include <cppuhelper/implbase3.hxx> -#include <cppuhelper/implbase6.hxx> - -#include <sfx2/objsh.hxx> - -#include <flyenum.hxx> -#include <frmfmt.hxx> -#include <unoevtlstnr.hxx> -#include <unotext.hxx> - - -class SfxItemPropertSet; -class SdrObject; -class SwDoc; -class SwFmt; -class SwFlyFrmFmt; - -class BaseFrameProperties_Impl; -class SwXFrame : public cppu::WeakImplHelper6 -< - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::beans::XPropertyState, - ::com::sun::star::drawing::XShape, - ::com::sun::star::container::XNamed, - ::com::sun::star::lang::XUnoTunnel ->, - public SwClient -{ - SwEventListenerContainer aLstnrCntnr; - const SfxItemPropertySet* m_pPropSet; - SwDoc* m_pDoc; - - const FlyCntType eType; - - // Descriptor-interface - BaseFrameProperties_Impl* pProps; - bool bIsDescriptor; - String sName; - - SwPaM* m_pCopySource; - -protected: - com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxStyleData; - com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxStyleFamily; - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - - virtual ~SwXFrame(); -public: - SwXFrame(FlyCntType eSet, - const SfxItemPropertySet* pPropSet, - SwDoc *pDoc ); //Descriptor-If - SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet, - const SfxItemPropertySet* pPropSet); - - - 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); - - TYPEINFO(); - - //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 ); - - //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); - - //XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XShape - virtual ::com::sun::star::awt::Point SAL_CALL getPosition( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException); - - //XShapeDescriptor - virtual rtl::OUString SAL_CALL getShapeType(void) throw( ::com::sun::star::uno::RuntimeException ); - - //Base implementation - //XComponent - virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) 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); - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - 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 attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - SwFrmFmt* GetFrmFmt() const - { - return PTR_CAST ( SwFrmFmt, GetRegisteredIn() ); - } - FlyCntType GetFlyCntType()const {return eType;} - - bool IsDescriptor() const {return bIsDescriptor;} - void ResetDescriptor(); - //copy text from a given source PaM - void SetSelection(SwPaM& rCopySource); - static SW_DLLPUBLIC SdrObject *GetOrCreateSdrObject( SwFlyFrmFmt *pFmt ); -}; - -typedef cppu::WeakImplHelper3 -< - ::com::sun::star::text::XTextFrame, - ::com::sun::star::container::XEnumerationAccess, - ::com::sun::star::document::XEventsSupplier -> -SwXTextFrameBaseClass; - -class SwXTextFrame : public SwXTextFrameBaseClass, - public SwXText, - public SwXFrame -{ - const SfxItemPropertSet* _pPropSet; - -protected: - virtual const SwStartNode *GetStartNode() const; - - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCursor > - CreateCursor() - throw (::com::sun::star::uno::RuntimeException); - - virtual ~SwXTextFrame(); -public: - SwXTextFrame(SwDoc *pDoc); - SwXTextFrame(SwFrmFmt& rFmt); - - // FIXME: EVIL HACK: make available for SwXFrame::attachToRange - void SetDoc(SwDoc *const pDoc) { SwXText::SetDoc(pDoc); }; - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw(); - virtual void SAL_CALL release( ) throw(); - - //XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - //XTextFrame - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XText - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); - - //XEnumerationAccess - frueher XParagraphEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) 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); - - //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( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) 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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - // XEventsSupplier - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) 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); - - //XPropertySet - 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); - - void * SAL_CALL operator new( size_t ) throw(); - void SAL_CALL operator delete( void * ) throw(); -}; - -typedef cppu::WeakImplHelper2 -< - ::com::sun::star::text::XTextContent, - ::com::sun::star::document::XEventsSupplier -> -SwXTextGraphicObjectBaseClass; -class SwXTextGraphicObject : public SwXTextGraphicObjectBaseClass, - public SwXFrame -{ -protected: - virtual ~SwXTextGraphicObject(); -public: - SwXTextGraphicObject( SwDoc *pDoc ); - SwXTextGraphicObject(SwFrmFmt& rFmt); - - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw(); - virtual void SAL_CALL release( ) throw(); - - //XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) 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(void) 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 ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - // XEventsSupplier - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException); - void * SAL_CALL operator new( size_t ) throw(); - void SAL_CALL operator delete( void * ) throw(); -}; - -class SwOLENode; -typedef cppu::WeakImplHelper3 -< - ::com::sun::star::text::XTextContent, - ::com::sun::star::document::XEmbeddedObjectSupplier2, - ::com::sun::star::document::XEventsSupplier ->SwXTextEmbeddedObjectBaseClass; - -class SwXTextEmbeddedObject : public SwXTextEmbeddedObjectBaseClass, - public SwXFrame -{ -protected: - virtual ~SwXTextEmbeddedObject(); - -public: - SwXTextEmbeddedObject( SwDoc *pDoc ); - SwXTextEmbeddedObject(SwFrmFmt& rFmt); - - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw(); - virtual void SAL_CALL release( ) throw(); - - //XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) 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(void) 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 ); - - //XEmbeddedObjectSupplier2 - virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL getEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > SAL_CALL getExtendedControlOverEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::sal_Int64 SAL_CALL getAspect() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setAspect( ::sal_Int64 _aspect ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL getReplacementGraphic() throw (::com::sun::star::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - // XEventsSupplier - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException); - void * SAL_CALL operator new( size_t ) throw(); - void SAL_CALL operator delete( void * ) throw(); -}; - - - -class SwXOLEListener : public cppu::WeakImplHelper1 -< - ::com::sun::star::util::XModifyListener ->, - public SwClient -{ - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLEModel; - - SwFmt* GetFmt() const { return (SwFmt*)GetRegisteredIn(); } -public: - SwXOLEListener(SwFmt& rOLEFmt, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLE); - ~SwXOLEListener(); - TYPEINFO(); - -// ::com::sun::star::lang::XEventListener - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); - -// ::com::sun::star::util::XModifyListener - virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException); - -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); -}; - - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx deleted file mode 100644 index f9c8eb1b14..0000000000 --- a/sw/inc/unoidx.hxx +++ /dev/null @@ -1,367 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOIDX_HXX -#define _UNOIDX_HXX - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/container/XNamed.hpp> -#include <com/sun/star/text/XDocumentIndexMark.hpp> -#include <com/sun/star/text/XDocumentIndex.hpp> - -#include <cppuhelper/implbase4.hxx> -#include <cppuhelper/implbase5.hxx> - -#include <sfx2/Metadatable.hxx> - -#include <unocoll.hxx> -#include <toxe.hxx> - - -class SwTOXBaseSection; -class SwTOXMark; -class SwTOXType; - -typedef ::cppu::ImplInheritanceHelper5 -< ::sfx2::MetadatableMixin -, ::com::sun::star::lang::XUnoTunnel -, ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::beans::XPropertySet -, ::com::sun::star::container::XNamed -, ::com::sun::star::text::XDocumentIndex -> SwXDocumentIndex_Base; - -class SwXDocumentIndex - : public SwXDocumentIndex_Base -{ - -private: - - class StyleAccess_Impl; - class TokenAccess_Impl; - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - virtual ~SwXDocumentIndex(); - - SwXDocumentIndex(SwTOXBaseSection const&, SwDoc &); - -public: - - /// descriptor - SwXDocumentIndex(const TOXTypes eToxType, SwDoc& rDoc); - - static ::com::sun::star::uno::Reference< - ::com::sun::star::text::XDocumentIndex> - CreateXDocumentIndex(SwDoc & rDoc, SwTOXBaseSection const& rSection); - - // MetadatableMixin - virtual ::sfx2::Metadatable* GetCoreObject(); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > - GetModel(); - - 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 >& rIdentifier) - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException); - - // XComponent - virtual void SAL_CALL dispose() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - 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& rPropertyName, - const ::com::sun::star::uno::Any& rValue) - 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& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( - const ::rtl::OUString& rPropertyName, - 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& rPropertyName, - 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 addVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - // XNamed - virtual ::rtl::OUString SAL_CALL getName() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setName(const ::rtl::OUString& rName) - 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); - - - // XDocumentIndex - virtual ::rtl::OUString SAL_CALL getServiceName() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL update() - throw (::com::sun::star::uno::RuntimeException); - -}; - -typedef ::cppu::WeakImplHelper4 -< ::com::sun::star::lang::XUnoTunnel -, ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::beans::XPropertySet -, ::com::sun::star::text::XDocumentIndexMark -> SwXDocumentIndexMark_Base; - -class SwXDocumentIndexMark - : public SwXDocumentIndexMark_Base -{ - -private: - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - virtual ~SwXDocumentIndexMark(); - - SwXDocumentIndexMark(SwDoc & rDoc, - SwTOXType & rType, SwTOXMark & rMark); - -public: - - /// descriptor - SwXDocumentIndexMark(const TOXTypes eToxType); - - static ::com::sun::star::uno::Reference< - ::com::sun::star::text::XDocumentIndexMark> - CreateXDocumentIndexMark(SwDoc & rDoc, - SwTOXType & rType, SwTOXMark & rMark); - - 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 >& rIdentifier) - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException); - - // XComponent - virtual void SAL_CALL dispose() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - 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& rPropertyName, - const ::com::sun::star::uno::Any& rValue) - 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& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( - const ::rtl::OUString& rPropertyName, - 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& rPropertyName, - 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 addVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::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); - - // XDocumentIndexMark - virtual rtl::OUString SAL_CALL getMarkEntry() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setMarkEntry(const rtl::OUString& rIndexEntry) - throw (::com::sun::star::uno::RuntimeException); - -}; - -class SwXDocumentIndexes - : public SwCollectionBaseClass - , public SwUnoCollection -{ - -private: - - virtual ~SwXDocumentIndexes(); - -public: - - SwXDocumentIndexes(SwDoc *const pDoc); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - 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); - - // XIndexAccess - virtual sal_Int32 SAL_CALL getCount() - 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& rName) - 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() throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasByName(const ::rtl::OUString& rName) - throw (::com::sun::star::uno::RuntimeException); - -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unomailmerge.hxx b/sw/inc/unomailmerge.hxx deleted file mode 100644 index 57f87766d8..0000000000 --- a/sw/inc/unomailmerge.hxx +++ /dev/null @@ -1,205 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOMAILMERGE_HXX_ -#define _UNOMAILMERGE_HXX_ - -#include <functional> -#include <cppuhelper/implbase5.hxx> // WeakImplHelper4 -#include <cppuhelper/interfacecontainer.hxx> // OMultiTypeInterfaceContainerHelperVar -#include <unotools/configitem.hxx> // !! needed for OMultiTypeInterfaceContainerHelperVar !! - - -#include <com/sun/star/task/XJob.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/lang/XComponent.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/beans/PropertyChangeEvent.hpp> -#include <com/sun/star/text/XMailMergeBroadcaster.hpp> -#include <svl/itemprop.hxx> -#include <sfx2/objsh.hxx> - -namespace com { namespace sun { namespace star { - - namespace sdbc { - class XResultSet; - class XConnection; - } - namespace frame { - class XModel; - } - namespace lang { - class XMultiServiceFactory; - } - namespace text { - class XMailMergeListener; - struct MailMergeEvent; - } - namespace beans{ - struct PropertyValue; - } - -}}} - -namespace rtl { - class OUString; -} - -/////////////////////////////////////////////////////////////////////////// - -// uses templates from <cppuhelper/interfacecontainer.h> -// and <unotools/configitem.hxx> - -// helper function call class -struct PropHashType_Impl -{ - size_t operator()(const sal_Int32 &s) const { return s; } -}; - -typedef cppu::OMultiTypeInterfaceContainerHelperVar - < - sal_Int32, - PropHashType_Impl, - std::equal_to< sal_Int32 > - > OPropertyListenerContainerHelper; - -//////////////////////////////////////////////////////////// - -class SwXMailMerge : - public cppu::WeakImplHelper5 - < - com::sun::star::task::XJob, - com::sun::star::beans::XPropertySet, - com::sun::star::text::XMailMergeBroadcaster, - com::sun::star::lang::XComponent, - com::sun::star::lang::XServiceInfo - > -{ - cppu::OInterfaceContainerHelper aEvtListeners; - cppu::OInterfaceContainerHelper aMergeListeners; - OPropertyListenerContainerHelper aPropListeners; - - const SfxItemPropertySet* pPropSet; - - SfxObjectShellRef xDocSh; // the document - - String aTmpFileName; - - // properties of mail merge service - com::sun::star::uno::Sequence< com::sun::star::uno::Any > aSelection; - com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSet > xResultSet; - com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > xConnection; - com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel; - rtl::OUString aDataSourceName; - rtl::OUString aDataCommand; - rtl::OUString aFilter; - rtl::OUString aDocumentURL; - rtl::OUString aOutputURL; - rtl::OUString aFileNamePrefix; - sal_Int32 nDataCommandType; - sal_Int16 nOutputType; - sal_Bool bEscapeProcessing; - sal_Bool bSinglePrintJobs; - sal_Bool bFileNameFromColumn; - - - ::rtl::OUString sInServerPassword; - ::rtl::OUString sOutServerPassword; - ::rtl::OUString sSubject; - ::rtl::OUString sAddressFromColumn; - ::rtl::OUString sMailBody; - ::rtl::OUString sAttachmentName; - ::rtl::OUString sAttachmentFilter; - com::sun::star::uno::Sequence< ::rtl::OUString > aCopiesTo; - com::sun::star::uno::Sequence< ::rtl::OUString > aBlindCopiesTo; - sal_Bool bSendAsHTML; - sal_Bool bSendAsAttachment; - - com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aPrintSettings; - - sal_Bool bSaveAsSingleFile; - ::rtl::OUString sSaveFilter; - ::rtl::OUString sSaveFilterOptions; - com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSaveFilterData; - - - - sal_Bool bDisposing; - - - void launchEvent( const com::sun::star::beans::PropertyChangeEvent &rEvt ) const; - - // disallow use of copy-constructor and assignment-operator for now - SwXMailMerge( const SwXMailMerge & ); - SwXMailMerge & operator = ( const SwXMailMerge & ); -protected: - virtual ~SwXMailMerge(); -public: - SwXMailMerge(); - - - void LaunchMailMergeEvent( const com::sun::star::text::MailMergeEvent &rData ) const; - - // XJob - virtual ::com::sun::star::uno::Any SAL_CALL execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, ::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); - - // XMailMergeBroadcaster - virtual void SAL_CALL addMailMergeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XMailMergeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeMailMergeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XMailMergeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - - // XComponent - virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) 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); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_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( ) throw (::com::sun::star::uno::RuntimeException); -}; - - -extern com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL SwXMailMerge_getSupportedServiceNames() throw(); -extern rtl::OUString SAL_CALL SwXMailMerge_getImplementationName() throw(); -extern com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SwXMailMerge_createInstance(const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( com::sun::star::uno::Exception ); - -//////////////////////////////////////////////////////////// - -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx deleted file mode 100644 index 36d41a9eb6..0000000000 --- a/sw/inc/unomap.hxx +++ /dev/null @@ -1,346 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOMAP_HXX -#define _UNOMAP_HXX - -#include <svl/itemprop.hxx> - -#define PROPERTY_NONE 0 - -#define PROPERTY_MAP_TEXT_CURSOR 0 -#define PROPERTY_MAP_CHAR_STYLE 1 -#define PROPERTY_MAP_PARA_STYLE 2 -#define PROPERTY_MAP_FRAME_STYLE 3 -#define PROPERTY_MAP_PAGE_STYLE 4 -#define PROPERTY_MAP_NUM_STYLE 5 -#define PROPERTY_MAP_SECTION 6 -#define PROPERTY_MAP_TEXT_TABLE 7 -#define PROPERTY_MAP_TABLE_CELL 8 -#define PROPERTY_MAP_TABLE_RANGE 9 -#define PROPERTY_MAP_TEXT_SEARCH 10 -#define PROPERTY_MAP_TEXT_FRAME 11 -#define PROPERTY_MAP_TEXT_GRAPHIC 12 -#define PROPERTY_MAP_TEXT_SHAPE 13 -#define PROPERTY_MAP_INDEX_USER 14 -#define PROPERTY_MAP_INDEX_CNTNT 15 -#define PROPERTY_MAP_INDEX_IDX 16 -#define PROPERTY_MAP_USER_MARK 17 -#define PROPERTY_MAP_CNTIDX_MARK 18 -#define PROPERTY_MAP_INDEX_MARK 19 -#define PROPERTY_MAP_TEXT_TABLE_ROW 20 -#define PROPERTY_MAP_TEXT_SHAPE_DESCRIPTOR 21 -#define PROPERTY_MAP_TEXT_TABLE_CURSOR 22 -#define PROPERTY_MAP_BOOKMARK 23 -#define PROPERTY_MAP_PARAGRAPH_EXTENSIONS 24 -#define PROPERTY_MAP_INDEX_ILLUSTRATIONS 25 -#define PROPERTY_MAP_INDEX_OBJECTS 26 -#define PROPERTY_MAP_INDEX_TABLES 27 -#define PROPERTY_MAP_BIBLIOGRAPHY 28 -#define PROPERTY_MAP_TEXT_DOCUMENT 29 -#define PROPERTY_MAP_LINK_TARGET 30 -#define PROPERTY_MAP_AUTO_TEXT_GROUP 31 -#define PROPERTY_MAP_TEXTPORTION_EXTENSIONS 34 -#define PROPERTY_MAP_FOOTNOTE 35 -#define PROPERTY_MAP_TEXT_COLUMS 36 -#define PROPERTY_MAP_PARAGRAPH 37 -#define PROPERTY_MAP_EMBEDDED_OBJECT 38 -#define PROPERTY_MAP_REDLINE 39 -#define PROPERTY_MAP_TEXT_DEFAULT 40 - -#define PROPERTY_MAP_FLDTYP_DATETIME 41 -#define PROPERTY_MAP_FLDTYP_USER 42 -#define PROPERTY_MAP_FLDTYP_SET_EXP 43 -#define PROPERTY_MAP_FLDTYP_GET_EXP 44 -#define PROPERTY_MAP_FLDTYP_FILE_NAME 45 -#define PROPERTY_MAP_FLDTYP_PAGE_NUM 46 -#define PROPERTY_MAP_FLDTYP_AUTHOR 47 -#define PROPERTY_MAP_FLDTYP_CHAPTER 48 -#define PROPERTY_MAP_FLDTYP_GET_REFERENCE 49 -#define PROPERTY_MAP_FLDTYP_CONDITIONED_TEXT 50 -#define PROPERTY_MAP_FLDTYP_HIDDEN_TEXT 51 -#define PROPERTY_MAP_FLDTYP_ANNOTATION 52 -#define PROPERTY_MAP_FLDTYP_INPUT 53 -#define PROPERTY_MAP_FLDTYP_MACRO 54 -#define PROPERTY_MAP_FLDTYP_DDE 55 -#define PROPERTY_MAP_FLDTYP_HIDDEN_PARA 56 -#define PROPERTY_MAP_FLDTYP_DOC_INFO 57 -#define PROPERTY_MAP_FLDTYP_TEMPLATE_NAME 58 -#define PROPERTY_MAP_FLDTYP_USER_EXT 59 -#define PROPERTY_MAP_FLDTYP_REF_PAGE_SET 60 -#define PROPERTY_MAP_FLDTYP_REF_PAGE_GET 61 -#define PROPERTY_MAP_FLDTYP_JUMP_EDIT 62 -#define PROPERTY_MAP_FLDTYP_SCRIPT 63 -#define PROPERTY_MAP_FLDTYP_DATABASE_NEXT_SET 64 -#define PROPERTY_MAP_FLDTYP_DATABASE_NUM_SET 65 -#define PROPERTY_MAP_FLDTYP_DATABASE_SET_NUM 66 -#define PROPERTY_MAP_FLDTYP_DATABASE 67 -#define PROPERTY_MAP_FLDTYP_DATABASE_NAME 68 -#define PROPERTY_MAP_FLDTYP_DOCSTAT 69 -#define PROPERTY_MAP_FLDTYP_DOCINFO_AUTHOR 70 -#define PROPERTY_MAP_FLDTYP_DOCINFO_DATE_TIME 71 -#define PROPERTY_MAP_FLDTYP_DOCINFO_CHANGE_DATE_TIME 72 -#define PROPERTY_MAP_FLDTYP_DOCINFO_CREATE_DATE_TIME 73 -#define PROPERTY_MAP_FLDTYP_DOCINFO_EDIT_TIME 74 -#define PROPERTY_MAP_FLDTYP_DOCINFO_MISC 75 -#define PROPERTY_MAP_FLDTYP_DOCINFO_REVISION 76 -#define PROPERTY_MAP_FLDTYP_COMBINED_CHARACTERS 77 -#define PROPERTY_MAP_FLDTYP_DUMMY_0 78 -#define PROPERTY_MAP_FLDTYP_TABLE_FORMULA 79 -#define PROPERTY_MAP_FLDMSTR_USER 80 -#define PROPERTY_MAP_FLDMSTR_DDE 81 -#define PROPERTY_MAP_FLDMSTR_SET_EXP 82 -#define PROPERTY_MAP_FLDMSTR_DATABASE 83 -#define PROPERTY_MAP_FLDMSTR_DUMMY0 84 -#define PROPERTY_MAP_FLDTYP_BIBLIOGRAPHY 85 -#define PROPERTY_MAP_FLDMSTR_BIBLIOGRAPHY 86 -#define PROPERTY_MAP_TEXT 87 -#define PROPERTY_MAP_REDLINE_PORTION 88 -#define PROPERTY_MAP_MAILMERGE 89 -#define PROPERTY_MAP_FLDTYP_DROPDOWN 90 -#define PROPERTY_MAP_CHART2_DATA_SEQUENCE 91 -#define PROPERTY_MAP_TEXT_VIEW 92 -#define PROPERTY_MAP_CONDITIONAL_PARA_STYLE 93 -#define PROPERTY_MAP_CHAR_AUTO_STYLE 94 -#define PROPERTY_MAP_RUBY_AUTO_STYLE 95 -#define PROPERTY_MAP_PARA_AUTO_STYLE 96 -#define PROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM 97 -#define PROPERTY_MAP_METAFIELD 98 -//IAccessibility2 Implementation 2009----- -#define PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE 99 -//-----IAccessibility2 Implementation 2009 -#define PROPERTY_MAP_END 100 - -//S&E -#define WID_WORDS 0 -#define WID_BACKWARDS 1 -#define WID_REGULAR_EXPRESSION 2 -#define WID_CASE_SENSITIVE 3 -#define WID_IN_SELECTION 4 -#define WID_STYLES 5 -#define WID_SIMILARITY 6 -#define WID_SIMILARITY_RELAX 7 -#define WID_SIMILARITY_EXCHANGE 8 -#define WID_SIMILARITY_ADD 9 -#define WID_SIMILARITY_REMOVE 10 -#define WID_SEARCH_ALL 11 - -//Sections -#define WID_SECT_CONDITION 8000 -#define WID_SECT_DDE_TYPE 8001 -#define WID_SECT_DDE_FILE 8002 -#define WID_SECT_DDE_ELEMENT 8003 -#define WID_SECT_LINK 8004 -#define WID_SECT_VISIBLE 8005 -#define WID_SECT_PROTECTED 8006 -#define WID_SECT_REGION 8007 -#define WID_SECT_DDE_AUTOUPDATE 8008 -#define WID_SECT_DOCUMENT_INDEX 8009 -#define WID_SECT_IS_GLOBAL_DOC_SECTION 8010 -#define WID_SECT_PASSWORD 8011 -#define WID_SECT_CURRENTLY_VISIBLE 8012 -#define WID_SECT_EDIT_IN_READONLY 8013 - - -// Indices/Tables of content -#define WID_PRIMARY_KEY 1000 -#define WID_SECONDARY_KEY 1001 -#define WID_ALT_TEXT 1002 -#define WID_IDX_TITLE 1003 -#define WID_LEVEL 1004 -#define WID_CREATE_FROM_MARKS 1005 -#define WID_CREATE_FROM_OUTLINE 1006 -#define WID_MAIN_ENTRY 1007 -#define WID_CREATE_FROM_CHAPTER 1008 -#define WID_CREATE_FROM_LABELS 1009 -#define WID_USE_ALPHABETICAL_SEPARATORS 1010 -#define WID_USE_KEY_AS_ENTRY 1011 -#define WID_USE_COMBINED_ENTRIES 1012 -#define WID_IS_CASE_SENSITIVE 1013 -#define WID_USE_P_P 1014 -#define WID_USE_DASH 1015 -#define WID_USE_UPPER_CASE 1016 -#define WID_INDEX_AUTO_MARK_FILE_U_R_L 1017 -#define WID_LABEL_CATEGORY 1018 -#define WID_LABEL_DISPLAY_TYPE 1019 -#define WID_USE_LEVEL_FROM_SOURCE 1020 -#define WID_LEVEL_FORMAT 1021 -#define WID_LEVEL_PARAGRAPH_STYLES 1022 -#define WID_RECALC_TAB_STOPS 1023 -#define WID_MAIN_ENTRY_CHARACTER_STYLE_NAME 1025 -#define WID_CREATE_FROM_TABLES 1026 -#define WID_CREATE_FROM_TEXT_FRAMES 1027 -#define WID_CREATE_FROM_GRAPHIC_OBJECTS 1028 -#define WID_CREATE_FROM_EMBEDDED_OBJECTS 1029 -#define WID_CREATE_FROM_STAR_MATH 1030 -#define WID_PROTECTED 1031 - -#define WID_CREATE_FROM_STAR_CHART 1032 -#define WID_CREATE_FROM_STAR_CALC 1033 -#define WID_CREATE_FROM_STAR_DRAW 1034 -#define WID_CREATE_FROM_OTHER_EMBEDDED_OBJECTS 1035 -#define WID_USER_IDX_NAME 1036 -#define WID_PARA_HEAD 1037 -#define WID_PARA_SEP 1038 -#define WID_PARA_LEV1 1039 -#define WID_PARA_LEV2 1040 -#define WID_PARA_LEV3 1041 -#define WID_PARA_LEV4 1042 -#define WID_PARA_LEV5 1043 -#define WID_PARA_LEV6 1044 -#define WID_PARA_LEV7 1045 -#define WID_PARA_LEV8 1046 -#define WID_PARA_LEV9 1047 -#define WID_PARA_LEV10 1048 -#define WID_IS_COMMA_SEPARATED 1049 -#define WID_INDEX_MARKS 1050 -#define WID_IS_RELATIVE_TABSTOPS 1051 -#define WID_CREATE_FROM_PARAGRAPH_STYLES 1052 -#define WID_IDX_CONTENT_SECTION 1053 -#define WID_IDX_HEADER_SECTION 1054 -#define WID_IDX_LOCALE 1055 -#define WID_IDX_SORT_ALGORITHM 1056 -#define WID_IDX_NAME 1057 - -#define WID_TEXT_READING 1058 -#define WID_PRIMARY_KEY_READING 1059 -#define WID_SECONDARY_KEY_READING 1060 - -// Text document -#define WID_DOC_CHAR_COUNT 1000 -#define WID_DOC_PARA_COUNT 1001 -#define WID_DOC_WORD_COUNT 1002 -#define WID_DOC_WORD_SEPARATOR 1003 -#define WID_DOC_CHANGES_SHOW 1004 -#define WID_DOC_CHANGES_RECORD 1005 -#define WID_DOC_AUTO_MARK_URL 1006 -#define WID_DOC_HIDE_TIPS 1007 -#define WID_DOC_REDLINE_DISPLAY 1008 -#define WID_DOC_FORBIDDEN_CHARS 1009 -#define WID_DOC_CHANGES_PASSWORD 1010 -#define WID_DOC_TWO_DIGIT_YEAR 1011 -#define WID_DOC_AUTOMATIC_CONTROL_FOCUS 1012 -#define WID_DOC_APPLY_FORM_DESIGN_MODE 1013 -#define WID_DOC_BASIC_LIBRARIES 1014 -#define WID_DOC_RUNTIME_UID 1015 -#define WID_DOC_LOCK_UPDATES 1016 -#define WID_DOC_HAS_VALID_SIGNATURES 1017 -#define WID_DOC_BUILDID 1024 -#define WID_DOC_ISTEMPLATEID 1025 -#define WID_APPLY_WORKAROUND_FOR_B6375613 1070 - -// MailMerge -#define WID_SELECTION 1071 -#define WID_RESULT_SET 1072 -#define WID_CONNECTION 1073 -#define WID_MODEL 1074 -#define WID_DATA_SOURCE_NAME 1075 -#define WID_DATA_COMMAND 1076 -#define WID_FILTER 1077 -#define WID_DOCUMENT_URL 1078 -#define WID_OUTPUT_URL 1079 -#define WID_DATA_COMMAND_TYPE 1080 -#define WID_OUTPUT_TYPE 1081 -#define WID_ESCAPE_PROCESSING 1082 -#define WID_SINGLE_PRINT_JOBS 1083 -#define WID_FILE_NAME_FROM_COLUMN 1084 -#define WID_FILE_NAME_PREFIX 1085 -#define WID_MAIL_SUBJECT 1086 -#define WID_ADDRESS_FROM_COLUMN 1087 -#define WID_SEND_AS_HTML 1088 -#define WID_SEND_AS_ATTACHMENT 1089 -#define WID_MAIL_BODY 1090 -#define WID_ATTACHMENT_NAME 1091 -#define WID_ATTACHMENT_FILTER 1092 -#define WID_PRINT_OPTIONS 1093 -#define WID_SAVE_AS_SINGLE_FILE 1094 -#define WID_SAVE_FILTER 1095 -#define WID_COPIES_TO 1096 -#define WID_BLIND_COPIES_TO 1097 -#define WID_IN_SERVER_PASSWORD 1098 -#define WID_OUT_SERVER_PASSWORD 1099 -#define WID_SAVE_FILTER_OPTIONS 1100 -#define WID_SAVE_FILTER_DATA 1101 - -#define WID_PAGE_COUNT 1100 -#define WID_LINE_COUNT 1101 -#define WID_IS_CONSTANT_SPELLCHECK 1102 -#define WID_IS_HIDE_SPELL_MARKS 1103 /* deprecated #i91949 */ - -#define WID_LAYOUT_SIZE 1104 -#define WID_DOC_DIALOG_LIBRARIES 1105 -#define WID_DOC_VBA_DOCOBJ 1106 - - -// AutoText -#define WID_GROUP_PATH 0 -#define WID_GROUP_TITLE 1 - -// NumberingRules -#define WID_IS_AUTOMATIC 0 -#define WID_CONTINUOUS 1 -#define WID_RULE_NAME 2 -#define WID_IS_ABS_MARGINS 3 -#define WID_IS_OUTLINE 4 -#define WID_DEFAULT_LIST_ID 5 - -// TextColumns -#define WID_TXTCOL_LINE_WIDTH 0 -#define WID_TXTCOL_LINE_COLOR 1 -#define WID_TXTCOL_LINE_REL_HGT 2 -#define WID_TXTCOL_LINE_ALIGN 3 -#define WID_TXTCOL_LINE_IS_ON 4 -#define WID_TXTCOL_IS_AUTOMATIC 5 -#define WID_TXTCOL_AUTO_DISTANCE 6 -#define WID_TXTCOL_LINE_STYLE 7 - -class SwItemPropertySet : public SfxItemPropertySet -{ -protected: - virtual sal_Bool FillItem(SfxItemSet& rSet, sal_uInt16 nWhich, sal_Bool bGetProperty) const; -public: - SwItemPropertySet( const SfxItemPropertyMapEntry *pMap ) : - SfxItemPropertySet( pMap ){} -}; -class SwUnoPropertyMapProvider -{ - SfxItemPropertyMapEntry* aMapEntriesArr[PROPERTY_MAP_END]; - SfxItemPropertySet* aPropertySetArr[PROPERTY_MAP_END]; - -public: - SwUnoPropertyMapProvider(); - ~SwUnoPropertyMapProvider(); - - const SfxItemPropertyMapEntry* GetPropertyMapEntries(sal_uInt16 PropertyId); - const SfxItemPropertySet* GetPropertySet( sal_uInt16 PropertyId ); - -}; - -extern SwUnoPropertyMapProvider aSwMapProvider; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unomid.h b/sw/inc/unomid.h deleted file mode 100644 index ba22c4cc6c..0000000000 --- a/sw/inc/unomid.h +++ /dev/null @@ -1,162 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNOMID_HXX -#define SW_UNOMID_HXX - -#define C2S(cChar) String::CreateFromAscii( cChar ) -//#define C2U(cChar) rtl::OUString::createFromAscii( cChar ) -#define C2U(cChar) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( cChar )) - -#define MID_MIRROR_VERT 0 -#define MID_MIRROR_HORZ_EVEN_PAGES 1 -#define MID_MIRROR_HORZ_ODD_PAGES 2 - -#define MID_PAGEDESC_PAGEDESCNAME 0 -#define MID_PAGEDESC_PAGENUMOFFSET 1 - -#define MID_SURROUND_SURROUNDTYPE 0 -#define MID_SURROUND_ANCHORONLY 1 -#define MID_SURROUND_CONTOUR 2 -#define MID_SURROUND_CONTOUROUTSIDE 3 - -#define MID_VERTORIENT_ORIENT 0 -#define MID_VERTORIENT_RELATION 1 -#define MID_VERTORIENT_POSITION 2 - -#define MID_HORIORIENT_ORIENT 0 -#define MID_HORIORIENT_RELATION 1 -#define MID_HORIORIENT_POSITION 2 -#define MID_HORIORIENT_PAGETOGGLE 3 - -#define MID_ANCHOR_ANCHORTYPE 0 -#define MID_ANCHOR_PAGENUM 1 -#define MID_ANCHOR_ANCHORFRAME 2 - -#define MID_URL_HYPERLINKFORMAT 0 -#define MID_URL_HYPERLINKNAME 1 -#define MID_URL_CLIENTMAP 2 -#define MID_URL_SERVERMAP 3 -#define MID_URL_URL 4 -#define MID_URL_TARGET 5 -#define MID_URL_VISITED_FMT 6 -#define MID_URL_UNVISITED_FMT 7 -#define MID_URL_HYPERLINKEVENTS 8 - -#define MID_CHAIN_PREVNAME 0 -#define MID_CHAIN_NEXTNAME 1 - -#define MID_LINENUMBER_COUNT 0 -#define MID_LINENUMBER_STARTVALUE 1 - -#define MID_DROPCAP_FORMAT 0 -#define MID_DROPCAP_WHOLE_WORD 1 -#define MID_DROPCAP_CHAR_STYLE_NAME 2 -#define MID_DROPCAP_LINES 3 -#define MID_DROPCAP_COUNT 4 -#define MID_DROPCAP_DISTANCE 5 - -#define MID_FRMSIZE_SIZE 0 -#define MID_FRMSIZE_REL_HEIGHT 1 -#define MID_FRMSIZE_REL_WIDTH 2 - -#define MID_FRMSIZE_WIDTH 4 -#define MID_FRMSIZE_HEIGHT 5 -#define MID_FRMSIZE_SIZE_TYPE 6 -#define MID_FRMSIZE_IS_AUTO_HEIGHT 7 -/* XML only */ -#define MID_FRMSIZE_MIN_HEIGHT 8 -#define MID_FRMSIZE_FIX_HEIGHT 9 -#define MID_FRMSIZE_COL_WIDTH 10 -#define MID_FRMSIZE_REL_COL_WIDTH 11 -/* UNO */ -#define MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT 12 -#define MID_FRMSIZE_IS_SYNC_HEIGHT_TO_WIDTH 13 -#define MID_FRMSIZE_WIDTH_TYPE 14 - -#define MID_COLUMNS 0 -#define MID_COLUMN_SEPARATOR_LINE 1 - -//SwFmtFtnAtTxtEnd -#define MID_COLLECT 0 -#define MID_RESTART_NUM 1 -#define MID_NUM_START_AT 2 -#define MID_OWN_NUM 3 -#define MID_NUM_TYPE 4 -#define MID_PREFIX 5 -#define MID_SUFFIX 6 - -//page style footnote -#define MID_FTN_HEIGHT 0 -#define MID_LINE_WEIGHT 1 -#define MID_LINE_COLOR 2 -#define MID_LINE_RELWIDTH 3 -#define MID_LINE_ADJUST 4 -#define MID_LINE_TEXT_DIST 5 -#define MID_LINE_FOOTNOTE_DIST 6 -#define MID_FTN_LINE_STYLE 7 - -//SwFmtRuby -#define MID_RUBY_TEXT 0 -#define MID_RUBY_ADJUST 1 -#define MID_RUBY_CHARSTYLE 2 -#define MID_RUBY_ABOVE 3 - -//SwTextGridItem -#define MID_GRID_COLOR 0 -#define MID_GRID_LINES 1 -#define MID_GRID_BASEHEIGHT 2 -#define MID_GRID_RUBYHEIGHT 3 -#define MID_GRID_TYPE 4 -#define MID_GRID_RUBY_BELOW 5 -#define MID_GRID_PRINT 6 -#define MID_GRID_DISPLAY 7 -#define MID_GRID_BASEWIDTH 8 -#define MID_GRID_SNAPTOCHARS 9 -#define MID_GRID_STANDARD_MODE 10 - -//SwEnvItem -#define MID_ENV_ADDR_TEXT 1 -#define MID_ENV_SEND 2 -#define MID_SEND_TEXT 3 -#define MID_ENV_ADDR_FROM_LEFT 4 -#define MID_ENV_ADDR_FROM_TOP 5 -#define MID_ENV_SEND_FROM_LEFT 6 -#define MID_ENV_SEND_FROM_TOP 7 -#define MID_ENV_WIDTH 8 -#define MID_ENV_HEIGHT 9 -#define MID_ENV_ALIGN 10 -#define MID_ENV_PRINT_FROM_ABOVE 11 -#define MID_ENV_SHIFT_RIGHT 12 -#define MID_ENV_SHIFT_DOWN 13 - -// SwFmtWrapInfluenceOnObjPos -#define MID_WRAP_INFLUENCE 0 - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unomod.hxx b/sw/inc/unomod.hxx deleted file mode 100644 index 983076389a..0000000000 --- a/sw/inc/unomod.hxx +++ /dev/null @@ -1,179 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOMOD_HXX -#define _UNOMOD_HXX - -#include <com/sun/star/text/XModule.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/view/XPrintSettingsSupplier.hpp> -#include <com/sun/star/view/XViewSettingsSupplier.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <cppuhelper/implbase2.hxx> // helper for implementations -#include <cppuhelper/implbase3.hxx> // helper for implementations -#include <cppuhelper/implbase4.hxx> // helper for implementations -#include <comphelper/ChainablePropertySet.hxx> -#include <comphelper/SettingsHelper.hxx> -#include <usrpref.hxx> - -class SwView; -class SwViewOption; -class SwPrintData; -class SwDoc; - -/****************************************************************************** - * - ******************************************************************************/ -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SwXModule_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & ); - -class SwXModule : public cppu::WeakImplHelper4 -< - ::com::sun::star::text::XModule, - ::com::sun::star::view::XViewSettingsSupplier, - ::com::sun::star::view::XPrintSettingsSupplier, - ::com::sun::star::lang::XServiceInfo -> -{ - - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxViewSettings; - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxPrintSettings; - -protected: - virtual ~SwXModule(); -public: - SwXModule(); - - - //XViewSettings - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getViewSettings(void) - throw( ::com::sun::star::uno::RuntimeException ); - - //XPrintSettings - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getPrintSettings(void) - throw( ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) - throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); -}; - -enum SwXPrintSettingsType -{ - PRINT_SETTINGS_MODULE, - PRINT_SETTINGS_WEB, - PRINT_SETTINGS_DOCUMENT -}; - -class SwXPrintSettings : public comphelper::ChainableHelperNoState -{ - friend class SwXDocumentSettings; -protected: - SwXPrintSettingsType meType; - SwPrintData * mpPrtOpt; - SwDoc *mpDoc; - - virtual void _preSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - - virtual void _preGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - - virtual ~SwXPrintSettings() - throw(); -public: - SwXPrintSettings( SwXPrintSettingsType eType, SwDoc * pDoc = NULL ); - - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) - throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); -}; - -class SwXViewSettings : public comphelper::ChainableHelperNoState -{ - - friend class SwXDocumentSettings; -protected: - SwView* pView; - SwViewOption* mpViewOption; - const SwViewOption* mpConstViewOption; - sal_Bool bObjectValid:1, bWeb:1, mbApplyZoom; - - sal_Int32 eHRulerUnit; - sal_Bool mbApplyHRulerMetric; - sal_Int32 eVRulerUnit; - sal_Bool mbApplyVRulerMetric; - - virtual void _preSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postSetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - - virtual void _preGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ); - virtual void _postGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ); - - virtual ~SwXViewSettings() - throw(); -public: - SwXViewSettings(sal_Bool bWeb, SwView* pView); - - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - sal_Bool IsValid() const {return bObjectValid;} - void Invalidate() {bObjectValid = sal_False;} -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unoparaframeenum.hxx b/sw/inc/unoparaframeenum.hxx deleted file mode 100644 index 3a8efe2fbe..0000000000 --- a/sw/inc/unoparaframeenum.hxx +++ /dev/null @@ -1,124 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNOPARAFRAMEENUM_HXX -#define SW_UNOPARAFRAMEENUM_HXX - -#include <deque> - -#include <boost/shared_ptr.hpp> - -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/container/XEnumeration.hpp> -#include <com/sun/star/text/XTextContent.hpp> - -#include <cppuhelper/implbase2.hxx> - -#include <unobaseclass.hxx> - - -class SwDepend; -class SwNodeIndex; -class SwPaM; -class SwFrmFmt; - - -struct FrameDependSortListEntry -{ - xub_StrLen nIndex; - sal_uInt32 nOrder; - ::boost::shared_ptr<SwDepend> pFrameDepend; - - FrameDependSortListEntry (xub_StrLen const i_nIndex, - sal_uInt32 const i_nOrder, SwDepend * const i_pDepend) - : nIndex(i_nIndex), nOrder(i_nOrder), pFrameDepend(i_pDepend) { } -}; - -typedef ::std::deque< FrameDependSortListEntry > - FrameDependSortList_t; - -typedef ::std::deque< ::boost::shared_ptr<SwDepend> > - FrameDependList_t; - - -// #i28701# - adjust 4th parameter -void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx, - FrameDependSortList_t & rFrames, - const bool _bAtCharAnchoredObjs ); - -enum ParaFrameMode -{ - PARAFRAME_PORTION_PARAGRAPH, - PARAFRAME_PORTION_CHAR, - PARAFRAME_PORTION_TEXTRANGE, -}; - -typedef ::cppu::WeakImplHelper2 -< ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::container::XEnumeration -> SwXParaFrameEnumeration_Base; - -class SwXParaFrameEnumeration - : public SwXParaFrameEnumeration_Base -{ - -private: - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - virtual ~SwXParaFrameEnumeration(); - -public: - - SwXParaFrameEnumeration(const SwPaM& rPaM, - const enum ParaFrameMode eParaFrameMode, SwFrmFmt *const pFmt = 0); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException); - - // XEnumeration - virtual sal_Bool SAL_CALL hasMoreElements() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL nextElement() - throw (::com::sun::star::container::NoSuchElementException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - -}; - -#endif // SW_UNOPARAFRAMEENUM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx deleted file mode 100644 index a9f6eb0f59..0000000000 --- a/sw/inc/unoparagraph.hxx +++ /dev/null @@ -1,361 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNOPARAGRAPH_HXX -#define SW_UNOPARAGRAPH_HXX - -#include <memory> - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/beans/XPropertyState.hpp> -#include <com/sun/star/beans/XMultiPropertySet.hpp> -#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp> -#include <com/sun/star/container/XEnumerationAccess.hpp> -#include <com/sun/star/container/XContentEnumerationAccess.hpp> -#include <com/sun/star/text/XTextContent.hpp> -#include <com/sun/star/text/XTextRange.hpp> - -#include <cppuhelper/implbase10.hxx> - -#include <sfx2/Metadatable.hxx> - -#include <unobaseclass.hxx> - - -struct SwPosition; -class SwPaM; -class SwUnoCrsr; -class SwStartNode; -class SwTxtNode; -class SwTable; -class SwXText; - - -typedef ::cppu::ImplInheritanceHelper10 -< ::sfx2::MetadatableMixin -, ::com::sun::star::lang::XUnoTunnel -, ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::beans::XPropertySet -, ::com::sun::star::beans::XPropertyState -, ::com::sun::star::beans::XMultiPropertySet -, ::com::sun::star::beans::XTolerantMultiPropertySet -, ::com::sun::star::container::XEnumerationAccess -, ::com::sun::star::container::XContentEnumerationAccess -, ::com::sun::star::text::XTextContent -, ::com::sun::star::text::XTextRange -> SwXParagraph_Base; - -class SwXParagraph - : public SwXParagraph_Base -{ - -private: - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - virtual ~SwXParagraph(); - - SwXParagraph(::com::sun::star::uno::Reference< - ::com::sun::star::text::XText > const & xParent, - SwTxtNode & rTxtNode, - const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = - 1); - -public: - - /// descriptor - SwXParagraph(); - - static ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent> - CreateXParagraph(SwDoc & rDoc, SwTxtNode& rTxtNode, - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText> - const& xParentText = 0, - const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = - 1); - - const SwTxtNode * GetTxtNode() const; - bool IsDescriptor() const; - /// make rPaM select the paragraph - bool SelectPaM(SwPaM & rPaM); - /// for SwXText - void attachToText(SwXText & rParent, SwTxtNode & rTxtNode); - - // MetadatableMixin - virtual ::sfx2::Metadatable* GetCoreObject(); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > - GetModel(); - - 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 >& rIdentifier) - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException); - - // XComponent - virtual void SAL_CALL dispose() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - 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& rPropertyName, - const ::com::sun::star::uno::Any& rValue) - 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& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( - const ::rtl::OUString& rPropertyName, - 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& rPropertyName, - 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 addVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - // XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL - getPropertyState(const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyState > SAL_CALL - getPropertyStates( - const ::com::sun::star::uno::Sequence< - ::rtl::OUString >& rPropertyNames) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( - const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( - const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - // XMultiPropertySet - virtual void SAL_CALL setPropertyValues( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames, - const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Any >& rValues) - throw (::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::Sequence< ::com::sun::star::uno::Any > - SAL_CALL getPropertyValues( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertiesChangeListener( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertiesChangeListener >& xListener) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertiesChangeListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertiesChangeListener >& xListener) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL firePropertiesChangeEvent( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertiesChangeListener >& xListener) - 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 >& - rPropertyNames, - const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Any >& rValues) - 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 >& - rPropertyNames) - 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 >& - rPropertyNames) - 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); - - // XEnumerationAccess - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::container::XEnumeration > SAL_CALL - createEnumeration() - throw (::com::sun::star::uno::RuntimeException); - - // XContentEnumerationAccess - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::container::XEnumeration > SAL_CALL - createContentEnumeration(const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getAvailableServiceNames() - 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); - - // XTextRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - SAL_CALL getText() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL getStart() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL getEnd() - throw (::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getString() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setString(const ::rtl::OUString& rString) - throw (::com::sun::star::uno::RuntimeException); - -}; - - -class SwXParagraphEnumeration - : public SwSimpleEnumeration_Base -{ - -private: - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - virtual ~SwXParagraphEnumeration(); - -public: - - /// takes ownership of cursor - SwXParagraphEnumeration( - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - const & xParent, - ::std::auto_ptr<SwUnoCrsr> pCursor, - const CursorType eType, - SwStartNode const*const pStartNode = 0, - SwTable const*const pTable = 0); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException); - - // XEnumeration - virtual sal_Bool SAL_CALL hasMoreElements() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL nextElement() - throw (::com::sun::star::container::NoSuchElementException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - -}; - -#endif // SW_UNOPARAGRAPH_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx deleted file mode 100644 index a37966d49e..0000000000 --- a/sw/inc/unoport.hxx +++ /dev/null @@ -1,316 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOPORT_HXX -#define _UNOPORT_HXX - -#include <unocrsr.hxx> -#include <unoevtlstnr.hxx> -#include <calbck.hxx> - -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/text/XTextRange.hpp> -#include <com/sun/star/container/XEnumeration.hpp> -#include <com/sun/star/container/XContentEnumerationAccess.hpp> -#include <com/sun/star/container/XEnumerationAccess.hpp> -#include <com/sun/star/beans/XPropertyState.hpp> -#include <com/sun/star/beans/XMultiPropertySet.hpp> -#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp> -#include <com/sun/star/text/XTextField.hpp> -#include <com/sun/star/text/XFootnote.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <cppuhelper/implbase8.hxx> -#include <cppuhelper/implbase3.hxx> -#include <svl/itemprop.hxx> - -#include <memory> -#include <deque> - - -class SwFmtFld; -class SwFrmFmt; -class SwTxtRuby; - - -typedef ::std::deque< - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > > - TextRangeList_t; - -enum SwTextPortionType -{ - PORTION_TEXT, - PORTION_FIELD, - PORTION_FRAME, - PORTION_FOOTNOTE, - PORTION_REFMARK_START, - PORTION_REFMARK_END, - PORTION_TOXMARK_START, - PORTION_TOXMARK_END, - PORTION_BOOKMARK_START, - PORTION_BOOKMARK_END, - PORTION_REDLINE_START, - PORTION_REDLINE_END, - PORTION_RUBY_START, - PORTION_RUBY_END, - PORTION_SOFT_PAGEBREAK, - PORTION_META, - PORTION_FIELD_START, - PORTION_FIELD_END, - PORTION_FIELD_START_END -}; - - -class SwXTextPortion : public cppu::WeakImplHelper8 -< - ::com::sun::star::beans::XTolerantMultiPropertySet, - ::com::sun::star::beans::XMultiPropertySet, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::text::XTextRange, - ::com::sun::star::beans::XPropertyState, - ::com::sun::star::container::XContentEnumerationAccess, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::lang::XServiceInfo ->, - public SwClient -{ -private: - - SwEventListenerContainer m_ListenerContainer; - const SfxItemPropertySet * m_pPropSet; - const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - m_xParentText; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > - m_xRefMark; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > - m_xTOXMark; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > - m_xBookmark; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote > - m_xFootnote; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextField > - m_xTextField; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > - m_xMeta; - ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyText; - ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyStyle; - ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyAdjust; - ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyIsAbove; - - const SwDepend m_FrameDepend; - SwFrmFmt * m_pFrameFmt; - const SwTextPortionType m_ePortionType; - - bool m_bIsCollapsed; - - SwFmtFld * GetFldFmt(bool bInit = false); - - void init(const SwUnoCrsr* pPortionCursor); - -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); - - void GetPropertyValues( const ::rtl::OUString *pPropertyNames, - ::com::sun::star::uno::Any *pValues, - sal_Int32 nLength ); - - void GetPropertyValue( ::com::sun::star::uno::Any &rVal, - 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); - - virtual ~SwXTextPortion(); - - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent, SwTextPortionType eType ); - SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent, SwFrmFmt& rFmt ); - - // for Ruby - SwXTextPortion(const SwUnoCrsr* pPortionCrsr, - SwTxtRuby const& rAttr, - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - const& xParent, - sal_Bool bIsEnd ); - - //XTextRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText() throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart() throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd() throw( ::com::sun::star::uno::RuntimeException ); - virtual rtl::OUString SAL_CALL getString() throw( ::com::sun::star::uno::RuntimeException ); - 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); - - //XMultiPropertySet - virtual void SAL_CALL setPropertyValues( 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::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) 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); - - //XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::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() 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 ); - - //XUnoTunnel - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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() throw( ::com::sun::star::uno::RuntimeException ); - - //XContentEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames() throw( ::com::sun::star::uno::RuntimeException ); - - void SetRefMark( ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent > xMark) - { m_xRefMark = xMark; } - - void SetTOXMark( ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent > xMark) - { m_xTOXMark = xMark; } - - void SetBookmark( ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent > xMark) - { m_xBookmark = xMark; } - - void SetFootnote( ::com::sun::star::uno::Reference< - ::com::sun::star::text::XFootnote > xNote) - { m_xFootnote = xNote; } - - void SetTextField( ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextField> xField) - { m_xTextField = xField; } - - void SetMeta( ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent > xMeta) - { m_xMeta = xMeta; } - - bool IsCollapsed() const { return m_bIsCollapsed; } - void SetCollapsed(bool bSet) { m_bIsCollapsed = bSet;} - - SwTextPortionType GetTextPortionType() const { return m_ePortionType; } - - SwUnoCrsr* GetCursor() const - {return static_cast<SwUnoCrsr*>(const_cast<SwModify*>(GetRegisteredIn()));} -}; - -class SwXTextPortionEnumeration - : public ::cppu::WeakImplHelper3 - < ::com::sun::star::container::XEnumeration - , ::com::sun::star::lang::XServiceInfo - , ::com::sun::star::lang::XUnoTunnel - > - , public SwClient -{ - TextRangeList_t m_Portions; // contains all portions, filled by ctor - - SwUnoCrsr* GetCursor() const - {return static_cast<SwUnoCrsr*>(const_cast<SwModify*>(GetRegisteredIn()));} - -protected: - virtual ~SwXTextPortionEnumeration(); - -public: - SwXTextPortionEnumeration(SwPaM& rParaCrsr, - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - const & xParent, - const sal_Int32 nStart, const sal_Int32 nEnd ); - - SwXTextPortionEnumeration(SwPaM& rParaCrsr, - TextRangeList_t const & rPortions ); - - - 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); - - //XEnumeration - virtual sal_Bool SAL_CALL hasMoreElements() - throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Any SAL_CALL nextElement() - throw( ::com::sun::star::container::NoSuchElementException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName() - throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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() - throw( ::com::sun::star::uno::RuntimeException ); -protected: - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx deleted file mode 100644 index 2eb894d4c8..0000000000 --- a/sw/inc/unoprnms.hxx +++ /dev/null @@ -1,842 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOPRNMS_HXX -#define _UNOPRNMS_HXX - -#include <sal/types.h> -#include <tools/solar.h> -#include "swdllapi.h" - -enum SwPropNameIds -{ -/* 0001 */ SW_PROPNAME_BEGIN = 1, - -/* 0001 */ UNO_NAME_FOLLOW_STYLE = SW_PROPNAME_BEGIN, -/* 0002 */ UNO_NAME_IS_PHYSICAL, -/* 0003 */ UNO_NAME_IS_AUTO_UPDATE, -/* 0004 */ UNO_NAME_DISPLAY_NAME, -/* 0005 */ UNO_NAME_PARA_GRAPHIC_URL, -/* 0006 */ UNO_NAME_PARA_GRAPHIC_FILTER, -/* 0007 */ UNO_NAME_HEADER_GRAPHIC_URL, -/* 0008 */ UNO_NAME_HEADER_GRAPHIC_FILTER, -/* 0009 */ UNO_NAME_FOOTER_GRAPHIC_URL, -/* 0010 */ UNO_NAME_FOOTER_GRAPHIC_FILTER, -/* 0011 */ UNO_NAME_BACK_GRAPHIC_URL, -/* 0012 */ UNO_NAME_BACK_GRAPHIC_FILTER, -/* 0013 */ UNO_NAME_BACK_GRAPHIC_LOCATION, -/* 0014 */ UNO_NAME_BACK_GRAPHIC_BITMAP, -/* 0015 */ UNO_NAME_GRAPHIC_URL, -/* 0016 */ UNO_NAME_GRAPHIC_FILTER, -/* 0017 */ UNO_NAME_GRAPHIC_LOCATION, -/* 0018 */ UNO_NAME_GRAPHIC_SIZE, -/* 0019 */ UNO_NAME_GRAPHIC_BITMAP, -/* 0020 */ UNO_NAME_BULLET_FONT, -/* 0021 */ UNO_NAME_PARA_GRAPHIC_LOCATION, -/* 0022 */ UNO_NAME_HEADER_GRAPHIC_LOCATION, -/* 0023 */ UNO_NAME_FOOTER_GRAPHIC_LOCATION, -/* 0024 */ UNO_NAME_PARA_LEFT_PARA_MARGIN, -/* 0025 */ UNO_NAME_PARA_RIGHT_PARA_MARGIN, -/* 0026 */ UNO_NAME_PARA_LEFT_MARGIN, -/* 0027 */ UNO_NAME_PARA_RIGHT_MARGIN, -/* 0028 */ UNO_NAME_PARA_LEFT_MARGIN_RELATIVE, -/* 0029 */ UNO_NAME_PARA_RIGHT_MARGIN_RELATIVE, -/* 0030 */ UNO_NAME_PARA_IS_AUTO_FIRST_LINE_INDENT, -/* 0031 */ UNO_NAME_PARA_FIRST_LINE_INDENT, -/* 0032 */ UNO_NAME_PARA_FIRST_LINE_INDENT_RELATIVE, -/* 0033 */ UNO_NAME_PARA_IS_HYPHENATION, -/* 0034 */ UNO_NAME_PARA_HYPHENATION_MAX_LEADING_CHARS, -/* 0035 */ UNO_NAME_PARA_HYPHENATION_MAX_TRAILING_CHARS, -/* 0036 */ UNO_NAME_PARA_HYPHENATION_MAX_HYPHENS, -/* 0037 */ UNO_NAME_LEFT_MARGIN, -/* 0038 */ UNO_NAME_RIGHT_MARGIN, -/* 0039 */ UNO_NAME_HEADER_LEFT_MARGIN, -/* 0040 */ UNO_NAME_HEADER_RIGHT_MARGIN, -/* 0041 */ UNO_NAME_FOOTER_LEFT_MARGIN, -/* 0042 */ UNO_NAME_FOOTER_RIGHT_MARGIN, -/* 0043 */ UNO_NAME_TEXT_RANGE, -/* 0044 */ UNO_NAME_NAME, -/* 0045 */ UNO_NAME_NUMBERING_ALIGNMENT, -/* 0046 */ UNO_NAME_BULLET_FONT_NAME, -/* 0047 */ UNO_NAME_BULLET_ID, -/* 0048 */ UNO_NAME_CHAR_STYLE_NAME, -/* 0049 */ UNO_NAME_ANCHOR_CHAR_STYLE_NAME, -/* 0050 */ UNO_NAME_SUFFIX, -/* 0051 */ UNO_NAME_PREFIX, -/* 0052 */ UNO_NAME_PARENT_NUMBERING, -/* 0053 */ UNO_NAME_START_WITH, -/* 0054 */ UNO_NAME_CHAR_FONT_NAME, -/* 0055 */ UNO_NAME_CHAR_FONT_STYLE_NAME, -/* 0056 */ UNO_NAME_CHAR_FONT_FAMILY, -/* 0057 */ UNO_NAME_CHAR_FONT_CHAR_SET, -/* 0058 */ UNO_NAME_CHAR_FONT_PITCH, -/* 0059 */ UNO_NAME_CHAR_POSTURE, -/* 0060 */ UNO_NAME_CHAR_WEIGHT, -/* 0061 */ UNO_NAME_CHAR_HEIGHT, -/* 0062 */ UNO_NAME_CHAR_LOCALE, -/* 0063 */ UNO_NAME_CHAR_FONT_NAME_ASIAN, -/* 0064 */ UNO_NAME_CHAR_FONT_STYLE_NAME_ASIAN, -/* 0065 */ UNO_NAME_CHAR_FONT_FAMILY_ASIAN, -/* 0066 */ UNO_NAME_CHAR_FONT_CHAR_SET_ASIAN, -/* 0067 */ UNO_NAME_CHAR_FONT_PITCH_ASIAN, -/* 0068 */ UNO_NAME_CHAR_POSTURE_ASIAN, -/* 0069 */ UNO_NAME_CHAR_WEIGHT_ASIAN, -/* 0070 */ UNO_NAME_CHAR_HEIGHT_ASIAN, -/* 0071 */ UNO_NAME_CHAR_LOCALE_ASIAN, -/* 0072 */ UNO_NAME_CHAR_FONT_NAME_COMPLEX, -/* 0073 */ UNO_NAME_CHAR_FONT_STYLE_NAME_COMPLEX, -/* 0074 */ UNO_NAME_CHAR_FONT_FAMILY_COMPLEX, -/* 0075 */ UNO_NAME_CHAR_FONT_CHAR_SET_COMPLEX, -/* 0076 */ UNO_NAME_CHAR_FONT_PITCH_COMPLEX, -/* 0077 */ UNO_NAME_CHAR_POSTURE_COMPLEX, -/* 0078 */ UNO_NAME_CHAR_WEIGHT_COMPLEX, -/* 0079 */ UNO_NAME_CHAR_HEIGHT_COMPLEX, -/* 0080 */ UNO_NAME_CHAR_LOCALE_COMPLEX, -/* 0081 */ UNO_NAME_CHAR_AUTO_KERNING, -/* 0082 */ UNO_NAME_CHAR_UNDERLINE, -/* 0083 */ UNO_NAME_CHAR_UNDERLINE_COLOR, -/* 0084 */ UNO_NAME_CHAR_UNDERLINE_HAS_COLOR, -/* 0085 */ UNO_NAME_CHAR_ESCAPEMENT, -/* 0086 */ UNO_NAME_CHAR_CASE_MAP, -/* 0087 */ UNO_NAME_CHAR_SHADOWED, -/* 0088 */ UNO_NAME_CHAR_STRIKEOUT, -/* 0089 */ UNO_NAME_CHAR_CROSSED_OUT, -/* 0090 */ UNO_NAME_CHAR_NO_HYPHENATION, -/* 0091 */ UNO_NAME_CHAR_AUTO_ESCAPEMENT, -/* 0092 */ UNO_NAME_CHAR_PROP_HEIGHT, -/* 0093 */ UNO_NAME_CHAR_DIFF_HEIGHT, -/* 0094 */ UNO_NAME_CHAR_PROP_HEIGHT_ASIAN, -/* 0095 */ UNO_NAME_CHAR_DIFF_HEIGHT_ASIAN, -/* 0096 */ UNO_NAME_CHAR_PROP_HEIGHT_COMPLEX, -/* 0097 */ UNO_NAME_CHAR_DIFF_HEIGHT_COMPLEX, -/* 0098 */ UNO_NAME_CHAR_ESCAPEMENT_HEIGHT, -/* 0099 */ UNO_NAME_CHAR_COLOR, - -/* 0100 */ UNO_NAME_CHAR_FLASH, -/* 0101 */ UNO_NAME_CHAR_KERNING, -/* 0102 */ UNO_NAME_CHAR_BACK_COLOR, -/* 0103 */ UNO_NAME_CHAR_BACK_TRANSPARENT, -/* 0104 */ UNO_NAME_CHAR_COMBINE_IS_ON, -/* 0105 */ UNO_NAME_CHAR_COMBINE_PREFIX, -/* 0106 */ UNO_NAME_CHAR_COMBINE_SUFFIX, -/* 0107 */ UNO_NAME_CHAR_EMPHASIS, -/* 0108 */ UNO_NAME_PARA_LINE_SPACING, -/* 0109 */ UNO_NAME_PARA_TOP_MARGIN, -/* 0110 */ UNO_NAME_PARA_BOTTOM_MARGIN, -/* 0111 */ UNO_NAME_PARA_TOP_MARGIN_RELATIVE, -/* 0112 */ UNO_NAME_PARA_BOTTOM_MARGIN_RELATIVE, -/* 0113 */ UNO_NAME_PARA_EXPAND_SINGLE_WORD, -/* 0114 */ UNO_NAME_END_NOTICE, -/* 0115 */ UNO_NAME_EMBEDDED_OBJECTS, -/* 0116 */ UNO_NAME_ALPHABETICAL_SEPARATORS, -/* 0117 */ UNO_NAME_BACKGROUND_COLOR, -/* 0118 */ UNO_NAME_BEGIN_NOTICE, -/* 0119 */ UNO_NAME_CASE_SENSITIVE, -/* 0120 */ UNO_NAME_FRAME_STYLE_NAME, -/* 0121 */ UNO_NAME_NUMBERING_STYLE_NAME, -/* 0122 */ UNO_NAME_NUMBERING_LEVEL, -/* 0123 */ UNO_NAME_NUMBERING_START_VALUE, -/* 0124 */ UNO_NAME_NUMBERING_IS_NUMBER, -/* 0125 */ UNO_NAME_COMBINE_ENTRIES, -/* 0126 */ UNO_NAME_COUNT_LINES_IN_FRAMES, -/* 0127 */ UNO_NAME_DDE_COMMAND_TYPE, -/* 0128 */ UNO_NAME_DDE_COMMAND_FILE, -/* 0129 */ UNO_NAME_DDE_COMMAND_ELEMENT, -/* 0130 */ UNO_NAME_IS_AUTOMATIC_UPDATE, -/* 0131 */ UNO_NAME_DEFAULT_TABSTOP_DISTANCE, -/* 0132 */ UNO_NAME_DISTANCE, -/* 0133 */ UNO_NAME_DROP_CAP_FORMAT, -/* 0134 */ UNO_NAME_DROP_CAP_WHOLE_WORD, -/* 0135 */ UNO_NAME_DROP_CAP_CHAR_STYLE_NAME, -/* 0136 */ UNO_NAME_FILE_LINK, -/* 0137 */ UNO_NAME_GRAPHIC, -/* 0138 */ UNO_NAME_GRAPHICS, -/* 0139 */ UNO_NAME_IS_PROTECTED, -/* 0140 */ UNO_NAME_KEY_AS_ENTRY, -/* 0141 */ UNO_NAME_PARA_KEEP_TOGETHER, -/* 0142 */ UNO_NAME_KEEP_TOGETHER, -/* 0143 */ UNO_NAME_IS_LANDSCAPE, -/* 0144 */ UNO_NAME_SEPARATOR_TEXT, -/* 0145 */ UNO_NAME_MARKS, -/* 0146 */ UNO_NAME_NUMBER_POSITION, -/* 0147 */ UNO_NAME_OUTLINES, -/* 0148 */ UNO_NAME_PAGE_STYLE_NAME, -/* 0149 */ UNO_NAME_PAGE_STYLE_LAYOUT, -/* 0150 */ UNO_NAME_PARA_STYLES, -/* 0151 */ UNO_NAME_PARA_ADJUST, -/* 0152 */ UNO_NAME_PARA_REGISTER_MODE_ACTIVE, -/* 0153 */ UNO_NAME_PARA_STYLE_NAME, -/* 0154 */ UNO_NAME_PARA_LAST_LINE_ADJUST, -/* 0155 */ UNO_NAME_PARA_LINE_NUMBER_COUNT, -/* 0156 */ UNO_NAME_PARA_LINE_NUMBER_START_VALUE, -/* 0157 */ UNO_NAME_BACK_COLOR, -/* 0158 */ UNO_NAME_PARA_BACK_COLOR, -/* 0159 */ UNO_NAME_PARA_WIDOWS, -/* 0160 */ UNO_NAME_PARA_ORPHANS, -/* 0161 */ UNO_NAME_PARA_BACK_TRANSPARENT, -/* 0162 */ UNO_NAME_POSITION_END_OF_DOC, -/* 0163 */ UNO_NAME_POSITION_PROTECTED, -/* 0164 */ UNO_NAME_ALTERNATIVE_TEXT, -/* 0165 */ UNO_NAME_PRIMARY_KEY, -/* 0166 */ UNO_NAME_PRINT_TABLES, -/* 0167 */ UNO_NAME_PRINT_GRAPHICS, -/* 0168 */ UNO_NAME_PRINT_REVERSED, -/* 0169 */ UNO_NAME_PRINT_PROSPECT, -/* 0170 */ UNO_NAME_PRINT_CONTROLS, -/* 0171 */ UNO_NAME_PRINT_DRAWINGS, -/* 0172 */ UNO_NAME_PRINT_RIGHT_PAGES, -/* 0173 */ UNO_NAME_PRINT_LEFT_PAGES, -/* 0174 */ UNO_NAME_PRINT_BLACK_FONTS, -/* 0175 */ UNO_NAME_PRINTER_PAPER_TRAY, -/* 0176 */ UNO_NAME_PRINT_PAGE_BACKGROUND, -/* 0177 */ UNO_NAME_PRINT_ANNOTATION_MODE, -/* 0178 */ UNO_NAME_PRINT_FAX_NAME, -/* 0179 */ UNO_NAME_PRINT_PAPER_FROM_SETUP, -/* 0180 */ UNO_NAME_REGISTER_MODE_ACTIVE, -/* 0181 */ UNO_NAME_RELATIVE_WIDTH, -/* 0182 */ UNO_NAME_RELATIVE_HEIGHT, -/* 0183 */ UNO_NAME_REPEAT_HEADLINE, -/* 0184 */ UNO_NAME_SEARCH_STYLES, -/* 0185 */ UNO_NAME_SEARCH_BACKWARDS, -/* 0186 */ UNO_NAME_SEARCH_SIMILARITY, -/* 0187 */ UNO_NAME_SEARCH_IN_SELECTION, -/* 0188 */ UNO_NAME_SEARCH_CASE_SENSITIVE, -/* 0189 */ UNO_NAME_SEARCH_SIMILARITY_ADD, -/* 0190 */ UNO_NAME_SEARCH_SIMILARITY_RELAX, -/* 0191 */ UNO_NAME_SEARCH_SIMILARITY_REMOVE, -/* 0192 */ UNO_NAME_SEARCH_REGULAR_EXPRESSION, -/* 0193 */ UNO_NAME_SEARCH_SIMILARITY_EXCHANGE, -/* 0194 */ UNO_NAME_SECONDARY_KEY, -/* 0195 */ UNO_NAME_SEPARATOR_INTERVAL, -/* 0196 */ UNO_NAME_SHOW_BREAKS, -/* 0197 */ UNO_NAME_SHOW_SPACES, -/* 0198 */ UNO_NAME_SHOW_TABLES, -/* 0199 */ UNO_NAME_SHOW_GRAPHICS, - -/* 0200 */ UNO_NAME_SHOW_DRAWINGS, -/* 0201 */ UNO_NAME_SHOW_TABSTOPS, -/* 0202 */ UNO_NAME_SHOW_VERT_RULER, -/* 0203 */ UNO_NAME_SHOW_PARA_BREAKS, -/* 0204 */ UNO_NAME_SHOW_HIDDEN_TEXT, -/* 0205 */ UNO_NAME_SHOW_ANNOTATIONS, -/* 0206 */ UNO_NAME_SHOW_SOFT_HYPHENS, -/* 0207 */ UNO_NAME_SHOW_VERT_SCROLL_BAR, -/* 0208 */ UNO_NAME_SHOW_HORI_SCROLL_BAR, -/* 0209 */ UNO_NAME_SHOW_FIELD_COMMANDS, -/* 0210 */ UNO_NAME_SHOW_TEXT_BOUNDARIES, -/* 0211 */ UNO_NAME_SHOW_PROTECTED_SPACES, -/* 0212 */ UNO_NAME_SHOW_TABLE_BOUNDARIES, -/* 0213 */ UNO_NAME_SHOW_HIDDEN_PARAGRAPHS, -/* 0214 */ UNO_NAME_SHOW_INDEX_MARK_BACKGROUND, -/* 0215 */ UNO_NAME_SHOW_FOOTNOTE_BACKGROUND, -/* 0216 */ UNO_NAME_SHOW_TEXT_FIELD_BACKGROUND, -/* 0217 */ UNO_NAME_IS_SYNC_WIDTH_TO_HEIGHT, -/* 0218 */ UNO_NAME_IS_SYNC_HEIGHT_TO_WIDTH, -/* 0219 */ UNO_NAME_SIZE_PROTECTED, -/* 0220 */ UNO_NAME_SMOOTH_SCROLLING, -/* 0221 */ UNO_NAME_SOLID_MARK_HANDLES, -/* 0222 */ UNO_NAME_TABLES, -/* 0223 */ UNO_NAME_TEXT_FRAMES, -/* 0224 */ UNO_NAME_TEXT_COLUMNS, -/* 0225 */ UNO_NAME_BACK_TRANSPARENT, -/* 0226 */ UNO_NAME_USE_PP, -/* 0227 */ UNO_NAME_USER_METRIC, -/* 0228 */ UNO_NAME_ANCHOR_TYPE, -/* 0229 */ UNO_NAME_ANCHOR_TYPES, -/* 0230 */ UNO_NAME_ANCHOR_PAGE_NO, -/* 0231 */ UNO_NAME_ANCHOR_FRAME, -/* 0232 */ UNO_NAME_AUTHOR, -/* 0233 */ UNO_NAME_BREAK_TYPE, -/* 0234 */ UNO_NAME_CHAIN_NEXT_NAME, -/* 0235 */ UNO_NAME_CHAIN_PREV_NAME, -/* 0236 */ UNO_NAME_CHAPTER_FORMAT, -/* 0237 */ UNO_NAME_CLIENT_MAP, -/* 0238 */ UNO_NAME_CONDITION, -/* 0239 */ UNO_NAME_CONTENT, -/* 0240 */ UNO_NAME_CHAR_CONTOURED, -/* 0241 */ UNO_NAME_CONTOUR_OUTSIDE, -/* 0242 */ UNO_NAME_CONTENT_PROTECTED, -/* 0243 */ UNO_NAME_COUNT_EMPTY_LINES, -/* 0244 */ UNO_NAME_RESTART_AT_EACH_PAGE, -/* 0245 */ UNO_NAME_DATA_BASE_NAME, -/* 0246 */ UNO_NAME_DATA_TABLE_NAME, -/* 0247 */ UNO_NAME_DATA_COMMAND_TYPE, -/* 0248 */ UNO_NAME_DATA_COLUMN_NAME, -/* 0249 */ UNO_NAME_IS_DATA_BASE_FORMAT, -/* 0250 */ UNO_NAME_DATE, -/* 0251 */ UNO_NAME_IS_DATE, -/* 0252 */ UNO_NAME_EDIT_IN_READONLY, -/* 0253 */ UNO_NAME_FALSE_CONTENT, -/* 0254 */ UNO_NAME_FILE_FORMAT, -/* 0255 */ UNO_NAME_IS_FIXED, -/* 0256 */ UNO_NAME_FOOTNOTE_COUNTING, -/* 0257 */ UNO_NAME_FORMULA, -/* 0258 */ UNO_NAME_FRAME_NAME, -/* 0259 */ UNO_NAME_GRAPHIC_NAME, -/* 0260 */ UNO_NAME_FULL_NAME, -/* 0261 */ UNO_NAME_HEIGHT, -/* 0262 */ UNO_NAME_IS_AUTO_HEIGHT, -/* 0263 */ UNO_NAME_SIZE_TYPE, -/* 0264 */ UNO_NAME_HINT, -/* 0265 */ UNO_NAME_HORI_ORIENT, -/* 0266 */ UNO_NAME_HORI_MIRRORED_ON_EVEN_PAGES, -/* 0267 */ UNO_NAME_HORI_MIRRORED_ON_ODD_PAGES, -/* 0268 */ UNO_NAME_HORI_ORIENT_RELATION, -/* 0269 */ UNO_NAME_HORI_ORIENT_POSITION, -/* 0270 */ UNO_NAME_HYPER_LINK_U_R_L, -/* 0271 */ UNO_NAME_HYPER_LINK_TARGET, -/* 0272 */ UNO_NAME_HYPER_LINK_NAME, -/* 0273 */ UNO_NAME_HYPER_LINK_EVENTS, -/* 0274 */ UNO_NAME_INFO_TYPE, -/* 0275 */ UNO_NAME_INFO_FORMAT, -/* 0276 */ UNO_NAME_IS_INPUT, -/* 0277 */ UNO_NAME_LEVEL, -/* 0278 */ UNO_NAME_INTERVAL, -/* 0279 */ UNO_NAME_LINK_REGION, -/* 0280 */ UNO_NAME_MACRO_NAME, -/* 0281 */ UNO_NAME_SPLIT, -/* 0282 */ UNO_NAME_PARA_SPLIT, -/* 0283 */ UNO_NAME_NUMBER_FORMAT, -/* 0284 */ UNO_NAME_NUMBERING_TYPE, -/* 0285 */ UNO_NAME_NUMBERING_RULES, -/* 0286 */ UNO_NAME_OFFSET, -/* 0287 */ UNO_NAME_ON, -/* 0288 */ UNO_NAME_OPAQUE, -/* 0289 */ UNO_NAME_PAGE_TOGGLE, -/* 0290 */ UNO_NAME_PAGE_DESC_NAME, -/* 0291 */ UNO_NAME_PAGE_NUMBER_OFFSET, -/* 0292 */ UNO_NAME_PLACEHOLDER, -/* 0293 */ UNO_NAME_PLACEHOLDER_TYPE, -/* 0294 */ UNO_NAME_PRINT, -/* 0295 */ UNO_NAME_REFERENCE_FIELD_PART, -/* 0296 */ UNO_NAME_REFERENCE_FIELD_SOURCE, -/* 0297 */ UNO_NAME_REGISTER_PARAGRAPH_STYLE, -/* 0298 */ UNO_NAME_SCRIPT_TYPE, -/* 0299 */ UNO_NAME_SEARCH_ALL, - -/* 0300 */ UNO_NAME_SEARCH_WORDS, -/* 0301 */ UNO_NAME_SEQUENCE_VALUE, -/* 0302 */ UNO_NAME_SERVER_MAP, -/* 0303 */ UNO_NAME_IMAGE_MAP, -/* 0304 */ UNO_NAME_SET_NUMBER, -/* 0305 */ UNO_NAME_SHADOW_FORMAT, -/* 0306 */ UNO_NAME_SHOW_HORI_RULER, -/* 0307 */ UNO_NAME_SIZE, -/* 0308 */ UNO_NAME_ACTUAL_SIZE, -/* 0309 */ UNO_NAME_SOURCE_NAME, -/* 0310 */ UNO_NAME_START_AT, -/* 0311 */ UNO_NAME_STATISTIC_TYPE_ID, -/* 0312 */ UNO_NAME_SUB_TYPE, -/* 0313 */ UNO_NAME_SURROUND, -/* 0314 */ UNO_NAME_IS_EXPRESSION, -/* 0315 */ UNO_NAME_IS_SHOW_FORMULA, -/* 0316 */ UNO_NAME_TEXT_WRAP, -/* 0317 */ UNO_NAME_SURROUND_CONTOUR, -/* 0318 */ UNO_NAME_SURROUND_ANCHORONLY, -/* 0319 */ UNO_NAME_TABLE_NAME, -/* 0320 */ UNO_NAME_TABSTOPS, -/* 0321 */ UNO_NAME_TITLE, -/* 0322 */ UNO_NAME_TOP_MARGIN, -/* 0323 */ UNO_NAME_BOTTOM_MARGIN, -/* 0324 */ UNO_NAME_TRUE_CONTENT, -/* 0325 */ UNO_NAME_URL_CONTENT, -/* 0326 */ UNO_NAME_USERTEXT, -/* 0327 */ UNO_NAME_USER_DATA_TYPE, -/* 0328 */ UNO_NAME_VALUE, -/* 0329 */ UNO_NAME_VARIABLE_NAME, -/* 0330 */ UNO_NAME_VARIABLE_SUBTYPE, -/* 0331 */ UNO_NAME_VERT_ORIENT, -/* 0332 */ UNO_NAME_VERT_MIRRORED, -/* 0333 */ UNO_NAME_VERT_ORIENT_POSITION, -/* 0334 */ UNO_NAME_VERT_ORIENT_RELATION, -/* 0335 */ UNO_NAME_IS_VISIBLE, -/* 0336 */ UNO_NAME_WIDTH, -/* 0337 */ UNO_NAME_CHAR_WORD_MODE, -/* 0338 */ UNO_NAME_GRAPHIC_CROP, -/* 0339 */ UNO_NAME_CHARACTER_FORMAT_NONE, -/* 0340 */ UNO_NAME_TEXT_POSITION, -/* 0341 */ UNO_NAME_DOCUMENT_INDEX_MARK, -/* 0342 */ UNO_NAME_DOCUMENT_INDEX, -/* 0343 */ UNO_NAME_IS_GLOBAL_DOCUMENT_SECTION, -/* 0344 */ UNO_NAME_TEXT_FIELD, -/* 0345 */ UNO_NAME_BOOKMARK, -/* 0346 */ UNO_NAME_TEXT_TABLE, -/* 0347 */ UNO_NAME_CELL, -/* 0348 */ UNO_NAME_TEXT_FRAME, -/* 0349 */ UNO_NAME_REFERENCE_MARK, -/* 0350 */ UNO_NAME_TEXT_SECTION, -/* 0351 */ UNO_NAME_FOOTNOTE, -/* 0352 */ UNO_NAME_ENDNOTE, -/* 0353 */ UNO_NAME_CHART_ROW_AS_LABEL, -/* 0354 */ UNO_NAME_CHART_COLUMN_AS_LABEL, -/* 0355 */ UNO_NAME_TABLE_COLUMS, -/* 0356 */ UNO_NAME_LEFT_BORDER, -/* 0357 */ UNO_NAME_RIGHT_BORDER, -/* 0358 */ UNO_NAME_TOP_BORDER, -/* 0359 */ UNO_NAME_BOTTOM_BORDER, -/* 0360 */ UNO_NAME_BORDER_DISTANCE, -/* 0361 */ UNO_NAME_LEFT_BORDER_DISTANCE, -/* 0362 */ UNO_NAME_RIGHT_BORDER_DISTANCE, -/* 0363 */ UNO_NAME_TOP_BORDER_DISTANCE, -/* 0364 */ UNO_NAME_BOTTOM_BORDER_DISTANCE, -/* 0365 */ UNO_NAME_TABLE_BORDER, -/* 0366 */ UNO_NAME_TABLE_COLUMN_SEPARATORS, -/* 0367 */ UNO_NAME_TABLE_COLUMN_RELATIVE_SUM, -/* 0368 */ UNO_NAME_HEADER_TEXT, -/* 0369 */ UNO_NAME_HEADER_TEXT_LEFT, -/* 0370 */ UNO_NAME_HEADER_TEXT_RIGHT, -/* 0371 */ UNO_NAME_FOOTER_TEXT, -/* 0372 */ UNO_NAME_FOOTER_TEXT_LEFT, -/* 0373 */ UNO_NAME_FOOTER_TEXT_RIGHT, -/* 0374 */ UNO_NAME_HEADER_BACK_COLOR, -/* 0375 */ UNO_NAME_HEADER_GRAPHIC, -/* 0376 */ UNO_NAME_HEADER_BACK_TRANSPARENT, -/* 0377 */ UNO_NAME_HEADER_LEFT_BORDER, -/* 0378 */ UNO_NAME_HEADER_RIGHT_BORDER, -/* 0379 */ UNO_NAME_HEADER_TOP_BORDER, -/* 0380 */ UNO_NAME_HEADER_BOTTOM_BORDER, -/* 0381 */ UNO_NAME_HEADER_BORDER_DISTANCE, -/* 0382 */ UNO_NAME_HEADER_SHADOW_FORMAT, -/* 0383 */ UNO_NAME_HEADER_BODY_DISTANCE, -/* 0384 */ UNO_NAME_HEADER_IS_DYNAMIC_HEIGHT, -/* 0385 */ UNO_NAME_HEADER_IS_SHARED, -/* 0386 */ UNO_NAME_HEADER_HEIGHT, -/* 0387 */ UNO_NAME_HEADER_IS_ON, -/* 0388 */ UNO_NAME_FOOTER_BACK_COLOR, -/* 0389 */ UNO_NAME_FOOTER_GRAPHIC, -/* 0390 */ UNO_NAME_FOOTER_BACK_TRANSPARENT, -/* 0391 */ UNO_NAME_FOOTER_LEFT_BORDER, -/* 0392 */ UNO_NAME_FOOTER_RIGHT_BORDER, -/* 0393 */ UNO_NAME_FOOTER_TOP_BORDER, -/* 0394 */ UNO_NAME_FOOTER_BOTTOM_BORDER, -/* 0395 */ UNO_NAME_FOOTER_BORDER_DISTANCE, -/* 0396 */ UNO_NAME_FOOTER_SHADOW_FORMAT, -/* 0397 */ UNO_NAME_FOOTER_BODY_DISTANCE, -/* 0398 */ UNO_NAME_FOOTER_IS_DYNAMIC_HEIGHT, -/* 0399 */ UNO_NAME_FOOTER_IS_SHARED, - -/* 0400 */ UNO_NAME_FOOTER_HEIGHT, -/* 0401 */ UNO_NAME_FOOTER_IS_ON, -/* 0402 */ UNO_NAME_OVERWRITE_STYLES, -/* 0403 */ UNO_NAME_LOAD_NUMBERING_STYLES, -/* 0404 */ UNO_NAME_LOAD_PAGE_STYLES, -/* 0405 */ UNO_NAME_LOAD_FRAME_STYLES, -/* 0406 */ UNO_NAME_LOAD_TEXT_STYLES, -/* 0407 */ UNO_NAME_FILE_NAME, -/* 0408 */ UNO_NAME_FILTER_NAME, -/* 0409 */ UNO_NAME_FILTER_OPTION, -/* 0410 */ UNO_NAME_PASSWORD, -/* 0411 */ UNO_NAME_COPY_COUNT, -/* 0412 */ UNO_NAME_COLLATE, -/* 0413 */ UNO_NAME_SORT, -/* 0414 */ UNO_NAME_PAGES, -/* 0415 */ UNO_NAME_FIRST_LINE_OFFSET, -/* 0416 */ UNO_NAME_SYMBOL_TEXT_DISTANCE, -/* 0417 */ UNO_NAME_USER_INDEX_NAME, -/* 0418 */ UNO_NAME_REVISION, -/* 0419 */ UNO_NAME_UNVISITED_CHAR_STYLE_NAME, -/* 0420 */ UNO_NAME_VISITED_CHAR_STYLE_NAME, -/* 0421 */ UNO_NAME_PARAGRAPH_COUNT, -/* 0422 */ UNO_NAME_WORD_COUNT, -/* 0423 */ UNO_NAME_WORD_SEPARATOR, -/* 0424 */ UNO_NAME_CHARACTER_COUNT, -/* 0425 */ UNO_NAME_ZOOM_VALUE, -/* 0426 */ UNO_NAME_ZOOM_TYPE, -/* 0427 */ UNO_NAME_CREATE_FROM_MARKS, -/* 0428 */ UNO_NAME_CREATE_FROM_OUTLINE, -/* 0429 */ UNO_NAME_PARAGRAPH_STYLE_NAMES, -/* 0430 */ UNO_NAME_CREATE_FROM_CHAPTER, -/* 0431 */ UNO_NAME_CREATE_FROM_LABELS, -/* 0432 */ UNO_NAME_USE_ALPHABETICAL_SEPARATORS, -/* 0433 */ UNO_NAME_USE_KEY_AS_ENTRY, -/* 0434 */ UNO_NAME_USE_COMBINED_ENTRIES, -/* 0435 */ UNO_NAME_IS_CASE_SENSITIVE, -/* 0436 */ UNO_NAME_USE_P_P, -/* 0437 */ UNO_NAME_USE_DASH, -/* 0438 */ UNO_NAME_USE_UPPER_CASE, -/* 0439 */ UNO_NAME_LABEL_CATEGORY, -/* 0440 */ UNO_NAME_LABEL_DISPLAY_TYPE, -/* 0441 */ UNO_NAME_USE_LEVEL_FROM_SOURCE, -/* 0442 */ UNO_NAME_LEVEL_FORMAT, -/* 0443 */ UNO_NAME_LEVEL_PARAGRAPH_STYLES, -/* 0444 */ UNO_NAME_RECALC_TAB_STOPS, -/* 0445 */ UNO_NAME_MAIN_ENTRY_CHARACTER_STYLE_NAME, -/* 0446 */ UNO_NAME_CREATE_FROM_TABLES, -/* 0447 */ UNO_NAME_CREATE_FROM_TEXT_FRAMES, -/* 0448 */ UNO_NAME_CREATE_FROM_GRAPHIC_OBJECTS, -/* 0449 */ UNO_NAME_CREATE_FROM_EMBEDDED_OBJECTS, -/* 0450 */ UNO_NAME_CREATE_FROM_STAR_MATH, -/* 0451 */ UNO_NAME_CREATE_FROM_STAR_CHART, -/* 0452 */ UNO_NAME_CREATE_FROM_STAR_CALC, -/* 0453 */ UNO_NAME_CREATE_FROM_STAR_DRAW, -/* 0454 */ UNO_NAME_CREATE_FROM_OTHER_EMBEDDED_OBJECTS, -/* 0455 */ UNO_NAME_INDEX_AUTO_MARK_FILE_U_R_L, -/* 0456 */ UNO_NAME_IS_COMMA_SEPARATED, -/* 0457 */ UNO_NAME_IS_RELATIVE_TABSTOPS, -/* 0458 */ UNO_NAME_CREATE_FROM_LEVEL_PARAGRAPH_STYLES, -/* 0459 */ UNO_NAME_SHOW_CHANGES, -/* 0460 */ UNO_NAME_RECORD_CHANGES, -/* 0461 */ UNO_LINK_DISPLAY_NAME, -/* 0462 */ UNO_LINK_DISPLAY_BITMAP, -/* 0463 */ UNO_NAME_HEADING_STYLE_NAME, -/* 0464 */ UNO_NAME_SHOW_ONLINE_LAYOUT, -/* 0465 */ UNO_NAME_USER_DEFINED_ATTRIBUTES, -/* 0466 */ UNO_NAME_TEXT_USER_DEFINED_ATTRIBUTES, -/* 0467 */ UNO_NAME_FILE_PATH, -/* 0468 */ UNO_NAME_PARA_CHAPTER_NUMBERING_LEVEL, -/* 0469 */ UNO_NAME_PARA_CONDITIONAL_STYLE_NAME, -/* 0470 */ UNO_NAME_CHAPTER_NUMBERING_LEVEL, -/* 0471 */ UNO_NAME_NUMBERING_SEPARATOR, -/* 0472 */ UNO_NAME_IS_CONTINUOUS_NUMBERING, -/* 0473 */ UNO_NAME_IS_AUTOMATIC, -/* 0474 */ UNO_NAME_IS_ABSOLUTE_MARGINS, -/* 0475 */ UNO_NAME_CATEGORY, -/* 0476 */ UNO_NAME_DEPENDENT_TEXT_FIELDS, -/* 0477 */ UNO_NAME_CURRENT_PRESENTATION, -/* 0478 */ UNO_NAME_ADJUST, -/* 0479 */ UNO_NAME_INSTANCE_NAME, -/* 0480 */ UNO_NAME_TEXT_PORTION_TYPE, -/* 0481 */ UNO_NAME_CONTROL_CHARACTER, -/* 0482 */ UNO_NAME_IS_COLLAPSED, -/* 0483 */ UNO_NAME_IS_START, -/* 0484 */ UNO_NAME_SEQUENCE_NUMBER, -/* 0485 */ UNO_NAME_REFERENCE_ID, -/* 0486 */ UNO_NAME_HEADER_LEFT_BORDER_DISTANCE, -/* 0487 */ UNO_NAME_HEADER_RIGHT_BORDER_DISTANCE, -/* 0488 */ UNO_NAME_HEADER_TOP_BORDER_DISTANCE, -/* 0489 */ UNO_NAME_HEADER_BOTTOM_BORDER_DISTANCE, -/* 0490 */ UNO_NAME_FOOTER_LEFT_BORDER_DISTANCE, -/* 0491 */ UNO_NAME_FOOTER_RIGHT_BORDER_DISTANCE, -/* 0492 */ UNO_NAME_FOOTER_TOP_BORDER_DISTANCE, -/* 0493 */ UNO_NAME_FOOTER_BOTTOM_BORDER_DISTANCE, -/* 0494 */ UNO_NAME_PARA_IS_NUMBERING_RESTART, -/* 0495 */ UNO_NAME_HIDE_FIELD_TIPS, -/* 0496 */ UNO_NAME_HEADER_USER_DEFINED_ATTRIBUTES, -/* 0497 */ UNO_NAME_FOOTER_USER_DEFINED_ATTRIBUTES, -/* 0498 */ UNO_NAME_PARA_SHADOW_FORMAT, -/* 0499 */ UNO_NAME_CONTOUR_POLY_POLYGON, - -/* 0500 */ UNO_NAME_IS_PIXEL_CONTOUR, -/* 0501 */ UNO_NAME_IS_AUTOMATIC_CONTOUR, -/* 0502 */ UNO_NAME_SEPARATOR_LINE_WIDTH, -/* 0503 */ UNO_NAME_SEPARATOR_LINE_COLOR, -/* 0504 */ UNO_NAME_SEPARATOR_LINE_RELATIVE_HEIGHT, -/* 0505 */ UNO_NAME_SEPARATOR_LINE_VERTIVAL_ALIGNMENT, -/* 0506 */ UNO_NAME_SEPARATOR_LINE_IS_ON, -/* 0507 */ UNO_NAME_IS_SKIP_HIDDEN_TEXT, -/* 0508 */ UNO_NAME_IS_SKIP_PROTECTED_TEXT, -/* 0509 */ UNO_NAME_DOCUMENT_INDEX_MARKS, -/* 0510 */ UNO_NAME_FOOTNOTE_IS_COLLECT_AT_TEXT_END, -/* 0511 */ UNO_NAME_FOOTNOTE_IS_RESTART_NUMBERING, -/* 0512 */ UNO_NAME_FOOTNOTE_RESTART_NUMBERING_AT, -/* 0513 */ UNO_NAME_FOOTNOTE_IS_OWN_NUMBERING, -/* 0514 */ UNO_NAME_FOOTNOTE_NUMBERING_TYPE, -/* 0515 */ UNO_NAME_FOOTNOTE_NUMBERING_PREFIX, -/* 0516 */ UNO_NAME_FOOTNOTE_NUMBERING_SUFFIX, -/* 0517 */ UNO_NAME_ENDNOTE_IS_COLLECT_AT_TEXT_END, -/* 0518 */ UNO_NAME_ENDNOTE_IS_RESTART_NUMBERING, -/* 0519 */ UNO_NAME_ENDNOTE_RESTART_NUMBERING_AT, -/* 0520 */ UNO_NAME_ENDNOTE_IS_OWN_NUMBERING, -/* 0521 */ UNO_NAME_ENDNOTE_NUMBERING_TYPE, -/* 0522 */ UNO_NAME_ENDNOTE_NUMBERING_PREFIX, -/* 0523 */ UNO_NAME_ENDNOTE_NUMBERING_SUFFIX, -/* 0524 */ UNO_NAME_BRACKET_BEFORE, -/* 0525 */ UNO_NAME_BRACKET_AFTER, -/* 0526 */ UNO_NAME_IS_NUMBER_ENTRIES, -/* 0527 */ UNO_NAME_IS_SORT_BY_POSITION, -/* 0528 */ UNO_NAME_SORT_KEYS, -/* 0529 */ UNO_NAME_IS_SORT_ASCENDING, -/* 0530 */ UNO_NAME_SORT_KEY, -/* 0531 */ UNO_NAME_FIELDS, -/* 0532 */ UNO_NAME_DATE_TIME_VALUE, -/* 0533 */ UNO_NAME_IS_ON, -/* 0534 */ UNO_NAME_Z_ORDER, -/* 0535 */ UNO_NAME_CONTENT_SECTION, -/* 0536 */ UNO_NAME_HEADER_SECTION, -/* 0537 */ UNO_NAME_PARA_IS_HANGING_PUNCTUATION, -/* 0538 */ UNO_NAME_PARA_IS_CHARACTER_DISTANCE, -/* 0539 */ UNO_NAME_PARA_IS_FORBIDDEN_RULES, -/* 0540 */ UNO_NAME_PARA_VERT_ALIGNMENT, -/* 0541 */ UNO_NAME_IS_MAIN_ENTRY, -/* 0542 */ UNO_NAME_GRAPHIC_ROTATION, -/* 0543 */ UNO_NAME_ADJUST_LUMINANCE, -/* 0544 */ UNO_NAME_ADJUST_CONTRAST, -/* 0545 */ UNO_NAME_ADJUST_RED, -/* 0546 */ UNO_NAME_ADJUST_GREEN, -/* 0547 */ UNO_NAME_ADJUST_BLUE, -/* 0548 */ UNO_NAME_GAMMA, -/* 0549 */ UNO_NAME_GRAPHIC_IS_INVERTED, -/* 0550 */ UNO_NAME_TRANSPARENCY, -/* 0551 */ UNO_NAME_GRAPHIC_COLOR_MODE, -/* 0552 */ UNO_NAME_REDLINE_AUTHOR, -/* 0553 */ UNO_NAME_REDLINE_DATE_TIME, -/* 0554 */ UNO_NAME_REDLINE_COMMENT, -/* 0555 */ UNO_NAME_REDLINE_TYPE, -/* 0556 */ UNO_NAME_REDLINE_SUCCESSOR_DATA, -/* 0557 */ UNO_NAME_REDLINE_IDENTIFIER, -/* 0558 */ UNO_NAME_IS_IN_HEADER_FOOTER, -/* 0559 */ UNO_NAME_START_REDLINE, -/* 0560 */ UNO_NAME_END_REDLINE, -/* 0561 */ UNO_NAME_REDLINE_START, -/* 0562 */ UNO_NAME_REDLINE_END, -/* 0563 */ UNO_NAME_REDLINE_TEXT, -/* 0564 */ UNO_NAME_REDLINE_DISPLAY_TYPE, -/* 0565 */ UNO_NAME_FORBIDDEN_CHARACTERS, -/* 0566 */ UNO_NAME_RUBY_BASE_TEXT, -/* 0567 */ UNO_NAME_RUBY_TEXT, -/* 0568 */ UNO_NAME_RUBY_ADJUST, -/* 0569 */ UNO_NAME_RUBY_CHAR_STYLE_NAME, -/* 0570 */ UNO_NAME_RUBY_IS_ABOVE, -/* 0571 */ UNO_NAME_FOOTNOTE_HEIGHT, -/* 0572 */ UNO_NAME_FOOTNOTE_LINE_WEIGHT, -/* 0573 */ UNO_NAME_FOOTNOTE_LINE_COLOR, -/* 0574 */ UNO_NAME_FOOTNOTE_LINE_RELATIVE_WIDTH, -/* 0575 */ UNO_NAME_FOOTNOTE_LINE_ADJUST, -/* 0576 */ UNO_NAME_FOOTNOTE_LINE_TEXT_DISTANCE, -/* 0577 */ UNO_NAME_FOOTNOTE_LINE_DISTANCE, -/* 0578 */ UNO_NAME_CHAR_ROTATION, -/* 0579 */ UNO_NAME_CHAR_ROTATION_IS_FIT_TO_LINE, -/* 0580 */ UNO_NAME_CHAR_SCALE_WIDTH, -/* 0581 */ UNO_NAME_TAB_STOP_DISTANCE, -/* 0582 */ UNO_NAME_IS_WIDTH_RELATIVE, -/* 0583 */ UNO_NAME_CHAR_RELIEF, -/* 0584 */ UNO_NAME_IS_HIDDEN, -/* 0585 */ UNO_NAME_IS_CONDITION_TRUE, -/* 0586 */ UNO_NAME_TWO_DIGIT_YEAR, -/* 0587 */ UNO_NAME_PROTECTION_KEY, -/* 0588 */ UNO_NAME_REDLINE_PROTECTION_KEY, -/* 0589 */ UNO_NAME_AUTOMATIC_DISTANCE, -/* 0590 */ UNO_NAME_AUTOMATIC_CONTROL_FOCUS, -/* 0591 */ UNO_NAME_APPLY_FORM_DESIGN_MODE, -/* 0592 */ UNO_NAME_LOCALE, -/* 0593 */ UNO_NAME_SORT_ALGORITHM, -/* 0594 */ UNO_NAME_FRAME_HEIGHT_ABSOLUTE, -/* 0596 */ UNO_NAME_FRAME_HEIGHT_PERCENT, -/* 0597 */ UNO_NAME_FRAME_ISAUTOMATIC_HEIGHT, -/* 0598 */ UNO_NAME_FRAME_WIDTH_ABSOLUTE, -/* 0599 */ UNO_NAME_FRAME_WIDTH_PERCENT, -/* 0600 */ UNO_NAME_PARA_STYLEHEADING, -/* 0601 */ UNO_NAME_PARA_STYLELEVEL1, -/* 0602 */ UNO_NAME_PARA_STYLELEVEL10, -/* 0603 */ UNO_NAME_PARA_STYLELEVEL2, -/* 0604 */ UNO_NAME_PARA_STYLELEVEL3, -/* 0605 */ UNO_NAME_PARA_STYLELEVEL4, -/* 0606 */ UNO_NAME_PARA_STYLELEVEL5, -/* 0607 */ UNO_NAME_PARA_STYLELEVEL6, -/* 0608 */ UNO_NAME_PARA_STYLELEVEL7, -/* 0609 */ UNO_NAME_PARA_STYLELEVEL8, -/* 0610 */ UNO_NAME_PARA_STYLELEVEL9, -/* 0611 */ UNO_NAME_PARA_STYLESEPARATOR, -/* 0612 */ UNO_NAME_MACRO_LIBRARY, -/* 0613 */ UNO_NAME_CELL_NAME, -/* 0614 */ UNO_NAME_PARA_USER_DEFINED_ATTRIBUTES, -/* 0615 */ UNO_NAME_MERGE_LAST_PARA, -/* 0616 */ UNO_NAME_WRITING_MODE, -/* 0617 */ UNO_NAME_GRID_COLOR, -/* 0618 */ UNO_NAME_GRID_LINES, -/* 0619 */ UNO_NAME_GRID_BASE_HEIGHT, -/* 0620 */ UNO_NAME_GRID_RUBY_HEIGHT, -/* 0621 */ UNO_NAME_GRID_MODE, -/* 0622 */ UNO_NAME_GRID_RUBY_BELOW, -/* 0623 */ UNO_NAME_GRID_PRINT, -/* 0624 */ UNO_NAME_GRID_DISPLAY, -/* 0625 */ UNO_NAME_SNAP_TO_GRID, -/* 0626 */ UNO_NAME_DONT_BALANCE_TEXT_COLUMNS, -/* 0627 */ UNO_NAME_IS_CURRENTLY_VISIBLE, -/* 0628 */ UNO_NAME_ANCHOR_POSITION, -/* 0629 */ UNO_NAME_TEXT_READING, -/* 0630 */ UNO_NAME_PRIMARY_KEY_READING, -/* 0631 */ UNO_NAME_SECONDARY_KEY_READING, -/* 0632 */ UNO_NAME_BACK_GRAPHIC_TRANSPARENCY, -/* 0633 */ UNO_NAME_BACK_COLOR_R_G_B, -/* 0634 */ UNO_NAME_BACK_COLOR_TRANSPARENCY, -/* 0635 */ UNO_NAME_HEADER_DYNAMIC_SPACING, -/* 0636 */ UNO_NAME_FOOTER_DYNAMIC_SPACING, -/* 0637 */ UNO_NAME_BASIC_LIBRARIES, -/* 0638 */ UNO_NAME_IS_FIXED_LANGUAGE, -/* 0639 */ UNO_NAME_SELECTION, -/* 0640 */ UNO_NAME_RESULT_SET, -/* 0641 */ UNO_NAME_CONNECTION, -/* 0642 */ UNO_NAME_MODEL, -/* 0643 */ UNO_NAME_DATA_SOURCE_NAME, -/* 0644 */ UNO_NAME_DATA_COMMAND, -/* 0645 */ UNO_NAME_FILTER, -/* 0646 */ UNO_NAME_DOCUMENT_URL, -/* 0647 */ UNO_NAME_OUTPUT_URL, -/* 0648 */ UNO_NAME_OUTPUT_TYPE, -/* 0649 */ UNO_NAME_ESCAPE_PROCESSING, -/* 0650 */ UNO_NAME_SINGLE_PRINT_JOBS, -/* 0651 */ UNO_NAME_FILE_NAME_FROM_COLUMN, -/* 0652 */ UNO_NAME_FILE_NAME_PREFIX, -/* 0653 */ UNO_NAME_CHAR_STYLE_NAMES, -/* 0654 */ UNO_NAME_DAD_COMMAND, /* DAD = DataAccessDescriptor (see com.sun.star.sdb.DataAccessDescriptor) */ -/* 0655 */ UNO_NAME_DAD_COMMAND_TYPE, -/* 0656 */ UNO_NAME_CLSID, -/* 0657 */ UNO_NAME_COMPONENT, -/* 0658 */ UNO_NAME_SECT_LEFT_MARGIN, -/* 0659 */ UNO_NAME_SECT_RIGHT_MARGIN, -/* 0660 */ UNO_NAME_PARA_IS_CONNECT_BORDER, -/* 0661 */ UNO_NAME_ITEMS, -/* 0662 */ UNO_NAME_SELITEM, -/* 0663 */ UNO_NAME_IS_SPLIT_ALLOWED, -/* 0664 */ UNO_NAME_CHAR_HIDDEN, - -/* 0665 */ UNO_NAME_IS_FOLLOWING_TEXT_FLOW, -/* 0666 */ UNO_NAME_WIDTH_TYPE, -/* 0667 */ UNO_NAME_SCRIPT_URL, -/* 0668 */ UNO_NAME_RUNTIME_UID, -/* 0669 */ UNO_NAME_COLLAPSING_BORDERS, - -/* 0670 */ UNO_NAME_WRAP_INFLUENCE_ON_POSITION, -/* 0671 */ UNO_NAME_DATA_BASE_URL, -/* 0672 */ UNO_NAME_DATA_BASE_RESOURCE, - -/* 0673 */ UNO_NAME_TRANSFORMATION_IN_HORI_L2R, -/* 0674 */ UNO_NAME_POSITION_LAYOUT_DIR, - -/* 0675 */ UNO_NAME_NUMBERING_IS_OUTLINE, - -/* 0677 */ UNO_NAME_STARTPOSITION_IN_HORI_L2R, -/* 0678 */ UNO_NAME_ENDPOSITION_IN_HORI_L2R, - -/* 0679 */ UNO_NAME_SUBJECT, -/* 0680 */ UNO_NAME_ADDRESS_FROM_COLUMN, -/* 0681 */ UNO_NAME_SEND_AS_HTML, -/* 0682 */ UNO_NAME_SEND_AS_ATTACHMENT, -/* 0683 */ UNO_NAME_MAIL_BODY, -/* 0684 */ UNO_NAME_ATTACHMENT_NAME, -/* 0685 */ UNO_NAME_ATTACHMENT_FILTER, -/* 0686 */ UNO_NAME_PRINT_OPTIONS, -/* 0687 */ UNO_NAME_SAVE_AS_SINGLE_FILE, -/* 0688 */ UNO_NAME_SAVE_FILTER, -/* 0689 */ UNO_NAME_COPIES_TO, -/* 0690 */ UNO_NAME_BLIND_COPIES_TO, -/* 0691 */ UNO_NAME_IN_SERVER_PASSWORD, -/* 0692 */ UNO_NAME_OUT_SERVER_PASSWORD, - -/* 0693 */ UNO_NAME_SAVE_FILTER_OPTIONS, -/* 0694 */ UNO_NAME_SAVE_FILTER_DATA, -/* 0695 */ UNO_NAME_LOCK_UPDATES, - -/* 0696 */ UNO_NAME_PAGE_COUNT, -/* 0697 */ UNO_NAME_LINE_COUNT, -/* 0698 */ UNO_NAME_IS_CONSTANT_SPELLCHECK, -/* 0699 */ UNO_NAME_IS_HIDE_SPELL_MARKS, // deprecated #i91949 - -/* 0700 */ UNO_NAME_IS_FIELD_USED, -/* 0701 */ UNO_NAME_IS_FIELD_DISPLAYED, -/* 0702 */ UNO_NAME_BUILDID, -/* 0703 */ UNO_NAME_PARA_STYLE_CONDITIONS, - -/* 0704 */ UNO_NAME_PRINT_EMPTY_PAGES, - -/* 0705 */ UNO_NAME_ROLE, - -/* 0706 */ UNO_NAME_FIELD_CODE, -/* 0707 */ UNO_NAME_HAS_VALID_SIGNATURES, - -/* 0708 */ UNO_NAME_CHAR_AUTO_STYLE_NAME, -/* 0709 */ UNO_NAME_PARA_AUTO_STYLE_NAME, - -/* 0710 */ UNO_NAME_APPLY_WORKAROUND_FOR_B6375613, -/* 0711 */ UNO_NAME_LAYOUT_SIZE, - -/* 0712 */ UNO_NAME_HELP, -/* 0713 */ UNO_NAME_TOOLTIP, - -/* 0714 */ UNO_NAME_DIALOG_LIBRARIES, -/* 0715 */ UNO_NAME_HEADER_ROW_COUNT, -/* 0716 */ UNO_NAME_INPUT, -/* 0717 */ UNO_NAME_ROW_SPAN, - -/* 0718 */ UNO_NAME_POSITION_AND_SPACE_MODE, -/* 0719 */ UNO_NAME_LABEL_FOLLOWED_BY, -/* 0720 */ UNO_NAME_LISTTAB_STOP_POSITION, -/* 0721 */ UNO_NAME_FIRST_LINE_INDENT, -/* 0722 */ UNO_NAME_INDENT_AT, - -/* 0723 */ UNO_NAME_CHAPTER_LEVEL, - -/* 0724 */ UNO_NAME_GRID_BASE_WIDTH, -/* 0725 */ UNO_NAME_GRID_SNAP_TO_CHARS, -/* 0726 */ UNO_NAME_GRID_STANDARD_PAGE_MODE, -/* 0727 */ UNO_NAME_TABLE_BORDER_DISTANCES, - -/* 0728 */ UNO_NAME_LIST_ID, -/* 0729 */ UNO_NAME_DEFAULT_LIST_ID, - -/* 0730 */ UNO_NAME_STREAM_NAME, - -/* 0731 */ UNO_NAME_PARA_CONTINUEING_PREVIOUS_SUB_TREE, -/* 0732 */ UNO_NAME_PARA_LIST_LABEL_STRING, - -/* 0733 */ UNO_NAME_CHAR_OVERLINE, -/* 0734 */ UNO_NAME_CHAR_OVERLINE_COLOR, -/* 0735 */ UNO_NAME_CHAR_OVERLINE_HAS_COLOR, -/* 0736 */ UNO_NAME_OUTLINE_LEVEL, - -/* 0737 */ UNO_NAME_DESCRIPTION, -/* 0740 */ UNO_NAME_EMBEDDED_OBJECT, - -// FIXME: these number comments cannot be right post merge - fix them up ... -/* 0738 */ UNO_NAME_META, -/* 0739 */ UNO_NAME_IS_TEMPLATE, -/* 0740 */ UNO_NAME_VBA_DOCOBJ, -/* 0741 */ UNO_NAME_NESTED_TEXT_CONTENT, -/* 0742 */ UNO_NAME_SEPARATOR_LINE_STYLE, -/* 0743 */ UNO_NAME_FOOTNOTE_LINE_STYLE, -/* 0744 */ SW_PROPNAME_END -}; - -struct SwPropNameLen -{ - const char* pName; - sal_uInt16 nNameLen; - operator const char*() const { return pName; } -}; - -typedef const SwPropNameLen SwPropNameTab[ SW_PROPNAME_END - SW_PROPNAME_BEGIN ]; -extern const SwPropNameTab aPropNameTab; - -// !!! function must not(!) be inline because it is called via the below !!! -// !!! listed macros from the swui DLL and that can not access the !!! -// !!! array aPropNameTab which is located in a different DLL. !!! -SW_DLLPUBLIC const SwPropNameLen& GetPropName( sal_uInt16 nId ); -SW_DLLPUBLIC const SwPropNameLen& SwGetPropName( sal_uInt16 nId ); - -#define SW_PROP_NAME(nId) \ - GetPropName( nId ).pName, GetPropName( nId ).nNameLen - -#define SW_PRPNM_EQLASCI(nId) \ - GetPropName( nId ).pName, 0, GetPropName( nId ).nNameLen - -#define SW_PROP_NAME_STR(nId) \ - GetPropName( nId ).pName - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx deleted file mode 100644 index bf1b22ed3f..0000000000 --- a/sw/inc/unoredline.hxx +++ /dev/null @@ -1,151 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOREDLINE_HXX -#define _UNOREDLINE_HXX - -#include <unoport.hxx> -#include <unotext.hxx> - - -class SwRedline; - -/** - * SwXRedlineText provides an XText which may be used to write - * directly into a redline node. It got implemented to enable XML - * import of redlines and should not be used directly via the API. - */ -class SwXRedlineText : - public SwXText, - public cppu::OWeakObject, - public ::com::sun::star::container::XEnumerationAccess -{ - SwNodeIndex aNodeIndex; - virtual const SwStartNode *GetStartNode() const; - -public: - SwXRedlineText(SwDoc* pDoc, SwNodeIndex aNodeIndex); - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw(){OWeakObject::acquire();} - virtual void SAL_CALL release( ) throw(){OWeakObject::release();} - - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - //XText - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); - - //XEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XElementAccess (via XEnumerationAccess) - 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); -}; - -class SwXRedlinePortion : public SwXTextPortion -{ - const SwRedline* pRedline; - - void Validate() throw( ::com::sun::star::uno::RuntimeException ); - - using SwXTextPortion::GetPropertyValue; - -public: - SwXRedlinePortion( const SwRedline* pRed, - const SwUnoCrsr* pPortionCrsr, - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent, - sal_Bool bIsStart); - - ~SwXRedlinePortion(); - - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - //XPropertySet - 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); - - static ::com::sun::star::uno::Any GetPropertyValue( const ::rtl::OUString& PropertyName, const SwRedline& rRedline ) throw(); - static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > CreateRedlineProperties( const SwRedline& rRedline, sal_Bool bIsStart ) throw(); - -}; - -typedef -cppu::WeakImplHelper1 -< - ::com::sun::star::container::XEnumerationAccess -> -SwXRedlineBaseClass; -class SwXRedline : - public SwXRedlineBaseClass, - public SwXText, - public SwClient -{ - SwDoc* pDoc; - SwRedline* pRedline; -public: - SwXRedline(SwRedline& rRedline, SwDoc& rDoc); - ~SwXRedline(); - - TYPEINFO(); - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw(){OWeakObject::acquire();} - virtual void SAL_CALL release( ) throw(){OWeakObject::release();} - - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - //XText - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) 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); - - //XEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) 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); - - const SwRedline* GetRedline() const {return pRedline;} -protected: - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx deleted file mode 100644 index 16a2d5832d..0000000000 --- a/sw/inc/unoredlines.hxx +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOREDLINES_HXX -#define _UNOREDLINES_HXX - -#include <unocoll.hxx> -#include <unobaseclass.hxx> -#include <com/sun/star/container/XEnumerationAccess.hpp> - -class SwRedline; -namespace com{ namespace sun{ namespace star{ - namespace beans{ - class XPropertySet; - } -}}} -typedef -cppu::WeakImplHelper3 -< - ::com::sun::star::container::XIndexAccess, - ::com::sun::star::container::XEnumerationAccess, - ::com::sun::star::lang::XServiceInfo -> -SwRedlinesBaseClass; -class SwXRedlines : public SwRedlinesBaseClass, - public SwUnoCollection -{ -protected: - virtual ~SwXRedlines(); -public: - SwXRedlines(SwDoc* pDoc); - - - //XIndexAccess - virtual sal_Int32 SAL_CALL getCount( ) 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 ); - - //XEnumerationAccess - was: XParagraphEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) 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 sal_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::beans::XPropertySet* GetObject( SwRedline& rRedline, SwDoc& rDoc ); -}; - -class SwXRedlineEnumeration - : public SwSimpleEnumeration_Base - , public SwClient -{ - SwDoc* pDoc; - sal_uInt16 nCurrentIndex; -protected: - virtual ~SwXRedlineEnumeration(); -public: - SwXRedlineEnumeration(SwDoc& rDoc); - - - //XEnumeration - virtual sal_Bool SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); -protected: - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unorefmark.hxx b/sw/inc/unorefmark.hxx deleted file mode 100644 index b30de27c0f..0000000000 --- a/sw/inc/unorefmark.hxx +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNOREFMARK_HXX -#define SW_UNOREFMARK_HXX - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/container/XNamed.hpp> -#include <com/sun/star/text/XTextContent.hpp> - -#include <cppuhelper/implbase5.hxx> - -#include <unobaseclass.hxx> - - -class SwDoc; -class SwModify; -class SwFmtRefMark; - -typedef ::cppu::WeakImplHelper5 -< ::com::sun::star::lang::XUnoTunnel -, ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::beans::XPropertySet -, ::com::sun::star::container::XNamed -, ::com::sun::star::text::XTextContent -> SwXReferenceMark_Base; - -class SwXReferenceMark - : public SwXReferenceMark_Base -{ - -private: - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - virtual ~SwXReferenceMark(); - -public: - - SwXReferenceMark(SwDoc *const pDoc, const SwFmtRefMark *const pMark); - - static SwXReferenceMark * - CreateXReferenceMark(SwDoc & rDoc, SwFmtRefMark const& rMarkFmt); - /// may return 0 - static SwXReferenceMark * - GetReferenceMark(SwModify const& rUnoCB, SwFmtRefMark const& rMarkFmt); - - 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 >& rIdentifier) - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException); - - // XComponent - virtual void SAL_CALL dispose() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - 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& rPropertyName, - const ::com::sun::star::uno::Any& rValue) - 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& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( - const ::rtl::OUString& rPropertyName, - 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& rPropertyName, - 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 addVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - // XNamed - virtual ::rtl::OUString SAL_CALL getName() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setName(const ::rtl::OUString& rName) - 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); - -}; - -#endif // SW_UNOREFMARK_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unosection.hxx b/sw/inc/unosection.hxx deleted file mode 100644 index 039f50475d..0000000000 --- a/sw/inc/unosection.hxx +++ /dev/null @@ -1,253 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNOSECTION_HXX -#define SW_UNOSECTION_HXX - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/beans/XPropertyState.hpp> -#include <com/sun/star/beans/XMultiPropertySet.hpp> -#include <com/sun/star/container/XNamed.hpp> -#include <com/sun/star/text/XTextContent.hpp> -#include <com/sun/star/text/XTextSection.hpp> - -#include <cppuhelper/implbase7.hxx> - -#include <sfx2/Metadatable.hxx> - -#include <unobaseclass.hxx> - - -class SwSectionFmt; - - - -struct SwTextSectionProperties_Impl; - -typedef ::cppu::ImplInheritanceHelper7 -< ::sfx2::MetadatableMixin -, ::com::sun::star::lang::XUnoTunnel -, ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::beans::XPropertySet -, ::com::sun::star::beans::XPropertyState -, ::com::sun::star::beans::XMultiPropertySet -, ::com::sun::star::container::XNamed -, ::com::sun::star::text::XTextSection -> SwXTextSection_Base; - -class SwXTextSection - : public SwXTextSection_Base -{ - -private: - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - SwXTextSection(SwSectionFmt *const pFmt, const bool bIndexHeader = false); - - virtual ~SwXTextSection(); - -public: - - SwSectionFmt* GetFmt() const; - - static ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextSection > - CreateXTextSection(SwSectionFmt *const pFmt = 0, - const bool bIndexHeader = false); - - // MetadatableMixin - virtual ::sfx2::Metadatable* GetCoreObject(); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > - GetModel(); - - 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 >& rIdentifier) - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException); - - // XComponent - virtual void SAL_CALL dispose() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener > & xListener) - 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& rPropertyName, - const ::com::sun::star::uno::Any& rValue) - 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& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( - const ::rtl::OUString& rPropertyName, - 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& rPropertyName, - 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 addVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - // XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL - getPropertyState(const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyState > SAL_CALL - getPropertyStates( - const ::com::sun::star::uno::Sequence< - ::rtl::OUString >& rPropertyNames) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( - const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( - const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - // XMultiPropertySet - virtual void SAL_CALL setPropertyValues( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames, - const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Any >& rValues) - throw (::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::Sequence< ::com::sun::star::uno::Any > - SAL_CALL getPropertyValues( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertiesChangeListener( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertiesChangeListener >& xListener) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertiesChangeListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertiesChangeListener >& xListener) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL firePropertiesChangeEvent( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertiesChangeListener >& xListener) - throw (::com::sun::star::uno::RuntimeException); - - // XNamed - virtual ::rtl::OUString SAL_CALL getName() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setName(const ::rtl::OUString& rName) - 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); - - // XTextSection - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextSection > SAL_CALL - getParentSection() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextSection > > SAL_CALL - getChildSections() - throw (::com::sun::star::uno::RuntimeException); - -}; - -#endif // SW_UNOSECTION_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx deleted file mode 100644 index 246bd35ec4..0000000000 --- a/sw/inc/unosett.hxx +++ /dev/null @@ -1,312 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOSETT_HXX -#define _UNOSETT_HXX - -#include <swtypes.hxx> -#include <calbck.hxx> -#include <com/sun/star/text/XTextColumns.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/container/XIndexReplace.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/container/XNamed.hpp> -#include <cppuhelper/implbase2.hxx> -#include <cppuhelper/implbase4.hxx> -#include <cppuhelper/implbase5.hxx> -#include <tools/string.hxx> -#include <svl/itemprop.hxx> - -class SwDoc; -class SwFmtCol; -class SwDocShell; -class SwNumRule; - -class SwXFootnoteProperties : public cppu::WeakAggImplHelper2 -< - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XServiceInfo -> -{ - SwDoc* pDoc; - const SfxItemPropertySet* m_pPropertySet; -protected: - virtual ~SwXFootnoteProperties(); -public: - SwXFootnoteProperties(SwDoc* pDoc); - - - //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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - void Invalidate() {pDoc = 0;} -}; - -class SwXEndnoteProperties : public cppu::WeakAggImplHelper2 -< - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XServiceInfo -> -{ - SwDoc* pDoc; - const SfxItemPropertySet* m_pPropertySet; -protected: - virtual ~SwXEndnoteProperties(); -public: - SwXEndnoteProperties(SwDoc* pDoc); - - - //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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - void Invalidate() {pDoc = 0;} -}; - -class SwXLineNumberingProperties : public cppu::WeakAggImplHelper2 -< - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XServiceInfo -> -{ - SwDoc* pDoc; - const SfxItemPropertySet* m_pPropertySet; -protected: - virtual ~SwXLineNumberingProperties(); -public: - SwXLineNumberingProperties(SwDoc* pDoc); - - - //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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - void Invalidate() {pDoc = 0;} -}; - -class SwXNumberingRules : public cppu::WeakAggImplHelper5 -< - ::com::sun::star::container::XIndexReplace, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::container::XNamed, - ::com::sun::star::lang::XServiceInfo ->, - public SwClient -{ - String sNewCharStyleNames[MAXLEVEL]; - String sNewBulletFontNames[MAXLEVEL]; - String sCreatedNumRuleName; //connects to a numbering in SwDoc - SwDoc* pDoc; // Only needed for registration. - SwDocShell* pDocShell; // Only if used as chapter numbering. - SwNumRule* pNumRule; - const SfxItemPropertySet* m_pPropertySet; - sal_Bool bOwnNumRuleCreated; - static String sInvalidStyle; -protected: - virtual ~SwXNumberingRules(); - - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - SwXNumberingRules(SwDocShell& rDocSh); // chapter numbering - SwXNumberingRules(const SwNumRule& rRule); // NumRule for paragraphs, numbering styles - SwXNumberingRules(SwDoc& rDoc); //create a new instance - - - static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); - - - //XIndexReplace - virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XIndexAccess - virtual sal_Int32 SAL_CALL getCount( ) 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 ); - - //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); - - //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); - - //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 ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue> - GetNumberingRuleByIndex(const SwNumRule& rNumRule, sal_Int32 nIndex)const; - void SetNumberingRuleByIndex(SwNumRule& rNumRule, - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties, sal_Int32 nIndex) - throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException ); - - const String* GetNewCharStyleNames() const {return sNewCharStyleNames;} - const String* GetBulletFontNames() const {return sNewBulletFontNames;} - const SwNumRule* GetNumRule() {return pNumRule;} - - static const String& GetInvalidStyle(); - void Invalidate() {pDocShell = 0;} - const String& GetCreatedNumRuleName() const{return sCreatedNumRuleName; } -}; - -class SwXChapterNumbering : public SwXNumberingRules -{ -protected: - virtual ~SwXChapterNumbering(); -public: - SwXChapterNumbering(SwDocShell& rDocSh); - - - void Invalidate() {SwXNumberingRules::Invalidate();} - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - -}; - -class SwXTextColumns : public cppu::WeakAggImplHelper4 -< - - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::text::XTextColumns, - ::com::sun::star::lang::XServiceInfo -> -{ - sal_Int32 nReference; - ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextColumn> aTextColumns; - sal_Bool bIsAutomaticWidth; - sal_Int32 nAutoDistance; - - const SfxItemPropertySet* m_pPropSet; - - //separator line - sal_Int32 nSepLineWidth; - sal_Int32 nSepLineColor; - sal_Int8 nSepLineHeightRelative; - sal_Int8 nSepLineVertAlign;//style::VerticalAlignment - sal_Bool bSepLineIsOn; - sal_Int8 nSepLineStyle; - -protected: - virtual ~SwXTextColumns(); -public: - SwXTextColumns(sal_uInt16 nColCount); - SwXTextColumns(const SwFmtCol& rFmtCol); - - - - 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); - - //XTextColumns - virtual sal_Int32 SAL_CALL getReferenceValue( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Int16 SAL_CALL getColumnCount( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setColumnCount( sal_Int16 nColumns ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextColumn > SAL_CALL getColumns( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setColumns( const ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextColumn >& Columns ) 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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - sal_Int32 GetSepLineWidth() const {return nSepLineWidth;} - sal_Int32 GetSepLineColor() const {return nSepLineColor;} - sal_Int8 GetSepLineHeightRelative() const {return nSepLineHeightRelative;} - sal_Int8 GetSepLineVertAlign() const {return nSepLineVertAlign;} - sal_Bool GetSepLineIsOn() const {return bSepLineIsOn;} - sal_Int8 GetSepLineStyle() const {return nSepLineStyle;} - - sal_Bool IsAutomaticWidth() const {return bIsAutomaticWidth;} -}; -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unosrch.hxx b/sw/inc/unosrch.hxx deleted file mode 100644 index a8ce81f1f0..0000000000 --- a/sw/inc/unosrch.hxx +++ /dev/null @@ -1,134 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOSRCH_HXX -#define _UNOSRCH_HXX - -#include <com/sun/star/util/XPropertyReplace.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <cppuhelper/implbase3.hxx> // helper for implementations -#include <tools/string.hxx> - -/****************************************************************************** - * - ******************************************************************************/ -class SfxItemPropertySet; -class SwXTextDocument; -class SwSearchProperties_Impl; -class SfxItemSet; - -namespace com{namespace sun{namespace star{namespace util{ - struct SearchOptions; -}}}} - - -class SwXTextSearch : public cppu::WeakImplHelper3 -< - ::com::sun::star::util::XPropertyReplace, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::lang::XUnoTunnel -> -{ - friend class SwXTextDocument; - - String sSearchText; - String sReplaceText; - - SwSearchProperties_Impl* pSearchProperties; - SwSearchProperties_Impl* pReplaceProperties; - - - const SfxItemPropertySet* m_pPropSet; - sal_Bool bAll : 1; - sal_Bool bWord : 1; - sal_Bool bBack : 1; - sal_Bool bExpr : 1; - sal_Bool bCase : 1; - sal_Bool bStyles:1; - sal_Bool bSimilarity : 1; - sal_Bool bLevRelax :1; - sal_Int16 nLevExchange; - sal_Int16 nLevAdd; - sal_Int16 nLevRemove; - - sal_Bool bIsValueSearch :1; -protected: - virtual ~SwXTextSearch(); -public: - SwXTextSearch(); - - - - 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); - - //XSearchDescriptor - virtual ::rtl::OUString SAL_CALL getSearchString( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setSearchString( const ::rtl::OUString& aString ) throw(::com::sun::star::uno::RuntimeException); - - //XReplaceDescriptor - virtual ::rtl::OUString SAL_CALL getReplaceString(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setReplaceString(const ::rtl::OUString& aReplaceString) 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); - - //XPropertyReplace - virtual sal_Bool SAL_CALL getValueSearch(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setValueSearch(sal_Bool ValueSearch_) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > SAL_CALL getSearchAttributes(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setSearchAttributes(const ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& aSearchAttribs) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > SAL_CALL getReplaceAttributes(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setReplaceAttributes(const ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& aSearchAttribs) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - void FillSearchItemSet(SfxItemSet& rSet) const; - void FillReplaceItemSet(SfxItemSet& rSet) const; - - sal_Bool HasSearchAttributes() const; - sal_Bool HasReplaceAttributes() const; - - void FillSearchOptions( ::com::sun::star::util::SearchOptions& - rSearchOpt ) const; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx deleted file mode 100644 index 56444d719b..0000000000 --- a/sw/inc/unostyle.hxx +++ /dev/null @@ -1,449 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOSTYLE_HXX -#define _UNOSTYLE_HXX - -#include <boost/shared_ptr.hpp> -#include <svl/style.hxx> -#include <svl/lstner.hxx> -#include <unocoll.hxx> -#include <unomap.hxx> -#include <com/sun/star/style/XStyle.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/style/XStyleLoader.hpp> -#include <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/beans/XMultiPropertySet.hpp> -#include <com/sun/star/beans/XPropertyState.hpp> -#include <com/sun/star/beans/XMultiPropertyStates.hpp> -#include <cppuhelper/implbase7.hxx> -#include <com/sun/star/document/XEventsSupplier.hpp> -#include <calbck.hxx> - -#include <com/sun/star/style/XAutoStyleFamily.hpp> -#include <com/sun/star/style/XAutoStyles.hpp> -#include <com/sun/star/style/XAutoStyle.hpp> - -#include <istyleaccess.hxx> - -class SwDocShell; -class SfxItemPropertySet; -class SwXStyle; -class SwStyleProperties_Impl; -class SwAutoStylesEnumImpl; -class IStyleAccess; -class SfxItemSet; -typedef boost::shared_ptr<SfxItemSet> SfxItemSet_Pointer_t; - -/****************************************************************************** - * - ******************************************************************************/ - -class SwXStyleFamilies : public cppu::WeakImplHelper4 -< - ::com::sun::star::container::XIndexAccess, - ::com::sun::star::container::XNameAccess, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::style::XStyleLoader ->, - public SwUnoCollection -{ - SwDocShell* pDocShell; - - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxCharStyles; - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxParaStyles; - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxFrameStyles; - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxPageStyles; - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxNumberingStyles; -protected: - virtual ~SwXStyleFamilies(); -public: - SwXStyleFamilies(SwDocShell& rDocShell); - - //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 ); - - //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 ); - - //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); - - //XStyleLoader - virtual void SAL_CALL loadStylesFromURL(const rtl::OUString& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aOptions) throw( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getStyleLoaderOptions(void) throw( ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); -}; - -class SwXStyleFamily : public cppu::WeakImplHelper4 -< - ::com::sun::star::container::XNameContainer, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::container::XIndexAccess, - ::com::sun::star::beans::XPropertySet ->, - public SfxListener -{ - SfxStyleFamily eFamily; - SfxStyleSheetBasePool* pBasePool; - SwDocShell* pDocShell; - - SwXStyle* _FindStyle(const String& rStyleName) const; -public: - SwXStyleFamily(SwDocShell* pDocShell, sal_uInt16 nFamily); - ~SwXStyleFamily(); - - //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 ); - - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL SAL_CALL hasElements( ) 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 ); - - //XNameContainer - virtual void SAL_CALL insertByName(const rtl::OUString& Name, const ::com::sun::star::uno::Any& Element) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL replaceByName(const rtl::OUString& Name, const ::com::sun::star::uno::Any& Element) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::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); - - //SfxListener - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); -}; - -class SwXStyle : public cppu::WeakImplHelper7 -< - ::com::sun::star::style::XStyle, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::beans::XMultiPropertySet, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::beans::XPropertyState, - ::com::sun::star::beans::XMultiPropertyStates ->, - public SfxListener, - public SwClient -{ - friend class SwXStyleFamily; - SwDoc* m_pDoc; - String sStyleName; - SfxStyleSheetBasePool* pBasePool; - SfxStyleFamily eFamily; // for Notify - - sal_Bool bIsDescriptor : 1; - sal_Bool bIsConditional : 1; - String sParentStyleName; - SwStyleProperties_Impl* pPropImpl; - - void ApplyDescriptorProperties(); -protected: - void Invalidate(); - - const SfxStyleSheetBasePool* GetBasePool() const {return pBasePool;} - SfxStyleSheetBasePool* GetBasePool() {return pBasePool;} - - void SetStyleName(const String& rSet){ sStyleName = rSet;} - SwStyleProperties_Impl* GetPropImpl(){return pPropImpl;} - com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxStyleData; - com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxStyleFamily; - - 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); - - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); -public: - SwXStyle(SwDoc* pDoc, SfxStyleFamily eFam = SFX_STYLE_FAMILY_PARA, sal_Bool bConditional = sal_False); - SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam, - SwDoc* pDoc, - const String& rStyleName); - - ~SwXStyle(); - - TYPEINFO(); - - 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); - - //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 ); - - //XStyle - virtual sal_Bool SAL_CALL isUserDefined(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL isInUse(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual rtl::OUString SAL_CALL getParentStyle(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setParentStyle(const rtl::OUString& aParentStyle) throw( ::com::sun::star::container::NoSuchElementException, ::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); - - //XMultiPropertySet - virtual void SAL_CALL setPropertyValues( 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::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); - - //XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XMultiPropertyStates - virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( 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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - //SfxListener - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - - const String& GetStyleName() const { return sStyleName;} - SfxStyleFamily GetFamily() const {return eFamily;} - - sal_Bool IsDescriptor() const {return bIsDescriptor;} - sal_Bool IsConditional() const { return bIsConditional;} - const String& GetParentStyleName() const { return sParentStyleName;} - void SetDoc(SwDoc* pDc, SfxStyleSheetBasePool* pPool) - { - bIsDescriptor = sal_False; m_pDoc = pDc; - pBasePool = pPool; - StartListening(*pBasePool); - } - SwDoc* GetDoc() const { return m_pDoc; } -}; - -class SwXFrameStyle : public SwXStyle, - public com::sun::star::document::XEventsSupplier -{ -public: - SwXFrameStyle(SfxStyleSheetBasePool& rPool, - SwDoc* pDoc, - const String& rStyleName) : - SwXStyle(rPool, SFX_STYLE_FAMILY_FRAME, pDoc, rStyleName){} - SwXFrameStyle( SwDoc *pDoc ); - ~SwXFrameStyle(); - - virtual void SAL_CALL acquire( ) throw(){SwXStyle::acquire();} - virtual void SAL_CALL release( ) throw(){SwXStyle::release();} - - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) 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::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException); - - friend class SwFrameStyleEventDescriptor; -}; - -class SwXPageStyle : public SwXStyle -{ - SwDocShell* pDocShell; - -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); - -public: - SwXPageStyle(SfxStyleSheetBasePool& rPool, SwDocShell* pDocSh, SfxStyleFamily eFam, - const String& rStyleName); - SwXPageStyle(SwDocShell* pDocSh); - ~SwXPageStyle(); - - 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 setPropertyValues( 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::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException); - -}; - -// access to all automatic style families -class SwXAutoStyles : - public cppu::WeakImplHelper1< ::com::sun::star::style::XAutoStyles >, - public SwUnoCollection -{ - SwDocShell *pDocShell; - ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyleFamily > xAutoCharStyles; - ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyleFamily > xAutoRubyStyles; - ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyleFamily > xAutoParaStyles; - ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyleFamily > xAutoNotxtStyles; - virtual ~SwXAutoStyles(); - -public: - SwXAutoStyles(SwDocShell& rDocShell); - - //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 ); - - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL SAL_CALL hasElements( ) 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 ); - -}; - -// access to a family of automatic styles (character or paragraph or ...) -class SwXAutoStyleFamily : public cppu::WeakImplHelper1< com::sun::star::style::XAutoStyleFamily >, - public SwClient -{ - SwDocShell *pDocShell; - IStyleAccess::SwAutoStyleFamily eFamily; - -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - SwXAutoStyleFamily(SwDocShell* pDocShell, IStyleAccess::SwAutoStyleFamily eFamily); - virtual ~SwXAutoStyleFamily(); - - //XAutoStyleFamily - virtual ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyle > SAL_CALL insertStyle( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Values ) throw (::com::sun::star::uno::RuntimeException); - - //XEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration( ) throw (::com::sun::star::uno::RuntimeException); - - //XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException); - -}; -class SwXAutoStylesEnumerator : public cppu::WeakImplHelper1< ::com::sun::star::container::XEnumeration >, - public SwClient -{ - SwAutoStylesEnumImpl *pImpl; -public: - SwXAutoStylesEnumerator( SwDoc* pDoc, IStyleAccess::SwAutoStyleFamily eFam ); - virtual ~SwXAutoStylesEnumerator(); - - //XEnumeration - virtual sal_Bool SAL_CALL hasMoreElements( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL nextElement( ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); -}; - - -// an automatic style -class SwXAutoStyle : public cppu::WeakImplHelper3 -< - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::beans::XPropertyState, - ::com::sun::star::style::XAutoStyle ->, - public SwClient -{ - SfxItemSet_Pointer_t pSet; - IStyleAccess::SwAutoStyleFamily eFamily; - - ::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); - -public: - - SwXAutoStyle( SwDoc* pDoc, SfxItemSet_Pointer_t pInitSet, IStyleAccess::SwAutoStyleFamily eFam ); - virtual ~SwXAutoStyle(); - - //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); - - //XMultiPropertySet - virtual void SAL_CALL setPropertyValues( 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::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - - //XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - //XMultiPropertyStates - virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( 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); - - // Special - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getProperties() throw (::com::sun::star::uno::RuntimeException); -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -}; -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx deleted file mode 100644 index e2217068b6..0000000000 --- a/sw/inc/unotbl.hxx +++ /dev/null @@ -1,588 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOTBL_HXX -#define _UNOTBL_HXX - -#include <com/sun/star/container/XNamed.hpp> -#include <com/sun/star/container/XEnumerationAccess.hpp> -#include <com/sun/star/util/XSortable.hpp> -#include <com/sun/star/chart/XChartData.hpp> -#include <com/sun/star/chart/XChartDataArray.hpp> -#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp> -#include <com/sun/star/text/XTextTableCursor.hpp> -#include <com/sun/star/text/XTextTable.hpp> -#include <com/sun/star/table/XCellRange.hpp> -#include <com/sun/star/sheet/XCellRangeData.hpp> -#include <com/sun/star/table/XAutoFormattable.hpp> - -#include <cppuhelper/implbase3.hxx> -#include <cppuhelper/implbase4.hxx> -#include <cppuhelper/implbase5.hxx> -#include <cppuhelper/implbase7.hxx> -#include <cppuhelper/implbase10.hxx> - -#include <comphelper/uno3.hxx> -#include <tools/string.hxx> - -#include <calbck.hxx> -#include <TextCursorHelper.hxx> -#include <unoevtlstnr.hxx> -#include <unotext.hxx> - - -class SwUnoCrsr; -class SwTable; -class SwTableBox; -class SwTableLine; -class SwTableCursor; -class SwTableBoxFmt; -class SwChartDataProvider; -class SwFrmFmt; - - -class SwChartEventListenerContainer : public SwEventListenerContainer -{ - public: - SwChartEventListenerContainer( ::com::sun::star::uno::XInterface* pxParentL) : - SwEventListenerContainer(pxParentL){} - void ChartDataChanged(); -}; - -typedef -cppu::WeakImplHelper4 -< - ::com::sun::star::table::XCell, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::container::XEnumerationAccess -> -SwXCellBaseClass; -class SwXCell : public SwXCellBaseClass, - public SwXText, - public SwClient -{ - friend void lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt, - sal_Bool bKeepNumberFmt = sal_False ); - friend double lcl_getValue( SwXCell &rCell ); - friend void lcl_setValue( SwXCell &rCell, double nVal ); - - - 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 - sal_uInt16 nFndPos; - -protected: - virtual const SwStartNode *GetStartNode() const; - - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCursor > - CreateCursor() - throw (::com::sun::star::uno::RuntimeException); - - bool IsValid() const; - - virtual ~SwXCell(); - - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - SwXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, sal_uInt16 nPos=USHRT_MAX ); - SwXCell(SwFrmFmt* pTblFmt, const SwStartNode& rStartNode); // XML import interface - - - TYPEINFO(); - - 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); - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw(); - virtual void SAL_CALL release( ) throw(); - - //XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - //XCell - virtual ::rtl::OUString SAL_CALL getFormula( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula ) throw(::com::sun::star::uno::RuntimeException); - virtual double SAL_CALL getValue( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setValue( double nValue ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::table::CellContentType SAL_CALL getType( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL getError( ) throw(::com::sun::star::uno::RuntimeException); - - //XText - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL setString(const rtl::OUString& aString) 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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - //XEnumerationAccess - was: XParagraphEnumerationAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) 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); - - SwTableBox* GetTblBox()const {return pBox;} - static SwXCell* CreateXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, SwTable *pTbl = 0 ); - SwTableBox* FindBox(SwTable* pTable, SwTableBox* pBox); - - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } -}; - -class SwXTextTableRow : public cppu::WeakImplHelper2 -< - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::lang::XServiceInfo ->, - public SwClient -{ - const SfxItemPropertySet* m_pPropSet; - SwTableLine* pLine; - - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } -protected: - virtual ~SwXTextTableRow(); - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - -public: - SwXTextTableRow(SwFrmFmt* pFmt, SwTableLine* pLine); - - - TYPEINFO(); - - //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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - const SwTableLine* GetTblRow() const {return pLine;} - static SwTableLine* FindLine(SwTable* pTable, SwTableLine* pLine); -}; - -typedef cppu::WeakImplHelper3< - ::com::sun::star::text::XTextTableCursor, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::beans::XPropertySet - > SwXTextTableCursor_Base; -class SW_DLLPUBLIC SwXTextTableCursor : public SwXTextTableCursor_Base - ,public SwClient - ,public OTextCursorHelper -{ - SwDepend aCrsrDepend; - const SfxItemPropertySet* m_pPropSet; - -protected: - virtual ~SwXTextTableCursor(); -public: - SwXTextTableCursor(SwFrmFmt* pFmt, SwTableBox* pBox); - SwXTextTableCursor(SwFrmFmt& rTableFmt, - const SwTableCursor* pTableSelection); - - - DECLARE_XINTERFACE() - - //XTextTableCursor - virtual ::rtl::OUString SAL_CALL getRangeName( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoCellByName( const ::rtl::OUString& aCellName, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL goLeft( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL goRight( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL goUp( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL goDown( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL gotoStart( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL gotoEnd( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL mergeRange( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL splitRange( sal_Int16 Count, sal_Bool Horizontal ) 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); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - - // ITextCursorHelper - virtual const SwPaM* GetPaM() const; - virtual SwPaM* GetPaM(); - virtual const SwDoc* GetDoc() const; - virtual SwDoc* GetDoc(); - - const SwUnoCrsr* GetCrsr() const; - SwUnoCrsr* GetCrsr(); - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } -}; - -struct SwRangeDescriptor -{ - sal_Int32 nTop; - sal_Int32 nLeft; - sal_Int32 nBottom; - sal_Int32 nRight; - - void Normalize(); -}; - -class SwTableProperties_Impl; -class SwXTextTable : public cppu::WeakImplHelper10 -< - ::com::sun::star::text::XTextTable, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::table::XCellRange, - ::com::sun::star::chart::XChartDataArray, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::container::XNamed, - ::com::sun::star::table::XAutoFormattable, - ::com::sun::star::util::XSortable, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::sheet::XCellRangeData ->, - public SwClient -{ - SwEventListenerContainer aLstnrCntnr; - SwChartEventListenerContainer aChartLstnrCntnr; - const SfxItemPropertySet* m_pPropSet; - - // Descriptor-interface - SwTableProperties_Impl* pTableProps; - String m_sTableName; - sal_Bool bIsDescriptor; - unsigned short nRows; - unsigned short nColumns; - - - sal_Bool bFirstRowAsLabel :1; - sal_Bool bFirstColumnAsLabel :1; -protected: - virtual ~SwXTextTable(); -public: - SwXTextTable(); - SwXTextTable(SwFrmFmt& rFrmFmt); - - - SW_DLLPUBLIC 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); - - TYPEINFO(); - - //XTextTable - virtual void SAL_CALL initialize( sal_Int32 nRows, sal_Int32 nColumns ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableRows > SAL_CALL getRows( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableColumns > SAL_CALL getColumns( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByName( const ::rtl::OUString& aCellName ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getCellNames( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextTableCursor > SAL_CALL createCursorByCellName( const ::rtl::OUString& aCellName ) 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 ); - - //XCellRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw(com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByName( const ::rtl::OUString& aRange ) throw(::com::sun::star::uno::RuntimeException); - - //XChartDataArray - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aData ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRowDescriptions ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aColumnDescriptions ) throw(::com::sun::star::uno::RuntimeException); - - //XChartData - virtual void SAL_CALL addChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); - virtual double SAL_CALL getNotANumber( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) throw(::com::sun::star::uno::RuntimeException); - - //XSortable - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor) throw( ::com::sun::star::uno::RuntimeException ); - - //XAutoFormattable - virtual void SAL_CALL autoFormat(const rtl::OUString& aName) throw( ::com::sun::star::lang::IllegalArgumentException, ::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); - - //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 ); - - //XCellRangeData - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > > SAL_CALL getDataArray( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setDataArray( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& aArray ) throw (::com::sun::star::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - 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 ); - - sal_uInt16 getRowCount(void); - sal_uInt16 getColumnCount(void); - ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > GetRangeByName(SwFrmFmt* pFmt, SwTable* pTable, - const String& sTLName, const String& sBRName, - SwRangeDescriptor& rDesc); - - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } -}; - -class SwXCellRange : public cppu::WeakImplHelper7 -< - ::com::sun::star::table::XCellRange, - ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::lang::XUnoTunnel, - ::com::sun::star::beans::XPropertySet, - ::com::sun::star::chart::XChartDataArray, - ::com::sun::star::util::XSortable, - ::com::sun::star::sheet::XCellRangeData ->, - public SwClient -{ - SwDepend aCursorDepend; //the cursor is removed after the doc has been removed - SwChartEventListenerContainer aChartLstnrCntnr; - - SwRangeDescriptor aRgDesc; - const SfxItemPropertySet* m_pPropSet; - - SwUnoCrsr* pTblCrsr; - - sal_Bool bFirstRowAsLabel :1; - sal_Bool bFirstColumnAsLabel :1; - -public: - SwXCellRange(SwUnoCrsr* pCrsr, SwFrmFmt& rFrmFmt, SwRangeDescriptor& rDesc); - ~SwXCellRange(); - - TYPEINFO(); - - 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); - - - //XCellRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw(com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByName( const ::rtl::OUString& aRange ) 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); - - //XChartData - virtual void SAL_CALL addChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException); - virtual double SAL_CALL getNotANumber( ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) throw(::com::sun::star::uno::RuntimeException); - - //XChartDataArray - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aData ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRowDescriptions ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aColumnDescriptions ) throw(::com::sun::star::uno::RuntimeException); - - //XSortable - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor) throw( ::com::sun::star::uno::RuntimeException ); - - //XCellRangeData - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > > SAL_CALL getDataArray( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setDataArray( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& aArray ) throw (::com::sun::star::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - sal_uInt16 getRowCount(void); - sal_uInt16 getColumnCount(void); - - const SwUnoCrsr* GetTblCrsr() const; - - // for SwChartDataSequence - void GetDataSequence( - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > *pAnySeq, - ::com::sun::star::uno::Sequence< ::rtl::OUString > *pTxtSeq, - ::com::sun::star::uno::Sequence< double > *pDblSeq, - sal_Bool bForceNumberResults = sal_False ) throw (::com::sun::star::uno::RuntimeException); - -}; - -class SwXTableRows : public cppu::WeakImplHelper2 -< - ::com::sun::star::table::XTableRows, - ::com::sun::star::lang::XServiceInfo ->, - public SwClient - -{ - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } -protected: - virtual ~SwXTableRows(); -public: - SwXTableRows(SwFrmFmt& rFrmFmt); - - - TYPEINFO(); - - //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 ); - - //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); - - //XTableRows - virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); -}; - -class SwXTableColumns : public cppu::WeakImplHelper2 -< - ::com::sun::star::table::XTableColumns, - ::com::sun::star::lang::XServiceInfo ->, - public SwClient - -{ - SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } -protected: - virtual ~SwXTableColumns(); -public: - SwXTableColumns(SwFrmFmt& rFrmFmt); - - - TYPEINFO(); - - //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 ); - - //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); - - //XTableColumns - virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_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 ); - - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); -}; - -#endif - - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unotext.hxx b/sw/inc/unotext.hxx deleted file mode 100644 index 798d7f2cc6..0000000000 --- a/sw/inc/unotext.hxx +++ /dev/null @@ -1,345 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNOTEXT_HXX -#define SW_UNOTEXT_HXX - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/text/XText.hpp> -#include <com/sun/star/text/XTextCopy.hpp> -#include <com/sun/star/text/XTextRangeCompare.hpp> -#include <com/sun/star/text/XRelativeTextContentInsert.hpp> -#include <com/sun/star/text/XRelativeTextContentRemove.hpp> -#include <com/sun/star/text/XTextAppendAndConvert.hpp> - -#include <unobaseclass.hxx> - - -namespace com { namespace sun { namespace star { - namespace text { - class XTextContent; - } -} } } - -class SfxItemPropertySet; -class SwDoc; -class SwStartNode; -class SwPaM; -class OTextCursorHelper; -class SwXTextRange; - - - -class SwXText - : public ::com::sun::star::lang::XTypeProvider - , public ::com::sun::star::lang::XUnoTunnel - , public ::com::sun::star::beans::XPropertySet - , public ::com::sun::star::text::XTextAppendAndConvert - , public ::com::sun::star::text::XTextCopy - , public ::com::sun::star::text::XTextRangeCompare - , public ::com::sun::star::text::XRelativeTextContentInsert - , public ::com::sun::star::text::XRelativeTextContentRemove -{ - -private: - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - virtual void PrepareForAttach( - ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xRange, - SwPaM const & rPam); - virtual bool CheckForOwnMemberMeta( - const SwPaM & rPam, const bool bAbsorb) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - -protected: - - bool IsValid() const; - void Invalidate(); - void SetDoc(SwDoc *const pDoc); - - virtual ~SwXText(); - -public: /*not protected because C++ is retarded*/ - virtual const SwStartNode *GetStartNode() const; - -public: - - SwXText(SwDoc *const pDoc, const enum CursorType eType); - - const SwDoc* GetDoc() const; - SwDoc* GetDoc(); - - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCursor > - CreateCursor() - throw (::com::sun::star::uno::RuntimeException); - - - // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type& rType) - throw (::com::sun::star::uno::RuntimeException); - - // XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > - SAL_CALL getTypes() - throw (::com::sun::star::uno::RuntimeException); - - 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 >& rIdentifier) - 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& rPropertyName, - const ::com::sun::star::uno::Any& rValue) - 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& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( - const ::rtl::OUString& rPropertyName, - 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& rPropertyName, - 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 addVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - // XTextRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - SAL_CALL getText() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL getStart() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL getEnd() - throw (::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getString() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setString(const ::rtl::OUString& rString) - throw (::com::sun::star::uno::RuntimeException); - - // XSimpleText - virtual void SAL_CALL insertString( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xRange, - const ::rtl::OUString& aString, sal_Bool bAbsorb) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL insertControlCharacter( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xRange, - sal_Int16 nControlCharacter, sal_Bool bAbsorb) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - - // XText - virtual void SAL_CALL insertTextContent( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xRange, - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent > & xContent, - sal_Bool bAbsorb) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeTextContent( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent > & xContent) - throw (::com::sun::star::container::NoSuchElementException, - ::com::sun::star::uno::RuntimeException); - - // XParagraphAppend - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL - appendParagraph( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& - rCharacterAndParagraphProperties) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL - finishParagraph( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& - rCharacterAndParagraphProperties) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - - // XTextPortionAppend - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL - appendTextPortion( - const ::rtl::OUString& rText, - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& - rCharacterAndParagraphProperties) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - - // XTextContentAppend - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL - appendTextContent( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent >& xTextContent, - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& - rCharacterAndParagraphProperties) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - - // XTextConvert - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent > SAL_CALL - convertToTextFrame( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange >& xStart, - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange >& xEnd, - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& xFrameProperties) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextTable > SAL_CALL - convertToTable( - ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > > > > const& - rTableRanges, - ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue > > > const& - rCellProperties, - ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue > > const& - rRowProperties, - ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue > const& - rTableProperties) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - - // XTextCopy - virtual void SAL_CALL copyText( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCopy >& xSource ) - throw (::com::sun::star::uno::RuntimeException); - - // XTextRangeCompare - sal_Int16 SAL_CALL compareRegionStarts( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange >& xR1, - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange >& xR2) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - sal_Int16 SAL_CALL compareRegionEnds( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange >& xR1, - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange >& xR2) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - - // XRelativeTextContentInsert - virtual void SAL_CALL insertTextContentBefore( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent>& xNewContent, - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent>& xSuccessor) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL insertTextContentAfter( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent>& xNewContent, - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent>& xPredecessor) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - - // XRelativeTextContentRemove - virtual void SAL_CALL removeTextContentBefore( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent>& xSuccessor) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeTextContentAfter( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextContent>& xPredecessor) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); -}; - -#endif // SW_UNOTEXT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx deleted file mode 100644 index af1296811f..0000000000 --- a/sw/inc/unotextbodyhf.hxx +++ /dev/null @@ -1,209 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNOTEXTBODYHF_HXX -#define SW_UNOTEXTBODYHF_HXX - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/container/XEnumerationAccess.hpp> - -#include <cppuhelper/implbase2.hxx> - -#include <unotext.hxx> - - -class SwDoc; -class SwFrmFmt; -class SwXTextCursor; - - -typedef ::cppu::WeakAggImplHelper2 -< ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::container::XEnumerationAccess -> SwXBodyText_Base; - -class SwXBodyText - : public SwXBodyText_Base - , public SwXText -{ - -protected: - - virtual ~SwXBodyText(); - -public: - - SwXBodyText(SwDoc *const pDoc); - - SwXTextCursor * CreateTextCursor(const bool bIgnoreTables = false); - - // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type& rType) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw() { OWeakObject::release(); } - - // XAggregation - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( - const ::com::sun::star::uno::Type& rType) - throw (::com::sun::star::uno::RuntimeException); - - // XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > - SAL_CALL getTypes() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL - getImplementationId() - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - 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); - - // XEnumerationAccess - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::container::XEnumeration > SAL_CALL - createEnumeration() - throw (::com::sun::star::uno::RuntimeException); - - // XSimpleText - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCursor > SAL_CALL - createTextCursor() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCursor > SAL_CALL - createTextCursorByRange( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xTextPosition) - throw (::com::sun::star::uno::RuntimeException); - -}; - - -typedef ::cppu::WeakImplHelper2 -< ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::container::XEnumerationAccess -> SwXHeadFootText_Base; - -class SwXHeadFootText - : public SwXHeadFootText_Base - , public SwXText -{ - -private: - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - -protected: - - virtual const SwStartNode *GetStartNode() const; - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCursor > - CreateCursor() - throw (::com::sun::star::uno::RuntimeException); - - virtual ~SwXHeadFootText(); - - SwXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader); - -public: - - static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - CreateXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader); - static bool IsXHeadFootText(SwClient *const pClient); - - // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type& rType) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw() { OWeakObject::release(); } - - // XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > - SAL_CALL getTypes() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL - getImplementationId() - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - 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); - - // XEnumerationAccess - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::container::XEnumeration > SAL_CALL - createEnumeration() - throw (::com::sun::star::uno::RuntimeException); - - // XSimpleText - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCursor > SAL_CALL - createTextCursor() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextCursor > SAL_CALL - createTextCursorByRange( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xTextPosition) - throw (::com::sun::star::uno::RuntimeException); - -}; - -#endif // SW_UNOTEXTBODYHF_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx deleted file mode 100644 index a9a6264b3d..0000000000 --- a/sw/inc/unotextcursor.hxx +++ /dev/null @@ -1,349 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNOTEXTCURSOR_HXX -#define SW_UNOTEXTCURSOR_HXX - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/beans/XPropertyState.hpp> -#include <com/sun/star/beans/XMultiPropertyStates.hpp> -#include <com/sun/star/container/XEnumerationAccess.hpp> -#include <com/sun/star/container/XContentEnumerationAccess.hpp> -#include <com/sun/star/util/XSortable.hpp> -#include <com/sun/star/document/XDocumentInsertable.hpp> -#include <com/sun/star/text/XSentenceCursor.hpp> -#include <com/sun/star/text/XWordCursor.hpp> -#include <com/sun/star/text/XParagraphCursor.hpp> -#include <com/sun/star/text/XRedline.hpp> - -#include <cppuhelper/implbase12.hxx> - -#include <comphelper/uno3.hxx> - -#include <unobaseclass.hxx> -#include <TextCursorHelper.hxx> - - -class SwDoc; -struct SwPosition; -class SwUnoCrsr; - - -typedef ::cppu::WeakImplHelper12 -< ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::beans::XPropertySet -, ::com::sun::star::beans::XPropertyState -, ::com::sun::star::beans::XMultiPropertyStates -, ::com::sun::star::container::XEnumerationAccess -, ::com::sun::star::container::XContentEnumerationAccess -, ::com::sun::star::util::XSortable -, ::com::sun::star::document::XDocumentInsertable -, ::com::sun::star::text::XSentenceCursor -, ::com::sun::star::text::XWordCursor -, ::com::sun::star::text::XParagraphCursor -, ::com::sun::star::text::XRedline -> SwXTextCursor_Base; - -class SwXTextCursor - : public SwXTextCursor_Base - , public OTextCursorHelper -{ - -private: - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - virtual ~SwXTextCursor(); - -public: - - SwXTextCursor( - SwDoc & rDoc, - ::com::sun::star::uno::Reference< - ::com::sun::star::text::XText > const& xParent, - const enum CursorType eType, - SwPosition const& rPos, - SwPosition const*const pMark = 0); - SwXTextCursor( - ::com::sun::star::uno::Reference< - ::com::sun::star::text::XText > const& xParent, - SwPaM const& rSourceCursor, - const enum CursorType eType = CURSOR_ALL); - - SwUnoCrsr * GetCursor(); - const SwUnoCrsr * GetCursor() const; - - bool IsAtEndOfMeta() const; - - void DeleteAndInsert(::rtl::OUString const& rText, - const bool bForceExpandHints); - - // OTextCursorHelper - virtual const SwPaM* GetPaM() const; - virtual SwPaM* GetPaM(); - virtual const SwDoc* GetDoc() const; - virtual SwDoc* GetDoc(); - - DECLARE_XINTERFACE() - - 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 >& rIdentifier) - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - 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& rPropertyName, - const ::com::sun::star::uno::Any& rValue) - 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& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( - const ::rtl::OUString& rPropertyName, - 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& rPropertyName, - 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 addVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - // XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL - getPropertyState(const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyState > SAL_CALL - getPropertyStates( - const ::com::sun::star::uno::Sequence< - ::rtl::OUString >& rPropertyNames) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( - const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( - const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - // XMultiPropertyStates - virtual void SAL_CALL setAllPropertiesToDefault() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertiesToDefault( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > - SAL_CALL getPropertyDefaults( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& - rPropertyNames) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::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); - - // XEnumerationAccess - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::container::XEnumeration > SAL_CALL - createEnumeration() - throw (::com::sun::star::uno::RuntimeException); - - // XContentEnumerationAccess - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::container::XEnumeration > SAL_CALL - createContentEnumeration(const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getAvailableServiceNames() - throw (::com::sun::star::uno::RuntimeException); - - // XSortable - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue > SAL_CALL - createSortDescriptor() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL sort( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& xDescriptor) - throw (::com::sun::star::uno::RuntimeException); - - // XDocumentInsertable - virtual void SAL_CALL insertDocumentFromURL( - const ::rtl::OUString& rURL, - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& rOptions) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::io::IOException, - ::com::sun::star::uno::RuntimeException); - - // XTextRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - SAL_CALL getText() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL getStart() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL getEnd() - throw (::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getString() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setString(const ::rtl::OUString& rString) - throw (::com::sun::star::uno::RuntimeException); - - // XTextCursor - virtual void SAL_CALL collapseToStart() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL collapseToEnd() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isCollapsed() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL goLeft(sal_Int16 nCount, sal_Bool bExpand) - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL goRight(sal_Int16 nCount, sal_Bool bExpand) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL gotoStart(sal_Bool bExpand) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL gotoEnd(sal_Bool bExpand) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL gotoRange( - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange >& xRange, - sal_Bool bExpand) - throw (::com::sun::star::uno::RuntimeException); - - // XWordCursor - virtual sal_Bool SAL_CALL isStartOfWord() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isEndOfWord() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoNextWord(sal_Bool bExpand) - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoPreviousWord(sal_Bool bExpand) - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoEndOfWord(sal_Bool bExpand) - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoStartOfWord(sal_Bool bExpand) - throw (::com::sun::star::uno::RuntimeException); - - // XSentenceCursor - virtual sal_Bool SAL_CALL isStartOfSentence() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isEndOfSentence() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoNextSentence(sal_Bool Expand) - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoPreviousSentence(sal_Bool Expand) - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoStartOfSentence(sal_Bool Expand) - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoEndOfSentence(sal_Bool Expand) - throw (::com::sun::star::uno::RuntimeException); - - // XParagraphCursor - virtual sal_Bool SAL_CALL isStartOfParagraph() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isEndOfParagraph() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoStartOfParagraph(sal_Bool Expand) - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoEndOfParagraph(sal_Bool Expand) - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoNextParagraph(sal_Bool Expand) - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL gotoPreviousParagraph(sal_Bool Expand) - throw (::com::sun::star::uno::RuntimeException); - - // XRedline - virtual void SAL_CALL makeRedline( - const ::rtl::OUString& rRedlineType, - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& RedlineProperties) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - -}; - -#endif // SW_UNOTEXTCURSOR_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unotextmarkup.hxx b/sw/inc/unotextmarkup.hxx deleted file mode 100644 index b682a97db6..0000000000 --- a/sw/inc/unotextmarkup.hxx +++ /dev/null @@ -1,112 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOTEXTMARKUP_HXX -#define _UNOTEXTMARKUP_HXX - -#include <cppuhelper/implbase1.hxx> -#include <cppuhelper/implbase2.hxx> -#include <com/sun/star/text/XTextMarkup.hpp> -#include <com/sun/star/text/XMultiTextMarkup.hpp> -#include <calbck.hxx> -#include <modeltoviewhelper.hxx> - -#include <map> - -namespace com { namespace sun { namespace star { namespace container { - class XStringKeyMap; -} } } } - -class SwTxtNode; -class SfxPoolItem; - -/** Implementation of the css::text::XTextMarkup interface - */ -class SwXTextMarkup: - public ::cppu::WeakImplHelper2 - < - ::com::sun::star::text::XTextMarkup, - ::com::sun::star::text::XMultiTextMarkup - >, - public SwClient -{ -public: - SwXTextMarkup( SwTxtNode& rTxtNode, const ModelToViewHelper::ConversionMap* pConversionMap ); - virtual ~SwXTextMarkup(); - - // ::com::sun::star::text::XTextMarkup: - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > SAL_CALL getMarkupInfoContainer() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL commitTextMarkup(::sal_Int32 nType, const ::rtl::OUString & aIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > & xMarkupInfoContainer) throw (::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::text::XMultiTextMarkup: - virtual void SAL_CALL commitMultiTextMarkup( const ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextMarkupDescriptor >& aMarkups ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - -private: - SwXTextMarkup( const SwXTextMarkup & ); // not defined - SwXTextMarkup & operator =( const SwXTextMarkup & ); // not defined - -protected: - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew); - - SwTxtNode* mpTxtNode; - const ModelToViewHelper::ConversionMap* mpConversionMap; - -}; - - -/** Implementation of the ::com::sun::star::container::XStringKeyMap interface - */ -class SwXStringKeyMap: - public ::cppu::WeakImplHelper1< - ::com::sun::star::container::XStringKeyMap> -{ -public: - SwXStringKeyMap(); - - // ::com::sun::star::container::XStringKeyMap: - virtual ::com::sun::star::uno::Any SAL_CALL getValue(const ::rtl::OUString & aKey) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::container::NoSuchElementException); - virtual ::sal_Bool SAL_CALL hasValue(const ::rtl::OUString & aKey) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL insertValue(const ::rtl::OUString & aKey, const ::com::sun::star::uno::Any & aValue) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException); - virtual ::sal_Int32 SAL_CALL getCount() throw (::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getKeyByIndex(::sal_Int32 nIndex) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException); - virtual ::com::sun::star::uno::Any SAL_CALL getValueByIndex(::sal_Int32 nIndex) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException); - -private: - SwXStringKeyMap(SwXStringKeyMap &); // not defined - void operator =(SwXStringKeyMap &); // not defined - - virtual ~SwXStringKeyMap() {} - - std::map< rtl::OUString, ::com::sun::star::uno::Any > maMap; -}; - -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx deleted file mode 100644 index 20999bbadc..0000000000 --- a/sw/inc/unotextrange.hxx +++ /dev/null @@ -1,333 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_UNOTEXTRANGE_HXX -#define SW_UNOTEXTRANGE_HXX - -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/beans/XPropertyState.hpp> -#include <com/sun/star/container/XIndexAccess.hpp> -#include <com/sun/star/container/XEnumerationAccess.hpp> -#include <com/sun/star/container/XContentEnumerationAccess.hpp> -#include <com/sun/star/text/XTextRange.hpp> -#include <com/sun/star/text/XRedline.hpp> - -#include <cppuhelper/implbase3.hxx> -#include <cppuhelper/implbase8.hxx> - -#include <pam.hxx> -#include <unobaseclass.hxx> - - -class SwDoc; -struct SwPosition; -class SwPaM; -class SwUnoCrsr; -class SwFrmFmt; - -class SwUnoInternalPaM - : public SwPaM -{ - -private: - SwUnoInternalPaM(const SwUnoInternalPaM&); - -public: - SwUnoInternalPaM(SwDoc& rDoc); - virtual ~SwUnoInternalPaM(); - - SwUnoInternalPaM& operator=(const SwPaM& rPaM); -}; - - -namespace sw { - - void DeepCopyPaM(SwPaM const & rSource, SwPaM & rTarget); - - bool XTextRangeToSwPaM(SwUnoInternalPaM& rToFill, - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > & xTextRange); - - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - CreateParentXText(SwDoc & rDoc, const SwPosition& rPos); - - bool GetDefaultTextContentValue(::com::sun::star::uno::Any& rAny, - const ::rtl::OUString& rPropertyName, sal_uInt16 nWID = 0); - -} // namespace sw - - -typedef ::cppu::WeakImplHelper8 -< ::com::sun::star::lang::XUnoTunnel -, ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::beans::XPropertySet -, ::com::sun::star::beans::XPropertyState -, ::com::sun::star::container::XEnumerationAccess -, ::com::sun::star::container::XContentEnumerationAccess -, ::com::sun::star::text::XTextRange -, ::com::sun::star::text::XRedline -> SwXTextRange_Base; - -class SW_DLLPUBLIC SwXTextRange - : public SwXTextRange_Base -{ - -private: - - friend class SwXText; - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - enum RangePosition - { - RANGE_IN_TEXT, // "ordinary" ::com::sun::star::text::TextRange - RANGE_IN_CELL, // position created with a cell that has no uno object - RANGE_IS_TABLE, // anchor of a table - }; - - void SetPositions(SwPaM const& rPam); - //TODO: new exception type for protected content - void DeleteAndInsert( - const ::rtl::OUString& rText, const bool bForceExpandHints) - throw (::com::sun::star::uno::RuntimeException); - void Invalidate(); - - virtual ~SwXTextRange(); - -public: - - SwXTextRange(SwPaM& rPam, - const ::com::sun::star::uno::Reference< - ::com::sun::star::text::XText > & xParent, - const enum RangePosition eRange = RANGE_IN_TEXT); - // only for RANGE_IS_TABLE - SwXTextRange(SwFrmFmt& rTblFmt); - - const SwDoc* GetDoc() const; - SwDoc* GetDoc(); - bool GetPositions(SwPaM & rToFill) const; - - static ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > CreateXTextRange( - SwDoc & rDoc, - const SwPosition& rPos, const SwPosition *const pMark); - - 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 >& rIdentifier) - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - 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& rPropertyName, - const ::com::sun::star::uno::Any& rValue) - 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& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( - const ::rtl::OUString& rPropertyName, - 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& rPropertyName, - 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 addVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( - const ::rtl::OUString& rPropertyName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XVetoableChangeListener >& xListener) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - - // XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL - getPropertyState(const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyState > SAL_CALL - getPropertyStates( - const ::com::sun::star::uno::Sequence< - ::rtl::OUString >& rPropertyNames) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( - const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( - const ::rtl::OUString& rPropertyName) - throw (::com::sun::star::beans::UnknownPropertyException, - ::com::sun::star::lang::WrappedTargetException, - ::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); - - // XEnumerationAccess - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::container::XEnumeration > SAL_CALL - createEnumeration() - throw (::com::sun::star::uno::RuntimeException); - - // XContentEnumerationAccess - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::container::XEnumeration > SAL_CALL - createContentEnumeration(const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getAvailableServiceNames() - throw (::com::sun::star::uno::RuntimeException); - - // XTextRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - SAL_CALL getText() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL getStart() - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange > SAL_CALL getEnd() - throw (::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getString() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setString(const ::rtl::OUString& rString) - throw (::com::sun::star::uno::RuntimeException); - - // XRedline - virtual void SAL_CALL makeRedline( - const ::rtl::OUString& rRedlineType, - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& RedlineProperties) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::uno::RuntimeException); - -}; - -typedef ::cppu::WeakImplHelper3 -< ::com::sun::star::lang::XUnoTunnel -, ::com::sun::star::lang::XServiceInfo -, ::com::sun::star::container::XIndexAccess -> SwXTextRanges_Base; - -class SwXTextRanges - : public SwXTextRanges_Base -{ - -private: - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - virtual ~SwXTextRanges(); - -public: - - SwXTextRanges(SwPaM *const pCrsr); - - const SwUnoCrsr* GetCursor() const; - - 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 >& rIdentifier) - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( - const ::rtl::OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL - getSupportedServiceNames() - 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); - - // XIndexAccess - virtual sal_Int32 SAL_CALL getCount() - 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); - -}; - -#endif // SW_UNOTEXTRANGE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx deleted file mode 100644 index ca8ee42cd6..0000000000 --- a/sw/inc/unotxdoc.hxx +++ /dev/null @@ -1,601 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _UNOTXDOC_HXX -#define _UNOTXDOC_HXX - -#include "swdllapi.h" -#include <svl/svarray.hxx> -#include <sfx2/sfxbasemodel.hxx> - -#include <com/sun/star/beans/PropertyValues.hpp> -#include <com/sun/star/style/XStyleFamiliesSupplier.hpp> -#include <com/sun/star/style/XAutoStylesSupplier.hpp> -#include <com/sun/star/document/XLinkTargetSupplier.hpp> -#include <com/sun/star/document/XRedlinesSupplier.hpp> -#include <com/sun/star/text/XNumberingRulesSupplier.hpp> -#include <com/sun/star/text/XFootnotesSupplier.hpp> -#include <com/sun/star/text/XEndnotesSupplier.hpp> -#include <com/sun/star/text/XEndnotesSettingsSupplier.hpp> -#include <com/sun/star/text/XTextSectionsSupplier.hpp> -#include <com/sun/star/text/XLineNumberingProperties.hpp> -#include <com/sun/star/text/XChapterNumberingSupplier.hpp> -#include <com/sun/star/text/XPagePrintable.hpp> -#include <com/sun/star/text/XTextFieldsSupplier.hpp> -#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp> -#include <com/sun/star/text/XTextTablesSupplier.hpp> -#include <com/sun/star/text/XDocumentIndexesSupplier.hpp> -#include <com/sun/star/text/XBookmarksSupplier.hpp> -#include <com/sun/star/text/XTextDocument.hpp> -#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp> -#include <com/sun/star/text/XReferenceMarksSupplier.hpp> -#include <com/sun/star/text/XTextFramesSupplier.hpp> -#include <com/sun/star/drawing/XDrawPageSupplier.hpp> -#include <com/sun/star/util/XReplaceable.hpp> -#include <com/sun/star/util/XReplaceDescriptor.hpp> -#include <com/sun/star/util/XRefreshable.hpp> -#include <com/sun/star/util/XLinkUpdate.hpp> -#include <com/sun/star/view/XRenderable.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/frame/XController.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/beans/XPropertyState.hpp> -#include <com/sun/star/i18n/XForbiddenCharacters.hpp> -#include <com/sun/star/lang/Locale.hpp> -#include <com/sun/star/xforms/XFormsSupplier.hpp> -#include <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/text/XFlatParagraphIteratorProvider.hpp> -#include <com/sun/star/document/XDocumentLanguages.hpp> -#include <com/sun/star/util/XCloneable.hpp> -#include <svl/itemprop.hxx> -#include <svx/fmdmod.hxx> -#include <editeng/UnoForbiddenCharsTable.hxx> -#include <cppuhelper/weak.hxx> -#include <cppuhelper/implbase2.hxx> // helper for implementations -#include <cppuhelper/implbase4.hxx> // helper for implementations -#include <RefreshListenerContainer.hxx> - -#include <viewopt.hxx> - -#define __IFC32 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, Ifc14, Ifc15, Ifc16, \ -Ifc17, Ifc18, Ifc19, Ifc20, Ifc21, Ifc22, Ifc23, Ifc24, Ifc25, Ifc26, Ifc27, Ifc28, Ifc29, Ifc30, Ifc31, Ifc32 - -#define __CLASS_IFC32 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, \ -class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12, class Ifc13, class Ifc14, class Ifc15, class Ifc16, \ -class Ifc17, class Ifc18, class Ifc19, class Ifc20, class Ifc21, class Ifc22, class Ifc23, class Ifc24,\ -class Ifc25, class Ifc26, class Ifc27, class Ifc28, class Ifc29, class Ifc30, class Ifc31 , class Ifc32 - -#define __PUBLIC_IFC32 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, \ -public Ifc13, public Ifc14, public Ifc15, public Ifc16, public Ifc17, public Ifc18, \ -public Ifc19, public Ifc20, public Ifc21, public Ifc22, public Ifc23, public Ifc24, \ -public Ifc25, public Ifc26, public Ifc27, public Ifc28, public Ifc29, public Ifc30, \ -public Ifc31, public Ifc32 -#include <cppuhelper/implbase_ex.hxx> -#include <cppuhelper/implbase_ex_pre.hxx> -#define __IFC_EX_TYPE_INIT32( class_cast ) \ - __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \ - __IFC_EX_TYPE_INIT( class_cast, 3 ), __IFC_EX_TYPE_INIT( class_cast, 4 ), \ - __IFC_EX_TYPE_INIT( class_cast, 5 ), __IFC_EX_TYPE_INIT( class_cast, 6 ), \ - __IFC_EX_TYPE_INIT( class_cast, 7 ), __IFC_EX_TYPE_INIT( class_cast, 8 ), \ - __IFC_EX_TYPE_INIT( class_cast, 9 ), __IFC_EX_TYPE_INIT( class_cast, 10 ), \ - __IFC_EX_TYPE_INIT( class_cast, 11 ), __IFC_EX_TYPE_INIT( class_cast, 12 ), \ - __IFC_EX_TYPE_INIT( class_cast, 13 ), __IFC_EX_TYPE_INIT( class_cast, 14 ), \ - __IFC_EX_TYPE_INIT( class_cast, 15 ), __IFC_EX_TYPE_INIT( class_cast, 16 ), \ - __IFC_EX_TYPE_INIT( class_cast, 17 ), __IFC_EX_TYPE_INIT( class_cast, 18 ), \ - __IFC_EX_TYPE_INIT( class_cast, 19 ), __IFC_EX_TYPE_INIT( class_cast, 20 ), \ - __IFC_EX_TYPE_INIT( class_cast, 21 ), __IFC_EX_TYPE_INIT( class_cast, 22 ), \ - __IFC_EX_TYPE_INIT( class_cast, 23 ), __IFC_EX_TYPE_INIT( class_cast, 24 ), \ - __IFC_EX_TYPE_INIT( class_cast, 25 ), __IFC_EX_TYPE_INIT( class_cast, 26 ), \ - __IFC_EX_TYPE_INIT( class_cast, 27 ), __IFC_EX_TYPE_INIT( class_cast, 28 ), \ - __IFC_EX_TYPE_INIT( class_cast, 29 ), __IFC_EX_TYPE_INIT( class_cast, 30 ), \ - __IFC_EX_TYPE_INIT( class_cast, 31 ), __IFC_EX_TYPE_INIT( class_cast, 32) -#include <cppuhelper/implbase_ex_post.hxx> - -__DEF_IMPLHELPER_EX( 32 ) - -namespace css = ::com::sun::star; - -class SwDoc; -class SwDocShell; -class UnoActionContext; -class SwXBodyText; -class SwXDrawPage; -class SwUnoCrsr; -class SwXDocumentPropertyHelper; -class SfxViewFrame; -class SwPrintUIOptions; -class SwPrintData; -class SwRenderData; -class ViewShell; - -typedef UnoActionContext* UnoActionContextPtr; -SV_DECL_PTRARR(ActionContextArr, UnoActionContextPtr, 4, 4) - - -/****************************************************************************** - * - ******************************************************************************/ - - -typedef cppu::WeakImplHelper32 -< - css::text::XTextDocument, - css::text::XLineNumberingProperties, - css::text::XChapterNumberingSupplier, - css::text::XNumberingRulesSupplier, - css::text::XFootnotesSupplier, - css::text::XEndnotesSupplier, - css::util::XReplaceable, - css::text::XPagePrintable, - css::text::XReferenceMarksSupplier, - css::text::XTextTablesSupplier, - css::text::XTextFramesSupplier, - css::text::XBookmarksSupplier, - css::text::XTextSectionsSupplier, - css::text::XTextGraphicObjectsSupplier, - css::text::XTextEmbeddedObjectsSupplier, - css::text::XTextFieldsSupplier, - css::style::XStyleFamiliesSupplier, - css::style::XAutoStylesSupplier, - css::lang::XServiceInfo, - css::drawing::XDrawPageSupplier, - css::text::XDocumentIndexesSupplier, - css::beans::XPropertySet, - css::beans::XPropertyState, - css::document::XLinkTargetSupplier, - css::document::XRedlinesSupplier, - css::util::XRefreshable, - css::util::XLinkUpdate, - css::view::XRenderable, - css::xforms::XFormsSupplier, - css::text::XFlatParagraphIteratorProvider, - css::document::XDocumentLanguages, - css::util::XCloneable -> -SwXTextDocumentBaseClass; - -class SW_DLLPUBLIC SwXTextDocument : public SwXTextDocumentBaseClass, - public SvxFmMSFactory, - public SfxBaseModel -{ - ActionContextArr aActionArr; - SwRefreshListenerContainer aRefreshCont; - - const SfxItemPropertySet* pPropSet; - - SwDocShell* pDocShell; - sal_Bool bObjectValid; - - SwXDrawPage* pDrawPage; - css::uno::Reference< css::drawing::XDrawPage > * pxXDrawPage; - - css::uno::Reference< css::text::XText > xBodyText; - SwXBodyText* pBodyText; - css::uno::Reference< css::uno::XAggregation > xNumFmtAgg; - - css::uno::Reference< css::container::XIndexAccess > * pxXNumberingRules; - css::uno::Reference< css::container::XIndexAccess > * pxXFootnotes; - css::uno::Reference< css::beans::XPropertySet > * pxXFootnoteSettings; - css::uno::Reference< css::container::XIndexAccess > * pxXEndnotes; - css::uno::Reference< css::beans::XPropertySet > * pxXEndnoteSettings; - css::uno::Reference< css::container::XNameAccess > * pxXReferenceMarks; - css::uno::Reference< css::container::XEnumerationAccess > * pxXTextFieldTypes; - css::uno::Reference< css::container::XNameAccess > * pxXTextFieldMasters; - css::uno::Reference< css::container::XNameAccess > * pxXTextSections; - css::uno::Reference< css::container::XNameAccess > * pxXBookmarks; - css::uno::Reference< css::container::XNameAccess > * pxXTextTables; - css::uno::Reference< css::container::XNameAccess > * pxXTextFrames; - css::uno::Reference< css::container::XNameAccess > * pxXGraphicObjects; - css::uno::Reference< css::container::XNameAccess > * pxXEmbeddedObjects; - css::uno::Reference< css::container::XNameAccess > * pxXStyleFamilies; - mutable css::uno::Reference< css::style::XAutoStyles > * pxXAutoStyles; - css::uno::Reference< css::container::XIndexReplace > * pxXChapterNumbering; - css::uno::Reference< css::container::XIndexAccess > * pxXDocumentIndexes; - - css::uno::Reference< css::beans::XPropertySet > * pxXLineNumberingProperties; - css::uno::Reference< css::container::XNameAccess > * pxLinkTargetSupplier; - css::uno::Reference< css::container::XEnumerationAccess >* pxXRedlines; - css::uno::Reference< css::container::XNameContainer> xXFormsContainer; - - //temporary frame to enable PDF export if no valid view is available - SfxViewFrame* m_pHiddenViewFrame; - css::uno::Reference< css::uno::XInterface> xPropertyHelper; - SwXDocumentPropertyHelper* pPropertyHelper; - - SwPrintUIOptions * m_pPrintUIOptions; - SwRenderData * m_pRenderData; - - void GetBodyText(); - void GetNumberFormatter(); - - // used for XRenderable implementation - SfxViewShell * GuessViewShell( /* out */ bool &rbIsSwSrcView, const css::uno::Reference< css::frame::XController > xController = css::uno::Reference< css::frame::XController >() ); - SwDoc * GetRenderDoc( SfxViewShell *&rpView, const css::uno::Any& rSelection, bool bIsPDFExport ); - SfxViewShell * GetRenderView( bool &rbIsSwSrcView, const css::uno::Sequence< css::beans::PropertyValue >& rxOptions, bool bIsPDFExport ); - - rtl::OUString maBuildId; - - using SfxBaseModel::addEventListener; - using SfxBaseModel::removeEventListener; - -protected: - virtual ~SwXTextDocument(); -public: - SwXTextDocument(SwDocShell* pShell); - - inline void notifyRefreshListeners() { aRefreshCont.Refreshed(); } - virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw(css::uno::RuntimeException); - virtual void SAL_CALL acquire( ) throw(); - virtual void SAL_CALL release( ) throw(); - - //XWeak - virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL queryAdapter( ) throw(css::uno::RuntimeException); - - virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) throw(css::uno::RuntimeException); - - static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - //XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException); - - //XTextDocument - virtual css::uno::Reference< css::text::XText > SAL_CALL getText(void) throw( css::uno::RuntimeException ); - virtual void SAL_CALL reformat(void) throw( css::uno::RuntimeException ); - - //XModel - virtual sal_Bool SAL_CALL attachResource( const ::rtl::OUString& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs ) throw(css::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getURL( ) throw(css::uno::RuntimeException); - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getArgs( ) throw(css::uno::RuntimeException); - virtual void SAL_CALL connectController( const css::uno::Reference< css::frame::XController >& xController ) throw(css::uno::RuntimeException); - virtual void SAL_CALL disconnectController( const css::uno::Reference< css::frame::XController >& xController ) throw(css::uno::RuntimeException); - virtual void SAL_CALL lockControllers( ) throw(css::uno::RuntimeException); - virtual void SAL_CALL unlockControllers( ) throw(css::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasControllersLocked( ) throw(css::uno::RuntimeException); - virtual css::uno::Reference< css::frame::XController > SAL_CALL getCurrentController( ) throw(css::uno::RuntimeException); - virtual void SAL_CALL setCurrentController( const css::uno::Reference< css::frame::XController >& xController ) throw(css::container::NoSuchElementException, css::uno::RuntimeException); - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getCurrentSelection( ) throw(css::uno::RuntimeException); - - //XComponent - virtual void SAL_CALL dispose(void) throw( css::uno::RuntimeException ); - virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) throw( css::uno::RuntimeException ); - virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) throw( css::uno::RuntimeException ); - - //XCloseable - virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw (css::util::CloseVetoException, css::uno::RuntimeException); - - //XLineNumberingProperties - virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getLineNumberingProperties(void) throw( css::uno::RuntimeException ); - - //XChapterNumberingSupplier - virtual css::uno::Reference< css::container::XIndexReplace > SAL_CALL getChapterNumberingRules(void) throw( css::uno::RuntimeException ); - - //XNumberingRulesSupplier - virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getNumberingRules() throw (css::uno::RuntimeException); - - //XFootnotesSupplier - virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getFootnotes(void) throw( css::uno::RuntimeException ); - virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getFootnoteSettings(void) throw( css::uno::RuntimeException ); - - //XEndnotesSupplier - virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getEndnotes(void) throw( css::uno::RuntimeException ); - virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getEndnoteSettings(void) throw( css::uno::RuntimeException ); - - //XReplaceable - virtual css::uno::Reference< css::util::XReplaceDescriptor > SAL_CALL createReplaceDescriptor(void) throw( css::uno::RuntimeException ); - virtual sal_Int32 SAL_CALL replaceAll(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException ); - - //XSearchable - virtual css::uno::Reference< css::util::XSearchDescriptor > SAL_CALL createSearchDescriptor(void) throw( css::uno::RuntimeException ); - virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL findAll(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException ); - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL findFirst(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException ); - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL findNext(const css::uno::Reference< css::uno::XInterface > & xStartAt, const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException ); - - //XPagePrintable - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getPagePrintSettings(void) throw( css::uno::RuntimeException ); - virtual void SAL_CALL setPagePrintSettings(const css::uno::Sequence< css::beans::PropertyValue >& aSettings) throw( css::uno::RuntimeException ); - virtual void SAL_CALL printPages(const css::uno::Sequence< css::beans::PropertyValue >& xOptions) throw( css::lang::IllegalArgumentException, css::uno::RuntimeException ); - - //XReferenceMarksSupplier - virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getReferenceMarks(void) throw( css::uno::RuntimeException ); - - // css::text::XTextFieldsSupplier - virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getTextFields(void) throw( css::uno::RuntimeException ); - virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextFieldMasters(void) throw( css::uno::RuntimeException ); - - // css::text::XTextEmbeddedObjectsSupplier - virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getEmbeddedObjects(void) throw( css::uno::RuntimeException ); - - // css::text::XBookmarksSupplier - virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getBookmarks(void) throw( css::uno::RuntimeException ); - - // css::text::XTextSectionsSupplier - virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextSections(void) throw( css::uno::RuntimeException ); - - // css::text::XTextTablesSupplier - virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextTables(void) throw( css::uno::RuntimeException ); - - // css::text::XTextGraphicObjectsSupplier - virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getGraphicObjects(void) throw( css::uno::RuntimeException ); - - // css::text::XTextFramesSupplier - virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextFrames(void) throw( css::uno::RuntimeException ); - - //XStyleFamiliesSupplier - virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getStyleFamilies(void) throw( css::uno::RuntimeException ); - - //XAutoStylesSupplier - virtual css::uno::Reference< css::style::XAutoStyles > SAL_CALL getAutoStyles( ) throw (css::uno::RuntimeException); - - //XMultiServiceFactory - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const rtl::OUString& ServiceSpecifier) - throw( css::uno::Exception, css::uno::RuntimeException ); - virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const rtl::OUString& ServiceSpecifier, - const css::uno::Sequence< css::uno::Any >& Arguments) - throw( css::uno::Exception, css::uno::RuntimeException ); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void) - throw( css::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException ); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException ); - - // css::drawing::XDrawPageSupplier - virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getDrawPage(void) throw( css::uno::RuntimeException ); - - // css::text::XDocumentIndexesSupplier - virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getDocumentIndexes(void) throw( css::uno::RuntimeException ); - - //XPropertySet - virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - - //XPropertyState - virtual css::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& rPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException); - virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::uno::Sequence< ::rtl::OUString >& rPropertyNames ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& rPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& rPropertyName ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - - //XLinkTargetSupplier - virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks(void) throw( css::uno::RuntimeException ); - - //XRedlinesSupplier - virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getRedlines( ) throw(css::uno::RuntimeException); - - // css::util::XRefreshable - virtual void SAL_CALL refresh(void) throw( css::uno::RuntimeException ); - virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener > & l) throw( css::uno::RuntimeException ); - virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener > & l) throw( css::uno::RuntimeException ); - - // css::util::XLinkUpdate, - virtual void SAL_CALL updateLinks( ) throw(css::uno::RuntimeException); - - // css::view::XRenderable - virtual sal_Int32 SAL_CALL getRendererCount( const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getRenderer( sal_Int32 nRenderer, const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); - virtual void SAL_CALL render( sal_Int32 nRenderer, const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); - - // css::xforms::XFormsSupplier - virtual css::uno::Reference< css::container::XNameContainer > SAL_CALL getXForms( ) throw (css::uno::RuntimeException); - - // css::document::XDocumentLanguages - virtual css::uno::Sequence< css::lang::Locale > SAL_CALL getDocumentLanguages( ::sal_Int16 nScriptTypes, ::sal_Int16 nCount ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); - - // css::text::XFlatParagraphIteratorProvider: - virtual css::uno::Reference< css::text::XFlatParagraphIterator > SAL_CALL getFlatParagraphIterator(::sal_Int32 nTextMarkupType, sal_Bool bAutomatic ) throw (css::uno::RuntimeException); - - // ::com::sun::star::util::XCloneable - virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException); - - - // - void Invalidate(); - void Reactivate(SwDocShell* pNewDocShell); - SwXDocumentPropertyHelper * GetPropertyHelper (); - sal_Bool IsValid() const {return bObjectValid;} - - void InitNewDoc(); - - SwUnoCrsr* CreateCursorForSearch(css::uno::Reference< css::text::XTextCursor > & xCrsr); - SwUnoCrsr* FindAny(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc, - css::uno::Reference< css::text::XTextCursor > & xCrsr, sal_Bool bAll, - sal_Int32& nResult, - css::uno::Reference< css::uno::XInterface > xLastResult); - - SwXDrawPage* GetDrawPage(); - SwDocShell* GetDocShell() {return pDocShell;} - - - void * SAL_CALL operator new( size_t ) throw(); - void SAL_CALL operator delete( void * ) throw(); - -}; - -class SwXLinkTargetSupplier : public cppu::WeakImplHelper2 -< - css::container::XNameAccess, - css::lang::XServiceInfo -> -{ - SwXTextDocument* pxDoc; - String sTables; - String sFrames; - String sGraphics; - String sOLEs; - String sSections; - String sOutlines; - String sBookmarks; - -public: - SwXLinkTargetSupplier(SwXTextDocument& rxDoc); - ~SwXLinkTargetSupplier(); - - //XNameAccess - virtual css::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException ); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( css::uno::RuntimeException ); - virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( css::uno::RuntimeException ); - - //XElementAccess - virtual css::uno::Type SAL_CALL getElementType( ) throw(css::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(css::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException ); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException ); - - // - void Invalidate() {pxDoc = 0;} -}; - -class SwXLinkNameAccessWrapper : public cppu::WeakImplHelper4 -< - css::beans::XPropertySet, - css::container::XNameAccess, - css::lang::XServiceInfo, - css::document::XLinkTargetSupplier -> -{ - css::uno::Reference< css::container::XNameAccess > xRealAccess; - const SfxItemPropertySet* pPropSet; - const String sLinkSuffix; - const String sLinkDisplayName; - css::uno::Reference< css::text::XTextDocument > xDoc; - SwXTextDocument* pxDoc; - - -public: - SwXLinkNameAccessWrapper(css::uno::Reference< css::container::XNameAccess > xAccess, - const String& rLinkDisplayName, String sSuffix); - SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc, - const String& rLinkDisplayName, String sSuffix); - ~SwXLinkNameAccessWrapper(); - - //XNameAccess - virtual css::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException ); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( css::uno::RuntimeException ); - virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( css::uno::RuntimeException ); - - //XElementAccess - virtual css::uno::Type SAL_CALL getElementType( ) throw(css::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) throw(css::uno::RuntimeException); - - //XPropertySet - virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - - //XLinkTargetSupplier - virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks(void) throw( css::uno::RuntimeException ); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException ); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException ); - -}; - -class SwXOutlineTarget : public cppu::WeakImplHelper2 -< - css::beans::XPropertySet, - css::lang::XServiceInfo -> -{ - const SfxItemPropertySet* pPropSet; - String sOutlineText; - -public: - SwXOutlineTarget(const String& rOutlineText); - ~SwXOutlineTarget(); - - //XPropertySet - virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException); - - //XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException ); - virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException ); -}; -#endif - -class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable -{ - css::uno::Reference < css::uno::XInterface > xDashTable; - css::uno::Reference < css::uno::XInterface > xGradientTable; - css::uno::Reference < css::uno::XInterface > xHatchTable; - css::uno::Reference < css::uno::XInterface > xBitmapTable; - css::uno::Reference < css::uno::XInterface > xTransGradientTable; - css::uno::Reference < css::uno::XInterface > xMarkerTable; - css::uno::Reference < css::uno::XInterface > xDrawDefaults; - - SwDoc* m_pDoc; -public: - SwXDocumentPropertyHelper(SwDoc& rDoc); - ~SwXDocumentPropertyHelper(); - css::uno::Reference<css::uno::XInterface> GetDrawTable(short nWhich); - void Invalidate(); - - virtual void onChange(); -}; - - -/* The class SwViewOptionAdjust_Impl is used to adjust the SwViewOption of - the current ViewShell so that fields are not printed as commands and - hidden characters are always invisible. Hidden text and place holders - should be printed according to the current print options. - After printing the view options are restored - -----------------------------------------------------------------------*/ -class SwViewOptionAdjust_Impl -{ - ViewShell & m_rShell; - SwViewOption m_aOldViewOptions; - -public: - SwViewOptionAdjust_Impl( ViewShell& rSh, const SwViewOption &rViewOptions ); - ~SwViewOptionAdjust_Impl(); - void AdjustViewOptions( SwPrintData const* const pPrtOptions ); - bool checkShell( const ViewShell& rCompare ) const - { return &rCompare == &m_rShell; } -}; - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx deleted file mode 100644 index d67264486a..0000000000 --- a/sw/inc/usrfld.hxx +++ /dev/null @@ -1,131 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_USRFLD_HXX -#define SW_USRFLD_HXX - -#include "swdllapi.h" -#include "fldbas.hxx" - -class SfxPoolItem; -class SwCalc; -class SwDoc; - - -class SW_DLLPUBLIC SwUserFieldType : public SwValueFieldType -{ - sal_Bool bValidValue : 1; - sal_Bool bDeleted : 1; - double nValue; - String aName; - String aContent; - sal_uInt16 nType; - -public: - SwUserFieldType( SwDoc* pDocPtr, const String& ); - - virtual const String& GetName() const; - virtual SwFieldType* Copy() const; - - String Expand(sal_uInt32 nFmt, sal_uInt16 nSubType, sal_uInt16 nLng); - - String GetContent( sal_uInt32 nFmt = 0 ); - void SetContent( const String& rStr, sal_uInt32 nFmt = 0 ); - - inline sal_Bool IsValid() const; - inline void ChgValid( sal_Bool bNew ); - - double GetValue(SwCalc& rCalc); // Recalculate member nValue. - inline double GetValue() const; - inline void SetValue(const double nVal); - - inline sal_uInt16 GetType() const; - inline void SetType(sal_uInt16); - - sal_Bool IsDeleted() const { return bDeleted; } - void SetDeleted( sal_Bool b ) { bDeleted = b; } - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId ); - -protected: - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ); -}; - -inline sal_Bool SwUserFieldType::IsValid() const - { return bValidValue; } - -inline void SwUserFieldType::ChgValid( sal_Bool bNew ) - { bValidValue = bNew; } - -inline double SwUserFieldType::GetValue() const - { return nValue; } - -inline void SwUserFieldType::SetValue(const double nVal) - { nValue = nVal; } - -inline sal_uInt16 SwUserFieldType::GetType() const - { return nType; } - -inline void SwUserFieldType::SetType(sal_uInt16 nSub) -{ - nType = nSub; - EnableFormat(!(nSub & nsSwGetSetExpType::GSE_STRING)); -} - - -class SW_DLLPUBLIC SwUserField : public SwValueField -{ - sal_uInt16 nSubType; - - virtual String Expand() const; - virtual SwField* Copy() const; - -public: - SwUserField(SwUserFieldType*, sal_uInt16 nSub = 0, sal_uInt32 nFmt = 0); - - virtual sal_uInt16 GetSubType() const; - virtual void SetSubType(sal_uInt16 nSub); - - virtual double GetValue() const; - virtual void SetValue( const double& rVal ); - - virtual String GetFieldName() const; - - // Name cannot be changed. - virtual const String& GetPar1() const; - - // Content. - virtual String GetPar2() const; - virtual void SetPar2(const String& rStr); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ); -}; - -#endif // SW_USRFLD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx deleted file mode 100644 index e90e8fc584..0000000000 --- a/sw/inc/viewopt.hxx +++ /dev/null @@ -1,612 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _VIEWOPT_HXX -#define _VIEWOPT_HXX -#include <tools/gen.hxx> -#include <tools/string.hxx> -#include <tools/color.hxx> - -#include <svx/zoomitem.hxx> -#include "swdllapi.h" -#include "authratr.hxx" - -class SwRect; -class Window; -class OutputDevice; -class ViewShell; -class SwDocShell; -namespace svtools{ class ColorConfig;} - -#define VIEWOPT_1_TAB 0x00000002L -#define VIEWOPT_1_BLANK 0x00000004L -#define VIEWOPT_1_HARDBLANK 0x00000008L -#define VIEWOPT_1_PARAGRAPH 0x00000010L -#define VIEWOPT_1_LINEBREAK 0x00000020L -#define VIEWOPT_1_PAGEBREAK 0x00000040L -#define VIEWOPT_1_COLUMNBREAK 0x00000080L -#define VIEWOPT_1_SOFTHYPH 0x00000100L - -#define VIEWOPT_1_REF 0x00000400L -#define VIEWOPT_1_FLDNAME 0x00000800L -#define VIEWOPT_1_POSTITS 0x00004000L -#define VIEWOPT_1_FLD_HIDDEN 0x00008000L -#define VIEWOPT_1_CHAR_HIDDEN 0x00010000L -#define VIEWOPT_1_GRAPHIC 0x00020000L -#define VIEWOPT_1_TABLE 0x00040000L -#define VIEWOPT_1_DRAW 0x00080000L -#define VIEWOPT_1_CONTROL 0x00100000L -#define VIEWOPT_1_CROSSHAIR 0x00400000L -#define VIEWOPT_1_SNAP 0x00800000L -#define VIEWOPT_1_SYNCHRONIZE 0x01000000L -#define VIEWOPT_1_GRIDVISIBLE 0x02000000L -#define VIEWOPT_1_ONLINESPELL 0x04000000L -#define VIEWOPT_1_RESERVED1 0x10000000L -#define VIEWOPT_1_VIEWMETACHARS 0x20000000L -#define VIEWOPT_1_PAGEBACK 0x40000000L -#define VIEWOPT_1_SOLIDMARKHDL 0x80000000L - -#define VIEWOPT_CORE2_BLACKFONT 0x00000001L -#define VIEWOPT_CORE2_HIDDENPARA 0x00000002L -#define VIEWOPT_CORE2_SMOOTHSCROLL 0x00000004L -#define VIEWOPT_CORE2_CRSR_IN_PROT 0x00000008L -#define VIEWOPT_CORE2_PDF_EXPORT 0x00000010L -#define VIEWOPT_CORE2_PRINTING 0x00000020L -#define VIEWOPT_CORE2_BIGMARKHDL 0x00000040L - -#define VIEWOPT_2_UNUSED1 0x00000100L -#define VIEWOPT_2_UNUSED2 0x00000200L -#define VIEWOPT_2_H_RULER 0x00000400L -#define VIEWOPT_2_VSCROLLBAR 0x00000800L -#define VIEWOPT_2_HSCROLLBAR 0x00001000L -#define VIEWOPT_2_STATUSLINE 0x00002000L -#define VIEWOPT_2_V_RULER 0x00004000L -#define VIEWOPT_2_ANY_RULER 0x00008000L -#define VIEWOPT_2_MODIFIED 0x00010000L -#define VIEWOPT_2_KEEPASPECTRATIO 0x00020000L -#define VIEWOPT_2_GRFKEEPZOOM 0x00040000L -#define VIEWOPT_2_PREVENT_TIPS 0x00100000L -#define VIEWOPT_2_RESERVED3 0x00200000L -#define VIEWOPT_2_RESERVED4 0x00400000L -#define VIEWOPT_2_PRTFORMAT 0x00800000L -#define VIEWOPT_2_SHADOWCRSR 0x01000000L -#define VIEWOPT_2_V_RULER_RIGHT 0x02000000L - - -// Table background. -#define TBL_DEST_CELL 0 -#define TBL_DEST_ROW 1 -#define TBL_DEST_TBL 2 - -// Appearance flags. -#define VIEWOPT_DOC_BOUNDARIES 0x0001 -#define VIEWOPT_OBJECT_BOUNDARIES 0x0002 -#define VIEWOPT_TABLE_BOUNDARIES 0x0004 -#define VIEWOPT_INDEX_SHADINGS 0x0008 -#define VIEWOPT_LINKS 0x0010 -#define VIEWOPT_VISITED_LINKS 0x0020 -#define VIEWOPT_FIELD_SHADINGS 0x0040 -#define VIEWOPT_SECTION_BOUNDARIES 0x0080 -#define VIEWOPT_SHADOW 0x0100 - -// Implementation in core/text/txtpaint.cxx. -extern void SyncVout( const OutputDevice *pOut ); - -class SwViewOption -{ - static Color aDocColor; // color of document boundaries - static Color aDocBoundColor; // color of document boundaries - static Color aObjectBoundColor; // color of object boundaries - static Color aAppBackgroundColor; // application background - static Color aTableBoundColor; // color of table boundaries - static Color aFontColor; - static Color aIndexShadingsColor; // background color of indexes - static Color aLinksColor; - static Color aVisitedLinksColor; - static Color aDirectCursorColor; - static Color aTextGridColor; - static Color aSpellColor; // mark color of online spell checking - static Color aSmarttagColor; - static Color aFieldShadingsColor; - static Color aSectionBoundColor; - static Color aPageBreakColor; - static Color aScriptIndicatorColor; - static Color aShadowColor; - - static sal_Int32 nAppearanceFlags; -protected: - static sal_uInt16 nPixelTwips;// 1 Pixel == ? Twips - - String sSymbolFont; // Symbolfont. - sal_uInt32 nCoreOptions; // Bits for ViewShell. - sal_uInt32 nCore2Options; // Bits for ViewShell. - sal_uInt32 nUIOptions; // UI-Bits - Color aRetoucheColor; // DefaultBackground for BrowseView - Size aSnapSize; // Describes horizontal and vertical snap. - sal_uInt16 mnViewLayoutColumns;// # columns for edit view - short nDivisionX; // Grid division. - short nDivisionY; - sal_uInt8 nPagePrevRow; // Page Preview Row/Columns. - sal_uInt8 nPagePrevCol; // Page Preview Row/Columns. - sal_uInt8 nShdwCrsrFillMode; // FillMode for ShadowCrsr. - sal_Bool bReadonly : 1; // Readonly-Doc. - sal_Bool bStarOneSetting : 1;// Prevent from UI automatics (no scrollbars in readonly documents). - sal_Bool bIsPagePreview : 1; // The preview mustn't print field/footnote/... shadings. - sal_Bool bSelectionInReadonly : 1; // Determines whether selection is switched on in readonly documents. - sal_Bool mbFormView : 1; - sal_Bool mbBrowseMode : 1; // swmod 080130. - sal_Bool mbBookView : 1; // View mode for page preview. - sal_Bool mbViewLayoutBookMode : 1; // Book view mode for edit view. - sal_Bool bShowPlaceHolderFields : 1; // Only used in printing! - mutable bool bIdle; - - // Scale - sal_uInt16 nZoom; // In percent. - SvxZoomType eZoom; // 'enum' for zoom. - - sal_uInt8 nTblDest; // Destination for table background. - -#if OSL_DEBUG_LEVEL > 1 - // Corresponds to statements in ui/config/cfgvw.src. - sal_Bool bTest1 :1; // Test-flag "Layout not loading" - sal_Bool bTest2 :1; // Test-flag "WYSIWYG++" - sal_Bool bTest3 :1; // Test-flag "" - sal_Bool bTest4 :1; // Test-flag "WYSIWYG debug" - sal_Bool bTest5 :1; // Test-flag "No idle format" - sal_Bool bTest6 :1; // Test-flag "No screen adj" - sal_Bool bTest7 :1; // Test-flag "win format" - sal_Bool bTest8 :1; // Test-flag "" - static sal_Bool bTest9; // Test-Flag "DrawingLayerNotLoading" - sal_Bool bTest10 :1; // Test-Flag "Format by Input" -#endif - -public: - SwViewOption(); // CTOR - SwViewOption(const SwViewOption&); - ~SwViewOption(); - - void Init( Window *pWin ); // Initializing of static data. - - sal_uInt16 GetPixelTwips() const { return nPixelTwips; } - - inline sal_uInt32 GetCoreOptions() const {return nCoreOptions;} - inline void SetUIOptions( const SwViewOption& ); - -/*--------------------------------------------------------------------------- - Options from nCoreOptions -----------------------------------------------------------------------------*/ - - inline sal_Bool IsIdle() const - { return bIdle; } - - // Logically this is a const function since it does not modify the viewoptions - // but only effects idle formatting. Of course that member is already implement - // in the wrong place here... Also currently there are many const modifying casts in the code - // just to call this function on otherwise const objects. Thus declaring it as const now. - inline void SetIdle( sal_Bool b ) const - { bIdle = b; } - - inline sal_Bool IsTab(sal_Bool bHard = sal_False) const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) && - ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) - ? sal_True : sal_False; } - inline void SetTab( sal_Bool b ) { - (b != 0) ? (nCoreOptions |= VIEWOPT_1_TAB ) : ( nCoreOptions &= ~VIEWOPT_1_TAB); } - - inline sal_Bool IsBlank(sal_Bool bHard = sal_False) const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_BLANK) && - ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) - ? sal_True : sal_False; } - inline void SetBlank( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_BLANK ) : ( nCoreOptions &= ~VIEWOPT_1_BLANK); } - - inline sal_Bool IsHardBlank() const - { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? sal_True : sal_False; } - inline void SetHardBlank( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_HARDBLANK ) : ( nCoreOptions &= ~VIEWOPT_1_HARDBLANK); } - - inline sal_Bool IsParagraph(sal_Bool bHard = sal_False) const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_PARAGRAPH) && - ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) - ? sal_True : sal_False; } - inline void SetParagraph( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PARAGRAPH ) : ( nCoreOptions &= ~VIEWOPT_1_PARAGRAPH); } - - inline sal_Bool IsLineBreak(sal_Bool bHard = sal_False) const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_LINEBREAK) && - ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) - ? sal_True : sal_False; } - inline void SetLineBreak( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_LINEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_LINEBREAK); } - - inline void SetPageBreak( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBREAK); } - - inline void SetColumnBreak( sal_Bool b) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_COLUMNBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_COLUMNBREAK); } - - inline sal_Bool IsSoftHyph() const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? sal_True : sal_False; } - inline void SetSoftHyph( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOFTHYPH ) : ( nCoreOptions &= ~VIEWOPT_1_SOFTHYPH); } - - inline sal_Bool IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? sal_True : sal_False; } - inline void SetFldName( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLDNAME ) : ( nCoreOptions &= ~VIEWOPT_1_FLDNAME); } - - inline sal_Bool IsPostIts() const - { return (nCoreOptions & VIEWOPT_1_POSTITS) ? sal_True : sal_False; } - inline void SetPostIts( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_POSTITS ) : ( nCoreOptions &= ~VIEWOPT_1_POSTITS); } - void PaintPostIts( OutputDevice *pOut, const SwRect &rRect, - sal_Bool bIsScript ) const; - sal_uInt16 GetPostItsWidth( const OutputDevice *pOut = 0 ) const; - - inline sal_Bool IsShowHiddenChar(sal_Bool bHard = sal_False) const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_CHAR_HIDDEN) && - ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) - ? sal_True : sal_False; } - - inline void SetShowHiddenChar( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CHAR_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_CHAR_HIDDEN); } - - - inline sal_Bool IsShowHiddenField() const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLD_HIDDEN) ? sal_True : sal_False; } - inline void SetShowHiddenField( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLD_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_FLD_HIDDEN); } - - inline sal_Bool IsGraphic() const - { return nCoreOptions & VIEWOPT_1_GRAPHIC ? sal_True : sal_False; } - inline void SetGraphic( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRAPHIC ) : ( nCoreOptions &= ~VIEWOPT_1_GRAPHIC); } - - inline sal_Bool IsPageBack() const - { return nCoreOptions & VIEWOPT_1_PAGEBACK ? sal_True : sal_False; } - inline void SetPageBack( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBACK) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBACK); } - - inline sal_Bool IsSolidMarkHdl() const - { return nCoreOptions & VIEWOPT_1_SOLIDMARKHDL ? sal_True : sal_False; } - inline void SetSolidMarkHdl( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOLIDMARKHDL) : ( nCoreOptions &= ~VIEWOPT_1_SOLIDMARKHDL); } - - inline sal_Bool IsBigMarkHdl() const - { return nCore2Options & VIEWOPT_CORE2_BIGMARKHDL ? sal_True : sal_False;} - inline void SetBigMarkHdl(sal_Bool b) - { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BIGMARKHDL ) : (nCore2Options &= ~VIEWOPT_CORE2_BIGMARKHDL);} - - inline sal_Bool IsTable() const - { return nCoreOptions & VIEWOPT_1_TABLE ? sal_True : sal_False; } - inline void SetTable( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_TABLE ) : ( nCoreOptions &= ~VIEWOPT_1_TABLE); } - - inline sal_Bool IsDraw() const - { return nCoreOptions & VIEWOPT_1_DRAW ? sal_True : sal_False; } - inline void SetDraw( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_DRAW ) : ( nCoreOptions &= ~VIEWOPT_1_DRAW); } - - inline sal_Bool IsControl() const - { return nCoreOptions & VIEWOPT_1_CONTROL ? sal_True : sal_False; } - inline void SetControl( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CONTROL ) : ( nCoreOptions &= ~VIEWOPT_1_CONTROL); } - - inline sal_Bool IsSnap() const - { return nCoreOptions & VIEWOPT_1_SNAP ? sal_True : sal_False; } - inline void SetSnap( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SNAP ) : ( nCoreOptions &= ~VIEWOPT_1_SNAP); } - - inline void SetSnapSize( Size &rSz ){ aSnapSize = rSz; } - inline const Size &GetSnapSize() const { return aSnapSize; } - - inline sal_Bool IsGridVisible() const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? sal_True : sal_False; } - inline void SetGridVisible( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRIDVISIBLE ) : ( nCoreOptions &= ~VIEWOPT_1_GRIDVISIBLE); } - - inline sal_Bool IsOnlineSpell() const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? sal_True : sal_False; } - inline void SetOnlineSpell( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL); } - - inline sal_Bool IsViewMetaChars() const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? sal_True : sal_False; } - inline void SetViewMetaChars( sal_Bool b) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_VIEWMETACHARS ) : ( nCoreOptions &= ~VIEWOPT_1_VIEWMETACHARS); } - - inline sal_Bool IsSynchronize() const - { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? sal_True : sal_False;} - inline void SetSynchronize( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SYNCHRONIZE ) : ( nCoreOptions &= ~VIEWOPT_1_SYNCHRONIZE); } - - inline sal_Bool IsCrossHair() const - { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? sal_True : sal_False; } - inline void SetCrossHair( sal_Bool b ) - { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CROSSHAIR ) : ( nCoreOptions &= ~VIEWOPT_1_CROSSHAIR); } - -/*--------------------------------------------------------------------------- - Options from nCore2Options -----------------------------------------------------------------------------*/ - inline sal_Bool IsBlackFont() const - {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? sal_True : sal_False;} - - inline void SetBlackFont(sal_Bool b) - { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BLACKFONT) : (nCore2Options &= ~VIEWOPT_CORE2_BLACKFONT);} - - inline sal_Bool IsShowHiddenPara() const - {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? sal_True : sal_False;} - - inline void SetShowHiddenPara(sal_Bool b) - { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_HIDDENPARA) : (nCore2Options &= ~VIEWOPT_CORE2_HIDDENPARA);} - - inline sal_Bool IsSmoothScroll() const - {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? sal_True : sal_False;} - - inline void SetSmoothScroll(sal_Bool b) - { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_SMOOTHSCROLL) : (nCore2Options &= ~VIEWOPT_CORE2_SMOOTHSCROLL);} - - inline sal_Bool IsCursorInProtectedArea() const - {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? sal_True : sal_False;} - - inline void SetCursorInProtectedArea(sal_Bool b) - { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_CRSR_IN_PROT) : (nCore2Options &= ~VIEWOPT_CORE2_CRSR_IN_PROT);} - - inline sal_Bool IsPDFExport() const - {return nCore2Options & VIEWOPT_CORE2_PDF_EXPORT ? sal_True : sal_False;} - - inline void SetPDFExport(sal_Bool b) - { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PDF_EXPORT) : (nCore2Options &= ~VIEWOPT_CORE2_PDF_EXPORT);} - - inline sal_Bool IsPrinting() const - {return nCore2Options & VIEWOPT_CORE2_PRINTING ? sal_True : sal_False;} - - inline void SetPrinting(sal_Bool b) - { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PRINTING) : (nCore2Options &= ~VIEWOPT_CORE2_PRINTING);} - - inline short GetDivisionX() const { return nDivisionX; } - inline void SetDivisionX( short n ){ nDivisionX = n; } - inline short GetDivisionY() const { return nDivisionY; } - inline void SetDivisionY( short n ){ nDivisionY = n; } - - inline sal_uInt8 GetPagePrevRow() const { return nPagePrevRow; } - inline void SetPagePrevRow( sal_uInt8 n ) { nPagePrevRow = n; } - inline sal_uInt8 GetPagePrevCol() const { return nPagePrevCol; } - inline void SetPagePrevCol( sal_uInt8 n ) { nPagePrevCol = n; } - sal_Bool IsReadonly() const { return bReadonly; } - void SetReadonly(sal_Bool bSet) { bReadonly = bSet; } - - sal_Bool IsSelectionInReadonly() const {return bSelectionInReadonly;} - void SetSelectionInReadonly(sal_Bool bSet) {bSelectionInReadonly = bSet;} - - sal_Bool IsFormView() const { return mbFormView; } - void SetFormView( sal_Bool bSet ) { mbFormView = bSet; } - - inline sal_Bool getBrowseMode() const { return mbBrowseMode; } - inline void setBrowseMode(sal_Bool bSet) { mbBrowseMode = bSet; } - inline sal_Bool IsPagePrevBookview() const { return mbBookView; } - inline void SetPagePrevBookview(sal_Bool bSet) { mbBookView = bSet; } - - sal_Bool IsAutoCompleteWords() const; - - bool IsViewLayoutBookMode() const { return mbViewLayoutBookMode; } - void SetViewLayoutBookMode( bool bNew ) { mbViewLayoutBookMode = bNew; } - sal_uInt16 GetViewLayoutColumns() const { return mnViewLayoutColumns; } - void SetViewLayoutColumns( sal_uInt16 nNew ) { mnViewLayoutColumns = nNew; } - -#if OSL_DEBUG_LEVEL > 1 - // Correspond to statements in ui/config/cfgvw.src. - inline sal_Bool IsTest1() const { return bTest1; } - inline void SetTest1( sal_Bool b ) { bTest1 = b; } - inline sal_Bool IsTest2() const { return bTest2; } - inline void SetTest2( sal_Bool b ) { bTest2 = b; } - inline sal_Bool IsTest3() const { return bTest3; } - inline void SetTest3( sal_Bool b ) { bTest3 = b; } - inline sal_Bool IsTest4() const { return bTest4; } - inline void SetTest4( sal_Bool b ) { bTest4 = b; } - inline sal_Bool IsTest5() const { return bTest5; } - inline void SetTest5( sal_Bool b ) { bTest5 = b; } - inline sal_Bool IsTest6() const { return bTest6; } - inline void SetTest6( sal_Bool b ) { bTest6 = b; } - inline sal_Bool IsTest7() const { return bTest7; } - inline void SetTest7( sal_Bool b ) { bTest7 = b; } - inline sal_Bool IsTest8() const { return bTest8; } - inline void SetTest8( sal_Bool b ) { bTest8 = b; } - static inline sal_Bool IsTest9() { return bTest9; } - static inline void SetTest9( sal_Bool b ) { bTest9 = b; } - inline sal_Bool IsTest10() const { return bTest10; } - inline void SetTest10( sal_Bool b ) { bTest10 = b; } -#endif - - inline sal_uInt16 GetZoom() const { return nZoom; } - inline void SetZoom( sal_uInt16 n ){ nZoom = n; } - - void DrawRect( OutputDevice* pOut, const SwRect &rRect, long nCol ) const; - void DrawRectPrinter( OutputDevice* pOut, const SwRect& rRect ) const; - - SwViewOption& operator=( const SwViewOption &rOpt ); - - // Compare methods. - sal_Bool IsEqualFlags ( const SwViewOption &rOpt ) const; - inline sal_Bool operator == ( const SwViewOption &rOpt ) const; - inline sal_Bool operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); } - - -/*--------------------------------------------------------------------------- - Options from nUIOptions -----------------------------------------------------------------------------*/ - - sal_Bool IsViewVScrollBar() const - { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? sal_True : sal_False; } - sal_Bool IsViewHScrollBar() const - { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? sal_True : sal_False; } - sal_Bool IsKeepRatio() const - { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? sal_True : sal_False; } - sal_Bool IsGrfKeepZoom() const - { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? sal_True : sal_False; } - sal_Bool IsPreventTips() const - { return nUIOptions & VIEWOPT_2_PREVENT_TIPS ? sal_True : sal_False; } - sal_Bool IsPrtFormat() const - { return nUIOptions & VIEWOPT_2_PRTFORMAT ? sal_True : sal_False; } - - SvxZoomType GetZoomType() const { return eZoom; } - - sal_uInt8 GetTblDest() const { return nTblDest; } - - void SetViewVScrollBar(sal_Bool b) - { b ? (nUIOptions |= VIEWOPT_2_VSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_VSCROLLBAR); } - void SetViewHScrollBar(sal_Bool b) - { b ? (nUIOptions |= VIEWOPT_2_HSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_HSCROLLBAR); } - void SetKeepRatio (sal_Bool b) - { b ? (nUIOptions |= VIEWOPT_2_KEEPASPECTRATIO ) : ( nUIOptions &= ~VIEWOPT_2_KEEPASPECTRATIO); } - void SetGrfKeepZoom (sal_Bool b) - { b ? (nUIOptions |= VIEWOPT_2_GRFKEEPZOOM ) : ( nUIOptions &= ~VIEWOPT_2_GRFKEEPZOOM); } - void SetPreventTips( sal_Bool b) - { b ? (nUIOptions |= VIEWOPT_2_PREVENT_TIPS) : (nUIOptions &= ~VIEWOPT_2_PREVENT_TIPS); } - void SetPrtFormat( sal_Bool b) - { b ? (nUIOptions |= VIEWOPT_2_PRTFORMAT) : (nUIOptions &= ~VIEWOPT_2_PRTFORMAT); } - - void SetZoomType (SvxZoomType eZoom_){ eZoom = eZoom_; } - void SetTblDest( sal_uInt8 nNew ) { nTblDest = nNew; } - - const String& GetSymbolFont() const {return sSymbolFont;} - void SetSymbolFont(const String& sSet) {sSymbolFont = sSet;} - - const Color& GetRetoucheColor() const { return aRetoucheColor;} - void SetRetoucheColor(const Color&r) { aRetoucheColor = r; } - - sal_Bool IsViewAnyRuler() const {return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);} - void SetViewAnyRuler(sal_Bool bSet) - { bSet ? (nUIOptions |= VIEWOPT_2_ANY_RULER) : (nUIOptions &= ~VIEWOPT_2_ANY_RULER);} - - sal_Bool IsViewHRuler(sal_Bool bDirect = sal_False) const - { - sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect ? - 0 != (nUIOptions & VIEWOPT_2_H_RULER) : - !bReadonly ? - (nUIOptions & (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER) - : sal_False ); - return bRet; - - } - void SetViewHRuler (sal_Bool b) - { b ? (nUIOptions |= VIEWOPT_2_H_RULER ) : ( nUIOptions &= ~VIEWOPT_2_H_RULER);} - - sal_Bool IsViewVRuler(sal_Bool bDirect = sal_False) const - { - sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect ? - 0 !=(nUIOptions & VIEWOPT_2_V_RULER) : - !bReadonly ? - (nUIOptions & - (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER) - : sal_False ); - return bRet; - } - void SetViewVRuler (sal_Bool b) - { b ? (nUIOptions |= VIEWOPT_2_V_RULER ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER);} - - // ShadowCursor, switch on/off, get/set color/mode. - sal_Bool IsShadowCursor() const - { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? sal_True : sal_False; } - void SetShadowCursor(sal_Bool b) - { b ? (nUIOptions |= VIEWOPT_2_SHADOWCRSR ) : ( nUIOptions &= ~VIEWOPT_2_SHADOWCRSR); } - - //move vertical ruler to the right - sal_Bool IsVRulerRight() const - { return nUIOptions & VIEWOPT_2_V_RULER_RIGHT ? sal_True : sal_False; } - void SetVRulerRight(sal_Bool b) - { b ? (nUIOptions |= VIEWOPT_2_V_RULER_RIGHT ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER_RIGHT); } - - sal_Bool IsStarOneSetting() const {return bStarOneSetting; } - void SetStarOneSetting(sal_Bool bSet) {bStarOneSetting = bSet; } - - sal_Bool IsPagePreview() const {return bIsPagePreview; } - void SetPagePreview(sal_Bool bSet) { bIsPagePreview= bSet; } - - sal_uInt8 GetShdwCrsrFillMode() const { return nShdwCrsrFillMode; } - void SetShdwCrsrFillMode( sal_uInt8 nMode ) { nShdwCrsrFillMode = nMode; }; - - sal_Bool IsShowPlaceHolderFields() const { return bShowPlaceHolderFields; } - void SetShowPlaceHolderFields(sal_Bool bSet) { bShowPlaceHolderFields = bSet; } - - static Color& GetDocColor(); - static Color& GetDocBoundariesColor(); - static Color& GetAppBackgroundColor(); - static Color& GetObjectBoundariesColor(); - static Color& GetTableBoundariesColor(); - static Color& GetIndexShadingsColor(); - static Color& GetLinksColor(); - static Color& GetVisitedLinksColor(); - static Color& GetDirectCursorColor(); - static Color& GetTextGridColor(); - static Color& GetSpellColor(); - static Color& GetSmarttagColor(); - static Color& GetShadowColor(); - SW_DLLPUBLIC static Color& GetFontColor(); - static Color& GetFieldShadingsColor(); - static Color& GetSectionBoundColor(); - static Color& GetPageBreakColor(); - - static sal_Bool IsAppearanceFlag(sal_Int32 nFlag); - - static sal_Bool IsDocBoundaries() {return IsAppearanceFlag(VIEWOPT_DOC_BOUNDARIES);} - static sal_Bool IsObjectBoundaries(){return IsAppearanceFlag(VIEWOPT_OBJECT_BOUNDARIES);} - static sal_Bool IsTableBoundaries() {return IsAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES );} - static sal_Bool IsIndexShadings() {return IsAppearanceFlag(VIEWOPT_INDEX_SHADINGS );} - static sal_Bool IsLinks() {return IsAppearanceFlag(VIEWOPT_LINKS );} - static sal_Bool IsVisitedLinks() {return IsAppearanceFlag(VIEWOPT_VISITED_LINKS );} - static sal_Bool IsFieldShadings() {return IsAppearanceFlag(VIEWOPT_FIELD_SHADINGS);} - static sal_Bool IsSectionBoundaries() {return IsAppearanceFlag(VIEWOPT_SECTION_BOUNDARIES);} - static sal_Bool IsShadow() {return IsAppearanceFlag(VIEWOPT_SHADOW );} - - static void SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig = sal_False); - - void SetDocBoundaries(sal_Bool bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);} - - static void ApplyColorConfigValues(const svtools::ColorConfig& rConfig); -}; - - -inline sal_Bool SwViewOption::operator==( const SwViewOption &rOpt ) const -{ - return IsEqualFlags( rOpt ) && nZoom == rOpt.GetZoom(); -} - -inline void SwViewOption::SetUIOptions( const SwViewOption& rVOpt ) -{ - nUIOptions = rVOpt.nUIOptions; - nTblDest = rVOpt.nTblDest; - nShdwCrsrFillMode = rVOpt.nShdwCrsrFillMode; -} - - -// Helper function for checking HTML-capabilities. -SW_DLLPUBLIC sal_uInt16 GetHtmlMode(const SwDocShell*); - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx deleted file mode 100644 index 322da74c6c..0000000000 --- a/sw/inc/viewsh.hxx +++ /dev/null @@ -1,619 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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_VIEWSH_HXX -#define SW_VIEWSH_HXX - -#include <com/sun/star/embed/XClassifiedObject.hpp> -#include <com/sun/star/embed/XEmbeddedObject.hpp> -#include <tools/rtti.hxx> -#include <svl/svarray.hxx> -#include "swdllapi.h" -#include <swtypes.hxx> -#include <ring.hxx> -#include <swrect.hxx> -#include <boost/shared_ptr.hpp> // swmod 080115 -#include <stack> -#include <vcl/mapmod.hxx> -#include <vcl/print.hxx> - -namespace com { namespace sun { namespace star { namespace accessibility { - class XAccessible; } } } } - -class SfxObjectShellRef; -class SwDoc; -class IDocumentSettingAccess; -class IDocumentDeviceAccess; -class IDocumentMarkAccess; -class IDocumentDrawModelAccess; -class IDocumentRedlineAccess; -class IDocumentLayoutAccess; -class IDocumentFieldsAccess; -class IDocumentContentOperations; -class IDocumentStylePoolAccess; -class IDocumentStatistics; -class IDocumentUndoRedo; -class IDocumentListItems; -class IDocumentOutlineNodes; -class SfxPrinter; -class SfxProgress; -class SwRootFrm; -class SwNodes; -class SdrView; -class SfxItemPool; -class SfxViewShell; -class SwViewOption; -class SwViewImp; -class SwPrintData; -class SwPagePreViewPrtData; -class Window; -class OutputDevice; -class SwLayIdle; -struct ShellResource; -class SwRegionRects; -class SwFrm; -class SvtAccessibilityOptions; -class SwPagePreviewLayout; -class SwTxtFrm; -class BitmapEx; - -struct SwAccessibilityOptions; -class Region; -class SwPostItMgr; -class SdrPaintWindow; -class SwAccessibleMap; - -namespace vcl -{ - class OldStylePrintAdaptor; -} - - -// Define for flags needed in ctor or layers below. -// Currently the PreView flag is needed for DrawPage. -#define VSHELLFLAG_ISPREVIEW ((long)0x1) -#define VSHELLFLAG_SHARELAYOUT ((long)0x2)//swmod 080125 flag -typedef boost::shared_ptr<SwRootFrm> SwRootFrmPtr; - -class SW_DLLPUBLIC ViewShell : public Ring -{ - friend void SetOutDev( ViewShell *pSh, OutputDevice *pOut ); - friend void SetOutDevAndWin( ViewShell *pSh, OutputDevice *pOut, - Window *pWin, sal_uInt16 nZoom ); - - friend class SwViewImp; - friend class SwLayIdle; - - // For setting visible area for page preview paint. - friend class SwPagePreviewLayout; - - - // Set SwVisArea in order to enable clean formatting before printing. - friend void SetSwVisArea( ViewShell *pSh, const SwRect &, sal_Bool bPDFExport = sal_False ); - - static BitmapEx* pReplaceBmp; // replaced display of still loaded images - static BitmapEx* pErrorBmp; // error display of missed images - - static sal_Bool bLstAct; // sal_True if EndAction of last Shell - // i.e. if the EndActions of the other - // Shells on the document are through. - - Point aPrtOffst; // Ofst for Printer, - // non-printable margin. - Size aBrowseBorder; // Border for frame documents. - SwRect aInvalidRect; - - SfxViewShell *pSfxViewShell; - SwViewImp *pImp; // Core-internals of ViewShell. - // The pointer is never 0. - - Window *pWin; // = 0 during printing or pdf export - OutputDevice *pOut; // Window, Printer, VirtDev, ... - OutputDevice* mpTmpRef; // Temporariy reference device. Is used - // during (printer depending) prospect - // and page preview printing - // (because a scaling has to be set at - // the original printer) - - SwViewOption *pOpt; - SwAccessibilityOptions* pAccOptions; - - - sal_Bool bDocSizeChgd :1; // For DocChgNotify(): Announce new DocSize - // at EndAction to DocMDI. - sal_Bool bPaintWorks :1; // Normal Painting if sal_True, - // remember Paint if sal_False. - sal_Bool bPaintInProgress :1; // Block any double paint. - sal_Bool bViewLocked :1; // Lock visible range; - // in this case MakeVisible is ineffectual. - sal_Bool bInEndAction :1; // Avoid problems, cf. viewsh.cxx. - sal_Bool bPreView :1; // If sal_True it is a PreView-ViewShell. - sal_Bool bFrameView :1; // If sal_True it is a (HTML-)Frame. - sal_Bool bEnableSmooth :1; // Disable SmoothScroll, e.g. for drag - // of scrollbars. - sal_Bool bEndActionByVirDev:1; // Paints from EndAction always via virtual device - sal_Bool bHeaderFooterEdit; - // (e.g. when browsing). - - // boolean, indicating that class in in constructor. - bool mbInConstructor:1; - - SdrPaintWindow* mpTargetPaintWindow; - OutputDevice* mpBufferedOut; - - SwRootFrmPtr pLayout; //swmod 080116 - - // Initialization; called by the diverse constructors. - SW_DLLPRIVATE void Init( const SwViewOption *pNewOpt ); - - inline void ResetInvalidRect(); - - SW_DLLPRIVATE void Reformat(); // Invalidates complete Layout (ApplyViewOption). - - SW_DLLPRIVATE void PaintDesktop( const SwRect & ); // Collect values for painting of desktop - // and calling. - // PaintDesktop split. This pars is also used by PreViewPage. - SW_DLLPRIVATE void _PaintDesktop( const SwRegionRects &rRegion ); - - SW_DLLPRIVATE sal_Bool CheckInvalidForPaint( const SwRect & ); // Direct Paint or rather - // trigger an action. - - SW_DLLPRIVATE void PrepareForPrint( const SwPrintData &rOptions ); - - SW_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt ); - -protected: - static ShellResource* pShellRes; // Resources for the Shell. - static Window* pCareWindow; // Avoid this window. - - SwRect aVisArea; // The modern version of VisArea. - SwDoc *pDoc; // The document; never 0. - - sal_uInt16 nStartAction; // != 0 if at least one ::com::sun::star::chaos::Action is active. - sal_uInt16 nLockPaint; // != 0 if Paint is locked. - -public: - TYPEINFO(); - - SwViewImp *Imp() { return pImp; } - const SwViewImp *Imp() const { return pImp; } - - const SwNodes& GetNodes() const; - - // After change of printer; by Doc. - void InitPrt( OutputDevice *pOutDev ); - - // Bracketing of actions belonging together. - inline void StartAction(); - void ImplStartAction(); - inline void EndAction( const sal_Bool bIdleEnd = sal_False ); - void ImplEndAction( const sal_Bool bIdleEnd = sal_False ); - sal_uInt16 ActionCount() const { return nStartAction; } - sal_Bool ActionPend() const { return nStartAction != 0; } - sal_Bool IsInEndAction() const { return bInEndAction; } - - void SetEndActionByVirDev( sal_Bool b ) { bEndActionByVirDev = b; } - sal_Bool IsEndActionByVirDev() { return bEndActionByVirDev; } - - // The ActionCount for all Shells is temporarily set to zero and then - // restored at the RootFrame via UNO. - void SetRestoreActions(sal_uInt16 nSet); - sal_uInt16 GetRestoreActions() const; - - inline sal_Bool HasInvalidRect() const { return aInvalidRect.HasArea(); } - void ChgHyphenation() { Reformat(); } - void ChgNumberDigits(); - - sal_Bool AddPaintRect( const SwRect &rRect ); - - void InvalidateWindows( const SwRect &rRect ); - - ////////////////////////////////////////////////////////////////////////////// - // #i72754# set of Pre/PostPaints with lock counter and initial target OutDev -protected: - std::stack<Region> mPrePostPaintRegions; // acts also as a lock counter (empty == not locked) - OutputDevice* mpPrePostOutDev; - MapMode maPrePostMapMode; -public: - void PrePaint(); - void DLPrePaint2(const Region& rRegion); - void DLPostPaint2(bool bPaintFormLayer); - const MapMode& getPrePostMapMode() const { return maPrePostMapMode; } - ////////////////////////////////////////////////////////////////////////////// - - virtual void Paint(const Rectangle &rRect); - sal_Bool IsPaintInProgress() const { return bPaintInProgress; } - bool IsDrawingLayerPaintInProgress() const { return !mPrePostPaintRegions.empty(); } - - // Notification that visible area has been changed. - // VisArea is reset, after that scrolling takes place. - // The passed rect is situated on pixel borders - // in order to avoid pixel errors when scrolling. - virtual void VisPortChgd( const SwRect & ); - sal_Bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser - void EnableSmooth( sal_Bool b ) { bEnableSmooth = b; } - - const SwRect& VisArea() const { return aVisArea; } - - // If necessary scroll until passed Rect is situated in visible sector. - void MakeVisible( const SwRect & ); - - // At nearest occasion pass new document size to UI. - void SizeChgNotify(); - void UISizeNotify(); // Passing of current size. - - Point GetPagePos( sal_uInt16 nPageNum ) const; - - sal_uInt16 GetNumPages(); // Ask count of current pages from layout. - sal_Bool IsDummyPage( sal_uInt16 nPageNum ) const; // An empty page? - - // Invalidate first visible page for all Shells in ring. - void SetFirstVisPageInvalid(); - - SwRootFrm *GetLayout() const;// swmod 080116 - sal_Bool IsNewLayout() const; // Has Layout been loaded or created? - - Size GetDocSize() const; // Get document size. - - void CalcLayout(); // Force complete formatting of layout. - - sal_uInt16 GetPageCount() const; - - const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const; - - inline SwDoc *GetDoc() const { return pDoc; } //Never 0. - - /** Provides access to the document setting interface - */ - const IDocumentSettingAccess* getIDocumentSettingAccess() const; - IDocumentSettingAccess* getIDocumentSettingAccess(); - - /** Provides access to the document device interface - */ - const IDocumentDeviceAccess* getIDocumentDeviceAccess() const; - IDocumentDeviceAccess* getIDocumentDeviceAccess(); - - /** Provides access to the document bookmark interface - */ - const IDocumentMarkAccess* getIDocumentMarkAccess() const; - IDocumentMarkAccess* getIDocumentMarkAccess(); - - /** Provides access to the document draw model interface - */ - const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const; - IDocumentDrawModelAccess* getIDocumentDrawModelAccess(); - - /** Provides access to the document redline interface - */ - const IDocumentRedlineAccess* getIDocumentRedlineAccess() const; - IDocumentRedlineAccess* getIDocumentRedlineAccess(); - - /** Provides access to the document layout interface - */ - const IDocumentLayoutAccess* getIDocumentLayoutAccess() const; - IDocumentLayoutAccess* getIDocumentLayoutAccess(); - - /** Provides access to the document fields administration interface - */ - const IDocumentFieldsAccess* getIDocumentFieldsAccess() const; - - /** Provides access to the content operations interface - */ - IDocumentContentOperations* getIDocumentContentOperations(); - - /** Provides access to the document style pool interface - */ - IDocumentStylePoolAccess* getIDocumentStylePoolAccess(); - - /** Provides access to the document statistics interface - */ - const IDocumentStatistics* getIDocumentStatistics() const; - - /** Provides access to the document undo/redo interface - */ - IDocumentUndoRedo const& GetIDocumentUndoRedo() const; - IDocumentUndoRedo & GetIDocumentUndoRedo(); - - const IDocumentListItems* getIDocumentListItemsAccess() const; - const IDocumentOutlineNodes* getIDocumentOutlineNodesAccess() const; - - // 1. GetRefDev: Either the printer or the virtual device from the doc - // 2. GetWin: Available if we not printing - // 3. GetOut: Printer, Window or Virtual device - OutputDevice& GetRefDev() const; - inline Window* GetWin() const { return pWin; } - inline OutputDevice* GetOut() const { return pOut; } - - static inline sal_Bool IsLstEndAction() { return ViewShell::bLstAct; } - - // Change of all page descriptors. - void ChgAllPageOrientation( sal_uInt16 eOri ); - void ChgAllPageSize( Size &rSz ); - - // Printing of one page. - // bIsPDFExport == true is: do PDF Export (no printing!) - sal_Bool PrintOrPDFExport( OutputDevice *pOutDev, - SwPrintData const& rPrintData, - sal_Int32 nRenderer /* offset in vector of pages to print */ ); - - // Printing of one brochure page. - void PrintProspect( OutputDevice *pOutDev, const SwPrintData &rPrintData, - sal_Int32 nRenderer /* offset in vector of page pairs for prospect printing */ ); - - // Printing for OLE 2.0. - static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions, - OutputDevice* pOleOut, const Rectangle& rRect ); - - // Fill temporary doc with selected text for Print or PDF export. - SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt ); - - // Called internally for Shell. Formats pages. - void CalcPagesForPrint( sal_uInt16 nMax ); - - // All about fields. - void UpdateFlds(sal_Bool bCloseDB = sal_False); - sal_Bool IsAnyFieldInDoc() const; - // Update all charts, for that exists any table. - void UpdateAllCharts(); - sal_Bool HasCharts() const; - - // DOCUMENT COMPATIBILITY FLAGS START - - // Add or maximize paragraph spacing? - void SetParaSpaceMax( bool bNew ); - - // Add or maximize paragraph spacing? - void SetParaSpaceMaxAtPages( bool bNew ); - - // Compatible behaviour of tabs. - void SetTabCompat( bool bNew ); - - // Font metric attribute "External Leading" should be considered. - void SetAddExtLeading( bool bNew ); - - // Formatting by virtual device or printer. - void SetUseVirDev( bool nNew ); - - // Adding paragraph and table spacing at bottom - // of table cells. - void SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells ); - - // Former formatting of text lines with - // proportional line spacing or not. - void SetUseFormerLineSpacing( bool _bUseFormerLineSpacing ); - - // Former object positioning. - void SetUseFormerObjectPositioning( bool _bUseFormerObjPos ); - - void SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos ); - - void SetUseFormerTextWrapping( bool _bUseFormerTextWrapping ); - - void SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak ); - - // DOCUMENT COMPATIBILITY FLAGS END - - // Calls Idle-formatter of Layout. - void LayoutIdle(); - - inline const SwViewOption *GetViewOptions() const { return pOpt; } - virtual void ApplyViewOptions( const SwViewOption &rOpt ); - void SetUIOptions( const SwViewOption &rOpt ); - void SetReadonlyOption(sal_Bool bSet); // Set readonly-bit of ViewOptions. - void SetPDFExportOption(sal_Bool bSet); // Set/reset PDF export mode. - void SetPrtFormatOption(sal_Bool bSet); // Set PrtFormat-Bit of ViewOptions. - void SetReadonlySelectionOption(sal_Bool bSet); // Change the selection mode in readonly docs. - - const SwAccessibilityOptions* GetAccessibilityOptions() const { return pAccOptions;} - - static void SetShellRes( ShellResource* pRes ) { pShellRes = pRes; } - static ShellResource* GetShellRes(); - - static void SetCareWin( Window* pNew ); - static Window* GetCareWin(ViewShell& rVSh) - { return pCareWindow ? pCareWindow : CareChildWin(rVSh); } - static Window* CareChildWin(ViewShell& rVSh); - - inline SfxViewShell *GetSfxViewShell() { return pSfxViewShell; } - inline void SetSfxViewShell(SfxViewShell *pNew) { pSfxViewShell = pNew; } - - // Selection of Draw ::com::sun::star::script::Engine has been changed. - virtual void DrawSelChanged(); - - SwPagePreviewLayout* PagePreviewLayout(); - - /** adjust view options for page preview - - Because page preview should show the document as it is printed - - page preview is print preview -, the view options are adjusted to the - same as for printing. - - @param _rPrintOptions - input parameter - constant reference to print options, to which the - view option will be adjusted. - */ - void AdjustOptionsForPagePreview( SwPrintData const& rPrintOptions ); - - sal_Bool IsViewLocked() const { return bViewLocked; } - void LockView( sal_Bool b ) { bViewLocked = b; } - - inline void LockPaint(); - void ImplLockPaint(); - inline void UnlockPaint( sal_Bool bVirDev = sal_False ); - void ImplUnlockPaint( sal_Bool bVirDev ); - sal_Bool IsPaintLocked() const { return nLockPaint != 0; } - - // Get/set DrawView and PageView. - sal_Bool HasDrawView() const; - void MakeDrawView(); - - // DrawView may be used at UI. - SdrView *GetDrawView(); - const SdrView *GetDrawView() const { return ((ViewShell*)this)->GetDrawView(); } - - // Take care that MarkList is up-to-date in any case (Bug 57153). - SdrView *GetDrawViewWithValidMarkList(); - - // Query attribute pool. - inline const SfxItemPool& GetAttrPool() const; - SfxItemPool& GetAttrPool(); - - sal_Bool IsPreView() const { return bPreView; } - - sal_Bool IsFrameView() const { return bFrameView; } - void SetFrameView( const Size& rBrowseBorder ) - { bFrameView = sal_True; aBrowseBorder = rBrowseBorder; } - - // Makes the necessary invalidations: - // If BrowseMode has changed bBrowseChgd == sal_True - // or bBrowseChgd == sal_False in BrowseMode - // if proportions have changed. - void CheckBrowseView( sal_Bool bBrowseChgd ); - - const Size& GetBrowseBorder() const; - sal_Int32 GetBrowseWidth() const; - void SetBrowseBorder( const Size& rNew ); - - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); - - ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible > - CreateAccessiblePreview(); - - void ShowPreViewSelection( sal_uInt16 nSelPage ); - void InvalidateAccessibleFocus(); - - // Apply Accessiblity options. - void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions); - - /** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs - - @author OD - - @param _pFromTxtFrm - input parameter - paragraph frame, for which the relation CONTENT_FLOWS_FROM - has to be invalidated. - If NULL, no CONTENT_FLOWS_FROM relation has to be invalidated - - @param _pToTxtFrm - input parameter - paragraph frame, for which the relation CONTENT_FLOWS_TO - has to be invalidated. - If NULL, no CONTENT_FLOWS_TO relation has to be invalidated - */ - void InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm, - const SwTxtFrm* _pToTxtFrm ); - - /** invalidate text selection for paragraphs - - @author OD - */ - void InvalidateAccessibleParaTextSelection(); - - /** invalidate attributes for paragraphs and paragraph's characters - - usage also for changes of the attributes of - paragraph's characters. - - @author OD - - @param rTxtFrm - input parameter - paragraph frame, whose attributes have changed - */ - void InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm ); - - SwAccessibleMap* GetAccessibleMap(); - - ViewShell( ViewShell&, Window *pWin = 0, OutputDevice *pOut = 0, - long nFlags = 0 ); - ViewShell( SwDoc& rDoc, Window *pWin, - const SwViewOption *pOpt = 0, OutputDevice *pOut = 0, - long nFlags = 0 ); - virtual ~ViewShell(); - - sal_Int32 GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const; - - inline bool IsInConstructor() const { return mbInConstructor; } - - static const BitmapEx& GetReplacementBitmap( bool bIsErrorState ); - static void DeleteReplacementBitmaps(); - - const SwPostItMgr* GetPostItMgr() const { return (const_cast<ViewShell*>(this))->GetPostItMgr(); } - SwPostItMgr* GetPostItMgr(); - - virtual void ToggleHeaderFooterEdit( ); - sal_Bool IsHeaderFooterEdit( ) const { return bHeaderFooterEdit; } -}; - -//---- class CurrShell manages global ShellPointer ------------------- - -class CurrShell -{ -public: - ViewShell *pPrev; - SwRootFrm *pRoot; - - CurrShell( ViewShell *pNew ); - ~CurrShell(); -}; - -inline void ViewShell::ResetInvalidRect() -{ - aInvalidRect.Clear(); -} - -inline void ViewShell::StartAction() -{ - if ( !nStartAction++ ) - ImplStartAction(); -} -inline void ViewShell::EndAction( const sal_Bool bIdleEnd ) -{ - if( 0 == (nStartAction - 1) ) - ImplEndAction( bIdleEnd ); - --nStartAction; -} - -inline void ViewShell::LockPaint() -{ - if ( !nLockPaint++ ) - ImplLockPaint(); -} -inline void ViewShell::UnlockPaint( sal_Bool bVirDev ) -{ - if ( 0 == --nLockPaint ) - ImplUnlockPaint( bVirDev ); -} -inline const SfxItemPool& ViewShell::GetAttrPool() const -{ - return ((ViewShell*)this)->GetAttrPool(); -} - - - -#endif // SW_VIEWSH_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx deleted file mode 100644 index 949f898a10..0000000000 --- a/sw/inc/viscrs.hxx +++ /dev/null @@ -1,222 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _VISCRS_HXX -#define _VISCRS_HXX - -#include <vcl/cursor.hxx> -#include "swcrsr.hxx" -#include "swrect.hxx" -#include "swregion.hxx" - -class SwCrsrShell; -class SwShellCrsr; - -// From here classes/methods for non-text cursor. - -class SwVisCrsr -#ifdef SW_CRSR_TIMER - : private Timer -#endif -{ - friend void _InitCore(); - friend void _FinitCore(); - - sal_Bool bIsVisible : 1; - sal_Bool bIsDragCrsr : 1; - -#ifdef SW_CRSR_TIMER - sal_Bool bTimerOn : 1; -#endif - - Cursor aTxtCrsr; - const SwCrsrShell* pCrsrShell; - -#ifdef SW_CRSR_TIMER - virtual void Timeout(); -#endif - void _SetPosAndShow(); - -public: - SwVisCrsr( const SwCrsrShell * pCShell ); - ~SwVisCrsr(); - - void Show(); - void Hide(); - - sal_Bool IsVisible() const { return bIsVisible; } - void SetDragCrsr( sal_Bool bFlag = sal_True ) { bIsDragCrsr = bFlag; } - -#ifdef SW_CRSR_TIMER - sal_Bool ChgTimerFlag( sal_Bool bTimerOn = sal_True ); -#endif -}; - - -// From here classes/methods for selections. - -namespace sdr { namespace overlay { class OverlayObject; }} - -class SwSelPaintRects : public SwRects -{ - friend void _InitCore(); - friend void _FinitCore(); - - static long nPixPtX, nPixPtY; - static MapMode *pMapMode; - - const SwCrsrShell* pCShell; - - virtual void Paint( const Rectangle& rRect ); - virtual void FillRects() = 0; - - sdr::overlay::OverlayObject* mpCursorOverlay; - - // access to mpCursorOverlay for swapContent - sdr::overlay::OverlayObject* getCursorOverlay() const { return mpCursorOverlay; } - void setCursorOverlay(sdr::overlay::OverlayObject* pNew) { mpCursorOverlay = pNew; } - -public: - SwSelPaintRects( const SwCrsrShell& rCSh ); - virtual ~SwSelPaintRects(); - - // in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To - // make a complete swap access to mpCursorOverlay is needed there - void swapContent(SwSelPaintRects& rSwap); - - void Show(); - void Hide(); - void Invalidate( const SwRect& rRect ); - - const SwCrsrShell* GetShell() const { return pCShell; } - // check current MapMode of the shell and set possibly the static members. - // Optional set the parameters pX, pY - static void Get1PixelInLogic( const ViewShell& rSh, - long* pX = 0, long* pY = 0 ); -}; - - -class SwShellCrsr : public virtual SwCursor, public SwSelPaintRects -{ - // Document positions of start/end characters of a SSelection. - Point aMkPt, aPtPt; - const SwPosition* pPt; // For assignment of GetPoint() to aPtPt. - - virtual void FillRects(); // For Table- und normal cursors. - - using SwCursor::UpDown; - -public: - SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos ); - SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos, - const Point& rPtPos, SwPaM* pRing = 0 ); - SwShellCrsr( SwShellCrsr& ); - virtual ~SwShellCrsr(); - - void Show(); // Update and display all selections. - void Hide(); // Hide all selections. - void Invalidate( const SwRect& rRect ); - - const Point& GetPtPos() const { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); } - Point& GetPtPos() { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); } - const Point& GetMkPos() const { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); } - Point& GetMkPos() { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); } - const Point& GetSttPos() const { return( SwPaM::Start() == pPt ? aPtPt : aMkPt ); } - Point& GetSttPos() { return( SwPaM::Start() == pPt ? aPtPt : aMkPt ); } - const Point& GetEndPos() const { return( SwPaM::End() == pPt ? aPtPt : aMkPt ); } - Point& GetEndPos() { return( SwPaM::End() == pPt ? aPtPt : aMkPt ); } - - virtual void SetMark(); - - virtual SwCursor* Create( SwPaM* pRing = 0 ) const; - - virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO - virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 ); - - sal_Bool UpDown( sal_Bool bUp, sal_uInt16 nCnt = 1 ); - - // sal_True: Cursor can be set to this position. - virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const; - -#if OSL_DEBUG_LEVEL > 1 - - // For testing of UNO-Crsr behavior here the implementation at visible cursor. - virtual sal_Bool IsSelOvr( int eFlags = - ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | - nsSwCursorSelOverFlags::SELOVER_TOGGLE | - nsSwCursorSelOverFlags::SELOVER_CHANGEPOS )); -#endif - - virtual bool IsReadOnlyAvailable() const; - - DECL_FIXEDMEMPOOL_NEWDEL( SwShellCrsr ) -}; - - - -class SwShellTableCrsr : public virtual SwShellCrsr, public virtual SwTableCursor -{ - // The Selection has the same order as the table boxes, i.e. - // if something is deleted from the one array at a certain position - // it has to be deleted from the other one as well!! - -public: - SwShellTableCrsr( const SwCrsrShell& rCrsrSh, const SwPosition& rPos ); - SwShellTableCrsr( const SwCrsrShell& rCrsrSh, - const SwPosition &rMkPos, const Point& rMkPt, - const SwPosition &rPtPos, const Point& rPtPt ); - virtual ~SwShellTableCrsr(); - - virtual void FillRects(); // For table and normal cursor. - - // Check if SPoint is within table SSelection. - sal_Bool IsInside( const Point& rPt ) const; - - virtual void SetMark(); - virtual SwCursor* Create( SwPaM* pRing = 0 ) const; - - virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO - virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 ); - - // sal_True: Cursor can be set to this position. - virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const; - -#if OSL_DEBUG_LEVEL > 1 - - // For testing of UNO-Crsr behavior here the implementation at visible cursor. - virtual sal_Bool IsSelOvr( int eFlags = - ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION | - nsSwCursorSelOverFlags::SELOVER_TOGGLE | - nsSwCursorSelOverFlags::SELOVER_CHANGEPOS )); -#endif -}; - - - -#endif // _VISCRS_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx deleted file mode 100644 index 30e354f5fc..0000000000 --- a/sw/inc/wdocsh.hxx +++ /dev/null @@ -1,65 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * 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 _SWWDOCSH_HXX -#define _SWWDOCSH_HXX -#include "swdllapi.h" -#include "docsh.hxx" -#include <swdll.hxx> - -class SW_DLLPUBLIC SwWebDocShell: public SwDocShell -{ - sal_uInt16 nSourcePara; // Active line in source view. - -public: - - using SotObject::GetInterface; - - // But implement yourself. - SFX_DECL_INTERFACE(SW_WEBDOCSHELL) - SFX_DECL_OBJECTFACTORY(); - TYPEINFO(); - - SwWebDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED); - ~SwWebDocShell(); - - virtual void FillClass( SvGlobalName * pClassName, - sal_uInt32 * pClipFormat, - String * pAppName, - String * pLongUserName, - String * pUserName, - sal_Int32 nFileFormat, - sal_Bool bTemplate = sal_False ) const; - sal_uInt16 GetSourcePara()const - {return nSourcePara;} - void SetSourcePara(sal_uInt16 nSet) {nSourcePara = nSet;} -}; - -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |