bump product version to 4.1.6.2
[LibreOffice.git] / sw / sdi / swinterf.c
blob1888f919e687724d95086302333e1af20adfdfaa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <stdio.h>
22 #include <svinterf.h>
23 #include <cmdid.h>
25 static char pEmpty[] = "";
27 extern void *pSvClient;
29 /* WRITER */
30 short SwInsertDocument (void *pHandle,
31 const char *pFileName,
32 const char *pFilter)
34 return 0;
37 /**************************************************************************/
39 /* WRITER */
40 short SwDeleteTableColumns (void *pHandle)
42 if (SvIPCIsConnected())
43 return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_DELETE_COL | 0x10000,
44 pHandle,0,pEmpty);
45 return 0;
48 /* WRITER */
49 short SwDeleteTableRows (void *pHandle)
51 if (SvIPCIsConnected())
52 return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_DELETE_ROW | 0x10000,
53 pHandle,0,pEmpty);
54 return 0;
57 /* WRITER */
58 short SwGotoStartOfTable (void *pHandle)
60 if (SvIPCIsConnected())
61 return pIPCCallShortFunction(SvIPCGetClient(),FN_START_TABLE | 0x10000,
62 pHandle,0,pEmpty);
63 return 0;
66 /* WRITER */
67 short SwGotoEndOfTable (void *pHandle)
69 if (SvIPCIsConnected())
70 return pIPCCallShortFunction(SvIPCGetClient(),FN_END_TABLE | 0x10000,
71 pHandle,0,pEmpty);
72 return 0;
75 /* WRITER */
76 short SwGotoNextTable (void *pHandle)
78 return 0;
81 /* WRITER */
82 short SwGotoPrevTable (void *pHandle)
84 return 0;
87 /* WRITER */
88 short SwSelectTableRow (void *pHandle)
90 if (SvIPCIsConnected())
91 return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_ROW | 0x10000,
92 pHandle,0,pEmpty);
93 return 0;
96 /* WRITER */
97 short SwSelectTableColumn (void *pHandle)
99 if (SvIPCIsConnected())
100 return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_COL | 0x10000,
101 pHandle,0,pEmpty);
102 return 0;
105 /* WRITER */
106 short SwTableSelect (void *pHandle)
108 if (SvIPCIsConnected())
109 return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_ALL | 0x10000,
110 pHandle,0,pEmpty);
111 return 0;
114 /* WRITER */
115 short SwInsertTable (void *pHandle, const char *pName,
116 unsigned short nRow, unsigned short nColumn)
118 if (SvIPCIsConnected())
119 return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_TABLE | 0x10000,
120 pHandle,0,"hh",nRow,nColumn);
121 return 0;
125 /**************************************************************************/
127 /* WRITER */
128 short SwCharLeft(void *pHandle, unsigned short nCount, unsigned short bSelect)
130 if (SvIPCIsConnected())
131 return pIPCCallShortFunction(SvIPCGetClient(),FN_CHAR_LEFT | 0x10000,
132 pHandle,0,"hb",nCount,bSelect);
133 return 0;
136 /* WRITER */
137 short SwCharRight(void *pHandle, unsigned short nCount, unsigned short bSelect)
139 if (SvIPCIsConnected())
140 return pIPCCallShortFunction(SvIPCGetClient(),FN_CHAR_RIGHT | 0x10000,
141 pHandle,0,"hb",nCount,bSelect);
142 return 0;
145 /* WRITER */
146 short SwLineUp(void *pHandle, unsigned short nCount, unsigned short bSelect)
148 if (SvIPCIsConnected())
149 return pIPCCallShortFunction(SvIPCGetClient(),FN_LINE_UP | 0x10000,
150 pHandle,0,"hb",nCount,bSelect);
151 return 0;
154 /* WRITER */
155 short SwLineDown(void *pHandle, unsigned short nCount, unsigned short bSelect)
157 if (SvIPCIsConnected())
158 return pIPCCallShortFunction(SvIPCGetClient(),FN_LINE_DOWN | 0x10000,
159 pHandle,0,"hb",nCount,bSelect);
160 return 0;
163 /**************************************************************************/
165 /* WRITER */
166 const char *SwGetSelectedText(void *pHandle)
168 if (SvIPCIsConnected())
169 return pIPCCallStringFunction(SvIPCGetClient(),FN_GET_SELECTED_TEXT,
170 pHandle,0,pEmpty);
171 return NULL;
174 /* WRITER */
175 short SwInsertString(void *pHandle,const char *pString)
177 if (SvIPCIsConnected())
178 return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_STRING | 0x10000,
179 pHandle,0,"s",pString);
180 return 0;
183 /* WRITER */
184 extern short SwInsertLineBreak(void *pHandle)
186 if (SvIPCIsConnected())
187 return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_LINEBREAK | 0x10000,
188 pHandle,0,pEmpty);
189 return 0;
192 /**************************************************************************/
194 /* WRITER */
195 short SwDelLeft (void *pHandle)
197 if (SvIPCIsConnected())
198 return pIPCCallShortFunction(SvIPCGetClient(),FN_BACKSPACE | 0x10000,
199 pHandle,0,pEmpty);
200 return 0;
203 /* WRITER */
204 short SwDelRight (void *pHandle)
206 if (SvIPCIsConnected())
207 return pIPCCallShortFunction(SvIPCGetClient(),FN_DELETE | 0x10000,
208 pHandle,0,pEmpty);
209 return 0;
212 /* WRITER */
213 short SwDelLine (void *pHandle)
215 if (SvIPCIsConnected())
216 return pIPCCallShortFunction(SvIPCGetClient(),FN_DELETE_WHOLE_LINE | 0x10000,
217 pHandle,0,pEmpty);
218 return 0;
221 /**************************************************************************/
223 /* WRITER */
224 short SwCharDlg(void *pHandle)
226 if (SvIPCIsConnected())
227 return pIPCCallShortFunction(SvIPCGetClient(),FN_FORMAT_CHAR_DLG | 0x10000,
228 pHandle,0,pEmpty);
229 return 0;
232 /* WRITER */
233 short SwParagrDlg(void *pHandle)
235 if (SvIPCIsConnected())
236 return pIPCCallShortFunction(SvIPCGetClient(),FN_FORMAT_PARA_DLG | 0x10000,
237 pHandle,0,pEmpty);
238 return 0;
242 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */