Re: libvisio: arrow head shapes not imported properly

2014-11-03 Thread TANAKA Hidemune
using
   vsd2raw or vsd2odg )


I am investigating the following problem.
Bug 44551 - libvisio: arrow head shapes not imported properly
https://bugs.freedesktop.org/show_bug.cgi?id=44551

Best regards


Best regards,



--
■□■□■□■□■□■□■□■□■□■□■□■

 株式会社 田中コンピューターサービス

 代表取締役 田中 秀宗
   TANAKA Hidemune

  本 社 東京都北区滝野川7丁目45番14号
  電 話 03-3576-7272
  FAX 03-3576-7272
  携 帯 090-6187-1418
  E-Mail i...@tanaka-cs.co.jp
  http://tanaka-cs.co.jp

■□■□■□■□■□■□■□■□■□■□■□■
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


libvisio: arrow head shapes not imported properly

2014-10-30 Thread TANAKA Hidemune
Hi there

VSDContentCollector::_lineProperties
I am embedded SAL_INFO here, but it did not work.

git/libo/workdir/UnpackedTarball/libvisio/src/lib/VSDContentCollector.cpp
Please tell me how to do this compilation.

I am investigating the following problem.
Bug 44551 - libvisio: arrow head shapes not imported properly
https://bugs.freedesktop.org/show_bug.cgi?id=44551

Best regards

TANAKA Hidemune

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED] partial patch for fdo#44551 libvisio: arrow head shapes not imported properly

2012-01-31 Thread Bruno Girin

On 31/01/12 11:22, Fridrich Strba wrote:

Hello, Bruno

On 31/01/12 00:35, Bruno Girin wrote:

Please find attached a partial patch to import line marker shapes from
Visio files. I would appreciate a review to confirm whether I am on the
right path or whether I should do something different.


Yes, currently this is the best approach to fill in for each id the 
right viewbox and path. I will have to find a way to parse it for the 
svg generation, but that is another question. That was an issue with 
the initial implementation too, but nothing unsolvable either.


Fine, I'll keep working on the remaining 40-odd IDs and may pick your 
brain at FOSDEM if I get stuck on any of them.


Cheers,

Bruno

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED] partial patch for fdo#44551 libvisio: arrow head shapes not imported properly

2012-01-31 Thread Fridrich Strba

Hello, Bruno

On 31/01/12 00:35, Bruno Girin wrote:

Please find attached a partial patch to import line marker shapes from
Visio files. I would appreciate a review to confirm whether I am on the
right path or whether I should do something different.


Yes, currently this is the best approach to fill in for each id the 
right viewbox and path. I will have to find a way to parse it for the 
svg generation, but that is another question. That was an issue with the 
initial implementation too, but nothing unsolvable either.


Thanks for your great work.

Fridrich


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [REVIEW] partial patch for fdo#44551 libvisio: arrow head shapes not imported properly

2012-01-30 Thread Bruno Girin

Hi all,

Please find attached a partial patch to import line marker shapes from 
Visio files. I would appreciate a review to confirm whether I am on the 
right path or whether I should do something different.


Thanks,

Bruno

>From cf68600551d3a1d88c7daaa9f2dc8f09afdb7481 Mon Sep 17 00:00:00 2001
From: Bruno Girin 
Date: Mon, 30 Jan 2012 23:31:47 +
Subject: [PATCH] Partial patch for fdo#44551

---
 src/lib/VSDXContentCollector.cpp |   52 +
 src/lib/VSDXContentCollector.h   |3 ++
 2 files changed, 49 insertions(+), 6 deletions(-)

diff --git a/src/lib/VSDXContentCollector.cpp b/src/lib/VSDXContentCollector.cpp
index 2a4b36f..ee0fff0 100644
--- a/src/lib/VSDXContentCollector.cpp
+++ b/src/lib/VSDXContentCollector.cpp
@@ -451,15 +451,55 @@ void libvisio::VSDXContentCollector::_lineProperties(double strokeWidth, Colour
   // Deal with line markers (arrows, etc.)
   if (startMarker > 0)
   {
-m_styleProps.insert("draw:marker-start-viewbox", "0 0 20 30");
-m_styleProps.insert("draw:marker-start-path", "m10 0-10 30h20z");
-m_styleProps.insert("draw:marker-start-width", m_scale*(0.1/(strokeWidth*strokeWidth+1)+2.54*strokeWidth));
+m_styleProps.insert("draw:marker-start-viewbox", _linePropertiesMarkerViewbox(startMarker));
+m_styleProps.insert("draw:marker-start-path", _linePropertiesMarkerPath(startMarker));
+m_styleProps.insert("draw:marker-start-width", m_scale*(0.1/(strokeWidth*strokeWidth+1)+_linePropertiesMarkerWidth(startMarker)*strokeWidth));
   }
   if (endMarker > 0)
   {
-m_styleProps.insert("draw:marker-end-viewbox", "0 0 20 30");
-m_styleProps.insert("draw:marker-end-path", "m10 0-10 30h20z");
-m_styleProps.insert("draw:marker-end-width", m_scale*(0.1/(strokeWidth*strokeWidth+1)+2.54*strokeWidth));
+m_styleProps.insert("draw:marker-end-viewbox", _linePropertiesMarkerViewbox(endMarker));
+m_styleProps.insert("draw:marker-end-path", _linePropertiesMarkerPath(endMarker));
+m_styleProps.insert("draw:marker-end-width", m_scale*(0.1/(strokeWidth*strokeWidth+1)+_linePropertiesMarkerWidth(endMarker)*strokeWidth));
+  }
+}
+
+const char *libvisio::VSDXContentCollector::_linePropertiesMarkerViewbox(unsigned marker)
+{
+  switch (marker)
+  {
+case 2:
+  return "0 0 20 10";
+case 4:
+case 11:
+  return "0 0 20 20";
+default:
+  return "0 0 20 30";
+  }
+}
+
+const char *libvisio::VSDXContentCollector::_linePropertiesMarkerPath(unsigned marker)
+{
+  switch (marker)
+  {
+case 2:
+  return "m10 0-10 10h20z";
+case 4:
+  return "m10 0-10 20h20z";
+case 11:
+  return "m0 0l10 0l0 10l-10 0z";
+default:
+  return "m10 0-10 30h20z";
+  }
+}
+
+double libvisio::VSDXContentCollector::_linePropertiesMarkerWidth(unsigned marker)
+{
+  switch (marker)
+  {
+case 11:
+  return 1.27;
+default:
+  return 2.54;
   }
 }
 
diff --git a/src/lib/VSDXContentCollector.h b/src/lib/VSDXContentCollector.h
index bfd362e..9261e60 100644
--- a/src/lib/VSDXContentCollector.h
+++ b/src/lib/VSDXContentCollector.h
@@ -173,6 +173,9 @@ private:
 
   void _applyLinePattern();
   void _lineProperties(double strokeWidth, Colour c, unsigned linePattern, unsigned startMarker, unsigned endMarker, unsigned lineCap);
+  const char *_linePropertiesMarkerViewbox(unsigned marker);
+  const char *_linePropertiesMarkerPath(unsigned marker);
+  double _linePropertiesMarkerWidth(unsigned marker);
   void _fillAndShadowProperties(unsigned colourIndexFG, unsigned colourIndexBG, unsigned fillPattern,
 unsigned fillFGTransparency, unsigned fillBGTransparency,
 unsigned shadowPattern, Colour shfgc, double shadowOffsetX, double shadowOffsetY);
-- 
1.7.5.4

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice