Issue 118845 - [non-pro] htmlexpo gallery theme dispayed on gallery
[non-pro] htmlexpo gallery theme dispayed on gallery
Status: RESOLVED FIXED
Product: General
Classification: Code
Component: code
current
All All
: P5 normal (vote)
: 4.0.0
Assigned To: Armin Le Grand
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-29 10:59 UTC by Ariel Constenla-Haile
Modified: 2013-07-12 16:11 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation on: ---
Developer Difficulty: ---


Attachments
Screenshot (77.04 KB, image/png)
2012-01-29 11:01 UTC, Ariel Constenla-Haile
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2012-01-29 10:59:55 UTC
On a non-product build, the htmlexpo gallery theme dispayed on gallery.
An error is displayed:

Error: file:///home/ariel/OOo/AOOo/openoffice.org3/program/../basis-link/program/resource/galen-US.res
Class: String, Id: 6015. Cannot load resource! 
Resource Stack
Comment 1 Ariel Constenla-Haile 2012-01-29 11:01:59 UTC
Created attachment 77174 [details]
Screenshot
Comment 2 Armin Le Grand 2012-11-28 14:40:42 UTC
ALG: Reason is the htmlexpo theme of the gallery which was removed in svx, but not in extras/scp2. Need to check and evtl. repair this
Comment 3 Ariel Constenla-Haile 2012-11-28 15:02:34 UTC
The theme was removed with

impress210: #i105310# set tooltip for items and some refactoring
author	Ocke.Janssen@oracle.com
	Tue Feb 08 12:29:15 2011 +0100 (21 months ago)
changeset 276753	902597eed541
parent 276752 	2f0f385e8b25
child 276754 	fbdede3ae6d9

http://hg.services.openoffice.org/OOO340/rev/902597eed541
http://hg.services.openoffice.org/OOO340/diff/902597eed541/svx/inc/svx/gallery.hxx
http://hg.services.openoffice.org/OOO340/diff/902597eed541/svx/source/gallery2/galtheme.src
http://hg.services.openoffice.org/OOO340/diff/902597eed541/svx/inc/galtheme.hrc

The underlying issue is that this commit removed all the code, including the resource ID and the string, but it didn't remove the theme files.

Copy and paste from the dev@ mailing list:

* the private URL is stored in the theme itself as its name

* hidden themes are not displayed in the UI: 
A hidden theme is one whose name begins with "private://gallery/hidden/"
see GalleryThemeEntry 
sal_Bool  IsHidden() const { return aName.SearchAscii( "private://gallery/hidden/" ) == 0; }


This gallery theme is displayed on a non-pro build because the gallery theme is not considered as hidden: though the name is really stored inside the theme file, it is replaced in the GalleryThemeEntry constructor:

* the constructor gets the theme name as read from the theme file

* it tries to get the localized theme name from the resource first

* UniString::UniString( const ResId& rResId ) instead of creating an empty string when the respective resource is missing (default   behaviour on a pro build), it returns a string with the error, see 
  http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/tools/source/string/strucvt.cxx#195

* this string has a length > 0, then it replaces the original string as read from the theme file

* this way, IsHidden will return false: the theme is not hidden as its name does not start with private://gallery/hidden anymore

* then the theme is displayed in the UI on a non-pro build
Comment 4 Ariel Constenla-Haile 2012-11-28 15:04:19 UTC
According to Regina: the theme is used in File > Wizard > Web page:
Comment 5 Ariel Constenla-Haile 2012-11-28 22:11:48 UTC
(In reply to comment #4)
> According to Regina: the theme is used in File > Wizard > Web page:

The gallery theme is not used by the wizard, it uses the images directly from the folder, so the gallery theme files can be safely removed.

See com.sun.star.wizards.web.IconsDialog.getImageUrls(Object listItem)
main/wizards/com/sun/star/wizards/web/IconsDialog.java

Removing the files

/opt/openoffice.org/basis3.4/share/gallery/sg25.sdg
/opt/openoffice.org/basis3.4/share/gallery/sg25.sdv
/opt/openoffice.org/basis3.4/share/gallery/sg25.thm

has no side effect on the Web Wizard.
Comment 6 Armin Le Grand 2012-11-29 15:19:23 UTC
ALG: Thanks all for comments and findings.

Okay, let's go. Re-added ressource defines in *.src/*.hrc. Removed sg25.sdg/sdv/thm after checking and seeing that these do not get installwed anyways (what ensures they are not used by the wizard). Testing this...
Comment 7 Armin Le Grand 2012-11-29 16:14:13 UTC
ALG: Okay, looks good. Comitted, done.
Comment 8 SVN Robot 2012-11-29 16:15:02 UTC
"alg" committed SVN revision 1415238 into trunk:
#118845# corrected missing ressource for gallery theme htmlexpo