You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
569 lines
16 KiB
569 lines
16 KiB
15 years ago
|
/* This file is part of the KDE project
|
||
|
Copyright (C) 2000 David Faure <faure@kde.org>
|
||
|
|
||
|
This library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License as published by the Free Software Foundation; either
|
||
|
version 2 of the License.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
* Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
#include "KoDocument.h"
|
||
|
#include "KoDocumentIface.h"
|
||
|
#include "KoDocumentInfoDlg.h"
|
||
|
#include "KoDocumentInfo.h"
|
||
|
#include "KoView.h"
|
||
12 years ago
|
#include <tdeapplication.h>
|
||
15 years ago
|
#include <dcopclient.h>
|
||
|
#include <kdcopactionproxy.h>
|
||
12 years ago
|
#include <tdeaction.h>
|
||
15 years ago
|
#include <kdebug.h>
|
||
|
#include <kdcoppropertyproxy.h>
|
||
|
|
||
|
//static
|
||
14 years ago
|
TQCString KoDocumentIface::newIfaceName()
|
||
15 years ago
|
{
|
||
|
static int s_docIFNumber = 0;
|
||
14 years ago
|
TQCString name; name.setNum( s_docIFNumber++ ); name.prepend("Document-");
|
||
15 years ago
|
return name;
|
||
|
}
|
||
|
|
||
|
KoDocumentIface::KoDocumentIface( KoDocument * doc, const char * name )
|
||
14 years ago
|
: DCOPObject( name ? TQCString(name) : newIfaceName() )
|
||
15 years ago
|
{
|
||
|
m_pDoc = doc;
|
||
|
m_actionProxy = new KDCOPActionProxy( doc->actionCollection(), this );
|
||
|
}
|
||
|
|
||
|
KoDocumentIface::~KoDocumentIface()
|
||
|
{
|
||
|
delete m_actionProxy;
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::openURL( TQString url )
|
||
15 years ago
|
{
|
||
|
m_pDoc->openURL( KURL( url ) );
|
||
|
}
|
||
|
|
||
|
bool KoDocumentIface::isLoading()
|
||
|
{
|
||
|
return m_pDoc->isLoading();
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::url()
|
||
15 years ago
|
{
|
||
|
return m_pDoc->url().url();
|
||
|
}
|
||
|
|
||
|
bool KoDocumentIface::isModified()
|
||
|
{
|
||
|
return m_pDoc->isModified();
|
||
|
}
|
||
|
|
||
|
int KoDocumentIface::viewCount()
|
||
|
{
|
||
|
return m_pDoc->viewCount();
|
||
|
}
|
||
|
|
||
|
DCOPRef KoDocumentIface::view( int idx )
|
||
|
{
|
||
14 years ago
|
TQPtrList<KoView> views = m_pDoc->views();
|
||
15 years ago
|
KoView *v = views.at( idx );
|
||
|
if ( !v )
|
||
|
return DCOPRef();
|
||
|
|
||
|
DCOPObject *obj = v->dcopObject();
|
||
|
|
||
|
if ( !obj )
|
||
|
return DCOPRef();
|
||
|
|
||
|
return DCOPRef( kapp->dcopClient()->appId(), obj->objId() );
|
||
|
}
|
||
|
|
||
14 years ago
|
DCOPRef KoDocumentIface::action( const TQCString &name )
|
||
15 years ago
|
{
|
||
|
return DCOPRef( kapp->dcopClient()->appId(), m_actionProxy->actionObjectId( name ) );
|
||
|
}
|
||
|
|
||
|
QCStringList KoDocumentIface::actions()
|
||
|
{
|
||
|
QCStringList res;
|
||
12 years ago
|
TQValueList<TDEAction *> lst = m_actionProxy->actions();
|
||
|
TQValueList<TDEAction *>::ConstIterator it = lst.begin();
|
||
|
TQValueList<TDEAction *>::ConstIterator end = lst.end();
|
||
15 years ago
|
for (; it != end; ++it )
|
||
|
res.append( (*it)->name() );
|
||
|
|
||
|
return res;
|
||
|
}
|
||
|
|
||
14 years ago
|
TQMap<TQCString,DCOPRef> KoDocumentIface::actionMap()
|
||
15 years ago
|
{
|
||
|
return m_actionProxy->actionMap();
|
||
|
}
|
||
|
|
||
|
void KoDocumentIface::save()
|
||
|
{
|
||
|
m_pDoc->save();
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::saveAs( const TQString & url )
|
||
15 years ago
|
{
|
||
|
m_pDoc->saveAs( KURL( url ) );
|
||
|
m_pDoc->waitSaveComplete(); // see ReadWritePart
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setOutputMimeType( const TQCString & mimetype )
|
||
15 years ago
|
{
|
||
|
m_pDoc->setOutputMimeType( mimetype );
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoAuthorName() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return authorPage->fullName();
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoEmail() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return authorPage->email();
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoCompanyName() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return authorPage->company();
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoTelephone() const
|
||
15 years ago
|
{
|
||
|
kdDebug()<<" Keep compatibility with koffice <= 1.3 : use documentInfoTelephoneWork\n";
|
||
|
return documentInfoTelephoneWork();
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoTelephoneWork() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return authorPage->telephoneWork();
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoTelephoneHome() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return authorPage->telephoneHome();
|
||
|
}
|
||
|
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoFax() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return authorPage->fax();
|
||
|
|
||
|
}
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoCountry() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return authorPage->country();
|
||
|
|
||
|
}
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoPostalCode() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return authorPage->postalCode();
|
||
|
|
||
|
}
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoCity() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return authorPage->city();
|
||
|
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoInitial() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return authorPage->initial();
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoAuthorPostion() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return authorPage->position();
|
||
|
}
|
||
|
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoStreet() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return authorPage->street();
|
||
|
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoTitle() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
|
||
|
if ( !aboutPage )
|
||
|
{
|
||
|
kdWarning() << "'About' page not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return aboutPage->title();
|
||
|
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoAbstract() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
|
||
|
if ( !aboutPage )
|
||
|
{
|
||
|
kdWarning() << "'About' page not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return aboutPage->abstract();
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoKeywords() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
|
||
|
if ( !aboutPage )
|
||
|
{
|
||
|
kdWarning() << "'About' page not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return aboutPage->keywords();
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString KoDocumentIface::documentInfoSubject() const
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
|
||
|
if ( !aboutPage )
|
||
|
{
|
||
|
kdWarning() << "'About' page not found in documentInfo !" << endl;
|
||
14 years ago
|
return TQString();
|
||
15 years ago
|
}
|
||
|
else
|
||
|
return aboutPage->subject();
|
||
|
}
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoKeywords(const TQString & text )
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
|
||
|
if ( !aboutPage )
|
||
|
{
|
||
|
kdWarning() << "'About' page not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
aboutPage->setKeywords(text);
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoSubject(const TQString & text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
|
||
|
if ( !aboutPage )
|
||
|
{
|
||
|
kdWarning() << "'About' page not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
aboutPage->setSubject(text);
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoAuthorName(const TQString & text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
authorPage->setFullName(text);
|
||
|
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoEmail(const TQString &text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
authorPage->setEmail(text);
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoCompanyName(const TQString &text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
authorPage->setCompany(text);
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoAuthorPosition(const TQString &text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
authorPage->setPosition(text);
|
||
|
}
|
||
|
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoTelephone(const TQString &text)
|
||
15 years ago
|
{
|
||
|
kdDebug()<<"Keep compatibility with koffice <= 1.3 : use setDocumentInfoTelephoneWork\n";
|
||
|
setDocumentInfoTelephoneWork(text);
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoTelephoneWork(const TQString &text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
authorPage->setTelephoneWork(text);
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoTelephoneHome(const TQString &text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
authorPage->setTelephoneHome(text);
|
||
|
}
|
||
|
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoFax(const TQString &text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
authorPage->setFax(text);
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoCountry(const TQString &text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
authorPage->setCountry(text);
|
||
|
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoTitle(const TQString & text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
|
||
|
if ( !aboutPage )
|
||
|
{
|
||
|
kdWarning() << "'About' page not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
aboutPage->setTitle(text);
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoPostalCode(const TQString &text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
authorPage->setPostalCode(text);
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoCity(const TQString & text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
authorPage->setCity(text);
|
||
|
}
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoInitial(const TQString & text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
authorPage->setInitial(text);
|
||
|
}
|
||
|
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoStreet(const TQString &text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
|
||
|
if ( !authorPage )
|
||
|
{
|
||
|
kdWarning() << "Author information not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
authorPage->setStreet(text);
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
14 years ago
|
void KoDocumentIface::setDocumentInfoAbstract(const TQString &text)
|
||
15 years ago
|
{
|
||
|
KoDocumentInfo * info = m_pDoc->documentInfo();
|
||
|
KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" ));
|
||
|
if ( !aboutPage )
|
||
|
{
|
||
|
kdWarning() << "'About' page not found in documentInfo !" << endl;
|
||
|
}
|
||
|
else
|
||
|
aboutPage->setAbstract(text);
|
||
|
}
|
||
|
|
||
|
QCStringList KoDocumentIface::functionsDynamic()
|
||
|
{
|
||
|
return DCOPObject::functionsDynamic() + KDCOPPropertyProxy::functions( m_pDoc );
|
||
|
}
|
||
|
|
||
14 years ago
|
bool KoDocumentIface::processDynamic( const TQCString &fun, const TQByteArray &data,
|
||
|
TQCString& replyType, TQByteArray &replyData )
|
||
15 years ago
|
{
|
||
|
if ( KDCOPPropertyProxy::isPropertyRequest( fun, m_pDoc ) )
|
||
|
return KDCOPPropertyProxy::processPropertyRequest( fun, data, replyType, replyData, m_pDoc );
|
||
|
|
||
|
return DCOPObject::processDynamic( fun, data, replyType, replyData );
|
||
|
}
|
||
|
|