summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/svxfont.hxx3
-rw-r--r--svx/source/dialog/fntctrl.cxx21
-rw-r--r--svx/source/editeng/impedit2.cxx13
-rw-r--r--svx/util/makefile.mk3
4 files changed, 36 insertions, 4 deletions
diff --git a/svx/inc/svx/svxfont.hxx b/svx/inc/svx/svxfont.hxx
index b0165d73f978..cab43c06628c 100644
--- a/svx/inc/svx/svxfont.hxx
+++ b/svx/inc/svx/svxfont.hxx
@@ -70,7 +70,8 @@ public:
inline void SetCaseMap( const SvxCaseMap eNew ) { eCaseMap = eNew; }
inline LanguageType GetLanguage() const { return eLang; }
- inline void SetLanguage( const LanguageType eNewLan ) { eLang = eNewLan; }
+ inline void SetLanguage( const LanguageType eNewLan )
+ { eLang = eNewLan; Font::SetLanguage(eNewLan); }
// Is-Methoden:
inline BOOL IsCaseMap() const { return SVX_CASEMAP_NOT_MAPPED != eCaseMap; }
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 55afdd4ca2f0..5018bd28a640 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -36,6 +36,7 @@
#include <sfx2/printer.hxx> // SfxPrinter
#include <vcl/metric.hxx>
#include <vcl/svapp.hxx>
+#include <unicode/uchar.h>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -244,7 +245,25 @@ void FontPrevWin_Impl::_CheckScript()
do
{
nChg = (xub_StrLen)xBreak->endOfScript( aText, nChg, nScript );
- aScriptChg.Insert( nChg, nCnt );
+ if (nChg < aText.Len() && nChg > 0 &&
+ (com::sun::star::i18n::ScriptType::WEAK ==
+ xBreak->getScriptType(aText, nChg - 1)))
+ {
+ int8_t nType = u_charType(aText.GetChar(nChg) );
+ if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK ||
+ nType == U_COMBINING_SPACING_MARK )
+ {
+ aScriptChg.Insert( nChg - 1, nCnt );
+ }
+ else
+ {
+ aScriptChg.Insert( nChg, nCnt );
+ }
+ }
+ else
+ {
+ aScriptChg.Insert( nChg, nCnt );
+ }
aScriptType.Insert( nScript, nCnt );
aTextWidth.Insert( ULONG(0), nCnt++ );
diff --git a/svx/source/editeng/impedit2.cxx b/svx/source/editeng/impedit2.cxx
index 1299cfd1520a..47a3aa24b3e9 100644
--- a/svx/source/editeng/impedit2.cxx
+++ b/svx/source/editeng/impedit2.cxx
@@ -1777,7 +1777,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
::rtl::OUString aOUText( aText );
USHORT nTextLen = (USHORT)aOUText.getLength();
- long nPos = 0;
+ sal_Int32 nPos = 0;
short nScriptType = _xBI->getScriptType( aOUText, nPos );
rTypes.Insert( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ), rTypes.Count() );
nPos = _xBI->endOfScript( aOUText, nPos, nScriptType );
@@ -1795,6 +1795,17 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
}
else
{
+ if ( _xBI->getScriptType( aOUText, nPos - 1 ) == i18n::ScriptType::WEAK )
+ {
+ switch ( u_charType(aOUText.iterateCodePoints(&nPos, 0) ) ) {
+ case U_NON_SPACING_MARK:
+ case U_ENCLOSING_MARK:
+ case U_COMBINING_SPACING_MARK:
+ --nPos;
+ rTypes[rTypes.Count()-1].nEndPos--;
+ break;
+ }
+ }
rTypes.Insert( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ), rTypes.Count() );
}
diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk
index f212284fa401..a751cfdd20ac 100644
--- a/svx/util/makefile.mk
+++ b/svx/util/makefile.mk
@@ -175,7 +175,8 @@ SHL2STDLIBS= \
$(CPPULIB) \
$(VOSLIB) \
$(SALLIB) \
- $(JVMFWKLIB)
+ $(JVMFWKLIB) \
+ $(ICUUCLIB)
.IF "$(debug)$(dbgutil)"!=""
SHL2STDLIBS += $(CPPUHELPERLIB)