25#include <osl/nlsupport.h>
59 short i,j,nHue,nNSat,nVal,nC[3],nmax,nmed,nmin;
77 for (nHue=0; nHue<24; nHue++) {
78 for (nVal=5; nVal>=1; nVal--) {
79 for (nNSat=0; nNSat<2; nNSat++) {
81 j=nHue-(nmax<<3);
if (j>4) j=j-24;
95 for (j=0; j<3; j++) nC[j]=(nC[j]>>1)+128;
97 for (j=0; j<3; j++) nC[j]=nC[j]*nVal/5;
104 for (
i=0;
i<6;
i++) {
123 : mEnc(RTL_TEXTENCODING_DONTKNOW)
137 osl_getTextEncodingFromLocale(
nullptr);
151 while (DGR.
GetG()!=0 || (DGR.
GetS() !=
"EOF")) {
152 if (DGR.
GetG()==0 && DGR.
GetS() ==
"SECTION") {
176 while (rDGR.
GetG()!=0 || (rDGR.
GetS() !=
"EOF" && rDGR.
GetS() !=
"ENDSEC") )
178 if (rDGR.
GetG()==9) {
179 if (rDGR.
GetS() ==
"$EXTMIN" ||
180 rDGR.
GetS() ==
"$EXTMAX")
183 while (rDGR.
Read()!=9 && rDGR.
GetG()!=0) {
184 switch (rDGR.
GetG()) {
185 case 10: aVector.
fx = rDGR.
GetF();
break;
186 case 20: aVector.
fy = rDGR.
GetF();
break;
187 case 30: aVector.
fz = rDGR.
GetF();
break;
192 else if (rDGR.
GetS() ==
"$ACADVER")
206 if ((rDGR.
GetS() <= std::string_view(
"AC1009")) || (rDGR.
GetS() ==
"AC2.22") || (rDGR.
GetS() ==
"AC2.21") || (rDGR.
GetS() ==
"AC2.10") ||
207 (rDGR.
GetS() ==
"AC1.50") || (rDGR.
GetS() ==
"AC1.40") || (rDGR.
GetS() ==
"AC1.2") || (rDGR.
GetS() ==
"MC0.0"))
216 else if (rDGR.
GetS() >= std::string_view(
"AC1021"))
228 else if (rDGR.
GetS() ==
"$DWGCODEPAGE")
234 if (
mEnc == RTL_TEXTENCODING_UTF8)
238 else if ( (rDGR.
GetS().equalsIgnoreAsciiCase(
"ANSI_932")) ||
239 (rDGR.
GetS().equalsIgnoreAsciiCase(
"DOS932")) )
243 else if (rDGR.
GetS().equalsIgnoreAsciiCase(
"ANSI_936"))
247 else if (rDGR.
GetS().equalsIgnoreAsciiCase(
"ANSI_949"))
251 else if (rDGR.
GetS().equalsIgnoreAsciiCase(
"ANSI_950"))
255 else if (rDGR.
GetS().equalsIgnoreAsciiCase(
"ANSI_1251"))
260 else if (rDGR.
GetS() ==
"$LTSCALE")
280 while (pBE!=
nullptr) {
281 switch (pBE->
eType) {
351 if (pB==
nullptr)
break;
393 if (pB==
nullptr)
break;
429 return ch >= L
'0' &&
ch <= L
'9';
433 return lcl_isDec(ch) || (
ch >= L
'A' &&
ch <= L
'F') || (ch >= L
'a' && ch <= L
'f');
440 RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
441 | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
442 | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR);
444 .replaceAll(
"%%u",
"")
445 .replaceAll(
"%%d",
u"\u00B0")
446 .replaceAll(
"%%p",
u"\u00B1")
447 .replaceAll(
"%%c",
u"\u2205")
448 .replaceAll(
"%%%",
"%");
452 OUString asciiNum =
result.copy(
pos + 2, 3);
453 if (lcl_isDec(asciiNum[0]) &&
454 lcl_isDec(asciiNum[1]) &&
455 lcl_isDec(asciiNum[2]))
457 char ch =
static_cast<char>(asciiNum.toUInt32());
458 OUString codePt(&
ch, 1,
mEnc);
466 OUString codePtNum =
result.copy(
pos + 3, 4);
467 if (lcl_isHex(codePtNum[0]) &&
468 lcl_isHex(codePtNum[1]) &&
469 lcl_isHex(codePtNum[2]) &&
470 lcl_isHex(codePtNum[3]))
472 OUString codePt(
static_cast<sal_Unicode>(codePtNum.toUInt32(16)));
void Read(DXFGroupReader &rDGR)
DXFBlock * Search(std::string_view rName) const
void Union(const DXFVector &rVector)
void Read(DXFGroupReader &rDGR)
const OString & GetS() const
std::array< sal_uInt8, 256 > pGreen
std::array< sal_uInt8, 256 > pBlue
std::array< sal_uInt8, 256 > pRed
void SetColor(sal_uInt8 nIndex, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue)
OUString ToOUString(std::string_view s) const
void setGlobalLineTypeScale(double fGlobalLineTypeScale)
double getGlobalLineTypeScale() const
void CalcBoundingBox(const DXFEntities &rEntities, DXFBoundingBox &rBox)
bool Read(SvStream &rIStream)
bool isTextEncodingSet() const
DXFBoundingBox aBoundingBox
rtl_TextEncoding getTextEncoding() const
void ReadHeader(DXFGroupReader &rDGR)
void setTextEncoding(rtl_TextEncoding aEnc)
void Read(DXFGroupReader &rDGR)
UNOTOOLS_DLLPUBLIC OUString utl_getLocaleForGlobalDefaultEncoding()
UNOTOOLS_DLLPUBLIC rtl_TextEncoding utl_getWinTextEncodingFromLangStr(const OUString &sLanguage, bool bOEM=false)