1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
/* This file is part of the KDE project
Copyright (C) 2002 Laurent MONTEL <lmontel@mandrakesoft.com>
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, or (at your option) any later version.
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 "KWordTextFrameSetEditIface.h"
#include "KWTextFrameSet.h"
#include <dcopclient.h>
#include "defs.h"
KWordTextFrameSetEditIface::KWordTextFrameSetEditIface( KWTextFrameSetEdit *_framesetedit )
:KoTextViewIface(_framesetedit)
{
m_framesetedit = _framesetedit;
}
void KWordTextFrameSetEditIface::insertExpression(const TQString &_c)
{
m_framesetedit->insertExpression(_c);
}
void KWordTextFrameSetEditIface::insertFrameBreak()
{
m_framesetedit->insertFrameBreak();
}
void KWordTextFrameSetEditIface::insertVariable( int type, int subtype )
{
m_framesetedit->insertVariable(type,subtype);
}
void KWordTextFrameSetEditIface::insertCustomVariable( const TQString &name)
{
m_framesetedit->insertCustomVariable(name);
}
void KWordTextFrameSetEditIface::insertLink(const TQString &_linkName, const TQString & hrefName)
{
m_framesetedit->insertLink(_linkName,hrefName);
}
void KWordTextFrameSetEditIface::insertTOC()
{
m_framesetedit->insertTOC();
}
void KWordTextFrameSetEditIface::cut()
{
m_framesetedit->cut();
}
void KWordTextFrameSetEditIface::copy()
{
m_framesetedit->copy();
}
void KWordTextFrameSetEditIface::paste()
{
m_framesetedit->paste();
}
void KWordTextFrameSetEditIface::insertNonbreakingSpace()
{
m_framesetedit->insertNonbreakingSpace();
}
void KWordTextFrameSetEditIface::insertVariable( const TQString & var)
{
if( var=="DATE")
m_framesetedit->insertVariable(0,1);
else if (var=="FIXED-DATE")
m_framesetedit->insertVariable(0,0);
else if (var=="TIME")
m_framesetedit->insertVariable(2,1);
else if (var=="FIXED-TIME")
m_framesetedit->insertVariable(2,0);
else if (var=="FILENAME")
m_framesetedit->insertVariable(8,0);
else if (var=="AUTHORNAME")
m_framesetedit->insertVariable(8,2);
else if (var=="EMAIL")
m_framesetedit->insertVariable(8,3);
else if (var=="TITLE")
m_framesetedit->insertVariable(8,10);
else if (var=="ABSTRACT")
m_framesetedit->insertVariable(8,11);
else if (var=="DIRECTORYNAME")
m_framesetedit->insertVariable(8,1);
else if (var=="COMPANYNAME")
m_framesetedit->insertVariable(8,4);
else if (var=="PATHFILENAME")
m_framesetedit->insertVariable(8,5);
else if (var=="FILENAMEWITHOUTEXTENSION")
m_framesetedit->insertVariable(8,6);
else if (var=="CURRENTPAGE")
m_framesetedit->insertVariable(4,0);
else if (var=="TOTALPAGE")
m_framesetedit->insertVariable(8,1);
else if (var=="TELEPHONE")
m_framesetedit->insertVariable(8,7);
else if (var=="FAX")
m_framesetedit->insertVariable(8,8);
else if (var=="COUNTRY")
m_framesetedit->insertVariable(8,9);
else if (var=="POSTAL_CODE")
m_framesetedit->insertVariable(8,12);
else if (var=="CITY")
m_framesetedit->insertVariable(8,13);
else if (var=="STREET")
m_framesetedit->insertVariable(8,14);
}
void KWordTextFrameSetEditIface::insertComment(const TQString &_comment)
{
m_framesetedit->insertComment(_comment);
}
void KWordTextFrameSetEditIface::insertAutoFootNote( const TQString & type )
{
if ( type.lower() =="footnote")
{
m_framesetedit->insertFootNote( FootNote, KWFootNoteVariable::Auto, TQString());
}
else if ( type.lower()=="endnote")
{
m_framesetedit->insertFootNote( EndNote, KWFootNoteVariable::Auto, TQString());
}
}
void KWordTextFrameSetEditIface::insertManualFootNote( const TQString & type, const TQString & noteText )
{
if ( type.lower() =="footnote")
{
m_framesetedit->insertFootNote( FootNote, KWFootNoteVariable::Manual, noteText);
}
else if ( type.lower()=="endnote")
{
m_framesetedit->insertFootNote( EndNote, KWFootNoteVariable::Manual, noteText);
}
}
void KWordTextFrameSetEditIface::selectAll()
{
m_framesetedit->selectAll();
}
|