LibreOffice Module sw (master)  1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
SwHHCWrapper Class Reference

#include <hhcwrp.hxx>

Inheritance diagram for SwHHCWrapper:
[legend]
Collaboration diagram for SwHHCWrapper:
[legend]

Public Member Functions

 SwHHCWrapper (SwView *pView, const css::uno::Reference< css::uno::XComponentContext > &rxContext, LanguageType nSourceLanguage, LanguageType nTargetLanguage, const vcl::Font *pTargetFont, sal_Int32 nConvOptions, bool bIsInteractive, bool bStart, bool bOther, bool bSelection)
 
virtual ~SwHHCWrapper () override
 
void Convert ()
 
- Public Member Functions inherited from editeng::HangulHanjaConversion
 HangulHanjaConversion (weld::Window *pUIParent, const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::lang::Locale &_rSourceLocale, const css::lang::Locale &_rTargetLocale, const vcl::Font *_pTargetFont, sal_Int32 nOptions, bool _bIsInteractive)
 
virtual ~HangulHanjaConversion ()
 
void ConvertDocument ()
 
LanguageType GetSourceLanguage () const
 
LanguageType GetTargetLanguage () const
 
const vcl::FontGetTargetFont () const
 
sal_Int32 GetConversionOptions () const
 
bool IsInteractive () const
 

Protected Member Functions

virtual void GetNextPortion (OUString &rNextPortion, LanguageType &rLangOfPortion, bool bAllowImplicitChangesForNotConvertibleText) override
 
virtual void HandleNewUnit (const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd) override
 
virtual void ReplaceUnit (const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd, const OUString &rOrigText, const OUString &rReplaceWith, const css::uno::Sequence< sal_Int32 > &rOffsets, ReplacementAction eAction, LanguageType *pNewUnitLanguage) override
 
virtual bool HasRubySupport () const override
 

Private Member Functions

bool ConvNext_impl ()
 from SvxSpellWrapper copied and modified More...
 
void FindConvText_impl ()
 former FindSpellError More...
 
void ConvStart_impl (SwConversionArgs *pConvArgs, SvxSpellArea eSpell)
 former SpellStart More...
 
void ConvEnd_impl (SwConversionArgs const *pConvArgs)
 former SpellEnd More...
 
bool ConvContinue_impl (SwConversionArgs *pConvArgs)
 former SpellContinue More...
 
void SelectNewUnit_impl (const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd)
 
void ChangeText (const OUString &rNewText, const OUString &rOrigText, const css::uno::Sequence< sal_Int32 > *pOffsets, SwPaM *pCursor)
 
void ChangeText_impl (const OUString &rNewText, bool bKeepAttributes)
 

Private Attributes

SwViewm_pView
 
VclPtr< vcl::Windowm_pWin
 
SwWrtShellm_rWrtShell
 
std::unique_ptr< SwConversionArgsm_pConvArgs
 object for arguments (and results) needed to find of next convertible text portion More...
 
sal_Int32 m_nLastPos
 starting position of the last found text part (needs to be sth that gets not moved like SwPaM or SwPosition by replace operations!) More...
 
sal_Int32 m_nUnitOffset
 
sal_uInt16 m_nPageCount
 page count for progress bar More...
 
sal_uInt16 m_nPageStart
 first checked page More...
 
bool m_bIsDrawObj
 
bool m_bIsOtherContent
 
bool m_bStartChk
 
bool const m_bIsSelection
 true if only the selected text should be converted More...
 
bool m_bStartDone
 
bool m_bEndDone
 

Additional Inherited Members

- Public Types inherited from editeng::HangulHanjaConversion
enum  ReplacementAction
 
enum  ConversionType
 
enum  ConversionDirection
 
enum  ConversionFormat
 
- Static Public Member Functions inherited from editeng::HangulHanjaConversion
static bool IsSimplified (LanguageType nLang)
 
static bool IsTraditional (LanguageType nLang)
 
static bool IsChinese (LanguageType nLang)
 
static void SetUseSavedConversionDirectionState (bool bVal)
 
static bool IsUseSavedConversionDirectionState ()
 
- Public Attributes inherited from editeng::HangulHanjaConversion
 eExchange
 
 eReplacementBracketed
 
 eOriginalBracketed
 
 eReplacementAbove
 
 eOriginalAbove
 
 eReplacementBelow
 
 eOriginalBelow
 
 eConvHangulHanja
 
 eConvSimplifiedTraditional
 
 eHangulToHanja
 
 eHanjaToHangul
 
 eSimpleConversion
 
 eHangulBracketed
 
 eHanjaBracketed
 
 eRubyHanjaAbove
 
 eRubyHanjaBelow
 
 eRubyHangulAbove
 
 eRubyHangulBelow
 

