[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 18 commits - cli_ure/source desktop/source external/hunspell i18npool/source include/svtools instsetoo_native/CustomTarget_setup.mk lingucomponent/source offapi/com oox/source sc/inc sc/source sd/qa sfx2/source svtools/source svx/source sw/source vcl/source writerfilter/source
LuboÅ¡ LuÅák
l.lunak at collabora.com
Thu May 1 03:33:39 PDT 2014
cli_ure/source/native/native_bootstrap.cxx | 2
desktop/source/deployment/misc/dp_dependencies.cxx | 15 +
external/hunspell/UnpackedTarball_hunspell.mk | 1
external/hunspell/hunspell-fdo48017-wfopen.patch | 110 +++++++++
i18npool/source/collator/collator_unicode.cxx | 119 +++++++++
i18npool/source/collator/gencoll_rule.cxx | 2
include/svtools/treelist.hxx | 4
instsetoo_native/CustomTarget_setup.mk | 2
lingucomponent/source/spellcheck/spell/sspellimp.cxx | 13 -
offapi/com/sun/star/graphic/XGraphicTransformer.idl | 10
oox/source/drawingml/fillproperties.cxx | 26 +-
sc/inc/column.hxx | 8
sc/inc/table.hxx | 3
sc/source/core/data/column.cxx | 24 +
sc/source/core/data/column3.cxx | 7
sc/source/core/data/column4.cxx | 11
sc/source/core/data/document10.cxx | 3
sc/source/core/data/table3.cxx | 9
sc/source/core/data/table7.cxx | 5
sc/source/core/opencl/formulagroupcl.cxx | 2
sc/source/ui/cctrl/checklistmenu.cxx | 34 ++
sc/source/ui/inc/checklistmenu.hxx | 4
sd/qa/unit/data/xml/shapes-test_page3.xml | 230 +++++++++----------
sfx2/source/dialog/tabdlg.cxx | 12
svtools/source/contnr/treelist.cxx | 11
svtools/source/graphic/transformer.cxx | 17 +
svtools/source/graphic/transformer.hxx | 5
svx/source/svdraw/svdopath.cxx | 4
sw/source/ui/wrtsh/delete.cxx | 5
vcl/source/gdi/outdev2.cxx | 10
writerfilter/source/dmapper/GraphicImport.cxx | 4
31 files changed, 537 insertions(+), 175 deletions(-)
New commits:
commit 1bad7ad98a41725907b6cb2a0a8486e0891ac306
Author: LuboÅ¡ LuÅák <l.lunak at collabora.com>
Date: Wed Apr 30 22:19:08 2014 +0200
handle brightness+contrast from msoffice (bnc#875713)
This is the same like 1139d618b8bc6ab823a96184bd0f0257980aad24, for docx.
(cherry picked from commit 893fe88469dec5b727d96f8ea1b4edb9e88288a7)
Conflicts:
oox/source/drawingml/fillproperties.cxx
Change-Id: I1ef4e18444e8c60e9ae8f67249bcef1053f0d62d
Reviewed-on: https://gerrit.libreoffice.org/9217
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/offapi/com/sun/star/graphic/XGraphicTransformer.idl b/offapi/com/sun/star/graphic/XGraphicTransformer.idl
index d1a6ddf..dbd9c8d 100644
--- a/offapi/com/sun/star/graphic/XGraphicTransformer.idl
+++ b/offapi/com/sun/star/graphic/XGraphicTransformer.idl
@@ -51,6 +51,16 @@ interface XGraphicTransformer : ::com::sun::star::uno::XInterface
com::sun::star::graphic::XGraphic applyDuotone( [ in ] com::sun::star::graphic::XGraphic In,
[ in ] long ColorOne, [ in ] long ColorTwo )
raises( ::com::sun::star::lang::IllegalArgumentException );
+
+ /** changes brightness/contrast
+
+ @param mso whether to use MSOffice brightness/contrast formula
+ @returns
+ The modified graphic
+ */
+ com::sun::star::graphic::XGraphic applyBrightnessContrast( [ in ] com::sun::star::graphic::XGraphic In,
+ [ in ] long brightness, [ in ] long contrast, [ in ] boolean mso )
+ raises( ::com::sun::star::lang::IllegalArgumentException );
};
} ; } ; } ; } ;
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index c96c77a..99026a9 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -92,6 +92,18 @@ Reference< XGraphic > lclCheckAndApplyChangeColorTransform( const BlipFillProper
return xGraphic;
}
+Reference< XGraphic > applyBrightnessContrast( Reference< XGraphic > xGraphic, sal_Int32 brightness, sal_Int32 contrast )
+{
+ try
+ {
+ Reference< XGraphicTransformer > xTransformer( xGraphic, UNO_QUERY_THROW );
+ xGraphic = xTransformer->applyBrightnessContrast( xGraphic, brightness, contrast, true );
+ }
+ catch( Exception& )
+ {
+ }
+ return xGraphic;
+}
BitmapMode lclGetBitmapMode( sal_Int32 nToken )
@@ -501,12 +513,24 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr ) const
{
+ sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 );
+ sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 );
if( maBlipProps.mxGraphic.is() )
{
// created transformed graphic
Reference< XGraphic > xGraphic = lclCheckAndApplyDuotoneTransform( maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, nPhClr );
xGraphic = lclCheckAndApplyChangeColorTransform( maBlipProps, xGraphic, rGraphicHelper, nPhClr );
+ // MSO uses a different algorithm for contrast+brightness, LO applies contrast before brightness,
+ // while MSO apparently applies half of brightness before contrast and half after. So if only
+ // contrast or brightness need to be altered, the result is the same, but if both are involved,
+ // there's no way to map that, so just force a conversion of the image.
+ if( nBrightness != 0 && nContrast != 0 )
+ {
+ xGraphic = applyBrightnessContrast( xGraphic, nBrightness, nContrast );
+ nBrightness = 0;
+ nContrast = 0;
+ }
rPropMap[ PROP_Graphic ] <<= xGraphic;
// do we still need to set GraphicURL as well? (TODO)
@@ -545,10 +569,8 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
rPropMap[ PROP_GraphicColorMode ] <<= eColorMode;
// brightness and contrast
- sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 );
if( nBrightness != 0 )
rPropMap[ PROP_AdjustLuminance ] <<= nBrightness;
- sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 );
if( nContrast != 0 )
rPropMap[ PROP_AdjustContrast ] <<= nContrast;
diff --git a/svtools/source/graphic/transformer.cxx b/svtools/source/graphic/transformer.cxx
index 30f07c7..bf63621 100644
--- a/svtools/source/graphic/transformer.cxx
+++ b/svtools/source/graphic/transformer.cxx
@@ -159,6 +159,23 @@ uno::Reference< graphic::XGraphic > SAL_CALL GraphicTransformer::applyDuotone(
return xRet;
}
+uno::Reference< graphic::XGraphic > SAL_CALL GraphicTransformer::applyBrightnessContrast(
+ const uno::Reference< graphic::XGraphic >& rxGraphic, sal_Int32 nBrightness, sal_Int32 nContrast, sal_Bool mso )
+ throw ( lang::IllegalArgumentException, uno::RuntimeException, std::exception)
+{
+ const uno::Reference< uno::XInterface > xIFace( rxGraphic, uno::UNO_QUERY );
+ ::Graphic aGraphic( *::unographic::Graphic::getImplementation( xIFace ) );
+
+ BitmapEx aBitmapEx( aGraphic.GetBitmapEx() );
+ aBitmapEx.Adjust( nBrightness, nContrast, 0, 0, 0, 0, false, mso );
+ aGraphic = ::Graphic( aBitmapEx );
+
+ ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic();
+ pUnoGraphic->init( aGraphic );
+ uno::Reference< graphic::XGraphic > xRet( pUnoGraphic );
+ return xRet;
+}
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/graphic/transformer.hxx b/svtools/source/graphic/transformer.hxx
index e57b8fa..1707183 100644
--- a/svtools/source/graphic/transformer.hxx
+++ b/svtools/source/graphic/transformer.hxx
@@ -51,6 +51,11 @@ class GraphicTransformer : public GraphicTransformer_UnoImplHelper1
sal_Int32 nColorOne, sal_Int32 nColorTwo )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL applyBrightnessContrast(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& rxGraphic,
+ sal_Int32 nBrightness, sal_Int32 nContrast, sal_Bool mso )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+
};
}
commit c4175ed91e1df8715166715f75ed2c9e3d815a64
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Apr 4 18:47:28 2014 +0200
ignore legacy OpenOffice.org-*-version, when a LibreOffice-*-version is given
Change-Id: Ie5b6ffee07b6e5ebf922bad1b4a268ff636412c9
Reviewed-on: https://gerrit.libreoffice.org/8853
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
(cherry picked from commit 42905aecfcdee9eb2c184bceeec4f8688056cd73)
Reviewed-on: https://gerrit.libreoffice.org/9207
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx
index 817c9b4..696d3a7 100644
--- a/desktop/source/deployment/misc/dp_dependencies.cxx
+++ b/desktop/source/deployment/misc/dp_dependencies.cxx
@@ -103,18 +103,29 @@ check(dp_misc::DescriptionInfoset const & infoset) {
css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > >
unsatisfied(n);
sal_Int32 unsat = 0;
+ // check first if minimalVersionLibreOffice is specified -- in that case ignore the legacy OOo dependencies
+ bool bIgnoreOoo = false;
+ for (sal_Int32 i = 0; i < n; ++i) {
+ css::uno::Reference< css::xml::dom::XElement > e(
+ deps->item(i), css::uno::UNO_QUERY_THROW);
+ if ( e->getNamespaceURI() == namespaceLibreOffice && e->getTagName() == minimalVersionLibreOffice)
+ {
+ bIgnoreOoo = true;
+ break;
+ }
+ }
for (sal_Int32 i = 0; i < n; ++i) {
css::uno::Reference< css::xml::dom::XElement > e(
deps->item(i), css::uno::UNO_QUERY_THROW);
bool sat = false;
if ( e->getNamespaceURI() == namespaceOpenOfficeOrg && e->getTagName() == minimalVersionOpenOfficeOrg )
{
- sat = satisfiesMinimalVersion(
+ sat = bIgnoreOoo || satisfiesMinimalVersion(
getReferenceOpenOfficeOrgMajorMinor(),
e->getAttribute("value"));
} else if ( e->getNamespaceURI() == namespaceOpenOfficeOrg && e->getTagName() == maximalVersionOpenOfficeOrg )
{
- sat = satisfiesMaximalVersion(
+ sat = bIgnoreOoo || satisfiesMaximalVersion(
getReferenceOpenOfficeOrgMajorMinor(),
e->getAttribute("value"));
} else if (e->getNamespaceURI() == namespaceLibreOffice && e->getTagName() == minimalVersionLibreOffice )
commit 63ab98a45a27873511906e4ffa4d32fef0901ce1
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Apr 4 18:17:57 2014 +0200
set OOo reference version to 4.1 for incompatible MessageBox changes
This commit:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=805c6101b3427cc98b53f1c48f22f705206c384d
make LibreOffice 4.2 (and AOO 4.1) widely incompatible to previous
versions. We should thus update the reference version to 4.1 as that is
the version we are least incompatible with. Extension developers are
encouraged to use LibreOffice-minimal-version instead anyway, instead of
the obsolete OOo versioning. see:
https://wiki.documentfoundation.org/Development/Extension_Development
https://gerrit.libreoffice.org/gitweb?p=sdk-examples.git;a=commitdiff;h=61f9ca7b18de1adc58cf5d7cb295ba81eb3e5d92;hp=20b8edc74b846db6d143a9e327fb7f7eb2c1fb77
Change-Id: I8275a8244d642100d7b3bc17aa0b12ae7d63e583
Reviewed-on: https://gerrit.libreoffice.org/8852
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
(cherry picked from commit ab67b79c7469cea7de82b6eb6ca1f690063c069c)
Reviewed-on: https://gerrit.libreoffice.org/9208
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/instsetoo_native/CustomTarget_setup.mk b/instsetoo_native/CustomTarget_setup.mk
index 81d48b6..3b73589 100644
--- a/instsetoo_native/CustomTarget_setup.mk
+++ b/instsetoo_native/CustomTarget_setup.mk
@@ -164,7 +164,7 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
&& echo 'ExtensionUpdateURL=http://updateexte.libreoffice.org/ExtensionUpdateService/check.Update' \
&& echo 'ProductMajor=$(LIBO_VERSION_MAJOR)$(LIBO_VERSION_MINOR)$(LIBO_VERSION_MICRO)' \
&& echo 'ProductMinor=$(LIBO_VERSION_PATCH)' \
- && echo 'ReferenceOOoMajorMinor=3.4' \
+ && echo 'ReferenceOOoMajorMinor=4.1' \
&& echo 'UpdateID=$(PRODUCTNAME)_$(LIBO_VERSION_MAJOR)_en-US' \
&& echo 'UpdateURL=$(if $(ENABLE_ONLINE_UPDATE),http://update.libreoffice.org/check.php$(if $(filter-out WNT,$(OS)),?pkgfmt=$(PKGFORMAT)))' \
&& echo 'UpdateUserAgent=<PRODUCT> ($${buildid}; $${_OS}; $${_ARCH}; BundledLanguages=$${AllLanguages})' \
commit 7a92cf692548b8f7e0b2ec7633c8c420d6d6b30d
Author: Eike Rathke <erack at redhat.com>
Date: Wed Apr 30 17:51:05 2014 +0100
resolve crashes with ICU 53.1 in locales with collator data, fdo#77071
ICU 53.1 changed API behavior:
https://ssl.icu-project.org/apiref/icu4c/classicu_1_1RuleBasedCollator.html#a2f4c7eeaf020ad68e3bd9722dd272357
isn't correct anymore:
length: size of the image. If negative, the API will try to figure out the
length of the image
NO, IT WILL NOT! It bails out with an error instead.
Introduced a function to obtain the length for each collator data.
base: collator, usually root. The base is required to be present through the
lifetime of the collator. Currently it cannot be NULL.
NOT "usually root"! There's a check now that bails out if
if(base->tailoring != CollationRoot::getRoot(errorCode))
So using an instance created with icu::Locale::getRoot()
(cherry picked from commit a3c627fe38236e82bc6008075d862b3cbfbd9ce3)
Conflicts:
i18npool/source/collator/collator_unicode.cxx
Backported.
make DISABLE_DYNLOADING on Android happy, fdo#77071 related
(cherry picked from commit dc7ba1af236ec28d399eff833d56608fde9fb70d)
Change-Id: Ia9c4e27d5ef4f8083bbe57e4e2f4b3ff63bb42ed
Reviewed-on: https://gerrit.libreoffice.org/9215
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
index 90dd2f3b..42dfef3 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -84,6 +84,27 @@ const sal_uInt8* get_collator_data_zh_radical();
const sal_uInt8* get_collator_data_zh_stroke();
const sal_uInt8* get_collator_data_zh_zhuyin();
+size_t get_collator_data_ca_charset_length();
+size_t get_collator_data_dz_charset_length();
+size_t get_collator_data_hu_charset_length();
+size_t get_collator_data_ja_charset_length();
+size_t get_collator_data_ja_phonetic_alphanumeric_first_length();
+size_t get_collator_data_ja_phonetic_alphanumeric_last_length();
+size_t get_collator_data_ko_charset_length();
+size_t get_collator_data_ku_alphanumeric_length();
+size_t get_collator_data_ln_charset_length();
+size_t get_collator_data_my_dictionary_length();
+size_t get_collator_data_ne_charset_length();
+size_t get_collator_data_sid_charset_length();
+size_t get_collator_data_zh_TW_charset_length();
+size_t get_collator_data_zh_TW_radical_length();
+size_t get_collator_data_zh_TW_stroke_length();
+size_t get_collator_data_zh_charset_length();
+size_t get_collator_data_zh_pinyin_length();
+size_t get_collator_data_zh_radical_length();
+size_t get_collator_data_zh_stroke_length();
+size_t get_collator_data_zh_zhuyin_length();
+
}
#endif
@@ -120,6 +141,7 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
}
if (!collator && OUString::createFromAscii(LOCAL_RULE_LANGS).indexOf(rLocale.Language) >= 0) {
const sal_uInt8* (*func)() = NULL;
+ size_t (*funclen)() = NULL;
#ifndef DISABLE_DYNLOADING
OUStringBuffer aBuf;
@@ -132,11 +154,21 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
aBuf.appendAscii("get_").append(rLocale.Language).appendAscii("_");
if ( rLocale.Language == "zh" ) {
OUString func_base = aBuf.makeStringAndClear();
+ OUString funclen_base = func_base + "_length";
if (OUString("TW HK MO").indexOf(rLocale.Country) >= 0)
- func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule,
+ {
+ func = (const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule,
OUString(func_base + "TW_" + rAlgorithm).pData);
+ funclen = (size_t (*)()) osl_getFunctionSymbol(hModule,
+ OUString(funclen_base + "TW_" + rAlgorithm).pData);
+ }
if (!func)
- func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, OUString(func_base + rAlgorithm).pData);
+ {
+ func = (const sal_uInt8* (*)()) osl_getFunctionSymbol(
+ hModule, OUString(func_base + rAlgorithm).pData);
+ funclen = (size_t (*)()) osl_getFunctionSymbol(
+ hModule, OUString(funclen_base + rAlgorithm).pData);
+ }
} else {
if ( rLocale.Language == "ja" ) {
// replace algorithm name to implementation name.
@@ -149,72 +181,147 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
} else {
aBuf.append(rAlgorithm);
}
- func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, aBuf.makeStringAndClear().pData);
+ OUString func_base = aBuf.makeStringAndClear();
+ OUString funclen_base = func_base + "_length";
+ func = (const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, func_base.pData);
+ funclen = (size_t (*)()) osl_getFunctionSymbol(hModule, funclen_base.pData);
}
}
#else
if ( rLocale.Language == "ca" ) {
if ( rAlgorithm == "charset" )
+ {
func = get_collator_data_ca_charset;
+ funclen = get_collator_data_ca_charset_length;
+ }
} else if ( rLocale.Language == "dz" || rLocale.Language == "bo" ) {
// 'bo' Tibetan uses the same collation rules as 'dz' Dzongkha
if ( rAlgorithm == "charset" )
+ {
func = get_collator_data_dz_charset;
+ funclen = get_collator_data_dz_charset_length;
+ }
} else if ( rLocale.Language == "hu" ) {
if ( rAlgorithm == "charset" )
+ {
func = get_collator_data_hu_charset;
+ funclen = get_collator_data_hu_charset_length;
+ }
} else if ( rLocale.Language == "ja" ) {
if ( rAlgorithm == "charset" )
+ {
func = get_collator_data_ja_charset;
+ funclen = get_collator_data_ja_charset_length;
+ }
else if ( rAlgorithm == "phonetic (alphanumeric first)" )
+ {
func = get_collator_data_ja_phonetic_alphanumeric_first;
+ funclen = get_collator_data_ja_phonetic_alphanumeric_first_length;
+ }
else if ( rAlgorithm == "phonetic (alphanumeric last)" )
+ {
func = get_collator_data_ja_phonetic_alphanumeric_last;
+ funclen = get_collator_data_ja_phonetic_alphanumeric_last_length;
+ }
#if (U_ICU_VERSION_MAJOR_NUM < 53)
} else if ( rLocale.Language == "ko" ) {
if ( rAlgorithm == "charset" )
+ {
func = get_collator_data_ko_charset;
+ funclen = get_collator_data_ko_charset_length;
+ }
#endif
} else if ( rLocale.Language == "ku" ) {
if ( rAlgorithm == "alphanumeric" )
+ {
func = get_collator_data_ku_alphanumeric;
+ funclen = get_collator_data_ku_alphanumeric_length;
+ }
} else if ( rLocale.Language == "ln" ) {
if ( rAlgorithm == "charset" )
+ {
func = get_collator_data_ln_charset;
+ funclen = get_collator_data_ln_charset_length;
+ }
} else if ( rLocale.Language == "my" ) {
if ( rAlgorithm == "dictionary" )
+ {
func = get_collator_data_my_dictionary;
+ funclen = get_collator_data_my_dictionary_length;
+ }
} else if ( rLocale.Language == "ne" ) {
if ( rAlgorithm == "charset" )
+ {
func = get_collator_data_ne_charset;
+ funclen = get_collator_data_ne_charset_length;
+ }
} else if ( rLocale.Language == "sid" ) {
if ( rAlgorithm == "charset" )
+ {
func = get_collator_data_sid_charset;
+ funclen = get_collator_data_sid_charset_length;
+ }
} else if ( rLocale.Language == "zh" && (rLocale.Country == "TW" || rLocale.Country == "HK" || rLocale.Country == "MO") ) {
if ( rAlgorithm == "charset" )
+ {
func = get_collator_data_zh_TW_charset;
+ funclen = get_collator_data_zh_TW_charset_length;
+ }
else if ( rAlgorithm == "radical" )
+ {
func = get_collator_data_zh_TW_radical;
+ funclen = get_collator_data_zh_TW_radical_length;
+ }
else if ( rAlgorithm == "stroke" )
+ {
func = get_collator_data_zh_TW_stroke;
+ funclen = get_collator_data_zh_TW_stroke_length;
+ }
} else if ( rLocale.Language == "zh" ) {
if ( rAlgorithm == "charset" )
+ {
func = get_collator_data_zh_charset;
+ funclen = get_collator_data_zh_charset_length;
+ }
else if ( rAlgorithm == "pinyin" )
+ {
func = get_collator_data_zh_pinyin;
+ funclen = get_collator_data_zh_pinyin_length;
+ }
else if ( rAlgorithm == "radical" )
+ {
func = get_collator_data_zh_radical;
+ funclen = get_collator_data_zh_radical_length;
+ }
else if ( rAlgorithm == "stroke" )
+ {
func = get_collator_data_zh_stroke;
+ funclen = get_collator_data_zh_stroke_length;
+ }
else if ( rAlgorithm == "zhuyin" )
+ {
func = get_collator_data_zh_zhuyin;
+ funclen = get_collator_data_zh_zhuyin_length;
+ }
}
#endif
- if (func) {
+ if (func && funclen) {
const sal_uInt8* ruleImage=func();
- uca_base = new RuleBasedCollator(static_cast<UChar*>(NULL), status);
+ size_t ruleImageSize = funclen();
+ // Not only changed ICU 53.1 the API behavior that a negative
+ // length (ruleImageSize) now leads to failure, but also that
+ // the base RuleBasedCollator passed as uca_base here needs to
+ // have a base->tailoring == CollationRoot::getRoot() otherwise
+ // the init bails out as well, as it does for the previously
+ // used "empty" RuleBasedCollator.
+ // The default collator of the en-US locale would also fulfill
+ // the requirement. The collator of the actual locale or the
+ // NULL (default) locale does not.
+ uca_base = static_cast<RuleBasedCollator*>(icu::Collator::createInstance(
+ icu::Locale::getRoot(), status));
if (! U_SUCCESS(status)) throw RuntimeException();
- collator = new RuleBasedCollator(reinterpret_cast<const uint8_t*>(ruleImage), -1, uca_base, status);
+ collator = new RuleBasedCollator(
+ reinterpret_cast<const uint8_t*>(ruleImage), ruleImageSize, uca_base, status);
if (! U_SUCCESS(status)) throw RuntimeException();
}
}
diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx
index a801545..5ba9f5d 100644
--- a/i18npool/source/collator/gencoll_rule.cxx
+++ b/i18npool/source/collator/gencoll_rule.cxx
@@ -65,8 +65,10 @@ void data_write(char* file, char* name, sal_uInt8 *data, sal_Int32 len)
fprintf(fp, "#ifndef DISABLE_DYNLOADING\n");
fprintf(fp, "SAL_DLLPUBLIC_EXPORT const sal_uInt8* get_%s() { return %s; }\n", name, name);
+ fprintf(fp, "SAL_DLLPUBLIC_EXPORT size_t get_%s_length() { return sizeof(%s); }\n", name, name);
fprintf(fp, "#else\n");
fprintf(fp, "SAL_DLLPUBLIC_EXPORT const sal_uInt8* get_collator_data_%s() { return %s; }\n", name, name);
+ fprintf(fp, "SAL_DLLPUBLIC_EXPORT size_t get_collator_data_%s_length() { return sizeof(%s); }\n", name, name);
fprintf(fp, "#endif\n");
fprintf(fp, "\n");
fprintf (fp, "}\n");
commit 5adbf9622ebe287856b4a2438b6a3ef7c2b557bf
Author: LuboÅ¡ LuÅák <l.lunak at collabora.com>
Date: Wed Apr 30 21:52:28 2014 +0200
actually read brightness/contrast when reading docx (bnc#875713)
It's read for the shape in oox/ , but it didn't make it any further apparently.
Change-Id: I0885a675f72d63b3d262f1ef7e42f5d2e03588b6
(cherry picked from commit 804da2a977989ba1f046847b9e00f00c83749e30)
Reviewed-on: https://gerrit.libreoffice.org/9216
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 304a3d2..607d92b 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -924,6 +924,10 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
xShapeProps->getPropertyValue("ShadowTransparence") >>= m_pImpl->nShadowTransparence;
}
+ xShapeProps->getPropertyValue("GraphicColorMode") >>= m_pImpl->eColorMode;
+ xShapeProps->getPropertyValue("AdjustLuminance") >>= m_pImpl->nBrightness;
+ xShapeProps->getPropertyValue("AdjustContrast") >>= m_pImpl->nContrast;
+
// fdo#70457: transform XShape into a SwXTextGraphicObject only if there's no rotation
if ( nRotation == 0 )
m_xGraphicObject = createGraphicObject( aMediaProperties );
commit df984996afe1bcd0b58f863282c6ced611137d55
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date: Wed Apr 30 16:46:40 2014 +0200
fdo#77126 BitmapEx.Scale already takes care of mirroring
Change-Id: I320a5ec1da62cc1a8b3cb227298ecaf99f305a6f
Signed-off-by: Andras Timar <andras.timar at collabora.com>
diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx
index 8ec9c21..48ec303 100644
--- a/vcl/source/gdi/outdev2.cxx
+++ b/vcl/source/gdi/outdev2.cxx
@@ -1010,12 +1010,16 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
// we have beautiful scaling algorithms, let's use them
if (aDestSizePixel != rSrcSizePixel && rSrcSizePixel.Width() != 0 && rSrcSizePixel.Height() != 0)
{
- double fScaleX = double(aDestSizePixel.Width()) / rSrcSizePixel.Width();
- double fScaleY = double(aDestSizePixel.Height()) / rSrcSizePixel.Height();
+ double fScaleX = std::abs(aDestSizePixel.Width() / double(rSrcSizePixel.Width()));
+ double fScaleY = std::abs(aDestSizePixel.Height() / double(rSrcSizePixel.Height()));
aScaledBitmapEx.Scale(fScaleX, fScaleY);
- aSrcSizePixel = aDestSizePixel;
+ // Negative size values are used for mirroring, but Scale already takes
+ // care of mirroring so convert all negative values to positive.
+ aSrcSizePixel = Size(std::abs(aDestSizePixel.Width()),
+ std::abs(aDestSizePixel.Height()));
+
aSrcPtPixel.X() = rSrcPtPixel.X() * fScaleX;
aSrcPtPixel.Y() = rSrcPtPixel.Y() * fScaleY;
}
commit 252969aad8f8bc9b6fd72967d1e3f6813621f438
Author: Eike Rathke <erack at redhat.com>
Date: Wed Apr 30 20:17:05 2014 +0100
actually both should be LIST_APPEND
... because SvTreeListBox can hold more than 64k elements.
Change-Id: I138876d84cd9eb42d32ef7f52099e792b55b6384
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 3082fef..999c9bb 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1517,7 +1517,7 @@ void ScCheckListMenuWindow::initMembers()
{
if (maMembers[i].mbDate)
{
- maChecks.InsertEntry(maMembers[i].maName, NULL, sal_False, LISTBOX_APPEND, NULL,
+ maChecks.InsertEntry(maMembers[i].maName, NULL, sal_False, LIST_APPEND, NULL,
SvLBoxButtonKind_enabledCheckbox );
maChecks.CheckEntry(maMembers[i].maName, maMembers[i].mpParent, maMembers[i].mbVisible);
@@ -1532,7 +1532,7 @@ void ScCheckListMenuWindow::initMembers()
else
{
SvTreeListEntry* pEntry = maChecks.InsertEntry(
- maMembers[i].maName, NULL, false, LISTBOX_APPEND, NULL,
+ maMembers[i].maName, NULL, false, LIST_APPEND, NULL,
SvLBoxButtonKind_enabledCheckbox);
maChecks.SetCheckButtonState(
commit 6ca79d40d1399060f5b4061b676f62b195015851
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Wed Apr 30 13:16:17 2014 -0400
Build fix.
Change-Id: I8685c2e3a6993f3924fe8e7caf75318c8ebc566d
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 88ad240..3082fef 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1532,7 +1532,7 @@ void ScCheckListMenuWindow::initMembers()
else
{
SvTreeListEntry* pEntry = maChecks.InsertEntry(
- maMembers[i].maName, NULL, false, TREELIST_APPEND, NULL,
+ maMembers[i].maName, NULL, false, LISTBOX_APPEND, NULL,
SvLBoxButtonKind_enabledCheckbox);
maChecks.SetCheckButtonState(
commit 6a65d6ae14cc67db08da58097053bac35b78bcce
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Tue Apr 29 15:32:18 2014 -0400
fdo#75058: Optimize autofilter item filling for non-tree items.
(cherry picked from commit 878a5dabff4669fb606a461e11eaf286d0c8b07f)
(cherry picked from commit 0b03f7ed575838f90e6b1ebec3538a3a214f81fb)
Conflicts:
sc/source/ui/cctrl/checklistmenu.cxx
sc/source/ui/inc/checklistmenu.hxx
Change-Id: I1b3ae601726401a0e70fb1a05b9a90c43773794c
Reviewed-on: https://gerrit.libreoffice.org/9211
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/include/svtools/treelist.hxx b/include/svtools/treelist.hxx
index 4d0264f..b39dd88 100644
--- a/include/svtools/treelist.hxx
+++ b/include/svtools/treelist.hxx
@@ -75,6 +75,8 @@ class SVT_DLLPUBLIC SvTreeList
sal_Bool bAbsPositionsValid;
+ bool mbEnableInvalidate;
+
SvTreeListEntry* FirstVisible() const { return First(); }
SvTreeListEntry* NextVisible( const SvListView*,SvTreeListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
SvTreeListEntry* PrevVisible( const SvListView*,SvTreeListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
@@ -146,6 +148,8 @@ public:
sal_uLong nPos=0
);
+ void EnableInvalidate( bool bEnable );
+
// Notify all Listeners
void InvalidateEntry( SvTreeListEntry* );
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 092ec06..53ca5cc 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -452,7 +452,10 @@ public:
/// Including current, may return -1
SCsROW GetNextUnprotected( SCROW nRow, bool bUp ) const;
- void GetFilterEntries(SCROW nStartRow, SCROW nEndRow, std::vector<ScTypedStrData>& rStrings, bool& rHasDates);
+ void GetFilterEntries(
+ sc::ColumnBlockConstPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow,
+ std::vector<ScTypedStrData>& rStrings, bool& rHasDates );
+
bool GetDataEntries( SCROW nRow, std::set<ScTypedStrData>& rStrings, bool bLimit ) const;
void UpdateInsertTabAbs(SCTAB nNewPos);
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 8dcf20e..ef726d1 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2055,10 +2055,13 @@ public:
}
-void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, std::vector<ScTypedStrData>& rStrings, bool& rHasDates)
+void ScColumn::GetFilterEntries(
+ sc::ColumnBlockConstPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow,
+ std::vector<ScTypedStrData>& rStrings, bool& rHasDates )
{
FilterEntriesHandler aFunc(*this, rStrings);
- sc::ParseAllNonEmpty(maCells.begin(), maCells, nStartRow, nEndRow, aFunc);
+ rBlockPos.miCellPos =
+ sc::ParseAllNonEmpty(rBlockPos.miCellPos, maCells, nStartRow, nEndRow, aFunc);
rHasDates = aFunc.hasDates();
}
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 429cd52..1765f25 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2556,12 +2556,17 @@ bool ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL /* nEndCol *
void ScTable::GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, std::vector<ScTypedStrData>& rStrings, bool& rHasDates)
{
- aCol[nCol].GetFilterEntries( nRow1, nRow2, rStrings, rHasDates );
+ sc::ColumnBlockConstPosition aBlockPos;
+ aCol[nCol].InitBlockPosition(aBlockPos);
+ aCol[nCol].GetFilterEntries(aBlockPos, nRow1, nRow2, rStrings, rHasDates);
}
void ScTable::GetFilteredFilterEntries(
SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, std::vector<ScTypedStrData>& rStrings, bool& rHasDates)
{
+ sc::ColumnBlockConstPosition aBlockPos;
+ aCol[nCol].InitBlockPosition(aBlockPos);
+
// remove the entry for this column from the query parameter
ScQueryParam aParam( rParam );
aParam.RemoveEntryByField(nCol);
@@ -2573,7 +2578,7 @@ void ScTable::GetFilteredFilterEntries(
if (ValidQuery(j, aParam))
{
bool bThisHasDates = false;
- aCol[nCol].GetFilterEntries( j, j, rStrings, bThisHasDates );
+ aCol[nCol].GetFilterEntries(aBlockPos, j, j, rStrings, bThisHasDates);
bHasDates |= bThisHasDates;
}
}
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 848d84c..88ad240 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1385,7 +1385,7 @@ void ScCheckListBox::Init()
SetNodeDefaultImages();
}
-sal_Bool ScCheckListBox::IsChecked( OUString& sName, SvTreeListEntry* pParent )
+sal_Bool ScCheckListBox::IsChecked( const OUString& sName, SvTreeListEntry* pParent )
{
SvTreeListEntry* pEntry = FindEntry( pParent, sName );
if ( pEntry && GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED)
@@ -1393,7 +1393,7 @@ sal_Bool ScCheckListBox::IsChecked( OUString& sName, SvTreeListEntry* pParent )
return sal_False;
}
-void ScCheckListBox::CheckEntry( OUString& sName, SvTreeListEntry* pParent, sal_Bool bCheck )
+void ScCheckListBox::CheckEntry( const OUString& sName, SvTreeListEntry* pParent, sal_Bool bCheck )
{
SvTreeListEntry* pEntry = FindEntry( pParent, sName );
if ( pEntry )
@@ -1509,19 +1509,35 @@ void ScCheckListMenuWindow::initMembers()
{
size_t n = maMembers.size();
size_t nVisMemCount = 0;
+
maChecks.SetUpdateMode(false);
+ maChecks.GetModel()->EnableInvalidate(false);
+
for (size_t i = 0; i < n; ++i)
{
- if ( !maMembers[ i ].mbDate )
+ if (maMembers[i].mbDate)
{
maChecks.InsertEntry(maMembers[i].maName, NULL, sal_False, LISTBOX_APPEND, NULL,
SvLBoxButtonKind_enabledCheckbox );
+
+ maChecks.CheckEntry(maMembers[i].maName, maMembers[i].mpParent, maMembers[i].mbVisible);
+ // Expand first node of checked dates
+ if (!maMembers[i].mpParent && maChecks.IsChecked(maMembers[i].maName, maMembers[i].mpParent))
+ {
+ SvTreeListEntry* pEntry = maChecks.FindEntry(NULL, maMembers[i].maName);
+ if (pEntry)
+ maChecks.Expand(pEntry);
+ }
}
+ else
+ {
+ SvTreeListEntry* pEntry = maChecks.InsertEntry(
+ maMembers[i].maName, NULL, false, TREELIST_APPEND, NULL,
+ SvLBoxButtonKind_enabledCheckbox);
- maChecks.CheckEntry( maMembers[i].maName, maMembers[i].mpParent, maMembers[i].mbVisible);
- // Expand first node of checked dates
- if ( maMembers[ i ].mpParent == NULL && maChecks.IsChecked( maMembers[i].maName, maMembers[i].mpParent ) )
- maChecks.Expand( maChecks.FindEntry( NULL, maMembers[ i ].maName ) );
+ maChecks.SetCheckButtonState(
+ pEntry, maMembers[i].mbVisible ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED);
+ }
if (maMembers[i].mbVisible)
++nVisMemCount;
@@ -1543,6 +1559,8 @@ void ScCheckListMenuWindow::initMembers()
maChkToggleAll.SetState(STATE_DONTKNOW);
mePrevToggleAllState = STATE_DONTKNOW;
}
+
+ maChecks.GetModel()->EnableInvalidate(true);
maChecks.SetUpdateMode(true);
}
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index f324482..224a56b 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -198,9 +198,9 @@ class ScCheckListBox : public SvTreeListBox
ScCheckListBox( Window* pParent, WinBits nWinStyle = 0 );
~ScCheckListBox() { delete mpCheckButton; }
void Init();
- void CheckEntry( OUString& sName, SvTreeListEntry* pParent, sal_Bool bCheck = sal_True );
+ void CheckEntry( const OUString& sName, SvTreeListEntry* pParent, sal_Bool bCheck = sal_True );
void CheckEntry( SvTreeListEntry* pEntry, sal_Bool bCheck = sal_True );
- sal_Bool IsChecked( OUString& sName, SvTreeListEntry* pParent );
+ sal_Bool IsChecked( const OUString& sName, SvTreeListEntry* pParent );
SvTreeListEntry* FindEntry( SvTreeListEntry* pParent, const OUString& sNode );
sal_uInt16 GetCheckedEntryCount() const;
void ExpandChildren( SvTreeListEntry* pParent );
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index 3ef468d..cbd011a 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -24,7 +24,8 @@
#include <stdio.h>
-SvTreeList::SvTreeList()
+SvTreeList::SvTreeList() :
+ mbEnableInvalidate(true)
{
nEntryCount = 0;
bAbsPositionsValid = sal_False;
@@ -1098,8 +1099,16 @@ void SvTreeList::SetListPositions( SvTreeListEntries& rEntries )
rFirst.pParent->InvalidateChildrensListPositions();
}
+void SvTreeList::EnableInvalidate( bool bEnable )
+{
+ mbEnableInvalidate = bEnable;
+}
+
void SvTreeList::InvalidateEntry( SvTreeListEntry* pEntry )
{
+ if (!mbEnableInvalidate)
+ return;
+
Broadcast( LISTACTION_INVALIDATE_ENTRY, pEntry );
}
commit a4d7d01c8dd35a863637001e2ca906e00ecd09ec
Author: László Németh <nemeth at numbertext.org>
Date: Fri Apr 25 12:09:52 2014 +0200
fdo#48017 fix WIN32 long path name support of spelling dictionaries
+ try including windows.h for MultiByteToWideChar
(cherry picked from commit 187765b8a45761e14d18da58463dbc0f5bd825e9)
+ error C2059: syntax error : ´)´
(cherry picked from commit 445d62565d662a7119a0c49e8e8de68ee244dc74)
Change-Id: I1ccaae9dba4f82cd50531890e159519a765a0fff
Reviewed-on: https://gerrit.libreoffice.org/9182
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/external/hunspell/UnpackedTarball_hunspell.mk b/external/hunspell/UnpackedTarball_hunspell.mk
index 8c23f03..730a6ce 100644
--- a/external/hunspell/UnpackedTarball_hunspell.mk
+++ b/external/hunspell/UnpackedTarball_hunspell.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hunspell,\
external/hunspell/hunspell-1.3.2-compound.patch \
external/hunspell/hunspell.rhbz918938.patch \
external/hunspell/hunspell-wundef.patch.1 \
+ external/hunspell/hunspell-fdo48017-wfopen.patch \
))
ifeq ($(COM),MSC)
diff --git a/external/hunspell/hunspell-fdo48017-wfopen.patch b/external/hunspell/hunspell-fdo48017-wfopen.patch
new file mode 100644
index 0000000..47b803b
--- /dev/null
+++ b/external/hunspell/hunspell-fdo48017-wfopen.patch
@@ -0,0 +1,110 @@
+diff -ru hunspell/src/hunspell/csutil.cxx build/hunspell/src/hunspell/csutil.cxx
+--- hunspell/src/hunspell/csutil.cxx 2011-02-02 11:35:43.000000000 +0100
++++ build/hunspell/src/hunspell/csutil.cxx 2014-04-24 19:42:01.373285409 +0200
+@@ -17,6 +17,11 @@
+ unsigned short clower;
+ };
+
++#ifdef _WIN32
++#include <windows.h>
++#include <wchar.h>
++#endif
++
+ #ifdef OPENOFFICEORG
+ # include <unicode/uchar.h>
+ #else
+@@ -46,6 +50,21 @@
+ static struct unicode_info2 * utf_tbl = NULL;
+ static int utf_tbl_count = 0; // utf_tbl can be used by multiple Hunspell instances
+
++FILE * myfopen(const char * path, const char * mode) {
++#ifdef _WIN32
++#define WIN32_LONG_PATH_PREFIX "\\\\?\\"
++ if (strncmp(path, WIN32_LONG_PATH_PREFIX, 4) == 0) {
++ int len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
++ wchar_t *buff = (wchar_t *) malloc(len * sizeof(wchar_t));
++ MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
++ FILE * f = _wfopen(buff, (strcmp(mode, "r") == 0) ? L"r" : L"rb");
++ free(buff);
++ return f;
++ }
++#endif
++ return fopen(path, mode);
++}
++
+ /* only UTF-16 (BMP) implementation */
+ char * u16_u8(char * dest, int size, const w_char * src, int srclen) {
+ signed char * u8 = (signed char *)dest;
+diff -ru hunspell/src/hunspell/csutil.hxx build/hunspell/src/hunspell/csutil.hxx
+--- hunspell/src/hunspell/csutil.hxx 2010-09-06 09:58:53.000000000 +0200
++++ build/hunspell/src/hunspell/csutil.hxx 2014-04-24 19:42:01.373285409 +0200
+@@ -52,6 +52,9 @@
+ #define FORBIDDENWORD 65510
+ #define ONLYUPCASEFLAG 65511
+
++// fopen or optional _wfopen to fix long pathname problem of WIN32
++LIBHUNSPELL_DLL_EXPORTED FILE * myfopen(const char * path, const char * mode);
++
+ // convert UTF-16 characters to UTF-8
+ LIBHUNSPELL_DLL_EXPORTED char * u16_u8(char * dest, int size, const w_char * src, int srclen);
+
+diff -ru hunspell/src/hunspell/dictmgr.cxx build/hunspell/src/hunspell/dictmgr.cxx
+--- hunspell/src/hunspell/dictmgr.cxx 2010-06-02 21:33:59.000000000 +0200
++++ build/hunspell/src/hunspell/dictmgr.cxx 2014-04-24 19:42:01.381285408 +0200
+@@ -5,6 +5,7 @@
+ #include <stdio.h>
+
+ #include "dictmgr.hxx"
++#include "csutil.hxx"
+
+ DictMgr::DictMgr(const char * dictpath, const char * etype) : numdict(0)
+ {
+@@ -57,7 +58,7 @@
+
+ // open the dictionary list file
+ FILE * dictlst;
+- dictlst = fopen(dictpath,"r");
++ dictlst = myfopen(dictpath,"r");
+ if (!dictlst) {
+ return 1;
+ }
+diff -ru hunspell/src/hunspell/filemgr.cxx build/hunspell/src/hunspell/filemgr.cxx
+--- hunspell/src/hunspell/filemgr.cxx 2010-04-14 11:42:03.000000000 +0200
++++ build/hunspell/src/hunspell/filemgr.cxx 2014-04-25 00:44:05.049789586 +0200
+@@ -6,6 +6,7 @@
+ #include <stdio.h>
+
+ #include "filemgr.hxx"
++#include "csutil.hxx"
+
+ int FileMgr::fail(const char * err, const char * par) {
+ fprintf(stderr, err, par);
+@@ -15,7 +16,7 @@
+ FileMgr::FileMgr(const char * file, const char * key) {
+ linenum = 0;
+ hin = NULL;
+- fin = fopen(file, "r");
++ fin = myfopen(file, "r");
+ if (!fin) {
+ // check hzipped file
+ char * st = (char *) malloc(strlen(file) + strlen(HZIP_EXTENSION) + 1);
+diff -ru hunspell/src/hunspell/hunzip.cxx build/hunspell/src/hunspell/hunzip.cxx
+--- hunspell/src/hunspell/hunzip.cxx 2010-04-27 16:07:14.000000000 +0200
++++ build/hunspell/src/hunspell/hunzip.cxx 2014-04-24 19:42:01.381285408 +0200
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+
+ #include "hunzip.hxx"
++#include "csutil.hxx"
+
+ #define CODELEN 65536
+ #define BASEBITREC 5000
+@@ -38,7 +38,7 @@
+
+ if (!filename) return -1;
+
+- fin = fopen(filename, "rb");
++ fin = myfopen(filename, "rb");
+ if (!fin) return -1;
+
+ // read magic number
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index e3a79df..1809efe 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -309,16 +309,17 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL
OUString aff;
osl::FileBase::getSystemPathFromFileURL(dicpath,dict);
osl::FileBase::getSystemPathFromFileURL(affpath,aff);
- OString aTmpaff(OU2ENC(aff,osl_getThreadTextEncoding()));
- OString aTmpdict(OU2ENC(dict,osl_getThreadTextEncoding()));
-
#if defined(WNT)
// workaround for Windows specifc problem that the
// path length in calls to 'fopen' is limted to somewhat
// about 120+ characters which will usually be exceed when
- // using dictionaries as extensions.
- aTmpaff = Win_GetShortPathName( aff );
- aTmpdict = Win_GetShortPathName( dict );
+ // using dictionaries as extensions. (Hunspell waits UTF-8 encoded
+ // path with \\?\ long path prefix.)
+ OString aTmpaff = OUStringToOString(aff, RTL_TEXTENCODING_UTF8);
+ OString aTmpdict = OUStringToOString(dict, RTL_TEXTENCODING_UTF8);
+#else
+ OString aTmpaff(OU2ENC(aff,osl_getThreadTextEncoding()));
+ OString aTmpdict(OU2ENC(dict,osl_getThreadTextEncoding()));
#endif
aDicts[i] = new Hunspell(aTmpaff.getStr(),aTmpdict.getStr());
commit 3e780c8ab23458c01a5fb7d4faaab96073ef7f6d
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Apr 25 20:09:47 2014 +0200
fdo#60967: fix deletion of paragraph following table
Surprisingly MovePara(fnParaCurr, fnParaEnd) actually moves to the end
of the next paragraph if the current one is empty.
Change-Id: I780bf663b19044252f1d4532d5467c3a599c8a49
(cherry picked from commit f5fb361df94449850a83be3b412f68e1f9b949c5)
Reviewed-on: https://gerrit.libreoffice.org/9195
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx
index bba3c3d..a9928aa 100644
--- a/sw/source/ui/wrtsh/delete.cxx
+++ b/sw/source/ui/wrtsh/delete.cxx
@@ -466,7 +466,10 @@ long SwWrtShell::DelToEndOfSentence()
if (SwCrsrShell::Right(1,CRSR_SKIP_CHARS))
{
SetMark();
- SwCrsrShell::MovePara(fnParaCurr, fnParaEnd);
+ if (!IsEndPara()) // can only be at the end if it's empty
+ { // for an empty paragraph this would actually select the _next_
+ SwCrsrShell::MovePara(fnParaCurr, fnParaEnd);
+ }
if (!IsEndOfDoc()) // do not delete last paragraph in body text
{
nRet = DelFullPara() ? 1 : 0;
commit f1c63751e5efa8a702a87f250af9cd5de15f19b8
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Tue Apr 29 10:14:12 2014 +0200
Fix memory leaks
Change-Id: Id67d5375bedc6e6c10082d9c5ee69d6e932be158
Reviewed-on: https://gerrit.libreoffice.org/9194
Tested-by: David Tardon <dtardon at redhat.com>
Reviewed-by: David Tardon <dtardon at redhat.com>
diff --git a/cli_ure/source/native/native_bootstrap.cxx b/cli_ure/source/native/native_bootstrap.cxx
index 0a22d7b..d8ba402 100644
--- a/cli_ure/source/native/native_bootstrap.cxx
+++ b/cli_ure/source/native/native_bootstrap.cxx
@@ -93,6 +93,7 @@ WCHAR* getPathFromRegistryKey( HKEY hroot, LPCWSTR subKeyName )
if ( RegQueryValueEx( hkey, NULL, NULL, &type, (LPBYTE) data, &size ) != ERROR_SUCCESS )
{
RegCloseKey( hkey );
+ delete[] data;
return NULL;
}
@@ -287,6 +288,7 @@ extern "C" FARPROC WINAPI delayLoadHook(
szLibName = new WCHAR[size];
if (! MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, pdli->szDll, -1, szLibName, size))
{
+ delete[] szLibName;
return 0;
}
}
commit 528d3413facedfc204918b2c2b58a4a35a4047a8
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Apr 26 22:34:35 2014 +0200
cppcheck: fix "Mismatching allocation and deallocation"
Change-Id: Ic007b07a82eb83978527254518d85c5a2903a48d
Reviewed-on: https://gerrit.libreoffice.org/9175
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index ec5c4bf..ee614d6 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -3393,7 +3393,7 @@ DynamicKernel* DynamicKernel::create(ScDocument& /* rDoc */,
#ifdef NO_FALLBACK_TO_SWINTERP
assert(false);
#else
- free(pDynamicKernel);
+ delete pDynamicKernel;
return NULL;
#endif
}
commit 03bf7af2e38b68f6ad9f84ddd8dab3c14137cf73
Author: Andras Timar <andras.timar at collabora.com>
Date: Thu Apr 24 21:50:26 2014 +0200
fdo#77242 fix crash
Change-Id: Ic28b2dccc02627446a794929fe970495b15eb0e1
Reviewed-on: https://gerrit.libreoffice.org/9154
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 95bdbad..065a23c 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -1270,7 +1270,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
*/
{
- sal_uInt16 const nId = pTabCtrl->GetCurPageId();
+ sal_uInt16 nId = pTabCtrl->GetCurPageId();
DBG_ASSERT( pImpl->aData.size(), "no Pages registered" );
SFX_APP();
@@ -1278,6 +1278,16 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
// Tab Page schon da?
SfxTabPage* pTabPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
Data_Impl* pDataObject = Find( pImpl->aData, nId );
+
+ //UUUU fallback to 1st page when requested one does not exist
+ if(!pDataObject && pTabCtrl->GetPageCount())
+ {
+ pTabCtrl->SetCurPageId(pTabCtrl->GetPageId(0));
+ nId = pTabCtrl->GetCurPageId();
+ pTabPage = dynamic_cast< SfxTabPage* >(pTabCtrl->GetTabPage(nId));
+ pDataObject = Find(pImpl->aData, nId);
+ }
+
DBG_ASSERT( pDataObject, "Id not known" );
// Create TabPage if possible:
commit fdc32efbd036e6ba933030b062c521cfac2823b9
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Apr 25 00:54:47 2014 -0400
fdo#77728: Re-compile tokens when named range is updated.
Change-Id: Icd9f8c60d9e105478abb5b5ad64e969623830a4c
(cherry picked from commit dafce0665c852297d39cddf76f46c77c14a8f12a)
Reviewed-on: https://gerrit.libreoffice.org/9157
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 9ff510c..99d2626 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -2116,6 +2116,16 @@ class UpdateRefOnNonCopy : std::unary_function<sc::FormulaGroupEntry, void>
ScDocument* mpUndoDoc;
bool mbUpdated;
+ void recompileTokenArray( ScFormulaCell& rTopCell )
+ {
+ // We need to re-compile the token array when a range name is
+ // modified, to correctly reflect the new references in the
+ // name.
+ ScCompiler aComp(&mpCxt->mrDoc, rTopCell.aPos, *rTopCell.GetCode());
+ aComp.SetGrammar(mpCxt->mrDoc.GetGrammar());
+ aComp.CompileTokenArray();
+ }
+
void updateRefOnShift( sc::FormulaGroupEntry& rGroup )
{
if (!rGroup.mbShared)
@@ -2149,7 +2159,10 @@ class UpdateRefOnNonCopy : std::unary_function<sc::FormulaGroupEntry, void>
aRes.mbValueChanged = true;
}
- if (aRes.mbReferenceModified)
+ if (aRes.mbNameModified)
+ recompileTokenArray(*pTop);
+
+ if (aRes.mbReferenceModified || aRes.mbNameModified)
{
sc::StartListeningContext aStartCxt(mpCxt->mrDoc);
sc::EndListeningContext aEndCxt(mpCxt->mrDoc, pOldCode.get());
@@ -2221,14 +2234,7 @@ class UpdateRefOnNonCopy : std::unary_function<sc::FormulaGroupEntry, void>
sc::AutoCalcSwitch(mpCxt->mrDoc, false);
if (aRes.mbNameModified)
- {
- // We need to re-compile the token array when a range name is
- // modified, to correctly reflect the new references in the
- // name.
- ScCompiler aComp(&mpCxt->mrDoc, aPos, *pCode);
- aComp.SetGrammar(mpCxt->mrDoc.GetGrammar());
- aComp.CompileTokenArray();
- }
+ recompileTokenArray(*pTop);
// Perform end-listening, start-listening, and dirtying on all
// formula cells in the group.
commit 34cc6a545c2a51ec5a487342cab2c52b6858d1fb
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Apr 24 21:49:45 2014 -0400
fdo#77728: Don't forget to start listening after the named range update.
Change-Id: I7a4160db0dd2b9ac2c98402bb6110c548e879b3d
(cherry picked from commit 36e0d770928f71c932db5dea9f04645f65222ea6)
Reviewed-on: https://gerrit.libreoffice.org/9156
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index d77fc18..092ec06 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -369,7 +369,8 @@ public:
void PreprocessRangeNameUpdate(
sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
- void PostprocessRangeNameUpdate( sc::CompileFormulaContext& rCompileCxt );
+ void PostprocessRangeNameUpdate(
+ sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt );
const SfxPoolItem* GetAttr( SCROW nRow, sal_uInt16 nWhich ) const;
const ScPatternAttr* GetPattern( SCROW nRow ) const;
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 6666c9b..108637b 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -856,7 +856,8 @@ public:
void PreprocessRangeNameUpdate(
sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
- void PostprocessRangeNameUpdate( sc::CompileFormulaContext& rCompileCxt );
+ void PostprocessRangeNameUpdate(
+ sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt );
ScConditionalFormatList* GetCondFormList();
const ScConditionalFormatList* GetCondFormList() const;
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 1855278..baa00e0 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -202,11 +202,13 @@ public:
class PostRangeNameUpdateHandler
{
ScDocument* mpDoc;
+ sc::StartListeningContext& mrStartListenCxt;
sc::CompileFormulaContext& mrCompileFormulaCxt;
public:
- PostRangeNameUpdateHandler( ScDocument* pDoc, sc::CompileFormulaContext& rCompileCxt ) :
+ PostRangeNameUpdateHandler( ScDocument* pDoc, sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt ) :
mpDoc(pDoc),
+ mrStartListenCxt(rStartListenCxt),
mrCompileFormulaCxt(rCompileCxt) {}
void operator() ( sc::FormulaGroupEntry& rEntry )
@@ -234,6 +236,7 @@ public:
{
ScFormulaCell* p = *pp;
p->SyncSharedCode();
+ p->StartListeningTo(mrStartListenCxt);
p->SetDirty();
}
}
@@ -254,6 +257,7 @@ public:
aComp2.CompileTokenArray();
pCell->SetCode(pNewCode);
+ pCell->StartListeningTo(mrStartListenCxt);
pCell->SetDirty();
}
}
@@ -272,12 +276,13 @@ void ScColumn::PreprocessRangeNameUpdate(
std::for_each(aGroups.begin(), aGroups.end(), aFunc);
}
-void ScColumn::PostprocessRangeNameUpdate( sc::CompileFormulaContext& rCompileCxt )
+void ScColumn::PostprocessRangeNameUpdate(
+ sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt )
{
// Collect all formula groups.
std::vector<sc::FormulaGroupEntry> aGroups = GetFormulaGroupEntries();
- PostRangeNameUpdateHandler aFunc(pDocument, rCompileCxt);
+ PostRangeNameUpdateHandler aFunc(pDocument, rStartListenCxt, rCompileCxt);
std::for_each(aGroups.begin(), aGroups.end(), aFunc);
}
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index 0c9e7ed..a4ede21 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -59,12 +59,13 @@ void ScDocument::PreprocessRangeNameUpdate()
void ScDocument::PostprocessRangeNameUpdate()
{
+ sc::StartListeningContext aStartListenCxt(*this);
sc::CompileFormulaContext aCompileCxt(this);
TableContainer::iterator it = maTabs.begin(), itEnd = maTabs.end();
for (; it != itEnd; ++it)
{
ScTable* p = *it;
- p->PostprocessRangeNameUpdate(aCompileCxt);
+ p->PostprocessRangeNameUpdate(aStartListenCxt, aCompileCxt);
}
}
diff --git a/sc/source/core/data/table7.cxx b/sc/source/core/data/table7.cxx
index b5ebc12..2e6aad1 100644
--- a/sc/source/core/data/table7.cxx
+++ b/sc/source/core/data/table7.cxx
@@ -49,10 +49,11 @@ void ScTable::PreprocessRangeNameUpdate(
aCol[i].PreprocessRangeNameUpdate(rEndListenCxt, rCompileCxt);
}
-void ScTable::PostprocessRangeNameUpdate( sc::CompileFormulaContext& rCompileCxt )
+void ScTable::PostprocessRangeNameUpdate(
+ sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt )
{
for (SCCOL i = 0; i <= MAXCOL; ++i)
- aCol[i].PostprocessRangeNameUpdate(rCompileCxt);
+ aCol[i].PostprocessRangeNameUpdate(rStartListenCxt, rCompileCxt);
}
void ScTable::UpdateScriptTypes( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
commit dbdc3f6927c8cb80d065a07dfff8af35349adc7e
Author: Andras Timar <andras.timar at collabora.com>
Date: Wed Apr 23 16:01:22 2014 +0200
fix sd layout unit test
Change-Id: Ica34592788005cc3c96987b1c6c9625dd6359c76
(cherry picked from commit 2ea006fb605b886f9c9426783e4edf0de46c9af8)
Signed-off-by: Andras Timar <andras.timar at collabora.com>
diff --git a/sd/qa/unit/data/xml/shapes-test_page3.xml b/sd/qa/unit/data/xml/shapes-test_page3.xml
index 2089485..3c1820d 100644
--- a/sd/qa/unit/data/xml/shapes-test_page3.xml
+++ b/sd/qa/unit/data/xml/shapes-test_page3.xml
@@ -55,8 +55,8 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="7591.681979" column2="0.000000" column3="8629.325587"/>
- <Line2 column1="0.000000" column2="7398.482222" column3="85.734286"/>
+ <Line1 column1="0.000000" column2="7591.681979" column3="8629.325587"/>
+ <Line2 column1="-7398.482222" column2="0.000000" column3="7484.216507"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
<InteropGrabBag/>
@@ -128,71 +128,71 @@
<point positionX="14748" positionY="7070" polygonFlags="NORMAL"/>
</pointSequence>
<pointSequence>
- <point positionX="3" positionY="7201" polygonFlags="NORMAL"/>
- <point positionX="-42" positionY="6435" polygonFlags="CONTROL"/>
- <point positionX="496" positionY="5774" polygonFlags="CONTROL"/>
- <point positionX="480" positionY="4988" polygonFlags="NORMAL"/>
- <point positionX="465" positionY="4275" polygonFlags="CONTROL"/>
- <point positionX="623" positionY="3566" polygonFlags="CONTROL"/>
- <point positionX="740" positionY="2863" polygonFlags="NORMAL"/>
- <point positionX="834" positionY="2295" polygonFlags="CONTROL"/>
- <point positionX="1132" positionY="1777" polygonFlags="CONTROL"/>
- <point positionX="1261" positionY="1215" polygonFlags="NORMAL"/>
- <point positionX="1417" positionY="533" polygonFlags="CONTROL"/>
- <point positionX="1959" positionY="-15" polygonFlags="CONTROL"/>
- <point positionX="2562" positionY="0" polygonFlags="NORMAL"/>
- <point positionX="3139" positionY="14" polygonFlags="CONTROL"/>
- <point positionX="3463" positionY="724" polygonFlags="CONTROL"/>
- <point positionX="3646" positionY="1258" polygonFlags="NORMAL"/>
- <point positionX="3800" positionY="1709" polygonFlags="CONTROL"/>
- <point positionX="3768" positionY="2184" polygonFlags="CONTROL"/>
- <point positionX="3733" positionY="2646" polygonFlags="NORMAL"/>
- <point positionX="3696" positionY="3130" polygonFlags="CONTROL"/>
- <point positionX="3893" positionY="3547" polygonFlags="CONTROL"/>
- <point positionX="3820" positionY="4034" polygonFlags="NORMAL"/>
- <point positionX="3742" positionY="4549" polygonFlags="CONTROL"/>
- <point positionX="3373" positionY="5214" polygonFlags="CONTROL"/>
- <point positionX="3733" positionY="5596" polygonFlags="NORMAL"/>
- <point positionX="4208" positionY="6100" polygonFlags="CONTROL"/>
- <point positionX="5105" positionY="5745" polygonFlags="CONTROL"/>
- <point positionX="5772" positionY="5596" polygonFlags="NORMAL"/>
- <point positionX="6397" positionY="5456" polygonFlags="CONTROL"/>
- <point positionX="7177" positionY="5244" polygonFlags="CONTROL"/>
- <point positionX="7420" positionY="4598" polygonFlags="NORMAL"/>
- <point positionX="7647" positionY="3993" polygonFlags="CONTROL"/>
- <point positionX="7620" positionY="3316" polygonFlags="CONTROL"/>
- <point positionX="7507" positionY="2690" polygonFlags="NORMAL"/>
- <point positionX="7420" positionY="2208" polygonFlags="CONTROL"/>
- <point positionX="7963" positionY="1377" polygonFlags="CONTROL"/>
- <point positionX="7029" positionY="1258" polygonFlags="NORMAL"/>
- <point positionX="6202" positionY="1152" polygonFlags="CONTROL"/>
- <point positionX="6375" positionY="1932" polygonFlags="CONTROL"/>
- <point positionX="6205" positionY="2343" polygonFlags="NORMAL"/>
- <point positionX="5974" positionY="2900" polygonFlags="CONTROL"/>
- <point positionX="5763" positionY="3488" polygonFlags="CONTROL"/>
- <point positionX="5338" positionY="3904" polygonFlags="NORMAL"/>
- <point positionX="4958" positionY="4276" polygonFlags="CONTROL"/>
- <point positionX="4343" positionY="4299" polygonFlags="CONTROL"/>
- <point positionX="3820" positionY="4294" polygonFlags="NORMAL"/>
- <point positionX="3343" positionY="4289" polygonFlags="CONTROL"/>
- <point positionX="2893" positionY="4119" polygonFlags="CONTROL"/>
- <point positionX="2432" positionY="3947" polygonFlags="NORMAL"/>
- <point positionX="1983" positionY="3779" polygonFlags="CONTROL"/>
- <point positionX="1398" positionY="4032" polygonFlags="CONTROL"/>
- <point positionX="1217" positionY="4641" polygonFlags="NORMAL"/>
- <point positionX="1066" positionY="5149" polygonFlags="CONTROL"/>
- <point positionX="1010" positionY="5593" polygonFlags="CONTROL"/>
- <point positionX="1044" positionY="6073" polygonFlags="NORMAL"/>
- <point positionX="1095" positionY="6804" polygonFlags="CONTROL"/>
- <point positionX="1981" positionY="6987" polygonFlags="CONTROL"/>
- <point positionX="2562" positionY="7157" polygonFlags="NORMAL"/>
- <point positionX="3219" positionY="7349" polygonFlags="CONTROL"/>
- <point positionX="3889" positionY="7447" polygonFlags="CONTROL"/>
- <point positionX="4601" positionY="7374" polygonFlags="NORMAL"/>
- <point positionX="5117" positionY="7321" polygonFlags="CONTROL"/>
- <point positionX="5728" positionY="7409" polygonFlags="CONTROL"/>
- <point positionX="6119" positionY="6984" polygonFlags="NORMAL"/>
- <point positionX="6119" positionY="6984" polygonFlags="NORMAL"/>
+ <point positionX="197" positionY="3" polygonFlags="NORMAL"/>
+ <point positionX="963" positionY="-42" polygonFlags="CONTROL"/>
+ <point positionX="1624" positionY="496" polygonFlags="CONTROL"/>
+ <point positionX="2410" positionY="480" polygonFlags="NORMAL"/>
+ <point positionX="3123" positionY="465" polygonFlags="CONTROL"/>
+ <point positionX="3832" positionY="623" polygonFlags="CONTROL"/>
+ <point positionX="4535" positionY="740" polygonFlags="NORMAL"/>
+ <point positionX="5103" positionY="834" polygonFlags="CONTROL"/>
+ <point positionX="5621" positionY="1132" polygonFlags="CONTROL"/>
+ <point positionX="6183" positionY="1261" polygonFlags="NORMAL"/>
+ <point positionX="6865" positionY="1417" polygonFlags="CONTROL"/>
+ <point positionX="7413" positionY="1959" polygonFlags="CONTROL"/>
+ <point positionX="7398" positionY="2562" polygonFlags="NORMAL"/>
+ <point positionX="7384" positionY="3139" polygonFlags="CONTROL"/>
+ <point positionX="6674" positionY="3463" polygonFlags="CONTROL"/>
+ <point positionX="6140" positionY="3646" polygonFlags="NORMAL"/>
+ <point positionX="5689" positionY="3800" polygonFlags="CONTROL"/>
+ <point positionX="5214" positionY="3768" polygonFlags="CONTROL"/>
+ <point positionX="4752" positionY="3733" polygonFlags="NORMAL"/>
+ <point positionX="4268" positionY="3696" polygonFlags="CONTROL"/>
+ <point positionX="3851" positionY="3893" polygonFlags="CONTROL"/>
+ <point positionX="3364" positionY="3820" polygonFlags="NORMAL"/>
+ <point positionX="2849" positionY="3742" polygonFlags="CONTROL"/>
+ <point positionX="2184" positionY="3373" polygonFlags="CONTROL"/>
+ <point positionX="1802" positionY="3733" polygonFlags="NORMAL"/>
+ <point positionX="1298" positionY="4208" polygonFlags="CONTROL"/>
+ <point positionX="1653" positionY="5105" polygonFlags="CONTROL"/>
+ <point positionX="1802" positionY="5772" polygonFlags="NORMAL"/>
+ <point positionX="1942" positionY="6397" polygonFlags="CONTROL"/>
+ <point positionX="2154" positionY="7177" polygonFlags="CONTROL"/>
+ <point positionX="2800" positionY="7420" polygonFlags="NORMAL"/>
+ <point positionX="3405" positionY="7647" polygonFlags="CONTROL"/>
+ <point positionX="4082" positionY="7620" polygonFlags="CONTROL"/>
+ <point positionX="4708" positionY="7507" polygonFlags="NORMAL"/>
+ <point positionX="5190" positionY="7420" polygonFlags="CONTROL"/>
+ <point positionX="6021" positionY="7963" polygonFlags="CONTROL"/>
+ <point positionX="6140" positionY="7029" polygonFlags="NORMAL"/>
+ <point positionX="6246" positionY="6202" polygonFlags="CONTROL"/>
+ <point positionX="5466" positionY="6375" polygonFlags="CONTROL"/>
+ <point positionX="5055" positionY="6205" polygonFlags="NORMAL"/>
+ <point positionX="4498" positionY="5974" polygonFlags="CONTROL"/>
+ <point positionX="3910" positionY="5763" polygonFlags="CONTROL"/>
+ <point positionX="3494" positionY="5338" polygonFlags="NORMAL"/>
+ <point positionX="3122" positionY="4958" polygonFlags="CONTROL"/>
+ <point positionX="3099" positionY="4343" polygonFlags="CONTROL"/>
+ <point positionX="3104" positionY="3820" polygonFlags="NORMAL"/>
+ <point positionX="3109" positionY="3343" polygonFlags="CONTROL"/>
+ <point positionX="3279" positionY="2893" polygonFlags="CONTROL"/>
+ <point positionX="3451" positionY="2432" polygonFlags="NORMAL"/>
+ <point positionX="3619" positionY="1983" polygonFlags="CONTROL"/>
+ <point positionX="3366" positionY="1398" polygonFlags="CONTROL"/>
+ <point positionX="2757" positionY="1217" polygonFlags="NORMAL"/>
+ <point positionX="2249" positionY="1066" polygonFlags="CONTROL"/>
+ <point positionX="1805" positionY="1010" polygonFlags="CONTROL"/>
+ <point positionX="1325" positionY="1044" polygonFlags="NORMAL"/>
+ <point positionX="594" positionY="1095" polygonFlags="CONTROL"/>
+ <point positionX="411" positionY="1981" polygonFlags="CONTROL"/>
+ <point positionX="241" positionY="2562" polygonFlags="NORMAL"/>
+ <point positionX="49" positionY="3219" polygonFlags="CONTROL"/>
+ <point positionX="-49" positionY="3889" polygonFlags="CONTROL"/>
+ <point positionX="24" positionY="4601" polygonFlags="NORMAL"/>
+ <point positionX="77" positionY="5117" polygonFlags="CONTROL"/>
+ <point positionX="-11" positionY="5728" polygonFlags="CONTROL"/>
+ <point positionX="414" positionY="6119" polygonFlags="NORMAL"/>
+ <point positionX="414" positionY="6119" polygonFlags="NORMAL"/>
</pointSequence>
</XShape>
<XShape positionX="3800" positionY="6400" sizeX="1800" sizeY="1200" type="com.sun.star.drawing.LineShape" fontHeight="18.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="CENTER" textLeftDistance="250" textRightDistance="250" textUpperDistance="125" textLowerDistance="125" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" lineStyle="SOLID">
@@ -498,16 +498,16 @@
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="201" positionY="4800"/>
- <point positionX="2001" positionY="2800"/>
- <point positionX="1600" positionY="0"/>
- <point positionX="3800" positionY="1000"/>
- <point positionX="0" positionY="2400"/>
+ <point positionX="0" positionY="2171"/>
+ <point positionX="2691" positionY="2171"/>
+ <point positionX="4504" positionY="0"/>
+ <point positionX="5233" positionY="2304"/>
+ <point positionX="1650" positionY="416"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="3800.308099" column2="0.000000" column3="14799.696392"/>
- <Line2 column1="0.000000" column2="4800.051183" column3="9000.190964"/>
+ <Line1 column1="3500.881673" column2="1712.474725" column3="13386.648093"/>
+ <Line2 column1="-3889.487950" column2="1541.378057" column3="12347.841208"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
<InteropGrabBag/>
@@ -521,8 +521,8 @@
<LineStart/>
<LineEnd/>
<Transformation>
- <Line1 column1="5636.550300" column2="0.000000" column3="1311.754150"/>
- <Line2 column1="0.000000" column2="6339.544162" column3="8864.747882"/>
+ <Line1 column1="1567.207856" column2="6230.915598" column3="41.872336"/>
+ <Line2 column1="-6267.085096" column2="1558.162962" column3="14880.349578"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
<InteropGrabBag/>
@@ -552,29 +552,29 @@
<point positionX="1400" positionY="13000" polygonFlags="NORMAL"/>
</pointSequence>
<pointSequence>
- <point positionX="89" positionY="4735" polygonFlags="NORMAL"/>
- <point positionX="689" positionY="2336" polygonFlags="CONTROL"/>
- <point positionX="4689" positionY="4735" polygonFlags="CONTROL"/>
- <point positionX="1289" positionY="1735" polygonFlags="SYMMETRIC"/>
- <point positionX="-2112" positionY="-1264" polygonFlags="CONTROL"/>
- <point positionX="3288" positionY="536" polygonFlags="CONTROL"/>
- <point positionX="3288" positionY="536" polygonFlags="NORMAL"/>
- <point positionX="3288" positionY="536" polygonFlags="CONTROL"/>
- <point positionX="6689" positionY="1935" polygonFlags="CONTROL"/>
- <point positionX="4289" positionY="2135" polygonFlags="SYMMETRIC"/>
- <point positionX="1889" positionY="2335" polygonFlags="CONTROL"/>
- <point positionX="3889" positionY="3735" polygonFlags="CONTROL"/>
- <point positionX="4289" positionY="3135" polygonFlags="SYMMETRIC"/>
- <point positionX="4688" positionY="2535" polygonFlags="CONTROL"/>
- <point positionX="6089" positionY="4736" polygonFlags="CONTROL"/>
- <point positionX="5489" positionY="5135" polygonFlags="SYMMETRIC"/>
- <point positionX="4890" positionY="5534" polygonFlags="CONTROL"/>
- <point positionX="89" positionY="6136" polygonFlags="CONTROL"/>
- <point positionX="289" positionY="5135" polygonFlags="NORMAL"/>
- <point positionX="89" positionY="6136" polygonFlags="NORMAL"/>
- <point positionX="-111" positionY="7135" polygonFlags="CONTROL"/>
- <point positionX="89" positionY="4135" polygonFlags="CONTROL"/>
- <point positionX="89" positionY="4135" polygonFlags="NORMAL"/>
+ <point positionX="1572" positionY="1008" polygonFlags="NORMAL"/>
+ <point positionX="4045" positionY="1008" polygonFlags="CONTROL"/>
+ <point positionX="2688" positionY="5471" polygonFlags="CONTROL"/>
+ <point positionX="4773" positionY="1444" polygonFlags="SYMMETRIC"/>
+ <point positionX="6858" positionY="-2583" polygonFlags="CONTROL"/>
+ <point positionX="6422" positionY="3093" polygonFlags="CONTROL"/>
+ <point positionX="6422" positionY="3093" polygonFlags="NORMAL"/>
+ <point positionX="6422" positionY="3093" polygonFlags="CONTROL"/>
+ <point positionX="5889" positionY="6732" polygonFlags="CONTROL"/>
+ <point positionX="5113" positionY="4452" polygonFlags="SYMMETRIC"/>
+ <point positionX="4337" positionY="2172" polygonFlags="CONTROL"/>
+ <point positionX="3464" positionY="4452" polygonFlags="CONTROL"/>
+ <point positionX="4143" positionY="4694" polygonFlags="SYMMETRIC"/>
+ <point positionX="4822" positionY="4936" polygonFlags="CONTROL"/>
+ <point positionX="3027" positionY="6829" polygonFlags="CONTROL"/>
+ <point positionX="2494" positionY="6344" polygonFlags="SYMMETRIC"/>
+ <point positionX="1961" positionY="5859" polygonFlags="CONTROL"/>
+ <point positionX="213" positionY="1348" polygonFlags="CONTROL"/>
+ <point positionX="1232" positionY="1299" polygonFlags="NORMAL"/>
+ <point positionX="213" positionY="1348" polygonFlags="NORMAL"/>
+ <point positionX="-805" positionY="1396" polygonFlags="CONTROL"/>
+ <point positionX="2154" positionY="862" polygonFlags="CONTROL"/>
+ <point positionX="2154" positionY="862" polygonFlags="NORMAL"/>
</pointSequence>
</XShape>
<XShape positionX="20400" positionY="9800" sizeX="7000" sizeY="6000" type="com.sun.star.drawing.PolyPolygonShape" fontHeight="18.000000" fontColor="ffffffff" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="CENTER" textLeftDistance="250" textRightDistance="250" textUpperDistance="125" textLowerDistance="125" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="cfe7f5" fillTransparence="0" fillTransparenceGradientName="">
@@ -640,25 +640,25 @@
</PolyPolygon>
<Geometry>
<pointSequence>
- <point positionX="0" positionY="0"/>
- <point positionX="0" positionY="1200"/>
- <point positionX="1800" positionY="3000"/>
- <point positionX="2600" positionY="3000"/>
- <point positionX="2600" positionY="2000"/>
- <point positionX="3600" positionY="3000"/>
- <point positionX="4200" positionY="3000"/>
- <point positionX="4800" positionY="2400"/>
- <point positionX="5400" positionY="2400"/>
- <point positionX="6000" positionY="3000"/>
- <point positionX="7800" positionY="1200"/>
- <point positionX="1800" positionY="1200"/>
- <point positionX="1800" positionY="0"/>
- <point positionX="0" positionY="0"/>
+ <point positionX="0" positionY="7800"/>
+ <point positionX="1200" positionY="7800"/>
+ <point positionX="3000" positionY="6000"/>
+ <point positionX="3000" positionY="5200"/>
+ <point positionX="2000" positionY="5200"/>
+ <point positionX="3000" positionY="4200"/>
+ <point positionX="3000" positionY="3600"/>
+ <point positionX="2400" positionY="3000"/>
+ <point positionX="2400" positionY="2400"/>
+ <point positionX="3000" positionY="1800"/>
+ <point positionX="1200" positionY="0"/>
+ <point positionX="1200" positionY="6000"/>
+ <point positionX="0" positionY="6000"/>
+ <point positionX="0" positionY="7800"/>
</pointSequence>
</Geometry>
<Transformation>
- <Line1 column1="7800.000000" column2="0.000000" column3="2200.000000"/>
- <Line2 column1="0.000000" column2="3000.000000" column3="16600.000000"/>
+ <Line1 column1="0.000000" column2="-7800.000000" column3="10000.000000"/>
+ <Line2 column1="3000.000000" column2="0.000000" column3="16600.000000"/>
<Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
</Transformation>
<InteropGrabBag/>
commit d440f32c2f94f6e2241bc03f2e9fb58f73afe11b
Author: Andras Timar <andras.timar at collabora.com>
Date: Wed Apr 23 13:11:07 2014 +0200
fdo#76878 Revert "Resolves: #i116244# need to reset rotation..."
This reverts commit 20dee85b6390ef3edc5434889523cd9fd0137bae.
(cherry picked from commit 1e48bfcd7aa811d31ecdf9df897b30cffebd5669)
Change-Id: I712e11a84b01965882da40eca7ac5a5f0c8cb294
Reviewed-on: https://gerrit.libreoffice.org/9140
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 11e551b..75d83e3 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -1767,10 +1767,6 @@ void SdrPathObj::ImpForceKind()
{
aRect = lcl_ImpGetBoundRect(GetPathPoly());
}
-
- // #i116244# reset rotation
- aGeo.nDrehWink = aGeo.nShearWink = 0;
- aGeo.RecalcSinCos(); aGeo.RecalcTan();
}
// #i75974# adapt polygon state to object type. This may include a reinterpretation
More information about the Libreoffice-commits
mailing list