Opened 14 years ago
Closed 13 years ago
#1445 closed enhancement (fixed)
Watermark RFC implementation
Reported by: | brucedechant | Owned by: | |
---|---|---|---|
Priority: | medium | Milestone: | 2.3 |
Component: | Server | Version: | |
Severity: | blocker | Keywords: | |
Cc: | External ID: |
Description
This ticket is for the watermark RFC implementation.
Attachments (1)
Change History (12)
by , 14 years ago
Attachment: | WatermarkImplementation.patch added |
---|
comment:2 by , 14 years ago
Fix some MdfParser issues
The newly submitted watermark code has issues in MdfParser, some of which I'm fixing here:
- When saving the layer definition to a version older than 1.4.0, the watermark information needs to be saved as extended data. The code do to this was missing.
- Numerous places in the watermark serialization code were directly dereferencing the version parameter without checking if it's NULL. NULL is a valid value for the version, and means use the latest version.
- Updated some references to layer definition 1.3.0 to 1.4.0.
I also noticed that IOPointTypeStyle, IOLineTypeStyle, IOAreaTypeStyle, and IOCompositeTypeStyle had slightly flawed logic when saving the ShowInLegend property. When serializing to an older LDF version the code correctly saves these as extended data, but the version check needs was not excluding LDF 0.9.0 which does not support extended data.
comment:4 by , 14 years ago
Severity: | minor → blocker |
---|
Additional watermark cleanup
- Change the opacity memeber in SE_Raster to a raw double and not an SE_Double. The latter supports expressions, which are not needed for the opacity.
- Add TODO comment about cleanup of StylizationEngine::StylizeWatermark
- Some minor formatting
comment:6 by , 14 years ago
More watermark cleanup - MdfModel
- Numerous member variables were not being initialized in constructors - BAD!!
- In MdfModel, member variables should be initialized to the corresponding default property value specified in the schema!
- Never include files before stdafx.h. If precompiled headers is enabled then headers included before stdafx.h are ignored.
- Renamed some class properties to be consistent with the schema. E.g. WatermarkXOffset had a Length property but in the schema it's called Offset. Now the code also uses Offset.
- Renamed WatermarkResourceID proeprty on WatermarkInstance to just ResourceId.
- New source files should have copyrights that only reference the current year.
- Adjusted formatting to match the rest of the project.
Also cleaned up some documentation in the schema.
comment:7 by , 14 years ago
More watermark cleanup - MdfModel
- Numerous member variables were not being initialized in constructors - BAD!!
- In MdfModel, member variables should be initialized to the corresponding default property value specified in the schema!
- Never include files before stdafx.h. If precompiled headers is enabled then headers included before stdafx.h are ignored.
- Renamed some class properties to be consistent with the schema. E.g. WatermarkXOffset had a Length property but in the schema it's called Offset. Now the code also uses Offset.
- Renamed WatermarkResourceID proeprty on WatermarkInstance to just ResourceId.
- New source files should have copyrights that only reference the current year.
- Adjusted formatting to match the rest of the project.
Also cleaned up some documentation in the schema.
comment:8 by , 14 years ago
One more watermark schema cleanup: change ALL to All in Usage enumeration.
comment:9 by , 14 years ago
Additional watermark cleanup
Schema updates:
- Improved documentation in the new schemas.
- The WatermarkDefinitionType element has a WatermarkSource child element that contains the content for the watermark. I've renamed WatermarkSource to just Content.
- The WatermarkType element has child elements named AppearanceOverrides and PositionOverrides, but these names are wrong since in each case there's only a single object overriding things. So I renamed the elements to AppearanceOverride and PositionOverride. The MdfModel and MdfParser code was already using the new names.
- A couple elements defined ExtendedData child elements. I renamed the child elements to !ExtendedData1 to be consistent with other uses of extended data in our schemas.
MdfModel updates:
- Updated WatermarkDefinition to account for the WatermarkSource => Content renaming.
- Many of the new classes did not inherit from MdfRootObject. This based class provides support for handling unknown XML / extended data, and all MdfModel classes should inherit from it.
MdfParser updates:
- The new IOWatermark classes were incorrectly deleting references to MdfModel objects in their destructors. The lifetime of these MdfModel objects is controlled by the MdfModel classes, and not the IO classes.
- Serialization of numerous optional schema properties / elements was not being done correctly. The code needs to only serialize these properties / elements if they differ from the default value.
- IOWatermarkInstance and IOWatermarkDefinition were not handling extended data correctly.
- IOWatermarkDefinition::Write was not checking handling the case where the supplied version parameter was NULL.
- Added additional comments to the new classes.
Initial patch