LibreOffice Module svx (master) 1
|
#include "EnhancedCustomShapeFontWork.hxx"
#include <svl/itemset.hxx>
#include <svx/compatflags.hxx>
#include <svx/svddef.hxx>
#include <svx/svdopath.hxx>
#include <vcl/kernarray.hxx>
#include <vcl/metric.hxx>
#include <svx/sdasitm.hxx>
#include <svx/sdtfsitm.hxx>
#include <vcl/virdev.hxx>
#include <svx/svditer.hxx>
#include <editeng/eeitem.hxx>
#include <editeng/frmdiritem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/charscaleitem.hxx>
#include <svx/svdoashp.hxx>
#include <svx/sdshitm.hxx>
#include <svx/svdmodel.hxx>
#include <editeng/outlobj.hxx>
#include <editeng/editobj.hxx>
#include <o3tl/numeric.hxx>
#include <vector>
#include <numeric>
#include <algorithm>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/i18n/BreakIterator.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <sal/log.hxx>
#include <rtl/math.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/string.hxx>
Go to the source code of this file.
Functions | |
static bool | InitializeFontWorkData (const SdrObjCustomShape &rSdrObjCustomShape, const sal_uInt16 nOutlinesCount2d, FWData &rFWData) |
static double | GetLength (const tools::Polygon &rPolygon) |
static void | CalculateHorizontalScalingFactor (const SdrObjCustomShape &rSdrObjCustomShape, FWData &rFWData, const tools::PolyPolygon &rOutline2d) |
static void | GetTextAreaOutline (const FWData &rFWData, const SdrObjCustomShape &rSdrObjCustomShape, FWTextArea &rTextArea, bool bSameLetterHeights) |
static bool | GetFontWorkOutline (FWData &rFWData, const SdrObjCustomShape &rSdrObjCustomShape) |
static basegfx::B2DPolyPolygon | GetOutlinesFromShape2d (const SdrObject *pShape2d) |
static void | CalcDistances (const tools::Polygon &rPoly, std::vector< double > &rDistances) |
static void | InsertMissingOutlinePoints (const std::vector< double > &rDistances, const tools::Rectangle &rTextAreaBoundRect, tools::Polygon &rPoly) |
static void | GetPoint (const tools::Polygon &rPoly, const std::vector< double > &rDistances, const double &fX, double &fx1, double &fy1) |
static void | FitTextOutlinesToShapeOutlines (const tools::PolyPolygon &aOutlines2d, FWData &rFWData) |
static rtl::Reference< SdrObject > | CreateSdrObjectFromParagraphOutlines (const FWData &rFWData, const SdrObjCustomShape &rSdrObjCustomShape) |
|
static |
Definition at line 647 of file EnhancedCustomShapeFontWork.cxx.
References tools::Polygon::CalcDistance(), tools::Polygon::GetSize(), i, and nCount.
Referenced by FitTextOutlinesToShapeOutlines().
|
static |
Definition at line 196 of file EnhancedCustomShapeFontWork.cxx.
References ALIGN_TOP, tools::PolyPolygon::Count(), EE_CHAR_FONTHEIGHT(), EE_CHAR_FONTINFO(), EE_CHAR_ITALIC(), EE_CHAR_WEIGHT(), SvxFontItem::GetFamily(), SvxFontItem::GetFamilyName(), SvxFontHeightItem::GetHeight(), tools::Rectangle::GetHeight(), GetLength(), SdrTextObj::GetLogicRect(), SdrObject::GetMergedItem(), tools::PolyPolygon::GetObject(), SvxPostureItem::GetPosture(), SvxFontItem::GetStyleName(), SvxWeightItem::GetWeight(), i, vcl::Font::SetAlignment(), vcl::Font::SetFamily(), vcl::Font::SetFamilyName(), vcl::Font::SetFontHeight(), vcl::Font::SetItalic(), vcl::Font::SetOrientation(), vcl::Font::SetStyleName(), and vcl::Font::SetWeight().
Referenced by EnhancedCustomShapeFontWork::CreateFontWork().
|
static |
Definition at line 892 of file EnhancedCustomShapeFontWork.cxx.
References basegfx::B2DPolyPolygon::append(), SfxItemSet::ClearItem(), SdrObject::GetMergedItemSet(), SdrObject::getSdrModelFromSdrObject(), makeSdrShadowItem(), Polygon, SfxItemSet::Put(), and SDRATTR_TEXTDIRECTION().
Referenced by EnhancedCustomShapeFontWork::CreateFontWork().
|
static |
Definition at line 749 of file EnhancedCustomShapeFontWork.cxx.
References basegfx::utils::adaptiveSubdivideByAngle(), Point::AdjustX(), Point::AdjustY(), basegfx::B2DPolygon::areControlPointsUsed(), CalcDistances(), tools::Rectangle::Center(), tools::PolyPolygon::Count(), tools::PolyPolygon::GetBoundRect(), tools::Rectangle::GetHeight(), GetPoint(), tools::Polygon::GetSize(), tools::Rectangle::GetWidth(), i, InsertMissingOutlinePoints(), tools::Rectangle::Left(), tools::PolyPolygon::Move(), tools::Rectangle::Right(), tools::PolyPolygon::Rotate(), SAL_WARN, Point::setX(), Point::setY(), tools::Rectangle::Top(), Point::X(), and Point::Y().
Referenced by EnhancedCustomShapeFontWork::CreateFontWork().
|
static |
Definition at line 508 of file EnhancedCustomShapeFontWork.cxx.
References EE_CHAR_FONTHEIGHT(), SvxFontHeightItem::GetHeight(), tools::Rectangle::GetHeight(), SdrTextObj::GetLogicRect(), SdrObject::GetMergedItem(), SdrCustomShapeGeometryItem::GetPropertyValueByName(), GetTextAreaOutline(), SAL_MIN_INT32, SDRATTR_CUSTOMSHAPE_GEOMETRY(), SDRATTR_TEXT_FITTOSIZE(), SDRATTR_TEXT_HORZADJUST(), SDRATTR_TEXT_VERTADJUST(), SDRTEXTHORZADJUST_BLOCK, SDRTEXTHORZADJUST_CENTER, SDRTEXTHORZADJUST_LEFT, SDRTEXTHORZADJUST_RIGHT, SDRTEXTVERTADJUST_BOTTOM, and SDRTEXTVERTADJUST_TOP.
Referenced by EnhancedCustomShapeFontWork::CreateFontWork().
|
static |
Definition at line 181 of file EnhancedCustomShapeFontWork.cxx.
References tools::Polygon::CalcDistance(), tools::Polygon::GetSize(), and nCount.
Referenced by CalculateHorizontalScalingFactor().
|
static |
Definition at line 625 of file EnhancedCustomShapeFontWork.cxx.
References basegfx::utils::adaptiveSubdivideByAngle(), basegfx::B2DPolyPolygon::append(), basegfx::B2DPolyPolygon::areControlPointsUsed(), DeepWithGroups, SdrObjListIter::IsMore(), and SdrObjListIter::Next().
Referenced by EnhancedCustomShapeFontWork::CreateFontWork().
|
static |
Definition at line 721 of file EnhancedCustomShapeFontWork.cxx.
References tools::Polygon::GetSize(), Point::X(), and Point::Y().
Referenced by sdr::contact::ViewContactOfSdrMeasureObj::createViewIndependentPrimitive2DSequence(), and FitTextOutlinesToShapeOutlines().
|
static |
Definition at line 289 of file EnhancedCustomShapeFontWork.cxx.
References a, ALIGN_TOP, KernArray::back(), vcl::text::BiDiRtl, VclPtr< class reference_type >::clear(), basegfx::utils::createPolygonFromRect(), EE_CHAR_FONTINFO(), EE_CHAR_FONTINFO_CJK(), EE_CHAR_FONTINFO_CTL(), EE_CHAR_FONTWIDTH(), EE_CHAR_ITALIC(), EE_CHAR_WEIGHT(), KernArray::empty(), vcl::Font::GetAverageFontWidth(), tools::PolyPolygon::GetBoundRect(), EnhancedCustomShapeFontWork::GetBreakIterator(), SvxFontItem::GetFamily(), SvxFontItem::GetFamilyName(), vcl::Font::GetFontHeight(), tools::Rectangle::GetHeight(), SdrObject::GetMergedItem(), SvxPostureItem::GetPosture(), SvxFontItem::GetStyleName(), SvxWeightItem::GetWeight(), tools::Rectangle::GetWidth(), i, SdrTextObj::IsVerticalWriting(), tools::PolyPolygon::Move(), tools::Rectangle::Move(), vcl::Font::SetAlignment(), vcl::Font::SetAverageFontWidth(), vcl::Font::SetFamily(), vcl::Font::SetFamilyName(), vcl::Font::SetFontHeight(), vcl::Font::SetItalic(), vcl::Font::SetOrientation(), vcl::Font::SetStyleName(), vcl::Font::SetWeight(), KernArray::size(), tools::Rectangle::Top(), and tools::Rectangle::Union().
Referenced by GetFontWorkOutline().
|
static |
Definition at line 92 of file EnhancedCustomShapeFontWork.cxx.
References EE_PARA_WRITINGDIR(), SfxItemSet::Get(), SdrModel::GetCompatibilityFlag(), getLength(), SdrObject::GetMergedItem(), SdrTextObj::GetOutlinerParaObject(), EditTextObject::GetParaAttribs(), EditTextObject::GetParagraphCount(), SdrCustomShapeGeometryItem::GetPropertyValueByName(), SdrObject::getSdrModelFromSdrObject(), EditTextObject::GetText(), OutlinerParaObject::GetTextObject(), i, LegacySingleLineFontwork, nPos, SDRATTR_CUSTOMSHAPE_GEOMETRY(), and u.
Referenced by EnhancedCustomShapeFontWork::CreateFontWork().
|
static |
Definition at line 667 of file EnhancedCustomShapeFontWork.cxx.
References tools::Polygon::GetSize(), tools::Rectangle::GetWidth(), i, tools::Polygon::Insert(), tools::Rectangle::Left(), Point::X(), and Point::Y().
Referenced by FitTextOutlinesToShapeOutlines().