summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-17 14:59:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-17 15:00:01 +0000
commit2681f6442faa7b50fb49c48d64f64d3fddcc776e (patch)
tree9b3fa533d32d43e2c79162c6815d76ef9562ad90 /cui
parent3a806d027cb744cde08e0c4472bec5159d5a541d (diff)
fix up logic to hide empty frames for e.g. field format in dbaccess
Change-Id: I85a71cbc3f072940a369c10e13fe40a13008df66
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/align.hxx5
-rw-r--r--cui/source/tabpages/align.cxx13
2 files changed, 18 insertions, 0 deletions
diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
index c56925e53348..d6b693720b73 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -40,6 +40,7 @@
#include <vcl/field.hxx>
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
+#include <vcl/layout.hxx>
#include <vcl/lstbox.hxx>
#include <sfx2/tabdlg.hxx>
#include <svtools/valueset.hxx>
@@ -80,6 +81,7 @@ private:
ListBox* m_pLbHorAlign;
FixedText* m_pFtIndent;
MetricField* m_pEdIndent;
+ FixedText* m_pFtVerAlign;
ListBox* m_pLbVerAlign;
DialControl* m_pCtrlDial;
@@ -103,6 +105,9 @@ private:
FixedText* m_pFtCelLock;
FixedText* m_pFtABCD;
+ VclContainer* m_pAlignmentFrame;
+ VclContainer* m_pOrientFrame;
+ VclContainer* m_pPropertiesFrame;
};
// ============================================================================
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 5ba830af9521..7e071631d5b8 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -160,6 +160,7 @@ AlignmentTabPage::AlignmentTabPage( Window* pParent, const SfxItemSet& rCoreAttr
get(m_pLbHorAlign,"comboboxHorzAlign");
get(m_pFtIndent,"labelIndent");
get(m_pEdIndent,"spinIndentFrom");
+ get(m_pFtVerAlign,"labelVertAlign");
get(m_pLbVerAlign,"comboboxVertAlign");
//text rotation
@@ -188,6 +189,10 @@ AlignmentTabPage::AlignmentTabPage( Window* pParent, const SfxItemSet& rCoreAttr
get(m_pFtCelLock,"labelSTR_CELLLOCK");
get(m_pFtABCD,"labelABCD");
+ get(m_pAlignmentFrame, "alignment");
+ get(m_pOrientFrame, "orientation");
+ get(m_pPropertiesFrame, "properties");
+
m_pCtrlDial->SetText(m_pFtABCD->GetText());
InitVsRefEgde();
@@ -227,6 +232,7 @@ AlignmentTabPage::AlignmentTabPage( Window* pParent, const SfxItemSet& rCoreAttr
AddItemConnection( new HorJustConnection( SID_ATTR_ALIGN_HOR_JUSTIFY, *m_pLbHorAlign, s_pHorJustMap, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_INDENT, *m_pFtIndent, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::UInt16MetricConnection( SID_ATTR_ALIGN_INDENT, *m_pEdIndent, FUNIT_TWIP, sfx::ITEMCONN_HIDE_UNKNOWN ) );
+ AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_VER_JUSTIFY, *m_pFtVerAlign, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new VerJustConnection( SID_ATTR_ALIGN_VER_JUSTIFY, *m_pLbVerAlign, s_pVerJustMap, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new DialControlConnection( SID_ATTR_ALIGN_DEGREES, *m_pCtrlDial, sfx::ITEMCONN_HIDE_UNKNOWN ) );
AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_ALIGN_DEGREES, *m_pFtRotate, sfx::ITEMCONN_HIDE_UNKNOWN ) );
@@ -370,6 +376,13 @@ void AlignmentTabPage::UpdateEnableControls()
// shrink only without automatic line break, and not for block, fill or distribute.
m_pBtnShrink->Enable( (m_pBtnWrap->GetState() == STATE_NOCHECK) && !bHorBlock && !bHorFill && !bHorDist );
+ // visibility of frames
+ m_pAlignmentFrame->Show(m_pLbHorAlign->IsVisible() || m_pEdIndent->IsVisible() ||
+ m_pLbVerAlign->IsVisible());
+ m_pOrientFrame->Show(m_pCtrlDial->IsVisible() || m_pVsRefEdge->IsVisible() ||
+ m_pCbStacked->IsVisible() || m_pCbAsianMode->IsVisible());
+ m_pPropertiesFrame->Show(m_pBtnWrap->IsVisible() || m_pBtnHyphen->IsVisible() ||
+ m_pBtnShrink->IsVisible() || m_pLbFrameDir->IsVisible());
}
bool AlignmentTabPage::HasAlignmentChanged( const SfxItemSet& rNew, sal_uInt16 nWhich ) const