summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/view/drtxtob1.cxx38
-rw-r--r--sd/source/ui/view/drviews2.cxx27
-rw-r--r--sd/source/ui/view/drviews7.cxx25
3 files changed, 4 insertions, 86 deletions
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 86b7a698aa95..6282b750aa06 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -66,43 +66,6 @@
#include <memory>
-namespace
-{
- void lcl_convertStringArguments(sal_uInt16 nSlot, const std::unique_ptr<SfxItemSet>& pArgs)
- {
- Color aColor;
- OUString sColor;
- const SfxPoolItem* pColorStringItem = nullptr;
-
- if (SfxItemState::SET != pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
- return;
-
- sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue();
-
- if (sColor == "transparent")
- aColor = COL_TRANSPARENT;
- else
- aColor = Color(ColorTransparency, sColor.toInt32(16));
-
- switch (nSlot)
- {
- case SID_ATTR_CHAR_COLOR:
- {
- SvxColorItem aColorItem(aColor, EE_CHAR_COLOR);
- pArgs->Put(aColorItem);
- break;
- }
-
- case SID_ATTR_CHAR_BACK_COLOR:
- {
- SvxColorItem pBackgroundItem(aColor, EE_CHAR_BKGCOLOR);
- pArgs->Put(pBackgroundItem);
- break;
- }
- }
- }
-}
-
namespace sd {
/**
@@ -811,7 +774,6 @@ void TextObjectBar::Execute( SfxRequest &rReq )
}
std::unique_ptr<SfxItemSet> pNewArgs = pArgs->Clone();
- lcl_convertStringArguments(nSlot, pNewArgs);
// Merge the color parameters to the color itself.
std::unique_ptr<SvxColorItem> pColorItem;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index cd575c493423..b2c2803a2438 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -545,7 +545,6 @@ public:
void lcl_convertStringArguments(sal_uInt16 nSlot, const std::unique_ptr<SfxItemSet>& pArgs)
{
- Color aColor;
const SfxPoolItem* pItem = nullptr;
if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem))
@@ -558,32 +557,6 @@ public:
XLineWidthItem aItem(nValue);
pArgs->Put(aItem);
}
- if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem))
- {
- OUString sColor = static_cast<const SfxStringItem*>(pItem)->GetValue();
-
- if (sColor == "transparent")
- aColor = COL_TRANSPARENT;
- else
- aColor = Color(ColorTransparency, sColor.toInt32(16));
-
- 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;
- }
- }
- }
if (SfxItemState::SET == pArgs->GetItemState(SID_FILL_GRADIENT_JSON, false, &pItem))
{
const SfxStringItem* pJSON = static_cast<const SfxStringItem*>(pItem);
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index b7968a638ce5..141112bf9f9b 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1799,28 +1799,11 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
case SID_ATTR_PAGE_COLOR:
{
- if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem))
- {
- Color aColor;
- OUString sColor;
-
- sColor = static_cast<const SfxStringItem*>(pItem)->GetValue();
-
- if (sColor == "transparent")
- aColor = COL_TRANSPARENT;
- else
- aColor = Color(ColorTransparency, sColor.toInt32(16));
-
- XFillColorItem aColorItem(OUString(), aColor);
- rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_SOLID ) );
- rPageProperties.PutItem( aColorItem );
- }
+ rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_SOLID ) );
+ if (const XFillColorItem* pColorItem = static_cast<const XFillColorItem*>(pArgs->GetItem(SID_ATTR_PAGE_COLOR)))
+ rPageProperties.PutItem(XFillColorItem("", pColorItem->GetColorValue()));
else
- {
- XFillColorItem aColorItem( pArgs->Get( XATTR_FILLCOLOR ) );
- rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_SOLID ) );
- rPageProperties.PutItem( aColorItem );
- }
+ rPageProperties.PutItem(pArgs->Get(XATTR_FILLCOLOR));
}
break;