Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
e51fbdff
Kaydet (Commit)
e51fbdff
authored
Şub 23, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Related: fdo#34319 document requirements for MSWord FTC/LID emulation
üst
ecf53379
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
11 deletions
+32
-11
ww8par.cxx
sw/source/filter/ww8/ww8par.cxx
+30
-10
ww8par.hxx
sw/source/filter/ww8/ww8par.hxx
+2
-1
No files found.
sw/source/filter/ww8/ww8par.cxx
Dosyayı görüntüle @
e51fbdff
...
@@ -2610,7 +2610,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
...
@@ -2610,7 +2610,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
sPlainCharsBuf
.
ReleaseBufferAccess
(
nEndUsed
);
sPlainCharsBuf
.
ReleaseBufferAccess
(
nEndUsed
);
AddTextToParagraph
(
sPlainCharsBuf
);
emulateMSWord
AddTextToParagraph
(
sPlainCharsBuf
);
rPos
+=
nL2
;
rPos
+=
nL2
;
if
(
!
maApos
.
back
())
//a para end in apo doesn't count
if
(
!
maApos
.
back
())
//a para end in apo doesn't count
bWasParaEnd
=
false
;
//kein CR
bWasParaEnd
=
false
;
//kein CR
...
@@ -2622,20 +2622,40 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
...
@@ -2622,20 +2622,40 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
return
nL2
>=
nLen
;
return
nL2
>=
nLen
;
}
}
bool
SwWW8ImplReader
::
AddTextToParagraph
(
const
String
&
rAddString
)
//TODO: In writer we categorize text into CJK, CTL and "Western" for everything
//else. Microsoft Word basically categorizes text into East Asian, Non-East
//Asian and ASCII, with some shared characters and some properties to
//to hint as to which way to bias those shared characters.
//
//Here we must find out "what would word do" to see what font/language
//word would assign to characters based on the unicode range they fall
//into, taking into account the idctHint property if it exists.
//
//Where this differs from the default category that writer would assign it to
//we're then forced (because we don't have an equivalent hint) to mirror the
//properties of the source MSWord category into the properties of the dest
//Writer category for that range of text in order to get the right results.
bool
SwWW8ImplReader
::
emulateMSWordAddTextToParagraph
(
const
String
&
rAddString
)
{
return
simpleAddTextToParagraph
(
rAddString
);
}
bool
SwWW8ImplReader
::
simpleAddTextToParagraph
(
const
String
&
rAddString
)
{
{
const
SwTxtNode
*
pNd
=
pPaM
->
GetCntntNode
()
->
GetTxtNode
();
const
SwTxtNode
*
pNd
=
pPaM
->
GetCntntNode
()
->
GetTxtNode
();
if
(
rAddString
.
Len
())
if
(
rAddString
.
Len
())
{
{
/*
#ifdef DEBUG
#ifdef DEBUG
//!! does not compile with debug=t -> unresolved external (dbg_out),
{
//!! sommeone who knows what he wants to get should fix this
rtl
::
OString
sText
(
rtl
::
OUStringToOString
(
rAddString
,
RTL_TEXTENCODING_UTF8
));
// ::std::clog << "<addTextToParagraph>" << dbg_out(rAddString)
::
std
::
clog
<<
// << "</addTextToParagraph>" << ::std::endl;
"<addTextToParagraph>"
<<
sText
.
getStr
()
<<
"</addTextToParagraph>"
<<
::
std
::
endl
;
}
#endif
#endif
*/
if
((
pNd
->
GetTxt
().
Len
()
+
rAddString
.
Len
())
<
STRING_MAXLEN
-
1
)
if
((
pNd
->
GetTxt
().
Len
()
+
rAddString
.
Len
())
<
STRING_MAXLEN
-
1
)
{
{
rDoc
.
InsertString
(
*
pPaM
,
rAddString
);
rDoc
.
InsertString
(
*
pPaM
,
rAddString
);
}
}
...
@@ -2913,7 +2933,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
...
@@ -2913,7 +2933,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
{
{
String
sInsert
=
ByteString
::
ConvertToUnicode
(
cInsert
,
String
sInsert
=
ByteString
::
ConvertToUnicode
(
cInsert
,
RTL_TEXTENCODING_MS_1252
);
RTL_TEXTENCODING_MS_1252
);
AddTextToParagraph
(
sInsert
);
emulateMSWord
AddTextToParagraph
(
sInsert
);
}
}
if
(
!
maApos
.
back
())
//a para end in apo doesn't count
if
(
!
maApos
.
back
())
//a para end in apo doesn't count
bWasParaEnd
=
bNewParaEnd
;
bWasParaEnd
=
bNewParaEnd
;
...
...
sw/source/filter/ww8/ww8par.hxx
Dosyayı görüntüle @
e51fbdff
...
@@ -1117,7 +1117,8 @@ private:
...
@@ -1117,7 +1117,8 @@ private:
pReffingStck
=
0
;
pReffingStck
=
0
;
}
}
void
DeleteAnchorStk
()
{
DeleteStk
(
pAnchorStck
);
pAnchorStck
=
0
;
}
void
DeleteAnchorStk
()
{
DeleteStk
(
pAnchorStck
);
pAnchorStck
=
0
;
}
bool
AddTextToParagraph
(
const
String
&
sAddString
);
bool
emulateMSWordAddTextToParagraph
(
const
String
&
sAddString
);
bool
simpleAddTextToParagraph
(
const
String
&
sAddString
);
bool
HandlePageBreakChar
();
bool
HandlePageBreakChar
();
bool
ReadChar
(
long
nPosCp
,
long
nCpOfs
);
bool
ReadChar
(
long
nPosCp
,
long
nCpOfs
);
bool
ReadPlainChars
(
WW8_CP
&
rPos
,
long
nEnd
,
long
nCpOfs
);
bool
ReadPlainChars
(
WW8_CP
&
rPos
,
long
nEnd
,
long
nCpOfs
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment