diff options
author | Armin Le Grand <alg@apache.org> | 2014-06-02 15:00:50 +0000 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-07-01 13:30:09 +0200 |
commit | 7d9bb549d498d6beed2c4050c402d09643febdfa (patch) | |
tree | 2caf67e36c9ccd058268b003cf2bc39b9b102b53 /include/xmloff | |
parent | a5e137eb1d37361c60175e8fba780fc46b377a23 (diff) |
Related: #i124638# Second step of DrawingLayer FillAttributes...
for Writer objects, now added support for Paragraph and PageStyle (including
Header and Footer) for direct attributes and style attributes
(cherry picked from commit cc25c58f7052827bfebdc9fbeec668c8fa29ed1b)
Conflicts:
cui/source/factory/dlgfact.cxx
cui/source/factory/dlgfact.hxx
cui/source/inc/bbdlg.hxx
cui/source/inc/cuires.hrc
cui/source/tabpages/bbdlg.cxx
cui/source/tabpages/bbdlg.src
cui/source/tabpages/page.cxx
cui/source/tabpages/tparea.cxx
include/svx/pagectrl.hxx
include/svx/svxdlg.hxx
include/svx/svxids.hrc
include/xmloff/PageMasterStyleMap.hxx
include/xmloff/prstylei.hxx
include/xmloff/txtprmap.hxx
svx/Package_inc.mk
svx/inc/svx/hdft.hxx
svx/source/dialog/hdft.cxx
svx/source/dialog/pagectrl.cxx
svx/source/tbxctrls/tbxcolorupdate.cxx
svx/source/unodraw/unobrushitemhelper.cxx
sw/Library_sw.mk
sw/inc/fillattributes.hxx
sw/inc/format.hxx
sw/inc/frmatr.hxx
sw/inc/frmfmt.hxx
sw/inc/hintids.hxx
sw/inc/hints.hxx
sw/inc/ndtxt.hxx
sw/inc/node.hxx
sw/inc/swunohelper.hxx
sw/inc/unobrushitemhelper.hxx
sw/inc/unoprnms.hxx
sw/source/core/attr/format.cxx
sw/source/core/attr/hints.cxx
sw/source/core/doc/docdesc.cxx
sw/source/core/doc/docdraw.cxx
sw/source/core/doc/docfmt.cxx
sw/source/core/doc/docnew.cxx
sw/source/core/doc/docredln.cxx
sw/source/core/doc/poolfmt.cxx
sw/source/core/doc/visiturl.cxx
sw/source/core/docnode/node.cxx
sw/source/core/inc/frame.hxx
sw/source/core/inc/frmtool.hxx
sw/source/core/inc/rolbck.hxx
sw/source/core/layout/atrfrm.cxx
sw/source/core/layout/fillattributes.cxx
sw/source/core/layout/findfrm.cxx
sw/source/core/layout/paintfrm.cxx
sw/source/core/txtnode/ndtxt.cxx
sw/source/core/txtnode/thints.cxx
sw/source/core/txtnode/txtedt.cxx
sw/source/core/undo/rolbck.cxx
sw/source/core/unocore/swunohelper.cxx
sw/source/core/unocore/unoframe.cxx
sw/source/core/unocore/unomap.cxx
sw/source/core/unocore/unoparagraph.cxx
sw/source/core/unocore/unoprnms.cxx
sw/source/core/unocore/unostyle.cxx
sw/source/ui/chrdlg/paradlg.src
sw/source/ui/chrdlg/pardlg.cxx
sw/source/ui/fmtui/tmpdlg.cxx
sw/source/ui/fmtui/tmpdlg.src
sw/source/uibase/app/docst.cxx
sw/source/uibase/app/docstyle.cxx
sw/source/uibase/frmdlg/colex.cxx
sw/source/uibase/shells/basesh.cxx
sw/source/uibase/shells/textsh1.cxx
sw/source/uibase/uiview/viewstat.cxx
sw/source/uibase/utlui/uitool.cxx
xmloff/inc/PageMasterImportContext.hxx
xmloff/inc/xmloff/XMLShapeStyleContext.hxx
xmloff/source/draw/XMLShapeStyleContext.cxx
xmloff/source/draw/sdpropls.hxx
xmloff/source/style/PageMasterExportPropMapper.cxx
xmloff/source/style/PageMasterImportContext.cxx
xmloff/source/style/PageMasterPropHdlFactory.cxx
xmloff/source/style/PageMasterStyleMap.cxx
xmloff/source/style/prstylei.cxx
xmloff/source/text/txtexppr.cxx
xmloff/source/text/txtprhdl.cxx
xmloff/source/text/txtprmap.cxx
xmloff/source/text/txtstyli.cxx
Conflicts:
svx/source/dialog/hdft.cxx
sw/source/core/doc/visiturl.cxx
sw/source/core/txtnode/thints.cxx
sw/source/core/txtnode/txtatr2.cxx
sw/source/core/unocore/unostyle.cxx
Change-Id: I7e8779db6c0cbd1e242b63eab888f468f2de509a
Diffstat (limited to 'include/xmloff')
-rw-r--r-- | include/xmloff/PageMasterStyleMap.hxx | 27 | ||||
-rw-r--r-- | include/xmloff/XMLShapeStyleContext.hxx | 3 | ||||
-rw-r--r-- | include/xmloff/prstylei.hxx | 37 | ||||
-rw-r--r-- | include/xmloff/txtprmap.hxx | 8 |
4 files changed, 66 insertions, 9 deletions
diff --git a/include/xmloff/PageMasterStyleMap.hxx b/include/xmloff/PageMasterStyleMap.hxx index a4bd011fb229..a4007bd012f5 100644 --- a/include/xmloff/PageMasterStyleMap.hxx +++ b/include/xmloff/PageMasterStyleMap.hxx @@ -86,6 +86,17 @@ #define CTF_PM_GRAPHICFILTER (XML_PM_CTF_START + 0x0033) #define CTF_PM_GRAPHICURL (XML_PM_CTF_START + 0x0034) +//UUUUNeed own entries for PageMasterStyleMap since these get *filtered* +// at export time using CTF_PM_FLAGMASK and XML_PM_CTF_START as detector +// to find the first entry for header/footer (!), see +// SvXMLAutoStylePoolP_Impl::exportXML, look for XML_STYLE_FAMILY_PAGE_MASTER +#define CTF_PM_REPEAT_OFFSET_X (XML_PM_CTF_START + 0x0035) +#define CTF_PM_REPEAT_OFFSET_Y (XML_PM_CTF_START + 0x0036) +#define CTF_PM_FILLGRADIENTNAME (XML_PM_CTF_START + 0x0037) +#define CTF_PM_FILLHATCHNAME (XML_PM_CTF_START + 0x0038) +#define CTF_PM_FILLBITMAPNAME (XML_PM_CTF_START + 0x0039) +#define CTF_PM_FILLTRANSNAME (XML_PM_CTF_START + 0x0040) + #define CTF_PM_SCALETO (XML_PM_CTF_START + 0x0051) // calc specific #define CTF_PM_SCALETOPAGES (XML_PM_CTF_START + 0x0052) #define CTF_PM_SCALETOX (XML_PM_CTF_START + 0x0053) @@ -122,6 +133,14 @@ #define CTF_PM_HEADERMARGINLEFT (CTF_PM_HEADERFLAG|CTF_PM_MARGINLEFT) #define CTF_PM_HEADERMARGINRIGHT (CTF_PM_HEADERFLAG|CTF_PM_MARGINRIGHT) +//UUUUNeed own entries for PageMasterStyleMap ORed with the CTF_PM_HEADERFLAG +#define CTF_PM_HEADERREPEAT_OFFSET_X (CTF_PM_HEADERFLAG|CTF_PM_REPEAT_OFFSET_X) +#define CTF_PM_HEADERREPEAT_OFFSET_Y (CTF_PM_HEADERFLAG|CTF_PM_REPEAT_OFFSET_Y) +#define CTF_PM_HEADERFILLGRADIENTNAME (CTF_PM_HEADERFLAG|CTF_PM_FILLGRADIENTNAME) +#define CTF_PM_HEADERFILLHATCHNAME (CTF_PM_HEADERFLAG|CTF_PM_FILLHATCHNAME) +#define CTF_PM_HEADERFILLBITMAPNAME (CTF_PM_HEADERFLAG|CTF_PM_FILLBITMAPNAME) +#define CTF_PM_HEADERFILLTRANSNAME (CTF_PM_HEADERFLAG|CTF_PM_FILLTRANSNAME) + // footer #define CTF_PM_FOOTERBORDERALL (CTF_PM_FOOTERFLAG|CTF_PM_BORDERALL) #define CTF_PM_FOOTERBORDERTOP (CTF_PM_FOOTERFLAG|CTF_PM_BORDERTOP) @@ -150,6 +169,14 @@ #define CTF_PM_FOOTERMARGINLEFT (CTF_PM_FOOTERFLAG|CTF_PM_MARGINLEFT) #define CTF_PM_FOOTERMARGINRIGHT (CTF_PM_FOOTERFLAG|CTF_PM_MARGINRIGHT) +//UUUUNeed own entries for PageMasterStyleMap ORed with the CTF_PM_FOOTERFLAG +#define CTF_PM_FOOTERREPEAT_OFFSET_X (CTF_PM_FOOTERFLAG|CTF_PM_REPEAT_OFFSET_X) +#define CTF_PM_FOOTERREPEAT_OFFSET_Y (CTF_PM_FOOTERFLAG|CTF_PM_REPEAT_OFFSET_Y) +#define CTF_PM_FOOTERFILLGRADIENTNAME (CTF_PM_FOOTERFLAG|CTF_PM_FILLGRADIENTNAME) +#define CTF_PM_FOOTERFILLHATCHNAME (CTF_PM_FOOTERFLAG|CTF_PM_FILLHATCHNAME) +#define CTF_PM_FOOTERFILLBITMAPNAME (CTF_PM_FOOTERFLAG|CTF_PM_FILLBITMAPNAME) +#define CTF_PM_FOOTERFILLTRANSNAME (CTF_PM_FOOTERFLAG|CTF_PM_FILLTRANSNAME) + #define CTF_PM_FTN_HEIGHT (XML_PM_CTF_START + 0x0060) #define CTF_PM_FTN_LINE_WEIGHT (XML_PM_CTF_START + 0x0061) #define CTF_PM_FTN_LINE_COLOR (XML_PM_CTF_START + 0x0062) diff --git a/include/xmloff/XMLShapeStyleContext.hxx b/include/xmloff/XMLShapeStyleContext.hxx index a93181a5d71a..b0f7a3aef24d 100644 --- a/include/xmloff/XMLShapeStyleContext.hxx +++ b/include/xmloff/XMLShapeStyleContext.hxx @@ -36,8 +36,9 @@ protected: OUString m_sControlDataStyleName; OUString m_sListStyleName; bool m_bIsNumRuleAlreadyConverted; + //UUUU - bool m_bIsFillStyleAlreadyConverted; + bool m_bIsFillStyleAlreadyConverted : 1; protected: virtual void SetAttribute( sal_uInt16 nPrefixKey, diff --git a/include/xmloff/prstylei.hxx b/include/xmloff/prstylei.hxx index 4668668cf6de..76dab711104d 100644 --- a/include/xmloff/prstylei.hxx +++ b/include/xmloff/prstylei.hxx @@ -26,6 +26,9 @@ #include <vector> #include <xmloff/xmlstyle.hxx> +//UUUU +#include <boost/unordered_set.hpp> + struct XMLPropertyState; class SvXMLStylesContext; @@ -33,19 +36,53 @@ namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } } +//UUUU +typedef boost::unordered_set<OUString, OUStringHash> OldFillStyleDefinitionSet; + class XMLOFF_DLLPUBLIC XMLPropStyleContext : public SvXMLStyleContext { +private: const OUString msIsPhysical; const OUString msFollowStyle; ::std::vector< XMLPropertyState > maProperties; ::com::sun::star::uno::Reference < ::com::sun::star::style::XStyle > mxStyle; SvXMLImportContextRef mxStyles; + //UUUU + static OldFillStyleDefinitionSet maStandardSet; + static OldFillStyleDefinitionSet maHeaderSet; + static OldFillStyleDefinitionSet maFooterSet; + static OldFillStyleDefinitionSet maParaSet; + SAL_DLLPRIVATE XMLPropStyleContext(XMLPropStyleContext &); // not defined SAL_DLLPRIVATE void operator =(XMLPropStyleContext &); // not defined protected: + //UUUU Helper to check if the local maProperties contzains the given + // FillStyle tag and if the FillStyle there is different from FillStyle_NONE + bool doNewDrawingLayerFillStyleDefinitionsExist( + const ::rtl::OUString& rFillStyleTag) const; + + //UUUU Helper which will deactivate all old fill definitions (identified by + // the given OldFillStyleDefinitionSet) in the local maProperties. Deactivation + // is done setting theindex to -1. It returns true when actually old fill + // definitions existed and were deactivated + bool deactivateOldFillStyleDefinitions( + const OldFillStyleDefinitionSet& rHashSetOfTags); + + //UUUU Helper to translate new DrawingLayer FillStyle values which are name-based + // from ODF internal name to style display names which can be found in the current + // document model (using NameOrIndex Items). The change is executed on the internal + // maProperties. The return value is true when actually names were changed + bool translateNameBasedDrawingLayerFillStyleDefinitionsToStyleDisplayNames(); + + //UUUU provider for often used sets + const OldFillStyleDefinitionSet& getStandardSet(); + const OldFillStyleDefinitionSet& getHeaderSet(); + const OldFillStyleDefinitionSet& getFooterSet(); + const OldFillStyleDefinitionSet& getParaSet(); + virtual void SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName, const OUString& rValue ) SAL_OVERRIDE; diff --git a/include/xmloff/txtprmap.hxx b/include/xmloff/txtprmap.hxx index 2de9987d5c92..dc8de7026395 100644 --- a/include/xmloff/txtprmap.hxx +++ b/include/xmloff/txtprmap.hxx @@ -198,14 +198,6 @@ #define CTF_RELHEIGHTREL (XML_TEXT_CTF_START + 169) -//UUUU -#define CTF_SW_REPEAT_OFFSET_X (XML_TEXT_CTF_START + 170) -#define CTF_SW_REPEAT_OFFSET_Y (XML_TEXT_CTF_START + 171) -#define CTF_SW_FILLGRADIENTNAME (XML_TEXT_CTF_START + 172) -#define CTF_SW_FILLHATCHNAME (XML_TEXT_CTF_START + 173) -#define CTF_SW_FILLBITMAPNAME (XML_TEXT_CTF_START + 174) -#define CTF_SW_FILLTRANSNAME (XML_TEXT_CTF_START + 175) - #define TEXT_PROP_MAP_TEXT 0 #define TEXT_PROP_MAP_PARA 1 #define TEXT_PROP_MAP_FRAME 2 |