[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: KWord variables
From:       Chris Howells <chris () chrishowells ! co ! uk>
Date:       2001-12-07 16:48:23
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 07 December 2001 9:41 am, Lukas Tinkl wrote:
> a typo :)
>
> it's i18n(), not il8n()
>
> P.S. Change your font! ;)

Damn! Damn! Damn! Hmm, OK I *know* it's meant to be i18n, not il8n -- just 
remembering that is the problem.

Thanks.

New patch is attached.

It compiles fine, although I haven't actually tested that the variable gives 
the right result, because of the font problems in KWord making it illegilbe 
(Thomas, how do you manage despite this?)

Does it look alright to commit?

- -- 
Cheers, Chris Howells -- chris@chrishowells.co.uk, howells@kde.org
Web: http://chrishowells.co.uk, PGP key: http://chrishowells.co.uk/pgp.txt
KDE: http://www.koffice.org, http://edu.kde.org, http://usability.kde.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8EPLdF8Iu1zN5WiwRAqBDAJsEHSC48k3IguU5scBQtUzEqV2PrgCdH9tt
evuw3OLLPHL61mzXFQ9McQs=
=0MNJ
-----END PGP SIGNATURE-----

["kword.diff" (text/x-diff)]

? filters/kword/libexportold/Makefile.in
? filters/kword/libexportold/Makefile
? kpresenter/mimetypes
? kspread/mimetypes
Index: lib/kotext/koVariable.cc
===================================================================
RCS file: /home/kde/koffice/lib/kotext/koVariable.cc,v
retrieving revision 1.3
diff -u -3 -p -r1.3 koVariable.cc
--- lib/kotext/koVariable.cc	2001/12/04 09:34:10	1.3
+++ lib/kotext/koVariable.cc	2001/12/07 16:41:42
@@ -645,6 +645,9 @@ void KoFieldVariable::recalc()
         case VST_DIRECTORYNAME:
             m_value = m_doc->url().directory();
             break;
+	case VST_PATHFILENAME:
+	 m_value = m_doc->url().path();
+	 break;
         case VST_AUTHORNAME:
         case VST_EMAIL:
         case VST_COMPANYNAME:
@@ -695,7 +698,7 @@ QStringList KoFieldVariable::actionTexts
     lst << i18n( "Author Name" ); // is "Name" necessary ?
     lst << i18n( "Email" );
     lst << i18n( "Company Name" ); // is "Name" necessary ?
-    lst << QString::null; //5
+    lst << i18n( "Path and File Name" );
     lst << QString::null; //6
     lst << QString::null; //7
     lst << QString::null; //8
Index: lib/kotext/koVariable.h
===================================================================
RCS file: /home/kde/koffice/lib/kotext/koVariable.h,v
retrieving revision 1.2
diff -u -3 -p -r1.2 koVariable.h
--- lib/kotext/koVariable.h	2001/12/04 09:34:10	1.2
+++ lib/kotext/koVariable.h	2001/12/07 16:41:45
@@ -156,11 +156,11 @@ public:
     void registerVariable( KoVariable *var );
     void unregisterVariable( KoVariable *var );
     void recalcVariables(int type);
-    
+
     // For custom variables
     void setVariableValue( const QString &name, const QString &value );
     QString getVariableValue( const QString &name ) const;
-    
+
     const QPtrList<KoVariable>& getVariables() const {
         return variables;
     }
@@ -331,6 +331,7 @@ public:
     enum FieldSubType { VST_NONE = -1,
                         VST_FILENAME = 0, VST_DIRECTORYNAME = 1,
                         VST_AUTHORNAME = 2, VST_EMAIL = 3, VST_COMPANYNAME = 4,
+			VST_PATHFILENAME = 5,
                         // room for more 'author' page info fields if asked for
                         VST_TITLE = 10, VST_ABSTRACT = 11 };
 

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic