diff --git a/svtools/source/contnr/DocumentInfoPreview.cxx b/svtools/source/contnr/DocumentInfoPreview.cxx index 805ed0aa1895..b27df1739a91 100644 --- a/svtools/source/contnr/DocumentInfoPreview.cxx +++ b/svtools/source/contnr/DocumentInfoPreview.cxx @@ -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) diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index b6868319eb5b..de0c2afdb45e 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -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 ) { diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 3bdb0f7ee7c6..a2a8315a58da 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -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 diff --git a/svtools/source/contnr/templwin.src b/svtools/source/contnr/templwin.src index 076963d2e7c3..4283ff3cab53 100644 --- a/svtools/source/contnr/templwin.src +++ b/svtools/source/contnr/templwin.src @@ -38,7 +38,6 @@ Control CTRL_FILEVIEW { Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( 200 , 180 ) ; }; String STR_SVT_NEWDOC