macspellimp.cxx (b0844812) | macspellimp.cxx (a44fea77) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 19 unchanged lines hidden (view full) --- 28 29#include <com/sun/star/linguistic2/SpellFailure.hpp> 30#include <cppuhelper/factory.hxx> // helper for factories 31#include <com/sun/star/registry/XRegistryKey.hpp> 32#include <tools/debug.hxx> 33#include <unotools/processfactory.hxx> 34#include <osl/mutex.hxx> 35 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 19 unchanged lines hidden (view full) --- 28 29#include <com/sun/star/linguistic2/SpellFailure.hpp> 30#include <cppuhelper/factory.hxx> // helper for factories 31#include <com/sun/star/registry/XRegistryKey.hpp> 32#include <tools/debug.hxx> 33#include <unotools/processfactory.hxx> 34#include <osl/mutex.hxx> 35 |
36//#include <hunspell.hxx> 37#include <dictmgr.hxx> | |
38#include <macspellimp.hxx> 39 | 36#include <macspellimp.hxx> 37 |
40//#include <linguistic/lngprops.hxx> | |
41#include <linguistic/spelldta.hxx> 42#include <unotools/pathoptions.hxx> 43#include <unotools/useroptions.hxx> 44#include <osl/file.hxx> 45#include <rtl/ustrbuf.hxx> 46 47 48using namespace utl; 49using namespace osl; 50using namespace rtl; 51using namespace com::sun::star; 52using namespace com::sun::star::beans; 53using namespace com::sun::star::lang; 54using namespace com::sun::star::uno; 55using namespace com::sun::star::linguistic2; 56using namespace linguistic; | 38#include <linguistic/spelldta.hxx> 39#include <unotools/pathoptions.hxx> 40#include <unotools/useroptions.hxx> 41#include <osl/file.hxx> 42#include <rtl/ustrbuf.hxx> 43 44 45using namespace utl; 46using namespace osl; 47using namespace rtl; 48using namespace com::sun::star; 49using namespace com::sun::star::beans; 50using namespace com::sun::star::lang; 51using namespace com::sun::star::uno; 52using namespace com::sun::star::linguistic2; 53using namespace linguistic; |
57/////////////////////////////////////////////////////////////////////////// 58// dbg_dump for development 59#if OSL_DEBUG_LEVEL > 1 60#include <rtl/strbuf.hxx> 61#include <rtl/ustring.hxx> | |
62 | 54 |
63const sal_Char *dbg_dump(const rtl::OString &rStr) 64{ 65 static rtl::OStringBuffer aStr; | |
66 | 55 |
67 aStr = rtl::OStringBuffer(rStr); 68 aStr.append(static_cast<char>(0)); 69 return aStr.getStr(); 70} 71 72const sal_Char *dbg_dump(const rtl::OUString &rStr) 73{ 74 return dbg_dump(rtl::OUStringToOString(rStr, RTL_TEXTENCODING_UTF8)); 75} 76 77const sal_Char *dbg_dump(rtl_String *pStr) 78{ 79 return dbg_dump(rtl::OString(pStr)); 80} 81 82const sal_Char *dbg_dump(rtl_uString *pStr) 83{ 84 return dbg_dump(rtl::OUString(pStr)); 85} 86 87#endif 88/////////////////////////////////////////////////////////////////////////// 89 | |
90MacSpellChecker::MacSpellChecker() : 91 aEvtListeners ( GetLinguMutex() ) 92{ | 56MacSpellChecker::MacSpellChecker() : 57 aEvtListeners ( GetLinguMutex() ) 58{ |
93// aDicts = NULL; | |
94 aDEncs = NULL; 95 aDLocs = NULL; 96 aDNames = NULL; 97 bDisposing = sal_False; 98 pPropHelper = NULL; 99 numdict = 0; 100 NSApplicationLoad(); 101 NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 102 macSpell = [NSSpellChecker sharedSpellChecker]; 103 macTag = [NSSpellChecker uniqueSpellDocumentTag]; 104 [pool release]; 105} 106 107 108MacSpellChecker::~MacSpellChecker() 109{ | 59 aDEncs = NULL; 60 aDLocs = NULL; 61 aDNames = NULL; 62 bDisposing = sal_False; 63 pPropHelper = NULL; 64 numdict = 0; 65 NSApplicationLoad(); 66 NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 67 macSpell = [NSSpellChecker sharedSpellChecker]; 68 macTag = [NSSpellChecker uniqueSpellDocumentTag]; 69 [pool release]; 70} 71 72 73MacSpellChecker::~MacSpellChecker() 74{ |
110 // if (aDicts) { 111 // for (int i = 0; i < numdict; i++) { 112 // if (aDicts[i]) delete aDicts[i]; 113 // aDicts[i] = NULL; 114 // } 115 // delete[] aDicts; 116 // } 117 // aDicts = NULL; | |
118 numdict = 0; 119 if (aDEncs) delete[] aDEncs; 120 aDEncs = NULL; 121 if (aDLocs) delete[] aDLocs; 122 aDLocs = NULL; 123 if (aDNames) delete[] aDNames; 124 aDNames = NULL; 125 if (pPropHelper) --- 538 unchanged lines hidden --- | 75 numdict = 0; 76 if (aDEncs) delete[] aDEncs; 77 aDEncs = NULL; 78 if (aDLocs) delete[] aDLocs; 79 aDLocs = NULL; 80 if (aDNames) delete[] aDNames; 81 aDNames = NULL; 82 if (pPropHelper) --- 538 unchanged lines hidden --- |