[Libreoffice-commits] .: desktop/Executable_soffice.bin.mk desktop/Executable_unopkg.bin.mk Repository.mk
Repository.mk | 11 +++ desktop/Executable_soffice.bin.mk |2 +- desktop/Executable_unopkg.bin.mk |2 +- 3 files changed, 9 insertions(+), 6 deletions(-) New commits: commit ee24a236e1ebcc9585ed8e24cd73512e76a0303d Author: Jan Holesovsky ke...@suse.cz Date: Wed Jan 11 09:37:09 2012 +0100 Revert OS_FOR_BUILD is not right do decide Host module name This reverts commit 39cfc4d8ad77700aefabaedde430693448a5f76f. This OS_FOR_BUILD is to modify behavior in the cross-compilation case. diff --git a/Repository.mk b/Repository.mk index 0724e43..3cc7a38 100644 --- a/Repository.mk +++ b/Repository.mk @@ -56,7 +56,6 @@ $(eval $(call gb_Helper_register_executables,OOO, \ ifeq ($(OS),WNT) $(eval $(call gb_Helper_register_executables,OOO,\ -crashrep_com \ guiloader \ guistdio \ odbcconfig \ @@ -67,23 +66,27 @@ $(eval $(call gb_Helper_register_executables,OOO,\ sdraw \ simpress \ soffice \ - soffice_bin \ smath \ sweb \ swriter \ unoinfo \ unopkg \ -unopkg_bin \ -unopkg_com \ unopkgio \ )) else +ifeq ($(OS_FOR_BUILD),WNT) +$(eval $(call gb_Helper_register_executables,OOO,\ + soffice_bin \ +unopkg_bin \ +)) +else $(eval $(call gb_Helper_register_executables,OOO,\ soffice.bin \ unopkg.bin \ )) +endif ifeq ($(OS),MACOSX) diff --git a/desktop/Executable_soffice.bin.mk b/desktop/Executable_soffice.bin.mk index 8815432..456171d 100644 --- a/desktop/Executable_soffice.bin.mk +++ b/desktop/Executable_soffice.bin.mk @@ -25,7 +25,7 @@ # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable # instead of those above. -ifeq ($(OS),WNT) +ifeq ($(OS_FOR_BUILD),WNT) sofficebin := soffice_bin else sofficebin := soffice.bin diff --git a/desktop/Executable_unopkg.bin.mk b/desktop/Executable_unopkg.bin.mk index c635c2b..464824f 100644 --- a/desktop/Executable_unopkg.bin.mk +++ b/desktop/Executable_unopkg.bin.mk @@ -25,7 +25,7 @@ # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable # instead of those above. -ifeq ($(OS),WNT) +ifeq ($(OS_FOR_BUILD),WNT) unopkgbin := unopkg_bin else unopkgbin := unopkg.bin ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - xmlsecurity/source
xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f5113dbaf26b9f617ac346c915ce1734bdf317d5 Author: David Tardon dtar...@redhat.com Date: Wed Jan 11 07:47:38 2012 +0100 fix for gcc 4.7/C++11: this is not string literal operator Signed-off-by: David Tardon dtar...@redhat.com diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index b5e4a13..2090235 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -298,7 +298,7 @@ bool nsscrypto_initialize( const css::uno::Reference css::lang::XMultiServiceFa deleteRootsModule(); #if defined SYSTEM_MOZILLA -OUString rootModule(RTL_CONSTASCII_USTRINGPARAM(libnssckbiSAL_DLLEXTENSION)); +OUString rootModule(RTL_CONSTASCII_USTRINGPARAM(libnssckbi SAL_DLLEXTENSION)); #else OUString rootModule(RTL_CONSTASCII_USTRINGPARAM(${LO_LIB_DIR}/libnssckbi SAL_DLLEXTENSION)); #endif ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source svx/inc svx/source
oox/source/drawingml/customshapeproperties.cxx|2 +- oox/source/drawingml/shapecontext.cxx |6 ++ oox/source/ppt/pptshapecontext.cxx|6 ++ oox/source/token/properties.txt |1 + oox/source/token/tokens.txt |1 + svx/inc/svx/svdoashp.hxx |2 +- svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx |8 svx/source/svdraw/svdoashp.cxx|5 +++-- 8 files changed, 27 insertions(+), 4 deletions(-) New commits: commit 5c4d1b05faa8a3d704fc74a186a173f8cc019cc1 Author: Muthu Subramanian sumu...@suse.com Date: Wed Jan 11 15:24:27 2012 +0530 n#734734: Text rotation fixes. PPTX would need rotation of text _inside_ text/object boundaries, rather than the rotation of the text/object itself. diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 5da446a..a03e42c 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -154,7 +154,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX ); aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY ); -aPropertyMap[ PROP_TextRotateAngle ] = Any( mnTextRotateAngle ); +aPropertyMap[ PROP_TextPreRotateAngle ] = Any( mnTextRotateAngle ); Sequence PropertyValue aSeq = aPropertyMap.makePropertyValueSequence(); aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq ); diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index f613e89..389bfac 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -119,6 +119,12 @@ Reference XFastContextHandler ShapeContext::createFastChildContext( sal_Int32 xRet = new TextBodyContext( *this, *xTextBody ); break; } +case XML_txXfrm: +{ +AttributeList aAttribs( xAttribs ); +mpShapePtr-getTextBody()-getTextProperties().moRotation = aAttribs.getInteger( XML_rot ); +break; +} } if( !xRet.is() ) diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx index dce07b8..cc62b82 100644 --- a/oox/source/ppt/pptshapecontext.cxx +++ b/oox/source/ppt/pptshapecontext.cxx @@ -218,6 +218,12 @@ Reference XFastContextHandler PPTShapeContext::createFastChildContext( sal_In xRet = new oox::drawingml::TextBodyContext( *this, *xTextBody ); break; } +case PPT_TOKEN( txXfrm ): +{ +AttributeList aAttribs( xAttribs ); +mpShapePtr-getTextBody()-getTextProperties().moRotation = aAttribs.getInteger( XML_rot ); +break; +} } if( !xRet.is() ) diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 65d2cb0..50c46bd 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -457,6 +457,7 @@ TextHorizontalAdjust TextLeftDistance TextLowerDistance TextOverlap +TextPreRotateAngle TextRightDistance TextRotateAngle TextRotation diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt index 594468e..cec24b5 100644 --- a/oox/source/token/tokens.txt +++ b/oox/source/token/tokens.txt @@ -5334,6 +5334,7 @@ txOverObj txPr txSp txStyles +txXfrm txbxContent txtBox ty diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx index 3d91549..013e150 100644 --- a/svx/inc/svx/svdoashp.hxx +++ b/svx/inc/svx/svdoashp.hxx @@ -149,7 +149,7 @@ public: void SetMirroredY( const sal_Bool bMirroredY ); double GetObjectRotation() const; -double GetExtraTextRotation() const; +double GetExtraTextRotation( const bool bPreRotation = false ) const; TYPEINFO(); SdrObjCustomShape(); diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 2e63da2..85628ca 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -160,6 +160,14 @@ namespace sdr // #i101684# get the text range unrotated and absolute to the object range const basegfx::B2DRange aTextRange(getCorrectedTextBoundRect()); +// Rotation before scaling + if(!basegfx::fTools::equalZero(GetCustomShapeObj().GetExtraTextRotation(true))) +{ +basegfx::B2DVector aTranslation(0.5, 0.5); +aTextBoxMatrix.translate( -aTranslation.getX(), -aTranslation.getY() ); +aTextBoxMatrix.rotate((360.0 - GetCustomShapeObj().GetExtraTextRotation(true)) *
[Libreoffice-commits] .: sc/inc sc/source
sc/inc/global.hxx |1 sc/source/core/data/global.cxx|5 sc/source/core/data/table4.cxx| 232 -- sc/source/ui/docshell/docfunc.cxx |4 sc/source/ui/miscdlgs/scuiautofmt.cxx |4 sc/source/ui/unoobj/afmtuno.cxx | 88 +--- sc/source/ui/unoobj/cellsuno.cxx |4 sc/source/ui/view/cellsh3.cxx |4 8 files changed, 162 insertions(+), 180 deletions(-) New commits: commit 0e4b36269097f8865bdbc1b9d299a2776ae0cc06 Author: Stephan Bergmann sberg...@redhat.com Date: Wed Jan 11 10:26:41 2012 +0100 ScGlobal::GetAutoFormat not always required to create fresh instance. ...at least in ~ScAutoFormatObj it appears unnecessary and can lead to crashes during Desktop::DeregisterServices (when ScGlobal::ppRscString is already null and ScAutoFormat ctor calls ScGlobal::GetRscString). Therefore split GetAutoFormat in two, GetOrCreateAutoFormat for cases that probably need a non-null return and GetAutoFormat for those that are OK with a null return. diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index a810400..ac10094 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -562,6 +562,7 @@ public: SC_DLLPUBLIC static const SvxSearchItemGetSearchItem(); SC_DLLPUBLIC static voidSetSearchItem( const SvxSearchItem rNew ); SC_DLLPUBLIC static ScAutoFormat* GetAutoFormat(); +SC_DLLPUBLIC static ScAutoFormat* GetOrCreateAutoFormat(); static void ClearAutoFormat(); //BugId 54209 static FuncCollection* GetFuncCollection(); SC_DLLPUBLIC static ScUnoAddInCollection* GetAddInCollection(); diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 6de3782..c43a853 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -299,6 +299,11 @@ void ScGlobal::ClearAutoFormat() ScAutoFormat* ScGlobal::GetAutoFormat() { +return pAutoFormat; +} + +ScAutoFormat* ScGlobal::GetOrCreateAutoFormat() +{ if ( !pAutoFormat ) { pAutoFormat = new ScAutoFormat; diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 9b38214..bc99c5c 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -1592,14 +1592,10 @@ void ScTable::Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, void ScTable::AutoFormatArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScPatternAttr rAttr, sal_uInt16 nFormatNo) { -ScAutoFormat* pAutoFormat = ScGlobal::GetAutoFormat(); -if (pAutoFormat) +ScAutoFormatData* pData = (*ScGlobal::GetOrCreateAutoFormat())[nFormatNo]; +if (pData) { -ScAutoFormatData* pData = (*pAutoFormat)[nFormatNo]; -if (pData) -{ -ApplyPatternArea(nStartCol, nStartRow, nEndCol, nEndRow, rAttr); -} +ApplyPatternArea(nStartCol, nStartRow, nEndCol, nEndRow, rAttr); } } @@ -1608,140 +1604,136 @@ void ScTable::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW { if (ValidColRow(nStartCol, nStartRow) ValidColRow(nEndCol, nEndRow)) { -ScAutoFormat* pAutoFormat = ScGlobal::GetAutoFormat(); -if (pAutoFormat) +ScAutoFormatData* pData = (*ScGlobal::GetOrCreateAutoFormat())[nFormatNo]; +if (pData) { -ScAutoFormatData* pData = (*pAutoFormat)[nFormatNo]; -if (pData) +ScPatternAttr* pPatternAttrs[16]; +for (sal_uInt8 i = 0; i 16; ++i) +{ +pPatternAttrs[i] = new ScPatternAttr(pDocument-GetPool()); +pData-FillToItemSet(i, pPatternAttrs[i]-GetItemSet(), *pDocument); +} + +SCCOL nCol = nStartCol; +SCROW nRow = nStartRow; +sal_uInt16 nIndex = 0; +// Linke obere Ecke +AutoFormatArea(nCol, nRow, nCol, nRow, *pPatternAttrs[nIndex], nFormatNo); +// Linke Spalte +if (pData-IsEqualData(4, 8)) +AutoFormatArea(nStartCol, nStartRow + 1, nStartCol, nEndRow - 1, *pPatternAttrs[4], nFormatNo); +else { -ScPatternAttr* pPatternAttrs[16]; -for (sal_uInt8 i = 0; i 16; ++i) +nIndex = 4; +for (nRow = nStartRow + 1; nRow nEndRow; nRow++) { -pPatternAttrs[i] = new ScPatternAttr(pDocument-GetPool()); -pData-FillToItemSet(i, pPatternAttrs[i]-GetItemSet(), *pDocument); +AutoFormatArea(nCol, nRow, nCol, nRow, *pPatternAttrs[nIndex], nFormatNo); +if (nIndex == 4) +nIndex = 8; +else +nIndex = 4; } - -SCCOL nCol =
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - oox/source svx/inc svx/source
oox/source/drawingml/customshapeproperties.cxx|2 +- oox/source/drawingml/shapecontext.cxx |6 ++ oox/source/ppt/pptshapecontext.cxx|6 ++ oox/source/token/properties.txt |1 + oox/source/token/tokens.txt |1 + svx/inc/svx/svdoashp.hxx |2 +- svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx |8 svx/source/svdraw/svdoashp.cxx|5 +++-- 8 files changed, 27 insertions(+), 4 deletions(-) New commits: commit 0b63bb1d5f37ad673b0aadefe4bfe1e61ae667b9 Author: Muthu Subramanian sumu...@suse.com Date: Wed Jan 11 15:24:27 2012 +0530 n#734734: Text rotation fixes. PPTX would need rotation of text _inside_ text/object boundaries, rather than the rotation of the text/object itself. cherrypick: 5c4d1b05faa8a3d704fc74a186a173f8cc019cc1 diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 5da446a..a03e42c 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -154,7 +154,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX ); aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY ); -aPropertyMap[ PROP_TextRotateAngle ] = Any( mnTextRotateAngle ); +aPropertyMap[ PROP_TextPreRotateAngle ] = Any( mnTextRotateAngle ); Sequence PropertyValue aSeq = aPropertyMap.makePropertyValueSequence(); aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq ); diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index f613e89..389bfac 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -119,6 +119,12 @@ Reference XFastContextHandler ShapeContext::createFastChildContext( sal_Int32 xRet = new TextBodyContext( *this, *xTextBody ); break; } +case XML_txXfrm: +{ +AttributeList aAttribs( xAttribs ); +mpShapePtr-getTextBody()-getTextProperties().moRotation = aAttribs.getInteger( XML_rot ); +break; +} } if( !xRet.is() ) diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx index dce07b8..cc62b82 100644 --- a/oox/source/ppt/pptshapecontext.cxx +++ b/oox/source/ppt/pptshapecontext.cxx @@ -218,6 +218,12 @@ Reference XFastContextHandler PPTShapeContext::createFastChildContext( sal_In xRet = new oox::drawingml::TextBodyContext( *this, *xTextBody ); break; } +case PPT_TOKEN( txXfrm ): +{ +AttributeList aAttribs( xAttribs ); +mpShapePtr-getTextBody()-getTextProperties().moRotation = aAttribs.getInteger( XML_rot ); +break; +} } if( !xRet.is() ) diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 65d2cb0..50c46bd 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -457,6 +457,7 @@ TextHorizontalAdjust TextLeftDistance TextLowerDistance TextOverlap +TextPreRotateAngle TextRightDistance TextRotateAngle TextRotation diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt index 594468e..cec24b5 100644 --- a/oox/source/token/tokens.txt +++ b/oox/source/token/tokens.txt @@ -5334,6 +5334,7 @@ txOverObj txPr txSp txStyles +txXfrm txbxContent txtBox ty diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx index 3d91549..013e150 100644 --- a/svx/inc/svx/svdoashp.hxx +++ b/svx/inc/svx/svdoashp.hxx @@ -149,7 +149,7 @@ public: void SetMirroredY( const sal_Bool bMirroredY ); double GetObjectRotation() const; -double GetExtraTextRotation() const; +double GetExtraTextRotation( const bool bPreRotation = false ) const; TYPEINFO(); SdrObjCustomShape(); diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 2e63da2..85628ca 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -160,6 +160,14 @@ namespace sdr // #i101684# get the text range unrotated and absolute to the object range const basegfx::B2DRange aTextRange(getCorrectedTextBoundRect()); +// Rotation before scaling + if(!basegfx::fTools::equalZero(GetCustomShapeObj().GetExtraTextRotation(true))) +{ +basegfx::B2DVector aTranslation(0.5, 0.5); +aTextBoxMatrix.translate( -aTranslation.getX(), -aTranslation.getY() ); +
[Libreoffice-commits] .: android/Bootstrap android/qa README.cross
README.cross | 12 -- android/Bootstrap/src/org/libreoffice/android/Bootstrap.java | 22 +-- android/qa/sc/Makefile |4 +- 3 files changed, 22 insertions(+), 16 deletions(-) New commits: commit 11c9125c28738ce99e502991523829756ec95326 Author: Tor Lillqvist tlillqv...@suse.com Date: Wed Jan 11 13:46:35 2012 +0200 Work around http://code.google.com/p/android/issues/detail?id=23351 diff --git a/README.cross b/README.cross index 709838b..45e1888 100644 --- a/README.cross +++ b/README.cross @@ -395,18 +395,6 @@ window, and you probably also want to have set the stdout and stderr of app processes to be redirected to logcat (adb shell stop; adb shell setprop log.redirect-stdio true; adb shell start). -Unfortunately you might notice that the command line passed to adb -shell am start is too long (actually, not command line as such, but -the length of the so-called extra arguments passed to the action, or -something like that, see Android bug -http://code.google.com/p/android/issues/detail?id=23351 , so you need -to shorten it somehow... for instance by creating a symlink to -/data/data/org.libreoffice.android.qa.sc in /system: adb remount; adb -shell ln -s /data/data/org.libreoffice.android.qa.sc /system/sc and -then use that shorter path /system/sc snippet in all places instead of -the longer /data/data/org.libreoffice.android.qa.sc on the adb shell -am start command line. - To debug, do manually what make run would do, adding args -e lo-main-delay 20 to the command line, and when the app has started, run ndk-gdb. Unfortunately the gdb in NDK r7 is broken, use the one in diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java index 91f965e..9cd9c3b 100644 --- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java +++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java @@ -37,6 +37,9 @@ import android.util.Log; import fi.iki.tml.CommandLine; +import java.io.File; +import java.util.Scanner; + // We override NativeActivity so that we can get at the intent of the // activity and its extra parameters, that we use to tell us what // actual LibreOffice program to run. I.e. something that on desktop @@ -111,9 +114,22 @@ public class Bootstrap extends NativeActivity // Get command line to pass to the LO program String cmdLine = getIntent().getStringExtra(lo-main-cmdline); -if (cmdLine == null) -cmdLine = /data/data/org.libreoffice.android/lib/libqa_sal_types.so; - +if (cmdLine == null) { +String indirectFile = getIntent().getStringExtra(lo-main-indirect-cmdline); + +if (indirectFile != null) { +try { +// Somewhat stupid but short way to read a file into a string +cmdLine = new Scanner(new File(indirectFile), UTF-8).useDelimiter(\\A).next(); +} +catch (java.io.FileNotFoundException e) { +Log.i(TAG, String.format(Could not read %s: %s,indirectFile, e.toString())); +} +} + +if (cmdLine == null) +cmdLine = /data/data/org.libreoffice.android/lib/libqa_sal_types.so; +} // argv[0] will be replaced by android_main() in lo-bootstrap.c by the // pathname of the mainLibrary. cmdLine = dummy-program-name + cmdLine; diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile index 450b7ed..c400c72 100644 --- a/android/qa/sc/Makefile +++ b/android/qa/sc/Makefile @@ -162,7 +162,9 @@ uninstall: adb uninstall $(APP_PACKAGE) run: - adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-library libcppunittester -e lo-main-cmdline $(APP_DATA_PATH)/lib/libtest_sc_ucalc.so --headless --protector libunoexceptionprotector.so unoexceptionprotector '-env:CONFIGURATION_LAYERS=xcsxcu:file:///assets/xml/registry' '-env:UNO_TYPES=file:///assets/bin/udkapi.rdb file:///assets/bin/types.rdb' '-env:UNO_SERVICES=file:///assets/xml/ure/services.rdb file:///assets/ComponentTarget/framework/util/fwk.component file:///assets/ComponentTarget/i18npool/util/i18npool.component file:///assets/ComponentTarget/sfx2/util/sfx.component file:///assets/ComponentTarget/unoxml/source/service/unoxml.component file:///assets/ComponentTarget/configmgr/source/configmgr.component file:///assets/xml/ucb1.component file:///assets/xml/ucpfile1.component' -env:URE_INTERNAL_LIB_DIR=file://$(APP_DATA_PATH)/lib -env:LO_LIB_DIR=file://$(APP_DATA_PATH)/lib + echo $(APP_DATA_PATH)/lib/libtest_sc_ucalc.so --headless --protector libunoexceptionprotector.so unoexceptionprotector '-env:CONFIGURATION_LAYERS=xcsxcu:file:///assets/xml/registry' '-env:UNO_TYPES=file:///assets/bin/udkapi.rdb file:///assets/bin/types.rdb'
[Libreoffice-commits] .: sc/source
sc/source/ui/src/optdlg.src |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8ca1557b85188b7708930468d77412f51356e34c Author: Andras Timar ati...@suse.com Date: Wed Jan 11 12:00:26 2012 +0100 enlarge 'Reset' button for German translation diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src index 93378d1..a8f82a5 100644 --- a/sc/source/ui/src/optdlg.src +++ b/sc/source/ui/src/optdlg.src @@ -280,7 +280,7 @@ TabPage RID_SCPAGE_FORMULA PushButton BTN_FORMULA_SEP_RESET { Pos = MAP_APPFONT ( 21, 113 ); -Size = MAP_APPFONT ( 40, 14 ); +Size = MAP_APPFONT ( 50, 14 ); Text [ en-US ] = Rese~t; }; }; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: android/Bootstrap
android/Bootstrap/src/org/libreoffice/android/Bootstrap.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3267d34fb9f57e8a4549b8fb9e8c362a64447cfc Author: Tor Lillqvist tlillqv...@suse.com Date: Wed Jan 11 14:18:20 2012 +0200 Need to trim trailing newline from the indirect command line string diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java index 9cd9c3b..f8331ac 100644 --- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java +++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java @@ -120,7 +120,7 @@ public class Bootstrap extends NativeActivity if (indirectFile != null) { try { // Somewhat stupid but short way to read a file into a string -cmdLine = new Scanner(new File(indirectFile), UTF-8).useDelimiter(\\A).next(); +cmdLine = new Scanner(new File(indirectFile), UTF-8).useDelimiter(\\A).next().trim(); } catch (java.io.FileNotFoundException e) { Log.i(TAG, String.format(Could not read %s: %s,indirectFile, e.toString())); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - bridges/source configure.in set_soenv.in
bridges/source/cpp_uno/shared/makefile.mk |4 bridges/source/cpp_uno/shared/vtablefactory.cxx |8 configure.in|2 ++ set_soenv.in|1 + 4 files changed, 15 insertions(+) New commits: commit 2938ec5539b54e98e801ae14ccb2c163cd94a92a Author: Robert Nagy robert.n...@gmail.com Date: Wed Dec 21 16:16:22 2011 +0100 only use posix_fallocate() if it's actually available diff --git a/bridges/source/cpp_uno/shared/makefile.mk b/bridges/source/cpp_uno/shared/makefile.mk index 4ce8122..c71ba6b 100644 --- a/bridges/source/cpp_uno/shared/makefile.mk +++ b/bridges/source/cpp_uno/shared/makefile.mk @@ -33,6 +33,10 @@ ENABLE_EXCEPTIONS = TRUE .INCLUDE: settings.mk +.IF $(HAVE_POSIX_FALLOCATE) == YES +CDEFS += -DHAVE_POSIX_FALLOCATE +.ENDIF + SLOFILES = \ $(SLO)$/bridge.obj \ $(SLO)$/component.obj \ diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx index 801b16c..4d7e867 100644 --- a/bridges/source/cpp_uno/shared/vtablefactory.cxx +++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx @@ -264,10 +264,18 @@ bool VtableFactory::createBlock(Block block, sal_Int32 slotCount) const } unlink(tmpfname); delete[] tmpfname; +#if defined(HAVE_POSIX_FALLOCATE) int err = posix_fallocate(block.fd, 0, block.size); +#else +int err = ftruncate(block.fd, block.size); +#endif if (err != 0) { +#if defined(HAVE_POSIX_FALLOCATE) SAL_WARN(bridges, posix_fallocate failed with code err); +#else +SAL_WARN(bridges, truncation of executable memory area failed with code err); +#endif close(block.fd); block.fd = -1; break; diff --git a/configure.in b/configure.in index 290b294..40b20eb 100644 --- a/configure.in +++ b/configure.in @@ -3843,6 +3843,8 @@ fi if test $with_alloc = internal -o -z $with_alloc; then AC_MSG_RESULT([internal]) fi +AC_CHECK_FUNCS(posix_fallocate, HAVE_POSIX_FALLOCATE=YES, [HAVE_POSIX_FALLOCATE=NO]) +AC_SUBST(HAVE_POSIX_FALLOCATE) AC_SUBST(ALLOC) dnl === diff --git a/set_soenv.in b/set_soenv.in index 5347a84..afaac53 100755 --- a/set_soenv.in +++ b/set_soenv.in @@ -1999,6 +1999,7 @@ ToFile( HUNSPELL_LIBS, @HUNSPELL_LIBS@,e ); ToFile( SYSTEM_LPSOLVE,@SYSTEM_LPSOLVE@, e ); ToFile( HAVE_GETOPT, @HAVE_GETOPT@, e ); ToFile( HAVE_READDIR_R,@HAVE_READDIR_R@, e ); +ToFile( HAVE_POSIX_FALLOCATE,@HAVE_POSIX_FALLOCATE@, e ); ToFile( SYSTEM_LIBC, @SYSTEM_LIBC@, e ); ToFile( SYSTEM_HYPH, @SYSTEM_HYPH@, e ); ToFile( HYPHEN_LIB,@HYPHEN_LIB@, e ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sysui/desktop
sysui/desktop/icons/hicolor/256x256/apps/base.png |binary sysui/desktop/icons/hicolor/256x256/apps/calc.png |binary sysui/desktop/icons/hicolor/256x256/apps/draw.png |binary sysui/desktop/icons/hicolor/256x256/apps/impress.png |binary sysui/desktop/icons/hicolor/256x256/apps/main.png |binary sysui/desktop/icons/hicolor/256x256/apps/math.png |binary sysui/desktop/icons/hicolor/256x256/apps/startcenter.png |binary sysui/desktop/icons/hicolor/256x256/apps/writer.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-database.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing-template.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-formula.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-master-document.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-presentation-template.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-presentation.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-spreadsheet-template.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-spreadsheet.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-text-template.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-text.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-web-template.png |binary 20 files changed New commits: commit 8ed9108aea7fa807fa9a6174df0235b0a3b1a09c Author: Petr Mladek pmla...@suse.cz Date: Wed Jan 11 11:14:55 2012 +0100 Add 256x256 desktop and MIME type icons (fdo#39555, bnc#722644) diff --git a/sysui/desktop/icons/hicolor/256x256/apps/base.png b/sysui/desktop/icons/hicolor/256x256/apps/base.png new file mode 100644 index 000..729dbcd Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/base.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/calc.png b/sysui/desktop/icons/hicolor/256x256/apps/calc.png new file mode 100644 index 000..3ce322a Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/calc.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/draw.png b/sysui/desktop/icons/hicolor/256x256/apps/draw.png new file mode 100644 index 000..b3ee114 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/draw.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/impress.png b/sysui/desktop/icons/hicolor/256x256/apps/impress.png new file mode 100644 index 000..5909f05 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/impress.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/main.png b/sysui/desktop/icons/hicolor/256x256/apps/main.png new file mode 100644 index 000..7e8e2a0 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/main.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/math.png b/sysui/desktop/icons/hicolor/256x256/apps/math.png new file mode 100644 index 000..50b8dc8 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/math.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/startcenter.png b/sysui/desktop/icons/hicolor/256x256/apps/startcenter.png new file mode 100644 index 000..7e8e2a0 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/startcenter.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/writer.png b/sysui/desktop/icons/hicolor/256x256/apps/writer.png new file mode 100644 index 000..80af4bd Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/writer.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-database.png b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-database.png new file mode 100644 index 000..729dbcd Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-database.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing-template.png b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing-template.png new file mode 100644 index 000..4cda813 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing-template.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing.png b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing.png new file mode 100644 index 000..b3ee114 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-formula.png
[Libreoffice-commits] .: sysui/desktop
sysui/desktop/icons/hicolor/256x256/apps/base.png |binary sysui/desktop/icons/hicolor/256x256/apps/calc.png |binary sysui/desktop/icons/hicolor/256x256/apps/draw.png |binary sysui/desktop/icons/hicolor/256x256/apps/impress.png |binary sysui/desktop/icons/hicolor/256x256/apps/main.png |binary sysui/desktop/icons/hicolor/256x256/apps/math.png |binary sysui/desktop/icons/hicolor/256x256/apps/startcenter.png |binary sysui/desktop/icons/hicolor/256x256/apps/writer.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-database.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing-template.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-formula.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-master-document.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-presentation-template.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-presentation.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-spreadsheet-template.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-spreadsheet.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-text-template.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-text.png |binary sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-web-template.png |binary 20 files changed New commits: commit 25e0d64a6fccbc62d4cca4d8d7d312ea84f45c3a Author: Petr Mladek pmla...@suse.cz Date: Wed Jan 11 11:14:55 2012 +0100 Add 256x256 desktop and MIME type icons (fdo#39555, bnc#722644) diff --git a/sysui/desktop/icons/hicolor/256x256/apps/base.png b/sysui/desktop/icons/hicolor/256x256/apps/base.png new file mode 100644 index 000..729dbcd Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/base.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/calc.png b/sysui/desktop/icons/hicolor/256x256/apps/calc.png new file mode 100644 index 000..3ce322a Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/calc.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/draw.png b/sysui/desktop/icons/hicolor/256x256/apps/draw.png new file mode 100644 index 000..b3ee114 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/draw.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/impress.png b/sysui/desktop/icons/hicolor/256x256/apps/impress.png new file mode 100644 index 000..5909f05 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/impress.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/main.png b/sysui/desktop/icons/hicolor/256x256/apps/main.png new file mode 100644 index 000..7e8e2a0 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/main.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/math.png b/sysui/desktop/icons/hicolor/256x256/apps/math.png new file mode 100644 index 000..50b8dc8 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/math.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/startcenter.png b/sysui/desktop/icons/hicolor/256x256/apps/startcenter.png new file mode 100644 index 000..7e8e2a0 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/startcenter.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/apps/writer.png b/sysui/desktop/icons/hicolor/256x256/apps/writer.png new file mode 100644 index 000..80af4bd Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/apps/writer.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-database.png b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-database.png new file mode 100644 index 000..729dbcd Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-database.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing-template.png b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing-template.png new file mode 100644 index 000..4cda813 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing-template.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing.png b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing.png new file mode 100644 index 000..b3ee114 Binary files /dev/null and b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-drawing.png differ diff --git a/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-formula.png
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source
sc/source/core/data/drwlayer.cxx |9 + 1 file changed, 9 insertions(+) New commits: commit 9fae191ea8438777d5c1dd20b20506e131707454 Author: Kohei Yoshida kohei.yosh...@suse.com Date: Wed Jan 11 08:59:49 2012 -0500 Avoid iterating beyond the last existing drawing page. diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 74c9d35..82fbf7b 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -481,6 +481,15 @@ void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, sal_Bool b void ScDrawLayer::ResetTab( SCTAB nStart, SCTAB nEnd ) { +SCTAB nPageSize = static_castSCTAB(GetPageCount()); +if (nPageSize 0) +// No drawing pages exist. +return; + +if (nEnd = nPageSize) +// Avoid iterating beyond the last existing page. +nEnd = nPageSize - 1; + for (SCTAB i = nStart; i = nEnd; ++i) { SdrPage* pPage = GetPage(static_castsal_uInt16(i)); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sc/source
sc/source/core/data/drwlayer.cxx |9 + 1 file changed, 9 insertions(+) New commits: commit 98aadb63dd07c51bdc2a0a0857c6ded05d7316f8 Author: Kohei Yoshida kohei.yosh...@suse.com Date: Wed Jan 11 08:59:49 2012 -0500 Avoid iterating beyond the last existing drawing page. diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 74c9d35..82fbf7b 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -481,6 +481,15 @@ void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, sal_Bool b void ScDrawLayer::ResetTab( SCTAB nStart, SCTAB nEnd ) { +SCTAB nPageSize = static_castSCTAB(GetPageCount()); +if (nPageSize 0) +// No drawing pages exist. +return; + +if (nEnd = nPageSize) +// Avoid iterating beyond the last existing page. +nEnd = nPageSize - 1; + for (SCTAB i = nStart; i = nEnd; ++i) { SdrPage* pPage = GetPage(static_castsal_uInt16(i)); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: extras/source
extras/source/truetype/symbol/README | 16 1 file changed, 16 insertions(+) New commits: commit 211e147ac64b2a22652d7390bcd9c8f7215a73b4 Author: Caolán McNamara caol...@redhat.com Date: Wed Jan 11 14:44:42 2012 + add README to document how to bump the font version diff --git a/extras/source/truetype/symbol/README b/extras/source/truetype/symbol/README new file mode 100644 index 000..889dd36 --- /dev/null +++ b/extras/source/truetype/symbol/README @@ -0,0 +1,16 @@ +Modify the OpenSymbol.sfd and generate opens___.ttf from it with fontforge. The +.sfd is the canonical source for the .ttf + +Every new version of the font should increase the font version. This is +important so that when two versions of the font are installed, e.g. one +bundled inside the office installation, and one already installed on the system +that the most recent font can be detected and favoured. + +Bumping the font version is easiest done manually by bumping the two places in +the .sfd where the version is mentioned, e.g. + +-Version: 102.2 ++Version: 102.3 + +-LangName: 1033 Regular OpenSymbol Version 102.2 ++LangName: 1033 Regular OpenSymbol Version 102.3 ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: desktop/Executable_soffice.bin.mk desktop/Executable_unopkg.bin.mk Repository.mk
Repository.mk | 11 --- desktop/Executable_soffice.bin.mk |2 +- desktop/Executable_unopkg.bin.mk |2 +- 3 files changed, 6 insertions(+), 9 deletions(-) New commits: commit 42bd571e07378c5e74f279e373c1442b4d224590 Author: Norbert Thiebaud nthieb...@gmail.com Date: Tue Jan 10 22:28:24 2012 -0600 OS_FOR_BUILD is not right do decide Host module name diff --git a/Repository.mk b/Repository.mk index 3cc7a38..f76ae79 100644 --- a/Repository.mk +++ b/Repository.mk @@ -56,6 +56,7 @@ $(eval $(call gb_Helper_register_executables,OOO, \ ifeq ($(OS),WNT) $(eval $(call gb_Helper_register_executables,OOO,\ + crashrep_com \ guiloader \ guistdio \ odbcconfig \ @@ -66,27 +67,23 @@ $(eval $(call gb_Helper_register_executables,OOO,\ sdraw \ simpress \ soffice \ + soffice_bin \ smath \ sweb \ swriter \ unoinfo \ unopkg \ + unopkg_bin \ + unopkg_com \ unopkgio \ )) else -ifeq ($(OS_FOR_BUILD),WNT) -$(eval $(call gb_Helper_register_executables,OOO,\ - soffice_bin \ -unopkg_bin \ -)) -else $(eval $(call gb_Helper_register_executables,OOO,\ soffice.bin \ unopkg.bin \ )) -endif ifeq ($(OS),MACOSX) diff --git a/desktop/Executable_soffice.bin.mk b/desktop/Executable_soffice.bin.mk index 456171d..8815432 100644 --- a/desktop/Executable_soffice.bin.mk +++ b/desktop/Executable_soffice.bin.mk @@ -25,7 +25,7 @@ # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable # instead of those above. -ifeq ($(OS_FOR_BUILD),WNT) +ifeq ($(OS),WNT) sofficebin := soffice_bin else sofficebin := soffice.bin diff --git a/desktop/Executable_unopkg.bin.mk b/desktop/Executable_unopkg.bin.mk index 464824f..c635c2b 100644 --- a/desktop/Executable_unopkg.bin.mk +++ b/desktop/Executable_unopkg.bin.mk @@ -25,7 +25,7 @@ # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable # instead of those above. -ifeq ($(OS_FOR_BUILD),WNT) +ifeq ($(OS),WNT) unopkgbin := unopkg_bin else unopkgbin := unopkg.bin ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: avmedia/source
avmedia/source/win/framegrabber.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit eea8a6e2181ee805854d29184aab3317264dde94 Author: Caolán McNamara caol...@redhat.com Date: Wed Jan 11 15:04:18 2012 + fix windows build error diff --git a/avmedia/source/win/framegrabber.cxx b/avmedia/source/win/framegrabber.cxx index 9743d12..fd7264c 100644 --- a/avmedia/source/win/framegrabber.cxx +++ b/avmedia/source/win/framegrabber.cxx @@ -84,11 +84,11 @@ IMediaDet* FrameGrabber::implCreateMediaDet( const ::rtl::OUString rURL ) const if( SUCCEEDED( CoCreateInstance( CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER, IID_IMediaDet, (void**) pDet ) ) ) { -String aLocalStr; +rtl::OUString aLocalStr; -if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( rURL, aLocalStr ) aLocalStr.Len() ) +if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( rURL, aLocalStr ) !aLocalStr.isEmpty() ) { -if( !SUCCEEDED( pDet-put_Filename( ::SysAllocString( reinterpret_castLPCOLESTR(aLocalStr.GetBuffer()) ) ) ) ) +if( !SUCCEEDED( pDet-put_Filename( ::SysAllocString( reinterpret_castLPCOLESTR(aLocalStr.getStr()) ) ) ) ) { pDet-Release(); pDet = NULL; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: configure.in desktop/scripts
configure.in |3 ++- desktop/scripts/soffice.sh.in |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) New commits: commit f5b96148cb9e489b2100e6a2fd6805bff637e113 Author: David Tardon dtar...@redhat.com Date: Wed Jan 11 16:54:35 2012 +0100 we need a var. assignment here, not a value diff --git a/configure.in b/configure.in index 204065b..ab12cea 100644 --- a/configure.in +++ b/configure.in @@ -4313,8 +4313,9 @@ if test $_os = Linux test $host_cpu = powerpc; then # IBMs JDK needs this... JITC_PROCESSOR_TYPE=6 export JITC_PROCESSOR_TYPE +JITC_PROCESSOR_TYPE_EXPORT=JITC_PROCESSOR_TYPE=$JITC_PROCESSOR_TYPE fi -AC_SUBST([JITC_PROCESSOR_TYPE]) +AC_SUBST([JITC_PROCESSOR_TYPE_EXPORT]) if test $_os = WINNT; then WITH_VC_REDIST=TRUE diff --git a/desktop/scripts/soffice.sh.in b/desktop/scripts/soffice.sh.in index defd7b2..2014ab9 100755 --- a/desktop/scripts/soffice.sh.in +++ b/desktop/scripts/soffice.sh.in @@ -45,7 +45,7 @@ export SAL_ENABLE_FILE_LOCKING # uncomment line below if you encounter problems starting soffice on your system # SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS -@JITC_PROCESSOR_TYPE@ +@JITC_PROCESSOR_TYPE_EXPORT@ # resolve installation directory sd_cwd=`pwd` ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - config_host.mk.in configure.in desktop/Module_desktop.mk desktop/Package_scripts.mk desktop/Package_soffice_sh.mk desktop/scripts
config_host.mk.in |1 configure.in |7 - desktop/Module_desktop.mk |5 + desktop/Package_scripts.mk|2 desktop/Package_soffice_sh.mk | 38 + desktop/scripts/Makefile | 35 desktop/scripts/soffice.sh| 177 ++ desktop/scripts/soffice.sh.in | 177 -- 8 files changed, 260 insertions(+), 182 deletions(-) New commits: commit 7ad72045d7c3a99dbb67f817ad570097de383c3f Author: David Tardon dtar...@redhat.com Date: Wed Jan 11 17:31:44 2012 +0100 avoid generating a file in the source tree diff --git a/config_host.mk.in b/config_host.mk.in index 236a58c..57125bd 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -167,6 +167,7 @@ export INSTALLDIR=@INSTALLDIR@ export INSTALLDIRNAME=@INSTALLDIRNAME@ export INTRO_BIPMAP=@INTRO_BITMAP@ @x_JAVALIB@ export JAVALIB=@JAVALIB@ +export JITC_PROCESSOR_TYPE_EXPORT=@JITC_PROCESSOR_TYPE_EXPORT@ export JFREEREPORT_JAR=@JFREEREPORT_JAR@ export KDE4_CFLAGS=@KDE4_CFLAGS@ export KDE4_LIBS=@KDE4_LIBS@ diff --git a/configure.in b/configure.in index e44bf75..d3b3a7e 100644 --- a/configure.in +++ b/configure.in @@ -10422,12 +10422,9 @@ else echo set_soenv.last fi -AC_CONFIG_FILES([config_host.mk ooo.lst set_soenv bin/repo-list desktop/scripts/soffice.sh build_env]) +AC_CONFIG_FILES([config_host.mk ooo.lst set_soenv bin/repo-list build_env]) AC_OUTPUT -# make sure this is executable -chmod +x desktop/scripts/soffice.sh - # touch the config timestamp file set_soenv.stamp if test ! -f set_soenv.stamp; then echo set_soenv.stamp diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk index c14600f..267cc2c 100644 --- a/desktop/Module_desktop.mk +++ b/desktop/Module_desktop.mk @@ -68,6 +68,11 @@ $(eval $(call gb_Module_add_targets,desktop,\ Pagein_impress \ Pagein_writer \ )) +ifneq ($(JITC_PROCESSOR_TYPE_EXPORT),) +$(eval $(call gb_Module_add_targets,desktop,\ +Package_soffice_sh \ +)) +endif endif ifeq ($(OS),WNT) diff --git a/desktop/Package_scripts.mk b/desktop/Package_scripts.mk index d2afeda..7611765 100644 --- a/desktop/Package_scripts.mk +++ b/desktop/Package_scripts.mk @@ -47,10 +47,12 @@ $(eval $(call gb_Package_add_file,desktop_scripts,bin/unoinfo,unoinfo.sh)) $(eval $(call gb_Package_add_file,desktop_scripts,bin/unopkg,unopkg.sh)) ifneq ($(OS),MACOSX) +ifeq ($(JITC_PROCESSOR_TYPE_EXPORT),) $(eval $(call gb_Package_add_file,desktop_scripts,bin/soffice,soffice.sh)) endif +endif endif diff --git a/desktop/Package_soffice_sh.mk b/desktop/Package_soffice_sh.mk new file mode 100644 index 000..5cf1df3 --- /dev/null +++ b/desktop/Package_soffice_sh.mk @@ -0,0 +1,38 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the License); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an AS IS basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2010 Red Hat, Inc., David Tardon dtar...@redhat.com +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the GPLv3+), or +# the GNU Lesser General Public License Version 3 or later (the LGPLv3+), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Package_Package,desktop_soffice_sh,$(WORKDIR)/CustomTarget/desktop/scripts)) + +$(eval $(call gb_Package_add_file,desktop_soffice_sh,bin/soffice,soffice.sh)) + +$(eval $(call gb_Package_add_customtarget,desktop_soffice_sh,desktop/scripts)) + +$(eval $(call gb_CustomTarget_add_dependencies,desktop/scripts,\ +desktop/scripts/soffice.sh \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/desktop/scripts/Makefile b/desktop/scripts/Makefile new file mode 100644 index 000..349c5dd --- /dev/null +++ b/desktop/scripts/Makefile @@ -0,0 +1,35 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the License); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an AS IS basis,
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - configure.in desktop/scripts
configure.in |3 ++- desktop/scripts/soffice.sh.in |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) New commits: commit 23e6f8b208bce0412e8aa0cb46a29f0395eb8317 Author: David Tardon dtar...@redhat.com Date: Wed Jan 11 17:32:02 2012 +0100 bah, i forgot *export* Signed-off-by: David Tardon dtar...@redhat.com diff --git a/configure.in b/configure.in index 016e468..824de63 100644 --- a/configure.in +++ b/configure.in @@ -3890,7 +3890,7 @@ if test $_os = Linux test $host_cpu = powerpc; then # IBMs JDK needs this... JITC_PROCESSOR_TYPE=6 export JITC_PROCESSOR_TYPE -JITC_PROCESSOR_TYPE_EXPORT=JITC_PROCESSOR_TYPE=$JITC_PROCESSOR_TYPE +JITC_PROCESSOR_TYPE_EXPORT=export JITC_PROCESSOR_TYPE=$JITC_PROCESSOR_TYPE fi AC_SUBST([JITC_PROCESSOR_TYPE_EXPORT]) commit 38a32dfd832dcd47af2457567c18a6e357bb578a Author: David Tardon dtar...@redhat.com Date: Wed Jan 11 16:54:35 2012 +0100 we need a var. assignment here, not a value Signed-off-by: David Tardon dtar...@redhat.com diff --git a/configure.in b/configure.in index 40b20eb..016e468 100644 --- a/configure.in +++ b/configure.in @@ -3890,8 +3890,9 @@ if test $_os = Linux test $host_cpu = powerpc; then # IBMs JDK needs this... JITC_PROCESSOR_TYPE=6 export JITC_PROCESSOR_TYPE +JITC_PROCESSOR_TYPE_EXPORT=JITC_PROCESSOR_TYPE=$JITC_PROCESSOR_TYPE fi -AC_SUBST([JITC_PROCESSOR_TYPE]) +AC_SUBST([JITC_PROCESSOR_TYPE_EXPORT]) if test $_os = WINNT; then WITH_VC_REDIST=TRUE diff --git a/desktop/scripts/soffice.sh.in b/desktop/scripts/soffice.sh.in index defd7b2..2014ab9 100755 --- a/desktop/scripts/soffice.sh.in +++ b/desktop/scripts/soffice.sh.in @@ -45,7 +45,7 @@ export SAL_ENABLE_FILE_LOCKING # uncomment line below if you encounter problems starting soffice on your system # SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS -@JITC_PROCESSOR_TYPE@ +@JITC_PROCESSOR_TYPE_EXPORT@ # resolve installation directory sd_cwd=`pwd` ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sc/source
sc/source/core/data/dpobject.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 34219bd53d4270e6741e2b8596b4210e1c47da1a Author: Kohei Yoshida kohei.yosh...@suse.com Date: Wed Jan 11 11:50:26 2012 -0500 fdo#44661: No need to update the source range when it's a named range. Otherwise deleting a sheet that shifts the position of the pivot table would turn the named range into the raw range that the name references. diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 8cc76c7..51be02d 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -745,6 +745,11 @@ void ScDPObject::UpdateReference( UpdateRefMode eUpdateRefMode, if ( pSheetDesc ) { +const OUString rRangeName = pSheetDesc-GetRangeName(); +if (!rRangeName.isEmpty()) +// Source range is a named range. No need to update. +return; + const ScRange rSrcRange = pSheetDesc-GetSourceRange(); nCol1 = rSrcRange.aStart.Col(); nRow1 = rSrcRange.aStart.Row(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svtools/source
svtools/source/brwbox/brwbox1.cxx | 22 +- svtools/source/brwbox/brwbox2.cxx | 22 -- svtools/source/brwbox/brwbox3.cxx |2 +- svtools/source/brwbox/brwhead.cxx |2 +- svtools/source/brwbox/datwin.cxx|2 +- svtools/source/brwbox/editbrowsebox.cxx | 12 +--- 6 files changed, 29 insertions(+), 33 deletions(-) New commits: commit a3261b16471995832f6791b5831c640c72948a95 Author: Lionel Elie Mamane lio...@mamane.lu Date: Wed Jan 11 18:55:14 2012 +0100 fdo#44283: finish 8a17792f2e5 (Handle/invalid column ID cleanup) diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index cca40ce..5ddaa03 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -307,9 +307,9 @@ void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const XubString rText, if ( getDataWindow()-pHeaderBar ) { -// Handlecolumn nicht in der Headerbar +// Handle column not in the header bar sal_uInt16 nHeaderPos = nPos; -if (nHeaderPos != HEADERBAR_APPEND !GetColumnId(0)) +if (nHeaderPos != HEADERBAR_APPEND GetColumnId(0) == HandleColumnId ) nHeaderPos--; getDataWindow()-pHeaderBar-InsertItem( nItemId, rText, nWidth, nBits, nHeaderPos ); @@ -347,7 +347,7 @@ void BrowseBox::FreezeColumn( sal_uInt16 nItemId, sal_Bool bFreeze ) DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants); // never unfreeze the handle-column -if ( nItemId == 0 !bFreeze ) +if ( nItemId == HandleColumnId !bFreeze ) return; // get the position in the current array @@ -424,12 +424,8 @@ void BrowseBox::FreezeColumn( sal_uInt16 nItemId, sal_Bool bFreeze ) void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos ) { -// never set pos of the handle-column -if ( nColumnId == 0 ) -return; - -// do not move handle column -if (nPos == 0 !(*pCols)[ 0 ]-GetId()) +// never set pos of the handle column +if ( nColumnId == HandleColumnId ) return; // get the position in the current array @@ -504,7 +500,7 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos ) if ( getDataWindow()-pHeaderBar ) { sal_uInt16 nNewPos = nPos; -if ( !GetColumnId(0) ) +if ( GetColumnId(0) == HandleColumnId ) --nNewPos; getDataWindow()-pHeaderBar-MoveItem(nColumnId,nNewPos); } @@ -550,7 +546,7 @@ void BrowseBox::SetColumnTitle( sal_uInt16 nItemId, const String rTitle ) DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants); // never set title of the handle-column -if ( nItemId == 0 ) +if ( nItemId == HandleColumnId ) return; // get the position in the current array @@ -2383,8 +2379,8 @@ void BrowseBox::SetMode( BrowserMode nMode ) if ( pDataWin ) pDataWin-Invalidate(); -// kein Cursor auf Handle-Column -if ( nCurColId == 0 ) +// no cursor on handle column +if ( nCurColId == HandleColumnId ) nCurColId = GetColumnId( 1 ); m_nCurrentMode = nMode; diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 92c29de..9a4a7b2 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -416,8 +416,8 @@ void BrowseBox::DrawCursor() else bReallyHide |= ( GetCursorHideCount() 0 ); -// keine Cursor auf Handle-Column -if ( nCurColId == 0 ) +// no cursor on handle column +if ( nCurColId == HandleColumnId ) nCurColId = GetColumnId(1); // Cursor-Rechteck berechnen @@ -1682,8 +1682,8 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent rEvt ) // DataRow? if ( rEvt.GetRow() = 0 ) { -// Zeilenselektion? -if ( rEvt.GetColumnId() == 0 || !bColumnCursor ) +// line selection? +if ( rEvt.GetColumnId() == HandleColumnId || !bColumnCursor ) { if ( bMultiSelection ) { @@ -1757,7 +1757,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent rEvt ) } else { -if ( bMultiSelection rEvt.GetColumnId() == 0 ) +if ( bMultiSelection rEvt.GetColumnId() == HandleColumnId ) { // toggle all-selection if ( uRow.pSel-GetSelectCount() ( GetRowCount() / 2 ) ) @@ -1990,7 +1990,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId ) if ( bColumnCursor ) { sal_uInt16 nNewId = GetColumnId(ColCount() -1); -bDone = (nNewId != 0) GoToColumnId( nNewId ); +bDone = nNewId != HandleColumnId GoToColumnId( nNewId ); break;
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - svtools/source
svtools/source/brwbox/brwbox2.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit de89f1694b4cb2a5bf8ade020bfdef33e7135d35 Author: Lionel Elie Mamane lio...@mamane.lu Date: Wed Jan 11 19:05:36 2012 +0100 fdo#44283: contination of 8a17792f2e5 (Handle/invalid column ID cleanup) Thanks to Julien Nabet for pointer and first part of this patch diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 92c29de..7fe378e 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -2001,11 +2001,13 @@ void BrowseBox::Dispatch( sal_uInt16 nId ) { sal_uInt16 nNewPos = GetColumnPos( GetCurColumnId() ) + 1; sal_uInt16 nNewId = GetColumnId( nNewPos ); -if (nNewId != 0)// Am Zeilenende ? +if (nNewId != BROWSER_INVALIDID)// At end of row ? bDone = GoToColumnId( nNewId ); else { -sal_uInt16 nColId = ( GetColumnId(0) == 0 ) ? GetColumnId(1) : GetColumnId(0); +sal_uInt16 nColId = GetColumnId(0); +if ( nColId == BROWSER_INVALIDID || nColId == HandleColumnId ) +nColId = GetColumnId(1); if ( GetRowCount() ) bDone = ( nCurRow GetRowCount() - 1 ) GoToRowColumnId( nCurRow + 1, nColId ); else if ( ColCount() ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/inc sc/source
sc/inc/dpobject.hxx |8 ++- sc/source/core/data/dpobject.cxx | 100 +++ 2 files changed, 99 insertions(+), 9 deletions(-) New commits: commit 1e88cd643a5959271f28eaaab3d14488374df11f Author: Kohei Yoshida kohei.yosh...@suse.com Date: Wed Jan 11 15:24:52 2012 -0500 fdo#44661: Properly update range keys for pivot cache. When the internal data source range gets modified, we should also update the affected range keys that are used to look up pivot caches. Otherwise we'll end up creating a brand new cache, without removing the old one that's no longer referenced. diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index cc73fcb..db8ea92 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -259,12 +259,18 @@ public: class SheetCaches { friend class ScDPCollection; -typedef ::boost::ptr_mapScRange, ScDPCache CachesType; +typedef boost::ptr_mapsize_t, ScDPCache CachesType; +typedef std::vectorScRange RangeIndexType; CachesType maCaches; +RangeIndexType maRanges; ScDocument* mpDoc; public: SheetCaches(ScDocument* pDoc); const ScDPCache* getCache(const ScRange rRange); + +void updateReference( +UpdateRefMode eMode, const ScRange r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz); + private: void removeCache(const ScRange rRange); }; diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 51be02d..b0bbace 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -2459,27 +2459,108 @@ uno::Referencesheet::XDimensionsSupplier ScDPObject::CreateSource( const ScDPS ScDPCollection::SheetCaches::SheetCaches(ScDocument* pDoc) : mpDoc(pDoc) {} +namespace { + +struct FindInvalidRange : public std::unary_functionScRange, bool +{ +bool operator() (const ScRange r) const +{ +return !r.IsValid(); +} +}; + +} + const ScDPCache* ScDPCollection::SheetCaches::getCache(const ScRange rRange) { -CachesType::const_iterator itr = maCaches.find(rRange); -if (itr != maCaches.end()) -// already cached. -return itr-second; +RangeIndexType::iterator it = std::find(maRanges.begin(), maRanges.end(), rRange); +if (it != maRanges.end()) +{ +// Already cached. +size_t nIndex = std::distance(maRanges.begin(), it); +CachesType::iterator itCache = maCaches.find(nIndex); +if (itCache == maCaches.end()) +// cache pool and index pool out-of-sync !!! +return NULL; +return itCache-second; +} + +// Not cached. Create a new cache. SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptrScDPCache pCache(new ScDPCache(mpDoc)); SAL_WNODEPRECATED_DECLARATIONS_POP pCache-InitFromDoc(mpDoc, rRange); + +// Get the smallest available range index. +it = std::find_if(maRanges.begin(), maRanges.end(), FindInvalidRange()); + +size_t nIndex = maRanges.size(); +if (it == maRanges.end()) +{ +// All range indices are valid. Append a new index. +maRanges.push_back(rRange); +} +else +{ +// Slot with invalid range. Re-use this slot. +*it = rRange; +nIndex = std::distance(maRanges.begin(), it); +} + const ScDPCache* p = pCache.get(); -maCaches.insert(rRange, pCache); +maCaches.insert(nIndex, pCache); return p; } +void ScDPCollection::SheetCaches::updateReference( +UpdateRefMode eMode, const ScRange r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz) +{ +if (maRanges.empty()) +// No caches. +return; + +RangeIndexType::iterator it = maRanges.begin(), itEnd = maRanges.end(); +for (; it != itEnd; ++it) +{ +const ScRange rKeyRange = *it; +SCCOL nCol1 = rKeyRange.aStart.Col(); +SCROW nRow1 = rKeyRange.aStart.Row(); +SCTAB nTab1 = rKeyRange.aStart.Tab(); +SCCOL nCol2 = rKeyRange.aEnd.Col(); +SCROW nRow2 = rKeyRange.aEnd.Row(); +SCTAB nTab2 = rKeyRange.aEnd.Tab(); + +ScRefUpdateRes eRes = ScRefUpdate::Update( +mpDoc, eMode, +r.aStart.Col(), r.aStart.Row(), r.aStart.Tab(), +r.aEnd.Col(), r.aEnd.Row(), r.aEnd.Tab(), nDx, nDy, nDz, +nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); + +if (eRes != UR_NOTHING) +{ +// range updated. +ScRange aNew(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); +*it = aNew; +} +} +} + void ScDPCollection::SheetCaches::removeCache(const ScRange rRange) { -CachesType::iterator itr = maCaches.find(rRange); -if (itr != maCaches.end()) -maCaches.erase(itr); +RangeIndexType::iterator it = std::find(maRanges.begin(), maRanges.end(), rRange); +if (it == maRanges.end()) +// Not cached. Nothing to do. +return; + +
[Libreoffice-commits] .: sc/inc sc/source
sc/inc/dpobject.hxx |8 ++- sc/source/core/data/dpobject.cxx | 100 +++ 2 files changed, 99 insertions(+), 9 deletions(-) New commits: commit e33702442a22a72f96a093fbfdf8bfac217f416f Author: Kohei Yoshida kohei.yosh...@suse.com Date: Wed Jan 11 15:24:52 2012 -0500 fdo#44661: Properly update range keys for pivot cache. When the internal data source range gets modified, we should also update the affected range keys that are used to look up pivot caches. Otherwise we'll end up creating a brand new cache, without removing the old one that's no longer referenced. diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index cc73fcb..db8ea92 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -259,12 +259,18 @@ public: class SheetCaches { friend class ScDPCollection; -typedef ::boost::ptr_mapScRange, ScDPCache CachesType; +typedef boost::ptr_mapsize_t, ScDPCache CachesType; +typedef std::vectorScRange RangeIndexType; CachesType maCaches; +RangeIndexType maRanges; ScDocument* mpDoc; public: SheetCaches(ScDocument* pDoc); const ScDPCache* getCache(const ScRange rRange); + +void updateReference( +UpdateRefMode eMode, const ScRange r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz); + private: void removeCache(const ScRange rRange); }; diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 51be02d..b0bbace 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -2459,27 +2459,108 @@ uno::Referencesheet::XDimensionsSupplier ScDPObject::CreateSource( const ScDPS ScDPCollection::SheetCaches::SheetCaches(ScDocument* pDoc) : mpDoc(pDoc) {} +namespace { + +struct FindInvalidRange : public std::unary_functionScRange, bool +{ +bool operator() (const ScRange r) const +{ +return !r.IsValid(); +} +}; + +} + const ScDPCache* ScDPCollection::SheetCaches::getCache(const ScRange rRange) { -CachesType::const_iterator itr = maCaches.find(rRange); -if (itr != maCaches.end()) -// already cached. -return itr-second; +RangeIndexType::iterator it = std::find(maRanges.begin(), maRanges.end(), rRange); +if (it != maRanges.end()) +{ +// Already cached. +size_t nIndex = std::distance(maRanges.begin(), it); +CachesType::iterator itCache = maCaches.find(nIndex); +if (itCache == maCaches.end()) +// cache pool and index pool out-of-sync !!! +return NULL; +return itCache-second; +} + +// Not cached. Create a new cache. SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptrScDPCache pCache(new ScDPCache(mpDoc)); SAL_WNODEPRECATED_DECLARATIONS_POP pCache-InitFromDoc(mpDoc, rRange); + +// Get the smallest available range index. +it = std::find_if(maRanges.begin(), maRanges.end(), FindInvalidRange()); + +size_t nIndex = maRanges.size(); +if (it == maRanges.end()) +{ +// All range indices are valid. Append a new index. +maRanges.push_back(rRange); +} +else +{ +// Slot with invalid range. Re-use this slot. +*it = rRange; +nIndex = std::distance(maRanges.begin(), it); +} + const ScDPCache* p = pCache.get(); -maCaches.insert(rRange, pCache); +maCaches.insert(nIndex, pCache); return p; } +void ScDPCollection::SheetCaches::updateReference( +UpdateRefMode eMode, const ScRange r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz) +{ +if (maRanges.empty()) +// No caches. +return; + +RangeIndexType::iterator it = maRanges.begin(), itEnd = maRanges.end(); +for (; it != itEnd; ++it) +{ +const ScRange rKeyRange = *it; +SCCOL nCol1 = rKeyRange.aStart.Col(); +SCROW nRow1 = rKeyRange.aStart.Row(); +SCTAB nTab1 = rKeyRange.aStart.Tab(); +SCCOL nCol2 = rKeyRange.aEnd.Col(); +SCROW nRow2 = rKeyRange.aEnd.Row(); +SCTAB nTab2 = rKeyRange.aEnd.Tab(); + +ScRefUpdateRes eRes = ScRefUpdate::Update( +mpDoc, eMode, +r.aStart.Col(), r.aStart.Row(), r.aStart.Tab(), +r.aEnd.Col(), r.aEnd.Row(), r.aEnd.Tab(), nDx, nDy, nDz, +nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); + +if (eRes != UR_NOTHING) +{ +// range updated. +ScRange aNew(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); +*it = aNew; +} +} +} + void ScDPCollection::SheetCaches::removeCache(const ScRange rRange) { -CachesType::iterator itr = maCaches.find(rRange); -if (itr != maCaches.end()) -maCaches.erase(itr); +RangeIndexType::iterator it = std::find(maRanges.begin(), maRanges.end(), rRange); +if (it == maRanges.end()) +// Not cached. Nothing to do. +return; + +
[Libreoffice-commits] .: shell/source slideshow/source sot/source starmath/source
shell/source/cmdmail/cmdmailmsg.cxx | 18 +- shell/source/cmdmail/cmdmailsuppl.cxx |8 ++-- shell/source/unix/exec/shellexec.cxx |4 +- shell/source/unix/sysshell/recently_used_file.cxx |2 - slideshow/source/engine/activities/activitiesfactory.cxx |2 - slideshow/source/engine/animationnodes/animationaudionode.cxx |2 - slideshow/source/engine/shapes/shapeimporter.cxx |2 - slideshow/source/engine/shapes/viewmediashape.cxx |4 +- slideshow/source/engine/slide/shapemanagerimpl.cxx|4 +- slideshow/source/engine/slideshowimpl.cxx |4 +- sot/source/sdstor/storage.cxx |2 - sot/source/sdstor/ucbstorage.cxx |8 ++-- sot/source/unoolestorage/xolesimplestorage.cxx|4 +- starmath/source/cfgitem.cxx |4 +- starmath/source/dialog.cxx|2 - starmath/source/mathmlexport.cxx |2 - starmath/source/mathmlimport.cxx | 14 +++ starmath/source/smdetect.cxx |2 - starmath/source/unomodel.cxx |2 - 19 files changed, 45 insertions(+), 45 deletions(-) New commits: commit 806dce17d6631738c7388d8d68d8b5ac2e4c11a8 Author: Olivier Hallot olivier.hal...@alta.org.br Date: Wed Jan 11 11:37:33 2012 -0200 Fix for fdo43460 Part XXXIV getLength() to isEmpty() Part XXXIV Modules shell, slideshow, sot, starmath diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx index 1a33afd..2a2bb8a 100644 --- a/shell/source/cmdmail/cmdmailmsg.cxx +++ b/shell/source/cmdmail/cmdmailmsg.cxx @@ -167,10 +167,10 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString aName ) { MutexGuard aGuard( m_aMutex ); -if( 0 == aName.compareToAscii( from ) m_aOriginator.getLength() ) +if( 0 == aName.compareToAscii( from ) !m_aOriginator.isEmpty() ) return makeAny( m_aOriginator ); -else if( 0 == aName.compareToAscii( to ) m_aRecipient.getLength() ) +else if( 0 == aName.compareToAscii( to ) !m_aRecipient.isEmpty() ) return makeAny( m_aRecipient ); else if( 0 == aName.compareToAscii( cc ) m_CcRecipients.getLength() ) @@ -179,7 +179,7 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString aName ) else if( 0 == aName.compareToAscii( bcc ) m_BccRecipients.getLength() ) return makeAny( m_BccRecipients ); -else if( 0 == aName.compareToAscii( subject ) m_aSubject.getLength() ) +else if( 0 == aName.compareToAscii( subject ) !m_aSubject.isEmpty() ) return makeAny( m_aSubject ); else if( 0 == aName.compareToAscii( attachment ) m_Attachments.getLength() ) @@ -199,10 +199,10 @@ Sequence OUString SAL_CALL CmdMailMsg::getElementNames( ) sal_Int32 nItems = 0; Sequence OUString aRet( 6 ); -if( m_aOriginator.getLength() ) +if( !m_aOriginator.isEmpty() ) aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM(from)); -if( m_aRecipient.getLength() ) +if( !m_aRecipient.isEmpty() ) aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM(to)); if( m_CcRecipients.getLength() ) @@ -211,7 +211,7 @@ Sequence OUString SAL_CALL CmdMailMsg::getElementNames( ) if( m_BccRecipients.getLength() ) aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM(bcc)); -if( m_aSubject.getLength() ) +if( !m_aSubject.isEmpty() ) aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM(subject)); if( m_Attachments.getLength() ) @@ -228,10 +228,10 @@ Sequence OUString SAL_CALL CmdMailMsg::getElementNames( ) { MutexGuard aGuard( m_aMutex ); -if( 0 == aName.compareToAscii( from ) m_aOriginator.getLength() ) +if( 0 == aName.compareToAscii( from ) !m_aOriginator.isEmpty() ) return sal_True; -else if( 0 == aName.compareToAscii( to ) m_aRecipient.getLength() ) +else if( 0 == aName.compareToAscii( to ) !m_aRecipient.isEmpty() ) return sal_True; else if( 0 == aName.compareToAscii( cc ) m_CcRecipients.getLength() ) @@ -240,7 +240,7 @@ Sequence OUString SAL_CALL CmdMailMsg::getElementNames( ) else if( 0 == aName.compareToAscii( bcc ) m_BccRecipients.getLength() ) return sal_True; -else if( 0 == aName.compareToAscii( subject ) m_aSubject.getLength() ) +else if( 0 == aName.compareToAscii( subject ) !m_aSubject.isEmpty() ) return sal_True; else if( 0 == aName.compareToAscii( attachment ) m_Attachments.getLength() ) diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index 3af65c8..c0531e3 100644 ---
[Libreoffice-commits] .: vcl/generic
vcl/generic/fontmanager/fontconfig.cxx | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) New commits: commit 34d1c9f9b8618c3a58516c4fa4286f257c858430 Author: Caolán McNamara caol...@redhat.com Date: Wed Jan 11 20:47:54 2012 + Resolves:fdo#44078 fix unfortunate name alias mixups with DejaVu fonts diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx index daf4fee..90d59f1 100644 --- a/vcl/generic/fontmanager/fontconfig.cxx +++ b/vcl/generic/fontmanager/fontconfig.cxx @@ -124,7 +124,7 @@ public: boost::unordered_map rtl::OString, rtl::OString, rtl::OStringHash m_aFontNameToLocalized; boost::unordered_map rtl::OString, rtl::OString, rtl::OStringHash m_aLocalizedToCanonical; private: -void cacheLocalizedFontNames(FcChar8 *origfontname, FcChar8 *bestfontname, const std::vector lang_and_element lang_and_elements); +void cacheLocalizedFontNames(const FcChar8 *origfontname, const FcChar8 *bestfontname, const std::vector lang_and_element lang_and_elements); }; FontCfgWrapper::FontCfgWrapper() @@ -296,6 +296,7 @@ namespace std::vectorlang_and_element::const_iterator aEnd = elements.end(); bool alreadyclosematch = false; +bool found_fallback_englishname = false; for( std::vectorlang_and_element::const_iterator aIter = elements.begin(); aIter != aEnd; ++aIter ) { const char *pLang = (const char*)aIter-first; @@ -307,7 +308,8 @@ namespace } else if( alreadyclosematch ) { -// override candidate only if there is a perfect match +// current candidate matches lang of lang-TERRITORY +// override candidate only if there is a full match continue; } else if( rtl_str_compare( pLang, sLangMatch.getStr()) == 0) @@ -316,10 +318,18 @@ namespace candidate = aIter-second; alreadyclosematch = true; } +else if( found_fallback_englishname ) +{ +// already found an english fallback, don't override candidate +// unless there is a better language match +continue; +} else if( rtl_str_compare( pLang, en) == 0) { -// fallback to the english element name +// select a fallback candidate of the first english element +// name candidate = aIter-second; +found_fallback_englishname = true; } } return candidate; @@ -327,7 +337,8 @@ namespace } //Set up maps to quickly map between a fonts best UI name and all the rest of its names, and vice versa -void FontCfgWrapper::cacheLocalizedFontNames(FcChar8 *origfontname, FcChar8 *bestfontname, const std::vector lang_and_element lang_and_elements) +void FontCfgWrapper::cacheLocalizedFontNames(const FcChar8 *origfontname, const FcChar8 *bestfontname, +const std::vector lang_and_element lang_and_elements) { std::vectorlang_and_element::const_iterator aEnd = lang_and_elements.end(); for (std::vectorlang_and_element::const_iterator aIter = lang_and_elements.begin(); aIter != aEnd; ++aIter) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - vcl/generic
vcl/generic/fontmanager/fontconfig.cxx | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) New commits: commit 25b90909a7a22f6900abbe9df12570a24e528c9a Author: Caolán McNamara caol...@redhat.com Date: Wed Jan 11 20:47:54 2012 + Resolves:fdo#44078 fix unfortunate name alias mixups with DejaVu fonts diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx index 4d02a76..a120fb7 100644 --- a/vcl/generic/fontmanager/fontconfig.cxx +++ b/vcl/generic/fontmanager/fontconfig.cxx @@ -124,7 +124,7 @@ public: boost::unordered_map rtl::OString, rtl::OString, rtl::OStringHash m_aFontNameToLocalized; boost::unordered_map rtl::OString, rtl::OString, rtl::OStringHash m_aLocalizedToCanonical; private: -void cacheLocalizedFontNames(FcChar8 *origfontname, FcChar8 *bestfontname, const std::vector lang_and_element lang_and_elements); +void cacheLocalizedFontNames(const FcChar8 *origfontname, const FcChar8 *bestfontname, const std::vector lang_and_element lang_and_elements); }; FontCfgWrapper::FontCfgWrapper() @@ -296,6 +296,7 @@ namespace std::vectorlang_and_element::const_iterator aEnd = elements.end(); bool alreadyclosematch = false; +bool found_fallback_englishname = false; for( std::vectorlang_and_element::const_iterator aIter = elements.begin(); aIter != aEnd; ++aIter ) { const char *pLang = (const char*)aIter-first; @@ -307,7 +308,8 @@ namespace } else if( alreadyclosematch ) { -// override candidate only if there is a perfect match +// current candidate matches lang of lang-TERRITORY +// override candidate only if there is a full match continue; } else if( rtl_str_compare( pLang, sLangMatch.getStr()) == 0) @@ -316,10 +318,18 @@ namespace candidate = aIter-second; alreadyclosematch = true; } +else if( found_fallback_englishname ) +{ +// already found an english fallback, don't override candidate +// unless there is a better language match +continue; +} else if( rtl_str_compare( pLang, en) == 0) { -// fallback to the english element name +// select a fallback candidate of the first english element +// name candidate = aIter-second; +found_fallback_englishname = true; } } return candidate; @@ -327,7 +337,8 @@ namespace } //Set up maps to quickly map between a fonts best UI name and all the rest of its names, and vice versa -void FontCfgWrapper::cacheLocalizedFontNames(FcChar8 *origfontname, FcChar8 *bestfontname, const std::vector lang_and_element lang_and_elements) +void FontCfgWrapper::cacheLocalizedFontNames(const FcChar8 *origfontname, const FcChar8 *bestfontname, +const std::vector lang_and_element lang_and_elements) { std::vectorlang_and_element::const_iterator aEnd = lang_and_elements.end(); for (std::vectorlang_and_element::const_iterator aIter = lang_and_elements.begin(); aIter != aEnd; ++aIter) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/source
i18npool/source/localedata/data/ar_DZ.xml |5 - i18npool/source/localedata/data/ar_EG.xml |5 - i18npool/source/localedata/data/ja_JP.xml |8 ++-- i18npool/source/localedata/data/ko_KR.xml |3 ++- i18npool/source/localedata/data/locale.dtd |3 +-- i18npool/source/localedata/data/mk_MK.xml |2 +- i18npool/source/localedata/data/zh_HK.xml |4 ++-- i18npool/source/localedata/data/zh_MO.xml |8 ++-- i18npool/source/localedata/data/zh_TW.xml |4 ++-- 9 files changed, 28 insertions(+), 14 deletions(-) New commits: commit d2c865b887c6b771ca2d0c804bf4e358e605a571 Author: Eike Rathke er...@redhat.com Date: Wed Jan 11 22:14:23 2012 +0100 made formatindex=33 the ISO 8601 -MM-DD that it needs to be diff --git a/i18npool/source/localedata/data/ar_DZ.xml b/i18npool/source/localedata/data/ar_DZ.xml index 68cf3ed..a9feabe 100644 --- a/i18npool/source/localedata/data/ar_DZ.xml +++ b/i18npool/source/localedata/data/ar_DZ.xml @@ -130,7 +130,7 @@ DefaultNameISO 8601/DefaultName /FormatElement FormatElement msgid=DateFormatskey20 default=false type=medium usage=DATE formatindex=33 - FormatCode[NatNum1]/MM/DD/FormatCode + FormatCode-MM-DD/FormatCode DefaultNameISO 8601/DefaultName /FormatElement FormatElement msgid=DateFormatskey3 default=false type=medium usage=DATE formatindex=34 @@ -181,6 +181,9 @@ FormatElement msgid=DateTimeFormatskey4 default=false type=medium usage=DATE_TIME formatindex=51 FormatCode[NatNum1]AM/PMHH:MM /MM/D/FormatCode /FormatElement +FormatElement msgid=DateFormatskey22 default=false type=medium usage=DATE formatindex=52 + FormatCode[NatNum1]/MM/DD/FormatCode +/FormatElement /LC_FORMAT LC_COLLATION ref=en_US / LC_SEARCH ref=en_US/ diff --git a/i18npool/source/localedata/data/ar_EG.xml b/i18npool/source/localedata/data/ar_EG.xml index bc3341d..b99a02d 100644 --- a/i18npool/source/localedata/data/ar_EG.xml +++ b/i18npool/source/localedata/data/ar_EG.xml @@ -130,7 +130,7 @@ DefaultNameISO 8601/DefaultName /FormatElement FormatElement msgid=DateFormatskey20 default=false type=medium usage=DATE formatindex=33 - FormatCode[NatNum1]/MM/DD/FormatCode + FormatCode-MM-DD/FormatCode DefaultNameISO 8601/DefaultName /FormatElement FormatElement msgid=DateFormatskey3 default=false type=medium usage=DATE formatindex=34 @@ -181,6 +181,9 @@ FormatElement msgid=DateTimeFormatskey4 default=false type=medium usage=DATE_TIME formatindex=51 FormatCode[NatNum1]AM/PMHH:MM /MM/D/FormatCode /FormatElement +FormatElement msgid=DateFormatskey22 default=false type=medium usage=DATE formatindex=52 + FormatCode[NatNum1]/MM/DD/FormatCode +/FormatElement /LC_FORMAT LC_COLLATION ref=en_US / LC_SEARCH ref=en_US/ diff --git a/i18npool/source/localedata/data/ja_JP.xml b/i18npool/source/localedata/data/ja_JP.xml index d09dd53..54c42a2 100644 --- a/i18npool/source/localedata/data/ja_JP.xml +++ b/i18npool/source/localedata/data/ja_JP.xml @@ -129,7 +129,8 @@ FormatCodeGE.M.D/FormatCode /FormatElement FormatElement msgid=DateFormatskey16 default=false type=medium usage=DATE formatindex=33 - FormatCodeGE.MM.DD/FormatCode + FormatCode-MM-DD/FormatCode + DefaultNameISO 8601/DefaultName /FormatElement FormatElement msgid=DateFormatskey17 default=false type=medium usage=DATE formatindex=34 FormatCodeYY/MM/FormatCode @@ -170,7 +171,7 @@ FormatElement msgid=TimeFormatskey8 default=false type=medium usage=TIME formatindex=52 FormatCodeHæMMå/FormatCode /FormatElement -FormatElement msgid=TimeFormatskey9 default=false type=long usage=TIME formatindex=54 +FormatElement msgid=TimeFormatskey9 default=false type=long usage=TIME formatindex=53 FormatCodeHæMMåSSç§/FormatCode /FormatElement FormatElement msgid=DateTimeFormatskey1 default=false type=long usage=DATE_TIME formatindex=46 @@ -179,6 +180,9 @@ FormatElement msgid=DateTimeFormatskey2 default=true type=long usage=DATE_TIME formatindex=47 FormatCode/M/D H:MM/FormatCode /FormatElement +FormatElement msgid=DateFormatskey22 default=false type=medium usage=DATE formatindex=54 + FormatCodeGE.MM.DD/FormatCode +/FormatElement /LC_FORMAT LC_COLLATION Collator default=true unoid=phonetic (alphanumeric first) / diff --git a/i18npool/source/localedata/data/ko_KR.xml b/i18npool/source/localedata/data/ko_KR.xml index 7762c6d..932bd91 100644 --- a/i18npool/source/localedata/data/ko_KR.xml +++ b/i18npool/source/localedata/data/ko_KR.xml @@ -129,7 +129,8 @@ FormatCodeYY-M-D/FormatCode /FormatElement FormatElement msgid=DateFormatskey16 default=false type=medium usage=DATE formatindex=33 - FormatCodeYYë Mì/FormatCode + FormatCode-MM-DD/FormatCode +
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/qa
sc/qa/unit/ucalc.cxx | 31 +++ 1 file changed, 31 insertions(+) New commits: commit ae5943c6e22295b21b9e62fb51910e250333 Author: Kohei Yoshida kohei.yosh...@suse.com Date: Wed Jan 11 16:23:45 2012 -0500 Unit test for repositioning of cell-anchored line objects. Preivously, before my fix, relocating a cell-anchored bottom-left to top-right line object would get flipped when its position changed. This is a test for that use case. diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 18fb569..26df2e7 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -62,11 +62,13 @@ #include formula/IFunctionDescription.hxx +#include basegfx/polygon/b2dpolygon.hxx #include editeng/boxitem.hxx #include svx/svdograf.hxx #include svx/svdpage.hxx #include svx/svdocirc.hxx +#include svx/svdopath.hxx #include sfx2/docfile.hxx @@ -2504,6 +2506,35 @@ void Test::testGraphicsInGroup() CPPUNIT_ASSERT_MESSAGE(Failed to move back to its original position., aOrigRect == rNewRect); } +{ +// Add a line. +basegfx::B2DPolygon aTempPoly; +Point aStartPos(10,300), aEndPos(110,200); // bottom-left to top-right. +Rectangle aOrigRect(10,200,110,300); // 100 x 100 +aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y())); +aTempPoly.append(basegfx::B2DPoint(aEndPos.X(), aEndPos.Y())); +SdrPathObj* pObj = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aTempPoly)); +pObj-NbcSetLogicRect(aOrigRect); +pPage-InsertObject(pObj); +const Rectangle rNewRect = pObj-GetLogicRect(); +CPPUNIT_ASSERT_MESSAGE(Size differ., aOrigRect == rNewRect); + +ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0); +CPPUNIT_ASSERT_MESSAGE(Size changed when cell-anchored. Not good., + aOrigRect == rNewRect); + +// Insert 2 rows at the top and delete them immediately. +m_pDoc-InsertRow(0, 0, MAXCOL, 0, 0, 2); +m_pDoc-DeleteRow(0, 0, MAXCOL, 0, 0, 2); +CPPUNIT_ASSERT_MESSAGE(Size of a line object changed after row insertion and removal., + aOrigRect == rNewRect); + +sal_Int32 n = pObj-GetPointCount(); +CPPUNIT_ASSERT_MESSAGE(There should be exactly 2 points in a line object., n == 2); +CPPUNIT_ASSERT_MESSAGE(Line shape has changed., + aStartPos == pObj-GetPoint(0) aEndPos == pObj-GetPoint(1)); +} + m_pDoc-DeleteTab(0); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sc/qa
sc/qa/unit/ucalc.cxx | 31 +++ 1 file changed, 31 insertions(+) New commits: commit 75bc746b97b5d1e08cd26c7bb5afde348085f6bf Author: Kohei Yoshida kohei.yosh...@suse.com Date: Wed Jan 11 16:23:45 2012 -0500 Unit test for repositioning of cell-anchored line objects. Preivously, before my fix, relocating a cell-anchored bottom-left to top-right line object would get flipped when its position changed. This is a test for that use case. diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index d45ddb4..c843eb7 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -62,11 +62,13 @@ #include formula/IFunctionDescription.hxx +#include basegfx/polygon/b2dpolygon.hxx #include editeng/boxitem.hxx #include svx/svdograf.hxx #include svx/svdpage.hxx #include svx/svdocirc.hxx +#include svx/svdopath.hxx #include sfx2/docfile.hxx @@ -2504,6 +2506,35 @@ void Test::testGraphicsInGroup() CPPUNIT_ASSERT_MESSAGE(Failed to move back to its original position., aOrigRect == rNewRect); } +{ +// Add a line. +basegfx::B2DPolygon aTempPoly; +Point aStartPos(10,300), aEndPos(110,200); // bottom-left to top-right. +Rectangle aOrigRect(10,200,110,300); // 100 x 100 +aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y())); +aTempPoly.append(basegfx::B2DPoint(aEndPos.X(), aEndPos.Y())); +SdrPathObj* pObj = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aTempPoly)); +pObj-NbcSetLogicRect(aOrigRect); +pPage-InsertObject(pObj); +const Rectangle rNewRect = pObj-GetLogicRect(); +CPPUNIT_ASSERT_MESSAGE(Size differ., aOrigRect == rNewRect); + +ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0); +CPPUNIT_ASSERT_MESSAGE(Size changed when cell-anchored. Not good., + aOrigRect == rNewRect); + +// Insert 2 rows at the top and delete them immediately. +m_pDoc-InsertRow(0, 0, MAXCOL, 0, 0, 2); +m_pDoc-DeleteRow(0, 0, MAXCOL, 0, 0, 2); +CPPUNIT_ASSERT_MESSAGE(Size of a line object changed after row insertion and removal., + aOrigRect == rNewRect); + +sal_Int32 n = pObj-GetPointCount(); +CPPUNIT_ASSERT_MESSAGE(There should be exactly 2 points in a line object., n == 2); +CPPUNIT_ASSERT_MESSAGE(Line shape has changed., + aStartPos == pObj-GetPoint(0) aEndPos == pObj-GetPoint(1)); +} + m_pDoc-DeleteTab(0); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/source
i18npool/source/localedata/data/ko_KR.xml |4 ++-- i18npool/source/localedata/data/ne_NP.xml |2 +- i18npool/source/localedata/data/zh_HK.xml |2 +- i18npool/source/localedata/data/zh_TW.xml |2 +- 4 files changed, 5 insertions(+), 5 deletions(-) New commits: commit e6a32a0d45fe4f6ad748123c6129310b0ae471b4 Author: Eike Rathke er...@redhat.com Date: Thu Jan 12 00:07:45 2012 +0100 removed leading/trailing blank from FormatCode diff --git a/i18npool/source/localedata/data/ko_KR.xml b/i18npool/source/localedata/data/ko_KR.xml index 932bd91..5654b71 100644 --- a/i18npool/source/localedata/data/ko_KR.xml +++ b/i18npool/source/localedata/data/ko_KR.xml @@ -117,7 +117,7 @@ FormatCode[~hanja]YYå¹´ Mæ Dæ¥ /FormatCode /FormatElement FormatElement msgid=DateFormatskey12 default=false type=medium usage=DATE formatindex=29 - FormatCode[~hanja]å¹´ Mæ Dæ¥ /FormatCode + FormatCode[~hanja]å¹´ Mæ Dæ¥ /FormatCode /FormatElement FormatElement msgid=DateFormatskey13 default=false type=medium usage=DATE formatindex=30 FormatCodeYY-M-D /FormatCode @@ -181,7 +181,7 @@ FormatCodeYY/M/D /FormatCode /FormatElement FormatElement msgid=DateFormatskey34 default=true type=long usage=DATE formatindex=62 - FormatCode/M/D /FormatCode + FormatCode/M/D /FormatCode /FormatElement FormatElement msgid=DateFormatskey35 default=false type=long usage=DATE formatindex=63 FormatCodeYY/M/FormatCode diff --git a/i18npool/source/localedata/data/ne_NP.xml b/i18npool/source/localedata/data/ne_NP.xml index 5826e7c..b652369 100644 --- a/i18npool/source/localedata/data/ne_NP.xml +++ b/i18npool/source/localedata/data/ne_NP.xml @@ -78,7 +78,7 @@ FormatCode[NatNum1][CURRENCY] #,##0.00;[RED]-[CURRENCY] #,##0.00/FormatCode /FormatElement FormatElement msgid=CurrencyFormatskey5 default=false type=medium usage=CURRENCY formatindex=16 - FormatCode[NatNum1]CCC #,##0.00 /FormatCode + FormatCode[NatNum1]CCC #,##0.00/FormatCode /FormatElement FormatElement msgid=CurrencyFormatskey6 default=false type=medium usage=CURRENCY formatindex=17 FormatCode[NatNum1][CURRENCY] #,##0.--;[RED]-[CURRENCY] #,##0.--/FormatCode diff --git a/i18npool/source/localedata/data/zh_HK.xml b/i18npool/source/localedata/data/zh_HK.xml index 4bed867..891e626 100644 --- a/i18npool/source/localedata/data/zh_HK.xml +++ b/i18npool/source/localedata/data/zh_HK.xml @@ -142,7 +142,7 @@ FormatCodeAM/PM HH:MM/FormatCode /FormatElement FormatElement msgid=TimeFormatskey4 default=false type=medium usage=TIME formatindex=42 - FormatCode AM/PM HH:MM:SS/FormatCode + FormatCodeAM/PM HH:MM:SS/FormatCode /FormatElement FormatElement msgid=TimeFormatskey5 default=false type=medium usage=TIME formatindex=43 FormatCode[HH]:MM:SS/FormatCode diff --git a/i18npool/source/localedata/data/zh_TW.xml b/i18npool/source/localedata/data/zh_TW.xml index aa068e1..89ecdd9 100644 --- a/i18npool/source/localedata/data/zh_TW.xml +++ b/i18npool/source/localedata/data/zh_TW.xml @@ -163,7 +163,7 @@ FormatCodeAM/PM HH:MM/FormatCode /FormatElement FormatElement msgid=TimeFormatskey4 default=false type=medium usage=TIME formatindex=42 - FormatCode AM/PM HH:MM:SS/FormatCode + FormatCodeAM/PM HH:MM:SS/FormatCode /FormatElement FormatElement msgid=TimeFormatskey5 default=false type=medium usage=TIME formatindex=43 FormatCode[HH]:MM:SS/FormatCode ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 3 commits - cui/source svl/inc svl/source svx/inc svx/source
cui/source/inc/autocdlg.hxx |4 --- cui/source/tabpages/autocdlg.cxx | 25 ++- cui/source/tabpages/numfmt.cxx | 11 +++- svl/inc/svl/svstdarr.hxx |5 --- svl/source/memtools/svarray.cxx | 48 - svx/inc/svx/numfmtsh.hxx |4 +-- svx/source/items/numfmtsh.cxx| 50 --- 7 files changed, 37 insertions(+), 110 deletions(-) New commits: commit 9556b3847edb9223db7c65614b49e10d4566b712 Author: August Sodora aug...@gmail.com Date: Wed Jan 11 18:01:02 2012 -0500 Remove SvStringISort diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx index 1d1b6e8..1533e47 100644 --- a/svl/inc/svl/svstdarr.hxx +++ b/svl/inc/svl/svstdarr.hxx @@ -50,11 +50,6 @@ SV_DECL_PTRARR_DEL_VISIBILITY( SvStringsDtor, StringPtr, 1, 1, SVL_DLLPUBLIC ) #define _SVSTDARR_STRINGSDTOR_DECL #endif -#ifndef _SVSTDARR_STRINGSISORT_DECL -SV_DECL_PTRARR_SORT_VISIBILITY( SvStringsISort, StringPtr, 1, 1, SVL_DLLPUBLIC ) -#define _SVSTDARR_STRINGSISORT_DECL -#endif - #ifndef _SVSTDARR_STRINGSISORTDTOR_DECL SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvStringsISortDtor, StringPtr, 1, 1, SVL_DLLPUBLIC ) #define _SVSTDARR_STRINGSISORTDTOR_DECL diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx index 52f3f0c..a8bbb68 100644 --- a/svl/source/memtools/svarray.cxx +++ b/svl/source/memtools/svarray.cxx @@ -28,7 +28,6 @@ #define _SVSTDARR_STRINGSDTOR #define _SVSTDARR_STRINGSSORTDTOR -#define _SVSTDARR_STRINGSISORT #include svl/svstdarr.hxx #include tools/debug.hxx @@ -46,53 +45,6 @@ SV_IMPL_PTRARR( SvStringsDtor, StringPtr ) // strings - // Array with different Seek method -_SV_IMPL_SORTAR_ALG( SvStringsISort, StringPtr ) -void SvStringsISort::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) -{ -if( nL ) -{ -DBG_ASSERT( nP nA nP + nL = nA, ERR_VAR_DEL ); -for( sal_uInt16 n=nP; n nP + nL; n++ ) -delete *((StringPtr*)pData+n); -SvPtrarr::Remove( nP, nL ); -} -} -sal_Bool SvStringsISort::Seek_Entry( const StringPtr aE, sal_uInt16* pP ) const -{ -register sal_uInt16 nO = SvStringsISort_SAR::Count(), -nM, -nU = 0; -if( nO 0 ) -{ -nO--; -while( nU = nO ) -{ -nM = nU + ( nO - nU ) / 2; -StringCompare eCmp = (*((StringPtr*)pData + nM))- -CompareIgnoreCaseToAscii( *(aE) ); -if( COMPARE_EQUAL == eCmp ) -{ -if( pP ) *pP = nM; -return sal_True; -} -else if( COMPARE_LESS == eCmp ) -nU = nM + 1; -else if( nM == 0 ) -{ -if( pP ) *pP = nU; -return sal_False; -} -else -nO = nM - 1; -} -} -if( pP ) *pP = nU; -return sal_False; -} - -// strings - - -// Array with different Seek method _SV_IMPL_SORTAR_ALG( SvStringsISortDtor, StringPtr ) void SvStringsISortDtor::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { commit 4497c499d2b57095a2dbeb592dce3b5067f417c9 Author: August Sodora aug...@gmail.com Date: Wed Jan 11 14:02:02 2012 -0500 SvStringsISort-std::set diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx index a22d7b3..3043739 100644 --- a/cui/source/inc/autocdlg.hxx +++ b/cui/source/inc/autocdlg.hxx @@ -67,8 +67,6 @@ public: #include svtools/svtabbx.hxx #include svx/simptabl.hxx -class SvStringsISortDtor; - // class OfaACorrCheckListBox -- class OfaACorrCheckListBox : public SvxSimpleTable @@ -240,7 +238,7 @@ private: String sModify; String sNew; -SvStringsISortDtor* pFormatText; +std::setrtl::OUString aFormatText; DoubleStringTable aDoubleStringTable; CollatorWrapper*pCompareClass; CharClass* pCharClass; diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 48eb935..a0ce04b 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -960,7 +960,6 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( Window* pParent, aDeleteReplacePB(this,CUI_RES(PB_DELETE_REPLACE )), sModify(CUI_RES(STR_MODIFY)), sNew(aNewReplacePB.GetText()), -pFormatText(0), eLang(eLastDialogLanguage), bHasSelectionText(sal_False), bFirstSelect(sal_True), @@ -995,7 +994,6 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( Window* pParent, OfaAutocorrReplacePage::~OfaAutocorrReplacePage() { -delete pFormatText; lcl_ClearTable(aDoubleStringTable); delete pCompareClass; delete pCharClass; @@ -1187,12 +1185,7 @@ void
[Libreoffice-commits] .: svtools/source
svtools/source/control/inettbc.cxx | 107 ++--- 1 file changed, 30 insertions(+), 77 deletions(-) New commits: commit 116d77f97329a064f67da99fd4c25260008c9ba4 Author: August Sodora aug...@gmail.com Date: Wed Jan 11 20:46:25 2012 -0500 SvStringsDtor-std::vector diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index b9b526c..e33809b 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -68,8 +68,6 @@ #include vector #include algorithm -// --- - using namespace ::rtl; using namespace ::ucbhelper; using namespace ::utl; @@ -81,34 +79,30 @@ using namespace ::com::sun::star::task; using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::uno; -// --- class SvtURLBox_Impl { public: -SvStringsDtor* pURLs; -SvStringsDtor* pCompletions; +std::vectorrtl::OUString aURLs; +std::vectorrtl::OUString aCompletions; const IUrlFilter* pUrlFilter; ::std::vector WildCardm_aFilters; static sal_Bool TildeParsing( String aText, String aBaseUrl ); inline SvtURLBox_Impl( ) -:pURLs( NULL ) -,pCompletions( NULL ) -,pUrlFilter( NULL ) +:pUrlFilter( NULL ) { FilterMatch::createWildCardFilterList(String(),m_aFilters); } }; -// --- class SvtMatchContext_Impl : public ::osl::Thread { static ::osl::Mutex*pDirMutex; -SvStringsDtor aPickList; -SvStringsDtor* pCompletions; -SvStringsDtor* pURLs; +std::vectorrtl::OUString aPickList; +std::vectorrtl::OUString aCompletions; +std::vectorrtl::OUString aURLs; svtools::AsynchronLink aLink; String aBaseURL; String aText; @@ -124,7 +118,7 @@ class SvtMatchContext_Impl : public ::osl::Thread virtual void SAL_CALL Cancel(); voidInsert( const String rCompletion, const String rURL, sal_Bool bForce = sal_False); voidReadFolder( const String rURL, const String rMatch, sal_Bool bSmart ); -voidFillPicklist( SvStringsDtor rPickList ); +voidFillPicklist(std::vectorrtl::OUString rPickList); public: static ::osl::Mutex* GetMutex(); @@ -144,7 +138,6 @@ public: return pDirMutex; } -//- SvtMatchContext_Impl::SvtMatchContext_Impl( SvtURLBox* pBoxP, const String rText ) : aLink( STATIC_LINK( this, SvtMatchContext_Impl, Select_Impl ) ) @@ -155,9 +148,6 @@ SvtMatchContext_Impl::SvtMatchContext_Impl( , bOnlyDirectories( pBoxP-bOnlyDirectories ) , bNoSelection( pBoxP-bNoSelection ) { -pURLs = new SvStringsDtor; -pCompletions = new SvStringsDtor; - aLink.CreateMutex(); FillPicklist( aPickList ); @@ -165,16 +155,12 @@ SvtMatchContext_Impl::SvtMatchContext_Impl( create(); } -//- SvtMatchContext_Impl::~SvtMatchContext_Impl() { aLink.ClearPendingCall(); -delete pURLs; -delete pCompletions; } -//- -void SvtMatchContext_Impl::FillPicklist( SvStringsDtor rPickList ) +void SvtMatchContext_Impl::FillPicklist(std::vectorrtl::OUString rPickList) { // Einlesung der Historypickliste Sequence Sequence PropertyValue seqPicklist = SvtHistoryOptions().GetList( eHISTORY ); @@ -195,22 +181,19 @@ void SvtMatchContext_Impl::FillPicklist( SvStringsDtor rPickList ) { seqPropertySet[nProperty].Value = sTitle; aURL.SetURL( sTitle ); -const StringPtr pStr = new String( aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET ) ); -rPickList.Insert( pStr, (sal_uInt16) nItem ); +rPickList.insert(rPickList.begin() + nItem, aURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET)); break; } } } } -//- void SAL_CALL SvtMatchContext_Impl::Cancel() { // Cancel button pressed terminate(); } -//- void SvtMatchContext_Impl::Stop() { bStop = sal_True; @@ -219,7 +202,6 @@ void SvtMatchContext_Impl::Stop() terminate(); } -//- void
[Libreoffice-commits] .: editeng/source
editeng/source/misc/svxacorr.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 0204bbffbc273782ca3148c7ba6768af4f5a77f9 Author: August Sodora aug...@gmail.com Date: Wed Jan 11 20:49:52 2012 -0500 Remove an unused SvStringsDtor diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index b7df997..169c403 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -2155,7 +2155,6 @@ SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList() else pAutocorr_List = new SvxAutocorrWordList( 16, 16 ); -SvStringsDtor aRemoveArr; try { uno::Reference embed::XStorage xStg = comphelper::OStorageHelper::GetStorageFromURL( sShareAutoCorrFile, embed::ElementModes::READ ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/inc sc/qa sc/source
sc/inc/dpobject.hxx |1 sc/qa/unit/ucalc.cxx | 133 +++ sc/source/core/data/dpobject.cxx |6 + 3 files changed, 127 insertions(+), 13 deletions(-) New commits: commit 10a5404fd0fc2da42ba5b293363704af081ae308 Author: Kohei Yoshida kohei.yosh...@suse.com Date: Wed Jan 11 21:10:14 2012 -0500 New test for pivot tables with named source ranges. diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index db8ea92..48e43eb 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -286,6 +286,7 @@ public: ScDocument* mpDoc; public: NameCaches(ScDocument* pDoc); +const ScDPCache* getCache(const rtl::OUString rName) const; const ScDPCache* getCache(const ::rtl::OUString rName, const ScRange rRange); private: void removeCache(const ::rtl::OUString rName); diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 26df2e7..ebb368a 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -133,6 +133,12 @@ public: * Test for pivot table's filtering functionality by page fields. */ void testDataPilotFilters(); + +/** + * Test for pivot table's named source range. + */ +void testDataPilotNamedSource(); + void testSheetCopy(); void testSheetMove(); void testExternalRef(); @@ -185,6 +191,7 @@ public: CPPUNIT_TEST(testDataPilot); CPPUNIT_TEST(testDataPilotLabels); CPPUNIT_TEST(testDataPilotFilters); +CPPUNIT_TEST(testDataPilotNamedSource); CPPUNIT_TEST(testSheetCopy); CPPUNIT_TEST(testSheetMove); CPPUNIT_TEST(testExternalRef); @@ -1152,17 +1159,12 @@ bool checkDPTableOutput(ScDocument* pDoc, const ScRange aOutRange, const char* return true; } -ScDPObject* createDPFromRange( -ScDocument* pDoc, const ScRange rRange, DPFieldDef aFields[], size_t nFieldCount, +ScDPObject* createDPFromSourceDesc( +ScDocument* pDoc, const ScSheetSourceDesc rDesc, DPFieldDef aFields[], size_t nFieldCount, bool bFilterButton) { -SCROW nRow1 = rRange.aStart.Row(), nRow2 = rRange.aEnd.Row(); -SCCOL nCol1 = rRange.aStart.Col(); - -ScSheetSourceDesc aSheetDesc(pDoc); -aSheetDesc.SetSourceRange(rRange); ScDPObject* pDPObj = new ScDPObject(pDoc); -pDPObj-SetSheetDesc(aSheetDesc); +pDPObj-SetSheetDesc(rDesc); pDPObj-SetOutRange(ScAddress(0, 0, 1)); ScPivotParam aParam; pDPObj-FillOldParam(aParam); @@ -1182,16 +1184,16 @@ ScDPObject* createDPFromRange( aSaveData.SetDrillDown(true); // Check the sanity of the source range. -const ScRange rSrcRange = aSheetDesc.GetSourceRange(); -nCol1 = rSrcRange.aStart.Col(); -nRow1 = rSrcRange.aStart.Row(); -nRow2 = rSrcRange.aEnd.Row(); +const ScRange rSrcRange = rDesc.GetSourceRange(); +SCCOL nCol1 = rSrcRange.aStart.Col(); +SCROW nRow1 = rSrcRange.aStart.Row(); +SCROW nRow2 = rSrcRange.aEnd.Row(); CPPUNIT_ASSERT_MESSAGE(source range contains no data!, nRow2 - nRow1 1); // Set the dimension information. for (size_t i = 0; i nFieldCount; ++i) { -OUString aDimName = pDoc-GetString(nCol1+i, nRow1, rRange.aStart.Tab()); +OUString aDimName = pDoc-GetString(nCol1+i, nRow1, rSrcRange.aStart.Tab()); ScDPSaveDimension* pDim = aSaveData.GetDimensionByName(aDimName); pDim-SetOrientation(static_castsal_uInt16(aFields[i].eOrient)); pDim-SetUsedHierarchy(0); @@ -1247,6 +1249,15 @@ ScDPObject* createDPFromRange( return pDPObj; } +ScDPObject* createDPFromRange( +ScDocument* pDoc, const ScRange rRange, DPFieldDef aFields[], size_t nFieldCount, +bool bFilterButton) +{ +ScSheetSourceDesc aSheetDesc(pDoc); +aSheetDesc.SetSourceRange(rRange); +return createDPFromSourceDesc(pDoc, aSheetDesc, aFields, nFieldCount, bFilterButton); +} + } void Test::testDataPilot() @@ -1573,6 +1584,102 @@ void Test::testDataPilotFilters() m_pDoc-DeleteTab(0); } +void Test::testDataPilotNamedSource() +{ +m_pDoc-InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM(Data))); +m_pDoc-InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM(Table))); + +// Dimension definition +DPFieldDef aFields[] = { +{ Name, sheet::DataPilotFieldOrientation_ROW }, +{ Group, sheet::DataPilotFieldOrientation_COLUMN }, +{ Score, sheet::DataPilotFieldOrientation_DATA } +}; + +// Raw data +const char* aData[][3] = { +{ Andy,A, 30 }, +{ Bruce, A, 20 }, +{ Charlie, B, 45 }, +{ David, B, 12 }, +{ Edward, C, 8 }, +{ Frank, C, 15 }, +}; + +size_t nFieldCount = SAL_N_ELEMENTS(aFields); +size_t nDataCount = SAL_N_ELEMENTS(aData); + +// Insert the raw data. +ScRange aSrcRange = insertDPSourceData(m_pDoc, aFields, nFieldCount, aData, nDataCount); +rtl::OUString aRangeStr; +aSrcRange.Format(aRangeStr, SCR_ABS_3D,
[Libreoffice-commits] .: sc/inc sc/qa sc/source
sc/inc/dpobject.hxx |1 sc/qa/unit/ucalc.cxx | 133 +++ sc/source/core/data/dpobject.cxx |6 + 3 files changed, 127 insertions(+), 13 deletions(-) New commits: commit 6a14a5826b9c041d9e3e0878c4a0ecfb46ce Author: Kohei Yoshida kohei.yosh...@suse.com Date: Wed Jan 11 21:10:14 2012 -0500 New test for pivot tables with named source ranges. diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index db8ea92..48e43eb 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -286,6 +286,7 @@ public: ScDocument* mpDoc; public: NameCaches(ScDocument* pDoc); +const ScDPCache* getCache(const rtl::OUString rName) const; const ScDPCache* getCache(const ::rtl::OUString rName, const ScRange rRange); private: void removeCache(const ::rtl::OUString rName); diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index c843eb7..ac683a0 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -133,6 +133,12 @@ public: * Test for pivot table's filtering functionality by page fields. */ void testDataPilotFilters(); + +/** + * Test for pivot table's named source range. + */ +void testDataPilotNamedSource(); + void testSheetCopy(); void testSheetMove(); void testExternalRef(); @@ -185,6 +191,7 @@ public: CPPUNIT_TEST(testDataPilot); CPPUNIT_TEST(testDataPilotLabels); CPPUNIT_TEST(testDataPilotFilters); +CPPUNIT_TEST(testDataPilotNamedSource); CPPUNIT_TEST(testSheetCopy); CPPUNIT_TEST(testSheetMove); CPPUNIT_TEST(testExternalRef); @@ -1152,17 +1159,12 @@ bool checkDPTableOutput(ScDocument* pDoc, const ScRange aOutRange, const char* return true; } -ScDPObject* createDPFromRange( -ScDocument* pDoc, const ScRange rRange, DPFieldDef aFields[], size_t nFieldCount, +ScDPObject* createDPFromSourceDesc( +ScDocument* pDoc, const ScSheetSourceDesc rDesc, DPFieldDef aFields[], size_t nFieldCount, bool bFilterButton) { -SCROW nRow1 = rRange.aStart.Row(), nRow2 = rRange.aEnd.Row(); -SCCOL nCol1 = rRange.aStart.Col(); - -ScSheetSourceDesc aSheetDesc(pDoc); -aSheetDesc.SetSourceRange(rRange); ScDPObject* pDPObj = new ScDPObject(pDoc); -pDPObj-SetSheetDesc(aSheetDesc); +pDPObj-SetSheetDesc(rDesc); pDPObj-SetOutRange(ScAddress(0, 0, 1)); ScPivotParam aParam; pDPObj-FillOldParam(aParam); @@ -1182,16 +1184,16 @@ ScDPObject* createDPFromRange( aSaveData.SetDrillDown(true); // Check the sanity of the source range. -const ScRange rSrcRange = aSheetDesc.GetSourceRange(); -nCol1 = rSrcRange.aStart.Col(); -nRow1 = rSrcRange.aStart.Row(); -nRow2 = rSrcRange.aEnd.Row(); +const ScRange rSrcRange = rDesc.GetSourceRange(); +SCCOL nCol1 = rSrcRange.aStart.Col(); +SCROW nRow1 = rSrcRange.aStart.Row(); +SCROW nRow2 = rSrcRange.aEnd.Row(); CPPUNIT_ASSERT_MESSAGE(source range contains no data!, nRow2 - nRow1 1); // Set the dimension information. for (size_t i = 0; i nFieldCount; ++i) { -OUString aDimName = pDoc-GetString(nCol1+i, nRow1, rRange.aStart.Tab()); +OUString aDimName = pDoc-GetString(nCol1+i, nRow1, rSrcRange.aStart.Tab()); ScDPSaveDimension* pDim = aSaveData.GetDimensionByName(aDimName); pDim-SetOrientation(static_castsal_uInt16(aFields[i].eOrient)); pDim-SetUsedHierarchy(0); @@ -1247,6 +1249,15 @@ ScDPObject* createDPFromRange( return pDPObj; } +ScDPObject* createDPFromRange( +ScDocument* pDoc, const ScRange rRange, DPFieldDef aFields[], size_t nFieldCount, +bool bFilterButton) +{ +ScSheetSourceDesc aSheetDesc(pDoc); +aSheetDesc.SetSourceRange(rRange); +return createDPFromSourceDesc(pDoc, aSheetDesc, aFields, nFieldCount, bFilterButton); +} + } void Test::testDataPilot() @@ -1573,6 +1584,102 @@ void Test::testDataPilotFilters() m_pDoc-DeleteTab(0); } +void Test::testDataPilotNamedSource() +{ +m_pDoc-InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM(Data))); +m_pDoc-InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM(Table))); + +// Dimension definition +DPFieldDef aFields[] = { +{ Name, sheet::DataPilotFieldOrientation_ROW }, +{ Group, sheet::DataPilotFieldOrientation_COLUMN }, +{ Score, sheet::DataPilotFieldOrientation_DATA } +}; + +// Raw data +const char* aData[][3] = { +{ Andy,A, 30 }, +{ Bruce, A, 20 }, +{ Charlie, B, 45 }, +{ David, B, 12 }, +{ Edward, C, 8 }, +{ Frank, C, 15 }, +}; + +size_t nFieldCount = SAL_N_ELEMENTS(aFields); +size_t nDataCount = SAL_N_ELEMENTS(aData); + +// Insert the raw data. +ScRange aSrcRange = insertDPSourceData(m_pDoc, aFields, nFieldCount, aData, nDataCount); +rtl::OUString aRangeStr; +aSrcRange.Format(aRangeStr, SCR_ABS_3D,
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/inc sc/qa sc/source
sc/inc/dpobject.hxx |3 ++- sc/qa/unit/ucalc.cxx | 12 +++- sc/source/core/data/dpobject.cxx | 17 ++--- 3 files changed, 27 insertions(+), 5 deletions(-) New commits: commit c99e8165043041d1989c7d9ad47e89b40af00a56 Author: Kohei Yoshida kohei.yosh...@suse.com Date: Wed Jan 11 22:00:50 2012 -0500 Test code for sheet source data cache relocation. diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 48e43eb..dc20944 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -266,6 +266,7 @@ public: ScDocument* mpDoc; public: SheetCaches(ScDocument* pDoc); +bool hasCache(const ScRange rRange) const; const ScDPCache* getCache(const ScRange rRange); void updateReference( @@ -286,7 +287,7 @@ public: ScDocument* mpDoc; public: NameCaches(ScDocument* pDoc); -const ScDPCache* getCache(const rtl::OUString rName) const; +bool hasCache(const rtl::OUString rName) const; const ScDPCache* getCache(const ::rtl::OUString rName, const ScRange rRange); private: void removeCache(const ::rtl::OUString rName); diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index ebb368a..419ce63 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -1386,6 +1386,16 @@ void Test::testDataPilot() CPPUNIT_ASSERT_MESSAGE(Table output check failed, bSuccess); } +CPPUNIT_ASSERT_MESSAGE(Cache should be here., pDPs-GetSheetCaches().hasCache(aSrcRange)); + +// Swap the two sheets. +m_pDoc-MoveTab(1, 0); +CPPUNIT_ASSERT_MESSAGE(Cache should have moved., !pDPs-GetSheetCaches().hasCache(aSrcRange)); +aSrcRange.aStart.SetTab(1); +aSrcRange.aEnd.SetTab(1); +CPPUNIT_ASSERT_MESSAGE(Cache should be here., pDPs-GetSheetCaches().hasCache(aSrcRange)); + + pDPs-FreeTable(pDPObj2); CPPUNIT_ASSERT_MESSAGE(There shouldn't be any data pilot table stored with the document., pDPs-GetCount() == 0); @@ -1671,7 +1681,7 @@ void Test::testDataPilotNamedSource() CPPUNIT_ASSERT_MESSAGE(Named source range has been altered unexpectedly!, pDesc-GetRangeName().equals(aRangeName)); -CPPUNIT_ASSERT_MESSAGE(Cache should exist., pDPs-GetNameCaches().getCache(aRangeName) != NULL); +CPPUNIT_ASSERT_MESSAGE(Cache should exist., pDPs-GetNameCaches().hasCache(aRangeName)); pDPs-FreeTable(pDPObj); CPPUNIT_ASSERT_MESSAGE(There should be no more tables., pDPs-GetCount() == 0); diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index d384cd9..063c02a 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -2471,6 +2471,18 @@ struct FindInvalidRange : public std::unary_functionScRange, bool } +bool ScDPCollection::SheetCaches::hasCache(const ScRange rRange) const +{ +RangeIndexType::const_iterator it = std::find(maRanges.begin(), maRanges.end(), rRange); +if (it == maRanges.end()) +return false; + +// Already cached. +size_t nIndex = std::distance(maRanges.begin(), it); +CachesType::const_iterator itCache = maCaches.find(nIndex); +return itCache != maCaches.end(); +} + const ScDPCache* ScDPCollection::SheetCaches::getCache(const ScRange rRange) { RangeIndexType::iterator it = std::find(maRanges.begin(), maRanges.end(), rRange); @@ -2565,10 +2577,9 @@ void ScDPCollection::SheetCaches::removeCache(const ScRange rRange) ScDPCollection::NameCaches::NameCaches(ScDocument* pDoc) : mpDoc(pDoc) {} -const ScDPCache* ScDPCollection::NameCaches::getCache(const OUString rName) const +bool ScDPCollection::NameCaches::hasCache(const OUString rName) const { -CachesType::const_iterator itr = maCaches.find(rName); -return itr != maCaches.end() ? itr-second : NULL; +return maCaches.count(rName) != 0; } const ScDPCache* ScDPCollection::NameCaches::getCache(const OUString rName, const ScRange rRange) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sc/inc sc/qa sc/source
sc/inc/dpobject.hxx |3 ++- sc/qa/unit/ucalc.cxx | 12 +++- sc/source/core/data/dpobject.cxx | 17 ++--- 3 files changed, 27 insertions(+), 5 deletions(-) New commits: commit ca73d85cc813a2a95fbbba35be6de6dc5ff2967f Author: Kohei Yoshida kohei.yosh...@suse.com Date: Wed Jan 11 22:00:50 2012 -0500 Test code for sheet source data cache relocation. diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 48e43eb..dc20944 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -266,6 +266,7 @@ public: ScDocument* mpDoc; public: SheetCaches(ScDocument* pDoc); +bool hasCache(const ScRange rRange) const; const ScDPCache* getCache(const ScRange rRange); void updateReference( @@ -286,7 +287,7 @@ public: ScDocument* mpDoc; public: NameCaches(ScDocument* pDoc); -const ScDPCache* getCache(const rtl::OUString rName) const; +bool hasCache(const rtl::OUString rName) const; const ScDPCache* getCache(const ::rtl::OUString rName, const ScRange rRange); private: void removeCache(const ::rtl::OUString rName); diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index ac683a0..b9e3013 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -1386,6 +1386,16 @@ void Test::testDataPilot() CPPUNIT_ASSERT_MESSAGE(Table output check failed, bSuccess); } +CPPUNIT_ASSERT_MESSAGE(Cache should be here., pDPs-GetSheetCaches().hasCache(aSrcRange)); + +// Swap the two sheets. +m_pDoc-MoveTab(1, 0); +CPPUNIT_ASSERT_MESSAGE(Cache should have moved., !pDPs-GetSheetCaches().hasCache(aSrcRange)); +aSrcRange.aStart.SetTab(1); +aSrcRange.aEnd.SetTab(1); +CPPUNIT_ASSERT_MESSAGE(Cache should be here., pDPs-GetSheetCaches().hasCache(aSrcRange)); + + pDPs-FreeTable(pDPObj2); CPPUNIT_ASSERT_MESSAGE(There shouldn't be any data pilot table stored with the document., pDPs-GetCount() == 0); @@ -1671,7 +1681,7 @@ void Test::testDataPilotNamedSource() CPPUNIT_ASSERT_MESSAGE(Named source range has been altered unexpectedly!, pDesc-GetRangeName().equals(aRangeName)); -CPPUNIT_ASSERT_MESSAGE(Cache should exist., pDPs-GetNameCaches().getCache(aRangeName) != NULL); +CPPUNIT_ASSERT_MESSAGE(Cache should exist., pDPs-GetNameCaches().hasCache(aRangeName)); pDPs-FreeTable(pDPObj); CPPUNIT_ASSERT_MESSAGE(There should be no more tables., pDPs-GetCount() == 0); diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index d384cd9..063c02a 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -2471,6 +2471,18 @@ struct FindInvalidRange : public std::unary_functionScRange, bool } +bool ScDPCollection::SheetCaches::hasCache(const ScRange rRange) const +{ +RangeIndexType::const_iterator it = std::find(maRanges.begin(), maRanges.end(), rRange); +if (it == maRanges.end()) +return false; + +// Already cached. +size_t nIndex = std::distance(maRanges.begin(), it); +CachesType::const_iterator itCache = maCaches.find(nIndex); +return itCache != maCaches.end(); +} + const ScDPCache* ScDPCollection::SheetCaches::getCache(const ScRange rRange) { RangeIndexType::iterator it = std::find(maRanges.begin(), maRanges.end(), rRange); @@ -2565,10 +2577,9 @@ void ScDPCollection::SheetCaches::removeCache(const ScRange rRange) ScDPCollection::NameCaches::NameCaches(ScDocument* pDoc) : mpDoc(pDoc) {} -const ScDPCache* ScDPCollection::NameCaches::getCache(const OUString rName) const +bool ScDPCollection::NameCaches::hasCache(const OUString rName) const { -CachesType::const_iterator itr = maCaches.find(rName); -return itr != maCaches.end() ? itr-second : NULL; +return maCaches.count(rName) != 0; } const ScDPCache* ScDPCollection::NameCaches::getCache(const OUString rName, const ScRange rRange) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 5 commits - sfx2/inc sfx2/source svx/inc svx/source
sfx2/inc/sfx2/docfile.hxx|5 --- sfx2/inc/sfx2/docinsert.hxx | 15 - sfx2/source/doc/docinsert.cxx| 39 ++-- svx/inc/svx/numfmtsh.hxx |8 - svx/inc/svx/srchdlg.hxx |4 +- svx/source/dialog/srchdlg.cxx| 52 +--- svx/source/items/clipfmtitem.cxx | 62 +-- 7 files changed, 62 insertions(+), 123 deletions(-) New commits: commit 8be35fc8c1f24a05deb6ba850ad42ca17352350e Author: August Sodora aug...@gmail.com Date: Wed Jan 11 22:18:58 2012 -0500 SvStringsDtor-std::vector diff --git a/sfx2/inc/sfx2/docinsert.hxx b/sfx2/inc/sfx2/docinsert.hxx index 292b396..6ec9627 100644 --- a/sfx2/inc/sfx2/docinsert.hxx +++ b/sfx2/inc/sfx2/docinsert.hxx @@ -39,20 +39,11 @@ namespace sfx2 { class FileDialogHelper; } class SfxMedium; class SfxItemSet; -class SvStringsDtor; typedef ::std::vector SfxMedium* SfxMediumList; -// - namespace sfx2 { -// - -// -// DocumentInserter -// - class SFX2_DLLPUBLIC DocumentInserter { private: @@ -65,7 +56,7 @@ private: sfx2::FileDialogHelper* m_pFileDlg; SfxItemSet* m_pItemSet; -SvStringsDtor* m_pURLList; +std::vectorrtl::OUString m_pURLList; DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* ); @@ -82,12 +73,8 @@ public: inline String GetFilter() const { return m_sFilter; } }; -// - } // namespace sfx2 -// - #endif // _SFX_DOCINSERT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index c103116..d40f65a 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -57,16 +57,8 @@ using namespace ::com::sun::star::uno; // implemented in 'sfx2/source/appl/appopen.cxx' extern sal_uInt32 CheckPasswd_Impl( SfxObjectShell* pDoc, SfxItemPool rPool, SfxMedium* pFile ); -// === - namespace sfx2 { -// === - -// === -// DocumentInserter -// === - DocumentInserter::DocumentInserter( const String rFactory, bool const bEnableMultiSelection) : @@ -77,8 +69,6 @@ DocumentInserter::DocumentInserter( , m_nError ( ERRCODE_NONE ) , m_pFileDlg( NULL ) , m_pItemSet( NULL ) -, m_pURLList( NULL ) - { } @@ -91,7 +81,6 @@ void DocumentInserter::StartExecuteModal( const Link _rDialogClosedLink ) { m_aDialogClosedLink = _rDialogClosedLink; m_nError = ERRCODE_NONE; -DELETEZ( m_pURLList ); if ( !m_pFileDlg ) { m_pFileDlg = new FileDialogHelper( @@ -104,10 +93,10 @@ void DocumentInserter::StartExecuteModal( const Link _rDialogClosedLink ) SfxMedium* DocumentInserter::CreateMedium() { SfxMedium* pMedium = NULL; -if ( !m_nError m_pItemSet m_pURLList m_pURLList-Count() 0 ) +if (!m_nError m_pItemSet !m_pURLList.empty()) { -DBG_ASSERT( m_pURLList-Count() == 1, DocumentInserter::CreateMedium(): invalid URL list count ); -String sURL = *( m_pURLList-GetObject(0) ); +DBG_ASSERT( m_pURLList.size() == 1, DocumentInserter::CreateMedium(): invalid URL list count ); +String sURL(m_pURLList[0]); pMedium = new SfxMedium( sURL, SFX_STREAM_READONLY, sal_False, SFX_APP()-GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet ); @@ -137,15 +126,12 @@ SfxMedium* DocumentInserter::CreateMedium() SfxMediumList* DocumentInserter::CreateMediumList() { SfxMediumList* pMediumList = new SfxMediumList; -if ( !m_nError m_pItemSet m_pURLList m_pURLList-Count() 0 ) +if (!m_nError m_pItemSet !m_pURLList.empty()) { -sal_Int32 i = 0; -sal_Int32 nCount = m_pURLList-Count(); -for ( ; i nCount; ++i ) +for(std::vectorrtl::OUString::const_iterator i = m_pURLList.begin(); i != m_pURLList.end(); ++i) { -String sURL = *( m_pURLList-GetObject( static_cast sal_uInt16 (i) ) ); SfxMedium* pMedium = new SfxMedium( -sURL, SFX_STREAM_READONLY, sal_False, +*i, SFX_STREAM_READONLY, sal_False,
[Libreoffice-commits] .: svx/source
svx/source/items/clipfmtitem.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 59cc5f6e39b7e81e4af245473f09c7446f6facfd Author: August Sodora aug...@gmail.com Date: Wed Jan 11 23:02:11 2012 -0500 Fix build on MacOSX diff --git a/svx/source/items/clipfmtitem.cxx b/svx/source/items/clipfmtitem.cxx index d8f7f64..24f550c 100644 --- a/svx/source/items/clipfmtitem.cxx +++ b/svx/source/items/clipfmtitem.cxx @@ -34,7 +34,7 @@ struct SvxClipboardFmtItem_Impl { -boost::ptr_vectorboost::nullableString aFmtNms; +boost::ptr_vector boost::nullableString aFmtNms; std::vectorsal_uIntPtr aFmtIds; static String sEmptyStr; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 4 commits - sfx2/inc sfx2/source
sfx2/inc/sfx2/filedlghelper.hxx | 11 +-- sfx2/inc/sfx2/macropg.hxx|6 --- sfx2/inc/sfx2/viewsh.hxx |1 sfx2/source/appl/appopen.cxx | 15 - sfx2/source/appl/linkmgr2.cxx|3 - sfx2/source/dialog/filedlghelper.cxx | 54 +++ sfx2/source/dialog/filedlgimpl.hxx |4 +- sfx2/source/dialog/templdlg.cxx | 24 +++ 8 files changed, 40 insertions(+), 78 deletions(-) New commits: commit 5c445208a184fb88d8de0855be279e98d54dfad1 Author: August Sodora aug...@gmail.com Date: Wed Jan 11 23:54:28 2012 -0500 SvStringsDtor-std::vector diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 4e60a86..1c51c40 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1320,7 +1320,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags) SfxStyleSheetBase *pStyle = pStyleSheetPool-First(); SvLBoxEntry* pEntry = aFmtLb.First(); -SvStringsDtor aStrings; +std::vectorrtl::OUString aStrings; comphelper::string::NaturalStringSorter aSorter( ::comphelper::getProcessComponentContext(), @@ -1329,21 +1329,19 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags) while( pStyle ) { //Bubblesort -sal_uInt16 nPos; -for( nPos = aStrings.Count() ; nPos -aSorter.compare(*(aStrings[nPos-1]), pStyle-GetName()) 0 ; nPos--) +size_t nPos; +for(nPos = aStrings.size(); nPos aSorter.compare(aStrings[nPos-1], pStyle-GetName()) 0; --nPos) {}; -aStrings.Insert( new String( pStyle-GetName() ), nPos ); +aStrings.insert(aStrings.begin() + nPos, pStyle-GetName()); pStyle = pStyleSheetPool-Next(); } - -sal_uInt16 nCount = aStrings.Count(); -sal_uInt16 nPos = 0; -while( nPos nCount pEntry - *aStrings[ nPos ] == aFmtLb.GetEntryText( pEntry ) ) +size_t nCount = aStrings.size(); +size_t nPos = 0; +while(nPos nCount pEntry + aStrings[nPos] == rtl::OUString(aFmtLb.GetEntryText(pEntry))) { -nPos++; +++nPos; pEntry = aFmtLb.Next( pEntry ); } @@ -1353,8 +1351,8 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags) aFmtLb.SetUpdateMode(sal_False); aFmtLb.Clear(); -for(nPos = 0 ; nPos nCount ; ++nPos ) -aFmtLb.InsertEntry( *aStrings.GetObject( nPos ), 0, sal_False, nPos); +for(nPos = 0; nPos nCount; ++nPos) +aFmtLb.InsertEntry(aStrings[nPos], 0, sal_False, nPos); aFmtLb.SetUpdateMode(true); } commit 17964c4f5a3aa25099b62db0e7652905cdf051a1 Author: August Sodora aug...@gmail.com Date: Wed Jan 11 23:48:30 2012 -0500 Remove unused locals diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index b7c5f2a..b7a4970 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -300,9 +300,6 @@ void LinkManager::UpdateAllLinks( sal_Bool bUpdateGrfLinks, Window* pParentWin ) { -SvStringsDtor aApps, aTopics, aItems; -String sApp, sTopic, sItem; - // First make a copy of the array in order to update links // links in ... no contact between them! SvPtrarr aTmpArr( 255, 50 ); commit 5cf36e9739a46ce20c4a3588962a04c6c4d1a72d Author: August Sodora aug...@gmail.com Date: Wed Jan 11 23:46:52 2012 -0500 Remove unnecessary forward declaration diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx index 07cbdec..869de36 100644 --- a/sfx2/inc/sfx2/viewsh.hxx +++ b/sfx2/inc/sfx2/viewsh.hxx @@ -65,7 +65,6 @@ class SfxFrameSetDescriptor; class Printer; class SfxPrinter; class SfxProgress; -class SvStringsDtor; class SfxFrameItem; class Dialog; class Menu; commit 3ea8ee202832294adc09c0b1fd1c26cb87ca7cbf Author: August Sodora aug...@gmail.com Date: Wed Jan 11 23:44:05 2012 -0500 SvStringsDtor-std::vector diff --git a/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx index 3b3835b..faf2040 100644 --- a/sfx2/inc/sfx2/filedlghelper.hxx +++ b/sfx2/inc/sfx2/filedlghelper.hxx @@ -68,11 +68,8 @@ namespace com } class SfxItemSet; -class SvStringsDtor; class Window; -//- - // the SFXWB constants are for the nFlags parameter of the constructor #define SFXWB_INSERT0x0400L // turn Open into Insert dialog #define SFXWB_EXPORT0x4000L // turn Save into Export dialog @@ -85,8 +82,6
[Libreoffice-commits] .: 2 commits - l10ntools/scripts
l10ntools/scripts/fast_merge.pl | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) New commits: commit 196885980bbb51562264cb5aad9a3e01133d1d7d Author: David Tardon dtar...@redhat.com Date: Wed Jan 11 14:04:54 2012 +0100 fix writing of strings from the first module diff --git a/l10ntools/scripts/fast_merge.pl b/l10ntools/scripts/fast_merge.pl index 5dc63cf..cc632e4 100644 --- a/l10ntools/scripts/fast_merge.pl +++ b/l10ntools/scripts/fast_merge.pl @@ -89,11 +89,10 @@ while( hasLines() ) } write_lines(); } -if( $#current+1 ne 0 ) +# write content of the last localize.sdf file +if( $#buffer ge 0 ) { -( $path , $localize_file ) = make_paths(); -add_to_buffer(); -write_buffer( $path , $localize_file ); +write_buffer( $last_path , $last_localize_file ); } release_lock(); exit( 0 ); @@ -248,15 +247,14 @@ sub make_paths return ( $path , $localizeFile ); } + sub write_lines { if( $first_run ){ -add_to_buffer(); my( $path , $localize_file ) = make_paths(); $last_path = $path; $last_localize_file = $localize_file; -mkpath $path; -write_buffer( $path , $localize_file ); +add_to_buffer(); $first_run = ''; } else @@ -269,7 +267,6 @@ sub write_lines } else { -mkpath $path; write_buffer( $last_path , $last_localize_file ); add_to_buffer(); $last_path = $path; @@ -277,6 +274,11 @@ sub write_lines } } } + +# Adds all lines that contain strings from one source file from every input file. +# TODO: Would it not be better to add lines for all files from a directory (i.e., replace +# $afile eq $elem-file by $adir eq $elem-dir)? We could get rid of the delayed +# writing then. But maybe there is a reason for doing it this way... sub add_to_buffer { my $plainline; @@ -293,12 +295,15 @@ sub add_to_buffer } while ( !$elem-endoffile $amodule eq $elem-module $afile eq $elem-file ); } } + +# Writes the buffer to currently selected localize.sdf file. sub write_buffer { my $path= shift; my $localize_file = shift; my $cnt = $#buffer+1; print Write to $path $cnt lines\n; +mkpath $path; open FILE , $localize_file or die Can't open file '$localize_file'\n; foreach ( @buffer ) { commit 4ce9896c6ac42d450d2056ee8d700b9f6dce8e2d Author: David Tardon dtar...@redhat.com Date: Wed Jan 11 11:42:09 2012 +0100 Revert fast_merge: fix mis-merge of first module's strings This is not enough, because the file is still wrong. This reverts commit 47a8454f5f76030203ce6458cf63d4348bdacffe. diff --git a/l10ntools/scripts/fast_merge.pl b/l10ntools/scripts/fast_merge.pl index 73b824e..5dc63cf 100644 --- a/l10ntools/scripts/fast_merge.pl +++ b/l10ntools/scripts/fast_merge.pl @@ -91,7 +91,7 @@ while( hasLines() ) } if( $#current+1 ne 0 ) { -( $path , $localize_file ) = make_paths($current[ 0 ]-module); +( $path , $localize_file ) = make_paths(); add_to_buffer(); write_buffer( $path , $localize_file ); } @@ -240,8 +240,7 @@ sub hasLines sub make_paths { -my $module = shift ; -my $localizeFile = $merge_dir.\\.$module.\\.$current[ 0 ]-file; +my $localizeFile = $merge_dir.\\.$current[ 0 ]-module.\\.$current[ 0 ]-file; my $path = getDir( $localizeFile ); $path =~ s/\\/\//g; @@ -252,9 +251,8 @@ sub make_paths sub write_lines { if( $first_run ){ -my $module = $current[ 0 ]-module; add_to_buffer(); -my( $path , $localize_file ) = make_paths($module); +my( $path , $localize_file ) = make_paths(); $last_path = $path; $last_localize_file = $localize_file; mkpath $path; @@ -264,7 +262,7 @@ sub write_lines else { return , if ( $#current+1 eq 0 ); -my( $path , $localize_file ) = make_paths($current[ 0 ]-module); +my( $path , $localize_file ) = make_paths(); if( $path eq $last_path ) { add_to_buffer(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: l10ntools/scripts
l10ntools/scripts/fast_merge.pl |1 + 1 file changed, 1 insertion(+) New commits: commit 0df9d7c05d6fd31824fd76710c3c6c5e723dbdec Author: David Tardon dtar...@redhat.com Date: Thu Jan 12 06:15:23 2012 +0100 close opened file diff --git a/l10ntools/scripts/fast_merge.pl b/l10ntools/scripts/fast_merge.pl index cc632e4..7074bea 100644 --- a/l10ntools/scripts/fast_merge.pl +++ b/l10ntools/scripts/fast_merge.pl @@ -309,6 +309,7 @@ sub write_buffer { print FILE $_.\n; } +close ( FILE ); @buffer = (); } sub parse_options ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sc/qa
sc/qa/unit/data/contentCSV/rangeExp_Sheet2.csv |1 + sc/qa/unit/data/ods/named-ranges-global.ods|binary sc/qa/unit/data/xls/named-ranges-global.xls|binary sc/qa/unit/data/xlsx/named-ranges-global.xlsx |binary 4 files changed, 1 insertion(+) New commits: commit c82de8f8eb39d72394c82b1a29c8566f42302867 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu Jan 12 04:28:55 2012 +0100 add test for range name import, related fdo#42624 this adds range names referencing range names that are loaded after the referencing range name diff --git a/sc/qa/unit/data/contentCSV/rangeExp_Sheet2.csv b/sc/qa/unit/data/contentCSV/rangeExp_Sheet2.csv index 24778a9..f6d5971 100644 --- a/sc/qa/unit/data/contentCSV/rangeExp_Sheet2.csv +++ b/sc/qa/unit/data/contentCSV/rangeExp_Sheet2.csv @@ -3,3 +3,4 @@ 0 1, 2, 3 4, 5, 6 +5 diff --git a/sc/qa/unit/data/ods/named-ranges-global.ods b/sc/qa/unit/data/ods/named-ranges-global.ods index 8a8bbe2..84f79ac 100644 Binary files a/sc/qa/unit/data/ods/named-ranges-global.ods and b/sc/qa/unit/data/ods/named-ranges-global.ods differ diff --git a/sc/qa/unit/data/xls/named-ranges-global.xls b/sc/qa/unit/data/xls/named-ranges-global.xls index 993c8af..7ab1b7b 100644 Binary files a/sc/qa/unit/data/xls/named-ranges-global.xls and b/sc/qa/unit/data/xls/named-ranges-global.xls differ diff --git a/sc/qa/unit/data/xlsx/named-ranges-global.xlsx b/sc/qa/unit/data/xlsx/named-ranges-global.xlsx index e3fa9fb..3bb0cbc 100644 Binary files a/sc/qa/unit/data/xlsx/named-ranges-global.xlsx and b/sc/qa/unit/data/xlsx/named-ranges-global.xlsx differ ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: RepositoryExternal.mk
RepositoryExternal.mk |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 6b951e82748eb25aeb3976043c530b8f5debc0a3 Author: Matúš Kukan matus.ku...@gmail.com Date: Thu Jan 12 08:23:06 2012 +0100 trying to fix windows build: include proper npapi.h diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 514a5b7..f37cc10 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -909,8 +909,8 @@ ifeq ($(SYSTEM_MOZILLA_HEADERS),YES) define gb_LinkTarget__use_mozilla_headers $(eval $(call gb_LinkTarget_set_include,$(1),\ - $$(INCLUDE) \ $(MOZILLA_HEADERS_CFLAGS) + $$(INCLUDE) \ )) endef @@ -918,8 +918,8 @@ else #!SYSTEM_MOZILLA_HEADERS define gb_LinkTarget__use_mozilla_headers $(eval $(call gb_LinkTarget_set_include,$(1),\ - $$(INCLUDE) \ -I$(OUTDIR)/inc/npsdk \ + $$(INCLUDE) \ )) endef ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: RepositoryExternal.mk
RepositoryExternal.mk |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 66458f367ac045c5e263271b58ed4b0068644ac9 Author: Matúš Kukan matus.ku...@gmail.com Date: Thu Jan 12 08:53:20 2012 +0100 typo: missing \ diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index f37cc10..c2efb60 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -909,9 +909,10 @@ ifeq ($(SYSTEM_MOZILLA_HEADERS),YES) define gb_LinkTarget__use_mozilla_headers $(eval $(call gb_LinkTarget_set_include,$(1),\ - $(MOZILLA_HEADERS_CFLAGS) + $(MOZILLA_HEADERS_CFLAGS) \ $$(INCLUDE) \ )) + endef else #!SYSTEM_MOZILLA_HEADERS @@ -921,6 +922,7 @@ $(eval $(call gb_LinkTarget_set_include,$(1),\ -I$(OUTDIR)/inc/npsdk \ $$(INCLUDE) \ )) + endef endif #SYSTEM_MOZILLA_HEADERS ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits