Kaydet (Commit) 52ca3bb5 authored tarafından Mikhail Voitenko's avatar Mikhail Voitenko

use the document title in dialog as default title

üst 91425d40
......@@ -4,9 +4,9 @@
*
* $RCSfile: WikiEditorImpl.java,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: mav $ $Date: 2008-01-21 12:57:53 $
* last change: $Author: mav $ $Date: 2008-01-25 10:29:55 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
......@@ -323,7 +323,7 @@ public final class WikiEditorImpl extends WeakBase
{
Hashtable wikiSettings = m_settings.getSettingByUrl( aPropDialog.m_sWikiEngineURL );
WikiArticle aArticle = new WikiArticle( m_xContext, aPropDialog.m_sWikiTitle, wikiSettings, false, null );
WikiArticle aArticle = new WikiArticle( m_xContext, aPropDialog.GetWikiTitle(), wikiSettings, false, null );
if ( aArticle.m_sHTMLCode == null )
{
......@@ -410,7 +410,7 @@ public final class WikiEditorImpl extends WeakBase
// show the send dialog
WikiPropDialog aSendDialog = new WikiPropDialog( m_xContext, "vnd.sun.star.script:WikiEditor.SendToMediaWiki?location=application", this );
aSendDialog.fillWikiList();
aSendDialog.m_sWikiTitle = Helper.GetDocTitle( m_xModel );
aSendDialog.SetWikiTitle( Helper.GetDocTitle( m_xModel ) );
aSendDialog.show(); // triggers the sending
}
}
......@@ -435,7 +435,7 @@ public final class WikiEditorImpl extends WeakBase
Hashtable wikiSettings = m_settings.getSettingByUrl( aSendDialog.m_sWikiEngineURL );
// TODO: stop progress spinning
WikiArticle aArticle = new WikiArticle( m_xContext, aSendDialog.m_sWikiTitle, wikiSettings, true, aSendDialog );
WikiArticle aArticle = new WikiArticle( m_xContext, aSendDialog.GetWikiTitle(), wikiSettings, true, aSendDialog );
boolean bAllowSending = true;
if ( aArticle.NotExist() )
......@@ -452,8 +452,6 @@ public final class WikiEditorImpl extends WeakBase
if ( xDialog != null )
{
Helper.SetControlPropInDialog( xDialog, "Label1", "Label", "A wiki article with the title " + aSendDialog.m_sWikiTitle + " does not exist yet. Do you want to create a new article with that name?" );
aSendDialog.SetThrobberActive( false );
bAllowSending = MainThreadDialogExecutor.Execute( m_xContext, xDialog );
aSendDialog.SetThrobberActive( true );
......
......@@ -4,9 +4,9 @@
*
* $RCSfile: WikiPropDialog.java,v $
*
* $Revision: 1.5 $
* $Revision: 1.6 $
*
* last change: $Author: mav $ $Date: 2008-01-21 12:57:53 $
* last change: $Author: mav $ $Date: 2008-01-25 10:29:55 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
......@@ -63,8 +63,8 @@ public class WikiPropDialog extends WikiDialog{
String[] m_pMethods = {sSendMethod, sCancelMethod, sHelpMethod, sLoadMethod, sWikiListMethod, sArticleTextMethod, sAddWikiMethod};
private String m_sWikiTitle = "";
protected String m_sWikiEngineURL = "";
protected String m_sWikiTitle = "";
protected String m_sWikiComment = "";
protected boolean m_bWikiMinorEdit = false;
protected boolean m_bWikiShowBrowser = false;
......@@ -140,9 +140,14 @@ public class WikiPropDialog extends WikiDialog{
}
public void setm_sWikiTitle(String sArticle)
public String GetWikiTitle()
{
this.m_sWikiTitle = sArticle;
return m_sWikiTitle;
}
public void SetWikiTitle(String sArticle)
{
m_sWikiTitle = sArticle;
try
{
XPropertySet xPS = GetPropSet("ArticleText");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment