Issue 90178 - "File already exists" warning dialog is empty
Summary: "File already exists" warning dialog is empty
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: DEV300m14
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 3.0
Assignee: eric.savary
QA Contact: issues@tools
URL:
Keywords: oooqa, regression, release_blocker
: 91313 91855 92051 (view as issue list)
Depends on:
Blocks:
 
Reported: 2008-05-30 21:55 UTC by niederbayern
Modified: 2008-08-04 14:44 UTC (History)
5 users (show)

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


Attachments
Screenshot. Warning is empty. Should show: "File already exists. Do you want to overwrite?" (91.12 KB, image/png)
2008-05-30 21:57 UTC, niederbayern
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description niederbayern 2008-05-30 21:55:11 UTC
Having OOo-Dialogs not activated, the warning "File already exists" (to prevent
overwriting an existing file by saving to the same name) does not show up. The
dialog is empty. See screenshot.
Comment 1 niederbayern 2008-05-30 21:57:28 UTC
Created attachment 54100 [details]
Screenshot. Warning is empty. Should show: "File already exists. Do you want to overwrite?"
Comment 2 Mechtilde 2008-05-30 22:02:36 UTC
can confirm
Comment 3 thorsten.martens 2008-06-02 14:44:45 UTC
TM->MAV: please have a look, thanks !
Comment 4 philipp.lohmann 2008-06-03 15:02:18 UTC
Since we seem to have difficulties to reproduce this, on what platform does this
actually happen ? Without a method of reproduction there can be no fix.

By "Having OOo-Dialogs not activated", you mean that in
"Tools->Options->General->Open/Save Dialogs" the checkbox is unchecked ?
Comment 5 philipp.lohmann 2008-06-03 15:03:58 UTC
depending on what dialog that actually is that might be a problem in vcl (if
it's one actually an OOo dialog) or in the native file picker (in which case cmc
might have a hint for this). Adding him to CC.
Comment 6 caolanm 2008-06-03 15:19:37 UTC
The code in question is...

dlg = gtk_message_dialog_new( NULL,
    GTK_DIALOG_MODAL,
    GTK_MESSAGE_QUESTION,
    GTK_BUTTONS_YES_NO,
      OUStringToOString(
        aResProvider.getResString( FILE_PICKER_OVERWRITE ),
        RTL_TEXTENCODING_UTF8 ).getStr() );

where FILE_PICKER_OVERWRITE is STR_SVT_ALREADYEXISTOVERWRITE

and it works fine for me in English, and I haven't heard anything else on other
languages, so....

a) if you use the "built-in" dialogs does the string work ? i.e. say "Die Datei
existiert bereits. Soll sie überschrieben werden?"
b) what's the output of locale, just to check what exactly it is
Comment 7 niederbayern 2008-06-03 15:37:38 UTC
Ubuntu Linux 7.10 (Gnome)

When "Tools->Options->General->Open/Save Dialogs" is checked, everything is fine.
 
When "Tools->Options->General->Open/Save Dialogs" checkbox is unchecked, the
dialog is empty, as shown in the screenshot.

locale
LANG=de_DE.UTF-8


   
Comment 8 caolanm 2008-06-03 16:20:42 UTC
ok, I see what's going on here.

originally in tools/inc/tools/resmgr.hxx

#define CREATEVERSIONRESMGR_NAME( Name )   #Name MAKE_NUMSTR( SUPD )
#define CREATEVERSIONRESMGR( Name ) ResMgr::CreateResMgr(
CREATEVERSIONRESMGR_NAME( Name ) )

in the DEV300 series has changed to ....

#define CREATEVERSIONRESMGR_NAME( Name )   #Name
#define CREATEVERSIONRESMGR( Name )        ResMgr::CreateResMgr( #Name )

and in resourceprovider.cxx we have 
#define RES_NAME fps_office
...
m_ResMgr = CREATEVERSIONRESMGR( RES_NAME );

e.g. take the following test and use gcc -E on it 
#define FOO svt

#define CREATEVERSIONRESMGR_NAME( Name )   #Name
#define CREATEVERSIONRESMGR( Name )        ResMgr::CreateResMgr( #Name )
CREATEVERSIONRESMGR( FOO )
#undef CREATEVERSIONRESMGR_NAME
#undef CREATEVERSIONRESMGR
#define CREATEVERSIONRESMGR_NAME( Name )   #Name
#define CREATEVERSIONRESMGR( Name )        ResMgr::CreateResMgr(
CREATEVERSIONRESMGR_NAME( Name ) )
CREATEVERSIONRESMGR( FOO )

the outcome is that what used to be 
ResMgr::CreateResMgr( "svt" )
now becomes
ResMgr::CreateResMgr( "FOO" )

I suggest that the safest fix is probably to change tools from
#define CREATEVERSIONRESMGR( Name )        ResMgr::CreateResMgr( #Name )
back to 
#define CREATEVERSIONRESMGR( Name )        ResMgr::CreateResMgr(
CREATEVERSIONRESMGR_NAME( Name ) )

so as to get the same expansion rules, otherwise I can certainly change the
gnome usage for this one case. 
Comment 9 caolanm 2008-06-03 16:25:29 UTC
change occurred in supdremove02

cmc->rt: what should we do, change resmgr.hxx in case there are more uses of the
pattern like this ? Or just fix the gnome fpicker one ?
Comment 10 rt 2008-06-04 07:48:10 UTC
I'd prefer changing tools' resmgr.hxx
Comment 11 caolanm 2008-06-04 09:03:29 UTC
I'm happy to take this fix into cmcfixes46
Comment 12 caolanm 2008-06-04 09:14:36 UTC
done in cmcfixes46
Comment 13 caolanm 2008-06-06 13:14:04 UTC
reassign for qa
Comment 14 eric.savary 2008-06-11 16:02:44 UTC
Verified in CWS cmcfixes46
Comment 15 caolanm 2008-07-07 11:56:18 UTC
*** Issue 91313 has been marked as a duplicate of this issue. ***
Comment 16 caolanm 2008-07-19 16:38:00 UTC
*** Issue 91855 has been marked as a duplicate of this issue. ***
Comment 17 philipp.lohmann 2008-07-21 09:31:42 UTC
same as b6724906, fixed in CWS vcl91, same fix. Will probably result in a merge
conflict.
Comment 18 caolanm 2008-07-21 09:45:24 UTC
They won't conflict, so its ok. pl's change expands the uses in fpicker of the
CREATEVERSIONRESMGR macro to working ResMgr::CreateResMgr calls. My one changed
the macro in tools so that macro expansion of CREATEVERSIONRESMGR works the way
it used to do again.
Comment 19 Mechtilde 2008-07-28 20:50:50 UTC
verified in DEV300_m28 -> closed
Comment 20 drichard 2008-08-04 14:44:28 UTC
*** Issue 92051 has been marked as a duplicate of this issue. ***