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
1bdc4768
Kaydet (Commit)
1bdc4768
authored
Nis 10, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix new-style RTF frame default internal margin values
Change-Id: I1a4819905f0fc2e8dbbcf7d9570785ad4384dc39
üst
55131d40
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+1
-1
rtfsdrimport.cxx
writerfilter/source/rtftok/rtfsdrimport.cxx
+10
-8
rtfsdrimport.hxx
writerfilter/source/rtftok/rtfsdrimport.hxx
+6
-2
No files found.
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
1bdc4768
...
@@ -2561,7 +2561,7 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
...
@@ -2561,7 +2561,7 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
case
RTF_DPTXBX
:
case
RTF_DPTXBX
:
{
{
m_aStates
.
top
().
aDrawingObject
.
xShape
.
set
(
getModelFactory
()
->
createInstance
(
"com.sun.star.text.TextFrame"
),
uno
::
UNO_QUERY
);
m_aStates
.
top
().
aDrawingObject
.
xShape
.
set
(
getModelFactory
()
->
createInstance
(
"com.sun.star.text.TextFrame"
),
uno
::
UNO_QUERY
);
std
::
vector
<
beans
::
PropertyValue
>
aDefaults
=
m_pSdrImport
->
getTextFrameDefaults
();
std
::
vector
<
beans
::
PropertyValue
>
aDefaults
=
m_pSdrImport
->
getTextFrameDefaults
(
false
);
for
(
size_t
i
=
0
;
i
<
aDefaults
.
size
();
++
i
)
for
(
size_t
i
=
0
;
i
<
aDefaults
.
size
();
++
i
)
m_aStates
.
top
().
aDrawingObject
.
aPendingProperties
.
push_back
(
aDefaults
[
i
]);
m_aStates
.
top
().
aDrawingObject
.
aPendingProperties
.
push_back
(
aDefaults
[
i
]);
}
}
...
...
writerfilter/source/rtftok/rtfsdrimport.cxx
Dosyayı görüntüle @
1bdc4768
...
@@ -75,7 +75,7 @@ void RTFSdrImport::createShape(OUString aStr, uno::Reference<drawing::XShape>& x
...
@@ -75,7 +75,7 @@ void RTFSdrImport::createShape(OUString aStr, uno::Reference<drawing::XShape>& x
xPropertySet
.
set
(
xShape
,
uno
::
UNO_QUERY
);
xPropertySet
.
set
(
xShape
,
uno
::
UNO_QUERY
);
}
}
std
::
vector
<
beans
::
PropertyValue
>
RTFSdrImport
::
getTextFrameDefaults
()
std
::
vector
<
beans
::
PropertyValue
>
RTFSdrImport
::
getTextFrameDefaults
(
bool
bNew
)
{
{
std
::
vector
<
beans
::
PropertyValue
>
aRet
;
std
::
vector
<
beans
::
PropertyValue
>
aRet
;
beans
::
PropertyValue
aPropertyValue
;
beans
::
PropertyValue
aPropertyValue
;
...
@@ -86,20 +86,24 @@ std::vector<beans::PropertyValue> RTFSdrImport::getTextFrameDefaults()
...
@@ -86,20 +86,24 @@ std::vector<beans::PropertyValue> RTFSdrImport::getTextFrameDefaults()
aPropertyValue
.
Name
=
"VertOrient"
;
aPropertyValue
.
Name
=
"VertOrient"
;
aPropertyValue
.
Value
<<=
text
::
VertOrientation
::
NONE
;
aPropertyValue
.
Value
<<=
text
::
VertOrientation
::
NONE
;
aRet
.
push_back
(
aPropertyValue
);
aRet
.
push_back
(
aPropertyValue
);
if
(
!
bNew
)
{
aPropertyValue
.
Name
=
"BackColorTransparency"
;
aPropertyValue
.
Name
=
"BackColorTransparency"
;
aPropertyValue
.
Value
<<=
sal_Int32
(
100
);
aPropertyValue
.
Value
<<=
sal_Int32
(
100
);
aRet
.
push_back
(
aPropertyValue
);
aRet
.
push_back
(
aPropertyValue
);
}
// See the spec, new-style frame default margins are specified in EMUs.
aPropertyValue
.
Name
=
"LeftBorderDistance"
;
aPropertyValue
.
Name
=
"LeftBorderDistance"
;
aPropertyValue
.
Value
<<=
sal_Int32
(
0
);
aPropertyValue
.
Value
<<=
sal_Int32
(
bNew
?
(
91440
/
360
)
:
0
);
aRet
.
push_back
(
aPropertyValue
);
aRet
.
push_back
(
aPropertyValue
);
aPropertyValue
.
Name
=
"RightBorderDistance"
;
aPropertyValue
.
Name
=
"RightBorderDistance"
;
aPropertyValue
.
Value
<<=
sal_Int32
(
0
);
aPropertyValue
.
Value
<<=
sal_Int32
(
bNew
?
(
91440
/
360
)
:
0
);
aRet
.
push_back
(
aPropertyValue
);
aRet
.
push_back
(
aPropertyValue
);
aPropertyValue
.
Name
=
"TopBorderDistance"
;
aPropertyValue
.
Name
=
"TopBorderDistance"
;
aPropertyValue
.
Value
<<=
sal_Int32
(
0
);
aPropertyValue
.
Value
<<=
sal_Int32
(
bNew
?
(
45720
/
360
)
:
0
);
aRet
.
push_back
(
aPropertyValue
);
aRet
.
push_back
(
aPropertyValue
);
aPropertyValue
.
Name
=
"BottomBorderDistance"
;
aPropertyValue
.
Name
=
"BottomBorderDistance"
;
aPropertyValue
.
Value
<<=
sal_Int32
(
0
);
aPropertyValue
.
Value
<<=
sal_Int32
(
bNew
?
(
45720
/
360
)
:
0
);
aRet
.
push_back
(
aPropertyValue
);
aRet
.
push_back
(
aPropertyValue
);
aPropertyValue
.
Name
=
"SizeType"
;
aPropertyValue
.
Name
=
"SizeType"
;
aPropertyValue
.
Value
<<=
text
::
SizeType
::
FIX
;
aPropertyValue
.
Value
<<=
text
::
SizeType
::
FIX
;
...
@@ -161,7 +165,7 @@ void RTFSdrImport::resolve(RTFShape& rShape)
...
@@ -161,7 +165,7 @@ void RTFSdrImport::resolve(RTFShape& rShape)
{
{
createShape
(
"com.sun.star.text.TextFrame"
,
xShape
,
xPropertySet
);
createShape
(
"com.sun.star.text.TextFrame"
,
xShape
,
xPropertySet
);
bTextFrame
=
true
;
bTextFrame
=
true
;
std
::
vector
<
beans
::
PropertyValue
>
aDefaults
=
getTextFrameDefaults
();
std
::
vector
<
beans
::
PropertyValue
>
aDefaults
=
getTextFrameDefaults
(
true
);
for
(
size_t
j
=
0
;
j
<
aDefaults
.
size
();
++
j
)
for
(
size_t
j
=
0
;
j
<
aDefaults
.
size
();
++
j
)
xPropertySet
->
setPropertyValue
(
aDefaults
[
j
].
Name
,
aDefaults
[
j
].
Value
);
xPropertySet
->
setPropertyValue
(
aDefaults
[
j
].
Name
,
aDefaults
[
j
].
Value
);
}
}
...
@@ -205,8 +209,6 @@ void RTFSdrImport::resolve(RTFShape& rShape)
...
@@ -205,8 +209,6 @@ void RTFSdrImport::resolve(RTFShape& rShape)
// fillType will decide, possible it'll be the start color of a gradient.
// fillType will decide, possible it'll be the start color of a gradient.
aFillModel
.
moColor
.
set
(
OUString
(
"#"
)
+
OStringToOUString
(
msfilter
::
util
::
ConvertColor
(
aAny
.
get
<
sal_Int32
>
()),
RTL_TEXTENCODING_UTF8
));
aFillModel
.
moColor
.
set
(
OUString
(
"#"
)
+
OStringToOUString
(
msfilter
::
util
::
ConvertColor
(
aAny
.
get
<
sal_Int32
>
()),
RTL_TEXTENCODING_UTF8
));
xPropertySet
->
setPropertyValue
(
"BackColorTransparency"
,
uno
::
makeAny
(
sal_Int32
(
0
)));
}
}
else
if
(
i
->
first
==
"fillBackColor"
)
else
if
(
i
->
first
==
"fillBackColor"
)
// fillType will decide, possible it'll be the end color of a gradient.
// fillType will decide, possible it'll be the end color of a gradient.
...
...
writerfilter/source/rtftok/rtfsdrimport.hxx
Dosyayı görüntüle @
1bdc4768
...
@@ -43,8 +43,12 @@ namespace writerfilter {
...
@@ -43,8 +43,12 @@ namespace writerfilter {
void
resolve
(
RTFShape
&
rShape
);
void
resolve
(
RTFShape
&
rShape
);
void
resolveDhgt
(
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
,
sal_Int32
nZOrder
);
void
resolveDhgt
(
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
,
sal_Int32
nZOrder
);
void
resolveFLine
(
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
,
sal_Int32
nFLine
);
void
resolveFLine
(
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
,
sal_Int32
nFLine
);
/// These are the default in Word, but not in Writer.
/**
std
::
vector
<
beans
::
PropertyValue
>
getTextFrameDefaults
();
* These are the default in Word, but not in Writer.
*
* @param bNew if the frame is new-style or old-style.
*/
std
::
vector
<
beans
::
PropertyValue
>
getTextFrameDefaults
(
bool
bNew
);
private
:
private
:
void
createShape
(
OUString
aService
,
uno
::
Reference
<
drawing
::
XShape
>&
xShape
,
uno
::
Reference
<
beans
::
XPropertySet
>&
xPropertySet
);
void
createShape
(
OUString
aService
,
uno
::
Reference
<
drawing
::
XShape
>&
xShape
,
uno
::
Reference
<
beans
::
XPropertySet
>&
xPropertySet
);
...
...
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