Re: MIME types for WMF/EMF

2024-02-22 Thread Pedro Lino
Hi Damjan

> On 02/22/2024 4:01 PM WET Damjan Jovanovic  wrote:

> Should we change the MIME types to "image/wmf" and "image/emf"? We would
> presumably also keep aliases like "image/x-wmf" and "image/x-emf". Inkscape
> can paste "image/x-emf". Should we keep the existing MIME types as aliases
> too, so we can copy and paste to and from LibreOffice?

+1 on changing  the MIME types to improve compatibility with Inkscape and other 
programs.
I'm not sure LO still uses the same types. In my experience copying from LO to 
AOO usually doesn't work that well (at least under Windows)

Best,
Pedro

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: MacOS testing for bug 112829 (SVG clipboard format)

2024-02-22 Thread Damjan Jovanovic
Either trunk or AOO42X.

On Thu, Feb 22, 2024 at 7:11 PM Jim Jagielski  wrote:

> Which branch?
>
> > On Feb 22, 2024, at 10:54 AM, Damjan Jovanovic 
> wrote:
> >
> > Hi
> >
> > For bug 112829, I got graphics and charts to copy out of AOO in SVG
> format
> > on FreeBSD and Windows (and probably Linux), but I wasn't able to test
> > macOS. A quick look at the code shows we might need another patch to get
> it
> > working there, possibly the one below.
> >
> > Can someone please test it and report back? Don't only verify you can
> > paste, examine the clipboard formats after copying a chart, and make sure
> > it contains "image/svg+xml".
> >
> > Thank you
> > Damjan
> >
> > ---snip---
> > diff --git a/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
> > b/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
> > index d5e2b6f371..d8f67c 100644
> > --- a/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
> > +++ b/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
> > @@ -94,6 +94,7 @@ namespace // private
> >   const NSString* PBTYPE_GDIMF = @"application/x-openoffice-gdimetafile
> > ;windows_formatname=\"GDIMetaFile\"";
> >   const NSString* PBTYPE_WMF =
> > @"application/x-openoffice-wmf;windows_formatname=\"Image
> > WMF\"";
> >   const NSString* PBTYPE_EMF =
> > @"application/x-openoffice-emf;windows_formatname=\"Image
> > EMF\"";
> > +  const NSString* PBTYPE_SVG = @"image/svg+xml;windows_
> > formatname=\"image/svg+xml\"";
> >
> >   const NSString* PBTYPE_DUMMY_INTERNAL = @"application/x-openoffice-
> > internal";
> >
> > @@ -107,6 +108,7 @@ namespace // private
> >   const char* FLAVOR_GDIMF =
> "application/x-openoffice-gdimetafile;windows_
> > formatname=\"GDIMetaFile\"";
> >   const char* FLAVOR_WMF =
> > "application/x-openoffice-wmf;windows_formatname=\"Image
> > WMF\"";
> >   const char* FLAVOR_EMF =
> > "application/x-openoffice-emf;windows_formatname=\"Image
> > EMF\"";
> > +  const char* FLAVOR_SVG = "image/svg+xml;windows_
> > formatname=\"image/svg+xml\"";
> >
> >   const char* FLAVOR_DUMMY_INTERNAL =
> "application/x-openoffice-internal";
> >
> > @@ -138,6 +140,7 @@ namespace // private
> >  { PBTYPE_GDIMF, FLAVOR_GDIMF, "GDIMetaFile", CPPUTYPE_SEQINT8 },
> >  { PBTYPE_WMF, FLAVOR_WMF, "Windows MetaFile", CPPUTYPE_SEQINT8
> },
> >  { PBTYPE_EMF, FLAVOR_EMF, "Windows Enhanced MetaFile",
> > CPPUTYPE_SEQINT8 },
> > + { PBTYPE_SVG, FLAVOR_SVG, "Scalable Vector Graphics",
> > CPPUTYPE_SEQINT8 },
> >  { PBTYPE_SODX, FLAVOR_SODX, "Star Object Descriptor (XML)",
> > CPPUTYPE_SEQINT8 },
> >   { PBTYPE_DUMMY_INTERNAL, FLAVOR_DUMMY_INTERNAL, "internal
> > data",CPPUTYPE_SEQINT8 }
> >};
> > ---snip---
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
> For additional commands, e-mail: dev-h...@openoffice.apache.org
>
>


