[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - include/svx svx/source
include/svx/svdoedge.hxx |4 svx/source/svdraw/svdoedge.cxx | 39 --- 2 files changed, 28 insertions(+), 15 deletions(-) New commits: commit af75342373348f8a28ba57cfbd56fbe3a29ca365 Author: Armin Le Grand a...@apache.org Date: Mon Sep 2 14:30:09 2013 + Related: #i123048# Corrected connector layout after reload (cherry picked from commit c7d96eed93415894c5ca4522bd32ca06acd88233) Signed-off-by: Andras Timar andras.ti...@collabora.com Conflicts: svx/inc/svx/svdoedge.hxx svx/source/svdraw/svdoedge.cxx Change-Id: Id388fa7396751a2e8b5908373ca57eceee1a1af1 Signed-off-by: Andras Timar andras.ti...@collabora.com diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx index ea0968c..180369f 100644 --- a/include/svx/svdoedge.hxx +++ b/include/svx/svdoedge.hxx @@ -182,6 +182,10 @@ protected: // is running, the flag is set, else it is always sal_False. unsignedmbBoundRectCalculationRunning : 1; +// #i123048# need to remember if layouting was suppressed before to get +// to a correct state for first real layouting +unsignedmbSuppressed : 1; + public: // #109007# // Interface to default connect suppression diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index d30350b..98c57f9 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -171,7 +171,8 @@ SdrEdgeObj::SdrEdgeObj() bEdgeTrackUserDefined(sal_False), // Default is to allow default connects mbSuppressDefaultConnect(sal_False), -mbBoundRectCalculationRunning(sal_False) +mbBoundRectCalculationRunning(sal_False), +mbSuppressed(false) { bClosedObj=sal_False; bIsEdge=sal_True; @@ -543,12 +544,20 @@ void SdrEdgeObj::ImpUndirtyEdgeTrack() void SdrEdgeObj::ImpRecalcEdgeTrack() { -// #i120437# if bEdgeTrackUserDefined, do not recalculate. Also not when model locked -if(bEdgeTrackUserDefined || !GetModel() || GetModel()-isLocked()) +// #i120437# if bEdgeTrackUserDefined, do not recalculate +if(bEdgeTrackUserDefined) { return; } +// #i120437# also not when model locked during import, but remember +if(!GetModel() || GetModel()-isLocked()) +{ +mbSuppressed = true; +return; +} + +// #i110649# if(IsBoundRectCalculationRunning()) { // This object is involved into another ImpRecalcEdgeTrack() call @@ -556,20 +565,20 @@ void SdrEdgeObj::ImpRecalcEdgeTrack() // Also, do not change bEdgeTrackDirty so that it gets recalculated // later at the first non-looping call. } -// #i43068# -else if(GetModel() GetModel()-isLocked()) -{ -// avoid re-layout during imports/API call sequences -// #i45294# but calculate EdgeTrack and secure properties there -mbBoundRectCalculationRunning = sal_True; -*pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,aEdgeInfo); -ImpSetAttrToEdgeInfo(); -bEdgeTrackDirty=sal_False; -mbBoundRectCalculationRunning = sal_False; -} else { -// To not run in a depth loop, use a coloring algorithm on +if(mbSuppressed) +{ +// #i123048# If layouting was ever suppressed, it needs to be done once +// and the attr need to be set at EdgeInfo, else these attr *will be lost* +// in the following call to ImpSetEdgeInfoToAttr() sice they were never +// set before (!) +*pEdgeTrack=ImpCalcEdgeTrack(*pEdgeTrack,aCon1,aCon2,aEdgeInfo); +ImpSetAttrToEdgeInfo(); +mbSuppressed = false; +} + +// To not run in a depth loop, use a coloring algorythm on // SdrEdgeObj BoundRect calculations mbBoundRectCalculationRunning = sal_True; ___ 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' - include/svx svx/source
include/svx/gallery1.hxx |4 +++- svx/source/gallery2/gallery1.cxx | 29 ++--- svx/source/gallery2/galtheme.cxx |2 +- 3 files changed, 30 insertions(+), 5 deletions(-) New commits: commit 41102212d49fd18643bba375d65963bd41008bc7 Author: Michael Meeks michael.me...@collabora.com Date: Wed Oct 23 19:49:06 2013 +0100 fdo#69079 - fix multiple user gallery creations. Conflicts: include/svx/gallery1.hxx svx/source/gallery2/gallery1.cxx Change-Id: I0539e2708b973b8bea7bd63488277f00201c6c46 Reviewed-on: https://gerrit.libreoffice.org/6417 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx index 4a7a9d3..5610c0f 100644 --- a/include/svx/gallery1.hxx +++ b/include/svx/gallery1.hxx @@ -53,7 +53,9 @@ private: public: -GalleryThemeEntry( const INetURLObject rBaseURL, const String rName, +GalleryThemeEntry( bool bCreateUniqueURL, + const INetURLObject rBaseURL, + const String rName, sal_Bool bReadOnly, sal_Bool bNewFile, sal_uInt32 nId, sal_Bool bThemeNameFromResource ); ~GalleryThemeEntry() {}; diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 3d2f9dc..b6ec5e9 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -45,7 +45,16 @@ using namespace ::com::sun::star; // - GalleryThemeEntry - // - -GalleryThemeEntry::GalleryThemeEntry( const INetURLObject rBaseURL, const String rName, +static bool FileExists( const INetURLObject rURL, const rtl::OUString rExt ) +{ +INetURLObject aURL( rURL ); +aURL.setExtension( rExt ); +return FileExists( aURL ); +} + +GalleryThemeEntry::GalleryThemeEntry( bool bCreateUniqueURL, + const INetURLObject rBaseURL, + const String rName, sal_Bool _bReadOnly, sal_Bool _bNewFile, sal_uInt32 _nId, sal_Bool _bThemeNameFromResource ) : nId ( _nId ), @@ -55,6 +64,19 @@ GalleryThemeEntry::GalleryThemeEntry( const INetURLObject rBaseURL, const Strin INetURLObject aURL( rBaseURL ); DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, invalid URL ); +if (bCreateUniqueURL) +{ +INetURLObject aBaseNoCase( ImplGetURLIgnoreCase( rBaseURL ) ); +aURL = aBaseNoCase; +static sal_Int32 nIdx = 0; +while( FileExists( aURL, thm ) ) +{ // create new URLs +nIdx++; +aURL = aBaseNoCase; +aURL.setName( aURL.getName() + OUString::number(nIdx)); +} +} + aURL.setExtension( thm ); aThmURL = ImplGetURLIgnoreCase( aURL ); @@ -520,8 +542,9 @@ sal_Bool Gallery::CreateTheme( const String rThemeName ) { INetURLObject aURL( GetUserURL() ); aURL.Append( rThemeName ); -GalleryThemeEntry* pNewEntry = new GalleryThemeEntry( aURL, rThemeName, - sal_False, sal_True, 0, sal_False ); +GalleryThemeEntry* pNewEntry = new GalleryThemeEntry( +true, aURL, rThemeName, +sal_False, sal_True, 0, sal_False ); aThemeList.push_back( pNewEntry ); delete( new GalleryTheme( this, pNewEntry ) ); diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 54c7067..cc77541 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -751,7 +751,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject rURL, sa } INetURLObject aPathURL( rURL ); -pRet = new GalleryThemeEntry( aPathURL, aThemeName, +pRet = new GalleryThemeEntry( false, aPathURL, aThemeName, bReadOnly, sal_False, nThemeId, bThemeNameFromResource ); } ___ 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' - include/svx svx/source
include/svx/ctredlin.hxx |6 ++ svx/source/dialog/ctredlin.cxx | 20 +++- 2 files changed, 21 insertions(+), 5 deletions(-) New commits: commit c373d4a7807581459a474ffc0a277d0d6c00447a Author: Caolán McNamara caol...@redhat.com Date: Sun Aug 18 14:16:10 2013 +0100 don't unconditionally enable buttons on switching to accept/reject page we want to disable all of them when switch to the options page and *restore* the original enable/disable state when switching back i.e. don't enable them if they were disabled due to change tracking password protection regression since 8655095a4910ca795dfd182e6796d9375727a694 Change-Id: I2dd6c83fd9613adf42571684a08bff81b86c9ee1 (cherry picked from commit 30ba8fa46aafb0868ada3b0092cd33524c145989) Reviewed-on: https://gerrit.libreoffice.org/5502 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx index c88b742..e8cb58b 100644 --- a/include/svx/ctredlin.hxx +++ b/include/svx/ctredlin.hxx @@ -311,6 +311,12 @@ private: PushButton* m_pRejectAll; PushButton* m_pUndo; +bool bEnableAccept; +bool bEnableAcceptAll; +bool bEnableReject; +bool bEnableRejectAll; +bool bEnableUndo; + DECL_LINK( PbClickHdl, PushButton* ); public: diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index b201d8d..fcd153d 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -476,6 +476,11 @@ void SvxRedlinTable::InitEntry(SvTreeListEntry* pEntry, const OUString rStr, SvxTPView::SvxTPView(Window * pParent) : TabPage(pParent, RedlineViewPage, svx/ui/redlineviewpage.ui) +, bEnableAccept(true) +, bEnableAcceptAll(true) +, bEnableReject(true) +, bEnableRejectAll(true) +, bEnableUndo(true) { Dialog *pTopLevel = GetParentDialog(); pTopLevel-get(m_pAccept, accept); @@ -504,11 +509,11 @@ SvxTPView::SvxTPView(Window * pParent) void SvxTPView::ActivatePage() { -m_pAccept-Enable(); -m_pReject-Enable(); -m_pAcceptAll-Enable(); -m_pRejectAll-Enable(); -m_pUndo-Enable(); +m_pAccept-Enable(bEnableAccept); +m_pReject-Enable(bEnableReject); +m_pAcceptAll-Enable(bEnableAcceptAll); +m_pRejectAll-Enable(bEnableRejectAll); +m_pUndo-Enable(bEnableUndo); TabPage::ActivatePage(); } @@ -559,21 +564,25 @@ void SvxTPView::InsertCalcHeader() void SvxTPView::EnableAccept(sal_Bool nFlag) { +bEnableAccept = nFlag; m_pAccept-Enable(nFlag); } void SvxTPView::EnableAcceptAll(sal_Bool nFlag) { +bEnableAcceptAll = nFlag; m_pAcceptAll-Enable(nFlag); } void SvxTPView::EnableReject(sal_Bool nFlag) { +bEnableReject = nFlag; m_pReject-Enable(nFlag); } void SvxTPView::EnableRejectAll(sal_Bool nFlag) { +bEnableRejectAll = nFlag; m_pRejectAll-Enable(nFlag); } @@ -584,6 +593,7 @@ void SvxTPView::ShowUndo(sal_Bool nFlag) void SvxTPView::EnableUndo(sal_Bool nFlag) { +bEnableUndo = nFlag; m_pUndo-Enable(nFlag); } ___ 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' - include/svx svx/source sw/source
include/svx/sdrpaintwindow.hxx|6 svx/source/sdr/overlay/overlaymanagerbuffered.cxx | 29 +- svx/source/svdraw/sdrpaintwindow.cxx | 27 sw/source/core/view/viewsh.cxx| 28 + 4 files changed, 42 insertions(+), 48 deletions(-) New commits: commit 576cc750e38108ada5ea40870f1fe8cf2054e7b6 Author: Michael Stahl mst...@redhat.com Date: Mon Jun 24 19:50:30 2013 +0200 fdo#58029: replace quadratic child window loop with linear ... which should speed things up without introducing problems. (Window::GetChild(n) is inefficient because the children are a linked list) Change-Id: I343d51a6866c5014cbca4c256b0c15f938958c39 (cherry picked from commit 38dcfadda85058a0ee87292c8943aec82e34b81e) Reviewed-on: https://gerrit.libreoffice.org/4488 Tested-by: Thorsten Behrens tbehr...@suse.com Reviewed-by: Thorsten Behrens tbehr...@suse.com diff --git a/include/svx/sdrpaintwindow.hxx b/include/svx/sdrpaintwindow.hxx index bf8620c..d1694ee 100644 --- a/include/svx/sdrpaintwindow.hxx +++ b/include/svx/sdrpaintwindow.hxx @@ -41,6 +41,12 @@ namespace sdr #endif +/// paint the transparent children of rWin that overlap rPixelRect +/// (for example, transparent form controls like check boxes) +void SVX_DLLPUBLIC +PaintTransparentChildren(Window rWindow, Rectangle const rPixelRect); + + class SdrPreRenderDevice { // The original OutputDevice diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index 133accc..c8c2db3 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -18,6 +18,7 @@ */ #include svx/sdr/overlay/overlaymanagerbuffered.hxx +#include svx/sdrpaintwindow.hxx #include vcl/outdev.hxx #include basegfx/point/b2dpoint.hxx #include basegfx/range/b2drange.hxx @@ -349,28 +350,12 @@ namespace sdr { Window rWindow = static_cast Window (rmOutputDevice); -if(rWindow.IsChildTransparentModeEnabled() rWindow.GetChildCount()) -{ -const Rectangle aRegionRectanglePixel( -maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(), -maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY()); - -for(sal_uInt16 a(0); a rWindow.GetChildCount(); a++) -{ -Window* pCandidate = rWindow.GetChild(a); - -if(pCandidate pCandidate-IsPaintTransparent()) -{ -const Rectangle aCandidatePosSizePixel(pCandidate-GetPosPixel(), pCandidate-GetSizePixel()); - - if(aCandidatePosSizePixel.IsOver(aRegionRectanglePixel)) -{ - pCandidate-Invalidate(INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN); -pCandidate-Update(); -} -} -} -} +const Rectangle aRegionRectanglePixel( +maBufferRememberedRangePixel.getMinX(), +maBufferRememberedRangePixel.getMinY(), +maBufferRememberedRangePixel.getMaxX(), +maBufferRememberedRangePixel.getMaxY()); +PaintTransparentChildren(rWindow, aRegionRectanglePixel); } // #i80730# restore visibility of VCL cursor diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index 3df44a1..6ab2b40 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -23,6 +23,33 @@ #include vcl/gdimtf.hxx #include vcl/svapp.hxx + +void PaintTransparentChildren(Window rWindow, Rectangle const rPixelRect) +{ +if (rWindow.IsChildTransparentModeEnabled()) +{ +Window * pCandidate = rWindow.GetWindow( WINDOW_FIRSTCHILD ); +while (pCandidate) +{ +if (pCandidate-IsPaintTransparent()) +{ +const Rectangle aCandidatePosSizePixel( +pCandidate-GetPosPixel(), +pCandidate-GetSizePixel()); + +if (aCandidatePosSizePixel.IsOver(rPixelRect)) +{ +pCandidate-Invalidate( +INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN ); +// important: actually paint the child here! +
[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - include/svx svx/source
include/svx/dialogs.hrc| 10 ++ svx/source/dialog/sdstring.src | 32 svx/source/unodraw/unoprov.cxx |8 3 files changed, 50 insertions(+) New commits: commit 93e034b26eec63f2d37865446899458a94f6c002 Author: Andras Timar ati...@suse.com Date: Sun Jun 16 22:43:47 2013 +0200 l10n of additional colors in standard palette Change-Id: I9200ce7f0e18491f2a1b8b60a43883df6dcb6cf2 diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index e714c39..a411b35 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -549,6 +549,16 @@ #define RID_SVXSTR_TANGO_SCARLET_RED_DEF(RID_SVX_START + 644) #define RID_SVXSTR_TANGO_ALUMINIUM_DEF (RID_SVX_START + 645) +//Additional color names in standard palette +#define RID_SVXSTR_CYAN2(RID_SVX_START + 646) +#define RID_SVXSTR_YELLOW_GREEN (RID_SVX_START + 647) +#define RID_SVXSTR_SKY_BLUE (RID_SVX_START + 648) +#define RID_SVXSTR_PINK (RID_SVX_START + 649) +#define RID_SVXSTR_CYAN2_DEF(RID_SVX_START + 650) +#define RID_SVXSTR_YELLOW_GREEN_DEF (RID_SVX_START + 651) +#define RID_SVXSTR_SKY_BLUE_DEF (RID_SVX_START + 652) +#define RID_SVXSTR_PINK_DEF (RID_SVX_START + 653) + // Default-Gradient-Names #define RID_SVXSTR_GRDT0_DEF (RID_SVX_START + 2000) #define RID_SVXSTR_GRDT1_DEF (RID_SVX_START + 2001) diff --git a/svx/source/dialog/sdstring.src b/svx/source/dialog/sdstring.src index 401d6f3..8154d53 100644 --- a/svx/source/dialog/sdstring.src +++ b/svx/source/dialog/sdstring.src @@ -138,6 +138,22 @@ String RID_SVXSTR_ORANGE { Text [ en-US ] = Orange ; }; +String RID_SVXSTR_CYAN2 +{ +Text [ en-US ] = Cyan ; +}; +String RID_SVXSTR_YELLOW_GREEN +{ +Text [ en-US ] = Yellow Green ; +}; +String RID_SVXSTR_SKY_BLUE +{ +Text [ en-US ] = Sky Blue ; +}; +String RID_SVXSTR_PINK +{ +Text [ en-US ] = Pink ; +}; String RID_SVXSTR_ARROW { Text [ en-US ] = Arrow ; @@ -496,6 +512,22 @@ String RID_SVXSTR_COLOR_SUN_DEF // attention: this is the color string for the Sun Microsystems specific colors !!! Text = Sun; }; +String RID_SVXSTR_CYAN2_DEF +{ +Text = Cyan ; +}; +String RID_SVXSTR_YELLOW_GREEN_DEF +{ +Text = Yellow Green ; +}; +String RID_SVXSTR_SKY_BLUE_DEF +{ +Text = Sky Blue ; +}; +String RID_SVXSTR_PINK_DEF +{ +Text = Pink ; +}; /* do not translate */ String RID_SVXSTR_COLOR_CHART_DEF { diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index b2fd24f..32ab65a 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -1207,8 +1207,11 @@ static sal_uInt16 SvxUnoColorNameDefResId[] = RID_SVXSTR_BLUEGREY_DEF, RID_SVXSTR_BLACK_DEF, RID_SVXSTR_BLUE_DEF, +RID_SVXSTR_SKY_BLUE_DEF, RID_SVXSTR_GREEN_DEF, +RID_SVXSTR_YELLOW_GREEN_DEF, RID_SVXSTR_CYAN_DEF, +RID_SVXSTR_CYAN2_DEF, RID_SVXSTR_RED_DEF, RID_SVXSTR_MAGENTA_DEF, RID_SVXSTR_BROWN_DEF, @@ -1223,6 +1226,7 @@ static sal_uInt16 SvxUnoColorNameDefResId[] = RID_SVXSTR_WHITE_DEF, RID_SVXSTR_ORANGE_DEF, RID_SVXSTR_VIOLET_DEF, +RID_SVXSTR_PINK_DEF, RID_SVXSTR_BORDEAUX_DEF, RID_SVXSTR_PALE_YELLOW_DEF, RID_SVXSTR_PALE_GREEN_DEF, @@ -1253,8 +1257,11 @@ static sal_uInt16 SvxUnoColorNameResId[] = RID_SVXSTR_BLUEGREY, RID_SVXSTR_BLACK, RID_SVXSTR_BLUE, +RID_SVXSTR_SKY_BLUE, RID_SVXSTR_GREEN, +RID_SVXSTR_YELLOW_GREEN, RID_SVXSTR_CYAN, +RID_SVXSTR_CYAN2, RID_SVXSTR_RED, RID_SVXSTR_MAGENTA, RID_SVXSTR_BROWN, @@ -1269,6 +1276,7 @@ static sal_uInt16 SvxUnoColorNameResId[] = RID_SVXSTR_WHITE, RID_SVXSTR_ORANGE, RID_SVXSTR_VIOLET, +RID_SVXSTR_PINK, RID_SVXSTR_BORDEAUX, RID_SVXSTR_PALE_YELLOW, RID_SVXSTR_PALE_GREEN, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits