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
68a5ae93
Kaydet (Commit)
68a5ae93
authored
Ara 22, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Factor out SwFmtAnchor::dumpAsXml() from nodedump
Change-Id: I080fd80cf0a2fd0531edcb21f189aaf4fd922ecc
üst
cc15d898
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
30 deletions
+29
-30
fmtanchr.hxx
sw/inc/fmtanchr.hxx
+2
-0
nodedump.cxx
sw/source/core/docnode/nodedump.cxx
+3
-30
atrfrm.cxx
sw/source/core/layout/atrfrm.cxx
+24
-0
No files found.
sw/inc/fmtanchr.hxx
Dosyayı görüntüle @
68a5ae93
...
...
@@ -71,6 +71,8 @@ public:
void
SetType
(
RndStdIds
nRndId
)
{
nAnchorId
=
nRndId
;
}
void
SetPageNum
(
sal_uInt16
nNew
)
{
nPageNum
=
nNew
;
}
void
SetAnchor
(
const
SwPosition
*
pPos
);
void
dumpAsXml
(
struct
_xmlTextWriter
*
pWriter
)
const
;
};
inline
const
SwFmtAnchor
&
SwAttrSet
::
GetAnchor
(
bool
bInP
)
const
...
...
sw/source/core/docnode/nodedump.cxx
Dosyayı görüntüle @
68a5ae93
...
...
@@ -435,6 +435,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
case
RES_HORI_ORIENT
:
static_cast
<
const
SwFmtHoriOrient
*>
(
pItem
)
->
dumpAsXml
(
writer
);
break
;
case
RES_ANCHOR
:
static_cast
<
const
SwFmtAnchor
*>
(
pItem
)
->
dumpAsXml
(
writer
);
break
;
default
:
bDone
=
false
;
break
;
}
if
(
bDone
)
...
...
@@ -449,36 +452,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
boost
::
optional
<
OString
>
oValue
;
switch
(
pItem
->
Which
())
{
case
RES_ANCHOR
:
{
pWhich
=
"frame anchor"
;
const
SwFmtAnchor
*
pAnchor
=
static_cast
<
const
SwFmtAnchor
*>
(
pItem
);
switch
(
pAnchor
->
GetAnchorId
())
{
case
FLY_AT_PARA
:
oValue
=
"anchor type: at-para"
;
break
;
case
FLY_AS_CHAR
:
oValue
=
"anchor type: as-char"
;
break
;
case
FLY_AT_PAGE
:
oValue
=
"anchor type: at-page"
;
break
;
case
FLY_AT_FLY
:
oValue
=
"anchor type: at-fly"
;
break
;
case
FLY_AT_CHAR
:
oValue
=
"anchor type: at-char"
;
break
;
default
:
oValue
=
"anchor type: "
+
OString
::
number
(
pAnchor
->
GetAnchorId
());
break
;
}
const
SwPosition
*
pPosition
=
pAnchor
->
GetCntntAnchor
();
if
(
pPosition
)
oValue
=
*
oValue
+
", node index: "
+
OString
::
number
(
pPosition
->
nNode
.
GetNode
().
GetIndex
())
+
", index: "
+
OString
::
number
(
pPosition
->
nContent
.
GetIndex
());
break
;
}
case
RES_SURROUND
:
{
pWhich
=
"frame surround"
;
...
...
sw/source/core/layout/atrfrm.cxx
Dosyayı görüntüle @
68a5ae93
...
...
@@ -1666,6 +1666,30 @@ bool SwFmtAnchor::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
return
bRet
;
}
void
SwFmtAnchor
::
dumpAsXml
(
xmlTextWriterPtr
pWriter
)
const
{
xmlTextWriterStartElement
(
pWriter
,
BAD_CAST
(
"swFmtAnchor"
));
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"whichId"
),
BAD_CAST
(
OString
::
number
(
Which
()).
getStr
()));
if
(
m_pCntntAnchor
)
{
std
::
stringstream
aCntntAnchor
;
aCntntAnchor
<<
*
m_pCntntAnchor
;
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"pCntntAnchor"
),
BAD_CAST
(
aCntntAnchor
.
str
().
c_str
()));
}
else
xmlTextWriterWriteFormatAttribute
(
pWriter
,
BAD_CAST
(
"pCntntAnchor"
),
"%p"
,
m_pCntntAnchor
.
get
());
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"nAnchorType"
),
BAD_CAST
(
OString
::
number
(
nAnchorId
).
getStr
()));
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"nPageNum"
),
BAD_CAST
(
OString
::
number
(
nPageNum
).
getStr
()));
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"nOrder"
),
BAD_CAST
(
OString
::
number
(
mnOrder
).
getStr
()));
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"nOrderCounter"
),
BAD_CAST
(
OString
::
number
(
mnOrderCounter
).
getStr
()));
OUString
aPresentation
;
GetPresentation
(
SFX_ITEM_PRESENTATION_NAMELESS
,
SFX_MAPUNIT_100TH_MM
,
SFX_MAPUNIT_100TH_MM
,
aPresentation
);
xmlTextWriterWriteAttribute
(
pWriter
,
BAD_CAST
(
"presentation"
),
BAD_CAST
(
aPresentation
.
toUtf8
().
getStr
()));
xmlTextWriterEndElement
(
pWriter
);
}
// Partially implemented inline in hxx
SwFmtURL
::
SwFmtURL
()
:
SfxPoolItem
(
RES_URL
),
...
...
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