Kaydet (Commit) 7715f7e6 authored tarafından Caolán McNamara's avatar Caolán McNamara

CID#703891 RubyDialog::GetText orthogonal to Dialog::GetText

Change-Id: I131daae13b11b5242e9a32a94532463f6e0d925b
üst 3b6891ff
...@@ -87,9 +87,6 @@ public: ...@@ -87,9 +87,6 @@ public:
class SvxRubyDialog : public SfxModelessDialog class SvxRubyDialog : public SfxModelessDialog
{ {
using Dialog::SetText;
using Dialog::GetText;
friend class RubyPreview; friend class RubyPreview;
FixedText* m_pLeftFT; FixedText* m_pLeftFT;
...@@ -123,7 +120,7 @@ class SvxRubyDialog : public SfxModelessDialog ...@@ -123,7 +120,7 @@ class SvxRubyDialog : public SfxModelessDialog
long nLastPos; long nLastPos;
long nCurrentEdit; long nCurrentEdit;
sal_Bool bModified; sal_Bool bModified;
com::sun::star::uno::Reference<com::sun::star::view::XSelectionChangeListener> xImpl; com::sun::star::uno::Reference<com::sun::star::view::XSelectionChangeListener> xImpl;
SfxBindings* pBindings; SfxBindings* pBindings;
...@@ -140,18 +137,18 @@ class SvxRubyDialog : public SfxModelessDialog ...@@ -140,18 +137,18 @@ class SvxRubyDialog : public SfxModelessDialog
DECL_LINK(EditScrollHdl_Impl, sal_Int32*); DECL_LINK(EditScrollHdl_Impl, sal_Int32*);
DECL_LINK(EditJumpHdl_Impl, sal_Int32*); DECL_LINK(EditJumpHdl_Impl, sal_Int32*);
void SetText(sal_Int32 nPos, Edit& rLeft, Edit& rRight); void SetRubyText(sal_Int32 nPos, Edit& rLeft, Edit& rRight);
void GetText(); void GetRubyText();
void ClearCharStyleList(); void ClearCharStyleList();
void AssertOneEntry(); void AssertOneEntry();
void Update(); void Update();
virtual sal_Bool Close(); virtual sal_Bool Close();
long GetLastPos() const {return nLastPos;} long GetLastPos() const {return nLastPos;}
void SetLastPos(long nSet) {nLastPos = nSet;} void SetLastPos(long nSet) {nLastPos = nSet;}
sal_Bool IsModified() const {return bModified;} sal_Bool IsModified() const {return bModified;}
void SetModified(sal_Bool bSet) {bModified = bSet;} void SetModified(sal_Bool bSet) {bModified = bSet;}
void EnableControls(bool bEnable); void EnableControls(bool bEnable);
......
...@@ -373,7 +373,7 @@ void SvxRubyDialog::Deactivate() ...@@ -373,7 +373,7 @@ void SvxRubyDialog::Deactivate()
SfxModelessDialog::Deactivate(); SfxModelessDialog::Deactivate();
} }
void SvxRubyDialog::SetText(sal_Int32 nPos, Edit& rLeft, Edit& rRight) void SvxRubyDialog::SetRubyText(sal_Int32 nPos, Edit& rLeft, Edit& rRight)
{ {
OUString sLeft, sRight; OUString sLeft, sRight;
const Sequence<PropertyValues>& aRubyValues = pImpl->GetRubyValues(); const Sequence<PropertyValues>& aRubyValues = pImpl->GetRubyValues();
...@@ -400,7 +400,7 @@ void SvxRubyDialog::SetText(sal_Int32 nPos, Edit& rLeft, Edit& rRight) ...@@ -400,7 +400,7 @@ void SvxRubyDialog::SetText(sal_Int32 nPos, Edit& rLeft, Edit& rRight)
rRight.SaveValue(); rRight.SaveValue();
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void SvxRubyDialog::GetText() void SvxRubyDialog::GetRubyText()
{ {
long nTempLastPos = GetLastPos(); long nTempLastPos = GetLastPos();
for(int i = 0; i < 8; i+=2) for(int i = 0; i < 8; i+=2)
...@@ -515,12 +515,12 @@ IMPL_LINK(SvxRubyDialog, ScrollHdl_Impl, ScrollBar*, pScroll) ...@@ -515,12 +515,12 @@ IMPL_LINK(SvxRubyDialog, ScrollHdl_Impl, ScrollBar*, pScroll)
long nPos = pScroll->GetThumbPos(); long nPos = pScroll->GetThumbPos();
if(GetLastPos() != nPos) if(GetLastPos() != nPos)
{ {
GetText(); GetRubyText();
} }
SetText(nPos++, *m_pLeft1ED, *m_pRight1ED); SetRubyText(nPos++, *m_pLeft1ED, *m_pRight1ED);
SetText(nPos++, *m_pLeft2ED, *m_pRight2ED); SetRubyText(nPos++, *m_pLeft2ED, *m_pRight2ED);
SetText(nPos++, *m_pLeft3ED, *m_pRight3ED); SetRubyText(nPos++, *m_pLeft3ED, *m_pRight3ED);
SetText(nPos, *m_pLeft4ED, *m_pRight4ED); SetRubyText(nPos, *m_pLeft4ED, *m_pRight4ED);
SetLastPos(nPos - 3); SetLastPos(nPos - 3);
m_pPreviewWin->Invalidate(); m_pPreviewWin->Invalidate();
return 0; return 0;
...@@ -536,7 +536,7 @@ IMPL_LINK_NOARG(SvxRubyDialog, ApplyHdl_Impl) ...@@ -536,7 +536,7 @@ IMPL_LINK_NOARG(SvxRubyDialog, ApplyHdl_Impl)
AdjustHdl_Impl(m_pAdjustLB); AdjustHdl_Impl(m_pAdjustLB);
CharStyleHdl_Impl(m_pCharStyleLB); CharStyleHdl_Impl(m_pCharStyleLB);
} }
GetText(); GetRubyText();
//reset all edit fields - SaveValue is called //reset all edit fields - SaveValue is called
ScrollHdl_Impl(m_pScrollSB); ScrollHdl_Impl(m_pScrollSB);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment