Accepting request 583042 from LibreOffice:6.0
L3 patches OBS-URL: https://build.opensuse.org/request/show/583042 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=607
This commit is contained in:
parent
457bbe1d28
commit
901d9421e1
605
bnc1039203.patch
Normal file
605
bnc1039203.patch
Normal file
@ -0,0 +1,605 @@
|
|||||||
|
From 377af664602f5df27df5fcfad5e50a0f59dca38c Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Szymon=20K=C5=82os?= <szymon.klos@collabora.com>
|
||||||
|
Date: Fri, 2 Feb 2018 10:21:50 +0100
|
||||||
|
Subject: [PATCH 1/4] tdf#115394 import custom slide transition time in PPTX
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
* custom values are imported correctly
|
||||||
|
* standard (fast, slow, medium) values are changed
|
||||||
|
to match values in the MSO
|
||||||
|
|
||||||
|
Change-Id: I004242afbbf641fe414abc8df248a2844c104502
|
||||||
|
Reviewed-on: https://gerrit.libreoffice.org/49139
|
||||||
|
Tested-by: Jenkins <ci@libreoffice.org>
|
||||||
|
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
|
||||||
|
---
|
||||||
|
include/oox/ppt/slidetransition.hxx | 4 +++
|
||||||
|
offapi/com/sun/star/presentation/DrawPage.idl | 9 +++++--
|
||||||
|
oox/source/ppt/slidetransition.cxx | 22 ++++++++++++++---
|
||||||
|
oox/source/ppt/slidetransitioncontext.cxx | 6 +++++
|
||||||
|
oox/source/token/properties.txt | 1 +
|
||||||
|
sd/qa/unit/data/pptx/tdf115394.pptx | Bin 0 -> 31282 bytes
|
||||||
|
sd/qa/unit/import-tests.cxx | 34 ++++++++++++++++++++++++++
|
||||||
|
sd/source/ui/inc/unoprnms.hxx | 1 +
|
||||||
|
sd/source/ui/unoidl/unopage.cxx | 2 +-
|
||||||
|
9 files changed, 72 insertions(+), 7 deletions(-)
|
||||||
|
create mode 100644 sd/qa/unit/data/pptx/tdf115394.pptx
|
||||||
|
|
||||||
|
diff --git a/include/oox/ppt/slidetransition.hxx b/include/oox/ppt/slidetransition.hxx
|
||||||
|
index 8986016f30aa..5a31b158334b 100644
|
||||||
|
--- a/include/oox/ppt/slidetransition.hxx
|
||||||
|
+++ b/include/oox/ppt/slidetransition.hxx
|
||||||
|
@@ -43,7 +43,10 @@ namespace oox { namespace ppt {
|
||||||
|
void setSlideProperties( PropertyMap& props );
|
||||||
|
void setTransitionFilterProperties( const css::uno::Reference< css::animations::XTransitionFilter > & xFilter );
|
||||||
|
|
||||||
|
+ /// Set one of standard values for slide transition duration
|
||||||
|
void setOoxTransitionSpeed( sal_Int32 nToken );
|
||||||
|
+ /// Set slide transition time directly
|
||||||
|
+ void setOoxTransitionSpeed( double fDuration );
|
||||||
|
void setMode( bool bMode )
|
||||||
|
{ mbMode = bMode; }
|
||||||
|
void setOoxAdvanceTime( sal_Int32 nAdvanceTime )
|
||||||
|
@@ -66,6 +69,7 @@ namespace oox { namespace ppt {
|
||||||
|
::sal_Int16 mnTransitionSubType;
|
||||||
|
bool mbTransitionDirectionNormal;
|
||||||
|
css::presentation::AnimationSpeed mnAnimationSpeed;
|
||||||
|
+ double mfTransitionDurationInSeconds;
|
||||||
|
bool mbMode; /**< http://api.libreoffice.org/docs/common/ref/com/sun/star/animations/XTransitionFilter.html Mode property */
|
||||||
|
::sal_Int32 mnAdvanceTime;
|
||||||
|
};
|
||||||
|
diff --git a/offapi/com/sun/star/presentation/DrawPage.idl b/offapi/com/sun/star/presentation/DrawPage.idl
|
||||||
|
index 18e499e81420..0e070470ad25 100644
|
||||||
|
--- a/offapi/com/sun/star/presentation/DrawPage.idl
|
||||||
|
+++ b/offapi/com/sun/star/presentation/DrawPage.idl
|
||||||
|
@@ -79,11 +79,11 @@ published service DrawPage
|
||||||
|
[property] short Layout;
|
||||||
|
|
||||||
|
|
||||||
|
- /** defines the speed of the fade-in effect of this page.
|
||||||
|
+ /** Defines the speed of the fade-in effect of this page.
|
||||||
|
+ @see TransitionSpeed
|
||||||
|
*/
|
||||||
|
[property] com::sun::star::presentation::AnimationSpeed Speed;
|
||||||
|
|
||||||
|
-
|
||||||
|
/** defines if a header presentation shape from the master page is visible
|
||||||
|
on this page.
|
||||||
|
*/
|
||||||
|
@@ -142,6 +142,11 @@ published service DrawPage
|
||||||
|
*/
|
||||||
|
[optional, property] long DateTimeFormat;
|
||||||
|
|
||||||
|
+ /** Specifies slide transition time in seconds.
|
||||||
|
+ @since LibreOffice 6.1
|
||||||
|
+ @see Speed
|
||||||
|
+ */
|
||||||
|
+ [property, optional] double TransitionDuration;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx
|
||||||
|
index e609e6709c2f..7c1555b7dc80 100644
|
||||||
|
--- a/oox/source/ppt/slidetransition.cxx
|
||||||
|
+++ b/oox/source/ppt/slidetransition.cxx
|
||||||
|
@@ -45,6 +45,7 @@ namespace oox { namespace ppt {
|
||||||
|
, mnTransitionSubType( 0 )
|
||||||
|
, mbTransitionDirectionNormal( true )
|
||||||
|
, mnAnimationSpeed( AnimationSpeed_FAST )
|
||||||
|
+ , mfTransitionDurationInSeconds( -1.0 )
|
||||||
|
, mbMode( true )
|
||||||
|
, mnAdvanceTime( -1 )
|
||||||
|
{
|
||||||
|
@@ -56,6 +57,7 @@ namespace oox { namespace ppt {
|
||||||
|
, mnTransitionSubType( 0 )
|
||||||
|
, mbTransitionDirectionNormal( true )
|
||||||
|
, mnAnimationSpeed( AnimationSpeed_FAST )
|
||||||
|
+ , mfTransitionDurationInSeconds( -1.0 )
|
||||||
|
, mbMode( true )
|
||||||
|
, mnAdvanceTime( -1 )
|
||||||
|
{
|
||||||
|
@@ -76,6 +78,8 @@ namespace oox { namespace ppt {
|
||||||
|
aProps.setProperty( PROP_TransitionSubtype, mnTransitionSubType);
|
||||||
|
aProps.setProperty( PROP_TransitionDirection, mbTransitionDirectionNormal);
|
||||||
|
aProps.setProperty( PROP_Speed, mnAnimationSpeed);
|
||||||
|
+ if( mfTransitionDurationInSeconds >= 0.0 )
|
||||||
|
+ aProps.setProperty( PROP_TransitionDuration, mfTransitionDurationInSeconds);
|
||||||
|
aProps.setProperty( PROP_TransitionFadeColor, sal_Int32(0));
|
||||||
|
if( mnAdvanceTime != -1 ) {
|
||||||
|
aProps.setProperty( PROP_Duration, mnAdvanceTime/1000);
|
||||||
|
@@ -110,19 +114,21 @@ namespace oox { namespace ppt {
|
||||||
|
{
|
||||||
|
switch( nToken )
|
||||||
|
{
|
||||||
|
- /* In case you want to use time values in second,
|
||||||
|
- * the speed values are located in the PPT97 importer
|
||||||
|
- * sd/source/filter/ppt/ppt97animations.cxx:664
|
||||||
|
- * (void Ppt97Animation::UpdateCacheData() const)
|
||||||
|
+ /* the speed values are located in the PPT97 importer
|
||||||
|
+ * sd/source/filter/ppt/pptin.cxx:1783
|
||||||
|
+ * (void ImplSdPPTImport::ImportPageEffect)
|
||||||
|
*/
|
||||||
|
case XML_fast:
|
||||||
|
mnAnimationSpeed = AnimationSpeed_FAST;
|
||||||
|
+ mfTransitionDurationInSeconds = 0.5;
|
||||||
|
break;
|
||||||
|
case XML_med:
|
||||||
|
mnAnimationSpeed = AnimationSpeed_MEDIUM;
|
||||||
|
+ mfTransitionDurationInSeconds = 0.75;
|
||||||
|
break;
|
||||||
|
case XML_slow:
|
||||||
|
mnAnimationSpeed = AnimationSpeed_SLOW;
|
||||||
|
+ mfTransitionDurationInSeconds = 1.0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// should not happen. just ignore
|
||||||
|
@@ -130,6 +136,14 @@ namespace oox { namespace ppt {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ void SlideTransition::setOoxTransitionSpeed( double fDurationInSeconds )
|
||||||
|
+ {
|
||||||
|
+ // for compatibility
|
||||||
|
+ mnAnimationSpeed = ( fDurationInSeconds <= 0.5 ) ? AnimationSpeed_FAST
|
||||||
|
+ : ( fDurationInSeconds >= 1.0 ) ? AnimationSpeed_SLOW : AnimationSpeed_MEDIUM;
|
||||||
|
+ mfTransitionDurationInSeconds = fDurationInSeconds;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
sal_Int16 SlideTransition::ooxToOdpEightDirections( ::sal_Int32 nOoxType )
|
||||||
|
{
|
||||||
|
sal_Int16 nOdpDirection;
|
||||||
|
diff --git a/oox/source/ppt/slidetransitioncontext.cxx b/oox/source/ppt/slidetransitioncontext.cxx
|
||||||
|
index 64d6d5942ba3..7639df7c023b 100644
|
||||||
|
--- a/oox/source/ppt/slidetransitioncontext.cxx
|
||||||
|
+++ b/oox/source/ppt/slidetransitioncontext.cxx
|
||||||
|
@@ -32,6 +32,7 @@
|
||||||
|
#include <oox/helper/attributelist.hxx>
|
||||||
|
#include <oox/token/namespaces.hxx>
|
||||||
|
#include <oox/token/tokens.hxx>
|
||||||
|
+#include <oox/token/properties.hxx>
|
||||||
|
|
||||||
|
using namespace ::com::sun::star;
|
||||||
|
using namespace ::oox::core;
|
||||||
|
@@ -50,6 +51,11 @@ SlideTransitionContext::SlideTransitionContext( FragmentHandler2 const & rParent
|
||||||
|
// ST_TransitionSpeed
|
||||||
|
maTransition.setOoxTransitionSpeed( rAttribs.getToken( XML_spd, XML_fast ) );
|
||||||
|
|
||||||
|
+ // p14:dur
|
||||||
|
+ sal_Int32 nDurationInMs = rAttribs.getInteger( P14_TOKEN( dur ), -1 );
|
||||||
|
+ if( nDurationInMs > -1 )
|
||||||
|
+ maTransition.setOoxTransitionSpeed( nDurationInMs / 1000.0 );
|
||||||
|
+
|
||||||
|
// TODO
|
||||||
|
rAttribs.getBool( XML_advClick, true );
|
||||||
|
|
||||||
|
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
|
||||||
|
index e6bc79ff3d08..d5e945cc4342 100644
|
||||||
|
--- a/oox/source/token/properties.txt
|
||||||
|
+++ b/oox/source/token/properties.txt
|
||||||
|
@@ -527,6 +527,7 @@ TopMargin
|
||||||
|
TotalsRow
|
||||||
|
Transformation
|
||||||
|
TransitionDirection
|
||||||
|
+TransitionDuration
|
||||||
|
TransitionFadeColor
|
||||||
|
TransitionSubtype
|
||||||
|
TransitionType
|
||||||
|
diff --git a/sd/source/ui/inc/unoprnms.hxx b/sd/source/ui/inc/unoprnms.hxx
|
||||||
|
index 3dd438f0ec28..1e5e3b910f3e 100644
|
||||||
|
--- a/sd/source/ui/inc/unoprnms.hxx
|
||||||
|
+++ b/sd/source/ui/inc/unoprnms.hxx
|
||||||
|
@@ -33,6 +33,7 @@
|
||||||
|
#define UNO_NAME_PAGE_NUMBER "Number"
|
||||||
|
#define UNO_NAME_PAGE_ORIENTATION "Orientation"
|
||||||
|
#define UNO_NAME_PAGE_SPEED "Speed"
|
||||||
|
+#define UNO_NAME_PAGE_TRANSITION_DURATION "TransitionDuration"
|
||||||
|
#define UNO_NAME_PAGE_WIDTH "Width"
|
||||||
|
#define UNO_NAME_PAGE_PREVIEW "Preview"
|
||||||
|
#define UNO_NAME_PAGE_PREVIEWBITMAP "PreviewBitmap"
|
||||||
|
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
|
||||||
|
index 10f25204c810..532d10dbb569 100644
|
||||||
|
--- a/sd/source/ui/unoidl/unopage.cxx
|
||||||
|
+++ b/sd/source/ui/unoidl/unopage.cxx
|
||||||
|
@@ -142,7 +142,7 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( bool bImpress, PageKind eP
|
||||||
|
{ OUString("TransitionSubtype"), WID_TRANSITION_SUBTYPE, ::cppu::UnoType<sal_Int16>::get(), 0, 0},
|
||||||
|
{ OUString("TransitionDirection"), WID_TRANSITION_DIRECTION, ::cppu::UnoType<sal_Bool>::get(), 0, 0},
|
||||||
|
{ OUString("TransitionFadeColor"), WID_TRANSITION_FADE_COLOR, ::cppu::UnoType<sal_Int32>::get(), 0, 0},
|
||||||
|
- { OUString("TransitionDuration"), WID_TRANSITION_DURATION, ::cppu::UnoType<double>::get(), 0, 0},
|
||||||
|
+ { OUString(UNO_NAME_PAGE_TRANSITION_DURATION), WID_TRANSITION_DURATION, ::cppu::UnoType<double>::get(), 0, 0},
|
||||||
|
{ OUString("LoopSound"), WID_LOOP_SOUND, cppu::UnoType<bool>::get(), 0, 0},
|
||||||
|
{ OUString("NavigationOrder"), WID_NAVORDER, cppu::UnoType<css::container::XIndexAccess>::get(),0, 0},
|
||||||
|
{ OUString(), 0, css::uno::Type(), 0, 0 }
|
||||||
|
--
|
||||||
|
2.13.6
|
||||||
|
|
||||||
|
|
||||||
|
From 9719741507be6daa92e4af9ddfb3177fa51404ca Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Szymon=20K=C5=82os?= <szymon.klos@collabora.com>
|
||||||
|
Date: Mon, 5 Feb 2018 12:41:58 +0100
|
||||||
|
Subject: [PATCH 2/4] tdf#115394 export custom transition time in PPTX
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Change-Id: Ib8f4cef713895029dc18f68a07baa4b65e4260c0
|
||||||
|
Reviewed-on: https://gerrit.libreoffice.org/49245
|
||||||
|
Tested-by: Jenkins <ci@libreoffice.org>
|
||||||
|
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
|
||||||
|
---
|
||||||
|
sd/qa/unit/export-tests-ooxml2.cxx | 36 ++++++++
|
||||||
|
sd/source/filter/eppt/pptx-epptooxml.cxx | 150 ++++++++++++++++++++++---------
|
||||||
|
2 files changed, 145 insertions(+), 41 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
|
||||||
|
index c5c3ca580101..9ba23b0ac016 100644
|
||||||
|
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
|
||||||
|
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
|
||||||
|
@@ -650,7 +650,42 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
|
||||||
|
sal_Int32 advanceTiming = -1;
|
||||||
|
sal_Int32 changeType = 0;
|
||||||
|
|
||||||
|
- if (GETA(Speed))
|
||||||
|
+ sal_Int32 nTransitionDuration = -1;
|
||||||
|
+ bool isTransitionDurationSet = false;
|
||||||
|
+
|
||||||
|
+ // try to use TransitionDuration instead of old Speed property
|
||||||
|
+ if (GETA(TransitionDuration))
|
||||||
|
+ {
|
||||||
|
+ double fTransitionDuration = -1.0;
|
||||||
|
+ mAny >>= fTransitionDuration;
|
||||||
|
+ if (fTransitionDuration >= 0)
|
||||||
|
+ {
|
||||||
|
+ nTransitionDuration = fTransitionDuration * 1000.0;
|
||||||
|
+
|
||||||
|
+ // override values because in MS formats meaning of fast/medium/slow is different
|
||||||
|
+ if (nTransitionDuration <= 500)
|
||||||
|
+ {
|
||||||
|
+ // fast is default
|
||||||
|
+ speed = nullptr;
|
||||||
|
+ }
|
||||||
|
+ else if (nTransitionDuration >= 1000)
|
||||||
|
+ {
|
||||||
|
+ speed = "slow";
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ speed = "med";
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ bool isStandardValue = nTransitionDuration == 500
|
||||||
|
+ || nTransitionDuration == 750
|
||||||
|
+ || nTransitionDuration == 1000;
|
||||||
|
+
|
||||||
|
+ if(!isStandardValue)
|
||||||
|
+ isTransitionDurationSet = true;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ else if (GETA(Speed))
|
||||||
|
{
|
||||||
|
mAny >>= animationSpeed;
|
||||||
|
|
||||||
|
@@ -670,50 +705,12 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
|
||||||
|
|
||||||
|
if (GETA(Change))
|
||||||
|
mAny >>= changeType;
|
||||||
|
+ bool isAdvanceTimingSet = advanceTiming != -1;
|
||||||
|
|
||||||
|
// 1 means automatic, 2 half automatic - not sure what it means - at least I don't see it in UI
|
||||||
|
if (changeType == 1 && GETA(Duration))
|
||||||
|
mAny >>= advanceTiming;
|
||||||
|
|
||||||
|
- if (nTransition14 || pPresetTransition)
|
||||||
|
- {
|
||||||
|
- const char* pRequiresNS = nTransition14 ? "p14" : "p15";
|
||||||
|
-
|
||||||
|
- pFS->startElement(FSNS(XML_mc, XML_AlternateContent), FSEND);
|
||||||
|
- pFS->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, pRequiresNS, FSEND);
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- pFS->startElementNS(XML_p, XML_transition,
|
||||||
|
- XML_spd, speed,
|
||||||
|
- XML_advTm, advanceTiming != -1 ? I32S(advanceTiming*1000) : nullptr,
|
||||||
|
- FSEND);
|
||||||
|
-
|
||||||
|
- if (nTransition14)
|
||||||
|
- {
|
||||||
|
- pFS->singleElementNS(XML_p14, nTransition14,
|
||||||
|
- XML_isInverted, pInverted,
|
||||||
|
- XML_dir, pDirection14,
|
||||||
|
- XML_pattern, pPattern,
|
||||||
|
- FSEND);
|
||||||
|
- }
|
||||||
|
- else if (pPresetTransition)
|
||||||
|
- {
|
||||||
|
- pFS->singleElementNS(XML_p15, XML_prstTrans,
|
||||||
|
- XML_prst, pPresetTransition,
|
||||||
|
- FSEND);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- pFS->endElement(FSNS(XML_p, XML_transition));
|
||||||
|
-
|
||||||
|
- pFS->endElement(FSNS(XML_mc, XML_Choice));
|
||||||
|
- pFS->startElement(FSNS(XML_mc, XML_Fallback), FSEND);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- pFS->startElementNS(XML_p, XML_transition,
|
||||||
|
- XML_spd, speed,
|
||||||
|
- XML_advTm, advanceTiming != -1 ? I32S(advanceTiming*1000) : nullptr,
|
||||||
|
- FSEND);
|
||||||
|
-
|
||||||
|
if (!bOOXmlSpecificTransition)
|
||||||
|
{
|
||||||
|
switch (nPPTTransitionType)
|
||||||
|
@@ -807,6 +804,77 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (nTransition14 || pPresetTransition || isTransitionDurationSet)
|
||||||
|
+ {
|
||||||
|
+ const char* pRequiresNS = (nTransition14 || isTransitionDurationSet) ? "p14" : "p15";
|
||||||
|
+
|
||||||
|
+ pFS->startElement(FSNS(XML_mc, XML_AlternateContent), FSEND);
|
||||||
|
+ pFS->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, pRequiresNS, FSEND);
|
||||||
|
+
|
||||||
|
+ if(isTransitionDurationSet && isAdvanceTimingSet)
|
||||||
|
+ {
|
||||||
|
+ pFS->startElementNS(XML_p, XML_transition,
|
||||||
|
+ XML_spd, speed,
|
||||||
|
+ XML_advTm, I32S(advanceTiming * 1000),
|
||||||
|
+ FSNS(XML_p14, XML_dur), I32S(nTransitionDuration),
|
||||||
|
+ FSEND);
|
||||||
|
+ }
|
||||||
|
+ else if(isTransitionDurationSet)
|
||||||
|
+ {
|
||||||
|
+ pFS->startElementNS(XML_p, XML_transition,
|
||||||
|
+ XML_spd, speed,
|
||||||
|
+ FSNS(XML_p14, XML_dur), I32S(nTransitionDuration),
|
||||||
|
+ FSEND);
|
||||||
|
+ }
|
||||||
|
+ else if(isAdvanceTimingSet)
|
||||||
|
+ {
|
||||||
|
+ pFS->startElementNS(XML_p, XML_transition,
|
||||||
|
+ XML_spd, speed,
|
||||||
|
+ XML_advTm, I32S(advanceTiming * 1000),
|
||||||
|
+ FSEND);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ pFS->startElementNS(XML_p, XML_transition,
|
||||||
|
+ XML_spd, speed,
|
||||||
|
+ FSEND);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (nTransition14)
|
||||||
|
+ {
|
||||||
|
+ pFS->singleElementNS(XML_p14, nTransition14,
|
||||||
|
+ XML_isInverted, pInverted,
|
||||||
|
+ XML_dir, pDirection14,
|
||||||
|
+ XML_pattern, pPattern,
|
||||||
|
+ FSEND);
|
||||||
|
+ }
|
||||||
|
+ else if (pPresetTransition)
|
||||||
|
+ {
|
||||||
|
+ pFS->singleElementNS(XML_p15, XML_prstTrans,
|
||||||
|
+ XML_prst, pPresetTransition,
|
||||||
|
+ FSEND);
|
||||||
|
+ }
|
||||||
|
+ else if (isTransitionDurationSet && nTransition)
|
||||||
|
+ {
|
||||||
|
+ pFS->singleElementNS(XML_p, nTransition,
|
||||||
|
+ XML_dir, pDirection,
|
||||||
|
+ XML_orient, pOrientation,
|
||||||
|
+ XML_spokes, pSpokes,
|
||||||
|
+ XML_thruBlk, pThruBlk,
|
||||||
|
+ FSEND);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ pFS->endElement(FSNS(XML_p, XML_transition));
|
||||||
|
+
|
||||||
|
+ pFS->endElement(FSNS(XML_mc, XML_Choice));
|
||||||
|
+ pFS->startElement(FSNS(XML_mc, XML_Fallback), FSEND);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ pFS->startElementNS(XML_p, XML_transition,
|
||||||
|
+ XML_spd, speed,
|
||||||
|
+ XML_advTm, isAdvanceTimingSet ? I32S(advanceTiming * 1000) : nullptr,
|
||||||
|
+ FSEND);
|
||||||
|
+
|
||||||
|
if (nTransition)
|
||||||
|
{
|
||||||
|
pFS->singleElementNS(XML_p, nTransition,
|
||||||
|
@@ -819,7 +887,7 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
|
||||||
|
|
||||||
|
pFS->endElementNS(XML_p, XML_transition);
|
||||||
|
|
||||||
|
- if (nTransition14 || pPresetTransition)
|
||||||
|
+ if (nTransition14 || pPresetTransition || isTransitionDurationSet)
|
||||||
|
{
|
||||||
|
pFS->endElement(FSNS(XML_mc, XML_Fallback));
|
||||||
|
pFS->endElement(FSNS(XML_mc, XML_AlternateContent));
|
||||||
|
--
|
||||||
|
2.13.6
|
||||||
|
|
||||||
|
|
||||||
|
From 41fe895bf25d6a0895cfd1ce78f3cbd1d3eb02b3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Szymon=20K=C5=82os?= <szymon.klos@collabora.com>
|
||||||
|
Date: Wed, 7 Feb 2018 12:22:52 +0100
|
||||||
|
Subject: [PATCH 3/4] tdf#115394 export correct slide transition time in PPT
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Change-Id: Ie293dd4cc128c256e39d54fdcd83bb5e13484662
|
||||||
|
Reviewed-on: https://gerrit.libreoffice.org/49345
|
||||||
|
Tested-by: Jenkins <ci@libreoffice.org>
|
||||||
|
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
|
||||||
|
---
|
||||||
|
sd/qa/unit/data/ppt/tdf115394.ppt | Bin 0 -> 90112 bytes
|
||||||
|
sd/qa/unit/export-tests.cxx | 39 ++++++++++++++++++++++++++++++++++++++
|
||||||
|
sd/qa/unit/import-tests.cxx | 25 ++++++++++++++++++++++++
|
||||||
|
sd/source/filter/eppt/eppt.cxx | 26 ++++++++++++++++++++++---
|
||||||
|
sd/source/filter/ppt/pptin.cxx | 6 +++---
|
||||||
|
5 files changed, 90 insertions(+), 6 deletions(-)
|
||||||
|
create mode 100644 sd/qa/unit/data/ppt/tdf115394.ppt
|
||||||
|
|
||||||
|
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
|
||||||
|
index 2b3f76a41ebf..a506a376c20f 100644
|
||||||
|
--- a/sd/source/filter/eppt/eppt.cxx
|
||||||
|
+++ b/sd/source/filter/eppt/eppt.cxx
|
||||||
|
@@ -241,11 +241,31 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_
|
||||||
|
sal_Int32 nSlideTime = 0; // still has to !!!
|
||||||
|
sal_uInt8 nSpeed = 1;
|
||||||
|
|
||||||
|
- if ( GetPropertyValue( aAny, mXPagePropSet, "Speed" ) )
|
||||||
|
+ if ( GetPropertyValue( aAny, mXPagePropSet, "TransitionDuration" ) )
|
||||||
|
{
|
||||||
|
css::presentation::AnimationSpeed aAs;
|
||||||
|
- aAny >>= aAs;
|
||||||
|
- nSpeed = (sal_uInt8)aAs;
|
||||||
|
+ double fTransitionDuration = -1.0;
|
||||||
|
+ aAny >>= fTransitionDuration;
|
||||||
|
+
|
||||||
|
+ if (fTransitionDuration >= 0)
|
||||||
|
+ {
|
||||||
|
+ if (fTransitionDuration <= 0.5)
|
||||||
|
+ {
|
||||||
|
+ aAs = css::presentation::AnimationSpeed::AnimationSpeed_FAST;
|
||||||
|
+ }
|
||||||
|
+ else if (fTransitionDuration >= 1.0)
|
||||||
|
+ {
|
||||||
|
+ aAs = css::presentation::AnimationSpeed::AnimationSpeed_SLOW;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ aAs = css::presentation::AnimationSpeed::AnimationSpeed_MEDIUM;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ aAs = css::presentation::AnimationSpeed::AnimationSpeed_MEDIUM;
|
||||||
|
+
|
||||||
|
+ nSpeed = static_cast<sal_uInt8>(aAs);
|
||||||
|
}
|
||||||
|
sal_Int16 nTT = 0;
|
||||||
|
if ( GetPropertyValue( aAny, mXPagePropSet, "TransitionType" )
|
||||||
|
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
|
||||||
|
index 4215cd7b60a8..91a541135204 100644
|
||||||
|
--- a/sd/source/filter/ppt/pptin.cxx
|
||||||
|
+++ b/sd/source/filter/ppt/pptin.cxx
|
||||||
|
@@ -1786,11 +1786,11 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const bool bNewAnimations
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( nSpeed == 0 )
|
||||||
|
- pPage->setTransitionDuration( 3.0 ); // slow
|
||||||
|
+ pPage->setTransitionDuration( 1.0 ); // slow
|
||||||
|
else if ( nSpeed == 1 )
|
||||||
|
- pPage->setTransitionDuration( 2.0 ); // medium
|
||||||
|
+ pPage->setTransitionDuration( 0.75 ); // medium
|
||||||
|
else if ( nSpeed == 2 )
|
||||||
|
- pPage->setTransitionDuration( 1.0 ); // fast
|
||||||
|
+ pPage->setTransitionDuration( 0.5 ); // fast
|
||||||
|
|
||||||
|
if ( nBuildFlags & 0x400 ) // slidechange by time
|
||||||
|
{ // time to show (in Ticks)
|
||||||
|
--
|
||||||
|
2.13.6
|
||||||
|
|
||||||
|
|
||||||
|
From b49d7f142bf33a961b8a5ba1ba92e6dc85134940 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Szymon=20K=C5=82os?= <szymon.klos@collabora.com>
|
||||||
|
Date: Thu, 8 Feb 2018 23:21:38 +0100
|
||||||
|
Subject: [PATCH 4/4] tdf#115394 correct transition in case of 0s
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Change-Id: I23d18acef0bd5db4a4ad6fc67d409e7ed5c93949
|
||||||
|
Reviewed-on: https://gerrit.libreoffice.org/49462
|
||||||
|
Tested-by: Jenkins <ci@libreoffice.org>
|
||||||
|
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
|
||||||
|
---
|
||||||
|
include/oox/ppt/slidetransitioncontext.hxx | 1 +
|
||||||
|
oox/source/ppt/slidetransitioncontext.cxx | 9 ++++++++-
|
||||||
|
sd/qa/unit/data/pptx/tdf115394-zero.pptx | Bin 0 -> 34352 bytes
|
||||||
|
sd/qa/unit/export-tests-ooxml2.cxx | 16 ++++++++++++++++
|
||||||
|
sd/source/filter/eppt/pptx-epptooxml.cxx | 8 ++++----
|
||||||
|
5 files changed, 29 insertions(+), 5 deletions(-)
|
||||||
|
create mode 100644 sd/qa/unit/data/pptx/tdf115394-zero.pptx
|
||||||
|
|
||||||
|
diff --git a/include/oox/ppt/slidetransitioncontext.hxx b/include/oox/ppt/slidetransitioncontext.hxx
|
||||||
|
index 3361fd07a5a5..f6b2e7a91d56 100644
|
||||||
|
--- a/include/oox/ppt/slidetransitioncontext.hxx
|
||||||
|
+++ b/include/oox/ppt/slidetransitioncontext.hxx
|
||||||
|
@@ -47,6 +47,7 @@ namespace oox { namespace ppt {
|
||||||
|
private:
|
||||||
|
PropertyMap& maSlideProperties;
|
||||||
|
bool mbHasTransition;
|
||||||
|
+ bool mbHasTransitionDuration;
|
||||||
|
SlideTransition maTransition;
|
||||||
|
};
|
||||||
|
|
||||||
|
diff --git a/oox/source/ppt/slidetransitioncontext.cxx b/oox/source/ppt/slidetransitioncontext.cxx
|
||||||
|
index 7639df7c023b..94fc1c3862ae 100644
|
||||||
|
--- a/oox/source/ppt/slidetransitioncontext.cxx
|
||||||
|
+++ b/oox/source/ppt/slidetransitioncontext.cxx
|
||||||
|
@@ -47,6 +47,7 @@ SlideTransitionContext::SlideTransitionContext( FragmentHandler2 const & rParent
|
||||||
|
: FragmentHandler2( rParent )
|
||||||
|
, maSlideProperties( aProperties )
|
||||||
|
, mbHasTransition( false )
|
||||||
|
+, mbHasTransitionDuration( false )
|
||||||
|
{
|
||||||
|
// ST_TransitionSpeed
|
||||||
|
maTransition.setOoxTransitionSpeed( rAttribs.getToken( XML_spd, XML_fast ) );
|
||||||
|
@@ -54,7 +55,13 @@ SlideTransitionContext::SlideTransitionContext( FragmentHandler2 const & rParent
|
||||||
|
// p14:dur
|
||||||
|
sal_Int32 nDurationInMs = rAttribs.getInteger( P14_TOKEN( dur ), -1 );
|
||||||
|
if( nDurationInMs > -1 )
|
||||||
|
+ {
|
||||||
|
+ // In MSO 0 is visible as 0.01s
|
||||||
|
+ if( nDurationInMs == 0.0 )
|
||||||
|
+ nDurationInMs = 10;
|
||||||
|
maTransition.setOoxTransitionSpeed( nDurationInMs / 1000.0 );
|
||||||
|
+ mbHasTransitionDuration = true;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
rAttribs.getBool( XML_advClick, true );
|
||||||
|
@@ -182,7 +189,7 @@ void SlideTransitionContext::onEndElement()
|
||||||
|
{
|
||||||
|
if( isCurrentElement(PPT_TOKEN( transition )) )
|
||||||
|
{
|
||||||
|
- if( mbHasTransition )
|
||||||
|
+ if( mbHasTransition || mbHasTransitionDuration )
|
||||||
|
{
|
||||||
|
maTransition.setSlideProperties( maSlideProperties );
|
||||||
|
mbHasTransition = false;
|
||||||
|
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
|
||||||
|
index 9ba23b0ac016..1ab1a7dc68ff 100644
|
||||||
|
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
|
||||||
|
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
|
||||||
|
@@ -641,10 +641,6 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- // check if we resolved what transition to export
|
||||||
|
- if (!nPPTTransitionType && !bOOXmlSpecificTransition)
|
||||||
|
- return;
|
||||||
|
-
|
||||||
|
AnimationSpeed animationSpeed = AnimationSpeed_MEDIUM;
|
||||||
|
const char* speed = nullptr;
|
||||||
|
sal_Int32 advanceTiming = -1;
|
||||||
|
@@ -703,6 +699,10 @@ void PowerPointExport::WriteTransition(const FSHelperPtr& pFS)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // check if we resolved what transition to export or time is set
|
||||||
|
+ if (!nPPTTransitionType && !bOOXmlSpecificTransition && !isTransitionDurationSet)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
if (GETA(Change))
|
||||||
|
mAny >>= changeType;
|
||||||
|
bool isAdvanceTimingSet = advanceTiming != -1;
|
||||||
|
--
|
||||||
|
2.13.6
|
||||||
|
|
1130
bnc1060128.patch
Normal file
1130
bnc1060128.patch
Normal file
File diff suppressed because it is too large
Load Diff
29
bnc1081079.patch
Normal file
29
bnc1081079.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
|
||||||
|
index 128a166c..4e789f9 100644
|
||||||
|
--- a/oox/source/export/chartexport.cxx
|
||||||
|
+++ b/oox/source/export/chartexport.cxx
|
||||||
|
@@ -2930,6 +2930,24 @@
|
||||||
|
FSHelperPtr pFS = GetFS();
|
||||||
|
pFS->startElement(FSNS(XML_c, XML_dLbls), FSEND);
|
||||||
|
|
||||||
|
+ bool bLinkedNumFmt = true;
|
||||||
|
+ if (GetProperty(xPropSet, "LinkNumberFormatToSource"))
|
||||||
|
+ mAny >>= bLinkedNumFmt;
|
||||||
|
+
|
||||||
|
+ if (GetProperty(xPropSet, "NumberFormat"))
|
||||||
|
+ {
|
||||||
|
+ sal_Int32 nKey = 0;
|
||||||
|
+ mAny >>= nKey;
|
||||||
|
+
|
||||||
|
+ OUString aNumberFormatString = getNumberFormatCode(nKey);
|
||||||
|
+ OString sNumberFormatString = OUStringToOString(aNumberFormatString, RTL_TEXTENCODING_UTF8);
|
||||||
|
+
|
||||||
|
+ pFS->singleElement(FSNS(XML_c, XML_numFmt),
|
||||||
|
+ XML_formatCode, sNumberFormatString.getStr(),
|
||||||
|
+ XML_sourceLinked, bLinkedNumFmt ? "1" : "0",
|
||||||
|
+ FSEND);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
uno::Sequence<sal_Int32> aAttrLabelIndices;
|
||||||
|
xPropSet->getPropertyValue("AttributedDataPoints") >>= aAttrLabelIndices;
|
||||||
|
|
309
bnc955545.patch
Normal file
309
bnc955545.patch
Normal file
@ -0,0 +1,309 @@
|
|||||||
|
commit d2437852097ba042dd5445800505bb7942006759
|
||||||
|
Author: Miklos Vajna <vmiklos@collabora.co.uk>
|
||||||
|
Date: Wed Feb 21 17:27:53 2018 +0100
|
||||||
|
|
||||||
|
tdf#115873 sd navigator: allow selecting but not focusing on objects
|
||||||
|
|
||||||
|
There were also two cases here:
|
||||||
|
|
||||||
|
- changing the selection with the keyboard or single-click only updated
|
||||||
|
the selection in the navigator
|
||||||
|
- pressing enter or double-click also selected the shape in the main
|
||||||
|
window and gave the focus away
|
||||||
|
|
||||||
|
Introduce a 3rd case for single-click: update the shape selection but
|
||||||
|
doesn't give the focus away. This way double-click is not needed to sync
|
||||||
|
navigator -> main doc selection but keyboard navigation should still
|
||||||
|
work.
|
||||||
|
|
||||||
|
An additional trick is to make sure that the current shell is the draw
|
||||||
|
shell (and not the slide sorter) after navigation, so follow-up
|
||||||
|
operations work with the selected object and not with the whole slide.
|
||||||
|
|
||||||
|
Finally, a third related problem was that the selection jumped back to
|
||||||
|
the item of the slide after clicking on a shape in the navigator. The
|
||||||
|
reason for this was the navigator list was constantly cleared and
|
||||||
|
re-filled in SdNavigatorWin::InitTreeLB(), as
|
||||||
|
SdPageObjsTLB::IsEqualToDoc() returned false (even if the list was up to
|
||||||
|
date) in case of shapes which had children but no name. Fix this by
|
||||||
|
using the same SdrIterMode::Flat iteration mode that
|
||||||
|
SdPageObjsTLB::AddShapeList() does, so the fill and the equality check
|
||||||
|
of the navigator iterates the same way.
|
||||||
|
|
||||||
|
Conflicts:
|
||||||
|
sd/qa/unit/tiledrendering/tiledrendering.cxx
|
||||||
|
|
||||||
|
(cherry picked from commit f3c68cdf8f6a0273c62b493552f78af0138a44e8)
|
||||||
|
|
||||||
|
Change-Id: I0bfc3e8b49f7ef01d5797a68284616dcd2a81c5d
|
||||||
|
Reviewed-on: https://gerrit.libreoffice.org/50158
|
||||||
|
Tested-by: Jenkins <ci@libreoffice.org>
|
||||||
|
Reviewed-by: Andras Timar <andras.timar@collabora.com>
|
||||||
|
|
||||||
|
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
|
||||||
|
index 4552f262c7a1..53526c95473b 100644
|
||||||
|
--- a/sd/source/ui/dlg/navigatr.cxx
|
||||||
|
+++ b/sd/source/ui/dlg/navigatr.cxx
|
||||||
|
@@ -54,6 +54,7 @@
|
||||||
|
#include <slideshow.hxx>
|
||||||
|
#include <FrameView.hxx>
|
||||||
|
#include <helpids.h>
|
||||||
|
+#include <Window.hxx>
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
static const sal_uInt16 nShowNamedShapesFilter=1;
|
||||||
|
@@ -215,6 +216,11 @@ NavigatorDragType SdNavigatorWin::GetNavigatorDragType()
|
||||||
|
return eDT;
|
||||||
|
}
|
||||||
|
|
||||||
|
+VclPtr<SdPageObjsTLB> SdNavigatorWin::GetObjects()
|
||||||
|
+{
|
||||||
|
+ return maTlbObjects;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
IMPL_LINK_NOARG(SdNavigatorWin, SelectToolboxHdl, ToolBox *, void)
|
||||||
|
{
|
||||||
|
sal_uInt16 nId = maToolbox->GetCurItemId();
|
||||||
|
@@ -337,6 +343,27 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, SvTreeListBox*, bool)
|
||||||
|
if ( pShellWnd )
|
||||||
|
pShellWnd->GrabFocus();
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // We navigated to an object, but the current shell may be
|
||||||
|
+ // still the slide sorter. Explicitly try to grab the draw
|
||||||
|
+ // shell focus, so follow-up operations work with the object
|
||||||
|
+ // and not with the whole slide.
|
||||||
|
+ sd::DrawDocShell* pDocShell = pInfo->mpDocShell;
|
||||||
|
+ if (pDocShell)
|
||||||
|
+ {
|
||||||
|
+ sd::ViewShell* pViewShell = pDocShell->GetViewShell();
|
||||||
|
+ if (pViewShell)
|
||||||
|
+ {
|
||||||
|
+ vcl::Window* pWindow = pViewShell->GetActiveWindow();
|
||||||
|
+ if (pWindow)
|
||||||
|
+ pWindow->GrabFocus();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (!maTlbObjects->IsNavigationGrabsFocus())
|
||||||
|
+ // This is the case when keyboard navigation inside the
|
||||||
|
+ // navigator should continue to work.
|
||||||
|
+ maTlbObjects->GrabFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
|
||||||
|
index 7667c66db132..d9d193e445c0 100644
|
||||||
|
--- a/sd/source/ui/dlg/sdtreelb.cxx
|
||||||
|
+++ b/sd/source/ui/dlg/sdtreelb.cxx
|
||||||
|
@@ -58,6 +58,7 @@
|
||||||
|
#include <comphelper/processfactory.hxx>
|
||||||
|
#include <tools/diagnose_ex.h>
|
||||||
|
#include <o3tl/make_unique.hxx>
|
||||||
|
+#include <comphelper/scopeguard.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
using namespace com::sun::star;
|
||||||
|
@@ -205,6 +206,8 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle )
|
||||||
|
, mbSaveTreeItemState ( false )
|
||||||
|
, mbShowAllShapes ( false )
|
||||||
|
, mbShowAllPages ( false )
|
||||||
|
+, mbSelectionHandlerNavigates(false)
|
||||||
|
+, mbNavigationGrabsFocus(true)
|
||||||
|
{
|
||||||
|
// add lines to Tree-ListBox
|
||||||
|
SetStyle( GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES |
|
||||||
|
@@ -626,6 +629,52 @@ void SdPageObjsTLB::SetShowAllShapes (
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool SdPageObjsTLB::IsEqualToShapeList(SvTreeListEntry*& pEntry, const SdrObjList& rList,
|
||||||
|
+ const OUString& rListName)
|
||||||
|
+{
|
||||||
|
+ if (!pEntry)
|
||||||
|
+ return false;
|
||||||
|
+ OUString aName = GetEntryText(pEntry);
|
||||||
|
+
|
||||||
|
+ if (rListName != aName)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ pEntry = Next(pEntry);
|
||||||
|
+
|
||||||
|
+ SdrObjListIter aIter(rList,
|
||||||
|
+ !rList.HasObjectNavigationOrder() /* use navigation order, if available */,
|
||||||
|
+ SdrIterMode::Flat);
|
||||||
|
+
|
||||||
|
+ while (aIter.IsMore())
|
||||||
|
+ {
|
||||||
|
+ SdrObject* pObj = aIter.Next();
|
||||||
|
+
|
||||||
|
+ const OUString aObjectName(GetObjectName(pObj));
|
||||||
|
+
|
||||||
|
+ if (!aObjectName.isEmpty())
|
||||||
|
+ {
|
||||||
|
+ if (!pEntry)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ aName = GetEntryText(pEntry);
|
||||||
|
+
|
||||||
|
+ if (aObjectName != aName)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ if (pObj->IsGroupObject())
|
||||||
|
+ {
|
||||||
|
+ bool bRet = IsEqualToShapeList(pEntry, *pObj->GetSubList(), aObjectName);
|
||||||
|
+ if (!bRet)
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ pEntry = Next(pEntry);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return true;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Checks if the pages (PageKind::Standard) of a doc and the objects on the pages
|
||||||
|
* are identical to the TreeLB.
|
||||||
|
@@ -640,9 +689,7 @@ bool SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc )
|
||||||
|
if( !mpDoc )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
- SdrObject* pObj = nullptr;
|
||||||
|
SvTreeListEntry* pEntry = First();
|
||||||
|
- OUString aName;
|
||||||
|
|
||||||
|
// compare all pages including the objects
|
||||||
|
sal_uInt16 nPage = 0;
|
||||||
|
@@ -653,39 +700,9 @@ bool SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc )
|
||||||
|
const SdPage* pPage = static_cast<const SdPage*>( mpDoc->GetPage( nPage ) );
|
||||||
|
if( pPage->GetPageKind() == PageKind::Standard )
|
||||||
|
{
|
||||||
|
- if( !pEntry )
|
||||||
|
+ bool bRet = IsEqualToShapeList(pEntry, *pPage, pPage->GetName());
|
||||||
|
+ if (!bRet)
|
||||||
|
return false;
|
||||||
|
- aName = GetEntryText( pEntry );
|
||||||
|
-
|
||||||
|
- if( pPage->GetName() != aName )
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- pEntry = Next( pEntry );
|
||||||
|
-
|
||||||
|
- SdrObjListIter aIter(
|
||||||
|
- *pPage,
|
||||||
|
- !pPage->HasObjectNavigationOrder() /* use navigation order, if available */,
|
||||||
|
- SdrIterMode::DeepWithGroups );
|
||||||
|
-
|
||||||
|
- while( aIter.IsMore() )
|
||||||
|
- {
|
||||||
|
- pObj = aIter.Next();
|
||||||
|
-
|
||||||
|
- const OUString aObjectName( GetObjectName( pObj ) );
|
||||||
|
-
|
||||||
|
- if( !aObjectName.isEmpty() )
|
||||||
|
- {
|
||||||
|
- if( !pEntry )
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- aName = GetEntryText( pEntry );
|
||||||
|
-
|
||||||
|
- if( aObjectName != aName )
|
||||||
|
- return false;
|
||||||
|
-
|
||||||
|
- pEntry = Next( pEntry );
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
nPage++;
|
||||||
|
}
|
||||||
|
@@ -895,6 +912,9 @@ void SdPageObjsTLB::SelectHdl()
|
||||||
|
}
|
||||||
|
|
||||||
|
SvTreeListBox::SelectHdl();
|
||||||
|
+
|
||||||
|
+ if (mbSelectionHandlerNavigates)
|
||||||
|
+ DoubleClickHdl();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -939,6 +959,16 @@ void SdPageObjsTLB::KeyInput( const KeyEvent& rKEvt )
|
||||||
|
SvTreeListBox::KeyInput( rKEvt );
|
||||||
|
}
|
||||||
|
|
||||||
|
+void SdPageObjsTLB::MouseButtonDown(const MouseEvent& rMEvt)
|
||||||
|
+{
|
||||||
|
+ mbSelectionHandlerNavigates = rMEvt.GetClicks() == 1;
|
||||||
|
+ comphelper::ScopeGuard aNavigationGuard([this]() { this->mbSelectionHandlerNavigates = false; });
|
||||||
|
+ mbNavigationGrabsFocus = rMEvt.GetClicks() != 1;
|
||||||
|
+ comphelper::ScopeGuard aGrabGuard([this]() { this->mbNavigationGrabsFocus = true; });
|
||||||
|
+
|
||||||
|
+ SvTreeListBox::MouseButtonDown(rMEvt);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* StartDrag-Request
|
||||||
|
*/
|
||||||
|
diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx
|
||||||
|
index cd487a249058..a9501c5236a4 100644
|
||||||
|
--- a/sd/source/ui/inc/navigatr.hxx
|
||||||
|
+++ b/sd/source/ui/inc/navigatr.hxx
|
||||||
|
@@ -76,7 +76,7 @@ private:
|
||||||
|
::sd::DrawDocShell* mpDocShell;
|
||||||
|
};
|
||||||
|
|
||||||
|
-class SdNavigatorWin : public PanelLayout
|
||||||
|
+class SD_DLLPUBLIC SdNavigatorWin : public PanelLayout
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef ::std::function<void ()> UpdateRequestFunctor;
|
||||||
|
@@ -101,6 +101,7 @@ public:
|
||||||
|
bool InsertFile(const OUString& rFileName);
|
||||||
|
|
||||||
|
NavigatorDragType GetNavigatorDragType();
|
||||||
|
+ VclPtr<SdPageObjsTLB> GetObjects();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual bool EventNotify(NotifyEvent& rNEvt) override;
|
||||||
|
diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx
|
||||||
|
index 6f9887ecd40e..b358e376672b 100644
|
||||||
|
--- a/sd/source/ui/inc/sdtreelb.hxx
|
||||||
|
+++ b/sd/source/ui/inc/sdtreelb.hxx
|
||||||
|
@@ -195,6 +195,7 @@ public:
|
||||||
|
OUString GetEntryLongDescription( SvTreeListEntry* pEntry ) const override;
|
||||||
|
virtual void SelectHdl() override;
|
||||||
|
virtual void KeyInput( const KeyEvent& rKEvt ) override;
|
||||||
|
+ void MouseButtonDown(const MouseEvent& rMEvt) override;
|
||||||
|
|
||||||
|
void SetViewFrame( SfxViewFrame* pViewFrame );
|
||||||
|
|
||||||
|
@@ -202,7 +203,11 @@ public:
|
||||||
|
void Fill( const SdDrawDocument*, SfxMedium* pSfxMedium, const OUString& rDocName );
|
||||||
|
void SetShowAllShapes (const bool bShowAllShapes, const bool bFill);
|
||||||
|
bool GetShowAllShapes() const { return mbShowAllShapes;}
|
||||||
|
+ bool IsNavigationGrabsFocus() const { return mbNavigationGrabsFocus; }
|
||||||
|
bool IsEqualToDoc( const SdDrawDocument* pInDoc );
|
||||||
|
+ /// Visits rList recursively and tries to advance pEntry accordingly.
|
||||||
|
+ bool IsEqualToShapeList(SvTreeListEntry*& pEntry, const SdrObjList& rList,
|
||||||
|
+ const OUString& rListName);
|
||||||
|
bool HasSelectedChildren( const OUString& rName );
|
||||||
|
bool SelectEntry( const OUString& rName );
|
||||||
|
OUString GetSelectedEntry();
|
||||||
|
@@ -247,6 +252,16 @@ private:
|
||||||
|
/** This flag controls whether to show all pages.
|
||||||
|
*/
|
||||||
|
bool mbShowAllPages;
|
||||||
|
+ /**
|
||||||
|
+ * If changing the selection should also result in navigating to the
|
||||||
|
+ * relevant shape.
|
||||||
|
+ */
|
||||||
|
+ bool mbSelectionHandlerNavigates;
|
||||||
|
+ /**
|
||||||
|
+ * If navigation should not only select the relevant shape but also change
|
||||||
|
+ * focus to it.
|
||||||
|
+ */
|
||||||
|
+ bool mbNavigationGrabsFocus;
|
||||||
|
|
||||||
|
/** Return <TRUE/> when the current transferable may be dropped at the
|
||||||
|
given list box entry.
|
@ -1,9 +1,40 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 5 15:47:27 UTC 2018 - andras.timar@collabora.com
|
||||||
|
|
||||||
|
- Remove upstreamed patches
|
||||||
|
* bnc1061210.patch
|
||||||
|
* bnc954772.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Mar 5 10:24:22 UTC 2018 - tchvatal@suse.com
|
Mon Mar 5 10:24:22 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
- Version update to 6.0.2.1 release:
|
- Version update to 6.0.2.1 release:
|
||||||
* second bugfix release closing around 80 TDF issues
|
* second bugfix release closing around 80 TDF issues
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 28 08:02:05 UTC 2018 - andras.timar@collabora.com
|
||||||
|
|
||||||
|
- LO-L3: Saving PPTX chart changes $12K to 12,345 format
|
||||||
|
* bnc1081079.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 22 11:10:32 UTC 2018 - andras.timar@collabora.com
|
||||||
|
|
||||||
|
- LO-L3: Cutting object (Rectangle) in Navigator cuts the whole slide instead
|
||||||
|
* bnc955545.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 21 10:27:05 UTC 2018 - andras.timar@collabora.com
|
||||||
|
|
||||||
|
- LO-L3: Wrong transition time
|
||||||
|
* bnc1039203.patch
|
||||||
|
- LO-L3: Slide with chart has some strange (too large?) elements (PPTX)
|
||||||
|
* bnc1060128.patch
|
||||||
|
- LO-L3: Table(s) from DOCX show wrong position/color/...?
|
||||||
|
* bnc1061210.patch
|
||||||
|
- LO-L3: Copy and Paste in Table ignores formatting completely
|
||||||
|
* bnc954772.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 20 14:03:07 UTC 2018 - tchvatal@suse.com
|
Tue Feb 20 14:03:07 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
@ -92,6 +92,14 @@ Patch3: mediawiki-no-broken-help.diff
|
|||||||
Patch4: kde5-configure-checks.patch
|
Patch4: kde5-configure-checks.patch
|
||||||
Patch5: 0001-Use-PYTHON_FOR_BUILD-instead-of-calling-python-direc.patch
|
Patch5: 0001-Use-PYTHON_FOR_BUILD-instead-of-calling-python-direc.patch
|
||||||
Patch6: orcus-0.13.3.patch
|
Patch6: orcus-0.13.3.patch
|
||||||
|
# LO-L3: Wrong transition time
|
||||||
|
Patch7: bnc1039203.patch
|
||||||
|
# LO-L3: Slide with chart has some strange (too large?) elements (PPTX)
|
||||||
|
Patch8: bnc1060128.patch
|
||||||
|
# LO-L3: Cutting object (Rectangle) in Navigator cuts the whole slide instead
|
||||||
|
Patch11: bnc955545.patch
|
||||||
|
# LO-L3: Saving PPTX chart changes $12K to 12,345 format
|
||||||
|
Patch12: bnc1081079.patch
|
||||||
Patch500: boost_string_fixes.patch
|
Patch500: boost_string_fixes.patch
|
||||||
# try to save space by using hardlinks
|
# try to save space by using hardlinks
|
||||||
Patch990: install-with-hardlinks.diff
|
Patch990: install-with-hardlinks.diff
|
||||||
@ -886,6 +894,10 @@ Provides additional %{langname} translations and resources for %{project}. \
|
|||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
|
%patch11 -p1
|
||||||
|
%patch12 -p1
|
||||||
%patch990 -p1
|
%patch990 -p1
|
||||||
|
|
||||||
# Disable some of the failing tests (some are random)
|
# Disable some of the failing tests (some are random)
|
||||||
@ -1042,7 +1054,7 @@ make build-nocheck
|
|||||||
%check
|
%check
|
||||||
# Run tests only on 64b intel as they are resource hogs
|
# Run tests only on 64b intel as they are resource hogs
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
make
|
make
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
Loading…
Reference in New Issue
Block a user