summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-01-13 09:36:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-01-13 23:02:37 +0000
commit612981fc8fd7a35d8112951e05e1b2cf0f5f1c08 (patch)
tree3256b4dffb2d9d7e7ab543e98e2936b38041e9c1 /editeng
parent62188aac68b30affbe144f8bd06f346f0e749cf9 (diff)
callcatcher: update and remove newly unused code
Change-Id: Iff3ce7c3a44010b3bc81fc0d2156216ee13948dc
Diffstat (limited to 'editeng')
-rw-r--r--editeng/inc/editeng/editobj.hxx13
-rw-r--r--editeng/source/editeng/editobj.cxx246
-rw-r--r--editeng/source/editeng/editobj2.hxx15
3 files changed, 0 insertions, 274 deletions
diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx
index 12984967cf1d..985b7c4a6221 100644
--- a/editeng/inc/editeng/editobj.hxx
+++ b/editeng/inc/editeng/editobj.hxx
@@ -72,16 +72,11 @@ public:
sal_uInt16 GetUserType() const; // For OutlinerMode, it can however not save in compatible format
void SetUserType( sal_uInt16 n );
- sal_uLong GetObjectSettings() const;
- void SetObjectSettings( sal_uLong n );
-
bool IsVertical() const;
void SetVertical( bool bVertical );
sal_uInt16 GetScriptType() const;
- sal_uInt16 GetVersion() const; // As long as the outliner does not store any record length.
-
EditTextObject* Clone() const;
bool Store( SvStream& rOStream ) const;
@@ -92,23 +87,16 @@ public:
size_t GetParagraphCount() const;
String GetText(size_t nPara) const;
- void Insert(const EditTextObject& rObj, size_t nPara);
- void RemoveParagraph(size_t nPara);
- EditTextObject* CreateTextObject(size_t nPara, size_t nParas = 1) const;
- bool HasPortionInfo() const;
void ClearPortionInfo();
bool HasOnlineSpellErrors() const;
- bool HasCharAttribs( sal_uInt16 nWhich = 0 ) const;
void GetCharAttribs( sal_uInt16 nPara, std::vector<EECharAttrib>& rLst ) const;
bool RemoveCharAttribs( sal_uInt16 nWhich = 0 );
bool RemoveParaAttribs( sal_uInt16 nWhich = 0 );
- void MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart = EE_CHAR_START, sal_uInt16 nEnd = EE_CHAR_END );
-
bool IsFieldObject() const;
const SvxFieldItem* GetField() const;
bool HasField( sal_Int32 nType = com::sun::star::text::textfield::Type::UNSPECIFIED ) const;
@@ -116,7 +104,6 @@ public:
const SfxItemSet& GetParaAttribs(size_t nPara) const;
void SetParaAttribs(size_t nPara, const SfxItemSet& rAttribs);
- bool HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const;
void GetStyleSheet(size_t nPara, String& rName, SfxStyleFamily& eFamily) const;
void SetStyleSheet(size_t nPara, const String& rName, const SfxStyleFamily& eFamily);
bool ChangeStyleSheets(
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 41698af8abb6..5f400be2f16d 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -205,26 +205,6 @@ String EditTextObject::GetText(size_t nPara) const
return mpImpl->GetText(nPara);
}
-void EditTextObject::Insert(const EditTextObject& rObj, size_t nPara)
-{
- mpImpl->Insert(rObj, nPara);
-}
-
-EditTextObject* EditTextObject::CreateTextObject(size_t nPara, size_t nParas) const
-{
- return mpImpl->CreateTextObject(nPara, nParas);
-}
-
-void EditTextObject::RemoveParagraph(size_t nPara)
-{
- mpImpl->RemoveParagraph(nPara);
-}
-
-bool EditTextObject::HasPortionInfo() const
-{
- return mpImpl->HasPortionInfo();
-}
-
void EditTextObject::ClearPortionInfo()
{
mpImpl->ClearPortionInfo();
@@ -235,21 +215,11 @@ bool EditTextObject::HasOnlineSpellErrors() const
return mpImpl->HasOnlineSpellErrors();
}
-bool EditTextObject::HasCharAttribs( sal_uInt16 nWhich ) const
-{
- return mpImpl->HasCharAttribs(nWhich);
-}
-
void EditTextObject::GetCharAttribs( sal_uInt16 nPara, std::vector<EECharAttrib>& rLst ) const
{
mpImpl->GetCharAttribs(nPara, rLst);
}
-void EditTextObject::MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart, sal_uInt16 nEnd )
-{
- mpImpl->MergeParaAttribs(rAttribs, nStart, nEnd);
-}
-
bool EditTextObject::IsFieldObject() const
{
return mpImpl->IsFieldObject();
@@ -285,11 +255,6 @@ bool EditTextObject::RemoveParaAttribs( sal_uInt16 nWhich )
return mpImpl->RemoveParaAttribs(nWhich);
}
-bool EditTextObject::HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const
-{
- return mpImpl->HasStyleSheet(rName, eFamily);
-}
-
void EditTextObject::GetStyleSheet(size_t nPara, String& rName, SfxStyleFamily& eFamily) const
{
mpImpl->GetStyleSheet(nPara, rName, eFamily);
@@ -327,16 +292,6 @@ void EditTextObject::SetUserType( sal_uInt16 n )
mpImpl->SetUserType(n);
}
-sal_uLong EditTextObject::GetObjectSettings() const
-{
- return mpImpl->GetObjectSettings();
-}
-
-void EditTextObject::SetObjectSettings( sal_uLong n )
-{
- mpImpl->SetObjectSettings(n);
-}
-
bool EditTextObject::IsVertical() const
{
return mpImpl->IsVertical();
@@ -417,11 +372,6 @@ void EditTextObject::CreateData( SvStream& rStrm )
mpImpl->CreateData(rStrm);
}
-sal_uInt16 EditTextObject::GetVersion() const
-{
- return mpImpl->GetVersion();
-}
-
EditTextObject* EditTextObject::Clone() const
{
return new EditTextObject(*this);
@@ -597,16 +547,6 @@ void EditTextObjectImpl::SetUserType( sal_uInt16 n )
nUserType = n;
}
-sal_uLong EditTextObjectImpl::GetObjectSettings() const
-{
- return nObjSettings;
-}
-
-void EditTextObjectImpl::SetObjectSettings( sal_uLong n )
-{
- nObjSettings = n;
-}
-
bool EditTextObjectImpl::IsVertical() const
{
return bVertical;
@@ -671,66 +611,6 @@ String EditTextObjectImpl::GetText(size_t nPara) const
return aContents[nPara].GetText();
}
-void EditTextObjectImpl::Insert(const EditTextObject& rObj, size_t nDestPara)
-{
- const EditTextObjectImpl& rBinObj = *rObj.mpImpl;
-
- if (nDestPara > aContents.size())
- nDestPara = aContents.size();
-
- const ContentInfosType& rCIs = rBinObj.aContents;
- for (size_t i = 0, n = rCIs.size(); i < n; ++i)
- {
- const ContentInfo& rC = rCIs[i];
- size_t nPos = nDestPara + i;
- aContents.insert(
- aContents.begin()+nPos, new ContentInfo(rC, *GetPool()));
- }
-
- ClearPortionInfo();
-}
-
-EditTextObject* EditTextObjectImpl::CreateTextObject(size_t nPara, size_t nParas) const
-{
- if (nPara >= aContents.size() || !nParas)
- return NULL;
-
- // Only split the Pool, when a the Pool is set externally.
- EditTextObject* pObj = new EditTextObject( bOwnerOfPool ? 0 : pPool );
- if ( bOwnerOfPool && pPool )
- pObj->mpImpl->GetPool()->SetDefaultMetric( pPool->GetMetric( DEF_METRIC ) );
-
- // If complete text is only one ScriptType, this is valid.
- // If text contains different ScriptTypes, this shouldn't be a problem...
- pObj->mpImpl->nScriptType = nScriptType;
-
- const size_t nEndPara = nPara+nParas-1;
- for (size_t i = nPara; i <= nEndPara; ++i)
- {
- const ContentInfo& rC = aContents[i];
- ContentInfo* pNew = new ContentInfo(rC, *pObj->mpImpl->GetPool());
- pObj->mpImpl->aContents.push_back(pNew);
- }
- return pObj;
-}
-
-void EditTextObjectImpl::RemoveParagraph(size_t nPara)
-{
- DBG_ASSERT( nPara < aContents.size(), "BinTextObject::GetText: Paragraph does not exist!" );
- if (nPara >= aContents.size())
- return;
-
- ContentInfosType::iterator it = aContents.begin();
- std::advance(it, nPara);
- aContents.erase(it);
- ClearPortionInfo();
-}
-
-bool EditTextObjectImpl::HasPortionInfo() const
-{
- return pPortionInfo ? true : false;
-}
-
void EditTextObjectImpl::ClearPortionInfo()
{
if ( pPortionInfo )
@@ -751,26 +631,6 @@ bool EditTextObjectImpl::HasOnlineSpellErrors() const
return false;
}
-bool EditTextObjectImpl::HasCharAttribs( sal_uInt16 _nWhich ) const
-{
- for (size_t nPara = aContents.size(); nPara; )
- {
- const ContentInfo& rC = aContents[--nPara];
-
- size_t nAttribs = rC.aAttribs.size();
- if ( nAttribs && !_nWhich )
- return true;
-
- for (size_t nAttr = nAttribs; nAttr; )
- {
- const XEditAttribute& rX = rC.aAttribs[--nAttr];
- if (rX.GetItem()->Which() == _nWhich)
- return true;
- }
- }
- return false;
-}
-
void EditTextObjectImpl::GetCharAttribs( sal_uInt16 nPara, std::vector<EECharAttrib>& rLst ) const
{
rLst.clear();
@@ -787,29 +647,6 @@ void EditTextObjectImpl::GetCharAttribs( sal_uInt16 nPara, std::vector<EECharAtt
}
}
-void EditTextObjectImpl::MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart, sal_uInt16 nEnd )
-{
- bool bChanged = false;
-
- for (size_t nPara = aContents.size(); nPara; )
- {
- ContentInfo& rC = aContents[--nPara];
-
- for ( sal_uInt16 nW = nStart; nW <= nEnd; nW++ )
- {
- if ( ( rC.GetParaAttribs().GetItemState( nW, false ) != SFX_ITEM_ON )
- && ( rAttribs.GetItemState( nW, false ) == SFX_ITEM_ON ) )
- {
- rC.GetParaAttribs().Put( rAttribs.Get( nW ) );
- bChanged = true;
- }
- }
- }
-
- if ( bChanged )
- ClearPortionInfo();
-}
-
bool EditTextObjectImpl::IsFieldObject() const
{
return GetField() ? true : false;
@@ -928,18 +765,6 @@ bool EditTextObjectImpl::RemoveParaAttribs( sal_uInt16 _nWhich )
return bChanged;
}
-bool EditTextObjectImpl::HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const
-{
- size_t nParagraphs = aContents.size();
- for (size_t nPara = 0; nPara < nParagraphs; ++nPara)
- {
- const ContentInfo& rC = aContents[nPara];
- if (rC.GetFamily() == eFamily && rC.GetStyle() == rName)
- return true;
- }
- return false;
-}
-
void EditTextObjectImpl::GetStyleSheet(size_t nPara, String& rName, SfxStyleFamily& rFamily) const
{
if (nPara >= aContents.size())
@@ -1467,11 +1292,6 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
}
}
-sal_uInt16 EditTextObjectImpl::GetVersion() const
-{
- return nVersion;
-}
-
bool EditTextObjectImpl::operator==( const EditTextObjectImpl& rCompare ) const
{
if( this == &rCompare )
@@ -1516,70 +1336,4 @@ bool EditTextObjectImpl::isWrongListEqual(const EditTextObjectImpl& rCompare) co
return true;
}
-#define CHARSETMARKER 0x9999
-
-void EditTextObjectImpl::CreateData300( SvStream& rIStream )
-{
- // For forward compatibility.
-
- // First load the Pool...
- // Is always saved in the 300!
- GetPool()->Load( rIStream );
-
- // The number of paragraphs ...
- sal_uInt32 nParagraphs;
- rIStream >> nParagraphs;
-
- // The individual paragraphs...
- for ( sal_uLong nPara = 0; nPara < nParagraphs; nPara++ )
- {
- ContentInfo* pC = CreateAndInsertContent();
-
- // The Text...
- pC->GetText() = rIStream.ReadUniOrByteString(rIStream.GetStreamCharSet());
-
- // StyleName and Family...
- pC->GetStyle() = rIStream.ReadUniOrByteString(rIStream.GetStreamCharSet());
- sal_uInt16 nStyleFamily;
- rIStream >> nStyleFamily;
- pC->GetFamily() = (SfxStyleFamily)nStyleFamily;
-
- // Paragraph attributes ...
- pC->GetParaAttribs().Load( rIStream );
-
- // The number of attributes ...
- sal_uInt32 nAttribs;
- rIStream >> nAttribs;
-
- // And the individual attributes
- // Items as Surregate => always 8 bytes per Attribute
- // Which = 2; Surregat = 2; Start = 2; End = 2;
- for ( sal_uLong nAttr = 0; nAttr < nAttribs; nAttr++ )
- {
- sal_uInt16 _nWhich, nStart, nEnd;
- const SfxPoolItem* pItem;
-
- rIStream >> _nWhich;
- _nWhich = pPool->GetNewWhich( _nWhich );
- pItem = pPool->LoadSurrogate( rIStream, _nWhich, 0 );
- rIStream >> nStart;
- rIStream >> nEnd;
- if ( pItem )
- {
- XEditAttribute* pAttr = new XEditAttribute( *pItem, nStart, nEnd );
- pC->aAttribs.push_back(pAttr);
- }
- }
- }
-
- // Check whether a font was saved
- sal_uInt16 nCharSetMarker;
- rIStream >> nCharSetMarker;
- if ( nCharSetMarker == CHARSETMARKER )
- {
- sal_uInt16 nCharSet;
- rIStream >> nCharSet;
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx
index 6c0f5861fd1d..4d8923f4729a 100644
--- a/editeng/source/editeng/editobj2.hxx
+++ b/editeng/source/editeng/editobj2.hxx
@@ -187,17 +187,12 @@ public:
sal_uInt16 GetUserType() const;
void SetUserType( sal_uInt16 n );
- sal_uLong GetObjectSettings() const;
- void SetObjectSettings( sal_uLong n );
-
bool IsVertical() const;
void SetVertical( bool b );
sal_uInt16 GetScriptType() const;
void SetScriptType( sal_uInt16 nType );
- sal_uInt16 GetVersion() const; // As long as the outliner does not store any record length
-
ContentInfo* CreateAndInsertContent();
XEditAttribute* CreateAttrib( const SfxPoolItem& rItem, sal_uInt16 nStart, sal_uInt16 nEnd );
void DestroyAttrib( XEditAttribute* pAttr );
@@ -211,23 +206,16 @@ public:
size_t GetParagraphCount() const;
String GetText(size_t nParagraph) const;
- void Insert(const EditTextObject& rObj, size_t nPara);
- EditTextObject* CreateTextObject(size_t nPara, size_t nParas = 1) const;
- void RemoveParagraph(size_t nPara);
- bool HasPortionInfo() const;
void ClearPortionInfo();
bool HasOnlineSpellErrors() const;
- bool HasCharAttribs( sal_uInt16 nWhich = 0 ) const;
void GetCharAttribs( sal_uInt16 nPara, std::vector<EECharAttrib>& rLst ) const;
bool RemoveCharAttribs( sal_uInt16 nWhich = 0 );
bool RemoveParaAttribs( sal_uInt16 nWhich = 0 );
- void MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart, sal_uInt16 nEnd );
-
bool IsFieldObject() const;
const SvxFieldItem* GetField() const;
bool HasField( sal_Int32 nType = com::sun::star::text::textfield::Type::UNSPECIFIED ) const;
@@ -235,7 +223,6 @@ public:
const SfxItemSet& GetParaAttribs(size_t nPara) const;
void SetParaAttribs(size_t nPara, const SfxItemSet& rAttribs);
- bool HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const;
void GetStyleSheet(size_t nPara, String& rName, SfxStyleFamily& eFamily) const;
void SetStyleSheet(size_t nPara, const String& rName, const SfxStyleFamily& eFamily);
bool ChangeStyleSheets(
@@ -244,8 +231,6 @@ public:
editeng::FieldUpdater GetFieldUpdater();
- void CreateData300( SvStream& rIStream );
-
bool HasMetric() const { return nMetric != 0xFFFF; }
sal_uInt16 GetMetric() const { return nMetric; }
void SetMetric( sal_uInt16 n ) { nMetric = n; }