summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/core/PageListWatcher.cxx6
-rw-r--r--sd/source/core/drawdoc.cxx3
-rw-r--r--sd/source/core/drawdoc4.cxx2
-rw-r--r--sd/source/core/sdpage.cxx13
-rw-r--r--sd/source/core/sdpage2.cxx2
-rw-r--r--sd/source/core/stlpool.cxx6
-rw-r--r--sd/source/core/stlsheet.cxx33
-rw-r--r--sd/source/filter/eppt/epptooxml.hxx6
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx59
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx6
-rw-r--r--sd/source/filter/pdf/sdpdffilter.cxx3
-rw-r--r--sd/source/filter/ppt/propread.cxx25
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx40
-rw-r--r--sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx2
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx16
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx2
-rw-r--r--sd/source/ui/app/sdmod1.cxx2
-rw-r--r--sd/source/ui/app/sdmod2.cxx33
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx4
-rw-r--r--sd/source/ui/dlg/BulletAndPositionDlg.cxx18
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx30
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx21
-rw-r--r--sd/source/ui/dlg/dlgfield.cxx2
-rw-r--r--sd/source/ui/dlg/dlgolbul.cxx2
-rw-r--r--sd/source/ui/dlg/filedlg.cxx11
-rw-r--r--sd/source/ui/dlg/paragr.cxx12
-rw-r--r--sd/source/ui/dlg/prltempl.cxx17
-rw-r--r--sd/source/ui/dlg/sddlgfact.cxx11
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx7
-rw-r--r--sd/source/ui/dlg/tpaction.cxx6
-rw-r--r--sd/source/ui/docshell/docshel4.cxx2
-rw-r--r--sd/source/ui/func/fubullet.cxx2
-rw-r--r--sd/source/ui/func/fuchar.cxx2
-rw-r--r--sd/source/ui/func/fuconcs.cxx2
-rw-r--r--sd/source/ui/func/fucopy.cxx6
-rw-r--r--sd/source/ui/func/fucushow.cxx28
-rw-r--r--sd/source/ui/func/fuexpand.cxx2
-rw-r--r--sd/source/ui/func/fuinsert.cxx2
-rw-r--r--sd/source/ui/func/fuinsfil.cxx1
-rw-r--r--sd/source/ui/func/fumorph.cxx2
-rw-r--r--sd/source/ui/func/fuoaprms.cxx2
-rw-r--r--sd/source/ui/func/fuolbull.cxx15
-rw-r--r--sd/source/ui/func/fupage.cxx64
-rw-r--r--sd/source/ui/func/fuparagr.cxx2
-rw-r--r--sd/source/ui/func/fuprlout.cxx2
-rw-r--r--sd/source/ui/func/fuprobjs.cxx2
-rw-r--r--sd/source/ui/func/fuscale.cxx2
-rw-r--r--sd/source/ui/func/fusel.cxx17
-rw-r--r--sd/source/ui/func/fusldlg.cxx3
-rw-r--r--sd/source/ui/func/fusnapln.cxx2
-rw-r--r--sd/source/ui/func/fusumry.cxx2
-rw-r--r--sd/source/ui/func/futext.cxx14
-rw-r--r--sd/source/ui/func/futransf.cxx2
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx5
-rw-r--r--sd/source/ui/inc/RemoteServer.hxx3
-rw-r--r--sd/source/ui/inc/custsdlg.hxx3
-rw-r--r--sd/source/ui/inc/slideshow.hxx3
-rw-r--r--sd/source/ui/remotecontrol/BufferedStreamSocket.cxx4
-rw-r--r--sd/source/ui/remotecontrol/BufferedStreamSocket.hxx5
-rw-r--r--sd/source/ui/remotecontrol/Communicator.cxx13
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx138
-rw-r--r--sd/source/ui/remotecontrol/Transmitter.cxx30
-rw-r--r--sd/source/ui/remotecontrol/Transmitter.hxx15
-rw-r--r--sd/source/ui/sidebar/AllMasterPagesSelector.cxx2
-rw-r--r--sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx2
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx6
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx8
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.hxx4
-rw-r--r--sd/source/ui/sidebar/RecentMasterPagesSelector.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx7
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx2
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx2
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx5
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx4
-rw-r--r--sd/source/ui/unoidl/unopback.cxx10
-rw-r--r--sd/source/ui/unoidl/unosrch.cxx6
-rw-r--r--sd/source/ui/view/GraphicObjectBar.cxx2
-rw-r--r--sd/source/ui/view/ViewShellManager.cxx2
-rw-r--r--sd/source/ui/view/drtxtob.cxx9
-rw-r--r--sd/source/ui/view/drtxtob1.cxx8
-rw-r--r--sd/source/ui/view/drviews2.cxx22
-rw-r--r--sd/source/ui/view/drviews3.cxx27
-rw-r--r--sd/source/ui/view/drviews4.cxx9
-rw-r--r--sd/source/ui/view/drviews7.cxx11
-rw-r--r--sd/source/ui/view/drviewse.cxx4
-rw-r--r--sd/source/ui/view/drviewsf.cxx6
-rw-r--r--sd/source/ui/view/drviewsi.cxx4
-rw-r--r--sd/source/ui/view/drviewsj.cxx3
-rw-r--r--sd/source/ui/view/outlnvsh.cxx4
-rw-r--r--sd/source/ui/view/outlview.cxx4
-rw-r--r--sd/source/ui/view/sdview.cxx15
-rw-r--r--sd/source/ui/view/sdview3.cxx4
-rw-r--r--sd/source/ui/view/sdview4.cxx2
-rw-r--r--sd/source/ui/view/sdwindow.cxx15
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx8
-rw-r--r--sd/source/ui/view/viewshel.cxx3
97 files changed, 515 insertions, 506 deletions
diff --git a/sd/source/core/PageListWatcher.cxx b/sd/source/core/PageListWatcher.cxx
index 322d592f2b2d..c3d8846fc77f 100644
--- a/sd/source/core/PageListWatcher.cxx
+++ b/sd/source/core/PageListWatcher.cxx
@@ -92,7 +92,7 @@ SdPage* ImpPageListWatcher::GetSdPage(PageKind ePgKind, sal_uInt32 nPgNum)
pRetval = maPageVectorStandard[nPgNum];
else
{
- SAL_WARN( "sd.core",
+ SAL_INFO( "sd.core",
"ImpPageListWatcher::GetSdPage(PageKind::Standard): page number " << nPgNum << " >= " << maPageVectorStandard.size() );
}
break;
@@ -103,14 +103,14 @@ SdPage* ImpPageListWatcher::GetSdPage(PageKind ePgKind, sal_uInt32 nPgNum)
pRetval = maPageVectorNotes[nPgNum];
else
{
- SAL_WARN( "sd.core",
+ SAL_INFO( "sd.core",
"ImpPageListWatcher::GetSdPage(PageKind::Notes): page number " << nPgNum << " >= " << maPageVectorNotes.size() );
}
break;
}
case PageKind::Handout:
{
-// #11420# for models used to transfer drawing shapes via clipboard it's ok to not have a handout page
+ // #11420# for models used to transfer drawing shapes via clipboard it's ok to not have a handout page
DBG_ASSERT(nPgNum == 0, "ImpPageListWatcher::GetSdPage: access to non existing handout page (!)");
if (nPgNum == 0)
pRetval = mpHandoutPage;
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 4e7c6c5dbd88..baf1d57fea18 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -109,7 +109,8 @@ PresentationSettings::PresentationSettings()
mbFullScreen( true ),
mbAnimationAllowed( true ),
mnPauseTimeout( 0 ),
- mbShowPauseLogo( false )
+ mbShowPauseLogo( false ),
+ mbStartCustomShow( false )
{
}
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index e3d7080f953b..e078afc58b54 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -1268,7 +1268,7 @@ void SdDrawDocument::SetTextDefaults() const
aNumRule.SetLevel( i, aNumberFormat );
}
- SvxNumBulletItem aNumBulletItem( aNumRule, EE_PARA_NUMBULLET );
+ SvxNumBulletItem aNumBulletItem( std::move(aNumRule), EE_PARA_NUMBULLET );
m_pItemPool->SetPoolDefaultItem( aNumBulletItem );
}
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index aaf209a63fe8..38b0308bf667 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -63,6 +63,7 @@
#include <sal/log.hxx>
#include <o3tl/enumarray.hxx>
#include <o3tl/safeint.hxx>
+#include <o3tl/sorted_vector.hxx>
#include <xmloff/autolayout.hxx>
#include <Outliner.hxx>
@@ -1089,7 +1090,7 @@ void SdPage::DestroyDefaultPresObj(PresObjKind eObjKind)
const char* sPageKind = PageKindVector[mePageKind];
if (mePageKind == PageKind::Standard)
- {
+ {
getPresObjProp( *this , "PRESOBJ_TITLE" ,sPageKind, propvalue);
aTitlePos.AdjustX(::tools::Long( aTitleSize.Width() * propvalue[2] ) );
aTitlePos.AdjustY(::tools::Long( aTitleSize.Height() * propvalue[3] ) );
@@ -1560,7 +1561,7 @@ static void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDe
}
}
}
- }
+ }
}
break;
case PresObjKind::Chart:
@@ -2105,7 +2106,7 @@ static SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourc
}
// Remove LRSpace item
- SfxItemSet aSet(rModel.GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
+ SfxItemSet aSet(rModel.GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE> );
aSet.Put(pNewObj->GetMergedItemSet());
@@ -2142,7 +2143,7 @@ static SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourc
pNewObj->SetEmptyPresObj(false);
// reset left indent
- SfxItemSet aSet(rModel.GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
+ SfxItemSet aSet(rModel.GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE> );
aSet.Put(pNewObj->GetMergedItemSet());
@@ -2892,7 +2893,7 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj )
bool bVertical = false;
OutlinerParaObject* pOldPara = pTextObj->GetOutlinerParaObject();
if( pOldPara )
- bVertical = pOldPara->IsVertical(); // is old para object vertical?
+ bVertical = pOldPara->IsEffectivelyVertical(); // is old para object vertical?
SetObjText( pTextObj, nullptr, ePresObjKind, aString );
@@ -2903,7 +2904,7 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj )
// AutoGrowWidth/Height items still exist in the
// not changed object.
if(pTextObj->GetOutlinerParaObject()
- && pTextObj->GetOutlinerParaObject()->IsVertical() != bVertical)
+ && pTextObj->GetOutlinerParaObject()->IsEffectivelyVertical() != bVertical)
{
::tools::Rectangle aObjectRect = pTextObj->GetSnapRect();
pTextObj->GetOutlinerParaObject()->SetVertical(bVertical);
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 1277d1297cb0..29f1dc8d14d7 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -448,7 +448,7 @@ SfxStyleSheet* SdPage::GetTextStyleSheetForObject( SdrObject* pObj ) const
SfxItemSet* SdPage::getOrCreateItems()
{
if( mpItems == nullptr )
- mpItems = std::make_unique<SfxItemSet>( getSdrModelFromSdrPage().GetItemPool(), svl::Items<SDRATTR_XMLATTRIBUTES, SDRATTR_XMLATTRIBUTES>{} );
+ mpItems = std::make_unique<SfxItemSet>( getSdrModelFromSdrPage().GetItemPool(), svl::Items<SDRATTR_XMLATTRIBUTES, SDRATTR_XMLATTRIBUTES> );
return mpItems.get();
}
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index d6256bd6f9ae..d15aaf632b04 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -1095,7 +1095,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumRule.SetLevel( i, aNumberFormat );
}
- rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
+ rSet.Put( SvxNumBulletItem( std::move(aNumRule), EE_PARA_NUMBULLET ) );
static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxHint( SfxHintId::DataChanged ) );
}
break;
@@ -1127,7 +1127,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumRule.SetLevel(i, aFrmt);
}
- rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
+ rSet.Put( SvxNumBulletItem( std::move(aNumRule), EE_PARA_NUMBULLET ) );
static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxHint( SfxHintId::DataChanged ) );
}
}
@@ -1151,7 +1151,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumRule.SetLevel( i, aNumberFormat );
}
- rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
+ rSet.Put( SvxNumBulletItem( std::move(aNumRule), EE_PARA_NUMBULLET ) );
static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxHint( SfxHintId::DataChanged ) );
}
break;
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 5b79e7333176..9f87290c52f2 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -18,10 +18,12 @@
*/
#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/style/XStyle.hpp>
#include <com/sun/star/table/BorderLine.hpp>
+#include <com/sun/star/text/XTextColumns.hpp>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
@@ -32,6 +34,7 @@
#include <editeng/fhgtitem.hxx>
#include <editeng/ulspitem.hxx>
#include <svl/hint.hxx>
+#include <svl/intitem.hxx>
#include <svl/itemset.hxx>
#include <svx/xflbmtit.hxx>
@@ -41,6 +44,7 @@
#include <svx/unoshprp.hxx>
#include <svx/unoshape.hxx>
#include <svx/svdpool.hxx>
+#include <svx/sdmetitm.hxx>
#include <svx/sdtaaitm.hxx>
#include <svx/sdtacitm.hxx>
#include <svx/sdtayitm.hxx>
@@ -216,7 +220,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_WORDWRAP,
SDRATTR_EDGE_FIRST, SDRATTR_MEASURE_LAST,
SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
- EE_PARA_START, EE_CHAR_END>{});
+ EE_PARA_START, EE_CHAR_END>);
bMySet = true;
}
@@ -236,7 +240,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_XMLATTRIBUTES,
SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_WORDWRAP,
SDRATTR_TABLE_FIRST, SDRATTR_TABLE_LAST,
- EE_PARA_START, EE_CHAR_END>{});
+ EE_PARA_START, EE_CHAR_END>);
bMySet = true;
}
@@ -267,7 +271,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_WORDWRAP,
SDRATTR_EDGE_FIRST, SDRATTR_MEASURE_LAST,
SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
- EE_PARA_START, EE_CHAR_END>{});
+ EE_PARA_START, EE_CHAR_END>);
bMySet = true;
}
@@ -1003,7 +1007,24 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con
throw IllegalArgumentException();
}
- SfxItemSet aSet( GetPool()->GetPool(), {{pEntry->nWID, pEntry->nWID}});
+ if (pEntry->nWID == OWN_ATTR_TEXTCOLUMNS)
+ {
+ if (css::uno::Reference<css::text::XTextColumns> xColumns; aValue >>= xColumns)
+ {
+ rStyleSet.Put(SfxInt16Item(SDRATTR_TEXTCOLUMNS_NUMBER, xColumns->getColumnCount()));
+ if (css::uno::Reference<css::beans::XPropertySet> xPropSet{ xColumns,
+ css::uno::UNO_QUERY })
+ {
+ auto aVal = xPropSet->getPropertyValue("AutomaticDistance");
+ if (sal_Int32 nSpacing; aVal >>= nSpacing)
+ rStyleSet.Put(SdrMetricItem(SDRATTR_TEXTCOLUMNS_SPACING, nSpacing));
+ }
+ return;
+ }
+ throw IllegalArgumentException();
+ }
+
+ SfxItemSet aSet( GetPool()->GetPool(), pEntry->nWID, pEntry->nWID);
aSet.Put( rStyleSet );
if( !aSet.Count() )
@@ -1109,7 +1130,7 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName )
}
else
{
- SfxItemSet aSet( GetPool()->GetPool(), {{pEntry->nWID, pEntry->nWID}});
+ SfxItemSet aSet( GetPool()->GetPool(), pEntry->nWID, pEntry->nWID);
const SfxPoolItem* pItem;
SfxItemSet& rStyleSet = GetItemSet();
@@ -1307,7 +1328,7 @@ Any SAL_CALL SdStyleSheet::getPropertyDefault( const OUString& aPropertyName )
else
{
SfxItemPool& rMyPool = GetPool()->GetPool();
- SfxItemSet aSet( rMyPool, {{pEntry->nWID, pEntry->nWID}});
+ SfxItemSet aSet( rMyPool, pEntry->nWID, pEntry->nWID);
aSet.Put( rMyPool.GetDefaultItem( pEntry->nWID ) );
aRet = SvxItemPropertySet_getPropertyValue( pEntry, aSet );
}
diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx
index 8643ff58e841..82bb6a3ab937 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -123,7 +123,7 @@ private:
@param rXShape Master placeholder shape
@returns Placeholder index
*/
- unsigned CreateNewPlaceholderIndex(const css::uno::Reference<css::drawing::XShape>& rXShape);
+ sal_Int32 CreateNewPlaceholderIndex(const css::uno::Reference<css::drawing::XShape>& rXShape);
css::uno::Reference<css::drawing::XShape> GetReferencedPlaceholderXShape(const PlaceholderType eType, PageType ePageType) const;
void WritePlaceholderReferenceShapes(PowerPointShapeExport& rDML, PageType ePageType);
@@ -151,9 +151,9 @@ private:
::oox::drawingml::ShapeExport::ShapeHashMap maShapeMap;
- unsigned mnPlaceholderIndexMax; ///< Last used placeholder index
+ sal_Int32 mnPlaceholderIndexMax; ///< Last used placeholder index
/// Map of placeholder indexes for Master placeholders
- std::unordered_map< css::uno::Reference<css::drawing::XShape>, unsigned > maPlaceholderShapeToIndexMap;
+ std::unordered_map< css::uno::Reference<css::drawing::XShape>, sal_Int32 > maPlaceholderShapeToIndexMap;
struct AuthorComments {
sal_Int32 nId;
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 18356f1ec595..4ee219d2a38c 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -121,7 +121,7 @@ public:
ShapeExport& WriteUnknownShape(const Reference< XShape >& xShape) override;
ShapeExport& WritePlaceholderShape(const Reference< XShape >& xShape, PlaceholderType ePlaceholder);
/** Writes a placeholder shape that references the placeholder on the master slide */
- ShapeExport& WritePlaceholderReferenceShape(PlaceholderType ePlaceholder, unsigned nReferencedPlaceholderIdx, PageType ePageType, Reference<XPropertySet>& rXPagePropSet);
+ ShapeExport& WritePlaceholderReferenceShape(PlaceholderType ePlaceholder, sal_Int32 nReferencedPlaceholderIdx, PageType ePageType, Reference<XPropertySet>& rXPagePropSet);
ShapeExport& WritePageShape(const Reference< XShape >& xShape, PageType ePageType, bool bPresObj);
/** Writes textbody of a placeholder that references the placeholder on the master slide */
ShapeExport& WritePlaceholderReferenceTextBody(PlaceholderType ePlaceholder, PageType ePageType, const Reference<XPropertySet> xPagePropSet);
@@ -1104,6 +1104,7 @@ void PowerPointExport::WritePresentationProps()
Reference<beans::XPropertySet> xPresentationProps(xPresentationSupplier->getPresentation(),
uno::UNO_QUERY);
bool bEndlessVal = xPresentationProps->getPropertyValue("IsEndless").get<bool>();
+ OUString sFirstPage = xPresentationProps->getPropertyValue("FirstPage").get<OUString>();
FSHelperPtr pFS = openFragmentStreamWithSerializer(
"ppt/presProps.xml",
@@ -1114,8 +1115,32 @@ void PowerPointExport::WritePresentationProps()
pFS->startElementNS(XML_p, XML_presentationPr, PPRNMSS);
- pFS->singleElementNS(XML_p, XML_showPr, XML_loop, sax_fastparser::UseIf("1", bEndlessVal),
- XML_showNarration, sax_fastparser::UseIf("1", bEndlessVal));
+ pFS->startElementNS(XML_p, XML_showPr, XML_loop, sax_fastparser::UseIf("1", bEndlessVal),
+ XML_showNarration, "1");
+
+ Reference<drawing::XDrawPagesSupplier> xDPS(mXModel, uno::UNO_QUERY_THROW);
+ Reference<drawing::XDrawPages> xDrawPages(xDPS->getDrawPages(), uno::UNO_SET_THROW);
+ if (!sFirstPage.isEmpty())
+ {
+ sal_Int32 nStartSlide = 1;
+ sal_Int32 nEndSlide = xDrawPages->getCount();
+ for (sal_Int32 i = 0; i < nEndSlide; i++)
+ {
+ Reference<drawing::XDrawPage> xDrawPage;
+ xDrawPages->getByIndex(i) >>= xDrawPage;
+ Reference<container::XNamed> xNamed(xDrawPage, uno::UNO_QUERY_THROW);
+ if (xNamed->getName() == sFirstPage)
+ {
+ nStartSlide = i + 1;
+ break;
+ }
+ }
+
+ pFS->singleElementNS(XML_p, XML_sldRg, XML_st, OUString::number(nStartSlide), XML_end,
+ OUString::number(nEndSlide));
+ }
+
+ pFS->endElementNS(XML_p, XML_showPr);
pFS->endElementNS(XML_p, XML_presentationPr);
}
@@ -1575,7 +1600,11 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap
}
else
{
- mpFS->singleElementNS(XML_p, XML_ph, XML_type, pType);
+ if ((mePageType == PageType::LAYOUT || mePageType == PageType::NORMAL)
+ && ePlaceholder == Outliner)
+ mpFS->singleElementNS(XML_p, XML_ph);
+ else
+ mpFS->singleElementNS(XML_p, XML_ph, XML_type, pType);
}
mpFS->endElementNS(XML_p, XML_nvPr);
mpFS->endElementNS(XML_p, XML_nvSpPr);
@@ -1607,7 +1636,7 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap
}
mpFS->endElementNS(XML_p, XML_spPr);
- WriteTextBox(xShape, XML_p, bUsePlaceholderIndex);
+ WriteTextBox(xShape, XML_p, /*bWritePropertiesAsLstStyles=*/bUsePlaceholderIndex);
mpFS->endElementNS(XML_p, XML_sp);
@@ -1615,7 +1644,7 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap
}
ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceShape(
- PlaceholderType ePlaceholder, unsigned nReferencedPlaceholderIdx, PageType ePageType,
+ PlaceholderType ePlaceholder, sal_Int32 nReferencedPlaceholderIdx, PageType ePageType,
Reference<XPropertySet>& rXPagePropSet)
{
mpFS->startElementNS(XML_p, XML_sp);
@@ -1704,6 +1733,10 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody(
bool bIsDateTimeFixed = false;
xPagePropSet->getPropertyValue("IsDateTimeFixed") >>= bIsDateTimeFixed;
+ // Ideally "Date" should be replaced with the formatted date text
+ // but since variable datetime overrides the text, this seems fine for now.
+ OUString aDateTimeText = "Date";
+
if(ePageType != LAYOUT && !bIsDateTimeFixed)
{
sal_Int32 nDateTimeFormat = 0;
@@ -1723,18 +1756,18 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody(
{
OString aUUID(comphelper::xml::generateGUIDString());
mpFS->startElementNS(XML_a, XML_fld, XML_id, aUUID.getStr(), XML_type, aDateTimeType);
- mpFS->endElementNS(XML_a, XML_fld);
}
else
{
- OUString aDateTimeText;
xPagePropSet->getPropertyValue("DateTimeText") >>= aDateTimeText;
mpFS->startElementNS(XML_a, XML_r);
- mpFS->startElementNS(XML_a, XML_t);
- mpFS->writeEscaped(aDateTimeText);
- mpFS->endElementNS(XML_a, XML_t);
- mpFS->endElementNS(XML_a, XML_r);
}
+
+ mpFS->startElementNS(XML_a, XML_t);
+ mpFS->writeEscaped(aDateTimeText);
+ mpFS->endElementNS(XML_a, XML_t);
+
+ mpFS->endElementNS(XML_a, bIsDateTimeFixed ? XML_r : XML_fld);
break;
}
default:
@@ -2274,7 +2307,7 @@ void PowerPointExport::WritePlaceholderReferenceShapes(PowerPointShapeExport& rD
}
}
-unsigned PowerPointExport::CreateNewPlaceholderIndex(const css::uno::Reference<XShape> &rXShape)
+sal_Int32 PowerPointExport::CreateNewPlaceholderIndex(const css::uno::Reference<XShape> &rXShape)
{
maPlaceholderShapeToIndexMap.insert({rXShape, mnPlaceholderIndexMax});
return mnPlaceholderIndexMax++;
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 32ef963e1ed6..ebceaee3b10a 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -149,7 +149,7 @@ bool SdGRFFilter::Import()
ErrCode nReturn = pIStm ? rGraphicFilter.ImportGraphic( aGraphic, aFileName, *pIStm, nFilter ) : ErrCode(1);
if( nReturn )
- HandleGraphicFilterError( nReturn, rGraphicFilter.GetLastError().nStreamError );
+ HandleGraphicFilterError( nReturn, rGraphicFilter.GetLastError() );
else
{
if( mrDocument.GetPageCount() == 0 )
@@ -292,9 +292,9 @@ bool SdGRFFilter::Export()
if ( !bRet && xInteractionHandler.is() )
SdGRFFilter::HandleGraphicFilterError(
static_cast< SdGRFFilter_ImplInteractionHdl* >( xInteractionHandler.get() )->GetErrorCode(),
- rGraphicFilter.GetLastError().nStreamError );
+ rGraphicFilter.GetLastError() );
}
- }
+ }
}
}
return bRet;
diff --git a/sd/source/filter/pdf/sdpdffilter.cxx b/sd/source/filter/pdf/sdpdffilter.cxx
index efa0a0bce0b5..eb64897db853 100644
--- a/sd/source/filter/pdf/sdpdffilter.cxx
+++ b/sd/source/filter/pdf/sdpdffilter.cxx
@@ -77,12 +77,15 @@ bool SdPdfFilter::Import()
// Create the page and insert the Graphic.
SdPage* pPage = mrDocument.GetSdPage(nPageNumber, PageKind::Standard);
+ if (!pPage) // failed to duplicate page, out of memory?
+ return false;
// Make the page size match the rendered image.
pPage->SetSize(aSizeHMM);
SdrGrafObj* pSdrGrafObj = new SdrGrafObj(pPage->getSdrModelFromSdrPage(), rGraphic,
tools::Rectangle(Point(), aSizeHMM));
+
pSdrGrafObj->SetResizeProtect(true);
pSdrGrafObj->SetMoveProtect(true);
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 2a1b4e440178..c82c0d791dbd 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -579,20 +579,21 @@ void PropRead::Read()
{
mbStatus = false;
}
- else for ( sal_uInt32 i = 0; i < nSections; i++ )
- {
- mpSvStream->ReadBytes(aSectCLSID.data(), aSectCLSID.size());
- sal_uInt32 nSectionOfs(0);
- mpSvStream->ReadUInt32( nSectionOfs );
- sal_uInt32 nCurrent = mpSvStream->Tell();
- if (checkSeek(*mpSvStream, nSectionOfs))
+ else
+ for ( sal_uInt32 i = 0; i < nSections; i++ )
{
- Section aSection(aSectCLSID.data());
- aSection.Read(mpSvStream.get());
- maSections.push_back(std::make_unique<Section>(aSection));
+ mpSvStream->ReadBytes(aSectCLSID.data(), aSectCLSID.size());
+ sal_uInt32 nSectionOfs(0);
+ mpSvStream->ReadUInt32( nSectionOfs );
+ sal_uInt32 nCurrent = mpSvStream->Tell();
+ if (checkSeek(*mpSvStream, nSectionOfs))
+ {
+ Section aSection(aSectCLSID.data());
+ aSection.Read(mpSvStream.get());
+ maSections.push_back(std::make_unique<Section>(aSection));
+ }
+ mpSvStream->Seek( nCurrent );
}
- mpSvStream->Seek( nCurrent );
- }
}
PropRead& PropRead::operator=( const PropRead& rPropRead )
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 9a6e8d9a9afe..31257d66e3e9 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <officecfg/Office/Common.hxx>
#include <vcl/errinf.hxx>
#include <sal/log.hxx>
#include <com/sun/star/container/XChild.hpp>
@@ -668,41 +669,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
// clear unused named items from item pool
- uno::Reference< lang::XMultiServiceFactory> xModelFactory( mxModel, uno::UNO_QUERY );
- if( xModelFactory.is() )
- {
- try
- {
- static const OUStringLiteral aName(u"~clear~" );
- uno::Reference< container::XNameContainer > xGradient( xModelFactory->createInstance( "com.sun.star.drawing.GradientTable" ), uno::UNO_QUERY );
- if( xGradient.is() )
- xGradient->removeByName( aName );
-
- uno::Reference< container::XNameContainer > xHatch( xModelFactory->createInstance( "com.sun.star.drawing.HatchTable" ), uno::UNO_QUERY );
- if( xHatch.is() )
- xHatch->removeByName( aName );
-
- uno::Reference< container::XNameContainer > xBitmap( xModelFactory->createInstance( "com.sun.star.drawing.BitmapTable" ), uno::UNO_QUERY );
- if( xBitmap.is() )
- xBitmap->removeByName( aName );
-
- uno::Reference< container::XNameContainer > xTransGradient( xModelFactory->createInstance( "com.sun.star.drawing.TransparencyGradientTable" ), uno::UNO_QUERY );
- if( xTransGradient.is() )
- xTransGradient->removeByName( aName );
-
- uno::Reference< container::XNameContainer > xMarker( xModelFactory->createInstance( "com.sun.star.drawing.MarkerTable" ), uno::UNO_QUERY );
- if( xMarker.is() )
- xMarker->removeByName( aName );
-
- uno::Reference< container::XNameContainer > xDashes( xModelFactory->createInstance( "com.sun.star.drawing.DashTable" ), uno::UNO_QUERY );
- if( xDashes.is() )
- xDashes->removeByName( aName );
- }
- catch (const Exception&)
- {
- TOOLS_WARN_EXCEPTION( "sd.filter","sd::SdXMLFilter::Import(), exception during clearing of unused named items");
- }
- }
+ ::svx::DropUnusedNamedItems(mxModel);
// set BuildId on XModel for later OLE object loading
if( xInfoSet.is() )
@@ -819,8 +786,7 @@ bool SdXMLFilter::Export()
uno::Reference< beans::XPropertySet > xInfoSet( GenericPropertySet_CreateInstance( new PropertySetInfo( aExportInfoMap ) ) );
- SvtSaveOptions aSaveOpt;
- bool bUsePrettyPrinting( aSaveOpt.IsPrettyPrinting() );
+ bool bUsePrettyPrinting = officecfg::Office::Common::Save::Document::PrettyPrinting::get();
xInfoSet->setPropertyValue( "UsePrettyPrinting", makeAny( bUsePrettyPrinting ) );
const uno::Reference < embed::XStorage >& xStorage = mrMedium.GetOutputStorage();
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index a3915844078b..a1a79a67815f 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -191,7 +191,7 @@ namespace accessibility
if (aHint)
{
Broadcast(*aHint);
- }
+ }
}
} // end of namespace accessibility
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 0fc198a9c316..b3c3d4b44863 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -411,6 +411,8 @@ css::ui::LayoutSize SlideTransitionPane::GetHeightForWidth(const sal_Int32 /*nWi
return css::ui::LayoutSize(nMinimumHeight, -1, nMinimumHeight);
}
+constexpr sal_uInt16 nNoneId = std::numeric_limits<sal_uInt16>::max();
+
void SlideTransitionPane::Initialize(SdDrawDocument* pDoc)
{
mxFT_VARIANT = m_xBuilder->weld_label("variant_label");
@@ -445,7 +447,7 @@ void SlideTransitionPane::Initialize(SdDrawDocument* pDoc)
// dummy list box of slide transitions for startup.
mxVS_TRANSITION_ICONS->InsertItem(
- 0, Image( StockImage::Yes, "sd/cmd/transition-none.png" ),
+ nNoneId, Image( StockImage::Yes, "sd/cmd/transition-none.png" ),
SdResId( STR_SLIDETRANSITION_NONE ),
VALUESET_APPEND, /* show legend */ true );
mxVS_TRANSITION_ICONS->Recalculate();
@@ -566,14 +568,14 @@ void SlideTransitionPane::updateControls()
if( aEffect.mbEffectAmbiguous )
{
SAL_WARN( "sd.transitions", "Unusual, ambiguous transition effect" );
- mxVS_TRANSITION_ICONS->SetNoSelection();
+ mxVS_TRANSITION_ICONS->SelectItem(nNoneId);
}
else
{
// ToDo: That 0 is "no transition" is documented nowhere except in the
// CTOR of sdpage
if( aEffect.mnType == 0 )
- mxVS_TRANSITION_ICONS->SetNoSelection();
+ mxVS_TRANSITION_ICONS->SelectItem(nNoneId);
else
updateVariants( getPresetOffset( aEffect ) );
}
@@ -757,9 +759,11 @@ impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co
impl::TransitionEffect aResult;
aResult.setAllAmbiguous();
+ bool bNoneSelected = mxVS_TRANSITION_ICONS->IsNoSelection() || mxVS_TRANSITION_ICONS->GetSelectedItemId() == nNoneId;
+
// check first (aResult might be overwritten)
if( mxVS_TRANSITION_ICONSWin->get_sensitive() &&
- !mxVS_TRANSITION_ICONS->IsNoSelection() &&
+ !bNoneSelected &&
mxVS_TRANSITION_ICONS->GetSelectedItemId() > 0 )
{
const sd::TransitionPresetList& rPresetList = sd::TransitionPreset::getTransitionPresetList();
@@ -800,7 +804,7 @@ impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co
}
aResult.mbEffectAmbiguous = false;
}
- else if (mxVS_TRANSITION_ICONS->IsNoSelection())
+ else if (bNoneSelected)
{
aResult.mbEffectAmbiguous = false;
}
@@ -1007,7 +1011,7 @@ void SlideTransitionPane::updateVariants( size_t nPresetOffset )
{
const sd::TransitionPresetList& rPresetList = sd::TransitionPreset::getTransitionPresetList();
mxLB_VARIANT->clear();
- mxVS_TRANSITION_ICONS->SetNoSelection();
+ mxVS_TRANSITION_ICONS->SelectItem(nNoneId);
if( nPresetOffset >= rPresetList.size() )
{
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 95e7bfb4b901..6da902023f3c 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -703,7 +703,7 @@ void AnnotationManagerImpl::GetAnnotationState(SfxItemSet& rSet)
const bool bReadOnly = mrBase.GetDocShell()->IsReadOnly();
const bool bWrongPageKind = (pCurrentPage == nullptr) || (pCurrentPage->GetPageKind() != PageKind::Standard);
- const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFSaneDefaultVersion() );
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( GetODFSaneDefaultVersion() );
if (bReadOnly || bWrongPageKind || (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012))
rSet.DisableItem( SID_INSERT_POSTIT );
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 01d36ee93155..64a149a1334d 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -135,8 +135,8 @@ void SdModule::Execute(SfxRequest& rReq)
break;
default:
break;
- }
}
+ }
}
break;
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 0080a0db1c50..aaf21a621b62 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -421,7 +421,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
/**
* virtual methods for option dialog
*/
-std::unique_ptr<SfxItemSet> SdModule::CreateItemSet( sal_uInt16 nSlot )
+std::optional<SfxItemSet> SdModule::CreateItemSet( sal_uInt16 nSlot )
{
::sd::FrameView* pFrameView = nullptr;
::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() );
@@ -452,23 +452,23 @@ std::unique_ptr<SfxItemSet> SdModule::CreateItemSet( sal_uInt16 nSlot )
SfxItemPool& rPool = GetPool();
rPool.SetDefaultMetric( MapUnit::Map100thMM );
- auto pRet = std::make_unique<SfxItemSet>(
+ SfxItemSet aRet(
rPool,
svl::Items<
SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
SID_ATTR_METRIC, SID_ATTR_METRIC,
SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
- ATTR_OPTIONS_LAYOUT, ATTR_OPTIONS_SCALE_END>{});
+ ATTR_OPTIONS_LAYOUT, ATTR_OPTIONS_SCALE_END>);
// TP_OPTIONS_LAYOUT:
- pRet->Put( SdOptionsLayoutItem( pOptions, pFrameView ) );
+ aRet.Put( SdOptionsLayoutItem( pOptions, pFrameView ) );
sal_uInt16 nDefTab = 0;
if( pFrameView)
nDefTab = pDoc->GetDefaultTabulator();
else
nDefTab = pOptions->GetDefTab();
- pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, nDefTab ) );
+ aRet.Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, nDefTab ) );
FieldUnit nMetric = FieldUnit(0xffff);
if( pFrameView)
@@ -479,7 +479,7 @@ std::unique_ptr<SfxItemSet> SdModule::CreateItemSet( sal_uInt16 nSlot )
if( nMetric == FieldUnit(0xffff) )
nMetric = GetFieldUnit();
- pRet->Put( SfxUInt16Item( SID_ATTR_METRIC, static_cast<sal_uInt16>(nMetric) ) );
+ aRet.Put( SfxUInt16Item( SID_ATTR_METRIC, static_cast<sal_uInt16>(nMetric) ) );
// TP_OPTIONS_MISC:
SdOptionsMiscItem aSdOptionsMiscItem( pOptions, pFrameView );
@@ -489,10 +489,10 @@ std::unique_ptr<SfxItemSet> SdModule::CreateItemSet( sal_uInt16 nSlot )
aSdOptionsMiscItem.GetOptionsMisc().SetPrinterIndependentLayout (
static_cast<sal_uInt16>(pDoc->GetPrinterIndependentLayout()));
}
- pRet->Put( aSdOptionsMiscItem );
+ aRet.Put( aSdOptionsMiscItem );
// TP_OPTIONS_SNAP:
- pRet->Put( SdOptionsSnapItem( pOptions, pFrameView ) );
+ aRet.Put( SdOptionsSnapItem( pOptions, pFrameView ) );
// TP_SCALE:
sal_uInt32 nW = 10;
@@ -519,19 +519,20 @@ std::unique_ptr<SfxItemSet> SdModule::CreateItemSet( sal_uInt16 nSlot )
pOptions->GetScale( nX, nY );
}
- pRet->Put( SfxInt32Item( ATTR_OPTIONS_SCALE_X, nX ) );
- pRet->Put( SfxInt32Item( ATTR_OPTIONS_SCALE_Y, nY ) );
- pRet->Put( SfxUInt32Item( ATTR_OPTIONS_SCALE_WIDTH, nW ) );
- pRet->Put( SfxUInt32Item( ATTR_OPTIONS_SCALE_HEIGHT, nH ) );
+ aRet.Put( SfxInt32Item( ATTR_OPTIONS_SCALE_X, nX ) );
+ aRet.Put( SfxInt32Item( ATTR_OPTIONS_SCALE_Y, nY ) );
+ aRet.Put( SfxUInt32Item( ATTR_OPTIONS_SCALE_WIDTH, nW ) );
+ aRet.Put( SfxUInt32Item( ATTR_OPTIONS_SCALE_HEIGHT, nH ) );
// TP_OPTIONS_PRINT:
- pRet->Put( SdOptionsPrintItem( pOptions ) );
+ aRet.Put( SdOptionsPrintItem( pOptions ) );
// RID_SVXPAGE_GRID:
- pRet->Put( SdOptionsGridItem( pOptions ) );
+ aRet.Put( SdOptionsGridItem( pOptions ) );
- return pRet;
+ return aRet;
}
+
void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
{
const SfxPoolItem* pItem = nullptr;
@@ -629,7 +630,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
SfxItemSet aPrintSet( GetPool(),
svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT>{} );
+ ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT> );
// Print
const SdOptionsPrintItem* pPrintItem = nullptr;
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 1fcef5fa98de..989dd9493db5 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -26,6 +26,7 @@
#include <vcl/toolbox.hxx>
#include <svl/languageoptions.hxx>
+#include <svl/cjkoptions.hxx>
#include <svtools/toolbarmenu.hxx>
#include <svtools/valueset.hxx>
@@ -180,8 +181,7 @@ LayoutToolbarMenu::LayoutToolbarMenu(SlideLayoutController* pControl, weld::Widg
OSL_ASSERT(false);
}
- SvtLanguageOptions aLanguageOptions;
- const bool bVerticalEnabled = aLanguageOptions.IsVerticalTextEnabled();
+ const bool bVerticalEnabled = SvtCJKOptions().IsVerticalTextEnabled();
mxLayoutSet1->SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectValueSetHdl ) );
diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index fb798956e4ef..fe6ecf9ee52a 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -716,8 +716,7 @@ IMPL_LINK(SvxBulletAndPositionDlg, NumberTypeSelectHdl_Impl, weld::ComboBox&, rB
{
bBmp |= nullptr != aNumFmt.GetBrush();
aNumFmt.SetIncludeUpperLevels(0);
- aNumFmt.SetSuffix("");
- aNumFmt.SetPrefix("");
+ aNumFmt.SetListFormat("", "", i);
if (!bBmp)
aNumFmt.SetGraphic("");
pActNum->SetLevel(i, aNumFmt);
@@ -726,8 +725,7 @@ IMPL_LINK(SvxBulletAndPositionDlg, NumberTypeSelectHdl_Impl, weld::ComboBox&, rB
else if (SVX_NUM_CHAR_SPECIAL == nNumberingType)
{
aNumFmt.SetIncludeUpperLevels(0);
- aNumFmt.SetSuffix("");
- aNumFmt.SetPrefix("");
+ aNumFmt.SetListFormat("", "", i);
if (!aNumFmt.GetBulletFont())
aNumFmt.SetBulletFont(&aActBulletFont);
if (!aNumFmt.GetBulletChar())
@@ -738,8 +736,7 @@ IMPL_LINK(SvxBulletAndPositionDlg, NumberTypeSelectHdl_Impl, weld::ComboBox&, rB
}
else
{
- aNumFmt.SetPrefix(m_xPrefixED->get_text());
- aNumFmt.SetSuffix(m_xSuffixED->get_text());
+ aNumFmt.SetListFormat(m_xPrefixED->get_text(), m_xSuffixED->get_text(), i);
SwitchNumberType(SHOW_NUMBERING);
pActNum->SetLevel(i, aNumFmt);
CheckForStartValue_Impl(nNumberingType);
@@ -1233,8 +1230,7 @@ IMPL_LINK(SvxBulletAndPositionDlg, RelativeHdl_Impl, weld::Toggleable&, rBox, vo
void SvxBulletAndPositionDlg::EditModifyHdl_Impl(const weld::Entry* pEdit)
{
- bool bPrefix = pEdit == m_xPrefixED.get();
- bool bSuffix = pEdit == m_xSuffixED.get();
+ bool bPrefixOrSuffix = (pEdit == m_xPrefixED.get()) || (pEdit == m_xSuffixED.get());
bool bStart = pEdit == m_xStartED.get();
sal_uInt16 nMask = 1;
for (sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
@@ -1242,10 +1238,8 @@ void SvxBulletAndPositionDlg::EditModifyHdl_Impl(const weld::Entry* pEdit)
if (nActNumLvl & nMask)
{
SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
- if (bPrefix)
- aNumFmt.SetPrefix(m_xPrefixED->get_text());
- else if (bSuffix)
- aNumFmt.SetSuffix(m_xSuffixED->get_text());
+ if (bPrefixOrSuffix)
+ aNumFmt.SetListFormat(m_xPrefixED->get_text(), m_xSuffixED->get_text(), i);
else if (bStart)
aNumFmt.SetStart(m_xStartED->get_value());
pActNum->SetLevel(i, aNumFmt);
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 14e43dd75229..9c00afe4cdc4 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -20,7 +20,6 @@
#include <unotools/pathoptions.hxx>
#include <unotools/ucbstreamhelper.hxx>
-#include <officecfg/Office/Impress.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -500,35 +499,16 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl, weld::Button&, void)
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_PREVIEW,
FileDialogFlags::Graphic | FileDialogFlags::MultiSelection, m_xDialog.get());
- // Read configuration
- OUString sUrl(officecfg::Office::Impress::Pictures::Path::get());
-
- INetURLObject aFile( SvtPathOptions().GetUserConfigPath() );
- if (!sUrl.isEmpty())
- aDlg.SetDisplayDirectory(sUrl);
- else
- aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
+ aDlg.SetContext(sfx2::FileDialogHelper::ImpressPhotoDialog);
if ( aDlg.Execute() == ERRCODE_NONE )
{
const Sequence< OUString > aFilesArr = aDlg.GetSelectedFiles();
- if( aFilesArr.hasElements() )
+ for ( const auto& rFile : aFilesArr )
{
- sUrl = aDlg.GetDisplayDirectory();
- // Write out configuration
- {
- std::shared_ptr< comphelper::ConfigurationChanges > batch(
- comphelper::ConfigurationChanges::create());
- officecfg::Office::Impress::Pictures::Path::set(sUrl, batch);
- batch->commit();
- }
-
- for ( const auto& rFile : aFilesArr )
- {
- // Store full path, show filename only. Use INetURLObject to display spaces in filename correctly
- INetURLObject aUrl(rFile);
- m_xImagesLst->append(aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE), aUrl.GetLastName(INetURLObject::DecodeMechanism::WithCharset), "");
- }
+ // Store full path, show filename only. Use INetURLObject to display spaces in filename correctly
+ INetURLObject aUrl(rFile);
+ m_xImagesLst->append(aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE), aUrl.GetLastName(INetURLObject::DecodeMechanism::WithCharset), "");
}
}
EnableDisableButtons();
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index afa9e0be21be..db2414a51fa2 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -38,7 +38,6 @@ SdCustomShowDlg::SdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc
, pCustomShowList(nullptr)
, bModified(false)
, m_xLbCustomShows(m_xBuilder->weld_tree_view("customshowlist"))
- , m_xCbxUseCustomShow(m_xBuilder->weld_check_button("usecustomshows"))
, m_xBtnNew(m_xBuilder->weld_button("new"))
, m_xBtnEdit(m_xBuilder->weld_button("edit"))
, m_xBtnRemove(m_xBuilder->weld_button("delete"))
@@ -55,7 +54,6 @@ SdCustomShowDlg::SdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc
m_xBtnEdit->connect_clicked( aLink );
m_xBtnRemove->connect_clicked( aLink );
m_xBtnCopy->connect_clicked( aLink );
- m_xCbxUseCustomShow->connect_toggled(LINK(this, SdCustomShowDlg, ToggleButtonHdl));
m_xLbCustomShows->connect_changed( LINK( this, SdCustomShowDlg, SelectListBoxHdl ) );
m_xBtnStartShow->connect_clicked( LINK( this, SdCustomShowDlg, StartShowHdl ) ); // for test
@@ -76,8 +74,6 @@ SdCustomShowDlg::SdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc
pCustomShowList->Seek( nPosToSelect );
}
- m_xCbxUseCustomShow->set_active(pCustomShowList && rDoc.getPresentationSettings().mbCustomShow);
-
CheckState();
}
@@ -93,18 +89,12 @@ void SdCustomShowDlg::CheckState()
m_xBtnEdit->set_sensitive( bEnable );
m_xBtnRemove->set_sensitive( bEnable );
m_xBtnCopy->set_sensitive( bEnable );
- m_xCbxUseCustomShow->set_sensitive( bEnable );
- m_xBtnStartShow->set_sensitive(true);
+ m_xBtnStartShow->set_sensitive(bEnable);
if (bEnable && pCustomShowList)
pCustomShowList->Seek( nPos );
}
-IMPL_LINK( SdCustomShowDlg, ToggleButtonHdl, weld::Toggleable&, r, void )
-{
- SelectHdl(&r);
-}
-
IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, weld::Button&, r, void )
{
SelectHdl(&r);
@@ -241,10 +231,6 @@ void SdCustomShowDlg::SelectHdl(void const *p)
bModified = true;
}
- else if( p == m_xCbxUseCustomShow.get() )
- {
- bModified = true;
- }
CheckState();
}
@@ -258,7 +244,10 @@ IMPL_LINK_NOARG(SdCustomShowDlg, StartShowHdl, weld::Button&, void)
// CheckState
bool SdCustomShowDlg::IsCustomShow() const
{
- return (m_xCbxUseCustomShow->get_sensitive() && m_xCbxUseCustomShow->get_active());
+ if (!pCustomShowList->empty())
+ return true;
+ else
+ return false;
}
// SdDefineCustomShowDlg
diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx
index dd8b4535d045..76d9eb2de9ea 100644
--- a/sd/source/ui/dlg/dlgfield.cxx
+++ b/sd/source/ui/dlg/dlgfield.cxx
@@ -281,7 +281,7 @@ IMPL_LINK_NOARG(SdModifyFieldDlg, LanguageChangeHdl, weld::ComboBox&, void)
SfxItemSet SdModifyFieldDlg::GetItemSet() const
{
- SfxItemSet aOutput( *m_aInputSet.GetPool(), svl::Items<EE_CHAR_LANGUAGE, EE_CHAR_LANGUAGE_CTL>{} );
+ SfxItemSet aOutput( *m_aInputSet.GetPool(), svl::Items<EE_CHAR_LANGUAGE, EE_CHAR_LANGUAGE_CTL> );
if (m_xLbLanguage->get_active_id_changed_from_saved())
{
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index e82768d7dfa4..c30b31ad3ba7 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -108,7 +108,7 @@ OutlineBulletDlg::OutlineBulletDlg(weld::Window* pParent, const SfxItemSet* pAtt
SvxNumRule aNewRule( rRule );
aNewRule.SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS );
- SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
+ SvxNumBulletItem aNewItem( std::move(aNewRule), EE_PARA_NUMBULLET );
m_aInputSet.Put(aNewItem);
}
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 05c4243dc539..a545f6dc946f 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -34,7 +34,6 @@
#include <filedlg.hxx>
#include <sdresid.hxx>
#include <strings.hrc>
-#include <officecfg/Office/Impress.hxx>
// ----------- SdFileDialog_Imp ---------------------------
@@ -214,6 +213,7 @@ SdOpenSoundFileDialog::SdOpenSoundFileDialog(weld::Window *pParent)
{
OUString aDescr = SdResId(STR_ALL_FILES);
mpImpl->AddFilter( aDescr, "*.*");
+ mpImpl->SetContext(sfx2::FileDialogHelper::DrawImpressOpenSound);
// setup filter
#if defined UNX
@@ -233,9 +233,6 @@ SdOpenSoundFileDialog::SdOpenSoundFileDialog(weld::Window *pParent)
aDescr = SdResId(STR_MIDI_FILE);
mpImpl->AddFilter( aDescr, "*.mid" );
#endif
-
- // Restore last selected path
- mpImpl->SetDisplayDirectory(officecfg::Office::Impress::Sound::Path::get());
}
SdOpenSoundFileDialog::~SdOpenSoundFileDialog()
@@ -249,12 +246,6 @@ ErrCode SdOpenSoundFileDialog::Execute()
OUString SdOpenSoundFileDialog::GetPath() const
{
- // Save last selected path
- std::shared_ptr<comphelper::ConfigurationChanges> batch(
- comphelper::ConfigurationChanges::create());
- officecfg::Office::Impress::Sound::Path::set(mpImpl->GetPath(), batch);
- batch->commit();
-
return mpImpl->GetPath();
}
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index 1dd236a50e47..35a5df67a2d5 100644
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -36,7 +36,7 @@ public:
SdParagraphNumTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
- static const sal_uInt16* GetRanges();
+ static WhichRangesContainer GetRanges();
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -68,15 +68,9 @@ std::unique_ptr<SfxTabPage> SdParagraphNumTabPage::Create(weld::Container* pPage
return std::make_unique<SdParagraphNumTabPage>(pPage, pController, *rAttrSet);
}
-const sal_uInt16* SdParagraphNumTabPage::GetRanges()
+WhichRangesContainer SdParagraphNumTabPage::GetRanges()
{
- static const sal_uInt16 aRange[] =
- {
- ATTR_PARANUMBERING_START, ATTR_PARANUMBERING_END,
- 0
- };
-
- return aRange;
+ return WhichRangesContainer(svl::Items<ATTR_PARANUMBERING_START, ATTR_PARANUMBERING_END>);
}
bool SdParagraphNumTabPage::FillItemSet( SfxItemSet* rSet )
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index a741d9ba39c4..8271b39608ba 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -51,28 +51,27 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg(SfxObjectShell const * pDocSh,
: SfxTabDialogController(pParent, "modules/sdraw/ui/drawprtldialog.ui", "DrawPRTLDialog")
, mpDocShell(pDocSh)
, ePO(_ePO)
- , aInputSet(*rStyleBase.GetItemSet().GetPool(), svl::Items<SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL>{})
+ , aInputSet(*rStyleBase.GetItemSet().GetPool(), svl::Items<SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL>)
{
const SfxItemSet* pOrgSet(&rStyleBase.GetItemSet());
if( IS_OUTLINE(ePO))
{
// Unfortunately, the Itemsets of our style sheets are not discrete...
- const sal_uInt16* pPtr = pOrgSet->GetRanges();
+ const WhichRangesContainer& pPtr = pOrgSet->GetRanges();
sal_uInt16 p1, p2;
- while( *pPtr )
+ for( sal_Int32 i = 0; i < pPtr.size(); ++i )
{
- p1 = pPtr[0];
- p2 = pPtr[1];
+ p1 = pPtr[i].first;
+ p2 = pPtr[i].second;
// first, we make it discrete
- while(pPtr[2] && (pPtr[2] - p2 == 1))
+ while(i < pPtr.size() - 1 && (pPtr[i+1].first - p2 == 1))
{
- p2 = pPtr[3];
- pPtr += 2;
+ p2 = pPtr[i+1].second;
+ ++i;
}
aInputSet.MergeRange( p1, p2 );
- pPtr += 2;
}
aInputSet.Put( rStyleBase.GetItemSet() );
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index f5ab2524cdb9..506b741e677d 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -240,11 +240,6 @@ OString AbstractCopyDlg_Impl::GetScreenshotId() const
return m_xDlg->get_help_id();
}
-bool AbstractSdCustomShowDlg_Impl::IsModified() const
-{
- return m_xDlg->IsModified();
-}
-
bool AbstractSdCustomShowDlg_Impl::IsCustomShow() const
{
return m_xDlg->IsCustomShow();
@@ -276,7 +271,7 @@ const SfxItemSet* SdAbstractTabController_Impl::GetOutputItemSet() const
return m_xDlg->GetOutputItemSet();
}
-const sal_uInt16* SdAbstractTabController_Impl::GetInputRanges(const SfxItemPool& pItem )
+WhichRangesContainer SdAbstractTabController_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return m_xDlg->GetInputRanges( pItem );
}
@@ -318,7 +313,7 @@ const SfxItemSet* AbstractBulletDialog_Impl::GetOutputItemSet() const
return static_cast< ::sd::OutlineBulletDlg*>(m_xDlg.get())->GetBulletOutputItemSet();
}
-const sal_uInt16* AbstractBulletDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+WhichRangesContainer AbstractBulletDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return m_xDlg->GetInputRanges(pItem);
}
@@ -354,7 +349,7 @@ const SfxItemSet* SdPresLayoutTemplateDlg_Impl::GetOutputItemSet() const
return m_xDlg->GetOutputItemSet();
}
-const sal_uInt16* SdPresLayoutTemplateDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
+WhichRangesContainer SdPresLayoutTemplateDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return m_xDlg->GetInputRanges( pItem );
}
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index c637eab5d6bc..5a8637586b8e 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -133,7 +133,6 @@ public:
{
}
virtual short Execute() override;
- virtual bool IsModified() const override ;
virtual bool IsCustomShow() const override ;
// screenshotting
@@ -153,7 +152,7 @@ public:
virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
virtual void SetCurPageId( const OString &rName ) override;
virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override;
+ virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
virtual void SetInputSet( const SfxItemSet* pInSet ) override;
virtual void SetText( const OUString& rStr ) override;
@@ -174,7 +173,7 @@ public:
virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
virtual void SetCurPageId( const OString& rName ) override;
virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override;
+ virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
virtual void SetInputSet( const SfxItemSet* pInSet ) override;
virtual void SetText( const OUString& rStr ) override;
@@ -195,7 +194,7 @@ public:
virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
virtual void SetCurPageId( const OString& rName ) override;
virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override;
+ virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
virtual void SetInputSet( const SfxItemSet* pInSet ) override;
virtual void SetText( const OUString& rStr ) override;
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 63fd24cb91aa..4cd0cf68af9d 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -401,11 +401,7 @@ void SdTPAction::OpenFileDialog()
sfx2::FileDialogHelper aFileDialog(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
FileDialogFlags::NONE, GetFrameWeld());
-
- if (bDocument && aFile.isEmpty())
- aFile = SvtPathOptions().GetWorkPath();
-
- aFileDialog.SetDisplayDirectory( aFile );
+ aFileDialog.SetContext(sfx2::FileDialogHelper::ImpressClickAction);
// The following is a workaround for #i4306#:
// The addition of the implicitly existing "all files"
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 8175c00892b3..18c48afd441f 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -97,7 +97,7 @@ SfxPrinter* DrawDocShell::GetPrinter(bool bCreate)
auto pSet = std::make_unique<SfxItemSet>( GetPool(),
svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT>{} );
+ ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT> );
// set PrintOptionsSet
SdOptionsPrintItem aPrintItem( SD_MOD()->GetSdOptions(mpDoc->GetDocumentType()) );
SfxFlagItem aFlagItem( SID_PRINTER_CHANGESTODOC );
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index 296a09ce3298..661b0cb69452 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -239,7 +239,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest const & rReq )
empty string). */
pOV->InsertText( "" );
- SfxItemSet aOldSet( mpDoc->GetPool(), svl::Items<EE_CHAR_FONTINFO, EE_CHAR_FONTINFO>{} );
+ SfxItemSet aOldSet( mpDoc->GetPool(), svl::Items<EE_CHAR_FONTINFO, EE_CHAR_FONTINFO> );
aOldSet.Put( pOV->GetAttribs() );
SfxUndoManager& rUndoMgr = pOL->GetUndoManager();
diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx
index a1c69e25b041..145dcb993600 100644
--- a/sd/source/ui/func/fuchar.cxx
+++ b/sd/source/ui/func/fuchar.cxx
@@ -62,7 +62,7 @@ void FuChar::DoExecute( SfxRequest& rReq )
SfxItemSet aEditAttr( mpDoc->GetPool() );
mpView->GetAttributes( aEditAttr );
- SfxItemSet aNewAttr(mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR, EE_ITEMS_START, EE_ITEMS_END>{});
+ SfxItemSet aNewAttr(mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR, EE_ITEMS_START, EE_ITEMS_END>);
aNewAttr.Put( aEditAttr, false );
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx
index 0d2a406e0e14..2af3549e51d6 100644
--- a/sd/source/ui/func/fuconcs.cxx
+++ b/sd/source/ui/func/fuconcs.cxx
@@ -181,7 +181,7 @@ void FuConstructCustomShape::SetAttributes( SdrObject* pObj )
SDRATTR_GRAF_FIRST,
SDRATTR_CUSTOMSHAPE_LAST,
// Range from SdrTextObj:
- EE_ITEMS_START, EE_ITEMS_END>{});
+ EE_ITEMS_START, EE_ITEMS_END>);
aDest.Set( rSource );
pObj->SetMergedItemSet( aDest );
// Enables Word-wrap by default (tdf#134369)
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index c291e3468349..1e7a7457964a 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -75,7 +75,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
if( !pArgs )
{
SfxItemSet aSet( mpViewShell->GetPool(),
- svl::Items<ATTR_COPY_START, ATTR_COPY_END>{} );
+ svl::Items<ATTR_COPY_START, ATTR_COPY_END> );
// indicate color attribute
SfxItemSet aAttr( mpDoc->GetPool() );
@@ -204,7 +204,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
if( ( 1 == i ) && bColor )
{
- SfxItemSet aNewSet( mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR>{} );
+ SfxItemSet aNewSet( mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR> );
aNewSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
aNewSet.Put( XFillColorItem( OUString(), aStartColor ) );
mpView->SetAttributes( aNewSet );
@@ -266,7 +266,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
sal_uInt8 nGreen = aStartColor.GetGreen() + static_cast<sal_uInt8>( ( static_cast<::tools::Long>(aEndColor.GetGreen()) - static_cast<::tools::Long>(aStartColor.GetGreen()) ) * static_cast<::tools::Long>(i) / static_cast<::tools::Long>(nNumber) );
sal_uInt8 nBlue = aStartColor.GetBlue() + static_cast<sal_uInt8>( ( static_cast<::tools::Long>(aEndColor.GetBlue()) - static_cast<::tools::Long>(aStartColor.GetBlue()) ) * static_cast<::tools::Long>(i) / static_cast<::tools::Long>(nNumber) );
Color aNewColor( nRed, nGreen, nBlue );
- SfxItemSet aNewSet( mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR>{} );
+ SfxItemSet aNewSet( mpViewShell->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLCOLOR> );
aNewSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
aNewSet.Put( XFillColorItem( OUString(), aNewColor ) );
mpView->SetAttributes( aNewSet );
diff --git a/sd/source/ui/func/fucushow.cxx b/sd/source/ui/func/fucushow.cxx
index a87076b8ed6f..eb3b12211085 100644
--- a/sd/source/ui/func/fucushow.cxx
+++ b/sd/source/ui/func/fucushow.cxx
@@ -55,21 +55,35 @@ void FuCustomShowDlg::DoExecute( SfxRequest& )
vcl::Window* pWin = mpViewShell->GetActiveWindow();
ScopedVclPtr<AbstractSdCustomShowDlg> pDlg( pFact->CreateSdCustomShowDlg(pWin ? pWin->GetFrameWeld() : nullptr, *mpDoc) );
sal_uInt16 nRet = pDlg->Execute();
- if( pDlg->IsModified() )
- {
- mpDoc->SetChanged();
- sd::PresentationSettings& rSettings = mpDoc->getPresentationSettings();
- rSettings.mbCustomShow = pDlg->IsCustomShow();
- }
- pDlg.disposeAndClear();
+ mpDoc->SetChanged();
+ sd::PresentationSettings& rSettings = mpDoc->getPresentationSettings();
if( nRet == RET_YES )
{
+ // If the custom show is not set by default
+ if (!rSettings.mbCustomShow)
+ {
+ rSettings.mbStartCustomShow = true;
+ rSettings.mbCustomShow = pDlg->IsCustomShow();
+ }
+
mpViewShell->SetStartShowWithDialog(true);
mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_PRESENTATION,
SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
}
+ if (nRet == RET_OK)
+ {
+ if (mpDoc->GetCustomShowList())
+ {
+ if (!pDlg->IsCustomShow())
+ {
+ rSettings.mbCustomShow = false;
+ rSettings.mbAll = true;
+ }
+ }
+ }
+ pDlg.disposeAndClear();
}
} // end of namespace
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index ebaa0ee5d944..833d628742e0 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -114,7 +114,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
aOutliner.SetText(*pParaObj);
// remove hard paragraph- and character attributes
- SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
+ SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>);
sal_Int32 nParaCount1 = aOutliner.GetParagraphCount();
for (sal_Int32 nPara = 0; nPara < nParaCount1; nPara++)
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 01434b40f141..07d1417e0161 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -190,7 +190,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
}
else
{
- SdGRFFilter::HandleGraphicFilterError( nError, GraphicFilter::GetGraphicFilter().GetLastError().nStreamError );
+ SdGRFFilter::HandleGraphicFilterError( nError, GraphicFilter::GetGraphicFilter().GetLastError() );
}
}
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index ff890dfb5ec7..aec950b0c779 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -133,6 +133,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
sfx2::FileDialogHelper aFileDialog(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
FileDialogFlags::Insert, mpWindow ? mpWindow->GetFrameWeld() : nullptr);
+ aFileDialog.SetContext(sfx2::FileDialogHelper::DrawImpressInsertFile);
Reference< XFilePicker > xFilePicker( aFileDialog.GetFilePicker() );
Reference< XFilterManager > xFilterManager( xFilePicker, UNO_QUERY );
OUString aOwnCont;
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index 842cd001b85e..cf51719d3857 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -332,7 +332,7 @@ void FuMorph::ImpInsertPolygons(
::tools::Long nEndLineWidth = 0;
SdrPageView* pPageView = mpView->GetSdrPageView();
SfxItemPool & rPool = pObj1->GetObjectItemPool();
- SfxItemSet aSet1( rPool,svl::Items<SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,EE_ITEMS_START,EE_ITEMS_END>{} );
+ SfxItemSet aSet1( rPool,svl::Items<SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,EE_ITEMS_START,EE_ITEMS_END> );
SfxItemSet aSet2( aSet1 );
bool bLineColor = false;
bool bFillColor = false;
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index d6b7fa49115d..4d42aaa06a3c 100644
--- a/sd/source/ui/func/fuoaprms.cxx
+++ b/sd/source/ui/func/fuoaprms.cxx
@@ -336,7 +336,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
if(!pArgs)
{
// fill ItemSet for dialog
- SfxItemSet aSet(mpDoc->GetPool(), svl::Items<ATTR_ANIMATION_START, ATTR_ACTION_END>{});
+ SfxItemSet aSet(mpDoc->GetPool(), svl::Items<ATTR_ANIMATION_START, ATTR_ACTION_END>);
// fill the set
if (nAnimationSet == ATTR_SET)
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index 13db35c73079..ba1c728616c7 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -79,14 +79,7 @@ void FuBulletAndPosition::DoExecute( SfxRequest& rReq )
SfxItemSet aEditAttr( mpDoc->GetPool() );
mpView->GetAttributes( aEditAttr );
- static const sal_uInt16 aAttrMap[] =
- {
- EE_PARA_NUMBULLET,
- EE_PARA_BULLET,
- 0
- };
-
- SfxItemSet aNewAttr( mpViewShell->GetPool(), aAttrMap );
+ SfxItemSet aNewAttr( mpViewShell->GetPool(), svl::Items<EE_PARA_NUMBULLET, EE_PARA_BULLET> );
aNewAttr.Put( aEditAttr, false );
auto pView = mpView;
@@ -124,7 +117,7 @@ void FuBulletAndPosition::SetCurrentBulletsNumbering(SfxRequest& rReq)
return;
}
- SfxItemSet aNewAttr( mpViewShell->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} );
+ SfxItemSet aNewAttr( mpViewShell->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END> );
{
SfxItemSet aEditAttr( mpDoc->GetPool() );
mpView->GetAttributes( aEditAttr );
@@ -240,7 +233,7 @@ void FuBulletAndPosition::SetCurrentBulletsNumbering(SfxRequest& rReq)
if (bInMasterView && pNumRule)
{
- SfxItemSet aSetAttr( mpViewShell->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} );
+ SfxItemSet aSetAttr( mpViewShell->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END> );
aSetAttr.Put(SvxNumBulletItem( *pNumRule, nNumItemId ));
mpView->SetAttributes(aSetAttr);
}
@@ -327,7 +320,7 @@ const SfxPoolItem* FuBulletAndPosition::GetNumBulletItem(SfxItemSet& aNewAttr, s
SvxNumRule aNewRule( rLclRule );
aNewRule.SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS );
- SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
+ SvxNumBulletItem aNewItem( std::move(aNewRule), EE_PARA_NUMBULLET );
aNewAttr.Put(aNewItem);
}
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 6d5fdbc896ec..076c63f95e67 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -77,21 +77,20 @@ namespace sd {
static void mergeItemSetsImpl( SfxItemSet& rTarget, const SfxItemSet& rSource )
{
- const sal_uInt16* pPtr = rSource.GetRanges();
+ const WhichRangesContainer& rRanges = rSource.GetRanges();
sal_uInt16 p1, p2;
- while( *pPtr )
+ for (sal_Int32 i = 0; i < rRanges.size(); ++i)
{
- p1 = pPtr[0];
- p2 = pPtr[1];
+ p1 = rRanges[i].first;
+ p2 = rRanges[i].second;
// make ranges discrete
- while(pPtr[2] && (pPtr[2] - p2 == 1))
+ while(i < rRanges.size()-1 && (rRanges[i+1].first - p2 == 1))
{
- p2 = pPtr[3];
- pPtr += 2;
+ p2 = rRanges[i+1].second;
+ ++i;
}
rTarget.MergeRange( p1, p2 );
- pPtr += 2;
}
rTarget.Put(rSource);
@@ -201,15 +200,15 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest&
if (!mpDrawViewShell)
return nullptr;
- SfxItemSet aNewAttr(mpDoc->GetPool(), {
- { XATTR_FILL_FIRST, XATTR_FILL_LAST },
- { EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR },
- { SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_OUTER },
- { SID_ATTR_BORDER_SHADOW, SID_ATTR_BORDER_SHADOW },
- { SID_ATTR_PAGE, SID_ATTR_PAGE_SHARED },
- { SID_ATTR_CHAR_GRABBAG, SID_ATTR_CHAR_GRABBAG },
- { SID_ATTR_PAGE_COLOR, SID_ATTR_PAGE_FILLSTYLE },
- });
+ SfxItemSet aNewAttr(mpDoc->GetPool(), svl::Items<
+ XATTR_FILL_FIRST, XATTR_FILL_LAST,
+ EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
+ SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_OUTER,
+ SID_ATTR_BORDER_SHADOW, SID_ATTR_BORDER_SHADOW,
+ SID_ATTR_PAGE, SID_ATTR_PAGE_SHARED,
+ SID_ATTR_CHAR_GRABBAG, SID_ATTR_CHAR_GRABBAG,
+ SID_ATTR_PAGE_COLOR, SID_ATTR_PAGE_FILLSTYLE
+ >);
// Keep it sorted
aNewAttr.MergeRange(mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE),
mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE));
@@ -266,14 +265,15 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest&
// Merge ItemSet for dialog
- const sal_uInt16* pPtr = aNewAttr.GetRanges();
- sal_uInt16 p1 = pPtr[0], p2 = pPtr[1];
- while(pPtr[2] && (pPtr[2] - p2 == 1))
+ const WhichRangesContainer& rRanges = aNewAttr.GetRanges();
+ sal_uInt16 p1 = rRanges[0].first, p2 = rRanges[0].second;
+ sal_Int32 idx = 1;
+ while(idx < rRanges.size() && (rRanges[idx].first - p2 == 1))
{
- p2 = pPtr[3];
- pPtr += 2;
+ p2 = rRanges[idx].second;
+ ++idx;
}
- SfxItemSet aMergedAttr( *aNewAttr.GetPool(), {{p1, p2}} );
+ SfxItemSet aMergedAttr( *aNewAttr.GetPool(), p1, p2 );
mergeItemSetsImpl( aMergedAttr, aNewAttr );
@@ -285,7 +285,7 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest&
MergePageBackgroundFilling(mpPage, pStyleSheet, mbMasterPage, aMergedAttr);
}
- std::unique_ptr< SfxItemSet > pTempSet;
+ std::optional< SfxItemSet > pTempSet;
const sal_uInt16 nId = GetSlotID();
if (nId == SID_SAVE_BACKGROUND)
@@ -330,14 +330,14 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest&
if (nError == ERRCODE_NONE)
{
- pTempSet.reset( new SfxItemSet( mpDoc->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{}) );
+ pTempSet.emplace( mpDoc->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST> );
pTempSet->Put( XFillStyleItem( drawing::FillStyle_BITMAP ) );
// MigrateItemSet makes sure the XFillBitmapItem will have a unique name
- SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items<XATTR_FILLBITMAP, XATTR_FILLBITMAP>{} );
+ SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items<XATTR_FILLBITMAP, XATTR_FILLBITMAP> );
aMigrateSet.Put(XFillBitmapItem("background", aGraphic));
- SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDoc );
+ SdrModel::MigrateItemSet( &aMigrateSet, &*pTempSet, mpDoc );
pTempSet->Put( XFillBmpStretchItem( true ));
pTempSet->Put( XFillBmpTileItem( false ));
@@ -352,7 +352,7 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest&
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractTabDialog> pDlg( pFact->CreateSdTabPageDialog(mpViewShell->GetFrameWeld(), &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage, bIsImpressDoc) );
if( pDlg->Execute() == RET_OK )
- pTempSet.reset( new SfxItemSet(*pDlg->GetOutputItemSet()) );
+ pTempSet.emplace( *pDlg->GetOutputItemSet() );
}
if (pTempSet && pStyleSheet)
@@ -396,18 +396,18 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest&
if (pTempGradItem && pTempGradItem->GetName().isEmpty())
{
// MigrateItemSet guarantees unique gradient names
- SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT>{} );
+ SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT> );
aMigrateSet.Put( XFillGradientItem("gradient", pTempGradItem->GetGradientValue()) );
- SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDoc);
+ SdrModel::MigrateItemSet( &aMigrateSet, &*pTempSet, mpDoc);
}
const XFillHatchItem* pTempHatchItem = pTempSet->GetItem<XFillHatchItem>(XATTR_FILLHATCH);
if (pTempHatchItem && pTempHatchItem->GetName().isEmpty())
{
// MigrateItemSet guarantees unique hatch names
- SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items<XATTR_FILLHATCH, XATTR_FILLHATCH>{} );
+ SfxItemSet aMigrateSet( mpDoc->GetPool(), svl::Items<XATTR_FILLHATCH, XATTR_FILLHATCH> );
aMigrateSet.Put( XFillHatchItem("hatch", pTempHatchItem->GetHatchValue()) );
- SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDoc);
+ SdrModel::MigrateItemSet( &aMigrateSet, &*pTempSet, mpDoc);
}
if( !mbMasterPage && bChanges && mbPageBckgrdDeleted )
diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx
index 19560db03da1..bd0d5c75c1fb 100644
--- a/sd/source/ui/func/fuparagr.cxx
+++ b/sd/source/ui/func/fuparagr.cxx
@@ -70,7 +70,7 @@ void FuParagraph::DoExecute( SfxRequest& rReq )
SfxItemSet aNewAttr( *pPool,
svl::Items<EE_ITEMS_START, EE_ITEMS_END,
SID_ATTR_TABSTOP_OFFSET, SID_ATTR_TABSTOP_OFFSET,
- ATTR_PARANUMBERING_START, ATTR_PARANUMBERING_END>{} );
+ ATTR_PARANUMBERING_START, ATTR_PARANUMBERING_END> );
aNewAttr.Put( aEditAttr );
diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx
index 8ee1a4899740..fa8eafd9ecf9 100644
--- a/sd/source/ui/func/fuprlout.cxx
+++ b/sd/source/ui/func/fuprlout.cxx
@@ -128,7 +128,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
bool bLoad = false; // appear the new master pages?
OUString aFile;
- SfxItemSet aSet(mpDoc->GetPool(), svl::Items<ATTR_PRESLAYOUT_START, ATTR_PRESLAYOUT_END>{});
+ SfxItemSet aSet(mpDoc->GetPool(), svl::Items<ATTR_PRESLAYOUT_START, ATTR_PRESLAYOUT_END>);
aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_LOAD, bLoad));
aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_MASTER_PAGE, bMasterPage ) );
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index 0edd726251e6..acb12f133612 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -71,7 +71,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
/* does the selections end in a unique presentation layout?
if not, it is not allowed to edit the templates */
- SfxItemSet aSet(mpDoc->GetItemPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>{});
+ SfxItemSet aSet(mpDoc->GetItemPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>);
pOutlineViewShell->GetStatusBarState( aSet );
OUString aLayoutName = static_cast<const SfxStringItem&>(aSet.Get(SID_STATUS_LAYOUT)).GetValue();
DBG_ASSERT(!aLayoutName.isEmpty(), "Layout not defined");
diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx
index 9bcca7f95b3b..1ea9a588c441 100644
--- a/sd/source/ui/func/fuscale.cxx
+++ b/sd/source/ui/func/fuscale.cxx
@@ -66,7 +66,7 @@ void FuScale::DoExecute( SfxRequest& rReq )
if( !pArgs )
{
- SfxItemSet aNewAttr( mpDoc->GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{} );
+ SfxItemSet aNewAttr( mpDoc->GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM> );
std::unique_ptr<SvxZoomItem> pZoomItem;
SvxZoomEnableFlags nZoomValues = SvxZoomEnableFlags::ALL;
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 045a61a725bc..37f3c15fe604 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -113,10 +113,9 @@ FuSelection::~FuSelection()
namespace {
bool lcl_followHyperlinkAllowed(const MouseEvent& rMEvt) {
- SvtSecurityOptions aSecOpt;
- if (!rMEvt.IsMod1() && aSecOpt.IsOptionSet(SvtSecurityOptions::EOption::CtrlClickHyperlink))
+ if (!rMEvt.IsMod1() && SvtSecurityOptions::IsOptionSet(SvtSecurityOptions::EOption::CtrlClickHyperlink))
return false;
- if (rMEvt.IsMod1() && !aSecOpt.IsOptionSet(SvtSecurityOptions::EOption::CtrlClickHyperlink))
+ if (rMEvt.IsMod1() && !SvtSecurityOptions::IsOptionSet(SvtSecurityOptions::EOption::CtrlClickHyperlink))
return false;
return true;
}
@@ -743,13 +742,13 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
* If 3D-rotation bodies are about to be created,
* end creation now
**********************************************************/
- Degree100 nAngle1 = GetAngle(aPnt - mpView->GetRef1());
- nAngle1 -= 27000_deg100;
- nAngle1 = NormAngle36000(nAngle1);
- bool bMirrorSide1 = nAngle1 < 18000_deg100;
+ Degree100 nAngle1 = GetAngle(aPnt - mpView->GetRef1());
+ nAngle1 -= 27000_deg100;
+ nAngle1 = NormAngle36000(nAngle1);
+ bool bMirrorSide1 = nAngle1 < 18000_deg100;
- if (bMirrorSide0 != bMirrorSide1)
- {
+ if (bMirrorSide0 != bMirrorSide1)
+ {
bSuppressChangesOfSelection = true;
mpWindow->EnterWait();
mpView->End3DCreation();
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index 484aa5f1f9b7..3f08f0f52d72 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -59,7 +59,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
{
PresentationSettings& rPresentationSettings = mpDoc->getPresentationSettings();
- SfxItemSet aDlgSet( mpDoc->GetPool(), svl::Items<ATTR_PRESENT_START, ATTR_PRESENT_END>{} );
+ SfxItemSet aDlgSet( mpDoc->GetPool(), svl::Items<ATTR_PRESENT_START, ATTR_PRESENT_END> );
std::vector<OUString> aPageNameList(mpDoc->GetSdPageCount( PageKind::Standard ));
const OUString& rPresPage = rPresentationSettings.maPresPage;
OUString aFirstPage;
@@ -141,6 +141,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
{
bValuesChanged = true;
rPresentationSettings.mbCustomShow = bValue;
+ rPresentationSettings.mbStartCustomShow = false;
}
bValue = ITEMVALUE( aDlgSet, ATTR_PRESENT_ENDLESS, SfxBoolItem );
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index b4e93d7b41e1..80a5e35d8c1f 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -69,7 +69,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
if (!pArgs)
{
- SfxItemSet aNewAttr(mpViewShell->GetPool(), svl::Items<ATTR_SNAPLINE_START, ATTR_SNAPLINE_END>{});
+ SfxItemSet aNewAttr(mpViewShell->GetPool(), svl::Items<ATTR_SNAPLINE_START, ATTR_SNAPLINE_END>);
bool bLineExist (false);
Point aLinePos;
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx
index 5e97176ccc18..8122b43fe67b 100644
--- a/sd/source/ui/func/fusumry.cxx
+++ b/sd/source/ui/func/fusumry.cxx
@@ -193,7 +193,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
return;
// remove hard break- and character attributes
- SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
+ SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>);
sal_Int32 nParaCount = pOutl->GetParagraphCount();
for (sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 945965e1b951..a3ff351337e4 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -565,7 +565,7 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
void FuText::ImpSetAttributesFitToSize(SdrTextObj* pTxtObj)
{
// FitToSize (fit to frame)
- SfxItemSet aSet(mpViewShell->GetPool(), svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH>{});
+ SfxItemSet aSet(mpViewShell->GetPool(), svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH>);
aSet.Put(SdrTextFitToSizeTypeItem(drawing::TextFitToSizeType_PROPORTIONAL));
aSet.Put(makeSdrTextAutoGrowHeightItem(false));
aSet.Put(makeSdrTextAutoGrowWidthItem(false));
@@ -576,7 +576,7 @@ void FuText::ImpSetAttributesFitToSize(SdrTextObj* pTxtObj)
void FuText::ImpSetAttributesFitToSizeVertical(SdrTextObj* pTxtObj)
{
SfxItemSet aSet(mpViewShell->GetPool(),
- svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH>{});
+ svl::Items<SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH>);
aSet.Put(SdrTextFitToSizeTypeItem(drawing::TextFitToSizeType_PROPORTIONAL));
aSet.Put(makeSdrTextAutoGrowHeightItem(false));
aSet.Put(makeSdrTextAutoGrowWidthItem(false));
@@ -709,7 +709,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
// vertical when there was a vertical one used last time.
OutlinerParaObject* pOPO = GetTextObj()->GetOutlinerParaObject();
SdrOutliner& rOutl(mxTextObj->getSdrModelFromSdrObject().GetDrawOutliner(GetTextObj()));
- bool bVertical((pOPO && pOPO->IsVertical())
+ bool bVertical((pOPO && pOPO->IsEffectivelyVertical())
|| nSlotId == SID_ATTR_CHAR_VERTICAL
|| nSlotId == SID_TEXT_FITTOSIZE_VERTICAL);
rOutl.SetVertical(bVertical);
@@ -726,7 +726,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
pPara = GetTextObj()->GetOutlinerParaObject();
}
- if(pPara && bVertical != pPara->IsVertical())
+ if(pPara && bVertical != pPara->IsEffectivelyVertical())
{
// set ParaObject orientation accordingly
pPara->SetVertical(bVertical);
@@ -848,7 +848,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
pPara = GetTextObj()->GetOutlinerParaObject();
}
- if(pPara && !pPara->IsVertical())
+ if(pPara && !pPara->IsEffectivelyVertical())
{
// set ParaObject orientation accordingly
pPara->SetVertical(true);
@@ -1081,9 +1081,9 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag)
if( pTextObj )
{
OutlinerParaObject* pOPO = pTextObj->GetOutlinerParaObject();
- if( pOPO && pOPO->IsVertical() )
+ if( pOPO && pOPO->IsEffectivelyVertical() )
{
- pOutl->SetVertical(pOPO->GetDirectVertical());
+ pOutl->SetVertical(pOPO->GetVertical());
pOutl->SetRotation(pOPO->GetRotation());
}
else if (nSlotId == SID_ATTR_CHAR_VERTICAL || nSlotId == SID_TEXT_FITTOSIZE_VERTICAL)
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index 6c07e0e70be6..80441e57dea4 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -95,7 +95,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
pDlg.reset(pFact->CreateCaptionDialog(mpViewShell->GetFrameWeld(), mpView));
- const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
+ const WhichRangesContainer& pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
aCombSet.Put( aNewAttr );
aCombSet.Put( aSet );
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 288cf24866de..d98164505a93 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -497,7 +497,10 @@ private:
void ConfigureAppBackgroundColor( svtools::ColorConfig* pColorConfig = nullptr );
/// return true if "Edit Hyperlink" in context menu should be disabled
- bool ShouldDisableEditHyperlink();
+ bool ShouldDisableEditHyperlink() const;
+ /// force "Edit Hyperlink" to true, with the expectation that SID_EDIT_HYPERLINK is
+ /// later Invalidated to reset it back to its natural value
+ void EnableEditHyperlink();
// The colour of the area behind the slide (used to be called "Wiese")
Color mnAppBackgroundColor;
diff --git a/sd/source/ui/inc/RemoteServer.hxx b/sd/source/ui/inc/RemoteServer.hxx
index 65bc523ad274..e676087899d9 100644
--- a/sd/source/ui/inc/RemoteServer.hxx
+++ b/sd/source/ui/inc/RemoteServer.hxx
@@ -8,7 +8,6 @@
*/
#pragma once
-// SERVER
#include <memory>
#include <vector>
@@ -28,6 +27,7 @@ namespace com::sun::star::uno { template <class interface_type> class Reference;
namespace sd
{
+ class BufferedStreamSocket;
class Communicator;
struct ClientInfo
@@ -81,6 +81,7 @@ namespace sd
::std::vector< std::shared_ptr< ClientInfoInternal > > mAvailableClients;
void execute() override;
+ void handleAcceptedConnection( BufferedStreamSocket *pSocket ) ;
};
}
diff --git a/sd/source/ui/inc/custsdlg.hxx b/sd/source/ui/inc/custsdlg.hxx
index 3ef3cfb1cd66..aa5f423396de 100644
--- a/sd/source/ui/inc/custsdlg.hxx
+++ b/sd/source/ui/inc/custsdlg.hxx
@@ -33,7 +33,6 @@ private:
bool bModified;
std::unique_ptr<weld::TreeView> m_xLbCustomShows;
- std::unique_ptr<weld::CheckButton> m_xCbxUseCustomShow;
std::unique_ptr<weld::Button> m_xBtnNew;
std::unique_ptr<weld::Button> m_xBtnEdit;
std::unique_ptr<weld::Button> m_xBtnRemove;
@@ -45,7 +44,6 @@ private:
void CheckState();
DECL_LINK( ClickButtonHdl, weld::Button&, void );
- DECL_LINK( ToggleButtonHdl, weld::Toggleable&, void );
DECL_LINK( SelectListBoxHdl, weld::TreeView&, void );
DECL_LINK( StartShowHdl, weld::Button&, void );
void SelectHdl(void const *);
@@ -53,7 +51,6 @@ private:
public:
SdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc);
virtual ~SdCustomShowDlg() override;
- bool IsModified() const { return bModified; }
bool IsCustomShow() const;
};
diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx
index a1eef4689da8..68fe77125647 100644
--- a/sd/source/ui/inc/slideshow.hxx
+++ b/sd/source/ui/inc/slideshow.hxx
@@ -32,6 +32,7 @@
#include <editeng/unoipset.hxx>
#include <memory>
+#include <sddllapi.h>
namespace com::sun::star {
namespace drawing {
@@ -208,7 +209,7 @@ private:
namespace slideshowhelp
{
- void ShowSlideShow(SfxRequest const & rReq, SdDrawDocument &rDoc);
+ SD_DLLPUBLIC void ShowSlideShow(SfxRequest const& rReq, SdDrawDocument& rDoc);
}
}
diff --git a/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx b/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx
index b3a9cc154e37..58adb13ca7bf 100644
--- a/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx
+++ b/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx
@@ -47,6 +47,10 @@ BufferedStreamSocket::BufferedStreamSocket( int aSocket ):
{
}
+BufferedStreamSocket::~BufferedStreamSocket() {
+ close();
+}
+
void BufferedStreamSocket::getPeerAddr(osl::SocketAddr& rAddr)
{
assert ( !usingCSocket );
diff --git a/sd/source/ui/remotecontrol/BufferedStreamSocket.hxx b/sd/source/ui/remotecontrol/BufferedStreamSocket.hxx
index 08a81cf002f6..6abf7ec1bf8d 100644
--- a/sd/source/ui/remotecontrol/BufferedStreamSocket.hxx
+++ b/sd/source/ui/remotecontrol/BufferedStreamSocket.hxx
@@ -25,7 +25,7 @@ namespace sd
* returned to being a StreamSocket wrapper if/when Bluetooth is
* integrated into osl Sockets.
*/
- class BufferedStreamSocket :
+ class BufferedStreamSocket final :
public IBluetoothSocket,
private ::osl::StreamSocket
{
@@ -40,6 +40,9 @@ namespace sd
*/
explicit BufferedStreamSocket( int aSocket );
BufferedStreamSocket( const BufferedStreamSocket &aSocket );
+
+ ~BufferedStreamSocket();
+
/**
* Blocks until a line is read.
* Returns whatever the last call of recv returned, i.e. 0 or less
diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx
index de55f38f8514..3d24f1714307 100644
--- a/sd/source/ui/remotecontrol/Communicator.cxx
+++ b/sd/source/ui/remotecontrol/Communicator.cxx
@@ -75,19 +75,18 @@ void Communicator::execute()
if ( xPresentation.is() && xPresentation->isRunning() )
{
presentationStarted( xPresentation->getController() );
+ OString aBuffer =
+ "slideshow_info\n" +
+ OUStringToOString( ::comphelper::DocumentInfo::getDocumentTitle( xFrame->getController()->getModel() ), RTL_TEXTENCODING_UTF8 ) +
+ "\n\n";
+
+ pTransmitter->addMessage( aBuffer.getStr(), Transmitter::PRIORITY_LOW );
}
else
{
pTransmitter->addMessage( "slideshow_finished\n\n",
Transmitter::PRIORITY_HIGH );
}
-
- OString aBuffer =
- "slideshow_info\n" +
- OUStringToOString( ::comphelper::DocumentInfo::getDocumentTitle( xFrame->getController()->getModel() ), RTL_TEXTENCODING_UTF8 ) +
- "\n\n";
-
- pTransmitter->addMessage( aBuffer.getStr(), Transmitter::PRIORITY_LOW );
}
catch (uno::RuntimeException &)
{
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index d3f1ac67f904..83a80e9916df 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -78,13 +78,6 @@ RemoteServer::~RemoteServer()
void RemoteServer::execute()
{
SAL_INFO( "sdremote", "RemoteServer::execute called" );
- uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
- if (!xContext.is()/* || !officecfg::Office::Common::Misc::ExperimentalMode::get(xContext)*/)
- {
- // SAL_INFO("sdremote", "not in experimental mode, disabling TCP server");
- spServer = nullptr;
- return;
- }
osl::SocketAddr aAddr( "0.0.0.0", PORT );
if ( !mSocket.bind( aAddr ) )
{
@@ -110,73 +103,78 @@ void RemoteServer::execute()
return; // Closed, or other issue.
}
BufferedStreamSocket *pSocket = new BufferedStreamSocket( aSocket);
- OString aLine;
- if ( pSocket->readLine( aLine)
- && aLine == "LO_SERVER_CLIENT_PAIR"
- && pSocket->readLine( aLine ) )
- {
- OString aName( aLine );
+ handleAcceptedConnection( pSocket );
+ }
+ SAL_INFO( "sdremote", "shutting down RemoteServer" );
+ spServer = nullptr; // Object is destroyed when Thread::execute() ends.
+}
- if ( ! pSocket->readLine( aLine ) )
- {
- delete pSocket;
- continue;
- }
- OString aPin( aLine );
-
- SocketAddr aClientAddr;
- pSocket->getPeerAddr( aClientAddr );
-
- MutexGuard aGuard( sDataMutex );
- std::shared_ptr< ClientInfoInternal > pClient =
- std::make_shared<ClientInfoInternal>(
- OStringToOUString( aName, RTL_TEXTENCODING_UTF8 ),
- pSocket, OStringToOUString( aPin, RTL_TEXTENCODING_UTF8 ) );
- mAvailableClients.push_back( pClient );
-
- // Read off any additional non-empty lines
- // We know that we at least have the empty termination line to read.
- do
- {
- pSocket->readLine( aLine );
- }
- while ( aLine.getLength() > 0 );
-
- // Check if we already have this server.
- Reference< XNameAccess > const xConfig = officecfg::Office::Impress::Misc::AuthorisedRemotes::get();
- const Sequence< OUString > aNames = xConfig->getElementNames();
- bool aFound = false;
- for ( const auto& rName : aNames )
- {
- if ( rName == pClient->mName )
- {
- Reference<XNameAccess> xSetItem( xConfig->getByName(rName), UNO_QUERY );
- Any axPin(xSetItem->getByName("PIN"));
- OUString sPin;
- axPin >>= sPin;
-
- if ( sPin == pClient->mPin ) {
- SAL_INFO( "sdremote", "client found on validated list -- connecting" );
- connectClient( pClient, sPin );
- aFound = true;
- break;
- }
- }
- }
- // Pin not found so inform the client.
- if ( !aFound )
- {
- SAL_INFO( "sdremote", "client not found on validated list" );
- pSocket->write( "LO_SERVER_VALIDATING_PIN\n\n",
- strlen( "LO_SERVER_VALIDATING_PIN\n\n" ) );
- }
- } else {
- SAL_INFO( "sdremote", "client failed to send LO_SERVER_CLIENT_PAIR, ignoring" );
+void RemoteServer::handleAcceptedConnection( BufferedStreamSocket *pSocket )
+{
+ OString aLine;
+ if ( ! ( pSocket->readLine( aLine)
+ && aLine == "LO_SERVER_CLIENT_PAIR"
+ && pSocket->readLine( aLine ) ) )
+ {
+ SAL_INFO( "sdremote", "client failed to send LO_SERVER_CLIENT_PAIR, ignoring" );
+ delete pSocket;
+ return;
+ }
+
+ OString aName( aLine );
+
+ if ( ! pSocket->readLine( aLine ) )
+ {
+ delete pSocket;
+ return;
+ }
+ OString aPin( aLine );
+
+ SocketAddr aClientAddr;
+ pSocket->getPeerAddr( aClientAddr );
+
+ do
+ {
+ // Read off any additional non-empty lines
+ // We know that we at least have the empty termination line to read.
+ if ( ! pSocket->readLine( aLine ) ) {
delete pSocket;
+ return;
}
}
- SAL_INFO( "sdremote", "shutting down RemoteServer" );
- spServer = nullptr; // Object is destroyed when Thread::execute() ends.
+ while ( aLine.getLength() > 0 );
+
+ MutexGuard aGuard( sDataMutex );
+ std::shared_ptr< ClientInfoInternal > pClient =
+ std::make_shared<ClientInfoInternal>(
+ OStringToOUString( aName, RTL_TEXTENCODING_UTF8 ),
+ pSocket, OStringToOUString( aPin, RTL_TEXTENCODING_UTF8 ) );
+ mAvailableClients.push_back( pClient );
+
+ // Check if we already have this server.
+ Reference< XNameAccess > const xConfig = officecfg::Office::Impress::Misc::AuthorisedRemotes::get();
+ const Sequence< OUString > aNames = xConfig->getElementNames();
+ for ( const auto& rName : aNames )
+ {
+ if ( rName == pClient->mName )
+ {
+ Reference<XNameAccess> xSetItem( xConfig->getByName(rName), UNO_QUERY );
+ Any axPin(xSetItem->getByName("PIN"));
+ OUString sPin;
+ axPin >>= sPin;
+
+ if ( sPin == pClient->mPin ) {
+ SAL_INFO( "sdremote", "client found on validated list -- connecting" );
+ connectClient( pClient, sPin );
+ return;
+ }
+ }
+ }
+
+ // Pin not found so inform the client.
+ SAL_INFO( "sdremote", "client not found on validated list" );
+ pSocket->write( "LO_SERVER_VALIDATING_PIN\n\n",
+ strlen( "LO_SERVER_VALIDATING_PIN\n\n" ) );
}
RemoteServer *sd::RemoteServer::spServer = nullptr;
diff --git a/sd/source/ui/remotecontrol/Transmitter.cxx b/sd/source/ui/remotecontrol/Transmitter.cxx
index 8f3b7d24c184..f00f15502a45 100644
--- a/sd/source/ui/remotecontrol/Transmitter.cxx
+++ b/sd/source/ui/remotecontrol/Transmitter.cxx
@@ -16,9 +16,9 @@ using namespace sd;
Transmitter::Transmitter( IBluetoothSocket* aSocket )
: pStreamSocket( aSocket ),
- mQueuesNotEmpty(),
- mFinishRequested(),
- mQueueMutex(),
+ mProcessingRequired(),
+ mMutex(),
+ mFinishRequested( false ),
mLowPriority(),
mHighPriority()
{
@@ -30,12 +30,13 @@ void SAL_CALL Transmitter::run()
while ( true )
{
- mQueuesNotEmpty.wait();
+ mProcessingRequired.wait();
- if ( mFinishRequested.check() )
- return;
+ ::osl::MutexGuard aGuard( mMutex );
- ::osl::MutexGuard aQueueGuard( mQueueMutex );
+ if ( mFinishRequested ) {
+ return;
+ }
if ( !mHighPriority.empty() )
{
OString aMessage( mHighPriority.front() );
@@ -51,17 +52,18 @@ void SAL_CALL Transmitter::run()
pStreamSocket->write( aMessage.getStr(), aMessage.getLength() );
}
- if ( mLowPriority.empty() && mHighPriority.empty() )
+ if ( mLowPriority.empty() && mHighPriority.empty())
{
- mQueuesNotEmpty.reset();
+ mProcessingRequired.reset();
}
}
}
void Transmitter::notifyFinished()
{
- mFinishRequested.set();
- mQueuesNotEmpty.set();
+ ::osl::MutexGuard aGuard( mMutex );
+ mFinishRequested = true;
+ mProcessingRequired.set();
}
Transmitter::~Transmitter()
@@ -70,7 +72,7 @@ Transmitter::~Transmitter()
void Transmitter::addMessage( const OString& aMessage, const Priority aPriority )
{
- ::osl::MutexGuard aQueueGuard( mQueueMutex );
+ ::osl::MutexGuard aGuard( mMutex );
switch ( aPriority )
{
case PRIORITY_LOW:
@@ -80,9 +82,9 @@ void Transmitter::addMessage( const OString& aMessage, const Priority aPriority
mHighPriority.push( aMessage );
break;
}
- if ( !mQueuesNotEmpty.check() )
+ if ( !mProcessingRequired.check() )
{
- mQueuesNotEmpty.set();
+ mProcessingRequired.set();
}
}
diff --git a/sd/source/ui/remotecontrol/Transmitter.hxx b/sd/source/ui/remotecontrol/Transmitter.hxx
index 8acebfeff7e8..c24f5a5a46fe 100644
--- a/sd/source/ui/remotecontrol/Transmitter.hxx
+++ b/sd/source/ui/remotecontrol/Transmitter.hxx
@@ -36,12 +36,17 @@ private:
::sd::IBluetoothSocket* pStreamSocket;
- ::osl::Condition mQueuesNotEmpty;
- ::osl::Condition mFinishRequested;
-
- ::osl::Mutex mQueueMutex;
-
+ ::osl::Condition mProcessingRequired;
+
+ ::osl::Mutex mMutex;
+ /**
+ * Used to indicate that we're done and the transmitter loop should exit.
+ * All access must be guarded my `mMutex`.
+ */
+ bool mFinishRequested;
+ /// Queue for low priority messages. All access must be guarded my `mMutex`.
std::queue<OString> mLowPriority;
+ /// Queue for high priority messages. All access must be guarded my `mMutex`.
std::queue<OString> mHighPriority;
};
diff --git a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
index 21fbff298633..76e056120ec8 100644
--- a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
@@ -103,7 +103,7 @@ AllMasterPagesSelector::AllMasterPagesSelector (
ViewShellBase& rBase,
const std::shared_ptr<MasterPageContainer>& rpContainer,
const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
- : MasterPagesSelector(pParent, rDocument, rBase, rpContainer, rxSidebar),
+ : MasterPagesSelector(pParent, rDocument, rBase, rpContainer, rxSidebar, "modules/simpress/ui/masterpagepanelall.ui", "allvalueset"),
mpSortedMasterPages(new SortedMasterPageDescriptorList())
{
MasterPagesSelector::Fill();
diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
index fbad335c4b26..269099edd0c1 100644
--- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
@@ -67,7 +67,7 @@ CurrentMasterPagesSelector::CurrentMasterPagesSelector (
ViewShellBase& rBase,
const std::shared_ptr<MasterPageContainer>& rpContainer,
const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
- : MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar)
+ : MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar, "modules/simpress/ui/masterpagepanel.ui", "usedvalueset")
{
Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener));
rBase.GetEventMultiplexer()->AddEventListener(aLink);
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index 2c71b8f921dc..4f4ee2ca59b5 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -47,6 +47,7 @@
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
#include <svl/languageoptions.hxx>
+#include <svl/cjkoptions.hxx>
#include <svl/stritem.hxx>
#include <svl/intitem.hxx>
#include <vcl/commandevent.hxx>
@@ -160,7 +161,7 @@ LayoutMenu::LayoutMenu (
: PanelLayout( pParent, "LayoutPanel", "modules/simpress/ui/layoutpanel.ui" ),
mrBase(rViewShellBase),
mxLayoutValueSet(new LayoutValueSet(*this)),
- mxLayoutValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxLayoutValueSet)),
+ mxLayoutValueSetWin(new weld::CustomWeld(*m_xBuilder, "layoutvalueset", *mxLayoutValueSet)),
mbIsMainViewChangePending(false),
mxSidebar(rxSidebar),
mbIsDisposed(false)
@@ -496,8 +497,7 @@ SfxRequest LayoutMenu::CreateRequest (
void LayoutMenu::Fill()
{
- SvtLanguageOptions aLanguageOptions;
- bool bVertical = aLanguageOptions.IsVerticalTextEnabled();
+ bool bVertical = SvtCJKOptions().IsVerticalTextEnabled();
SdDrawDocument* pDocument = mrBase.GetDocument();
bool bRightToLeft = (pDocument!=nullptr
&& pDocument->GetDefaultWritingMode() == WritingMode_RL_TB);
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index a70ba8ce22dd..fe4af9be67a4 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -57,12 +57,14 @@ MasterPagesSelector::MasterPagesSelector (
SdDrawDocument& rDocument,
ViewShellBase& rBase,
const std::shared_ptr<MasterPageContainer>& rpContainer,
- const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
- : PanelLayout( pParent, "MasterPagePanel", "modules/simpress/ui/masterpagepanel.ui" ),
+ const css::uno::Reference<css::ui::XSidebar>& rxSidebar,
+ const OUString& rUIFileName,
+ const OString& rValueSetName)
+ : PanelLayout( pParent, "MasterPagePanel", rUIFileName ),
maMutex(),
mpContainer(rpContainer),
mxPreviewValueSet(new PreviewValueSet),
- mxPreviewValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxPreviewValueSet)),
+ mxPreviewValueSetWin(new weld::CustomWeld(*m_xBuilder, rValueSetName, *mxPreviewValueSet)),
mrDocument(rDocument),
mrBase(rBase),
maCurrentItemList(),
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.hxx b/sd/source/ui/sidebar/MasterPagesSelector.hxx
index 951a4d6c1667..1b69327892b9 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.hxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.hxx
@@ -51,7 +51,9 @@ public:
SdDrawDocument& rDocument,
ViewShellBase& rBase,
const std::shared_ptr<MasterPageContainer>& rpContainer,
- const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
+ const css::uno::Reference<css::ui::XSidebar>& rxSidebar,
+ const OUString& rUIFileName,
+ const OString& rValueSetName);
virtual ~MasterPagesSelector() override;
virtual void LateInit();
diff --git a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
index 4d6cd31ebe94..6e5a46c736a1 100644
--- a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
@@ -57,7 +57,7 @@ RecentMasterPagesSelector::RecentMasterPagesSelector (
ViewShellBase& rBase,
const std::shared_ptr<MasterPageContainer>& rpContainer,
const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
- : MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar)
+ : MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar, "modules/simpress/ui/masterpagepanelrecent.ui", "recentvalueset")
{
}
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index b0b8163ff57d..dc3b3bef239a 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/presentation/SlideShow.hpp>
#include <com/sun/star/media/XPlayer.hpp>
+#include <officecfg/Office/Common.hxx>
#include <svl/stritem.hxx>
#include <svl/urihelper.hxx>
#include <unotools/saveopt.hxx>
@@ -531,10 +532,8 @@ SlideshowImpl::SlideshowImpl( const Reference< XPresentation2 >& xPresentation,
maInputFreezeTimer.SetInvokeHandler( LINK( this, SlideshowImpl, ReadyForNextInputHdl ) );
maInputFreezeTimer.SetTimeout( 20 );
- SvtSaveOptions aOptions;
-
// no autosave during show
- if( aOptions.IsAutoSave() )
+ if( officecfg::Office::Common::Save::Document::AutoSave::get() )
mbAutoSaveWasOn = true;
Application::AddEventListener( LINK( this, SlideshowImpl, EventListenerHdl ) );
@@ -1005,7 +1004,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx const * pPresSettings )
beans::PropertyState_DIRECT_VALUE );
if( mbUsePen )
- {
+ {
aProperties.emplace_back( "UserPaintColor" ,
// User paint color is black by default.
-1, Any( mnUserPaintColor ),
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index 3f47b7663f2c..3016d4b977e0 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -344,7 +344,7 @@ void PreviewRenderer::PaintFrame()
mpPreviewDevice->SetFillColor();
mpPreviewDevice->DrawRect(aPaintRectangle);
mpPreviewDevice->EnableMapMode();
- }
+ }
}
void PreviewRenderer::SetupOutputSize (
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index 666fbacdf623..1f5554502412 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -779,7 +779,7 @@ DocumentSettings::_setPropertyValues(const PropertyMapEntry** ppEntries,
pItemSet = std::make_unique<SfxItemSet>(pDoc->GetPool(),
svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
- ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT>{} );
+ ATTR_OPTIONS_PRINT, ATTR_OPTIONS_PRINT> );
}
pPrinter = SfxPrinter::Create ( aStream, std::move(pItemSet) );
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 006a9cad3347..91c9254eb39a 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/embed/Aspects.hpp>
+#include <officecfg/Office/Common.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
@@ -2470,7 +2471,9 @@ void SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequence<cs
// be saved..." dialog appears, it is auto-cancelled with tiled rendering,
// causing 'Save' being disabled; so let's always save to the original
// format
- SvtSaveOptions().SetWarnAlienFormat(false);
+ auto xChanges = comphelper::ConfigurationChanges::create();
+ officecfg::Office::Common::Save::Document::WarnAlienFormat::set(false, xChanges);
+ xChanges->commit();
if (!getenv("LO_TESTNAME"))
SvtSlideSorterBarOptions().SetVisibleImpressView(true);
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index dff577534ed5..49bdbc6e94b6 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -894,7 +894,7 @@ void SdXShape::SetEmptyPresObj(bool bEmpty)
if(!bEmpty)
{
OutlinerParaObject* pOutlinerParaObject = pObj->GetOutlinerParaObject();
- const bool bVertical = pOutlinerParaObject && pOutlinerParaObject->IsVertical();
+ const bool bVertical = pOutlinerParaObject && pOutlinerParaObject->IsEffectivelyVertical();
// really delete SdrOutlinerObj at pObj
pObj->NbcSetOutlinerParaObject(nullptr);
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 416370d56ae4..f774fad439ef 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -2430,7 +2430,7 @@ void SdDrawPage::setBackground( const Any& rValue )
// is it our own implementation?
SdUnoPageBackground* pBack = comphelper::getUnoTunnelImplementation<SdUnoPageBackground>( xSet );
- SfxItemSet aSet( GetModel()->GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{} );
+ SfxItemSet aSet( GetModel()->GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST> );
if( pBack )
{
@@ -2798,7 +2798,7 @@ void SdMasterPage::setBackground( const Any& rValue )
// is it our own implementation?
SdUnoPageBackground* pBack = comphelper::getUnoTunnelImplementation<SdUnoPageBackground>( xInputSet );
- SfxItemSet aSet( GetModel()->GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{} );
+ SfxItemSet aSet( GetModel()->GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST> );
if( pBack )
{
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index 573e22411066..646f6db0cb44 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -57,7 +57,7 @@ SdUnoPageBackground::SdUnoPageBackground(
if( pDoc )
{
StartListening( *pDoc );
- mpSet = std::make_unique<SfxItemSet>( pDoc->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{} );
+ mpSet = std::make_unique<SfxItemSet>( pDoc->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST> );
if( pSet )
mpSet->Put(*pSet);
@@ -96,7 +96,7 @@ void SdUnoPageBackground::fillItemSet( SdDrawDocument* pDoc, SfxItemSet& rSet )
StartListening( *pDoc );
mpDoc = pDoc;
- mpSet = std::make_unique<SfxItemSet>( *rSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{} );
+ mpSet = std::make_unique<SfxItemSet>( *rSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST> );
if( mpPropSet->AreThereOwnUsrAnys() )
{
@@ -211,7 +211,7 @@ void SAL_CALL SdUnoPageBackground::setPropertyValue( const OUString& aPropertyNa
}
SfxItemPool& rPool = *mpSet->GetPool();
- SfxItemSet aSet( rPool, {{pEntry->nWID, pEntry->nWID}});
+ SfxItemSet aSet( rPool, pEntry->nWID, pEntry->nWID);
aSet.Put( *mpSet );
if( !aSet.Count() )
@@ -271,7 +271,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyValue( const OUString& Propert
else
{
SfxItemPool& rPool = *mpSet->GetPool();
- SfxItemSet aSet( rPool, {{pEntry->nWID, pEntry->nWID}});
+ SfxItemSet aSet( rPool, pEntry->nWID, pEntry->nWID);
aSet.Put( *mpSet );
if( !aSet.Count() )
@@ -393,7 +393,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyDefault( const OUString& aProp
else
{
SfxItemPool& rPool = *mpSet->GetPool();
- SfxItemSet aSet(rPool, { { pEntry->nWID, pEntry->nWID } });
+ SfxItemSet aSet(rPool, pEntry->nWID, pEntry->nWID);
aSet.Put(rPool.GetDefaultItem(pEntry->nWID));
aAny = SvxItemPropertySet_getPropertyValue(pEntry, aSet);
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index f8e1da8f02dc..271429c8cdaf 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -448,9 +448,9 @@ uno::Reference< text::XTextRange > SdUnoSearchReplaceShape::Search( const uno::
if( xEnumAccess.is() )
{
- uno::Reference< container::XEnumeration > xPortionEnum( xEnumAccess->createEnumeration() );
- if( xPortionEnum.is() )
- {
+ uno::Reference< container::XEnumeration > xPortionEnum( xEnumAccess->createEnumeration() );
+ if( xPortionEnum.is() )
+ {
while(xPortionEnum->hasMoreElements())
{
uno::Reference< text::XTextRange > xPortion( xPortionEnum->nextElement(), uno::UNO_QUERY );
diff --git a/sd/source/ui/view/GraphicObjectBar.cxx b/sd/source/ui/view/GraphicObjectBar.cxx
index b3f9b1468b28..60cab73f7b06 100644
--- a/sd/source/ui/view/GraphicObjectBar.cxx
+++ b/sd/source/ui/view/GraphicObjectBar.cxx
@@ -130,7 +130,7 @@ void GraphicObjectBar::ExecuteFilter( SfxRequest const & rReq )
return;
}
}
- }
+ }
}
Invalidate();
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 0628fd865420..7f4039a0fc5d 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -882,7 +882,7 @@ void ViewShellManager::Implementation::CreateShells()
}
}
}
- }
+ }
}
void ViewShellManager::Implementation::CreateTargetStack (ShellStack& rStack) const
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 1f64da0b7e1c..312e08f29521 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -37,6 +37,8 @@
#include <svl/stritem.hxx>
#include <svl/style.hxx>
#include <svl/languageoptions.hxx>
+#include <svl/cjkoptions.hxx>
+#include <svl/ctloptions.hxx>
#include <sfx2/tplpitem.hxx>
#include <editeng/escapementitem.hxx>
#include <svx/svdoutl.hxx>
@@ -118,7 +120,7 @@ void TextObjectBar::GetCharState( SfxItemSet& rSet )
SfxItemSet aCharAttrSet( mpView->GetDoc().GetPool() );
mpView->GetAttributes( aCharAttrSet );
- SfxItemSet aNewAttr( mpViewShell->GetPool(),svl::Items<EE_ITEMS_START,EE_ITEMS_END>{});
+ SfxItemSet aNewAttr( mpViewShell->GetPool(),svl::Items<EE_ITEMS_START,EE_ITEMS_END>);
aNewAttr.Put(aCharAttrSet, false);
rSet.Put(aNewAttr, false);
@@ -142,9 +144,8 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
SfxWhichIter aIter( rSet );
sal_uInt16 nWhich = aIter.FirstWhich();
SfxItemSet aAttrSet( mpView->GetDoc().GetPool() );
- SvtLanguageOptions aLangOpt;
- bool bDisableParagraphTextDirection = !aLangOpt.IsCTLFontEnabled();
- bool bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled();
+ bool bDisableParagraphTextDirection = !SvtCTLOptions().IsCTLFontEnabled();
+ bool bDisableVerticalText = !SvtCJKOptions().IsVerticalTextEnabled();
mpView->GetAttributes( aAttrSet );
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 09f37d6a2872..1646df14d46b 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -357,7 +357,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>(pArgs->Get(
GetPool().GetWhich(SID_ATTR_PARA_LRSPACE)));
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE> );
aLRSpace.SetWhich( EE_PARA_LRSPACE );
aEditAttr.Put( aLRSpace );
@@ -369,7 +369,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
case SID_HANGING_INDENT:
{
- SfxItemSet aLRSpaceSet( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
+ SfxItemSet aLRSpaceSet( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE> );
mpView->GetAttributes( aLRSpaceSet );
SvxLRSpaceItem aParaMargin( aLRSpaceSet.Get( EE_PARA_LRSPACE ) );
@@ -417,7 +417,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
// tdf#131571: SdrEndTextEdit invalidates pTextEditOutlinerView, the pointer retrieved for pOLV
// so reinitialize pOLV
pOLV=mpView->GetTextEditOutlinerView();
- SfxItemSet aAttr( mpView->GetDoc().GetPool(), svl::Items<SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION>{} );
+ SfxItemSet aAttr( mpView->GetDoc().GetPool(), svl::Items<SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION> );
aAttr.Put( SvxWritingModeItem(
nSlot == SID_TEXTDIRECTION_LEFT_TO_RIGHT ?
css::text::WritingMode_LR_TB : css::text::WritingMode_TB_RL,
@@ -488,7 +488,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
aNewRule.SetLevel(nLevel, aFmt);
}
- pFirstStyleSheet->GetItemSet().Put(SvxNumBulletItem(aNewRule, EE_PARA_NUMBULLET));
+ pFirstStyleSheet->GetItemSet().Put(SvxNumBulletItem(std::move(aNewRule), EE_PARA_NUMBULLET));
SdStyleSheet::BroadcastSdStyleSheetChange(pFirstStyleSheet, PresentationObjects::Outline_1, pSSPool);
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 5a68e30abab9..00f32b6d57b6 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -438,7 +438,7 @@ private:
nParagraph++;
pOutliner->Insert("");
- SfxItemSet aItemSet(m_rDrawViewShell.GetDoc()->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{});
+ SfxItemSet aItemSet(m_rDrawViewShell.GetDoc()->GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>);
if (rResult.msName == "BOLD")
aItemSet.Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT));
@@ -446,7 +446,7 @@ private:
aItemSet.Put(SvxWeightItem(WEIGHT_NORMAL, EE_CHAR_WEIGHT));
SvxNumRule aDefaultNumRule(SvxNumRuleFlags::NONE, 0, false);
- aItemSet.Put(SvxNumBulletItem(aDefaultNumRule, EE_PARA_NUMBULLET));
+ aItemSet.Put(SvxNumBulletItem(std::move(aDefaultNumRule), EE_PARA_NUMBULLET));
pOutliner->SetParaAttribs(nParagraph, aItemSet);
}
@@ -729,7 +729,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( pItem )
{
- SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
+ SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE> );
bool bValue = pItem->GetValue();
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
mpDrawView->SetAttributes( aSet );
@@ -737,7 +737,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
else // only for testing purpose
{
OSL_FAIL(" no value for hyphenation!");
- SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
+ SfxItemSet aSet( GetPool(), svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE> );
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, true ) );
mpDrawView->SetAttributes( aSet );
}
@@ -1238,11 +1238,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_SET_DEFAULT:
{
- std::unique_ptr<SfxItemSet> pSet;
+ std::optional<SfxItemSet> pSet;
if (mpDrawView->IsTextEdit())
{
- pSet.reset(new SfxItemSet( GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} ));
+ pSet.emplace( GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END> );
mpDrawView->SetAttributes( *pSet, true );
}
else
@@ -1263,13 +1263,13 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( pPresPage->IsPresObj( pObj ) )
{
- auto pNewSet = std::make_unique<SfxItemSet>( GetDoc()->GetPool(), svl::Items<SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT>{} );
+ auto pNewSet = std::make_unique<SfxItemSet>( GetDoc()->GetPool(), svl::Items<SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT> );
pNewSet->Put(pObj->GetMergedItemSet());
aAttrList.emplace_back(std::move(pNewSet), pObj->GetUserCall());
}
}
- pSet.reset(new SfxItemSet( GetPool() ));
+ pSet.emplace( GetPool() );
mpDrawView->SetAttributes( *pSet, true );
sal_uLong j = 0;
@@ -1805,7 +1805,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_CONNECTION_NEW_ROUTING:
{
- SfxItemSet aDefAttr( GetPool(), svl::Items<SDRATTR_EDGELINE1DELTA, SDRATTR_EDGELINE3DELTA>{} );
+ SfxItemSet aDefAttr( GetPool(), svl::Items<SDRATTR_EDGELINE1DELTA, SDRATTR_EDGELINE3DELTA> );
GetView()->SetAttributes( aDefAttr, true ); // (ReplaceAll)
Cancel();
@@ -1924,7 +1924,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (! pArgs)
{
- SfxItemSet aNewAttr( GetDoc()->GetPool(), svl::Items<ATTR_LAYER_START, ATTR_LAYER_END>{} );
+ SfxItemSet aNewAttr( GetDoc()->GetPool(), svl::Items<ATTR_LAYER_START, ATTR_LAYER_END> );
aNewAttr.Put( makeSdAttrLayerName( aLayerName ) );
aNewAttr.Put( makeSdAttrLayerTitle() );
@@ -2077,7 +2077,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (! pArgs)
{
- SfxItemSet aNewAttr( GetDoc()->GetPool(), svl::Items<ATTR_LAYER_START, ATTR_LAYER_END>{} );
+ SfxItemSet aNewAttr( GetDoc()->GetPool(), svl::Items<ATTR_LAYER_START, ATTR_LAYER_END> );
aNewAttr.Put( makeSdAttrLayerName( aLayerName ) );
aNewAttr.Put( makeSdAttrLayerTitle( aLayerTitle ) );
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 08868977b473..bf8483c15596 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -714,7 +714,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
{
const SvxTabStopItem& rItem = pArgs->Get( EE_PARA_TABS );
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_TABS, EE_PARA_TABS>{} );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_TABS, EE_PARA_TABS> );
aEditAttr.Put( rItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -728,7 +728,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
SvxLineSpacingItem aParaLineSP = static_cast<const SvxLineSpacingItem&>(pArgs->Get(
GetPool().GetWhich(SID_ATTR_PARA_LINESPACE)));
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_SBL, EE_PARA_SBL>{} );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_SBL, EE_PARA_SBL> );
aParaLineSP.SetWhich( EE_PARA_SBL );
aEditAttr.Put( aParaLineSP );
@@ -740,7 +740,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
case SID_ATTR_PARA_ADJUST_LEFT:
{
SvxAdjustItem aItem( SvxAdjust::Left, EE_PARA_JUST );
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST>{} );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST> );
aEditAttr.Put( aItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -751,7 +751,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
case SID_ATTR_PARA_ADJUST_CENTER:
{
SvxAdjustItem aItem( SvxAdjust::Center, EE_PARA_JUST );
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST>{} );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST> );
aEditAttr.Put( aItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -762,7 +762,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
case SID_ATTR_PARA_ADJUST_RIGHT:
{
SvxAdjustItem aItem( SvxAdjust::Right, EE_PARA_JUST );
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST>{} );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST> );
aEditAttr.Put( aItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -773,7 +773,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
case SID_ATTR_PARA_ADJUST_BLOCK:
{
SvxAdjustItem aItem( SvxAdjust::Block, EE_PARA_JUST );
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST>{} );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_JUST, EE_PARA_JUST> );
aEditAttr.Put( aItem );
mpDrawView->SetAttributes( aEditAttr );
@@ -786,7 +786,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
{
SvxULSpaceItem aULSP = static_cast<const SvxULSpaceItem&>(pArgs->Get(
GetPool().GetWhich(SID_ATTR_PARA_ULSPACE)));
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_ULSPACE, EE_PARA_ULSPACE>{} );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_ULSPACE, EE_PARA_ULSPACE> );
aULSP.SetWhich( EE_PARA_ULSPACE );
aEditAttr.Put( aULSP );
@@ -801,7 +801,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>(pArgs->Get(
GetPool().GetWhich(SID_ATTR_PARA_LRSPACE)));
- SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
+ SfxItemSet aEditAttr( GetPool(), svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE> );
aLRSpace.SetWhich( EE_PARA_LRSPACE );
aEditAttr.Put( aLRSpace );
@@ -817,13 +817,10 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
const SvxLRSpaceItem& rItem = static_cast<const SvxLRSpaceItem&>(
pArgs->Get( nId ));
- static const sal_uInt16 aWhichTable[]=
- {
- EE_PARA_OUTLLEVEL, EE_PARA_OUTLLEVEL,
- EE_PARA_LRSPACE, EE_PARA_LRSPACE,
+ static const auto aWhichTable = svl::Items<
EE_PARA_NUMBULLET, EE_PARA_NUMBULLET,
- 0, 0
- };
+ EE_PARA_OUTLLEVEL, EE_PARA_OUTLLEVEL,
+ EE_PARA_LRSPACE, EE_PARA_LRSPACE>;
SfxItemSet aEditAttr( GetDoc()->GetPool(),
aWhichTable );
@@ -890,7 +887,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
// only put lrSpace item
SfxItemSet aEditAttrReduced( GetDoc()->GetPool(),
- svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE>{} );
+ svl::Items<EE_PARA_LRSPACE, EE_PARA_LRSPACE> );
aEditAttrReduced.Put( aLRSpaceItem );
mpDrawView->SetAttributes( aEditAttrReduced );
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 2baed5669dae..7cf042178d73 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -832,7 +832,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
{
SfxBindings& rBindings = GetViewFrame()->GetBindings();
// tdf#137445 set what the menu popup state for this was
- moAtContextMenu_DisableEditHyperlink = bShouldDisableEditHyperlink;
+ EnableEditHyperlink();
// ensure moAtContextMenu_DisableEditHyperlink will be cleared
// in the case that EditHyperlink is not dispatched by the menu
rBindings.Invalidate(SID_EDIT_HYPERLINK);
@@ -845,6 +845,11 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
}
}
+void DrawViewShell::EnableEditHyperlink()
+{
+ moAtContextMenu_DisableEditHyperlink = false;
+}
+
void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect,
::sd::Window const * pWin)
{
@@ -900,7 +905,7 @@ void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect,
GetPool(),
svl::Items<
SID_CONTEXT, SID_CONTEXT,
- SID_ATTR_POSITION, SID_ATTR_SIZE>{});
+ SID_ATTR_POSITION, SID_ATTR_SIZE>);
GetStatusBarState(aSet);
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 141910870d63..1f1263fd99bb 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -57,6 +57,7 @@
#include <svtools/insdlg.hxx>
#include <unotools/moduleoptions.hxx>
#include <svl/languageoptions.hxx>
+#include <svl/cjkoptions.hxx>
#include <comphelper/processfactory.hxx>
#include <sfx2/request.hxx>
@@ -282,7 +283,7 @@ void DrawViewShell::GetMarginProperties( SfxItemSet &rSet )
}
}
-bool DrawViewShell::ShouldDisableEditHyperlink()
+bool DrawViewShell::ShouldDisableEditHyperlink() const
{
if (!mpDrawView)
return true;
@@ -331,7 +332,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
ViewShell::GetMenuState(rSet);
- bool bDisableVerticalText = !SvtLanguageOptions().IsVerticalTextEnabled();
+ bool bDisableVerticalText = !SvtCJKOptions().IsVerticalTextEnabled();
if ( bDisableVerticalText )
{
@@ -1588,7 +1589,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
SdPage* pPage = GetActualPage();
if (pPage != nullptr && GetDoc() != nullptr)
{
- SfxItemSet aMergedAttr(GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
+ SfxItemSet aMergedAttr(GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>);
SdStyleSheet* pStyleSheet = pPage->getPresentationStyle(HID_PSEUDOSHEET_BACKGROUND);
MergePageBackgroundFilling(pPage, pStyleSheet, meEditMode == EditMode::MasterPage, aMergedAttr);
if (drawing::FillStyle_BITMAP == aMergedAttr.Get(XATTR_FILLSTYLE).GetValue())
@@ -1836,7 +1837,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
XFillGradientItem aGradientItem( XGradient::fromJSON(pJSON->GetValue()) );
// MigrateItemSet guarantees unique gradient names
- SfxItemSet aMigrateSet( mpDrawView->GetModel()->GetItemPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT>{} );
+ SfxItemSet aMigrateSet( mpDrawView->GetModel()->GetItemPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT> );
aMigrateSet.Put( aGradientItem );
SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDrawView->GetModel() );
@@ -1848,7 +1849,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
XFillGradientItem aGradientItem( pArgs->Get( XATTR_FILLGRADIENT ) );
// MigrateItemSet guarantees unique gradient names
- SfxItemSet aMigrateSet( mpDrawView->GetModel()->GetItemPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT>{} );
+ SfxItemSet aMigrateSet( mpDrawView->GetModel()->GetItemPool(), svl::Items<XATTR_FILLGRADIENT, XATTR_FILLGRADIENT> );
aMigrateSet.Put( aGradientItem );
SdrModel::MigrateItemSet( &aMigrateSet, pTempSet.get(), mpDrawView->GetModel() );
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 9fb69869a0da..5e5a3ff38514 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1653,6 +1653,10 @@ namespace slideshowhelp
//use it whether or not we've been asked to
//start from the current or first slide
xPresentation->start();
+
+ // if the custom show not set by default, only show it.
+ if (rDoc.getPresentationSettings().mbStartCustomShow)
+ rDoc.getPresentationSettings().mbCustomShow = false;
}
else if (SID_PRESENTATION_CURRENT_SLIDE == rReq.GetSlot())
{
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 3afa8848ef2b..220fb33ab6bf 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -613,7 +613,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
SfxItemSet aEditAttr( GetDoc()->GetPool() );
mpDrawView->GetAttributes( aEditAttr );
- SfxItemSet aNewAttr( GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} );
+ SfxItemSet aNewAttr( GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END> );
aNewAttr.Put( aEditAttr, false );
std::unique_ptr<SvxNumRule> pNumRule;
@@ -714,11 +714,11 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
nWhich = aIter.NextWhich();
}
- std::unique_ptr<SfxItemSet> pSet;
+ std::optional<SfxItemSet> pSet;
if( bAttr )
{
- pSet.reset(new SfxItemSet( GetDoc()->GetPool() ));
+ pSet.emplace( GetDoc()->GetPool() );
mpDrawView->GetAttributes( *pSet );
rSet.Put( *pSet, false );
}
diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx
index e83e175a9d9f..832fad9e1b01 100644
--- a/sd/source/ui/view/drviewsi.cxx
+++ b/sd/source/ui/view/drviewsi.cxx
@@ -108,7 +108,7 @@ void DrawViewShell::AssignFrom3DWindow()
if(!GetView()->IsPresObjSelected())
{
SfxItemSet aSet( GetDoc()->GetPool(),
- svl::Items<SDRATTR_START, SDRATTR_END>{});
+ svl::Items<SDRATTR_START, SDRATTR_END>);
p3DWin->GetAttr( aSet );
// own UNDO-compounding also around transformation in 3D
@@ -118,7 +118,7 @@ void DrawViewShell::AssignFrom3DWindow()
{
// assign only text-attribute
SfxItemSet aTextSet( GetDoc()->GetPool(),
- svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} );
+ svl::Items<EE_ITEMS_START, EE_ITEMS_END> );
aTextSet.Put( aSet, false );
GetView()->SetAttributes( aTextSet );
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index 47cbb175ddf4..9eebdbc57c29 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -271,7 +271,8 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
if( SfxItemState::DEFAULT == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) )
{
const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- const bool bSet = pObj->GetMergedItemSet().GetItem<SdrTextFitToSizeTypeItem>(SDRATTR_TEXT_FITTOSIZE)->GetValue() != drawing::TextFitToSizeType_NONE;
+ const SdrTextFitToSizeTypeItem* pItem = pObj->GetMergedItemSet().GetItem<SdrTextFitToSizeTypeItem>(SDRATTR_TEXT_FITTOSIZE);
+ const bool bSet = pItem && pItem->GetValue() != drawing::TextFitToSizeType_NONE;
rSet.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT, bSet));
}
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index ed810ca0f4fe..7a423c0d96df 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -820,7 +820,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
// does the selection provide a unique presentation layout?
// if not, the templates must not be edited
- SfxItemSet aSet(*rSet.GetPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>{});
+ SfxItemSet aSet(*rSet.GetPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>);
GetStatusBarState(aSet);
OUString aTest = static_cast<const SfxStringItem&>(aSet.Get(SID_STATUS_LAYOUT)).GetValue();
if (aTest.isEmpty())
@@ -1466,7 +1466,7 @@ void OutlineViewShell::GetAttrState( SfxItemSet& rSet )
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get());
if (pFamilyItem && static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Pseudo)
{
- SfxItemSet aSet(*rSet.GetPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>{});
+ SfxItemSet aSet(*rSet.GetPool(), svl::Items<SID_STATUS_LAYOUT, SID_STATUS_LAYOUT>);
GetStatusBarState(aSet);
OUString aRealStyle = static_cast<const SfxStringItem&>(aSet.Get(SID_STATUS_LAYOUT)).GetValue();
if (aRealStyle.isEmpty())
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 210df149cd8a..6234d7bfe298 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1021,7 +1021,7 @@ void OutlineView::FillOutliner()
OutlinerParaObject* pOPO = pTO->GetOutlinerParaObject();
if (pOPO)
{
- bool bVertical = pOPO->IsVertical();
+ bool bVertical = pOPO->IsEffectivelyVertical();
pOPO->SetVertical( false );
mrOutliner.AddText(*pOPO);
pOPO->SetVertical( bVertical );
@@ -1064,7 +1064,7 @@ void OutlineView::FillOutliner()
if (pOPO)
{
sal_Int32 nParaCount1 = mrOutliner.GetParagraphCount();
- bool bVertical = pOPO->IsVertical();
+ bool bVertical = pOPO->IsEffectivelyVertical();
pOPO->SetVertical( false );
mrOutliner.AddText(*pOPO);
pOPO->SetVertical( bVertical );
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 8470118e6ceb..d2b9816f40e9 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -34,6 +34,7 @@
#include <vcl/settings.hxx>
+#include <officecfg/Office/Common.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdoutl.hxx>
@@ -79,6 +80,7 @@
#include <sfx2/lokhelper.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <DrawController.hxx>
+#include <svtools/optionsdrawinglayer.hxx>
#include <memory>
#include <numeric>
@@ -107,10 +109,10 @@ View::View(
mpClipboard (new ViewClipboard (*this))
{
// #i73602# Use default from the configuration
- SetBufferedOverlayAllowed(getOptionsDrawinglayer().IsOverlayBuffer_DrawImpress());
+ SetBufferedOverlayAllowed(SvtOptionsDrawinglayer::IsOverlayBuffer_DrawImpress());
// #i74769#, #i75172# Use default from the configuration
- SetBufferedOutputAllowed(getOptionsDrawinglayer().IsPaintBuffer_DrawImpress());
+ SetBufferedOutputAllowed(SvtOptionsDrawinglayer::IsPaintBuffer_DrawImpress());
EnableExtendedKeyInputDispatcher(false);
EnableExtendedMouseEventDispatcher(false);
@@ -960,8 +962,8 @@ bool View::IsMorphingAllowed() const
( nKind1 != OBJ_CAPTION && nKind2 != OBJ_CAPTION ) &&
dynamic_cast< const E3dObject *>( pObj1 ) == nullptr && dynamic_cast< const E3dObject *>( pObj2 ) == nullptr )
{
- SfxItemSet aSet1( mrDoc.GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLSTYLE>{} );
- SfxItemSet aSet2( mrDoc.GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLSTYLE>{} );
+ SfxItemSet aSet1( mrDoc.GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLSTYLE> );
+ SfxItemSet aSet2( mrDoc.GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLSTYLE> );
aSet1.Put(pObj1->GetMergedItemSet());
aSet2.Put(pObj2->GetMergedItemSet());
@@ -1010,8 +1012,6 @@ void View::onAccessibilityOptionsChanged()
const StyleSettings& rStyleSettings = pWindow->GetSettings().GetStyleSettings();
- SvtAccessibilityOptions& aAccOptions = getAccessibilityOptions();
-
if( mpViewSh->GetViewFrame() && mpViewSh->GetViewFrame()->GetDispatcher() )
{
sal_uInt16 nOutputSlot, nPreviewSlot;
@@ -1025,7 +1025,8 @@ void View::onAccessibilityOptionsChanged()
nOutputSlot = SID_OUTPUT_QUALITY_COLOR;
}
- if( rStyleSettings.GetHighContrastMode() && aAccOptions.GetIsForPagePreviews() )
+ if( rStyleSettings.GetHighContrastMode()
+ && officecfg::Office::Common::Accessibility::IsForPagePreviews::get() )
{
nPreviewSlot = SID_PREVIEW_QUALITY_CONTRAST;
}
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 4bac17745309..8bbb9ce7e24f 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -782,8 +782,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( dynamic_cast< E3dObject *>( pPickObj ) != nullptr && dynamic_cast< E3dObject *>( pObj ) != nullptr )
{
// handle 3D attribute in addition
- SfxItemSet aNewSet( mrDoc.GetPool(), svl::Items<SID_ATTR_3D_START, SID_ATTR_3D_END>{} );
- SfxItemSet aOldSet( mrDoc.GetPool(), svl::Items<SID_ATTR_3D_START, SID_ATTR_3D_END>{} );
+ SfxItemSet aNewSet( mrDoc.GetPool(), svl::Items<SID_ATTR_3D_START, SID_ATTR_3D_END> );
+ SfxItemSet aOldSet( mrDoc.GetPool(), svl::Items<SID_ATTR_3D_START, SID_ATTR_3D_END> );
aOldSet.Put(pPickObj->GetMergedItemSet());
aNewSet.Put( pObj->GetMergedItemSet() );
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 6a7c49224052..bc6e48286889 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -161,7 +161,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
EndUndo();
}
- SfxItemSet aSet(mpDocSh->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLBITMAP>{});
+ SfxItemSet aSet(mpDocSh->GetPool(), svl::Items<XATTR_FILLSTYLE, XATTR_FILLBITMAP>);
aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
aSet.Put(XFillBitmapItem(rGraphic));
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 765bf7bed661..8c0d58f50cec 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -42,6 +42,7 @@
#include <ViewShellBase.hxx>
#include <uiobject.hxx>
+#include <officecfg/Office/Common.hxx>
#include <sal/log.hxx>
#include <tools/debug.hxx>
#include <vcl/commandevent.hxx>
@@ -629,7 +630,7 @@ void Window::UpdateMapMode()
*/
double Window::GetVisibleX() const
{
- return (static_cast<double>(maWinPos.X()) / maViewSize.Width());
+ return maViewSize.Width() == 0 ? 0 : (static_cast<double>(maWinPos.X()) / maViewSize.Width());
}
/**
@@ -638,7 +639,7 @@ double Window::GetVisibleX() const
*/
double Window::GetVisibleY() const
{
- return (static_cast<double>(maWinPos.Y()) / maViewSize.Height());
+ return maViewSize.Height() == 0 ? 0 : (static_cast<double>(maWinPos.Y()) / maViewSize.Height());
}
/**
@@ -668,7 +669,8 @@ double Window::GetVisibleWidth() const
Size aWinSize = PixelToLogic(GetOutputSizePixel());
if ( aWinSize.Width() > maViewSize.Width() )
aWinSize.setWidth( maViewSize.Width() );
- return (static_cast<double>(aWinSize.Width()) / maViewSize.Width());
+ return
+ maViewSize.Width() == 0 ? 0 : (static_cast<double>(aWinSize.Width()) / maViewSize.Width());
}
/**
@@ -680,7 +682,8 @@ double Window::GetVisibleHeight() const
Size aWinSize = PixelToLogic(GetOutputSizePixel());
if ( aWinSize.Height() > maViewSize.Height() )
aWinSize.setHeight( maViewSize.Height() );
- return (static_cast<double>(aWinSize.Height()) / maViewSize.Height());
+ return maViewSize.Height() == 0
+ ? 0 : (static_cast<double>(aWinSize.Height()) / maViewSize.Height());
}
Point Window::GetVisibleCenter()
@@ -781,7 +784,6 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt )
if( mpViewShell )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- SvtAccessibilityOptions aAccOptions;
DrawModeFlags nOutputMode;
sal_uInt16 nPreviewSlot;
@@ -790,7 +792,8 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt )
else
nOutputMode = sd::OUTPUT_DRAWMODE_COLOR;
- if( rStyleSettings.GetHighContrastMode() && aAccOptions.GetIsForPagePreviews() )
+ if( rStyleSettings.GetHighContrastMode()
+ && officecfg::Office::Common::Accessibility::IsForPagePreviews::get() )
nPreviewSlot = SID_PREVIEW_QUALITY_CONTRAST;
else
nPreviewSlot = SID_PREVIEW_QUALITY_COLOR;
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index 3e7f187ea506..d1db1e73a194 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -90,8 +90,8 @@ const std::u16string_view aBigPlaceHolders[] =
static BitmapEx* getButtonImage( int index, bool large )
{
- static vcl::DeleteOnDeinit< BitmapEx > gSmallButtonImages[SAL_N_ELEMENTS(aSmallPlaceHolders)] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
- static vcl::DeleteOnDeinit< BitmapEx > gLargeButtonImages[SAL_N_ELEMENTS(aBigPlaceHolders)] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
+ static vcl::DeleteOnDeinit< BitmapEx > gSmallButtonImages[SAL_N_ELEMENTS(aSmallPlaceHolders)] = { vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty };
+ static vcl::DeleteOnDeinit< BitmapEx > gLargeButtonImages[SAL_N_ELEMENTS(aBigPlaceHolders)] = { vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty };
assert(SAL_N_ELEMENTS(aSmallPlaceHolders) == SAL_N_ELEMENTS(aBigPlaceHolders));
@@ -99,8 +99,8 @@ static BitmapEx* getButtonImage( int index, bool large )
{
for (size_t i = 0; i < SAL_N_ELEMENTS(aSmallPlaceHolders); i++ )
{
- gSmallButtonImages[i].set(std::make_unique<BitmapEx>(OUString(aSmallPlaceHolders[i])));
- gLargeButtonImages[i].set(std::make_unique<BitmapEx>(OUString(aBigPlaceHolders[i])));
+ gSmallButtonImages[i].set(OUString(aSmallPlaceHolders[i]));
+ gLargeButtonImages[i].set(OUString(aBigPlaceHolders[i]));
}
}
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 7f481d9677bc..3a23edd1bb35 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -82,6 +82,7 @@
#include <editeng/eeitem.hxx>
#include <editeng/editview.hxx>
#include <editeng/editeng.hxx>
+#include <svl/itempool.hxx>
#include <svl/intitem.hxx>
#include <svl/poolitem.hxx>
#include <strings.hxx>
@@ -857,7 +858,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16&
SvxNumRule aNewRule( rRule );
aNewRule.SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS );
- SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
+ SvxNumBulletItem aNewItem( std::move(aNewRule), EE_PARA_NUMBULLET );
aNewAttr.Put(aNewItem);
}