/* -*- 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/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
case A_TOKEN(prstClr):
{
sal_Int32 nToken = rAttribs.getToken(XML_val, XML_TOKEN_INVALID);
mrColor.setPrstClr(nToken); if (mpComplexColor)
{ // TODO - just converted to RGB for now
::Color nRgbValue = Color::getDmlPresetColor(nToken, API_RGB_TRANSPARENT);
mpComplexColor->setColor(nRgbValue);
}
} break;
}
}
::oox::core::ContextHandlerRef ColorValueContext::onCreateContext(
sal_Int32 nElement, const AttributeList& rAttribs )
{ switch( nElement )
{ case A_TOKEN( alpha ): case A_TOKEN( alphaMod ): case A_TOKEN( alphaOff ): case A_TOKEN( blue ): case A_TOKEN( blueMod ): case A_TOKEN( blueOff ): case A_TOKEN( hue ): case A_TOKEN( hueMod ): case A_TOKEN( hueOff ): case A_TOKEN( lum ): case A_TOKEN( lumMod ): case A_TOKEN( lumOff ): case A_TOKEN( green ): case A_TOKEN( greenMod ): case A_TOKEN( greenOff ): case A_TOKEN( red ): case A_TOKEN( redMod ): case A_TOKEN( redOff ): case A_TOKEN( sat ): case A_TOKEN( satMod ): case A_TOKEN( satOff ): case A_TOKEN( shade ): case A_TOKEN( tint ):
{
OUString aValue = rAttribs.getStringDefaulted( XML_val);
sal_Int32 nVal = 0; if (aValue.endsWith("%"))
{
nVal = aValue.toDouble() * PER_PERCENT;
} else
nVal = rAttribs.getInteger(XML_val, 0);
mrColor.addTransformation( nElement, nVal );
} break; case A_TOKEN( comp ): case A_TOKEN( gamma ): case A_TOKEN( gray ): case A_TOKEN( inv ): case A_TOKEN( invGamma ):
mrColor.addTransformation( nElement ); break;
}
if (mpComplexColor)
{ auto aIterator = constTransformTypeMap.find(getBaseToken(nElement)); if (aIterator != constTransformTypeMap.end())
{ autoconst& aPair = *aIterator;
model::TransformationType eType = aPair.second;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.