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
0772e9af
Kaydet (Commit)
0772e9af
authored
Nis 13, 2011
tarafından
Cédric Bosdonnat
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
layout dumper: dump anchored objects too
üst
408f9e77
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
0 deletions
+49
-0
anchoreddrawobject.hxx
sw/inc/anchoreddrawobject.hxx
+4
-0
anchoredobject.hxx
sw/inc/anchoredobject.hxx
+10
-0
flyfrm.hxx
sw/source/core/inc/flyfrm.hxx
+2
-0
xmldump.cxx
sw/source/core/text/xmldump.cxx
+33
-0
No files found.
sw/inc/anchoreddrawobject.hxx
Dosyayı görüntüle @
0772e9af
...
@@ -193,6 +193,10 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
...
@@ -193,6 +193,10 @@ class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
// new Loop control
// new Loop control
void
ValidateThis
()
{
mbValidPos
=
true
;
}
void
ValidateThis
()
{
mbValidPos
=
true
;
}
/** The element name to show in the XML dump.
*/
virtual
const
char
*
getElementName
(
)
{
return
"SwAnchoredDrawObject"
;
}
};
};
#endif
#endif
...
...
sw/inc/anchoredobject.hxx
Dosyayı görüntüle @
0772e9af
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include <tools/rtti.hxx>
#include <tools/rtti.hxx>
#include <swtypes.hxx>
#include <swtypes.hxx>
#include <swrect.hxx>
#include <swrect.hxx>
#include <libxml/xmlwriter.h>
class
SdrObject
;
class
SdrObject
;
class
SwFrm
;
class
SwFrm
;
...
@@ -551,6 +552,15 @@ class SW_DLLPUBLIC SwAnchoredObject
...
@@ -551,6 +552,15 @@ class SW_DLLPUBLIC SwAnchoredObject
@return Point - determined relative position
@return Point - determined relative position
*/
*/
Point
GetRelPosToLine
()
const
;
Point
GetRelPosToLine
()
const
;
/** Dump a bunch of useful data to an XML representation to ease
layout understanding, debugging and testing.
*/
virtual
void
dumpAsXml
(
xmlTextWriterPtr
pWriter
);
/** The element name to show in the XML dump.
*/
virtual
const
char
*
getElementName
(
)
{
return
"SwAnchoredObject"
;
}
};
};
// ============================================================================
// ============================================================================
...
...
sw/source/core/inc/flyfrm.hxx
Dosyayı görüntüle @
0772e9af
...
@@ -282,6 +282,8 @@ public:
...
@@ -282,6 +282,8 @@ public:
// 'SwFlyFrmFmt *' after calls to this function. The casting is now done in this function.)
// 'SwFlyFrmFmt *' after calls to this function. The casting is now done in this function.)
virtual
const
SwFlyFrmFmt
*
GetFmt
()
const
;
virtual
const
SwFlyFrmFmt
*
GetFmt
()
const
;
virtual
SwFlyFrmFmt
*
GetFmt
();
virtual
SwFlyFrmFmt
*
GetFmt
();
virtual
void
dumpAsXml
(
xmlTextWriterPtr
writer
)
{
SwLayoutFrm
::
dumpAsXml
(
writer
);
};
};
};
#endif
#endif
...
...
sw/source/core/text/xmldump.cxx
Dosyayı görüntüle @
0772e9af
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
#include "porlin.hxx"
#include "porlin.hxx"
#include "porlay.hxx"
#include "porlay.hxx"
#include "portxt.hxx"
#include "portxt.hxx"
#include "sortedobjs.hxx"
#include <anchoredobject.hxx>
#include <libxml/xmlwriter.h>
#include <libxml/xmlwriter.h>
#include <SwPortionHandler.hxx>
#include <SwPortionHandler.hxx>
...
@@ -283,6 +285,22 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer )
...
@@ -283,6 +285,22 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer )
dumpAsXmlAttributes
(
writer
);
dumpAsXmlAttributes
(
writer
);
// Dump Anchored objects if any
SwSortedObjs
*
pAnchored
=
GetDrawObjs
();
if
(
pAnchored
&&
pAnchored
->
Count
(
)
>
0
)
{
xmlTextWriterStartElement
(
writer
,
BAD_CAST
(
"anchored"
)
);
for
(
sal_uInt32
i
=
0
,
len
=
pAnchored
->
Count
();
i
<
len
;
i
++
)
{
SwAnchoredObject
*
pObject
=
(
*
pAnchored
)[
i
];
pObject
->
dumpAsXml
(
writer
);
}
xmlTextWriterEndElement
(
writer
);
}
// Dump the children
if
(
IsTxtFrm
(
)
)
if
(
IsTxtFrm
(
)
)
{
{
SwTxtFrm
*
pTxtFrm
=
(
SwTxtFrm
*
)
this
;
SwTxtFrm
*
pTxtFrm
=
(
SwTxtFrm
*
)
this
;
...
@@ -328,6 +346,21 @@ void SwFrm::dumpChildrenAsXml( xmlTextWriterPtr writer )
...
@@ -328,6 +346,21 @@ void SwFrm::dumpChildrenAsXml( xmlTextWriterPtr writer )
}
}
}
}
void
SwAnchoredObject
::
dumpAsXml
(
xmlTextWriterPtr
writer
)
{
bool
bCreateWriter
=
(
NULL
==
writer
);
if
(
bCreateWriter
)
writer
=
lcl_createDefaultWriter
();
xmlTextWriterStartElement
(
writer
,
BAD_CAST
(
getElementName
()
)
);
xmlTextWriterWriteFormatAttribute
(
writer
,
BAD_CAST
(
"ptr"
),
"%p"
,
this
);
xmlTextWriterEndElement
(
writer
);
if
(
bCreateWriter
)
lcl_freeWriter
(
writer
);
}
void
SwTxtFrm
::
dumpAsXmlAttributes
(
xmlTextWriterPtr
writer
)
void
SwTxtFrm
::
dumpAsXmlAttributes
(
xmlTextWriterPtr
writer
)
{
{
SwFrm
::
dumpAsXmlAttributes
(
writer
);
SwFrm
::
dumpAsXmlAttributes
(
writer
);
...
...
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