1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
25 static char pEmpty
[] = "";
27 extern void *pSvClient
;
30 short SwInsertDocument (void *pHandle
,
31 const char *pFileName
,
37 /**************************************************************************/
40 short SwDeleteTableColumns (void *pHandle
)
42 if (SvIPCIsConnected())
43 return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_DELETE_COL
| 0x10000,
49 short SwDeleteTableRows (void *pHandle
)
51 if (SvIPCIsConnected())
52 return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_DELETE_ROW
| 0x10000,
58 short SwGotoStartOfTable (void *pHandle
)
60 if (SvIPCIsConnected())
61 return pIPCCallShortFunction(SvIPCGetClient(),FN_START_TABLE
| 0x10000,
67 short SwGotoEndOfTable (void *pHandle
)
69 if (SvIPCIsConnected())
70 return pIPCCallShortFunction(SvIPCGetClient(),FN_END_TABLE
| 0x10000,
76 short SwGotoNextTable (void *pHandle
)
82 short SwGotoPrevTable (void *pHandle
)
88 short SwSelectTableRow (void *pHandle
)
90 if (SvIPCIsConnected())
91 return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_ROW
| 0x10000,
97 short SwSelectTableColumn (void *pHandle
)
99 if (SvIPCIsConnected())
100 return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_COL
| 0x10000,
106 short SwTableSelect (void *pHandle
)
108 if (SvIPCIsConnected())
109 return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_ALL
| 0x10000,
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
);
125 /**************************************************************************/
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
);
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
);
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
);
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
);
163 /**************************************************************************/
166 const char *SwGetSelectedText(void *pHandle
)
168 if (SvIPCIsConnected())
169 return pIPCCallStringFunction(SvIPCGetClient(),FN_GET_SELECTED_TEXT
,
175 short SwInsertString(void *pHandle
,const char *pString
)
177 if (SvIPCIsConnected())
178 return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_STRING
| 0x10000,
179 pHandle
,0,"s",pString
);
184 extern short SwInsertLineBreak(void *pHandle
)
186 if (SvIPCIsConnected())
187 return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_LINEBREAK
| 0x10000,
192 /**************************************************************************/
195 short SwDelLeft (void *pHandle
)
197 if (SvIPCIsConnected())
198 return pIPCCallShortFunction(SvIPCGetClient(),FN_BACKSPACE
| 0x10000,
204 short SwDelRight (void *pHandle
)
206 if (SvIPCIsConnected())
207 return pIPCCallShortFunction(SvIPCGetClient(),FN_DELETE
| 0x10000,
213 short SwDelLine (void *pHandle
)
215 if (SvIPCIsConnected())
216 return pIPCCallShortFunction(SvIPCGetClient(),FN_DELETE_WHOLE_LINE
| 0x10000,
221 /**************************************************************************/
224 short SwCharDlg(void *pHandle
)
226 if (SvIPCIsConnected())
227 return pIPCCallShortFunction(SvIPCGetClient(),FN_FORMAT_CHAR_DLG
| 0x10000,
233 short SwParagrDlg(void *pHandle
)
235 if (SvIPCIsConnected())
236 return pIPCCallShortFunction(SvIPCGetClient(),FN_FORMAT_PARA_DLG
| 0x10000,
242 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */