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
878c6f7c
Kaydet (Commit)
878c6f7c
authored
Şub 05, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#58076 import RTF_SHPLEFT/TOP of ESCHER_ShpInst_PictureFrame
Change-Id: Ia655743710778ea7d48a9b2221f22f55a4ccce32
üst
98146763
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
0 deletions
+49
-0
fdo58076-2.rtf
sw/qa/extras/rtfimport/data/fdo58076-2.rtf
+24
-0
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+10
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+15
-0
No files found.
sw/qa/extras/rtfimport/data/fdo58076-2.rtf
0 → 100644
Dosyayı görüntüle @
878c6f7c
{\rtf1
{\shp
{\*\shpinst\shpleft8345\shptop64\shpright9943\shpbottom1804
{\sp
{\sn shapeType}
{\sv 75}
}
{\sp
{\sn pib}
{\sv
{\pict\picscalex100\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0
\picw2815\pich3073\picwgoal1596\pichgoal1742\pngblip\bliptag-949277018
{\*\blipuid c76b2ea6c6392b9e41780fd0403d0bcd}
89504e470d0a1a0a0000000d4948445200000010000000100802000000909168360000015049444154789c9592c14a02511486bf99714ccb322d7521140541cb
6a11448b164150fb8a363d41f4083d40cba0655044d0a637a837682fd1a6a2488b10b23475bcb77b671c491dc1cee23077e67cf7fcff39139252f29f08b59e3e
1dae8b4c45998ff501a82e070f5cbd3366733acb5c6fa609fc0872651236df0deeca7d002a6cc33d1b941a146ab49ca937e37610e0c590c5c92b67f926a07243
b293613f8b1108a8a84aadb01575c9799edd0c895010a0ae71048e77b99b6a92e53861a387a48a6033c5d208c297a43ca8a3697601d217b010632dd9a9f34be0
9968021698bea4c76ab72f5dd0d6216c3211e1bec2a0c5e59bce9303baa770c7bd38aca7d729692bcd4d512b53bb3b7cc2f45dd604ab098e67b499366025ce5e
96a317fd2162e2d76bbbb725bdcd80b12a603aca4581e7aade97e14ec2916ca719ed96e4c54692f5241f755de7019641eacfaff10b469261dc6a800dd30000000049454e44ae426082}
}
}
}
}
}
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
878c6f7c
...
...
@@ -140,6 +140,7 @@ public:
void
testFdo48440
();
void
testFdo58646
();
void
testFdo59419
();
void
testFdo58076_2
();
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
...
...
@@ -251,6 +252,7 @@ void Test::run()
{
"fdo48440.rtf"
,
&
Test
::
testFdo48440
},
{
"fdo58646.rtf"
,
&
Test
::
testFdo58646
},
{
"fdo59419.rtf"
,
&
Test
::
testFdo59419
},
{
"fdo58076-2.rtf"
,
&
Test
::
testFdo58076_2
},
};
header
();
for
(
unsigned
int
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aMethods
);
++
i
)
...
...
@@ -1088,6 +1090,14 @@ void Test::testFdo59419()
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
1
),
xTables
->
getCount
());
}
void
Test
::
testFdo58076_2
()
{
// Position of the picture wasn't correct.
uno
::
Reference
<
drawing
::
XDrawPageSupplier
>
xDrawPageSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xDraws
(
xDrawPageSupplier
->
getDrawPage
(),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
TWIP_TO_MM100
(
8345
)),
getProperty
<
sal_Int32
>
(
xDraws
->
getByIndex
(
0
),
"HoriOrientPosition"
));
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
878c6f7c
...
...
@@ -64,6 +64,7 @@
#include <ooxml/OOXMLFastTokens.hxx> // ooxml namespace
#include <oox/token/namespaces.hxx> // oox namespace
#include <oox/token/tokens.hxx>
#include <dmapper/GraphicHelpers.hxx>
#include <rtfsdrimport.hxx>
#include <rtftokenizer.hxx>
...
...
@@ -73,6 +74,7 @@
#include <rtffly.hxx>
#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
#define MM100_TO_EMU(MM100) (MM100 * 360)
#define M_TOKEN(token) OOX_TOKEN(officeMath, token)
#define OPEN_M_TOKEN( rtftok, ooxtok ) \
case RTF_M##rtftok: \
...
...
@@ -808,6 +810,19 @@ int RTFDocumentImpl::resolvePict(bool bInline)
aAnchorSprms
.
set
(
NS_ooxml
::
LN_CT_Anchor_extent
,
pExtentValue
);
if
(
aAnchorWrapAttributes
.
size
())
aAnchorSprms
.
set
(
NS_ooxml
::
LN_EG_WrapType_wrapSquare
,
pAnchorWrapValue
);
// See OOXMLFastContextHandler::positionOffset(), we can't just put values in an RTFValue.
if
(
m_aStates
.
top
().
aShape
.
nLeft
>
0
)
{
writerfilter
::
dmapper
::
PositionHandler
::
setPositionOffset
(
OUString
::
number
(
MM100_TO_EMU
(
m_aStates
.
top
().
aShape
.
nLeft
)),
false
);
aAnchorSprms
.
set
(
NS_ooxml
::
LN_CT_Anchor_positionH
,
RTFValue
::
Pointer_t
(
new
RTFValue
(
RTFSprms
())));
}
if
(
m_aStates
.
top
().
aShape
.
nTop
>
0
)
{
writerfilter
::
dmapper
::
PositionHandler
::
setPositionOffset
(
OUString
::
number
(
MM100_TO_EMU
(
m_aStates
.
top
().
aShape
.
nTop
)),
true
);
aAnchorSprms
.
set
(
NS_ooxml
::
LN_CT_Anchor_positionV
,
RTFValue
::
Pointer_t
(
new
RTFValue
(
RTFSprms
())));
}
aAnchorSprms
.
set
(
NS_ooxml
::
LN_CT_Anchor_docPr
,
pDocprValue
);
aAnchorSprms
.
set
(
NS_ooxml
::
LN_graphic_graphic
,
pGraphicValue
);
// anchor sprm
...
...
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