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
3d4fef85
Kaydet (Commit)
3d4fef85
authored
Nis 18, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#63023 incorrect RTF background color in header
Change-Id: I33f5c8a856206860ac9cdb23dd6b5222cb785bf7
üst
85f88a20
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
6 deletions
+42
-6
swmodeltestbase.hxx
sw/qa/extras/inc/swmodeltestbase.hxx
+15
-3
fdo63023.rtf
sw/qa/extras/rtfimport/data/fdo63023.rtf
+10
-0
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+9
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+8
-3
No files found.
sw/qa/extras/inc/swmodeltestbase.hxx
Dosyayı görüntüle @
3d4fef85
...
@@ -198,10 +198,16 @@ protected:
...
@@ -198,10 +198,16 @@ protected:
}
}
// Get paragraph (counted from 1), optionally check it contains the given text.
// Get paragraph (counted from 1), optionally check it contains the given text.
uno
::
Reference
<
text
::
XTextContent
>
getParagraphOrTable
(
int
number
)
const
uno
::
Reference
<
text
::
XTextContent
>
getParagraphOrTable
(
int
number
,
uno
::
Reference
<
text
::
XText
>
xText
=
uno
::
Reference
<
text
::
XText
>
()
)
const
{
{
uno
::
Reference
<
text
::
XTextDocument
>
textDocument
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumerationAccess
>
paraEnumAccess
;
uno
::
Reference
<
container
::
XEnumerationAccess
>
paraEnumAccess
(
textDocument
->
getText
(),
uno
::
UNO_QUERY
);
if
(
xText
.
is
())
paraEnumAccess
.
set
(
xText
,
uno
::
UNO_QUERY
);
else
{
uno
::
Reference
<
text
::
XTextDocument
>
textDocument
(
mxComponent
,
uno
::
UNO_QUERY
);
paraEnumAccess
.
set
(
textDocument
->
getText
(),
uno
::
UNO_QUERY
);
}
uno
::
Reference
<
container
::
XEnumeration
>
paraEnum
=
paraEnumAccess
->
createEnumeration
();
uno
::
Reference
<
container
::
XEnumeration
>
paraEnum
=
paraEnumAccess
->
createEnumeration
();
for
(
int
i
=
1
;
for
(
int
i
=
1
;
i
<
number
;
i
<
number
;
...
@@ -221,6 +227,12 @@ protected:
...
@@ -221,6 +227,12 @@ protected:
return
xParagraph
;
return
xParagraph
;
}
}
uno
::
Reference
<
text
::
XTextRange
>
getParagraphOfText
(
int
number
,
uno
::
Reference
<
text
::
XText
>
xText
)
const
{
uno
::
Reference
<
text
::
XTextRange
>
const
xParagraph
(
getParagraphOrTable
(
number
,
xText
),
uno
::
UNO_QUERY_THROW
);
return
xParagraph
;
}
/// Get run (counted from 1) of a paragraph, optionally check it contains the given text.
/// Get run (counted from 1) of a paragraph, optionally check it contains the given text.
uno
::
Reference
<
text
::
XTextRange
>
getRun
(
uno
::
Reference
<
text
::
XTextRange
>
xParagraph
,
int
number
,
OUString
content
=
OUString
())
const
uno
::
Reference
<
text
::
XTextRange
>
getRun
(
uno
::
Reference
<
text
::
XTextRange
>
xParagraph
,
int
number
,
OUString
content
=
OUString
())
const
{
{
...
...
sw/qa/extras/rtfimport/data/fdo63023.rtf
0 → 100644
Dosyayı görüntüle @
3d4fef85
{\rtf1
{\colortbl;\red0\green0\blue0;\red0\green0\blue128;\red92\green133\blue38;\red153\green153\blue255;\red220\green35\blue0;\red255\green255\blue153;\red128\green128\blue128;}
{\header
{\cf4\chcbpat6
Yellow 2 Background with Violet Text}
\pard\par
}
body text
\pard\par
}
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
3d4fef85
...
@@ -151,6 +151,7 @@ public:
...
@@ -151,6 +151,7 @@ public:
void
testFdo37716
();
void
testFdo37716
();
void
testFdo51916
();
void
testFdo51916
();
void
testFdo61193
();
void
testFdo61193
();
void
testFdo63023
();
CPPUNIT_TEST_SUITE
(
Test
);
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
#if !defined(MACOSX) && !defined(WNT)
...
@@ -274,6 +275,7 @@ void Test::run()
...
@@ -274,6 +275,7 @@ void Test::run()
{
"fdo37716.rtf"
,
&
Test
::
testFdo37716
},
{
"fdo37716.rtf"
,
&
Test
::
testFdo37716
},
{
"fdo51916.rtf"
,
&
Test
::
testFdo51916
},
{
"fdo51916.rtf"
,
&
Test
::
testFdo51916
},
{
"hello.rtf"
,
&
Test
::
testFdo61193
},
{
"hello.rtf"
,
&
Test
::
testFdo61193
},
{
"fdo63023.rtf"
,
&
Test
::
testFdo63023
},
};
};
header
();
header
();
for
(
unsigned
int
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aMethods
);
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aMethods
);
++
i
)
...
@@ -1233,6 +1235,13 @@ void Test::testFdo51916()
...
@@ -1233,6 +1235,13 @@ void Test::testFdo51916()
// Complex nested table caused a crash.
// Complex nested table caused a crash.
}
}
void
Test
::
testFdo63023
()
{
uno
::
Reference
<
text
::
XText
>
xHeaderText
=
getProperty
<
uno
::
Reference
<
text
::
XText
>
>
(
getStyles
(
"PageStyles"
)
->
getByName
(
DEFAULT_STYLE
),
"HeaderText"
);
// Back color was black (0) in the header, due to missing color table in the substream.
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0xFFFF99
),
getProperty
<
sal_Int32
>
(
getRun
(
getParagraphOfText
(
1
,
xHeaderText
),
1
),
"CharBackColor"
));
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
3d4fef85
...
@@ -578,9 +578,14 @@ void RTFDocumentImpl::seek(sal_uInt32 nPos)
...
@@ -578,9 +578,14 @@ void RTFDocumentImpl::seek(sal_uInt32 nPos)
sal_uInt32
RTFDocumentImpl
::
getColorTable
(
sal_uInt32
nIndex
)
sal_uInt32
RTFDocumentImpl
::
getColorTable
(
sal_uInt32
nIndex
)
{
{
if
(
nIndex
<
m_aColorTable
.
size
())
if
(
!
m_pSuperstream
)
return
m_aColorTable
[
nIndex
];
{
return
0
;
if
(
nIndex
<
m_aColorTable
.
size
())
return
m_aColorTable
[
nIndex
];
return
0
;
}
else
return
m_pSuperstream
->
getColorTable
(
nIndex
);
}
}
rtl_TextEncoding
RTFDocumentImpl
::
getEncoding
(
sal_uInt32
nFontIndex
)
rtl_TextEncoding
RTFDocumentImpl
::
getEncoding
(
sal_uInt32
nFontIndex
)
...
...
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