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
7192f0dd
Kaydet (Commit)
7192f0dd
authored
Eki 02, 2012
tarafından
Fridrich Štrba
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean the path pushed to the API as much as possible
Change-Id: I5e68bc5aedc4c6e350e62b30472a1b3f0803c520
üst
c2eb9698
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
125 additions
and
0 deletions
+125
-0
UnpackedTarball_visio.mk
libvisio/UnpackedTarball_visio.mk
+9
-0
libvisio-0.0.19.patch
libvisio/libvisio-0.0.19.patch
+116
-0
No files found.
libvisio/UnpackedTarball_visio.mk
Dosyayı görüntüle @
7192f0dd
...
...
@@ -11,4 +11,13 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,visio))
$(eval $(call gb_UnpackedTarball_set_tarball,visio,$(VISIO_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,visio,0))
visio_patches :=
# Somehow draw is very picky about what is a closed path
visio_patches += libvisio-0.0.19.patch
$(eval $(call gb_UnpackedTarball_add_patches,visio,\
$(foreach patch,$(visio_patches),libvisio/$(patch)) \
))
# vim: set noet sw=4 ts=4:
libvisio/libvisio-0.0.19.patch
0 → 100644
Dosyayı görüntüle @
7192f0dd
--- src/lib/VSDXContentCollector.cpp
+++ src/lib/VSDXContentCollector.cpp
@@ -676,7 +676,6 @@ double libvisio::VSDXContentCollector::_linePropertiesMarkerScale(unsigned marke
void libvisio::VSDXContentCollector::_flushCurrentPath()
{
- WPXPropertyListVector path;
WPXPropertyList fillPathProps(m_styleProps);
fillPathProps.insert("draw:stroke", "none");
WPXPropertyList linePathProps(m_styleProps);
@@ -695,6 +694,7 @@ void libvisio::VSDXContentCollector::_flushCurrentPath()
if (needsGroup)
m_shapeOutputDrawing->addStartLayer(WPXPropertyList());
+ std::vector<WPXPropertyList> tmpPath;
if (m_styleProps["draw:fill"] && m_styleProps["draw:fill"]->getStr() != "none")
{
bool firstPoint = true;
@@ -708,39 +708,84 @@ void libvisio::VSDXContentCollector::_flushCurrentPath()
}
else if (m_currentFillGeometry[i]["libwpg:path-action"]->getStr() == "M")
{
- if (path.count() && !wasMove)
+ if (!tmpPath.empty())
{
- WPXPropertyList closedPath;
- closedPath.insert("libwpg:path-action", "Z");
- path.append(closedPath);
+ if (!wasMove)
+ {
+ WPXPropertyList closedPath;
+ closedPath.insert("libwpg:path-action", "Z");
+ tmpPath.push_back(closedPath);
+ }
+ else
+ {
+ tmpPath.pop_back();
+ }
}
wasMove = true;
}
else
wasMove = false;
- path.append(m_currentFillGeometry[i]);
+ tmpPath.push_back(m_currentFillGeometry[i]);
}
- if (path.count() && !wasMove)
+ if (!tmpPath.empty())
{
- WPXPropertyList closedPath;
- closedPath.insert("libwpg:path-action", "Z");
- path.append(closedPath);
+ if (!wasMove)
+ {
+ WPXPropertyList closedPath;
+ closedPath.insert("libwpg:path-action", "Z");
+ tmpPath.push_back(closedPath);
+ }
+ else
+ tmpPath.pop_back();
}
- if (path.count())
+ if (!tmpPath.empty())
{
+ WPXPropertyListVector path;
+ for (unsigned i = 0; i < tmpPath.size(); ++i)
+ path.append(tmpPath[i]);
m_shapeOutputDrawing->addStyle(fillPathProps, WPXPropertyListVector());
m_shapeOutputDrawing->addPath(path);
}
}
m_currentFillGeometry.clear();
- path = WPXPropertyListVector();
+ tmpPath.clear();
if (m_styleProps["draw:stroke"] && m_styleProps["draw:stroke"]->getStr() != "none")
{
+ bool firstPoint = true;
+ bool wasMove = false;
for (unsigned i = 0; i < m_currentLineGeometry.size(); i++)
- path.append(m_currentLineGeometry[i]);
- if (path.count())
{
+ if (firstPoint)
+ {
+ firstPoint = false;
+ wasMove = true;
+ }
+ else if (m_currentLineGeometry[i]["libwpg:path-action"]->getStr() == "M")
+ {
+ if (!tmpPath.empty())
+ {
+ if (wasMove)
+ {
+ tmpPath.pop_back();
+ }
+ }
+ wasMove = true;
+ }
+ else
+ wasMove = false;
+ tmpPath.push_back(m_currentLineGeometry[i]);
+ }
+ if (!tmpPath.empty())
+ {
+ if (wasMove)
+ tmpPath.pop_back();
+ }
+ if (!tmpPath.empty())
+ {
+ WPXPropertyListVector path;
+ for (unsigned i = 0; i < tmpPath.size(); ++i)
+ path.append(tmpPath[i]);
m_shapeOutputDrawing->addStyle(linePathProps, WPXPropertyListVector());
m_shapeOutputDrawing->addPath(path);
}
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