This repository has been archived by the owner on Aug 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dailywtf.txt
74 lines (50 loc) · 2.44 KB
/
dailywtf.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
= Misc notes
NOTE: The notes here are not about to show how horrible working on OOo is -
quite the opposite: it's a great adventure, due to the ackward APIs you have to
figure out. ;)
== 2010-06-30
MediaDescriptor::PROP_STREAMFOROUTPUT() is to get an output stream, but you need +
MediaDescriptor::PROP_INPUTSTREAM() to get an input stream.
http://svn.services.openoffice.org/opengrok/xref/OOO320_m19/oox/source/core/filterbase.cxx
== 2010-07-01
Regarding some sphaghetti code in OOo, especially the german comments:
14:44 < cbosdonnat> vmiklos, the german comments are the bolognese sauce to help us eat the spaghetti :)
== 2010-07-02
While you read or write files, you work with streams, which in practice an
SvStream reference. It has operators and methods to write to or read from the
stream. Now if you want to pass this to an uno function, you need to wrap it.
The name of the wrappers:
utl::OStreamWrapper() (to wrap it) +
utl::UcbStreamHelper::CreateStream() (to unwrap it)
== 2010-07-06
So there are two related concepts: footer and header. It's quite intuitive to
create a base class for them and add a boolean flag if it's a footer or header;
or maybe create two subclasses. Now see how it's done in OOo:
class SW_DLLPUBLIC SwFmtHeader: public SfxPoolItem, public SwClient {...} +
class SW_DLLPUBLIC SwFmtFooter: public SfxPoolItem, public SwClient {...}
so yes, their IsActive() method is duplicated.
== 2010-07-07
You have two callbacks, they are called if a given property of the text
changed. A simple implementation of this would be a 'propertyChanged(string name,
bool newValue)'-like function. Now let's see how OOo does this:
----
// property: bold
void CharWeight( const SvxWeightItem& rWeight )
{
if ( rWeight.GetWeight() != WEIGHT_BOLD )
/* the property is now false */
}
// property: italic
void CharPosture( const SvxPostureItem& rPosture )
{
if ( rPosture.GetPosture() != ITALIC_NORMAL )
/* the property is now false */
}
----
to make it worse, the "true" values are WEIGHT_NORMAL and ITALIC_NONE, so the
_NORMAL suffix may mean true and false as well.
== 2010-07-08
http://svn.services.openoffice.org/opengrok/xref/Current%20%28trunk%29/sw/source/filter/rtf/rtfatr.cxx#1528
That missing break in the switch makes OOo not export graphics only in PNG, so Wordpad can't open it...
== 2012-03-02
14:59 <@cbosdonnat> Tarzan is hidden in the sw jungle: http://opengrok.libreoffice.org/xref/core/sw/source/core/layout/calcmove.cxx#335