Detailed Description

Definition at line 30 of file hhcwrp.hxx.

Constructor & Destructor Documentation

SwHHCWrapper::SwHHCWrapper ( SwView pView,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
LanguageType  nSourceLanguage,
LanguageType  nTargetLanguage,
const vcl::Font pTargetFont,
sal_Int32  nConvOptions,
bool  bIsInteractive,
bool  bStart,
bool  bOther,
bool  bSelection 
)

Definition at line 82 of file hhcwrp.cxx.

SwHHCWrapper::~SwHHCWrapper ( )
overridevirtual

Member Function Documentation

void SwHHCWrapper::ChangeText ( const OUString &  rNewText,
const OUString &  rOrigText,
const css::uno::Sequence< sal_Int32 > *  pOffsets,
SwPaM pCursor 
)
private
void SwHHCWrapper::ChangeText_impl ( const OUString &  rNewText,
bool  bKeepAttributes 
)
private
bool SwHHCWrapper::ConvContinue_impl ( SwConversionArgs pConvArgs)
private
void SwHHCWrapper::ConvEnd_impl ( SwConversionArgs const *  pConvArgs)
private

former SpellEnd

Definition at line 682 of file hhcwrp.cxx.

References m_pView, and SwView::SpellEnd().

Referenced by Convert(), and FindConvText_impl().

void SwHHCWrapper::Convert ( )
bool SwHHCWrapper::ConvNext_impl ( )
private

from SvxSpellWrapper copied and modified

former SpellNext

modified version of SvxSpellWrapper::SpellNext

Definition at line 610 of file hhcwrp.cxx.

References ConvStart_impl(), SwEditShell::HasOtherCnt(), m_bEndDone, m_bIsOtherContent, m_bIsSelection, m_bStartChk, m_bStartDone, m_pConvArgs, and m_rWrtShell.

Referenced by FindConvText_impl().

void SwHHCWrapper::ConvStart_impl ( SwConversionArgs pConvArgs,
SvxSpellArea  eSpell 
)
private

former SpellStart

Definition at line 676 of file hhcwrp.cxx.

References m_bEndDone, m_bIsDrawObj, m_bStartDone, m_pView, and SwView::SpellStart().

Referenced by Convert(), and ConvNext_impl().

void SwHHCWrapper::FindConvText_impl ( )
private

former FindSpellError

modified version of SvxSpellWrapper::FindSpellError

Definition at line 651 of file hhcwrp.cxx.

References ConvContinue_impl(), ConvEnd_impl(), ConvNext_impl(), vcl::Window::EnterWait(), vcl::Window::LeaveWait(), m_pConvArgs, and m_pWin.

Referenced by GetNextPortion().

void SwHHCWrapper::GetNextPortion ( OUString &  rNextPortion,
LanguageType rLangOfPortion,
bool  bAllowImplicitChangesForNotConvertibleText 
)
overrideprotectedvirtual
void SwHHCWrapper::HandleNewUnit ( const sal_Int32  nUnitStart,
const sal_Int32  nUnitEnd 
)
overrideprotectedvirtual
bool SwHHCWrapper::HasRubySupport ( ) const
overrideprotectedvirtual

Implements editeng::HangulHanjaConversion.

Definition at line 508 of file hhcwrp.cxx.

void SwHHCWrapper::ReplaceUnit ( const sal_Int32  nUnitStart,
const sal_Int32  nUnitEnd,
const OUString &  rOrigText,
const OUString &  rReplaceWith,
const css::uno::Sequence< sal_Int32 > &  rOffsets,
ReplacementAction  eAction,
LanguageType pNewUnitLanguage 
)
overrideprotectedvirtual

! since Delete, Insert in 'ChangeText' do not set the WrtShells ! bInSelect flag ! back to false we do it now manually in order for the selection ! to be done properly in the following call to Left.

Implements editeng::HangulHanjaConversion.

Definition at line 354 of file hhcwrp.cxx.

