sc/source/ui/condformat/condformatdlg.cxx | 17 ++++++++++++++++- sc/source/ui/condformat/condformatdlgentry.cxx | 4 ++-- sc/source/ui/inc/anyrefdg.hxx | 1 + sc/source/ui/inc/condformatdlg.hxx | 2 +- sc/source/ui/miscdlgs/anyrefdg.cxx | 25 ++++++++++++++++++------- 5 files changed, 38 insertions(+), 11 deletions(-)
New commits: commit 96cf0a4e97a8725b59d8746192c6e4888a1314b8 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Thu Oct 11 04:12:03 2012 +0200 the formula ref edits need 3D references Change-Id: I360d8244f6b8feee862e9e750859271b741dcf93 diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 6bced64..bf4f8b2 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -395,6 +395,7 @@ sal_Bool ScCondFormatDlg::IsRefInputMode() const | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE #define ABS_DREF ABS_SREF \ | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE | SCA_TAB2_ABSOLUTE +#define ABS_DREF3D ABS_DREF | SCA_TAB_3D void ScCondFormatDlg::SetReference(const ScRange& rRef, ScDocument*) { @@ -408,7 +409,13 @@ void ScCondFormatDlg::SetReference(const ScRange& rRef, ScDocument*) RefInputStart(pEdit); rtl::OUString aRefStr; - rRef.Format( aRefStr, ABS_DREF, mpDoc, ScAddress::Details(mpDoc->GetAddressConvention(), 0, 0) ); + sal_uInt16 n = 0; + if(mpLastEdit && mpLastEdit != &maEdRange) + n = ABS_DREF3D; + else + n = ABS_DREF; + + rRef.Format( aRefStr, n, mpDoc, ScAddress::Details(mpDoc->GetAddressConvention(), 0, 0) ); pEdit->SetRefString( aRefStr ); } } commit 2134399f0e462fb6721f20c58fcd8470110ff875 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Thu Oct 11 04:00:05 2012 +0200 lock table only for the range edit field, not for the formula ones Change-Id: I08880d97d880227cb47d929701e666a49aad5c57 diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index f23bf21..6bced64 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -378,6 +378,14 @@ void ScCondFormatDlg::RefInputDone( sal_Bool bForced ) ScAnyRefDlg::RefInputDone(bForced); } +sal_Bool ScCondFormatDlg::IsTableLocked() const +{ + if(mpLastEdit && mpLastEdit != &maEdRange) + return sal_False; + + return sal_True; +} + sal_Bool ScCondFormatDlg::IsRefInputMode() const { return maEdRange.IsEnabled(); diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 3b3cfb3..194d60c 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -138,7 +138,7 @@ public: virtual void SetReference(const ScRange&, ScDocument*); virtual sal_Bool IsRefInputMode() const; virtual void SetActive(); - virtual sal_Bool IsTableLocked() const { return sal_True; } + virtual sal_Bool IsTableLocked() const; void InvalidateRefData(); commit 68a60bc98a6ad2467a17a917881745cf9310e90f Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Thu Oct 11 03:48:50 2012 +0200 dat bars should use automatic as default Change-Id: I67fe25cb62d701d7267932923e94f10e44853ac4 diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 865cfcc..fa47cc0 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -980,8 +980,8 @@ void ScDataBarFrmtEntry::Init() mpDataBarData.reset(new ScDataBarFormatData()); mpDataBarData->mpUpperLimit.reset(new ScColorScaleEntry()); mpDataBarData->mpLowerLimit.reset(new ScColorScaleEntry()); - mpDataBarData->mpLowerLimit->SetType(COLORSCALE_MIN); - mpDataBarData->mpUpperLimit->SetType(COLORSCALE_MAX); + mpDataBarData->mpLowerLimit->SetType(COLORSCALE_AUTO); + mpDataBarData->mpUpperLimit->SetType(COLORSCALE_AUTO); mpDataBarData->maPositiveColor = COL_LIGHTBLUE; } commit b4f430074cfce0bda32dddfb4d0251ea5aec83ab Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Thu Oct 11 03:48:33 2012 +0200 allow ref edit fields that are not direct children of the ScAnyRefDlg Change-Id: I966b67b9f62a8c1c3b9dc3394befe48358cbd34e diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 7aa3207..247edc0 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -70,6 +70,7 @@ class ScFormulaReferenceHelper Point aOldEditPos; // Original position of the input field Size aOldEditSize; // Original size of the input field Point aOldButtonPos; // Original position of the button + Window* mpOldEditParent; // Original parent of the edit field and the button sal_Bool bEnableColorRef; sal_Bool bHighLightRef; diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 99136b9..fa43823 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -60,6 +60,7 @@ ScFormulaReferenceHelper::ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindi , pAccel( NULL ) , pHiddenMarks(NULL) , nRefTab(0) + , mpOldEditParent( NULL ) , bHighLightRef( false ) , bAccInserted( false ) { @@ -365,6 +366,9 @@ void ScFormulaReferenceHelper::RefInputDone( sal_Bool bForced ) bAccInserted = false; } + // restore the parent of the edit field + pRefEdit->SetParent(mpOldEditParent); + // Fenstertitel anpassen m_pWindow->SetText(sOldDialogText); @@ -377,6 +381,7 @@ void ScFormulaReferenceHelper::RefInputDone( sal_Bool bForced ) // set button position and image if( pRefBtn ) { + pRefBtn->SetParent(m_pWindow); pRefBtn->SetPosPixel( aOldButtonPos ); pRefBtn->SetStartImage(); } @@ -408,6 +413,19 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula:: sNewDialogText = sOldDialogText; sNewDialogText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ": " )); + mpOldEditParent = pRefEdit->GetParent(); + + // Alte Daten merken + aOldDialogSize = m_pWindow->GetOutputSizePixel(); + aOldEditPos = pRefEdit->GetPosPixel(); + aOldEditSize = pRefEdit->GetSizePixel(); + if (pRefBtn) + aOldButtonPos = pRefBtn->GetPosPixel(); + + pRefEdit->SetParent(m_pWindow); + if(pRefBtn) + pRefBtn->SetParent(m_pWindow); + // Alle Elemente ausser EditCell und Button verstecken sal_uInt16 nChildren = m_pWindow->GetChildCount(); pHiddenMarks = new sal_Bool [nChildren]; @@ -429,13 +447,6 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula:: } } - // Alte Daten merken - aOldDialogSize = m_pWindow->GetOutputSizePixel(); - aOldEditPos = pRefEdit->GetPosPixel(); - aOldEditSize = pRefEdit->GetSizePixel(); - if (pRefBtn) - aOldButtonPos = pRefBtn->GetPosPixel(); - // Edit-Feld verschieben und anpassen Size aNewDlgSize(aOldDialogSize.Width(), aOldEditSize.Height()); Size aNewEditSize(aNewDlgSize); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits