[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/sdi sw/source
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 8 12:59:21 UTC 2019
svx/sdi/svx.sdi | 2 +-
sw/source/uibase/shells/drawdlg.cxx | 23 +++++++++++++++++++----
2 files changed, 20 insertions(+), 5 deletions(-)
New commits:
commit 4d8315200f2157b47af4a780c69985b28321b703
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: Fri Nov 8 13:58:35 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>
Reviewed-on: https://gerrit.libreoffice.org/82291
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 339a8e9b6d8e..6d52f0328e1f 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -2596,7 +2596,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 5de7f6d0dbbf..6b4462f952f2 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -37,6 +37,7 @@
#include <svx/xlnclit.hxx>
#include <svx/chrtitem.hxx>
#include <svx/xlnwtit.hxx>
+#include <svx/xflclit.hxx>
void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
{
@@ -203,7 +204,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;
@@ -218,8 +219,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;
+ }
+ }
}
else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem))
{
@@ -249,7 +264,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