LibreOffice Module sw (master)  1
Functions
sw::ms Namespace Reference

Functions

sal_uInt8 rtl_TextEncodingToWinCharset (rtl_TextEncoding eTextEncoding)
 MSOffice appears to set the charset of unicode fonts to MS 932. More...
 
sal_uInt8 rtl_TextEncodingToWinCharsetRTF (OUString const &rFontName, OUString const &rAltName, rtl_TextEncoding eTextEncoding)
 MSOffice appears to set the charset of unicode fonts to MS 932. More...
 
sal_uInt32 DateTime2DTTM (const DateTime &rDT)
 Convert from DTTM to Writer's DateTime. More...
 
sal_uLong MSDateTimeFormatToSwFormat (OUString &rParams, SvNumberFormatter *pFormatter, LanguageType &rLang, bool bHijri, LanguageType nDocLang)
 Convert from Word Date/Time field str to Writer's Date Time str. More...
 
bool IsPreviousAM (std::u16string_view rParams, sal_Int32 nPos)
 
bool IsNextPM (std::u16string_view rParams, sal_Int32 nPos)
 
bool IsNotAM (std::u16string_view rParams, sal_Int32 nPos)
 Used by MSDateTimeFormatToSwFormat to identify AM time fields. More...
 
void SwapQuotesInField (OUString &rFormat)
 Another function used by MSDateTimeFormatToSwFormat. More...
 
static bool CanEncode (OUString const &rString, rtl_TextEncoding const eEncoding)
 
static sal_Int32 findUnquoted (const OUString &rParams, sal_Unicode cFind, sal_Int32 nFromPos)
 Find cFind in rParams if not embedded in " double quotes. More...
 
static bool replaceUnquoted (OUString &rParams, const OUString &rFind, const OUString &rReplace)
 Find all rFind in rParams if not embedded in " double quotes and replace with rReplace. More...
 

Function Documentation

static bool sw::ms::CanEncode ( OUString const &  rString,
rtl_TextEncoding const  eEncoding 
)
static

Definition at line 672 of file writerwordglue.cxx.

Referenced by rtl_TextEncodingToWinCharsetRTF().

sal_uInt32 sw::ms::DateTime2DTTM ( const DateTime rDT)
static sal_Int32 sw::ms::findUnquoted ( const OUString &  rParams,
sal_Unicode  cFind,
sal_Int32  nFromPos 
)
static

Find cFind in rParams if not embedded in " double quotes.

Will NOT find '\' or '"'.

Definition at line 751 of file writerwordglue.cxx.

Referenced by MSDateTimeFormatToSwFormat().

bool sw::ms::IsNextPM ( std::u16string_view  rParams,
sal_Int32  nPos 
)

Definition at line 1044 of file writerwordglue.cxx.

References o3tl::make_unsigned(), o3tl::matchIgnoreAsciiCase(), and u.

Referenced by MSDateTimeFormatToSwFormat().

bool sw::ms::IsNotAM ( std::u16string_view  rParams,
sal_Int32  nPos 
)

Used by MSDateTimeFormatToSwFormat to identify AM time fields.

Definition at line 1048 of file writerwordglue.cxx.

References o3tl::make_unsigned().

Referenced by MSDateTimeFormatToSwFormat().

bool sw::ms::IsPreviousAM ( std::u16string_view  rParams,
sal_Int32  nPos 
)

Definition at line 1040 of file writerwordglue.cxx.

References o3tl::matchIgnoreAsciiCase(), and u.

Referenced by MSDateTimeFormatToSwFormat().

sal_uLong sw::ms::MSDateTimeFormatToSwFormat ( OUString &  rParams,
SvNumberFormatter pFormatter,
LanguageType rLang,
bool  bHijri,
LanguageType  nDocLang 
)

Convert from Word Date/Time field str to Writer's Date Time str.

Definition at line 824 of file writerwordglue.cxx.

