diff options
author | Jakub Trzebiatowski <ubap.dev@gmail.com> | 2016-07-28 15:33:17 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-01 14:03:07 +0000 |
commit | e7ea91f283ce9b96db58087d87d81d29bcb727a4 (patch) | |
tree | 5c5f8b1fe17d0eba63d4d180a1b76f02f3e1744a /sw/inc | |
parent | d1ffaf5315497140dedbc67c78f14706591b314e (diff) |
GSoC Writer Table Styles; Table Styles Panel
Table styles panel:
+ Added simple table style panel tab icon.
icon-themes/galaxy/sw/imglst/sf06.png
+ Listing table styles (hierarchical, same order as in container)
+ Listing all table styles (sorted by name).
+ Listing applied table styles.
+ Listing custom styles.
+ Listing hidden styles.
+ Hide/show style.
+ Applying style by double clicking.
+ Highlight current table style.
Everything else yet to be done.
Table styles (SwTableAutoFormat):
+ "hidden" property.
+ "userDefined" property. "Default style" is not user defined. Styles loaded
from tblauto.fmt are also not user defined. Styles loaded from .odt are user
defined. Styles created manually (before binary load/save roundtrip) are user
defined.
Change-Id: I739a48ae1d7ae66f4f8c08076871437ca491bd4e
Reviewed-on: https://gerrit.libreoffice.org/27638
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/doc.hxx | 2 | ||||
-rw-r--r-- | sw/inc/fesh.hxx | 1 | ||||
-rw-r--r-- | sw/inc/tblafmt.hxx | 12 |
3 files changed, 15 insertions, 0 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index dc96eb0af54d..755c59833cc0 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -890,6 +890,8 @@ public: // Query if style (paragraph- / character- / frame- / page-) is used. bool IsUsed( const SwModify& ) const; + /// Query if table style is used. + bool IsUsed( const SwTableAutoFormat& ) const; static bool IsUsed( const SwNumRule& ); // Set name of newly loaded document template. diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 0e311d08a255..a1fefd8d1495 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -725,6 +725,7 @@ public: bool IsAdjustCellWidthAllowed( bool bBalance = false ) const; /// Set table style of the current table. + bool SetTableStyle(const OUString& rStyleName); bool SetTableStyle(const SwTableAutoFormat& rNew); /// Update the direct formatting according to the current table style. diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx index 06aa12b6adcc..92bd534cdc28 100644 --- a/sw/inc/tblafmt.hxx +++ b/sw/inc/tblafmt.hxx @@ -266,6 +266,8 @@ class SW_DLLPUBLIC SwTableAutoFormat bool m_bCollapsingBorders; SvxShadowItem m_aShadow; + bool m_bHidden; + bool m_bUserDefined; public: SwTableAutoFormat( const OUString& rName ); SwTableAutoFormat( const SwTableAutoFormat& rNew ); @@ -296,6 +298,11 @@ public: bool IsBackground() const { return bInclBackground; } bool IsValueFormat() const { return bInclValueFormat; } + /// Check if style is hidden. + bool IsHidden() const { return m_bHidden; } + /// Check if style is defined by user. + bool IsUserDefined() const { return m_bUserDefined; } + void SetFont( const bool bNew ) { bInclFont = bNew; } void SetJustify( const bool bNew ) { bInclJustify = bNew; } void SetFrame( const bool bNew ) { bInclFrame = bNew; } @@ -303,6 +310,11 @@ public: void SetValueFormat( const bool bNew ) { bInclValueFormat = bNew; } void SetWidthHeight( const bool bNew ) { bInclWidthHeight = bNew; } + /// Set if style is hidden. + void SetHidden(bool bHidden) { m_bHidden = bHidden; } + /// Set if style is user defined. + void SetUserDefined(bool bUserDefined) { m_bUserDefined = bUserDefined; } + /// These methods returns what style (row or column) is applied first on given Cell bool FirstRowEndColumnIsRow(); bool FirstRowStartColumnIsRow(); |