summaryrefslogtreecommitdiff
path: root/linguistic/inc
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2011-02-24 17:08:10 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-16 12:14:15 +0200
commitc683c55b54d3708ebe458146253d147186590c79 (patch)
tree49dcee4fe25e057791d837837c83a8c90eafa3ff /linguistic/inc
parent2151303db47b9dc6a262df884939db4240d291a5 (diff)
CWS gnumake4: convert linguistic to new build system
Diffstat (limited to 'linguistic/inc')
-rw-r--r--linguistic/inc/linguistic/hyphdta.hxx13
-rw-r--r--linguistic/inc/linguistic/lngdllapi.h42
-rw-r--r--linguistic/inc/linguistic/lngprophelp.hxx94
-rw-r--r--linguistic/inc/linguistic/misc.hxx24
-rw-r--r--linguistic/inc/linguistic/spelldta.hxx3
-rw-r--r--linguistic/inc/makefile.mk47
6 files changed, 157 insertions, 66 deletions
diff --git a/linguistic/inc/linguistic/hyphdta.hxx b/linguistic/inc/linguistic/hyphdta.hxx
index 5d163e827239..7814c7821aa9 100644
--- a/linguistic/inc/linguistic/hyphdta.hxx
+++ b/linguistic/inc/linguistic/hyphdta.hxx
@@ -28,15 +28,12 @@
#ifndef _LINGUISTIC_HYPHDTA_HXX_
#define _LINGUISTIC_HYPHDTA_HXX_
-
#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
#include <com/sun/star/linguistic2/XPossibleHyphens.hpp>
-
#include <tools/solar.h>
-
#include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type
#include <cppuhelper/implbase1.hxx> // helper for implementations
-
+#include <linguistic/lngdllapi.h>
namespace linguistic
{
@@ -91,6 +88,9 @@ public:
void SetWord( ::rtl::OUString &rTxt ) { aWord = rTxt; }
void SetHyphenatedWord( ::rtl::OUString &rTxt ) { aHyphenatedWord = rTxt; }
void SetLanguage( sal_Int16 nLang ) { nLanguage = nLang; }
+ static com::sun::star::uno::Reference <com::sun::star::linguistic2::XHyphenatedWord> LNG_DLLPUBLIC CreateHyphenatedWord(
+ const ::rtl::OUString &rWord, sal_Int16 nLang, sal_Int16 nHyphenationPos,
+ const ::rtl::OUString &rHyphenatedWord, sal_Int16 nHyphenPos );
};
@@ -135,6 +135,11 @@ public:
sal_Int16 GetLanguage() { return nLanguage; }
void SetWord( ::rtl::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 ::rtl::OUString &rWord, sal_Int16 nLang,
+ const ::rtl::OUString &rHyphWord,
+ const ::com::sun::star::uno::Sequence< sal_Int16 > &rPositions);
};
diff --git a/linguistic/inc/linguistic/lngdllapi.h b/linguistic/inc/linguistic/lngdllapi.h
new file mode 100644
index 000000000000..5db6d4dbd799
--- /dev/null
+++ b/linguistic/inc/linguistic/lngdllapi.h
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_LNG_DLLAPI_H
+#define INCLUDED_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
diff --git a/linguistic/inc/linguistic/lngprophelp.hxx b/linguistic/inc/linguistic/lngprophelp.hxx
index 2deef9539fbc..879b67e46b50 100644
--- a/linguistic/inc/linguistic/lngprophelp.hxx
+++ b/linguistic/inc/linguistic/lngprophelp.hxx
@@ -29,14 +29,13 @@
#define _LINGUISTIC_LNGPROPHELP_HXX_
#include <tools/solar.h>
-
#include <uno/lbnames.h>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
-
#include <com/sun/star/linguistic2/XLinguServiceEventBroadcaster.hpp>
+#include <linguistic/lngdllapi.h>
namespace com { namespace sun { namespace star { namespace beans {
class XPropertySet;
@@ -161,7 +160,6 @@ public:
///////////////////////////////////////////////////////////////////////////
-
class PropertyHelper_Thes :
public PropertyChgHelper
{
@@ -183,6 +181,28 @@ public:
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 PropertyHelper_Spell :
@@ -234,6 +254,41 @@ public:
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_Int16 GetMaxNumberOfSuggestions() const;
+ 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 :
@@ -280,6 +335,39 @@ public:
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
diff --git a/linguistic/inc/linguistic/misc.hxx b/linguistic/inc/linguistic/misc.hxx
index 2b49f37858c0..957fbd429b9f 100644
--- a/linguistic/inc/linguistic/misc.hxx
+++ b/linguistic/inc/linguistic/misc.hxx
@@ -28,7 +28,6 @@
#ifndef _LINGUISTIC_MISC_HXX_
#define _LINGUISTIC_MISC_HXX_
-
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/beans/PropertyValues.hpp>
@@ -47,6 +46,7 @@
#include <unotools/charclass.hxx>
#include <osl/thread.h>
#include <osl/mutex.hxx>
+#include <linguistic/lngdllapi.h>
namespace com { namespace sun { namespace star { namespace beans {
class XPropertySet;
@@ -95,7 +95,7 @@ namespace linguistic
///////////////////////////////////////////////////////////////////////////
-::osl::Mutex & GetLinguMutex();
+LNG_DLLPUBLIC ::osl::Mutex& GetLinguMutex();
LocaleDataWrapper & GetLocaleDataWrapper( sal_Int16 nLang );
@@ -124,7 +124,7 @@ sal_Int32 LevDistance( const rtl::OUString &rTxt1, const rtl::OUString &rTxt2 );
::com::sun::star::lang::Locale
CreateLocale( LanguageType eLang );
-LanguageType
+LNG_DLLPUBLIC LanguageType
LocaleToLanguage( const ::com::sun::star::lang::Locale& rLocale );
::com::sun::star::lang::Locale&
@@ -162,7 +162,7 @@ String GetModulePath( SvtPathOptions::Pathes ePath, sal_Bool bAddAccessDelim =
/// @returns an URL for a new and writable dictionary rDicName.
/// The URL will point to the path given by 'GetDictionaryWriteablePath'
-String GetWritableDictionaryURL( const String &rDicName );
+LNG_DLLPUBLIC String GetWritableDictionaryURL( const String &rDicName );
// looks for the specified file in the list of paths.
// In case of multiple occurences only the first found is returned.
@@ -171,7 +171,7 @@ String SearchFileInPaths( const String &rFile, const ::com::sun::star::uno::
///////////////////////////////////////////////////////////////////////////
-sal_Int32 GetPosInWordToCheck( const rtl::OUString &rTxt, sal_Int32 nPos );
+LNG_DLLPUBLIC sal_Int32 GetPosInWordToCheck( const rtl::OUString &rTxt, sal_Int32 nPos );
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenatedWord >
@@ -181,8 +181,8 @@ sal_Int32 GetPosInWordToCheck( const rtl::OUString &rTxt, sal_Int32 nPos )
///////////////////////////////////////////////////////////////////////////
-sal_Bool IsUpper( const String &rText, xub_StrLen nPos, xub_StrLen nLen, sal_Int16 nLanguage );
-sal_Bool IsLower( const String &rText, xub_StrLen nPos, xub_StrLen nLen, sal_Int16 nLanguage );
+LNG_DLLPUBLIC sal_Bool IsUpper( const String &rText, xub_StrLen nPos, xub_StrLen nLen, sal_Int16 nLanguage );
+LNG_DLLPUBLIC sal_Bool IsLower( 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 ); }
inline sal_Bool IsLower( const String &rText, sal_Int16 nLanguage ) { return IsLower( rText, 0, rText.Len(), nLanguage ); }
@@ -192,13 +192,13 @@ String ToUpper( const String &rText, sal_Int16 nLanguage );
String ToTitle( const String &rText, sal_Int16 nLanguage );
sal_Unicode ToLower( const sal_Unicode cChar, sal_Int16 nLanguage );
sal_Unicode ToUpper( const sal_Unicode cChar, sal_Int16 nLanguage );
-sal_Bool HasDigits( const ::rtl::OUString &rText );
-sal_Bool IsNumeric( const String &rText );
+LNG_DLLPUBLIC sal_Bool HasDigits( const ::rtl::OUString &rText );
+LNG_DLLPUBLIC sal_Bool IsNumeric( const String &rText );
///////////////////////////////////////////////////////////////////////////
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetOneInstanceService( const char *pServiceName );
-::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetLinguProperties();
+LNG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetLinguProperties();
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList > GetSearchableDictionaryList();
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList > GetDictionaryList();
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > GetIgnoreAllList();
@@ -220,13 +220,13 @@ sal_Bool IsIgnoreControlChars( const ::com::sun::star::beans::PropertyValues &rP
const ::rtl::OUString& rWord, sal_Int16 nLanguage,
sal_Bool bSearchPosDics, sal_Bool bSearchSpellEntry );
-sal_uInt8 AddEntryToDic(
+LNG_DLLPUBLIC sal_uInt8 AddEntryToDic(
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > &rxDic,
const ::rtl::OUString &rWord, sal_Bool bIsNeg,
const ::rtl::OUString &rRplcTxt, sal_Int16 nRplcLang,
sal_Bool bStripDot = sal_True );
-sal_Bool SaveDictionaries( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList > &xDicList );
+LNG_DLLPUBLIC sal_Bool SaveDictionaries( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList > &xDicList );
///////////////////////////////////////////////////////////////////////////
//
diff --git a/linguistic/inc/linguistic/spelldta.hxx b/linguistic/inc/linguistic/spelldta.hxx
index 7ab7cab06b56..5d2c55b162a0 100644
--- a/linguistic/inc/linguistic/spelldta.hxx
+++ b/linguistic/inc/linguistic/spelldta.hxx
@@ -36,6 +36,7 @@
#include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type
#include <cppuhelper/implbase2.hxx>
+#include <linguistic/lngdllapi.h>
namespace com { namespace sun { namespace star {
namespace linguistic2 {
@@ -117,6 +118,8 @@ public:
// XSetSpellAlternatives
virtual void SAL_CALL setAlternatives( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aAlternatives ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setFailureType( ::sal_Int16 nFailureType ) throw (::com::sun::star::uno::RuntimeException);
+ static com::sun::star::uno::Reference < com::sun::star::linguistic2::XSpellAlternatives > LNG_DLLPUBLIC CreateSpellAlternatives(
+ const ::rtl::OUString &rWord, sal_Int16 nLang, sal_Int16 nTypeP, const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rAlt );
// non-interface specific functions
void SetWordLanguage(const ::rtl::OUString &rWord, sal_Int16 nLang);
diff --git a/linguistic/inc/makefile.mk b/linguistic/inc/makefile.mk
deleted file mode 100644
index fa5aad7b0a40..000000000000
--- a/linguistic/inc/makefile.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 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
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..
-
-PRJNAME=linguistic
-TARGET=inc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
-