[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source
svtools/source/contnr/templwin.src | 214 ++--- 1 file changed, 82 insertions(+), 132 deletions(-) New commits: commit 7f07a87405d16ccf55b6e573a7ad328326f20a4b Author: Matthias Seidel AuthorDate: Mon Jan 21 16:46:23 2019 + Commit: Matthias Seidel CommitDate: Mon Jan 21 16:46:23 2019 + Cleaned up resource file for template window. Removed entries for MASKCOLOR diff --git a/svtools/source/contnr/templwin.src b/svtools/source/contnr/templwin.src index 1d5e16585d62..ee6a6f3060fb 100644 --- a/svtools/source/contnr/templwin.src +++ b/svtools/source/contnr/templwin.src @@ -21,94 +21,83 @@ - // includes -- +// includes -- #include "templwin.hrc" #include #include #include -// Magenta and Grey as mask colors -#define MASK_COL_MAGENTAColor { Red = 0x ; Green = 0x ; Blue = 0x ; }; - Control CTRL_FILEVIEW { -Pos = MAP_APPFONT ( 0 , 0 ) ; -Size = MAP_APPFONT ( 200 , 180 ) ; +Pos = MAP_APPFONT ( 0, 0 ) ; +Size = MAP_APPFONT ( 200, 180 ) ; }; String STR_SVT_NEWDOC { -Text [ en-US ] = "New Document"; +Text [ en-US ] = "New Document" ; }; Image IMG_SVT_NEWDOC { -ImageBitmap = Bitmap { File = "new_doc.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "new_doc.png" ; } ; }; Image IMG_SVT_NEWDOC_HC { -ImageBitmap = Bitmap { File = "new_doc_h.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "new_doc_h.png" ; } ; }; String STR_SVT_MYDOCS { -Text [ en-US ] = "My Documents"; +Text [ en-US ] = "My Documents" ; }; Image IMG_SVT_MYDOCS { -ImageBitmap = Bitmap { File = "my_docs.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "my_docs.png" ; } ; }; Image IMG_SVT_MYDOCS_HC { -ImageBitmap = Bitmap { File = "my_docs_h.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "my_docs_h.png" ; } ; }; String STR_SVT_TEMPLATES { -Text [ en-US ] = "Templates"; +Text [ en-US ] = "Templates" ; }; Image IMG_SVT_TEMPLATES { -ImageBitmap = Bitmap { File = "template.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "template.png" ; } ; }; Image IMG_SVT_TEMPLATES_HC { -ImageBitmap = Bitmap { File = "template_h.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "template_h.png" ; } ; }; String STR_SVT_SAMPLES { -Text [ en-US ] = "Samples"; +Text [ en-US ] = "Samples" ; }; Image IMG_SVT_SAMPLES { -ImageBitmap = Bitmap { File = "samples.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "samples.png" ; } ; }; Image IMG_SVT_SAMPLES_HC { -ImageBitmap = Bitmap { File = "samples_h.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "samples_h.png" ; } ; }; ToolBox TB_SVT_FILEVIEW { -Pos = MAP_APPFONT ( 0 , 0 ) ; -Size = MAP_APPFONT ( 100 , 12 ) ; +Pos = MAP_APPFONT ( 0, 0 ) ; +Size = MAP_APPFONT ( 100, 12 ) ; ItemList = { ToolBoxItem @@ -138,83 +127,71 @@ ToolBox TB_SVT_FILEVIEW Image IMG_SVT_DOCTEMPLATE_BACK_SMALL { -ImageBitmap = Bitmap { File = "back_small.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "back_small.png" ; } ; }; Image IMG_SVT_DOCTEMPLATE_BACK_LARGE { -ImageBitmap = Bitmap { File = "back_large.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "back_large.png" ; } ; }; Image IMG_SVT_DOCTEMPLATE_PREV_SMALL { -ImageBitmap = Bitmap { File = "up_small.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "up_small.png" ; } ; }; Image IMG_SVT_DOCTEMPLATE_PREV_LARGE { -ImageBitmap = Bitmap { File = "up_large.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "up_large.png" ; } ; }; Image IMG_SVT_DOCTEMPLATE_PRINT_SMALL { -ImageBitmap = Bitmap { File = "sc05509.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "sc05509.png" ; } ; }; Image IMG_SVT_DOCTEMPLATE_PRINT_LARGE { -ImageBitmap = Bitmap { File = "lc05509.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "lc05509.png" ; } ; }; Image IMG_SVT_DOCTEMPL_HC_BACK_SMALL { -ImageBitmap = Bitmap { File = "back_small_h.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "back_small_h.png" ; } ; }; Image IMG_SVT_DOCTEMPL_HC_BACK_LARGE { -ImageBitmap = Bitmap { File = "back_large_h.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +ImageBitmap = Bitmap { File = "back_large_h.png" ; } ; }; Image IMG_SVT_DOCTEMPL_HC_PREV_SMALL { -ImageBitmap = Bitmap { File = "up_small_h.bmp" ; }; -MaskColor = MASK_COL_MAGENTA +
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source
svtools/source/contnr/templwin.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 419130311a95ac43ef87be09f86dfdad003230f5 Author: Matthias SeidelDate: Thu Apr 5 17:01:38 2018 + Changed link to templates (online) to avoid redirection diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index e9b066e251fa..a80ae87d23e0 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -1734,7 +1734,7 @@ void SvtDocumentTemplateDialog::InitImpl( ) if ( !bHideLink ) { aMoreTemplatesLink.SetURL( String( -RTL_CONSTASCII_STRINGPARAM( "http://templates.services.openoffice.org/?cid=923508; ) ) ); +RTL_CONSTASCII_STRINGPARAM( "https://templates.openoffice.org/?cid=923508; ) ) ); aMoreTemplatesLink.SetClickHdl( LINK( this, SvtDocumentTemplateDialog, OpenLinkHdl_Impl ) ); } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source
svtools/source/filter/exportdialog.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 48cf17d5fac7e77aa82caa454cd0f26cd10faaa0 Author: Damjan JovanovicDate: Sun Jun 5 12:51:04 2016 + #i124867#: jpg options shows initially wrong estimated file size File main/svtools/source/filter/exportdialog.cxx ExportDialog::GetGraphicStream() creates the compressed file from which the file size is obtained, calling GetFilterData() to obtain the properties used to save it. GetFilterData() returns image properties, like JPEG colormode and quality, PNG compression/interlacing/translucence, BMP color and RLE coding, etc. In the case of JPEG, the quality is read from maSbCompression.GetThumbPos(). The problem is that in ExportDialog::updateControls(), maSbCompression.SetThumbPos() is called AFTER GetGraphicStream(), meaning the stream is created with the old thumb position. This patches it to call GetGraphicStream() later, immediately before using that stream, so that its properties such as compression are updated first and the size is calculated correctly. Reported by: myspaces at hotmail dot fr Patch by: me diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index 2acf276..61c7e04 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -1313,8 +1313,6 @@ void ExportDialog::updatePreview() void ExportDialog::updateControls() { -GetGraphicStream(); - // Size Controls if ( !mbIsPixelFormat ) { @@ -1364,6 +1362,8 @@ void ExportDialog::updateControls() if ( maSbCompression.IsVisible() ) maSbCompression.SetThumbPos( maNfCompression.GetValue() ); +GetGraphicStream(); + // updating estimated size sal_Int64 nRealFileSize( mpTempStream->Tell() ); if ( mbIsPixelFormat ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source
svtools/source/contnr/fileview.src |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b923454a0922b6767b28c8dc131534b8daf6d96b Author: Ariel Constenla-Haile arie...@apache.org Date: Sun Apr 5 15:28:38 2015 + i81637 - Replace column header Title by Name Patch by: Driss Ben Zoubeir driss.zoub...@gmail.com Review by: arie...@apache.org diff --git a/svtools/source/contnr/fileview.src b/svtools/source/contnr/fileview.src index b4f4f19..506a9b7 100644 --- a/svtools/source/contnr/fileview.src +++ b/svtools/source/contnr/fileview.src @@ -31,7 +31,7 @@ String STR_SVT_FILEVIEW_COLUMN_TITLE { -Text [ en-US ] = Title; +Text [ en-US ] = Name; }; String STR_SVT_FILEVIEW_COLUMN_SIZE ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source
svtools/source/graphic/grfmgr2.cxx | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) New commits: commit ca436d4da64e6a06832c324ccf5c0236a9ec90d7 Author: Armin Le Grand a...@apache.org Date: Mon Sep 1 10:32:51 2014 + i125519 check GraphicObject existance before accessing it diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 5cac068..bc09415 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -358,8 +358,33 @@ void GraphicManager::ImplCheckSizeOfSwappedInGraphics() // do not swap out when we have less than 16KB data objects if(nSizeBytes = (16 * 1024)) { -pObj-FireSwapOutRequest(); -nUsedSize = (nSizeBytes nUsedSize) ? nUsedSize - nSizeBytes : 0; +// #125519# need to check if GraphicObject is still alive +GraphicObject* pObj2 = 0; +bool bExists(false); + +for(pObj2 = (GraphicObject*)maObjList.First(); !bExists pObj2; pObj2 = (GraphicObject*)maObjList.Next()) +{ +if(pObj2 pObj2 == pObj) +{ +bExists = true; +} +} + +if(bExists) +{ +// #125519# okay, swap it out +pObj-FireSwapOutRequest(); +nUsedSize = (nSizeBytes nUsedSize) ? nUsedSize - nSizeBytes : 0; +} +else +{ +// #125519# error: object was deleted while still a member in aCandidates. This means that +// an earlier call to pObj-FireSwapOutRequest() on an other GraphicObject has as +// a side effect *deleted* and thus removed another GraphicObject from the local +// list (maObjList). This must of course be avoided. +// To check without need to run in debugger, optionally temporarily reactivate the beep below +// Sound::Beep(); +} } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source
svtools/source/graphic/grfmgr2.cxx | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) New commits: commit a48414a396f7de4e00510e82e3744c097ce3d5d6 Author: Armin Le Grand a...@apache.org Date: Thu Jun 19 20:12:25 2014 + corrected place for stl sort function for linux diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index c8532bb..5cac068 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -295,6 +295,17 @@ ByteString GraphicManager::ImplGetUniqueID( const GraphicObject rObj ) const // - +namespace +{ +struct simpleSortByDataChangeTimeStamp +{ +bool operator() (GraphicObject* p1, GraphicObject* p2) const +{ +return p1-GetDataChangeTimeStamp() p2-GetDataChangeTimeStamp(); +} +}; +} // end of anonymous namespace + void GraphicManager::ImplCheckSizeOfSwappedInGraphics() { // only necessary for 32bit systems @@ -334,14 +345,6 @@ void GraphicManager::ImplCheckSizeOfSwappedInGraphics() if(nUsedSize = nMaxCacheSize !aCandidates.empty()) { // if we use more currently, sort by last DataChangeTimeStamp -struct simpleSortByDataChangeTimeStamp -{ -bool operator() (GraphicObject* p1, GraphicObject* p2) const -{ -return p1-GetDataChangeTimeStamp() p2-GetDataChangeTimeStamp(); -} -}; - // sort by DataChangeTimeStamp so that the oldest get removed first ::std::sort(aCandidates.begin(), aCandidates.end(), simpleSortByDataChangeTimeStamp()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source
svtools/source/control/roadmap.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 54f27df803da7f9b0d7de9dc027dc89bc20ad560 Author: Ariel Constenla-Haile arie...@apache.org Date: Mon Mar 31 19:41:22 2014 + i124570 - Prevent a null pointer dereference diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 5178b69..ad4c75a 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -766,7 +766,8 @@ namespace svt SetFont( aFont ); RoadmapTypes::ItemId curItemID = GetCurrentRoadmapItemID(); RoadmapItem* pLabelItem = GetByID( curItemID ); - pLabelItem-ToggleBackgroundColor(rStyleSettings.GetHighlightColor()); +if ( pLabelItem != NULL ) + pLabelItem-ToggleBackgroundColor(rStyleSettings.GetHighlightColor()); Invalidate(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source
svtools/source/edit/textview.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 2f28d991921468e745d16996bb0c6e84258c9c20 Author: Tsutomu Uchino ha...@apache.org Date: Sat Jan 11 09:17:58 2014 + #i106665# fix failed to replace with empty string on text view diff --git a/svtools/source/edit/textview.cxx b/svtools/source/edit/textview.cxx index fc9dae9..4558663 100644 --- a/svtools/source/edit/textview.cxx +++ b/svtools/source/edit/textview.cxx @@ -1378,7 +1378,7 @@ void TextView::InsertNewText( const rtl::OUString rStr, sal_Bool bSelect ) */ sal_Int32 nLen = rStr.getLength(); sal_Int32 nPos = 0; -while( nLen ) +do { sal_Int32 nChunkLen = nLen 65534 ? 65534 : nLen; String aChunk( rStr.copy( nPos, nChunkLen ) ); @@ -1400,7 +1400,7 @@ void TextView::InsertNewText( const rtl::OUString rStr, sal_Bool bSelect ) ImpSetSelection( aNewSel ); nLen -= nChunkLen; nPos += nChunkLen; -} +} while( nLen ); mpImpl-mpTextEngine-UndoActionEnd(); mpImpl-mpTextEngine-FormatAndUpdate( this ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source
svtools/source/graphic/grfmgr.cxx | 63 -- 1 file changed, 40 insertions(+), 23 deletions(-) New commits: commit 2104f864ec0cf0989e962c045ee69010e3505f3e Author: Armin Le Grand a...@apache.org Date: Mon Oct 14 15:01:00 2013 + i123438 Corrected crop for clipboard mitmap data preparations diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 425fe8b..59dc21b 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -946,23 +946,25 @@ Graphic GraphicObject::GetTransformedGraphic( const Size rDestSize, const MapMo if( aMapGraph == MAP_PIXEL ) { -aCropLeftTop = Application::GetDefaultDevice()-LogicToPixel( Size( rAttr.GetLeftCrop(), - rAttr.GetTopCrop() ), - aMap100 ); -aCropRightBottom = Application::GetDefaultDevice()-LogicToPixel( Size( rAttr.GetRightCrop(), - rAttr.GetBottomCrop() ), - aMap100 ); +// crops are in 1/100th mm - to aMapGraph - to MAP_PIXEL +aCropLeftTop = Application::GetDefaultDevice()-LogicToPixel( +Size(rAttr.GetLeftCrop(), rAttr.GetTopCrop()), +aMap100); +aCropRightBottom = Application::GetDefaultDevice()-LogicToPixel( +Size(rAttr.GetRightCrop(), rAttr.GetBottomCrop()), +aMap100); } else { -aCropLeftTop = OutputDevice::LogicToLogic( Size( rAttr.GetLeftCrop(), - rAttr.GetTopCrop() ), - aMap100, - aMapGraph ); -aCropRightBottom = OutputDevice::LogicToLogic( Size( rAttr.GetRightCrop(), - rAttr.GetBottomCrop() ), - aMap100, - aMapGraph ); +// crops are in GraphicObject units - to aMapGraph +aCropLeftTop = OutputDevice::LogicToLogic( +Size(rAttr.GetLeftCrop(), rAttr.GetTopCrop()), +aMap100, +aMapGraph); +aCropRightBottom = OutputDevice::LogicToLogic( +Size(rAttr.GetRightCrop(), rAttr.GetBottomCrop()), +aMap100, +aMapGraph); } // #104115# If the metafile is cropped, give it a special @@ -1012,15 +1014,29 @@ Graphic GraphicObject::GetTransformedGraphic( const Size rDestSize, const MapMo BitmapEx aBitmapEx( aTransGraphic.GetBitmapEx() ); Rectangle aCropRect; -// convert crops to pixel (crops are always in GraphicObject units) +// convert crops to pixel if(rAttr.IsCropped()) { -aCropLeftTop = Application::GetDefaultDevice()-LogicToPixel( -Size(rAttr.GetLeftCrop(), rAttr.GetTopCrop()), -aMapGraph); -aCropRightBottom = Application::GetDefaultDevice()-LogicToPixel( -Size(rAttr.GetRightCrop(), rAttr.GetBottomCrop()), -aMapGraph); +if( aMapGraph == MAP_PIXEL ) +{ +// crops are in 1/100th mm - to MAP_PIXEL +aCropLeftTop = Application::GetDefaultDevice()-LogicToPixel( +Size(rAttr.GetLeftCrop(), rAttr.GetTopCrop()), +aMap100); +aCropRightBottom = Application::GetDefaultDevice()-LogicToPixel( +Size(rAttr.GetRightCrop(), rAttr.GetBottomCrop()), +aMap100); +} +else +{ +// crops are in GraphicObject units - to MAP_PIXEL +aCropLeftTop = Application::GetDefaultDevice()-LogicToPixel( +Size(rAttr.GetLeftCrop(), rAttr.GetTopCrop()), +aMapGraph); +aCropRightBottom = Application::GetDefaultDevice()-LogicToPixel( +Size(rAttr.GetRightCrop(), rAttr.GetBottomCrop()), +aMapGraph); +} // convert from prefmapmode to pixel Size aSrcSizePixel( @@ -1040,8 +1056,9 @@ Graphic GraphicObject::GetTransformedGraphic( const Size rDestSize, const MapMo // another possibility is to adapt the values created so far with a factor; this // will keep the original Bitmap untouched and thus quality will not change -const double fFactorX(aBitmapEx.GetSizePixel().Width() /
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source
svtools/source/filter/wmf/enhwmf.cxx | 20 svtools/source/filter/wmf/winmtf.cxx | 13 + svtools/source/filter/wmf/winmtf.hxx |1 + svtools/source/filter/wmf/wmf.cxx|7 +++ 4 files changed, 29 insertions(+), 12 deletions(-) New commits: commit d0ebb70c004761552016b0fa0a259ef35a01f840 Author: Armin Le Grand a...@apache.org Date: Tue Sep 10 11:48:33 2013 + i123216 No FontScaling by WorldTransform on WMF import diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx index dc6472f..e03137a 100644 --- a/svtools/source/filter/wmf/enhwmf.cxx +++ b/svtools/source/filter/wmf/enhwmf.cxx @@ -1023,14 +1023,18 @@ sal_Bool EnhWMFReader::ReadEnhWMF() } aLogFont.alfFaceName = UniString( lfFaceName ); -// #121382# Need to apply WorldTransform to FontHeight/Width; this should be completely -// chnaged to basegfx::B2DHomMatrix instead of 'struct XForm', but not now due to time -// constraints and dangers -const XForm rXF = pOut-GetWorldTransform(); -const basegfx::B2DHomMatrix aWT(rXF.eM11, rXF.eM21, rXF.eDx, rXF.eM12, rXF.eM22, rXF.eDy); -const basegfx::B2DVector aTransVec(aWT * basegfx::B2DVector(aLogFont.lfWidth, aLogFont.lfHeight)); -aLogFont.lfWidth = aTransVec.getX(); -aLogFont.lfHeight = aTransVec.getY(); +// #123216# Not used in the test case of #121382# (always identity in XForm), also +// no hints in ms docu if FontSize should be scaled with WT. Using with the example +// from #123216# creates errors, so removing. +// +// // #121382# Need to apply WorldTransform to FontHeight/Width; this should be completely +// // chnaged to basegfx::B2DHomMatrix instead of 'struct XForm', but not now due to time +// // constraints and dangers +// const XForm rXF = pOut-GetWorldTransform(); +// const basegfx::B2DHomMatrix aWT(rXF.eM11, rXF.eM21, rXF.eDx, rXF.eM12, rXF.eM22, rXF.eDy); +// const basegfx::B2DVector aTransVec(aWT * basegfx::B2DVector(aLogFont.lfWidth, aLogFont.lfHeight)); +// aLogFont.lfWidth = aTransVec.getX(); +// aLogFont.lfHeight = aTransVec.getY(); pOut-CreateObject( nIndex, GDI_FONT, new WinMtfFontStyle( aLogFont ) ); } diff --git a/svtools/source/filter/wmf/winmtf.cxx b/svtools/source/filter/wmf/winmtf.cxx index 5be172e..bdfaf85 100644 --- a/svtools/source/filter/wmf/winmtf.cxx +++ b/svtools/source/filter/wmf/winmtf.cxx @@ -2055,10 +2055,10 @@ void WinMtfOutput::ModifyWorldTransform( const XForm rXForm, sal_uInt32 nMode ) { case MWT_IDENTITY : { -maXForm.eM11 = maXForm.eM12 = maXForm.eM21 = maXForm.eM22 = 1.0f; -maXForm.eDx = maXForm.eDy = 0.0f; +maXForm.eM11 = maXForm.eM22 = 1.0f; +maXForm.eM12 = maXForm.eM21 = maXForm.eDx = maXForm.eDy = 0.0f; +break; } -break; case MWT_RIGHTMULTIPLY : case MWT_LEFTMULTIPLY : @@ -2117,8 +2117,13 @@ void WinMtfOutput::ModifyWorldTransform( const XForm rXForm, sal_uInt32 nMode ) maXForm.eM22 = cF[1][1]; maXForm.eDx = cF[2][0]; maXForm.eDy = cF[2][1]; +break; +} +case MWT_SET: +{ +SetWorldTransform(rXForm); +break; } -break; } } diff --git a/svtools/source/filter/wmf/winmtf.hxx b/svtools/source/filter/wmf/winmtf.hxx index d850aef..499244a 100644 --- a/svtools/source/filter/wmf/winmtf.hxx +++ b/svtools/source/filter/wmf/winmtf.hxx @@ -68,6 +68,7 @@ #define MWT_IDENTITY1 #define MWT_LEFTMULTIPLY2 #define MWT_RIGHTMULTIPLY 3 +#define MWT_SET 4 #define ENHMETA_STOCK_OBJECT0x8000 diff --git a/svtools/source/filter/wmf/wmf.cxx b/svtools/source/filter/wmf/wmf.cxx index a5906dc..1a16173 100644 --- a/svtools/source/filter/wmf/wmf.cxx +++ b/svtools/source/filter/wmf/wmf.cxx @@ -50,6 +50,13 @@ sal_Bool ConvertWMFToGDIMetaFile( SvStream rStreamWMF, GDIMetaFile rGDIMetaF { WMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadWMF(); } + +#ifdef DBG_UTIL +// #123216# allow a look at CheckSum and ByteSize for debugging +const sal_uLong aC(rGDIMetaFile.GetChecksum()); +const sal_uLong aB(rGDIMetaFile.GetSizeBytes()); +#endif + rStreamWMF.SetNumberFormatInt( nOrigNumberFormat ); return !rStreamWMF.GetError(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source svx/inc svx/source vcl/source
svtools/source/filter/jpeg/jpeg.cxx | 36 - svx/inc/svx/svdundo.hxx |8 - svx/source/svdraw/svdograf.cxx | 40 + svx/source/svdraw/svdundo.cxx | 41 +- vcl/source/gdi/pngread.cxx | 241 +--- 5 files changed, 308 insertions(+), 58 deletions(-) New commits: commit f18ad6132d79540431bf04f090a7472e21a23e49 Author: Armin Le Grand a...@apache.org Date: Thu Sep 5 13:01:45 2013 + i122985 Various speedups for graphic object swapping to enhance user experience diff --git a/svtools/source/filter/jpeg/jpeg.cxx b/svtools/source/filter/jpeg/jpeg.cxx index d544e064..62b9f7a 100644 --- a/svtools/source/filter/jpeg/jpeg.cxx +++ b/svtools/source/filter/jpeg/jpeg.cxx @@ -474,14 +474,38 @@ void JPEGReader::FillBitmap() for( long nY = 0L; nY nHeight; nY++ ) { -pTmp = (sal_uInt8*) pBuffer + nY * nAlignedWidth; +// #122985# Added fast-lane implementations using CopyScanline with direct supported mem formats +static bool bCheckOwnReader(true); -for( long nX = 0L; nX nWidth; nX++ ) +if(bCheckOwnReader) +{ +// #122985# Trying to copy the RGB data from jpeg import to make things faster. Unfortunately +// it has no GBR format, so RGB three-byte groups need to be 'flipped' to GBR first, +// then CopyScanline can use a memcpy to do the data transport. CopyScanline can also +// do the needed conversion from BMP_FORMAT_24BIT_TC_RGB (and it works well), but this +// is not faster that the old loop below using SetPixel. +sal_uInt8* aSource((sal_uInt8*)pBuffer + nY * nAlignedWidth); +sal_uInt8* aEnd(aSource + (nWidth * 3)); + +for(sal_uInt8* aTmp(aSource); aTmp aEnd; aTmp += 3) +{ +::std::swap(*aTmp, *(aTmp + 2)); +} + +pAcc-CopyScanline(nY, aSource, BMP_FORMAT_24BIT_TC_BGR, nWidth * 3); +} +else { -aColor.SetRed( *pTmp++ ); -aColor.SetGreen( *pTmp++ ); -aColor.SetBlue( *pTmp++ ); -pAcc-SetPixel( nY, nX, aColor ); +// old version: WritePixel +pTmp = (sal_uInt8*) pBuffer + nY * nAlignedWidth; + +for( long nX = 0L; nX nWidth; nX++ ) +{ +aColor.SetRed( *pTmp++ ); +aColor.SetGreen( *pTmp++ ); +aColor.SetBlue( *pTmp++ ); +pAcc-SetPixel( nY, nX, aColor ); +} } } } diff --git a/svx/inc/svx/svdundo.hxx b/svx/inc/svx/svdundo.hxx index c804456..cc6ddc3 100644 --- a/svx/inc/svx/svdundo.hxx +++ b/svx/inc/svx/svdundo.hxx @@ -335,10 +335,12 @@ public: class SVX_DLLPUBLIC SdrUndoDelObj : public SdrUndoRemoveObj { +private: +void TryToFlushGraphicContent(); + public: -SdrUndoDelObj(SdrObject rNewObj, FASTBOOL bOrdNumDirect=sal_False) -: SdrUndoRemoveObj(rNewObj,bOrdNumDirect) { SetOwner(sal_True); } -virtual ~SdrUndoDelObj() {} +SdrUndoDelObj(SdrObject rNewObj, FASTBOOL bOrdNumDirect=sal_False); +virtual ~SdrUndoDelObj(); virtual void Undo(); virtual void Redo(); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 2328272..81daa7a 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -69,6 +69,7 @@ #include vos/mutex.hxx #include drawinglayer/processor2d/objectinfoextractor2d.hxx #include drawinglayer/primitive2d/objectinfoprimitive2d.hxx +#include unotools/cacheoptions.hxx using namespace ::com::sun::star::uno; using namespace ::com::sun::star::io; @@ -80,6 +81,37 @@ using namespace ::com::sun::star::io; #define GRAFSTREAMPOS_INVALID 0x #define SWAPGRAPHIC_TIMEOUT 5000 +// #122985# it is not correct to se the swap-timeout to a hard-coded 5000ms as it was before. +// Added code and experimented what to do as a good compromize, see description +sal_uInt32 getCacheTimeInMs() +{ +static bool bSetAtAll(true); + +if(bSetAtAll) +{ +static bool bSetToPreferenceTime(true); + +if(bSetToPreferenceTime) +{ +const SvtCacheOptions aCacheOptions; +const sal_Int32 nSeconds(aCacheOptions.GetGraphicManagerObjectReleaseTime()); + +// the default is 10 minutes. The minimum is one minute, thus 60 seconds. When the minimum +// should match to the former hard-coded 5 seconds, we have a divisor of 12 to use. For the +// default of 10 minutes this would mean 50 seconds. Compared to before this is ten times +//
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source
svtools/source/misc/transfer.cxx |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) New commits: commit a77275c610f1543dcc8b38dc5ec50f1195965f27 Author: Armin Le Grand a...@apache.org Date: Fri Aug 30 13:27:36 2013 + i122982 Fallback to bitmap reader when no PNG even when claimed diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 62cab33..0dae8ae 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -1808,6 +1808,7 @@ sal_Bool TransferableDataHelper::GetBitmapEx( const DataFlavor rFlavor, BitmapE SotStorageStreamRef xStm; DataFlavor aSubstFlavor; bool bRet(GetSotStorageStream(rFlavor, xStm)); +bool bSuppressPNG(false); // #122982# If PNG stream not accessed, but BMP one, suppress trying to load PNG if(!bRet HasFormat(SOT_FORMATSTR_ID_PNG) SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aSubstFlavor)) { @@ -1819,18 +1820,20 @@ sal_Bool TransferableDataHelper::GetBitmapEx( const DataFlavor rFlavor, BitmapE { // when no direct success, try if BMP is available bRet = GetSotStorageStream(aSubstFlavor, xStm); +bSuppressPNG = bRet; } if(bRet) { - if(rFlavor.MimeType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii(image/png))) +if(!bSuppressPNG rFlavor.MimeType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii(image/png))) { // it's a PNG, import to BitmapEx ::vcl::PNGReader aPNGReader(*xStm); rBmpEx = aPNGReader.Read(); } -else + +if(rBmpEx.IsEmpty()) { Bitmap aBitmap; Bitmap aMask; @@ -1848,7 +1851,7 @@ sal_Bool TransferableDataHelper::GetBitmapEx( const DataFlavor rFlavor, BitmapE } } -bRet = (ERRCODE_NONE == xStm-GetError()); +bRet = (ERRCODE_NONE == xStm-GetError() !rBmpEx.IsEmpty()); /* SJ: #110748# At the moment we are having problems with DDB inserted as DIB. The problem is, that some graphics are inserted much too big because the nXPelsPerMeter ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svtools/source
svtools/source/misc/transfer.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 65dd87d8f010a9c9d1b277f9b1839378b549d06f Author: Armin Le Grand a...@apache.org Date: Wed May 29 16:15:37 2013 + i122388 Corrected old fix to mentioned bounds diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 0742701..62cab33 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -1867,9 +1867,15 @@ sal_Bool TransferableDataHelper::GetBitmapEx( const DataFlavor rFlavor, BitmapE { const Size aSize(OutputDevice::LogicToLogic(rBmpEx.GetPrefSize(), aMapMode, MAP_100TH_MM)); -if((aSize.Width() 5000) || (aSize.Height() 5000)) +// #122388# This wrongly corrects in the given case; changing from 5000 100th mm to +// the described 50 cm (which is 5 100th mm) +if((aSize.Width() 5) || (aSize.Height() 5)) { rBmpEx.SetPrefMapMode(MAP_PIXEL); + +// #122388# also adapt size by applying the mew MapMode +const Size aNewSize(OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, MAP_PIXEL)); +rBmpEx.SetPrefSize(aNewSize); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits