Kaydet (Commit) 3d69d78b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Some visual clean up

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