summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/app/scmod.cxx3
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx39
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx5
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx12
-rw-r--r--sc/source/ui/inc/tpsort.hxx8
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx2
7 files changed, 37 insertions, 34 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 845e551ac7f1..2635cb8e628c 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2051,7 +2051,10 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
// TP_USERLISTS
if ( pUL )
+ {
aULItem.SetUserList( *pUL );
+ pRet->Put(aULItem);
+ }
// TP_COMPATIBILITY
pRet->Put( SfxUInt16Item( SID_SC_OPT_KEY_BINDING_COMPAT,
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 5c6d0f2586e1..6b877de44cfe 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -494,30 +494,25 @@ void ScCondFrmtEntry::HideColorScaleElements()
void ScCondFrmtEntry::SetHeight()
{
- if(mbActive)
+ long nPad = LogicToPixel(Size(42,2), MapMode(MAP_APPFONT)).getHeight();
+
+ // Calculate maximum height we need from visible widgets
+ sal_uInt16 nChildren = GetChildCount();
+
+ long nMaxHeight = 0;
+ for(sal_uInt16 i = 0; i < nChildren; i++)
{
- Size aSize = GetSizePixel();
- switch (meType)
- {
- case CONDITION:
- case FORMULA:
- aSize.Height() = 120;
- break;
- case COLORSCALE:
- aSize.Height() = 200;
- break;
- case DATABAR:
- aSize.Height() = 200;
- break;
- default:
- break;
- }
- SetSizePixel(aSize);
+ Window *pChild = GetChild(i);
+ if(!pChild || !pChild->IsVisible())
+ continue;
+ Point aPos = pChild->GetPosPixel();
+ Size aSize = pChild->GetSizePixel();
+ nMaxHeight = std::max(aPos.Y() + aSize.Height(), nMaxHeight);
}
- else
+ Size aSize = GetSizePixel();
+ if(nMaxHeight > 0)
{
- Size aSize = GetSizePixel();
- aSize.Height() = 40;
+ aSize.Height() = nMaxHeight + nPad;
SetSizePixel(aSize);
}
}
@@ -984,6 +979,8 @@ ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocum
{
maEntries.push_back(new ScCondFrmtEntry( this, mpDoc, pFormat->GetEntry(nIndex), maPos ));
}
+ if (nCount > 0)
+ maEntries.begin()->Select();
}
RecalcAll();
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index aee8b6f26dd4..03fbeb3a4aa5 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -77,7 +77,7 @@ String ScCondFormatManagerWindow::createEntryString(const ScConditionalFormat& r
String aStr;
aRange.Format(aStr, SCA_VALID, mpDoc, mpDoc->GetAddressConvention());
aStr += '\t';
- aStr += ScCondFormatHelper::GetExpression(rFormat, mrPos);
+ aStr += ScCondFormatHelper::GetExpression(rFormat, aRange.GetTopLeftCorner());
return aStr;
}
@@ -209,7 +209,8 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, EditBtnHdl)
if(!pFormat)
return 0;
- ScCondFormatDlg* pDlg = new ScCondFormatDlg(this, mpDoc, pFormat, pFormat->GetRange(), maPos);
+ ScCondFormatDlg* pDlg = new ScCondFormatDlg(this, mpDoc, pFormat, pFormat->GetRange(),
+ pFormat->GetRange().GetTopLeftCorner());
if(pDlg->Execute() == RET_OK)
{
sal_Int32 nKey = pFormat->GetKey();
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 303d6c6b8efb..7ebbb474da79 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -275,9 +275,11 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet )
// -----------------------------------------------------------------------
-// for data exchange without dialogue detour: (still TODO!)
-void ScTabPageSortFields::ActivatePage()
+// for data exchange without dialogue detour:
+void ScTabPageSortFields::ActivatePage( const SfxItemSet& rSet )
{
+ // Refresh local copy with shared data
+ aSortData = static_cast<const ScSortItem&>(rSet.Get( SCITEM_SORTDATA )).GetSortData();
if ( pDlg )
{
if ( bHasHeader != pDlg->GetHeaders()
@@ -744,9 +746,11 @@ sal_Bool ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet )
// -----------------------------------------------------------------------
-// for data exchange without dialogue detour: (still TODO!)
-void ScTabPageSortOptions::ActivatePage()
+// for data exchange without dialogue detour:
+void ScTabPageSortOptions::ActivatePage( const SfxItemSet& rSet )
{
+ // Refresh local copy with shared data
+ aSortData = static_cast<const ScSortItem&>(rSet.Get( SCITEM_SORTDATA )).GetSortData();
if ( pDlg )
{
if ( aBtnHeader.IsChecked() != pDlg->GetHeaders() )
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 14fce4efb4d1..7167e2ebebc3 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -69,11 +69,9 @@ public:
virtual void Reset ( const SfxItemSet& rArgSet );
protected:
-// for data exchange (TODO: should be changed!)
-// virtual void ActivatePage ( const SfxItemSet& rSet );
+ virtual void ActivatePage ( const SfxItemSet& rSet );
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
- virtual void ActivatePage ();
virtual int DeactivatePage ( SfxItemSet* pSet = 0);
private:
@@ -132,11 +130,9 @@ public:
virtual void Reset ( const SfxItemSet& rArgSet );
protected:
-// for data exchange (TODO: should be changed!)
-// virtual void ActivatePage ( const SfxItemSet& rSet );
+ virtual void ActivatePage ( const SfxItemSet& rSet );
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
- virtual void ActivatePage ();
virtual int DeactivatePage ( SfxItemSet* pSet = 0);
private:
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 3eee0085bb0e..ba6fc9a7b926 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -96,6 +96,7 @@ ScTpUserLists::ScTpUserLists( Window* pParent,
{
SetExchangeSupport();
Init();
+ Reset(rCoreAttrs);
FreeResource();
}
@@ -153,6 +154,7 @@ void ScTpUserLists::Init()
aFtCopyFrom.Disable();
aEdCopyFrom.Disable();
}
+
}
// -----------------------------------------------------------------------
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 14ed86bb29a7..c53294563ba4 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2075,7 +2075,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
else
{
- pDlg = pFact->CreateScCondFormatDlg( pTabViewShell->GetDialogParent(), pDoc, NULL, aRangeList, aPos, RID_SCDLG_CONDFORMAT );
+ pDlg = pFact->CreateScCondFormatDlg( pTabViewShell->GetDialogParent(), pDoc, NULL, aRangeList, aRangeList.GetTopLeftCorner(), RID_SCDLG_CONDFORMAT );
}
if(pDlg->Execute() == RET_OK)