LibreOffice Module filter (master) 1
Classes | Functions | Variables
msfilter::util Namespace Reference

Classes

struct  ApiPaperSize
 Paper size in 1/100 millimeters. More...
 
struct  EquationResult
 
class  PaperSizeConv
 
class  WW8ReadFieldParams
 

Functions

rtl_TextEncoding getBestTextEncodingFromLocale (const css::lang::Locale &rLocale)
 Returns the best-fit default 8bit encoding for a given locale i.e. More...
 
::Color BGRToRGB (sal_uInt32 nColour)
 Convert a color in BGR format to RGB. More...
 
DateTime DTTM2DateTime (tools::Long lDTTM)
 Convert from DTTM to Writer's DateTime. More...
 
sal_Unicode bestFitOpenSymbolToMSFont (sal_Unicode cBullet, rtl_TextEncoding &r_ioChrSet, OUString &r_ioFontName)
 Convert DateTime to xsd::dateTime string. More...
 
OString ConvertColor (const Color &rColor)
 Converts tools Color to HTML color (without leading hashmark). More...
 
OUString ConvertColorOU (const Color &rColor)
 
OUString CreateDOCXStyleId (std::u16string_view const aName)
 
std::u16string_view findQuotedText (std::u16string_view rCommand, std::u16string_view cStartQuote, const sal_Unicode uEndQuote)
 Finds the quoted text in a field instruction text. More...
 
static EquationResult Read_SubF_Combined (WW8ReadFieldParams &rReadParam)
 
EquationResult ParseCombinedChars (const OUString &rStr)
 
OString GetOOXMLPresetGeometry (std::u16string_view rShapeType)
 Similar to EnhancedCustomShapeTypeNames::Get(), but it also supports OOXML types and returns a drawingML string. More...
 
MSO_SPT GETVMLShapeType (std::u16string_view aType)
 Similar to EnhancedCustomShapeTypeNames::Get(), but returns an MSO_SPT (binary / VML type). More...
 
bool HasTextBoxContent (sal_uInt32 nShapeType)
 The following function checks if a MSO shapetype is allowed to have textboxcontent. More...
 
sal_uInt8 TransColToIco (const Color &rCol)
 Convert the input color value to an ico value (0..16) More...
 

Variables

const ApiPaperSize spPaperSizeTable []
 

Function Documentation

◆ bestFitOpenSymbolToMSFont()

MSFILTER_DLLPUBLIC sal_Unicode msfilter::util::bestFitOpenSymbolToMSFont ( sal_Unicode  cBullet,
rtl_TextEncoding &  r_ioChrSet,
OUString &  r_ioFontName 
)

Convert DateTime to xsd::dateTime string.

