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
0705b9f7
Kaydet (Commit)
0705b9f7
authored
Tem 27, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#48033 fix RTF import of pictures inside table cells
Change-Id: I2d9ef3b346d4b10b99b67d0934d63d59f6119f97
üst
d6c284e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
1 deletion
+55
-1
fdo48033.rtf
sw/qa/extras/rtfimport/data/fdo48033.rtf
+22
-0
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+26
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+7
-1
No files found.
sw/qa/extras/rtfimport/data/fdo48033.rtf
0 → 100644
Dosyayı görüntüle @
0705b9f7
{\rtf1
\ltrrow\trowd \cellx4819\cellx9746\pard\plain\intbl
{A1\cell }
{
{\*\shppict
{\pict
\picscalex80\picscaley80\piccropl0\piccropr0\piccropt0\piccropb0
\picw423\pich423\picwgoal240\pichgoal240\pngblip\bliptag-338523043
{\*\blipuid ebd28c5d3cbcfd4779e8e481da18cc69}
89504e470d0a1a0a0000000d4948445200000010000000100802000000909168360000015049444154789c9592c14a02511486bf99714ccb322d7521140541cb
6a11448b164150fb8a363d41f4083d40cba0655044d0a637a837682fd1a6a2488b10b23475bcb77b671c491dc1cee23077e67cf7fcff39139252f29f08b59e3e
1dae8b4c45998ff501a82e070f5cbd3366733acb5c6fa609fc0872651236df0deeca7d002a6cc33d1b941a146ab49ca937e37610e0c590c5c92b67f926a07243
b293613f8b1108a8a84aadb01575c9799edd0c895010a0ae71048e77b99b6a92e53861a387a48a6033c5d208c297a43ca8a3697601d217b010632dd9a9f34be0
9968021698bea4c76ab72f5dd0d6216c3211e1bec2a0c5e59bce9303baa770c7bd38aca7d729692bcd4d512b53bb3b7cc2f45dd604ab098e67b499366025ce5e
96a317fd2162e2d76bbbb725bdcd80b12a603aca4581e7aade97e14ec2916ca719ed96e4c54692f5241f755de7019641eacfaff10b469261dc6a800dd30000000049454e44ae426082}
}
}
{\cell }
{\row
}
\pard\par
}
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
0705b9f7
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
...
@@ -98,6 +99,7 @@ public:
...
@@ -98,6 +99,7 @@ public:
void
testFdo49659
();
void
testFdo49659
();
void
testFdo46966
();
void
testFdo46966
();
void
testFdo52066
();
void
testFdo52066
();
void
testFdo48033
();
CPPUNIT_TEST_SUITE
(
Test
);
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
#if !defined(MACOSX) && !defined(WNT)
...
@@ -139,6 +141,7 @@ public:
...
@@ -139,6 +141,7 @@ public:
CPPUNIT_TEST
(
testFdo49659
);
CPPUNIT_TEST
(
testFdo49659
);
CPPUNIT_TEST
(
testFdo46966
);
CPPUNIT_TEST
(
testFdo46966
);
CPPUNIT_TEST
(
testFdo52066
);
CPPUNIT_TEST
(
testFdo52066
);
CPPUNIT_TEST
(
testFdo48033
);
#endif
#endif
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
...
@@ -828,6 +831,29 @@ void Test::testFdo52066()
...
@@ -828,6 +831,29 @@ void Test::testFdo52066()
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
TWIP_TO_MM100
(
19
)),
xShape
->
getSize
().
Height
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
TWIP_TO_MM100
(
19
)),
xShape
->
getSize
().
Height
);
}
}
void
Test
::
testFdo48033
()
{
/*
* The problem was that the picture was in the first cell, instead of the second one.
*
* oTable = ThisComponent.TextTables(0)
* oParas = oTable.getCellByName("B1").Text.createEnumeration
* oPara = oParas.nextElement
* oRuns = oPara.createEnumeration
* oRun = oRuns.nextElement
* xray oRun.TextPortionType ' Frame, was Text
*/
load
(
"fdo48033.rtf"
);
uno
::
Reference
<
text
::
XTextTablesSupplier
>
xTextTablesSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xTables
(
xTextTablesSupplier
->
getTextTables
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XTextTable
>
xTable
(
xTables
->
getByIndex
(
0
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XTextRange
>
xCell
(
xTable
->
getCellByName
(
"B1"
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumerationAccess
>
xParaEnumAccess
(
xCell
->
getText
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumeration
>
xParaEnum
=
xParaEnumAccess
->
createEnumeration
();
uno
::
Reference
<
text
::
XTextRange
>
xPara
(
xParaEnum
->
nextElement
(),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Frame"
),
getProperty
<
OUString
>
(
getRun
(
xPara
,
1
),
"TextPortionType"
));
}
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 @
0705b9f7
...
@@ -759,7 +759,13 @@ int RTFDocumentImpl::resolvePict(bool bInline)
...
@@ -759,7 +759,13 @@ int RTFDocumentImpl::resolvePict(bool bInline)
}
}
writerfilter
::
Reference
<
Properties
>::
Pointer_t
const
pProperties
(
new
RTFReferenceProperties
(
aAttributes
,
aSprms
));
writerfilter
::
Reference
<
Properties
>::
Pointer_t
const
pProperties
(
new
RTFReferenceProperties
(
aAttributes
,
aSprms
));
checkFirstRun
();
checkFirstRun
();
Mapper
().
props
(
pProperties
);
if
(
!
m_pCurrentBuffer
)
Mapper
().
props
(
pProperties
);
else
{
RTFValue
::
Pointer_t
pValue
(
new
RTFValue
(
aAttributes
,
aSprms
));
m_pCurrentBuffer
->
push_back
(
make_pair
(
BUFFER_PROPS
,
pValue
));
}
return
0
;
return
0
;
}
}
...
...
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