Re: MacOS testing for bug 112829 (SVG clipboard format)

2024-02-22 Thread Jim Jagielski
Which branch?

> On Feb 22, 2024, at 10:54 AM, Damjan Jovanovic  wrote:
> 
> Hi
> 
> For bug 112829, I got graphics and charts to copy out of AOO in SVG format
> on FreeBSD and Windows (and probably Linux), but I wasn't able to test
> macOS. A quick look at the code shows we might need another patch to get it
> working there, possibly the one below.
> 
> Can someone please test it and report back? Don't only verify you can
> paste, examine the clipboard formats after copying a chart, and make sure
> it contains "image/svg+xml".
> 
> Thank you
> Damjan
> 
> ---snip---
> diff --git a/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
> b/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
> index d5e2b6f371..d8f67c 100644
> --- a/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
> +++ b/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
> @@ -94,6 +94,7 @@ namespace // private
>   const NSString* PBTYPE_GDIMF = @"application/x-openoffice-gdimetafile
> ;windows_formatname=\"GDIMetaFile\"";
>   const NSString* PBTYPE_WMF =
> @"application/x-openoffice-wmf;windows_formatname=\"Image
> WMF\"";
>   const NSString* PBTYPE_EMF =
> @"application/x-openoffice-emf;windows_formatname=\"Image
> EMF\"";
> +  const NSString* PBTYPE_SVG = @"image/svg+xml;windows_
> formatname=\"image/svg+xml\"";
> 
>   const NSString* PBTYPE_DUMMY_INTERNAL = @"application/x-openoffice-
> internal";
> 
> @@ -107,6 +108,7 @@ namespace // private
>   const char* FLAVOR_GDIMF = "application/x-openoffice-gdimetafile;windows_
> formatname=\"GDIMetaFile\"";
>   const char* FLAVOR_WMF =
> "application/x-openoffice-wmf;windows_formatname=\"Image
> WMF\"";
>   const char* FLAVOR_EMF =
> "application/x-openoffice-emf;windows_formatname=\"Image
> EMF\"";
> +  const char* FLAVOR_SVG = "image/svg+xml;windows_
> formatname=\"image/svg+xml\"";
> 
>   const char* FLAVOR_DUMMY_INTERNAL = "application/x-openoffice-internal";
> 
> @@ -138,6 +140,7 @@ namespace // private
>  { PBTYPE_GDIMF, FLAVOR_GDIMF, "GDIMetaFile", CPPUTYPE_SEQINT8 },
>  { PBTYPE_WMF, FLAVOR_WMF, "Windows MetaFile", CPPUTYPE_SEQINT8 },
>  { PBTYPE_EMF, FLAVOR_EMF, "Windows Enhanced MetaFile",
> CPPUTYPE_SEQINT8 },
> + { PBTYPE_SVG, FLAVOR_SVG, "Scalable Vector Graphics",
> CPPUTYPE_SEQINT8 },
>  { PBTYPE_SODX, FLAVOR_SODX, "Star Object Descriptor (XML)",
> CPPUTYPE_SEQINT8 },
>   { PBTYPE_DUMMY_INTERNAL, FLAVOR_DUMMY_INTERNAL, "internal
> data",CPPUTYPE_SEQINT8 }
>};
> ---snip---


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: [PR] docs: fix spelling in code comments [openoffice]

2024-02-22 Thread via GitHub


