[Libreoffice-commits] core.git: svx/sdi sw/source
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 31 13:27:48 UTC 2019
svx/sdi/svx.sdi | 2 +-
sw/source/uibase/shells/drawdlg.cxx | 23 +++++++++++++++++++----
2 files changed, 20 insertions(+), 5 deletions(-)
New commits:
commit b7eeb8b03035dd0be715fa90bcbd8b151bc99871
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Oct 31 11:49:22 2019 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Oct 31 14:27:03 2019 +0100
jsdialogs: .uno:XFillColor with string argument
Change-Id: I7f078fc66cecacccd4473495f96e4e2dbfd89d14
Reviewed-on: https://gerrit.libreoffice.org/81832
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index e51ca7732961..f3d5bd97af72 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -2611,7 +2611,7 @@ XFillBitmapItem FillPageBitmap SID_ATTR_PAGE_BITMAP
]
XFillColorItem FillColor SID_ATTR_FILL_COLOR
-
+(SfxStringItem Color SID_ATTR_COLOR_STR, XFillColorItem FillColor SID_ATTR_FILL_COLOR)
[
AutoUpdate = TRUE,
FastCall = FALSE,
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx
index 2c5a923e5983..a16ac67c016b 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -36,6 +36,7 @@
#include <memory>
#include <svl/stritem.hxx>
#include <svx/xlnclit.hxx>
+#include <svx/xflclit.hxx>
void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
{
@@ -204,7 +205,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
namespace
{
- void lcl_convertStringArguments(std::unique_ptr<SfxItemSet>& pArgs)
+ void lcl_convertStringArguments(sal_uInt16 nSlot, std::unique_ptr<SfxItemSet>& pArgs)
{
Color aColor;
OUString sColor;
@@ -219,8 +220,22 @@ namespace
else
aColor = Color(sColor.toInt32(16));
- XLineColorItem aLineColorItem(OUString(), aColor);
- pArgs->Put(aLineColorItem);
+ switch (nSlot)
+ {
+ case SID_ATTR_LINE_COLOR:
+ {
+ XLineColorItem aLineColorItem(OUString(), aColor);
+ pArgs->Put(aLineColorItem);
+ break;
+ }
+
+ case SID_ATTR_FILL_COLOR:
+ {
+ XFillColorItem aFillColorItem(OUString(), aColor);
+ pArgs->Put(aFillColorItem);
+ break;
+ }
+ }
}
}
}
@@ -240,7 +255,7 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest const & rReq)
if(pView->AreObjectsMarked())
{
std::unique_ptr<SfxItemSet> pNewArgs = pArgs->Clone();
- lcl_convertStringArguments(pNewArgs);
+ lcl_convertStringArguments(rReq.GetSlot(), pNewArgs);
pView->SetAttrToMarked(*pNewArgs, false);
}
else
More information about the Libreoffice-commits
mailing list