diff options
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 24 | ||||
-rw-r--r-- | svtools/source/contnr/templwin.cxx | 12 | ||||
-rw-r--r-- | svtools/source/control/tabbar.cxx | 1 | ||||
-rw-r--r-- | svtools/source/filter.vcl/wmf/winmtf.cxx | 31 | ||||
-rw-r--r-- | svtools/source/filter.vcl/wmf/winmtf.hxx | 3 | ||||
-rw-r--r-- | svtools/source/filter.vcl/wmf/winwmf.cxx | 1 |
6 files changed, 63 insertions, 9 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index b0d92e3fd9aa..1cdf90c2a82a 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -98,6 +98,8 @@ using ::rtl::OUString; #define COLUMN_SIZE 3 #define COLUMN_DATE 4 +#define aSeparatorStr "----------------------------------" + #define ROW_HEIGHT 17 // the height of a row has to be a little higher than the bitmap #define QUICK_SEARCH_TIMEOUT 1500 // time in mSec before the quicksearch string will be reseted @@ -724,6 +726,7 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin, mbEnableRename ( sal_True ) { + sal_Bool bViewHeader = true; Size aBoxSize = pParentWin->GetSizePixel(); mpHeaderBar = new HeaderBar( pParentWin, WB_BUTTONSTYLE | WB_BOTTOMBORDER ); mpHeaderBar->SetPosSizePixel( Point( 0, 0 ), mpHeaderBar->CalcWindowSizePixel() ); @@ -736,6 +739,8 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin, mpHeaderBar->InsertItem( COLUMN_SIZE, String( SvtResId( STR_SVT_FILEVIEW_COLUMN_SIZE ) ), 80, nBits ); mpHeaderBar->InsertItem( COLUMN_DATE, String( SvtResId( STR_SVT_FILEVIEW_COLUMN_DATE ) ), 500, nBits ); } + if( ( nFlags & FILEVIEW_SHOW_NONE ) == FILEVIEW_SHOW_NONE ) + bViewHeader = false; else mpHeaderBar->InsertItem( COLUMN_TITLE, String( SvtResId( STR_SVT_FILEVIEW_COLUMN_TITLE ) ), 600, nBits ); @@ -747,7 +752,8 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin, SetEntryHeight( ROW_HEIGHT ); Show(); - mpHeaderBar->Show(); + if( bViewHeader ) + mpHeaderBar->Show(); maResetQuickSearch.SetTimeout( QUICK_SEARCH_TIMEOUT ); maResetQuickSearch.SetTimeoutHdl( LINK( this, ViewTabListBox_Impl, ResetQuickSearch_Impl ) ); @@ -1219,6 +1225,7 @@ SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, mpImp = new SvtFileView_Impl( this, xCmdEnv, nFlags, bOnlyFolder ); mpImp->mpView->ForbidEmptyText(); + SetSortColumn( true ); long pTabs[] = { 5, 20, 180, 320, 400, 600 }; mpImp->mpView->SetTabs( &pTabs[0], MAP_PIXEL ); @@ -1241,6 +1248,7 @@ SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, sal_Int8 nFlags Reference < XCommandEnvironment > xCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); mpImp = new SvtFileView_Impl( this, xCmdEnv, nFlags, ( nFlags & FILEVIEW_ONLYFOLDER ) == FILEVIEW_ONLYFOLDER ); + SetSortColumn( true ); if ( ( nFlags & FILEVIEW_SHOW_ALL ) == FILEVIEW_SHOW_ALL ) { @@ -1254,7 +1262,8 @@ SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, sal_Int8 nFlags long pTabs[] = { 2, 20, 600 }; mpImp->mpView->SetTabs( &pTabs[0], MAP_PIXEL ); } - + if ( ( nFlags & FILEVIEW_SHOW_NONE ) == FILEVIEW_SHOW_NONE ) + SetSortColumn( false ); if ( ( nFlags & FILEVIEW_MULTISELECTION ) == FILEVIEW_MULTISELECTION ) mpImp->mpView->SetSelectionMode( MULTIPLE_SELECTION ); @@ -1512,7 +1521,8 @@ sal_Bool SvtFileView::Initialize( const Sequence< OUString >& aContents ) mpImp->Clear(); mpImp->CreateVector_Impl( aContents ); - mpImp->SortFolderContent_Impl(); + if( GetSortColumn() ) + mpImp->SortFolderContent_Impl(); mpImp->OpenFolder_Impl(); @@ -2416,9 +2426,11 @@ void SvtFileView_Impl::CreateVector_Impl( const Sequence < OUString > &rList ) pEntry->maDisplayText = aDisplayText; // detect the image - INetURLObject aObj( pEntry->maImageURL.getLength() ? pEntry->maImageURL : pEntry->maTargetURL ); - pEntry->maImage = SvFileInformationManager::GetImage( aObj, sal_False ); - + if( aValue != rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(aSeparatorStr) ) ) + { + INetURLObject aObj( pEntry->maImageURL.getLength() ? pEntry->maImageURL : pEntry->maTargetURL ); + pEntry->maImage = SvFileInformationManager::GetImage( aObj, sal_False ); + } maContent.push_back( pEntry ); } } diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index ea768918e460..19dcdb26dd87 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -100,6 +100,7 @@ using namespace ::com::sun::star::view; using namespace svtools; extern ::rtl::OUString CreateExactSizeText_Impl( sal_Int64 nSize ); // fileview.cxx +#define aSeparatorStr "----------------------------------" #define SPLITSET_ID 0 #define COLSET_ID 1 @@ -594,7 +595,7 @@ SvtFileViewWindow_Impl::SvtFileViewWindow_Impl( SvtTemplateWindow* pParent ) : Window( pParent, WB_DIALOGCONTROL | WB_TABSTOP | WB_BORDER | WB_3DLOOK ), rParent ( *pParent ), - aFileView ( this, SvtResId( CTRL_FILEVIEW ), FILEVIEW_SHOW_TITLE ), + aFileView ( this, SvtResId( CTRL_FILEVIEW ), FILEVIEW_SHOW_NONE ), bIsTemplateFolder ( sal_False ) { @@ -651,9 +652,14 @@ Sequence< ::rtl::OUString > SvtFileViewWindow_Impl::GetNewDocContents() const for ( i = 0; i < nCount; ++i ) { GetMenuEntry_Impl( aDynamicMenuEntries[i], aTitle, aURL, aTargetFrame, aImageURL ); - - if ( aURL == sSeparator || aURL == sSlotURL ) + if( aURL == sSlotURL ) continue; + if( aURL == sSeparator ) + { + String aSeparator( ASCII_STR( aSeparatorStr ) ); + ::rtl::OUString* pSeparator = new ::rtl::OUString( aSeparator ); + aNewDocs.push_back( pSeparator ); + } else { // title diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 0455df6b4b26..bc0ee75a845b 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -1838,6 +1838,7 @@ void TabBar::InsertPage( sal_uInt16 nPageId, const XubString& rText, } else { mpItemList->push_back( pItem ); } + mbSizeFormat = sal_True; // CurPageId gegebenenfalls setzen if ( !mnCurPageId ) diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx index b0625567d5d6..b60ae0676cc9 100644 --- a/svtools/source/filter.vcl/wmf/winmtf.cxx +++ b/svtools/source/filter.vcl/wmf/winmtf.cxx @@ -377,6 +377,19 @@ Point WinMtfOutput::ImplMap( const Point& rPt ) { switch( mnMapMode ) { + case MM_TEXT: + fX2 -= mnWinOrgX; + fY2 -= mnWinOrgY; + if( mnDevWidth != 1 || mnDevHeight != 1 ) { + fX2 *= 2540.0/mnUnitsPerInch; + fY2 *= 2540.0/mnUnitsPerInch; + } + fX2 += mnDevOrgX; + fY2 += mnDevOrgY; + fX2 *= (double)mnMillX * 100.0 / (double)mnPixX; + fY2 *= (double)mnMillY * 100.0 / (double)mnPixY; + + break; case MM_LOENGLISH : { fX2 -= mnWinOrgX; @@ -452,6 +465,15 @@ Size WinMtfOutput::ImplMap( const Size& rSz ) { switch( mnMapMode ) { + case MM_TEXT: + if( mnDevWidth != 1 && mnDevHeight != 1 ) { + fWidth *= 2540.0/mnUnitsPerInch; + fHeight*= 2540.0/mnUnitsPerInch; + } else { + fWidth *= (double)mnMillX * 100 / (double)mnPixX; + fHeight *= (double)mnMillY * 100 / (double)mnPixY; + } + break; case MM_LOENGLISH : { fWidth *= 25.40; @@ -894,6 +916,7 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) : mbComplexClip ( false ), mnGfxMode ( GM_COMPATIBLE ), mnMapMode ( MM_TEXT ), + mnUnitsPerInch ( 96 ), mnDevOrgX ( 0 ), mnDevOrgY ( 0 ), mnDevWidth ( 1 ), @@ -2014,6 +2037,14 @@ void WinMtfOutput::SetMapMode( sal_uInt32 nMapMode ) //----------------------------------------------------------------------------------- +void WinMtfOutput::SetUnitsPerInch( sal_uInt16 nUnitsPerInch ) +{ + if( nUnitsPerInch != 0 ) + mnUnitsPerInch = nUnitsPerInch; +} + +//----------------------------------------------------------------------------------- + void WinMtfOutput::SetWorldTransform( const XForm& rXForm ) { maXForm.eM11 = rXForm.eM11; diff --git a/svtools/source/filter.vcl/wmf/winmtf.hxx b/svtools/source/filter.vcl/wmf/winmtf.hxx index bd2293fe108b..d0b4e42cbed4 100644 --- a/svtools/source/filter.vcl/wmf/winmtf.hxx +++ b/svtools/source/filter.vcl/wmf/winmtf.hxx @@ -581,6 +581,8 @@ class WinMtfOutput sal_uInt32 mnGfxMode; sal_uInt32 mnMapMode; + sal_uInt16 mnUnitsPerInch; + XForm maXForm; sal_Int32 mnDevOrgX, mnDevOrgY; sal_Int32 mnDevWidth, mnDevHeight; @@ -627,6 +629,7 @@ class WinMtfOutput sal_uInt32 GetMapMode() const { return mnMapMode; }; void SetMapMode( sal_uInt32 mnMapMode ); + void SetUnitsPerInch( sal_uInt16 nUnitsPerInch ); void SetWorldTransform( const XForm& rXForm ); void ModifyWorldTransform( const XForm& rXForm, sal_uInt32 nMode ); diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter.vcl/wmf/winwmf.cxx index c7d33a824adf..095b1c45eb68 100644 --- a/svtools/source/filter.vcl/wmf/winwmf.cxx +++ b/svtools/source/filter.vcl/wmf/winwmf.cxx @@ -1036,6 +1036,7 @@ sal_Bool WMFReader::ReadHeader() pWMF->Seek( nStrmPos ); } + pOut->SetUnitsPerInch( nUnitsPerInch ); pOut->SetWinOrg( aPlaceableBound.TopLeft() ); aWMFSize = Size( labs( aPlaceableBound.GetWidth() ), labs( aPlaceableBound.GetHeight() ) ); pOut->SetWinExt( aWMFSize ); |