22 #include <com/sun/star/frame/XModel.hpp>
23 #include <com/sun/star/text/ControlCharacter.hpp>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/beans/XPropertyState.hpp>
26 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
27 #include <com/sun/star/text/XTextField.hpp>
34 #include <oox/token/properties.hxx>
35 #include <oox/token/tokens.hxx>
46 mbIsLineBreak(
false )
55 const ::oox::core::XmlFilterBase& rFilterBase,
59 float nDefaultCharHeight)
const
61 sal_Int32 nCharHeight = 0;
67 Any aOldFontName = xState->getPropertyDefault(
"CharFontName");
68 Any aOldFontPitch = xState->getPropertyDefault(
"CharFontPitch");
69 Any aOldFontFamily = xState->getPropertyDefault(
"CharFontFamily");
83 aTextCharacterProps.
moHeight =
static_cast<sal_Int32
>(nDefaultCharHeight * 100);
90 SAL_WARN(
"oox",
"OOX: TextRun::insertAt() insert line break" );
91 xText->insertControlCharacter( xStart, ControlCharacter::LINE_BREAK,
false );
96 sal_Int32 nMax =
getText().getLength();
99 bool bSymbol = (
getText()[nIndex] & 0xff00) == 0xf000;
101 while(nIndex + nCount < nMax
102 && ((
getText()[nIndex + nCount] & 0xff00) == 0xf000) == bSymbol)
106 sal_Int16 nFontFamily = 0, nFontPitch = 0;
119 OUString aSubString(
getText().
copy(nIndex, nCount));
120 xText->insertString(xStart, aSubString,
false);
148 xTextFieldCursor->gotoEnd(
false );
153 xText->insertTextContent( xStart, xField,
false );
155 xTextFieldCursor->gotoEnd(
true );
165 aTextCharacterProps.
pushToPropSet( aFieldTextPropSet, rFilterBase );
168 aTextField.
xText = xText;
171 rFilterBase.getTextFieldStack().push_back( aTextField );
175 SAL_WARN(
"oox",
"OOX: URL field couldn't be created" );
176 xText->insertString( xStart,
getText(),
false );
void setSchemeClr(sal_Int32 nToken)
Sets a scheme color from the a:schemeClr element.
virtual sal_Int32 insertAt(const ::oox::core::XmlFilterBase &rFilterBase, const css::uno::Reference< css::text::XText > &xText, const css::uno::Reference< css::text::XTextCursor > &xAt, const TextCharacterProperties &rTextCharacterStyle, float nDefaultCharHeight) const
OptValue< sal_Int32 > moFillType
css::uno::Reference< css::text::XTextField > xTextField
PropertyMap maHyperlinkPropertyMap
bool getFontData(OUString &rFontName, sal_Int16 &rnFontPitch, sal_Int16 &rnFontFamily, const ::oox::core::XmlFilterBase &rFilter) const
Returns the font name, pitch, and family; tries to resolve theme placeholder names, e.g.
void setProperties(const css::uno::Sequence< OUString > &rPropNames, const css::uno::Sequence< css::uno::Any > &rValues)
Puts the passed properties into the property set.
FillProperties maFillProperties
bool setAnyProperty(sal_Int32 nPropId, const css::uno::Any &rValue)
Puts the passed any into the property set.
bool hasProperty(sal_Int32 nPropId) const
Returns true, if the map contains a property with the passed identifier.
#define TOOLS_WARN_EXCEPTION(area, stream)
bool isUsed() const
Returns true, if the color is initialized.
OptValue< sal_Int32 > moUnderline
A wrapper for a UNO property set.
OptValue< sal_Int32 > moHeight
css::uno::Reference< css::text::XText > xText
void copy(const fs::path &src, const fs::path &dest)
void assignUsed(const TextCharacterProperties &rSourceProps)
Overwrites all members that are explicitly set in rSourceProps.
css::uno::Reference< css::text::XTextCursor > xTextCursor
#define SAL_WARN(area, stream)
Reference< XSingleServiceFactory > xFactory
Color maFillColor
Fill type (OOXML token).
constexpr OUStringLiteral aTextField
TextCharacterProperties maTextCharacterProperties
bool setProperty(sal_Int32 nPropId, const Type &rValue)
Puts the passed value into the property set.
void pushToPropSet(PropertySet &rPropSet, const ::oox::core::XmlFilterBase &rFilter) const
Writes the properties to the passed property set.
bool m_bDetectedRangeSegmentation false