[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang svx/sdi sw/source
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 28 11:34:30 UTC 2019
compilerplugins/clang/stringadd.cxx | 3 +--
svx/sdi/svx.sdi | 1 +
sw/source/uibase/shells/basesh.cxx | 32 ++++++++++++++++++++++++++++++--
3 files changed, 32 insertions(+), 4 deletions(-)
New commits:
commit 1144712bb99cfb699e73b473ee44351c50a35613
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Oct 28 10:19:50 2019 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Oct 28 12:33:49 2019 +0100
jsdialogs: make possible to set .uno:BackgroundColor in Writer
Change-Id: Ifd6a63683ddf36a3c1e8babd9c030ae5f051ed00
Reviewed-on: https://gerrit.libreoffice.org/81596
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 8e977c82173c..acbee171bc2d 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -408,6 +408,7 @@ SfxVoidItem TableDesign SID_TABLEDESIGN
]
SvxColorItem BackgroundColor SID_BACKGROUND_COLOR
+(SfxStringItem Color SID_ATTR_COLOR_STR, SvxColorItem BackgroundColor SID_BACKGROUND_COLOR)
[
AutoUpdate = TRUE,
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 89f4e3a00824..e8600de55c43 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2339,17 +2339,45 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
case SID_BACKGROUND_COLOR:
case SID_TABLE_CELL_BACKGROUND_COLOR:
{
+ const SfxPoolItem* pColorStringItem = nullptr;
+ bool bIsTransparent = false;
+
aBrushItem->SetGraphicPos(GPOS_NONE);
- if(pArgs)
+ sal_uInt16 nSlotId = SID_BACKGROUND_COLOR ? SID_BACKGROUND_COLOR : SID_TABLE_CELL_BACKGROUND_COLOR;
+ if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
+ {
+ OUString sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue();
+ if (sColor == "transparent")
+ {
+ bIsTransparent = true;
+ }
+ else
+ {
+ Color aColor(sColor.toInt32(16));
+
+ aBrushItem->SetColor(aColor);
+
+ SvxColorItem aNewColorItem(nSlotId);
+ aNewColorItem.SetValue(aColor);
+
+ GetView().GetViewFrame()->GetBindings().SetState(aNewColorItem);
+ }
+ }
+ else if(pArgs)
{
- const SvxColorItem& rNewColorItem = pArgs->Get(nSlot == SID_BACKGROUND_COLOR ? SID_BACKGROUND_COLOR : SID_TABLE_CELL_BACKGROUND_COLOR );
+ const SvxColorItem& rNewColorItem = static_cast<const SvxColorItem&>(pArgs->Get(nSlotId));
const Color& rNewColor = rNewColorItem.GetValue();
aBrushItem->SetColor(rNewColor);
GetView().GetViewFrame()->GetBindings().SetState(rNewColorItem);
}
else
{
+ bIsTransparent = true;
+ }
+
+ if (bIsTransparent)
+ {
aBrushItem->SetColor(COL_TRANSPARENT);
rReq.AppendItem(SvxColorItem(COL_TRANSPARENT,nSlot));
}
commit 6385e04f7e194ce6dcc82588f38355b467d0d276
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Oct 28 10:20:08 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Oct 28 12:33:38 2019 +0100
Completely remove lambda capture that is unused
...since 6d6fad522a2cd6a2959ea774969a86288f5a3cb7 "Introduce OStringChar" (and
had needlessly been kept alive with ce3badb157c58941608f878a7de98c7739e30aec
"compilerplugins: fix -Werror,-Wunused-lambda-capture")
Change-Id: Ie34ef1197f97ecab5b8f30741f1e2c4b3a9db594
Reviewed-on: https://gerrit.libreoffice.org/81591
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/compilerplugins/clang/stringadd.cxx b/compilerplugins/clang/stringadd.cxx
index c1023c641bbb..653c281f0ac7 100644
--- a/compilerplugins/clang/stringadd.cxx
+++ b/compilerplugins/clang/stringadd.cxx
@@ -204,8 +204,7 @@ bool StringAdd::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const* operatorCall
&& !tc.Class("OString").Namespace("rtl").GlobalNamespace())
return true;
- auto check = [operatorCall, this, &tc](unsigned arg) {
- (void)tc;
+ auto check = [operatorCall, this](unsigned arg) {
auto const e
= dyn_cast<CXXFunctionalCastExpr>(operatorCall->getArg(arg)->IgnoreParenImpCasts());
if (e == nullptr)
More information about the Libreoffice-commits
mailing list