oox/source/export/shapes.cxx | 3 - sc/source/core/tool/compiler.cxx | 2 sc/source/core/tool/token.cxx | 20 +++++++++ sc/source/filter/oox/stylesbuffer.cxx | 9 ++-- sc/source/ui/src/scfuncs.src | 2 sd/qa/unit/data/tdf92001.odp |binary sd/qa/unit/data/xml/tdf92001_0.xml | 44 +++++++++++++++++++++ sd/qa/unit/import-tests.cxx | 1 svtools/uiconfig/ui/graphicexport.ui | 64 ++----------------------------- vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 28 +++++++++++-- 10 files changed, 102 insertions(+), 71 deletions(-)
New commits: commit 1930fe1942808c9293c061e516422993e6fd27fd Author: Eike Rathke <[email protected]> Date: Fri Jun 12 18:28:26 2015 +0200 do not adjust RPN named expressions relative references, tdf#91842 follow-up Change-Id: I5a991d3b86fec0a3800d8243f73eb764789c8c69 (cherry picked from commit 15f18d1bb6e76ea934a461031b2784564f9d00c1) diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index a30112e..7a0dd0a 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -138,7 +138,25 @@ namespace // Handle all tokens in RPN, and code tokens only if they have a // reference count of 1, which means they are not referenced in // RPN. - return i == 0 && (*pp)->GetRef() > 1; + if (i == 0) + return (*pp)->GetRef() > 1; + + // Skip (do not adjust) relative references resulting from named + // expressions. + switch ((*pp)->GetType()) + { + case svSingleRef: + return (*pp)->GetSingleRef()->IsRelName(); + case svDoubleRef: + { + const ScComplexRefData& rRef = *(*pp)->GetDoubleRef(); + return rRef.Ref1.IsRelName() || rRef.Ref2.IsRelName(); + } + default: + ; // nothing + } + + return false; } }; commit 9be601f70dc824120b2944d421906d5ec9566b1d Author: Andras Timar <[email protected]> Date: Fri Jun 12 13:30:59 2015 +0200 tdf#92001 'Handles' contains array of PropertyValues Change-Id: I17ea45f2b1dd46a7f1c0f3ce8c680bef9ec533fa Reviewed-on: https://gerrit.libreoffice.org/16249 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> (cherry picked from commit 7dee641f675e7f472f5bec39cb92a1422fd1ffee) diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 735c569..425be8c 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -36,6 +36,7 @@ #include <com/sun/star/awt/FontWeight.hpp> #include <com/sun/star/awt/FontUnderline.hpp> #include <com/sun/star/awt/Gradient.hpp> +#include <com/sun/star/beans/PropertyValues.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <com/sun/star/beans/XPropertyState.hpp> @@ -402,7 +403,7 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape ) nAdjustmentValuesIndex = i; else if ( rProp.Name == "Handles" ) { - uno::Sequence<beans::PropertyValue> aHandles; + uno::Sequence<beans::PropertyValues> aHandles; rProp.Value >>= aHandles; if ( aHandles.getLength() ) bHasHandles = true; diff --git a/sd/qa/unit/data/tdf92001.odp b/sd/qa/unit/data/tdf92001.odp new file mode 100644 index 0000000..886826f Binary files /dev/null and b/sd/qa/unit/data/tdf92001.odp differ diff --git a/sd/qa/unit/data/xml/tdf92001_0.xml b/sd/qa/unit/data/xml/tdf92001_0.xml new file mode 100644 index 0000000..d6304e0 --- /dev/null +++ b/sd/qa/unit/data/xml/tdf92001_0.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<XShapes> + <XShape positionX="4826" positionY="4826" sizeX="19557" sizeY="12953" type="com.sun.star.drawing.CustomShape" name="CustomShape 1" fontHeight="18.000000" fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="TOP" textLeftDistance="250" textRightDistance="250" textUpperDistance="125" textLowerDistance="125" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName=""> + <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillGradient style="LINEAR" startColor="3465a4" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> + <FillBitmap width="32" height="32"/> + <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/> + <LineStart/> + <LineEnd/> + <Transformation> + <Line1 column1="19558.000000" column2="0.000000" column3="4826.000000"/> + <Line2 column1="0.000000" column2="12954.000000" column3="4826.000000"/> + <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> + </Transformation> + <CustomShapeGeometry> + <PropertyValue name="AdjustmentValues"> + <AdjustmentValues/> + </PropertyValue> + <PropertyValue name="Equations"> + <Equations/> + </PropertyValue> + <PropertyValue name="Handles"> + <Handles/> + </PropertyValue> + <PropertyValue name="MirroredX" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredY" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Path"> + <Path> + <PropertyValue name="Coordinates"> + <Coordinates/> + </PropertyValue> + <PropertyValue name="Segments"> + <Segments/> + </PropertyValue> + </Path> + </PropertyValue> + <PropertyValue name="Type" value="ooxml-non-primitive" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="ViewBox"> + <ViewBox x="0" y="0" width="7040880" height="4663440"/> + </PropertyValue> + </CustomShapeGeometry> + </XShape> +</XShapes> diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 440271e..a1b9703 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -193,6 +193,7 @@ void SdImportTest::testDocumentLayout() { "n902652.pptx", "xml/n902652_", PPTX, -1 }, { "tdf90403.pptx", "xml/tdf90403_", PPTX, -1 }, { "tdf90338.odp", "xml/tdf90338_", ODP, PPTX }, + { "tdf92001.odp", "xml/tdf92001_", ODP, PPTX }, // { "pptx/n828390.pptx", "pptx/xml/n828390_", PPTX, PPTX }, // Example }; commit 1b33e8f6c8bb6aea259b97e58bd8534d47919910 Author: Jan Holesovsky <[email protected]> Date: Fri Jun 12 15:36:03 2015 +0200 tdf#91301: Don't cache incomplete tabs. After introduction of the Idle processing, something has changed so that the underlying GetGdkWindow() does not update its size fast enough; even though the gtk_window_resize() is called before the Window::Erase() (that actually paints the background) etc. The consequence of the not-yet-updated gdkDrawable is that we cache something that has the correct background in the top left 200x200 pixels, but the rest is just copied from the screen. Let's for now just not cache when the GetGdkWindow() is smaller than what we actually paint; TODO find the root cause. Change-Id: Ib6092668eb4613899f665bb0f12fc1eb15484e13 diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 6eb6043..b0ca1c6 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -2914,11 +2914,31 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart, } END_CACHE_PIXMAP_RENDER( pixmapRect, pixmap, mask ) + // tdf#91301 workaround + // + // After introduction of the Idle processing, something has changed so + // that the underlying GetGdkWindow() does not update its size fast enough; + // even though the gtk_window_resize is called before the Window::Erase() + // (that actually paints the background) etc. + // + // The consequence of the not-yet-updated gdkDrawable is that we cache + // something that has the correct background in the top left 200x200 + // pixels, but the rest is just copied from the screen. + // + // Let's for now just not cache when the GetGdkWindow() is smaller than + // what we actually paint; TODO find the root cause. + gint width, height; + gdk_drawable_get_size(GetGdkWindow(), &width, &height); + bool bAllowCaching = (pixmapRect.Right() < width) && (pixmapRect.Bottom() < height); + // cache data - if( nType == CTRL_TAB_ITEM ) - aCacheItems.Fill( nType, nState, pixmapRect, pixmap, mask ); - else - aCachePage.Fill( nType, nState, pixmapRect, pixmap, mask ); + if (bAllowCaching) + { + if (nType == CTRL_TAB_ITEM) + aCacheItems.Fill(nType, nState, pixmapRect, pixmap, mask); + else + aCachePage.Fill(nType, nState, pixmapRect, pixmap, mask); + } return true; } commit b5b619e67e57af60d9ac0edbba7b5ca21c08dcd7 Author: Eike Rathke <[email protected]> Date: Fri Jun 12 14:39:43 2015 +0200 copypasta error, tdf#69552 follow-up Change-Id: I3388a75bb8aa23d8a8998671f25b5297352efca8 (cherry picked from commit 688995bbb296e875511403fcce9276183f2545b0) diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 31d41e8..5a74997 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2520,7 +2520,7 @@ bool ScCompiler::IsOpCode( const OUString& rName, bool bInArray ) // unassigned for import. eOp = ocCeil_Math; } - else if (eOp == ocCeil && mxSymbols->isOOXML()) + else if (eOp == ocFloor && mxSymbols->isOOXML()) { // Ensure that _xlfn.FLOOR.MATH maps to ocFloor_Math. ocFloor is // unassigned for import. commit 5158187bd76e45ac0b15754a099f034f6c78387f Author: Noel Grandin <[email protected]> Date: Fri Jun 12 14:37:34 2015 +0200 tdf#62095 fix O(n^2) algorithm in opening pathological file with tons of missing styles Change-Id: I93c41f1e461a6e148e9f4c1dd84a598ca0090b54 diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index 598ea49..bf63786 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -2758,7 +2758,7 @@ void CellStyleBuffer::finalizeImport() /* If a builtin style entry already exists, and we do not reserve all existing styles, we just stick with the last definition and ignore the preceding ones. */ - if( bReserveAll && (aCellStyles.count( aStyleName ) > 0) ) + if( bReserveAll && (aCellStyles.find( aStyleName ) != aCellStyles.end()) ) aConflictNameStyles.push_back( *aIt ); else aCellStyles[ aStyleName ] = *aIt; @@ -2773,7 +2773,7 @@ void CellStyleBuffer::finalizeImport() // #i1624# #i1768# ignore unnamed user styles if( aStyleName.getLength() > 0 ) { - if( aCellStyles.count( aStyleName ) > 0 ) + if( aCellStyles.find( aStyleName ) != aCellStyles.end() ) aConflictNameStyles.push_back( *aIt ); else aCellStyles[ aStyleName ] = *aIt; @@ -2781,17 +2781,18 @@ void CellStyleBuffer::finalizeImport() } // find unused names for all styles with conflicting names + // having the index counter outside the loop prevents performance problems with opening some pathological documents (tdf#62095) + sal_Int32 nIndex = 0; for( CellStyleVector::iterator aIt = aConflictNameStyles.begin(), aEnd = aConflictNameStyles.end(); aIt != aEnd; ++aIt ) { const CellStyleModel& rModel = (*aIt)->getModel(); OUString aStyleName = lclCreateStyleName( rModel ); OUString aUnusedName; - sal_Int32 nIndex = 0; do { aUnusedName = OUStringBuffer( aStyleName ).append( ' ' ).append( ++nIndex ).makeStringAndClear(); } - while( aCellStyles.count( aUnusedName ) > 0 ); + while( aCellStyles.find( aUnusedName ) != aCellStyles.end() ); aCellStyles[ aUnusedName ] = *aIt; } commit f3419973d4e0f3b5cd9fc729a3c026a789febca5 Author: Eike Rathke <[email protected]> Date: Fri Jun 12 14:20:27 2015 +0200 FLOOR.MATH has 3 parameters, show them in UI, tdf#69552 follow-up (cherry picked from commit 7750dfccbdafe0b487d4e3f52a672c57db1de24b) Change-Id: I04a3990b90bd84c680df56ab6a5dc9eca575e696 diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src index afe1047..8a8e4fc 100644 --- a/sc/source/ui/src/scfuncs.src +++ b/sc/source/ui/src/scfuncs.src @@ -4767,7 +4767,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS1 0; ID_FUNCTION_GRP_MATH; U2S( HID_FUNC_FLOOR_MATH ); - 2; 0; 1; 1; + 3; 0; 1; 1; 0; }; String 2 // Name of Parameter 1 commit e766c3b82d4300cc5e694908a48266afa3fff787 Author: Adolfo Jayme Barrientos <[email protected]> Date: Fri Jun 12 04:49:49 2015 -0500 graphicexport.ui: Remove incredibly unhelpful âhelpâ messages â1 is less quality, 100 is more quality.â You donât say?! These are things that any person can deduce by themselves by looking at the sliding bar. Letâs not assume users are idiots who need to be told obvious things, and in *two* mostly identical sentences. Change-Id: Id1de16b078712009a1fce4d21f7509f873d35bc0 (cherry picked from commit 543389a813879d16bde12d3edcaa802c994ec1be) diff --git a/svtools/uiconfig/ui/graphicexport.ui b/svtools/uiconfig/ui/graphicexport.ui index 3110d08..4a5a50e 100644 --- a/svtools/uiconfig/ui/graphicexport.ui +++ b/svtools/uiconfig/ui/graphicexport.ui @@ -151,15 +151,15 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="column_spacing">6</property> <child> <object class="GtkLabel" id="label5"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">1</property> <property name="label" translatable="yes">Width:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">widthmf-nospin</property> + <property name="xalign">1</property> </object> <packing> <property name="left_attach">0</property> @@ -170,10 +170,10 @@ <object class="GtkLabel" id="label6"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">1</property> <property name="label" translatable="yes">Height:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">heightmf-nospin</property> + <property name="xalign">1</property> </object> <packing> <property name="left_attach">0</property> @@ -184,10 +184,10 @@ <object class="GtkLabel" id="resolutionft"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">1</property> <property name="label" translatable="yes">Resolution:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">resolutionmf-nospin</property> + <property name="xalign">1</property> </object> <packing> <property name="left_attach">0</property> @@ -332,35 +332,8 @@ <object class="GtkGrid" id="grid2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="row_spacing">6</property> <property name="column_spacing">6</property> <child> - <object class="GtkLabel" id="label10"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">1 is minimum quality and smallest file size.</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - <property name="width">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label11"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">100 is maximum quality and biggest file size.</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> - <property name="width">2</property> - </packing> - </child> - <child> <object class="GtkSpinButton" id="compressionjpgnf-nospin"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -422,7 +395,6 @@ <object class="GtkGrid" id="grid9"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="row_spacing">6</property> <property name="column_spacing">6</property> <child> <object class="GtkSpinButton" id="compressionpngnf-nospin"> @@ -450,32 +422,6 @@ <property name="top_attach">0</property> </packing> </child> - <child> - <object class="GtkLabel" id="label22"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">0 is biggest file size and fastest loading.</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - <property name="width">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label23"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">9 is smallest file size and slowest loading.</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> - <property name="width">2</property> - </packing> - </child> </object> </child> </object> @@ -978,10 +924,10 @@ <object class="GtkLabel" id="estsizeft"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="xpad">3</property> <property name="wrap">True</property> <property name="max_width_chars">30</property> + <property name="xalign">0</property> </object> </child> </object>
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
