Some visual clean up
This commit is contained in:
parent
7caa7ae894
commit
3d69d78bed
4 changed files with 20 additions and 27 deletions
|
@ -138,17 +138,15 @@ void ODocumentInfoPreview::fill(
|
|||
void ODocumentInfoPreview::insertEntry(
|
||||
rtl::OUString const & title, rtl::OUString const & value)
|
||||
{
|
||||
rtl::OUString p1(rtl::OUString("\n") + title + rtl::OUString(":"));
|
||||
m_pEditWin.InsertText(p1);
|
||||
if (m_pEditWin.GetText().Len() != 0) {
|
||||
m_pEditWin.InsertText(rtl::OUString("\n\n"));
|
||||
}
|
||||
rtl::OUString caption(title + rtl::OUString(":\n"));
|
||||
m_pEditWin.InsertText(caption);
|
||||
m_pEditWin.SetAttrib(
|
||||
TextAttribFontWeight(WEIGHT_BOLD), m_pEditWin.GetParagraphCount() - 1,
|
||||
0, p1.getLength());
|
||||
rtl::OUString p2(rtl::OUString("\n") + value);
|
||||
m_pEditWin.InsertText(p2);
|
||||
m_pEditWin.SetAttrib(
|
||||
TextAttribFontWeight(WEIGHT_NORMAL),
|
||||
m_pEditWin.GetParagraphCount() - 1, 0, p2.getLength());
|
||||
m_pEditWin.InsertText(rtl::OUString("\n"));
|
||||
TextAttribFontWeight(WEIGHT_BOLD), m_pEditWin.GetParagraphCount() - 2,
|
||||
0, caption.getLength() - 1);
|
||||
m_pEditWin.InsertText(value);
|
||||
}
|
||||
|
||||
void ODocumentInfoPreview::insertNonempty(long id, rtl::OUString const & value)
|
||||
|
|
|
@ -187,6 +187,7 @@ private:
|
|||
sal_Bool mbAutoResize : 1;
|
||||
sal_Bool mbEnableDelete : 1;
|
||||
sal_Bool mbEnableRename : 1;
|
||||
bool mbShowHeader;
|
||||
|
||||
void DeleteEntries();
|
||||
void DoQuickSearch( const xub_Unicode& rChar );
|
||||
|
@ -722,10 +723,9 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin,
|
|||
mbResizeDisabled ( sal_False ),
|
||||
mbAutoResize ( sal_False ),
|
||||
mbEnableDelete ( sal_True ),
|
||||
mbEnableRename ( sal_True )
|
||||
|
||||
mbEnableRename ( sal_True ),
|
||||
mbShowHeader ( (nFlags & FILEVIEW_SHOW_NONE) == 0 )
|
||||
{
|
||||
const bool bViewHeader = (nFlags & FILEVIEW_SHOW_NONE) == 0;
|
||||
Size aBoxSize = pParentWin->GetSizePixel();
|
||||
mpHeaderBar = new HeaderBar( pParentWin, WB_BUTTONSTYLE | WB_BOTTOMBORDER );
|
||||
mpHeaderBar->SetPosSizePixel( Point( 0, 0 ), mpHeaderBar->CalcWindowSizePixel() );
|
||||
|
@ -760,7 +760,7 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin,
|
|||
SetSelectionMode( MULTIPLE_SELECTION );
|
||||
|
||||
Show();
|
||||
if( bViewHeader )
|
||||
if( mbShowHeader )
|
||||
mpHeaderBar->Show();
|
||||
|
||||
maResetQuickSearch.SetTimeout( QUICK_SEARCH_TIMEOUT );
|
||||
|
@ -806,9 +806,13 @@ void ViewTabListBox_Impl::Resize()
|
|||
if ( mbResizeDisabled || !aBoxSize.Width() )
|
||||
return;
|
||||
|
||||
Size aBarSize = mpHeaderBar->GetSizePixel();
|
||||
aBarSize.Width() = mbAutoResize ? aBoxSize.Width() : GetSizePixel().Width();
|
||||
mpHeaderBar->SetSizePixel( aBarSize );
|
||||
Size aBarSize;
|
||||
if ( mbShowHeader )
|
||||
{
|
||||
aBarSize = mpHeaderBar->GetSizePixel();
|
||||
aBarSize.Width() = mbAutoResize ? aBoxSize.Width() : GetSizePixel().Width();
|
||||
mpHeaderBar->SetSizePixel( aBarSize );
|
||||
}
|
||||
|
||||
if ( mbAutoResize )
|
||||
{
|
||||
|
|
|
@ -427,7 +427,6 @@ SvtFileViewWindow_Impl::SvtFileViewWindow_Impl( SvtTemplateWindow* pParent ) :
|
|||
aFileView.SetStyle( aFileView.GetStyle() | WB_DIALOGCONTROL | WB_TABSTOP );
|
||||
aFileView.SetHelpId( HID_TEMPLATEDLG_FILEVIEW );
|
||||
aFileView.Show();
|
||||
aFileView.SetPosPixel( Point( 0, 0 ) );
|
||||
aFileView.EnableAutoResize();
|
||||
aFileView.EnableContextMenu( sal_False );
|
||||
aFileView.EnableDelete( sal_False );
|
||||
|
@ -528,14 +527,7 @@ Sequence< ::rtl::OUString > SvtFileViewWindow_Impl::GetNewDocContents() const
|
|||
|
||||
void SvtFileViewWindow_Impl::Resize()
|
||||
{
|
||||
Size aWinSize = GetOutputSizePixel();
|
||||
|
||||
static int x = 0;
|
||||
static int y = 0;
|
||||
|
||||
aWinSize.nA += x;
|
||||
aWinSize.nB += y;
|
||||
aFileView.SetSizePixel( aWinSize );
|
||||
aFileView.SetSizePixel(GetOutputSizePixel());
|
||||
}
|
||||
|
||||
String SvtFileViewWindow_Impl::GetSelectedFile() const
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
Control CTRL_FILEVIEW
|
||||
{
|
||||
Pos = MAP_APPFONT ( 0 , 0 ) ;
|
||||
Size = MAP_APPFONT ( 200 , 180 ) ;
|
||||
};
|
||||
|
||||
String STR_SVT_NEWDOC
|
||||
|
|
Loading…
Reference in a new issue