From b9337e22ce1dbf2eba0e8c8db294ae99f4111f91 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Thu, 18 Apr 2013 18:26:28 +0200 Subject: execute move of global headers see https://gerrit.libreoffice.org/#/c/3367/ and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a --- linguistic/Module_linguistic.mk | 1 - linguistic/Package_inc.mk | 41 ---- linguistic/inc/linguistic/hyphdta.hxx | 136 ----------- linguistic/inc/linguistic/lngdllapi.h | 35 --- linguistic/inc/linguistic/lngprophelp.hxx | 360 ------------------------------ linguistic/inc/linguistic/lngprops.hxx | 55 ----- linguistic/inc/linguistic/misc.hxx | 215 ------------------ linguistic/inc/linguistic/spelldta.hxx | 117 ---------- 8 files changed, 960 deletions(-) delete mode 100644 linguistic/Package_inc.mk delete mode 100644 linguistic/inc/linguistic/hyphdta.hxx delete mode 100644 linguistic/inc/linguistic/lngdllapi.h delete mode 100644 linguistic/inc/linguistic/lngprophelp.hxx delete mode 100644 linguistic/inc/linguistic/lngprops.hxx delete mode 100644 linguistic/inc/linguistic/misc.hxx delete mode 100644 linguistic/inc/linguistic/spelldta.hxx (limited to 'linguistic') diff --git a/linguistic/Module_linguistic.mk b/linguistic/Module_linguistic.mk index 0ef7d04c4c92..956c1bbc2e80 100644 --- a/linguistic/Module_linguistic.mk +++ b/linguistic/Module_linguistic.mk @@ -11,7 +11,6 @@ $(eval $(call gb_Module_Module,linguistic)) $(eval $(call gb_Module_add_targets,linguistic,\ Library_lng \ - Package_inc \ )) #$(eval $(call gb_Module_add_check_targets,linguistic,\ diff --git a/linguistic/Package_inc.mk b/linguistic/Package_inc.mk deleted file mode 100644 index f691b0ac1d21..000000000000 --- a/linguistic/Package_inc.mk +++ /dev/null @@ -1,41 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2011 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org 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 Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -$(eval $(call gb_Package_Package,linguistic_inc,$(SRCDIR)/linguistic/inc)) - -# add files to the package -# SOURCE_RELPATH/file.ext is the name of the source file (relative to the root give above) -# DESTINATION_RELPATH/file.ext is the destination file (relative to $(OUTDIR)) -$(eval $(call gb_Package_add_file,linguistic_inc,inc/linguistic/lngdllapi.h,linguistic/lngdllapi.h)) -$(eval $(call gb_Package_add_file,linguistic_inc,inc/linguistic/hyphdta.hxx,linguistic/hyphdta.hxx)) -$(eval $(call gb_Package_add_file,linguistic_inc,inc/linguistic/lngprophelp.hxx,linguistic/lngprophelp.hxx)) -$(eval $(call gb_Package_add_file,linguistic_inc,inc/linguistic/lngprops.hxx,linguistic/lngprops.hxx)) -$(eval $(call gb_Package_add_file,linguistic_inc,inc/linguistic/misc.hxx,linguistic/misc.hxx)) -$(eval $(call gb_Package_add_file,linguistic_inc,inc/linguistic/spelldta.hxx,linguistic/spelldta.hxx)) - -# vim: set noet sw=4 ts=4: diff --git a/linguistic/inc/linguistic/hyphdta.hxx b/linguistic/inc/linguistic/hyphdta.hxx deleted file mode 100644 index 9dec2d6dc15e..000000000000 --- a/linguistic/inc/linguistic/hyphdta.hxx +++ /dev/null @@ -1,136 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef _LINGUISTIC_HYPHDTA_HXX_ -#define _LINGUISTIC_HYPHDTA_HXX_ - -#include -#include -#include -#include // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type -#include // helper for implementations -#include - -namespace linguistic -{ - -class HyphenatedWord : - public cppu::WeakImplHelper1 - < - ::com::sun::star::linguistic2::XHyphenatedWord - > -{ - OUString aWord; - OUString aHyphenatedWord; - sal_Int16 nHyphPos; - sal_Int16 nHyphenationPos; - sal_Int16 nLanguage; - sal_Bool bIsAltSpelling; - - // disallow copy-constructor and assignment-operator for now - HyphenatedWord(const HyphenatedWord &); - HyphenatedWord & operator = (const HyphenatedWord &); - -public: - HyphenatedWord(const OUString &rWord, sal_Int16 nLang, sal_Int16 nHyphenationPos, - const OUString &rHyphenatedWord, sal_Int16 nHyphenPos ); - virtual ~HyphenatedWord(); - - // XHyphenatedWord - virtual OUString SAL_CALL - getWord() - throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::lang::Locale SAL_CALL - getLocale() - throw(::com::sun::star::uno::RuntimeException); - virtual sal_Int16 SAL_CALL - getHyphenationPos() - throw(::com::sun::star::uno::RuntimeException); - virtual OUString SAL_CALL - getHyphenatedWord() - throw(::com::sun::star::uno::RuntimeException); - virtual sal_Int16 SAL_CALL - getHyphenPos() - throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL - isAlternativeSpelling() - throw(::com::sun::star::uno::RuntimeException); - - OUString GetWord() { return aWord; } - OUString GetHyphenatedWord() { return aHyphenatedWord; } - sal_Int16 GetLanguage() { return nLanguage; } - void SetWord( OUString &rTxt ) { aWord = rTxt; } - void SetHyphenatedWord( OUString &rTxt ) { aHyphenatedWord = rTxt; } - void SetLanguage( sal_Int16 nLang ) { nLanguage = nLang; } - static com::sun::star::uno::Reference LNG_DLLPUBLIC CreateHyphenatedWord( - const OUString &rWord, sal_Int16 nLang, sal_Int16 nHyphenationPos, - const OUString &rHyphenatedWord, sal_Int16 nHyphenPos ); -}; - - -class PossibleHyphens : - public cppu::WeakImplHelper1 - < - ::com::sun::star::linguistic2::XPossibleHyphens - > -{ - OUString aWord; - OUString aWordWithHyphens; - ::com::sun::star::uno::Sequence< sal_Int16 > aOrigHyphenPos; - sal_Int16 nLanguage; - - // disallow copy-constructor and assignment-operator for now - PossibleHyphens(const PossibleHyphens &); - PossibleHyphens & operator = (const PossibleHyphens &); - -public: - PossibleHyphens(const OUString &rWord, sal_Int16 nLang, - const OUString &rHyphWord, - const ::com::sun::star::uno::Sequence< sal_Int16 > &rPositions); - virtual ~PossibleHyphens(); - - // XPossibleHyphens - virtual OUString SAL_CALL - getWord() - throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::lang::Locale SAL_CALL - getLocale() - throw(::com::sun::star::uno::RuntimeException); - virtual OUString SAL_CALL - getPossibleHyphens() - throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL - getHyphenationPositions() - throw(::com::sun::star::uno::RuntimeException); - - OUString GetWord() { return aWord; } - sal_Int16 GetLanguage() { return nLanguage; } - void SetWord( OUString &rTxt ) { aWord = rTxt; } - void SetLanguage( sal_Int16 nLang ) { nLanguage = nLang; } - - static com::sun::star::uno::Reference < com::sun::star::linguistic2::XPossibleHyphens > LNG_DLLPUBLIC CreatePossibleHyphens - (const OUString &rWord, sal_Int16 nLang, - const OUString &rHyphWord, - const ::com::sun::star::uno::Sequence< sal_Int16 > &rPositions); -}; -} // namespace linguistic - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/linguistic/inc/linguistic/lngdllapi.h b/linguistic/inc/linguistic/lngdllapi.h deleted file mode 100644 index 0da35fe7e123..000000000000 --- a/linguistic/inc/linguistic/lngdllapi.h +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef _LNG_DLLAPI_H -#define _LNG_DLLAPI_H - -#include "sal/config.h" -#include "sal/types.h" - -#if defined(LNG_DLLIMPLEMENTATION) -#define LNG_DLLPUBLIC SAL_DLLPUBLIC_EXPORT -#else -#define LNG_DLLPUBLIC SAL_DLLPUBLIC_IMPORT -#endif -#define LNG_DLLPRIVATE SAL_DLLPRIVATE - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/linguistic/inc/linguistic/lngprophelp.hxx b/linguistic/inc/linguistic/lngprophelp.hxx deleted file mode 100644 index 3995d87cc1e4..000000000000 --- a/linguistic/inc/linguistic/lngprophelp.hxx +++ /dev/null @@ -1,360 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef _LINGUISTIC_LNGPROPHELP_HXX_ -#define _LINGUISTIC_LNGPROPHELP_HXX_ - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace com { namespace sun { namespace star { namespace beans { - class XPropertySet; -}}}} - -namespace com { namespace sun { namespace star { namespace linguistic2 { - struct LinguServiceEvent; -}}}} - - -namespace linguistic -{ - -// PropertyChgHelper -// Base class for all XPropertyChangeListener members of the -// various lingu services. - - -// Flags for type of events allowed to be launched -#define AE_SPELLCHECKER 1 -#define AE_HYPHENATOR 2 - -typedef cppu::WeakImplHelper2 -< - ::com::sun::star::beans::XPropertyChangeListener, - ::com::sun::star::linguistic2::XLinguServiceEventBroadcaster -> PropertyChgHelperBase; - -class PropertyChgHelper : - public PropertyChgHelperBase -{ - ::com::sun::star::uno::Sequence< OUString > aPropNames; - ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface > xMyEvtObj; - ::cppu::OInterfaceContainerHelper aLngSvcEvtListeners; - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > xPropSet; - - int nEvtFlags; // flags for event types allowed to be launched - - // default values - sal_Bool bIsIgnoreControlCharacters; - sal_Bool bIsUseDictionaryList; - - // return values, will be set to default value or current temporary value - sal_Bool bResIsIgnoreControlCharacters; - sal_Bool bResIsUseDictionaryList; - - - // disallow use of copy-constructor and assignment-operator - PropertyChgHelper( const PropertyChgHelper & ); - PropertyChgHelper & operator = ( const PropertyChgHelper & ); - -protected: - virtual void SetDefaultValues(); - virtual void GetCurrentValues(); - - ::com::sun::star::uno::Sequence< OUString > & - GetPropNames() { return aPropNames; } - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & - GetPropSet() { return xPropSet; } - - void AddPropNames( const char *pNewNames[], sal_Int32 nCount ); - - virtual sal_Bool propertyChange_Impl( - const ::com::sun::star::beans::PropertyChangeEvent& rEvt ); - -public: - PropertyChgHelper( - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface > &rxSource, - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > &rxPropSet, - int nAllowedEvents ); - virtual ~PropertyChgHelper(); - - virtual void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals ); - - // XEventListener - virtual void SAL_CALL - disposing( const ::com::sun::star::lang::EventObject& rSource ) - throw(::com::sun::star::uno::RuntimeException); - - // XPropertyChangeListener - virtual void SAL_CALL - propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& rEvt ) - throw(::com::sun::star::uno::RuntimeException); - - // XLinguServiceEventBroadcaster - virtual sal_Bool SAL_CALL - addLinguServiceEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener ) - throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL - removeLinguServiceEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener ) - throw(::com::sun::star::uno::RuntimeException); - - // non-UNO functions - void LNG_DLLPUBLIC AddAsPropListener(); - void LNG_DLLPUBLIC RemoveAsPropListener(); - void LaunchEvent( - const ::com::sun::star::linguistic2::LinguServiceEvent& rEvt ); - - const ::com::sun::star::uno::Sequence< OUString > & - GetPropNames() const { return aPropNames; } - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & - GetPropSet() const { return xPropSet; } - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface > & - GetEvtObj() const { return xMyEvtObj; } - - sal_Bool IsIgnoreControlCharacters() const { return bResIsIgnoreControlCharacters; } - sal_Bool IsUseDictionaryList() const { return bResIsUseDictionaryList; } -}; - - -class PropertyHelper_Thes : - public PropertyChgHelper -{ - // disallow use of copy-constructor and assignment-operator - PropertyHelper_Thes( const PropertyHelper_Thes & ); - PropertyHelper_Thes & operator = ( const PropertyHelper_Thes & ); - -public: - PropertyHelper_Thes( - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface > &rxSource, - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > &rxPropSet ); - virtual ~PropertyHelper_Thes(); - - // XPropertyChangeListener - virtual void SAL_CALL - propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& rEvt ) - throw(::com::sun::star::uno::RuntimeException); -}; - -class LNG_DLLPUBLIC PropertyHelper_Thesaurus -{ - PropertyHelper_Thes* pInst; - com::sun::star::uno::Reference< com::sun::star::beans::XPropertyChangeListener > xPropHelper; - - // disallow use of copy-constructor and assignment-operator - PropertyHelper_Thesaurus( const PropertyHelper_Thes & ); - PropertyHelper_Thesaurus & operator = ( const PropertyHelper_Thes & ); - -public: - PropertyHelper_Thesaurus( - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface > &rxSource, - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > &rxPropSet ); - ~PropertyHelper_Thesaurus(); - void AddAsPropListener(); - void RemoveAsPropListener(); - void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals ); -}; - - -class LNG_DLLPUBLIC PropertyHelper_Spell : - public PropertyChgHelper -{ - // default values - sal_Bool bIsSpellUpperCase; - sal_Bool bIsSpellWithDigits; - sal_Bool bIsSpellCapitalization; - - // return values, will be set to default value or current temporary value - sal_Int16 nResMaxNumberOfSuggestions; // special value that is not part of the property set and thus needs to be handled differently - sal_Bool bResIsSpellUpperCase; - sal_Bool bResIsSpellWithDigits; - sal_Bool bResIsSpellCapitalization; - - - // disallow use of copy-constructor and assignment-operator - PropertyHelper_Spell( const PropertyHelper_Spell & ); - PropertyHelper_Spell & operator = ( const PropertyHelper_Spell & ); - -protected: - // PropertyChgHelper - virtual void SetDefaultValues(); - virtual void GetCurrentValues(); - virtual sal_Bool propertyChange_Impl( - const ::com::sun::star::beans::PropertyChangeEvent& rEvt ); - -public: - PropertyHelper_Spell( - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface > &rxSource, - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > &rxPropSet ); - virtual ~PropertyHelper_Spell(); - - virtual void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals ); - - // XPropertyChangeListener - virtual void SAL_CALL - propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& rEvt ) - throw(::com::sun::star::uno::RuntimeException); - - virtual sal_Int16 GetDefaultNumberOfSuggestions() const; - - sal_Int16 GetMaxNumberOfSuggestions() const { return nResMaxNumberOfSuggestions; } - sal_Bool IsSpellUpperCase() const { return bResIsSpellUpperCase; } - sal_Bool IsSpellWithDigits() const { return bResIsSpellWithDigits; } - sal_Bool IsSpellCapitalization() const { return bResIsSpellCapitalization; } -}; - - -class LNG_DLLPUBLIC PropertyHelper_Spelling -{ - PropertyHelper_Spell* pInst; - com::sun::star::uno::Reference< com::sun::star::beans::XPropertyChangeListener > xPropHelper; - - // disallow use of copy-constructor and assignment-operator - PropertyHelper_Spelling( const PropertyHelper_Spell & ); - PropertyHelper_Spelling & operator = ( const PropertyHelper_Spell & ); - -public: - PropertyHelper_Spelling( - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface > &rxSource, - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > &rxPropSet ); - ~PropertyHelper_Spelling(); - - void AddAsPropListener(); - void RemoveAsPropListener(); - void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals ); - sal_Bool IsSpellUpperCase() const; - sal_Bool IsSpellWithDigits() const; - sal_Bool IsSpellCapitalization() const; - sal_Bool addLinguServiceEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener ) - throw(::com::sun::star::uno::RuntimeException); - sal_Bool removeLinguServiceEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener ) - throw(::com::sun::star::uno::RuntimeException); -}; - - -class PropertyHelper_Hyphen : - public PropertyChgHelper -{ - // default values - sal_Int16 nHyphMinLeading, - nHyphMinTrailing, - nHyphMinWordLength; - - // return values, will be set to default value or current temporary value - sal_Int16 nResHyphMinLeading, - nResHyphMinTrailing, - nResHyphMinWordLength; - - // disallow use of copy-constructor and assignment-operator - PropertyHelper_Hyphen( const PropertyHelper_Hyphen & ); - PropertyHelper_Hyphen & operator = ( const PropertyHelper_Hyphen & ); - -protected: - // PropertyChgHelper - virtual void SetDefaultValues(); - virtual void GetCurrentValues(); - virtual sal_Bool propertyChange_Impl( - const ::com::sun::star::beans::PropertyChangeEvent& rEvt ); - -public: - PropertyHelper_Hyphen( - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface > &rxSource, - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > &rxPropSet); - virtual ~PropertyHelper_Hyphen(); - - virtual void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals ); - - // XPropertyChangeListener - virtual void SAL_CALL - propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& rEvt ) - throw(::com::sun::star::uno::RuntimeException); - - sal_Int16 GetMinLeading() const { return nResHyphMinLeading; } - sal_Int16 GetMinTrailing() const { return nResHyphMinTrailing; } - sal_Int16 GetMinWordLength() const { return nResHyphMinWordLength; } -}; - -class LNG_DLLPUBLIC PropertyHelper_Hyphenation -{ - PropertyHelper_Hyphen* pInst; - com::sun::star::uno::Reference< com::sun::star::beans::XPropertyChangeListener > xPropHelper; - - // disallow use of copy-constructor and assignment-operator - PropertyHelper_Hyphenation( const PropertyHelper_Hyphen & ); - PropertyHelper_Hyphenation & operator = ( const PropertyHelper_Hyphen & ); - -public: - PropertyHelper_Hyphenation( - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface > &rxSource, - ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > &rxPropSet); - ~PropertyHelper_Hyphenation(); - - void AddAsPropListener(); - void RemoveAsPropListener(); - void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals ); - sal_Int16 GetMinLeading() const; - sal_Int16 GetMinTrailing() const; - sal_Int16 GetMinWordLength() const; - sal_Bool addLinguServiceEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener ) - throw(::com::sun::star::uno::RuntimeException); - sal_Bool removeLinguServiceEventListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener ) - throw(::com::sun::star::uno::RuntimeException); -}; - -} // namespace linguistic - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/linguistic/inc/linguistic/lngprops.hxx b/linguistic/inc/linguistic/lngprops.hxx deleted file mode 100644 index 2f8339f9b0b8..000000000000 --- a/linguistic/inc/linguistic/lngprops.hxx +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef _LINGUISTIC_LNGPROPS_HHX_ -#define _LINGUISTIC_LNGPROPS_HHX_ - -#include - -// maximal number of suggestions to be returned in spelling context-menu -// (may not include results added by looking up user dictionaries) -#define UPN_MAX_NUMBER_OF_SUGGESTIONS "MaxNumberOfSuggestions" - -// WIDs for property names -//!! Don't change values! They are used as the property handles in -//!! the service description -#define WID_IS_GERMAN_PRE_REFORM UPH_IS_GERMAN_PRE_REFORM /*! deprecated !*/ -#define WID_IS_USE_DICTIONARY_LIST UPH_IS_USE_DICTIONARY_LIST -#define WID_IS_IGNORE_CONTROL_CHARACTERS UPH_IS_IGNORE_CONTROL_CHARACTERS -#define WID_IS_SPELL_UPPER_CASE UPH_IS_SPELL_UPPER_CASE -#define WID_IS_SPELL_WITH_DIGITS UPH_IS_SPELL_WITH_DIGITS -#define WID_IS_SPELL_CAPITALIZATION UPH_IS_SPELL_CAPITALIZATION -#define WID_HYPH_MIN_LEADING UPH_HYPH_MIN_LEADING -#define WID_HYPH_MIN_TRAILING UPH_HYPH_MIN_TRAILING -#define WID_HYPH_MIN_WORD_LENGTH UPH_HYPH_MIN_WORD_LENGTH -#define WID_DEFAULT_LOCALE UPH_DEFAULT_LOCALE -#define WID_IS_SPELL_AUTO UPH_IS_SPELL_AUTO -#define WID_IS_SPELL_HIDE UPH_IS_SPELL_HIDE /*! deprecated !*/ -#define WID_IS_SPELL_IN_ALL_LANGUAGES UPH_IS_SPELL_IN_ALL_LANGUAGES /*! deprecated !*/ -#define WID_IS_SPELL_SPECIAL UPH_IS_SPELL_SPECIAL -#define WID_IS_HYPH_AUTO UPH_IS_HYPH_AUTO -#define WID_IS_HYPH_SPECIAL UPH_IS_HYPH_SPECIAL -#define WID_IS_WRAP_REVERSE UPH_IS_WRAP_REVERSE -#define WID_DEFAULT_LANGUAGE UPH_DEFAULT_LANGUAGE -#define WID_DEFAULT_LOCALE_CJK UPH_DEFAULT_LOCALE_CJK -#define WID_DEFAULT_LOCALE_CTL UPH_DEFAULT_LOCALE_CTL - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/linguistic/inc/linguistic/misc.hxx b/linguistic/inc/linguistic/misc.hxx deleted file mode 100644 index c15d2fc70dab..000000000000 --- a/linguistic/inc/linguistic/misc.hxx +++ /dev/null @@ -1,215 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef _LINGUISTIC_MISC_HXX_ -#define _LINGUISTIC_MISC_HXX_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type -#include // helper for implementations -#include -#include -#include -#include -#include -#include -#include - -namespace com { namespace sun { namespace star { namespace beans { - class XPropertySet; - class XFastPropertySet; -}}}} - -namespace com { namespace sun { namespace star { namespace frame { - class XDesktop2; -}}}} - -class LocaleDataWrapper; - - -#define SN_GRAMMARCHECKER "com.sun.star.linguistic2.Proofreader" -#define SN_SPELLCHECKER "com.sun.star.linguistic2.SpellChecker" -#define SN_HYPHENATOR "com.sun.star.linguistic2.Hyphenator" -#define SN_THESAURUS "com.sun.star.linguistic2.Thesaurus" -#define SN_LINGU_PROPERTIES "com.sun.star.linguistic2.LinguProperties" - - -namespace linguistic -{ - -/// Flags to be used with the multi-path related functions -/// @see GetDictionaryPaths -#define PATH_FLAG_INTERNAL 0x01 -#define PATH_FLAG_USER 0x02 -#define PATH_FLAG_WRITABLE 0x04 -#define PATH_FLAG_ALL (PATH_FLAG_INTERNAL | PATH_FLAG_USER | PATH_FLAG_WRITABLE) - - -// AddEntryToDic return values -#define DIC_ERR_NONE 0 -#define DIC_ERR_FULL 1 -#define DIC_ERR_READONLY 2 -#define DIC_ERR_UNKNOWN 3 -#define DIC_ERR_NOT_EXISTS 4 - -// values asigned to capitalization types -enum CapType -{ - CAPTYPE_UNKNOWN, - CAPTYPE_NOCAP, - CAPTYPE_INITCAP, - CAPTYPE_ALLCAP, - CAPTYPE_MIXED -}; - -LNG_DLLPUBLIC ::osl::Mutex& GetLinguMutex(); - -LocaleDataWrapper & GetLocaleDataWrapper( sal_Int16 nLang ); - -sal_Int32 LevDistance( const OUString &rTxt1, const OUString &rTxt2 ); - -/** Convert Locale to LanguageType for legacy handling. - Linguistic specific handling of an empty locale denoting LANGUAGE_NONE. - Does not resolve empty locale as system locale. - */ -LNG_DLLPUBLIC LanguageType LinguLocaleToLanguage( const ::com::sun::star::lang::Locale& rLocale ); - -/** Convert LanguageType to Locale for legacy handling. - Linguistic specific handling of LANGUAGE_NONE resulting in an empty locale. - Avoid use! - */ -LNG_DLLPUBLIC ::com::sun::star::lang::Locale LinguLanguageToLocale( LanguageType nLanguage ); - -/** Checks if a LanguageType is one of the values that denote absence of - language or undetermined language or multiple languages, in short all - values used in linguistic context that do not denote a specific language. - */ -LNG_DLLPUBLIC bool LinguIsUnspecified( LanguageType nLanguage ); - -::com::sun::star::uno::Sequence< sal_Int16 > - LocaleSeqToLangSeq( ::com::sun::star::uno::Sequence< - ::com::sun::star::lang::Locale > &rLocaleSeq ); - -// checks if file pointed to by rURL is readonly -// and may also check return if such a file exists or not -sal_Bool IsReadOnly( const String &rURL, sal_Bool *pbExist = 0 ); - -// checks if a file with the given URL exists -sal_Bool FileExists( const String &rURL ); - - -OUString GetDictionaryWriteablePath(); -::com::sun::star::uno::Sequence< OUString > GetDictionaryPaths( sal_Int16 nPathFlags = PATH_FLAG_ALL ); - -/// @returns an URL for a new and writable dictionary rDicName. -/// The URL will point to the path given by 'GetDictionaryWriteablePath' -LNG_DLLPUBLIC String GetWritableDictionaryURL( const String &rDicName ); - -LNG_DLLPUBLIC sal_Int32 GetPosInWordToCheck( const OUString &rTxt, sal_Int32 nPos ); - -::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XHyphenatedWord > - RebuildHyphensAndControlChars( const OUString &rOrigWord, - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XHyphenatedWord > &rxHyphWord ); - - -LNG_DLLPUBLIC sal_Bool IsUpper( const String &rText, xub_StrLen nPos, xub_StrLen nLen, sal_Int16 nLanguage ); - -inline sal_Bool IsUpper( const String &rText, sal_Int16 nLanguage ) { return IsUpper( rText, 0, rText.Len(), nLanguage ); } -LNG_DLLPUBLIC CapType SAL_CALL capitalType(const OUString&, CharClass *); - -String ToLower( const String &rText, sal_Int16 nLanguage ); -LNG_DLLPUBLIC sal_Bool HasDigits( const OUString &rText ); -LNG_DLLPUBLIC sal_Bool IsNumeric( const String &rText ); - - -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetOneInstanceService( const char *pServiceName ); -LNG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetLinguProperties(); -::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList > GetDictionaryList(); -::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > GetIgnoreAllList(); - - -sal_Bool IsUseDicList( const ::com::sun::star::beans::PropertyValues &rProperties, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > &rxPropSet ); - -sal_Bool IsIgnoreControlChars( const ::com::sun::star::beans::PropertyValues &rProperties, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > &rxPropSet ); - -::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XDictionaryEntry > - SearchDicList( - const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList >& rDicList, - const OUString& rWord, sal_Int16 nLanguage, - sal_Bool bSearchPosDics, sal_Bool bSearchSpellEntry ); - -LNG_DLLPUBLIC sal_uInt8 AddEntryToDic( - ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > &rxDic, - const OUString &rWord, sal_Bool bIsNeg, - const OUString &rRplcTxt, sal_Int16 nRplcLang, - sal_Bool bStripDot = sal_True ); - -LNG_DLLPUBLIC sal_Bool SaveDictionaries( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList > &xDicList ); - -// AppExitLstnr: -// virtual base class that calls it AtExit function when the application -// (ie the Desktop) is about to terminate - -class AppExitListener : - public cppu::WeakImplHelper1 - < - ::com::sun::star::frame::XTerminateListener - > -{ - ::com::sun::star::uno::Reference< - ::com::sun::star::frame::XDesktop2 > xDesktop; - -public: - AppExitListener(); - virtual ~AppExitListener(); - - virtual void AtExit() = 0; - - void Activate(); - void Deactivate(); - - // XEventListener - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); - - // XTerminateListener - virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException); -}; - -} // namespace linguistic - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/linguistic/inc/linguistic/spelldta.hxx b/linguistic/inc/linguistic/spelldta.hxx deleted file mode 100644 index 92f9cd680c77..000000000000 --- a/linguistic/inc/linguistic/spelldta.hxx +++ /dev/null @@ -1,117 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef _LINGUISTIC_SPELLDTA_HXX_ -#define _LINGUISTIC_SPELLDTA_HXX_ - -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include - -namespace com { namespace sun { namespace star { - namespace linguistic2 { - class XDictionaryList; - } -} } } - - -namespace linguistic -{ - -::com::sun::star::uno::Sequence< OUString > - MergeProposalSeqs( - ::com::sun::star::uno::Sequence< OUString > &rAlt1, - ::com::sun::star::uno::Sequence< OUString > &rAlt2, - sal_Bool bAllowDuplicates ); - -void SeqRemoveNegEntries( - ::com::sun::star::uno::Sequence< OUString > &rSeq, - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XSearchableDictionaryList > &rxDicList, - sal_Int16 nLanguage ); - -sal_Bool SeqHasEntry( - const ::com::sun::star::uno::Sequence< OUString > &rSeq, - const OUString &rTxt); - -/////////////////////////////////////////////////////////////////////////// - -void SearchSimilarText( const OUString &rText, sal_Int16 nLanguage, - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XSearchableDictionaryList > &xDicList, - std::vector< OUString > & rDicListProps ); - -/////////////////////////////////////////////////////////////////////////// - - -class SpellAlternatives - : public cppu::WeakImplHelper2 - < - ::com::sun::star::linguistic2::XSpellAlternatives, - ::com::sun::star::linguistic2::XSetSpellAlternatives - > - , private ::boost::noncopyable -{ - ::com::sun::star::uno::Sequence< OUString > aAlt; // list of alternatives, may be empty. - OUString aWord; - sal_Int16 nType; // type of failure - sal_Int16 nLanguage; - -public: - LNG_DLLPUBLIC SpellAlternatives(); - SpellAlternatives(const OUString &rWord, sal_Int16 nLang, sal_Int16 nFailureType, - const ::com::sun::star::uno::Sequence< OUString > &rAlternatives ); - virtual ~SpellAlternatives(); - - // XSpellAlternatives - virtual OUString SAL_CALL getWord( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int16 SAL_CALL getFailureType( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int16 SAL_CALL getAlternativesCount( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAlternatives( ) throw (::com::sun::star::uno::RuntimeException); - - // XSetSpellAlternatives - virtual void SAL_CALL setAlternatives( const ::com::sun::star::uno::Sequence< OUString >& aAlternatives ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setFailureType( ::sal_Int16 nFailureType ) throw (::com::sun::star::uno::RuntimeException); - - // non-interface specific functions - void LNG_DLLPUBLIC SetWordLanguage(const OUString &rWord, sal_Int16 nLang); - void LNG_DLLPUBLIC SetFailureType(sal_Int16 nTypeP); - void LNG_DLLPUBLIC SetAlternatives( const ::com::sun::star::uno::Sequence< OUString > &rAlt ); - static com::sun::star::uno::Reference < com::sun::star::linguistic2::XSpellAlternatives > LNG_DLLPUBLIC CreateSpellAlternatives( - const OUString &rWord, sal_Int16 nLang, sal_Int16 nTypeP, const ::com::sun::star::uno::Sequence< OUString > &rAlt ); -}; - - -/////////////////////////////////////////////////////////////////////////// - -} // namespace linguistic - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit