summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-11-05 10:35:49 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-11-05 11:57:58 +0100
commit78d81c2e6ee4eb7caf2d4822657bc4eaa57bfc79 (patch)
tree7d3354d491fc1c2e8c4fc054e7ce81e8c0dba2ce
parenta14dc5ab90a2a7904efa68759795a2f8845898c2 (diff)
jsdialogs: .uno:ChartBackColor with string argument
Change-Id: I2f28a0ba957548b020eacf3d630dccef6ebbf5ed Reviewed-on: https://gerrit.libreoffice.org/82057 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--sd/source/ui/view/drtxtob1.cxx22
-rw-r--r--svx/sdi/svx.sdi2
2 files changed, 19 insertions, 5 deletions
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index d16a70e748ab..29d873aa8d80 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -70,7 +70,7 @@
namespace
{
- void lcl_convertStringArguments(std::unique_ptr<SfxItemSet>& pArgs)
+ void lcl_convertStringArguments(sal_uInt16 nSlot, std::unique_ptr<SfxItemSet>& pArgs)
{
Color aColor;
OUString sColor;
@@ -85,8 +85,22 @@ namespace
else
aColor = Color(sColor.toInt32(16));
- SvxColorItem aColorItem(aColor, EE_CHAR_COLOR);
- pArgs->Put(aColorItem);
+ switch (nSlot)
+ {
+ case SID_ATTR_CHAR_COLOR:
+ {
+ SvxColorItem aColorItem(aColor, EE_CHAR_COLOR);
+ pArgs->Put(aColorItem);
+ break;
+ }
+
+ case SID_ATTR_CHAR_BACK_COLOR:
+ {
+ SvxBackgroundColorItem pBackgroundItem(aColor, EE_CHAR_BKGCOLOR);
+ pArgs->Put(pBackgroundItem);
+ break;
+ }
+ }
}
}
}
@@ -761,7 +775,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
}
std::unique_ptr<SfxItemSet> pNewArgs = pArgs->Clone();
- lcl_convertStringArguments(pNewArgs);
+ lcl_convertStringArguments(nSlot, pNewArgs);
mpView->SetAttributes(*pNewArgs);
// invalidate entire shell because of performance and
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 775dfa98309a..068612a76e7d 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -1524,7 +1524,7 @@ SvxColorItem Color SID_ATTR_CHAR_COLOR
]
SvxBackgroundColorItem CharBackColor SID_ATTR_CHAR_BACK_COLOR
-
+(SfxStringItem Color SID_ATTR_COLOR_STR, SvxBackgroundColorItem CharBackColor SID_ATTR_CHAR_BACK_COLOR)
[
AutoUpdate = TRUE,
FastCall = FALSE,