/* -*- 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 .
*/
bool ShapePropertyMap::setAnyProperty( ShapeProperty ePropId, const Any& rValue )
{ // get current property identifier for the specified property
sal_Int32 nPropId = maShapePropInfo[ ePropId ]; if( nPropId < 0 ) returnfalse;
// special handling for properties supporting named objects in tables switch( ePropId )
{ case ShapeProperty::LineStart: case ShapeProperty::LineEnd: return setLineMarker( nPropId, rValue );
case ShapeProperty::LineDash: return setLineDash( nPropId, rValue );
case ShapeProperty::FillGradient: return setFillGradient( nPropId, rValue );
case ShapeProperty::GradientTransparency: return setGradientTrans( nPropId, rValue );
case ShapeProperty::FillBitmap: return setFillBitmap(nPropId, rValue);
case ShapeProperty::FillBitmapName: return setFillBitmapName(rValue);
case ShapeProperty::FillHatch: return setFillHatch( nPropId, rValue );
default:; // suppress compiler warnings
}
// set plain property value
setAnyProperty( nPropId, rValue ); returntrue;
}
// create named hatch and push its name if (rValue.has<drawing::Hatch>())
{
OUString aHatchName = mrModelObjHelper.insertFillHatch(rValue.get<drawing::Hatch>()); return !aHatchName.isEmpty() && setProperty( nPropId, aHatchName );
}
// create named bitmap URL and push its name if (rValue.has<uno::Reference<graphic::XGraphic>>())
{ auto xGraphic = rValue.get<uno::Reference<graphic::XGraphic>>();
OUString aBitmapName = mrModelObjHelper.insertFillBitmapXGraphic(xGraphic); return !aBitmapName.isEmpty() && setProperty(nPropId, aBitmapName);
}
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.