References ChangeText(), SwCursorShell::ClearMark(), editeng::HangulHanjaConversion::eExchange, SwEditShell::EndAllAction(), SwWrtShell::EndSelect(), SwEditShell::EndUndo(), editeng::HangulHanjaConversion::eOriginalAbove, editeng::HangulHanjaConversion::eOriginalBelow, editeng::HangulHanjaConversion::eOriginalBracketed, editeng::HangulHanjaConversion::eReplacementAbove, editeng::HangulHanjaConversion::eReplacementBelow, editeng::HangulHanjaConversion::eReplacementBracketed, SwViewShell::GetAttrPool(), vcl::Font::GetCharSet(), SwCursorShell::GetCursor(), vcl::Font::GetFamilyName(), vcl::Font::GetFamilyType(), SwPaM::GetMark(), vcl::Font::GetPitch(), SwCursorShell::GetSelText(), editeng::HangulHanjaConversion::GetSourceLanguage(), vcl::Font::GetStyleName(), editeng::HangulHanjaConversion::GetTargetFont(), editeng::HangulHanjaConversion::GetTargetLanguage(), editeng::HangulHanjaConversion::IsChinese(), LANGUAGE_CHINESE_SIMPLIFIED, LANGUAGE_CHINESE_TRADITIONAL, lcl_ActivateTextShell(), SwWrtShell::Left(), m_nUnitOffset, m_rWrtShell, SwPosition::nContent, OVERWRITE, RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_LANGUAGE, SelectNewUnit_impl(), SwEditShell::SetAttrItem(), SwEditShell::SetAttrSet(), SvxFontItem::SetFamilyName(), SwCursorShell::SetMark(), SETRUBYATTR, SwEditShell::StartAllAction(), and SwEditShell::StartUndo().

void SwHHCWrapper::SelectNewUnit_impl ( const sal_Int32  nUnitStart,
const sal_Int32  nUnitEnd 
)
private

Member Data Documentation

bool SwHHCWrapper::m_bEndDone
private

Definition at line 52 of file hhcwrp.hxx.

Referenced by ConvNext_impl(), and ConvStart_impl().

bool SwHHCWrapper::m_bIsDrawObj
private

Definition at line 47 of file hhcwrp.hxx.

Referenced by ConvContinue_impl(), ConvStart_impl(), and ~SwHHCWrapper().

bool SwHHCWrapper::m_bIsOtherContent
private

Definition at line 48 of file hhcwrp.hxx.

Referenced by Convert(), and ConvNext_impl().

bool const SwHHCWrapper::m_bIsSelection
private

true if only the selected text should be converted

Definition at line 50 of file hhcwrp.hxx.

Referenced by ConvContinue_impl(), and ConvNext_impl().

bool SwHHCWrapper::m_bStartChk
private

Definition at line 49 of file hhcwrp.hxx.

Referenced by Convert(), and ConvNext_impl().

bool SwHHCWrapper::m_bStartDone
private

Definition at line 51 of file hhcwrp.hxx.

Referenced by ConvNext_impl(), and ConvStart_impl().

sal_Int32 SwHHCWrapper::m_nLastPos
private

starting position of the last found text part (needs to be sth that gets not moved like SwPaM or SwPosition by replace operations!)

Definition at line 39 of file hhcwrp.hxx.

Referenced by GetNextPortion(), and SelectNewUnit_impl().

sal_uInt16 SwHHCWrapper::m_nPageCount
private

page count for progress bar

Definition at line 44 of file hhcwrp.hxx.

Referenced by ConvContinue_impl(), and ~SwHHCWrapper().

sal_uInt16 SwHHCWrapper::m_nPageStart
private

first checked page

Definition at line 45 of file hhcwrp.hxx.

Referenced by ConvContinue_impl().

sal_Int32 SwHHCWrapper::m_nUnitOffset
private

Definition at line 42 of file hhcwrp.hxx.

Referenced by GetNextPortion(), ReplaceUnit(), and SelectNewUnit_impl().

std::unique_ptr<SwConversionArgs> SwHHCWrapper::m_pConvArgs
private

object for arguments (and results) needed to find of next convertible text portion

Definition at line 36 of file hhcwrp.hxx.

Referenced by Convert(), ConvNext_impl(), FindConvText_impl(), GetNextPortion(), and ~SwHHCWrapper().

SwView* SwHHCWrapper::m_pView
private

Definition at line 32 of file hhcwrp.hxx.

Referenced by ConvContinue_impl(), ConvEnd_impl(), Convert(), ConvStart_impl(), and ~SwHHCWrapper().

VclPtr<vcl::Window> SwHHCWrapper::m_pWin
private

Definition at line 33 of file hhcwrp.hxx.

Referenced by FindConvText_impl().

SwWrtShell& SwHHCWrapper::m_rWrtShell
private

The documentation for this class was generated from the following files: