/* -*- 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 .
*/
// change TextFrame flag when bResizeShapeToFitText changes (which is mapped // on the item SDRATTR_TEXT_AUTOGROWHEIGHT for custom shapes, argh)
rObj.mbTextFrame = GetObjectItemSet().Get(SDRATTR_TEXT_AUTOGROWHEIGHT).GetValue();
// check if it did change if(rObj.mbTextFrame != bOld)
{ // on change also invalidate render geometry
bInvalidateRenderGeometry = true;
// #115391# Potential recursion, since it calls SetObjectItemSet again, but rObj.bTextFrame // will not change again. Thus it will be only one level and terminate safely
rObj.AdaptTextMinSize();
}
if(bInvalidateRenderGeometry)
{ // if asked for or bResizeShapeToFitText changed, make sure that // the render geometry is reconstructed using changed parameters
rObj.InvalidateRenderGeometry();
}
}
// update bTextFrame and RenderGeometry
UpdateTextFrameStatus(true);
}
void CustomShapeProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast, bool bAdjustTextFrameWidthAndHeight)
{ // call parent (always first thing to do, may create the SfxItemSet)
TextProperties::SetStyleSheet( pNewStyleSheet, bDontRemoveHardAttr, bBroadcast, bAdjustTextFrameWidthAndHeight );
// update bTextFrame and RenderGeometry
UpdateTextFrameStatus(true);
}
void CustomShapeProperties::ForceDefaultAttributes()
{ // update bTextFrame and RenderGeometry
UpdateTextFrameStatus(true);
// SJ: Following is no good if creating customshapes, leading to objects that are white after loading via xml // This means: Do *not* call parent here is by purpose...
}
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.