make the Color constructors explicitly specify transparency
to reduce the churn, we leave the existing constructor in place, and add a clang plugin to detect when the value passed to the existing constructor may contain transparency/alpha data. i.e. we leave expressions like Color(0xffffff) alone, but warn about any non-constant expression, and any expression like Color(0xff000000) Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -140,7 +140,7 @@ void SAL_CALL ProgressBar::setForegroundColor( sal_Int32 nColor )
|
||||
MutexGuard aGuard (m_aMutex);
|
||||
|
||||
// Safe color for later use.
|
||||
m_nForegroundColor = Color(nColor);
|
||||
m_nForegroundColor = Color(ColorTransparency, nColor);
|
||||
|
||||
// Repaint control
|
||||
impl_paint ( 0, 0, impl_getGraphicsPeer() );
|
||||
@@ -154,7 +154,7 @@ void SAL_CALL ProgressBar::setBackgroundColor ( sal_Int32 nColor )
|
||||
MutexGuard aGuard (m_aMutex);
|
||||
|
||||
// Safe color for later use.
|
||||
m_nBackgroundColor = Color(nColor);
|
||||
m_nBackgroundColor = Color(ColorTransparency, nColor);
|
||||
|
||||
// Repaint control
|
||||
impl_paint ( 0, 0, impl_getGraphicsPeer() );
|
||||
|
||||
@@ -30,14 +30,14 @@ namespace unocontrols {
|
||||
#define PROGRESSBAR_FREESPACE 4
|
||||
#define PROGRESSBAR_DEFAULT_HORIZONTAL true
|
||||
#define PROGRESSBAR_DEFAULT_BLOCKDIMENSION Size(1,1)
|
||||
#define PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR sal_Int32(Color( 0x00, 0xC0, 0xC0, 0xC0 )) // lightgray
|
||||
#define PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR sal_Int32(Color( 0x00, 0x00, 0x00, 0x80 )) // blue
|
||||
#define PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR sal_Int32(Color( 0xC0, 0xC0, 0xC0 )) // lightgray
|
||||
#define PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR sal_Int32(Color( 0x00, 0x00, 0x80 )) // blue
|
||||
#define PROGRESSBAR_DEFAULT_MINRANGE INT_MIN
|
||||
#define PROGRESSBAR_DEFAULT_MAXRANGE INT_MAX
|
||||
#define PROGRESSBAR_DEFAULT_BLOCKVALUE 1
|
||||
#define PROGRESSBAR_DEFAULT_VALUE PROGRESSBAR_DEFAULT_MINRANGE
|
||||
#define PROGRESSBAR_LINECOLOR_BRIGHT sal_Int32(Color( 0x00, 0xFF, 0xFF, 0xFF )) // white
|
||||
#define PROGRESSBAR_LINECOLOR_SHADOW sal_Int32(Color( 0x00, 0x00, 0x00, 0x00 )) // black
|
||||
#define PROGRESSBAR_LINECOLOR_BRIGHT sal_Int32(Color( 0xFF, 0xFF, 0xFF )) // white
|
||||
#define PROGRESSBAR_LINECOLOR_SHADOW sal_Int32(Color( 0x00, 0x00, 0x00 )) // black
|
||||
|
||||
class ProgressBar final : public css::awt::XControlModel
|
||||
, public css::awt::XProgressBar
|
||||
|
||||
@@ -39,8 +39,8 @@ class ProgressBar;
|
||||
#define PROGRESSMONITOR_FREEBORDER 10 // border around and between the controls
|
||||
#define PROGRESSMONITOR_DEFAULT_TOPIC ""
|
||||
#define PROGRESSMONITOR_DEFAULT_TEXT ""
|
||||
#define PROGRESSMONITOR_LINECOLOR_BRIGHT sal_Int32(Color( 0x00, 0xFF, 0xFF, 0xFF )) // white
|
||||
#define PROGRESSMONITOR_LINECOLOR_SHADOW sal_Int32(Color( 0x00, 0x00, 0x00, 0x00 )) // black
|
||||
#define PROGRESSMONITOR_LINECOLOR_BRIGHT sal_Int32(Color( 0xFF, 0xFF, 0xFF )) // white
|
||||
#define PROGRESSMONITOR_LINECOLOR_SHADOW sal_Int32(Color( 0x00, 0x00, 0x00 )) // black
|
||||
#define PROGRESSMONITOR_DEFAULT_WIDTH 350
|
||||
#define PROGRESSMONITOR_DEFAULT_HEIGHT 100
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@ namespace unocontrols {
|
||||
class ProgressBar;
|
||||
|
||||
#define STATUSINDICATOR_FREEBORDER 5 // border around and between the controls
|
||||
#define STATUSINDICATOR_BACKGROUNDCOLOR sal_Int32(Color( 0x00, 0xC0, 0xC0, 0xC0 )) // lightgray
|
||||
#define STATUSINDICATOR_LINECOLOR_BRIGHT sal_Int32(Color( 0x00, 0xFF, 0xFF, 0xFF )) // white
|
||||
#define STATUSINDICATOR_LINECOLOR_SHADOW sal_Int32(Color( 0x00, 0x00, 0x00, 0x00 )) // black
|
||||
#define STATUSINDICATOR_BACKGROUNDCOLOR sal_Int32(Color( 0xC0, 0xC0, 0xC0 )) // lightgray
|
||||
#define STATUSINDICATOR_LINECOLOR_BRIGHT sal_Int32(Color( 0xFF, 0xFF, 0xFF )) // white
|
||||
#define STATUSINDICATOR_LINECOLOR_SHADOW sal_Int32(Color( 0x00, 0x00, 0x00 )) // black
|
||||
#define STATUSINDICATOR_DEFAULT_WIDTH 300
|
||||
#define STATUSINDICATOR_DEFAULT_HEIGHT 25
|
||||
|
||||
|
||||
@@ -646,11 +646,11 @@ void DataBrowser::RenewTable()
|
||||
{
|
||||
auto spHeader = std::make_shared<impl::SeriesHeader>( m_pColumnsWin, m_pColorsWin );
|
||||
Reference< beans::XPropertySet > xSeriesProp( elemHeader.m_xDataSeries, uno::UNO_QUERY );
|
||||
sal_Int32 nColor = 0;
|
||||
Color nColor;
|
||||
// @todo: Set "DraftColor", i.e. interpolated colors for gradients, bitmaps, etc.
|
||||
if( xSeriesProp.is() &&
|
||||
( xSeriesProp->getPropertyValue( "Color" ) >>= nColor ))
|
||||
spHeader->SetColor( Color( nColor ));
|
||||
spHeader->SetColor( nColor );
|
||||
spHeader->SetChartType( elemHeader.m_xChartType, elemHeader.m_bSwapXAndYAxis );
|
||||
spHeader->SetSeriesName(
|
||||
DataSeriesHelper::getDataSeriesLabel(
|
||||
@@ -1278,10 +1278,10 @@ void DataBrowser::RenewSeriesHeaders()
|
||||
{
|
||||
auto spHeader = std::make_shared<impl::SeriesHeader>( m_pColumnsWin, m_pColorsWin );
|
||||
Reference< beans::XPropertySet > xSeriesProp(elemHeader.m_xDataSeries, uno::UNO_QUERY);
|
||||
sal_Int32 nColor = 0;
|
||||
Color nColor;
|
||||
if( xSeriesProp.is() &&
|
||||
( xSeriesProp->getPropertyValue( "Color" ) >>= nColor ))
|
||||
spHeader->SetColor( Color( nColor ));
|
||||
spHeader->SetColor( nColor );
|
||||
spHeader->SetChartType( elemHeader.m_xChartType, elemHeader.m_bSwapXAndYAxis );
|
||||
spHeader->SetSeriesName(
|
||||
DataSeriesHelper::getDataSeriesLabel(
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace
|
||||
Color lcl_getAmbientColor(
|
||||
const uno::Reference< beans::XPropertySet > & xSceneProperties )
|
||||
{
|
||||
sal_Int32 nResult = 0x000000;
|
||||
Color nResult;
|
||||
try
|
||||
{
|
||||
xSceneProperties->getPropertyValue("D3DSceneAmbientColor") >>= nResult;
|
||||
@@ -162,7 +162,7 @@ namespace
|
||||
{
|
||||
DBG_UNHANDLED_EXCEPTION("chart2");
|
||||
}
|
||||
return Color( nResult );
|
||||
return nResult;
|
||||
}
|
||||
|
||||
void lcl_setAmbientColor(
|
||||
|
||||
@@ -216,7 +216,7 @@ DataPointItemConverter::DataPointItemConverter(
|
||||
m_bDataSeries( bDataSeries ),
|
||||
m_bOverwriteLabelsForAttributedDataPointsAlso(m_bDataSeries && bOverwriteLabelsForAttributedDataPointsAlso),
|
||||
m_bUseSpecialFillColor(bUseSpecialFillColor),
|
||||
m_nSpecialFillColor(nSpecialFillColor),
|
||||
m_nSpecialFillColor(ColorTransparency, nSpecialFillColor),
|
||||
m_nNumberFormat(nNumberFormat),
|
||||
m_nPercentNumberFormat(nPercentNumberFormat),
|
||||
m_aAvailableLabelPlacements(),
|
||||
|
||||
@@ -1004,7 +1004,7 @@ void ChartController::executeDispatch_LineColor(sal_uInt32 nColor)
|
||||
}
|
||||
|
||||
if( xPropSet.is() )
|
||||
xPropSet->setPropertyValue( "LineColor", css::uno::makeAny( Color(nColor) ) );
|
||||
xPropSet->setPropertyValue( "LineColor", css::uno::makeAny( Color(ColorTransparency, nColor) ) );
|
||||
}
|
||||
}
|
||||
catch( const uno::Exception& )
|
||||
|
||||
@@ -504,7 +504,7 @@ void ChartAreaPanel::updateData()
|
||||
{
|
||||
sal_uInt32 nFillColor = 0;
|
||||
xPropSet->getPropertyValue("FillColor") >>= nFillColor;
|
||||
XFillColorItem aFillColorItem("", Color(nFillColor));
|
||||
XFillColorItem aFillColorItem("", Color(ColorTransparency, nFillColor));
|
||||
updateFillColor(true, &aFillColorItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1125,13 +1125,13 @@ double VDataSeries::getValueByProperty( sal_Int32 nIndex, const OUString& rPropN
|
||||
if(rPropName.endsWith("Color"))
|
||||
{
|
||||
//optimized interpolation for color values
|
||||
Color aColor(static_cast<sal_uInt32>(fValue));
|
||||
Color aOldColor(static_cast<sal_uInt32>(fOldValue));
|
||||
Color aColor(ColorTransparency, static_cast<sal_uInt32>(fValue));
|
||||
Color aOldColor(ColorTransparency, static_cast<sal_uInt32>(fOldValue));
|
||||
sal_uInt8 r = aOldColor.GetRed() + (aColor.GetRed() - aOldColor.GetRed()) * mnPercent;
|
||||
sal_uInt8 g = aOldColor.GetGreen() + (aColor.GetGreen() - aOldColor.GetGreen()) * mnPercent;
|
||||
sal_uInt8 b = aOldColor.GetBlue() + (aColor.GetBlue() - aOldColor.GetBlue()) * mnPercent;
|
||||
sal_uInt8 t = 255 - (aOldColor.GetAlpha() + (aColor.GetAlpha() - aOldColor.GetAlpha()) * mnPercent);
|
||||
Color aRet(t, r, g, b);
|
||||
sal_uInt8 a = aOldColor.GetAlpha() + (aColor.GetAlpha() - aOldColor.GetAlpha()) * mnPercent;
|
||||
Color aRet(ColorAlpha, a, r, g, b);
|
||||
return sal_uInt32(aRet);
|
||||
}
|
||||
return fOldValue + (fValue - fOldValue) * mnPercent;
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
#ifndef LO_CLANG_SHARED_PLUGINS
|
||||
|
||||
#include <memory>
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <set>
|
||||
|
||||
#include "check.hxx"
|
||||
#include "plugin.hxx"
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
namespace
|
||||
{
|
||||
class ColorCheck : public loplugin::FilteringPlugin<ColorCheck>
|
||||
{
|
||||
public:
|
||||
explicit ColorCheck(loplugin::InstantiationData const& data)
|
||||
: FilteringPlugin(data)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void run() override
|
||||
{
|
||||
if (preRun())
|
||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||
}
|
||||
|
||||
bool VisitCXXConstructExpr(const CXXConstructExpr*);
|
||||
};
|
||||
|
||||
bool ColorCheck::VisitCXXConstructExpr(const CXXConstructExpr* constructExpr)
|
||||
{
|
||||
if (ignoreLocation(constructExpr))
|
||||
return true;
|
||||
|
||||
if (constructExpr->getNumArgs() != 1)
|
||||
return true;
|
||||
|
||||
auto tc = loplugin::TypeCheck(constructExpr->getType());
|
||||
if (!tc.Class("Color").GlobalNamespace())
|
||||
return true;
|
||||
|
||||
StringRef aFileName = getFilenameOfLocation(
|
||||
compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(constructExpr)));
|
||||
if (loplugin::isSamePathname(aFileName, SRCDIR "/include/tools/color.hxx"))
|
||||
return true;
|
||||
|
||||
const CXXConstructorDecl* constructorDecl = constructExpr->getConstructor();
|
||||
constructorDecl = constructorDecl->getCanonicalDecl();
|
||||
|
||||
if (!loplugin::TypeCheck(constructorDecl->getParamDecl(0)->getType())
|
||||
.Typedef("sal_uInt32")
|
||||
.GlobalNamespace())
|
||||
return true;
|
||||
|
||||
auto arg0 = constructExpr->getArg(0);
|
||||
if (arg0->isCXX11ConstantExpr(compiler.getASTContext()))
|
||||
{
|
||||
if (!arg0->isValueDependent())
|
||||
{
|
||||
llvm::Optional<llvm::APSInt> xVal
|
||||
= compat::getIntegerConstantExpr(arg0, compiler.getASTContext());
|
||||
if (xVal && *xVal > 0xffffff)
|
||||
report(DiagnosticsEngine::Warning,
|
||||
"Rather use the ColorTransparency or ColorAlpha version of this constructor",
|
||||
arg0->getExprLoc());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
report(DiagnosticsEngine::Warning,
|
||||
"Rather use the ColorTransparency or ColorAlpha version of this constructor",
|
||||
arg0->getExprLoc());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
loplugin::Plugin::Registration<ColorCheck> colorcheck("colorcheck");
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif // LO_CLANG_SHARED_PLUGINS
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
@@ -217,7 +217,7 @@ bool SvxChartOptions::RetrieveOptions()
|
||||
// set color values
|
||||
for( sal_Int32 i=0; i < nCount; i++ )
|
||||
{
|
||||
aCol = Color(aColorSeq[ i ]);
|
||||
aCol = Color(ColorTransparency, aColorSeq[ i ]);
|
||||
|
||||
aName = aPrefix + OUString::number(i + 1) + aPostfix;
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, SpinValueHdl_Impl, weld::SpinButton&, void)
|
||||
IMPL_LINK_NOARG(SvxColorTabPage, MetricSpinValueHdl_Impl, weld::MetricSpinButton&, void)
|
||||
{
|
||||
// read current MtrFields, if cmyk, then k-value as transparency
|
||||
aCurrentColor = Color(static_cast<sal_uInt8>(PercentToColor_Impl(m_xKcustom->get_value(FieldUnit::NONE))),
|
||||
aCurrentColor = Color(ColorTransparency, static_cast<sal_uInt8>(PercentToColor_Impl(m_xKcustom->get_value(FieldUnit::NONE))),
|
||||
static_cast<sal_uInt8>(PercentToColor_Impl(m_xCcustom->get_value(FieldUnit::NONE))),
|
||||
static_cast<sal_uInt8>(PercentToColor_Impl(m_xYcustom->get_value(FieldUnit::NONE))),
|
||||
static_cast<sal_uInt8>(PercentToColor_Impl(m_xMcustom->get_value(FieldUnit::NONE))));
|
||||
|
||||
@@ -330,10 +330,9 @@ bool ORTFImportExport::Write()
|
||||
bool bUnderline = ( css::awt::FontUnderline::NONE != m_aFont.Underline );
|
||||
bool bStrikeout = ( css::awt::FontStrikeout::NONE != m_aFont.Strikeout );
|
||||
|
||||
sal_Int32 nColor = 0;
|
||||
::Color aColor;
|
||||
if(m_xObject.is())
|
||||
m_xObject->getPropertyValue(PROPERTY_TEXTCOLOR) >>= nColor;
|
||||
::Color aColor(nColor);
|
||||
m_xObject->getPropertyValue(PROPERTY_TEXTCOLOR) >>= aColor;
|
||||
|
||||
OString aFonts(OUStringToOString(m_aFont.Name, RTL_TEXTENCODING_MS_1252));
|
||||
if (aFonts.isEmpty())
|
||||
@@ -661,10 +660,9 @@ void OHTMLImportExport::WriteBody()
|
||||
|
||||
// default Textcolour black
|
||||
m_pStream->WriteChar( '<' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_body ).WriteChar( ' ' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_O_text ).WriteChar( '=' );
|
||||
sal_Int32 nColor = 0;
|
||||
::Color aColor;
|
||||
if(m_xObject.is())
|
||||
m_xObject->getPropertyValue(PROPERTY_TEXTCOLOR) >>= nColor;
|
||||
::Color aColor(nColor);
|
||||
m_xObject->getPropertyValue(PROPERTY_TEXTCOLOR) >>= aColor;
|
||||
HTMLOutFuncs::Out_Color( (*m_pStream), aColor );
|
||||
|
||||
m_pStream->WriteCharPtr( " " OOO_STRING_SVTOOLS_HTML_O_bgcolor "=" );
|
||||
@@ -931,10 +929,9 @@ void OHTMLImportExport::FontOn()
|
||||
"=";
|
||||
m_pStream->WriteOString( aStrOut );
|
||||
|
||||
sal_Int32 nColor = 0;
|
||||
::Color aColor;
|
||||
if(m_xObject.is())
|
||||
m_xObject->getPropertyValue(PROPERTY_TEXTCOLOR) >>= nColor;
|
||||
::Color aColor(nColor);
|
||||
m_xObject->getPropertyValue(PROPERTY_TEXTCOLOR) >>= aColor;
|
||||
|
||||
HTMLOutFuncs::Out_Color( (*m_pStream), aColor );
|
||||
m_pStream->WriteCharPtr( ">" );
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <vcl/virdev.hxx>
|
||||
|
||||
#define NOT_LOADED (tools::Long(-1))
|
||||
#define NOT_LOADED_COLOR (Color(0xffffffff))
|
||||
#define NOT_LOADED_COLOR (Color(ColorTransparency, 0xffffffff))
|
||||
|
||||
using namespace ::com::sun::star::lang;
|
||||
using namespace ::com::sun::star::task;
|
||||
|
||||
@@ -82,14 +82,14 @@ namespace
|
||||
|
||||
if(nAlpha)
|
||||
{
|
||||
aContent.SetPixel(y, x, Color(
|
||||
255 - static_cast<sal_uInt8>(nAlpha),
|
||||
aContent.SetPixel(y, x, Color(ColorAlpha,
|
||||
static_cast<sal_uInt8>(nAlpha),
|
||||
static_cast<sal_uInt8>(nRed / nDivisor),
|
||||
static_cast<sal_uInt8>(nGreen / nDivisor),
|
||||
static_cast<sal_uInt8>(nBlue / nDivisor) ));
|
||||
}
|
||||
else
|
||||
aContent.SetPixel(y, x, Color(255, 0, 0, 0));
|
||||
aContent.SetPixel(y, x, Color(ColorAlpha, 0, 0, 0, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -105,10 +105,10 @@ namespace
|
||||
|
||||
if(rPixel.getAlpha())
|
||||
{
|
||||
aContent.SetPixel(y, x, Color(255 - rPixel.getAlpha(), rPixel.getRed(), rPixel.getGreen(), rPixel.getBlue()));
|
||||
aContent.SetPixel(y, x, Color(ColorAlpha, rPixel.getAlpha(), rPixel.getRed(), rPixel.getGreen(), rPixel.getBlue()));
|
||||
}
|
||||
else
|
||||
aContent.SetPixel(y, x, Color(255, 0, 0, 0));
|
||||
aContent.SetPixel(y, x, Color(ColorAlpha, 0, 0, 0, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace emfplushelper
|
||||
sal_uInt32 color;
|
||||
s.ReadUInt32(color);
|
||||
|
||||
solidColor = ::Color(0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
solidColor = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
SAL_INFO("drawinglayer", "EMF+\t\t\t\tSolid color: 0x" << std::hex << color << std::dec);
|
||||
break;
|
||||
}
|
||||
@@ -91,8 +91,8 @@ namespace emfplushelper
|
||||
s.ReadUInt32(backgroundColor);
|
||||
|
||||
hatchStyle = static_cast<EmfPlusHatchStyle>(style);
|
||||
solidColor = ::Color(0xff - (foregroundColor >> 24), (foregroundColor >> 16) & 0xff, (foregroundColor >> 8) & 0xff, foregroundColor & 0xff);
|
||||
secondColor = ::Color(0xff - (backgroundColor >> 24), (backgroundColor >> 16) & 0xff, (backgroundColor >> 8) & 0xff, backgroundColor & 0xff);
|
||||
solidColor = ::Color(ColorAlpha, (foregroundColor >> 24), (foregroundColor >> 16) & 0xff, (foregroundColor >> 8) & 0xff, foregroundColor & 0xff);
|
||||
secondColor = ::Color(ColorAlpha, (backgroundColor >> 24), (backgroundColor >> 16) & 0xff, (backgroundColor >> 8) & 0xff, backgroundColor & 0xff);
|
||||
SAL_INFO("drawinglayer", "EMF+\t\t\t\tHatch style: 0x" << std::hex << style);
|
||||
SAL_INFO("drawinglayer", "EMF+\t\t\t\tForeground color: 0x" << solidColor.AsRGBHexString());
|
||||
SAL_INFO("drawinglayer", "EMF+\t\t\t\tBackground color: 0x" << secondColor.AsRGBHexString());
|
||||
@@ -109,7 +109,7 @@ namespace emfplushelper
|
||||
SAL_INFO("drawinglayer", "EMF+\t\t\t\tAdditional flags: 0x" << std::hex << additionalFlags << std::dec);
|
||||
sal_uInt32 color;
|
||||
s.ReadUInt32(color);
|
||||
solidColor = ::Color(0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
solidColor = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
SAL_INFO("drawinglayer", "EMF+\t\t\t\tCenter color: 0x" << std::hex << color << std::dec);
|
||||
s.ReadFloat(firstPointX).ReadFloat(firstPointY);
|
||||
SAL_INFO("drawinglayer", "EMF+\t\t\t\tCenter point: " << firstPointX << "," << firstPointY);
|
||||
@@ -126,7 +126,7 @@ namespace emfplushelper
|
||||
for (int i = 0; i < surroundColorsNumber; i++)
|
||||
{
|
||||
s.ReadUInt32(color);
|
||||
surroundColors[i] = ::Color(0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
surroundColors[i] = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
if (i == 0)
|
||||
secondColor = surroundColors[0];
|
||||
SAL_INFO("drawinglayer", "EMF+\t\t\t\tSurround color[" << i << "]: 0x" << std::hex << color << std::dec);
|
||||
@@ -236,7 +236,7 @@ namespace emfplushelper
|
||||
for (int i = 0; i < colorblendPoints; i++)
|
||||
{
|
||||
s.ReadUInt32(color);
|
||||
colorblendColors[i] = ::Color(0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
colorblendColors[i] = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
SAL_INFO("drawinglayer", "EMF+\t\t\t\tColor[" << i << "]: 0x" << std::hex << color << std::dec);
|
||||
}
|
||||
}
|
||||
@@ -252,10 +252,10 @@ namespace emfplushelper
|
||||
<< ", size " << aWidth << "x" << aHeight);
|
||||
sal_uInt32 color;
|
||||
s.ReadUInt32(color);
|
||||
solidColor = ::Color(0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
solidColor = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
SAL_INFO("drawinglayer", "EMF+\t\t\t\tfirst color: 0x" << std::hex << color << std::dec);
|
||||
s.ReadUInt32(color);
|
||||
secondColor = ::Color(0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
secondColor = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
SAL_INFO("drawinglayer", "EMF+\t\t\t\tsecond color: 0x" << std::hex << color << std::dec);
|
||||
|
||||
// repeated colors, unknown meaning, see http://www.aces.uiuc.edu/~jhtodd/Metafile/MetafileRecords/ObjectBrush.html
|
||||
@@ -318,7 +318,7 @@ namespace emfplushelper
|
||||
for (int i = 0; i < colorblendPoints; i++)
|
||||
{
|
||||
s.ReadUInt32(color);
|
||||
colorblendColors[i] = ::Color(0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
colorblendColors[i] = ::Color(ColorAlpha, (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
|
||||
SAL_INFO("drawinglayer", "EMF+\t\t\t\tColor[" << i << "]: 0x" << std::hex << color << std::dec);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -454,7 +454,7 @@ namespace emfplushelper
|
||||
Color color;
|
||||
if (flags & 0x8000) // we use a color
|
||||
{
|
||||
color = Color(0xff - (brushIndexOrColor >> 24), (brushIndexOrColor >> 16) & 0xff,
|
||||
color = Color(ColorAlpha, (brushIndexOrColor >> 24), (brushIndexOrColor >> 16) & 0xff,
|
||||
(brushIndexOrColor >> 8) & 0xff, brushIndexOrColor & 0xff);
|
||||
}
|
||||
else // we use a pen
|
||||
@@ -724,7 +724,7 @@ namespace emfplushelper
|
||||
|
||||
// EMF Alpha (1 byte): An 8-bit unsigned integer that specifies the transparency of the background,
|
||||
// ranging from 0 for completely transparent to 0xFF for completely opaque.
|
||||
const Color color(0xff - (brushIndexOrColor >> 24), (brushIndexOrColor >> 16) & 0xff, (brushIndexOrColor >> 8) & 0xff, brushIndexOrColor & 0xff);
|
||||
const Color color(ColorAlpha, (brushIndexOrColor >> 24), (brushIndexOrColor >> 16) & 0xff, (brushIndexOrColor >> 8) & 0xff, brushIndexOrColor & 0xff);
|
||||
EMFPPlusFillPolygonSolidColor(polygon, color);
|
||||
|
||||
mrPropertyHolders.Current().setFillColor(color.getBColor());
|
||||
|
||||
@@ -1471,7 +1471,7 @@ namespace accessibility
|
||||
if (rRes.Name == "CharColor")
|
||||
{
|
||||
uno::Any &anyChar = rRes.Value;
|
||||
Color crChar = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved));
|
||||
Color crChar(ColorTransparency, static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>(anyChar.pReserved)));
|
||||
if (COL_AUTO == crChar )
|
||||
{
|
||||
uno::Reference< css::accessibility::XAccessibleComponent > xComponent(mxParent,uno::UNO_QUERY);
|
||||
@@ -1485,7 +1485,7 @@ namespace accessibility
|
||||
}
|
||||
else
|
||||
{
|
||||
Color cr(xComponent->getBackground());
|
||||
Color cr(ColorTransparency, xComponent->getBackground());
|
||||
crChar = cr.IsDark() ? COL_WHITE : COL_BLACK;
|
||||
anyChar <<= crChar;
|
||||
}
|
||||
@@ -1502,7 +1502,7 @@ namespace accessibility
|
||||
if (rRes.Name == "CharUnderlineColor")
|
||||
{
|
||||
uno::Any &anyCharUnderLine = rRes.Value;
|
||||
Color crCharUnderLine = static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>( anyCharUnderLine.pReserved));
|
||||
Color crCharUnderLine(ColorTransparency, static_cast<sal_uInt32>( reinterpret_cast<sal_uIntPtr>( anyCharUnderLine.pReserved)));
|
||||
if (COL_AUTO == crCharUnderLine )
|
||||
{
|
||||
uno::Reference< css::accessibility::XAccessibleComponent > xComponent(mxParent,uno::UNO_QUERY);
|
||||
@@ -1516,7 +1516,7 @@ namespace accessibility
|
||||
}
|
||||
else
|
||||
{
|
||||
Color cr(xComponent->getBackground());
|
||||
Color cr(ColorTransparency, xComponent->getBackground());
|
||||
crCharUnderLine = cr.IsDark() ? COL_WHITE : COL_BLACK;
|
||||
anyCharUnderLine <<= crCharUnderLine;
|
||||
}
|
||||
|
||||
@@ -1084,7 +1084,7 @@ bool SvxShadowItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
|
||||
sal_Int32 nTransparence = 0;
|
||||
if ((rVal >>= nTransparence) && !o3tl::checked_multiply<sal_Int32>(nTransparence, 255, nTransparence))
|
||||
{
|
||||
Color aColor(aShadow.Color);
|
||||
Color aColor(ColorTransparency, aShadow.Color);
|
||||
aColor.SetAlpha(255 - rtl::math::round(float(nTransparence) / 100));
|
||||
aShadow.Color = sal_Int32(aColor);
|
||||
}
|
||||
@@ -1106,7 +1106,7 @@ bool SvxShadowItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
|
||||
}
|
||||
|
||||
nWidth = bConvert ? convertMm100ToTwip(aShadow.ShadowWidth) : aShadow.ShadowWidth;
|
||||
Color aSet(aShadow.Color);
|
||||
Color aSet(ColorTransparency, aShadow.Color);
|
||||
aShadowColor = aSet;
|
||||
}
|
||||
|
||||
@@ -1439,7 +1439,7 @@ namespace
|
||||
bool
|
||||
lcl_lineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine, bool bConvert, bool bGuessWidth)
|
||||
{
|
||||
rSvxLine.SetColor( Color(rLine.Color));
|
||||
rSvxLine.SetColor( Color(ColorTransparency, rLine.Color));
|
||||
if ( bGuessWidth )
|
||||
{
|
||||
rSvxLine.GuessLinesWidths( rSvxLine.GetBorderLineStyle(),
|
||||
@@ -2735,7 +2735,7 @@ bool SvxLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemId )
|
||||
|
||||
switch ( nMemId )
|
||||
{
|
||||
case MID_FG_COLOR: pLine->SetColor( Color(nVal) ); break;
|
||||
case MID_FG_COLOR: pLine->SetColor( Color(ColorTransparency, nVal) ); break;
|
||||
case MID_LINE_STYLE:
|
||||
pLine->SetBorderLineStyle(static_cast<SvxBorderLineStyle>(nVal));
|
||||
break;
|
||||
|
||||
@@ -990,7 +990,7 @@ bool SvxTextLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
|
||||
break;
|
||||
case MID_TL_COLOR:
|
||||
{
|
||||
sal_Int32 nCol = 0;
|
||||
Color nCol;
|
||||
if( !( rVal >>= nCol ) )
|
||||
bRet = false;
|
||||
else
|
||||
@@ -998,7 +998,7 @@ bool SvxTextLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
|
||||
// Keep transparence, because it contains the information
|
||||
// whether the font color or the stored color should be used
|
||||
sal_uInt8 nAlpha = mColor.GetAlpha();
|
||||
mColor = Color( nCol );
|
||||
mColor = nCol;
|
||||
mColor.SetAlpha( nAlpha );
|
||||
}
|
||||
}
|
||||
@@ -1354,7 +1354,7 @@ bool SvxBackgroundColorItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) c
|
||||
bool SvxBackgroundColorItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
|
||||
{
|
||||
nMemberId &= ~CONVERT_TWIPS;
|
||||
sal_Int32 nColor = 0;
|
||||
Color nColor;
|
||||
Color aColor = SvxColorItem::GetValue();
|
||||
|
||||
switch( nMemberId )
|
||||
@@ -1369,7 +1369,7 @@ bool SvxBackgroundColorItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId
|
||||
{
|
||||
if(!(rVal >>= nColor))
|
||||
return false;
|
||||
SvxColorItem::SetValue( Color(nColor) );
|
||||
SvxColorItem::SetValue( nColor );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,10 +427,10 @@ void SvxUnoNumberingRules::setNumberingRuleByIndex(const Sequence<beans::Propert
|
||||
}
|
||||
else if ( rPropName == UNO_NAME_NRULE_BULLET_COLOR )
|
||||
{
|
||||
sal_Int32 nColor = 0;
|
||||
if( aVal >>= nColor )
|
||||
Color aColor;
|
||||
if( aVal >>= aColor )
|
||||
{
|
||||
aFmt.SetBulletColor( static_cast<Color>(nColor) );
|
||||
aFmt.SetBulletColor( aColor );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -875,7 +875,7 @@ namespace emfio
|
||||
mnTextAlign(TA_LEFT | TA_TOP | TA_NOUPDATECP),
|
||||
maLatestTextColor(),
|
||||
maTextColor(),
|
||||
maLatestBkColor(0x12345678),
|
||||
maLatestBkColor(ColorTransparency, 0x12345678),
|
||||
maBkColor(COL_WHITE),
|
||||
mnLatestTextLayoutMode(ComplexTextLayoutFlags::Default),
|
||||
mnTextLayoutMode(ComplexTextLayoutFlags::Default),
|
||||
|
||||
@@ -233,9 +233,9 @@ namespace pcr
|
||||
SvxWordLineModeItem aWordLineModeItem(bWordLineMode, CFID_WORDLINEMODE);
|
||||
|
||||
SvxUnderlineItem aUnderlineItem(eUnderline,CFID_UNDERLINE);
|
||||
aUnderlineItem.SetColor(Color(nTextLineColor));
|
||||
aUnderlineItem.SetColor(Color(ColorTransparency, nTextLineColor));
|
||||
|
||||
SvxColorItem aSvxColorItem(Color(nColor32),CFID_CHARCOLOR);
|
||||
SvxColorItem aSvxColorItem(Color(ColorTransparency, nColor32),CFID_CHARCOLOR);
|
||||
SvxLanguageItem aLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), CFID_LANGUAGE);
|
||||
|
||||
// the 2 CJK props
|
||||
|
||||
@@ -478,7 +478,7 @@ namespace pcr
|
||||
css::util::Color nColor = sal_uInt32(COL_TRANSPARENT);
|
||||
if (_rValue.hasValue())
|
||||
_rValue >>= nColor;
|
||||
getTypedControlWindow()->SelectEntry(nColor);
|
||||
getTypedControlWindow()->SelectEntry(::Color(ColorTransparency, nColor));
|
||||
}
|
||||
|
||||
Any SAL_CALL OColorControl::getValue()
|
||||
|
||||
@@ -56,7 +56,7 @@ void MSFilterTest::testTransColToIco()
|
||||
{
|
||||
const OString sMessage = "Index of unmatched color: " + OString::number(i);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(sMessage.getStr(), aExpected[i],
|
||||
static_cast<sal_uInt16>(msfilter::util::TransColToIco( Color(aStdCol[i]) )));
|
||||
static_cast<sal_uInt16>(msfilter::util::TransColToIco( Color(ColorTransparency, aStdCol[i]) )));
|
||||
}
|
||||
|
||||
// tdf#92471
|
||||
|
||||
@@ -738,7 +738,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
|
||||
if (!bIsValid)
|
||||
break;
|
||||
if ( nBitDepth == 1 )
|
||||
aBitmap.SetPixel( y, x, Color(static_cast<sal_uInt8>(nDat >> nBitsLeft) & 1) );
|
||||
aBitmap.SetPixel( y, x, Color(ColorTransparency, static_cast<sal_uInt8>(nDat >> nBitsLeft) & 1) );
|
||||
else
|
||||
{
|
||||
aBitmap.SetPixel( y, x, nDat ? COL_WHITE : COL_BLACK ); // nBitDepth == 8
|
||||
|
||||
@@ -638,7 +638,7 @@ bool TGAReader::ImplReadBody()
|
||||
return false;
|
||||
if ( nDummy >= mpFileHeader->nColorMapLength )
|
||||
return false;
|
||||
mpBitmap->SetPixel( nY, nX, Color(nDummy) );
|
||||
mpBitmap->SetPixel( nY, nX, Color(ColorTransparency, nDummy) );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -376,12 +376,12 @@ sal_uInt32 EscherPropertyContainer::GetGradientColor(
|
||||
if ( nStartColor & 1 )
|
||||
{
|
||||
nIntensity = pGradient->StartIntensity;
|
||||
aColor = Color(pGradient->StartColor);
|
||||
aColor = Color(ColorTransparency, pGradient->StartColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
nIntensity = pGradient->EndIntensity;
|
||||
aColor = Color(pGradient->EndColor);
|
||||
aColor = Color(ColorTransparency, pGradient->EndColor);
|
||||
}
|
||||
}
|
||||
sal_uInt32 nRed = ( aColor.GetRed() * nIntensity ) / 100;
|
||||
@@ -1452,7 +1452,7 @@ Graphic lclDrawHatch( const drawing::Hatch& rHatch, const Color& rBackColor, boo
|
||||
pVDev->SetLineColor();
|
||||
pVDev->SetFillColor(bFillBackground ? rBackColor : COL_TRANSPARENT);
|
||||
pVDev->DrawRect(rRect);
|
||||
pVDev->DrawHatch(tools::PolyPolygon(rRect), Hatch(static_cast<HatchStyle>(rHatch.Style), Color(rHatch.Color), rHatch.Distance,
|
||||
pVDev->DrawHatch(tools::PolyPolygon(rRect), Hatch(static_cast<HatchStyle>(rHatch.Style), Color(ColorTransparency, rHatch.Color), rHatch.Distance,
|
||||
Degree10(rHatch.Angle)));
|
||||
aMtf.Stop();
|
||||
aMtf.WindStart();
|
||||
@@ -1547,7 +1547,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(const uno::Reference<beans
|
||||
Color aBackColor;
|
||||
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "FillColor" ) )
|
||||
{
|
||||
aBackColor = Color(ImplGetColor( *o3tl::doAccess<sal_uInt32>(aAny), false ));
|
||||
aBackColor = Color(ColorTransparency, ImplGetColor( *o3tl::doAccess<sal_uInt32>(aAny), false ));
|
||||
}
|
||||
bool bFillBackground = false;
|
||||
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "FillBackground", true ) )
|
||||
|
||||
@@ -953,7 +953,7 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream)
|
||||
if (nAnyMask & TEXTCOLOR)
|
||||
{
|
||||
sal_Int32 nValue = _rxInStream->readLong();
|
||||
setTextColor( ::Color(nValue) );
|
||||
setTextColor( ::Color(ColorTransparency, nValue) );
|
||||
}
|
||||
// new since version 6
|
||||
if (nVersion > 5)
|
||||
|
||||
@@ -280,12 +280,12 @@ namespace frm
|
||||
m_aBackgroundColor.clear();
|
||||
|
||||
if ( nNonVoids & PERSIST_TEXTCOLOR )
|
||||
setTextColor( ::Color(_rxInStream->readLong()) );
|
||||
setTextColor( ::Color(ColorTransparency, _rxInStream->readLong()) );
|
||||
else
|
||||
clearTextColor();
|
||||
|
||||
if ( nNonVoids & PERSIST_TEXTLINECOLOR )
|
||||
setTextLineColor( ::Color(_rxInStream->readLong()) );
|
||||
setTextLineColor( ::Color(ColorTransparency, _rxInStream->readLong()) );
|
||||
else
|
||||
clearTextLineColor();
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ const sal_uInt8 WINDOWS_CHARSET_EASTERN = 238;
|
||||
const sal_uInt8 WINDOWS_CHARSET_OEM = 255;
|
||||
|
||||
|
||||
const ::Color API_RGB_TRANSPARENT (0xffffffff); ///< Transparent color for API calls.
|
||||
const ::Color API_RGB_TRANSPARENT (ColorTransparency, 0xffffffff); ///< Transparent color for API calls.
|
||||
const sal_uInt32 UNSIGNED_RGB_TRANSPARENT = static_cast<sal_uInt32>(-1); ///< Transparent color for unsigned int32 places.
|
||||
const ::Color API_RGB_BLACK (0x000000); ///< Black color for API calls.
|
||||
const ::Color API_RGB_GRAY (0x808080); ///< Gray color for API calls.
|
||||
|
||||
@@ -123,7 +123,15 @@ public:
|
||||
{
|
||||
sal_Int32 n(rColor);
|
||||
bool b = convertColor( n, rValue );
|
||||
if (b) rColor = n;
|
||||
if (b) rColor = Color(ColorTransparency, n);
|
||||
return b;
|
||||
}
|
||||
static bool convertColor( ::Color& rColor,
|
||||
std::string_view rValue )
|
||||
{
|
||||
sal_Int32 n(rColor);
|
||||
bool b = convertColor( n, rValue );
|
||||
if (b) rColor = Color(ColorTransparency, n);
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
|
||||
void add(sal_uInt32 nIndex, sal_uInt32 aColorData)
|
||||
{
|
||||
maColors[nIndex] = Color(aColorData);
|
||||
maColors[nIndex] = Color(ColorTransparency, aColorData);
|
||||
}
|
||||
|
||||
const OUString& getName() const
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
class Button;
|
||||
|
||||
#define COL_NONE_COLOR ::Color(0x80, 0xFF, 0xFF, 0xFF)
|
||||
#define COL_NONE_COLOR ::Color(ColorTransparency, 0x80, 0xFF, 0xFF, 0xFF)
|
||||
|
||||
class SvxColorToolBoxControl;
|
||||
|
||||
|
||||
+29
-9
@@ -40,6 +40,10 @@ constexpr sal_uInt8 ColorChannelMerge(sal_uInt8 nDst, sal_uInt8 nSrc, sal_uInt8
|
||||
|
||||
}
|
||||
|
||||
/** used to deliberately select the right constructor */
|
||||
enum ColorTransparencyTag { ColorTransparency = 0 };
|
||||
enum ColorAlphaTag { ColorAlpha = 0 };
|
||||
|
||||
// Color
|
||||
|
||||
class SAL_WARN_UNUSED TOOLS_DLLPUBLIC Color
|
||||
@@ -70,21 +74,37 @@ public:
|
||||
: mValue(0) // black
|
||||
{}
|
||||
|
||||
constexpr Color(sal_uInt32 nColor)
|
||||
constexpr Color(const sal_uInt32 nColor)
|
||||
: mValue(nColor)
|
||||
{}
|
||||
{
|
||||
assert(nColor <= 0xffffff && "don't pass transparency to this constructor, use the Color(ColorTransparencyTag,...) or Color(ColorAlphaTag,...) constructor to make it explicit");
|
||||
}
|
||||
|
||||
constexpr Color(sal_uInt8 nTransparency, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue)
|
||||
constexpr Color(enum ColorTransparencyTag, sal_uInt32 nColor)
|
||||
: mValue(nColor)
|
||||
{
|
||||
}
|
||||
|
||||
constexpr Color(enum ColorAlphaTag, sal_uInt32 nColor)
|
||||
: mValue((nColor & 0xffffff) | (255 - (nColor >> 24)))
|
||||
{
|
||||
}
|
||||
|
||||
constexpr Color(enum ColorTransparencyTag, sal_uInt8 nTransparency, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue)
|
||||
: mValue(sal_uInt32(nBlue) | (sal_uInt32(nGreen) << 8) | (sal_uInt32(nRed) << 16) | (sal_uInt32(nTransparency) << 24))
|
||||
{}
|
||||
|
||||
constexpr Color(enum ColorAlphaTag, sal_uInt8 nAlpha, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue)
|
||||
: Color(ColorTransparency, 255 - nAlpha, nRed, nGreen, nBlue)
|
||||
{}
|
||||
|
||||
constexpr Color(sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue)
|
||||
: Color(0, nRed, nGreen, nBlue)
|
||||
: Color(ColorTransparency, 0, nRed, nGreen, nBlue)
|
||||
{}
|
||||
|
||||
// constructor to create a tools-Color from ::basegfx::BColor
|
||||
explicit Color(const basegfx::BColor& rBColor)
|
||||
: Color(0,
|
||||
: Color(ColorTransparency, 0,
|
||||
sal_uInt8(std::lround(rBColor.getRed() * 255.0)),
|
||||
sal_uInt8(std::lround(rBColor.getGreen() * 255.0)),
|
||||
sal_uInt8(std::lround(rBColor.getBlue() * 255.0)))
|
||||
@@ -394,7 +414,7 @@ inline bool operator >>=( const css::uno::Any & rAny, Color & value )
|
||||
sal_Int32 nTmp = {}; // spurious -Werror=maybe-uninitialized
|
||||
if (!(rAny >>= nTmp))
|
||||
return false;
|
||||
value = Color(nTmp);
|
||||
value = Color(ColorTransparency, nTmp);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -413,7 +433,7 @@ namespace com::sun::star::uno {
|
||||
|
||||
// Test compile time conversion of Color to sal_uInt32
|
||||
|
||||
static_assert (sal_uInt32(Color(0x00, 0x12, 0x34, 0x56)) == 0x00123456);
|
||||
static_assert (sal_uInt32(Color(ColorTransparency, 0x00, 0x12, 0x34, 0x56)) == 0x00123456);
|
||||
static_assert (sal_uInt32(Color(0x12, 0x34, 0x56)) == 0x00123456);
|
||||
|
||||
// Color types
|
||||
@@ -437,8 +457,8 @@ constexpr ::Color COL_LIGHTMAGENTA ( 0xFF, 0x00, 0xFF );
|
||||
constexpr ::Color COL_LIGHTGRAYBLUE ( 0xE0, 0xE0, 0xFF );
|
||||
constexpr ::Color COL_YELLOW ( 0xFF, 0xFF, 0x00 );
|
||||
constexpr ::Color COL_WHITE ( 0xFF, 0xFF, 0xFF );
|
||||
constexpr ::Color COL_TRANSPARENT ( 0xFF, 0xFF, 0xFF, 0xFF );
|
||||
constexpr ::Color COL_AUTO ( 0xFF, 0xFF, 0xFF, 0xFF );
|
||||
constexpr ::Color COL_TRANSPARENT ( ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF );
|
||||
constexpr ::Color COL_AUTO ( ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF );
|
||||
constexpr ::Color COL_AUTHOR1_DARK ( 198, 146, 0 );
|
||||
constexpr ::Color COL_AUTHOR1_NORMAL ( 255, 255, 158 );
|
||||
constexpr ::Color COL_AUTHOR1_LIGHT ( 255, 255, 195 );
|
||||
|
||||
@@ -27,7 +27,9 @@ class VCL_DLLPUBLIC BitmapColor final : public Color
|
||||
{
|
||||
public:
|
||||
inline BitmapColor();
|
||||
constexpr BitmapColor( sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue, sal_uInt8 cAlpha = 0 );
|
||||
constexpr BitmapColor( sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue );
|
||||
constexpr BitmapColor( ColorTransparencyTag, sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue, sal_uInt8 cTransparency );
|
||||
constexpr BitmapColor( ColorAlphaTag, sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue, sal_uInt8 cAlpha );
|
||||
|
||||
inline BitmapColor( const Color& rColor );
|
||||
explicit inline BitmapColor( sal_uInt8 cIndex );
|
||||
@@ -45,8 +47,18 @@ inline BitmapColor::BitmapColor( const Color& rColor )
|
||||
{
|
||||
}
|
||||
|
||||
constexpr BitmapColor::BitmapColor(sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue, sal_uInt8 cAlpha)
|
||||
: Color(cAlpha, cRed, cGreen, cBlue)
|
||||
constexpr BitmapColor::BitmapColor(sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue)
|
||||
: Color(cRed, cGreen, cBlue)
|
||||
{
|
||||
}
|
||||
|
||||
constexpr BitmapColor::BitmapColor(ColorTransparencyTag, sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue, sal_uInt8 cTransparency)
|
||||
: Color(ColorTransparency, cTransparency, cRed, cGreen, cBlue)
|
||||
{
|
||||
}
|
||||
|
||||
constexpr BitmapColor::BitmapColor(ColorAlphaTag, sal_uInt8 cRed, sal_uInt8 cGreen, sal_uInt8 cBlue, sal_uInt8 cAlpha)
|
||||
: Color(ColorAlpha, cAlpha, cRed, cGreen, cBlue)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
if (mnBitCount == 24)
|
||||
return Color(mpData[p], mpData[p + 1], mpData[p + 2]);
|
||||
else
|
||||
return Color(mpData[p + 3], mpData[p], mpData[p + 1], mpData[p + 2]);
|
||||
return Color(ColorTransparency, mpData[p + 3], mpData[p], mpData[p + 1], mpData[p + 2]);
|
||||
}
|
||||
// so we don't accidentally leave any code in that uses palette color indexes
|
||||
void SetPixel(tools::Long nY, tools::Long nX, BitmapColor nColor) = delete;
|
||||
|
||||
@@ -34,7 +34,7 @@ enum class DeviceFormat {
|
||||
#endif
|
||||
};
|
||||
|
||||
constexpr ::Color SALCOLOR_NONE ( 0xFF, 0xFF, 0xFF, 0xFF );
|
||||
constexpr ::Color SALCOLOR_NONE ( ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF );
|
||||
|
||||
struct SalTwoRect
|
||||
{
|
||||
|
||||
@@ -727,7 +727,7 @@ struct ObjectFormatterData
|
||||
|
||||
DetailFormatterBase::DetailFormatterBase( ObjectFormatterData& rData, const AutoFormatEntry* pAutoFormatEntry ) :
|
||||
mrData( rData ),
|
||||
mnPhClr( 0xffffffff )
|
||||
mnPhClr( ColorTransparency, 0xffffffff )
|
||||
{
|
||||
if( !pAutoFormatEntry )
|
||||
return;
|
||||
@@ -749,7 +749,7 @@ DetailFormatterBase::DetailFormatterBase( ObjectFormatterData& rData, const Auto
|
||||
|
||||
DetailFormatterBase::DetailFormatterBase( ObjectFormatterData& rData, const AutoTextEntry* pAutoTextEntry ) :
|
||||
mrData( rData ),
|
||||
mnPhClr( 0xffffffff )
|
||||
mnPhClr( ColorTransparency, 0xffffffff )
|
||||
{
|
||||
if( pAutoTextEntry && (pAutoTextEntry->mnColorToken != XML_TOKEN_INVALID) )
|
||||
mnPhClr = getSchemeColor( pAutoTextEntry->mnColorToken, XML_TOKEN_INVALID, 0 );
|
||||
|
||||
@@ -261,7 +261,7 @@ void Color::setSrgbClr( sal_Int32 nRgb )
|
||||
{
|
||||
OSL_ENSURE( (0 <= nRgb) && (nRgb <= 0xFFFFFF), "Color::setSrgbClr - invalid RGB value" );
|
||||
meMode = COLOR_RGB;
|
||||
lclRgbToRgbComponents( mnC1, mnC2, mnC3, ::Color(nRgb) );
|
||||
lclRgbToRgbComponents( mnC1, mnC2, mnC3, ::Color(ColorTransparency, nRgb) );
|
||||
}
|
||||
|
||||
void Color::setScrgbClr( sal_Int32 nR, sal_Int32 nG, sal_Int32 nB )
|
||||
@@ -495,10 +495,10 @@ void Color::clearTransparence()
|
||||
|
||||
case COLOR_SCHEME: setResolvedRgb( rGraphicHelper.getSchemeColor( mnC1 ) ); break;
|
||||
case COLOR_PALETTE: setResolvedRgb( rGraphicHelper.getPaletteColor( mnC1 ) ); break;
|
||||
case COLOR_SYSTEM: setResolvedRgb( rGraphicHelper.getSystemColor( mnC1, ::Color(mnC2) ) ); break;
|
||||
case COLOR_SYSTEM: setResolvedRgb( rGraphicHelper.getSystemColor( mnC1, ::Color(ColorTransparency, mnC2) ) ); break;
|
||||
case COLOR_PH: setResolvedRgb( nPhClr ); break;
|
||||
|
||||
case COLOR_FINAL: return ::Color(mnC1);
|
||||
case COLOR_FINAL: return ::Color(ColorTransparency, mnC1);
|
||||
}
|
||||
|
||||
// if color is UNUSED or turns to UNUSED in setResolvedRgb, do not perform transformations
|
||||
@@ -647,7 +647,7 @@ void Color::clearTransparence()
|
||||
}
|
||||
if( meMode == COLOR_FINAL )
|
||||
maTransforms.clear();
|
||||
return ::Color(nRet);
|
||||
return ::Color(ColorTransparency, nRet);
|
||||
}
|
||||
|
||||
bool Color::hasTransparency() const
|
||||
|
||||
@@ -967,8 +967,8 @@ Reference< XShape > const & Shape::createAndInsert(
|
||||
|
||||
const GraphicHelper& rGraphicHelper = rFilterBase.getGraphicHelper();
|
||||
|
||||
::Color nLinePhClr(0xffffffff);
|
||||
::Color nFillPhClr(0xffffffff);
|
||||
::Color nLinePhClr(ColorTransparency, 0xffffffff);
|
||||
::Color nFillPhClr(ColorTransparency, 0xffffffff);
|
||||
// TODO: use ph color when applying effect properties
|
||||
//sal_Int32 nEffectPhClr = -1;
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@ static sal_Int32 lcl_generateRandomValue()
|
||||
static sal_Int32 lcl_getAlphaFromTransparenceGradient(const awt::Gradient& rGradient, bool bStart)
|
||||
{
|
||||
// Our alpha is a gray color value.
|
||||
sal_uInt8 nRed = ::Color(bStart ? rGradient.StartColor : rGradient.EndColor).GetRed();
|
||||
sal_uInt8 nRed = ::Color(ColorTransparency, bStart ? rGradient.StartColor : rGradient.EndColor).GetRed();
|
||||
// drawingML alpha is a percentage on a 0..100000 scale.
|
||||
return (255 - nRed) * oox::drawingml::MAX_PERCENT / 255;
|
||||
}
|
||||
@@ -1839,7 +1839,7 @@ void ChartExport::exportSolidFill(const Reference< XPropertySet >& xPropSet)
|
||||
mpFS->endElementNS(XML_a, XML_gradFill);
|
||||
}
|
||||
else
|
||||
WriteSolidFill(::Color(nFillColor & 0xffffff), nAlpha);
|
||||
WriteSolidFill(::Color(ColorTransparency, nFillColor & 0xffffff), nAlpha);
|
||||
}
|
||||
|
||||
void ChartExport::exportHatch( const Reference< XPropertySet >& xPropSet )
|
||||
@@ -3880,7 +3880,7 @@ void ChartExport::exportDataPoints(
|
||||
else
|
||||
{
|
||||
// property set only containing the color
|
||||
xPropSet.set( new ColorPropertySet( xColorScheme->getColorByIndex( nElement )));
|
||||
xPropSet.set( new ColorPropertySet( ColorTransparency, xColorScheme->getColorByIndex( nElement )));
|
||||
}
|
||||
|
||||
if( xPropSet.is() )
|
||||
@@ -4245,7 +4245,7 @@ void ChartExport::exportMarker(const Reference< XPropertySet >& xPropSet)
|
||||
pFS->singleElement(FSNS(XML_a, XML_noFill));
|
||||
}
|
||||
else
|
||||
WriteSolidFill(::Color(aColor));
|
||||
WriteSolidFill(::Color(ColorTransparency, aColor));
|
||||
|
||||
pFS->endElement( FSNS( XML_c, XML_spPr ) );
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace
|
||||
sal_Int32 GetAlphaFromTransparenceGradient(const awt::Gradient& rGradient, bool bStart)
|
||||
{
|
||||
// Our alpha is a gray color value.
|
||||
sal_uInt8 nRed = ::Color(bStart ? rGradient.StartColor : rGradient.EndColor).GetRed();
|
||||
sal_uInt8 nRed = ::Color(ColorTransparency, bStart ? rGradient.StartColor : rGradient.EndColor).GetRed();
|
||||
// drawingML alpha is a percentage on a 0..100000 scale.
|
||||
return (255 - nRed) * oox::drawingml::MAX_PERCENT / 255;
|
||||
}
|
||||
@@ -481,7 +481,7 @@ void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet )
|
||||
else if ( nFillColor != nOriginalColor )
|
||||
{
|
||||
// the user has set a different color for the shape
|
||||
WriteSolidFill( ::Color(nFillColor & 0xffffff), nAlpha );
|
||||
WriteSolidFill( ::Color(ColorTransparency, nFillColor & 0xffffff), nAlpha );
|
||||
}
|
||||
else if ( !sColorFillScheme.isEmpty() )
|
||||
{
|
||||
@@ -492,7 +492,7 @@ void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet )
|
||||
{
|
||||
// the shape had a custom color and the user didn't change it
|
||||
// tdf#124013
|
||||
WriteSolidFill( ::Color(nFillColor & 0xffffff), nAlpha );
|
||||
WriteSolidFill( ::Color(ColorTransparency, nFillColor & 0xffffff), nAlpha );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ void DrawingML::WriteGradientStop(sal_uInt16 nStop, ::Color nColor, sal_Int32 nA
|
||||
|
||||
::Color DrawingML::ColorWithIntensity( sal_uInt32 nColor, sal_uInt32 nIntensity )
|
||||
{
|
||||
return ::Color(( ( ( nColor & 0xff ) * nIntensity ) / 100 )
|
||||
return ::Color(ColorTransparency, ( ( ( nColor & 0xff ) * nIntensity ) / 100 )
|
||||
| ( ( ( ( ( nColor & 0xff00 ) >> 8 ) * nIntensity ) / 100 ) << 8 )
|
||||
| ( ( ( ( ( nColor & 0xff0000 ) >> 8 ) * nIntensity ) / 100 ) << 8 ));
|
||||
}
|
||||
@@ -918,7 +918,7 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
|
||||
default:
|
||||
if (GetProperty(rXPropSet, "LineColor"))
|
||||
{
|
||||
nColor = ::Color(mAny.get<sal_uInt32>() & 0xffffff);
|
||||
nColor = ::Color(ColorTransparency, mAny.get<sal_uInt32>() & 0xffffff);
|
||||
bColorSet = true;
|
||||
}
|
||||
if (GetProperty(rXPropSet, "LineTransparence"))
|
||||
@@ -1578,7 +1578,7 @@ void DrawingML::WritePattFill(const Reference<XPropertySet>& rXPropSet, const cs
|
||||
mpFS->startElementNS(XML_a, XML_pattFill, XML_prst, GetHatchPattern(rHatch));
|
||||
|
||||
mpFS->startElementNS(XML_a, XML_fgClr);
|
||||
WriteColor(::Color(rHatch.Color));
|
||||
WriteColor(::Color(ColorTransparency, rHatch.Color));
|
||||
mpFS->endElementNS( XML_a , XML_fgClr );
|
||||
|
||||
::Color nColor = COL_WHITE;
|
||||
@@ -2023,7 +2023,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
|
||||
&& eState == beans::PropertyState_DIRECT_VALUE)
|
||||
|| GetProperty(rXPropSet, "CharColor"))
|
||||
{
|
||||
::Color color( *o3tl::doAccess<sal_uInt32>(mAny) );
|
||||
::Color color( ColorTransparency, *o3tl::doAccess<sal_uInt32>(mAny) );
|
||||
SAL_INFO("oox.shape", "run color: " << sal_uInt32(color) << " auto: " << sal_uInt32(COL_AUTO));
|
||||
|
||||
// WriteSolidFill() handles MAX_PERCENT as "no transparency".
|
||||
@@ -2053,7 +2053,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
|
||||
{
|
||||
if (GetProperty(rXPropSet, "CharBackColor"))
|
||||
{
|
||||
::Color color(*o3tl::doAccess<sal_uInt32>(mAny));
|
||||
::Color color(ColorTransparency, *o3tl::doAccess<sal_uInt32>(mAny));
|
||||
if( color != COL_AUTO )
|
||||
{
|
||||
mpFS->startElementNS(XML_a, XML_highlight);
|
||||
@@ -2069,7 +2069,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
|
||||
&& eState == beans::PropertyState_DIRECT_VALUE)
|
||||
|| GetProperty(rXPropSet, "CharUnderlineColor")))
|
||||
{
|
||||
::Color color(*o3tl::doAccess<sal_uInt32>(mAny));
|
||||
::Color color(ColorTransparency, *o3tl::doAccess<sal_uInt32>(mAny));
|
||||
// if color is automatic, then we shouldn't write information about color but to take color from character
|
||||
if( color != COL_AUTO )
|
||||
{
|
||||
@@ -2426,7 +2426,7 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS
|
||||
}
|
||||
else if(aPropName == "BulletColor")
|
||||
{
|
||||
nBulletColor = ::Color(*o3tl::doAccess<sal_uInt32>(rPropValue.Value));
|
||||
nBulletColor = ::Color(ColorTransparency, *o3tl::doAccess<sal_uInt32>(rPropValue.Value));
|
||||
bHasBulletColor = true;
|
||||
}
|
||||
else if ( aPropName == "BulletChar" )
|
||||
@@ -2514,7 +2514,7 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS
|
||||
{
|
||||
if (nBulletColor == COL_AUTO )
|
||||
{
|
||||
nBulletColor = ::Color(mbIsBackgroundDark ? 0xffffff : 0x000000);
|
||||
nBulletColor = ::Color(ColorTransparency, mbIsBackgroundDark ? 0xffffff : 0x000000);
|
||||
}
|
||||
mpFS->startElementNS(XML_a, XML_buClr);
|
||||
WriteColor( nBulletColor );
|
||||
|
||||
@@ -1805,7 +1805,7 @@ void ShapeExport::WriteBorderLine(const sal_Int32 XML_line, const BorderLine2& r
|
||||
if ( rBorderLine.Color == sal_Int32( COL_AUTO ) )
|
||||
mpFS->singleElementNS(XML_a, XML_noFill);
|
||||
else
|
||||
DrawingML::WriteSolidFill( ::Color(rBorderLine.Color) );
|
||||
DrawingML::WriteSolidFill( ::Color(ColorTransparency, rBorderLine.Color) );
|
||||
mpFS->endElementNS( XML_a, XML_line );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ sal_uInt32 lclSwapRedBlue( sal_uInt32 nColor )
|
||||
/** Returns the UNO RGB color from the passed encoded OLE BGR color. */
|
||||
::Color lclDecodeBgrColor( sal_uInt32 nOleColor )
|
||||
{
|
||||
return ::Color( lclSwapRedBlue( nOleColor ) & 0xFFFFFF );
|
||||
return ::Color( ColorTransparency, lclSwapRedBlue( nOleColor ) & 0xFFFFFF );
|
||||
}
|
||||
|
||||
const sal_uInt32 OLE_STDPIC_ID = 0x0000746C;
|
||||
|
||||
@@ -213,7 +213,7 @@ void SAL_CALL OImageControl::setHyperLinkName(const OUString & the_value)
|
||||
::sal_Int32 SAL_CALL OImageControl::getControlBackground()
|
||||
{
|
||||
::osl::MutexGuard aGuard(m_aMutex);
|
||||
return sal_Int32(m_aProps.aFormatProperties.m_bBackgroundTransparent ? COL_TRANSPARENT : m_aProps.aFormatProperties.nBackgroundColor);
|
||||
return m_aProps.aFormatProperties.m_bBackgroundTransparent ? static_cast<sal_Int32>(COL_TRANSPARENT) : m_aProps.aFormatProperties.nBackgroundColor;
|
||||
}
|
||||
|
||||
void SAL_CALL OImageControl::setControlBackground( ::sal_Int32 _backgroundcolor )
|
||||
|
||||
@@ -245,7 +245,7 @@ void SAL_CALL OSection::setHeight( ::sal_uInt32 _height )
|
||||
::sal_Int32 SAL_CALL OSection::getBackColor()
|
||||
{
|
||||
::osl::MutexGuard aGuard(m_aMutex);
|
||||
return sal_Int32(m_bBacktransparent ? COL_TRANSPARENT : m_nBackgroundColor);
|
||||
return m_bBacktransparent ? static_cast<sal_Int32>(COL_TRANSPARENT) : m_nBackgroundColor;
|
||||
}
|
||||
|
||||
void SAL_CALL OSection::setBackColor( ::sal_Int32 _backgroundcolor )
|
||||
|
||||
@@ -323,9 +323,9 @@ void Condition::updateToolbar(const uno::Reference< report::XReportControlFormat
|
||||
aFont.SetFontHeight(OutputDevice::LogicToLogic(Size(0, aFont.GetFontHeight()), MapMode(MapUnit::MapPoint), MapMode(MapUnit::MapTwip)).Height());
|
||||
aFont.SetEmphasisMark( static_cast< FontEmphasisMark >( _xReportControlFormat->getControlTextEmphasis() ) );
|
||||
aFont.SetRelief( static_cast< FontRelief >( _xReportControlFormat->getCharRelief() ) );
|
||||
aFont.SetColor( Color(_xReportControlFormat->getCharColor()) );
|
||||
aFont.SetColor( Color(ColorTransparency, _xReportControlFormat->getCharColor()) );
|
||||
m_aPreview.SetFont( aFont, aFont, aFont );
|
||||
m_aPreview.SetTextLineColor( Color( _xReportControlFormat->getCharUnderlineColor() ) );
|
||||
m_aPreview.SetTextLineColor( Color( ColorTransparency, _xReportControlFormat->getCharUnderlineColor() ) );
|
||||
}
|
||||
catch( const Exception& )
|
||||
{
|
||||
|
||||
@@ -345,12 +345,12 @@ namespace
|
||||
_rItemSet.Put(SvxCharHiddenItem(_rxReportControlFormat->getCharHidden(),ITEMID_CHARHIDDEN));
|
||||
_rItemSet.Put(SvxTwoLinesItem(_rxReportControlFormat->getCharCombineIsOn(),_rxReportControlFormat->getCharCombinePrefix().toChar(),_rxReportControlFormat->getCharCombineSuffix().toChar(),ITEMID_TWOLINES));
|
||||
SvxUnderlineItem aUnderLineItem(aFont.GetUnderline(),ITEMID_UNDERLINE);
|
||||
aUnderLineItem.SetColor(Color(_rxReportControlFormat->getCharUnderlineColor()));
|
||||
aUnderLineItem.SetColor(Color(ColorTransparency, _rxReportControlFormat->getCharUnderlineColor()));
|
||||
_rItemSet.Put(aUnderLineItem);
|
||||
_rItemSet.Put(SvxKerningItem(_rxReportControlFormat->getCharKerning(),ITEMID_KERNING));
|
||||
_rItemSet.Put(SvxEmphasisMarkItem(static_cast<FontEmphasisMark>(_rxReportControlFormat->getCharEmphasis()),ITEMID_EMPHASISMARK));
|
||||
_rItemSet.Put(SvxCharReliefItem(static_cast<FontRelief>(_rxReportControlFormat->getCharRelief()),ITEMID_CHARRELIEF));
|
||||
_rItemSet.Put(SvxColorItem(::Color(_rxReportControlFormat->getCharColor()),ITEMID_COLOR));
|
||||
_rItemSet.Put(SvxColorItem(::Color(ColorTransparency, _rxReportControlFormat->getCharColor()),ITEMID_COLOR));
|
||||
_rItemSet.Put(SvxCharRotateItem(Degree10(_rxReportControlFormat->getCharRotation()),false,ITEMID_CHARROTATE));
|
||||
_rItemSet.Put(SvxCharScaleWidthItem(_rxReportControlFormat->getCharScaleWidth(),ITEMID_CHARSCALE_W));
|
||||
|
||||
@@ -363,7 +363,7 @@ namespace
|
||||
|
||||
uno::Reference< report::XShape> xShape(_rxReportControlFormat,uno::UNO_QUERY);
|
||||
if ( !xShape.is() )
|
||||
_rItemSet.Put(SvxBrushItem(::Color(_rxReportControlFormat->getControlBackground()),ITEMID_BRUSH));
|
||||
_rItemSet.Put(SvxBrushItem(::Color(ColorTransparency, _rxReportControlFormat->getControlBackground()),ITEMID_BRUSH));
|
||||
|
||||
lcl_setFont(_rxReportControlFormat, _rItemSet,ASIAN,ITEMID_FONT_ASIAN,ITEMID_FONTHEIGHT_ASIAN,ITEMID_LANGUAGE_ASIAN,ITEMID_POSTURE_ASIAN,ITEMID_WEIGHT_ASIAN );
|
||||
lcl_setFont(_rxReportControlFormat, _rItemSet,COMPLEX,ITEMID_FONT_COMPLEX,ITEMID_FONTHEIGHT_COMPLEX,ITEMID_LANGUAGE_COMPLEX,ITEMID_POSTURE_COMPLEX,ITEMID_WEIGHT_COMPLEX );
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace rptui
|
||||
try
|
||||
{
|
||||
bool bIsDark = false;
|
||||
const Color nBackColor( xFixedText->getControlBackground() );
|
||||
const Color nBackColor( ColorTransparency, xFixedText->getControlBackground() );
|
||||
if (nBackColor == COL_TRANSPARENT)
|
||||
{
|
||||
uno::Reference <report::XSection> xSection(xFixedText->getParent(), uno::UNO_QUERY_THROW);
|
||||
@@ -112,7 +112,7 @@ namespace rptui
|
||||
else
|
||||
{
|
||||
css::util::Color aColor2 = xSection->getBackColor();
|
||||
Color aBackColor(aColor2);
|
||||
Color aBackColor(ColorTransparency, aColor2);
|
||||
bIsDark = aBackColor.IsDark();
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ namespace rptui
|
||||
else
|
||||
{
|
||||
util::Color aLabelColor = xFixedText->getCharColor();
|
||||
setPropertyTextColor(xVclWindowPeer, ::Color(aLabelColor));
|
||||
setPropertyTextColor(xVclWindowPeer, ::Color(ColorTransparency, aLabelColor));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2421,7 +2421,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
|
||||
::std::unique_ptr<SfxItemSet> pDescriptor(new SfxItemSet(*pPool, pRanges));
|
||||
// fill it
|
||||
if ( _xSection.is() )
|
||||
pDescriptor->Put(SvxBrushItem(::Color(_xSection->getBackColor()),RPTUI_ID_BRUSH));
|
||||
pDescriptor->Put(SvxBrushItem(::Color(ColorTransparency, _xSection->getBackColor()),RPTUI_ID_BRUSH));
|
||||
else
|
||||
{
|
||||
pDescriptor->Put(SvxSizeItem(RPTUI_ID_SIZE,VCLSize(getStyleProperty<awt::Size>(m_xReportDefinition,PROPERTY_PAPERSIZE))));
|
||||
@@ -2441,7 +2441,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
|
||||
aPageItem.SetLandscape(getStyleProperty<bool>(m_xReportDefinition,PROPERTY_ISLANDSCAPE));
|
||||
aPageItem.SetNumType(static_cast<SvxNumType>(getStyleProperty<sal_Int16>(m_xReportDefinition,PROPERTY_NUMBERINGTYPE)));
|
||||
pDescriptor->Put(aPageItem);
|
||||
pDescriptor->Put(SvxBrushItem(::Color(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_BACKCOLOR)),RPTUI_ID_BRUSH));
|
||||
pDescriptor->Put(SvxBrushItem(::Color(ColorTransparency, getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_BACKCOLOR)),RPTUI_ID_BRUSH));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ void OReportSection::fill()
|
||||
sal_Int32 nColor = m_xSection->getBackColor();
|
||||
if ( nColor == static_cast<sal_Int32>(COL_TRANSPARENT) )
|
||||
nColor = getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_BACKCOLOR);
|
||||
m_pView->SetApplicationDocumentColor(Color(nColor));
|
||||
m_pView->SetApplicationDocumentColor(Color(ColorTransparency, nColor));
|
||||
|
||||
uno::Reference<report::XReportDefinition> xReportDefinition = m_xSection->getReportDefinition();
|
||||
const sal_Int32 nLeftMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN);
|
||||
@@ -454,7 +454,7 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
|
||||
sal_Int32 nColor = m_xSection->getBackColor();
|
||||
if ( nColor == static_cast<sal_Int32>(COL_TRANSPARENT) )
|
||||
nColor = getStyleProperty<sal_Int32>(m_xSection->getReportDefinition(),PROPERTY_BACKCOLOR);
|
||||
m_pView->SetApplicationDocumentColor(Color(nColor));
|
||||
m_pView->SetApplicationDocumentColor(Color(ColorTransparency, nColor));
|
||||
Invalidate(InvalidateFlags::NoChildren|InvalidateFlags::NoErase);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -356,7 +356,7 @@ void testColorScaleEntry(uno::Reference<sheet::XColorScaleEntry> const & xEntry,
|
||||
sal_Int32 nType, const OUString& rString, Color nColor)
|
||||
{
|
||||
CPPUNIT_ASSERT_EQUAL(nType, xEntry->getType());
|
||||
CPPUNIT_ASSERT_EQUAL(nColor, Color(xEntry->getColor()));
|
||||
CPPUNIT_ASSERT_EQUAL(nColor, Color(ColorTransparency, xEntry->getColor()));
|
||||
switch (nType)
|
||||
{
|
||||
case sheet::ColorScaleEntryType::COLORSCALE_VALUE:
|
||||
|
||||
@@ -422,16 +422,16 @@ ScAppCfg::ScAppCfg() :
|
||||
switch(nProp)
|
||||
{
|
||||
case SCREVISOPT_CHANGE:
|
||||
if (pValues[nProp] >>= nIntVal) SetTrackContentColor( Color(nIntVal) );
|
||||
if (pValues[nProp] >>= nIntVal) SetTrackContentColor( Color(ColorTransparency, nIntVal) );
|
||||
break;
|
||||
case SCREVISOPT_INSERTION:
|
||||
if (pValues[nProp] >>= nIntVal) SetTrackInsertColor( Color(nIntVal) );
|
||||
if (pValues[nProp] >>= nIntVal) SetTrackInsertColor( Color(ColorTransparency, nIntVal) );
|
||||
break;
|
||||
case SCREVISOPT_DELETION:
|
||||
if (pValues[nProp] >>= nIntVal) SetTrackDeleteColor( Color(nIntVal) );
|
||||
if (pValues[nProp] >>= nIntVal) SetTrackDeleteColor( Color(ColorTransparency, nIntVal) );
|
||||
break;
|
||||
case SCREVISOPT_MOVEDENTRY:
|
||||
if (pValues[nProp] >>= nIntVal) SetTrackMoveColor( Color(nIntVal) );
|
||||
if (pValues[nProp] >>= nIntVal) SetTrackMoveColor( Color(ColorTransparency, nIntVal) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,9 +294,12 @@ ScViewCfg::ScViewCfg() :
|
||||
switch(nProp)
|
||||
{
|
||||
case SCLAYOUTOPT_GRIDCOLOR:
|
||||
if ( pValues[nProp] >>= nIntVal )
|
||||
SetGridColor( Color(nIntVal), EMPTY_OUSTRING );
|
||||
{
|
||||
Color aColor;
|
||||
if ( pValues[nProp] >>= aColor )
|
||||
SetGridColor( aColor, EMPTY_OUSTRING );
|
||||
break;
|
||||
}
|
||||
case SCLAYOUTOPT_GRIDLINES:
|
||||
SetOption( VOPT_GRID, ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
|
||||
break;
|
||||
|
||||
@@ -880,7 +880,7 @@ sax_fastparser::FSHelperPtr XclXmlUtils::WriteFontData( sax_fastparser::FSHelper
|
||||
lcl_WriteValue( pStream, XML_u, bHaveUnderline ? pUnderline : nullptr );
|
||||
lcl_WriteValue( pStream, XML_vertAlign, bHaveVertAlign ? pVertAlign : nullptr );
|
||||
lcl_WriteValue( pStream, XML_sz, OString::number( rFontData.mnHeight / 20.0 ).getStr() ); // Twips->Pt
|
||||
if( rFontData.maColor != Color( 0xFF, 0xFF, 0xFF, 0xFF ) )
|
||||
if( rFontData.maColor != Color( ColorAlpha, 0, 0xFF, 0xFF, 0xFF ) )
|
||||
pStream->singleElement( XML_color,
|
||||
// OOXTODO: XML_auto, bool
|
||||
// OOXTODO: XML_indexed, uint
|
||||
|
||||
@@ -1834,7 +1834,7 @@ static void lcl_WriteBorder( XclExpXmlStream& rStrm, sal_Int32 nElement, sal_uIn
|
||||
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
|
||||
if( nLineStyle == EXC_LINE_NONE )
|
||||
rStyleSheet->singleElement(nElement);
|
||||
else if( rColor == Color( 0, 0, 0, 0 ) )
|
||||
else if( rColor == Color( 0, 0, 0 ) )
|
||||
rStyleSheet->singleElement(nElement, XML_style, ToLineStyle(nLineStyle));
|
||||
else
|
||||
{
|
||||
|
||||
@@ -886,8 +886,8 @@ void XclChPropSetHelper::ReadMarkerProperties(
|
||||
rMarkerFmt.mnMarkerSize = XclTools::GetTwipsFromHmm( nApiSize );
|
||||
|
||||
// symbol colors
|
||||
rMarkerFmt.maLineColor = Color( aApiSymbol.BorderColor );
|
||||
rMarkerFmt.maFillColor = Color( aApiSymbol.FillColor );
|
||||
rMarkerFmt.maLineColor = Color( ColorTransparency, aApiSymbol.BorderColor );
|
||||
rMarkerFmt.maFillColor = Color( ColorTransparency, aApiSymbol.FillColor );
|
||||
}
|
||||
|
||||
sal_uInt16 XclChPropSetHelper::ReadRotationProperties( const ScfPropertySet& rPropSet, bool bSupportsStacked )
|
||||
|
||||
@@ -202,7 +202,7 @@ bool ScfPropertySet::GetColorProperty( Color& rColor, const OUString& rPropName
|
||||
{
|
||||
sal_Int32 nApiColor = 0;
|
||||
bool bRet = GetProperty( nApiColor, rPropName );
|
||||
rColor = Color( nApiColor );
|
||||
rColor = Color( ColorTransparency, nApiColor );
|
||||
return bRet;
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ void ScfPropSetHelper::ReadValue( Color& rColor )
|
||||
{
|
||||
sal_Int32 nApiColor(0);
|
||||
ReadValue( nApiColor );
|
||||
rColor = Color( nApiColor );
|
||||
rColor = Color( ColorTransparency, nApiColor );
|
||||
}
|
||||
|
||||
void ScfPropSetHelper::ReadValue( bool& rbValue )
|
||||
|
||||
@@ -235,7 +235,7 @@ private:
|
||||
|
||||
struct ExCfRuleModel
|
||||
{
|
||||
ExCfRuleModel() : mnAxisColor( UNSIGNED_RGB_TRANSPARENT ), mnNegativeColor( UNSIGNED_RGB_TRANSPARENT ), mbGradient( false ), mbIsLower( true ) {}
|
||||
ExCfRuleModel() : mnAxisColor( ColorTransparency, UNSIGNED_RGB_TRANSPARENT ), mnNegativeColor( ColorTransparency, UNSIGNED_RGB_TRANSPARENT ), mbGradient( false ), mbIsLower( true ) {}
|
||||
// AxisColor
|
||||
::Color mnAxisColor;
|
||||
// NegativeFillColor
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace {
|
||||
{
|
||||
::Color nColor;
|
||||
if( rAttribs.hasAttribute( XML_rgb ) )
|
||||
nColor = ::Color(rAttribs.getUnsignedHex( XML_rgb, UNSIGNED_RGB_TRANSPARENT ));
|
||||
nColor = ::Color(ColorTransparency, rAttribs.getUnsignedHex( XML_rgb, UNSIGNED_RGB_TRANSPARENT ));
|
||||
else if( rAttribs.hasAttribute( XML_theme ) )
|
||||
{
|
||||
sal_uInt32 nThemeIndex = rAttribs.getUnsigned( XML_theme, 0 );
|
||||
|
||||
@@ -855,7 +855,7 @@ void HeaderFooterParser::convertFontColor( const OUString& rColor )
|
||||
static_cast< double >( rColor.copy( 2 ).toInt32() ) / 100.0 );
|
||||
else
|
||||
// RGB color: RRGGBB
|
||||
maFontModel.maColor.setRgb( ::Color(rColor.toUInt32( 16 )) );
|
||||
maFontModel.maColor.setRgb( ::Color(ColorTransparency, rColor.toUInt32( 16 )) );
|
||||
}
|
||||
|
||||
void HeaderFooterParser::finalizePortion()
|
||||
|
||||
@@ -219,7 +219,7 @@ const sal_uInt8 BIFF_FONTUNDERL_DOUBLE_ACC = 34;
|
||||
nValue |= nG;
|
||||
nValue <<= 8;
|
||||
nValue |= nB;
|
||||
return ::Color(nValue);
|
||||
return ::Color(ColorTransparency, nValue);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -277,7 +277,7 @@ void Color::importColor( const AttributeList& rAttribs )
|
||||
if( rAttribs.hasAttribute( XML_theme ) )
|
||||
setTheme( rAttribs.getInteger( XML_theme, -1 ), rAttribs.getDouble( XML_tint, 0.0 ) );
|
||||
else if( rAttribs.hasAttribute( XML_rgb ) )
|
||||
setRgb( rAttribs.getIntegerHex( XML_rgb, sal_Int32(API_RGB_TRANSPARENT) ), rAttribs.getDouble( XML_tint, 0.0 ) );
|
||||
setRgb( ::Color(ColorTransparency, rAttribs.getIntegerHex( XML_rgb, sal_Int32(API_RGB_TRANSPARENT) ) ), rAttribs.getDouble( XML_tint, 0.0 ) );
|
||||
else if( rAttribs.hasAttribute( XML_indexed ) )
|
||||
setIndexed( rAttribs.getInteger( XML_indexed, -1 ), rAttribs.getDouble( XML_tint, 0.0 ) );
|
||||
else if( rAttribs.getBool( XML_auto, false ) )
|
||||
@@ -377,7 +377,7 @@ ColorPalette::ColorPalette( const WorkbookHelper& rHelper )
|
||||
|
||||
void ColorPalette::importPaletteColor( const AttributeList& rAttribs )
|
||||
{
|
||||
appendColor( rAttribs.getIntegerHex( XML_rgb, sal_Int32(API_RGB_WHITE) ) );
|
||||
appendColor( ::Color(ColorTransparency, rAttribs.getIntegerHex( XML_rgb, sal_Int32(API_RGB_WHITE) ) ) );
|
||||
}
|
||||
|
||||
void ColorPalette::importPaletteColor( SequenceInputStream& rStrm )
|
||||
|
||||
@@ -1727,7 +1727,7 @@ void ScOrcusStyles::set_font_underline_color(orcus::spreadsheet::color_elem_t al
|
||||
orcus::spreadsheet::color_elem_t green,
|
||||
orcus::spreadsheet::color_elem_t blue)
|
||||
{
|
||||
maCurrentFont.maUnderlineColor = Color(alpha, red, green, blue);
|
||||
maCurrentFont.maUnderlineColor = Color(ColorTransparency, alpha, red, green, blue);
|
||||
}
|
||||
|
||||
void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t /*alpha*/,
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace
|
||||
if (sColor == "transparent")
|
||||
aColor = COL_TRANSPARENT;
|
||||
else
|
||||
aColor = Color(sColor.toInt32(16));
|
||||
aColor = Color(ColorTransparency, sColor.toInt32(16));
|
||||
|
||||
switch (nSlot)
|
||||
{
|
||||
|
||||
@@ -333,7 +333,7 @@ static void setupFillColorForChart(SfxViewShell* pShell, SfxItemSet& rSet)
|
||||
sal_uInt32 nFillColor = 0;
|
||||
xPropSet->getPropertyValue("FillColor") >>= nFillColor;
|
||||
|
||||
XFillColorItem aFillColorItem("", Color(nFillColor));
|
||||
XFillColorItem aFillColorItem("", Color(ColorTransparency, nFillColor));
|
||||
rSet.Put(aFillColorItem);
|
||||
|
||||
if (comphelper::LibreOfficeKit::isActive())
|
||||
|
||||
@@ -7877,17 +7877,15 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
|
||||
{
|
||||
if (rDoc.IsScenario(nTab))
|
||||
{
|
||||
sal_Int32 nNewColor = 0;
|
||||
if (aValue >>= nNewColor)
|
||||
Color aColor;
|
||||
if (aValue >>= aColor)
|
||||
{
|
||||
OUString aName;
|
||||
OUString aComment;
|
||||
Color aColor;
|
||||
ScScenarioFlags nFlags;
|
||||
Color aTmp;
|
||||
rDoc.GetName( nTab, aName );
|
||||
rDoc.GetScenarioData( nTab, aComment, aColor, nFlags );
|
||||
|
||||
aColor = Color(static_cast<sal_uInt32>(nNewColor));
|
||||
rDoc.GetScenarioData( nTab, aComment, aTmp, nFlags );
|
||||
|
||||
pDocSh->ModifyScenario( nTab, aName, aComment, aColor, nFlags );
|
||||
}
|
||||
|
||||
@@ -886,7 +886,7 @@ void setColorScaleEntry(ScColorScaleEntry* pEntry, uno::Reference<sheet::XColorS
|
||||
throw lang::IllegalArgumentException();
|
||||
|
||||
pEntry->SetType(eType);
|
||||
pEntry->SetColor(Color(xEntry->getColor()));
|
||||
pEntry->SetColor(Color(ColorTransparency, xEntry->getColor()));
|
||||
switch (eType)
|
||||
{
|
||||
case COLORSCALE_FORMULA:
|
||||
@@ -1020,7 +1020,7 @@ sal_Int32 ScColorScaleEntryObj::getColor()
|
||||
|
||||
void ScColorScaleEntryObj::setColor(sal_Int32 aColor)
|
||||
{
|
||||
getCoreObject()->SetColor(Color(aColor));
|
||||
getCoreObject()->SetColor(Color(ColorTransparency, aColor));
|
||||
}
|
||||
|
||||
sal_Int32 ScColorScaleEntryObj::getType()
|
||||
|
||||
@@ -155,12 +155,9 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
|
||||
aViewOpt.SetOption(VOPT_GRID, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
else if ( aPropertyName == SC_UNO_GRIDCOLOR )
|
||||
{
|
||||
sal_Int64 nColor = 0;
|
||||
if (aValue >>= nColor)
|
||||
{
|
||||
Color aColor(static_cast<sal_uInt32>(nColor));
|
||||
Color aColor;
|
||||
if (aValue >>= aColor)
|
||||
aViewOpt.SetGridColor(aColor, OUString());
|
||||
}
|
||||
}
|
||||
else if ( aPropertyName == SC_UNO_SHOWPAGEBR )
|
||||
aViewOpt.SetOption(VOPT_PAGEBREAKS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
|
||||
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
{
|
||||
table::BorderLine aBorderLine;
|
||||
if ( getBorderLine( aBorderLine ) )
|
||||
return uno::makeAny( OORGBToXLRGB( Color(aBorderLine.Color) ) );
|
||||
return uno::makeAny( OORGBToXLRGB( Color(ColorTransparency, aBorderLine.Color) ) );
|
||||
throw uno::RuntimeException("No Implementation available" );
|
||||
}
|
||||
void SAL_CALL setColor( const uno::Any& _color ) override
|
||||
|
||||
@@ -102,7 +102,7 @@ ScVbaInterior::SetMixedColor()
|
||||
if( aPatternColor.hasValue() )
|
||||
{
|
||||
sal_uInt32 nPatternColor = GetAttributeData( aPatternColor );
|
||||
m_aPattColor = Color(nPatternColor);
|
||||
m_aPattColor = Color(ColorTransparency, nPatternColor);
|
||||
}
|
||||
Color nPatternColor = m_aPattColor;
|
||||
// back color
|
||||
@@ -216,7 +216,7 @@ Color
|
||||
ScVbaInterior::GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 nTrans )
|
||||
{
|
||||
return Color(
|
||||
nTrans,
|
||||
ColorTransparency, nTrans,
|
||||
GetMixedColorComp( rFore.GetRed(), rBack.GetRed(), nTrans ),
|
||||
GetMixedColorComp( rFore.GetGreen(), rBack.GetGreen(), nTrans ),
|
||||
GetMixedColorComp( rFore.GetBlue(), rBack.GetBlue(), nTrans ));
|
||||
@@ -301,7 +301,7 @@ ScVbaInterior::GetBackColor()
|
||||
if( aColor.hasValue() )
|
||||
{
|
||||
nColor = GetAttributeData( aColor );
|
||||
aBackColor = Color(nColor);
|
||||
aBackColor = Color(ColorTransparency, nColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -309,7 +309,7 @@ ScVbaInterior::GetBackColor()
|
||||
if( aAny >>= nColor )
|
||||
{
|
||||
nColor = XLRGBToOORGB( nColor );
|
||||
aBackColor = Color(nColor);
|
||||
aBackColor = Color(ColorTransparency, nColor);
|
||||
SetUserDefinedAttributes( BACKCOLOR, SetAttributeData( nColor ) );
|
||||
}
|
||||
}
|
||||
@@ -323,7 +323,7 @@ ScVbaInterior::getPatternColor()
|
||||
if( aPatternColor.hasValue() )
|
||||
{
|
||||
sal_uInt32 nPatternColor = GetAttributeData( aPatternColor );
|
||||
return uno::makeAny( OORGBToXLRGB( Color(nPatternColor) ) );
|
||||
return uno::makeAny( OORGBToXLRGB( Color(ColorTransparency, nPatternColor) ) );
|
||||
}
|
||||
return uno::makeAny( sal_Int32( 0 ) );
|
||||
}
|
||||
|
||||
@@ -956,7 +956,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
|
||||
if ( sColor == "transparent" )
|
||||
aColor = COL_TRANSPARENT;
|
||||
else
|
||||
aColor = Color( sColor.toInt32( 16 ) );
|
||||
aColor = Color( ColorTransparency, sColor.toInt32( 16 ) );
|
||||
|
||||
aSet.Put( SvxColorItem( aColor, EE_CHAR_COLOR ) );
|
||||
}
|
||||
|
||||
@@ -1644,7 +1644,7 @@ namespace
|
||||
if (sColor == "transparent")
|
||||
rColor = COL_TRANSPARENT;
|
||||
else
|
||||
rColor = Color(sColor.toInt32(16));
|
||||
rColor = Color(ColorTransparency, sColor.toInt32(16));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -2551,7 +2551,7 @@ void ScTabView::DoChartSelection(
|
||||
|
||||
for (chart2::data::HighlightedRange const & rHighlightedRange : rHilightRanges)
|
||||
{
|
||||
Color aSelColor(rHighlightedRange.PreferredColor);
|
||||
Color aSelColor(ColorTransparency, rHighlightedRange.PreferredColor);
|
||||
ScRangeList aRangeList;
|
||||
ScDocument& rDoc = aViewData.GetDocShell()->GetDocument();
|
||||
if( ScRangeStringConverter::GetRangeListFromString(
|
||||
|
||||
@@ -79,7 +79,7 @@ void PPTExCharSheet::SetStyleSheet( const css::uno::Reference< css::beans::XProp
|
||||
PPTExCharLevel& rLev = maCharLevel[ nLevel ];
|
||||
|
||||
if ( aPortionObj.meCharColor == css::beans::PropertyState_DIRECT_VALUE )
|
||||
rLev.mnFontColor = aPortionObj.mnCharColor;
|
||||
rLev.mnFontColor = Color(ColorTransparency, aPortionObj.mnCharColor);
|
||||
if ( aPortionObj.meCharEscapement == css::beans::PropertyState_DIRECT_VALUE )
|
||||
rLev.mnEscapement = aPortionObj.mnCharEscapement;
|
||||
if ( aPortionObj.meCharHeight == css::beans::PropertyState_DIRECT_VALUE )
|
||||
@@ -111,7 +111,7 @@ void PPTExCharSheet::Write( SvStream& rSt, sal_uInt16 nLev, bool bSimpleText,
|
||||
css::uno::Any aAny;
|
||||
if ( PropValue::GetPropertyValue( aAny, rPagePropSet, "IsBackgroundDark", true ) )
|
||||
aAny >>= bIsDark;
|
||||
nFontColor = bIsDark ? 0xffffff : 0x000000;
|
||||
nFontColor = Color(ColorTransparency, bIsDark ? 0xffffff : 0x000000);
|
||||
}
|
||||
nFontColor.SetAlpha(1);
|
||||
if ( bSimpleText )
|
||||
@@ -447,7 +447,7 @@ bool PPTExStyleSheet::IsHardAttribute( sal_uInt32 nInstance, sal_uInt32 nLevel,
|
||||
case CharAttr_AsianOrComplexFont : return ( rChar.mnAsianOrComplexFont != nValue );
|
||||
case CharAttr_Symbol : return true;
|
||||
case CharAttr_FontHeight : return ( rChar.mnFontHeight != nValue );
|
||||
case CharAttr_FontColor : return ( rChar.mnFontColor != nValue );
|
||||
case CharAttr_FontColor : return ( rChar.mnFontColor != Color(ColorTransparency, nValue) );
|
||||
case CharAttr_Escapement : return ( rChar.mnEscapement != nValue );
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -499,37 +499,37 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams
|
||||
}
|
||||
else if ( rParam.Name == "BackColor" )
|
||||
{
|
||||
sal_Int32 temp = 0;
|
||||
Color temp;
|
||||
rParam.Value >>= temp;
|
||||
maBackColor = Color(temp);
|
||||
maBackColor = temp;
|
||||
mbUserAttr = true;
|
||||
}
|
||||
else if ( rParam.Name == "TextColor" )
|
||||
{
|
||||
sal_Int32 temp = 0;
|
||||
Color temp;
|
||||
rParam.Value >>= temp;
|
||||
maTextColor = Color(temp);
|
||||
maTextColor = temp;
|
||||
mbUserAttr = true;
|
||||
}
|
||||
else if ( rParam.Name == "LinkColor" )
|
||||
{
|
||||
sal_Int32 temp = 0;
|
||||
Color temp ;
|
||||
rParam.Value >>= temp;
|
||||
maLinkColor = Color(temp);
|
||||
maLinkColor = temp;
|
||||
mbUserAttr = true;
|
||||
}
|
||||
else if ( rParam.Name == "VLinkColor" )
|
||||
{
|
||||
sal_Int32 temp = 0;
|
||||
Color temp;
|
||||
rParam.Value >>= temp;
|
||||
maVLinkColor = Color(temp);
|
||||
maVLinkColor = temp;
|
||||
mbUserAttr = true;
|
||||
}
|
||||
else if ( rParam.Name == "ALinkColor" )
|
||||
{
|
||||
sal_Int32 temp = 0;
|
||||
Color temp;
|
||||
rParam.Value >>= temp;
|
||||
maALinkColor = Color(temp);
|
||||
maALinkColor = temp;
|
||||
mbUserAttr = true;
|
||||
}
|
||||
else if ( rParam.Name == "IsUseDocumentColors" )
|
||||
|
||||
@@ -35,7 +35,7 @@ void Ppt97AnimationInfoAtom::ReadStream( SvStream& rIn )
|
||||
{
|
||||
sal_uInt32 nTmp;
|
||||
rIn.ReadUInt32( nTmp );
|
||||
nDimColor = Color(nTmp);
|
||||
nDimColor = Color(ColorTransparency, nTmp);
|
||||
rIn.ReadUInt32( nFlags );
|
||||
rIn.ReadUInt32( nSoundRef );
|
||||
rIn.ReadInt32( nDelayTime );
|
||||
|
||||
@@ -208,9 +208,9 @@ SdColorPropertyBox::SdColorPropertyBox(weld::Label* pLabel, weld::Container* pPa
|
||||
pLabel->set_mnemonic_widget(&mxControl->get_widget());
|
||||
mxControl->show();
|
||||
|
||||
sal_Int32 nColor = 0;
|
||||
Color nColor;
|
||||
rValue >>= nColor;
|
||||
mxControl->SelectEntry(Color(nColor));
|
||||
mxControl->SelectEntry(nColor);
|
||||
}
|
||||
|
||||
IMPL_LINK_NOARG(SdColorPropertyBox, OnSelect, ColorListBox&, void)
|
||||
@@ -222,11 +222,11 @@ void SdColorPropertyBox::setValue( const Any& rValue, const OUString& )
|
||||
{
|
||||
if (mxControl)
|
||||
{
|
||||
sal_Int32 nColor = 0;
|
||||
Color nColor;
|
||||
rValue >>= nColor;
|
||||
|
||||
mxControl->SetNoSelection();
|
||||
mxControl->SelectEntry(Color(nColor));
|
||||
mxControl->SelectEntry(nColor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1000,9 +1000,8 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage(weld::Container* pPar
|
||||
|
||||
if( aDimColor.hasValue() )
|
||||
{
|
||||
sal_Int32 nColor = 0;
|
||||
aDimColor >>= nColor;
|
||||
Color aColor(nColor);
|
||||
Color aColor;
|
||||
aDimColor >>= aColor;
|
||||
mxCLBDimColor->SelectEntry(aColor);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -169,8 +169,8 @@ void CopyDlg::Reset()
|
||||
m_xMtrFldAngle->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FieldUnit::NONE);
|
||||
m_xMtrFldWidth->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FieldUnit::NONE);
|
||||
m_xMtrFldHeight->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FieldUnit::NONE);
|
||||
m_xLbStartColor->SelectEntry( Color( aStr.getToken(0, TOKEN, nIdx).toUInt32() ) );
|
||||
m_xLbEndColor->SelectEntry( Color( aStr.getToken(0, TOKEN, nIdx).toUInt32() ) );
|
||||
m_xLbStartColor->SelectEntry( Color( ColorTransparency, aStr.getToken(0, TOKEN, nIdx).toUInt32() ) );
|
||||
m_xLbEndColor->SelectEntry( Color( ColorTransparency, aStr.getToken(0, TOKEN, nIdx).toUInt32() ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -161,15 +161,15 @@ Any PresenterTextView::SetPropertyValue (
|
||||
}
|
||||
else if (rsPropertyName == gsBackgroundColorPropertyName)
|
||||
{
|
||||
util::Color aColor = util::Color();
|
||||
::Color aColor;
|
||||
if (rValue >>= aColor)
|
||||
mpImplementation->SetBackgroundColor(Color(aColor));
|
||||
mpImplementation->SetBackgroundColor(aColor);
|
||||
}
|
||||
else if (rsPropertyName == gsTextColorPropertyName)
|
||||
{
|
||||
util::Color aColor = util::Color();
|
||||
::Color aColor;
|
||||
if (rValue >>= aColor)
|
||||
mpImplementation->SetTextColor(Color(aColor));
|
||||
mpImplementation->SetTextColor(aColor);
|
||||
}
|
||||
else if (rsPropertyName == gsFontDescriptorPropertyName)
|
||||
{
|
||||
|
||||
@@ -1417,7 +1417,7 @@ void SAL_CALL SlideshowImpl::blankScreen( sal_Int32 nColor )
|
||||
|
||||
if( mpShowWindow && mpSlideController )
|
||||
{
|
||||
if( mpShowWindow->SetBlankMode( mpSlideController->getCurrentSlideIndex(), Color(nColor) ) )
|
||||
if( mpShowWindow->SetBlankMode( mpSlideController->getCurrentSlideIndex(), Color(ColorTransparency, nColor) ) )
|
||||
{
|
||||
pause();
|
||||
}
|
||||
@@ -2107,7 +2107,7 @@ IMPL_LINK( SlideshowImpl, ContextMenuSelectHdl, Menu *, pMenu, bool )
|
||||
else if (sMenuId == "color")
|
||||
{
|
||||
//Open a color picker based on SvColorDialog
|
||||
::Color aColor( mnUserPaintColor );
|
||||
::Color aColor( ColorTransparency, mnUserPaintColor );
|
||||
SvColorDialog aColorDlg;
|
||||
aColorDlg.SetColor( aColor );
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ void SAL_CALL SlideSorterService::setBackgroundColor (sal_Int32 aBackgroundColor
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
|
||||
mpSlideSorter->GetProperties()->SetBackgroundColor(Color(aBackgroundColor));
|
||||
mpSlideSorter->GetProperties()->SetBackgroundColor(Color(ColorTransparency, aBackgroundColor));
|
||||
}
|
||||
|
||||
sal_Int32 SAL_CALL SlideSorterService::getTextColor()
|
||||
@@ -327,7 +327,7 @@ void SAL_CALL SlideSorterService::setTextColor (sal_Int32 aTextColor)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
|
||||
mpSlideSorter->GetProperties()->SetTextColor(Color(aTextColor));
|
||||
mpSlideSorter->GetProperties()->SetTextColor(Color(ColorTransparency, aTextColor));
|
||||
}
|
||||
|
||||
sal_Int32 SAL_CALL SlideSorterService::getSelectionColor()
|
||||
@@ -344,7 +344,7 @@ void SAL_CALL SlideSorterService::setSelectionColor (sal_Int32 aSelectionColor)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
|
||||
mpSlideSorter->GetProperties()->SetSelectionColor(Color(aSelectionColor));
|
||||
mpSlideSorter->GetProperties()->SetSelectionColor(Color(ColorTransparency, aSelectionColor));
|
||||
}
|
||||
|
||||
sal_Int32 SAL_CALL SlideSorterService::getHighlightColor()
|
||||
@@ -361,7 +361,7 @@ void SAL_CALL SlideSorterService::setHighlightColor (sal_Int32 aHighlightColor)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
if (mpSlideSorter != nullptr && mpSlideSorter->IsValid())
|
||||
mpSlideSorter->GetProperties()->SetHighlightColor(Color(aHighlightColor));
|
||||
mpSlideSorter->GetProperties()->SetHighlightColor(Color(ColorTransparency, aHighlightColor));
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL SlideSorterService::getIsUIReadOnly()
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace
|
||||
if (sColor == "transparent")
|
||||
aColor = COL_TRANSPARENT;
|
||||
else
|
||||
aColor = Color(sColor.toInt32(16));
|
||||
aColor = Color(ColorTransparency, sColor.toInt32(16));
|
||||
|
||||
switch (nSlot)
|
||||
{
|
||||
|
||||
@@ -562,7 +562,7 @@ public:
|
||||
if (sColor == "transparent")
|
||||
aColor = COL_TRANSPARENT;
|
||||
else
|
||||
aColor = Color(sColor.toInt32(16));
|
||||
aColor = Color(ColorTransparency, sColor.toInt32(16));
|
||||
|
||||
switch (nSlot)
|
||||
{
|
||||
|
||||
@@ -1813,7 +1813,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
|
||||
if (sColor == "transparent")
|
||||
aColor = COL_TRANSPARENT;
|
||||
else
|
||||
aColor = Color(sColor.toInt32(16));
|
||||
aColor = Color(ColorTransparency, sColor.toInt32(16));
|
||||
|
||||
XFillColorItem aColorItem(OUString(), aColor);
|
||||
rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_SOLID ) );
|
||||
|
||||
@@ -137,10 +137,10 @@ RecentDocsView::RecentDocsView(std::unique_ptr<weld::ScrolledWindow> xWindow, st
|
||||
setItemMaxTextLength( 30 );
|
||||
setItemDimensions( mnItemMaxSize, mnItemMaxSize, gnTextHeight, gnItemPadding );
|
||||
|
||||
maFillColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsBackgroundColor::get());
|
||||
maTextColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsTextColor::get());
|
||||
maHighlightColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsHighlightColor::get());
|
||||
maHighlightTextColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsHighlightTextColor::get());
|
||||
maFillColor = Color(ColorTransparency, officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsBackgroundColor::get());
|
||||
maTextColor = Color(ColorTransparency, officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsTextColor::get());
|
||||
maHighlightColor = Color(ColorTransparency, officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsHighlightColor::get());
|
||||
maHighlightTextColor = Color(ColorTransparency, officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsHighlightTextColor::get());
|
||||
mfHighlightTransparence = 0.25;
|
||||
|
||||
UpdateColors();
|
||||
|
||||
@@ -31,10 +31,10 @@ TemplateDefaultView::TemplateDefaultView(std::unique_ptr<weld::ScrolledWindow> x
|
||||
updateThumbnailDimensions(nItemMaxSize);
|
||||
|
||||
// startcenter specific settings
|
||||
maFillColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsBackgroundColor::get());
|
||||
maTextColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsTextColor::get());
|
||||
maHighlightColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsHighlightColor::get());
|
||||
maHighlightTextColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsHighlightTextColor::get());
|
||||
maFillColor = Color(ColorTransparency, officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsBackgroundColor::get());
|
||||
maTextColor = Color(ColorTransparency, officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsTextColor::get());
|
||||
maHighlightColor = Color(ColorTransparency, officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsHighlightColor::get());
|
||||
maHighlightTextColor = Color(ColorTransparency, officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsHighlightTextColor::get());
|
||||
mfHighlightTransparence = 0.25;
|
||||
|
||||
UpdateColors();
|
||||
|
||||
@@ -744,11 +744,9 @@ void Theme::ProcessNewValue (
|
||||
}
|
||||
case PT_Color:
|
||||
{
|
||||
sal_Int32 nColorValue (0);
|
||||
Color nColorValue;
|
||||
if (rValue >>= nColorValue)
|
||||
{
|
||||
maColors[nIndex] = Color(nColorValue);
|
||||
}
|
||||
maColors[nIndex] = nColorValue;
|
||||
break;
|
||||
}
|
||||
case PT_Integer:
|
||||
|
||||
@@ -200,7 +200,7 @@ struct SmColorTokenTableEntry
|
||||
: pIdent(name)
|
||||
, cIdent(codename)
|
||||
, eType(ctype)
|
||||
, cColor(ncolor)
|
||||
, cColor(ColorTransparency, ncolor)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -1159,7 +1159,7 @@ void SmXMLExport::ExportFont(const SmNode* pNode, int nLevel)
|
||||
sStrBuf.append('#');
|
||||
std::unique_ptr<SmColorTokenTableEntry> aSmColorTokenTableEntry;
|
||||
nc = pNode->GetToken().aText.toUInt32(16);
|
||||
sStrBuf.append(Color(nc).AsRGBHEXString());
|
||||
sStrBuf.append(Color(ColorTransparency, nc).AsRGBHEXString());
|
||||
OUString ssStr(sStrBuf.makeStringAndClear());
|
||||
AddAttribute(XML_NAMESPACE_MATH, XML_MATHCOLOR, ssStr);
|
||||
}
|
||||
|
||||
@@ -1632,7 +1632,7 @@ void SmFontNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
|
||||
case TICONICCOL :
|
||||
case THEX :
|
||||
nc = GetToken().aText.toUInt32(16);
|
||||
SetColor(Color(nc));
|
||||
SetColor(Color(ColorTransparency, nc));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -225,9 +225,9 @@ void ColorConfig_Impl::Load(const OUString& rScheme)
|
||||
{
|
||||
if(pColors[nIndex].hasValue())
|
||||
{
|
||||
sal_Int32 nTmp(0);
|
||||
Color nTmp;
|
||||
pColors[nIndex] >>= nTmp;
|
||||
m_aConfigValues[i].nColor = Color(nTmp);
|
||||
m_aConfigValues[i].nColor = nTmp;
|
||||
}
|
||||
else
|
||||
m_aConfigValues[i].nColor = COL_AUTO;
|
||||
|
||||
@@ -332,18 +332,18 @@ SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl() :
|
||||
case PROPERTYHANDLE_STRIPE_COLOR_A:
|
||||
{
|
||||
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\StripeColorA\"?" );
|
||||
sal_Int32 nValue = 0;
|
||||
Color nValue;
|
||||
seqValues[nProperty] >>= nValue;
|
||||
m_bStripeColorA = Color(nValue);
|
||||
m_bStripeColorA = nValue;
|
||||
}
|
||||
break;
|
||||
|
||||
case PROPERTYHANDLE_STRIPE_COLOR_B:
|
||||
{
|
||||
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\StripeColorB\"?" );
|
||||
sal_Int32 nValue = 0;
|
||||
Color nValue;
|
||||
seqValues[nProperty] >>= nValue;
|
||||
m_bStripeColorB = Color(nValue);
|
||||
m_bStripeColorB = nValue;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -653,7 +653,7 @@ namespace svt::table
|
||||
{
|
||||
::std::vector< ::Color > aColors( aAPIColors.getLength() );
|
||||
std::transform(aAPIColors.begin(), aAPIColors.end(), aColors.begin(),
|
||||
[](const css::util::Color& rAPIColor) -> ::Color { return Color(rAPIColor); });
|
||||
[](const css::util::Color& rAPIColor) -> ::Color { return Color(ColorTransparency, rAPIColor); });
|
||||
m_aRowColors = aColors;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ Color HexColorControl::GetColor() const
|
||||
m_xEntry->set_message_type(nColor != -1 ? weld::EntryMessageType::Normal
|
||||
: weld::EntryMessageType::Error);
|
||||
|
||||
return Color(nColor);
|
||||
return Color(ColorTransparency, nColor);
|
||||
}
|
||||
|
||||
IMPL_STATIC_LINK(HexColorControl, ImplProcessInputHdl, OUString&, rTest, bool)
|
||||
|
||||
@@ -1785,7 +1785,7 @@ void FmXGridPeer::setProperty( const OUString& PropertyName, const Any& Value)
|
||||
|
||||
if ( PropertyName == FM_PROP_TEXTLINECOLOR )
|
||||
{
|
||||
::Color aTextLineColor( bVoid ? COL_TRANSPARENT : ::Color(::comphelper::getINT32( Value )) );
|
||||
::Color aTextLineColor( bVoid ? COL_TRANSPARENT : ::Color(ColorTransparency, ::comphelper::getINT32( Value )) );
|
||||
if (bVoid)
|
||||
{
|
||||
pGrid->SetTextLineColor();
|
||||
@@ -1846,7 +1846,7 @@ void FmXGridPeer::setProperty( const OUString& PropertyName, const Any& Value)
|
||||
if (bVoid)
|
||||
pGrid->SetCursorColor(COL_TRANSPARENT);
|
||||
else
|
||||
pGrid->SetCursorColor( ::Color(::comphelper::getINT32(Value)));
|
||||
pGrid->SetCursorColor( ::Color(ColorTransparency, ::comphelper::getINT32(Value)));
|
||||
if (isDesignMode())
|
||||
pGrid->Invalidate();
|
||||
}
|
||||
@@ -1898,7 +1898,7 @@ void FmXGridPeer::setProperty( const OUString& PropertyName, const Any& Value)
|
||||
}
|
||||
else
|
||||
{
|
||||
::Color aColor( ::comphelper::getINT32(Value) );
|
||||
::Color aColor( ColorTransparency, ::comphelper::getINT32(Value) );
|
||||
pGrid->SetBackground( aColor );
|
||||
pGrid->SetControlBackground( aColor );
|
||||
}
|
||||
@@ -1911,7 +1911,7 @@ void FmXGridPeer::setProperty( const OUString& PropertyName, const Any& Value)
|
||||
}
|
||||
else
|
||||
{
|
||||
::Color aColor( ::comphelper::getINT32(Value) );
|
||||
::Color aColor( ColorTransparency, ::comphelper::getINT32(Value) );
|
||||
pGrid->SetTextColor( aColor );
|
||||
pGrid->SetControlForeground( aColor );
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ SdrItemPool::SdrItemPool(
|
||||
rPoolDefaults[ SDRATTR_3DSCENE_DISTANCE - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, 100);
|
||||
rPoolDefaults[ SDRATTR_3DSCENE_FOCAL_LENGTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, 100);
|
||||
rPoolDefaults[ SDRATTR_3DSCENE_TWO_SIDED_LIGHTING - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, false);
|
||||
rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_1 - SDRATTR_START ] = new SvxColorItem(Color(0xffcccccc), SDRATTR_3DSCENE_LIGHTCOLOR_1);
|
||||
rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_1 - SDRATTR_START ] = new SvxColorItem(Color(ColorTransparency, 0xffcccccc), SDRATTR_3DSCENE_LIGHTCOLOR_1);
|
||||
rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_2 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_2);
|
||||
rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_3 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_3);
|
||||
rPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_4 - SDRATTR_START ] = new SvxColorItem(Color(0x00000000), SDRATTR_3DSCENE_LIGHTCOLOR_4);
|
||||
|
||||
@@ -135,7 +135,7 @@ void PaletteManager::ReloadColorSet(SvxColorValueSet &rColorSet)
|
||||
int nIx = 1;
|
||||
for (int i = 0; i < CustomColorList.getLength(); ++i)
|
||||
{
|
||||
Color aColor(CustomColorList[i]);
|
||||
Color aColor(ColorTransparency, CustomColorList[i]);
|
||||
rColorSet.InsertItem(nIx, aColor, CustomColorNameList[i]);
|
||||
++nIx;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ void PaletteManager::ReloadRecentColorSet(SvxColorValueSet& rColorSet)
|
||||
const bool bHasColorNames = Colorlist.getLength() == ColorNamelist.getLength();
|
||||
for (int i = 0; i < Colorlist.getLength(); ++i)
|
||||
{
|
||||
Color aColor(Colorlist[i]);
|
||||
Color aColor(ColorTransparency, Colorlist[i]);
|
||||
OUString sColorName = bHasColorNames ? ColorNamelist[i] : ("#" + aColor.AsRGBHexString().toAsciiUpperCase());
|
||||
maRecentColors.emplace_back(aColor, sColorName);
|
||||
rColorSet.InsertItem(nIx, aColor, sColorName);
|
||||
|
||||
@@ -485,7 +485,7 @@ std::unique_ptr<XPropertyEntry> SvxUnoXHatchTable::createEntry(const OUString& r
|
||||
|
||||
XHatch aXHatch;
|
||||
aXHatch.SetHatchStyle( aUnoHatch.Style );
|
||||
aXHatch.SetColor( Color(aUnoHatch.Color) );
|
||||
aXHatch.SetColor( Color(ColorTransparency, aUnoHatch.Color) );
|
||||
aXHatch.SetDistance( aUnoHatch.Distance );
|
||||
aXHatch.SetAngle( Degree10(aUnoHatch.Angle) );
|
||||
|
||||
@@ -564,8 +564,8 @@ std::unique_ptr<XPropertyEntry> SvxUnoXGradientTable::createEntry(const OUString
|
||||
XGradient aXGradient;
|
||||
|
||||
aXGradient.SetGradientStyle( aGradient.Style );
|
||||
aXGradient.SetStartColor( Color(aGradient.StartColor) );
|
||||
aXGradient.SetEndColor( Color(aGradient.EndColor) );
|
||||
aXGradient.SetStartColor( Color(ColorTransparency, aGradient.StartColor) );
|
||||
aXGradient.SetEndColor( Color(ColorTransparency, aGradient.EndColor) );
|
||||
aXGradient.SetAngle( Degree10(aGradient.Angle) );
|
||||
aXGradient.SetBorder( aGradient.Border );
|
||||
aXGradient.SetXOffset( aGradient.XOffset );
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user