summaryrefslogtreecommitdiff
path: root/sfx2/source/inc
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2023-04-15 19:53:05 -0800
committerJim Raykowski <raykowj@gmail.com>2023-04-25 19:43:33 +0200
commit4bc86f6477c3ed5f0e97b0a530acf7e102b613b3 (patch)
tree7fa32d1191383d0f73456daecf6dbfe275f26b8e /sfx2/source/inc
parentfb76d7f454522c4e8982b8fe1e75d0eb6f37c12d (diff)
tdf#38194 tdf#106556 Enhancement to highlight direct formatting,
paragraph style, and character style use in Writer documents Initial commit to realize direct formatting, paragraph style, and character style highlighting enhancement requests. Highlighting of character direct formatting is turned on/off using .uno:HighlightCharDF. Highlighting of paragraph styles and character styles is turned on/off using a check box in the Sidebar Styles panel. Closing the Sidebar also turns paragraph and character style highlighting off. Paragraph direct formatting is indicated by a hatch pattern over the paragraph style highlight bar and also by "+ Paragraph Direct Formatting" appended to the tooltip that appears showing the name of the paragraph style when the mouse pointer is over the style highlight bar. Colors used for styles highlighting are determined by a hash of the style name. Lightgray is used for character direct formatting. Known issue: Tooltip doesn't show for paragraph style highlighting in tables and in frames where the highlighting bar is drawn outside of the frame. Change-Id: I6e00ee38c1c169bc7c6542a1782c03b2593e1891 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150451 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sfx2/source/inc')
-rw-r--r--sfx2/source/inc/StyleList.hxx15
-rw-r--r--sfx2/source/inc/templdgi.hxx4
2 files changed, 15 insertions, 4 deletions
diff --git a/sfx2/source/inc/StyleList.hxx b/sfx2/source/inc/StyleList.hxx
index 5eba936c6cb5..fe4ff6269bd5 100644
--- a/sfx2/source/inc/StyleList.hxx
+++ b/sfx2/source/inc/StyleList.hxx
@@ -113,8 +113,7 @@ public:
void Enableshow(bool canshow) { m_bCanShow = canshow; }
void Enablenew(bool cannew) { m_bCanNew = cannew; }
void Enableedit(bool canedit) { m_bCanEdit = canedit; }
- // Handles the enabling/Disabling of Preview
- void EnablePreview(bool bCustomPreview);
+
// Used in Dialog's Execute_Impl
// It is a necessary condition to execute a style
bool EnableExecute();
@@ -126,11 +125,17 @@ public:
void connect_SaveSelection(const Link<StyleList&, SfxObjectShell*> rLink);
void connect_UpdateFamily(const Link<StyleList&, void> rLink) { m_aUpdateFamily = rLink; }
- void FamilySelect(sal_uInt16 nEntry);
+ void FamilySelect(sal_uInt16 nEntry, bool bRefresh = false);
void FilterSelect(sal_uInt16 nActFilter, bool bsetFilter);
DECL_LINK(NewMenuExecuteAction, void*, void);
+ bool HasStylesHighlighterFeature() { return m_bModuleHasStylesHighlighterFeature; }
+ void SetHighlightParaStyles(bool bSet) { m_bHighlightParaStyles = bSet; }
+ bool IsHighlightParaStyles() { return m_bHighlightParaStyles; }
+ void SetHighlightCharStyles(bool bSet) { m_bHighlightCharStyles = bSet; }
+ bool IsHighlightCharStyles() { return m_bHighlightCharStyles; }
+
private:
void FillTreeBox(SfxStyleFamily eFam);
@@ -236,4 +241,8 @@ private:
SfxModule* m_Module;
sal_uInt16 m_nModifier;
weld::Container* m_pContainer;
+
+ bool m_bModuleHasStylesHighlighterFeature = false;
+ bool m_bHighlightParaStyles = false;
+ bool m_bHighlightCharStyles = false;
};
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 322747b5636e..a352b1e9b8e4 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -69,6 +69,7 @@ protected:
StyleList m_aStyleList;
std::unique_ptr<weld::CheckButton> mxPreviewCheckbox;
+ std::unique_ptr<weld::CheckButton> mxHighlightCheckbox;
std::unique_ptr<weld::ComboBox> mxFilterLb;
sal_uInt16 nActFamily; // Id in the ToolBox = Position - 1
@@ -97,6 +98,7 @@ protected:
DECL_LINK(FilterSelectHdl, weld::ComboBox&, void );
DECL_LINK(PreviewHdl, weld::Toggleable&, void);
+ DECL_LINK(HighlightHdl, weld::Toggleable&, void);
virtual void InsertFamilyItem(sal_uInt16 nId, const SfxStyleFamilyItem& rItem) = 0;
virtual void EnableFamilyItem(sal_uInt16 nId, bool bEnabled) = 0;
@@ -138,7 +140,7 @@ public:
// Used in StyleList::UpdateStyles, StyleList::Update
// Whenever a new family(Eg. Character, List etc.) is selected it comes into action
- void FamilySelect(sal_uInt16 nId, StyleList& rStyleList, bool bPreviewRefresh = false);
+ void FamilySelect(sal_uInt16 nId, StyleList& rStyleList, bool bRefresh = false);
// Constructor
SfxCommonTemplateDialog_Impl(SfxBindings* pB, weld::Container*, weld::Builder* pBuilder);