Issue 22340 - sfx2 - set title to nothing doesn't update window title ...
Summary: sfx2 - set title to nothing doesn't update window title ...
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: OOo 1.1 RC5
Hardware: PC Linux, all
: P4 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: atr
QA Contact: issues@framework
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-11 11:12 UTC by mmeeks
Modified: 2004-03-19 08:22 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description mmeeks 2003-11-11 11:12:08 UTC
Trivial bug; not obvious which component to file 'graphics' bugs against:

Index: sfx2/source/doc/objmisc.cxx
===================================================================
RCS file: /cvs/framework/sfx2/source/doc/objmisc.cxx,v
retrieving revision 1.33
diff -u -p -u -r1.33 objmisc.cxx
--- sfx2/source/doc/objmisc.cxx	28 Jul 2003 12:34:17 -0000	1.33
+++ sfx2/source/doc/objmisc.cxx	11 Nov 2003 11:08:15 -0000
@@ -270,8 +270,7 @@ void SfxObjectShell::FlushDocInfo()
 	// 2. Titel in DocInfo leer (Briefumschlagsdruck)
 	//	=> nicht am Doc setzen, da sonst "unbenanntX" daraus wird
 	String aDocInfoTitle = GetDocInfo().GetTitle();
-	if ( aDocInfoTitle.Len() )
-		SetTitle( aDocInfoTitle );
+	SetTitle( aDocInfoTitle );
 }
 
 //-------------------------------------------------------------------------
Comment 1 christof.pintaske 2003-11-11 11:59:56 UTC
sfx is part of the framework project. so I'm forwarding the issue to
Matthias. 

However the comment right above your changes stresses on not to set an
empty title since an empty title will be automaticely replaced by
"Untitled1".
Comment 2 thorsten.martens 2003-11-19 12:16:14 UTC
TM->MBA: Please have a look, thanks !
Comment 3 Mathias_Bauer 2003-11-24 17:28:39 UTC
.
Comment 4 Mathias_Bauer 2004-01-07 15:27:09 UTC
The patch is not applicable, because as Christoph already stated, calling
SetTitle() here would set the title to "UnitledX".
Instead of this the notification about a possible TitleChange needs to be done.
Comment 5 Mathias_Bauer 2004-01-07 15:46:25 UTC
Oops, seems that I was fooled by the old comment. Obviously the automatism is
not present anymore, so the patch from Michael is indeed applicable.
Comment 6 Mathias_Bauer 2004-01-07 16:12:01 UTC
Sorry, I was right the first time. The patch from Michael does not work if the
document is an "UntitledX". After setting and removing a title it is now named
"Untitled". So the bug needs to be fixed a little bit differently.
Comment 7 Mathias_Bauer 2004-01-28 10:15:44 UTC
To verify do the following:
Load a document
Set a title ("File-Properties")
The title is shown in the windows' caption bar
Set title to empty string
File name should be visible again

Then repeat the same with an untitled document.
Comment 8 atr 2004-01-28 13:04:26 UTC
ATR: checked in cws dialogdiet, bug is fixed.
Comment 9 atr 2004-01-28 13:04:45 UTC
.
Comment 10 atr 2004-03-19 08:22:02 UTC
ATR: Checked again in src680_m30, bug is fixed.