[Libreoffice-commits] core.git: sd/inc sd/qa sd/source
Vasily Melenchuk
Vasily.Melenchuk at cib.de
Thu Feb 15 13:04:24 UTC 2018
sd/inc/sdpage.hxx | 1 -
sd/qa/unoapi/knownissues.xcl | 5 +++++
sd/source/core/sdpage.cxx | 38 +++++++++++---------------------------
sd/source/core/sdpage2.cxx | 7 +++----
4 files changed, 19 insertions(+), 32 deletions(-)
New commits:
commit 3462a55f0696ae06ea6714723c54eb7c67c2cbaa
Author: Vasily Melenchuk <Vasily.Melenchuk at cib.de>
Date: Tue Jan 30 10:26:27 2018 +0300
tdf#115345: removed slide orientation setting method.
Slide orientation is dependent value and can be easily calculated
based on slide dimensions.
Also modification of slide orientation without changing of page
dimensions brings page in inconsistent state.
Change-Id: I86921668b648a8110d16b31507f2ce5d6c88484a
Reviewed-on: https://gerrit.libreoffice.org/49334
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index dcef647fb59e..42af131102c0 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -122,7 +122,6 @@ friend class sd::UndoAttrObject;
bool mbBackgroundFullSize; ///< Background object to represent the whole page.
rtl_TextEncoding meCharSet; ///< Text encoding
sal_uInt16 mnPaperBin; ///< PaperBin
- Orientation meOrientation; ///< Print orientation.
SdPageLink* mpPageLink; ///< Page link (at left sides only)
sd::AnnotationVector maAnnotations;
diff --git a/sd/qa/unoapi/knownissues.xcl b/sd/qa/unoapi/knownissues.xcl
index a7ec4216100a..d9e0690013a1 100644
--- a/sd/qa/unoapi/knownissues.xcl
+++ b/sd/qa/unoapi/knownissues.xcl
@@ -16,6 +16,11 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
+### tdf#115345 - not useful to set Orientation ###
+sd.SdDrawPage::com::sun::star::drawing::GenericDrawPage
+sd.SdGenericDrawPage::com::sun::star::drawing::GenericDrawPage
+sd.SdMasterPage::com::sun::star::drawing::GenericDrawPage
+
### i84994 ###
sd.SdXImpressDocument::com::sun::star::view::XPrintable
# -> disabled in sd.sce
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 6e4c3dffbfee..867c4df6c3c0 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -129,16 +129,6 @@ SdPage::SdPage(SdDrawDocument& rNewDoc, bool bMasterPage)
// presentation template of the outline objects. Therefore, it already
// contains the designator for the outline (STR_LAYOUT_OUTLINE).
maLayoutName = SdResId(STR_LAYOUT_DEFAULT_NAME)+ SD_LT_SEPARATOR STR_LAYOUT_OUTLINE;
- Size aPageSize(GetSize());
-
- if (aPageSize.Width() > aPageSize.Height())
- {
- meOrientation = Orientation::Landscape;
- }
- else
- {
- meOrientation = Orientation::Portrait;
- }
}
namespace
@@ -1757,20 +1747,6 @@ void SdPage::SetSize(const Size& aSize)
if (aSize != aOldSize)
{
FmFormPage::SetSize(aSize);
-
- if (aOldSize.Height() == 10 && aOldSize.Width() == 10)
- {
- // this page gets a valid size for the first time. Therefore
- // we initialize the orientation.
- if (aSize.Width() > aSize.Height())
- {
- meOrientation = Orientation::Landscape;
- }
- else
- {
- meOrientation = Orientation::Portrait;
- }
- }
}
}
@@ -2614,14 +2590,22 @@ const OUString& SdPage::GetName() const
return maCreatedPageName;
}
-void SdPage::SetOrientation( Orientation eOrient)
+void SdPage::SetOrientation( Orientation /*eOrient*/)
{
- meOrientation = eOrient;
+ // Do nothing
}
Orientation SdPage::GetOrientation() const
{
- return meOrientation;
+ Size aSize = GetSize();
+ if ( aSize.getWidth() > aSize.getHeight() )
+ {
+ return Orientation::Landscape;
+ }
+ else
+ {
+ return Orientation::Portrait;
+ }
}
/*************************************************************************
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 21903145ea61..deab43fa74fa 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -397,7 +397,6 @@ SdPage::SdPage(const SdPage& rSrcPage)
mbBackgroundFullSize = rSrcPage.mbBackgroundFullSize;
meCharSet = rSrcPage.meCharSet;
mnPaperBin = rSrcPage.mnPaperBin;
- meOrientation = rSrcPage.meOrientation;
mpPageLink = nullptr; // is set when inserting via ConnectLink()
@@ -573,9 +572,9 @@ bool SdPage::Equals(const SdPage& rOtherPage) const
mbLoopSound == rOtherPage.mbLoopSound && mbStopSound == rOtherPage.mbStopSound &&
maBookmarkName == rOtherPage.maBookmarkName && mbScaleObjects == rOtherPage.mbScaleObjects &&
mbBackgroundFullSize == rOtherPage.mbBackgroundFullSize && meCharSet == rOtherPage.meCharSet &&
- mnPaperBin == rOtherPage.mnPaperBin && meOrientation == rOtherPage.meOrientation &&
- mnTransitionType == rOtherPage.mnTransitionType && mnTransitionSubtype == rOtherPage.mnTransitionSubtype &&
- mbTransitionDirection == rOtherPage.mbTransitionDirection && mnTransitionFadeColor == rOtherPage.mnTransitionFadeColor &&
+ mnPaperBin == rOtherPage.mnPaperBin && mnTransitionType == rOtherPage.mnTransitionType &&
+ mnTransitionSubtype == rOtherPage.mnTransitionSubtype && mbTransitionDirection == rOtherPage.mbTransitionDirection &&
+ mnTransitionFadeColor == rOtherPage.mnTransitionFadeColor &&
rtl::math::approxEqual(mfTransitionDuration, rOtherPage.mfTransitionDuration));
}
More information about the Libreoffice-commits
mailing list