View | Details | Raw Unified | Return to bug 8764
Collapse All | Expand All

(-)DocumentSummaryInformation.java (-13 / +7 lines)
Lines 65-70 Link Here
65
 * @see SummaryInformation
65
 * @see SummaryInformation
66
 *
66
 *
67
 * @author Rainer Klute (klute@rainer-klute.de)
67
 * @author Rainer Klute (klute@rainer-klute.de)
68
 * @author Drew Varner (Drew.Varner closeTo sc.edu)
68
 * @version $Id: DocumentSummaryInformation.java,v 1.5 2002/05/02 16:03:41 klute Exp $
69
 * @version $Id: DocumentSummaryInformation.java,v 1.5 2002/05/02 16:03:41 klute Exp $
69
 * @since 2002-02-09
70
 * @since 2002-02-09
70
 */
71
 */
Lines 191-206 Link Here
191
192
192
193
193
    /**
194
    /**
194
     * <p>Returns the stream's scale (or <code>null</code>)
195
     * <p><code>true</code> when scaling of the thumbnail is
195
     * <strong>when this method is implemented. Please note that the
196
     * desired. <code>false</code> if cropping is desired.</p>
196
     * return type is likely to change!</strong>
197
     */
197
     */
198
    public boolean getScale()
198
    public boolean getScale()
199
    {
199
    {
200
        if (true)
200
        return getPropertyBooleanValue(PropertyIDMap.PID_SCALE);
201
            throw new UnsupportedOperationException("FIXME");
202
	// return (byte[]) getProperty(PropertyIDMap.PID_SCALE);
203
	return false;
204
    }
201
    }
205
202
206
203
Lines 254-268 Link Here
254
251
255
252
256
    /**
253
    /**
257
     * <p>Returns the stream's links dirty information <strong>when
254
     * <p>Returns whether the custom links are hampered by
258
     * this method is implemented.</strong>
255
     * excessive noise, for all applications</p>
259
     */
256
     */
260
    public boolean getLinksDirty()
257
    public boolean getLinksDirty()
261
    {
258
    {
262
        if (true)
259
        return getPropertyBooleanValue(PropertyIDMap.PID_LINKSDIRTY);
263
            throw new UnsupportedOperationException("FIXME");
264
        // return (byte[]) getProperty(PropertyIDMap.PID_LINKSDIRTY);
265
        return false;
266
    }
260
    }
267
261
268
}
262
}
(-)Property.java (-1 / +28 lines)
Lines 218-225 Link Here
218
218
219
                final byte[] v = new byte[length];
219
                final byte[] v = new byte[length];
220
                for (int i = 0; i < length; i++)
220
                for (int i = 0; i < length; i++)
221
                    v[i] = src[offset + i + DWord.LENGTH];
221
                    v[i] = src[o + i];
222
                value = v;
222
                value = v;
223
                break;
224
            }
225
            case Variant.VT_BOOL:
226
            {
227
                // the first four bytes in src, from
228
                // src[offset] to src[offset + 3] contain
229
                // the DWord for VT_BOOL, so skip it, we don't
230
                // need it
231
                final int first = o + DWord.LENGTH;
232
                DWord bool = new DWord(src,o);
233
                if (bool.intValue() == -1)
234
                {
235
                    value = new Boolean(true);
236
                }
237
                else if (bool.intValue() == 0)
238
                {
239
                    value = new Boolean(false);
240
                }
241
                else
242
                {
243
                    //FIXME: What do we do here?
244
                    //VT_BOOL must be
245
                    // -1 for false
246
                    // 0 for true
247
                    // this is undefined!
248
                }
249
223
                break;
250
                break;
224
            }
251
            }
225
            default:
252
            default:
(-)PropertySet.java (+20 lines)
Lines 91-96 Link Here
91
 * Section}).
91
 * Section}).
92
 *
92
 *
93
 * @author Rainer Klute (klute@rainer-klute.de)
93
 * @author Rainer Klute (klute@rainer-klute.de)
94
 * @author Drew Varner (Drew.Varner hanginIn sc.edu)
94
 * @version $Id: PropertySet.java,v 1.3 2002/05/01 09:31:52 klute Exp $
95
 * @version $Id: PropertySet.java,v 1.3 2002/05/01 09:31:52 klute Exp $
95
 * @since 2002-02-09
96
 * @since 2002-02-09
96
 */
97
 */
Lines 461-466 Link Here
461
        throws NoSingleSectionException
462
        throws NoSingleSectionException
462
    {
463
    {
463
        return getSingleSection().getProperty(id);
464
        return getSingleSection().getProperty(id);
465
    }
466
467
468
469
    /**
470
     * <p>Convenience method returning the value of a boolean
471
     * property with the specified ID. If the property is not
472
     * available, <code>false</code> is returned. A subsequent call to
473
     * {@link #wasNull} will return <code>true</code> to let the caller
474
     * distinguish that case from a real property value of <code>false</code>.
475
     * </p>
476
     *
477
     * @throws NoSingleSectionException if the {@link PropertySet} has
478
     * more or less than one {@link Section}.
479
     */
480
    protected boolean getPropertyBooleanValue(final int id)
481
        throws NoSingleSectionException
482
    {
483
        return getSingleSection().getPropertyBooleanValue(id);
464
    }
484
    }
465
485
466
486
(-)Section.java (+19 lines)
Lines 62-67 Link Here
62
 * <p>Represents a section in a {@link PropertySet}.</p>
62
 * <p>Represents a section in a {@link PropertySet}.</p>
63
 *
63
 *
64
 * @author Rainer Klute (klute@rainer-klute.de)
64
 * @author Rainer Klute (klute@rainer-klute.de)
65
 * @author Drew Varner (Drew.Varner allUpIn sc.edu)
65
 * @version $Id: Section.java,v 1.3 2002/05/01 09:31:52 klute Exp $
66
 * @version $Id: Section.java,v 1.3 2002/05/01 09:31:52 klute Exp $
66
 * @since 2002-02-09
67
 * @since 2002-02-09
67
 */
68
 */
Lines 227-232 Link Here
227
            return i.intValue();
228
            return i.intValue();
228
        else
229
        else
229
            return 0;
230
            return 0;
231
    }
232
233
234
235
    /**
236
     * <p>Returns the value of the boolean property with the specified
237
     * ID. If the property is not available, <code>false</code> is returned. A
238
     * subsequent call to {@link #wasNull} will return
239
     * <code>true</code> to let the caller distinguish that case from
240
     * a real property value of <code>false</code>.</p>
241
     */
242
    protected boolean getPropertyBooleanValue(final int id)
243
    {
244
        final Boolean b = (Boolean) getProperty(id);
245
        if (b != null)
246
            return b.booleanValue();
247
        else
248
            return false;
230
    }
249
    }
231
250

Return to bug 8764