diff options
Diffstat (limited to 'sw/inc')
38 files changed, 188 insertions, 96 deletions
diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx index 9d97eb43ff7e..804678479ab1 100644 --- a/sw/inc/IDocumentRedlineAccess.hxx +++ b/sw/inc/IDocumentRedlineAccess.hxx @@ -38,12 +38,13 @@ class SwPaM; struct SwPosition; class SwStartNode; class SwNode; +class SwViewShell; enum class RedlineFlags { NONE = 0x000, ///< no RedlineFlags On = 0x001, ///< RedlineFlags on - Ignore = 0x002, ///< ignore Redlines + Ignore = 0x002, ///< ignore Redlines (only set from code, temporarily) ShowInsert = 0x010, ///< show all inserts ShowDelete = 0x020, ///< show all deletes ShowMask = ShowInsert | ShowDelete, @@ -99,21 +100,21 @@ public: @returns the currently set redline mode */ - virtual RedlineFlags GetRedlineFlags() const = 0; + virtual RedlineFlags GetRedlineFlags(const SwViewShell* pViewShell = nullptr) const = 0; /** Set a new redline mode. @param eMode [in] the new redline mode. */ - virtual void SetRedlineFlags_intern(/*[in]*/RedlineFlags eMode) = 0; + virtual void SetRedlineFlags_intern(/*[in]*/RedlineFlags eMode, bool bRecordAllViews = true, bool bRecordModeChange = false) = 0; /** Set a new redline mode. @param eMode [in] the new redline mode. */ - virtual void SetRedlineFlags(/*[in]*/RedlineFlags eMode) = 0; + virtual void SetRedlineFlags(/*[in]*/RedlineFlags eMode, bool bRecordAllViews = true, bool bRecordModeChange = false) = 0; /** Query if redlining is on. @@ -235,6 +236,8 @@ public: virtual void UpdateRedlineContentNode(/*[in]*/ SwRedlineTable::size_type nStartPos, /*[in]*/ SwRedlineTable::size_type nEndPos) const = 0; + virtual void dumpAsXml(xmlTextWriterPtr pWriter) const = 0; + protected: virtual ~IDocumentRedlineAccess() {}; diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index 9c053e845441..1314f60479bc 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -139,10 +139,10 @@ enum class DocumentSettingId PAINT_HELL_OVER_HEADER_FOOTER, // tdf#155229 calculate minimum row height including horizontal border width MIN_ROW_HEIGHT_INCL_BORDER, - // tdf#129808 MS Word always includes ext leading for text grid line height MS_WORD_COMP_GRID_METRICS, // tdf#161233 pictures with wrap polygon should not be clipped NO_CLIPPING_WITH_WRAP_POLYGON, + MS_WORD_UL_TRAIL_SPACE, }; /** Provides access to settings of a document diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index f50754b6e274..abfe12fa9e78 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -152,6 +152,7 @@ class SwUINumRuleItem; #define FN_REDLINE_ACCEPT_TONEXT (FN_EDIT2 + 45) /* Redlining Accept and jump to next*/ #define FN_REDLINE_REJECT_TONEXT (FN_EDIT2 + 46) /* Redlining Reject and jump to next*/ #define FN_TRANSFORM_DOCUMENT_STRUCTURE (FN_EDIT2 + 47) /* overwrite text of content control, and more*/ +#define FN_COPY_FIELD (FN_EDIT2 + 48) /* show field content in readonly documents to copy content*/ // Region: View #define FN_DRAW_WRAP_DLG TypedWhichId<SfxInt16Item>(FN_VIEW + 3) /* Draw wrapping dlg */ @@ -205,6 +206,9 @@ class SwUINumRuleItem; #define FN_SET_TRACKED_DELETIONS_IN_MARGIN (FN_VIEW + 68) /* Show final text (deletions in margin) */ #define FN_SET_TRACKED_INSERTIONS_IN_MARGIN (FN_VIEW + 69) /* Show original text (insertions in margin) */ #define FN_OUTLINE_LEVELS_SHOWN (FN_VIEW + 70) +#define FN_RECORD_TRACKED_CHANGES_MENU (FN_VIEW + 71) /* Menu for the track changes record modes */ +#define FN_TRACK_CHANGES_IN_THIS_VIEW (FN_VIEW + 72) /* Record track changes only in this view */ +#define FN_TRACK_CHANGES_IN_ALL_VIEWS (FN_VIEW + 73) /* Record track changes only in all views */ // Region: Insert #define FN_INSERT_BOOKMARK (FN_INSERT + 2 ) /* Bookmark */ @@ -337,6 +341,7 @@ class SwUINumRuleItem; #define FN_DELETE_FIELDS (FN_INSERT2 + 40) #define FN_DELETE_SECTIONS (FN_INSERT2 + 41) #define FN_DELETE_CONTENT_CONTROL (FN_INSERT2 + 42) /* Delete content control formatting */ +#define FN_INSERT_FLD_RANGE_PGCOUNT (FN_INSERT2 + 43) /*insert field page count in range*/ // Region: Format #define FN_AUTOFORMAT_APPLY (FN_FORMAT + 1 ) /* apply autoformat options */ diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 773379e1eb0a..a9a2671c83c6 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -236,7 +236,6 @@ private: bool m_bBasicHideCursor : 1; // true -> HideCursor from Basic bool m_bSetCursorInReadOnly : 1;// true -> Cursor is allowed in ReadOnly-Areas bool m_bOverwriteCursor : 1; // true -> show Overwrite Cursor - bool m_bIsCursorPosChanged : 1; // true -> if the cursor position is changed last cursor update // true -> send accessible events when cursor changes // (set to false when using internal-only helper cursor) diff --git a/sw/inc/deletelistener.hxx b/sw/inc/deletelistener.hxx index 261c85763b54..da79383d75bd 100644 --- a/sw/inc/deletelistener.hxx +++ b/sw/inc/deletelistener.hxx @@ -13,57 +13,54 @@ #include <svl/lstner.hxx> #include "calbck.hxx" -class SwDeleteListener final : public SwClient +namespace sw +{ +template <typename T> class WeakBroadcastingPtr final : public SvtListener { private: - SwModify* m_pModify; - - virtual void SwClientNotify(const SwModify&, const SfxHint& rHint) override + T* m_pBroadcasting; + void StartListeningIfNonnull() { - if (rHint.GetId() == SfxHintId::SwObjectDying) - { - m_pModify->Remove(*this); - m_pModify = nullptr; - } + if (m_pBroadcasting) + StartListening(m_pBroadcasting->GetNotifier()); } public: - SwDeleteListener(SwModify& rModify) - : m_pModify(&rModify) + WeakBroadcastingPtr(T* pBroadcasting) + : m_pBroadcasting(pBroadcasting) { - m_pModify->Add(*this); + StartListeningIfNonnull(); } - - bool WasDeleted() const { return !m_pModify; } - - virtual ~SwDeleteListener() override + WeakBroadcastingPtr(const WeakBroadcastingPtr& rOther) + : m_pBroadcasting(rOther.m_pBroadcasting) { - if (!m_pModify) - return; - m_pModify->Remove(*this); + StartListeningIfNonnull(); } -}; - -class SvtDeleteListener final : public SvtListener -{ -private: - bool m_bObjectDeleted; - -public: - explicit SvtDeleteListener(SvtBroadcaster& rNotifier) - : m_bObjectDeleted(false) + void Assign(T* pBroadcasting) { - StartListening(rNotifier); + if (m_pBroadcasting) + EndListening(m_pBroadcasting->GetNotifier()); + m_pBroadcasting = pBroadcasting; + StartListeningIfNonnull(); + } + WeakBroadcastingPtr& operator=(const WeakBroadcastingPtr& rOther) + { + Assign(rOther.m_pBroadcasting); + return *this; } virtual void Notify(const SfxHint& rHint) override { if (rHint.GetId() == SfxHintId::Dying) - m_bObjectDeleted = true; + m_pBroadcasting = nullptr; } - bool WasDeleted() const { return m_bObjectDeleted; } + T* operator->() { return m_pBroadcasting; } + const T* operator->() const { return m_pBroadcasting; } + T& operator*() { return *m_pBroadcasting; } + explicit operator bool() const { return m_pBroadcasting; } }; +} class SfxDeleteListener final : public SfxListener { diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index d755d14e9b67..d67471627c5c 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -321,9 +321,9 @@ public: /** passwword protection for Writer (derived from SfxObjectShell) see also: FN_REDLINE_ON, FN_REDLINE_ON */ - virtual bool IsChangeRecording() const override; + virtual bool IsChangeRecording(SfxViewShell* pViewShell = nullptr, bool bRecordAllViews = true) const override; virtual bool HasChangeRecordProtection() const override; - virtual void SetChangeRecording( bool bActivate, bool bLockAllViews = false ) override; + virtual void SetChangeRecording( bool bActivate, bool bLockAllViews = false, bool bRecordAllViews = true ) override; virtual void SetProtectionPassword( const OUString &rPassword ) override; virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash ) override; diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx index e45c599d2a0b..f5a7a70a350f 100644 --- a/sw/inc/docstyle.hxx +++ b/sw/inc/docstyle.hxx @@ -113,6 +113,8 @@ public: virtual sal_uInt32 GetHelpId( OUString& rFile ) override; virtual void SetHelpId( const OUString& r, sal_uInt32 nId ) override; + virtual sal_Int32 GetSpotlightId() override; + /** Preset the members without physical access. Used by StyleSheetPool. */ void PresetName(const OUString& rName) { aName = rName; } diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index 83986b735ae3..2e762987b01a 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -51,12 +51,14 @@ enum SwDocStatSubType { DS_BEGIN, DS_PAGE = DS_BEGIN, + // page count in current section + DS_PAGE_RANGE, DS_PARA, DS_WORD, DS_CHAR, DS_TBL, DS_GRF, - DS_OLE, + DS_OLE }; typedef sal_uInt16 SwDocInfoSubType; @@ -255,21 +257,24 @@ class SAL_DLLPUBLIC_RTTI SwDocStatFieldType final : public SwFieldType public: SwDocStatFieldType(SwDoc&); - OUString Expand(sal_uInt16 nSubType, SvxNumType nFormat) const; + OUString Expand(sal_uInt16 nSubType, SvxNumType nFormat, + sal_uInt16 nVirtPageCount) const; virtual std::unique_ptr<SwFieldType> Copy() const override; void SetNumFormat( SvxNumType eFormat ) { m_nNumberingType = eFormat; } + void UpdateRangeFields(SwRootFrame const*const pLayout); }; class SW_DLLPUBLIC SwDocStatField final : public SwField { sal_uInt16 m_nSubType; + sal_uInt16 m_nVirtPageCount; public: SwDocStatField( SwDocStatFieldType*, - sal_uInt16 nSubType, sal_uInt32 nFormat); + sal_uInt16 nSubType, sal_uInt32 nFormat, sal_uInt16 nVirtPageCount = 0); - void ChangeExpansion( const SwFrame* pFrame ); + void ChangeExpansion( const SwFrame* pFrame, sal_uInt16 nVirtPageCount); virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override; virtual std::unique_ptr<SwField> Copy() const override; diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 9d3a54c076b9..67e699a4deec 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -950,7 +950,7 @@ public: /// For Redlining. SW_DLLPUBLIC RedlineFlags GetRedlineFlags() const; - SW_DLLPUBLIC void SetRedlineFlags( RedlineFlags eMode ); + SW_DLLPUBLIC void SetRedlineFlags( RedlineFlags eMode, bool bRecordAllViews = true ); bool IsRedlineOn() const; SW_DLLPUBLIC SwRedlineTable::size_type GetRedlineCount() const; const SwRangeRedline& GetRedline( SwRedlineTable::size_type nPos ) const; diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx index 96c5f9b3d905..26a5226d6b86 100644 --- a/sw/inc/fchrfmt.hxx +++ b/sw/inc/fchrfmt.hxx @@ -20,7 +20,7 @@ #define INCLUDED_SW_INC_FCHRFMT_HXX #include <svl/poolitem.hxx> -#include "calbck.hxx" +#include <svl/listener.hxx> #include "format.hxx" #include "charfmt.hxx" @@ -29,10 +29,11 @@ class IntlWrapper; /// This pool item subclass can appear in the hint array of a text node. It refers to a character /// style. It's owned by SwTextCharFormat. -class SW_DLLPUBLIC SwFormatCharFormat final : public SfxPoolItem, public SwClient +class SW_DLLPUBLIC SwFormatCharFormat final : public SfxPoolItem, public SvtListener { friend class SwTextCharFormat; SwTextCharFormat* m_pTextAttribute; ///< My text attribute. + SwCharFormat* m_pCharFormat; public: /// single argument ctors shall be explicit. @@ -44,7 +45,7 @@ public: SwFormatCharFormat( const SwFormatCharFormat& rAttr ); private: - virtual void SwClientNotify(const SwModify&, const SfxHint&) override; + virtual void Notify(const SfxHint&) override; /// @@@ public copy ctor, but no copy assignment? SwFormatCharFormat & operator= (const SwFormatCharFormat &) = delete; @@ -63,12 +64,14 @@ public: virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; - void SetCharFormat( SwFormat* pFormat ) + void SetCharFormat( SwCharFormat* pFormat ) { assert(!pFormat->IsDefault()); // expose cases that lead to use-after-free - pFormat->Add(*this); + EndListeningAll(); + StartListening(pFormat->GetNotifier()); + m_pCharFormat = pFormat; } - SwCharFormat* GetCharFormat() const { return const_cast<SwCharFormat*>(static_cast<const SwCharFormat*>(GetRegisteredIn())); } + SwCharFormat* GetCharFormat() const { return m_pCharFormat; } void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index c1b1ae7e9881..e5c114474425 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -387,7 +387,7 @@ public: SW_DLLPUBLIC bool IsFrameSelected() const; bool GetFlyFrameAttr( SfxItemSet &rSet ) const; SW_DLLPUBLIC bool SetFlyFrameAttr( SfxItemSet &rSet ); - static SfxItemSetFixed<RES_VERT_ORIENT, RES_ANCHOR> makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor); + static SfxItemSet makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor); void ResetFlyFrameAttr( const SfxItemSet* pSet ); SW_DLLPUBLIC const SwFrameFormat *NewFlyFrame( const SfxItemSet &rSet, bool bAnchValid = false, SwFrameFormat *pParent = nullptr ); @@ -672,7 +672,7 @@ public: void SetRowSplit( const SwFormatRowSplit &rSz ); std::unique_ptr<SwFormatRowSplit> GetRowSplit() const; - void SetBoxAlign( sal_uInt16 nOrient ); + SW_DLLPUBLIC void SetBoxAlign(sal_uInt16 nOrient); sal_uInt16 GetBoxAlign() const; ///< USHRT_MAX if ambiguous. bool BalanceRowHeight( bool bTstOnly, const bool bOptimize = false ); diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx index db39befc3d68..5c61255ee695 100644 --- a/sw/inc/fmtcol.hxx +++ b/sw/inc/fmtcol.hxx @@ -23,6 +23,7 @@ #include "format.hxx" #include "hintids.hxx" #include "paratr.hxx" +#include "deletelistener.hxx" #include <rtl/ustring.hxx> #include <tools/solar.h> @@ -178,16 +179,17 @@ enum class Master_CollCondition PARA_IN_ENDNOTE }; -class SW_DLLPUBLIC SwCollCondition final : public SwClient +class SW_DLLPUBLIC SwCollCondition final { Master_CollCondition m_nCondition; sal_uInt32 m_nSubCondition; + sw::WeakBroadcastingPtr<SwTextFormatColl> m_pCollection; public: SwCollCondition( SwTextFormatColl* pColl, Master_CollCondition nMasterCond, sal_uInt32 nSubCond ); - virtual ~SwCollCondition() override; + ~SwCollCondition(); /// @@@ public copy ctor, but no copy assignment? SwCollCondition( const SwCollCondition& rCpy ); @@ -202,8 +204,8 @@ public: sal_uInt32 GetSubCondition() const { return m_nSubCondition; } void SetCondition( Master_CollCondition nCond, sal_uInt32 nSubCond ); - SwTextFormatColl* GetTextFormatColl() const { return const_cast<SwTextFormatColl*>(static_cast<const SwTextFormatColl*>(GetRegisteredIn())); } - void RegisterToFormat( SwFormat& ); + SwTextFormatColl* GetTextFormatColl() const { return const_cast<SwTextFormatColl*>(m_pCollection.operator->()); } + void RegisterToFormat( SwTextFormatColl& ); }; using SwFormatCollConditions = std::vector<std::unique_ptr<SwCollCondition>>; diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx index c751ee03a730..bf2e744814bd 100644 --- a/sw/inc/fmtftn.hxx +++ b/sw/inc/fmtftn.hxx @@ -44,7 +44,7 @@ class SwXTextRange; /// for the footnote content is defined by m_pTextAttr. class SW_DLLPUBLIC SwFormatFootnote final : public SfxPoolItem - , public SvtBroadcaster + , public sw::BroadcasterMixin { friend class SwTextFootnote; SwTextFootnote* m_pTextAttr; ///< My TextAttribute. diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx index 26106ef6aae9..601879239bb1 100644 --- a/sw/inc/fmtftntx.hxx +++ b/sw/inc/fmtftntx.hxx @@ -51,6 +51,8 @@ protected: : SfxEnumItem( nWhichL, ePos ), m_nOffset( 0 ) {} + virtual SfxItemType ItemType() const override = 0; + public: virtual sal_uInt16 GetValueCount() const override; diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx index edc2b3a10d84..62f7585fec56 100644 --- a/sw/inc/grfatr.hxx +++ b/sw/inc/grfatr.hxx @@ -154,6 +154,8 @@ protected: : SfxInt16Item( nWhichL, nVal ) {} + virtual SfxItemType ItemType() const override = 0; + public: // pure virtual methods from SfxInt16Item virtual bool GetPresentation( SfxItemPresentation ePres, @@ -265,6 +267,8 @@ class SwDrawModeGrf_Base: public SfxEnumItem<GraphicDrawMode> { protected: SwDrawModeGrf_Base(GraphicDrawMode nMode): SfxEnumItem(RES_GRFATR_DRAWMODE, nMode) {} + + virtual SfxItemType ItemType() const override = 0; }; class SW_DLLPUBLIC SwDrawModeGrf final : public SwDrawModeGrf_Base diff --git a/sw/inc/inspectorproperties.hrc b/sw/inc/inspectorproperties.hrc index 88f535847970..3404018a8c19 100644 --- a/sw/inc/inspectorproperties.hrc +++ b/sw/inc/inspectorproperties.hrc @@ -212,6 +212,7 @@ #define RID_PARA_HYPHENATION_ZONE NC_("RID_ATTRIBUTE_NAMES_MAP", "Para Hyphenation Zone") #define RID_PARA_HYPHENATION_KEEP NC_("RID_ATTRIBUTE_NAMES_MAP", "Para Hyphenation Keep") #define RID_PARA_HYPHENATION_KEEP_TYPE NC_("RID_ATTRIBUTE_NAMES_MAP", "Para Hyphenation Keep Type") +#define RID_PARA_HYPHENATION_KEEP_LINE NC_("RID_ATTRIBUTE_NAMES_MAP", "Para Hyphenation Keep Line") #define RID_PARA_INTEROP_GRAB_BAG NC_("RID_ATTRIBUTE_NAMES_MAP", "Para Interop Grab Bag") #define RID_PARA_IS_AUTO_FIRST_LINE_INDENT NC_("RID_ATTRIBUTE_NAMES_MAP", "Para is Auto First Line Indent") #define RID_PARA_IS_CHARACTER_DISTANCE NC_("RID_ATTRIBUTE_NAMES_MAP", "Para is Character Distance") diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 0678c4086cd6..5a435a793b21 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -37,6 +37,7 @@ #include <memory> #include <vector> #include <functional> +#include <map> class SfxHint; class SwNumRule; @@ -383,6 +384,16 @@ public: const SwPosition &rStart, sal_Int32 nLen, const bool bForceCopyOfAllAttrs = false ); + /* + After copying a text portion with its comments, the replies will still reference to their original parent. + We need to set their reference to their copied-parent. + idMapForComments and nameMapForComments variables hold the original ids of comments as keys. + And they hold the new ids and names of comments as values. + So we can find a reply's (child comment) new parent (value) by looking up its original parent (key). + */ + static void EstablishParentChildRelationsOfComments(const SwTextNode* pDest, + std::map<sal_Int32, sal_Int32>& idMapForComments, + std::map<sal_Int32, OUString>& nameMapForComments); void CutText(SwTextNode * const pDest, const SwContentIndex & rStart, const sal_Int32 nLen); @@ -457,7 +468,7 @@ public: const sal_Int32 nIndex, ::sw::GetTextAttrMode const eMode = ::sw::GetTextAttrMode::Expand) const; - bool Spell(SwSpellArgs*); + bool Spell(SwSpellArgs* , bool bIsReadOnly); bool Convert( SwConversionArgs & ); inline SwTextFormatColl *GetTextColl() const; diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index a19d48e247c1..9ddadf952050 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -449,8 +449,7 @@ public: std::pair<Point, bool> const* pViewPosAndCalcFrame = nullptr) const; /** @return the real size of the frame or an empty rectangle if no layout exists. Needed for export filters. */ - SW_DLLPUBLIC SwRect FindLayoutRect( const bool bPrtArea = false, - const Point* pPoint = nullptr ) const; + SW_DLLPUBLIC SwRect FindLayoutRect( const Point* pPoint = nullptr ) const; SW_DLLPUBLIC SwRect FindPageFrameRect() const; /** Method creates all views of document for given node. The content diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index f2da66539b96..f18ae6375ece 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -160,11 +160,11 @@ class SW_DLLPUBLIC SwPageDesc final mutable StashedPageDesc m_aStashedHeader; mutable StashedPageDesc m_aStashedFooter; - sw::WriterMultiListener m_aDepends; ///< Because of grid alignment (Registerhaltigkeit). + sw::WriterMultiListener m_aDepends; ///< Because of grid alignment (register accuracy / register-true). mutable const SwTextFormatColl* m_pTextFormatColl; SwPageDesc *m_pFollow; sal_uInt16 m_nRegHeight; ///< Sentence spacing and fontascent of style. - sal_uInt16 m_nRegAscent; ///< For grid alignment (Registerhaltigkeit). + sal_uInt16 m_nRegAscent; ///< For grid alignment (register accuracy / register-true). drawing::TextVerticalAdjust m_nVerticalAdjustment; // doc/docx: vertically center / justify / bottom UseOnPage m_eUse; bool m_IsLandscape; diff --git a/sw/inc/pch/precompiled_swui.hxx b/sw/inc/pch/precompiled_swui.hxx index 0ed7216a6b27..96a8e8bd929b 100644 --- a/sw/inc/pch/precompiled_swui.hxx +++ b/sw/inc/pch/precompiled_swui.hxx @@ -96,7 +96,7 @@ #include <sal/saldllapi.h> #include <sal/types.h> #include <sal/typesizes.h> -#include <vcl/AccessibleBrowseBoxObjType.hxx> +#include <vcl/accessibility/AccessibleBrowseBoxObjType.hxx> #include <vcl/BinaryDataContainer.hxx> #include <vcl/BitmapColor.hxx> #include <vcl/GraphicAttributes.hxx> diff --git a/sw/inc/rdfhelper.hxx b/sw/inc/rdfhelper.hxx index 8152ef6765c5..dd7267758846 100644 --- a/sw/inc/rdfhelper.hxx +++ b/sw/inc/rdfhelper.hxx @@ -39,7 +39,7 @@ class SW_DLLPUBLIC SwRDFHelper public: /// Gets all graph-names in RDF of a given type. static css::uno::Sequence<css::uno::Reference<css::rdf::XURI>> - getGraphNames(const css::uno::Reference<css::rdf::XDocumentMetadataAccess>& xDocumentMetadataAccess, + getGraphNames(const rtl::Reference<SwXTextDocument>& xModel, const css::uno::Reference<css::rdf::XURI>& xType); /// Gets all graph-names in RDF of a given type. diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index 20befbaa43d7..6a88a0a3ccd1 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -252,7 +252,8 @@ public: void ShowOriginal(sal_uInt16 nLoop, size_t nMyPos, bool bForced = false); /// Calculates the intersection with text node number nNdIdx. - void CalcStartEnd(SwNodeOffset nNdIdx, sal_Int32& rStart, sal_Int32& rEnd) const; + /// @return true if the entire redline precedes nNdIdx + bool CalcStartEnd(SwNodeOffset nNdIdx, sal_Int32& rStart, sal_Int32& rEnd) const; enum class Invalidation { Add, Remove }; /// Initiate the layout. diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index 0c45e470d247..b2f5fb53a54a 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -67,6 +67,7 @@ private: OUString m_sLinkFileName; OUString m_sLinkFilePassword; // Must be changed to Sequence. css::uno::Sequence <sal_Int8> m_Password; + sal_uInt16 m_nPage; // loaded meta page count for page anchored flys in master document /// It seems this flag caches the current final "hidden" state. bool m_bHiddenFlag : 1; @@ -133,6 +134,9 @@ public: bool IsConnectFlag() const { return m_bConnectFlag; } void SetConnectFlag(bool const bFlag){ m_bConnectFlag = bFlag; } + sal_uInt16 GetPageNum() const { return m_nPage; } + void SetPageNum(sal_uInt16 nPageNum){ m_nPage = nPageNum; } + void dumpAsXml(xmlTextWriterPtr pWriter) const; }; @@ -213,6 +217,11 @@ public: css::uno::Sequence<sal_Int8> const& GetPassword() const { return m_Data.GetPassword(); } + sal_uInt16 GetPageNum() const + { return m_Data.GetPageNum(); } + void SetPageNum(sal_uInt16 nPage) + { m_Data.SetPageNum(nPage); } + // Data server methods. void SetRefObject( SwServerObject* pObj ); const SwServerObject* GetObject() const { return m_RefObj.get(); } diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index 633efd926094..526c1f3ab8f6 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -337,8 +337,8 @@ #define STR_NUMERIC NC_("STR_NUMERIC", "Numeric") #define STR_ROW NC_("STR_ROW", "Rows") #define STR_COL NC_("STR_COL", "Column") -#define STR_AUTHMRK_EDIT NC_("STR_AUTHMRK_EDIT", "Edit Bibliography Entry") -#define STR_AUTHMRK_INSERT NC_("STR_AUTHMRK_INSERT", "Insert Bibliography Entry") +#define STR_AUTHMRK_EDIT NC_("STR_AUTHMRK_EDIT", "Edit Citation") +#define STR_AUTHMRK_INSERT NC_("STR_AUTHMRK_INSERT", "Insert Citation") #define STR_ACCESS_PAGESETUP_SPACING NC_("STR_ACCESS_PAGESETUP_SPACING", "Spacing between %1 and %2") #define STR_ACCESS_COLUMN_WIDTH NC_("STR_ACCESS_COLUMN_WIDTH", "Column %1 Width") #define STR_CAPTION_TABLE NC_("STR_CAPTION_TABLE", "%PRODUCTNAME Writer Table") @@ -588,7 +588,7 @@ #define STR_NOTE NC_("STR_NOTE", "comment") #define STR_REFERENCE NC_("STR_REFERENCE", "cross-reference") #define STR_SCRIPT NC_("STR_SCRIPT", "script") -#define STR_AUTHORITY_ENTRY NC_("STR_AUTHORITY_ENTRY", "bibliography entry") +#define STR_AUTHORITY_ENTRY NC_("STR_AUTHORITY_ENTRY", "citation") #define STR_SPECIALCHAR NC_("STR_SPECIALCHAR", "special character") #define STR_FOOTNOTE NC_("STR_FOOTNOTE", "footnote") #define STR_GRAPHIC NC_("STR_GRAPHIC", "image") @@ -865,7 +865,7 @@ #define STR_IDXMRK_EDIT NC_("STR_IDXMRK_EDIT", "Edit Index Entry") #define STR_IDXMRK_INSERT NC_("STR_IDXMRK_INSERT", "Insert Index Entry") -#define STR_QUERY_CHANGE_AUTH_ENTRY NC_("STR_QUERY_CHANGE_AUTH_ENTRY", "The document already contains the bibliography entry but with different data. Do you want to adjust the existing entries?") +#define STR_QUERY_CHANGE_AUTH_ENTRY NC_("STR_QUERY_CHANGE_AUTH_ENTRY", "The document already contains the citation but with different data. Do you want to adjust the existing entries?") #define STR_COMMENTS_LABEL NC_("STR_COMMENTS_LABEL", "Comments") #define STR_SHOW_COMMENTS NC_("STR_SHOW_COMMENTS", "Show comments") @@ -993,7 +993,7 @@ #define STR_USERFLD NC_("STR_USERFLD", "User Field") #define STR_POSTITFLD NC_("STR_POSTITFLD", "Note") #define STR_SCRIPTFLD NC_("STR_SCRIPTFLD", "Script") -#define STR_AUTHORITY NC_("STR_AUTHORITY", "Bibliography entry") +#define STR_AUTHORITY NC_("STR_AUTHORITY", "Citation") #define STR_HIDDENPARAFLD NC_("STR_HIDDENPARAFLD", "Hidden Paragraph") // range DocumentInfo #define STR_DOCINFOFLD NC_("STR_DOCINFOFLD", "DocInformation") @@ -1012,6 +1012,7 @@ #define FLD_STAT_GRF NC_("FLD_STAT_GRF", "Image") #define FLD_STAT_OBJ NC_("FLD_STAT_OBJ", "OLE objects") #define FLD_STAT_PAGE NC_("FLD_STAT_PAGE", "Pages") +#define FLD_STAT_PAGE_RANGE NC_("FLD_STAT_PAGE", "Pages in range") // SubCmd DDETypes #define FMT_DDE_HOT NC_("FMT_DDE_HOT", "DDE automatic") #define FMT_DDE_NORMAL NC_("FMT_DDE_NORMAL", "DDE manual") @@ -1383,7 +1384,7 @@ #define STR_TOKEN_HELP_CHAPTER_INFO NC_("STR_TOKEN_HELP_CHAPTER_INFO", "Heading info") #define STR_TOKEN_HELP_LINK_START NC_("STR_TOKEN_HELP_LINK_START", "Hyperlink start") #define STR_TOKEN_HELP_LINK_END NC_("STR_TOKEN_HELP_LINK_END", "Hyperlink end") -#define STR_TOKEN_HELP_AUTHORITY NC_("STR_TOKEN_HELP_AUTHORITY", "Bibliography entry: ") +#define STR_TOKEN_HELP_AUTHORITY NC_("STR_TOKEN_HELP_AUTHORITY", "Citation: ") #define STR_CHARSTYLE NC_("STR_CHARSTYLE", "Character Style: ") #define STR_STRUCTURE NC_("STR_STRUCTURE", "Structure text") #define STR_ADDITIONAL_ACCNAME_STRING1 NC_("STR_ADDITIONAL_ACCNAME_STRING1", "Press Ctrl+Alt+A to move focus for more operations") @@ -1532,6 +1533,7 @@ #define STR_COMPAT_OPT_CONTINUOUS_ENDNOTES NC_("STR_COMPAT_OPT_CONTINUOUS_ENDNOTES", "Render endnotes at the end of document inline, rather than on a separate page") #define STR_COMPAT_OPT_MSWORDCOMPGRIDMETRICS NC_("STR_COMPAT_OPT_MSWORDCOMPGRIDMETRICS", "Use Word-compatible font metrics for text grid") #define STR_COMPAT_OPT_IGNORETABSANDBLANKSFORLINECALCULATION NC_("STR_COMPAT_OPT_IGNORETABSANDBLANKSFORLINECALCULATION", "Make whitespace character height not affect line height") +#define STR_COMPAT_OPT_UNDERLINETRAILINGSPACE NC_("STR_COMPAT_OPT_UNDERLINETRAILINGSPACE", "Underline Word-compatible trailing blanks") #define STR_TABLE_PANEL_ALIGN_AUTO NC_("sidebartableedit|alignautolabel", "Automatic") #define STR_TABLE_PANEL_ALIGN_LEFT NC_("sidebartableedit|alignleftlabel", "Left") @@ -1552,6 +1554,12 @@ #define STR_QUERY_INSMODE_TITLE NC_("STR_QUERY_INSMODE_TITLE", "You are switching to the overwrite mode") #define STR_QUERY_INSMODE_TEXT NC_("STR_QUERY_INSMODE_TEXT", "The overwrite mode allows to type over text. It is indicated by a block cursor and at the statusbar. Press Insert again to switch back.") #define STR_QUERY_INSMODE_QUESTION NC_("STR_QUERY_INSMODE_QUESTION", "Do you want to continue?") + +// To translators: title and question for confirmation whether to delete all comments / all comments by author; text intentionally empty +#define STR_QUERY_DELALLCOMMENTS_TITLE NC_("STR_QUERY_DELALLCOMMENTS_TITLE", "Confirm delete") +#define STR_QUERY_DELALLCOMMENTS_QUESTION NC_("STR_QUERY_DELALLCOMMENTS_QUESTION", "Are you sure you want to delete all comments?") +#define STR_QUERY_DELALLCOMMENTSAUTHOR_QUESTION NC_("STR_QUERY_DELALLCOMMENTS_QUESTION", "Are you sure you want to delete all comments by %AUTHOR?") + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 229b2fdc042d..3f4e1cd5b10d 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -241,6 +241,7 @@ public: virtual int GetPageNumberAlignment() const = 0; virtual bool GetMirrorOnEvenPages() const = 0; virtual bool GetIncludePageTotal() const = 0; + virtual bool GetIncludePageRangeTotal() const = 0; virtual bool GetFitIntoExistingMargins() const = 0; virtual SvxNumType GetPageNumberType() const = 0; virtual void SetPageNumberType(SvxNumType nSet) = 0; @@ -367,6 +368,16 @@ public: }; /** + * Interface for copy field value dialog in read only documents. It's implemented by + * AbstractCopyFieldDlg_Impl + */ +class AbstractCopyFieldDlg : public VclAbstractDialog +{ +protected: + virtual ~AbstractCopyFieldDlg() override = default; +}; + +/** * Interface for e.g. the form -> content control -> properties -> add dialog. It's implemented by * AbstractSwContentControlListItemDlg_Impl, but SwContentControlDlg only knows about this interface * and the SwAbstractDialogFactory::CreateSwContentControlListItemDlg() factory. @@ -547,6 +558,9 @@ public: virtual VclPtr<AbstractSwRenameXNamedDlg> CreateSwRenameXNamedDlg(weld::Widget* pParent, css::uno::Reference< css::container::XNamed > & xNamed, css::uno::Reference< css::container::XNameAccess > & xNameAccess) = 0; + + virtual VclPtr<AbstractCopyFieldDlg> CreateCopyFieldDlg(weld::Widget* pParent, const rtl::OUString& rFieldValue ) = 0; + virtual VclPtr<AbstractSwModalRedlineAcceptDlg> CreateSwModalRedlineAcceptDlg(weld::Window *pParent) = 0; virtual VclPtr<AbstractSwPageNumberDlg> CreateSwPageNumberDlg(weld::Window* pParent) = 0; diff --git a/sw/inc/swdll.hxx b/sw/inc/swdll.hxx index 08fda1af91d6..5898d5f7ae0e 100644 --- a/sw/inc/swdll.hxx +++ b/sw/inc/swdll.hxx @@ -34,8 +34,6 @@ class Filters; namespace SwGlobals { void SW_DLLPUBLIC ensure(); - -sw::Filters& getFilters(); } #endif diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx index c77fa3d0d7b7..6d39a3dc76c5 100644 --- a/sw/inc/swmodule.hxx +++ b/sw/inc/swmodule.hxx @@ -232,7 +232,7 @@ public: virtual std::optional<SfxItemSet> CreateItemSet( sal_uInt16 nId ) override; virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) override; virtual std::unique_ptr<SfxTabPage> CreateTabPage( sal_uInt16 nId, weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet ) override; - SW_DLLPUBLIC virtual std::optional<SfxStyleFamilies> CreateStyleFamilies() override; + SW_DLLPUBLIC virtual SfxStyleFamilies CreateStyleFamilies() override; // Pool is created here and set at SfxShell. void InitAttrPool(); diff --git a/sw/inc/swurl.hxx b/sw/inc/swurl.hxx index 87375f30c8b7..6051a6da32df 100644 --- a/sw/inc/swurl.hxx +++ b/sw/inc/swurl.hxx @@ -23,6 +23,7 @@ #include <o3tl/typed_flags_set.hxx> class SwViewShell; +class SwWrtShell; enum class LoadUrlFlags { NONE = 0x00, @@ -32,7 +33,9 @@ namespace o3tl { template<> struct typed_flags<LoadUrlFlags> : is_typed_flags<LoadUrlFlags, 0x01> {}; } -void LoadURL( SwViewShell& rSh, const OUString& rName, +bool LoadURL( SwWrtShell& rSh, const OUString& rName, + LoadUrlFlags nFilter, const OUString& rTargetFrameName ); +bool LoadURL( SwViewShell* rSh, const OUString& rName, LoadUrlFlags nFilter, const OUString& rTargetFrameName ); #endif diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx index 0836fb731d8b..c787b165c7f8 100644 --- a/sw/inc/tgrditem.hxx +++ b/sw/inc/tgrditem.hxx @@ -27,7 +27,7 @@ class IntlWrapper; -enum SwTextGrid { GRID_NONE, GRID_LINES_ONLY, GRID_LINES_CHARS }; +enum class SwTextGrid { NONE, LinesOnly, LinesAndChars }; class SW_DLLPUBLIC SwTextGridItem final : public SfxPoolItem { diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx index cf425589387a..dae1a61b1723 100644 --- a/sw/inc/txtatr.hxx +++ b/sw/inc/txtatr.hxx @@ -80,10 +80,10 @@ public: }; -class SW_DLLPUBLIC SwTextRuby final: public SwTextAttrNesting, public SwClient +class SW_DLLPUBLIC SwTextRuby final: public SwTextAttrNesting, public SvtListener { SwTextNode* m_pTextNode; - virtual void SwClientNotify(const SwModify&, const SfxHint&) override; + virtual void Notify(const SfxHint&) override; public: SwTextRuby( const SfxPoolItemHolder& rAttr, diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx index b190f3e4ca1f..5bc0f5c0726a 100644 --- a/sw/inc/unocoll.hxx +++ b/sw/inc/unocoll.hxx @@ -126,6 +126,7 @@ enum class SwServiceType { FieldTypeDocInfoDescription = 59, FieldTypeDocInfoCreateAuthor = 60, FieldTypeDocInfoCreateDateTime = 61, + FieldTypePageCountRange = 62, FieldTypeDummy1 = 63, FieldTypeDummy2 = 64, FieldTypeDummy3 = 65, @@ -215,6 +216,7 @@ enum class SwServiceType { #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_PAGE_COUNT_RANGE "com.sun.star.text.textfield.PageCountRange" #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" diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx index e9fea3d32c9c..5ec7d6636536 100644 --- a/sw/inc/unocrsrhelper.hxx +++ b/sw/inc/unocrsrhelper.hxx @@ -184,7 +184,7 @@ namespace SwUnoCursorHelper css::uno::Any GetPropertyValue( SwPaM& rPaM, const SfxItemPropertySet & rPropSet, - const OUString& rPropertyName); + std::u16string_view rPropertyName); /// @throws css::beans::UnknownPropertyException /// @throws css::uno::RuntimeException css::uno::Sequence< css::beans::PropertyState > GetPropertyStates( @@ -205,14 +205,14 @@ namespace SwUnoCursorHelper void SetPropertyToDefault( SwPaM & rPaM, const SfxItemPropertySet & rPropSet, - const OUString& rPropertyName); + std::u16string_view rPropertyName); /// @throws css::beans::UnknownPropertyException /// @throws css::lang::WrappedTargetException /// @throws css::uno::RuntimeException css::uno::Any GetPropertyDefault( SwPaM const & rPaM, const SfxItemPropertySet & rPropSet, - const OUString& rPropertyName); + std::u16string_view rPropertyName); bool SetPageDesc( const css::uno::Any& rValue, diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index b262018c41f6..82bd0b806c93 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -83,6 +83,7 @@ inline constexpr OUString UNO_NAME_PARA_HYPHENATION_NO_LAST_WORD = u"ParaHyphenationNoLastWord"_ustr; inline constexpr OUString UNO_NAME_PARA_HYPHENATION_KEEP = u"ParaHyphenationKeep"_ustr; inline constexpr OUString UNO_NAME_PARA_HYPHENATION_KEEP_TYPE = u"ParaHyphenationKeepType"_ustr; +inline constexpr OUString UNO_NAME_PARA_HYPHENATION_KEEP_LINE = u"ParaHyphenationKeepLine"_ustr; inline constexpr OUString UNO_NAME_LEFT_MARGIN = u"LeftMargin"_ustr; inline constexpr OUString UNO_NAME_RIGHT_MARGIN = u"RightMargin"_ustr; inline constexpr OUString UNO_NAME_GUTTER_MARGIN = u"GutterMargin"_ustr; @@ -309,6 +310,7 @@ inline constexpr OUString UNO_NAME_NUMBERING_TYPE = u"NumberingType"_ustr; inline constexpr OUString UNO_NAME_OFFSET = u"Offset"_ustr; inline constexpr OUString UNO_NAME_ON = u"On"_ustr; inline constexpr OUString UNO_NAME_OPAQUE = u"Opaque"_ustr; +inline constexpr OUString UNO_NAME_PAGE_COUNT_RANGE = u"PageCountRange"_ustr; inline constexpr OUString UNO_NAME_PAGE_TOGGLE = u"PageToggle"_ustr; inline constexpr OUString UNO_NAME_PAGE_DESC_NAME = u"PageDescName"_ustr; inline constexpr OUString UNO_NAME_PAGE_NUMBER_OFFSET = u"PageNumberOffset"_ustr; diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index b9f2cd2d0d73..1b7eea967fe7 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -114,14 +114,15 @@ public: enum RangePosition { RANGE_IN_TEXT, // "ordinary" css::text::TextRange - RANGE_IN_CELL, // position created with a cell that has no uno object RANGE_IS_TABLE, // anchor of a table RANGE_IS_SECTION, // anchor of a section + RANGE_IS_BOOKMARK, ///< anchor of a bookmark }; SwXTextRange(SwPaM const & rPam, const css::uno::Reference< css::text::XText > & xParent, - const enum RangePosition eRange = RANGE_IN_TEXT); + const enum RangePosition eRange = RANGE_IN_TEXT, + bool isInCell = false); // only for RANGE_IS_TABLE SwXTextRange(SwTableFormat& rTableFormat); // only for RANGE_IS_SECTION @@ -136,7 +137,8 @@ public: static rtl::Reference< SwXTextRange > CreateXTextRange( SwDoc & rDoc, - const SwPosition& rPos, const SwPosition *const pMark); + const SwPosition& rPos, const SwPosition *const pMark, + RangePosition eRange = RANGE_IN_TEXT); // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; @@ -209,6 +211,7 @@ public: private: const SfxItemPropertySet& m_rPropSet; const enum RangePosition m_eRangePosition; + bool const m_isRangeInCell; //< position created with a cell that has no uno object SwDoc& m_rDoc; css::uno::Reference<css::text::XText> m_xParentText; const SwFrameFormat* m_pTableOrSectionFormat; diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 5815515d8d90..57f4bbd026c3 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -62,7 +62,6 @@ #include <editeng/UnoForbiddenCharsTable.hxx> #include <cppuhelper/implbase.hxx> #include <vcl/ITiledRenderable.hxx> -#include <com/sun/star/tiledrendering/XTiledRenderable.hpp> #include <com/sun/star/text/XPasteBroadcaster.hpp> #include "unobaseclass.hxx" @@ -173,8 +172,7 @@ SwXTextDocumentBaseClass; class SW_DLLPUBLIC SwXTextDocument final : public SwXTextDocumentBaseClass, public SvxFmMSFactory, - public vcl::ITiledRenderable, - public css::tiledrendering::XTiledRenderable + public vcl::ITiledRenderable { private: class Impl; @@ -495,9 +493,6 @@ public: /// @see vcl::ITiledRenderable::getSearchResultRectangles(). std::vector<basegfx::B2DRange> getSearchResultRectangles(const char* pPayload) override; - // css::tiledrendering::XTiledRenderable - virtual void SAL_CALL paintTile( const ::css::uno::Any& Parent, ::sal_Int32 nOutputWidth, ::sal_Int32 nOutputHeight, ::sal_Int32 nTilePosX, ::sal_Int32 nTilePosY, ::sal_Int32 nTileWidth, ::sal_Int32 nTileHeight ) override; - /// @see vcl::ITiledRenderable::executeContentControlEvent(). void executeContentControlEvent(const StringMap& aArguments) override; diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 220c97af2627..a70668a09048 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -456,7 +456,7 @@ public: tools::Long SetHScrollMax(tools::Long lMax); void SpellError(LanguageType eLang); - bool ExecSpellPopup( const Point& rPt ); + bool ExecSpellPopup(const Point& rPt, bool bIsMouseEvent); void ExecSmartTagPopup( const Point& rPt ); DECL_DLLPRIVATE_LINK( OnlineSpellCallback, SpellCallbackInfo&, void ); @@ -556,6 +556,8 @@ public: void SetSelDrawSlot(); void FlipDrawSelMode() { m_bDrawSelMode = !m_bDrawSelMode; } void NoRotate(); // turn off rotate mode + void ToggleRotate(); // switch between move and rotate mode + bool EnterDrawTextMode(const Point& aDocPos); /// Same as EnterDrawTextMode(), but takes an SdrObject instead of guessing it by document position. bool EnterShapeDrawTextMode(SdrObject* pObject); @@ -692,8 +694,10 @@ public: void NotifyCursor(SfxViewShell* pViewShell) const override; /// See SfxViewShell::GetColorConfigColor(). ::Color GetColorConfigColor(svtools::ColorConfigEntry nColorType) const override; - void ShowUIElement(const OUString& sElementURL) const; + void SetUIElementVisibility(const OUString& sElementURL, bool bShow) const; + void ShowUIElement(const OUString& sElementURL) const; + void HideUIElement(const OUString& sElementURL) const; enum CachedStringID { @@ -729,7 +733,9 @@ public: virtual void flushPendingLOKInvalidateTiles() override; virtual std::optional<OString> getLOKPayload(int nType, int nViewId) const override; - bool IsHighlightCharDF() { return m_bIsHighlightCharDF; } + bool IsHighlightCharDF() const { return m_bIsHighlightCharDF; } + bool IsSpotlightParaStyles() const { return m_bIsSpotlightParaStyles; } + bool IsSpotlightCharStyles() const { return m_bIsSpotlightCharStyles; } private: AutoTimer m_aBringToAttentionBlinkTimer; diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx index bc273d58c4f2..fecb5e204f32 100644 --- a/sw/inc/viewopt.hxx +++ b/sw/inc/viewopt.hxx @@ -65,6 +65,10 @@ struct ViewOptFlags1 bool bTreatSubOutlineLevelsAsContent : 1; bool bShowInlineTooltips : 1; //tooltips on tracked changes bool bViewMetachars : 1; + + /// Track changes: recording is on + bool bRedlineRecordingOn : 1; + bool bPageback : 1; bool bShowOutlineContentVisibilityButton : 1; bool bShowChangesInMargin : 1; //tracked deletions in margin @@ -74,6 +78,7 @@ struct ViewOptFlags1 bool bSectionBoundaries : 1; // section boundaries bool bTableBoundaries : 1; // table boundaries bool bShowBoundaries : 1; // show all boundaries + bool bClickChangeRotation : 1; // change with single click into rotate mode ViewOptFlags1() : bUseHeaderFooterMenu(false) @@ -103,6 +108,7 @@ struct ViewOptFlags1 , bTreatSubOutlineLevelsAsContent(false) , bShowInlineTooltips(false) , bViewMetachars(false) + , bRedlineRecordingOn(false) , bPageback(true) , bShowOutlineContentVisibilityButton(false) , bShowChangesInMargin(false) @@ -111,7 +117,8 @@ struct ViewOptFlags1 , bTextBoundariesFull(false) , bSectionBoundaries(true) , bTableBoundaries(true) - , bShowBoundaries(false) + , bShowBoundaries(true) + , bClickChangeRotation(false) {} bool operator==(const ViewOptFlags1& rOther) const @@ -143,6 +150,7 @@ struct ViewOptFlags1 && bTreatSubOutlineLevelsAsContent == rOther.bTreatSubOutlineLevelsAsContent && bShowInlineTooltips == rOther.bShowInlineTooltips && bViewMetachars == rOther.bViewMetachars + && bRedlineRecordingOn == rOther.bRedlineRecordingOn && bPageback == rOther.bPageback && bShowOutlineContentVisibilityButton == rOther.bShowOutlineContentVisibilityButton && bShowChangesInMargin == rOther.bShowChangesInMargin @@ -151,7 +159,8 @@ struct ViewOptFlags1 && bTextBoundariesFull == rOther.bTextBoundariesFull && bSectionBoundaries == rOther.bSectionBoundaries && bTableBoundaries == rOther.bTableBoundaries - && bShowBoundaries == rOther.bShowBoundaries; + && bShowBoundaries == rOther.bShowBoundaries + && bClickChangeRotation == rOther.bClickChangeRotation; } void dumpAsXml(xmlTextWriterPtr pWriter) const; @@ -562,6 +571,10 @@ public: void SetViewMetaChars( bool b) { m_nCoreOptions.bViewMetachars = b; } + bool IsRedlineRecordingOn() const { return m_nCoreOptions.bRedlineRecordingOn; } + + void SetRedlineRecordingOn(bool b) { m_nCoreOptions.bRedlineRecordingOn = b; } + bool IsSynchronize() const { return m_nCoreOptions.bSynchronize; } void SetSynchronize( bool b ) @@ -682,6 +695,9 @@ public: bool IsShowBoundaries() const { return m_nCoreOptions.bShowBoundaries; } void SetShowBoundaries( bool b ) { m_nCoreOptions.bShowBoundaries = b; } + bool IsClickChangeRotation() const { return m_nCoreOptions.bClickChangeRotation; } + void SetClickChangeRotation( bool b ) { m_nCoreOptions.bClickChangeRotation = b; } + #ifdef DBG_UTIL // Correspond to statements in ui/config/cfgvw.src. bool IsTest1() const { return m_bTest1; } diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 7b2565f18703..a96d26721aa8 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -471,6 +471,8 @@ public: SW_DLLPUBLIC void SetIgnoreTabsAndBlanksForLineCalculation(bool bIgnoreTabsAndBlanksForLineCalculation); + SW_DLLPUBLIC void SetMsWordUlTrailSpace(bool val); + // DOCUMENT COMPATIBILITY FLAGS END // Calls Idle-formatter of Layout. |