I guess there must be an implementation of this somewhere in LO, but I failed to find it, unfortunately :-( Given a cBullet in encoding r_ioChrSet and fontname r_ioFontName return a suitable new Bullet and change r_ioChrSet and r_ioFontName to form the best-fit replacement in terms of default available MSOffice symbol fonts.

Used to map from [Open|Star]Symbol to some Windows font or other.

Definition at line 92 of file util.cxx.

References CreateStarSymbolToMSMultiFont(), nIndex, and u.

◆ BGRToRGB()

MSFILTER_DLLPUBLIC::Color msfilter::util::BGRToRGB ( sal_uInt32  nColor)

Convert a color in BGR format to RGB.

Definition at line 49 of file util.cxx.

References ColorTransparency, and gentoken::t.

◆ ConvertColor()

MSFILTER_DLLPUBLIC OString msfilter::util::ConvertColor ( const Color rColor)

Converts tools Color to HTML color (without leading hashmark).

Parameters
rColorcolor to convert

Definition at line 130 of file util.cxx.

References AUTO, COL_AUTO(), Color::GetBlue(), Color::GetGreen(), and Color::GetRed().

◆ ConvertColorOU()

MSFILTER_DLLPUBLIC OUString msfilter::util::ConvertColorOU ( const Color rColor)

Definition at line 150 of file util.cxx.

References AUTO, COL_AUTO(), Color::GetBlue(), Color::GetGreen(), Color::GetRed(), and u.

◆ CreateDOCXStyleId()

MSFILTER_DLLPUBLIC OUString msfilter::util::CreateDOCXStyleId ( std::u16string_view const  aName)

Definition at line 315 of file util.cxx.

References aName, and gentoken::i.

◆ DTTM2DateTime()

MSFILTER_DLLPUBLIC DateTime msfilter::util::DTTM2DateTime ( tools::Long  lDTTM)

Convert from DTTM to Writer's DateTime.

Definition at line 59 of file util.cxx.

◆ findQuotedText()

MSFILTER_DLLPUBLIC std::u16string_view msfilter::util::findQuotedText ( std::u16string_view  rCommand,
std::u16string_view  cStartQuote,
const sal_Unicode  uEndQuote 
)

Finds the quoted text in a field instruction text.

Example: SEQ "Figure" \someoption -> "Figure"

Definition at line 333 of file util.cxx.

◆ getBestTextEncodingFromLocale()

MSFILTER_DLLPUBLIC rtl_TextEncoding msfilter::util::getBestTextEncodingFromLocale ( const css::lang::Locale &  rLocale)

Returns the best-fit default 8bit encoding for a given locale i.e.

useful when dealing with legacy formats which use legacy text encodings without recording what the encoding is, but you know or can guess the language

Definition at line 27 of file util.cxx.

◆ GetOOXMLPresetGeometry()

MSFILTER_DLLPUBLIC OString msfilter::util::GetOOXMLPresetGeometry ( std::u16string_view  rShapeType)

Similar to EnhancedCustomShapeTypeNames::Get(), but it also supports OOXML types and returns a drawingML string.

Definition at line 625 of file util.cxx.

References gentoken::i, and u.

Referenced by GETVMLShapeType().

◆ GETVMLShapeType()

MSFILTER_DLLPUBLIC MSO_SPT msfilter::util::GETVMLShapeType ( std::u16string_view  aType)

Similar to EnhancedCustomShapeTypeNames::Get(), but returns an MSO_SPT (binary / VML type).

Definition at line 1025 of file util.cxx.

References GetOOXMLPresetGeometry(), gentoken::i, mso_sptAccentBorderCallout1, mso_sptAccentBorderCallout2, mso_sptAccentBorderCallout3, mso_sptAccentBorderCallout90, mso_sptAccentCallout1, mso_sptAccentCallout2, mso_sptAccentCallout3, mso_sptAccentCallout90, mso_sptActionButtonBackPrevious, mso_sptActionButtonBeginning, mso_sptActionButtonBlank, mso_sptActionButtonDocument, mso_sptActionButtonEnd, mso_sptActionButtonForwardNext, mso_sptActionButtonHelp, mso_sptActionButtonHome, mso_sptActionButtonInformation, mso_sptActionButtonMovie, mso_sptActionButtonReturn, mso_sptActionButtonSound, mso_sptArc, mso_sptArrow, mso_sptBalloon, mso_sptBentArrow, mso_sptBentConnector2, mso_sptBentConnector3, mso_sptBentConnector4, mso_sptBentConnector5, mso_sptBentUpArrow, mso_sptBevel, mso_sptBlockArc, mso_sptBorderCallout1, mso_sptBorderCallout2, mso_sptBorderCallout3, mso_sptBorderCallout90, mso_sptBracePair, mso_sptBracketPair, mso_sptCallout1, mso_sptCallout2, mso_sptCallout3, mso_sptCallout90, mso_sptCan, mso_sptChevron, mso_sptCircularArrow, mso_sptCloudCallout, mso_sptCube, mso_sptCurvedConnector2, mso_sptCurvedConnector3, mso_sptCurvedConnector4, mso_sptCurvedConnector5, mso_sptCurvedDownArrow, mso_sptCurvedLeftArrow, mso_sptCurvedRightArrow, mso_sptCurvedUpArrow, mso_sptDiamond, mso_sptDonut, mso_sptDoubleWave, mso_sptDownArrow, mso_sptDownArrowCallout, mso_sptEllipse, mso_sptEllipseRibbon, mso_sptEllipseRibbon2, mso_sptFlowChartAlternateProcess, mso_sptFlowChartCollate, mso_sptFlowChartConnector, mso_sptFlowChartDecision, mso_sptFlowChartDelay, mso_sptFlowChartDisplay, mso_sptFlowChartDocument, mso_sptFlowChartExtract, mso_sptFlowChartInputOutput, mso_sptFlowChartInternalStorage, mso_sptFlowChartMagneticDisk, mso_sptFlowChartMagneticDrum, mso_sptFlowChartMagneticTape, mso_sptFlowChartManualInput, mso_sptFlowChartManualOperation, mso_sptFlowChartMerge, mso_sptFlowChartMultidocument, mso_sptFlowChartOfflineStorage, mso_sptFlowChartOffpageConnector, mso_sptFlowChartOnlineStorage, mso_sptFlowChartOr, mso_sptFlowChartPredefinedProcess, mso_sptFlowChartPreparation, mso_sptFlowChartProcess, mso_sptFlowChartPunchedCard, mso_sptFlowChartPunchedTape, mso_sptFlowChartSort, mso_sptFlowChartSummingJunction, mso_sptFlowChartTerminator, mso_sptFoldedCorner, mso_sptHeart, mso_sptHexagon, mso_sptHomePlate, mso_sptHorizontalScroll, mso_sptHostControl, mso_sptIrregularSeal1, mso_sptIrregularSeal2, mso_sptIsocelesTriangle, mso_sptLeftArrow, mso_sptLeftArrowCallout, mso_sptLeftBrace, mso_sptLeftBracket, mso_sptLeftRightArrow, mso_sptLeftRightArrowCallout, mso_sptLeftRightUpArrow, mso_sptLeftUpArrow, mso_sptLightningBolt, mso_sptLine, mso_sptMoon, mso_sptNil, mso_sptNoSmoking, mso_sptNotchedCircularArrow, mso_sptNotchedRightArrow, mso_sptNotPrimitive, mso_sptOctagon, mso_sptParallelogram, mso_sptPentagon, mso_sptPictureFrame, mso_sptPlaque, mso_sptPlus, mso_sptQuadArrow, mso_sptQuadArrowCallout, mso_sptRectangle, mso_sptRibbon, mso_sptRibbon2, mso_sptRightArrowCallout, mso_sptRightBrace, mso_sptRightBracket, mso_sptRightTriangle, mso_sptRoundRectangle, mso_sptSeal, mso_sptSeal16, mso_sptSeal24, mso_sptSeal32, mso_sptSeal4, mso_sptSeal8, mso_sptSmileyFace, mso_sptStar, mso_sptStraightConnector1, mso_sptStripedRightArrow, mso_sptSun, mso_sptTextArchDownCurve, mso_sptTextArchDownPour, mso_sptTextArchUpCurve, mso_sptTextArchUpPour, mso_sptTextBox, mso_sptTextButtonCurve, mso_sptTextButtonPour, mso_sptTextCanDown, mso_sptTextCanUp, mso_sptTextCascadeDown, mso_sptTextCascadeUp, mso_sptTextChevron, mso_sptTextChevronInverted, mso_sptTextCircleCurve, mso_sptTextCirclePour, mso_sptTextCurve, mso_sptTextCurveDown, mso_sptTextCurveUp, mso_sptTextDeflate, mso_sptTextDeflateBottom, mso_sptTextDeflateInflate, mso_sptTextDeflateInflateDeflate, mso_sptTextDeflateTop, mso_sptTextFadeDown, mso_sptTextFadeLeft, mso_sptTextFadeRight, mso_sptTextFadeUp, mso_sptTextHexagon, mso_sptTextInflate, mso_sptTextInflateBottom, mso_sptTextInflateTop, mso_sptTextOctagon, mso_sptTextOnCurve, mso_sptTextOnRing, mso_sptTextPlainText, mso_sptTextRing, mso_sptTextRingInside, mso_sptTextRingOutside, mso_sptTextSimple, mso_sptTextSlantDown, mso_sptTextSlantUp, mso_sptTextStop, mso_sptTextTriangle, mso_sptTextTriangleInverted, mso_sptTextWave, mso_sptTextWave1, mso_sptTextWave2, mso_sptTextWave3, mso_sptTextWave4, mso_sptThickArrow, mso_sptTrapezoid, mso_sptUpArrow, mso_sptUpArrowCallout, mso_sptUpDownArrow, mso_sptUpDownArrowCallout, mso_sptUturnArrow, mso_sptVerticalScroll, mso_sptWave, mso_sptWedgeEllipseCallout, mso_sptWedgeRectCallout, and mso_sptWedgeRRectCallout.

Referenced by EscherPropertyContainer::GetCustomShapeType().

◆ HasTextBoxContent()

MSFILTER_DLLPUBLIC bool msfilter::util::HasTextBoxContent ( sal_uInt32  nShapeType)

The following function checks if a MSO shapetype is allowed to have textboxcontent.

Parameters
nShapeTypeshape to check

Definition at line 1238 of file util.cxx.

References ESCHER_ShpInst_TextDeflateInflateDeflate, ESCHER_ShpInst_TextPlainText, and ESCHER_ShpInst_TextSlantUp.

◆ ParseCombinedChars()

MSFILTER_DLLPUBLIC EquationResult msfilter::util::ParseCombinedChars ( const OUString &  rStr)

◆ Read_SubF_Combined()

static EquationResult msfilter::util::Read_SubF_Combined ( WW8ReadFieldParams rReadParam)
static

◆ TransColToIco()

MSFILTER_DLLPUBLIC sal_uInt8 msfilter::util::TransColToIco ( const Color rCol)

Convert the input color value to an ico value (0..16)

Parameters
[in]rColinput color for conversion
Returns
ico value [0..16]

Definition at line 1319 of file util.cxx.

References COL_AUTO(), COL_BLACK(), COL_BLUE(), COL_BROWN(), COL_CYAN(), COL_GRAY(), COL_GREEN(), COL_LIGHTBLUE(), COL_LIGHTCYAN(), COL_LIGHTGRAY(), COL_LIGHTGREEN(), COL_LIGHTMAGENTA(), COL_LIGHTRED(), COL_MAGENTA(), COL_RED(), COL_WHITE(), and COL_YELLOW().

Variable Documentation

◆ spPaperSizeTable

const ApiPaperSize msfilter::util::spPaperSizeTable[]