Kaydet (Commit) 2681f644 authored tarafından Caolán McNamara's avatar Caolán McNamara

fix up logic to hide empty frames for e.g. field format in dbaccess

Change-Id: I85a71cbc3f072940a369c10e13fe40a13008df66
üst 3a806d02
......@@ -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;
};
// ============================================================================
......
......@@ -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
......
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