[Libreoffice-commits] .: 2 commits - editeng/inc editeng/source
editeng/inc/editeng/editeng.hxx | 20 ++ editeng/inc/editeng/editund2.hxx| 11 - editeng/source/editeng/editeng.cxx | 55 ++ editeng/source/editeng/editundo.cxx | 295 editeng/source/editeng/editundo.hxx | 84 +- editeng/source/editeng/impedit.hxx |5 editeng/source/editeng/impedit2.cxx | 22 +- editeng/source/editeng/impedit4.cxx |2 editeng/source/editeng/impedit5.cxx | 12 - 9 files changed, 271 insertions(+), 235 deletions(-) New commits: commit 56ef4ea05520115dc5db6bf861dca80a20a76775 Author: Kohei Yoshida Date: Tue Apr 17 12:12:43 2012 -0400 Removed all references to ImpEditEngine from all of edit undo classes. diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx index 523addf..5cbad78 100644 --- a/editeng/inc/editeng/editeng.hxx +++ b/editeng/inc/editeng/editeng.hxx @@ -132,6 +132,9 @@ class EDITENG_DLLPUBLIC EditEngine friend class EditDbg; friend class Outliner; +public: +typedef std::vector ViewsType; + private: ImpEditEngine* pImpEditEngine; @@ -214,6 +217,7 @@ public: size_t GetViewCount() const; sal_BoolHasView( EditView* pView ) const; EditView* GetActiveView() const; +void SetActiveView(EditView* pView); voidSetPaperSize( const Size& rSize ); const Size& GetPaperSize() const; @@ -572,6 +576,12 @@ public: void RemoveCharAttribs(sal_uInt16 nPara, sal_uInt16 nWhich = 0, bool bRemoveFeatures = false); void RemoveCharAttribs(const EditSelection& rSel, bool bRemoveParaAttribs, sal_uInt16 nWhich = 0); + +ViewsType& GetEditViews(); +const ViewsType& GetEditViews() const; + +void SetUndoMode(bool b); +void FormatAndUpdate(EditView* pCurView = NULL); }; #endif // _MyEDITENG_HXX diff --git a/editeng/inc/editeng/editund2.hxx b/editeng/inc/editeng/editund2.hxx index 85ad570..dc465a9 100644 --- a/editeng/inc/editeng/editund2.hxx +++ b/editeng/inc/editeng/editund2.hxx @@ -33,17 +33,15 @@ #include class EditEngine; -class ImpEditEngine; class EDITENG_DLLPRIVATE EditUndoManager : public SfxUndoManager { using SfxUndoManager::Undo; using SfxUndoManager::Redo; -private: -ImpEditEngine* pImpEE; +EditEngine* mpEditEngine; public: -EditUndoManager( ImpEditEngine* pImpEE ); +EditUndoManager(EditEngine* pEE); virtual sal_Bool Undo(); virtual sal_Bool Redo(); @@ -56,15 +54,14 @@ class EDITENG_DLLPUBLIC EditUndo : public SfxUndoAction { private: sal_uInt16 nId; -ImpEditEngine* mpEditEngine; +EditEngine* mpEditEngine; public: TYPEINFO(); -EditUndo(sal_uInt16 nI, ImpEditEngine* pEE); +EditUndo(sal_uInt16 nI, EditEngine* pEE); virtual ~EditUndo(); EditEngine* GetEditEngine(); -ImpEditEngine* GetImpEditEngine(); virtual voidUndo() = 0; virtual voidRedo() = 0; diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 2f9e901..8314387 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -421,6 +421,11 @@ EditView* EditEngine::GetActiveView() const return pImpEditEngine->GetActiveView(); } +void EditEngine::SetActiveView(EditView* pView) +{ +pImpEditEngine->SetActiveView(pView); +} + void EditEngine::SetDefTab( sal_uInt16 nDefTab ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -807,6 +812,26 @@ void EditEngine::RemoveCharAttribs(const EditSelection& rSel, bool bRemoveParaAt pImpEditEngine->RemoveCharAttribs(rSel, bRemoveParaAttribs, nWhich); } +EditEngine::ViewsType& EditEngine::GetEditViews() +{ +return pImpEditEngine->GetEditViews(); +} + +const EditEngine::ViewsType& EditEngine::GetEditViews() const +{ +return pImpEditEngine->GetEditViews(); +} + +void EditEngine::SetUndoMode(bool b) +{ +pImpEditEngine->SetUndoMode(b); +} + +void EditEngine::FormatAndUpdate(EditView* pCurView) +{ +pImpEditEngine->FormatAndUpdate(pCurView); +} + uno::Reference EditEngine::CreateTransferable(const EditSelection& rSelection) { return pImpEditEngine->CreateTransferable(rSelection); diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index ebbc6e9..be05f7d 100644 --- a/editeng/source/editeng/editundo.cxx +++ b/editeng/source/editeng/editundo.cxx @@ -65,22 +65,19 @@ void lcl_DoSetSelection( EditView* pView, sal_uInt16 nPara ) pView->GetImpEditView()->SetEditSelection( aSel ); } -EditUndoManager::EditUndoManager( ImpEditEngine* p ) -{ -pImpEE = p; -} +EditUndoManager::EditUndoManager(EditEngine* pEE) : mpEditEngine(pEE) {} sal_Bool EditUndoManager::Undo() { if ( GetUndoActionCount() == 0 ) return sal_False; -DBG_ASSERT( pImpEE->GetActiveView(), "Active View?" ); +DBG_ASSERT( mpEditEngine->GetActiveView(), "Active View?" ); -if ( !pImpEE->GetActiveView() )
[Libreoffice-commits] .: 2 commits - editeng/inc editeng/source
editeng/inc/editeng/editobj.hxx | 18 - editeng/source/editeng/editobj.cxx | 500 +--- editeng/source/editeng/editobj2.hxx | 42 +-- editeng/source/editeng/impedit4.cxx |6 4 files changed, 281 insertions(+), 285 deletions(-) New commits: commit 5d2b0f25f14c33c00cbf31d16e50bc9e00d60f06 Author: Kohei Yoshida Date: Sun Apr 8 13:30:09 2012 -0400 Killed Another instance of svarray. diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx index e3c9340..b495efb 100644 --- a/editeng/inc/editeng/editobj.hxx +++ b/editeng/inc/editeng/editobj.hxx @@ -85,12 +85,12 @@ public: static EditTextObject* Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool = 0 ); -virtual sal_uInt16 GetParagraphCount() const; +virtual size_t GetParagraphCount() const; -virtual XubString GetText( sal_uInt16 nParagraph ) const; -virtual voidInsert( const EditTextObject& rObj, sal_uInt16 nPara ); -virtual voidRemoveParagraph( sal_uInt16 nPara ); -virtual EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 ) const; +virtual String GetText(size_t nParagraph) const; +virtual void Insert(const EditTextObject& rObj, size_t nPara); +virtual void RemoveParagraph(size_t nPara); +virtual EditTextObject* CreateTextObject(size_t nPara, size_t nParas = 1) const; virtual sal_BoolHasPortionInfo() const; virtual voidClearPortionInfo(); @@ -109,12 +109,12 @@ public: virtual const SvxFieldItem* GetField() const; virtual sal_BoolHasField( TypeId aType = NULL ) const; -virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; -virtual voidSetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rAttribs ); +virtual SfxItemSet GetParaAttribs(size_t nPara) const; +virtual void SetParaAttribs(size_t nPara, const SfxItemSet& rAttribs); virtual sal_BoolHasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const; -virtual voidGetStyleSheet( sal_uInt16 nPara, XubString& rName, SfxStyleFamily& eFamily ) const; -virtual voidSetStyleSheet( sal_uInt16 nPara, const XubString& rName, const SfxStyleFamily& eFamily ); +virtual void GetStyleSheet(size_t nPara, String& rName, SfxStyleFamily& eFamily) const; +virtual void SetStyleSheet(size_t nPara, const String& rName, const SfxStyleFamily& eFamily); virtual sal_BoolChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily ); virtual voidChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName ); diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index a404533..67099ba 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -168,6 +168,11 @@ bool ContentInfo::operator==( const ContentInfo& rCompare ) const return false; } +bool ContentInfo::operator!=(const ContentInfo& rCompare) const +{ +return !operator==(rCompare); +} + EditTextObject::EditTextObject( sal_uInt16 n) { DBG_CTOR( EE_EditTextObject, 0 ); @@ -185,30 +190,30 @@ EditTextObject::~EditTextObject() DBG_DTOR( EE_EditTextObject, 0 ); } -sal_uInt16 EditTextObject::GetParagraphCount() const +size_t EditTextObject::GetParagraphCount() const { OSL_FAIL( "Virtual method direct from EditTextObject!" ); return 0; } -XubString EditTextObject::GetText( sal_uInt16 /* nParagraph */ ) const +String EditTextObject::GetText(size_t /* nParagraph */) const { OSL_FAIL( "Virtual method direct from EditTextObject!" ); -return XubString(); +return String(); } -void EditTextObject::Insert( const EditTextObject& /* rObj */, sal_uInt16 /* nPara */) +void EditTextObject::Insert(const EditTextObject& /* rObj */, size_t /* nPara */) { OSL_FAIL( "Virtual method direct from EditTextObject!" ); } -EditTextObject* EditTextObject::CreateTextObject( sal_uInt16 /*nPara*/, sal_uInt16 /*nParas*/ ) const +EditTextObject* EditTextObject::CreateTextObject(size_t /*nPara*/, size_t /*nParas*/) const { OSL_FAIL( "Virtual method direct from EditTextObject!" ); return 0; } -void EditTextObject::RemoveParagraph( sal_uInt16 /*nPara*/ ) +void EditTextObject::RemoveParagraph(size_t /*nPara*/) { OSL_FAIL( "Virtual method direct from EditTextObject!" ); } @@ -264,13 +269,13 @@ sal_Bool EditTextObject::HasField( TypeId /*aType*/ ) const return false; } -SfxItemSet EditTextObject::GetParaAttribs( sal_uInt16 /*nPara*/ ) const +SfxItemSet EditTextObject::GetParaAttribs(size_t /*nPara*/) const { OSL_FAIL( "Virtual method direct from EditTextObject!" ); return SfxItemSet( *(SfxItemPool*)NULL ); } -void EditText
[Libreoffice-commits] .: 2 commits - editeng/inc editeng/source
editeng/inc/editeng/editeng.hxx |3 editeng/inc/editeng/editview.hxx|2 editeng/inc/editeng/outliner.hxx|2 editeng/source/editeng/editdbg.cxx |2 editeng/source/editeng/editdoc.cxx | 112 +++- editeng/source/editeng/editdoc.hxx | 72 ++- editeng/source/editeng/editdoc2.cxx | 92 ++--- editeng/source/editeng/editeng.cxx |8 ++ editeng/source/editeng/editview.cxx |6 - editeng/source/editeng/impedit.cxx |4 - editeng/source/editeng/impedit.hxx | 31 + editeng/source/editeng/impedit2.cxx | 39 ++-- editeng/source/editeng/impedit3.cxx |2 editeng/source/editeng/impedit4.cxx |8 +- editeng/source/editeng/impedit5.cxx | 22 --- editeng/source/outliner/outlvw.cxx |2 16 files changed, 261 insertions(+), 146 deletions(-) New commits: commit ea8f2cbee079932e7f5d9ab646996b472a120c76 Author: Kohei Yoshida Date: Thu Mar 29 01:43:30 2012 -0400 ContentList no longer a child class of DummyContentList. diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx index 4c0d5e0..c17b15b 100644 --- a/editeng/inc/editeng/editeng.hxx +++ b/editeng/inc/editeng/editeng.hxx @@ -328,7 +328,8 @@ public: SfxStyleSheetPool* GetStyleSheetPool(); voidSetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle ); -SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara ) const; +const SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara ) const; +SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara ); voidSetWordDelimiters( const String& rDelimiters ); String GetWordDelimiters() const; diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx index 7f3dd4c..aa9864f 100644 --- a/editeng/inc/editeng/editview.hxx +++ b/editeng/inc/editeng/editview.hxx @@ -183,7 +183,7 @@ public: voidSetEditEngineUpdateMode( sal_Bool bUpdate ); voidForceUpdate(); -SfxStyleSheet* GetStyleSheet() const; +const SfxStyleSheet* GetStyleSheet() const; voidSetAnchorMode( EVAnchorMode eMode ); EVAnchorModeGetAnchorMode() const; diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx index faceb8a..ee7edec 100644 --- a/editeng/inc/editeng/outliner.hxx +++ b/editeng/inc/editeng/outliner.hxx @@ -308,7 +308,7 @@ public: voidPaste(); voidPasteSpecial(); -SfxStyleSheet* GetStyleSheet() const; +const SfxStyleSheet* GetStyleSheet() const; voidSetControlWord( sal_uLong nWord ); sal_uLong GetControlWord() const; diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index 4070002..48f6e00 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -335,7 +335,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox ) for ( sal_uInt16 nPortion = 0; nPortion < pEE->pImpEditEngine->GetParaPortions(). Count(); nPortion++) { -ParaPortion* pPPortion = pEE->pImpEditEngine->GetParaPortions().GetObject(nPortion ); +ParaPortion* pPPortion = pEE->pImpEditEngine->GetParaPortions()[nPortion]; fprintf( fp, "\nParagraph %i: Length = %i, Invalid = %i\nText = '%s'", nPortion, pPPortion->GetNode()->Len(), pPPortion->IsInvalid(), rtl::OUStringToOString( *pPPortion->GetNode(), RTL_TEXTENCODING_ASCII_US ).getStr() ); fprintf( fp, "\nVorlage:" ); SfxStyleSheet* pStyle = pPPortion->GetNode()->GetStyleSheet(); diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index f83d054..5df6635 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -256,8 +256,6 @@ sal_uInt16 aV5Map[] = { 4035, 4036, 4037, 4038 }; -SV_IMPL_PTRARR( DummyContentList, ContentNode* ); - EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, sal_uInt16 nS, sal_uInt16 nE ) { // Create a new attribute in the pool @@ -567,6 +565,25 @@ sal_uInt16 EditLineList::FindLine( sal_uInt16 nChar, sal_Bool bInclEnd ) return ( Count() - 1 ); } +EditPaM::EditPaM() : pNode(NULL), nIndex(0) {} +EditPaM::EditPaM(const EditPaM& r) : pNode(r.pNode), nIndex(r.nIndex) {} +EditPaM::EditPaM(ContentNode* p, sal_uInt16 n) : pNode(p), nIndex(n) {} + +const ContentNode* EditPaM::GetNode() const +{ +return pNode; +} + +ContentNode* EditPaM::GetNode() +{ +return pNode; +} + +void EditPaM::SetNode(ContentNode* p) +{ +pNode = p; +} + sal_Bool EditPaM::DbgIsBuggy( EditDoc& rDoc ) { if ( !pNode ) @@ -633,8 +650,8 @@ sal_Bool EditSelection::Adjust( const ContentList& rNodes ) DBG_ASSERT( aStartPaM.GetIndex() <= aStartPaM.GetNode()->Len(), "Index out of range in Adjust(1)" ); DBG_ASSERT( aEndPaM.GetIndex() <= aEndPaM.GetNode()->Len(), "Index out of
[Libreoffice-commits] .: 2 commits - editeng/inc editeng/source sc/source svl/inc svl/source
editeng/inc/editeng/flditem.hxx | 72 +++-- editeng/source/items/flditem.cxx| 78 sc/source/filter/excel/xehelper.cxx | 12 ++--- sc/source/filter/inc/xehelper.hxx |2 svl/inc/svl/zforlist.hxx|4 + svl/source/numbers/zforlist.cxx | 12 + 6 files changed, 100 insertions(+), 80 deletions(-) New commits: commit 1e91520e7af29c390c03d05b39992da5aaf6d1c7 Author: Kohei Yoshida Date: Tue Mar 27 10:57:14 2012 -0400 UniString removal. diff --git a/editeng/inc/editeng/flditem.hxx b/editeng/inc/editeng/flditem.hxx index b54e37c..be874b0 100644 --- a/editeng/inc/editeng/flditem.hxx +++ b/editeng/inc/editeng/flditem.hxx @@ -144,8 +144,8 @@ public: // If eLanguage==LANGUAGE_DONTKNOW the language/country // used in number formatter initialization is taken. -String GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLanguage ) const; -static String GetFormatted( Date& rDate, SvxDateFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); +rtl::OUString GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLanguage ) const; +static rtl::OUStringGetFormatted( Date& rDate, SvxDateFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); virtual SvxFieldData* Clone() const; virtual int operator==( const SvxFieldData& ) const; @@ -163,24 +163,24 @@ class EDITENG_DLLPUBLIC SvxURLField : public SvxFieldData { private: SvxURLFormateFormat; -XubString aURL; // URL-Address -XubString aRepresentation;// What is shown -XubString aTargetFrame; // In what Frame +rtl::OUString aURL; // URL-Address +rtl::OUString aRepresentation;// What is shown +rtl::OUString aTargetFrame; // In what Frame public: SV_DECL_PERSIST1( SvxURLField, SvxFieldData, SVX_URLFIELD ) SvxURLField(); -SvxURLField( const XubString& rURL, const XubString& rRepres, SvxURLFormat eFmt = SVXURLFORMAT_URL ); +SvxURLField( const rtl::OUString& rURL, const rtl::OUString& rRepres, SvxURLFormat eFmt = SVXURLFORMAT_URL ); -const XubString&GetURL() const { return aURL; } -voidSetURL( const XubString& rURL ) { aURL = rURL; } +const rtl::OUString&GetURL() const { return aURL; } +voidSetURL( const rtl::OUString& rURL ) { aURL = rURL; } -const XubString&GetRepresentation() const { return aRepresentation; } -voidSetRepresentation( const XubString& rRep ) { aRepresentation= rRep; } +const rtl::OUString&GetRepresentation() const { return aRepresentation; } +voidSetRepresentation( const rtl::OUString& rRep ) { aRepresentation= rRep; } -const XubString&GetTargetFrame() const { return aTargetFrame; } -voidSetTargetFrame( const XubString& rFrm ) { aTargetFrame = rFrm; } +const rtl::OUString&GetTargetFrame() const { return aTargetFrame; } +voidSetTargetFrame( const rtl::OUString& rFrm ) { aTargetFrame = rFrm; } SvxURLFormatGetFormat() const { return eFormat; } voidSetFormat( SvxURLFormat eFmt ) { eFormat = eFmt; } @@ -281,8 +281,8 @@ public: // If eLanguage==LANGUAGE_DONTKNOW the language/country // used in number formatter initialization is taken. -String GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLanguage ) const; -static String GetFormatted( Time& rTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); +rtl::OUString GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLanguage ) const; +static rtl::OUStringGetFormatted( Time& rTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); virtual SvxFieldData* Clone() const; virtual int operator==( const SvxFieldData& ) const; @@ -303,19 +303,19 @@ enum SvxFileFormat {SVXFILEFORMAT_NAME_EXT, // File name with Extension class EDITENG_DLLPUBLIC SvxExtFileField : public SvxFieldData { private: -XubString aFile; +rtl::OUString aFile; SvxFileType eType; SvxFileFormat eFormat; public: SV_DECL_PERSIST1( SvxExtFileField, SvxFieldData, SVX_EXT_FILEFIELD ) SvxExtFileField(); -SvxExtFileField( const XubString& rS
[Libreoffice-commits] .: 2 commits - editeng/inc editeng/source sw/source
editeng/inc/editeng/svxrtf.hxx |7 +++--- editeng/source/editeng/eertfpar.cxx | 36 ++-- editeng/source/rtf/svxrtf.cxx | 40 +++- sw/source/filter/rtf/rtffld.cxx |8 +-- sw/source/filter/rtf/rtfnum.cxx | 19 - sw/source/filter/rtf/swparrtf.cxx | 38 +- 6 files changed, 81 insertions(+), 67 deletions(-) New commits: commit 46fd2a3bf2a53c64c040590afe450505fcb13c10 Author: Ivan Timofeev Date: Tue Feb 21 19:52:24 2012 +0400 use a for loop diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 4e7254f..8322cd9 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -434,16 +434,13 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) SvxRTFStyleType* EditRTFParser::FindStyleSheet( const XubString& rName ) { -SvxRTFStyleTbl aTable = GetStyleTbl(); -SvxRTFStyleTbl::iterator it = aTable.begin(); -while ( it != aTable.end() ) +SvxRTFStyleTbl& rTable = GetStyleTbl(); +for ( SvxRTFStyleTbl::iterator it = rTable.begin(); it != rTable.end(); ++it ) { SvxRTFStyleType* pS = it->second; if ( pS->sName == rName ) return pS; -++it; } - return NULL; } diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx index f6eb0c0..dbd051c 100644 --- a/sw/source/filter/rtf/rtfnum.cxx +++ b/sw/source/filter/rtf/rtfnum.cxx @@ -594,8 +594,9 @@ void SwRTFParser::ReadListOverrideTable() std::map::const_iterator iterColl; sal_uInt16 nRulePos( USHRT_MAX ); const SwNumRule *pNumRule = 0; -SvxRTFStyleTbl::iterator it = GetStyleTbl().begin(); -do { +for (SvxRTFStyleTbl::iterator it = GetStyleTbl().begin(); +it != GetStyleTbl().end(); ++it) +{ SvxRTFStyleType* pStyle = it->second; if ( MAXLEVEL > pStyle->nOutlineNo ) { @@ -635,9 +636,7 @@ void SwRTFParser::ReadListOverrideTable() } pStyle->aAttrSet.ClearItem( FN_PARAM_NUM_LEVEL ); - -++it; -} while( it != GetStyleTbl().end() ); +} } SkipToken( -1 );// die schliesende Klammer wird "oben" ausgewertet commit a4aa96be3a9e24099a45850cadd5074d2db9a199 Author: Noel Grandin Date: Tue Feb 21 19:01:17 2012 +0400 convert svxrtf.hxx in editeng module from table.hxx to std::map diff --git a/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx index c79f2bd..4d255da 100644 --- a/editeng/inc/editeng/svxrtf.hxx +++ b/editeng/inc/editeng/svxrtf.hxx @@ -29,7 +29,6 @@ #ifndef _SVXRTF_HXX #define _SVXRTF_HXX -#include #include #include #include @@ -39,6 +38,8 @@ #include #include #include +#include "boost/ptr_container/ptr_map.hpp" + class Font; class Color; class Graphic; @@ -85,8 +86,8 @@ public: typedef Color* ColorPtr; typedef std::deque< ColorPtr > SvxRTFColorTbl; -DECLARE_TABLE( SvxRTFFontTbl, Font* ) -DECLARE_TABLE( SvxRTFStyleTbl, SvxRTFStyleType* ) +typedef boost::ptr_map SvxRTFFontTbl; +typedef boost::ptr_map SvxRTFStyleTbl; typedef SvxRTFItemStackType* SvxRTFItemStackTypePtr; SV_DECL_PTRARR_DEL( SvxRTFItemStackList, SvxRTFItemStackTypePtr, 1 ) diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index d508716..4e7254f 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -371,10 +371,11 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) if ( rSet.StyleNo() && pImpEditEngine->GetStyleSheetPool() && pImpEditEngine->GetStatus().DoImportRTFStyleSheets() ) { -SvxRTFStyleType* pS = GetStyleTbl().Get( rSet.StyleNo() ); -DBG_ASSERT( pS, "Template not defined in RTF!" ); -if ( pS ) +SvxRTFStyleTbl::iterator it = GetStyleTbl().find( rSet.StyleNo() ); +DBG_ASSERT( it != GetStyleTbl().end(), "Template not defined in RTF!" ); +if ( it != GetStyleTbl().end() ) { +SvxRTFStyleType* pS = it->second; pImpEditEngine->SetStyleSheet( EditSelection( aStartPaM, aEndPaM ), (SfxStyleSheet*)pImpEditEngine->GetStyleSheetPool()->Find( pS->sName, SFX_STYLE_FAMILY_ALL ) ); nOutlLevel = pS->nOutlineNo; } @@ -433,11 +434,17 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) SvxRTFStyleType* EditRTFParser::FindStyleSheet( const XubString& rName ) { -SvxRTFStyleType* pS = GetStyleTbl().First(); -while ( pS && ( pS->sName != rName ) ) -pS = GetStyleTbl().Next(); +SvxRTFStyleTbl aTable = GetStyleTbl(); +SvxRTFStyleTbl::iterator it = aTable.begin(); +while ( it != aTable.end() ) +{ +SvxRTFStyleType* pS = it->second; +if ( pS->sName == rName ) +return pS; +++it; +} -
[Libreoffice-commits] .: 2 commits - editeng/inc editeng/source
editeng/inc/editeng/forbiddencharacterstable.hxx | 27 +--- editeng/source/misc/forbiddencharacterstable.cxx | 50 +-- editeng/source/uno/UnoForbiddenCharsTable.cxx|7 +-- 3 files changed, 27 insertions(+), 57 deletions(-) New commits: commit 843eafc765a3d1d0ea4c9a89855c73e81784aa8b Author: Ivan Timofeev Date: Wed Feb 15 20:44:26 2012 +0400 tweak "Convert tools/table.hxx in editeng/forbiddencharacterstable.hxx..." * remove 'const' from GetForbiddenCharacters * CharInfoMap -> Map * pInf -> pForbiddenCharacters * remove 'inline' from the function defined within the class definition * some code simplifications diff --git a/editeng/inc/editeng/forbiddencharacterstable.hxx b/editeng/inc/editeng/forbiddencharacterstable.hxx index afe6d5b..55db6db 100644 --- a/editeng/inc/editeng/forbiddencharacterstable.hxx +++ b/editeng/inc/editeng/forbiddencharacterstable.hxx @@ -45,17 +45,17 @@ namespace lang { class EDITENG_DLLPUBLIC SvxForbiddenCharactersTable : public salhelper::SimpleReferenceObject { public: -typedef std::map CharInfoMap; +typedef std::map Map; private: -mutable CharInfoMap maCharInfoMap; +Map maMap; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; public: SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF); ~SvxForbiddenCharactersTable() {} -inline CharInfoMap& Map() { return maCharInfoMap; } -const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( sal_uInt16 nLanguage, sal_Bool bGetDefault ) const; +Map& GetMap() { return maMap; } +const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( sal_uInt16 nLanguage, sal_Bool bGetDefault ); voidSetForbiddenCharacters( sal_uInt16 nLanguage , const com::sun::star::i18n::ForbiddenCharacters& ); voidClearForbiddenCharacters( sal_uInt16 nLanguage ); }; diff --git a/editeng/source/misc/forbiddencharacterstable.cxx b/editeng/source/misc/forbiddencharacterstable.cxx index e809282..9760b0f 100644 --- a/editeng/source/misc/forbiddencharacterstable.cxx +++ b/editeng/source/misc/forbiddencharacterstable.cxx @@ -39,31 +39,29 @@ SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno: mxMSF = xMSF; } -const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( sal_uInt16 nLanguage, sal_Bool bGetDefault ) const +const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( sal_uInt16 nLanguage, sal_Bool bGetDefault ) { -com::sun::star::i18n::ForbiddenCharacters* pInf = NULL; -CharInfoMap::iterator it = maCharInfoMap.find( nLanguage ); -if ( it != maCharInfoMap.end() ) -pInf = &(it->second); -if ( !pInf && bGetDefault && mxMSF.is() ) +com::sun::star::i18n::ForbiddenCharacters* pForbiddenCharacters = NULL; +Map::iterator it = maMap.find( nLanguage ); +if ( it != maMap.end() ) +pForbiddenCharacters = &(it->second); +else if ( bGetDefault && mxMSF.is() ) { LocaleDataWrapper aWrapper( mxMSF, SvxCreateLocale( nLanguage ) ); -maCharInfoMap[ nLanguage ] = aWrapper.getForbiddenCharacters(); -pInf = &maCharInfoMap[ nLanguage ]; +maMap[ nLanguage ] = aWrapper.getForbiddenCharacters(); +pForbiddenCharacters = &maMap[ nLanguage ]; } -return pInf; +return pForbiddenCharacters; } void SvxForbiddenCharactersTable::SetForbiddenCharacters( sal_uInt16 nLanguage, const com::sun::star::i18n::ForbiddenCharacters& rForbiddenChars ) { -maCharInfoMap[ nLanguage ] = rForbiddenChars; +maMap[ nLanguage ] = rForbiddenChars; } void SvxForbiddenCharactersTable::ClearForbiddenCharacters( sal_uInt16 nLanguage ) { -CharInfoMap::iterator it = maCharInfoMap.find( nLanguage ); -if ( it != maCharInfoMap.end() ) -maCharInfoMap.erase( it ); +maMap.erase( nLanguage ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/UnoForbiddenCharsTable.cxx b/editeng/source/uno/UnoForbiddenCharsTable.cxx index 5d2c79e..5957520 100644 --- a/editeng/source/uno/UnoForbiddenCharsTable.cxx +++ b/editeng/source/uno/UnoForbiddenCharsTable.cxx @@ -117,15 +117,15 @@ Sequence< Locale > SAL_CALL SvxUnoForbiddenCharsTable::getLocales() { SolarMutexGuard aGuard; -const sal_Int32 nCount = mxForbiddenChars.is() ? mxForbiddenChars->Map().size() : 0; +const sal_Int32 nCount = mxForbiddenChars.is() ? mxForbiddenChars->GetMap().size() : 0; Sequence< Locale > aLocales( nCount ); if( nCount ) { Locale* pLocales = aLocales.getArray(); -for( SvxForbiddenCharactersTable::CharInfoMap::iterator it = mxForbiddenChars->Map().begin(); - it != mxForbiddenChars->Map().end(); ++it ) +for( Sv
[Libreoffice-commits] .: 2 commits - editeng/inc editeng/source svx/inc svx/source
editeng/inc/editeng/bulitem.hxx |7 --- editeng/inc/editeng/svxacorr.hxx |2 editeng/source/items/bulitem.cxx | 84 --- editeng/source/misc/svxacorr.cxx | 28 - svx/inc/svx/ctredlin.hxx |4 - svx/source/dialog/ctredlin.cxx | 37 - 6 files changed, 162 deletions(-) New commits: commit 6df7cfaa3f5e750e2bbdb3d6afb934c405a7a988 Author: August Sodora Date: Thu Dec 22 21:41:09 2011 -0500 callcatcher: Remove unused code diff --git a/editeng/inc/editeng/bulitem.hxx b/editeng/inc/editeng/bulitem.hxx index 2a7eefb..2a5f3b1 100644 --- a/editeng/inc/editeng/bulitem.hxx +++ b/editeng/inc/editeng/bulitem.hxx @@ -94,10 +94,6 @@ public: TYPEINFO(); SvxBulletItem( sal_uInt16 nWhich = 0 ); -SvxBulletItem( sal_uInt8 nStyle, const Font& rFont, sal_uInt16 nStart = 0, sal_uInt16 nWhich = 0 ); -SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, sal_uInt16 nWhich=0 ); -SvxBulletItem( const Bitmap&, sal_uInt16 nWhich = 0 ); -SvxBulletItem( const GraphicObject&, sal_uInt16 nWhich = 0 ); SvxBulletItem( SvStream& rStrm, sal_uInt16 nWhich = 0 ); SvxBulletItem( const SvxBulletItem& ); ~SvxBulletItem(); @@ -118,9 +114,6 @@ public: FontGetFont() const { return aFont; } sal_uInt16 GetScale() const { return nScale; } -Bitmap GetBitmap() const; -voidSetBitmap( const Bitmap& rBmp ); - const GraphicObject& GetGraphicObject() const; void SetGraphicObject( const GraphicObject& rGraphicObject ); diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx index dd83531..ed0d528 100644 --- a/editeng/inc/editeng/svxacorr.hxx +++ b/editeng/inc/editeng/svxacorr.hxx @@ -291,8 +291,6 @@ public: String GetAutoCorrFileName( LanguageType eLang = LANGUAGE_SYSTEM, sal_Bool bNewFile = sal_False, sal_Bool bTstUserExist = sal_False ) const; -void SetUserAutoCorrFileName( const String& rNew ); -void SetShareAutoCorrFileName( const String& rNew ); // Query/Set the current settings of AutoCorrect long GetFlags() const { return nFlags; } diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index caca392..106a5ab 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -123,57 +123,6 @@ SvxBulletItem::SvxBulletItem( sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) // --- -SvxBulletItem::SvxBulletItem( sal_uInt8 nNewStyle, const Font& rFont, sal_uInt16 /*nStart*/, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) -{ -SetDefaults_Impl(); -nStyle = nNewStyle; -aFont = rFont; -nValidMask = 0x; -} - -// --- - -SvxBulletItem::SvxBulletItem( const Font& rFont, xub_Unicode cSymb, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) -{ -SetDefaults_Impl(); -aFont = rFont; -cSymbol = cSymb; -nStyle = BS_BULLET; -nValidMask = 0x; -} - -// --- - -SvxBulletItem::SvxBulletItem( const Bitmap& rBmp, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) -{ -SetDefaults_Impl(); - -if( !rBmp.IsEmpty() ) -{ -pGraphicObject = new GraphicObject( rBmp ); -nStyle = BS_BMP; -} - -nValidMask = 0x; -} - -// --- - -SvxBulletItem::SvxBulletItem( const GraphicObject& rGraphicObject, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ) -{ -SetDefaults_Impl(); - -if( ( GRAPHIC_NONE != pGraphicObject->GetType() ) && ( GRAPHIC_DEFAULT != pGraphicObject->GetType() ) ) -{ -pGraphicObject = new GraphicObject( rGraphicObject ); -nStyle = BS_BMP; -} - -nValidMask = 0x; -} - -// --- - SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich ), pGraphicObject( NULL ) @@ -464,39 +413,6 @@ SfxItemPresentation SvxBulletItem::GetPresentation // -Bitmap SvxBulletItem::GetBitmap() const -{ -if( pGraphicObject ) -return pGraphicObject->GetGraphic().GetBitmap(); -else -{ -const Bitmap aDefaultBitmap; -return aDefaultBitmap; -} -} - -// - -void SvxBulletItem::SetBitmap( const Bitmap& rBmp ) -{ -if( rBmp.IsEmpty() ) -{ -if( pGraphicObject ) -{ -delete pGraphicObject; -pGraphicObject = NULL; -} -} -else -{ -delete pGraphicObj
[Libreoffice-commits] .: 2 commits - editeng/inc editeng/source svx/inc svx/source tools/inc unusedcode.easy vcl/inc vcl/source
editeng/inc/editeng/outliner.hxx|1 - editeng/source/editeng/editobj.cxx |1 - editeng/source/outliner/outlin2.cxx |7 --- svx/inc/svx/svdlayer.hxx|1 - svx/inc/svx/svdmrkv.hxx | 14 -- svx/inc/svx/svdobj.hxx |1 - svx/inc/svx/svdpage.hxx |2 -- svx/inc/svx/svdpagv.hxx |7 --- svx/source/svdraw/svdlayer.cxx | 11 --- svx/source/svdraw/svdmrkv1.cxx | 24 svx/source/svdraw/svdobj.cxx| 11 --- svx/source/svdraw/svdpage.cxx | 11 --- svx/source/svdraw/svdpagv.cxx | 28 svx/source/svdraw/svdview.cxx |2 +- tools/inc/tools/stream.hxx |6 -- unusedcode.easy |5 - vcl/inc/impgraph.hxx|4 vcl/source/gdi/impgraph.cxx | 11 --- 18 files changed, 5 insertions(+), 142 deletions(-) New commits: commit 4d1c57a00ed20f49685504ac5289bc2c325060fc Author: Caolán McNamara Date: Mon Nov 21 09:00:05 2011 + callcatcher: update list diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx index 89ee624..d2759a4 100644 --- a/editeng/inc/editeng/outliner.hxx +++ b/editeng/inc/editeng/outliner.hxx @@ -967,7 +967,6 @@ public: voidSetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 ); voidGetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ); -voidDoStretchChars( sal_uInt16 nX, sal_uInt16 nY ); voidEraseVirtualDevice(); sal_BoolShouldCreateBigTextObject() const; diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index 2898eec..f91a035 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -608,13 +608,6 @@ void Outliner::GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ) pEditEngine->GetGlobalCharStretching( rX, rY ); } - -void Outliner::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ) -{ -DBG_CHKTHIS(Outliner,0); -pEditEngine->DoStretchChars( nX, nY ); -} - void Outliner::EraseVirtualDevice() { DBG_CHKTHIS(Outliner,0); diff --git a/svx/inc/svx/svdlayer.hxx b/svx/inc/svx/svdlayer.hxx index 0fb10c6..a98154f 100644 --- a/svx/inc/svx/svdlayer.hxx +++ b/svx/inc/svx/svdlayer.hxx @@ -113,7 +113,6 @@ public: // Neuer Layer wird angelegt und eingefuegt SdrLayer* NewLayer(const String& rName, sal_uInt16 nPos=0x); void DeleteLayer(SdrLayer* pLayer) { aLayer.Remove(pLayer); delete pLayer; Broadcast(); } -SdrLayer* MoveLayer(sal_uInt16 nPos, sal_uInt16 nNewPos); // Neuer Layer, Name wird aus der Resource geholt SdrLayer* NewStandardLayer(sal_uInt16 nPos=0x); diff --git a/svx/inc/svx/svdmrkv.hxx b/svx/inc/svx/svdmrkv.hxx index d292e3c..b5442a3 100644 --- a/svx/inc/svx/svdmrkv.hxx +++ b/svx/inc/svx/svdmrkv.hxx @@ -359,13 +359,6 @@ public: sal_Bool UnmarkAllPoints() { return MarkPoints(NULL,sal_True); } sal_Bool UnMarkAllPoints() { return MarkPoints(NULL,sal_True); } -// Sucht sich den ersten markierten Punkt (P1) und sucht von dort -// aus in den ersten nichtmarkierte Punkt (P2). -// Bei Erfolg wird die Markierung von P1 entfernt, an P2 gesetzt und TRUE -// returniert. Mit dem Parameter bPrev=sal_True geht die Suche genau in die -// andere Richtung. -sal_Bool MarkNextPoint(sal_Bool bPrev=sal_False); - // Sucht sich den ersten markierten Punkt (P1) das von rPnt // getroffen wird und sucht von dort aus den // ersten nichtmarkierten Punkt (P2). Bei Erfolg wird die Markierung von @@ -428,13 +421,6 @@ public: sal_Bool MarkAllGluePoints() { return MarkGluePoints(NULL,sal_False); } sal_Bool UnmarkAllGluePoints() { return MarkGluePoints(NULL,sal_True); } -// Sucht sich den ersten markierten Klebepunkt (P1) und sucht von dort -// aus in den ersten nichtmarkierte Klebepunkt (P2). -// Bei Erfolg wird die Markierung von P1 entfernt, an P2 gesetzt und TRUE -// returniert. Mit dem Parameter bPrev=sal_True geht die Suche genau in die -// andere Richtung. -sal_Bool MarkNextGluePoint(sal_Bool bPrev=sal_False); - // Sucht sich den ersten markierten Klebepunkt (P1) das von rPnt // getroffen wird und sucht von dort aus den // ersten nichtmarkierten Klebepunkt (P2). Bei Erfolg wird die Markierung diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx index 57c8569..eeef220 100644 --- a/svx/inc/svx/svdobj.hxx +++ b/svx/inc/svx/svdobj.hxx @@ -1167,7 +1167,6 @@ public: private: SVX_DLLPRIVATE SdrObjFactory(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrPage* pNewPage, SdrModel* pNewModel); -SVX_DLLPRIVATE SdrObjFactory(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrObject* pObj1)