Pilot-Pirx merged PR #205:
URL: https://github.com/apache/openoffice/pull/205


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: [PR] Update boost - Part 1 [openoffice]

2024-02-22 Thread via GitHub


Pilot-Pirx commented on PR #202:
URL: https://github.com/apache/openoffice/pull/202#issuecomment-1959880734

   **Let boost promote to double the sinc_pi() operation.**
   
   Modern processors should handle this without any trouble.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: [PR] Update boost - Part 1 [openoffice]

2024-02-22 Thread via GitHub


Pilot-Pirx commented on PR #202:
URL: https://github.com/apache/openoffice/pull/202#issuecomment-1959879198

   Original comments from Pedro:
   
   Minor cleanup to internal boost header packaging
   
   We normally don't install all the headers available in boost. There is an
   interesting set of functionalities like multiprecision and odeint that while 
we
   are not using, but would be interesting to have available.
   
   This is done to ease future boost updates but also in the hopes of making it
   possible to use this functionality in a near future.
   
   No functional change expected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



MIME types for WMF/EMF

2024-02-22 Thread Damjan Jovanovic
Hi

While developing the patch for bug 112829, I saw that our clipboard formats
for WMF and EMF are
"application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" and
"application/x-openoffice-emf;windows_formatname=\"Image EMF\"". This leads
to other applications being able to paste WMF and EMF from OpenOffice on
Windows, where the clipboard format is generated from the "Image WMF" or
"Image EMF" parameter, but being unable to paste on Linux/FreeBSD and
probably macOS, where the clipboard format is that whole unusual string.

