summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-07-21 18:51:11 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-07-21 18:51:11 +0200
commit200bc6c582d6cf2365001f27928c1e3d1f9c9845 (patch)
tree0f27abe75bc3603341aef715372676aee8d86835 /editeng
parent01ea92166c12fe080575f8faba4162779fb46c28 (diff)
parent1b465fcc0f5f699308c6ee5113dde6b82842c3dd (diff)
resyncing to master
Diffstat (limited to 'editeng')
-rwxr-xr-xediteng/CppunitTest_editeng_borderline.mk6
-rwxr-xr-xediteng/Library_editeng.mk6
-rw-r--r--editeng/inc/editeng/brshitem.hxx2
-rw-r--r--editeng/inc/editeng/unonrule.hxx1
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx54
-rw-r--r--editeng/source/editeng/editdbg.cxx353
-rw-r--r--editeng/source/editeng/editdbg.hxx6
-rw-r--r--editeng/source/editeng/editobj.cxx81
-rw-r--r--editeng/source/editeng/impedit4.cxx12
-rw-r--r--editeng/source/items/frmitems.cxx32
-rw-r--r--editeng/source/misc/svxacorr.cxx49
-rw-r--r--editeng/source/outliner/outliner.cxx19
-rw-r--r--editeng/source/uno/unonrule.cxx38
-rwxr-xr-xediteng/util/editeng.dxp1
14 files changed, 229 insertions, 431 deletions
diff --git a/editeng/CppunitTest_editeng_borderline.mk b/editeng/CppunitTest_editeng_borderline.mk
index 6a8e8472766b..3a3a1882b502 100755
--- a/editeng/CppunitTest_editeng_borderline.mk
+++ b/editeng/CppunitTest_editeng_borderline.mk
@@ -57,8 +57,12 @@ $(eval $(call gb_CppunitTest_add_linked_libs,editeng_borderline, \
$(eval $(call gb_CppunitTest_set_include,editeng_borderline,\
$$(INCLUDE) \
- -I$(OUTDIR)/inc/offuh \
-I$(OUTDIR)/inc \
))
+$(eval $(call gb_CppunitTest_add_api,editeng_borderline,\
+ offapi \
+ udkapi \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk
index f5444d378ec6..2aeec99449a4 100755
--- a/editeng/Library_editeng.mk
+++ b/editeng/Library_editeng.mk
@@ -35,7 +35,6 @@ $(eval $(call gb_Library_set_include,editeng,\
$$(INCLUDE) \
-I$(realpath $(SRCDIR)/editeng/inc/pch) \
-I$(realpath $(SRCDIR)/editeng/inc) \
- -I$(OUTDIR)/inc/offuh \
))
$(eval $(call gb_Library_add_defs,editeng,\
@@ -48,6 +47,11 @@ $(eval $(call gb_Library_add_defs,editeng,\
))
endif
+$(eval $(call gb_Library_add_api,editeng,\
+ udkapi \
+ offapi \
+))
+
$(eval $(call gb_Library_add_exception_objects,editeng,\
editeng/inc/pch/precompiled_editeng \
editeng/source/accessibility/AccessibleComponentBase \
diff --git a/editeng/inc/editeng/brshitem.hxx b/editeng/inc/editeng/brshitem.hxx
index 32726d8de515..b3c314002999 100644
--- a/editeng/inc/editeng/brshitem.hxx
+++ b/editeng/inc/editeng/brshitem.hxx
@@ -116,7 +116,6 @@ public:
SvxGraphicPosition GetGraphicPos() const { return eGraphicPos; }
- void PurgeGraphic() const;
void PurgeMedium() const;
const Graphic* GetGraphic() const;
@@ -134,7 +133,6 @@ public:
static SvxGraphicPosition WallpaperStyle2GraphicPos( WallpaperStyle eStyle );
static WallpaperStyle GraphicPos2WallpaperStyle( SvxGraphicPosition ePos );
- CntWallpaperItem* CreateCntWallpaperItem() const;
};
#endif // #ifndef _SVX_BRSHITEM_HXX
diff --git a/editeng/inc/editeng/unonrule.hxx b/editeng/inc/editeng/unonrule.hxx
index 34d3c99f719f..5a60957698bd 100644
--- a/editeng/inc/editeng/unonrule.hxx
+++ b/editeng/inc/editeng/unonrule.hxx
@@ -43,7 +43,6 @@
EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > SvxCreateNumRule( const SvxNumRule* pRule ) throw();
EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > SvxCreateNumRule() throw();
const SvxNumRule& SvxGetNumRule( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > xRule ) throw( ::com::sun::star::lang::IllegalArgumentException );
-bool SvxGetNumRule( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > xRule, SvxNumRule& rNumRule );
EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XAnyCompare > SvxCreateNumRuleCompare() throw();
class SvxUnoNumberingRules : public ::cppu::WeakAggImplHelper5< com::sun::star::container::XIndexReplace, com::sun::star::ucb::XAnyCompare,
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 9a785af062ca..7f314ea3cc16 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -153,7 +153,9 @@ namespace accessibility
pStateSet->AddState( AccessibleStateType::ENABLED );
pStateSet->AddState( AccessibleStateType::SENSITIVE );
}
- catch( const uno::Exception& ) {}
+ catch (const uno::Exception&)
+ {
+ }
}
AccessibleEditableTextPara::~AccessibleEditableTextPara()
@@ -170,7 +172,9 @@ namespace accessibility
OSL_TRACE( "AccessibleEditableTextPara revoked ID: %d\n", mnNotifierClientId );
#endif
}
- catch( const uno::Exception& ) {}
+ catch (const uno::Exception&)
+ {
+ }
}
}
@@ -315,13 +319,17 @@ namespace accessibility
aOldDesc <<= getAccessibleDescription();
aOldName <<= getAccessibleName();
}
- catch( const uno::Exception& ) {} // optional behaviour
+ catch (const uno::Exception&) // optional behaviour
+ {
+ }
// index and therefore description changed
FireEvent( AccessibleEventId::DESCRIPTION_CHANGED, uno::makeAny( getAccessibleDescription() ), aOldDesc );
FireEvent( AccessibleEventId::NAME_CHANGED, uno::makeAny( getAccessibleName() ), aOldName );
}
}
- catch( const uno::Exception& ) {} // optional behaviour
+ catch (const uno::Exception&) // optional behaviour
+ {
+ }
}
sal_Int32 AccessibleEditableTextPara::GetParagraphIndex() const SAL_THROW((uno::RuntimeException))
@@ -355,7 +363,9 @@ namespace accessibility
OSL_TRACE( "Disposed ID: %d\n", nClientId );
#endif
}
- catch( const uno::Exception& ) {}
+ catch (const uno::Exception&)
+ {
+ }
}
}
@@ -385,7 +395,9 @@ namespace accessibility
{
TextChanged();
}
- catch( const uno::RuntimeException& ) {}
+ catch (const uno::RuntimeException&)
+ {
+ }
}
ESelection AccessibleEditableTextPara::MakeSelection( sal_Int32 nStartEEIndex, sal_Int32 nEndEEIndex )
@@ -1363,7 +1375,7 @@ namespace accessibility
else
return -1;
}
- catch( const lang::IndexOutOfBoundsException& )
+ catch (const lang::IndexOutOfBoundsException&)
{
// #103927# Don't throw for invalid nIndex values
return -1;
@@ -1437,7 +1449,7 @@ namespace accessibility
SvxEditViewForwarder& rCacheVF = GetEditViewForwarder( sal_True );
return rCacheVF.SetSelection( MakeSelection(nStartIndex, nEndIndex) );
}
- catch( const uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
return sal_False;
}
@@ -1650,7 +1662,7 @@ namespace accessibility
return aRetVal;
}
- catch( const uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
return sal_False;
}
@@ -1681,7 +1693,7 @@ namespace accessibility
return rCacheVF.Cut();
}
- catch( const uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
return sal_False;
}
@@ -1711,7 +1723,7 @@ namespace accessibility
return rCacheVF.Paste();
}
- catch( const uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
return sal_False;
}
@@ -1744,7 +1756,7 @@ namespace accessibility
return bRet;
}
- catch( const uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
return sal_False;
}
@@ -1779,7 +1791,7 @@ namespace accessibility
return bRet;
}
- catch( const uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
return sal_False;
}
@@ -1814,7 +1826,7 @@ namespace accessibility
return bRet;
}
- catch( const uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
return sal_False;
}
@@ -1861,7 +1873,7 @@ namespace accessibility
{
aPropSet.setPropertyValue(pPropArray->Name, pPropArray->Value);
}
- catch( const uno::Exception& )
+ catch (const uno::Exception&)
{
OSL_FAIL("AccessibleEditableTextPara::setAttributes exception in setPropertyValue");
}
@@ -1874,7 +1886,7 @@ namespace accessibility
return sal_True;
}
- catch( const uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
return sal_False;
}
@@ -1937,7 +1949,7 @@ namespace accessibility
{
aProp = xPropSetInfo->getPropertyByName( pRequestedAttributes[i] );
}
- catch (beans::UnknownPropertyException &)
+ catch (const beans::UnknownPropertyException&)
{
continue;
}
@@ -2036,7 +2048,7 @@ namespace accessibility
{
aProp = xPropSetInfo->getPropertyByName( pRequestedAttributes[i] );
}
- catch (beans::UnknownPropertyException &)
+ catch (const beans::UnknownPropertyException&)
{
continue;
}
@@ -2199,7 +2211,7 @@ namespace accessibility
aResult.SegmentStart = nStart;
aResult.SegmentEnd = nEnd;
}
- catch (lang::IndexOutOfBoundsException)
+ catch (const lang::IndexOutOfBoundsException&)
{
// this is not the exception that should be raised in this function ...
DBG_ASSERT( 0, "unexpected exception" );
@@ -2222,7 +2234,7 @@ namespace accessibility
{
aResult = getTextAtLineNumber( getNumberOfLineWithCaret() );
}
- catch (lang::IndexOutOfBoundsException &)
+ catch (const lang::IndexOutOfBoundsException&)
{
// this one needs to be catched since this interface does not allow for it.
}
@@ -2239,7 +2251,7 @@ namespace accessibility
{
nRes = getLineNumberAtIndex( getCaretPosition() );
}
- catch (lang::IndexOutOfBoundsException &)
+ catch (const lang::IndexOutOfBoundsException&)
{
// this one needs to be catched since this interface does not allow for it.
}
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 5286318f53eb..ac7eb920f61e 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -65,238 +65,234 @@
#include <editdoc.hxx>
#include <editdbg.hxx>
+#include <rtl/strbuf.hxx>
+
#if defined( DBG_UTIL ) || ( OSL_DEBUG_LEVEL > 1 )
-ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
+rtl::OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
{
- ByteString aDebStr;
+ rtl::OStringBuffer aDebStr;
switch ( rItem.Which() )
{
case EE_PARA_WRITINGDIR:
- aDebStr += "WritingDir=";
- aDebStr += ByteString::CreateFromInt32( ((SvxFrameDirectionItem&)rItem).GetValue() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("WritingDir="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxFrameDirectionItem&)rItem).GetValue()));
break;
case EE_PARA_OUTLLRSPACE:
case EE_PARA_LRSPACE:
- aDebStr += "FI=";
- aDebStr += ByteString::CreateFromInt32( ((SvxLRSpaceItem&)rItem).GetTxtFirstLineOfst() );
- aDebStr += ", LI=";
- aDebStr += ByteString::CreateFromInt32( ((SvxLRSpaceItem&)rItem).GetTxtLeft() );
- aDebStr += ", RI=";
- aDebStr += ByteString::CreateFromInt32( ((SvxLRSpaceItem&)rItem).GetRight() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FI="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxLRSpaceItem&)rItem).GetTxtFirstLineOfst()));
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM(", LI="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxLRSpaceItem&)rItem).GetTxtLeft()));
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM(", RI="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxLRSpaceItem&)rItem).GetRight()));
break;
case EE_PARA_NUMBULLET:
- {
- aDebStr += "NumItem ";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("NumItem "));
for ( sal_uInt16 nLevel = 0; nLevel < 3; nLevel++ )
{
- aDebStr += "Level";
- aDebStr += ByteString::CreateFromInt32( nLevel );
- aDebStr += "=";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Level"));
+ aDebStr.append(static_cast<sal_Int32>(nLevel));
+ aDebStr.append('=');
const SvxNumberFormat* pFmt = ((const SvxNumBulletItem&)rItem).GetNumRule()->Get( nLevel );
if ( pFmt )
{
- aDebStr += "(";
- aDebStr += ByteString::CreateFromInt32( pFmt->GetFirstLineOffset() );
- aDebStr += ",";
- aDebStr += ByteString::CreateFromInt32( pFmt->GetAbsLSpace() );
- aDebStr += ",";
+ aDebStr.append('(');
+ aDebStr.append(static_cast<sal_Int32>(pFmt->GetFirstLineOffset()));
+ aDebStr.append(',');
+ aDebStr.append(static_cast<sal_Int32>(pFmt->GetAbsLSpace()));
+ aDebStr.append(',');
if ( pFmt->GetNumberingType() == SVX_NUM_BITMAP )
- {
- aDebStr += "Bitmap";
- }
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Bitmap"));
else if( pFmt->GetNumberingType() != SVX_NUM_CHAR_SPECIAL )
- {
- aDebStr += "Number";
- }
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Number"));
else
{
- aDebStr += "Char=[";
- aDebStr += ByteString::CreateFromInt32( pFmt->GetBulletChar() );
- aDebStr += "]";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Char=["));
+ aDebStr.append(static_cast<sal_Int32>(pFmt->GetBulletChar()));
+ aDebStr.append(']');
}
- aDebStr += ") ";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM(") "));
}
}
- }
break;
case EE_PARA_BULLETSTATE:
- aDebStr += "ShowBullet=";
- aDebStr += ByteString::CreateFromInt32( ((SfxBoolItem&)rItem).GetValue() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("ShowBullet="));
+ aDebStr.append(static_cast<sal_Int32>(((SfxBoolItem&)rItem).GetValue()));
break;
case EE_PARA_HYPHENATE:
- aDebStr += "Hyphenate=";
- aDebStr += ByteString::CreateFromInt32( ((SfxBoolItem&)rItem).GetValue() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Hyphenate="));
+ aDebStr.append(static_cast<sal_Int32>(((SfxBoolItem&)rItem).GetValue()));
break;
case EE_PARA_OUTLLEVEL:
- aDebStr += "Level=";
- aDebStr += ByteString::CreateFromInt32( ((SfxInt16Item&)rItem).GetValue() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Level="));
+ aDebStr.append(static_cast<sal_Int32>(((SfxInt16Item&)rItem).GetValue()));
break;
case EE_PARA_ULSPACE:
- aDebStr += "SB=";
- aDebStr += ByteString::CreateFromInt32( ((SvxULSpaceItem&)rItem).GetUpper() );
- aDebStr += ", SA=";
- aDebStr += ByteString::CreateFromInt32( ((SvxULSpaceItem&)rItem).GetLower() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("SB="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxULSpaceItem&)rItem).GetUpper()));
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM(", SA="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxULSpaceItem&)rItem).GetLower()));
break;
case EE_PARA_SBL:
- aDebStr += "SBL=";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("SBL="));
if ( ((SvxLineSpacingItem&)rItem).GetLineSpaceRule() == SVX_LINE_SPACE_MIN )
{
- aDebStr += "Min: ";
- aDebStr += ByteString::CreateFromInt32( ((SvxLineSpacingItem&)rItem).GetInterLineSpace() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Min: "));
+ aDebStr.append(static_cast<sal_Int32>(((SvxLineSpacingItem&)rItem).GetInterLineSpace()));
}
else if ( ((SvxLineSpacingItem&)rItem).GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
{
- aDebStr += "Prop: ";
- aDebStr += ByteString::CreateFromInt32( (sal_uLong)((SvxLineSpacingItem&)rItem).GetPropLineSpace() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Prop: "));
+ aDebStr.append(static_cast<sal_Int32>(((SvxLineSpacingItem&)rItem).GetPropLineSpace()));
}
else
- aDebStr += "Unsupported Type!";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Unsupported Type!"));
break;
case EE_PARA_JUST:
- aDebStr += "SvxAdust=";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxAdjustItem&)rItem).GetAdjust() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("SvxAdust="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxAdjustItem&)rItem).GetAdjust()));
break;
case EE_PARA_TABS:
{
- aDebStr += "Tabs: ";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Tabs: "));
const SvxTabStopItem& rTabs = (const SvxTabStopItem&) rItem;
- aDebStr += ByteString::CreateFromInt32( rTabs.Count() );
+ aDebStr.append(static_cast<sal_Int32>(rTabs.Count()));
if ( rTabs.Count() )
{
- aDebStr += "( ";
- for ( sal_uInt16 i = 0; i < rTabs.Count(); i++ )
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("( "));
+ for (sal_uInt16 i = 0; i < rTabs.Count(); ++i)
{
const SvxTabStop& rTab = rTabs[i];
- aDebStr += ByteString::CreateFromInt32( rTab.GetTabPos() );
- aDebStr += " ";
+ aDebStr.append(static_cast<sal_Int32>(rTab.GetTabPos()));
+ aDebStr.append(' ');
}
- aDebStr += ")";
+ aDebStr.append(')');
}
}
break;
case EE_CHAR_LANGUAGE:
case EE_CHAR_LANGUAGE_CJK:
case EE_CHAR_LANGUAGE_CTL:
- aDebStr += "Language=";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxLanguageItem&)rItem).GetLanguage() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Language="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxLanguageItem&)rItem).GetLanguage()));
break;
case EE_CHAR_COLOR:
{
- aDebStr += "Color= ";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Color= "));
Color aColor( ((SvxColorItem&)rItem).GetValue() );
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)aColor.GetRed() );
- aDebStr += ", ";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)aColor.GetGreen() );
- aDebStr += ", ";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)aColor.GetBlue() );
+ aDebStr.append(static_cast<sal_Int32>(aColor.GetRed()));
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM(", "));
+ aDebStr.append(static_cast<sal_Int32>(aColor.GetGreen()));
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM(", "));
+ aDebStr.append(static_cast<sal_Int32>(aColor.GetBlue()));
}
break;
case EE_CHAR_FONTINFO:
case EE_CHAR_FONTINFO_CJK:
case EE_CHAR_FONTINFO_CTL:
{
- aDebStr += "Font=";
- aDebStr += ByteString( ((SvxFontItem&)rItem).GetFamilyName(), RTL_TEXTENCODING_ASCII_US );
- aDebStr += " (CharSet: ";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxFontItem&)rItem).GetCharSet() );
- aDebStr += ')';
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Font="));
+ aDebStr.append(rtl::OUStringToOString(((SvxFontItem&)rItem).GetFamilyName(), RTL_TEXTENCODING_ASCII_US));
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM(" (CharSet: "));
+ aDebStr.append(static_cast<sal_Int32>(((SvxFontItem&)rItem).GetCharSet()));
+ aDebStr.append(')');
}
break;
case EE_CHAR_FONTHEIGHT:
case EE_CHAR_FONTHEIGHT_CJK:
case EE_CHAR_FONTHEIGHT_CTL:
{
- aDebStr += "Groesse=";
- aDebStr += ByteString::CreateFromInt32( ((SvxFontHeightItem&)rItem).GetHeight() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Groesse="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxFontHeightItem&)rItem).GetHeight()));
Size aSz( 0, ((SvxFontHeightItem&)rItem).GetHeight() );
SfxMapUnit eUnit = rPool.GetMetric( rItem.Which() );
MapMode aItemMapMode( (MapUnit) eUnit );
MapMode aPntMap( MAP_POINT );
aSz = OutputDevice::LogicToLogic( aSz, aItemMapMode, aPntMap );
- aDebStr += " Points=";
- aDebStr += ByteString::CreateFromInt32( aSz.Height() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM(" Points="));
+ aDebStr.append(static_cast<sal_Int32>(aSz.Height()));
}
break;
case EE_CHAR_FONTWIDTH:
{
- aDebStr += "Breite=";
- aDebStr += ByteString::CreateFromInt32( ((SvxCharScaleWidthItem&)rItem).GetValue() );
- aDebStr += "%";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Breite="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxCharScaleWidthItem&)rItem).GetValue()));
+ aDebStr.append('%');
}
break;
case EE_CHAR_WEIGHT:
case EE_CHAR_WEIGHT_CJK:
case EE_CHAR_WEIGHT_CTL:
- aDebStr += "FontWeight=";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxWeightItem&)rItem).GetWeight() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontWeight="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxWeightItem&)rItem).GetWeight()));
break;
case EE_CHAR_UNDERLINE:
- aDebStr += "FontUnderline=";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxUnderlineItem&)rItem).GetLineStyle() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontUnderline="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxUnderlineItem&)rItem).GetLineStyle()));
break;
case EE_CHAR_OVERLINE:
- aDebStr += "FontOverline=";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxOverlineItem&)rItem).GetLineStyle() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontOverline="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxOverlineItem&)rItem).GetLineStyle()));
break;
case EE_CHAR_EMPHASISMARK:
- aDebStr += "FontUnderline=";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxEmphasisMarkItem&)rItem).GetEmphasisMark() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontUnderline="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxEmphasisMarkItem&)rItem).GetEmphasisMark()));
break;
case EE_CHAR_RELIEF:
- aDebStr += "FontRelief=";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxCharReliefItem&)rItem).GetValue() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontRelief="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxCharReliefItem&)rItem).GetValue()));
break;
case EE_CHAR_STRIKEOUT:
- aDebStr += "FontStrikeout=";
- aDebStr +=ByteString::CreateFromInt32( (sal_uInt16)((SvxCrossedOutItem&)rItem).GetStrikeout() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontStrikeout="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxCrossedOutItem&)rItem).GetStrikeout()));
break;
case EE_CHAR_ITALIC:
case EE_CHAR_ITALIC_CJK:
case EE_CHAR_ITALIC_CTL:
- aDebStr += "FontPosture=";
- aDebStr +=ByteString::CreateFromInt32( (sal_uInt16)((SvxPostureItem&)rItem).GetPosture() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontPosture="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxPostureItem&)rItem).GetPosture()));
break;
case EE_CHAR_OUTLINE:
- aDebStr += "FontOutline=";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxContourItem&)rItem).GetValue() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontOutline="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxContourItem&)rItem).GetValue()));
break;
case EE_CHAR_SHADOW:
- aDebStr += "FontShadowed=";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxShadowedItem&)rItem).GetValue() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontShadowed="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxShadowedItem&)rItem).GetValue()));
break;
case EE_CHAR_ESCAPEMENT:
- aDebStr += "Escape=";
- aDebStr += ByteString::CreateFromInt32( (short)((SvxEscapementItem&)rItem).GetEsc() );
- aDebStr += ", ";
- aDebStr += ByteString::CreateFromInt32( (short)((SvxEscapementItem&)rItem).GetProp() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Escape="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxEscapementItem&)rItem).GetEsc()));
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM(", "));
+ aDebStr.append(static_cast<sal_Int32>(((SvxEscapementItem&)rItem).GetProp()));
break;
case EE_CHAR_PAIRKERNING:
- aDebStr += "PairKerning=";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxAutoKernItem&)rItem).GetValue() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("PairKerning="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxAutoKernItem&)rItem).GetValue()));
break;
case EE_CHAR_KERNING:
{
- aDebStr += "Kerning=";
- aDebStr += ByteString::CreateFromInt32( (short)((SvxKerningItem&)rItem).GetValue() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Kerning="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxKerningItem&)rItem).GetValue()));
Size aSz( 0, (short)((SvxKerningItem&)rItem).GetValue() );
SfxMapUnit eUnit = rPool.GetMetric( rItem.Which() );
MapMode aItemMapMode( (MapUnit) eUnit );
MapMode aPntMap( MAP_POINT );
aSz = OutputDevice::LogicToLogic( aSz, aItemMapMode, aPntMap );
- aDebStr += " Points=";
- aDebStr += ByteString::CreateFromInt32( aSz.Height() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM(" Points="));
+ aDebStr.append(static_cast<sal_Int32>(aSz.Height()));
}
break;
case EE_CHAR_WLM:
- aDebStr += "WordLineMode=";
- aDebStr += ByteString::CreateFromInt32( (sal_uInt16)((SvxWordLineModeItem&)rItem).GetValue() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("WordLineMode="));
+ aDebStr.append(static_cast<sal_Int32>(((SvxWordLineModeItem&)rItem).GetValue()));
break;
case EE_CHAR_XMLATTRIBS:
- aDebStr += "XMLAttribs=...";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("XMLAttribs=..."));
break;
}
- return aDebStr;
+ return aDebStr.makeStringAndClear();
}
void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, sal_Bool bSearchInParent, sal_Bool bShowALL )
@@ -356,18 +352,18 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox )
for ( z = 0; z < pPPortion->GetNode()->GetCharAttribs().Count(); z++ )
{
EditCharAttrib* pAttr = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( z );
- ByteString aCharAttribs;
- aCharAttribs += "\nA";
- aCharAttribs += ByteString::CreateFromInt32( nPortion );
- aCharAttribs += ": ";
- aCharAttribs += ByteString::CreateFromInt32( pAttr->GetItem()->Which() );
- aCharAttribs += '\t';
- aCharAttribs += ByteString::CreateFromInt32( pAttr->GetStart() );
- aCharAttribs += '\t';
- aCharAttribs += ByteString::CreateFromInt32( pAttr->GetEnd() );
+ rtl::OStringBuffer aCharAttribs;
+ aCharAttribs.append(RTL_CONSTASCII_STRINGPARAM("\nA"));
+ aCharAttribs.append(static_cast<sal_Int32>(nPortion));
+ aCharAttribs.append(RTL_CONSTASCII_STRINGPARAM(": "));
+ aCharAttribs.append(static_cast<sal_Int32>(pAttr->GetItem()->Which()));
+ aCharAttribs.append('\t');
+ aCharAttribs.append(static_cast<sal_Int32>(pAttr->GetStart()));
+ aCharAttribs.append('\t');
+ aCharAttribs.append(static_cast<sal_Int32>(pAttr->GetEnd()));
if ( pAttr->IsEmpty() )
bZeroAttr = sal_True;
- fprintf( fp, "%s => ", aCharAttribs.GetBuffer() );
+ fprintf(fp, "%s => ", aCharAttribs.getStr());
ByteString aDebStr = DbgOutItem( rPool, *pAttr->GetItem() );
fprintf( fp, "%s", aDebStr.GetBuffer() );
@@ -376,38 +372,39 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox )
fprintf( fp, "\nNULL-Attribute!" );
sal_uInt16 nTextPortions = pPPortion->GetTextPortions().Count();
- ByteString aPortionStr("\nText portions: #");
- aPortionStr += ByteString::CreateFromInt32( nTextPortions );
- aPortionStr += " \nA";
- aPortionStr += ByteString::CreateFromInt32( nPortion );
- aPortionStr += ": Paragraph Length = ";
- aPortionStr += ByteString::CreateFromInt32( pPPortion->GetNode()->Len() );
- aPortionStr += "\nA";
- aPortionStr += ByteString::CreateFromInt32( nPortion );
- aPortionStr += ": ";
+ rtl::OStringBuffer aPortionStr(
+ RTL_CONSTASCII_STRINGPARAM("\nText portions: #"));
+ aPortionStr.append(static_cast<sal_Int32>(nTextPortions));
+ aPortionStr.append(RTL_CONSTASCII_STRINGPARAM(" \nA"));
+ aPortionStr.append(static_cast<sal_Int32>(nPortion));
+ aPortionStr.append(
+ RTL_CONSTASCII_STRINGPARAM(": Paragraph Length = "));
+ aPortionStr.append(static_cast<sal_Int32>(pPPortion->GetNode()->Len()));
+ aPortionStr.append(RTL_CONSTASCII_STRINGPARAM("\nA"));
+ aPortionStr.append(static_cast<sal_Int32>(nPortion));
+ aPortionStr.append(RTL_CONSTASCII_STRINGPARAM(": "));
sal_uLong n = 0;
for ( z = 0; z < nTextPortions; z++ )
{
TextPortion* pPortion = pPPortion->GetTextPortions().GetObject( z );
- aPortionStr += " ";
- aPortionStr += ByteString::CreateFromInt32( pPortion->GetLen() );
- aPortionStr += "(";
- aPortionStr += ByteString::CreateFromInt32( pPortion->GetSize().Width() );
- aPortionStr += ")";
- aPortionStr += "[";
- aPortionStr += ByteString::CreateFromInt32( (sal_uInt16)pPortion->GetKind() );
- aPortionStr += "]";
- aPortionStr += ";";
+ aPortionStr.append(' ');
+ aPortionStr.append(static_cast<sal_Int32>(pPortion->GetLen()));
+ aPortionStr.append('(');
+ aPortionStr.append(static_cast<sal_Int32>(pPortion->GetSize().Width()));
+ aPortionStr.append(')');
+ aPortionStr.append('[');
+ aPortionStr.append(static_cast<sal_Int32>(pPortion->GetKind()));
+ aPortionStr.append(']');
+ aPortionStr.append(';');
n += pPortion->GetLen();
}
- aPortionStr += "\nA";
- aPortionStr += ByteString::CreateFromInt32( nPortion );
- aPortionStr += ": Total length: ";
- aPortionStr += ByteString::CreateFromInt32( n );
+ aPortionStr.append(RTL_CONSTASCII_STRINGPARAM("\nA"));
+ aPortionStr.append(static_cast<sal_Int32>(nPortion));
+ aPortionStr.append(RTL_CONSTASCII_STRINGPARAM(": Total length: "));
+ aPortionStr.append(static_cast<sal_Int32>(n));
if ( pPPortion->GetNode()->Len() != n )
- aPortionStr += " => Error !!!";
- fprintf( fp, "%s", aPortionStr.GetBuffer() );
-
+ aPortionStr.append(RTL_CONSTASCII_STRINGPARAM(" => Error !!!"));
+ fprintf(fp, "%s", aPortionStr.getStr());
fprintf( fp, "\n\nLines:" );
// First the content ...
@@ -490,66 +487,66 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox )
InfoBox(0, String( RTL_CONSTASCII_USTRINGPARAM( "D:\\DEBUG.LOG !" ) ) ).Execute();
}
-ByteString EditDbg::GetPortionInfo( ParaPortion* pPPortion )
+rtl::OString EditDbg::GetPortionInfo( ParaPortion* pPPortion )
{
sal_uInt16 z;
- ByteString aDebStr( "Paragraph Length = " );
- aDebStr += ByteString::CreateFromInt32( pPPortion->GetNode()->Len() );
+ rtl::OStringBuffer aDebStr(RTL_CONSTASCII_STRINGPARAM("Paragraph Length = "));
+ aDebStr.append(static_cast<sal_Int32>(pPPortion->GetNode()->Len()));
- aDebStr += "\nCharacter attribute:";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\nCharacter attribute:"));
for ( z = 0; z < pPPortion->GetNode()->GetCharAttribs().Count(); z++ )
{
EditCharAttrib* pAttr = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( z );
- aDebStr += "\n ";
- aDebStr += ByteString::CreateFromInt32( pAttr->GetItem()->Which() );
- aDebStr += '\t';
- aDebStr += ByteString::CreateFromInt32( pAttr->GetStart() );
- aDebStr += '\t';
- aDebStr += ByteString::CreateFromInt32( pAttr->GetEnd() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\n "));
+ aDebStr.append(static_cast<sal_Int32>(pAttr->GetItem()->Which()));
+ aDebStr.append('\t');
+ aDebStr.append(static_cast<sal_Int32>(pAttr->GetStart()));
+ aDebStr.append('\t');
+ aDebStr.append(static_cast<sal_Int32>(pAttr->GetEnd()));
}
- aDebStr += "\nText portions:";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\nText portions:"));
sal_uInt16 n = 0;
for ( z = 0; z < pPPortion->GetTextPortions().Count(); z++ )
{
TextPortion* pPortion = pPPortion->GetTextPortions().GetObject( z );
- aDebStr += " ";
- aDebStr += ByteString::CreateFromInt32( pPortion->GetLen() );
- aDebStr += "(";
- aDebStr += ByteString::CreateFromInt32( pPortion->GetSize().Width() );
- aDebStr += ")";
- aDebStr += ";";
+ aDebStr.append(' ');
+ aDebStr.append(static_cast<sal_Int32>(pPortion->GetLen()));
+ aDebStr.append('(');
+ aDebStr.append(static_cast<sal_Int32>(pPortion->GetSize().Width()));
+ aDebStr.append(')');
+ aDebStr.append(';');
n = n + pPortion->GetLen();
}
- aDebStr += "\nTotal length: ";
- aDebStr += ByteString::CreateFromInt32( n );
- aDebStr += "\nSorted after Start:";
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\nTotal length: "));
+ aDebStr.append(static_cast<sal_Int32>(n));
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\nSorted after Start:"));
for ( sal_uInt16 x = 0; x < pPPortion->GetNode()->GetCharAttribs().Count(); x++ )
{
EditCharAttrib* pCurAttrib = pPPortion->GetNode()->GetCharAttribs().GetAttribs().GetObject( x );
- aDebStr += "\nStart: ";
- aDebStr += ByteString::CreateFromInt32( pCurAttrib->GetStart() );
- aDebStr += "\tEnd: ";
- aDebStr += ByteString::CreateFromInt32( pCurAttrib->GetEnd() );
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\nStart: "));
+ aDebStr.append(static_cast<sal_Int32>(pCurAttrib->GetStart()));
+ aDebStr.append(RTL_CONSTASCII_STRINGPARAM("\tEnd: "));
+ aDebStr.append(static_cast<sal_Int32>(pCurAttrib->GetEnd()));
}
- return aDebStr;
+ return aDebStr.makeStringAndClear();
}
-ByteString EditDbg::GetTextPortionInfo( TextPortionList& rPortions )
+rtl::OString EditDbg::GetTextPortionInfo(TextPortionList& rPortions)
{
- ByteString aDebStr;
- for ( sal_uInt16 z = 0; z < rPortions.Count(); z++ )
+ rtl::OStringBuffer aDebStr;
+ for (sal_uInt16 z = 0; z < rPortions.Count(); ++z)
{
TextPortion* pPortion = rPortions.GetObject( z );
- aDebStr += " ";
- aDebStr += ByteString::CreateFromInt32( pPortion->GetLen() );
- aDebStr += "(";
- aDebStr += ByteString::CreateFromInt32( pPortion->GetSize().Width() );
- aDebStr += ")";
- aDebStr += ";";
+ aDebStr.append(' ');
+ aDebStr.append(static_cast<sal_Int32>(pPortion->GetLen()));
+ aDebStr.append('(');
+ aDebStr.append(static_cast<sal_Int32>(pPortion->GetSize().Width()));
+ aDebStr.append(')');
+ aDebStr.append(';');
}
- return aDebStr;
+ return aDebStr.makeStringAndClear();
}
void EditDbg::ShowPortionData( ParaPortion* pPortion )
diff --git a/editeng/source/editeng/editdbg.hxx b/editeng/source/editeng/editdbg.hxx
index e8e2e1f6385c..79c1f6634888 100644
--- a/editeng/source/editeng/editdbg.hxx
+++ b/editeng/source/editeng/editdbg.hxx
@@ -41,7 +41,7 @@ class SfxItemSet;
class SfxItemPool;
class SfxPoolItem;
-ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem );
+rtl::OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem);
void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, sal_Bool bSearchInParent, sal_Bool bShowALL );
class EditDbg
@@ -49,8 +49,8 @@ class EditDbg
public:
static void ShowEditEngineData( EditEngine* pEditEngine, sal_Bool bInfoBox = sal_True );
static void ShowPortionData( ParaPortion* pPortion );
- static ByteString GetPortionInfo( ParaPortion* pPPortion );
- static ByteString GetTextPortionInfo( TextPortionList& rPortions );
+ static rtl::OString GetPortionInfo( ParaPortion* pPPortion );
+ static rtl::OString GetTextPortionInfo(TextPortionList& rPortions);
static ByteString GetUndoDebStr( EditUndoList* pUndoList );
};
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index ccb61a837c49..fa75702b3d25 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -59,87 +59,6 @@ DBG_NAME( XEditAttribute )
//--------------------------------------------------------------
-sal_Bool lcl_CreateBulletItem( const SvxNumBulletItem& rNumBullet, sal_uInt16 nLevel, SvxBulletItem& rBullet )
-{
- const SvxNumberFormat* pFmt = rNumBullet.GetNumRule()->Get( nLevel );
- if ( pFmt )
- {
- rBullet.SetWidth( (-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance() );
- rBullet.SetSymbol( pFmt->GetBulletChar() );
- rBullet.SetPrevText( pFmt->GetPrefix() );
- rBullet.SetFollowText( pFmt->GetSuffix() );
- rBullet.SetStart( pFmt->GetStart() );
- rBullet.SetScale( pFmt->GetBulletRelSize() );
-
- Font aBulletFont( rBullet.GetFont() );
- if ( pFmt->GetBulletFont() )
- aBulletFont = *pFmt->GetBulletFont();
- aBulletFont.SetColor( pFmt->GetBulletColor() );
- rBullet.SetFont( aBulletFont );
-
- if ( pFmt->GetBrush() && pFmt->GetBrush()->GetGraphic() )
- {
- Bitmap aBmp( pFmt->GetBrush()->GetGraphic()->GetBitmap() );
- aBmp.SetPrefSize( pFmt->GetGraphicSize() );
- aBmp.SetPrefMapMode( MAP_100TH_MM );
- rBullet.SetBitmap( aBmp );
- }
-
- switch ( pFmt->GetNumberingType() )
- {
- case SVX_NUM_CHARS_UPPER_LETTER:
- case SVX_NUM_CHARS_UPPER_LETTER_N:
- rBullet.SetStyle( BS_ABC_BIG );
- break;
- case SVX_NUM_CHARS_LOWER_LETTER:
- case SVX_NUM_CHARS_LOWER_LETTER_N:
- rBullet.SetStyle( BS_ABC_SMALL );
- break;
- case SVX_NUM_ROMAN_UPPER:
- rBullet.SetStyle( BS_ROMAN_BIG );
- break;
- case SVX_NUM_ROMAN_LOWER:
- rBullet.SetStyle( BS_ROMAN_SMALL );
- break;
- case SVX_NUM_ARABIC:
- rBullet.SetStyle( BS_123 );
- break;
- case SVX_NUM_NUMBER_NONE:
- rBullet.SetStyle( BS_NONE );
- break;
- case SVX_NUM_CHAR_SPECIAL:
- rBullet.SetStyle( BS_BULLET );
- break;
- case SVX_NUM_PAGEDESC:
- OSL_FAIL( "Unknown: SVX_NUM_PAGEDESC" );
- rBullet.SetStyle( BS_BULLET );
- break;
- case SVX_NUM_BITMAP:
- rBullet.SetStyle( BS_BMP );
- break;
- default:
- OSL_FAIL( "Unknown NumType" );
- }
-
- switch ( pFmt->GetNumAdjust() )
- {
- case SVX_ADJUST_LEFT:
- rBullet.SetJustification( BJ_VCENTER|BJ_HLEFT );
- break;
- case SVX_ADJUST_RIGHT:
- rBullet.SetJustification( BJ_VCENTER|BJ_HRIGHT );
- break;
- case SVX_ADJUST_CENTER:
- rBullet.SetJustification( BJ_VCENTER|BJ_HCENTER );
- break;
- default:
- OSL_FAIL( "Unknown or invalid NumAdjust" );
- }
- }
- return pFmt ? sal_True : sal_False;
-}
-
-
XEditAttribute* MakeXEditAttribute( SfxItemPool& rPool, const SfxPoolItem& rItem, sal_uInt16 nStart, sal_uInt16 nEnd )
{
// Create thw new attribute in the pool
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 9f00bea57bca..272d0bef7b5d 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -980,13 +980,17 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
}
// SWG:
if ( nEsc )
- rOutput << "{\\*\\updnprop" << ByteString::CreateFromInt32( nProp100 ).GetBuffer() << '}';
+ {
+ rOutput << "{\\*\\updnprop" << rtl::OString::valueOf(
+ static_cast<sal_Int32>(nProp100)).getStr() << '}';
+ }
long nUpDown = nFontHeight * Abs( nEsc ) / 100;
- ByteString aUpDown = ByteString::CreateFromInt32( nUpDown );
+ rtl::OString aUpDown = rtl::OString::valueOf(
+ static_cast<sal_Int32>(nUpDown));
if ( nEsc < 0 )
- rOutput << OOO_STRING_SVTOOLS_RTF_DN << aUpDown.GetBuffer();
+ rOutput << OOO_STRING_SVTOOLS_RTF_DN << aUpDown.getStr();
else if ( nEsc > 0 )
- rOutput << OOO_STRING_SVTOOLS_RTF_UP << aUpDown.GetBuffer();
+ rOutput << OOO_STRING_SVTOOLS_RTF_UP << aUpDown.getStr();
}
break;
}
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 2e2b439878a7..4b711dc523bb 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3849,19 +3849,6 @@ SvStream& SvxBrushItem::Store( SvStream& rStream , sal_uInt16 /*nItemVersion*/ )
}
// -----------------------------------------------------------------------
-// cast away const, since const is to be understood as a logical const
-// if GetGraphic() is called, the item should take care of getting a linked
-// graphic.
-// -----------------------------------------------------------------------
-
-void SvxBrushItem::PurgeGraphic() const
-{
- PurgeMedium();
- DELETEZ( pImpl->pGraphicObject );
- ((SvxBrushItem*)this)->bLoadAgain = sal_True;
-}
-
-// -----------------------------------------------------------------------
void SvxBrushItem::PurgeMedium() const
{
@@ -4076,25 +4063,6 @@ SvxBrushItem::SvxBrushItem( const CntWallpaperItem& rItem, sal_uInt16 _nWhich )
}
}
-CntWallpaperItem* SvxBrushItem::CreateCntWallpaperItem() const
-{
- CntWallpaperItem* pItem = new CntWallpaperItem( 0 );
- pItem->SetColor( aColor.GetColor() );
- pItem->SetStyle( (sal_uInt16)GraphicPos2WallpaperStyle( GetGraphicPos() ) );
- sal_Bool bLink = (pStrLink != 0);
- if( bLink )
- {
- String aURL = *pStrLink;
- pItem->SetBitmapURL( aURL );
- }
- if( pImpl->pGraphicObject )
- {
- DBG_ERRORFILE( "Don't know what to do with a graphic" );
- }
-
- return pItem;
-}
-
#ifdef _MSC_VER
#pragma optimize ( "", on )
#endif
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index fc582280c364..9ca85c76cc68 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -109,7 +109,6 @@ static const sal_Char
static const sal_Char sImplWordChars[] = "-'";
void EncryptBlockName_Imp( String& rName );
-void DecryptBlockName_Imp( String& rName );
// FileVersions Number for the Substitution-/Exception list separately
@@ -143,35 +142,6 @@ 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 )
- {
- 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 )
{
@@ -1766,25 +1736,6 @@ void GeneratePackageName ( const String& rShort, String& rPackageName )
}
}
-void DecryptBlockName_Imp( String& rName )
-{
- if( '#' == rName.GetChar( 0 ) )
- {
- rName.Erase( 0, 1 );
- sal_Unicode* pName = rName.GetBufferAccess();
- xub_StrLen nLen, nPos;
- for ( nLen = rName.Len(), nPos = 0; nPos < nLen; ++nPos, ++pName )
- switch( *pName )
- {
- case 0x01: *pName = '!'; break;
- case 0x0A: *pName = ':'; break;
- case 0x0C: *pName = '\\'; break;
- case 0x0E: *pName = '.'; break;
- case 0x0F: *pName = '/'; break;
- }
- }
-}
-
const SvxAutocorrWord* lcl_SearchWordsInList(
SvxAutoCorrectLanguageListsPtr pList, const String& rTxt,
xub_StrLen& rStt, xub_StrLen nEndPos, SvxAutoCorrDoc& )
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 86b93a2eef19..ce01a1f3d955 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -76,25 +76,6 @@ static const sal_uInt16 nDefBulletWidth = 700;
static const sal_uInt16 pDefBulletIndents[nDefStyles]= { 1400, 800, 800 };
static const sal_uInt16 pDefBulletWidths[nDefStyles] = { 1000, 850, 700 };
-sal_uInt16 lcl_ImplGetDefBulletWidth( sal_Int16 nDepth )
-{
- return ( nDepth < nDefStyles ) ? pDefBulletWidths[nDepth] : nDefBulletWidth;
-}
-
-sal_uInt16 lcl_ImplGetDefBulletIndent( sal_Int16 nDepth )
-{
- sal_uInt16 nI = 0;
-
- if( nDepth >= 0 )
- {
- for ( sal_Int16 n = 0; n <= nDepth; n++ )
- nI = nI +
- ( ( n < nDefStyles ) ? pDefBulletIndents[n] : nDefBulletIndent );
- }
- return nI;
-}
-
-
// ----------------------------------------------------------------------
// Outliner
// ----------------------------------------------------------------------
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 8861b6ca125a..d3915e770d21 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -499,44 +499,6 @@ const SvxNumRule& SvxGetNumRule( Reference< XIndexReplace > xRule ) throw( Illeg
return pRule->getNumRule();
}
-bool SvxGetNumRule( Reference< XIndexReplace > xRule, SvxNumRule& rNumRule )
-{
- SvxUnoNumberingRules* pRule = SvxUnoNumberingRules::getImplementation( xRule );
- if( pRule )
- {
- rNumRule = pRule->getNumRule();
- }
- else if( xRule.is() )
- {
- try
- {
- pRule = new SvxUnoNumberingRules( rNumRule );
-
- Reference< XIndexReplace > xDestRule( pRule );
-
- const sal_Int32 nCount = min( xRule->getCount(), xDestRule->getCount() );
- sal_Int32 nLevel;
- for( nLevel = 0; nLevel < nCount; nLevel++ )
- {
- xDestRule->replaceByIndex( nLevel, xRule->getByIndex( nLevel ) );
- }
-
- rNumRule = pRule->getNumRule();
- }
- catch( Exception& )
- {
- return false;
- }
- }
- else
- {
- return false;
- }
-
- return true;
-}
-
-///////////////////////////////////////////////////////////////////////
com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCreateNumRule( const SvxNumRule* pRule ) throw()
{
DBG_ASSERT( pRule, "No default SvxNumRule!" );
diff --git a/editeng/util/editeng.dxp b/editeng/util/editeng.dxp
index f0e1c69934bc..70033078921a 100755
--- a/editeng/util/editeng.dxp
+++ b/editeng/util/editeng.dxp
@@ -1,2 +1 @@
-component_getImplementationEnvironment
component_getFactory