diff options
21 files changed, 40 insertions, 73 deletions
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 18405c4a97ff..ebd641bb628d 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -132,11 +132,11 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( vcl::Window* pParent, cons aSz.setWidth( TAB_WIDTH1 ); rBar.InsertItem( ITEMID_TYPE, CuiResId( RID_SVXSTR_TYPE ), LogicToPixel( aSz, MapMode( MapUnit::MapAppFont ) ).Width(), - HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER | HeaderBarItemBits::CLICKABLE | HeaderBarItemBits::UPARROW ); + HeaderBarItemBits::LEFT | HeaderBarItemBits::CLICKABLE | HeaderBarItemBits::UPARROW ); aSz.setWidth( TAB_WIDTH2 ); rBar.InsertItem( ITEMID_PATH, CuiResId( RID_SVXSTR_PATH ), LogicToPixel( aSz, MapMode( MapUnit::MapAppFont ) ).Width(), - HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER ); + HeaderBarItemBits::LEFT ); static long aTabs[] = {0, TAB_WIDTH1, TAB_WIDTH1 + TAB_WIDTH2 }; Size aHeadSize = rBar.GetSizePixel(); diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 296d6c19e3b9..d2ad30ab52b8 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -840,7 +840,7 @@ void ColorConfigCtrl_Impl::InitHeaderBar(const OUString &rOn, const OUString &rU const OUString &rColorSetting) { // filling - const HeaderBarItemBits nHeadBits = HeaderBarItemBits::VCENTER | HeaderBarItemBits::FIXED | HeaderBarItemBits::FIXEDPOS; + const HeaderBarItemBits nHeadBits = HeaderBarItemBits::FIXED | HeaderBarItemBits::FIXEDPOS; m_pHeaderHB->InsertItem(1, rOn, 0, nHeadBits | HeaderBarItemBits::CENTER); m_pHeaderHB->InsertItem(2, rUIElems, 0, nHeadBits | HeaderBarItemBits::LEFT); m_pHeaderHB->InsertItem(3, rColorSetting, 0, nHeadBits | HeaderBarItemBits::LEFT); diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 3d8b2fa04c52..611af717eae9 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -167,7 +167,7 @@ OfaMSFilterTabPage2::OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet OUString sHeader = sHeader1 + "\t" + sHeader2 + "\t"; m_pCheckLB->InsertHeaderEntry( sHeader, HEADERBAR_APPEND, - HeaderBarItemBits::CENTER | HeaderBarItemBits::VCENTER | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::FIXED ); + HeaderBarItemBits::CENTER | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::FIXED ); m_pCheckLB->SetStyle( m_pCheckLB->GetStyle()|WB_HSCROLL| WB_VSCROLL ); } diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 781ebfba3c0a..9216aecd8066 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -216,10 +216,10 @@ SvxPathTabPage::SvxPathTabPage(vcl::Window* pParent, const SfxItemSet& rSet) rBar.InsertItem( ITEMID_TYPE, get<FixedText>("type")->GetText(), 0, - HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER | HeaderBarItemBits::CLICKABLE | HeaderBarItemBits::UPARROW ); + HeaderBarItemBits::LEFT | HeaderBarItemBits::CLICKABLE | HeaderBarItemBits::UPARROW ); rBar.InsertItem( ITEMID_PATH, get<FixedText>("path")->GetText(), 0, - HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER ); + HeaderBarItemBits::LEFT ); long nWidth1 = rBar.GetTextWidth(rBar.GetItemText(ITEMID_TYPE)); long nWidth2 = rBar.GetTextWidth(rBar.GetItemText(ITEMID_PATH)); diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index bb7d041d28d6..4b97d6a3f7ad 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -113,9 +113,9 @@ WebConnectionInfoDialog::WebConnectionInfoDialog(vcl::Window* pParent) long const aStaticTabs[]= { 0, 0 }; m_pPasswordsLB->SetTabs( SAL_N_ELEMENTS(aStaticTabs), aStaticTabs ); m_pPasswordsLB->InsertHeaderItem( 1, get<FixedText>("website")->GetText(), - HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::CLICKABLE | HeaderBarItemBits::UPARROW ); + HeaderBarItemBits::LEFT | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::CLICKABLE | HeaderBarItemBits::UPARROW ); m_pPasswordsLB->InsertHeaderItem( 2, get<FixedText>("username")->GetText(), - HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER | HeaderBarItemBits::FIXEDPOS ); + HeaderBarItemBits::LEFT | HeaderBarItemBits::FIXEDPOS ); pPasswordsLBContainer->set_height_request(m_pPasswordsLB->GetTextHeight()*8); m_pPasswordsLB->SetHeaderBarClickHdl( LINK( this, WebConnectionInfoDialog, HeaderBarClickedHdl ) ); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index b143f2734857..704f7d821a3d 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -452,7 +452,7 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage( vcl::Window* pParent, OUString sHeader = get<vcl::Window>("m")->GetText() + "\t" + get<vcl::Window>("t")->GetText() + "\t"; m_pCheckLB->InsertHeaderEntry(sHeader, HEADERBAR_APPEND, - HeaderBarItemBits::CENTER | HeaderBarItemBits::VCENTER | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::FIXED); + HeaderBarItemBits::CENTER | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::FIXED); m_pEditPB->SetClickHdl(LINK(this, OfaSwAutoFmtOptionsPage, EditHdl)); } @@ -1860,7 +1860,7 @@ OfaQuoteTabPage::OfaQuoteTabPage(vcl::Window* pParent, const SfxItemSet& rSet) m_pSwCheckLB->SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aStaticTabs), aStaticTabs); OUString sHeader = get<vcl::Window>("m")->GetText() + "\t" + get<vcl::Window>("t")->GetText() + "\t"; m_pSwCheckLB->InsertHeaderEntry( sHeader, HEADERBAR_APPEND, - HeaderBarItemBits::CENTER | HeaderBarItemBits::VCENTER | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::FIXED); + HeaderBarItemBits::CENTER | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::FIXED); m_pCheckLB->Hide(); } else diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 846f641ab5cc..1f7f769c39ac 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -1368,10 +1368,8 @@ XMLFilterListBox::XMLFilterListBox(Window* pParent, SvxPathControl* pPathControl long nTabSize = aBoxSize.Width() / 2; - m_pHeaderBar->InsertItem( ITEMID_NAME, aStr1, nTabSize, - HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER ); - m_pHeaderBar->InsertItem( ITEMID_TYPE, aStr2, nTabSize, - HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER ); + m_pHeaderBar->InsertItem( ITEMID_NAME, aStr1, nTabSize, HeaderBarItemBits::LEFT ); + m_pHeaderBar->InsertItem( ITEMID_TYPE, aStr2, nTabSize, HeaderBarItemBits::LEFT ); static long nTabs[] = {0, nTabSize }; diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx index 50bcb583dca8..7d50e2b5e85b 100644 --- a/fpicker/source/office/PlacesListBox.cxx +++ b/fpicker/source/office/PlacesListBox.cxx @@ -27,7 +27,7 @@ PlacesListBox_Impl::PlacesListBox_Impl( PlacesListBox* pParent, const OUString& long aTabPositions[] = { 20, 600 }; SetTabs( SAL_N_ELEMENTS(aTabPositions), aTabPositions, MapUnit::MapPixel ); - mpHeaderBar->InsertItem( COLUMN_NAME, rTitle, 600, HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER ); + mpHeaderBar->InsertItem( COLUMN_NAME, rTitle, 600, HeaderBarItemBits::LEFT ); Size aHeadSize = mpHeaderBar->GetSizePixel(); SetPosSizePixel( Point( 0, aHeadSize.getHeight() ), diff --git a/include/vcl/headbar.hxx b/include/vcl/headbar.hxx index 9d53cc50b11a..71cf7fcd5fc2 100644 --- a/include/vcl/headbar.hxx +++ b/include/vcl/headbar.hxx @@ -183,23 +183,20 @@ enum class HeaderBarItemBits LEFT = 0x0001, CENTER = 0x0002, RIGHT = 0x0004, - TOP = 0x0008, - VCENTER = 0x0010, - BOTTOM = 0x0020, - LEFTIMAGE = 0x0040, - RIGHTIMAGE = 0x0080, + LEFTIMAGE = 0x0010, + RIGHTIMAGE = 0x0020, FIXED = 0x0100, FIXEDPOS = 0x0200, CLICKABLE = 0x0400, FLAT = 0x0800, DOWNARROW = 0x1000, UPARROW = 0x2000, - STDSTYLE = LEFT | LEFTIMAGE | VCENTER | CLICKABLE, + STDSTYLE = LEFT | LEFTIMAGE | CLICKABLE, }; namespace o3tl { - template<> struct typed_flags<HeaderBarItemBits> : is_typed_flags<HeaderBarItemBits, 0x3fff> {}; + template<> struct typed_flags<HeaderBarItemBits> : is_typed_flags<HeaderBarItemBits, 0x3f37> {}; } #define HEADERBAR_APPEND (sal_uInt16(0xFFFF)) diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx index ccd569a90c70..58b2439db60d 100644 --- a/sc/source/ui/condformat/condformatmgr.cxx +++ b/sc/source/ui/condformat/condformatmgr.cxx @@ -26,7 +26,7 @@ ScCondFormatManagerWindow::ScCondFormatManagerWindow(SvSimpleTableContainer& rPa OUStringBuffer sHeader; sHeader.append(aRangeStr).append("\t").append(aConditionStr); - InsertHeaderEntry(sHeader.makeStringAndClear(), HEADERBAR_APPEND, HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER); + InsertHeaderEntry(sHeader.makeStringAndClear(), HEADERBAR_APPEND, HeaderBarItemBits::LEFT); setColSizes(); Init(); diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx index 82270b55c0d2..95c1649ded09 100644 --- a/sc/source/ui/miscdlgs/conflictsdlg.cxx +++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx @@ -371,7 +371,7 @@ ScConflictsDlg::ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScD aHeader += ScResId( STR_TITLE_AUTHOR ); aHeader += aTab; aHeader += ScResId( STR_TITLE_DATE ); - m_pLbConflicts->InsertHeaderEntry( aHeader, HEADERBAR_APPEND, HeaderBarItemBits::LEFT | HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::VCENTER ); + m_pLbConflicts->InsertHeaderEntry( aHeader, HEADERBAR_APPEND, HeaderBarItemBits::LEFT | HeaderBarItemBits::LEFTIMAGE ); m_pLbConflicts->SetStyle( m_pLbConflicts->GetStyle() | WB_HASLINES | WB_CLIPCHILDREN | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL ); m_pLbConflicts->SetSelectionMode( SelectionMode::Multiple ); diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx index 108e8c91c1ad..6fa9f75ba56c 100644 --- a/sc/source/ui/miscdlgs/sharedocdlg.cxx +++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx @@ -98,7 +98,7 @@ ScShareDocumentDlg::ScShareDocumentDlg( vcl::Window* pParent, ScViewData* pViewD OUString aHeader(get<FixedText>("name")->GetText()); aHeader += "\t"; aHeader += get<FixedText>("accessed")->GetText(); - m_pLbUsers->InsertHeaderEntry( aHeader, HEADERBAR_APPEND, HeaderBarItemBits::LEFT | HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::VCENTER ); + m_pLbUsers->InsertHeaderEntry( aHeader, HEADERBAR_APPEND, HeaderBarItemBits::LEFT | HeaderBarItemBits::LEFTIMAGE ); m_pLbUsers->SetSelectionMode( SelectionMode::NONE ); UpdateView(); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index ec7f55819b53..6049c9e8462c 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1985,7 +1985,7 @@ void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder) m_pHeaderBar->set_height_request(GetTextHeight() + 6); - const HeaderBarItemBits nHeadBits = HeaderBarItemBits::VCENTER | HeaderBarItemBits::FIXED | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::LEFT; + const HeaderBarItemBits nHeadBits = HeaderBarItemBits::FIXED | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::LEFT; m_pHeaderBar->InsertItem( HI_NAME, sName, 0, nHeadBits ); m_pHeaderBar->InsertItem( HI_TYPE, sType, 0, nHeadBits ); diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 7c7510416097..f0004b05d190 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -1094,7 +1094,7 @@ return; if (!w) w = GetDefaultColumnWidth(rName); - InsertDataColumn(nId, rName, w, (HeaderBarItemBits::CENTER | HeaderBarItemBits::VCENTER | HeaderBarItemBits::CLICKABLE), nPos); + InsertDataColumn(nId, rName, w, (HeaderBarItemBits::CENTER | HeaderBarItemBits::CLICKABLE), nPos); return nId; } diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index e1223a036f31..0260a67480ad 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -390,7 +390,7 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( vcl::Window* pParentWin, mpHeaderBar = VclPtr<HeaderBar>::Create( pParentWin, WB_BUTTONSTYLE | WB_BOTTOMBORDER ); mpHeaderBar->SetPosSizePixel( Point( 0, 0 ), mpHeaderBar->CalcWindowSizePixel() ); - HeaderBarItemBits nBits = ( HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER | HeaderBarItemBits::CLICKABLE ); + HeaderBarItemBits nBits = ( HeaderBarItemBits::LEFT | HeaderBarItemBits::CLICKABLE ); long aTabPositions[] = { 20, 180, 320, 400, 600 }; SetTabs(SAL_N_ELEMENTS(aTabPositions), aTabPositions, MapUnit::MapPixel); diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index d52cf33efbe8..9155b04bf8eb 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -3377,7 +3377,7 @@ void DbGridControl::ShowColumn(sal_uInt16 nId) OUString aName; pColumn->getModel()->getPropertyValue(FM_PROP_LABEL) >>= aName; - InsertDataColumn(nId, aName, CalcZoom(pColumn->m_nLastVisibleWidth), HeaderBarItemBits::CENTER | HeaderBarItemBits::VCENTER | HeaderBarItemBits::CLICKABLE, nNewViewPos); + InsertDataColumn(nId, aName, CalcZoom(pColumn->m_nLastVisibleWidth), HeaderBarItemBits::CENTER | HeaderBarItemBits::CLICKABLE, nNewViewPos); pColumn->m_bHidden = false; ActivateCell(); diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 9fb61c44587d..a353fd19336d 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -45,7 +45,7 @@ namespace textconversiondlgs using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -#define HEADER_BAR_BITS ( HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER | HeaderBarItemBits::CLICKABLE | HeaderBarItemBits::FIXED | HeaderBarItemBits::FIXEDPOS ) +#define HEADER_BAR_BITS ( HeaderBarItemBits::LEFT | HeaderBarItemBits::CLICKABLE | HeaderBarItemBits::FIXED | HeaderBarItemBits::FIXEDPOS ) DictionaryList::DictionaryList(SvSimpleTableContainer& rParent, WinBits nBits) : SvSimpleTable(rParent, nBits) diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 35415c65df6d..178d5d985d19 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -1173,7 +1173,7 @@ SwAssignFieldsDialog::SwAssignFieldsDialog( Size aOutputSize(m_pFieldsControl->m_aHeaderHB->GetSizePixel()); sal_Int32 nFirstWidth; sal_Int32 nSecondWidth = nFirstWidth = aOutputSize.Width() / 3; - const HeaderBarItemBits nHeadBits = HeaderBarItemBits::VCENTER | HeaderBarItemBits::FIXED| HeaderBarItemBits::FIXEDPOS; + const HeaderBarItemBits nHeadBits = HeaderBarItemBits::FIXED| HeaderBarItemBits::FIXEDPOS; m_pFieldsControl->m_aHeaderHB->InsertItem( 1, sAddressElement, nFirstWidth, nHeadBits|HeaderBarItemBits::LEFT); m_pFieldsControl->m_aHeaderHB->InsertItem( 2, sMatchesTo, nSecondWidth, nHeadBits|HeaderBarItemBits::LEFT); m_pFieldsControl->m_aHeaderHB->InsertItem( 3, sPreview, diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index 917f70e4ead1..d0b3f5c875a8 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -260,10 +260,10 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem& long nPos2 = aSize.Width()/3; m_pStatusHB->InsertItem( ITEMID_TASK, sTask, nPos1, - HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER ); + HeaderBarItemBits::LEFT ); m_pStatusHB->InsertItem( ITEMID_STATUS, sStatus, nPos2, - HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER ); + HeaderBarItemBits::LEFT ); static long nTabs[] = {0, nPos1}; m_pStatus->SetStyle( m_pStatus->GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ); diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 29d8770f8585..f931563cd46a 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -63,7 +63,7 @@ SwAddressTable::SwAddressTable(SvSimpleTableContainer& rParent) void SwAddressTable::InsertHeaderItem(sal_uInt16 nColumn, const OUString& rText) { - GetTheHeaderBar().InsertItem( nColumn, rText, 0, HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER ); + GetTheHeaderBar().InsertItem( nColumn, rText, 0, HeaderBarItemBits::LEFT ); } void SwAddressTable::Resize() diff --git a/vcl/source/treelist/headbar.cxx b/vcl/source/treelist/headbar.cxx index 96b75c7cb8fe..aefedb609505 100644 --- a/vcl/source/treelist/headbar.cxx +++ b/vcl/source/treelist/headbar.cxx @@ -429,22 +429,11 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos long nTxtPosY = 0; if (!pItem->maOutText.isEmpty() || (nArrowWidth && aTxtSize.Height())) { - if (nBits & HeaderBarItemBits::TOP) - { - nTxtPosY = aRect.Top(); - if (!(nBits & (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::RIGHTIMAGE))) - nTxtPosY += aImageSize.Height(); - } - else if (nBits & HeaderBarItemBits::BOTTOM) - nTxtPosY = aRect.Bottom()-aTxtSize.Height(); - else - { - long nTempHeight = aTxtSize.Height(); - nTempHeight += aImageSize.Height(); - nTxtPosY = aRect.Top()+((aRect.GetHeight()-nTempHeight)/2); - if (!(nBits & (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::RIGHTIMAGE))) - nTxtPosY += aImageSize.Height(); - } + long nTempHeight = aTxtSize.Height(); + nTempHeight += aImageSize.Height(); + nTxtPosY = aRect.Top()+((aRect.GetHeight()-nTempHeight)/2); + if (!(nBits & (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::RIGHTIMAGE))) + nTxtPosY += aImageSize.Height(); } // display text @@ -490,21 +479,11 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos nImagePos = aRect.Left() + HEADERBAR_TEXTOFF; } - if (nBits & HeaderBarItemBits::TOP) - nImagePosY = aRect.Top(); - else if (nBits & HeaderBarItemBits::BOTTOM) - { - nImagePosY = aRect.Bottom() - aImageSize.Height(); - if (!(nBits & (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::RIGHTIMAGE))) - nImagePosY -= aTxtSize.Height(); - } - else - { - long nTempHeight = aImageSize.Height(); - if (!(nBits & (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::RIGHTIMAGE))) - nTempHeight += aTxtSize.Height(); - nImagePosY = aRect.Top() + ((aRect.GetHeight() - nTempHeight) / 2); - } + long nTempHeight = aImageSize.Height(); + if (!(nBits & (HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::RIGHTIMAGE))) + nTempHeight += aTxtSize.Height(); + nImagePosY = aRect.Top() + ((aRect.GetHeight() - nTempHeight) / 2); + if (nImagePos + aImageSize.Width() <= aRect.Right()) { DrawImageFlags nStyle = DrawImageFlags::NONE; @@ -559,14 +538,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos else if (aImageSize.Width() && aImageSize.Height()) nArrowY = nImagePosY + (aImageSize.Height() / 2); else - { - if (nBits & HeaderBarItemBits::TOP) - nArrowY = aRect.Top() + 1; - else if (nBits & HeaderBarItemBits::BOTTOM) - nArrowY = aRect.Bottom() - HEAD_ARROWSIZE2 - 1; - else - nArrowY = aRect.Top() + ((aRect.GetHeight() - HEAD_ARROWSIZE2) / 2); - } + nArrowY = aRect.Top() + ((aRect.GetHeight() - HEAD_ARROWSIZE2) / 2); nArrowY -= HEAD_ARROWSIZE1 - 1; if (nBits & HeaderBarItemBits::DOWNARROW) { |