I've been looking fairly closely at the coordinate system of VCL. I understood it fairly well, but as I have a Pro subscription of Gemini, I asked it to look at it for me to tell me how it thinks it works. Here is what it came up with: If you’ve ever worked on a complex UI rendering engine, you know that placing a single pixel on the screen is rarely as simple as draw(x, y) . A single coordinate…
Let me count the ways, in no particular order and in no way exhaustive: OutputDevice is the base class for printing, windowing and PDFs. It doesn't just do output. OutputDevice has GetOutDevType() because the base class needs to know what child class is using it. Ugh. OutputDevice drawing primitives not only draw, but they record a metafile. There are literally functions that turn off drawing and…
The OutputDevice class is what we use for rendering a whole host of different things, and other classes inherit from it to do their rendering. Notably a little while ago Noel Grandin separated OutputDevice from Window, which is a huge boon for the codebase! In an attempt to further separate the concerns of OutputDevice, I noticed a long time ago that not only does it do rendering, but it records…
For a long time now I have noticed that OutputDevice is a class that is tightly coupled to drawing primitives such a pixels, lines, rectangles, etc. To draw new primitives in OutputDevice, you need to change the interface by adding another function, often you need to add new private functions, etc. I have never been entirely comfortable with this - I believe that we shouldn't vary the OutputDevice…
On the 9th February, unbeknownst to me, my wife accidentally typed in the wrong password several times into Netflix. I then got an email from Netflix: Password reset required Dear CHRISTOPHER, We’ve detected a suspicious sign-in to your Netflix account. Just to be safe we've reset your password and you’ll need to set a new one. SET A NEW PASSWORD Use the button above or type www.netflix.com into…
If you want to turn on verbose logging for Windows Update and the Microsoft Installer, then you could follow KB 2545723 - How to Enable Microsoft Installer logging and Verbose logging to gather additional troubleshooting Information ... or if you are masochistic enough then you can copy the following into a .reg file, then open this to import it into your registry: Windows Registry Editor Version…
[2016-05-19T08:30:23+1000] chris_wot (~chris_wot@203-217-39-91.dyn.iinet.net.au) joined the channel [2016-05-19T08:30:23+1000] Topic is This is the channel for requesting a block review on the English Wikipedia | For help, type !admin followed by your question - we will see it | Unblock discussion logs may be published | If you are not here to request an unblock for yourself, please leave the…
From: Unblock Review Team < noreply-unblock@toolserver.org > Date: 21 May 2016 at 5:39:41 AM AEST To: chris.sherlock79 at gmail.com Subject: Response to unblock appeal #15811 This is a reply to your Wikipedia unblock appeal from TParis, a Wikipedia administrator. DO NOT reply to this email - it is coming from an unattended email address. Hello Letsbefiends, The primary issue appears to be your…
This isn't going to be very long really. Wikipedia is a horrible place to edit because it encourages horrible behaviour. When I first started many years ago, there was a real sense that you could collaborate on articles. You could have a disagreement and come to a compromise. That's not possible any more. What happens is that instead of asking on the talk page "do you think that might be a bit too…
Here's a spot of non-sudo fun on OS X, figured out after reading the following Hacker News story from the OS X git security flaw update article written by the always amazing Rachel (which is in turn a follow up to this article ). Open the OS X terminal and paste in the following: mkdir -p ~/xcls/usr/bin cat <<EOF > ~/xcls/usr/bin/xcrun #!/bin/sh if [ "\$1" = "git" ]; then exec -a "/usr/bin/git"…
Li Haoyi has written an excellent blog post entitled " Diving Into Other People's Code " about diving into an unfamilar codebase (HN discussion here ). I think this is really very helpful for anyone who wants to look at the LibreOffice source for the first time. Many of the things he mentions are directly relatable to LibreOffice - in particular getting your dev environment setup is particularly…
The LibreOffice codebase is, to be frank, messy. This isn't a criticism of previous developers - it's still an amazing product and an amazing feat of programming given the number of platforms it runs on. The StarView guys, and later OpenOffice.org development team, did a great job. For instance, I was reading up on the font mapping code and I often saw Herbert Duerr's name, and I've got nothing…
I have committed a code change to the LibreOffice tree to allow developers to specify what modules they want Doxygen to index. I have done this because indexing every module is quite time consuming, and you may only want to review a subset of modules (in my case I am interested primarily in the vcl module). To index specific modules only, you now export the $INPUT_PROJECTS environment variable and…
Update: So this was discussed on IRC, and it turns out I've got this all entirely wrong. It's actually much simpler - it turns out you don't need a space before the scope operator thus you can legally have: void::TheClass::TheFunction(int n1, int n2) {} This is the same as: void ::TheClass::TheFunction(int n1, int n2) {} and: void ::TheClass ::TheFunction(int n1, int n2) {} -------- I ran doxygen…
A few days ago, I filed bug 96826 ("Typewriter attribute not given enough weight when finding font based on attributes") against LibreOffice. Basically, I've been refactoring VCL font code and I was very interested to see what my predecessors had been doing before me. This meant that I actually read pretty much all of the commits I could find all the way back to the year 2000 for that file, which…
Karabiner allows you to disable ctrl+left click on OS X. That will, by default, do the same thing that right-click does with a mouse. You choose the following option to disable it: So here's where things go bad. If you run VirtualBox and you run a Windows 10 system, you have to turn this off. I believe I had this on due to an early version of VirtualBox not handling ctrl+left click, but they seem…
I use OS X as my primary operating system, but still need to use Windows so I've installed Windows 8.1 as a VirtualBox Virtual Machine. Recently I decided that I wanted to upgrade to Windows 10, but when I do Windows complains it doesn't like the VirtualBox Graphics Adapter for Windows 8: I got quite busy, but recently I decided to find out how to resolve this. A (very) cursory Google search…
I've just joined the OSI as a member - in AUD it is about $50, but it's well worth it! The reason I became a member was because I thought it was high time that I did this. I contribute to LibreOffice, and I truly believe that open source and open culture is very important to society at large. I believe that open source gives maximum freedom to those in society who are not necessarily empowered due…
I have been looking at the VCL in LibreOffice, which is its cross-platform widget and window library. Whilst reading the SalGraphics class (more on this in a future post) I noticed a class called ImplFontCharMap . Curious, I looked more into it. Why the "Impl"-prefix? What about FontCharMap ? As it turns out, ImplFontCharMap is a Pimpl for FontCharMap . Now normally a Pimpl has very little code…
After reviewing the component diagram on the LibreOffice wiki , the following will make the VCL module in LibreOffice: make sal salhelper store cppuhelper cppu xmlreader registry unoidl dtrans \ binaryurp dtrans animations jvmfwk jvmaccess javaunohelper stoc i18nlangtag \ ucbhelper comphelper basegfx tools unotools i18nutil i18npool sot svl vcl Update: this doesn't always work. Turns out that…
I find it absurd that Google+ doesn't recognize certain names. The latest outrage was when they rejected Elaine Yellow Horse . It was only after BuzzFeed contacted Google that they decided that, gee whiz, that is a real name! Who would have thought it. So I thought I might let Google know a few things about Anthroponymy. Given Google has a whole division who work out if you've given a real name or…
To run NUnit, you need to add the following to the NUnit.exe.config file: Under C:\Program Files\NUnit 2.5.9\bin\net-2.0\nunit.exe.config (replace version with whatever you have installed) add the following: <startup> <!-- the below is WRONG! See here for why. <requiredruntime version="v4.0.30319"> --> <supportedruntime version="v4.0"> </startup> Also add the following in the <runtime> block:…
A note to the NSW government. Adding more buses does not decrease travel times. It actually increases travel times. This is called " bufferbloat " in network systems. Why? Because if you have a limited capacity on a road, and it gets blocked, adding MORE vehicles makes things slower. The only way to fix the issue is to increase the capacity of the roads. It's the same for train lines. Adding MORE…
Sadly, my greatest claim to fame is that I invented the [citation needed] tag. I'll stop sobbing in a corner one day. P.S. if anyone writes [Citation needed], then [Citation provided] .
As it turns out, with a sufficiently dense input text, a Markov Chain generator is actually reasonably easy to implement. From page 62 of The Practice of Programming : set w1 and w2 to the first two words in the text print w1 and w2 loop: randomly choose w3, one of the successors of prefix w1 w2 in the text print w3 print w1 and w2 by w2 and w3 repeat loop