diff options
author | Felix Zhang <fezhang@suse.com> | 2011-11-03 15:59:37 +0800 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-11-03 09:42:40 +0100 |
commit | 46bc8b9027a6a68791973a3da702db39b3cd0e30 (patch) | |
tree | 9b0d71497b00d30668e1c59be70029f28a83bbff /editeng | |
parent | 7ffe517dea4190334c1ddf376af17ddfc1d3f128 (diff) |
remove unused methods in EditEngine
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/inc/editeng/editeng.hxx | 30 | ||||
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 176 |
2 files changed, 1 insertions, 205 deletions
diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx index 0db0464c5506..f23223e0e435 100644 --- a/editeng/inc/editeng/editeng.hxx +++ b/editeng/inc/editeng/editeng.hxx @@ -135,7 +135,6 @@ public: const SfxItemSet& GetEmptyItemSet(); void SetDefTab( sal_uInt16 nDefTab ); - sal_uInt16 GetDefTab() const; void SetRefDevice( OutputDevice* pRefDef ); OutputDevice* GetRefDevice() const; @@ -150,7 +149,6 @@ public: Color GetBackgroundColor() const; Color GetAutoColor() const; void EnableAutoColor( sal_Bool b ); - sal_Bool IsAutoColorEnabled() const; void ForceAutoColor( sal_Bool b ); sal_Bool IsForceAutoColor() const; @@ -161,7 +159,6 @@ public: sal_uInt16 GetViewCount() const; sal_Bool HasView( EditView* pView ) const; EditView* GetActiveView() const; - void SetActiveView( EditView* pView ); void SetPaperSize( const Size& rSize ); const Size& GetPaperSize() const; @@ -170,7 +167,6 @@ public: sal_Bool IsVertical() const; void SetFixedCellHeight( sal_Bool bUseFixedCellHeight ); - sal_Bool IsFixedCellHeight() const; void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ); EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const; @@ -181,18 +177,14 @@ public: void TransliterateText( const ESelection& rSelection, sal_Int32 nTransliterationMode ); void SetAsianCompressionMode( sal_uInt16 nCompression ); - sal_uInt16 GetAsianCompressionMode() const; void SetKernAsianPunctuation( sal_Bool bEnabled ); - sal_Bool IsKernAsianPunctuation() const; void SetAddExtLeading( sal_Bool b ); - sal_Bool IsAddExtLeading() const; void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon ); void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon); void ClearPolygon(); - const PolyPolygon* GetPolygon(); const Size& GetMinAutoPaperSize() const; void SetMinAutoPaperSize( const Size& rSz ); @@ -218,7 +210,6 @@ public: void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; sal_uInt32 GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine = 0 ); - sal_uInt16 GetFirstLineOffset( sal_uInt16 nParagraph ); ParagraphInfos GetParagraphInfos( sal_uInt16 nPara ); sal_uInt16 FindParagraph( long nDocPosY ); EPosition FindDocPosition( const Point& rDocPos ) const; @@ -227,7 +218,6 @@ public: String GetWord( sal_uInt16 nPara, xub_StrLen nIndex ); ESelection GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const; - ESelection SelectSentence( const ESelection& rCurSel ) const; void Clear(); void SetText( const String& rStr ); @@ -241,7 +231,6 @@ public: void InsertParagraph( sal_uInt16 nPara, const EditTextObject& rTxtObj ); void InsertParagraph( sal_uInt16 nPara, const String& rText); - void SetText( sal_uInt16 nPara, const EditTextObject& rTxtObj ); void SetText( sal_uInt16 nPara, const String& rText); virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); @@ -261,7 +250,6 @@ public: void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); void ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow = sal_True ); - sal_Bool IsParagraphVisible( sal_uInt16 nParagraph ); ::svl::IUndoManager& GetUndoManager(); @@ -285,7 +273,6 @@ public: Link GetModifyHdl() const; sal_Bool IsInSelectionMode() const; - void StopSelectionMode(); void StripPortions(); void GetPortions( sal_uInt16 nPara, std::vector<sal_uInt16>& rList ); @@ -347,12 +334,6 @@ public: void SetWordDelimiters( const String& rDelimiters ); String GetWordDelimiters() const; - void SetGroupChars( const String& rChars ); - String GetGroupChars() const; - - void EnablePasteSpecial( sal_Bool bEnable ); - sal_Bool IsPasteSpecialEnabled() const; - void EraseVirtualDevice(); void SetSpeller( ::com::sun::star::uno::Reference< @@ -360,14 +341,10 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > GetSpeller(); - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XHyphenator > - GetHyphenator() const; void SetHyphenator( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator >& xHyph ); void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); - rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const; void SetDefaultLanguage( LanguageType eLang ); LanguageType GetDefaultLanguage() const; @@ -375,8 +352,6 @@ public: sal_Bool HasOnlineSpellErrors() const; void CompleteOnlineSpelling(); - void SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ); - sal_uInt16 GetBigTextObjectStart() const; sal_Bool ShouldCreateBigTextObject() const; // For fast Pre-Test without view: @@ -391,8 +366,6 @@ public: void PutSpellingToSentenceStart( EditView& rEditView ); //applies a changed sentence void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck ); - //deinitialize sentence spelling - void EndSpelling(); // for text conversion (see also HasSpellErrors) sal_Bool HasConvertibleTextPortion( LanguageType nLang ); @@ -456,11 +429,9 @@ public: static SfxItemPool* CreatePool( sal_Bool bLoadRefCounts = sal_True ); static SfxItemPool& GetGlobalItemPool(); - static sal_uInt32 RegisterClipboardFormatName(); static sal_Bool DoesKeyChangeText( const KeyEvent& rKeyEvent ); static sal_Bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent ); static sal_Bool IsSimpleCharInput( const KeyEvent& rKeyEvent ); - static sal_uInt16 GetAvailableSearchOptions(); static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const Font& rFont ); static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const SvxFont& rFont ); static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ); @@ -478,7 +449,6 @@ public: /// specifies if auto-correction should capitalize the first word or not (default is on) void SetFirstWordCapitalization( sal_Bool bCapitalize ); - sal_Bool IsFirstWordCapitalization() const; }; #endif // _MyEDITENG_HXX diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 573b30b924aa..b8c563fe2bee 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -220,12 +220,6 @@ void EditEngine::EnableAutoColor( sal_Bool b ) pImpEditEngine->EnableAutoColor( b ); } -sal_Bool EditEngine::IsAutoColorEnabled() const -{ - DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->IsAutoColorEnabled(); -} - void EditEngine::ForceAutoColor( sal_Bool b ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -419,16 +413,6 @@ EditView* EditEngine::GetActiveView() const return pImpEditEngine->GetActiveView(); } -void EditEngine::SetActiveView( EditView* pView ) -{ - DBG_CHKTHIS( EditEngine, 0 ); - if ( pView ) - { - DBG_CHKOBJ( pView, EditView, 0 ); - } - pImpEditEngine->SetActiveView( pView ); -} - void EditEngine::SetDefTab( sal_uInt16 nDefTab ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -440,12 +424,6 @@ void EditEngine::SetDefTab( sal_uInt16 nDefTab ) } } -sal_uInt16 EditEngine::GetDefTab() const -{ - DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->GetEditDoc().GetDefTab(); -} - void EditEngine::SetPaperSize( const Size& rNewSize ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -509,12 +487,6 @@ void EditEngine::SetFixedCellHeight( sal_Bool bUseFixedCellHeight ) pImpEditEngine->SetFixedCellHeight( bUseFixedCellHeight ); } -sal_Bool EditEngine::IsFixedCellHeight() const -{ - DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->IsFixedCellHeight(); -} - void EditEngine::SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -555,36 +527,18 @@ void EditEngine::SetAsianCompressionMode( sal_uInt16 n ) pImpEditEngine->SetAsianCompressionMode( n ); } -sal_uInt16 EditEngine::GetAsianCompressionMode() const -{ - DBG_CHKTHIS( EditView, 0 ); - return pImpEditEngine->GetAsianCompressionMode(); -} - void EditEngine::SetKernAsianPunctuation( sal_Bool b ) { DBG_CHKTHIS( EditView, 0 ); pImpEditEngine->SetKernAsianPunctuation( b ); } -sal_Bool EditEngine::IsKernAsianPunctuation() const -{ - DBG_CHKTHIS( EditView, 0 ); - return pImpEditEngine->IsKernAsianPunctuation(); -} - void EditEngine::SetAddExtLeading( sal_Bool b ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->SetAddExtLeading( b ); } -sal_Bool EditEngine::IsAddExtLeading() const -{ - DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->IsAddExtLeading(); -} - void EditEngine::SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -616,13 +570,6 @@ void EditEngine::ClearPolygon() pImpEditEngine->SetTextRanger( 0 ); } -const PolyPolygon* EditEngine::GetPolygon() -{ - DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->GetTextRanger() ? - &pImpEditEngine->GetTextRanger()->GetPolyPolygon() : NULL; -} - const Size& EditEngine::GetMinAutoPaperSize() const { DBG_CHKTHIS( EditEngine, 0 ); @@ -713,15 +660,6 @@ sal_uInt32 EditEngine::GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine ) return pImpEditEngine->GetLineHeight( nParagraph, nLine ); } -sal_uInt16 EditEngine::GetFirstLineOffset( sal_uInt16 nParagraph ) -{ - DBG_CHKTHIS( EditEngine, 0 ); - if ( !pImpEditEngine->IsFormatted() ) - pImpEditEngine->FormatDoc(); - ParaPortion* pPortion = pImpEditEngine->GetParaPortions().SaveGetObject( nParagraph ); - return ( pPortion ? pPortion->GetFirstLineOffset() : 0 ); -} - sal_uInt32 EditEngine::GetTextHeight( sal_uInt16 nParagraph ) const { DBG_CHKTHIS( EditEngine, 0 ); @@ -751,14 +689,6 @@ ESelection EditEngine::GetWord( const ESelection& rSelection, sal_uInt16 nWordTy return pE->pImpEditEngine->CreateESel( aSel ); } -ESelection EditEngine::SelectSentence( const ESelection& rCurSel ) const -{ - EditEngine* pE = (EditEngine*)this; - EditSelection aCurSel( pE->pImpEditEngine->CreateSel( rCurSel ) ); - EditSelection aSentenceSel( pE->pImpEditEngine->SelectSentence( aCurSel ) ); - return pE->pImpEditEngine->CreateESel( aSentenceSel ); -} - sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, Window* pFrameWin ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -1331,12 +1261,6 @@ void EditEngine::ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow ) pImpEditEngine->ShowParagraph( nParagraph, bShow ); } -sal_Bool EditEngine::IsParagraphVisible( sal_uInt16 nParagraph ) -{ - DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->IsParagraphVisible( nParagraph ); -} - void EditEngine::SetNotifyHdl( const Link& rLink ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -1496,12 +1420,6 @@ sal_Bool EditEngine::IsInSelectionMode() const pImpEditEngine->GetSelEngine().IsInSelection() ); } -void EditEngine::StopSelectionMode() -{ - DBG_CHKTHIS( EditEngine, 0 ); - pImpEditEngine->StopSelectionMode(); -} - void EditEngine::InsertParagraph( sal_uInt16 nPara, const EditTextObject& rTxtObj ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -1544,20 +1462,6 @@ void EditEngine::InsertParagraph( sal_uInt16 nPara, const XubString& rTxt ) pImpEditEngine->FormatAndUpdate(); } -void EditEngine::SetText( sal_uInt16 nPara, const EditTextObject& rTxtObj ) -{ - DBG_CHKTHIS( EditEngine, 0 ); - EditSelection* pSel = pImpEditEngine->SelectParagraph( nPara ); - if ( pSel ) - { - pImpEditEngine->UndoActionStart( EDITUNDO_INSERT ); - pImpEditEngine->InsertText( rTxtObj, *pSel ); - pImpEditEngine->UndoActionEnd( EDITUNDO_INSERT ); - pImpEditEngine->FormatAndUpdate(); - delete pSel; - } -} - void EditEngine::SetText( sal_uInt16 nPara, const XubString& rTxt ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -2015,34 +1919,6 @@ XubString EditEngine::GetWordDelimiters() const return pImpEditEngine->aWordDelimiters; } -void EditEngine::SetGroupChars( const XubString& rChars ) -{ - DBG_CHKTHIS( EditEngine, 0 ); - DBG_ASSERT( ( rChars.Len() % 2 ) == 0, "SetGroupChars: Odd number!" ); - pImpEditEngine->aGroupChars = rChars; -} - -XubString EditEngine::GetGroupChars() const -{ - DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->aGroupChars; -} - -void EditEngine::EnablePasteSpecial( sal_Bool bEnable ) -{ - DBG_CHKTHIS( EditEngine, 0 ); - if ( bEnable ) - pImpEditEngine->GetStatus().TurnOnFlags( EE_CNTRL_PASTESPECIAL ); - else - pImpEditEngine->GetStatus().TurnOffFlags( EE_CNTRL_PASTESPECIAL ); -} - -sal_Bool EditEngine::IsPasteSpecialEnabled() const -{ - DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->GetStatus().AllowPasteSpecial(); -} - void EditEngine::EraseVirtualDevice() { DBG_CHKTHIS( EditEngine, 0 ); @@ -2054,16 +1930,12 @@ void EditEngine::SetSpeller( Reference< XSpellChecker1 > &xSpeller ) DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->SetSpeller( xSpeller ); } + Reference< XSpellChecker1 > EditEngine::GetSpeller() { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->GetSpeller(); } -Reference< XHyphenator > EditEngine::GetHyphenator() const -{ - DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->GetHyphenator(); -} void EditEngine::SetHyphenator( Reference< XHyphenator > & xHyph ) { @@ -2077,13 +1949,6 @@ void EditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTa pImpEditEngine->SetForbiddenCharsTable( xForbiddenChars ); } -rtl::Reference<SvxForbiddenCharactersTable> EditEngine::GetForbiddenCharsTable() const -{ - DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->GetForbiddenCharsTable( sal_False ); -} - - void EditEngine::SetDefaultLanguage( LanguageType eLang ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -2117,12 +1982,6 @@ void EditEngine::StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc) pImpEditEngine->StartSpelling(rEditView, bMultipleDoc); } -void EditEngine::EndSpelling() -{ - DBG_CHKTHIS( EditEngine, 0 ); - pImpEditEngine->EndSpelling(); -} - bool EditEngine::SpellSentence(EditView& rView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -2177,18 +2036,6 @@ void EditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ) pImpEditEngine->DoStretchChars( nX, nY ); } -void EditEngine::SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ) -{ - DBG_CHKTHIS( EditEngine, 0 ); - pImpEditEngine->SetBigTextObjectStart( nStartAtPortionCount ); -} - -sal_uInt16 EditEngine::GetBigTextObjectStart() const -{ - DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->GetBigTextObjectStart(); -} - sal_Bool EditEngine::ShouldCreateBigTextObject() const { DBG_CHKTHIS( EditEngine, 0 ); @@ -2561,22 +2408,6 @@ SfxItemPool& EditEngine::GetGlobalItemPool() return *pGlobalPool; } -sal_uInt32 EditEngine::RegisterClipboardFormatName() -{ - static sal_uInt32 nFormat = 0; - if ( !nFormat ) - nFormat = SotExchange::RegisterFormatName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EditEngineFormat")) ); - return nFormat; -} - -sal_uInt16 EditEngine::GetAvailableSearchOptions() -{ - return SEARCH_OPTIONS_SEARCH | SEARCH_OPTIONS_REPLACE | - SEARCH_OPTIONS_REPLACE_ALL | SEARCH_OPTIONS_WHOLE_WORDS | - SEARCH_OPTIONS_BACKWARDS | SEARCH_OPTIONS_REG_EXP | - SEARCH_OPTIONS_EXACT | SEARCH_OPTIONS_SELECTION; -} - void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const Font& rFont ) { SvxFont aSvxFont( rFont ); @@ -2737,11 +2568,6 @@ void EditEngine::SetFirstWordCapitalization( sal_Bool bCapitalize ) pImpEditEngine->SetFirstWordCapitalization( bCapitalize ); } -sal_Bool EditEngine::IsFirstWordCapitalization() const -{ - return pImpEditEngine->IsFirstWordCapitalization(); -} - EFieldInfo::EFieldInfo() { |