[Libreoffice-commits] core.git: Changes to 'refs/changes/82/2682/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/82/2682/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/74/2674/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/74/2674/3'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/74/2674/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/filter/oox/pivottablebuffer.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit af04930d1513f1274e8a69b96e6941ca43cfc901 Author: Jian Fang Zhang zhan...@apache.org Date: Wed Sep 12 10:33:44 2012 + Resolves: #i119512# selection lost if there is blank item selected... in page filed of Pivot Table Found by: shan zhu Patch by: bjcheny Review by: Yolanda Zhang Ying (cherry picked from commit 305986a4ee0f1294d629c51c75d8f793b5b80e1d) Conflicts: oox/source/xls/pivottablebuffer.cxx Change-Id: Ied8ca19738e9b2e7bb596010f7ae9e308792fcbc diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx index 6303a05..2a1582b 100644 --- a/sc/source/filter/oox/pivottablebuffer.cxx +++ b/sc/source/filter/oox/pivottablebuffer.cxx @@ -578,8 +578,7 @@ void PivotTableField::convertPageField( const PTPageFieldModel rPageField ) if( const PivotCacheItem* pSharedItem = pCacheField-getCacheItem( nCacheItem ) ) { OUString aSelectedPage = pSharedItem-getName(); -if( !aSelectedPage.isEmpty() ) -aPropSet.setProperty( PROP_SelectedPage, aSelectedPage ); +aPropSet.setProperty( PROP_SelectedPage, aSelectedPage ); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: ucb/source
ucb/source/ucp/tdoc/tdoc_stgelems.cxx | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) New commits: commit 8778882b8732454fac4a682e60a40ac2e3ad5c03 Author: Jian Fang Zhang zhan...@apache.org Date: Wed Sep 5 01:54:08 2012 + Resolves: #i120738# need to call OWeakObject::release() explicitly to make sure the week object is released correctly. Found by: zhangjf Patch by: zhangjf (cherry picked from commit 1e51e5dab1664dadb40509c4fab593fb27040efd) Conflicts: ucb/source/ucp/tdoc/tdoc_stgelems.cxx Change-Id: I33d0b3b7cda2aa9a220056bf7d641b09036f89e9 diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx index 6c32899..cda68cf 100644 --- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx +++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx @@ -179,11 +179,14 @@ void SAL_CALL Storage::acquire() void SAL_CALL Storage::release() throw () { -if ( osl_atomic_decrement( m_refCount ) == 0 ) -{ +//#i120738, Storage::release overrides OWeakObject::release(), +//need call OWeakObject::release() to release OWeakObject::m_pWeakConnectionPoint + +if ( m_refCount == 1 ) m_xFactory-releaseElement( this ); -delete this; -} + +//delete this; +OWeakObject::release(); } //= ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/doc.hxx |8 +++--- sw/source/core/doc/docnew.cxx|2 + sw/source/core/doc/docxforms.cxx | 51 +-- 3 files changed, 56 insertions(+), 5 deletions(-) New commits: commit 6e426582ec76be20c08d71ad7399b1bd008dfc75 Author: Jian Fang Zhang zhan...@apache.org Date: Fri Sep 14 12:26:29 2012 + Resolves: #i113606# in SwDoc dtor release the cyclic reference... between XFormModel and bindings/submissions Patch by: zhangjf Review by: zhangjf (cherry picked from commit adc0946638e8817d5e57b0003b414249ac481df0) Conflicts: sw/inc/doc.hxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docxforms.cxx Change-Id: I3124daea8925b1efd8e151f3064582786d461718 diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index f0b97f0..c41615b 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -2036,12 +2036,14 @@ public: com::sun::star::uno::Reference com::sun::star::linguistic2::XProofreadingIterator GetGCIterator() const; -/// is this an XForms document? +/// #i31958# is this an XForms document? bool isXForms() const; -/// initialize XForms models; turn this into an XForms document +/// #i31958# initialize XForms models; turn this into an XForms document void initXForms( bool bCreateDefaultModel ); -// access methods for XForms model(s) + +/// #i113606# for disposing XForms +void disposeXForms( ); //Update all the page masters void SetDefaultPageMode(bool bSquaredPageMode); diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 94ebfea..9835e6d 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -673,6 +673,8 @@ SwDoc::~SwDoc() } maListStyleLists.clear(); +disposeXForms(); // #i113606#, dispose the XForms objects + delete mpPrtData; delete mpNumberFormatter; delete mpFtnInfo; diff --git a/sw/source/core/doc/docxforms.cxx b/sw/source/core/doc/docxforms.cxx index e3d9601..416bc2e 100644 --- a/sw/source/core/doc/docxforms.cxx +++ b/sw/source/core/doc/docxforms.cxx @@ -29,7 +29,7 @@ #include com/sun/star/xforms/XForms.hpp #include comphelper/processfactory.hxx #include tools/diagnose_ex.h - +#include com/sun/star/container/XIndexAccess.hpp using namespace ::com::sun::star; @@ -42,7 +42,7 @@ using container::XNameContainer; using xforms::XModel2; using frame::XModule; using xforms::XFormsUIHelper1; - +using com::sun::star::container::XIndexAccess; ReferenceXNameContainer SwDoc::getXForms() const { @@ -94,4 +94,51 @@ void SwDoc::initXForms( bool bCreateDefaultModel ) } } +// #i113606#, to release the cyclic reference between XFormModel and bindings/submissions. +void SwDoc::disposeXForms( ) +{ +// get XForms models +if( mxXForms.is() ) +{ +// iterate over all models +uno::SequenceOUString aNames = mxXForms-getElementNames(); +const OUString* pNames = aNames.getConstArray(); +sal_Int32 nNames = aNames.getLength(); +for( sal_Int32 n = 0; (n nNames); n++ ) +{ +Reference xforms::XModel xModel( +mxXForms-getByName( pNames[n] ), UNO_QUERY ); + +if( xModel.is() ) +{ +// ask model for bindings +Reference XIndexAccess xBindings( + xModel-getBindings(), UNO_QUERY ); + +// +// Then release them one by one +// +int nCount = xBindings-getCount(); +for( int i = nCount-1; i = 0; i-- ) +{ +xModel-getBindings()-remove(xBindings-getByIndex( i )); +} + +// ask model for Submissions +Reference XIndexAccess xSubmissions( + xModel-getSubmissions(), UNO_QUERY ); + +// +// Then release them one by one +// +nCount = xSubmissions-getCount(); +for( int i = nCount-1; i = 0; i-- ) +{ +xModel-getSubmissions()-remove(xSubmissions-getByIndex( i )); +} +} +} +} +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - 6 commits - filter/source include/oox oox/source sw/source writerfilter/source
filter/source/msfilter/msdffimp.cxx | 11 - include/oox/drawingml/table/tableproperties.hxx |2 oox/source/drawingml/table/tableproperties.cxx| 146 +- sw/source/core/unocore/unotext.cxx| 12 + writerfilter/source/dmapper/DomainMapper.cxx | 21 +-- writerfilter/source/dmapper/DomainMapper_Impl.cxx |4 writerfilter/source/dmapper/DomainMapper_Impl.hxx |4 7 files changed, 177 insertions(+), 23 deletions(-) New commits: commit 43f2bd4c785174a58decebf259cd66cf78440e8b Author: Jian Fang Zhang zhan...@apache.org Date: Tue Sep 4 07:11:49 2012 + Related: #i119607#, text font spacing in comments doesn't expand/condense... by the expected value Found by: xiao ting xiao, tingxi...@gmail.com Patch by: bjcheny, compan...@gmail.com Review by: zhangjf (cherry picked from commit 11fda1bd134b07c5bcaca6186d63107ec9f47b98) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx Change-Id: Iecdaee97e49395df59719d724e1544e1802d947d (cherry picked from commit 5f0c969f43538e8a92ed37c27fab228d97b1bebe) diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 86387e9..91d5d94 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2217,10 +2217,17 @@ void DomainMapper::sprmWithProps( Sprm rSprm, PropertyMapPtr rContext, SprmType case 71 : //sprmCDxaSpace case 96 : //sprmCDxaSpace case NS_sprm::LN_CDxaSpace: // sprmCDxaSpace -//Kerning half point values -//TODO: there are two kerning values - -// in ww8par6.cxx NS_sprm::LN_CHpsKern is used as boolean AutoKerning -rContext-Insert(PROP_CHAR_CHAR_KERNING, true, uno::makeAny( sal_Int16(ConversionHelper::convertTwipToMM100(sal_Int16(nIntValue))) ) ); +{ +//Kerning half point values +//TODO: there are two kerning values - +// in ww8par6.cxx NS_sprm::LN_CHpsKern is used as boolean AutoKerning +sal_Int16 nResult = static_castsal_Int16(ConversionHelper::convertTwipToMM100(nIntValue)); +if (m_pImpl-IsInComments()) +{ +nResult = static_castsal_Int16(nIntValue); +} +rContext-Insert(PROP_CHAR_CHAR_KERNING, true, uno::makeAny(nResult)); +} break; case NS_sprm::LN_CHpsKern: // sprmCHpsKernauto kerning is bound to a minimum font size in Word - but not in Writer :-( rContext-Insert(PROP_CHAR_AUTO_KERNING, true, uno::makeAny( sal_Bool(nIntValue) ) ); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index adf5870..fbc633d 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -182,6 +182,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_bParaChanged( false ), m_bIsFirstParaInSection( true ), m_bIsLastParaInSection( false ), +m_bIsInComments( false ), m_bParaSectpr( false ), m_bUsingEnhancedFields( false ), m_bSdt(false), @@ -189,6 +190,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_bIsNewDoc(bIsNewDoc), m_bInTableStyleRunProps(false), m_pSdtHelper(0) + { appendTableManager( ); GetBodyText(); @@ -1571,6 +1573,7 @@ void DomainMapper_Impl::PushAnnotation() try { PropertyMapPtr pTopContext = GetTopContext(); +m_bIsInComments = true; if (!GetTextFactory().is()) return; m_xAnnotationField = uno::Reference beans::XPropertySet ( GetTextFactory()-createInstance( @@ -1600,6 +1603,7 @@ void DomainMapper_Impl::PopAnnotation() { RemoveLastParagraph(); +m_bIsInComments = false; m_aTextAppendStack.pop(); try diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 6864c7b..f88f494 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -363,6 +363,7 @@ private: boolm_bParaChanged; boolm_bIsFirstParaInSection; boolm_bIsLastParaInSection; +boolm_bIsInComments; /// If the current paragraph contains section property definitions. boolm_bParaSectpr; boolm_bUsingEnhancedFields; @@ -634,7 +635,10 @@ public: void SetCustomFtnMark(bool bSet) { m_bIsCustomFtnMark = bSet; } bool IsCustomFtnMark() const { return m_bIsCustomFtnMark; } +bool IsInComments() const { return m_bIsInComments
[Libreoffice-commits] core.git: writerfilter/source
writerfilter/source/dmapper/DomainMapper.cxx | 15 +++ writerfilter/source/dmapper/DomainMapper_Impl.cxx |4 writerfilter/source/dmapper/DomainMapper_Impl.hxx |4 3 files changed, 19 insertions(+), 4 deletions(-) New commits: commit 5f0c969f43538e8a92ed37c27fab228d97b1bebe Author: Jian Fang Zhang zhan...@apache.org Date: Tue Sep 4 07:11:49 2012 + Related: #i119607#, text font spacing in comments doesn't expand/condense... by the expected value Found by: xiao ting xiao, tingxi...@gmail.com Patch by: bjcheny, compan...@gmail.com Review by: zhangjf (cherry picked from commit 11fda1bd134b07c5bcaca6186d63107ec9f47b98) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx Change-Id: Iecdaee97e49395df59719d724e1544e1802d947d diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 47c332b..f611bda 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2216,10 +2216,17 @@ void DomainMapper::sprmWithProps( Sprm rSprm, PropertyMapPtr rContext, SprmType case 71 : //sprmCDxaSpace case 96 : //sprmCDxaSpace case NS_sprm::LN_CDxaSpace: // sprmCDxaSpace -//Kerning half point values -//TODO: there are two kerning values - -// in ww8par6.cxx NS_sprm::LN_CHpsKern is used as boolean AutoKerning -rContext-Insert(PROP_CHAR_CHAR_KERNING, true, uno::makeAny( sal_Int16(ConversionHelper::convertTwipToMM100(sal_Int16(nIntValue))) ) ); +{ +//Kerning half point values +//TODO: there are two kerning values - +// in ww8par6.cxx NS_sprm::LN_CHpsKern is used as boolean AutoKerning +sal_Int16 nResult = static_castsal_Int16(ConversionHelper::convertTwipToMM100(nIntValue)); +if (m_pImpl-IsInComments()) +{ +nResult = static_castsal_Int16(nIntValue); +} +rContext-Insert(PROP_CHAR_CHAR_KERNING, true, uno::makeAny(nResult)); +} break; case NS_sprm::LN_CHpsKern: // sprmCHpsKernauto kerning is bound to a minimum font size in Word - but not in Writer :-( rContext-Insert(PROP_CHAR_AUTO_KERNING, true, uno::makeAny( sal_Bool(nIntValue) ) ); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index adf5870..fbc633d 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -182,6 +182,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_bParaChanged( false ), m_bIsFirstParaInSection( true ), m_bIsLastParaInSection( false ), +m_bIsInComments( false ), m_bParaSectpr( false ), m_bUsingEnhancedFields( false ), m_bSdt(false), @@ -189,6 +190,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_bIsNewDoc(bIsNewDoc), m_bInTableStyleRunProps(false), m_pSdtHelper(0) + { appendTableManager( ); GetBodyText(); @@ -1571,6 +1573,7 @@ void DomainMapper_Impl::PushAnnotation() try { PropertyMapPtr pTopContext = GetTopContext(); +m_bIsInComments = true; if (!GetTextFactory().is()) return; m_xAnnotationField = uno::Reference beans::XPropertySet ( GetTextFactory()-createInstance( @@ -1600,6 +1603,7 @@ void DomainMapper_Impl::PopAnnotation() { RemoveLastParagraph(); +m_bIsInComments = false; m_aTextAppendStack.pop(); try diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index fba658a..dc7f2dd 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -363,6 +363,7 @@ private: boolm_bParaChanged; boolm_bIsFirstParaInSection; boolm_bIsLastParaInSection; +boolm_bIsInComments; /// If the current paragraph contains section property definitions. boolm_bParaSectpr; boolm_bUsingEnhancedFields; @@ -634,7 +635,10 @@ public: void SetCustomFtnMark(bool bSet) { m_bIsCustomFtnMark = bSet; } bool IsCustomFtnMark() const { return m_bIsCustomFtnMark; } +bool IsInComments() const { return m_bIsInComments; }; + void CheckUnregisteredFrameConversion( ); + void RegisterFrameConversion( ::com::sun::star::uno::Reference ::com::sun::star::text::XTextRange xFrameStartRange, ::com::sun::star::uno::Reference ::com::sun::star::text::XTextRange xFrameEndRange
[Libreoffice-commits] core.git: sw/inc sw/source writerfilter/source
sw/inc/unomap.hxx |3 ++- sw/inc/unoprnms.hxx |4 +++- sw/source/core/unocore/unomap.cxx |1 + sw/source/core/unocore/unoprnms.cxx |1 + sw/source/ui/uno/unotxdoc.cxx |8 writerfilter/source/dmapper/PropertyIds.cxx |1 + writerfilter/source/dmapper/PropertyIds.hxx |1 + writerfilter/source/dmapper/PropertyMap.cxx | 26 +- 8 files changed, 30 insertions(+), 15 deletions(-) New commits: commit 0181f258e5598ee59b1c4847818944b8da16bd51 Author: Jian Fang Zhang zhan...@apache.org Date: Wed Sep 12 11:19:10 2012 + Resolves: #i119558# set default page mode value to false for docx To avoid default page mode affect the calculation of table row height Found by: xiao ting xiao, tingxi...@gmail.com Patch by: zhaoshzh, aoo.zhaos...@gmail.com Review by: zhangjf (cherry picked from commit 28e1cb1240e7c7a274a04756c7cab2f5797de400) Conflicts: sw/inc/unomap.hxx sw/inc/unoprnms.hxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/ui/uno/unotxdoc.cxx writerfilter/source/dmapper/PropertyIds.cxx Change-Id: I41745eb9d727a5ae87d34872f9dc3f4442c7bc8d diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx index 7f130a2..128570c 100644 --- a/sw/inc/unomap.hxx +++ b/sw/inc/unomap.hxx @@ -237,7 +237,8 @@ #define WID_DOC_LOCK_UPDATES1016 #define WID_DOC_HAS_VALID_SIGNATURES1017 #define WID_DOC_BUILDID 1024 -#define WID_DOC_ISTEMPLATEID1025 +#define WID_DOC_ISTEMPLATEID1025 +#define WID_DOC_DEFAULT_PAGE_MODE 1069 // MailMerge #define WID_SELECTION 1071 diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index 42027af..fb6e9d3 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -820,7 +820,9 @@ enum SwPropNameIds /* 0758 */ UNO_NAME_FILL_GRADIENT, /* 0759 */ UNO_NAME_FILL_GRADIENT_NAME, -/* 0760 */ SW_PROPNAME_END +/* 0760 */ UNO_NAME_DEFAULT_PAGE_MODE, + +/* 0761 */ SW_PROPNAME_END // new items in this array must match SwPropNameTab aPropNameTab }; diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index 5f3cfc2..a9bf548 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -1559,6 +1559,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s { SW_PROP_NMID(UNO_NAME_LOCK_UPDATES), WID_DOC_LOCK_UPDATES, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, { SW_PROP_NMID(UNO_NAME_HAS_VALID_SIGNATURES), WID_DOC_HAS_VALID_SIGNATURES, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::READONLY, 0}, { SW_PROP_NMID(UNO_NAME_BUILDID), WID_DOC_BUILDID, CPPU_E2T(CPPUTYPE_OUSTRING), 0, 0}, +{ SW_PROP_NMID(UNO_NAME_DEFAULT_PAGE_MODE), WID_DOC_DEFAULT_PAGE_MODE, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0}, {0,0,0,0,0,0} }; aMapEntriesArr[nPropertyId] = aDocMap_Impl; diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx index f1e0f19..f28e927 100644 --- a/sw/source/core/unocore/unoprnms.cxx +++ b/sw/source/core/unocore/unoprnms.cxx @@ -789,6 +789,7 @@ const SwPropNameTab aPropNameTab = { /* 0757 UNO_NAME_FILL_STYLE */ {MAP_CHAR_LEN(FillStyle)}, /* 0758 UNO_NAME_FILL_GRADIENT */ {MAP_CHAR_LEN(FillGradient)}, /* 0759 UNO_NAME_FILL_GRADIENT_NAME */ {MAP_CHAR_LEN(FillGradientName)}, +/* 0760 UNO_NAME_DEFAULT_PAGE_MODE */{MAP_CHAR_LEN(DefaultPageMode)} // new items in this array must match enum SwPropNameIds }; diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index f8d33f0..84e2930 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -1991,6 +1991,14 @@ void SwXTextDocument::setPropertyValue(const OUString rPropertyName, aValue = maBuildId; break; +case WID_DOC_DEFAULT_PAGE_MODE: +{ +bool bDefaultPageMode( false ); +aValue = bDefaultPageMode; +pDocShell-GetDoc()-SetDefaultPageMode( bDefaultPageMode ); +} +break; + default: { const SfxPoolItem rItem = pDocShell-GetDoc()-GetDefault(pEntry-nWID); diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index 86438b9..e506ee8 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -228,6 +228,7 @@ const OUString PropertyNameSupplier::GetName( PropertyIds eId ) const case PROP_GRID_LINES:sName = GridLines; break
[Libreoffice-commits] core.git: 2 commits - chart2/source
chart2/source/model/main/ChartModel.cxx |3 +++ chart2/source/view/main/ChartView.cxx |6 ++ 2 files changed, 9 insertions(+) New commits: commit 8196dab4f450d96905f0bbfe650ae7a78c8972e2 Author: Jian Fang Zhang zhan...@apache.org Date: Tue Sep 11 12:30:18 2012 + Resolves: #i120831# call dispose() from ChartView dtor... to make sure SfxBaseModel object is freed correctly Found by: zhangjf Patch by: zhangjf (cherry picked from commit 4cb73634a602272d8de33dfe23722912e4494bbc) Change-Id: I9e316178ef273b13e77d0b166f17fc700363f7bb diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index e5ae969..a19a413 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -200,6 +200,12 @@ void SAL_CALL ChartView::initialize( const uno::Sequence uno::Any aArguments ChartView::~ChartView() { +// #i120831#. In ChartView::initialize(), m_xShapeFactory is created from SdrModel::getUnoModel() and indirectly +// from SfxBaseModel, it needs call dispose() to make sure SfxBaseModel object is freed correctly. +uno::Reference lang::XComponent xComp( m_xShapeFactory, uno::UNO_QUERY); +if ( xComp.is() ) +xComp-dispose(); + if( m_pDrawModelWrapper.get() ) { EndListening( m_pDrawModelWrapper-getSdrModel(), false /*bAllDups*/ ); commit 275225ed4d401d306c75de92fb980a6a3f85c635 Author: Jian Fang Zhang zhan...@apache.org Date: Tue Sep 11 12:20:33 2012 + Resolves: #i120828#, restore some ChartModel::dispose() calls.. to break cyclic reference Found by: zhangjf Patch by: zhangjf (cherry picked from commit 1c564cb9a46fc6435750f9f1a70f654b52efd970) Change-Id: I8aaac18584d55d9f381acdf4deb0e704bc9bcfc1 diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index e2157c4..aa5f78f 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -556,6 +556,9 @@ void SAL_CALL ChartModel::dispose() throw(uno::RuntimeException) m_pUndoManager.clear(); // that's important, since the UndoManager implementation delegates its ref counting to ourself. +if( m_xOldModelAgg.is()) // #i120828#, to release cyclic reference to ChartModel object +m_xOldModelAgg-setDelegator( 0 ); + m_aControllers.disposeAndClear( lang::EventObject( static_cast cppu::OWeakObject * ( this ))); m_xCurrentController.clear(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/filter/xml/xmltbli.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit fc08fc98655397103ce7aacc18c2aa538ccff4e1 Author: Jian Fang Zhang zhan...@apache.org Date: Tue Sep 4 01:05:22 2012 + Resolves: #i113600# Add call to subtable SwXMLTableRow_Impl.dispose()... to break cycle reference to SwXMLTableContext object Found by: zhangjf Patch by: zhangjf (cherry picked from commit ba47a717e009b2b497cbccfca2872e66f9ecb130) Change-Id: Iba0b581920417b3866b07542621d56ccdc272261 diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index e0a214f..7756ab5 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -2867,6 +2867,9 @@ void SwXMLTableContext::MakeTable( SwTableBox *pBox, sal_Int32 nW ) bRelWidth = GetParentTable()-bRelWidth; _MakeTable( pBox ); + +for (size_t i=0; i pRows-size(); ++i) // i113600, to break the cyclic reference to SwXMLTableContext object +(*pRows)[i].Dispose(); } const SwStartNode *SwXMLTableContext::InsertTableSection( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sw/source
sw/source/filter/xml/xmltbli.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit b4311a2871e16001138e6d0009a552dc53d7bcd3 Author: Jian Fang Zhang zhan...@apache.org Date: Tue Sep 4 01:05:22 2012 + Resolves: #i113600# Add call to subtable SwXMLTableRow_Impl.dispose()... to break cycle reference to SwXMLTableContext object Found by: zhangjf Patch by: zhangjf (cherry picked from commit ba47a717e009b2b497cbccfca2872e66f9ecb130) Change-Id: Iba0b581920417b3866b07542621d56ccdc272261 (cherry picked from commit fc08fc98655397103ce7aacc18c2aa538ccff4e1) diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 617faf4..dd8b358 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -2867,6 +2867,9 @@ void SwXMLTableContext::MakeTable( SwTableBox *pBox, sal_Int32 nW ) bRelWidth = GetParentTable()-bRelWidth; _MakeTable( pBox ); + +for (size_t i=0; i pRows-size(); ++i) // i113600, to break the cyclic reference to SwXMLTableContext object +(*pRows)[i].Dispose(); } const SwStartNode *SwXMLTableContext::InsertTableSection( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - include/oox include/svx svx/source
include/oox/core/recordparser.hxx|4 +--- include/svx/sdasitm.hxx | 17 + svx/source/form/fmundo.cxx |3 +++ svx/source/items/customshapeitem.cxx | 15 ++- 4 files changed, 23 insertions(+), 16 deletions(-) New commits: commit 853a7ae81de88a9b2903a673a40b6a3943868c6a Author: Jian Fang Zhang zhan...@apache.org Date: Wed Sep 5 03:44:09 2012 + Resolves: #i120746# FormScriptingEnvironment is never released when created in the FmXUndoEnvironment ctor it is never released Found by: zhangjf Patch by: zhangjf (cherry picked from commit d52fc99575db0d30b19a69dadcd2c3544584ecab) Change-Id: Iaeba1018551441f3bb13f90d3d42ac2855e285e6 diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index cf1567b..7b07764 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -193,6 +193,9 @@ FmXUndoEnvironment::FmXUndoEnvironment(FmFormModel _rModel) FmXUndoEnvironment::~FmXUndoEnvironment() { DBG_DTOR(FmXUndoEnvironment,NULL); +if ( !m_bDisposed ) // i120746, call FormScriptingEnvironment::dispose to avoid memory leak +m_pScriptingEnv-dispose(); + if (m_pPropertySetCache) delete static_castPropertySetInfoCache*(m_pPropertySetCache); } commit a6659d6df6d68a4df43e70376cf6eea1fb54b932 Author: Herbert Dürr h...@apache.org Date: Tue Apr 16 12:03:08 2013 + provide complete types of some SdrCustomShapeGeometryItem functors... before they are used (cherry picked from commit 7d6c5e79a17aa2ff392433667187c4bfe4ee2432) Conflicts: svx/inc/svx/sdasitm.hxx svx/source/items/customshapeitem.cxx Change-Id: Iac3e37bcfd4ab26d97411092259da2cc1879c2de diff --git a/include/svx/sdasitm.hxx b/include/svx/sdasitm.hxx index e54bf1f..0f7164e 100644 --- a/include/svx/sdasitm.hxx +++ b/include/svx/sdasitm.hxx @@ -127,6 +127,23 @@ public: SdrTextAutoGrowSizeItem( SvStream rIn ) :SdrOnOffItem( SDRATTR_TEXT_AUTOGROWSIZE, rIn ) {} }; +// some useful inline methods + +inline bool SdrCustomShapeGeometryItem::PropertyEq::operator()( const OUString r1, const OUString r2 ) const +{ +return r1.equals( r2 ); +} + +inline bool SdrCustomShapeGeometryItem::PropertyPairEq::operator()( const SdrCustomShapeGeometryItem::PropertyPair r1, const SdrCustomShapeGeometryItem::PropertyPair r2 ) const +{ +return ( r1.first.equals( r2.first ) ) ( r1.second.equals( r2.second ) ); +} + +inline size_t SdrCustomShapeGeometryItem::PropertyPairHash::operator()( const SdrCustomShapeGeometryItem::PropertyPair r1 ) const +{ +return (size_t)r1.first.hashCode() + r1.second.hashCode(); +}; + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx index 5b8ed9f..87b8cfc 100644 --- a/svx/source/items/customshapeitem.cxx +++ b/svx/source/items/customshapeitem.cxx @@ -31,23 +31,12 @@ SdrCustomShapeDataItem::SdrCustomShapeDataItem() : SfxStringItem( SDRATTR_CUSTOMSHAPE_DATA, String() ) {} -bool SdrCustomShapeGeometryItem::PropertyEq::operator()( const OUString r1, const OUString r2 ) const -{ -return r1.equals( r2 ); -} -bool SdrCustomShapeGeometryItem::PropertyPairEq::operator()( const SdrCustomShapeGeometryItem::PropertyPair r1, const SdrCustomShapeGeometryItem::PropertyPair r2 ) const -{ -return ( r1.first.equals( r2.first ) ) ( r1.second.equals( r2.second ) ); -} -size_t SdrCustomShapeGeometryItem::PropertyPairHash::operator()( const SdrCustomShapeGeometryItem::PropertyPair r1 ) const -{ -return (size_t)r1.first.hashCode() + r1.second.hashCode(); -}; - TYPEINIT1_FACTORY( SdrCustomShapeGeometryItem, SfxPoolItem , new SdrCustomShapeGeometryItem); + SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem() : SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) {} + SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem( const uno::Sequence beans::PropertyValue rVal ) : SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) { commit 1fb61b87136e556f13537794d30077606f4949c9 Author: Herbert Dürr h...@apache.org Date: Tue Apr 16 11:23:34 2013 + provide complete types of FragmentHandler and RecordInfo before they are used (cherry picked from commit c73bc9587bdcf6a5d3add454fe3383fc9d2c1e65) Conflicts: oox/inc/oox/core/recordparser.hxx Change-Id: I6deecaabe32d4b071a83ce4687f83543354ddac2 diff --git a/include/oox/core/recordparser.hxx b/include/oox/core/recordparser.hxx index 9e417c0..bd89427 100644 --- a/include/oox/core/recordparser.hxx +++ b/include/oox/core/recordparser.hxx @@ -25,13 +25,11 @@ #include com/sun/star/xml/sax/SAXException.hpp #include rtl/ref.hxx #include oox/helper/binaryinputstream.hxx +#include oox/core/fragmenthandler.hxx namespace oox { namespace core { -class FragmentHandler; -struct RecordInfo; - namespace prv { class
[Libreoffice-commits] core.git: sw/source writerfilter/source
sw/source/core/unocore/unotext.cxx | 12 +--- sw/source/filter/ww8/ww8par6.cxx |6 +++--- writerfilter/source/dmapper/DomainMapper.cxx |6 -- 3 files changed, 12 insertions(+), 12 deletions(-) New commits: commit 8943478b8d34216d3f2d64dfccd48d181d1a0f91 Author: Jian Fang Zhang zhan...@apache.org Date: Tue Sep 11 11:44:52 2012 + Related #i120832#, the style and color set on table text by user... should have higher priority than that from table style Found by: Jinlong Wu,wujinl...@gmail.com Patch by: bjcheny,compan...@gmail.com Review by: zhangjf (cherry picked from commit fe7e723a727f6def90ee80ef2964a40546b37a90) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx Change-Id: I3f4c96d49de40b21cc3da9bcb5e588a270434cd8 diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 00c6e85..aadcb08 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2165,9 +2165,15 @@ lcl_ApplyCellProperties( xCellText-createTextCursor(); xCellCurs-gotoStart( sal_False ); xCellCurs-gotoEnd( sal_True ); -const uno::Reference beans::XPropertySet xCellTextProps( -xCellCurs, uno::UNO_QUERY); -xCellTextProps-setPropertyValue(rName, rValue); +const uno::Reference beans::XPropertyState +xCellTextPropState(xCellCurs, uno::UNO_QUERY); +const beans::PropertyState state = xCellTextPropState-getPropertyState(rName); +if (state == beans::PropertyState_DEFAULT_VALUE) +{ +const uno::Reference beans::XPropertySet +xCellTextProps(xCellCurs, uno::UNO_QUERY); +xCellTextProps-setPropertyValue(rName, rValue); +} } } } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 0d9a638..c33eec1 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -1396,8 +1396,8 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem rShadow, const short *pSizeArray, : (pbrc[WW8_RIGHT].aBits2[ 1 ] 0x20 ) ) (pSizeArray pSizeArray[WW8_RIGHT]) ); -if (bRet) -{ +//if (bRet) +//{ rShadow.SetColor(Color(COL_BLACK)); short nVal = pSizeArray[WW8_RIGHT]; if (nVal 0x10) @@ -1405,7 +1405,7 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem rShadow, const short *pSizeArray, rShadow.SetWidth(nVal); rShadow.SetLocation(SVX_SHADOW_BOTTOMRIGHT); bRet = true; -} +//} return bRet; } diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 10a018a..5612434 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3547,12 +3547,6 @@ void DomainMapper::PopListProperties() void DomainMapper::lcl_startCharacterGroup() { m_pImpl-PushProperties(CONTEXT_CHARACTER); -DomainMapperTableManager rTableManager = m_pImpl-getTableManager(); -if( !rTableManager.getTableStyleName().isEmpty() ) -{ -PropertyMapPtr pTopContext = m_pImpl-GetTopContext(); -rTableManager.CopyTextProperties(pTopContext, m_pImpl-GetStyleSheetTable()); -} } void DomainMapper::lcl_endCharacterGroup() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - writerfilter/source
writerfilter/source/dmapper/DomainMapper.cxx | 15 - writerfilter/source/dmapper/NumberingManager.cxx | 35 ++- writerfilter/source/dmapper/NumberingManager.hxx |6 +++ writerfilter/source/dmapper/PropertyMap.hxx |5 +++ 4 files changed, 58 insertions(+), 3 deletions(-) New commits: commit 0063e19b339b58d919a2348de492a3bd8de57280 Author: Jian Fang Zhang zhan...@apache.org Date: Thu Oct 25 12:57:56 2012 + #i121134#, more fix for i119657, fallback to old logic to use current AbstractNum when the desired one can not find Found by: Li Lin Yi Patch by: Jinlong Wu,wujinl...@gmail.com Review by: zhangjf (cherry picked from commit aa53b457faaf0fc50a8b38d17bf219de427a1044) diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index de016d2..98dacdf 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -1157,6 +1157,8 @@ AbstractListDef::Pointer ListsManager::GetAbstractList( sal_Int32 nId ) ListDef::Pointer pList = GetList( pStyleSheetProperties-GetNumId() ); if ( pList!=NULL ) return pList-GetAbstractDefinition(); +else +pAbstractList = m_aAbstractLists[i]; } } commit 40a5d22fd4117f8e3ad6807264fb448f4d9959aa Author: Jian Fang Zhang zhan...@apache.org Date: Fri Sep 14 13:20:57 2012 + Related: #i119657#, importing docx, add code to handle the problem... that an AbstracNum references to a style, which references to another Num Found by: xiao ting xiao Patch by: Jinlong Wu,wujinl...@gmail.com Review by: zhangjf (cherry picked from commit d6870e145cc7373a422b414c31380cc1399e64cc) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/NumberingManager.cxx Change-Id: I9be0b82d601bf43da31842edb02c4b0d4e50e84f diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 896a675..9de2fa6 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1585,8 +1585,19 @@ void DomainMapper::sprmWithProps( Sprm rSprm, PropertyMapPtr rContext, SprmType rContext-erase( PropertyDefinition( PROP_NUMBERING_STYLE_NAME, true )); } } -else if ( !m_pImpl-IsStyleSheetImport( ) ) -rContext-Insert( PROP_NUMBERING_STYLE_NAME, true, uno::makeAny( OUString() ) ); +else +{ +if( m_pImpl-IsStyleSheetImport() ) +{ +// set the number id for AbstractNum references +StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast StyleSheetPropertyMap* ( rContext.get() ); +pStyleSheetPropertyMap-SetNumId( nIntValue ); +} +else +{ +rContext-Insert( PROP_NUMBERING_STYLE_NAME, true, uno::makeAny( OUString() ) ); +} +} } break; case NS_sprm::LN_PFNoLineNumb: // sprmPFNoLineNumb diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 2f89593..de016d2 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -1073,6 +1073,13 @@ void ListsManager::lcl_sprm( Sprm rSprm ) pProperties-resolve(*this); } break; +case NS_ooxml::LN_CT_AbstractNum_numStyleLink: +{ +OUString sStyleName = rSprm.getValue( )-getString( ); +AbstractListDef* pAbstractListDef = dynamic_cast AbstractListDef* ( m_pCurrentDefinition.get( ) ); +pAbstractListDef-SetNumStyleLink(sStyleName); +} +break; case NS_ooxml::LN_EG_RPrBase_rFonts: //contains font properties case NS_ooxml::LN_EG_RPrBase_color: case NS_ooxml::LN_EG_RPrBase_u: @@ -1133,7 +1140,31 @@ AbstractListDef::Pointer ListsManager::GetAbstractList( sal_Int32 nId ) while ( !pAbstractList.get( ) i nLen ) { if ( m_aAbstractLists[i]-GetId( ) == nId ) -pAbstractList = m_aAbstractLists[i]; +{ +if ( m_aAbstractLists[i]-GetNumStyleLink().getLength() 0 ) +{ +// If the abstract num has a style linked, check the linked style's number id. +StyleSheetTablePtr pStylesTable = m_rDMapper.GetStyleSheetTable( ); + +const StyleSheetEntryPtr pStyleSheetEntry = +pStylesTable-FindStyleSheetByISTD( m_aAbstractLists[i]-GetNumStyleLink
[Libreoffice-commits] core.git: sw/source
sw/source/core/fields/docufld.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 31d898853e6898227c3416db0107285e2590d297 Author: Jian Fang Zhang zhan...@apache.org Date: Tue Sep 4 04:19:55 2012 + Resolves: #i120735# free the para object or editengine object... attached to textfield object explicitly Found by: zhangjf Patch by: zhangjf (cherry picked from commit e2005137e019864578196d06be8ef63aa32a4e96) Change-Id: I5b7f240d0131017dc9fc35e6e1d14c553de8eacf diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 521cdcec..a7aa86a 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -1751,6 +1751,8 @@ SwPostItField::~SwPostItField() m_pTextObject-DisposeEditSource(); m_pTextObject-release(); } + +delete mpText; } const SwFmtFld* SwPostItField::GetByName(SwDoc* pDoc, const OUString rName) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlsecurity/source
xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx | 61 ++ xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.hxx |6 2 files changed, 48 insertions(+), 19 deletions(-) New commits: commit 3d8a7a435c2e97a02ccca30352a71e68ab112dfc Author: Jian Fang Zhang zhan...@apache.org Date: Tue Sep 4 01:46:03 2012 + Resolves: #i120675# the certificate store handles need to be closed after closing the document Found by: zhangjf Patch by: zhangjf (cherry picked from commit 33d9584bb6d285de1d935bf23adbb2c756f4) Change-Id: I131a17276f33059eb944fc34272c50f838b6973f diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx index 3bdcd56..ef23b20 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx @@ -104,7 +104,7 @@ void traceTrustStatus(DWORD err) } } -SecurityEnvironment_MSCryptImpl :: SecurityEnvironment_MSCryptImpl( const Reference XMultiServiceFactory aFactory ) : m_hProv( NULL ) , m_pszContainer( NULL ) , m_hKeyStore( NULL ), m_hCertStore( NULL ), m_tSymKeyList() , m_tPubKeyList() , m_tPriKeyList(), m_xServiceManager( aFactory ), m_bEnableDefault( sal_False ) { +SecurityEnvironment_MSCryptImpl :: SecurityEnvironment_MSCryptImpl( const Reference XMultiServiceFactory aFactory ) : m_hProv( NULL ) , m_pszContainer( NULL ) , m_hKeyStore( NULL ), m_hCertStore( NULL ), m_tSymKeyList() , m_tPubKeyList() , m_tPriKeyList(), m_xServiceManager( aFactory ), m_bEnableDefault( sal_False ), m_hMySystemStore(NULL), m_hRootSystemStore(NULL), m_hTrustSystemStore(NULL), m_hCaSystemStore(NULL){ } @@ -130,6 +130,27 @@ SecurityEnvironment_MSCryptImpl :: ~SecurityEnvironment_MSCryptImpl() { m_hKeyStore = NULL ; } +//i120675, close the store handles +if( m_hMySystemStore != NULL ) { +CertCloseStore( m_hMySystemStore, CERT_CLOSE_STORE_CHECK_FLAG ) ; +m_hMySystemStore = NULL ; +} + +if( m_hRootSystemStore != NULL ) { +CertCloseStore( m_hRootSystemStore, CERT_CLOSE_STORE_CHECK_FLAG ) ; +m_hRootSystemStore = NULL ; +} + +if( m_hTrustSystemStore != NULL ) { +CertCloseStore( m_hTrustSystemStore, CERT_CLOSE_STORE_CHECK_FLAG ) ; +m_hTrustSystemStore = NULL ; +} + +if( m_hCaSystemStore != NULL ) { +CertCloseStore( m_hCaSystemStore, CERT_CLOSE_STORE_CHECK_FLAG ) ; +m_hCaSystemStore = NULL ; +} + if( !m_tSymKeyList.empty() ) { std::list HCRYPTKEY ::iterator symKeyIt ; @@ -1210,40 +1231,42 @@ xmlSecKeysMngrPtr SecurityEnvironment_MSCryptImpl :: createKeysManager() throw( * Adopt system default certificate store. */ if( defaultEnabled() ) { -HCERTSTORE hSystemStore ; - //Add system key store into the keys manager. -hSystemStore = CertOpenSystemStore( 0, MY ) ; -if( hSystemStore != NULL ) { -if( xmlSecMSCryptoAppliedKeysMngrAdoptKeyStore( pKeysMngr, hSystemStore ) 0 ) { -CertCloseStore( hSystemStore, CERT_CLOSE_STORE_CHECK_FLAG ) ; +m_hMySystemStore = CertOpenSystemStore( 0, MY ) ; +if( m_hMySystemStore != NULL ) { +if( xmlSecMSCryptoAppliedKeysMngrAdoptKeyStore( pKeysMngr, m_hMySystemStore ) 0 ) { +CertCloseStore( m_hMySystemStore, CERT_CLOSE_STORE_CHECK_FLAG ) ; +m_hMySystemStore = NULL; throw RuntimeException() ; } } //Add system root store into the keys manager. -hSystemStore = CertOpenSystemStore( 0, Root ) ; -if( hSystemStore != NULL ) { -if( xmlSecMSCryptoAppliedKeysMngrAdoptTrustedStore( pKeysMngr, hSystemStore ) 0 ) { -CertCloseStore( hSystemStore, CERT_CLOSE_STORE_CHECK_FLAG ) ; +m_hRootSystemStore = CertOpenSystemStore( 0, Root ) ; +if( m_hRootSystemStore != NULL ) { +if( xmlSecMSCryptoAppliedKeysMngrAdoptTrustedStore( pKeysMngr, m_hRootSystemStore ) 0 ) { +CertCloseStore( m_hRootSystemStore, CERT_CLOSE_STORE_CHECK_FLAG ) ; +m_hRootSystemStore = NULL; throw RuntimeException() ; } } //Add system trusted store into the keys manager. -hSystemStore = CertOpenSystemStore( 0, Trust ) ; -if( hSystemStore != NULL ) { -if( xmlSecMSCryptoAppliedKeysMngrAdoptUntrustedStore( pKeysMngr, hSystemStore ) 0 ) { -CertCloseStore( hSystemStore, CERT_CLOSE_STORE_CHECK_FLAG ) ; +m_hTrustSystemStore = CertOpenSystemStore( 0, Trust ) ; +if( m_hTrustSystemStore != NULL ) { +if( xmlSecMSCryptoAppliedKeysMngrAdoptUntrustedStore( pKeysMngr, m_hTrustSystemStore ) 0
[Libreoffice-commits] core.git: embeddedobj/source
embeddedobj/source/msole/olecomponent.cxx |4 1 file changed, 4 insertions(+) New commits: commit 334086d0bdd0ff8a8fc07632c97f02917db6047f Author: Jian Fang Zhang zhan...@apache.org Date: Mon Sep 3 05:40:25 2012 + Resolves: #i113605# missing :ReleaseStgMedium() call on STGMEDIUM object which causes obvious memory leaks Found by: zhangjf Patch by: zhangjf (cherry picked from commit e0d9b7a23ca3e7ba181134cd89f3f18233031ef1) Change-Id: I5f99f8cf02e155e5284df3df89feb49d9a30c2c1 diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index cb5967d..74b801b 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -1197,6 +1197,9 @@ awt::Size OleComponent::GetExtent( sal_Int64 nAspect ) OSL_FAIL( Unexpected size is provided! ); } } +// i113605, to release storage medium +if ( SUCCEEDED( hr ) ) +::ReleaseStgMedium(aMedium); } } @@ -1568,6 +1571,7 @@ uno::Any SAL_CALL OleComponent::getTransferData( const datatransfer::DataFlavor if ( SUCCEEDED( hr ) ) { bSupportedFlavor = m_pNativeImpl-ConvertDataForFlavor( aMedium, aFlavor, aResult ); +::ReleaseStgMedium(aMedium); // i113605, to release storage medium if ( bSupportedFlavor ) { // TODO/LATER: bring the optimization back when other aspects are supported ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: animations/source svx/inc svx/source
animations/source/animcore/animcore.cxx | 13 - svx/inc/svx/svdobj.hxx |2 +- svx/source/svdraw/svdobj.cxx|5 - 3 files changed, 13 insertions(+), 7 deletions(-) New commits: commit d6e752d5ebfaf66d1c9b0694f9c8582311d6151a Author: Jian Fang Zhang zhan...@apache.org Date: Mon Jun 18 12:26:30 2012 + i#113608#, memory leak in animations: newly exposed crashed problem Patch by: zhangjf Review by: Andre Fischer Conflicts: animations/source/animcore/animcore.cxx svx/source/svdraw/svdobj.cxx Change-Id: I305d5d92d064265edf108a5a34c948c610b4fdc1 diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 6307f30..a503097 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -46,6 +46,8 @@ #include com/sun/star/lang/XUnoTunnel.hpp #include comphelper/servicehelper.hxx #include cppuhelper/interfacecontainer.hxx +#include cppuhelper/weakref.hxx + #include cppuhelper/implbase1.hxx #include rtl/uuid.h @@ -64,6 +66,7 @@ using ::com::sun::star::uno::XInterface; using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Reference; +using ::com::sun::star::uno::WeakReference; using ::com::sun::star::uno::XComponentContext; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::XWeak; @@ -300,7 +303,7 @@ private: Sequence NamedValue maUserData; // parent interface for XChild interface implementation -ReferenceXInterface mxParent; +WeakReferenceXInterface mxParent; AnimationNode* mpParent; // attributes for XAnimate @@ -1134,7 +1137,7 @@ void SAL_CALL AnimationNode::setUserData( const Sequence NamedValue _userdat Reference XInterface SAL_CALL AnimationNode::getParent() throw (RuntimeException) { Guard Mutex aGuard( maMutex ); -return mxParent; +return mxParent.get(); } // @@ -1143,12 +1146,12 @@ Reference XInterface SAL_CALL AnimationNode::getParent() throw (RuntimeExcept void SAL_CALL AnimationNode::setParent( const Reference XInterface Parent ) throw (NoSupportException, RuntimeException) { Guard Mutex aGuard( maMutex ); -if( Parent != mxParent ) +if( Parent != mxParent.get() ) { mxParent = Parent; mpParent = 0; -Reference XUnoTunnel xTunnel( mxParent, UNO_QUERY ); +Reference XUnoTunnel xTunnel( mxParent.get(), UNO_QUERY ); if( xTunnel.is() ) mpParent = reinterpret_cast AnimationNode* ( sal::static_int_cast sal_IntPtr (xTunnel-getSomething( getUnoTunnelId() ))); @@ -2050,7 +2053,7 @@ void AnimationNode::fireChangeListener() { Reference XInterface xSource( static_castOWeakObject*(this), UNO_QUERY ); Sequence ElementChange aChanges; -const ChangesEvent aEvent( xSource, makeAny( mxParent ), aChanges ); +const ChangesEvent aEvent( xSource, makeAny( mxParent.get() ), aChanges ); while( aIterator.hasMoreElements() ) { Reference XChangesListener xListener( aIterator.next(), UNO_QUERY ); diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx index 75cc0e4..27a4568 100644 --- a/svx/inc/svx/svdobj.hxx +++ b/svx/inc/svx/svdobj.hxx @@ -1072,7 +1072,7 @@ protected: private: /** only for internal use! */ -SvxShape* getSvxShape() const; +SvxShape* getSvxShape(); /** do not use directly, always use getSvxShape() if you have to! */ SvxShape* mpSvxShape; diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index e35c994..1e52b4f 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -2963,7 +2963,7 @@ void SdrObject::impl_setUnoShape( const uno::Reference uno::XInterface _rxUn } /** only for internal use! */ -SvxShape* SdrObject::getSvxShape() const +SvxShape* SdrObject::getSvxShape() { DBG_TESTSOLARMUTEX(); // retrieving the impl pointer and subsequently using it is not thread-safe, of course, so it needs to be @@ -2974,6 +2974,9 @@ SvxShape* SdrObject::getSvxShape() const OSL_ENSURE( !( !xShape.is() mpSvxShape ), SdrObject::getSvxShape: still having IMPL-Pointer to dead object! ); #endif +//#113608#, make sure mpSvxShape is always synchronized with maWeakUnoShape +if ( mpSvxShape !xShape.is() ) +mpSvxShape = NULL; return mpSvxShape; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: writerfilter/source
writerfilter/source/dmapper/ConversionHelper.cxx |4 1 file changed, 4 insertions(+) New commits: commit bbc2cde76c9e9779a5494f0ac81716b9d56a43e5 Author: Jian Fang Zhang zhan...@apache.org Date: Mon Sep 3 07:50:59 2012 + #i119658#, some Chinese numbering formats are not supported Found by: xiao ting xiao, tingxi...@gmail.com Patch by: bjcheny, compan...@gmail.com Review by: zhangjf (cherry picked from commit 50eca22976c42014f5e2c53f4bf19e2e1d21ee62) Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx index 88c9372..86357af 100644 --- a/writerfilter/source/dmapper/ConversionHelper.cxx +++ b/writerfilter/source/dmapper/ConversionHelper.cxx @@ -426,8 +426,12 @@ sal_Int16 ConvertNumberingType(sal_Int32 nNFC) case NS_ooxml::LN_Value_ST_NumberFormat_japaneseCounting: case NS_ooxml::LN_Value_ST_NumberFormat_taiwaneseCounting: case NS_ooxml::LN_Value_ST_NumberFormat_ideographDigital: +case NS_ooxml::LN_Value_ST_NumberFormat_chineseCountingThousand: nRet = style::NumberingType::NUMBER_LOWER_ZH; break; +case NS_ooxml::LN_Value_ST_NumberFormat_chineseLegalSimplified: +nRet = style::NumberingType::NUMBER_UPPER_ZH; +break; default: nRet = style::NumberingType::ARABIC; } /* TODO: Lots of additional values are available - some are supported in the I18 framework ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: writerfilter/source
Rebased ref, commits from common ancestor: commit 3c1eba7314d3a0dae925cbe90e0cd98cfb79c81b Author: Jian Fang Zhang zhan...@apache.org Date: Mon Sep 3 07:50:59 2012 + Resolves: #i119658#, some Chinese numbering formats not supported Found by: xiao ting xiao, tingxi...@gmail.com Patch by: bjcheny, compan...@gmail.com Review by: zhangjf (cherry picked from commit 50eca22976c42014f5e2c53f4bf19e2e1d21ee62) Change-Id: If3f27764352b59fdb45bf84c4a0e604c9c844077 Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx index 88c9372..86357af 100644 --- a/writerfilter/source/dmapper/ConversionHelper.cxx +++ b/writerfilter/source/dmapper/ConversionHelper.cxx @@ -426,8 +426,12 @@ sal_Int16 ConvertNumberingType(sal_Int32 nNFC) case NS_ooxml::LN_Value_ST_NumberFormat_japaneseCounting: case NS_ooxml::LN_Value_ST_NumberFormat_taiwaneseCounting: case NS_ooxml::LN_Value_ST_NumberFormat_ideographDigital: +case NS_ooxml::LN_Value_ST_NumberFormat_chineseCountingThousand: nRet = style::NumberingType::NUMBER_LOWER_ZH; break; +case NS_ooxml::LN_Value_ST_NumberFormat_chineseLegalSimplified: +nRet = style::NumberingType::NUMBER_UPPER_ZH; +break; default: nRet = style::NumberingType::ARABIC; } /* TODO: Lots of additional values are available - some are supported in the I18 framework ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - writerfilter/source
writerfilter/source/dmapper/ConversionHelper.cxx |4 1 file changed, 4 insertions(+) New commits: commit 775c3ddd47e0619a7f0ebed6dbcba3d5b41a708e Author: Jian Fang Zhang zhan...@apache.org Date: Mon Sep 3 07:50:59 2012 + Resolves: #i119658#, some Chinese numbering formats not supported Found by: xiao ting xiao, tingxi...@gmail.com Patch by: bjcheny, compan...@gmail.com Review by: zhangjf (cherry picked from commit 50eca22976c42014f5e2c53f4bf19e2e1d21ee62) Change-Id: If3f27764352b59fdb45bf84c4a0e604c9c844077 Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch (cherry picked from commit 3c1eba7314d3a0dae925cbe90e0cd98cfb79c81b) Reviewed-on: https://gerrit.libreoffice.org/2682 Reviewed-by: Michael Stahl mst...@redhat.com Tested-by: Michael Stahl mst...@redhat.com diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx index 88c9372..86357af 100644 --- a/writerfilter/source/dmapper/ConversionHelper.cxx +++ b/writerfilter/source/dmapper/ConversionHelper.cxx @@ -426,8 +426,12 @@ sal_Int16 ConvertNumberingType(sal_Int32 nNFC) case NS_ooxml::LN_Value_ST_NumberFormat_japaneseCounting: case NS_ooxml::LN_Value_ST_NumberFormat_taiwaneseCounting: case NS_ooxml::LN_Value_ST_NumberFormat_ideographDigital: +case NS_ooxml::LN_Value_ST_NumberFormat_chineseCountingThousand: nRet = style::NumberingType::NUMBER_LOWER_ZH; break; +case NS_ooxml::LN_Value_ST_NumberFormat_chineseLegalSimplified: +nRet = style::NumberingType::NUMBER_UPPER_ZH; +break; default: nRet = style::NumberingType::ARABIC; } /* TODO: Lots of additional values are available - some are supported in the I18 framework ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/view/gridwin.cxx | 13 + sc/source/ui/view/gridwin2.cxx |2 ++ sc/source/ui/view/gridwin4.cxx | 12 ++-- 3 files changed, 25 insertions(+), 2 deletions(-) New commits: commit aaab3a79dfd762a64fa4c1d19dd29ae46c0b9dd0 Author: Jian Fang Zhang zhan...@apache.org Date: Thu Jun 21 07:19:34 2012 + Resolves: #i120017, filter button is not shown in merged cell Patch by: zhao shao zhi, aoo.zhaos...@gmail.com Found by: Yan Ji,yanji...@gmail.com Review by: zhangjf (cherry picked from commit bcf01fd794ec169aaf2a3f8b86f986ec60e5beb8) Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch Conflicts: sc/source/ui/view/gridwin.cxx Change-Id: Ie8a529c697979cf75c303bddcaddd2776f5b8047 diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 4663fa4..1ce833a 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -936,6 +936,8 @@ void ScGridWindow::DoScenarioMenu( const ScRange rScenRange ) long nSizeY = 0; long nHeight = 0; pViewData-GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY ); +// The button height should not use the merged cell height, should still use single row height +nSizeY = pViewData-ToPixel(pDoc-GetRowHeight(nRow, nTab), pViewData-GetPPTY()); Point aPos = pViewData-GetScrPos( nCol, nRow, eWhich ); if ( bLayoutRTL ) aPos.X() -= nSizeX; @@ -1820,8 +1822,19 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent rMEvt, MouseEventSta if ( !bDouble !bFormulaMode rMEvt.IsLeft() ) { +SCsCOL nRealPosX; +SCsROW nRealPosY; +pViewData-GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nRealPosX, nRealPosY, false );//the real row/col +ScMergeFlagAttr* pRealPosAttr = (ScMergeFlagAttr*) +pDoc-GetAttr( nRealPosX, nRealPosY, nTab, ATTR_MERGE_FLAG ); ScMergeFlagAttr* pAttr = (ScMergeFlagAttr*) pDoc-GetAttr( nPosX, nPosY, nTab, ATTR_MERGE_FLAG ); +if( pRealPosAttr-HasAutoFilter() ) +{ +SC_MOD()-InputEnterHandler(); +if (DoAutoFilterButton( nRealPosX, nRealPosY, rMEvt)) +return; +} if (pAttr-HasAutoFilter()) { if (DoAutoFilterButton(nPosX, nPosY, rMEvt)) diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 94ed3e7..79f2f08 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -125,6 +125,8 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent long nSizeX, nSizeY; pViewData-GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY ); +// The button height should not use the merged cell height, should still use single row height +nSizeY = pViewData-ToPixel(pDoc-GetRowHeight(nRow, nTab), pViewData-GetPPTY()); Size aScrSize(nSizeX-1, nSizeY-1); // Check if the mouse cursor is clicking on the popup arrow box. diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index f2b3ba1..1103e5c 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1144,7 +1144,9 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCCOL nX2, ScTableInfo rTabInfo, Out for (nCol=nX1; nCol=nX2; nCol++) { CellInfo* pInfo = pThisRowInfo-pCellInfo[nCol+1]; -if ( pInfo-bAutoFilter !pInfo-bHOverlapped !pInfo-bVOverlapped ) +//if several columns merged on a row, there should be only one auto button at the end of the columns. +//if several rows merged on a column, the button may be in the middle, so !pInfo-bVOverlapped should not be used +if ( pInfo-bAutoFilter !pInfo-bHOverlapped ) { if (!pQueryParam) pQueryParam = new ScQueryParam; @@ -1197,7 +1199,13 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCCOL nX2, ScTableInfo rTabInfo, Out bool bArrowState = bSimpleQuery bColumnFound; longnSizeX; longnSizeY; -pViewData-GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY ); +SCCOL nStartCol= nCol; +SCROW nStartRow = nRow; +//if address(nCol,nRow) is not the start pos of the merge area, the value of the nSizeX will be incorrect, it will be the length of the cell. +//should first get the start pos of the merge area, then get the nSizeX through the start pos. +pDoc-ExtendOverlapped(nStartCol, nStartRow,nCol, nRow, nTab);//get nStartCol,nStartRow +pViewData-GetMergeSizePixel( nStartCol, nStartRow, nSizeX, nSizeY );//get nSizeX +nSizeY = pViewData-ToPixel(pDoc-GetRowHeight(nRow, nTab), pViewData
[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sc/source
sc/source/ui/view/gridwin.cxx | 13 + sc/source/ui/view/gridwin2.cxx |2 ++ sc/source/ui/view/gridwin4.cxx | 12 ++-- 3 files changed, 25 insertions(+), 2 deletions(-) New commits: commit 9b6797ec124921a60e5d1d654139e0b82818a7c3 Author: Jian Fang Zhang zhan...@apache.org Date: Thu Jun 21 07:19:34 2012 + Resolves: #i120017, filter button is not shown in merged cell Patch by: zhao shao zhi, aoo.zhaos...@gmail.com Found by: Yan Ji,yanji...@gmail.com Review by: zhangjf (cherry picked from commit bcf01fd794ec169aaf2a3f8b86f986ec60e5beb8) Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch Conflicts: sc/source/ui/view/gridwin.cxx Change-Id: Ie8a529c697979cf75c303bddcaddd2776f5b8047 (cherry picked from commit aaab3a79dfd762a64fa4c1d19dd29ae46c0b9dd0) Reviewed-on: https://gerrit.libreoffice.org/2674 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index a7033fe..5d85831 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -927,6 +927,8 @@ void ScGridWindow::DoScenarioMenue( const ScRange rScenRange ) long nSizeY = 0; long nHeight = 0; pViewData-GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY ); +// The button height should not use the merged cell height, should still use single row height +nSizeY = pViewData-ToPixel(pDoc-GetRowHeight(nRow, nTab), pViewData-GetPPTY()); Point aPos = pViewData-GetScrPos( nCol, nRow, eWhich ); if ( bLayoutRTL ) aPos.X() -= nSizeX; @@ -1813,8 +1815,19 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent rMEvt, MouseEventSta if ( !bDouble !bFormulaMode rMEvt.IsLeft() ) { +SCsCOL nRealPosX; +SCsROW nRealPosY; +pViewData-GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nRealPosX, nRealPosY, false );//the real row/col +ScMergeFlagAttr* pRealPosAttr = (ScMergeFlagAttr*) +pDoc-GetAttr( nRealPosX, nRealPosY, nTab, ATTR_MERGE_FLAG ); ScMergeFlagAttr* pAttr = (ScMergeFlagAttr*) pDoc-GetAttr( nPosX, nPosY, nTab, ATTR_MERGE_FLAG ); +if( pRealPosAttr-HasAutoFilter() ) +{ +SC_MOD()-InputEnterHandler(); +if (DoAutoFilterButton( nRealPosX, nRealPosY, rMEvt)) +return; +} if (pAttr-HasAutoFilter()) { if (DoAutoFilterButton(nPosX, nPosY, rMEvt)) diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 3ec36a2..406e64f 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -125,6 +125,8 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent long nSizeX, nSizeY; pViewData-GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY ); +// The button height should not use the merged cell height, should still use single row height +nSizeY = pViewData-ToPixel(pDoc-GetRowHeight(nRow, nTab), pViewData-GetPPTY()); Size aScrSize(nSizeX-1, nSizeY-1); // Check if the mouse cursor is clicking on the popup arrow box. diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 64e4bbc..7c060f7 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1145,7 +1145,9 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCCOL nX2, ScTableInfo rTabInfo, Out for (nCol=nX1; nCol=nX2; nCol++) { CellInfo* pInfo = pThisRowInfo-pCellInfo[nCol+1]; -if ( pInfo-bAutoFilter !pInfo-bHOverlapped !pInfo-bVOverlapped ) +//if several columns merged on a row, there should be only one auto button at the end of the columns. +//if several rows merged on a column, the button may be in the middle, so !pInfo-bVOverlapped should not be used +if ( pInfo-bAutoFilter !pInfo-bHOverlapped ) { if (!pQueryParam) pQueryParam = new ScQueryParam; @@ -1198,7 +1200,13 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCCOL nX2, ScTableInfo rTabInfo, Out bool bArrowState = bSimpleQuery bColumnFound; longnSizeX; longnSizeY; -pViewData-GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY ); +SCCOL nStartCol= nCol; +SCROW nStartRow = nRow; +//if address(nCol,nRow) is not the start pos of the merge area, the value of the nSizeX will be incorrect, it will be the length of the cell. +//should first get the start pos of the merge area, then get the nSizeX through the start pos. +pDoc-ExtendOverlapped
[Libreoffice-commits] core.git: xmloff/source
xmloff/source/draw/XMLNumberStyles.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit acb8d9f6d1bcc95c48a27252274c44d8ff534376 Author: Jian Fang Zhang zhan...@apache.org Date: Mon Sep 3 01:52:22 2012 + Resolves: #i120663# The SvXMLImportContext is always leaked The slave SvXMLImportContext object for SdXMLNumberFormatMemberImportContext is always leaked Found by: zhangjf Patch by: zhangjf (cherry picked from commit e440770de29e96ce3e45792c0e94f133ade83680) Change-Id: Ic0585bbb8e0e315548586ea1e49f55d0cc7ed2c4 diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 15346ca..44d40d2 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include boost/shared_ptr.hpp #include tools/debug.hxx #include XMLNumberStylesExport.hxx #include XMLNumberStylesImport.hxx @@ -493,7 +494,7 @@ private: sal_Bool mbTextual; sal_Bool mbDecimal02; OUString maText; -SvXMLImportContext* mpSlaveContext; +boost::shared_ptr SvXMLImportContext mpSlaveContext; public: TYPEINFO(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits