diff options
author | Jakub Trzebiatowski <ubap.dev@gmail.com> | 2016-05-23 09:18:52 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-05-24 09:46:44 +0000 |
commit | 8b8159784821b7ddf031aec925353c274a10875e (patch) | |
tree | 3004cc39304236288e3f23e1c4b8ae80a6d27242 /sw/inc | |
parent | 2e2a13e7160f258982b09125f5e32acd267b3f3a (diff) |
Implement basic TableStyle Family
Change-Id: I3da13d26ced05e1948d483d432d6268b10c208b5
Implementing: getCount, getElementNames
Reviewed-on: https://gerrit.libreoffice.org/25351
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/SwGetPoolIdFromName.hxx | 1 | ||||
-rw-r--r-- | sw/inc/SwStyleNameMapper.hxx | 10 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 1 | ||||
-rw-r--r-- | sw/inc/poolfmt.hrc | 4 | ||||
-rw-r--r-- | sw/inc/poolfmt.hxx | 9 | ||||
-rw-r--r-- | sw/inc/rcid.hrc | 5 | ||||
-rw-r--r-- | sw/inc/unocore.hrc | 3 | ||||
-rw-r--r-- | sw/inc/unomap.hxx | 3 |
8 files changed, 32 insertions, 4 deletions
diff --git a/sw/inc/SwGetPoolIdFromName.hxx b/sw/inc/SwGetPoolIdFromName.hxx index 9d93e26ec65b..55f3ca62e0ed 100644 --- a/sw/inc/SwGetPoolIdFromName.hxx +++ b/sw/inc/SwGetPoolIdFromName.hxx @@ -31,6 +31,7 @@ namespace nsSwGetPoolIdFromName const SwGetPoolIdFromName GET_POOLID_FRMFMT = 0x04; const SwGetPoolIdFromName GET_POOLID_PAGEDESC = 0x08; const SwGetPoolIdFromName GET_POOLID_NUMRULE = 0x10; + const SwGetPoolIdFromName GET_POOLID_TABSTYLE = 0x20; } #endif diff --git a/sw/inc/SwStyleNameMapper.hxx b/sw/inc/SwStyleNameMapper.hxx index 89011caa5a98..035e0c6e5df5 100644 --- a/sw/inc/SwStyleNameMapper.hxx +++ b/sw/inc/SwStyleNameMapper.hxx @@ -93,6 +93,7 @@ protected: *m_pHTMLChrFormatUINameArray, *m_pPageDescUINameArray, *m_pNumRuleUINameArray, + *m_pTableStyleUINameArray, // Programmatic Name tables *m_pTextProgNameArray, *m_pListsProgNameArray, @@ -104,19 +105,22 @@ protected: *m_pChrFormatProgNameArray, *m_pHTMLChrFormatProgNameArray, *m_pPageDescProgNameArray, - *m_pNumRuleProgNameArray; + *m_pNumRuleProgNameArray, + *m_pTableStyleProgNameArray; static NameToIdHash *m_pParaUIMap, *m_pCharUIMap, *m_pPageUIMap, *m_pFrameUIMap, *m_pNumRuleUIMap, + *m_pTableStyleUIMap, *m_pParaProgMap, *m_pCharProgMap, *m_pPageProgMap, *m_pFrameProgMap, - *m_pNumRuleProgMap; + *m_pNumRuleProgMap, + *m_pTableStyleProgMap; static void fillNameFromId(sal_uInt16 nId, OUString &rName, bool bProgName); static const OUString& getNameFromId(sal_uInt16 nId, const OUString &rName, @@ -176,6 +180,7 @@ public: static const ::std::vector<OUString>& GetHTMLChrFormatUINameArray(); static const ::std::vector<OUString>& GetPageDescUINameArray(); static const ::std::vector<OUString>& GetNumRuleUINameArray(); + static const ::std::vector<OUString>& GetTableStyleUINameArray(); static const ::std::vector<OUString>& GetTextProgNameArray(); static const ::std::vector<OUString>& GetListsProgNameArray(); @@ -188,6 +193,7 @@ public: static const ::std::vector<OUString>& GetHTMLChrFormatProgNameArray(); static const ::std::vector<OUString>& GetPageDescProgNameArray(); static const ::std::vector<OUString>& GetNumRuleProgNameArray(); + static const ::std::vector<OUString>& GetTableStyleProgNameArray(); }; #endif // _NAME_MAPPER_HXX diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 4d84134ed084..afed50ad5089 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1253,6 +1253,7 @@ public: /// Return the available table styles. SwTableAutoFormatTable& GetTableStyles() { return *mpTableStyles.get(); } + const SwTableAutoFormatTable& GetTableStyles() const { return *mpTableStyles.get(); } void AppendUndoForInsertFromDB( const SwPaM& rPam, bool bIsTable ); diff --git a/sw/inc/poolfmt.hrc b/sw/inc/poolfmt.hrc index a6b472b8b90b..c1140fbe2e91 100644 --- a/sw/inc/poolfmt.hrc +++ b/sw/inc/poolfmt.hrc @@ -263,6 +263,10 @@ #define STR_COLUMN_VALUESET_ITEM3 (RC_POOLNUMRULE_BEGIN + 13 ) #define STR_COLUMN_VALUESET_ITEM4 (RC_POOLNUMRULE_BEGIN + 14 ) +// Table styles + +#define STR_TABSTYLE_DEFAULT (RC_POOLTABSTYLE_BEGIN+ 0) + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx index 2bc91f47d835..65a6d07203e4 100644 --- a/sw/inc/poolfmt.hxx +++ b/sw/inc/poolfmt.hxx @@ -77,6 +77,7 @@ 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; +const sal_uInt16 POOLGRP_TABSTYLE = (4 << 11) + POOLGRP_NOCOLLID; /// Recognize whether it's a user defined style or not: const sal_uInt16 POOL_IDUSER_FMT = @@ -197,6 +198,14 @@ RES_POOLNUMRULE_BUL5, ///< NumRule Bullets 5. RES_POOLNUMRULE_END }; +// IDs for table styles. +enum RES_POOL_TABSTYLE_TYPE +{ +RES_POOLTABSTYLE_BEGIN = POOLGRP_TABSTYLE, +RES_POOLTABSTYLE_DEFAULT = RES_POOLTABSTYLE_BEGIN, +RES_POOLTABSTYLE_END +}; + // IDs for paragraph styles. enum RES_POOL_COLLFMT_TYPE { diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc index 528c5bb59bcf..f565097e2778 100644 --- a/sw/inc/rcid.hrc +++ b/sw/inc/rcid.hrc @@ -71,6 +71,7 @@ #define RC_IDXTXT (RC_BASE + 4350) #define RC_SIDEBAR (RC_BASE + 4450) #define RC_ATTR (RC_BASE + 4550) +#define RC_POOLTABSTYLE (RC_BASE + 4650) /*-------------------------------------------------------------------- Description: areas unharness @@ -257,6 +258,10 @@ #define RC_ATTR_BEGIN RC_ATTR #define RC_ATTR_END (RC_ATTR + 99) +// Table styles +#define RC_POOLTABSTYLE_BEGIN RC_POOLTABSTYLE +#define RC_POOLTABSTYLE_END (RC_POOLTABSTYLE + 99) + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/unocore.hrc b/sw/inc/unocore.hrc index 7f8dbdeabb79..9f8e8c607088 100644 --- a/sw/inc/unocore.hrc +++ b/sw/inc/unocore.hrc @@ -29,8 +29,9 @@ #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 STR_STYLE_FAMILY_TABLE (RC_UNOCORE_BEGIN + 8) -#define UNOCORE_ACT_END STR_STYLE_FAMILY_NUMBERING +#define UNOCORE_ACT_END STR_STYLE_FAMILY_TABLE #if UNOCORE_ACT_END > RC_UNOCORE_END #error Resource-Id Ueberlauf in #file, #line diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx index 0baa5c7587fb..80439cbbcb41 100644 --- a/sw/inc/unomap.hxx +++ b/sw/inc/unomap.hxx @@ -122,7 +122,8 @@ #define PROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM 97 #define PROPERTY_MAP_METAFIELD 98 #define PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE 99 -#define PROPERTY_MAP_END 100 +#define PROPERTY_MAP_TABLE_STYLE 100 +#define PROPERTY_MAP_END 101 //S&E #define WID_WORDS 0 |