1*3ec042d8SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*3ec042d8SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*3ec042d8SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*3ec042d8SAndrew Rist * distributed with this work for additional information 6*3ec042d8SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*3ec042d8SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*3ec042d8SAndrew Rist * "License"); you may not use this file except in compliance 9*3ec042d8SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*3ec042d8SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*3ec042d8SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*3ec042d8SAndrew Rist * software distributed under the License is distributed on an 15*3ec042d8SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*3ec042d8SAndrew Rist * KIND, either express or implied. See the License for the 17*3ec042d8SAndrew Rist * specific language governing permissions and limitations 18*3ec042d8SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*3ec042d8SAndrew Rist *************************************************************/ 21*3ec042d8SAndrew Rist 22*3ec042d8SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #include <stdio.h> 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <svinterf.h> 27cdf0e10cSrcweir #include <cmdid.h> 28cdf0e10cSrcweir 29cdf0e10cSrcweir static char pEmpty[] = ""; 30cdf0e10cSrcweir 31cdf0e10cSrcweir extern void *pSvClient; 32cdf0e10cSrcweir 33cdf0e10cSrcweir /* WRITER */ 34cdf0e10cSrcweir short SwInsertDocument (void *pHandle, 35cdf0e10cSrcweir const char *pFileName, 36cdf0e10cSrcweir const char *pFilter) 37cdf0e10cSrcweir { 38cdf0e10cSrcweir return 0; 39cdf0e10cSrcweir } 40cdf0e10cSrcweir 41cdf0e10cSrcweir /**************************************************************************/ 42cdf0e10cSrcweir 43cdf0e10cSrcweir /* WRITER */ 44cdf0e10cSrcweir short SwDeleteTableColumns (void *pHandle) 45cdf0e10cSrcweir { 46cdf0e10cSrcweir if (SvIPCIsConnected()) 47cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_DELETE_COL | 0x10000, 48cdf0e10cSrcweir pHandle,0,pEmpty); 49cdf0e10cSrcweir return 0; 50cdf0e10cSrcweir } 51cdf0e10cSrcweir 52cdf0e10cSrcweir /* WRITER */ 53cdf0e10cSrcweir short SwDeleteTableRows (void *pHandle) 54cdf0e10cSrcweir { 55cdf0e10cSrcweir if (SvIPCIsConnected()) 56cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_DELETE_ROW | 0x10000, 57cdf0e10cSrcweir pHandle,0,pEmpty); 58cdf0e10cSrcweir return 0; 59cdf0e10cSrcweir } 60cdf0e10cSrcweir 61cdf0e10cSrcweir /* WRITER */ 62cdf0e10cSrcweir short SwGotoStartOfTable (void *pHandle) 63cdf0e10cSrcweir { 64cdf0e10cSrcweir if (SvIPCIsConnected()) 65cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_START_TABLE | 0x10000, 66cdf0e10cSrcweir pHandle,0,pEmpty); 67cdf0e10cSrcweir return 0; 68cdf0e10cSrcweir } 69cdf0e10cSrcweir 70cdf0e10cSrcweir /* WRITER */ 71cdf0e10cSrcweir short SwGotoEndOfTable (void *pHandle) 72cdf0e10cSrcweir { 73cdf0e10cSrcweir if (SvIPCIsConnected()) 74cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_END_TABLE | 0x10000, 75cdf0e10cSrcweir pHandle,0,pEmpty); 76cdf0e10cSrcweir return 0; 77cdf0e10cSrcweir } 78cdf0e10cSrcweir 79cdf0e10cSrcweir /* WRITER */ 80cdf0e10cSrcweir short SwGotoNextTable (void *pHandle) 81cdf0e10cSrcweir { 82cdf0e10cSrcweir return 0; 83cdf0e10cSrcweir } 84cdf0e10cSrcweir 85cdf0e10cSrcweir /* WRITER */ 86cdf0e10cSrcweir short SwGotoPrevTable (void *pHandle) 87cdf0e10cSrcweir { 88cdf0e10cSrcweir return 0; 89cdf0e10cSrcweir } 90cdf0e10cSrcweir 91cdf0e10cSrcweir /* WRITER */ 92cdf0e10cSrcweir short SwSelectTableRow (void *pHandle) 93cdf0e10cSrcweir { 94cdf0e10cSrcweir if (SvIPCIsConnected()) 95cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_ROW | 0x10000, 96cdf0e10cSrcweir pHandle,0,pEmpty); 97cdf0e10cSrcweir return 0; 98cdf0e10cSrcweir } 99cdf0e10cSrcweir 100cdf0e10cSrcweir /* WRITER */ 101cdf0e10cSrcweir short SwSelectTableColumn (void *pHandle) 102cdf0e10cSrcweir { 103cdf0e10cSrcweir if (SvIPCIsConnected()) 104cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_COL | 0x10000, 105cdf0e10cSrcweir pHandle,0,pEmpty); 106cdf0e10cSrcweir return 0; 107cdf0e10cSrcweir } 108cdf0e10cSrcweir 109cdf0e10cSrcweir /* WRITER */ 110cdf0e10cSrcweir short SwTableSelect (void *pHandle) 111cdf0e10cSrcweir { 112cdf0e10cSrcweir if (SvIPCIsConnected()) 113cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_TABLE_SELECT_ALL | 0x10000, 114cdf0e10cSrcweir pHandle,0,pEmpty); 115cdf0e10cSrcweir return 0; 116cdf0e10cSrcweir } 117cdf0e10cSrcweir 118cdf0e10cSrcweir /* WRITER */ 119cdf0e10cSrcweir short SwInsertTable (void *pHandle, const char *pName, 120cdf0e10cSrcweir unsigned short nRow, unsigned short nColumn) 121cdf0e10cSrcweir { 122cdf0e10cSrcweir if (SvIPCIsConnected()) 123cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_TABLE | 0x10000, 124cdf0e10cSrcweir pHandle,0,"hh",nRow,nColumn); 125cdf0e10cSrcweir return 0; 126cdf0e10cSrcweir 127cdf0e10cSrcweir } 128cdf0e10cSrcweir 129cdf0e10cSrcweir /**************************************************************************/ 130cdf0e10cSrcweir 131cdf0e10cSrcweir /* WRITER */ 132cdf0e10cSrcweir short SwCharLeft(void *pHandle, unsigned short nCount, unsigned short bSelect) 133cdf0e10cSrcweir { 134cdf0e10cSrcweir if (SvIPCIsConnected()) 135cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_CHAR_LEFT | 0x10000, 136cdf0e10cSrcweir pHandle,0,"hb",nCount,bSelect); 137cdf0e10cSrcweir return 0; 138cdf0e10cSrcweir } 139cdf0e10cSrcweir 140cdf0e10cSrcweir /* WRITER */ 141cdf0e10cSrcweir short SwCharRight(void *pHandle, unsigned short nCount, unsigned short bSelect) 142cdf0e10cSrcweir { 143cdf0e10cSrcweir if (SvIPCIsConnected()) 144cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_CHAR_RIGHT | 0x10000, 145cdf0e10cSrcweir pHandle,0,"hb",nCount,bSelect); 146cdf0e10cSrcweir return 0; 147cdf0e10cSrcweir } 148cdf0e10cSrcweir 149cdf0e10cSrcweir /* WRITER */ 150cdf0e10cSrcweir short SwLineUp(void *pHandle, unsigned short nCount, unsigned short bSelect) 151cdf0e10cSrcweir { 152cdf0e10cSrcweir if (SvIPCIsConnected()) 153cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_LINE_UP | 0x10000, 154cdf0e10cSrcweir pHandle,0,"hb",nCount,bSelect); 155cdf0e10cSrcweir return 0; 156cdf0e10cSrcweir } 157cdf0e10cSrcweir 158cdf0e10cSrcweir /* WRITER */ 159cdf0e10cSrcweir short SwLineDown(void *pHandle, unsigned short nCount, unsigned short bSelect) 160cdf0e10cSrcweir { 161cdf0e10cSrcweir if (SvIPCIsConnected()) 162cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_LINE_DOWN | 0x10000, 163cdf0e10cSrcweir pHandle,0,"hb",nCount,bSelect); 164cdf0e10cSrcweir return 0; 165cdf0e10cSrcweir } 166cdf0e10cSrcweir 167cdf0e10cSrcweir /**************************************************************************/ 168cdf0e10cSrcweir 169cdf0e10cSrcweir /* WRITER */ 170cdf0e10cSrcweir const char *SwGetSelectedText(void *pHandle) 171cdf0e10cSrcweir { 172cdf0e10cSrcweir if (SvIPCIsConnected()) 173cdf0e10cSrcweir return pIPCCallStringFunction(SvIPCGetClient(),FN_GET_SELECTED_TEXT, 174cdf0e10cSrcweir pHandle,0,pEmpty); 175cdf0e10cSrcweir return NULL; 176cdf0e10cSrcweir } 177cdf0e10cSrcweir 178cdf0e10cSrcweir /* WRITER */ 179cdf0e10cSrcweir short SwInsertString(void *pHandle,const char *pString) 180cdf0e10cSrcweir { 181cdf0e10cSrcweir if (SvIPCIsConnected()) 182cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_STRING | 0x10000, 183cdf0e10cSrcweir pHandle,0,"s",pString); 184cdf0e10cSrcweir return 0; 185cdf0e10cSrcweir } 186cdf0e10cSrcweir 187cdf0e10cSrcweir /* WRITER */ 188cdf0e10cSrcweir extern short SwInsertLineBreak(void *pHandle) 189cdf0e10cSrcweir { 190cdf0e10cSrcweir if (SvIPCIsConnected()) 191cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_INSERT_LINEBREAK | 0x10000, 192cdf0e10cSrcweir pHandle,0,pEmpty); 193cdf0e10cSrcweir return 0; 194cdf0e10cSrcweir } 195cdf0e10cSrcweir 196cdf0e10cSrcweir /**************************************************************************/ 197cdf0e10cSrcweir 198cdf0e10cSrcweir /* WRITER */ 199cdf0e10cSrcweir short SwDelLeft (void *pHandle) 200cdf0e10cSrcweir { 201cdf0e10cSrcweir if (SvIPCIsConnected()) 202cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_BACKSPACE | 0x10000, 203cdf0e10cSrcweir pHandle,0,pEmpty); 204cdf0e10cSrcweir return 0; 205cdf0e10cSrcweir } 206cdf0e10cSrcweir 207cdf0e10cSrcweir /* WRITER */ 208cdf0e10cSrcweir short SwDelRight (void *pHandle) 209cdf0e10cSrcweir { 210cdf0e10cSrcweir if (SvIPCIsConnected()) 211cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_DELETE | 0x10000, 212cdf0e10cSrcweir pHandle,0,pEmpty); 213cdf0e10cSrcweir return 0; 214cdf0e10cSrcweir } 215cdf0e10cSrcweir 216cdf0e10cSrcweir /* WRITER */ 217cdf0e10cSrcweir short SwDelLine (void *pHandle) 218cdf0e10cSrcweir { 219cdf0e10cSrcweir if (SvIPCIsConnected()) 220cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_DELETE_WHOLE_LINE | 0x10000, 221cdf0e10cSrcweir pHandle,0,pEmpty); 222cdf0e10cSrcweir return 0; 223cdf0e10cSrcweir } 224cdf0e10cSrcweir 225cdf0e10cSrcweir /**************************************************************************/ 226cdf0e10cSrcweir 227cdf0e10cSrcweir /* WRITER */ 228cdf0e10cSrcweir short SwCharDlg(void *pHandle) 229cdf0e10cSrcweir { 230cdf0e10cSrcweir if (SvIPCIsConnected()) 231cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_FORMAT_CHAR_DLG | 0x10000, 232cdf0e10cSrcweir pHandle,0,pEmpty); 233cdf0e10cSrcweir return 0; 234cdf0e10cSrcweir } 235cdf0e10cSrcweir 236cdf0e10cSrcweir /* WRITER */ 237cdf0e10cSrcweir short SwParagrDlg(void *pHandle) 238cdf0e10cSrcweir { 239cdf0e10cSrcweir if (SvIPCIsConnected()) 240cdf0e10cSrcweir return pIPCCallShortFunction(SvIPCGetClient(),FN_FORMAT_PARA_DLG | 0x10000, 241cdf0e10cSrcweir pHandle,0,pEmpty); 242cdf0e10cSrcweir return 0; 243cdf0e10cSrcweir } 244cdf0e10cSrcweir 245cdf0e10cSrcweir 246