diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-10-17 22:14:38 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2017-10-19 21:02:07 +0200 |
commit | 98133504fde1e1b235c39e4bb3b72bb2ee0b7819 (patch) | |
tree | a40a89027bf64ac74fa9a3a76b0989e8bd679c7f /include | |
parent | 278bdbca318defa3bb862e0422cff2492ef46705 (diff) |
PPTX export: remember color schemes in theme
Remember color scheme from loaded pptx file
or use default values.
Change-Id: Icb69c51603afc5f332c20c75e4ed5f659f4b5614
Reviewed-on: https://gerrit.libreoffice.org/43470
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/oox/drawingml/clrscheme.hxx | 33 | ||||
-rw-r--r-- | include/oox/export/utils.hxx | 2 | ||||
-rw-r--r-- | include/oox/ppt/presentationfragmenthandler.hxx | 1 |
3 files changed, 35 insertions, 1 deletions
diff --git a/include/oox/drawingml/clrscheme.hxx b/include/oox/drawingml/clrscheme.hxx index ccb1517e44eb..ccf918d7ba74 100644 --- a/include/oox/drawingml/clrscheme.hxx +++ b/include/oox/drawingml/clrscheme.hxx @@ -28,9 +28,42 @@ #include <oox/dllapi.h> #include <sal/types.h> +#include <rtl/ustring.hxx> namespace oox { namespace drawingml { +enum PredefinedClrSchemeId { + //dk1, + //lt1, + dk2 = 0, + lt2, + accent1, + accent2, + accent3, + accent4, + accent5, + accent6, + hlink, + folHlink, + Count +}; + +static std::map<PredefinedClrSchemeId, rtl::OUString> PredefinedClrNames = +{ + //{ dk1, "dk1" }, + //{ lt1, "lt1" }, + { dk2, "dk2" }, + { lt2, "lt2" }, + { accent1, "accent1" }, + { accent2, "accent2" }, + { accent3, "accent3" }, + { accent4, "accent4" }, + { accent5, "accent5" }, + { accent6, "accent6" }, + { hlink, "hlink" }, + { folHlink, "folHlink" } +}; + class ClrMap { std::map < sal_Int32, sal_Int32 > maClrMap; diff --git a/include/oox/export/utils.hxx b/include/oox/export/utils.hxx index 6bca2edcbd16..74e78a37da33 100644 --- a/include/oox/export/utils.hxx +++ b/include/oox/export/utils.hxx @@ -28,7 +28,7 @@ inline OString I32S_(sal_Int32 x) { return OString::number(x); } inline OString I32SHEX_(sal_Int32 x) { OString aStr = OString::number(x, 16); - if (aStr.getLength() % 2 != 0) + while (aStr.getLength() < 6) aStr = OString("0") + aStr; return aStr.getStr(); } diff --git a/include/oox/ppt/presentationfragmenthandler.hxx b/include/oox/ppt/presentationfragmenthandler.hxx index aeda119cd2f1..637e70643be7 100644 --- a/include/oox/ppt/presentationfragmenthandler.hxx +++ b/include/oox/ppt/presentationfragmenthandler.hxx @@ -53,6 +53,7 @@ protected: private: void importSlide(sal_uInt32 nSlide, bool bFirstSlide, bool bImportNotes); + void saveThemeToGrabBag(oox::drawingml::ThemePtr pThemePtr, const OUString& sTheme); std::vector< OUString > maSlideMasterVector; std::vector< OUString > maSlidesVector; |