In 2016, RFC 7093 (https://datatracker.ietf.org/doc/html/rfc7903)
standardized WMF and EMF as image/wmf and image/emf, and these appear on
IANA's list of official MIME types. Should we change our MIME types to
those? Ideally we would use the MIME types supported by other applications.
But at least "image/wmf" and "image/emf" have a chance of working on some
of them, while the application-specific "application/x-openoffice-wmf" and
""application/x-openoffice-emf" never will.

Should we change the MIME types to "image/wmf" and "image/emf"? We would
presumably also keep aliases like "image/x-wmf" and "image/x-emf". Inkscape
can paste "image/x-emf". Should we keep the existing MIME types as aliases
too, so we can copy and paste to and from LibreOffice?

Regards
Damjan


MacOS testing for bug 112829 (SVG clipboard format)

2024-02-22 Thread Damjan Jovanovic
Hi

For bug 112829, I got graphics and charts to copy out of AOO in SVG format
on FreeBSD and Windows (and probably Linux), but I wasn't able to test
macOS. A quick look at the code shows we might need another patch to get it
working there, possibly the one below.

Can someone please test it and report back? Don't only verify you can
paste, examine the clipboard formats after copying a chart, and make sure
it contains "image/svg+xml".

Thank you
Damjan

---snip---
diff --git a/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
b/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index d5e2b6f371..d8f67c 100644
--- a/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -94,6 +94,7 @@ namespace // private
   const NSString* PBTYPE_GDIMF = @"application/x-openoffice-gdimetafile
;windows_formatname=\"GDIMetaFile\"";
   const NSString* PBTYPE_WMF =
@"application/x-openoffice-wmf;windows_formatname=\"Image
WMF\"";
   const NSString* PBTYPE_EMF =
@"application/x-openoffice-emf;windows_formatname=\"Image
EMF\"";
+  const NSString* PBTYPE_SVG = @"image/svg+xml;windows_
formatname=\"image/svg+xml\"";

   const NSString* PBTYPE_DUMMY_INTERNAL = @"application/x-openoffice-
internal";

@@ -107,6 +108,7 @@ namespace // private
   const char* FLAVOR_GDIMF = "application/x-openoffice-gdimetafile;windows_
formatname=\"GDIMetaFile\"";
   const char* FLAVOR_WMF =
"application/x-openoffice-wmf;windows_formatname=\"Image
WMF\"";
   const char* FLAVOR_EMF =
"application/x-openoffice-emf;windows_formatname=\"Image
EMF\"";
+  const char* FLAVOR_SVG = "image/svg+xml;windows_
formatname=\"image/svg+xml\"";

   const char* FLAVOR_DUMMY_INTERNAL = "application/x-openoffice-internal";

@@ -138,6 +140,7 @@ namespace // private
  { PBTYPE_GDIMF, FLAVOR_GDIMF, "GDIMetaFile", CPPUTYPE_SEQINT8 },
  { PBTYPE_WMF, FLAVOR_WMF, "Windows MetaFile", CPPUTYPE_SEQINT8 },
  { PBTYPE_EMF, FLAVOR_EMF, "Windows Enhanced MetaFile",
CPPUTYPE_SEQINT8 },
+ { PBTYPE_SVG, FLAVOR_SVG, "Scalable Vector Graphics",
CPPUTYPE_SEQINT8 },
  { PBTYPE_SODX, FLAVOR_SODX, "Star Object Descriptor (XML)",
CPPUTYPE_SEQINT8 },
   { PBTYPE_DUMMY_INTERNAL, FLAVOR_DUMMY_INTERNAL, "internal
data",CPPUTYPE_SEQINT8 }
};
---snip---


Re: [Issue 101010] Direct svg or eps export from calc

2024-02-22 Thread Damjan Jovanovic
Thank you everyone.

There are still a few further clipboard improvements I have planned, which
I'll elaborate on separately, but briefly:
- it might not work on macOS, and probably needs another patch.
- SVG can be copied out of OpenOffice, but cannot be pasted into OpenOffice
yet.
- Neither can we paste any other vector graphics format from Inkscape. We
might need to change our MIME types for WMF and EMF to image/wmf and
image/emf, also known as image/x-wmf and image/x-emf (which Inkscape uses).
- Only on Windows, can WMF and EMF be copied out of OpenOffice. On other
platforms it uses the wrong MIME types, application/x-openoffice-wmf and
application/x-openoffice-emf, which nothing else supports, so you can't
paste.
- Inkscape doesn't sort its clipboard formats in descending order of
quality (vector graphics formats before raster graphics formats), which is
a bug in Inkscape. But we should handle such buggy apps by looking for
vector graphics formats first, then falling back to raster formats if none
are found. At present PNG is offered before SVG, so we could paste the
worse format first!
- There are probably all kinds of other clipboard improvements I haven't
even thought of yet :-).

Oh and I really like the fact we only offer vector image formats for charts
and drawing on our clipboard at the moment. LO also offers image/png, which
can probably be pasted in a wider number of applications, but will waste
space, and be blurry when zoomed.

Damjan

On Thu, Feb 22, 2024 at 12:36 AM Marcus  wrote:

> I hope my commendation is not coming too late. ;-)
>
> I also think that this is a great extension of he clipboard formats.
> One reason more to work more on the way forward to AOO 4.2.0.
>
> Marcus
>
>
>
> Am 14.02.24 um 16:48 schrieb Dave Fisher:
> > CC to dev@ for exposure.
> >
> > I think that this fix is absolutely cool!
> >
> > Best,
> > Dave
> >
> >> On Feb 13, 2024, at 8:46 PM, bugzi...@apache.org wrote:
> >>
> >> https://bz.apache.org/ooo/show_bug.cgi?id=101010
> >>
> >> dam...@apache.org changed:
> >>
> >>What|Removed |Added
> >>
> 
> >>  CC||dam...@apache.org
> >>
> >> --- Comment #2 from dam...@apache.org ---
> >> With bug 112829 fixed, you can directly copy charts from Calc in SVG
> format,
> >> but you still need to paste and save them somewhere else.
> >>
> >> Is that an acceptable solution?
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
> For additional commands, e-mail: dev-h...@openoffice.apache.org
>
>