References o3tl::strong_int< UNDERLYING_TYPE, PHANTOM_TYPE >::anyOf(), findUnquoted(), IsNextPM(), IsNotAM(), IsPreviousAM(), LANGUAGE_DANISH, LANGUAGE_DUTCH, LANGUAGE_DUTCH_BELGIAN, LANGUAGE_FINNISH, LANGUAGE_FRENCH, LANGUAGE_FRENCH_BELGIAN, LANGUAGE_FRENCH_CANADIAN, LANGUAGE_FRENCH_LUXEMBOURG, LANGUAGE_FRENCH_MONACO, LANGUAGE_FRENCH_SWISS, LANGUAGE_GERMAN, LANGUAGE_GERMAN_AUSTRIAN, LANGUAGE_GERMAN_LIECHTENSTEIN, LANGUAGE_GERMAN_LUXEMBOURG, LANGUAGE_GERMAN_SWISS, LANGUAGE_ITALIAN, LANGUAGE_ITALIAN_SWISS, LANGUAGE_JAPANESE, LANGUAGE_NORWEGIAN, LANGUAGE_NORWEGIAN_BOKMAL, LANGUAGE_NORWEGIAN_NYNORSK, LANGUAGE_PORTUGUESE, LANGUAGE_PORTUGUESE_BRAZILIAN, LANGUAGE_SPANISH_ARGENTINA, LANGUAGE_SPANISH_BOLIVIA, LANGUAGE_SPANISH_CHILE, LANGUAGE_SPANISH_COLOMBIA, LANGUAGE_SPANISH_COSTARICA, LANGUAGE_SPANISH_DATED, LANGUAGE_SPANISH_DOMINICAN_REPUBLIC, LANGUAGE_SPANISH_ECUADOR, LANGUAGE_SPANISH_EL_SALVADOR, LANGUAGE_SPANISH_GUATEMALA, LANGUAGE_SPANISH_HONDURAS, LANGUAGE_SPANISH_MEXICAN, LANGUAGE_SPANISH_MODERN, LANGUAGE_SPANISH_NICARAGUA, LANGUAGE_SPANISH_PANAMA, LANGUAGE_SPANISH_PARAGUAY, LANGUAGE_SPANISH_PERU, LANGUAGE_SPANISH_PUERTO_RICO, LANGUAGE_SPANISH_URUGUAY, LANGUAGE_SPANISH_VENEZUELA, LANGUAGE_SWEDISH, LANGUAGE_SWEDISH_FINLAND, nPos, nType, SvNumberFormatter::PutEntry(), replaceUnquoted(), SwapQuotesInField(), and u.

Referenced by SwWW8ImplReader::GetTimeDatePara().

static bool sw::ms::replaceUnquoted ( OUString &  rParams,
const OUString &  rFind,
const OUString &  rReplace 
)
static

Find all rFind in rParams if not embedded in " double quotes and replace with rReplace.

Will NOT find '\' or '"'.

Definition at line 784 of file writerwordglue.cxx.

Referenced by MSDateTimeFormatToSwFormat().

sal_uInt8 sw::ms::rtl_TextEncodingToWinCharset ( rtl_TextEncoding  eTextEncoding)

MSOffice appears to set the charset of unicode fonts to MS 932.

But we do "default", whatever that means.

Parameters
eTextEncodingthe OOo encoding to convert from
Returns
a msoffice equivalent charset identifier

Definition at line 652 of file writerwordglue.cxx.

Referenced by wwFont::WriteDocx(), and wwFont::wwFont().

sal_uInt8 sw::ms::rtl_TextEncodingToWinCharsetRTF ( OUString const &  rFontName,
OUString const &  rAltName,
rtl_TextEncoding  eTextEncoding 
)

MSOffice appears to set the charset of unicode fonts to MS 932.

Arial Unicode MS for example is a unicode font, but word sets exported uses of it to the MS 932 charset

Definition at line 680 of file writerwordglue.cxx.

References CanEncode(), i, and SAL_INFO.

Referenced by RtfAttributeOutput::CharFont(), and wwFont::WriteRtf().

void sw::ms::SwapQuotesInField ( OUString &  rFormat)

Another function used by MSDateTimeFormatToSwFormat.

Definition at line 1054 of file writerwordglue.cxx.

References u.

Referenced by MSWordExportBase::GetNumberFormat(), and MSDateTimeFormatToSwFormat().