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
f3bf0319
Kaydet (Commit)
f3bf0319
authored
Nis 30, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
RtfSdrExport: no need to allocate m_pShapeStyle dynamically
Change-Id: I429c876c4e0bba04e39c806670a828178ca811ef
üst
7082fcb4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
rtfsdrexport.cxx
sw/source/filter/ww8/rtfsdrexport.cxx
+11
-12
rtfsdrexport.hxx
sw/source/filter/ww8/rtfsdrexport.hxx
+1
-1
No files found.
sw/source/filter/ww8/rtfsdrexport.cxx
Dosyayı görüntüle @
f3bf0319
...
@@ -38,7 +38,7 @@ RtfSdrExport::RtfSdrExport(RtfExport& rExport)
...
@@ -38,7 +38,7 @@ RtfSdrExport::RtfSdrExport(RtfExport& rExport)
m_pSdrObject
(
NULL
),
m_pSdrObject
(
NULL
),
m_nShapeType
(
ESCHER_ShpInst_Nil
),
m_nShapeType
(
ESCHER_ShpInst_Nil
),
m_nShapeFlags
(
0
)
,
m_nShapeFlags
(
0
)
,
m_
pShapeStyle
(
new
OStringBuffer
(
200
)
),
m_
aShapeStyle
(
200
),
m_pShapeTypeWritten
(
new
bool
[
ESCHER_ShpInst_COUNT
]),
m_pShapeTypeWritten
(
new
bool
[
ESCHER_ShpInst_COUNT
]),
m_aTextBoxes
(
SwTextBoxHelper
::
findTextBoxes
(
m_rExport
.
pDoc
))
m_aTextBoxes
(
SwTextBoxHelper
::
findTextBoxes
(
m_rExport
.
pDoc
))
{
{
...
@@ -49,7 +49,6 @@ RtfSdrExport::RtfSdrExport(RtfExport& rExport)
...
@@ -49,7 +49,6 @@ RtfSdrExport::RtfSdrExport(RtfExport& rExport)
RtfSdrExport
::~
RtfSdrExport
()
RtfSdrExport
::~
RtfSdrExport
()
{
{
delete
mpOutStrm
,
mpOutStrm
=
NULL
;
delete
mpOutStrm
,
mpOutStrm
=
NULL
;
delete
m_pShapeStyle
,
m_pShapeStyle
=
NULL
;
delete
[]
m_pShapeTypeWritten
,
m_pShapeTypeWritten
=
NULL
;
delete
[]
m_pShapeTypeWritten
,
m_pShapeTypeWritten
=
NULL
;
}
}
...
@@ -60,9 +59,9 @@ void RtfSdrExport::OpenContainer(sal_uInt16 nEscherContainer, int nRecInstance)
...
@@ -60,9 +59,9 @@ void RtfSdrExport::OpenContainer(sal_uInt16 nEscherContainer, int nRecInstance)
if
(
nEscherContainer
==
ESCHER_SpContainer
)
if
(
nEscherContainer
==
ESCHER_SpContainer
)
{
{
m_nShapeType
=
ESCHER_ShpInst_Nil
;
m_nShapeType
=
ESCHER_ShpInst_Nil
;
if
(
!
m_
pShapeStyle
->
isEmpty
())
if
(
!
m_
aShapeStyle
.
isEmpty
())
m_
pShapeStyle
->
makeStringAndClear
();
m_
aShapeStyle
.
makeStringAndClear
();
m_
pShapeStyle
->
ensureCapacity
(
200
);
m_
aShapeStyle
.
ensureCapacity
(
200
);
m_aShapeProps
.
clear
();
m_aShapeProps
.
clear
();
}
}
}
}
...
@@ -138,7 +137,7 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const Rectangle& rRec
...
@@ -138,7 +137,7 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const Rectangle& rRec
if
(
m_nShapeType
==
ESCHER_ShpInst_Line
)
if
(
m_nShapeType
==
ESCHER_ShpInst_Line
)
AddLineDimensions
(
rRect
);
AddLineDimensions
(
rRect
);
else
else
AddRectangleDimensions
(
*
m_p
ShapeStyle
,
rRect
);
AddRectangleDimensions
(
m_a
ShapeStyle
,
rRect
);
// properties
// properties
const
EscherProperties
&
rOpts
=
rProps
.
GetOpts
();
const
EscherProperties
&
rOpts
=
rProps
.
GetOpts
();
...
@@ -170,7 +169,7 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const Rectangle& rRec
...
@@ -170,7 +169,7 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const Rectangle& rRec
break
;
break
;
}
}
if
(
nWrapType
)
if
(
nWrapType
)
m_
pShapeStyle
->
append
(
OOO_STRING_SVTOOLS_RTF_SHPWR
).
append
((
sal_Int32
)
nWrapType
);
m_
aShapeStyle
.
append
(
OOO_STRING_SVTOOLS_RTF_SHPWR
).
append
((
sal_Int32
)
nWrapType
);
}
}
break
;
break
;
case
ESCHER_Prop_fillColor
:
case
ESCHER_Prop_fillColor
:
...
@@ -407,10 +406,10 @@ void RtfSdrExport::AddLineDimensions(const Rectangle& rRectangle)
...
@@ -407,10 +406,10 @@ void RtfSdrExport::AddLineDimensions(const Rectangle& rRectangle)
}
}
// the actual dimensions
// the actual dimensions
m_
pShapeStyle
->
append
(
OOO_STRING_SVTOOLS_RTF_SHPLEFT
).
append
(
rRectangle
.
Left
());
m_
aShapeStyle
.
append
(
OOO_STRING_SVTOOLS_RTF_SHPLEFT
).
append
(
rRectangle
.
Left
());
m_
pShapeStyle
->
append
(
OOO_STRING_SVTOOLS_RTF_SHPTOP
).
append
(
rRectangle
.
Top
());
m_
aShapeStyle
.
append
(
OOO_STRING_SVTOOLS_RTF_SHPTOP
).
append
(
rRectangle
.
Top
());
m_
pShapeStyle
->
append
(
OOO_STRING_SVTOOLS_RTF_SHPRIGHT
).
append
(
rRectangle
.
Right
());
m_
aShapeStyle
.
append
(
OOO_STRING_SVTOOLS_RTF_SHPRIGHT
).
append
(
rRectangle
.
Right
());
m_
pShapeStyle
->
append
(
OOO_STRING_SVTOOLS_RTF_SHPBOTTOM
).
append
(
rRectangle
.
Bottom
());
m_
aShapeStyle
.
append
(
OOO_STRING_SVTOOLS_RTF_SHPBOTTOM
).
append
(
rRectangle
.
Bottom
());
}
}
void
RtfSdrExport
::
AddRectangleDimensions
(
OStringBuffer
&
rBuffer
,
const
Rectangle
&
rRectangle
)
void
RtfSdrExport
::
AddRectangleDimensions
(
OStringBuffer
&
rBuffer
,
const
Rectangle
&
rRectangle
)
...
@@ -484,7 +483,7 @@ sal_Int32 RtfSdrExport::StartShape()
...
@@ -484,7 +483,7 @@ sal_Int32 RtfSdrExport::StartShape()
m_rAttrOutput
.
RunText
().
append
(
'{'
).
append
(
OOO_STRING_SVTOOLS_RTF_SHP
);
m_rAttrOutput
.
RunText
().
append
(
'{'
).
append
(
OOO_STRING_SVTOOLS_RTF_SHP
);
m_rAttrOutput
.
RunText
().
append
(
'{'
).
append
(
OOO_STRING_SVTOOLS_RTF_IGNORE
).
append
(
OOO_STRING_SVTOOLS_RTF_SHPINST
);
m_rAttrOutput
.
RunText
().
append
(
'{'
).
append
(
OOO_STRING_SVTOOLS_RTF_IGNORE
).
append
(
OOO_STRING_SVTOOLS_RTF_SHPINST
);
m_rAttrOutput
.
RunText
().
append
(
m_
pShapeStyle
->
makeStringAndClear
());
m_rAttrOutput
.
RunText
().
append
(
m_
aShapeStyle
.
makeStringAndClear
());
// Ignore \shpbxpage, \shpbxmargin, and \shpbxcolumn, in favor of the posrelh property.
// Ignore \shpbxpage, \shpbxmargin, and \shpbxcolumn, in favor of the posrelh property.
m_rAttrOutput
.
RunText
().
append
(
OOO_STRING_SVTOOLS_RTF_SHPBXIGNORE
);
m_rAttrOutput
.
RunText
().
append
(
OOO_STRING_SVTOOLS_RTF_SHPBXIGNORE
);
// Ignore \shpbypage, \shpbymargin, and \shpbycolumn, in favor of the posrelh property.
// Ignore \shpbypage, \shpbymargin, and \shpbycolumn, in favor of the posrelh property.
...
...
sw/source/filter/ww8/rtfsdrexport.hxx
Dosyayı görüntüle @
f3bf0319
...
@@ -47,7 +47,7 @@ class RtfSdrExport : public EscherEx
...
@@ -47,7 +47,7 @@ class RtfSdrExport : public EscherEx
sal_uInt32
m_nShapeFlags
;
sal_uInt32
m_nShapeFlags
;
/// Remember style, the most important shape attribute ;-)
/// Remember style, the most important shape attribute ;-)
OStringBuffer
*
m_p
ShapeStyle
;
OStringBuffer
m_a
ShapeStyle
;
std
::
map
<
OString
,
OString
>
m_aShapeProps
;
std
::
map
<
OString
,
OString
>
m_aShapeProps
;
...
...
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