summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorArmin Le Grand <armin.le.grand@oracle.com>2011-03-29 11:37:21 +0200
committerArmin Le Grand <armin.le.grand@oracle.com>2011-03-29 11:37:21 +0200
commit0d8b141a8081ff5172d98f3d6b51266833085a6c (patch)
tree9d4418fb34b9160dcc721756f30dc56d2f583592 /editeng
parent22f4dbdfb02a01611d7ac3d3d653f0a975478a75 (diff)
parent9823cbf7faac2ef54b29e453a8fd03bb7d987c6b (diff)
aw084: resync to DEV300_m104
Diffstat (limited to 'editeng')
-rw-r--r--editeng/inc/editeng/editrids.hrc39
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/fontitem.hxx21
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/svxacorr.hxx1
-rw-r--r--editeng/prj/build.lst2
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editobj.cxx4
-rw-r--r--editeng/source/editeng/edtspell.cxx7
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/edtspell.hxx1
-rwxr-xr-xediteng/source/editeng/impedit2.cxx22
-rwxr-xr-xediteng/source/editeng/impedit4.cxx10
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/textconv.cxx10
-rw-r--r--editeng/source/items/numitem.cxx2
-rw-r--r--editeng/source/items/page.src148
-rw-r--r--editeng/source/items/paperinf.cxx46
-rwxr-xr-x[-rw-r--r--]editeng/source/items/textitem.cxx20
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/svxacorr.cxx51
-rwxr-xr-x[-rw-r--r--]editeng/source/uno/unofdesc.cxx10
16 files changed, 111 insertions, 283 deletions
diff --git a/editeng/inc/editeng/editrids.hrc b/editeng/inc/editeng/editrids.hrc
index dcef661d01b8..209d284a7fde 100644
--- a/editeng/inc/editeng/editrids.hrc
+++ b/editeng/inc/editeng/editrids.hrc
@@ -240,45 +240,6 @@
#define RID_SVXITEMS_WEIGHT_ULTRABOLD (RID_EDIT_START + 167)
#define RID_SVXITEMS_WEIGHT_BLACK (RID_EDIT_START + 168)
-// paper formats
-#define RID_SVXSTR_PAPER_A0 (RID_SVX_START + 169)
-#define RID_SVXSTR_PAPER_A1 (RID_SVX_START + 170)
-#define RID_SVXSTR_PAPER_A2 (RID_SVX_START + 171)
-#define RID_SVXSTR_PAPER_A3 (RID_SVX_START + 172)
-#define RID_SVXSTR_PAPER_A4 (RID_SVX_START + 173)
-#define RID_SVXSTR_PAPER_A5 (RID_SVX_START + 174)
-#define RID_SVXSTR_PAPER_B4_ISO (RID_SVX_START + 175)
-#define RID_SVXSTR_PAPER_B5_ISO (RID_SVX_START + 176)
-#define RID_SVXSTR_PAPER_LETTER (RID_SVX_START + 177)
-#define RID_SVXSTR_PAPER_LEGAL (RID_SVX_START + 178)
-#define RID_SVXSTR_PAPER_TABLOID (RID_SVX_START + 179)
-#define RID_SVXSTR_PAPER_USER (RID_SVX_START + 180)
-#define RID_SVXSTR_PAPER_B6_ISO (RID_SVX_START + 181)
-#define RID_SVXSTR_PAPER_C4 (RID_SVX_START + 182)
-#define RID_SVXSTR_PAPER_C5 (RID_SVX_START + 183)
-#define RID_SVXSTR_PAPER_C6 (RID_SVX_START + 184)
-#define RID_SVXSTR_PAPER_C65 (RID_SVX_START + 185)
-#define RID_SVXSTR_PAPER_DL (RID_SVX_START + 186)
-#define RID_SVXSTR_PAPER_DIA (RID_SVX_START + 187)
-#define RID_SVXSTR_PAPER_SCREEN (RID_SVX_START + 188)
-#define RID_SVXSTR_PAPER_C (RID_SVX_START + 189)
-#define RID_SVXSTR_PAPER_D (RID_SVX_START + 190)
-#define RID_SVXSTR_PAPER_E (RID_SVX_START + 191)
-#define RID_SVXSTR_PAPER_EXECUTIVE (RID_SVX_START + 192)
-#define RID_SVXSTR_PAPER_LEGAL2 (RID_SVX_START + 193)
-#define RID_SVXSTR_PAPER_MONARCH (RID_SVX_START + 194)
-#define RID_SVXSTR_PAPER_COM675 (RID_SVX_START + 195)
-#define RID_SVXSTR_PAPER_COM9 (RID_SVX_START + 196)
-#define RID_SVXSTR_PAPER_COM10 (RID_SVX_START + 197)
-#define RID_SVXSTR_PAPER_COM11 (RID_SVX_START + 198)
-#define RID_SVXSTR_PAPER_COM12 (RID_SVX_START + 199)
-#define RID_SVXSTR_PAPER_KAI16 (RID_SVX_START + 200)
-#define RID_SVXSTR_PAPER_KAI32 (RID_SVX_START + 201)
-#define RID_SVXSTR_PAPER_KAI32BIG (RID_SVX_START + 202)
-#define RID_SVXSTR_PAPER_B4_JIS (RID_SVX_START + 203)
-#define RID_SVXSTR_PAPER_B5_JIS (RID_SVX_START + 204)
-#define RID_SVXSTR_PAPER_B6_JIS (RID_SVX_START + 205)
-
// enum FontItalic -------------------------------------------------------
#define RID_SVXITEMS_ITALIC_BEGIN (RID_EDIT_START + 206)
#define RID_SVXITEMS_ITALIC_NONE (RID_EDIT_START + 206)
diff --git a/editeng/inc/editeng/fontitem.hxx b/editeng/inc/editeng/fontitem.hxx
index 4ec96052769c..c64c8d99d9e4 100644..100755
--- a/editeng/inc/editeng/fontitem.hxx
+++ b/editeng/inc/editeng/fontitem.hxx
@@ -81,30 +81,23 @@ public:
String &rText, const IntlWrapper * = 0 ) const;
// ZugriffsMethoden:
- inline String &GetFamilyName() { return aFamilyName; }
+ void SetFamilyName( const String& rFamilyName ) { aFamilyName = rFamilyName; }
inline const String &GetFamilyName() const { return aFamilyName; }
- inline String &GetStyleName() { return aStyleName; }
+ void SetStyleName(const String &rStyleName ) { aStyleName = rStyleName; }
inline const String &GetStyleName() const { return aStyleName; }
- inline FontFamily &GetFamily() { return eFamily; }
+ void SetFamily( FontFamily _eFamily ) { eFamily = _eFamily; }
inline FontFamily GetFamily() const { return eFamily; }
- inline FontPitch &GetPitch() { return ePitch; }
+ void SetPitch(FontPitch _ePitch ) { ePitch = _ePitch; }
inline FontPitch GetPitch() const { return ePitch; }
- inline rtl_TextEncoding &GetCharSet() { return eTextEncoding; }
+ void SetCharSet(rtl_TextEncoding _eEncoding) { eTextEncoding = _eEncoding; }
+
inline rtl_TextEncoding GetCharSet() const { return eTextEncoding; }
- inline SvxFontItem& operator=(const SvxFontItem& rFont)
- {
- aFamilyName = rFont.GetFamilyName();
- aStyleName = rFont.GetStyleName();
- eFamily = rFont.GetFamily();
- ePitch = rFont.GetPitch();
- eTextEncoding = rFont.GetCharSet();
- return *this;
- }
+ SvxFontItem& operator=(const SvxFontItem& rFont);
static void EnableStoreUnicodeNames( sal_Bool bEnable );
diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx
index f355a669a304..73dc7664562e 100644..100755
--- a/editeng/inc/editeng/svxacorr.hxx
+++ b/editeng/inc/editeng/svxacorr.hxx
@@ -79,6 +79,7 @@ public:
virtual sal_Bool Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0;
virtual sal_Bool Insert( xub_StrLen nPos, const String& rTxt ) = 0;
virtual sal_Bool Replace( xub_StrLen nPos, const String& rTxt ) = 0;
+ virtual sal_Bool ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const String& rTxt ) = 0;
virtual sal_Bool SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId,
SfxPoolItem& ) = 0;
diff --git a/editeng/prj/build.lst b/editeng/prj/build.lst
index 3c714c6dac25..bba7f2666744 100644
--- a/editeng/prj/build.lst
+++ b/editeng/prj/build.lst
@@ -1,3 +1,3 @@
-ed editeng : l10n svtools xmloff linguistic NULL
+ed editeng : L10N:l10n svtools xmloff linguistic NULL
ed editeng\prj nmake - all ed_prj NULL
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index cda87dea9f7d..cb042b721c4d 100644..100755
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -1472,7 +1472,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream )
if ( hConv )
{
SvxFontItem aNewFontItem( rFontItem );
- aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv );
+ aNewFontItem.SetFamilyName( GetFontToSubsFontName( hConv ) );
pC->GetAttribs().Remove( nAttr );
XEditAttribute* pNewAttr = CreateAttrib( aNewFontItem, pAttr->GetStart(), pAttr->GetEnd() );
@@ -1503,7 +1503,7 @@ void __EXPORT BinTextObject::CreateData( SvStream& rIStream )
if ( hConv )
{
SvxFontItem aNewFontItem( rFontItem );
- aNewFontItem.GetFamilyName() = GetFontToSubsFontName( hConv );
+ aNewFontItem.SetFamilyName( GetFontToSubsFontName( hConv ) );
pC->GetParaAttribs().Put( aNewFontItem );
for ( sal_uInt16 nChar = 0; nChar < pC->GetText().Len(); nChar++ )
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index afc329040e29..5fc43f461cac 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -583,8 +583,13 @@ sal_Bool EdtAutoCorrDoc::Insert( sal_uInt16 nPos, const String& rTxt )
sal_Bool EdtAutoCorrDoc::Replace( sal_uInt16 nPos, const String& rTxt )
{
+ return ReplaceRange( nPos, rTxt.Len(), rTxt );
+}
+
+sal_Bool EdtAutoCorrDoc::ReplaceRange( xub_StrLen nPos, xub_StrLen nSourceLength, const String& rTxt )
+{
// Eigentlich ein Replace einfuehren => Entspr. UNDO
- sal_uInt16 nEnd = nPos+rTxt.Len();
+ sal_uInt16 nEnd = nPos+nSourceLength;
if ( nEnd > pCurNode->Len() )
nEnd = pCurNode->Len();
diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx
index 3ed82ac367f1..49978cdd310d 100644..100755
--- a/editeng/source/editeng/edtspell.hxx
+++ b/editeng/source/editeng/edtspell.hxx
@@ -158,6 +158,7 @@ public:
virtual sal_Bool Delete( sal_uInt16 nStt, sal_uInt16 nEnd );
virtual sal_Bool Insert( sal_uInt16 nPos, const String& rTxt );
virtual sal_Bool Replace( sal_uInt16 nPos, const String& rTxt );
+ virtual sal_Bool ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const String& rTxt );
virtual sal_Bool SetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, sal_uInt16 nSlotId, SfxPoolItem& );
virtual sal_Bool SetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, const String& rURL );
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index f2a94c2dd1a6..352ff91d2e9e 100755
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -2756,7 +2756,10 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
// get word boundaries in order to clear possible WrongList entries
// and invalidate all the necessary text (everything after and including the
// start of the word)
- EditSelection aCurWord( SelectWord( aCurPaM, i18n::WordType::DICTIONARY_WORD ) );
+ // #i107201# do the expensive SelectWord call only if online spelling is active
+ EditSelection aCurWord;
+ if ( GetStatus().DoOnlineSpelling() )
+ aCurWord = SelectWord( aCurPaM, i18n::WordType::DICTIONARY_WORD );
XubString aText( rStr );
aText.ConvertLineEnd( LINEEND_LF );
@@ -2813,12 +2816,17 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
DBG_ASSERT( pPortion, "Blinde Portion in InsertText" );
- // now remove the Wrongs (red spell check marks) from both words...
- WrongList *pWrongs = aCurPaM.GetNode()->GetWrongList();
- if (pWrongs && pWrongs->HasWrongs())
- pWrongs->ClearWrongs( aCurWord.Min().GetIndex(), aPaM.GetIndex(), aPaM.GetNode() );
- // ... and mark both words as 'to be checked again'
- pPortion->MarkInvalid( aCurWord.Min().GetIndex(), aLine.Len() );
+ if ( GetStatus().DoOnlineSpelling() )
+ {
+ // now remove the Wrongs (red spell check marks) from both words...
+ WrongList *pWrongs = aCurPaM.GetNode()->GetWrongList();
+ if (pWrongs && pWrongs->HasWrongs())
+ pWrongs->ClearWrongs( aCurWord.Min().GetIndex(), aPaM.GetIndex(), aPaM.GetNode() );
+ // ... and mark both words as 'to be checked again'
+ pPortion->MarkInvalid( aCurWord.Min().GetIndex(), aLine.Len() );
+ }
+ else
+ pPortion->MarkInvalid( aCurPaM.GetIndex(), aLine.Len() );
}
if ( nEnd < aText.Len() )
aPaM = ImpInsertParaBreak( aPaM );
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 4b4b5e4514a8..71caa4f176fa 100755
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1682,11 +1682,11 @@ void ImpEditEngine::SetLanguageAndFont(
{
// set new font attribute
SvxFontItem aFontItem = (SvxFontItem&) aNewSet.Get( nFontWhichId );
- aFontItem.GetFamilyName() = pFont->GetName();
- aFontItem.GetFamily() = pFont->GetFamily();
- aFontItem.GetStyleName() = pFont->GetStyleName();
- aFontItem.GetPitch() = pFont->GetPitch();
- aFontItem.GetCharSet() = pFont->GetCharSet();
+ aFontItem.SetFamilyName( pFont->GetName());
+ aFontItem.SetFamily( pFont->GetFamily());
+ aFontItem.SetStyleName( pFont->GetStyleName());
+ aFontItem.SetPitch( pFont->GetPitch());
+ aFontItem.SetCharSet( pFont->GetCharSet() );
aNewSet.Put( aFontItem );
}
diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx
index b92284eb60bf..d2dc1c8a846d 100644..100755
--- a/editeng/source/editeng/textconv.cxx
+++ b/editeng/source/editeng/textconv.cxx
@@ -302,11 +302,11 @@ void TextConvWrapper::SetLanguageAndFont( const ESelection &rESel,
{
// set new font attribute
SvxFontItem aFontItem = (SvxFontItem&) aNewSet.Get( nFontWhichId );
- aFontItem.GetFamilyName() = pFont->GetName();
- aFontItem.GetFamily() = pFont->GetFamily();
- aFontItem.GetStyleName() = pFont->GetStyleName();
- aFontItem.GetPitch() = pFont->GetPitch();
- aFontItem.GetCharSet() = pFont->GetCharSet();
+ aFontItem.SetFamilyName( pFont->GetName());
+ aFontItem.SetFamily( pFont->GetFamily());
+ aFontItem.SetStyleName( pFont->GetStyleName());
+ aFontItem.SetPitch( pFont->GetPitch());
+ aFontItem.SetCharSet(pFont->GetCharSet());
aNewSet.Put( aFontItem );
}
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 8c0e533a40f4..5f2dc3a2d803 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -406,6 +406,8 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
---------------------------------------------------------------------------*/
SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat )
{
+ if (& rFormat == this) { return *this; }
+
SetNumberingType(rFormat.GetNumberingType());
eNumAdjust = rFormat.eNumAdjust ;
nInclUpperLevels = rFormat.nInclUpperLevels ;
diff --git a/editeng/source/items/page.src b/editeng/source/items/page.src
index 9fe7f3013ce6..c528dc8b0bd0 100644
--- a/editeng/source/items/page.src
+++ b/editeng/source/items/page.src
@@ -29,154 +29,6 @@
#include <editeng/editrids.hrc>
-String RID_SVXSTR_PAPER_A0
-{
- Text = "A0" ;
-};
-String RID_SVXSTR_PAPER_A1
-{
- Text = "A1" ;
-};
-String RID_SVXSTR_PAPER_A2
-{
- Text = "A2" ;
-};
-String RID_SVXSTR_PAPER_A3
-{
- Text = "A3" ;
-};
-String RID_SVXSTR_PAPER_A4
-{
- Text = "A4" ;
-};
-String RID_SVXSTR_PAPER_A5
-{
- Text = "A5" ;
-};
-String RID_SVXSTR_PAPER_B4_ISO
-{
- Text = "B4 (ISO)" ;
-};
-String RID_SVXSTR_PAPER_B5_ISO
-{
- Text = "B5 (ISO)" ;
-};
-String RID_SVXSTR_PAPER_LETTER
-{
- Text = "Letter" ;
-};
-String RID_SVXSTR_PAPER_LEGAL
-{
- Text = "Legal" ;
-};
-String RID_SVXSTR_PAPER_TABLOID
-{
- Text = "Tabloid" ;
-};
-String RID_SVXSTR_PAPER_USER
-{
- Text [ en-US ] = "User Defined" ;
-};
-String RID_SVXSTR_PAPER_B6_ISO
-{
- Text = "B6 (ISO)" ;
-};
-String RID_SVXSTR_PAPER_C4
-{
- Text = "C4 Envelope" ;
-};
-String RID_SVXSTR_PAPER_C5
-{
- Text = "C5 Envelope" ;
-};
-String RID_SVXSTR_PAPER_C6
-{
- Text = "C6 Envelope" ;
-};
-String RID_SVXSTR_PAPER_C65
-{
- Text = "C6/5 Envelope" ;
-};
-String RID_SVXSTR_PAPER_DL
-{
- Text = "DL Envelope" ;
-};
-String RID_SVXSTR_PAPER_DIA
-{
- Text = "Dia Slide" ;
-};
-String RID_SVXSTR_PAPER_SCREEN
-{
- Text [ en-US ] = "Screen" ;
-};
-String RID_SVXSTR_PAPER_C
-{
- Text = "C" ;
-};
-String RID_SVXSTR_PAPER_D
-{
- Text = "D" ;
-};
-String RID_SVXSTR_PAPER_E
-{
- Text = "E" ;
-};
-String RID_SVXSTR_PAPER_EXECUTIVE
-{
- Text = "Executive" ;
-};
-String RID_SVXSTR_PAPER_LEGAL2
-{
- Text = "Long Bond" ;
-};
-String RID_SVXSTR_PAPER_MONARCH
-{
- Text = "#8 (Monarch) Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM675
-{
- Text = "#6 3/4 (Personal) Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM9
-{
- Text = "#9 Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM10
-{
- Text = "#10 Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM11
-{
- Text = "#11 Envelope" ;
-};
-String RID_SVXSTR_PAPER_COM12
-{
- Text = "#12 Envelope" ;
-};
-String RID_SVXSTR_PAPER_KAI16
-{
- Text = "16 Kai" ;
-};
-String RID_SVXSTR_PAPER_KAI32
-{
- Text = "32 Kai" ;
-};
-String RID_SVXSTR_PAPER_KAI32BIG
-{
- Text = "Big 32 Kai" ;
-};
-String RID_SVXSTR_PAPER_B4_JIS
-{
- Text = "B4 (JIS)" ;
-};
-String RID_SVXSTR_PAPER_B5_JIS
-{
- Text = "B5 (JIS)" ;
-};
-String RID_SVXSTR_PAPER_B6_JIS
-{
- Text = "B6 (JIS)" ;
-};
String RID_SVXSTR_PAPERBIN
{
Text [ en-US ] = "Paper tray" ;
diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx
index 3d79b980ec1d..8ba97193c3bc 100644
--- a/editeng/source/items/paperinf.cxx
+++ b/editeng/source/items/paperinf.cxx
@@ -135,51 +135,7 @@ Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit )
String SvxPaperInfo::GetName( Paper ePaper )
{
- sal_uInt16 nResId = 0;
-
- switch ( ePaper )
- {
- case PAPER_A0: nResId = RID_SVXSTR_PAPER_A0; break;
- case PAPER_A1: nResId = RID_SVXSTR_PAPER_A1; break;
- case PAPER_A2: nResId = RID_SVXSTR_PAPER_A2; break;
- case PAPER_A3: nResId = RID_SVXSTR_PAPER_A3; break;
- case PAPER_A4: nResId = RID_SVXSTR_PAPER_A4; break;
- case PAPER_A5: nResId = RID_SVXSTR_PAPER_A5; break;
- case PAPER_B4_ISO: nResId = RID_SVXSTR_PAPER_B4_ISO; break;
- case PAPER_B5_ISO: nResId = RID_SVXSTR_PAPER_B5_ISO; break;
- case PAPER_LETTER: nResId = RID_SVXSTR_PAPER_LETTER; break;
- case PAPER_LEGAL: nResId = RID_SVXSTR_PAPER_LEGAL; break;
- case PAPER_TABLOID: nResId = RID_SVXSTR_PAPER_TABLOID; break;
- case PAPER_USER: nResId = RID_SVXSTR_PAPER_USER; break;
- case PAPER_B6_ISO: nResId = RID_SVXSTR_PAPER_B6_ISO; break;
- case PAPER_ENV_C4: nResId = RID_SVXSTR_PAPER_C4; break;
- case PAPER_ENV_C5: nResId = RID_SVXSTR_PAPER_C5; break;
- case PAPER_ENV_C6: nResId = RID_SVXSTR_PAPER_C6; break;
- case PAPER_ENV_C65: nResId = RID_SVXSTR_PAPER_C65; break;
- case PAPER_ENV_DL: nResId = RID_SVXSTR_PAPER_DL; break;
- case PAPER_SLIDE_DIA: nResId = RID_SVXSTR_PAPER_DIA; break;
- case PAPER_SCREEN: nResId = RID_SVXSTR_PAPER_SCREEN; break;
- case PAPER_C: nResId = RID_SVXSTR_PAPER_C; break;
- case PAPER_D: nResId = RID_SVXSTR_PAPER_D; break;
- case PAPER_E: nResId = RID_SVXSTR_PAPER_E; break;
- case PAPER_EXECUTIVE: nResId = RID_SVXSTR_PAPER_EXECUTIVE;break;
- case PAPER_FANFOLD_LEGAL_DE: nResId = RID_SVXSTR_PAPER_LEGAL2; break;
- case PAPER_ENV_MONARCH: nResId = RID_SVXSTR_PAPER_MONARCH; break;
- case PAPER_ENV_PERSONAL: nResId = RID_SVXSTR_PAPER_COM675; break;
- case PAPER_ENV_9: nResId = RID_SVXSTR_PAPER_COM9; break;
- case PAPER_ENV_10: nResId = RID_SVXSTR_PAPER_COM10; break;
- case PAPER_ENV_11: nResId = RID_SVXSTR_PAPER_COM11; break;
- case PAPER_ENV_12: nResId = RID_SVXSTR_PAPER_COM12; break;
- case PAPER_KAI16: nResId = RID_SVXSTR_PAPER_KAI16; break;
- case PAPER_KAI32: nResId = RID_SVXSTR_PAPER_KAI32; break;
- case PAPER_KAI32BIG: nResId = RID_SVXSTR_PAPER_KAI32BIG; break;
- case PAPER_B4_JIS: nResId = RID_SVXSTR_PAPER_B4_JIS; break;
- case PAPER_B5_JIS: nResId = RID_SVXSTR_PAPER_B5_JIS; break;
- case PAPER_B6_JIS: nResId = RID_SVXSTR_PAPER_B6_JIS; break;
- default: DBG_ERRORFILE( "unknown papersize" );
- }
-
- return ( nResId > 0 ) ? String( EditResId( nResId ) ) : String();
+ return String( Printer::GetPaperName( ePaper ) );
}
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index f1dc1f6c6f85..f0fa8cd02d8f 100644..100755
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -256,6 +256,16 @@ SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName,
}
// -----------------------------------------------------------------------
+SvxFontItem& SvxFontItem::operator=(const SvxFontItem& rFont)
+{
+ aFamilyName = rFont.GetFamilyName();
+ aStyleName = rFont.GetStyleName();
+ eFamily = rFont.GetFamily();
+ ePitch = rFont.GetPitch();
+ eTextEncoding = rFont.GetCharSet();
+ return *this;
+}
+// -----------------------------------------------------------------------
sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
@@ -3806,11 +3816,11 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo
aOutTypeArr[ n ].nLanguage,
DEFAULTFONT_FLAGS_ONLYONE, 0 ) );
SvxFontItem* pItem = aItemArr[ n ];
- pItem->GetFamily() = aFont.GetFamily();
- pItem->GetFamilyName() = aFont.GetName();
- pItem->GetStyleName().Erase();
- pItem->GetPitch() = aFont.GetPitch();
- pItem->GetCharSet() = aFont.GetCharSet();
+ pItem->SetFamily( aFont.GetFamily() );
+ pItem->SetFamilyName( aFont.GetName() );
+ pItem->SetStyleName( String() );
+ pItem->SetPitch( aFont.GetPitch());
+ pItem->SetCharSet(aFont.GetCharSet());
}
}
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index e15e92200e0c..1eebd5349fe4 100644..100755
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -47,6 +47,7 @@
#include <com/sun/star/i18n/UnicodeType.hdl>
#include <unotools/collatorwrapper.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
+#include <com/sun/star/i18n/UnicodeScript.hpp>
#include <unotools/localedatawrapper.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -139,6 +140,41 @@ inline int IsUpperLetter( sal_Int32 nCharType )
0 == ( ::com::sun::star::i18n::KCharacterType::LOWER & nCharType);
}
+bool lcl_IsUnsupportedUnicodeChar( CharClass& rCC, const String& rTxt,
+ xub_StrLen nStt, xub_StrLen nEnd )
+{
+ for( ; nStt < nEnd; ++nStt )
+ {
+#if OSL_DEBUG_LEVEL > 1
+ sal_Int32 nCharType;
+ sal_Int32 nChType;
+ nCharType = rCC.getCharacterType( rTxt, nStt );
+ nChType = rCC.getType( rTxt, nStt );
+#endif
+ short nScript = rCC.getScript( rTxt, nStt );
+ switch( nScript )
+ {
+ case ::com::sun::star::i18n::UnicodeScript_kCJKRadicalsSupplement:
+ case ::com::sun::star::i18n::UnicodeScript_kHangulJamo:
+ case ::com::sun::star::i18n::UnicodeScript_kCJKSymbolPunctuation:
+ case ::com::sun::star::i18n::UnicodeScript_kHiragana:
+ case ::com::sun::star::i18n::UnicodeScript_kKatakana:
+ case ::com::sun::star::i18n::UnicodeScript_kHangulCompatibilityJamo:
+ case ::com::sun::star::i18n::UnicodeScript_kEnclosedCJKLetterMonth:
+ case ::com::sun::star::i18n::UnicodeScript_kCJKCompatibility:
+ case ::com::sun::star::i18n::UnicodeScript_k_CJKUnifiedIdeographsExtensionA:
+ case ::com::sun::star::i18n::UnicodeScript_kCJKUnifiedIdeograph:
+ case ::com::sun::star::i18n::UnicodeScript_kHangulSyllable:
+ case ::com::sun::star::i18n::UnicodeScript_kCJKCompatibilityIdeograph:
+ case ::com::sun::star::i18n::UnicodeScript_kHalfwidthFullwidthForm:
+ return true;
+ default: ; //do nothing
+ }
+
+ }
+ return false;
+}
+
sal_Bool lcl_IsSymbolChar( CharClass& rCC, const String& rTxt,
xub_StrLen nStt, xub_StrLen nEnd )
{
@@ -456,7 +492,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
sal_Unicode cSave = rTxt.GetChar( nSttPos );
String sChar( cSave );
rCC.toLower( sChar );
- if( sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar ))
+ if( sChar.GetChar(0) != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar ))
{
if( SaveWordWrdSttLst & nFlags )
rDoc.SaveCpltSttWord( CptlSttWrd, nSttPos, sWord, cSave );
@@ -888,7 +924,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
String sChar( *pWordStt );
rCC.toUpper( sChar );
return sChar != *pWordStt &&
- rDoc.Replace( xub_StrLen( pWordStt - pStart ), sChar );
+ rDoc.ReplaceRange( xub_StrLen( pWordStt - pStart ), 1, sChar );
}
aText = *pPrevPara;
@@ -1068,7 +1104,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
nSttPos = sal::static_int_cast< xub_StrLen >( pWordStt - rTxt.GetBuffer() );
String sChar( cSave );
rCC.toUpper( sChar );
- sal_Bool bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar );
+ sal_Bool bRet = sChar.GetChar(0) != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar );
// das Wort will vielleicht jemand haben
if( bRet && SaveWordCplSttLst & nFlags )
@@ -1299,7 +1335,7 @@ sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
eLang = MsLangId::getSystemLanguage();
CharClass& rCC = GetCharClass( eLang );
- // Bug 19285: Symbolzeichen nicht anfassen
+ // no symbol characters
if( lcl_IsSymbolChar( rCC, rTxt, nCapLttrPos, nInsPos ))
break;
@@ -1368,13 +1404,16 @@ sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
else
{
nRet = 0;
+ bool bUnsupported = lcl_IsUnsupportedUnicodeChar( rCC, rTxt, nCapLttrPos, nInsPos );
// Grossbuchstabe am Satz-Anfang ??
- if( IsAutoCorrFlag( CptlSttSntnc ) &&
+ if( !bUnsupported &&
+ IsAutoCorrFlag( CptlSttSntnc ) &&
FnCptlSttSntnc( rDoc, rTxt, sal_True, nCapLttrPos, nInsPos, eLang ) )
nRet |= CptlSttSntnc;
// Zwei Grossbuchstaben am Wort-Anfang ??
- if( IsAutoCorrFlag( CptlSttWrd ) &&
+ if( !bUnsupported &&
+ IsAutoCorrFlag( CptlSttWrd ) &&
FnCptlSttWrd( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) )
nRet |= CptlSttWrd;
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index d81af6ccff0c..bc2245e7e6a9 100644..100755
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -91,11 +91,11 @@ void SvxUnoFontDescriptor::FillItemSet( const awt::FontDescriptor& rDesc, SfxIte
{
SvxFontItem aFontItem( EE_CHAR_FONTINFO );
- aFontItem.GetFamilyName()= rDesc.Name;
- aFontItem.GetStyleName() = rDesc.StyleName;
- aFontItem.GetFamily() = (FontFamily)rDesc.Family;
- aFontItem.GetCharSet() = rDesc.CharSet;
- aFontItem.GetPitch() = (FontPitch)rDesc.Pitch;
+ aFontItem.SetFamilyName( rDesc.Name);
+ aFontItem.SetStyleName( rDesc.StyleName);
+ aFontItem.SetFamily( (FontFamily)rDesc.Family);
+ aFontItem.SetCharSet( rDesc.CharSet );
+ aFontItem.SetPitch( (FontPitch)rDesc.Pitch);
rSet.Put(aFontItem);
}