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
dba637ad
Kaydet (Commit)
dba637ad
authored
Şub 21, 2015
tarafından
Zolnai Tamás
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Char highlight: DOC filters
Change-Id: Ia609425f6753796091d4dfdfae8e621c062e0c15
üst
caf653c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
10 deletions
+23
-10
globalfilter.cxx
sw/qa/extras/globalfilter/globalfilter.cxx
+9
-7
ww8atr.cxx
sw/source/filter/ww8/ww8atr.cxx
+11
-0
ww8attributeoutput.hxx
sw/source/filter/ww8/ww8attributeoutput.hxx
+1
-1
ww8par6.cxx
sw/source/filter/ww8/ww8par6.cxx
+2
-2
No files found.
sw/qa/extras/globalfilter/globalfilter.cxx
Dosyayı görüntüle @
dba637ad
...
@@ -360,7 +360,7 @@ void Test::testCharHighlight()
...
@@ -360,7 +360,7 @@ void Test::testCharHighlight()
const
char
*
aFilterNames
[]
=
{
const
char
*
aFilterNames
[]
=
{
// "writer8",
// "writer8",
"Rich Text Format"
,
"Rich Text Format"
,
//
"MS Word 97",
"MS Word 97"
,
"Office Open XML Text"
,
"Office Open XML Text"
,
};
};
...
@@ -371,6 +371,8 @@ void Test::testCharHighlight()
...
@@ -371,6 +371,8 @@ void Test::testCharHighlight()
mxComponent
=
loadFromDesktop
(
getURLFromSrc
(
"/sw/qa/extras/globalfilter/data/char_highlight.docx"
),
mxComponent
=
loadFromDesktop
(
getURLFromSrc
(
"/sw/qa/extras/globalfilter/data/char_highlight.docx"
),
"com.sun.star.text.TextDocument"
);
"com.sun.star.text.TextDocument"
);
const
OString
sFailedMessage
=
OString
(
"Failed on filter: "
)
+
aFilterNames
[
nFilter
];
// Export the document and import again for a check
// Export the document and import again for a check
uno
::
Reference
<
frame
::
XStorable
>
xStorable
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
frame
::
XStorable
>
xStorable
(
mxComponent
,
uno
::
UNO_QUERY
);
...
@@ -410,22 +412,22 @@ void Test::testCharHighlight()
...
@@ -410,22 +412,22 @@ void Test::testCharHighlight()
case
15
:
nHighlightColor
=
0x808080
;
break
;
//dark gray
case
15
:
nHighlightColor
=
0x808080
;
break
;
//dark gray
case
16
:
nHighlightColor
=
0xC0C0C0
;
break
;
//light gray
case
16
:
nHighlightColor
=
0xC0C0C0
;
break
;
//light gray
}
}
CPPUNIT_ASSERT_EQUAL
(
nHighlightColor
,
getProperty
<
sal_Int32
>
(
xRun
,
"CharHighlight"
));
CPPUNIT_ASSERT_EQUAL
_MESSAGE
(
sFailedMessage
.
getStr
(),
nHighlightColor
,
getProperty
<
sal_Int32
>
(
xRun
,
"CharHighlight"
));
CPPUNIT_ASSERT_EQUAL
(
nBackColor
,
getProperty
<
sal_Int32
>
(
xRun
,
"CharBackColor"
));
CPPUNIT_ASSERT_EQUAL
_MESSAGE
(
sFailedMessage
.
getStr
(),
nBackColor
,
getProperty
<
sal_Int32
>
(
xRun
,
"CharBackColor"
));
}
}
// Only highlight
// Only highlight
{
{
const
uno
::
Reference
<
beans
::
XPropertySet
>
xRun
(
getRun
(
xPara
,
17
),
uno
::
UNO_QUERY
);
const
uno
::
Reference
<
beans
::
XPropertySet
>
xRun
(
getRun
(
xPara
,
17
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0xC0C0C0
),
getProperty
<
sal_Int32
>
(
xRun
,
"CharHighlight"
));
CPPUNIT_ASSERT_EQUAL
_MESSAGE
(
sFailedMessage
.
getStr
(),
sal_Int32
(
0xC0C0C0
),
getProperty
<
sal_Int32
>
(
xRun
,
"CharHighlight"
));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
COL_TRANSPARENT
),
getProperty
<
sal_Int32
>
(
xRun
,
"CharBackColor"
));
CPPUNIT_ASSERT_EQUAL
_MESSAGE
(
sFailedMessage
.
getStr
(),
sal_Int32
(
COL_TRANSPARENT
),
getProperty
<
sal_Int32
>
(
xRun
,
"CharBackColor"
));
}
}
// Only background
// Only background
{
{
const
uno
::
Reference
<
beans
::
XPropertySet
>
xRun
(
getRun
(
xPara
,
18
),
uno
::
UNO_QUERY
);
const
uno
::
Reference
<
beans
::
XPropertySet
>
xRun
(
getRun
(
xPara
,
18
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
COL_TRANSPARENT
),
getProperty
<
sal_Int32
>
(
xRun
,
"CharHighlight"
));
CPPUNIT_ASSERT_EQUAL
_MESSAGE
(
sFailedMessage
.
getStr
(),
sal_Int32
(
COL_TRANSPARENT
),
getProperty
<
sal_Int32
>
(
xRun
,
"CharHighlight"
));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0x0000ff
),
getProperty
<
sal_Int32
>
(
xRun
,
"CharBackColor"
));
CPPUNIT_ASSERT_EQUAL
_MESSAGE
(
sFailedMessage
.
getStr
(),
sal_Int32
(
0x0000ff
),
getProperty
<
sal_Int32
>
(
xRun
,
"CharBackColor"
));
}
}
}
}
}
}
...
...
sw/source/filter/ww8/ww8atr.cxx
Dosyayı görüntüle @
dba637ad
...
@@ -1281,6 +1281,17 @@ void WW8AttributeOutput::CharBorder( const SvxBorderLine* pAllBorder, const sal_
...
@@ -1281,6 +1281,17 @@ void WW8AttributeOutput::CharBorder( const SvxBorderLine* pAllBorder, const sal_
m_rWW8Export
.
Out_BorderLine
(
*
m_rWW8Export
.
pO
,
pAllBorder
,
0
,
NS_sprm
::
LN_CBrc80
,
NS_sprm
::
LN_CBrc
,
bShadow
);
m_rWW8Export
.
Out_BorderLine
(
*
m_rWW8Export
.
pO
,
pAllBorder
,
0
,
NS_sprm
::
LN_CBrc80
,
NS_sprm
::
LN_CBrc
,
bShadow
);
}
}
void
WW8AttributeOutput
::
CharHighlight
(
const
SvxBrushItem
&
rBrush
)
{
if
(
m_rWW8Export
.
bWrtWW8
&&
rBrush
.
GetColor
()
!=
COL_TRANSPARENT
)
{
sal_uInt8
nColor
=
m_rWW8Export
.
TransCol
(
rBrush
.
GetColor
()
);
// sprmCHighlight
m_rWW8Export
.
InsUInt16
(
NS_sprm
::
LN_CHighlight
);
m_rWW8Export
.
pO
->
push_back
(
nColor
);
}
}
void
WW8AttributeOutput
::
CharUnderline
(
const
SvxUnderlineItem
&
rUnderline
)
void
WW8AttributeOutput
::
CharUnderline
(
const
SvxUnderlineItem
&
rUnderline
)
{
{
if
(
m_rWW8Export
.
bWrtWW8
)
if
(
m_rWW8Export
.
bWrtWW8
)
...
...
sw/source/filter/ww8/ww8attributeoutput.hxx
Dosyayı görüntüle @
dba637ad
...
@@ -309,7 +309,7 @@ protected:
...
@@ -309,7 +309,7 @@ protected:
virtual
void
CharBorder
(
const
::
editeng
::
SvxBorderLine
*
pAllBorder
,
const
sal_uInt16
nDist
,
const
bool
bShadow
)
SAL_OVERRIDE
;
virtual
void
CharBorder
(
const
::
editeng
::
SvxBorderLine
*
pAllBorder
,
const
sal_uInt16
nDist
,
const
bool
bShadow
)
SAL_OVERRIDE
;
/// Sfx item RES_CHRATR_HIGHLIGHT
/// Sfx item RES_CHRATR_HIGHLIGHT
virtual
void
CharHighlight
(
const
SvxBrushItem
&
)
SAL_OVERRIDE
{}
;
virtual
void
CharHighlight
(
const
SvxBrushItem
&
)
SAL_OVERRIDE
;
/// Sfx item RES_TXTATR_INETFMT
/// Sfx item RES_TXTATR_INETFMT
virtual
void
TextINetFormat
(
const
SwFmtINetFmt
&
)
SAL_OVERRIDE
;
virtual
void
TextINetFormat
(
const
SwFmtINetFmt
&
)
SAL_OVERRIDE
;
...
...
sw/source/filter/ww8/ww8par6.cxx
Dosyayı görüntüle @
dba637ad
...
@@ -3822,7 +3822,7 @@ void SwWW8ImplReader::Read_CharHighlight(sal_uInt16, const sal_uInt8* pData, sho
...
@@ -3822,7 +3822,7 @@ void SwWW8ImplReader::Read_CharHighlight(sal_uInt16, const sal_uInt8* pData, sho
{
{
if
(
nLen
<=
0
)
if
(
nLen
<=
0
)
{
{
pCtrlStck
->
SetAttr
(
*
pPaM
->
GetPoint
(),
RES_CHRATR_
BACKGROUND
);
pCtrlStck
->
SetAttr
(
*
pPaM
->
GetPoint
(),
RES_CHRATR_
HIGHLIGHT
);
}
}
else
else
{
{
...
@@ -3832,7 +3832,7 @@ void SwWW8ImplReader::Read_CharHighlight(sal_uInt16, const sal_uInt8* pData, sho
...
@@ -3832,7 +3832,7 @@ void SwWW8ImplReader::Read_CharHighlight(sal_uInt16, const sal_uInt8* pData, sho
b
=
0
;
// Auto -> Black
b
=
0
;
// Auto -> Black
Color
aCol
(
GetCol
(
b
));
Color
aCol
(
GetCol
(
b
));
NewAttr
(
SvxBrushItem
(
aCol
,
RES_CHRATR_
BACKGROUND
));
NewAttr
(
SvxBrushItem
(
aCol
,
RES_CHRATR_
HIGHLIGHT
));
}
}
}
}
...
...
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