Project: Birt
Bug 178179 The order of included css files keeps unchanged when reloading
Reported: 2007-03-20 01:49:09 | Status: verified fixed

Xingjie once asked Rima this question, and Rima answered that the order kept unchanged. The question and answer are listed following: About reload css. Now there is duplicate style name problem. Which css file is added at last, which file has the highest priority. For example design file has two css file. base.css and new.css . Base.css ----- StyleA ----- StyleB New.css -----StyleA -----StyleC So the priority of new.css is higher. So we can get three styles: New.css.styleA, StyleB, StyleC When I execute reload base.css action, There is two choices. One is : keep every thing. That means the priority of new.css is higher too. Second is: After reload, priority of base.css is higher. And in report design you will see New.css -----StyleA -----StyleC Base.css ----- StyleA ----- StyleB And we can get three styles: base.css.styleA, styleB, styleC Which is the better choice? I will let Xiong send a bug about the choice that in future we can know the behavior. [Rima Kanguri] Always the priority of the last file included is highest. In your example the styles defined in New.css takes higher priority always. Even when user performs a reload operation.

Files changed in fix:
model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/api/CssSharedStyleHandleTest.java model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/api/ReportDesignHandleTest.java model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/command/CssCommandTest.java model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/library/LibraryParseTest.java model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/library/LibraryThemeTest.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/CssSharedStyleHandle.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/DesignElementHandle.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ModuleHandle.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ReportDesignHandle.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/ThemeHandle.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/command/CssException.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/command/CssReloadedEvent.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/css/CssStyleSheetHandle.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/command/CssCommand.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/command/CssRecord.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/core/Module.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/css/CssNameManager.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/css/CssStyle.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/css/CssStyleSheetAdapter.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/css/CssStyleSheetHandleAdapter.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/css/StyleSheetLoader.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/ICssStyleSheetOperation.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/ReportDesign.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/Theme.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/parser/IncludedCssStyleSheetListState.java model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/util/ModelUtil.java