core.git: sd/inc sd/qa

2024-05-30 Thread Noel Grandin (via logerrit)
 sd/inc/viewopt.hxx |2 
 sd/qa/filter/eppt/eppt.cxx |   34 -
 sd/qa/unit/HtmlExportTest.cxx  |   21 
 sd/qa/unit/PNGExportTests.cxx  |  184 +++---
 sd/qa/unit/SVGExportTests.cxx  |  100 +--
 sd/qa/unit/SdrPdfImportTest.cxx|   12 
 sd/qa/unit/ShapeImportExportTest.cxx   |   48 -
 sd/qa/unit/TextFittingTest.cxx |2 
 sd/qa/unit/ThemeTest.cxx   |   14 
 sd/qa/unit/a11y/layout.cxx |  133 ++--
 sd/qa/unit/activex-controls-tests.cxx  |  494 +-
 sd/qa/unit/dialogs-test.cxx|4 
 sd/qa/unit/export-tests-ooxml1.cxx |  654 
 sd/qa/unit/export-tests-ooxml2.cxx |  675 -
 sd/qa/unit/export-tests-ooxml3.cxx |  406 +++
 sd/qa/unit/export-tests-ooxml4.cxx |  372 ++---
 sd/qa/unit/export-tests.cxx|  658 +---
 sd/qa/unit/filters-test.cxx|   22 
 sd/qa/unit/import-tests-smartart.cxx   |  370 ++---
 sd/qa/unit/import-tests.cxx|  313 +--
 sd/qa/unit/import-tests2.cxx   |  276 +-
 sd/qa/unit/import-tests_skia.cxx   |2 
 sd/qa/unit/layout-tests.cxx|   81 +--
 sd/qa/unit/misc-tests.cxx  |  160 +++--
 sd/qa/unit/sdmodeltestbase.hxx |   10 
 sd/qa/unit/tiledrendering/LOKitSearchTest.cxx  |  176 +++---
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |  202 +++
 sd/qa/unit/tiledrendering2/tiledrendering2.cxx |4 
 sd/qa/unit/uiimpress.cxx   |  210 +++
 29 files changed, 2874 insertions(+), 2765 deletions(-)

New commits:
commit 782eda5992585a2a67f28d4453c7994f01b41ad9
Author: Noel Grandin 
AuthorDate: Thu May 30 12:38:07 2024 +0200
Commit: Noel Grandin 
CommitDate: Thu May 30 21:03:47 2024 +0200

loplugin:ostr in sd

Change-Id: Icfd8d1eb21953f44fb7bfb62188247e911734bbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168252
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/viewopt.hxx b/sd/inc/viewopt.hxx
index 03ebd2ada659..eb9f16513624 100644
--- a/sd/inc/viewopt.hxx
+++ b/sd/inc/viewopt.hxx
@@ -28,7 +28,7 @@ struct SdViewOptions
 // The color of the document background
 Color mnDocBackgroundColor;
 // The name of the color scheme
-OUString msColorSchemeName = "Default";
+OUString msColorSchemeName = u"Default"_ustr;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/qa/filter/eppt/eppt.cxx b/sd/qa/filter/eppt/eppt.cxx
index b84630c971fe..198f2816b534 100644
--- a/sd/qa/filter/eppt/eppt.cxx
+++ b/sd/qa/filter/eppt/eppt.cxx
@@ -31,7 +31,7 @@ public:
 };
 
 Test::Test()
-: UnoApiXmlTest("/sd/qa/filter/eppt/data/")
+: UnoApiXmlTest(u"/sd/qa/filter/eppt/data/"_ustr)
 {
 }
 
@@ -39,7 +39,7 @@ CPPUNIT_TEST_FIXTURE(Test, testOOXMLCustomShapeBitmapFill)
 {
 // Save the bugdoc to PPT.
 loadFromFile(u"custom-shape-bitmap-fill.pptx");
-saveAndReload("MS PowerPoint 97");
+saveAndReload(u"MS PowerPoint 97"_ustr);
 
 // Check if the bitmap shape was lost.
 uno::Reference 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -50,14 +50,13 @@ CPPUNIT_TEST_FIXTURE(Test, testOOXMLCustomShapeBitmapFill)
 // - Expected: com.sun.star.drawing.GraphicObjectShape
 // - Actual  : com.sun.star.drawing.CustomShape
 // i.e. the custom shape geometry was kept, but the actual bitmap was lost.
-CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.GraphicObjectShape"),
- xShape->getShapeType());
+CPPUNIT_ASSERT_EQUAL(u"com.sun.star.drawing.GraphicObjectShape"_ustr, 
xShape->getShapeType());
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testThemeExport)
 {
 // Given a document with a master slide and a theme, lt1 is set to 
0x02:
-mxComponent = loadFromDesktop("private:factory/simpress");
+mxComponent = loadFromDesktop(u"private:factory/simpress"_ustr);
 {
 uno::Reference 
xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
 uno::Reference xDrawPage(
@@ -80,16 +79,16 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeExport)
 pColorSet->add(model::ThemeColorType::FollowedHyperlink, 0xcc);
 pTheme->setColorSet(pColorSet);
 
-xMasterPage->setPropertyValue("Theme", 
uno::Any(model::theme::createXTheme(pTheme)));
+xMasterPage->setPropertyValue(u"Theme"_ustr, 
uno::Any(model::theme::createXTheme(pTheme)));
 }
 
 // Export to PPTX and load again:
-saveAndReload("Impress Office Open XML");
+saveAndReload(u"Impress Office Open XML"_ustr);
 
 // Verify that this color is not lost:
-xmlDocUniquePtr pXmlDoc = parseExport("ppt/theme/theme1.xml");
+xmlDocUniquePtr pXmlDoc 

core.git: sd/inc

2024-05-22 Thread Gabor Kelemen (via logerrit)
 sd/inc/sdattr.hrc |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 46b497f5462848c51c8dd204a45128f606425637
Author: Gabor Kelemen 
AuthorDate: Tue May 21 08:56:47 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Wed May 22 16:26:58 2024 +0200

Drop unused ATTR_OPTIONS_SNAP

after commit 563573068fe0835b1fa132d18b53f991be0e15a0

Change-Id: Iafa5ec21cd833ed9b8ebbdaea03086f4fa1784c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167884
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/sd/inc/sdattr.hrc b/sd/inc/sdattr.hrc
index 20958e1b39d6..3bc08b04de81 100644
--- a/sd/inc/sdattr.hrc
+++ b/sd/inc/sdattr.hrc
@@ -102,8 +102,7 @@ class XColorItem;
 #define ATTR_OPTIONS_START  ATTR_SNAPLINE_END + 1
 #define ATTR_OPTIONS_LAYOUT ATTR_OPTIONS_START + 1
 #define ATTR_OPTIONS_MISC   
TypedWhichId(ATTR_OPTIONS_START + 2)
-#define ATTR_OPTIONS_SNAP   ATTR_OPTIONS_START + 3
-#define ATTR_OPTIONS_PRINT  
TypedWhichId(ATTR_OPTIONS_START + 4)
+#define ATTR_OPTIONS_PRINT  
TypedWhichId(ATTR_OPTIONS_START + 3)
 #define ATTR_OPTIONS_ENDATTR_OPTIONS_PRINT
 
 #define ATTR_OPTIONS_SCALE_STARTATTR_OPTIONS_END + 1


core.git: sd/inc sd/source

2024-05-18 Thread Gabor Kelemen (via logerrit)
 sd/inc/sdattr.hrc |2 
 sd/source/ui/app/optsitem.cxx |  167 --
 sd/source/ui/app/sdmod2.cxx   |   10 --
 sd/source/ui/inc/optsitem.hxx |   69 -
 4 files changed, 2 insertions(+), 246 deletions(-)

New commits:
commit 563573068fe0835b1fa132d18b53f991be0e15a0
Author: Gabor Kelemen 
AuthorDate: Sun May 12 09:30:02 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Sat May 18 11:52:37 2024 +0200

Drop now unused SdOptionsSnap, SdOptionsSnapItem classes

Change-Id: Ifa2a7b7447e3659ea331ca4c3ec5c05dcc9a5841
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167542
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/sd/inc/sdattr.hrc b/sd/inc/sdattr.hrc
index 35f53e47ca9d..20958e1b39d6 100644
--- a/sd/inc/sdattr.hrc
+++ b/sd/inc/sdattr.hrc
@@ -102,7 +102,7 @@ class XColorItem;
 #define ATTR_OPTIONS_START  ATTR_SNAPLINE_END + 1
 #define ATTR_OPTIONS_LAYOUT ATTR_OPTIONS_START + 1
 #define ATTR_OPTIONS_MISC   
TypedWhichId(ATTR_OPTIONS_START + 2)
-#define ATTR_OPTIONS_SNAP   
TypedWhichId(ATTR_OPTIONS_START + 3)
+#define ATTR_OPTIONS_SNAP   ATTR_OPTIONS_START + 3
 #define ATTR_OPTIONS_PRINT  
TypedWhichId(ATTR_OPTIONS_START + 4)
 #define ATTR_OPTIONS_ENDATTR_OPTIONS_PRINT
 
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index ac67a935e16d..9b1ec49f85a5 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -515,171 +515,6 @@ void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) 
const
 pOpts->SetDragThreshold( maOptionsMisc.GetDragThresholdPixels() );
 }
 
-/*
-|*
-|* SdOptionsSnap
-|*
-\/
-
-SdOptionsSnap::SdOptionsSnap( bool bImpress, bool bUseConfig ) :
-SdOptionsGeneric( bImpress, bUseConfig ?
-  ( bImpress ?
-OUString( "Office.Impress/Snap" ) :
-OUString( "Office.Draw/Snap" ) ) :
-  OUString() ),
-bSnapHelplines( true ),
-bSnapBorder( true ),
-bSnapFrame( false ),
-bSnapPoints( false ),
-bOrtho( false ),
-bBigOrtho( true ),
-bRotate( false ),
-nSnapArea( 5 ),
-nAngle( 1500 ),
-nBezAngle( 1500 )
-
-{
-EnableModify( true );
-}
-
-bool SdOptionsSnap::operator==( const SdOptionsSnap& rOpt ) const
-{
-return( IsSnapHelplines() == rOpt.IsSnapHelplines() &&
-IsSnapBorder() == rOpt.IsSnapBorder() &&
-IsSnapFrame() == rOpt.IsSnapFrame() &&
-IsSnapPoints() == rOpt.IsSnapPoints() &&
-IsOrtho() == rOpt.IsOrtho() &&
-IsBigOrtho() == rOpt.IsBigOrtho() &&
-IsRotate() == rOpt.IsRotate() &&
-GetSnapArea() == rOpt.GetSnapArea() &&
-GetAngle() == rOpt.GetAngle() &&
-GetEliminatePolyPointLimitAngle() == 
rOpt.GetEliminatePolyPointLimitAngle() );
-}
-
-void SdOptionsSnap::GetPropNameArray( const char**& ppNames, sal_uLong& rCount 
) const
-{
-static const char* aPropNames[] =
-{
-"Object/SnapLine",
-"Object/PageMargin",
-"Object/ObjectFrame",
-"Object/ObjectPoint",
-"Position/CreatingMoving",
-"Position/ExtendEdges",
-"Position/Rotating",
-"Object/Range",
-"Position/RotatingValue",
-"Position/PointReduction"
-};
-
-rCount = SAL_N_ELEMENTS(aPropNames);
-ppNames = aPropNames;
-}
-
-bool SdOptionsSnap::ReadData( const Any* pValues )
-{
-if( pValues[0].hasValue() ) SetSnapHelplines( 
*o3tl::doAccess(pValues[ 0 ]) );
-if( pValues[1].hasValue() ) SetSnapBorder( *o3tl::doAccess(pValues[ 
1 ]) );
-if( pValues[2].hasValue() ) SetSnapFrame( *o3tl::doAccess(pValues[ 2 
]) );
-if( pValues[3].hasValue() ) SetSnapPoints( *o3tl::doAccess(pValues[ 
3 ]) );
-if( pValues[4].hasValue() ) SetOrtho( *o3tl::doAccess(pValues[ 4 ]) 
);
-if( pValues[5].hasValue() ) SetBigOrtho( *o3tl::doAccess(pValues[ 5 
]) );
-if( pValues[6].hasValue() ) SetRotate( *o3tl::doAccess(pValues[ 6 ]) 
);
-if( pValues[7].hasValue() ) SetSnapArea( 
static_cast(*o3tl::doAccess(pValues[ 7 ])) );
-if( pValues[8].hasValue() ) SetAngle( 
Degree100(*o3tl::doAccess(pValues[ 8 ])) );
-if( pValues[9].hasValue() ) SetEliminatePolyPointLimitAngle( 
Degree100(*o3tl::doAccess(pValues[ 9 ])) );
-
-return true;
-}
-
-bool SdOptionsSnap::WriteData( Any* pValues ) const
-{
-pValues[ 0 ] <<= IsSnapHelplines();
-pValues[ 1 ] <<= IsSnapBorder();
-pValues[ 2 ] <<= IsSnapFrame();
-pValues[ 3 ] <<= IsSnapPoints();
-pValues[ 4 ] <<= IsOrtho();
-pValues[ 5 ] <<= IsBigOrtho();
-pValues[ 6 ] <<= IsRotate();
-pValues[ 7 ] <<= static_cast(GetSnapArea());
-pValues[ 8 ] <<= 

core.git: sd/inc sd/source

2024-05-01 Thread Tomaž Vajngerl (via logerrit)
 sd/inc/textapi.hxx  |6 +++---
 sd/source/core/text/textapi.cxx |   39 +--
 2 files changed, 24 insertions(+), 21 deletions(-)

New commits:
commit a377a7c5aa7f1ad9aae7d7bc8da4cbf5ba6b6478
Author: Tomaž Vajngerl 
AuthorDate: Fri Apr 19 17:12:15 2024 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed May 1 11:18:40 2024 +0200

annot: make TextApi use SdrModel instead of SdDrawDocument

Also it uses SdrOutliner instead of SdOutliner. This change is
important for moving the implementation to svx, where we don't
have sd specifics available and it seems in this case they are
not even needed.

Change-Id: I6c63ba4953bb5281aa951a0048a08fdd2813c530
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166495
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sd/inc/textapi.hxx b/sd/inc/textapi.hxx
index 70110349053a..5491382e0564 100644
--- a/sd/inc/textapi.hxx
+++ b/sd/inc/textapi.hxx
@@ -23,7 +23,7 @@
 #include 
 #include 
 
-class SdDrawDocument;
+class SdrModel;
 
 namespace sd {
 
@@ -32,9 +32,9 @@ class TextAPIEditSource;
 class TextApiObject final : public SvxUnoText
 {
 public:
-static rtl::Reference< TextApiObject > create( SdDrawDocument* pDoc );
+static rtl::Reference create(SdrModel* pModel);
 
-virtual ~TextApiObject() noexcept override;
+virtual ~TextApiObject() noexcept override;
 
 /// @throws css::uno::RuntimeException
 void dispose();
diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx
index e35b051d25f5..afb3c80714e5 100644
--- a/sd/source/core/text/textapi.cxx
+++ b/sd/source/core/text/textapi.cxx
@@ -87,9 +87,9 @@ namespace {
 
 struct TextAPIEditSource_Impl
 {
-SdDrawDocument* mpDoc;
-Outliner*   mpOutliner;
-SvxOutlinerForwarder*   mpTextForwarder;
+SdrModel* mpModel;
+Outliner* mpOutliner;
+SvxOutlinerForwarder* mpTextForwarder;
 };
 
 }
@@ -105,13 +105,14 @@ class TextAPIEditSource : public SvxEditSource
 explicitTextAPIEditSource( const TextAPIEditSource& rSource );
 
 public:
-explicitTextAPIEditSource(SdDrawDocument* pDoc);
+explicitTextAPIEditSource(SdrModel* pModel);
 
 voidDispose();
 voidSetText( OutlinerParaObject const & rText );
 std::optional CreateText();
 OUStringGetText() const;
-SdDrawDocument* GetDoc() { return m_xImpl->mpDoc; }
+
+SdrModel* getModel() { return m_xImpl->mpModel; }
 };
 
 static const SvxItemPropertySet* ImplGetSdTextPortionPropertyMap()
@@ -143,9 +144,9 @@ TextApiObject::~TextApiObject() noexcept
 dispose();
 }
 
-rtl::Reference< TextApiObject > TextApiObject::create( SdDrawDocument* pDoc )
+rtl::Reference TextApiObject::create(SdrModel* pModel)
 {
-rtl::Reference< TextApiObject > xRet( new TextApiObject( 
std::make_unique( pDoc ) ) );
+rtl::Reference xRet(new 
TextApiObject(std::make_unique(pModel)));
 return xRet;
 }
 
@@ -166,7 +167,7 @@ std::optional 
TextApiObject::CreateText()
 
 void TextApiObject::SetText( OutlinerParaObject const & rText )
 {
-SdrModel* pModel = mpSource->GetDoc();
+SdrModel* pModel = mpSource->getModel();
 if( pModel && pModel->IsUndoEnabled() )
 pModel->AddUndo( std::make_unique( *pModel, this ) 
);
 
@@ -205,17 +206,17 @@ void TextAPIEditSource::UpdateData()
 // data is kept in outliner all the time
 }
 
-TextAPIEditSource::TextAPIEditSource(SdDrawDocument* pDoc)
+TextAPIEditSource::TextAPIEditSource(SdrModel* pModel)
 : m_xImpl(std::make_shared())
 {
-m_xImpl->mpDoc = pDoc;
+m_xImpl->mpModel = pModel;
 m_xImpl->mpOutliner = nullptr;
 m_xImpl->mpTextForwarder = nullptr;
 }
 
 void TextAPIEditSource::Dispose()
 {
-m_xImpl->mpDoc=nullptr;
+m_xImpl->mpModel = nullptr;
 delete m_xImpl->mpTextForwarder;
 m_xImpl->mpTextForwarder = nullptr;
 
@@ -225,13 +226,14 @@ void TextAPIEditSource::Dispose()
 
 SvxTextForwarder* TextAPIEditSource::GetTextForwarder()
 {
-if(!m_xImpl->mpDoc)
-return nullptr; // mpDoc == 0 can be used to flag this as disposed
+if(!m_xImpl->mpModel)
+return nullptr; // mpModel == 0 can be used to flag this as disposed
 
 if (!m_xImpl->mpOutliner)
 {
 //init draw model first
-m_xImpl->mpOutliner = new SdOutliner(m_xImpl->mpDoc, 
OutlinerMode::TextObject);
+SfxItemPool* pPool = _xImpl->mpModel->GetItemPool();
+m_xImpl->mpOutliner = new SdrOutliner(pPool, OutlinerMode::TextObject);
 SdDrawDocument::SetCalcFieldValueHdl(m_xImpl->mpOutliner);
 }
 
@@ -243,12 +245,13 @@ SvxTextForwarder* TextAPIEditSource::GetTextForwarder()
 
 void TextAPIEditSource::SetText( OutlinerParaObject const & rText )
 {
-if (m_xImpl->mpDoc)
+if (m_xImpl->mpModel)
 {
 if (!m_xImpl->mpOutliner)
 {
 //init 

core.git: sd/inc

2024-04-27 Thread Gabor Kelemen (via logerrit)
 sd/inc/glob.hxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit 2f5ab5b8e7bd7dd06e00153abb77a69e5d192dd2
Author: Gabor Kelemen 
AuthorDate: Fri Apr 26 10:10:46 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Sat Apr 27 22:47:25 2024 +0200

Drop now unused option-stream identifiers

Change-Id: Id08e41e11b8027339e58ab182739087030e66eef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166754
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/sd/inc/glob.hxx b/sd/inc/glob.hxx
index ad4ce9f3584c..5905601507b6 100644
--- a/sd/inc/glob.hxx
+++ b/sd/inc/glob.hxx
@@ -50,8 +50,4 @@
 // Separator between layout name and template name of presentation templates
 inline constexpr OUString SD_LT_SEPARATOR = u"~LT~"_ustr;
 
-// option-stream identifier
-#define SD_OPTION_MORPHING  u"Morph"
-#define SD_OPTION_VECTORIZE u"Vectorize"
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


core.git: sd/inc sd/source

2024-04-27 Thread Noel Grandin (via logerrit)
 sd/inc/sdpage.hxx   |   20 ++--
 sd/source/ui/inc/DrawController.hxx |   10 +++---
 sd/source/ui/inc/DrawDocShell.hxx   |6 +++---
 sd/source/ui/inc/drawview.hxx   |2 +-
 sd/source/ui/inc/navigatr.hxx   |8 
 sd/source/ui/inc/unomodel.hxx   |   34 +-
 6 files changed, 42 insertions(+), 38 deletions(-)

New commits:
commit 6f61cb4b6333b88282978f7472d91c3c86bc628f
Author: Noel Grandin 
AuthorDate: Fri Apr 26 19:56:38 2024 +0200
Commit: Noel Grandin 
CommitDate: Sat Apr 27 16:08:42 2024 +0200

reduce symbol visibility in sd

Change-Id: I3d4de2b8854278b8713992660268e764815fe738
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166761
Reviewed-by: Noel Grandin 
Tested-by: Jenkins

diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 3903a59b23ed..efaf3fa876bf 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -88,7 +88,7 @@ namespace sd {
 class UndoAttrObject;
 }
 
-class SD_DLLPUBLIC SdPage final : public FmFormPage, public SdrObjUserCall
+class SAL_DLLPUBLIC_RTTI SdPage final : public FmFormPage, public 
SdrObjUserCall
 {
 SdPage& operator=(const SdPage&) = delete;
 SdPage(const SdPage&) = delete;
@@ -163,10 +163,10 @@ public:
 sd::ShapeList&  GetPresentationShapeList() { return 
maPresentationShapeList; }
 
 void EnsureMasterPageDefaultBackground();
-SdrObject* CreatePresObj(PresObjKind eObjKind, bool bVertical, const 
::tools::Rectangle& rRect);
-rtl::Reference CreateDefaultPresObj(PresObjKind eObjKind);
-voidDestroyDefaultPresObj(PresObjKind eObjKind);
-SdrObject*  GetPresObj(PresObjKind eObjKind, int nIndex = 1, bool 
bFuzzySearch = false );
+SD_DLLPUBLIC SdrObject* CreatePresObj(PresObjKind eObjKind, bool 
bVertical, const ::tools::Rectangle& rRect);
+SD_DLLPUBLIC rtl::Reference CreateDefaultPresObj(PresObjKind 
eObjKind);
+SD_DLLPUBLIC void DestroyDefaultPresObj(PresObjKind eObjKind);
+SD_DLLPUBLIC SdrObject* GetPresObj(PresObjKind eObjKind, int nIndex = 1, 
bool bFuzzySearch = false );
 PresObjKind GetPresObjKind(SdrObject* pObj) const;
 OUStringGetPresObjText(PresObjKind eObjKind) const;
 SfxStyleSheet* GetStyleSheetForMasterPageBackground() const;
@@ -183,7 +183,7 @@ public:
 /** inserts the given SdrObject into the presentation object list */
 voidInsertPresObj(SdrObject* pObj, PresObjKind eKind );
 
-voidSetAutoLayout(AutoLayout eLayout, bool bInit=false, bool 
bCreate=false);
+SD_DLLPUBLIC void SetAutoLayout(AutoLayout eLayout, bool bInit=false, bool 
bCreate=false);
 AutoLayout  GetAutoLayout() const { return meAutoLayout; }
 voidCreateTitleAndLayout(bool bInit=false, bool bCreate=false);
 SdrObject*  InsertAutoLayoutShape(SdrObject* pObj, PresObjKind 
eObjKind, bool bVertical, const ::tools::Rectangle& rRect, bool bInit);
@@ -262,7 +262,7 @@ public:
 voidScaleObjects(const Size& rNewPageSize, const 
::tools::Rectangle& rNewBorderRect,
  bool bScaleAllObj);
 
-const OUString& GetName() const;
+SD_DLLPUBLIC const OUString& GetName() const;
 OUString const & GetRealName() const { return FmFormPage::GetName(); };
 
 voidSetPresentationLayout(std::u16string_view rLayoutName,
@@ -313,10 +313,10 @@ public:
 
 /** Set the name of the page and broadcast a model change.
 */
-void SetName (const OUString& rName);
+SD_DLLPUBLIC void SetName(const OUString& rName);
 
-const sd::HeaderFooterSettings& getHeaderFooterSettings() const;
-void setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettings 
);
+SD_DLLPUBLIC const sd::HeaderFooterSettings& getHeaderFooterSettings() 
const;
+SD_DLLPUBLIC void setHeaderFooterSettings( const sd::HeaderFooterSettings& 
rNewSettings );
 
 /**
 @return true if the object from the ViewObjectContact should
diff --git a/sd/source/ui/inc/DrawController.hxx 
b/sd/source/ui/inc/DrawController.hxx
index 940efff5bf18..c935888fa92c 100644
--- a/sd/source/ui/inc/DrawController.hxx
+++ b/sd/source/ui/inc/DrawController.hxx
@@ -74,7 +74,7 @@ class ViewShellBase;
 The implementation of the XControllerManager interface is not yet in its
 final form.
 */
-class SD_DLLPUBLIC DrawController final
+class SAL_DLLPUBLIC_RTTI DrawController final
 : public DrawControllerInterfaceBase,
   private BroadcastHelperOwner,
   public ::cppu::OPropertySetHelper
@@ -160,7 +160,11 @@ public:
 */
 void ReleaseViewShellBase();
 
-DECLARE_XINTERFACE()
+// XInterface
+virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType 
) override;
+SD_DLLPUBLIC virtual void SAL_CALL acquire() noexcept override;
+SD_DLLPUBLIC virtual void SAL_CALL release() noexcept override;
+
 DECLARE_XTYPEPROVIDER()
 
 // XComponent
@@ 

core.git: sd/inc sd/source

2024-04-26 Thread Gabor Kelemen (via logerrit)
 sd/inc/sdmod.hxx   |8 
 sd/source/ui/app/sdmod.cxx |   43 ---
 2 files changed, 51 deletions(-)

New commits:
commit 48e07052be600a5abf8ef4cbec20e1122e703b7e
Author: Gabor Kelemen 
AuthorDate: Thu Apr 25 16:52:14 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri Apr 26 15:16:05 2024 +0200

Drop now unused GetOptionStream class

Change-Id: Iddb1fbb437f0f66c551e9231d79511caf1edafb6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166635
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 5008fc001f0b..b872ebf0913d 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -51,12 +51,6 @@ namespace com::sun::star::frame {
 class XFrame;
 }
 
-enum class SdOptionStreamMode
-{
-Load = 0,
-Store = 1
-};
-
 struct SdExtPropertySetInfoCacheCompare
 {
 bool operator()(const std::span& lhs, const 
std::span& rhs) const
@@ -104,7 +98,6 @@ public:
 voidGetState(SfxItemSet&);
 
 SdOptions*  GetSdOptions(DocumentType eDocType);
-SD_DLLPUBLIC rtl::Reference GetOptionStream( 
std::u16string_view rOptionName, SdOptionStreamMode eMode );
 
 boolGetWaterCan() const { return bWaterCan; }
 voidSetWaterCan( bool bWC ) { bWaterCan = bWC; }
@@ -140,7 +133,6 @@ private:
 SdOptions*  pDrawOptions;
 std::unique_ptr  pSearchItem;
 std::unique_ptr  pNumberFormatter;
-rtl::Reference  xOptionStorage;
 boolbWaterCan;
 std::unique_ptr mpErrorHdl;
 /** This device is used for printer independent layout.  It is virtual
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index f1b9a9bbe8a1..f18dd647a209 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -157,49 +157,6 @@ SdOptions* SdModule::GetSdOptions(DocumentType eDocType)
 return pOptions;
 }
 
-/**
- * Open and return option stream for internal options;
- * if the stream is opened for reading but does not exist, an 'empty'
- * RefObject is returned
- */
-rtl::Reference SdModule::GetOptionStream( 
std::u16string_view rOptionName,
-  SdOptionStreamMode eMode )
-{
-::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( 
SfxObjectShell::Current() );
-rtl::Reference xStm;
-
-if( pDocSh )
-{
-DocumentTypeeType = pDocSh->GetDoc()->GetDocumentType();
-
-if( !xOptionStorage.is() )
-{
-INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
-
-aURL.Append( u"drawing.cfg" );
-
-std::unique_ptr pStm = 
::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( 
INetURLObject::DecodeMechanism::NONE ), StreamMode::READWRITE );
-
-if( pStm )
-xOptionStorage = new SotStorage( pStm.release(), true );
-}
-
-OUStringaStmName;
-
-if( DocumentType::Draw == eType )
-aStmName = "Draw_";
-else
-aStmName = "Impress_";
-
-aStmName += rOptionName;
-
-if( SdOptionStreamMode::Store == eMode || xOptionStorage->IsContained( 
aStmName ) )
-xStm = xOptionStorage->OpenSotStream( aStmName );
-}
-
-return xStm;
-}
-
 SvNumberFormatter* SdModule::GetNumberFormatter()
 {
 if( !pNumberFormatter )


core.git: sd/inc sd/Library_sd.mk sd/source solenv/clang-format

2024-04-26 Thread Gabor Kelemen (via logerrit)
 sd/Library_sd.mk|1 
 sd/inc/sdiocmpt.hxx |   57 ---
 sd/source/core/sdiocmpt.cxx |  117 
 solenv/clang-format/excludelist |2 
 4 files changed, 177 deletions(-)

New commits:
commit 7437b842c420a43b85156f34146f27fc6b34c729
Author: Gabor Kelemen 
AuthorDate: Thu Apr 25 16:45:26 2024 +0200
Commit: Gabor Kelemen 
CommitDate: Fri Apr 26 12:24:27 2024 +0200

Drop now unused sdiocmpt.cxx

Change-Id: Ibba331a536bbd6f228df005c3488a722a3631d4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166634
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index dc9b38f011f3..12296242bedb 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -165,7 +165,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/core/drawdoc4 \
sd/source/core/drawdoc_animations \
sd/source/core/pglink \
-   sd/source/core/sdiocmpt \
sd/source/core/sdpage \
sd/source/core/sdpage2 \
sd/source/core/sdpage_animations \
diff --git a/sd/inc/sdiocmpt.hxx b/sd/inc/sdiocmpt.hxx
deleted file mode 100644
index 9f1395fd7c22..
--- a/sd/inc/sdiocmpt.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#pragma once
-
-#include 
-#include "sddllapi.h"
-
-
-class old_SdrDownCompat
-{
-protected:
-SvStream&   rStream;
-sal_uInt32  nSubRecSiz;
-sal_uInt32  nSubRecPos;
-StreamMode  nMode;
-boolbOpen;
-
-protected:
-void Write();
-
-public:
-old_SdrDownCompat(SvStream& rNewStream, StreamMode nNewMode);
-~old_SdrDownCompat();
-void  OpenSubRecord();
-void  CloseSubRecord();
-};
-
-#define SDIOCOMPAT_VERSIONDONTKNOW sal_uInt16(0x)
-
-class SD_DLLPUBLIC SdIOCompat : public old_SdrDownCompat
-{
-public:
-// nNewMode: StreamMode::READ or StreamMode::WRITE
-// nVer: specify only when writing
-SdIOCompat(SvStream& rNewStream, StreamMode nNewMode,
-   sal_uInt16 nVer = SDIOCOMPAT_VERSIONDONTKNOW);
-~SdIOCompat();
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/core/sdiocmpt.cxx b/sd/source/core/sdiocmpt.cxx
deleted file mode 100644
index 67de6a64d71d..
--- a/sd/source/core/sdiocmpt.cxx
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include 
-
-#include 
-
-old_SdrDownCompat::old_SdrDownCompat(SvStream& rNewStream, StreamMode nNewMode)
-:   rStream(rNewStream),
-nSubRecSiz(0),
-nSubRecPos(0),
-nMode(nNewMode),
-bOpen(false)
-{
-OpenSubRecord();
-}
-
-old_SdrDownCompat::~old_SdrDownCompat()
-{
-if(bOpen)
-CloseSubRecord();
-}
-
-void old_SdrDownCompat::Write()
-{
-rStream.WriteUInt32( nSubRecSiz );
-}
-
-void old_SdrDownCompat::OpenSubRecord()
-{
-if(rStream.GetError())
-return;
-
-nSubRecPos = rStream.Tell();
-
-if(nMode == StreamMode::READ)
-{
-rStream.ReadUInt32( nSubRecSiz );
-}
-else if(nMode == StreamMode::WRITE)
-{

core.git: sd/inc sd/source

2024-03-11 Thread Baole Fang (via logerrit)
 sd/inc/strings.hrc|1 +
 sd/source/ui/framework/factories/BasicPaneFactory.cxx |3 ++-
 sd/source/ui/framework/factories/FullScreenPane.cxx   |   14 ++
 sd/source/ui/framework/factories/FullScreenPane.hxx   |9 +++--
 4 files changed, 20 insertions(+), 7 deletions(-)

New commits:
commit 1999e2b35c8106fa959f04bbd381ddb49d257a1d
Author: Baole Fang 
AuthorDate: Wed Mar 6 20:00:27 2024 -0500
Commit: Thorsten Behrens 
CommitDate: Mon Mar 11 22:55:44 2024 +0100

tdf#158152: Make presenter console to "Console: file"

Add a new parameter pDrawDocShell to FullScreenPane to extract filename.
A new string STR_FULLSCREEN_CONSOLE is added for presenter console.
Now, the presenter console's title becomes "Console: file".

Change-Id: Ic18d00044dde602dd92210600e3c5311b46500b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164515
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 2522768a6a7b..3ff7cac89795 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -155,6 +155,7 @@
 #define STR_EFFECTDLG_PROGRAM   
NC_("STR_EFFECTDLG_PROGRAM", "Program")
 #define STR_EFFECTDLG_MACRO 
NC_("STR_EFFECTDLG_MACRO", "Macro")
 #define STR_FULLSCREEN_SLIDESHOW
NC_("STR_FULLSCREEN_SLIDESHOW", "Presenting: %s")
+#define STR_FULLSCREEN_CONSOLE  
NC_("STR_FULLSCREEN_CONSOLE", "Console: %s")
 
 // To translators: this is the spinbutton in the slidesorter toolbar to set 
the number of slides to show per row
 #define STR_SLIDES  NNC_("STR_SLIDES", "%1 
slide", "%1 slides")
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx 
b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
index e112ac4c315a..4ce694a2e7df 100644
--- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
@@ -345,7 +345,8 @@ Reference BasicPaneFactory::CreateFullScreenPane 
(
 new FullScreenPane(
 rxComponentContext,
 rxPaneId,
-mpViewShellBase->GetViewWindow()));
+mpViewShellBase->GetViewWindow(),
+mpViewShellBase->GetDocShell()));
 
 return xPane;
 }
diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx 
b/sd/source/ui/framework/factories/FullScreenPane.cxx
index 39da06144c09..202032b3d6f9 100644
--- a/sd/source/ui/framework/factories/FullScreenPane.cxx
+++ b/sd/source/ui/framework/factories/FullScreenPane.cxx
@@ -26,6 +26,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -36,7 +39,8 @@ namespace sd::framework {
 FullScreenPane::FullScreenPane (
 const Reference& rxComponentContext,
 const Reference& rxPaneId,
-const vcl::Window* pViewShellWindow)
+const vcl::Window* pViewShellWindow,
+const DrawDocShell* pDrawDocShell)
 : FrameWindowPane(rxPaneId,nullptr),
   mxComponentContext(rxComponentContext)
 {
@@ -76,10 +80,12 @@ FullScreenPane::FullScreenPane (
 
 // Set title and icon of the new window to those of the current window
 // of the view shell.
-if (pViewShellWindow != nullptr)
+if (pViewShellWindow != nullptr && pDrawDocShell != nullptr)
 {
-const SystemWindow* pSystemWindow = 
pViewShellWindow->GetSystemWindow();
-mpWorkWindow->SetText(pSystemWindow->GetText());
+SystemWindow* pSystemWindow = pViewShellWindow->GetSystemWindow();
+OUString Title(SdResId(STR_FULLSCREEN_CONSOLE));
+Title = Title.replaceFirst("%s", 
pDrawDocShell->GetTitle(SFX_TITLE_DETECT));
+mpWorkWindow->SetText(Title);
 mpWorkWindow->SetIcon(pSystemWindow->GetIcon());
 }
 
diff --git a/sd/source/ui/framework/factories/FullScreenPane.hxx 
b/sd/source/ui/framework/factories/FullScreenPane.hxx
index 138503d02f1a..fb5838d9eccd 100644
--- a/sd/source/ui/framework/factories/FullScreenPane.hxx
+++ b/sd/source/ui/framework/factories/FullScreenPane.hxx
@@ -27,6 +27,7 @@ class VclWindowEvent;
 
 namespace vcl { class Window; }
 namespace com::sun::star::uno { class XComponentContext; }
+namespace sd { class DrawDocShell; }
 
 namespace sd::framework {
 
@@ -43,13 +44,17 @@ public:
 @param rxPaneId
 The resource id of the new pane.
 @param pViewShellWindow
-The top-level parent of this window is used to obtain title and
+The top-level parent of this window is used to obtain
 icon for the new top-level window.
+@param pDrawDocShell
+The DrawDocShell parent of this window is used to obtain
+title for the new top-level window.
 */
 FullScreenPane (
 const css::uno::Reference& 
rxComponentContext,
 const 

core.git: sd/inc sd/source

2024-03-08 Thread Noel Grandin (via logerrit)
 sd/inc/shapelist.hxx |2 ++
 sd/source/core/shapelist.cxx |   14 +++---
 2 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 632fc28fda03e312b2eb2d5843459b3ceee43534
Author: Noel Grandin 
AuthorDate: Fri Mar 8 21:47:47 2024 +0200
Commit: Noel Grandin 
CommitDate: Sat Mar 9 07:09:04 2024 +0100

tdf#158773 add a set to sd::ShapeList

because the std::list is atrociously bad at checking if the element
already exists when the number of shapes gets large.

Shaves 5% off the load time

Change-Id: I6b8f972f8ff9559c363c084d91adea88b1267d3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164597
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/shapelist.hxx b/sd/inc/shapelist.hxx
index 6528cc073286..c93344835016 100644
--- a/sd/inc/shapelist.hxx
+++ b/sd/inc/shapelist.hxx
@@ -23,6 +23,7 @@
 #include 
 
 #include 
+#include 
 
 namespace sd
 {
@@ -65,6 +66,7 @@ namespace sd
 typedef std::list< SdrObject* > ListImpl;
 ListImpl maShapeList;
 ListImpl::iterator maIter;
+std::unordered_set maShapeSet;
 };
 }
 
diff --git a/sd/source/core/shapelist.cxx b/sd/source/core/shapelist.cxx
index 613286c9b9b7..a73044ba864f 100644
--- a/sd/source/core/shapelist.cxx
+++ b/sd/source/core/shapelist.cxx
@@ -38,8 +38,7 @@ ShapeList::~ShapeList()
 /** adds the given shape to this list */
 void ShapeList::addShape( SdrObject& rObject )
 {
-ListImpl::iterator aIter( std::find( maShapeList.begin(), 
maShapeList.end(),  ) );
-if( aIter == maShapeList.end() )
+if( maShapeSet.insert().second )
 {
 maShapeList.push_back();
 rObject.AddObjectUser( *this );
@@ -53,9 +52,9 @@ void ShapeList::addShape( SdrObject& rObject )
 /** removes the given shape from this list */
 void ShapeList::removeShape( SdrObject& rObject )
 {
-ListImpl::iterator aIter( std::find( maShapeList.begin(), 
maShapeList.end(),  ) );
-if( aIter != maShapeList.end() )
+if( maShapeSet.erase() )
 {
+ListImpl::iterator aIter( std::find( maShapeList.begin(), 
maShapeList.end(),  ) );
 bool bIterErased = aIter == maIter;
 
 (*aIter)->RemoveObjectUser(*this);
@@ -76,6 +75,7 @@ void ShapeList::clear()
 {
 ListImpl aShapeList;
 aShapeList.swap( maShapeList );
+maShapeSet.clear();
 
 for( auto& rpShape : aShapeList )
 rpShape->RemoveObjectUser(*this);
@@ -92,14 +92,14 @@ bool ShapeList::isEmpty() const
 /** returns true if given shape is part of this list */
 bool ShapeList::hasShape( SdrObject& rObject ) const
 {
-return std::find( maShapeList.begin(), maShapeList.end(),  )  != 
maShapeList.end();
+return maShapeSet.contains(  );
 }
 
 void ShapeList::ObjectInDestruction(const SdrObject& rObject)
 {
-ListImpl::iterator aIter( std::find( maShapeList.begin(), 
maShapeList.end(),  ) );
-if( aIter != maShapeList.end() )
+if( maShapeSet.erase() )
 {
+ListImpl::iterator aIter( std::find( maShapeList.begin(), 
maShapeList.end(),  ) );
 bool bIterErased = aIter == maIter;
 
 aIter = maShapeList.erase( aIter );


core.git: sd/inc sd/qa sd/source sd/uiconfig

2024-02-23 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/inc/drawdoc.hxx|1 
 sd/inc/sdattr.hrc |3 +
 sd/qa/unit/dialogs-test.cxx   |2 +
 sd/source/core/drawdoc.cxx|3 +
 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx |2 -
 sd/source/ui/animations/CustomAnimationPane.cxx   |2 -
 sd/source/ui/animations/SlideTransitionPane.cxx   |2 -
 sd/source/ui/app/sdmod1.cxx   |3 +
 sd/source/ui/dlg/navigatr.cxx |3 +
 sd/source/ui/dlg/present.cxx  |8 
 sd/source/ui/docshell/docshel3.cxx|3 +
 sd/source/ui/func/funavig.cxx |3 +
 sd/source/ui/func/fupoor.cxx  |6 ++-
 sd/source/ui/func/fusldlg.cxx |8 
 sd/source/ui/inc/present.hxx  |1 
 sd/source/ui/inc/slideshow.hxx|3 +
 sd/source/ui/slideshow/slideshow.cxx  |   26 +++---
 sd/source/ui/slideshow/slideshowimpl.cxx  |2 -
 sd/source/ui/unoidl/DrawController.cxx|2 -
 sd/source/ui/view/drawview.cxx|2 -
 sd/source/ui/view/drviews1.cxx|4 +-
 sd/source/ui/view/drviews2.cxx|5 +-
 sd/source/ui/view/drviews3.cxx|2 -
 sd/source/ui/view/drviews4.cxx|3 +
 sd/source/ui/view/drviews7.cxx|   10 +++--
 sd/source/ui/view/drviewsa.cxx|7 ++-
 sd/source/ui/view/drviewse.cxx|4 +-
 sd/source/ui/view/drviewsh.cxx|2 -
 sd/source/ui/view/sdview2.cxx |3 +
 sd/source/ui/view/viewshel.cxx|4 +-
 sd/uiconfig/simpress/ui/presentationdialog.ui |   21 ++-
 31 files changed, 110 insertions(+), 40 deletions(-)

New commits:
commit c68712d3689a0322e59934cd8151d003e869f30d
Author: Armin Le Grand (allotropia) 
AuthorDate: Fri Feb 23 16:30:23 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Sat Feb 24 00:54:34 2024 +0100

IASS: make live slideshow experimental and configurable

* adding an option button to slideshow settings dlg
* switch from env var to officecfg

Change-Id: I9713fde374b04264947daaab73759eb585c4a3f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163851
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index dd6b81647ef7..401bde6b5f88 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -110,6 +110,7 @@ namespace sd
 sal_Int32 mnPauseTimeout;
 bool mbShowPauseLogo;
 bool mbStartCustomShow;
+bool mbInteractive;
 
 PresentationSettings();
 };
diff --git a/sd/inc/sdattr.hrc b/sd/inc/sdattr.hrc
index f431dea4f680..409838dea996 100644
--- a/sd/inc/sdattr.hrc
+++ b/sd/inc/sdattr.hrc
@@ -55,8 +55,9 @@ class XColorItem;
 #define ATTR_PRESENT_PAUSE_TIMEOUT   
TypedWhichId(ATTR_PRESENT_START + 13)
 #define ATTR_PRESENT_SHOW_PAUSELOGO  ATTR_PRESENT_START + 14
 #define ATTR_PRESENT_DISPLAY 
TypedWhichId(ATTR_PRESENT_START + 15)
+#define ATTR_PRESENT_INTERACTIVE ATTR_PRESENT_START + 16
 
-#define ATTR_PRESENT_ENDATTR_PRESENT_DISPLAY
+#define ATTR_PRESENT_ENDATTR_PRESENT_INTERACTIVE
 
 // animation attributes
 #define ATTR_ANIMATION_STARTATTR_PRESENT_END + 1
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 45bdcaef9d48..e7c0d38f7f2e 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -407,6 +407,8 @@ VclPtr 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_FULLSCREEN, 
rPresentationSettings.mbFullScreen));
 aDlgSet.Put(SfxUInt32Item(ATTR_PRESENT_PAUSE_TIMEOUT, 
rPresentationSettings.mnPauseTimeout));
 aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_SHOW_PAUSELOGO, 
rPresentationSettings.mbShowPauseLogo));
+aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_INTERACTIVE, 
rPresentationSettings.mbInteractive));
+
 //SdOptions* pOptions = 
SD_MOD()->GetSdOptions(DocumentType::Impress);
 aDlgSet.Put(SfxInt32Item(ATTR_PRESENT_DISPLAY, 0 
/*pOptions->GetDisplay()*/));
 pRetval = 
getSdAbstractDialogFactory()->CreateSdStartPresentationDlg(
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 2f9f431866a5..ea32e0f5e8d6 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -109,7 +109,8 @@ PresentationSettings::PresentationSettings()
   

[Libreoffice-commits] core.git: sd/inc sd/source

2023-10-15 Thread Stephan Bergmann (via logerrit)
 sd/inc/helpids.h |7 ---
 sd/source/filter/html/pubdlg.cxx |5 -
 2 files changed, 12 deletions(-)

New commits:
commit 59480a5e4ebb849c06d7f16579208d0847c5557e
Author: Stephan Bergmann 
AuthorDate: Fri Oct 13 23:07:18 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Sun Oct 15 18:34:28 2023 +0200

Drop leftover aPageHelpIds

...from 28b6480c6bdd179f3943f768926b7f196226c768 "tdf#105303: Drop html 
export
wizard"

Change-Id: I996324e06a2f5eb04d722c45be9ce54715490b16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157970
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h
index bb9233441553..6579bd43ff79 100644
--- a/sd/inc/helpids.h
+++ b/sd/inc/helpids.h
@@ -27,13 +27,6 @@ inline constexpr OUStringLiteral HID_SDOUTLINEVIEWSHELL = 
u"SD_HID_SDOUTLINEVIEW
 
 inline constexpr OUStringLiteral HID_SD_WIN_PRESENTATION = 
u"SD_HID_SD_WIN_PRESENTATION";
 
-inline constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE1 = 
u"SD_HID_SD_HTMLEXPORT_PAGE1";
-inline constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE2 = 
u"SD_HID_SD_HTMLEXPORT_PAGE2";
-inline constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE3 = 
u"SD_HID_SD_HTMLEXPORT_PAGE3";
-inline constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE4 = 
u"SD_HID_SD_HTMLEXPORT_PAGE4";
-inline constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE5 = 
u"SD_HID_SD_HTMLEXPORT_PAGE5";
-inline constexpr OUStringLiteral HID_SD_HTMLEXPORT_PAGE6 = 
u"SD_HID_SD_HTMLEXPORT_PAGE6";
-
 inline constexpr OUStringLiteral HID_SD_TABBAR_PAGES = 
u"SD_HID_SD_TABBAR_PAGES";
 inline constexpr OUStringLiteral HID_SD_TABBAR_LAYERS = 
u"SD_HID_SD_TABBAR_LAYERS";
 
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 9136de7c8f40..5b42d3c8cfad 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -55,11 +55,6 @@ const sal_uInt16 nMagic = sal_uInt16(0x1977);
 // Key for the soffice.ini
 constexpr OUStringLiteral KEY_QUALITY = u"JPG-EXPORT-QUALITY";
 
-// The Help-IDs of the pages
-constexpr rtl::OUStringConstExpr aPageHelpIds[NOOFPAGES]
-= { HID_SD_HTMLEXPORT_PAGE1, HID_SD_HTMLEXPORT_PAGE2, 
HID_SD_HTMLEXPORT_PAGE3,
-HID_SD_HTMLEXPORT_PAGE4, HID_SD_HTMLEXPORT_PAGE5, 
HID_SD_HTMLEXPORT_PAGE6 };
-
 static SvStream& operator>>(SvStream& rIn, SdPublishingDesign& rDesign);
 
 static SvStream& WriteSdPublishingDesign(SvStream& rOut, const 
SdPublishingDesign& rDesign);


[Libreoffice-commits] core.git: sd/inc sd/source

2023-10-02 Thread Andreas Heinisch (via logerrit)
 sd/inc/strings.hrc|2 ++
 sd/source/ui/dlg/titledockwin.cxx |6 ++
 sd/source/ui/inc/titledockwin.hxx |2 ++
 sd/source/ui/view/drviews1.cxx|   21 +
 4 files changed, 31 insertions(+)

New commits:
commit 25d09bdb9f48313c000cc8ec8df60b1bb8efe2e6
Author: Andreas Heinisch 
AuthorDate: Sun Oct 1 11:28:31 2023 +0200
Commit: Andreas Heinisch 
CommitDate: Mon Oct 2 10:21:26 2023 +0200

tdf#87638 - Modify slide pane title in Impress/Draw based on edit mode

Change-Id: I0dd668324c32172144f29cf40c52e2b66e7895b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157444
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 8438a9262a95..e3f5c45a5fcd 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -234,7 +234,9 @@
 #define STR_PLACEHOLDER_DESCRIPTION_NOTES   
NC_("STR_PLACEHOLDER_DESCRIPTION_NOTES", "Notes Area")
 #define STR_UNDO_HANGULHANJACONVERSION  
NC_("STR_UNDO_HANGULHANJACONVERSION", "Hangul/Hanja Conversion")
 #define STR_LEFT_PANE_IMPRESS_TITLE 
NC_("STR_LEFT_PANE_IMPRESS_TITLE", "Slides")
+#define STR_LEFT_PANE_IMPRESS_TITLE_MASTER  
NC_("STR_LEFT_PANE_IMPRESS_TITLE_MASTER", "Master Slides")
 #define STR_LEFT_PANE_DRAW_TITLE
NC_("STR_LEFT_PANE_DRAW_TITLE", "Pages")
+#define STR_LEFT_PANE_DRAW_TITLE_MASTER 
NC_("STR_LEFT_PANE_DRAW_TITLE_MASTER", "Master Pages")
 #define STR_TASKPANEL_NOT_AVAILABLE_SUBSTITUTION
NC_("STR_TASKPANEL_NOT_AVAILABLE_SUBSTITUTION", "Preview not available")
 #define STR_TASKPANEL_PREPARING_PREVIEW_SUBSTITUTION
NC_("STR_TASKPANEL_PREPARING_PREVIEW_SUBSTITUTION", "Preparing preview")
 #define STR_TASKPANEL_LAYOUT_MENU_TITLE 
NC_("STR_TASKPANEL_LAYOUT_MENU_TITLE", "Layouts")
diff --git a/sd/source/ui/dlg/titledockwin.cxx 
b/sd/source/ui/dlg/titledockwin.cxx
index 0550f05d2f8b..d545170da688 100644
--- a/sd/source/ui/dlg/titledockwin.cxx
+++ b/sd/source/ui/dlg/titledockwin.cxx
@@ -68,6 +68,12 @@ namespace sd
 SfxDockingWindow::dispose();
 }
 
+void TitledDockingWindow::SetTitle(const OUString& i_rText)
+{
+m_sTitle = i_rText;
+Invalidate();
+}
+
 void TitledDockingWindow::SetText( const OUString& i_rText )
 {
 SfxDockingWindow::SetText( i_rText );
diff --git a/sd/source/ui/inc/titledockwin.hxx 
b/sd/source/ui/inc/titledockwin.hxx
index bdbd386ba62a..5a880e268739 100644
--- a/sd/source/ui/inc/titledockwin.hxx
+++ b/sd/source/ui/inc/titledockwin.hxx
@@ -76,6 +76,8 @@ namespace sd
 */
 Orientation GetOrientation() const;
 
+void SetTitle(const OUString& i_rText);
+
 private:
 // Window overridables
 virtual void Paint(vcl::RenderContext& rRenderContext, const 
::tools::Rectangle& i_rArea) override;
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index f9378e1ec4fd..309a5d5ed3cc 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -71,6 +71,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 using namespace com::sun::star;
 
@@ -393,6 +396,16 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool 
bIsLayerModeActive)
 
 ConfigureAppBackgroundColor();
 
+// tdf#87638 - change slide pane title according to the edit mode
+auto setLeftPaneTitleIfPaneExists
+= [pViewShell = GetViewFrame()](sal_uInt16 nId, TranslateId aId)
+{
+if (auto* pChildWindow = pViewShell->GetChildWindow(nId))
+if (auto* pTitledDockingWindow
+= static_cast(pChildWindow->GetWindow()))
+pTitledDockingWindow->SetTitle(SdResId(aId));
+};
+
 if (meEditMode == EditMode::Page)
 {
 /**
@@ -401,6 +414,10 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool 
bIsLayerModeActive)
 
 maTabControl->Clear();
 
+// tdf#87638 - change slide pane title according to the edit mode
+setLeftPaneTitleIfPaneExists(SID_LEFT_PANE_DRAW, 
STR_LEFT_PANE_DRAW_TITLE);
+setLeftPaneTitleIfPaneExists(SID_LEFT_PANE_IMPRESS, 
STR_LEFT_PANE_IMPRESS_TITLE);
+
 SdPage* pPage;
 sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind);
 
@@ -431,6 +448,10 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool 
bIsLayerModeActive)
 GetViewFrame()->SetChildWindow(
 AnimationChildWindow::GetChildWindowId(), false );
 
+// tdf#87638 - change slide pane title according to the edit mode
+setLeftPaneTitleIfPaneExists(SID_LEFT_PANE_DRAW, 
STR_LEFT_PANE_DRAW_TITLE_MASTER);
+setLeftPaneTitleIfPaneExists(SID_LEFT_PANE_IMPRESS, 
STR_LEFT_PANE_IMPRESS_TITLE_MASTER);
+
 if (comphelper::LibreOfficeKit::isActive())
 

[Libreoffice-commits] core.git: sd/inc

2023-09-26 Thread Gabor Kelemen (via logerrit)
 sd/inc/strings.hrc |   30 --
 1 file changed, 30 deletions(-)

New commits:
commit e53a99c4bbf09763ecfb05a0926e7957b31c1fff
Author: Gabor Kelemen 
AuthorDate: Mon Sep 25 10:14:09 2023 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Sep 26 16:26:44 2023 +0200

tdf#105303 (related) Drop unused translation strings

Obsoleted by
commit 28b6480c6bdd179f3943f768926b7f196226c768
commit c5cff66335ca162b52270059e57214c4065caf66

found with simple script:
for i in $( grep "^\#define" sd/inc/strings.hrc | cut -d " " -f 2 ) ; do if 
[ $(gg -l "$i" sd | wc -l ) -eq 1 ] ; then echo "$i: appears once" ; fi; done

Change-Id: I1f07ebc275b8ee9a165c5e1f5ad1d1e68f9eaa81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157239
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
Reviewed-by: Thorsten Behrens 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index a3501bfc50a1..8438a9262a95 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -178,9 +178,6 @@
 #define STR_GLUE_ESCDIR_VERT
NC_("STR_GLUE_ESCDIR_VERT", "Vertical")
 #define STR_GLUE_ESCDIR_ALL 
NC_("STR_GLUE_ESCDIR_ALL", "All?")
 #define STR_CANT_PERFORM_IN_LIVEMODE
NC_("STR_CANT_PERFORM_IN_LIVEMODE", "This action can't be run in the live 
mode.")
-#define STR_PUBLISH_BACK
NC_("STR_PUBLISH_BACK", "Back")
-#define STR_PUBLISH_NEXT
NC_("STR_PUBLISH_NEXT", "Continue")
-#define STR_PUBLISH_OUTLINE 
NC_("STR_PUBLISH_OUTLINE", "Overview")
 #define STR_EYEDROPPER  NC_("STR_EYEDROPPER", 
"Color Replacer")
 #define STR_UNDO_MORPHING   
NC_("STR_UNDO_MORPHING", "Cross-fading")
 #define STR_UNDO_EXPAND_PAGE
NC_("STR_UNDO_EXPAND_PAGE", "Expand Slide")
@@ -205,28 +202,6 @@
 #define STR_IMPRESS_DOCUMENT_FULLTYPE_80
NC_("STR_IMPRESS_DOCUMENT_FULLTYPE_80", "%PRODUCTNAME %PRODUCTVERSION 
Presentation")
 #define STR_GRAPHIC_DOCUMENT_FULLTYPE_80
NC_("STR_GRAPHIC_DOCUMENT_FULLTYPE_80", "%PRODUCTNAME %PRODUCTVERSION Drawing")
 
-// HtmlExport
-#define STR_PUBDLG_SAMENAME 
NC_("STR_PUBDLG_SAMENAME", "A design already exists with this name.\nDo you 
want to replace it?")
-#define STR_HTMLATTR_TEXT   
NC_("STR_HTMLATTR_TEXT", "Text")
-#define STR_HTMLATTR_LINK   
NC_("STR_HTMLATTR_LINK", "Hyperlink")
-#define STR_HTMLATTR_VLINK  
NC_("STR_HTMLATTR_VLINK", "Visited link")
-#define STR_HTMLATTR_ALINK  
NC_("STR_HTMLATTR_ALINK", "Active link")
-#define STR_HTMLEXP_NOTES   
NC_("STR_HTMLEXP_NOTES", "Notes")
-#define STR_HTMLEXP_CONTENTS
NC_("STR_HTMLEXP_CONTENTS", "Table of contents")
-#define STR_HTMLEXP_CLICKSTART  
NC_("STR_HTMLEXP_CLICKSTART", "Click here to start")
-#define STR_HTMLEXP_AUTHOR  
NC_("STR_HTMLEXP_AUTHOR", "Author")
-#define STR_HTMLEXP_EMAIL   
NC_("STR_HTMLEXP_EMAIL", "Email")
-#define STR_HTMLEXP_HOMEPAGE
NC_("STR_HTMLEXP_HOMEPAGE", "Homepage")
-#define STR_HTMLEXP_INFO
NC_("STR_HTMLEXP_INFO", "Further information")
-#define STR_HTMLEXP_DOWNLOAD
NC_("STR_HTMLEXP_DOWNLOAD", "Download presentation")
-#define STR_HTMLEXP_NOFRAMES
NC_("STR_HTMLEXP_NOFRAMES", "Unfortunately your browser does not support 
floating frames.")
-#define STR_HTMLEXP_FIRSTPAGE   
NC_("STR_HTMLEXP_FIRSTPAGE", "First page")
-#define STR_HTMLEXP_LASTPAGE
NC_("STR_HTMLEXP_LASTPAGE", "Last page")
-#define STR_HTMLEXP_SETTEXT 
NC_("STR_HTMLEXP_SETTEXT", "Text")
-#define STR_HTMLEXP_SETGRAPHIC  
NC_("STR_HTMLEXP_SETGRAPHIC", "Image")
-#define STR_HTMLEXP_OUTLINE 
NC_("STR_HTMLEXP_OUTLINE", "With contents")
-#define STR_HTMLEXP_NOOUTLINE   
NC_("STR_HTMLEXP_NOOUTLINE", "Without contents")
-#define STR_WEBVIEW_SAVE
NC_("STR_WEBVIEW_SAVE", "To given page")
 #define STR_UNDO_VECTORIZE  
NC_("STR_UNDO_VECTORIZE", "Convert bitmap to polygon" )
 #define STR_PRES_SOFTEND
NC_("STR_PRES_SOFTEND", "Click to exit presentation..." )
 #define STR_PRES_PAUSE  NC_("STR_PRES_PAUSE", 
"Pause..." )
@@ -235,9 +210,6 @@
 #define STR_WARNING_NOSOUNDFILE 
NC_("STR_WARNING_NOSOUNDFILE", "The file %\nis not a valid audio file !" )
 #define 

[Libreoffice-commits] core.git: sd/inc sd/qa sd/source

2023-08-25 Thread Andreas Heinisch (via logerrit)
 sd/inc/drawdoc.hxx  |4 ++--
 sd/qa/unit/misc-tests.cxx   |   24 
 sd/source/core/drawdoc3.cxx |4 +++-
 3 files changed, 29 insertions(+), 3 deletions(-)

New commits:
commit 139cffc531277b57bae8e272fef13af00ace5366
Author: Andreas Heinisch 
AuthorDate: Mon Jul 24 11:34:27 2023 +0200
Commit: Andreas Heinisch 
CommitDate: Fri Aug 25 14:10:52 2023 +0200

tdf#39519 - Rename slide if its name is not unique

For instance, if a slide is copied by ctrl + drag and drop (DND_ACTION_COPY)

Change-Id: I1c669c299a38431680ce602922c1e2c7f117a2ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154838
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 50a5e2f09ca3..12814f3717b8 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -346,8 +346,8 @@ public:
 page, or preserve the old name
  */
 
-SAL_DLLPRIVATE bool InsertBookmarkAsPage(const std::vector 
,
-  std::vector *pExchangeList,
+bool InsertBookmarkAsPage(const std::vector ,
+  std::vector *pExchangeList,
   bool bLink, bool bReplace, sal_uInt16 nPgPos,
   bool bNoDialogs, ::sd::DrawDocShell* 
pBookmarkDocSh,
   bool bCopy, bool bMergeMasterPages,
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index e8e34c20c8c2..3cdc212e69db 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -82,6 +82,7 @@ public:
 void testTdf131033();
 void testTdf129898LayerDrawnInSlideshow();
 void testTdf136956();
+void testTdf39519();
 void testEncodedTableStyles();
 
 CPPUNIT_TEST_SUITE(SdMiscTest);
@@ -104,6 +105,7 @@ public:
 CPPUNIT_TEST(testTdf131033);
 CPPUNIT_TEST(testTdf129898LayerDrawnInSlideshow);
 CPPUNIT_TEST(testTdf136956);
+CPPUNIT_TEST(testTdf39519);
 CPPUNIT_TEST(testEncodedTableStyles);
 CPPUNIT_TEST_SUITE_END();
 };
@@ -886,6 +888,28 @@ void SdMiscTest::testTdf136956()
 CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getRowCount());
 }
 
+void SdMiscTest::testTdf39519()
+{
+createSdImpressDoc();
+SdXImpressDocument* pXImpressDocument = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pXImpressDocument);
+
+// Change the name of the first page in the newly created document
+SdDrawDocument* pDoc = pXImpressDocument->GetDoc();
+SdPage* pPage = static_cast(pDoc->GetPage(1));
+pPage->SetName("Test");
+
+// Insert a bookmark as a new page using the same name
+std::vector aBookmarkList = { "Test" };
+pDoc->InsertBookmarkAsPage(aBookmarkList, nullptr, false, false, 2, true, 
pDoc->GetDocSh(),
+   true, false, false);
+
+// Check if the copied page has a different name
+SdPage* pCopiedPage = static_cast(pDoc->GetPage(2));
+// Without the fix in place, the names of the pages would not be different
+CPPUNIT_ASSERT(pCopiedPage->GetName() != pPage->GetName());
+}
+
 void SdMiscTest::testEncodedTableStyles()
 {
 // Silence unrelated failure:
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 6fbefd24..357858f46222 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -696,7 +696,9 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 }
 }
 
-if( bMustRename )
+// tdf#39519 - rename page if its name is not unique, e.g., if 
a slide is copied by
+// ctrl + drag and drop (DND_ACTION_COPY)
+if (bMustRename || !mpDocSh->IsPageNameUnique(aPgName))
 {
 // Page name already in use -> use default name for 
default and
 // notes page


[Libreoffice-commits] core.git: sd/inc

2023-08-24 Thread Andrea Gelmini (via logerrit)
 sd/inc/theme/ThemeColorChanger.hxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 2c38f5fdaba37dd9f7239e95c28ad63e7174d6e0
Author: Andrea Gelmini 
AuthorDate: Thu Aug 24 10:20:39 2023 +0200
Commit: Julien Nabet 
CommitDate: Thu Aug 24 22:15:31 2023 +0200

Remove duplicated include

Change-Id: Ie95a596a9ee9928ee475f49fb666150f67e0b122
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156035
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sd/inc/theme/ThemeColorChanger.hxx 
b/sd/inc/theme/ThemeColorChanger.hxx
index 72ae70a0ea3c..ff100fd511ce 100644
--- a/sd/inc/theme/ThemeColorChanger.hxx
+++ b/sd/inc/theme/ThemeColorChanger.hxx
@@ -13,7 +13,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 namespace sd


[Libreoffice-commits] core.git: sd/inc sd/qa sd/source

2023-07-17 Thread Andreas Heinisch (via logerrit)
 sd/inc/strings.hrc  |2 
 sd/qa/unit/uiimpress.cxx|   58 ++
 sd/source/ui/inc/unmodpg.hxx|   28 
 sd/source/ui/slidesorter/controller/SlsPageSelector.cxx |   18 +++
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx  |9 +
 sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx |   14 ++
 sd/source/ui/view/unmodpg.cxx   |   69 
 7 files changed, 198 insertions(+)

New commits:
commit 2b3a950e937efe77ad39b034819c9f7a707fe29e
Author: Andreas Heinisch 
AuthorDate: Wed Jun 21 10:07:02 2023 +0200
Commit: Andreas Heinisch 
CommitDate: Mon Jul 17 09:11:29 2023 +0200

tdf#130581 - Add undo command for hide/show slides

Change-Id: I7305e222df65fda6523940ca63f5759857c94bea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153375
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 0d9303e18bea..afcf1d4e3be3 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -130,6 +130,8 @@
 #define STR_UNDO_INSERT_FILE
NC_("STR_UNDO_INSERT_FILE", "Insert file")
 #define STR_UNDO_INSERT_SPECCHAR
NC_("STR_UNDO_INSERT_SPECCHAR", "Insert special character")
 #define STR_UNDO_SET_PRESLAYOUT 
NC_("STR_UNDO_SET_PRESLAYOUT", "Apply presentation layout")
+#define STR_UNDO_HIDE_SLIDE 
NC_("STR_UNDO_HIDE_SLIDE", "Hide slide")
+#define STR_UNDO_SHOW_SLIDE 
NC_("STR_UNDO_SHOW_SLIDE", "Show slide")
 #define STR_PLAYNC_("STR_PLAY", 
"~Play")
 #define STR_STOPNC_("STR_STOP", 
"Sto~p")
 #define STR_UNDO_ORIGINALSIZE   
NC_("STR_UNDO_ORIGINALSIZE", "Original Size")
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index c4cdc0a5e338..3a1c2ad911aa 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -56,6 +56,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -491,6 +493,62 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf100950)
 CPPUNIT_ASSERT(rPageSelector.IsPageSelected(2));
 }
 
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf130581)
+{
+createSdImpressDoc();
+
+// Hide slide and check the number of available undo actions
+dispatchCommand(mxComponent, ".uno:ShowSlide", {});
+dispatchCommand(mxComponent, ".uno:HideSlide", {});
+
+// There should be a single undo action, i.e., hide slide
+auto pXImpressDocument = 
dynamic_cast(mxComponent.get());
+SdDrawDocument* pDocument = pXImpressDocument->GetDoc();
+sd::UndoManager* pUndoManager = pDocument->GetUndoManager();
+// Without the fix in place, this test would have failed with
+// - Expected: 1
+// - Actual  : 0
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pUndoManager->GetUndoActionCount());
+CPPUNIT_ASSERT_EQUAL(SdResId(STR_UNDO_HIDE_SLIDE), 
pUndoManager->GetUndoActionComment());
+sd::slidesorter::SlideSorterViewShell* pSSVS = getSlideSorterViewShell();
+
+// Check if the page is actually hidden
+auto& rSSController = pSSVS->GetSlideSorter().GetController();
+auto& rPageSelector = rSSController.GetPageSelector();
+CPPUNIT_ASSERT_EQUAL(true, rPageSelector.IsPageExcluded(0));
+
+// Undo hide slide action and check the number of available redo actions
+dispatchCommand(mxComponent, ".uno:Undo", {});
+// Without the fix in place, this test would have failed with
+// - Expected: 1
+// - Actual  : 0
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pUndoManager->GetRedoActionCount());
+CPPUNIT_ASSERT_EQUAL(SdResId(STR_UNDO_HIDE_SLIDE), 
pUndoManager->GetRedoActionComment());
+CPPUNIT_ASSERT_EQUAL(false, rPageSelector.IsPageExcluded(0));
+
+// Show slide and check the number of available undo actions
+dispatchCommand(mxComponent, ".uno:Redo", {});
+CPPUNIT_ASSERT_EQUAL(true, rPageSelector.IsPageExcluded(0));
+dispatchCommand(mxComponent, ".uno:ShowSlide", {});
+// Without the fix in place, this test would have failed with
+// - Expected: 2
+// - Actual  : 0
+CPPUNIT_ASSERT_EQUAL(static_cast(2), 
pUndoManager->GetUndoActionCount());
+CPPUNIT_ASSERT_EQUAL(SdResId(STR_UNDO_SHOW_SLIDE), 
pUndoManager->GetUndoActionComment());
+CPPUNIT_ASSERT_EQUAL(false, rPageSelector.IsPageExcluded(0));
+
+// Undo show slide action and check the number of available undo/redo 
actions
+dispatchCommand(mxComponent, ".uno:Undo", {});
+// Without the fix in place, this test would have failed with
+// - Expected: 1
+// - Actual  : 0
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pUndoManager->GetUndoActionCount());
+CPPUNIT_ASSERT_EQUAL(SdResId(STR_UNDO_HIDE_SLIDE), 

[Libreoffice-commits] core.git: sd/inc sd/source

2023-06-08 Thread rash419 (via logerrit)
 sd/inc/sdgrffilter.hxx   |1 
 sd/source/filter/grf/sdgrffilter.cxx |   85 +--
 2 files changed, 54 insertions(+), 32 deletions(-)

New commits:
commit 1c47cd54da5f193f4b27cf86ef167c8a415c0408
Author: rash419 
AuthorDate: Wed Jun 7 11:25:00 2023 +0530
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 8 14:30:52 2023 +0200

tdf#155444 added support for multi image tiff file

Signed-off-by: rash419 
Change-Id: I188aebae9c853e87dc50ffda5b7d88228559a7c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152657
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sd/inc/sdgrffilter.hxx b/sd/inc/sdgrffilter.hxx
index dc9027f94ca3..28ce9de6dd29 100644
--- a/sd/inc/sdgrffilter.hxx
+++ b/sd/inc/sdgrffilter.hxx
@@ -34,6 +34,7 @@ public:
 bool Export() override;
 
 static void HandleGraphicFilterError(ErrCode nFilterError, ErrCode 
nStreamError);
+static void InsertSdrGrafObj(Graphic pGraphic, SdPage* pPage);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/filter/grf/sdgrffilter.cxx 
b/sd/source/filter/grf/sdgrffilter.cxx
index 71f9221ab055..693f297a19c6 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -156,50 +156,71 @@ bool SdGRFFilter::Import()
 if( mrDocument.GetPageCount() == 0 )
 mrDocument.CreateFirstPages();
 
-SdPage* pPage = mrDocument.GetSdPage( 0, PageKind::Standard );
-Point   aPos;
-SizeaPagSize( pPage->GetSize() );
-SizeaGrfSize( OutputDevice::LogicToLogic( 
aGraphic.GetPrefSize(),
-aGraphic.GetPrefMapMode(), 
MapMode(MapUnit::Map100thMM)));
-
-aPagSize.AdjustWidth( -(pPage->GetLeftBorder() + 
pPage->GetRightBorder()) );
-aPagSize.AdjustHeight( -(pPage->GetUpperBorder() + 
pPage->GetLowerBorder()) );
-
-// scale to fit page
-if ( ( ( aGrfSize.Height() > aPagSize.Height() ) || ( aGrfSize.Width() 
> aPagSize.Width() ) ) &&
-aGrfSize.Height() && aPagSize.Height() )
+GfxLink aGfxLink = aGraphic.GetGfxLink();
+if( aGfxLink.GetType() == GfxLinkType::NativeTif && 
aGraphic.IsAnimated() )
 {
-double fGrfWH = static_cast(aGrfSize.Width()) / 
aGrfSize.Height();
-double fWinWH = static_cast(aPagSize.Width()) / 
aPagSize.Height();
-
-// adjust graphic to page size (scales)
-if( fGrfWH < fWinWH )
+Animation aAnim( aGraphic.GetAnimation() );
+const auto nImages = aAnim.Count();
+for (size_t i = 0; i < nImages - 1; ++i)
 {
-aGrfSize.setWidth( static_cast( aPagSize.Height() 
* fGrfWH ) );
-aGrfSize.setHeight( aPagSize.Height() );
+mrDocument.DuplicatePage(0);
 }
-else if( fGrfWH > 0.F )
+for (size_t nPageIndex = 0; nPageIndex < nImages; ++nPageIndex)
 {
-aGrfSize.setWidth( aPagSize.Width() );
-aGrfSize.setHeight( static_cast( aPagSize.Width() 
/ fGrfWH ) );
+Graphic pGraphic = aAnim.Get(nPageIndex).maBitmapEx;
+SdPage* pPage = mrDocument.GetSdPage(nPageIndex, 
PageKind::Standard);
+InsertSdrGrafObj(pGraphic, pPage);
 }
 }
-
-// set output rectangle for graphic
-aPos.setX( ( ( aPagSize.Width() - aGrfSize.Width() ) >> 1 ) + 
pPage->GetLeftBorder() );
-aPos.setY( ( ( aPagSize.Height() - aGrfSize.Height() ) >> 1 )  + 
pPage->GetUpperBorder() );
-
-pPage->InsertObject(
-new SdrGrafObj(
-pPage->getSdrModelFromSdrPage(),
-aGraphic,
-::tools::Rectangle(aPos, aGrfSize)));
+else
+{
+SdPage* pPage = mrDocument.GetSdPage(0, PageKind::Standard);
+InsertSdrGrafObj(aGraphic, pPage);
+}
 bRet = true;
 }
 
 return bRet;
 }
 
+void SdGRFFilter::InsertSdrGrafObj(Graphic pGraphic, SdPage* pPage)
+{
+Point aPos;
+Size aPagSize(pPage->GetSize());
+Size aGrfSize(OutputDevice::LogicToLogic(pGraphic.GetPrefSize(), 
pGraphic.GetPrefMapMode(),
+ MapMode(MapUnit::Map100thMM)));
+
+aPagSize.AdjustWidth(-(pPage->GetLeftBorder() + pPage->GetRightBorder()));
+aPagSize.AdjustHeight(-(pPage->GetUpperBorder() + 
pPage->GetLowerBorder()));
+
+// scale to fit page
+if (((aGrfSize.Height() > aPagSize.Height()) || (aGrfSize.Width() > 
aPagSize.Width()))
+&& aGrfSize.Height() && aPagSize.Height())
+{
+double fGrfWH = static_cast(aGrfSize.Width()) / 
aGrfSize.Height();
+double fWinWH = static_cast(aPagSize.Width()) / 
aPagSize.Height();
+
+// adjust graphic to page size (scales)
+if (fGrfWH < fWinWH)
+{
+

[Libreoffice-commits] core.git: sd/inc sd/sdi sd/source

2023-06-07 Thread Pranam Lashkari (via logerrit)
 sd/inc/app.hrc |2 +-
 sd/sdi/sdraw.sdi   |2 +-
 sd/source/ui/view/viewshe3.cxx |   10 ++
 3 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit d7cf5429336ea4cf9a92b3338fe03ef7dc142dcd
Author: Pranam Lashkari 
AuthorDate: Fri Jun 2 03:43:05 2023 +0700
Commit: Pranam Lashkari 
CommitDate: Wed Jun 7 11:14:05 2023 +0200

sd: introduced impress slide duplication to particular position

Change-Id: I4931f92158c31506b765376639907d2d4f250deb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152512
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-by: Pranam Lashkari 
(cherry picked from commit dc007c18097143bdb192955dda730d696d8bcb31)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152656
Tested-by: Jenkins

diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index ec0eed81d1f3..e275e4688258 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -246,7 +246,7 @@
 #define ID_VAL_ISACTIVE (SID_SD_START+216)
 #define ID_VAL_WHATKIND (SID_SD_START+217)
 #define ID_VAL_PAGEWIDTH(SID_SD_START+218)
-// FREE
+#define ID_INSERT_POS   (SID_SD_START+219)
 #define ID_VAL_PAGETOP  (SID_SD_START+220)
 #define ID_VAL_PAGEBOTTOM   (SID_SD_START+221)
 #define ID_VAL_PAGELEFT (SID_SD_START+222)
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index cf4d008f6cc8..7bb752c687ac 100644
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -1337,7 +1337,7 @@ SfxBoolItem DrawingMode SID_DRAWINGMODE
 ]
 
 SfxVoidItem DuplicatePage SID_DUPLICATE_PAGE
-(SfxStringItem PageName ID_VAL_PAGENAME,SfxUInt32Item WhatLayout 
ID_VAL_WHATLAYOUT,SfxBoolItem IsPageBack ID_VAL_ISPAGEBACK,SfxBoolItem 
IsPageObj ID_VAL_ISPAGEOBJ)
+(SfxStringItem PageName ID_VAL_PAGENAME,SfxUInt32Item WhatLayout 
ID_VAL_WHATLAYOUT,SfxBoolItem IsPageBack ID_VAL_ISPAGEBACK,SfxBoolItem 
IsPageObj ID_VAL_ISPAGEOBJ,SfxUInt16Item InsertPos ID_INSERT_POS)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index a7d466f6d94b..cb76eaf99844 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -189,7 +189,9 @@ SdPage* ViewShell::CreateOrDuplicatePage (
 
 // 1. Process the arguments.
 const SfxItemSet* pArgs = rRequest.GetArgs();
-if (! pArgs)
+const SfxUInt16Item* pInsertPos = 
rRequest.GetArg(ID_INSERT_POS);
+
+if (! pArgs || (pArgs->Count() == 1 && pInsertPos))
 {
 // AutoLayouts must be ready
 pDocument->StopWorkStartupDelay();
@@ -206,7 +208,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
 eNotesLayout = pNotesTemplatePage->GetAutoLayout();
 }
 }
-else if (pArgs->Count() == 1)
+else if (pArgs->Count() == 1 || pArgs->Count() == 2)
 {
 pDocument->StopWorkStartupDelay();
 const SfxUInt32Item* pLayout = 
rRequest.GetArg(ID_VAL_WHATLAYOUT);
@@ -222,7 +224,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
 }
 }
 }
-else if (pArgs->Count() == 4)
+else if (pArgs->Count() == 4 || pArgs->Count() == 5)
 {
 // AutoLayouts must be ready
 pDocument->StopWorkStartupDelay();
@@ -354,7 +356,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
 aNotesPageName,
 bIsPageBack,
 bIsPageObj,
-nInsertPosition);
+pInsertPos ? (pInsertPos->GetValue()*2)+1 : 
nInsertPosition);
 break;
 
 default:


[Libreoffice-commits] core.git: sd/inc sd/qa sd/source

2023-05-10 Thread Paris Oplopoios (via logerrit)
 sd/inc/viewopt.hxx   |   34 
 sd/qa/unit/tiledrendering/tiledrendering.cxx |  114 +++
 sd/source/ui/inc/DrawViewShell.hxx   |5 -
 sd/source/ui/inc/unomodel.hxx|3 
 sd/source/ui/unoidl/unomodel.cxx |   16 +++
 sd/source/ui/view/drviews4.cxx   |2 
 sd/source/ui/view/drviews5.cxx   |2 
 sd/source/ui/view/drviewsa.cxx   |1 
 sd/source/ui/view/drviewsk.cxx   |   25 +
 9 files changed, 196 insertions(+), 6 deletions(-)

New commits:
commit fc87b725d5e29f40d78f2ca7c20a2b516bcfa29a
Author: Paris Oplopoios 
AuthorDate: Wed Apr 12 04:23:56 2023 +0300
Commit: Paris Oplopoios 
CommitDate: Wed May 10 13:07:10 2023 +0200

Add view options class in Draw

Add SdViewOptions class in Draw to hold the view state and
manage view separation in tiled rendering mode

Change-Id: I1546fa536555b3262217ff4be163a48b958b7a33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150249
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit fa2fdc90d5fba9420cbb475f8c88423124c158ec)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151519
Tested-by: Jenkins
Reviewed-by: Paris Oplopoios 

diff --git a/sd/inc/viewopt.hxx b/sd/inc/viewopt.hxx
new file mode 100644
index ..03ebd2ada659
--- /dev/null
+++ b/sd/inc/viewopt.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+#include 
+
+/// View options for the current view
+struct SdViewOptions
+{
+// The color of the area behind the slide (used to be called "Wiese")
+Color mnAppBackgroundColor;
+// The color of the document background
+Color mnDocBackgroundColor;
+// The name of the color scheme
+OUString msColorSchemeName = "Default";
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 40eb72c1c098..91a929a11d07 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -51,6 +51,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 #include 
@@ -2391,6 +2393,118 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testCutSelectionChange)
 CPPUNIT_ASSERT_EQUAL(static_cast(0), m_aSelection.size());
 }
 
+CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testGetViewRenderState)
+{
+SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
+int nFirstViewId = SfxLokHelper::getView();
+ViewCallback aView1;
+CPPUNIT_ASSERT_EQUAL(OString(";Default"), 
pXImpressDocument->getViewRenderState());
+// Create a second view
+SfxLokHelper::createView();
+ViewCallback aView2;
+CPPUNIT_ASSERT_EQUAL(OString(";Default"), 
pXImpressDocument->getViewRenderState());
+// Set to dark scheme
+{
+uno::Sequence aPropertyValues = 
comphelper::InitPropertySequence(
+{
+{ "NewTheme", uno::Any(OUString("Dark")) },
+}
+);
+dispatchCommand(mxComponent, ".uno:ChangeTheme", aPropertyValues);
+}
+CPPUNIT_ASSERT_EQUAL(OString(";Dark"), 
pXImpressDocument->getViewRenderState());
+// Switch back to the first view, and check that the options string is the 
same
+SfxLokHelper::setView(nFirstViewId);
+CPPUNIT_ASSERT_EQUAL(OString(";Default"), 
pXImpressDocument->getViewRenderState());
+}
+
+// Helper function to get a tile to a bitmap and check the pixel color
+static void assertTilePixelColor(SdXImpressDocument* pXImpressDocument, int 
nPixelX, int nPixelY, Color aColor)
+{
+size_t nCanvasSize = 1024;
+size_t nTileSize = 256;
+std::vector aPixmap(nCanvasSize * nCanvasSize * 4, 0);
+ScopedVclPtrInstance pDevice(DeviceFormat::WITHOUT_ALPHA);
+pDevice->SetBackground(Wallpaper(COL_TRANSPARENT));
+pDevice->SetOutputSizePixelScaleOffsetAndLOKBuffer(Size(nCanvasSize, 
nCanvasSize),
+Fraction(1.0), Point(), aPixmap.data());

[Libreoffice-commits] core.git: sd/inc sd/source

2023-04-11 Thread Baole Fang (via logerrit)
 sd/inc/strings.hrc |2 ++
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |6 +-
 sd/source/ui/view/drviewsa.cxx |6 +-
 sd/source/ui/view/outlnvsh.cxx |5 -
 4 files changed, 16 insertions(+), 3 deletions(-)

New commits:
commit 487010ef62405a1a728ae9b3d838e934015b1719
Author: Baole Fang 
AuthorDate: Tue Mar 28 22:50:30 2023 -0400
Commit: Heiko Tietze 
CommitDate: Tue Apr 11 15:24:43 2023 +0200

tdf#150477: Change "Slide" to "Page" in Draw status bar

Originally, Draw displays "Slide x of y".
Now, a new string is added, so that it displays "Page x of y".

Change-Id: I5857626b5a18decda4bf235b67a3c7d877556e94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149671
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 81c54ccb8e86..187a411dc38e 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -94,6 +94,8 @@
 #define STR_SVX_FILENC_("STR_SVX_FILE", 
"Amiga SVX Audio")
 #define STR_SD_PAGE_COUNT   
NC_("STR_SD_PAGE_COUNT", "Slide %1 of %2")
 #define STR_SD_PAGE_COUNT_CUSTOM
NC_("STR_SD_PAGE_COUNT_CUSTOM", "Slide %1 of %2 (%3)")
+#define STR_SD_PAGE_COUNT_DRAW  
NC_("STR_SD_PAGE_COUNT_DRAW", "Page %1 of %2")
+#define STR_SD_PAGE_COUNT_CUSTOM_DRAW   
NC_("STR_SD_PAGE_COUNT_CUSTOM_DRAW", "Page %1 of %2 (%3)")
 #define STR_ALL_SUPPORTED_FORMATS   
NC_("STR_ALL_SUPPORTED_FORMATS", "All supported formats")
 #define STR_ALL_FILES   NC_("STR_ALL_FILES", 
"All files")
 #define STR_UNDO_INSERT_TEXTFRAME   
NC_("STR_UNDO_INSERT_TEXTFRAME", "Insert text frame")
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx 
b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 2bd908fe93d0..d1c130ae3a8f 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -820,6 +820,7 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet)
 // page view and layout
 SdPage* pPage  = nullptr;
 sal_uInt16 nSelectedPages = 
mrSlideSorter.GetController().GetPageSelector().GetSelectedPageCount();
+View* pDrView = ();
 
 //Set number of slides
 if (nSelectedPages > 0)
@@ -836,7 +837,10 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet)
 sal_Int32 nPageCount = mrSlideSorter.GetModel().GetPageCount();
 sal_Int32 nActivePageCount = 
static_cast(mrSlideSorter.GetModel().GetDocument()->GetActiveSdPageCount());
 
-aPageStr = (nPageCount == nActivePageCount) ? 
SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM);
+if (pDrView->GetDoc().GetDocumentType() == DocumentType::Draw)
+aPageStr = (nPageCount == nActivePageCount) ? 
SdResId(STR_SD_PAGE_COUNT_DRAW) : SdResId(STR_SD_PAGE_COUNT_CUSTOM_DRAW);
+else
+aPageStr = (nPageCount == nActivePageCount) ? 
SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM);
 
 aPageStr = aPageStr.replaceFirst("%1", 
OUString::number(nFirstPage));
 aPageStr = aPageStr.replaceFirst("%2", 
OUString::number(nPageCount));
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index b09944043c24..34324d3aa93f 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -656,7 +656,11 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
 sal_Int32 nPageCount = sal_Int32(GetDoc()->GetSdPageCount(mePageKind));
 sal_Int32 nActivePageCount = 
sal_Int32(GetDoc()->GetActiveSdPageCount());
 // Always show the slide/page number.
-OUString aOUString = (nPageCount == nActivePageCount) ? 
SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM);
+OUString aOUString;
+if (GetDoc()->GetDocumentType() == DocumentType::Draw)
+aOUString = (nPageCount == nActivePageCount) ? 
SdResId(STR_SD_PAGE_COUNT_DRAW) : SdResId(STR_SD_PAGE_COUNT_CUSTOM_DRAW);
+else
+aOUString = (nPageCount == nActivePageCount) ? 
SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM);
 
 aOUString = aOUString.replaceFirst("%1", 
OUString::number(maTabControl->GetCurPagePos() + 1));
 aOUString = aOUString.replaceFirst("%2", OUString::number(nPageCount));
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 1d3bd9500841..8add43b4ad4b 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1320,7 +1320,10 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& 
rSet)
 
 SdrPage* pPage = GetDoc()->GetSdPage( static_cast(nPos), 
PageKind::Standard );
 
-aPageStr = 

[Libreoffice-commits] core.git: sd/inc sd/source

2023-04-07 Thread Baole Fang (via logerrit)
 sd/inc/strings.hrc |1 -
 sd/source/ui/docshell/docshel2.cxx |   11 ---
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 04bf1d2385ed80e7aee8015dc69e868c2abe4142
Author: Baole Fang 
AuthorDate: Tue Mar 28 23:18:37 2023 -0400
Commit: Mike Kaganski 
CommitDate: Fri Apr 7 16:30:21 2023 +0200

tdf#154437: Check "Page" instead of "Slide" in Draw rename

Change-Id: Iec1ee88f12895007240408c8411cc1638c2f0559
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149672
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index c9a48bfe3574..81c54ccb8e86 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -92,7 +92,6 @@
 #define STR_VOC_FILENC_("STR_VOC_FILE", 
"Creative Labs Audio")
 #define STR_AIFF_FILE   NC_("STR_AIFF_FILE", 
"Apple/SGI Audio")
 #define STR_SVX_FILENC_("STR_SVX_FILE", 
"Amiga SVX Audio")
-#define STR_SD_PAGE NC_("STR_SD_PAGE", 
"Slide")
 #define STR_SD_PAGE_COUNT   
NC_("STR_SD_PAGE_COUNT", "Slide %1 of %2")
 #define STR_SD_PAGE_COUNT_CUSTOM
NC_("STR_SD_PAGE_COUNT_CUSTOM", "Slide %1 of %2 (%3)")
 #define STR_ALL_SUPPORTED_FORMATS   
NC_("STR_ALL_SUPPORTED_FORMATS", "All supported formats")
diff --git a/sd/source/ui/docshell/docshel2.cxx 
b/sd/source/ui/docshell/docshel2.cxx
index caf0fc86f1b1..582afec0517a 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -305,12 +305,17 @@ bool DrawDocShell::IsNewPageNameValid( OUString & 
rInOutPageName, bool bResetStr
 {
 bool bCanUseNewName = false;
 
-// check if name is something like 'Slide n'
-OUString aStrPage(SdResId(STR_SD_PAGE) + " ");
+// check if name is something like 'Slide/Page n'
+OUString aStrPage;
+if (GetDoc()->GetDocumentType() == DocumentType::Draw)
+aStrPage = SdResId(STR_PAGE_NAME) + " ";
+else
+// using the same strings as SdPage::GetName
+aStrPage = SdResId(STR_PAGE) + " ";
 
 bool bIsStandardName = false;
 
-// prevent also _future_ slide names of the form "'STR_SD_PAGE' + ' ' + 
'[0-9]+|[a-z]|[A-Z]|[CDILMVX]+|[cdilmvx]+'"
+// prevent also _future_ slide names of the form "'STR_PAGE' + ' ' + 
'[0-9]+|[a-z]|[A-Z]|[CDILMVX]+|[cdilmvx]+'"
 // (arabic, lower- and upper case single letter, lower- and upper case 
roman numbers)
 if (rInOutPageName.startsWith(aStrPage) &&
 rInOutPageName.getLength() > aStrPage.getLength())


[Libreoffice-commits] core.git: sd/inc sd/source

2023-02-24 Thread Noel Grandin (via logerrit)
 sd/inc/stlsheet.hxx |   13 
 sd/source/core/stlsheet.cxx |   71 +++-
 2 files changed, 40 insertions(+), 44 deletions(-)

New commits:
commit a39f5da6f621fc60df0dbdd6c5a08cae5a18763f
Author: Noel Grandin 
AuthorDate: Thu Feb 23 15:27:49 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 20:30:29 2023 +

BaseMutex->std::mutex in SdStyleSheet

Change-Id: I9700622ac805a9e74df1701c4ece97ef960388ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147586
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index e830c097e990..fe1079ffd616 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -29,13 +29,14 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
-#include 
 
 #include 
 
 #include 
+#include 
 
 #include "prlayout.hxx"
 
@@ -50,7 +51,7 @@ typedef cppu::ImplInheritanceHelper< SfxUnoStyleSheet,
 css::util::XModifyBroadcaster,
 css::lang::XComponent > SdStyleSheetBase ;
 
-class SdStyleSheet final : public SdStyleSheetBase, private ::cppu::BaseMutex
+class SdStyleSheet final : public SdStyleSheetBase
 {
 public:
 SdStyleSheet( const OUString& rDisplayName, SfxStyleSheetBasePool& rPool, 
SfxStyleFamily eFamily, SfxStyleSearchBits nMask );
@@ -152,12 +153,14 @@ private:
 
 void disposing();
 
+mutable std::mutex m_aMutex;
+bool m_bDisposed = false;
+bool m_bInDispose = false;
+comphelper::OInterfaceContainerHelper4 
maModifyListeners;
+comphelper::OInterfaceContainerHelper4 
maEventListeners;
 OUString   msApiName;
 rtl::Reference< SfxStyleSheetBasePool > mxPool;
 
-/** broadcast helper for events */
-::cppu::OBroadcastHelper mrBHelper;
-
 std::unique_ptr< ModifyListenerForwarder > mpModifyListenerForwarder;
 
 SdStyleSheet( const SdStyleSheet& ) = delete;
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 96850f5b107e..71b08db448f0 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -142,10 +142,8 @@ void ModifyListenerForwarder::Notify(SfxBroadcaster& 
/*rBC*/, const SfxHint& /*r
 
 SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, 
SfxStyleSheetBasePool& _rPool, SfxStyleFamily eFamily, SfxStyleSearchBits 
_nMask)
 : SdStyleSheetBase( rDisplayName, _rPool, eFamily, _nMask)
-, ::cppu::BaseMutex()
 , msApiName( rDisplayName )
 , mxPool( &_rPool )
-, mrBHelper( m_aMutex )
 {
 }
 
@@ -301,12 +299,11 @@ bool SdStyleSheet::IsUsed() const
 
 if( !bResult )
 {
-MutexGuard aGuard( mrBHelper.rMutex );
+std::unique_lock aGuard( m_aMutex );
 
-cppu::OInterfaceContainerHelper * pContainer = mrBHelper.getContainer( 
cppu::UnoType::get() );
-if( pContainer )
+if( maModifyListeners.getLength(aGuard) )
 {
-const Sequence< Reference< XInterface > > aModifyListeners( 
pContainer->getElements() );
+std::vector> 
aModifyListeners( maModifyListeners.getElements(aGuard) );
 bResult = std::any_of(aModifyListeners.begin(), 
aModifyListeners.end(),
 [](const Reference& rListener) {
 Reference< XStyle > xStyle( rListener, UNO_QUERY );
@@ -349,10 +346,8 @@ bool SdStyleSheet::IsEditable()
 return false;
 }
 
-MutexGuard aGuard(mrBHelper.rMutex);
-
-auto pContainer = 
mrBHelper.getContainer(cppu::UnoType::get());
-return !pContainer || pContainer->getLength() <= 1;
+std::unique_lock aGuard(m_aMutex);
+return maModifyListeners.getLength(aGuard) <= 1;
 }
 
 /**
@@ -736,7 +731,7 @@ void SAL_CALL SdStyleSheet::release(  ) noexcept
 
 // restore reference count:
 osl_atomic_increment( _refCount );
-if (! mrBHelper.bDisposed) try
+if (! m_bDisposed) try
 {
 dispose();
 }
@@ -745,7 +740,7 @@ void SAL_CALL SdStyleSheet::release(  ) noexcept
 // don't break throw ()
 TOOLS_WARN_EXCEPTION( "sd", "" );
 }
-OSL_ASSERT( mrBHelper.bDisposed );
+OSL_ASSERT( m_bDisposed );
 SdStyleSheetBase::release();
 }
 
@@ -754,33 +749,33 @@ void SAL_CALL SdStyleSheet::release(  ) noexcept
 void SAL_CALL SdStyleSheet::dispose(  )
 {
 {
-MutexGuard aGuard(mrBHelper.rMutex);
-if (mrBHelper.bDisposed || mrBHelper.bInDispose)
+std::unique_lock aGuard(m_aMutex);
+if (m_bDisposed || m_bInDispose)
 return;
 
-mrBHelper.bInDispose = true;
+m_bInDispose = true;
 }
 try
 {
+std::unique_lock aGuard(m_aMutex);
 // side effect: keeping a reference to this
 EventObject aEvt( static_cast< OWeakObject * >( this ) );
 try
 {
-mrBHelper.aLC.disposeAndClear( aEvt );
+maModifyListeners.disposeAndClear( aGuard, aEvt );
+maEventListeners.disposeAndClear( aGuard, aEvt 

[Libreoffice-commits] core.git: sd/inc sd/source

2022-12-21 Thread Stephan Bergmann (via logerrit)
 sd/inc/Annotation.hxx  |   11 ---
 sd/source/core/annotations/Annotation.cxx  |   22 --
 sd/source/ui/annotations/annotationtag.cxx |3 ++-
 3 files changed, 26 insertions(+), 10 deletions(-)

New commits:
commit 99009c9535dfa3e0d838989ccc7d84bfa2320ff4
Author: Stephan Bergmann 
AuthorDate: Wed Dec 21 16:09:49 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 22 07:44:42 2022 +

loplugin:unocast (sd::Annotation)

(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

Change-Id: Id600e83ae94409914b20a2a2620031ce340a9390
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144698
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx
index 707f2cdc8e78..b23cd2503bb3 100644
--- a/sd/inc/Annotation.hxx
+++ b/sd/inc/Annotation.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -74,7 +75,8 @@ struct SD_DLLPUBLIC CustomAnnotationMarker
 };
 
 class Annotation final : private ::cppu::BaseMutex,
-   public 
::cppu::WeakComponentImplHelper,
+   public ::cppu::WeakComponentImplHelper<
+   css::office::XAnnotation, css::lang::XUnoTunnel>,
public ::cppu::PropertySetMixin
 {
 public:
@@ -90,8 +92,8 @@ public:
 
 // XInterface:
 virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const & type) 
override;
-virtual void SAL_CALL acquire() noexcept override { 
::cppu::WeakComponentImplHelper::acquire(); }
-virtual void SAL_CALL release() noexcept override { 
::cppu::WeakComponentImplHelper::release(); }
+virtual void SAL_CALL acquire() noexcept override { 
WeakComponentImplHelper::acquire(); }
+virtual void SAL_CALL release() noexcept override { 
WeakComponentImplHelper::release(); }
 
 // css::beans::XPropertySet:
 virtual css::uno::Reference SAL_CALL 
getPropertySetInfo() override;
@@ -116,6 +118,9 @@ public:
 virtual void SAL_CALL setDateTime(const css::util::DateTime & the_value) 
override;
 virtual css::uno::Reference SAL_CALL getTextRange() 
override;
 
+sal_Int64 SAL_CALL getSomething(css::uno::Sequence const & 
aIdentifier) override;
+static css::uno::Sequence const & getUnoTunnelId();
+
 void createChangeUndo();
 
 void createCustomAnnotationMarker()
diff --git a/sd/source/core/annotations/Annotation.cxx 
b/sd/source/core/annotations/Annotation.cxx
index 991412f063d5..1cd608c69e00 100644
--- a/sd/source/core/annotations/Annotation.cxx
+++ b/sd/source/core/annotations/Annotation.cxx
@@ -26,6 +26,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -118,7 +119,7 @@ void createAnnotation(uno::Reference& 
xAnnotation, SdPage*
 sal_uInt32 Annotation::m_nLastId = 1;
 
 Annotation::Annotation( const uno::Reference& context, 
SdPage* pPage )
-: ::cppu::WeakComponentImplHelper(m_aMutex)
+: WeakComponentImplHelper(m_aMutex)
 , ::cppu::PropertySetMixin(context, 
IMPLEMENTS_PROPERTY_SET, uno::Sequence())
 , m_nId( m_nLastId++ )
 , mpPage( pPage )
@@ -141,7 +142,7 @@ void SAL_CALL Annotation::disposing()
 
 uno::Any Annotation::queryInterface(css::uno::Type const & type)
 {
-return 
::cppu::WeakComponentImplHelper::queryInterface(type);
+return WeakComponentImplHelper::queryInterface(type);
 }
 
 // com.sun.star.beans.XPropertySet:
@@ -301,9 +302,18 @@ uno::Reference SAL_CALL 
Annotation::getTextRange()
 return m_TextRange;
 }
 
+sal_Int64 Annotation::getSomething(css::uno::Sequence const & 
aIdentifier) {
+return comphelper::getSomethingImpl(aIdentifier, this);
+}
+
+css::uno::Sequence const & Annotation::getUnoTunnelId() {
+static comphelper::UnoIdInit const id;
+return id.getSeq();
+}
+
 std::unique_ptr CreateUndoInsertOrRemoveAnnotation( const 
uno::Reference& xAnnotation, bool bInsert )
 {
-Annotation* pAnnotation = dynamic_cast< Annotation* >( xAnnotation.get() );
+Annotation* pAnnotation = comphelper::getFromUnoTunnel< Annotation >( 
xAnnotation );
 if( pAnnotation )
 {
 return std::make_unique< UndoInsertOrRemoveAnnotation >( *pAnnotation, 
bInsert );
@@ -316,14 +326,14 @@ std::unique_ptr 
CreateUndoInsertOrRemoveAnnotation( const uno::Re
 
 void CreateChangeUndo(const uno::Reference& xAnnotation)
 {
-Annotation* pAnnotation = dynamic_cast(xAnnotation.get());
+Annotation* pAnnotation = 
comphelper::getFromUnoTunnel(xAnnotation);
 if (pAnnotation)
 pAnnotation->createChangeUndo();
 }
 
 sal_uInt32 getAnnotationId(const uno::Reference& 
xAnnotation)
 {
-Annotation* pAnnotation = dynamic_cast(xAnnotation.get());
+Annotation* pAnnotation = 
comphelper::getFromUnoTunnel(xAnnotation);
 sal_uInt32 nId = 0;
 if (pAnnotation)
 nId = pAnnotation->GetId();
@@ -332,7 +342,7 @@ sal_uInt32 getAnnotationId(const 
uno::Reference& xAnnotatio
 
 

[Libreoffice-commits] core.git: sd/inc sd/source

2022-12-07 Thread Maxim Monastirsky (via logerrit)
 sd/inc/stlpool.hxx  |1 +
 sd/inc/stlsheet.hxx |1 +
 sd/source/core/drawdoc3.cxx |   21 ++---
 sd/source/core/stlpool.cxx  |9 +
 4 files changed, 29 insertions(+), 3 deletions(-)

New commits:
commit 441ecdc951211cc1e8453434d26ae40c121cb153
Author: Maxim Monastirsky 
AuthorDate: Mon Dec 5 14:25:31 2022 +0200
Commit: Maxim Monastirsky 
CommitDate: Wed Dec 7 10:59:29 2022 +

sd: improve handling of table styles on page pasting

- Remove table styles that were copied from the source
document, but not actually used in the pasted pages.
Same as we were doing already for graphic/cell styles.

- Disable the undo record of inserted cell styles, as
long as we don't have undo actions also for the table
style. This prevents data loss, as otherwise the table
style will be exported, but not the cell styles it uses.

The difficulty with having an undo action for table
styles is that once a style is removed from its family
it is disposed, so we no longer able to use that style
for a redo action. This was "solved" in i#120015 for
graphic/cell styles, by not disposing them at all.
However table styles maintain cyclic references with
their cell styles, so we can't give up on disposing.

I'll take the time to think on a proper solution for
this (e.g. making copies of styles instead of dealing
with the original ones might be an option). For now,
let's just remove this unfinished undo attempt.

Change-Id: Iae06273217b2d695401921a84e7edf096556530e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143749
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx
index bb73e157ed3f..9e1693249f86 100644
--- a/sd/inc/stlpool.hxx
+++ b/sd/inc/stlpool.hxx
@@ -75,6 +75,7 @@ public:
 voidCopyGraphicSheets(SdStyleSheetPool& rSourcePool);
 voidCopyCellSheets(SdStyleSheetPool& rSourcePool);
 voidCopyTableStyles(SdStyleSheetPool const & rSourcePool);
+voidCopyTableStyles(SdStyleSheetPool const & rSourcePool, 
XStyleVector& rCreatedSheets);
 voidCopyCellSheets(SdStyleSheetPool& rSourcePool, 
StyleSheetCopyResultVector& rCreatedSheets);
 voidRenameAndCopyGraphicSheets(SdStyleSheetPool& 
rSourcePool, StyleSheetCopyResultVector& rCreatedSheets, std::u16string_view 
rRenameSuffix);
 
diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index 9080c3b8805b..e830c097e990 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -165,6 +165,7 @@ private:
 };
 
 typedef std::vector< rtl::Reference< SdStyleSheet > > SdStyleSheetVector;
+typedef std::vector< css::uno::Reference< css::style::XStyle > > XStyleVector;
 
 struct StyleSheetCopyResult
 {
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 810969940bae..bf7d304e 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -345,6 +345,21 @@ lcl_removeUnusedStyles(SfxStyleSheetBasePool* const 
pStyleSheetPool, StyleSheetC
 rStyles = aUsedStyles;
 }
 
+void
+lcl_removeUnusedTableStyles(SdStyleSheetPool* const pStyleSheetPool, 
XStyleVector const & rStyles)
+{
+css::uno::Reference xTableFamily(
+pStyleSheetPool->getByName("table"), css::uno::UNO_QUERY);
+if (!xTableFamily)
+return;
+
+for (const auto& a : rStyles)
+{
+if (!a->isInUse())
+xTableFamily->removeByName(a->getName());
+}
+}
+
 SfxStyleSheet *lcl_findStyle(StyleSheetCopyResultVector& rStyles, 
std::u16string_view aStyleName)
 {
 for (const auto& a : rStyles)
@@ -524,7 +539,8 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 rStyleSheetPool.CopyCellSheets(rBookmarkStyleSheetPool, aNewCellStyles);
 
 // TODO handle undo of table styles too
-rStyleSheetPool.CopyTableStyles(rBookmarkStyleSheetPool);
+XStyleVector aNewTableStyles;
+rStyleSheetPool.CopyTableStyles(rBookmarkStyleSheetPool, aNewTableStyles);
 
 // Insert document
 
@@ -934,9 +950,8 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 lcl_removeUnusedStyles(GetStyleSheetPool(), aNewGraphicStyles);
 if (!aNewGraphicStyles.empty() && pUndoMgr)
 
pUndoMgr->AddUndoAction(std::make_unique(this, 
aNewGraphicStyles, true));
+
lcl_removeUnusedTableStyles(static_cast(GetStyleSheetPool()),
 aNewTableStyles);
 lcl_removeUnusedStyles(GetStyleSheetPool(), aNewCellStyles);
-if (!aNewCellStyles.empty() && pUndoMgr)
-
pUndoMgr->AddUndoAction(std::make_unique(this, 
aNewCellStyles, true));
 
 if( bUndo )
 EndUndo();
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 738279e8a440..4bca10fb71bc 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -521,6 +521,12 @@ void SdStyleSheetPool::CopyCellSheets(SdStyleSheetPool& 
rSourcePool)
 }

[Libreoffice-commits] core.git: sd/inc sd/source

2022-11-25 Thread Maxim Monastirsky (via logerrit)
 sd/inc/stlsheet.hxx|2 ++
 sd/source/core/stlsheet.cxx|   29 +
 sd/source/ui/table/TableDesignPane.cxx |   16 +---
 3 files changed, 40 insertions(+), 7 deletions(-)

New commits:
commit 423c2a6ac74cd30c6576e6794f67fda4fb685c11
Author: Maxim Monastirsky 
AuthorDate: Thu Nov 24 21:22:42 2022 +0200
Commit: Maxim Monastirsky 
CommitDate: Fri Nov 25 14:17:22 2022 +0100

sd: better detection of user defined cell styles

Cell style might be used for several table roles
at once, or even in several table styles (esp.
after new/clone actions). But when we're editing a
style, we want just a single place to be changed.

The initial solution was to check if the style is
user defined. The problem is that if we change the
built-in styles set, then documents created with
the old styles will have their once built-in styles
turned into user defined. In such case we might
still attempt to edit a shared style, which is
unintended.

So try harder, and check also that the style isn't
used twice and that there is no other styles
inheriting from it.

Change-Id: I67d8c61b15161c9d839e97f7a31a1349a7e2613c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143288
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index 645259e9e8fc..9080c3b8805b 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -63,6 +63,8 @@ public:
 virtual boolHasClearParentSupport() const override;
 virtual voidSetHelpId( const OUString& r, sal_uLong nId ) override;
 
+bool IsEditable();
+
 voidAdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems = 
true);
 
 SdStyleSheet* GetRealStyleSheet() const;
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 1c11e5fea39d..4d72cf0915c6 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -325,6 +325,35 @@ bool SdStyleSheet::IsUsed() const
 return bResult;
 }
 
+/**
+ * Checks if a cell style is used in two places at once.
+ * Typically we modify the formatting of a single place,
+ * so such style shouldn't be edited directly.
+ */
+bool SdStyleSheet::IsEditable()
+{
+if (GetFamily() != SfxStyleFamily::Frame)
+return true;
+
+if (!IsUserDefined())
+return false;
+
+const size_t nListenerCount = GetSizeOfVector();
+for (size_t n = 0; n < nListenerCount; ++n)
+{
+SfxListener* pListener = GetListener(n);
+if (pListener == this)
+continue;
+if (dynamic_cast(pListener))
+return false;
+}
+
+MutexGuard aGuard(mrBHelper.rMutex);
+
+auto pContainer = 
mrBHelper.getContainer(cppu::UnoType::get());
+return !pContainer || pContainer->getLength() <= 1;
+}
+
 /**
  * Determine the style sheet for which this dummy is for.
  */
diff --git a/sd/source/ui/table/TableDesignPane.cxx 
b/sd/source/ui/table/TableDesignPane.cxx
index dd7749db7e79..aa331c3dcda1 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -303,8 +303,10 @@ void TableDesignWidget::ResetStyle()
 for (sal_Int32 i = 0; i < xTableStyle->getCount(); ++i)
 {
 Reference xCellStyle(xTableStyle->getByIndex(i), 
UNO_QUERY);
-if (xCellStyle && xCellStyle->isUserDefined())
-xTableStyle->replaceByIndex(i, 
mxCellFamily->getByName(xCellStyle->getParentStyle()));
+while (xCellStyle && xCellStyle->isUserDefined() && 
!xCellStyle->getParentStyle().isEmpty())
+
xCellStyle.set(mxCellFamily->getByName(xCellStyle->getParentStyle()), 
UNO_QUERY);
+
+xTableStyle->replaceByIndex(i, Any(xCellStyle));
 }
 
 endTextEditForStyle(xTableStyle);
@@ -353,17 +355,17 @@ void TableDesignWidget::EditStyle(std::string_view 
rCommand)
 {
 Reference 
xTableStyle(mxTableFamily->getByIndex(m_xValueSet->GetSelectedItemId() - 1), 
UNO_QUERY_THROW);
 Reference 
xCellStyle(xTableStyle->getByName(OUString::fromUtf8(rCommand)), 
UNO_QUERY_THROW);
+rtl::Reference xStyleSheet = 
static_cast(xCellStyle.get());
 
-bool bUserDefined = xCellStyle->isUserDefined();
+bool bUserDefined = xStyleSheet->IsEditable();
 if (!bUserDefined)
 {
 Reference xFactory(mxCellFamily, 
UNO_QUERY_THROW);
-Reference xNewStyle(xFactory->createInstance(), 
UNO_QUERY_THROW);
-xNewStyle->setParentStyle(xCellStyle->getName());
-xCellStyle = xNewStyle;
+xCellStyle.set(xFactory->createInstance(), UNO_QUERY_THROW);
+xCellStyle->setParentStyle(xStyleSheet->getName());
+xStyleSheet = static_cast(xCellStyle.get());
 }
 
-rtl::Reference xStyleSheet = 
static_cast(xCellStyle.get());
 

[Libreoffice-commits] core.git: sd/inc

2022-10-18 Thread Andrea Gelmini (via logerrit)
 sd/inc/fadedef.h |   28 
 1 file changed, 28 deletions(-)

New commits:
commit aa70820a79152830a32070eb722311b8531945a4
Author: Andrea Gelmini 
AuthorDate: Mon Oct 17 22:23:51 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Oct 18 08:40:18 2022 +0200

Removed sd/inc/fadedef.h

It's never included.

It passed "make check" on Linux.

Change-Id: Ia341d898aa64d9dd88f96a2a1c61ae5e873bdb5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141480
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sd/inc/fadedef.h b/sd/inc/fadedef.h
deleted file mode 100644
index 84100f944ff7..
--- a/sd/inc/fadedef.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#pragma once
-
-// has to be adjusted!
-#define FADE_EFFECT_COUNT 57
-
-// has to be adjusted!
-#define FADE_SPEED_COUNT 3
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sd/inc sd/qa sd/source

2022-10-11 Thread Noel Grandin (via logerrit)
 sd/inc/drawdoc.hxx   |2 +-
 sd/qa/unit/export-tests-ooxml2.cxx   |4 ++--
 sd/source/core/drawdoc2.cxx  |   16 
 sd/source/filter/eppt/eppt.hxx   |4 ++--
 sd/source/filter/eppt/epptso.cxx |   24 
 sd/source/filter/eppt/pptexanimations.cxx|   19 +--
 sd/source/filter/eppt/pptexanimations.hxx|4 ++--
 sd/source/filter/eppt/pptx-epptooxml.cxx |   10 +-
 sd/source/filter/sdpptwrp.cxx|6 +++---
 sd/source/ui/presenter/PresenterTextView.cxx |   12 ++--
 10 files changed, 50 insertions(+), 51 deletions(-)

New commits:
commit 429e327d143a913b93b5788129b33bd26a43
Author: Noel Grandin 
AuthorDate: Mon Oct 10 11:49:26 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Oct 11 18:02:11 2022 +0200

use more string_view in sd

Change-Id: Iafcab8d5b21f9562838c3494cbfd75090dd6e010
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141152
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index a99c27c49bd1..9637e8f26cc2 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -598,7 +598,7 @@ public:
 SdStyleSheetPool* GetSdStyleSheetPool() const;
 
 SAL_DLLPRIVATE void UpdatePageRelativeURLs(
-const OUString& rOldName, std::u16string_view rNewName);
+std::u16string_view aOldName, std::u16string_view aNewName);
 
 SAL_DLLPRIVATE static void SetCalcFieldValueHdl( ::Outliner* pOutliner);
 
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index 4366d26fddd1..928ecab95997 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -33,9 +33,9 @@ using namespace css::animations;
 
 namespace {
 
-bool checkBeginWithNumber(const OUString& rStr)
+bool checkBeginWithNumber(std::u16string_view aStr)
 {
-sal_Unicode aChar = (rStr.getLength() > 1) ? rStr[0] : '\0';
+sal_Unicode aChar = (aStr.size() > 1) ? aStr[0] : '\0';
 return aChar == '.' || aChar == '-' || rtl::isAsciiDigit(aChar);
 }
 
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index d0187bab0f8c..d591113fcca9 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -264,9 +264,9 @@ void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 
nStartPos)
 }
 }
 
-void SdDrawDocument::UpdatePageRelativeURLs(const OUString& rOldName, 
std::u16string_view rNewName)
+void SdDrawDocument::UpdatePageRelativeURLs(std::u16string_view aOldName, 
std::u16string_view aNewName)
 {
-if (rNewName.empty())
+if (aNewName.empty())
 return;
 
 SfxItemPool& rPool(GetPool());
@@ -282,22 +282,22 @@ void SdDrawDocument::UpdatePageRelativeURLs(const 
OUString& rOldName, std::u16st
 {
 OUString aURL = pURLField->GetURL();
 
-if (!aURL.isEmpty() && (aURL[0] == 35) && 
(aURL.indexOf(rOldName, 1) == 1))
+if (!aURL.isEmpty() && (aURL[0] == 35) && 
(aURL.indexOf(aOldName, 1) == 1))
 {
-if (aURL.getLength() == rOldName.getLength() + 1) // 
standard page name
+if (aURL.getLength() == sal_Int32(aOldName.size() + 1)) // 
standard page name
 {
 aURL = aURL.replaceAt(1, aURL.getLength() - 1, u"") +
-rNewName;
+aNewName;
 pURLField->SetURL(aURL);
 }
 else
 {
 const OUString sNotes(SdResId(STR_NOTES));
-if (aURL.getLength() == rOldName.getLength() + 2 + 
sNotes.getLength()
-&& aURL.indexOf(sNotes, rOldName.getLength() + 2) 
== rOldName.getLength() + 2)
+if (aURL.getLength() == sal_Int32(aOldName.size()) + 2 
+ sNotes.getLength()
+&& aURL.indexOf(sNotes, aOldName.size() + 2) == 
sal_Int32(aOldName.size() + 2))
 {
 aURL = aURL.replaceAt(1, aURL.getLength() - 1, 
u"") +
-rNewName + " " + sNotes;
+aNewName + " " + sNotes;
 pURLField->SetURL(aURL);
 }
 }
diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index ee2219ddd316..635d5a2223a1 100644
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -164,7 +164,7 @@ class PPTWriter final : public PPTWriterBase, public 
PPTExBulletProvider
 sal_uInt32  ImplMasterSlideListContainer( SvStream* pOutStrm );
 
 public:
-static void WriteCString( SvStream&, const OUString&, 
sal_uInt32 nInstance = 0 );
+static void 

[Libreoffice-commits] core.git: sd/inc sd/source

2022-09-15 Thread Noel Grandin (via logerrit)
 sd/inc/sdfilter.hxx|   13 +++--
 sd/source/filter/eppt/eppt.cxx |2 +-
 sd/source/filter/sdfilter.cxx  |   38 --
 sd/source/filter/sdpptwrp.cxx  |   18 +-
 4 files changed, 5 insertions(+), 66 deletions(-)

New commits:
commit 7bc10ea4fae2f2cbaa485f2a9820cfa3f9cfe121
Author: Noel Grandin 
AuthorDate: Wed Sep 14 12:59:00 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Sep 15 09:24:37 2022 +0200

no need to load SaveVBA symbol at runtime

Change-Id: I246168902d07dbc75b68142c73f148e711320d03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139938
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/sdfilter.hxx b/sd/inc/sdfilter.hxx
index 928a1c0575d4..1a8c8b6739a6 100644
--- a/sd/inc/sdfilter.hxx
+++ b/sd/inc/sdfilter.hxx
@@ -32,6 +32,7 @@ namespace osl { class Module; }
 namespace sd { class DrawDocShell; }
 class SdDrawDocument;
 class SfxMedium;
+class SfxObjectShell;
 class SotStorage;
 class SvMemoryStream;
 
@@ -44,11 +45,6 @@ public:
 boolIsDraw() const { return mbIsDraw; }
 virtual boolExport() = 0;
 
-#ifndef DISABLE_DYNLOADING
-/// Open library @rLibraryName and lookup symbol @rFnSymbol
-static oslGenericFunction GetLibrarySymbol( const OUString& rLibraryName, 
const OUString  );
-#endif
-
 protected:
 css::uno::Reference< css::frame::XModel > mxModel;
 css::uno::Reference< css::task::XStatusIndicator >mxStatusIndicator;
@@ -58,11 +54,6 @@ protected:
 SdDrawDocument& mrDocument;
 boolmbIsDraw : 1;
 voidCreateStatusIndicator();
-
-private:
-
-static OUString ImplGetFullLibraryName( std::u16string_view 
rLibraryName );
-
 };
 
 SD_DLLPUBLIC bool ExportPPT( const std::vector< css::beans::PropertyValue >& 
rMediaData,
@@ -76,4 +67,6 @@ SD_DLLPUBLIC bool ExportPPT( const std::vector< 
css::beans::PropertyValue >& rMe
 SD_DLLPUBLIC bool ImportPPT(
 SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, 
SfxMedium& rMedium );
 
+SD_DLLPUBLIC bool SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas );
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 34f85553e8bf..64df662c7e68 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -1431,7 +1431,7 @@ SAL_DLLPUBLIC_EXPORT bool ExportPPT( const std::vector< 
css::beans::PropertyValu
 return bStatus;
 }
 
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SaveVBA( SfxObjectShell& rDocShell, 
SvMemoryStream*& pBas )
+SAL_DLLPUBLIC_EXPORT bool SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& 
pBas )
 {
 tools::SvRef xDest( new SotStorage( new SvMemoryStream(), true 
) );
 SvxImportMSVBasic aMSVBas( rDocShell, *xDest );
diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx
index af001e611883..e1ee1393226e 100644
--- a/sd/source/filter/sdfilter.cxx
+++ b/sd/source/filter/sdfilter.cxx
@@ -50,44 +50,6 @@ SdFilter::~SdFilter()
 {
 }
 
-OUString SdFilter::ImplGetFullLibraryName( std::u16string_view rLibraryName )
-{
-return OUString(SVLIBRARY("?")).replaceFirst( "?", rLibraryName );
-}
-
-#ifndef DISABLE_DYNLOADING
-
-static std::map> g_SdModuleMap;
-
-extern "C" { static void thisModule() {} }
-
-oslGenericFunction SdFilter::GetLibrarySymbol( const OUString& rLibraryName, 
const OUString  )
-{
-osl::Module *pMod = nullptr;
-auto it = g_SdModuleMap.find(rLibraryName);
-if (it != g_SdModuleMap.end())
-pMod = it->second.get();
-
-if (!pMod)
-{
-pMod = new osl::Module;
-if (pMod->loadRelative(, 
ImplGetFullLibraryName(rLibraryName),
-   SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY))
-g_SdModuleMap[rLibraryName] = std::unique_ptr(pMod);
-else
-{
-delete pMod;
-pMod = nullptr;
-}
-}
-if (!pMod)
-return nullptr;
-else
-return pMod->getFunctionSymbol(rFnSymbol);
-}
-
-#endif
-
 void SdFilter::CreateStatusIndicator()
 {
 // The status indicator must be retrieved from the provided medium 
arguments
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index 0f9e2f4a38fc..168fe11ffa1a 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -40,15 +40,6 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::task;
 using namespace ::com::sun::star::frame;
 
-typedef sal_Bool ( *SaveVBAPointer )( SfxObjectShell&, SvMemoryStream*& );
-
-#ifdef DISABLE_DYNLOADING
-
-extern "C" sal_Bool SaveVBA( SfxObjectShell&, SvMemoryStream*& );
-
-#endif
-
-
 SdPPTFilter::SdPPTFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell ) :
 SdFilter( rMedium, rDocShell ),
 pBas( nullptr )
@@ -331,14 

[Libreoffice-commits] core.git: sd/inc sd/source

2022-09-14 Thread Noel Grandin (via logerrit)
 sd/inc/sdfilter.hxx|4 +++-
 sd/source/filter/ppt/pptin.cxx |2 +-
 sd/source/filter/sdfilter.cxx  |5 -
 sd/source/filter/sdpptwrp.cxx  |   14 +-
 sd/source/ui/app/sddll.cxx |1 -
 5 files changed, 5 insertions(+), 21 deletions(-)

New commits:
commit 572c2ee4c4f4b8e53f2fa4398a5600f1468f3a38
Author: Noel Grandin 
AuthorDate: Wed Sep 14 12:56:39 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 14 20:31:29 2022 +0200

no need to load ImportPPT symbol at runtime

Change-Id: I4b50822183d9752d6a413b0308e1d661785fb10e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139937
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/sdfilter.hxx b/sd/inc/sdfilter.hxx
index 707679642dee..928a1c0575d4 100644
--- a/sd/inc/sdfilter.hxx
+++ b/sd/inc/sdfilter.hxx
@@ -45,7 +45,6 @@ public:
 virtual boolExport() = 0;
 
 #ifndef DISABLE_DYNLOADING
-static void Preload();
 /// Open library @rLibraryName and lookup symbol @rFnSymbol
 static oslGenericFunction GetLibrarySymbol( const OUString& rLibraryName, 
const OUString  );
 #endif
@@ -73,5 +72,8 @@ SD_DLLPUBLIC bool ExportPPT( const std::vector< 
css::beans::PropertyValue >& rMe
 SvMemoryStream* pVBA,
 sal_uInt32 nCnvrtFlags );
 
+// exported function
+SD_DLLPUBLIC bool ImportPPT(
+SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, 
SfxMedium& rMedium );
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 7fd3a903dcd4..c2673ef4ce44 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2766,7 +2766,7 @@ ImplSdPPTImport::ReadFormControl( 
tools::SvRef& rSrc1, css::uno::Ref
 }
 
 // exported function
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool ImportPPT(
+SAL_DLLPUBLIC_EXPORT bool ImportPPT(
 SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, 
SfxMedium& rMedium )
 {
 std::unique_ptr pImport( new SdPPTImport( pDocument, 
rDocStream, rStorage, rMedium ));
diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx
index 24aa42a7ec9d..af001e611883 100644
--- a/sd/source/filter/sdfilter.cxx
+++ b/sd/source/filter/sdfilter.cxx
@@ -86,11 +86,6 @@ oslGenericFunction SdFilter::GetLibrarySymbol( const 
OUString& rLibraryName, con
 return pMod->getFunctionSymbol(rFnSymbol);
 }
 
-void SdFilter::Preload()
-{
-(void)GetLibrarySymbol("sd", "ImportPPT");
-}
-
 #endif
 
 void SdFilter::CreateStatusIndicator()
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index 6dd1964b2b73..0f9e2f4a38fc 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -40,14 +40,10 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::task;
 using namespace ::com::sun::star::frame;
 
-typedef sal_Bool ( *ImportPPTPointer )( SdDrawDocument*, SvStream&, 
SotStorage&, SfxMedium& );
-
 typedef sal_Bool ( *SaveVBAPointer )( SfxObjectShell&, SvMemoryStream*& );
 
 #ifdef DISABLE_DYNLOADING
 
-extern "C" sal_Bool ImportPPT( SdDrawDocument*, SvStream&, SotStorage&, 
SfxMedium& );
-
 extern "C" sal_Bool SaveVBA( SfxObjectShell&, SvMemoryStream*& );
 
 #endif
@@ -186,15 +182,7 @@ bool SdPPTFilter::Import()
 mrMedium.SetError(ERRCODE_SVX_READ_FILTER_PPOINT);
 else
 {
-#ifdef DISABLE_DYNLOADING
-ImportPPTPointer pPPTImport = ImportPPT;
-#else
-ImportPPTPointer pPPTImport = reinterpret_cast< 
ImportPPTPointer >(
-
SdFilter::GetLibrarySymbol(mrMedium.GetFilter()->GetUserData(), "ImportPPT"));
-#endif
-
-if ( pPPTImport )
-bRet = pPPTImport( , *pDocStream, *pStorage, 
mrMedium );
+bRet = ImportPPT( , *pDocStream, *pStorage, 
mrMedium );
 
 if ( !bRet )
 mrMedium.SetError(SVSTREAM_WRONGVERSION);
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index 4e20d0997fb8..c195869b790e 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -260,7 +260,6 @@ void SdDLL::Init()
 extern "C" SAL_DLLPUBLIC_EXPORT
 void lok_preload_hook()
 {
-SdFilter::Preload();
 SdAbstractDialogFactory::Create();
 }
 


[Libreoffice-commits] core.git: sd/inc sw/inc

2022-08-29 Thread Stephan Bergmann (via logerrit)
 sd/inc/sdmod.hxx  |2 +-
 sw/inc/unomap.hxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 62fda78aecc8ba827dc12081b1a5873393138ca9
Author: Stephan Bergmann 
AuthorDate: Mon Aug 29 14:40:01 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Aug 29 16:21:36 2022 +0200

span requires a complete element type

...see C++20 [span.overview]/3 "ElementType is required to be a complete 
object
type that is not an abstract class type."

At least a --with-latest-c++ build against recent LLVM 16 trunk libc++ 
failed
for me now with

> In file included from sd/source/ui/app/sdmod.cxx:24:
> In file included from include/vcl/virdev.hxx:24:
> In file included from include/vcl/outdev.hxx:24:
> In file included from include/o3tl/span.hxx:19:
> ~/llvm/inst/bin/../include/c++/v1/span:540:38: error: arithmetic on a 
pointer to an incomplete type 'const SfxItemPropertyMapEntry'
> return iterator(this, data() + size());
>   ~~ ^
> ~/llvm/inst/bin/../include/c++/v1/__ranges/access.h:144:36: note: in 
instantiation of member function 'std::span::end' requested here
>   return _LIBCPP_AUTO_CAST(__t.end());
>^
> ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:44:5: note: in 
instantiation of function template specialization 
'std::ranges::__end::__fn::operator() &>' requested here
> ranges::end(__t);
> ^
> ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:44:5: note: in 
instantiation of requirement here
> ranges::end(__t);
> ^~~~
> ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:42:19: note: while 
substituting template arguments into constraint expression here
>   concept range = requires(_Tp& __t) {
>   ^~~~
> ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:48:25: note: while 
checking the satisfaction of concept 'range &>' requested here
>   concept input_range = range<_Tp> && input_iterator>;
> ^~
> ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:48:25: note: 
(skipping 16 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
> ~/llvm/inst/bin/../include/c++/v1/__tree:761:23: note: in instantiation 
of template class 'std::__value_type, 
com::sun::star::uno::Reference>' 
requested here
> __node_value_type __value_;
>   ^
> ~/llvm/inst/bin/../include/c++/v1/__tree:1798:49: note: in instantiation 
of template class 'std::__tree_node, 
com::sun::star::uno::Reference>, void 
*>' requested here
> destroy(static_cast<__node_pointer>(__nd->__left_));
> ^
> ~/llvm/inst/bin/../include/c++/v1/__tree:1789:3: note: in instantiation 
of member function 'std::__tree, 
com::sun::star::uno::Reference>, 
std::__map_value_compare, std::__value_type, 
com::sun::star::uno::Reference>, 
SdExtPropertySetInfoCacheCompare, true>, 
std::allocator, 
com::sun::star::uno::Reference>>>::destroy'
 requested here
>   destroy(__root());
>   ^
> ~/llvm/inst/bin/../include/c++/v1/map:1033:5: note: in instantiation of 
member function 'std::__tree, 
com::sun::star::uno::Reference>, 
std::__map_value_compare, std::__value_type, 
com::sun::star::uno::Reference>, 
SdExtPropertySetInfoCacheCompare, true>, 
std::allocator, 
com::sun::star::uno::Reference>>>::~__tree'
 requested here
> map()
> ^
> sd/source/ui/app/sdmod.cxx:57:11: note: in instantiation of member 
function 'std::map, 
com::sun::star::uno::Reference, 
SdExtPropertySetInfoCacheCompare>::map' requested here
> SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
>   ^
> sd/inc/sdmod.hxx:45:8: note: forward declaration of 
'SfxItemPropertyMapEntry'
> struct SfxItemPropertyMapEntry;
>^

and

> In file included from sw/source/core/unocore/unochart.cxx:34:
> In file included from sw/inc/unochart.hxx:52:
> In file included from sw/inc/unocrsr.hxx:22:
> In file included from sw/inc/swcrsr.hxx:23:
> In file included from sw/inc/tblsel.hxx:22:
> In file included from sw/inc/swtable.hxx:24:
> In file included from sw/inc/swtypes.hxx:30:
> In file included from include/vcl/outdev.hxx:24:
> In file included from include/o3tl/span.hxx:19:
> ~/llvm/inst/bin/../include/c++/v1/span:540:38: error: arithmetic on a 
pointer to an incomplete type 'const SfxItemPropertyMapEntry'
> return iterator(this, data() + size());
>   ~~ ^
> ~/llvm/inst/bin/../include/c++/v1/__ranges/access.h:144:36: note: in 
instantiation of member function 'std::span::end' requested here
>   return _LIBCPP_AUTO_CAST(__t.end());
>

[Libreoffice-commits] core.git: sd/inc sd/source

2022-08-11 Thread Noel Grandin (via logerrit)
 sd/inc/CustomAnimationEffect.hxx   
 |4 -
 sd/inc/CustomAnimationPreset.hxx   
 |5 +
 sd/inc/Outliner.hxx
 |5 +
 sd/inc/animations.hxx  
 |5 +
 sd/inc/stlfamily.hxx   
 |2 
 sd/source/core/CustomAnimationEffect.cxx   
 |9 +--
 sd/source/core/stlfamily.cxx   
 |5 +
 sd/source/filter/eppt/eppt.cxx 
 |5 +
 sd/source/filter/eppt/eppt.hxx 
 |7 +-
 sd/source/filter/eppt/pptexanimations.hxx  
 |7 +-
 sd/source/filter/eppt/pptexsoundcollection.cxx 
 |5 +
 sd/source/filter/eppt/pptexsoundcollection.hxx 
 |2 
 sd/source/filter/grf/sdgrffilter.cxx   
 |5 +
 sd/source/filter/html/htmlex.cxx   
 |5 +
 sd/source/filter/html/htmlex.hxx   
 |2 
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx  
 |5 +
 sd/source/ui/accessibility/AccessiblePageShape.cxx 
 |5 +
 sd/source/ui/animations/CustomAnimationList.cxx
 |   11 ++-
 sd/source/ui/animations/STLPropertySet.hxx 
 |3 -
 sd/source/ui/animations/SlideTransitionPane.cxx
 |5 +
 sd/source/ui/animations/motionpathtag.cxx  
 |   29 +-
 sd/source/ui/annotations/annotationtag.cxx 
 |7 +-
 sd/source/ui/dlg/RemoteDialogClientBox.cxx 
 |5 +
 sd/source/ui/dlg/RemoteDialogClientBox.hxx 
 |2 
 sd/source/ui/dlg/TemplateScanner.cxx   
 |5 +
 sd/source/ui/dlg/diactrl.cxx   
 |5 +
 sd/source/ui/dlg/dlgfield.cxx  
 |5 +
 sd/source/ui/dlg/navigatr.cxx  
 |5 +
 sd/source/ui/dlg/sdtreelb.cxx  
 |5 +
 sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx   
 |5 +
 sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx   
 |2 
 
sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx 
|9 +--
 
sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.hxx 
|4 -
 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx  
 |9 +--
 sd/source/ui/framework/configuration/ConfigurationUpdater.hxx  
 |7 +-
 sd/source/ui/framework/tools/FrameworkHelper.cxx   
 |   25 
 sd/source/ui/func/smarttag.cxx 
 |9 +--
 sd/source/ui/func/undoheaderfooter.cxx 
 |5 +
 sd/source/ui/func/undolayer.cxx
 |   17 +++--
 sd/source/ui/inc/AccessibleDocumentViewBase.hxx
 |2 
 sd/source/ui/inc/AccessiblePageShape.hxx   
 |2 
 sd/source/ui/inc/OutlinerIteratorImpl.hxx  
 |2 
 sd/source/ui/inc/RemoteServer.hxx  
 |5 +
 sd/source/ui/inc/TemplateScanner.hxx   
 |7 +-
 sd/source/ui/inc/ToolBarManager.hxx
 |5 +
 sd/source/ui/inc/ViewShellManager.hxx  
 |5 +
 sd/source/ui/inc/ViewTabBar.hxx
 |2 
 sd/source/ui/inc/diactrl.hxx   
 |2 
 sd/source/ui/inc/dlgfield.hxx  
 |2 
 sd/source/ui/inc/navigatr.hxx  
 |2 
 sd/source/ui/inc/sdtreelb.hxx  
 |2 
 sd/source/ui/inc/smarttag.hxx  
 |5 -
 sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx 
 |2 
 sd/source/ui/inc/undoheaderfooter.hxx  
 |2 
 sd/source/ui/inc/undolayer.hxx

[Libreoffice-commits] core.git: sd/inc sd/source

2022-08-08 Thread Caolán McNamara (via logerrit)
 sd/inc/pch/precompiled_sd.hxx   |4 -
 sd/source/ui/inc/SlideSorter.hxx|   16 -
 sd/source/ui/inc/ViewShell.hxx  |3 -
 sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx |   19 --
 sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx |7 --
 sd/source/ui/slidesorter/shell/SlideSorter.cxx  |   15 +
 sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx |3 -
 sd/source/ui/slidesorter/view/SlideSorterView.cxx   |1 
 sd/source/ui/view/drviews1.cxx  |1 
 sd/source/ui/view/outlnvsh.cxx  |1 
 sd/source/ui/view/viewshe2.cxx  |4 -
 sd/source/ui/view/viewshel.cxx  |   28 
--
 12 files changed, 10 insertions(+), 92 deletions(-)

New commits:
commit d564d73673dc4dce43c988421397a6feae7620d5
Author: Caolán McNamara 
AuthorDate: Mon Aug 8 09:41:51 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Aug 8 14:56:30 2022 +0200

no need for ScrollBarBox if bg is already the desired color

Change-Id: Ia471938bf0340bdef51b4a745814194f57893eac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137947
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 13d31e340a9e..4018285cf363 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2022-06-27 18:58:59 using:
+ Generated on 2022-08-08 10:27:15 using:
  ./bin/update_pch sd sd --cutoff=4 --exclude:system --exclude:module 
--include:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -23,6 +23,7 @@
 #include 
 #if PCH_LEVEL >= 1
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -98,7 +99,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx
index 4926e11583ec..ae51bd518c09 100644
--- a/sd/source/ui/inc/SlideSorter.hxx
+++ b/sd/source/ui/inc/SlideSorter.hxx
@@ -21,7 +21,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -87,16 +86,12 @@ public:
 Typically the horizontal scroll bar of the ViewShell.
 @param rpVerticalScrollBar
 Typically the vertical scroll bar of the ViewShell.
-@param rpScrollBarBox
-The little square enclosed by the two scroll bars.  Typically
-the one from the ViewShell.
 */
 static std::shared_ptr CreateSlideSorter (
 ViewShell& rViewShell,
 sd::Window* pContentWindow,
 ScrollAdaptor* pHorizontalScrollBar,
-ScrollAdaptor* pVerticalScrollBar,
-ScrollBarBox* pScrollBarBox);
+ScrollAdaptor* pVerticalScrollBar);
 
 /** Create a new slide sorter that is loosely coupled to the given view
 shell.  The view shell may even be missing.
@@ -120,11 +115,6 @@ public:
 */
 const VclPtr& GetHorizontalScrollBar() const { return 
mpHorizontalScrollBar;}
 
-/** Return the scroll bar filler that paints the little square that is
-enclosed by the two scroll bars.
-*/
-const VclPtr& GetScrollBarFiller (void) const { return 
mpScrollBarBox;}
-
 /** Return the content window.  This is a sibling and is geometrically
 enclosed by the scroll bars.
 */
@@ -207,7 +197,6 @@ private:
 VclPtr mpContentWindow;
 VclPtr mpHorizontalScrollBar;
 VclPtr mpVerticalScrollBar;
-VclPtr mpScrollBarBox;
 
 /** Some slide sorter wide properties that are used in different
 classes.
@@ -219,8 +208,7 @@ private:
 ViewShell& rViewShell,
 sd::Window* pContentWindow,
 ScrollAdaptor* pHorizontalScrollBar,
-ScrollAdaptor* pVerticalScrollBar,
-ScrollBarBox* pScrollBarBox);
+ScrollAdaptor* pVerticalScrollBar);
 SlideSorter (
 ViewShellBase& rBase,
 vcl::Window& rParentWindow);
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 17161c049007..5454639687ed 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -25,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include "View.hxx"
@@ -442,8 +441,6 @@ protected:
 VclPtr mpHorizontalRuler;
 /// Vertical ruler is not shown by default.
 VclPtr mpVerticalRuler;
-/// Filler of the little square enclosed by the two scroll bars.
-VclPtr mpScrollBarBox;
 /// Layer tab bar.
 VclPtr mpLayerTabBar;
 
diff --git 

[Libreoffice-commits] core.git: sd/inc sd/source

2022-02-04 Thread Justin Luth (via logerrit)
 sd/inc/Outliner.hxx|2 +-
 sd/source/ui/view/Outliner.cxx |3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 583185235389b55d6cfffac3067c0e1ccb2852b1
Author: Justin Luth 
AuthorDate: Wed Feb 2 11:00:07 2022 +0200
Commit: Caolán McNamara 
CommitDate: Fri Feb 4 21:40:10 2022 +0100

related tdf#145868 sd: Clone SvxSearchItem to avoid use after free

I tested "if (mpSearchItem)" which passed, but then it
crashed when trying to access (*mpSearchItem) == (*pSearchItem)
because the mpSearchItem's DTOR had already been called
prior to the if(mpSearchItem).

Since mpSearchItem is never compared to another
memory pointer, it is safe to assign it to a Clone.

Steps to reproduce:
1.) open Impress and search for something
2.) change the search string to something else
3.) search again.

Note that there isn't currently any code that hits this.
I discovered it trying to craft a fix for bug 145868.

Change-Id: Idc5f5a3e812ed3e49631347c35c3f4b2d8bb4127
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129347
Tested-by: Jenkins
Tested-by: Caolán McNamara 
Reviewed-by: Justin Luth 
Reviewed-by: Caolán McNamara 

diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 772040f7a610..4a7100db3bb1 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -316,7 +316,7 @@ private:
 search.  It is set every time the
 SearchAndReplaceAll method is called.
 */
-const SvxSearchItem* mpSearchItem;
+std::unique_ptr mpSearchItem;
 
 /// The actual object iterator.
 ::sd::outliner::Iterator maObjectIterator;
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 0f77f2070219..23353ba87c82 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -154,7 +154,6 @@ SdOutliner::SdOutliner( SdDrawDocument* pDoc, OutlinerMode 
nMode )
   meStartEditMode(EditMode::Page),
   mnStartPageIndex(sal_uInt16(-1)),
   mpStartEditedObject(nullptr),
-  mpSearchItem(nullptr),
   mbPrepareSpellingPending(true)
 {
 SetStyleSheetPool(static_cast( 
mpDrawDocument->GetStyleSheetPool() ));
@@ -464,7 +463,7 @@ bool SdOutliner::StartSearchAndReplace (const 
SvxSearchItem* pSearchItem)
 if ( ! bAbort)
 {
 meMode = SEARCH;
-mpSearchItem = pSearchItem;
+mpSearchItem = std::unique_ptr(pSearchItem->Clone());
 
 mbFoundObject = false;
 


[Libreoffice-commits] core.git: sd/inc sd/source

2022-01-06 Thread Tor Lillqvist (via logerrit)
 sd/inc/bitmaps.hlst   |   16 ++--
 sd/source/ui/controller/displaymodecontroller.cxx |8 +++---
 sd/source/ui/controller/slidelayoutcontroller.cxx |   28 +++---
 sd/source/ui/dlg/sdpreslt.cxx |2 -
 sd/source/ui/sidebar/LayoutMenu.cxx   |   24 +-
 5 files changed, 39 insertions(+), 39 deletions(-)

New commits:
commit 568293d7ce6d96ba71ae8c2d591b6cf237e31db1
Author: Tor Lillqvist 
AuthorDate: Thu Jan 6 15:03:05 2022 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Jan 6 20:22:44 2022 +0100

It's called a slide, not a foil

Change-Id: I8b5b062faf9d2728c729384bbdafead00d5bf917
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128042
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/sd/inc/bitmaps.hlst b/sd/inc/bitmaps.hlst
index 5b3ae7851897..9e66e87dd032 100644
--- a/sd/inc/bitmaps.hlst
+++ b/sd/inc/bitmaps.hlst
@@ -26,13 +26,13 @@ inline constexpr OUStringLiteral BMP_LAYOUT_HEAD06 = 
u"sd/res/layout_head06.png"
 inline constexpr OUStringLiteral BMP_LAYOUT_TEXTONLY = 
u"sd/res/layout_textonly.png";
 inline constexpr OUStringLiteral BMP_LAYOUT_VERTICAL01 = 
u"sd/res/layout_vertical01.png";
 inline constexpr OUStringLiteral BMP_LAYOUT_VERTICAL02 = 
u"sd/res/layout_vertical02.png";
-inline constexpr OUStringLiteral BMP_FOIL_NONE = u"sd/res/foilnone.png";
-inline constexpr OUStringLiteral BMP_FOILH_01 = u"sd/res/foilh01.png";
-inline constexpr OUStringLiteral BMP_FOILH_02 = u"sd/res/foilh02.png";
-inline constexpr OUStringLiteral BMP_FOILH_03 = u"sd/res/foilh03.png";
-inline constexpr OUStringLiteral BMP_FOILH_04 = u"sd/res/foilh04.png";
-inline constexpr OUStringLiteral BMP_FOILH_06 = u"sd/res/foilh06.png";
-inline constexpr OUStringLiteral BMP_FOILH_09 = u"sd/res/foilh09.png";
+inline constexpr OUStringLiteral BMP_SLIDE_NONE = u"sd/res/foilnone.png";
+inline constexpr OUStringLiteral BMP_SLIDEH_01 = u"sd/res/foilh01.png";
+inline constexpr OUStringLiteral BMP_SLIDEH_02 = u"sd/res/foilh02.png";
+inline constexpr OUStringLiteral BMP_SLIDEH_03 = u"sd/res/foilh03.png";
+inline constexpr OUStringLiteral BMP_SLIDEH_04 = u"sd/res/foilh04.png";
+inline constexpr OUStringLiteral BMP_SLIDEH_06 = u"sd/res/foilh06.png";
+inline constexpr OUStringLiteral BMP_SLIDEH_09 = u"sd/res/foilh09.png";
 inline constexpr OUStringLiteral BMP_DISPLAYMODE_SLIDE = 
u"sd/res/displaymode_slide.png";
 inline constexpr OUStringLiteral BMP_DISPLAYMODE_OUTLINE = 
u"sd/res/displaymode_outline.png";
 inline constexpr OUStringLiteral BMP_DISPLAYMODE_NOTES = 
u"sd/res/displaymode_notes.png";
@@ -56,7 +56,7 @@ inline constexpr OUStringLiteral BMP_PLACEHOLDER_MOVIE_LARGE 
= u"sd/res/placehol
 inline constexpr OUStringLiteral BMP_PLACEHOLDER_MOVIE_LARGE_HOVER = 
u"sd/res/placeholder_movie_large_hover.png";
 inline constexpr OUStringLiteral BMP_PLACEHOLDER_TABLE_LARGE = 
u"sd/res/placeholder_table_large.png";
 inline constexpr OUStringLiteral BMP_PLACEHOLDER_TABLE_LARGE_HOVER = 
u"sd/res/placeholder_table_large_hover.png";
-inline constexpr OUStringLiteral BMP_FOILN_01 = u"sd/res/foiln01.png";
+inline constexpr OUStringLiteral BMP_SLIDEN_01 = u"sd/res/foiln01.png";
 inline constexpr OUStringLiteral BMP_PAGE = u"sd/res/page.png"; 
 inline constexpr OUStringLiteral BMP_PAGE_EXCLUDED = u"sd/res/pageexcl.png"; 
 inline constexpr OUStringLiteral BMP_PAGEOBJS_EXCLUDED = 
u"sd/res/pagobjex.png"; 
diff --git a/sd/source/ui/controller/displaymodecontroller.cxx 
b/sd/source/ui/controller/displaymodecontroller.cxx
index 7c29a03659b6..81ad2d19e477 100644
--- a/sd/source/ui/controller/displaymodecontroller.cxx
+++ b/sd/source/ui/controller/displaymodecontroller.cxx
@@ -70,7 +70,7 @@ private:
 DECL_LINK(SelectValueSetHdl, ValueSet*, void);
 };
 
-struct snewfoil_value_info
+struct snew_slide_value_info
 {
 sal_uInt16 mnId;
 OUString msBmpResId;
@@ -80,7 +80,7 @@ struct snewfoil_value_info
 
 }
 
-const snewfoil_value_info editmodes[] =
+const snew_slide_value_info editmodes[] =
 {
 {1,
 BMP_DISPLAYMODE_SLIDE,
@@ -101,7 +101,7 @@ const snewfoil_value_info editmodes[] =
 {0, "", {}, "" }
 };
 
-const snewfoil_value_info mastermodes[] =
+const snew_slide_value_info mastermodes[] =
 {
 {5,
 BMP_DISPLAYMODE_SLIDE_MASTER,
@@ -119,7 +119,7 @@ const snewfoil_value_info mastermodes[] =
 };
 
 
-static void fillLayoutValueSet(ValueSet* pValue, const snewfoil_value_info* 
pInfo)
+static void fillLayoutValueSet(ValueSet* pValue, const snew_slide_value_info* 
pInfo)
 {
 Size aLayoutItemSize;
 for( ; pInfo->mnId; pInfo++ )
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx 
b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 06814feda90f..55a4d0419b82 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -77,7 +77,7 @@ private:
 std::unique_ptr mxMoreButton;
 };
 
-struct 

[Libreoffice-commits] core.git: sd/inc sd/source

2021-10-11 Thread Noel Grandin (via logerrit)
 sd/inc/AnnotationEnumeration.hxx|2 -
 sd/inc/CustomAnimationPreset.hxx|4 +--
 sd/source/core/CustomAnimationPreset.cxx|2 -
 sd/source/core/annotations/AnnotationEnumeration.cxx|   10 
 sd/source/ui/app/sdxfer.cxx |4 +--
 sd/source/ui/framework/configuration/ResourceId.cxx |6 ++---
 sd/source/ui/inc/framework/ResourceId.hxx   |2 -
 sd/source/ui/inc/sdxfer.hxx |2 -
 sd/source/ui/slidesorter/controller/SlsClipboard.cxx|8 +++---
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx  |4 +--
 sd/source/ui/slidesorter/controller/SlsTransferableData.cxx |8 +++---
 sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx |4 +--
 sd/source/ui/unoidl/unopage.cxx |2 -
 sd/source/ui/view/DocumentRenderer.cxx  |   12 
+-
 14 files changed, 35 insertions(+), 35 deletions(-)

New commits:
commit 126510981b3a71bf0e73551938c483f14281d3c4
Author: Noel Grandin 
AuthorDate: Mon Oct 11 14:31:41 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 11 16:11:47 2021 +0200

loplugin:moveparam in sd

Change-Id: Ia29e29d9af21dbd9bfb846db03f0100832835352
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123390
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/AnnotationEnumeration.hxx b/sd/inc/AnnotationEnumeration.hxx
index 6dbc7250e92f..ed35b46b4068 100644
--- a/sd/inc/AnnotationEnumeration.hxx
+++ b/sd/inc/AnnotationEnumeration.hxx
@@ -31,7 +31,7 @@ class XAnnotationEnumeration;
 namespace sd
 {
 css::uno::Reference
-createAnnotationEnumeration(const AnnotationVector&);
+createAnnotationEnumeration(AnnotationVector&&);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/inc/CustomAnimationPreset.hxx b/sd/inc/CustomAnimationPreset.hxx
index 6894a7c7af77..b746b20b7f83 100644
--- a/sd/inc/CustomAnimationPreset.hxx
+++ b/sd/inc/CustomAnimationPreset.hxx
@@ -75,8 +75,8 @@ struct PresetCategory
 OUString maLabel;
 EffectDescriptorList maEffects;
 
-PresetCategory( const OUString& rLabel, const EffectDescriptorList& 
rEffects )
-: maLabel( rLabel ), maEffects( rEffects ) {}
+PresetCategory( const OUString& rLabel, EffectDescriptorList&& rEffects )
+: maLabel( rLabel ), maEffects( std::move(rEffects) ) {}
 };
 typedef std::shared_ptr< PresetCategory > PresetCategoryPtr;
 typedef std::vector< PresetCategoryPtr > PresetCategoryList;
diff --git a/sd/source/core/CustomAnimationPreset.cxx 
b/sd/source/core/CustomAnimationPreset.cxx
index 1afc9f360e51..5147cb3cf0e0 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -381,7 +381,7 @@ void CustomAnimationPresets::importPresets( const 
Reference< XMultiServiceFactor
 }
 #endif
 }
-rPresetMap.push_back( std::make_shared( 
aLabel, aEffectsList ) );
+rPresetMap.push_back( std::make_shared( 
aLabel, std::move(aEffectsList) ) );
 }
 }
 }
diff --git a/sd/source/core/annotations/AnnotationEnumeration.cxx 
b/sd/source/core/annotations/AnnotationEnumeration.cxx
index 018de9b379b2..5fae2422b8f4 100644
--- a/sd/source/core/annotations/AnnotationEnumeration.cxx
+++ b/sd/source/core/annotations/AnnotationEnumeration.cxx
@@ -38,7 +38,7 @@ namespace {
 class AnnotationEnumeration: public ::cppu::WeakImplHelper< 
css::office::XAnnotationEnumeration >
 {
 public:
-explicit AnnotationEnumeration( const AnnotationVector& rAnnotations );
+explicit AnnotationEnumeration( AnnotationVector&& rAnnotations );
 AnnotationEnumeration(const AnnotationEnumeration&) = delete;
 AnnotationEnumeration& operator=(const AnnotationEnumeration&) = delete;
 
@@ -55,13 +55,13 @@ private:
 
 }
 
-Reference< XAnnotationEnumeration > createAnnotationEnumeration( const 
sd::AnnotationVector& rAnnotations )
+Reference< XAnnotationEnumeration > createAnnotationEnumeration( 
sd::AnnotationVector&& rAnnotations )
 {
-return new AnnotationEnumeration( rAnnotations );
+return new AnnotationEnumeration( std::move(rAnnotations) );
 }
 
-AnnotationEnumeration::AnnotationEnumeration( const AnnotationVector& 
rAnnotations )
-: maAnnotations(rAnnotations)
+AnnotationEnumeration::AnnotationEnumeration( AnnotationVector&& rAnnotations )
+: maAnnotations(std::move(rAnnotations))
 {
 maIter = maAnnotations.begin();
 }
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index dcd3e6d2517d..e813c687f5c7 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -666,7 +666,7 @@ void SdTransferable::SetObjectDescriptor( 
std::unique_ptr 
, bool bPersistent )
+void 

[Libreoffice-commits] core.git: sd/inc sd/source

2021-09-15 Thread Noel Grandin (via logerrit)
 sd/inc/Outliner.hxx|2 +-
 sd/source/ui/inc/ViewShellHint.hxx |2 +-
 sd/source/ui/inc/tools/IconCache.hxx   |2 +-
 sd/source/ui/inc/tools/SlotStateListener.hxx   |5 ++---
 sd/source/ui/inc/unomodel.hxx  |7 
+++
 sd/source/ui/inc/unopage.hxx   |7 
+++
 sd/source/ui/inc/view/viewoverlaymanager.hxx   |2 +-
 sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx   |5 ++---
 sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx|2 +-
 sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx  |2 +-
 sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx  |2 +-
 sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx |2 +-
 12 files changed, 18 insertions(+), 22 deletions(-)

New commits:
commit fbb9a98a78a349aef7b69d29a7534fd35ff1aa53
Author: Noel Grandin 
AuthorDate: Wed Sep 15 14:27:43 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 15 18:58:00 2021 +0200

loplugin:finalclasses in sd

Change-Id: I6070a392319bdc4e04db3a36a6876c194c8a6495
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122147
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 7be1b3488d28..772040f7a610 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -118,7 +118,7 @@ struct SearchSelection
 queried.  This is only sufficient for searching the outline view.
 
 */
-class SdOutliner : public SdrOutliner
+class SdOutliner final : public SdrOutliner
 {
 public:
 friend class ::sd::outliner::OutlinerContainer;
diff --git a/sd/source/ui/inc/ViewShellHint.hxx 
b/sd/source/ui/inc/ViewShellHint.hxx
index 8bde7c2f4473..05a0c8328666 100644
--- a/sd/source/ui/inc/ViewShellHint.hxx
+++ b/sd/source/ui/inc/ViewShellHint.hxx
@@ -26,7 +26,7 @@ namespace sd
 /** Local derivation of the SfxHint class that defines some hint ids that
 are used by the ViewShell class and its descendants.
 */
-class ViewShellHint : public SfxHint
+class ViewShellHint final : public SfxHint
 {
 public:
 enum HintId
diff --git a/sd/source/ui/inc/tools/IconCache.hxx 
b/sd/source/ui/inc/tools/IconCache.hxx
index 2bacbe27fce5..fef994764f88 100644
--- a/sd/source/ui/inc/tools/IconCache.hxx
+++ b/sd/source/ui/inc/tools/IconCache.hxx
@@ -34,7 +34,7 @@ namespace sd
 This cache acts like a singleton with a lifetime equal to that of the sd
 module.
 */
-class IconCache : public SdGlobalResource
+class IconCache final : public SdGlobalResource
 {
 public:
 /** The lifetime of the returned reference is limited to that of the sd
diff --git a/sd/source/ui/inc/tools/SlotStateListener.hxx 
b/sd/source/ui/inc/tools/SlotStateListener.hxx
index 9df4ceec19f3..85c123929fce 100644
--- a/sd/source/ui/inc/tools/SlotStateListener.hxx
+++ b/sd/source/ui/inc/tools/SlotStateListener.hxx
@@ -39,7 +39,7 @@ typedef cppu::WeakComponentImplHelper<
 to be informed when the support for vertical writing changes but it can
 be used to relay state changes of other slots as well.
 */
-class SlotStateListener
+class SlotStateListener final
 : protected MutexOwner,
   public SlotStateListenerInterfaceBase
 {
@@ -98,14 +98,13 @@ public:
 virtual void SAL_CALL
 disposing(const css::lang::EventObject& rEvent) override;
 
-protected:
+private:
 /** This method is called by the WeakComponentImplHelper base class in
 reaction to a XComponent::dispose() call.  It releases all currently
 active listeners.
 */
 virtual void SAL_CALL disposing() override;
 
-private:
 Link maCallback;
 
 /** Remember the URLs that describe slots whose state changes we are
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index 8cfa5a81d06a..86b1f7a854e0 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -61,7 +61,7 @@ class DrawViewShell;
 extern OUString getPageApiName( SdPage const * pPage );
 extern OUString getPageApiNameFromUiName( const OUString& rUIName );
 
-class SD_DLLPUBLIC SdXImpressDocument : public SfxBaseModel, // implements 
SfxListener, OWEAKOBJECT & other
+class SD_DLLPUBLIC SdXImpressDocument final : public SfxBaseModel, // 
implements SfxListener, OWEAKOBJECT & other
public SvxFmMSFactory,
public css::drawing::XDrawPageDuplicator,
public css::drawing::XLayerSupplier,
@@ -121,7 +121,6 @@ private:
 
 sd::DrawViewShell* GetViewShell();
 
-protected:
 /** abstract SdrModel provider */
 virtual SdrModel& getSdrModelFromUnoModel() const override;
 
@@ -292,7 +291,7 @@ public:
 *  *
 

[Libreoffice-commits] core.git: sd/inc

2021-09-05 Thread Roman Kuznetsov (via logerrit)
 sd/inc/strings.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 603e34734136340e506e8f88072a30e13707d3f3
Author: Roman Kuznetsov 
AuthorDate: Sat Sep 4 19:41:46 2021 +0200
Commit: Roman Kuznetsov 
CommitDate: Sun Sep 5 12:50:49 2021 +0200

tdf#140725 Change a tooltip for Slide Master name field in status bar

Change-Id: If54311379637ff0485477bcbb2d2d8c2d079ce7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121560
Tested-by: Jenkins
Reviewed-by: Roman Kuznetsov 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 5303e0d0905c..c5643c8bfe0e 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -230,7 +230,7 @@
 #define STR_HTMLEXP_ERROR_CREATE_FILE   
NC_("STR_HTMLEXP_ERROR_CREATE_FILE", "Cannot create the file $(URL1).")
 #define STR_HTMLEXP_ERROR_OPEN_FILE 
NC_("STR_HTMLEXP_ERROR_OPEN_FILE", "Could not open the file $(URL1).")
 #define STR_HTMLEXP_ERROR_COPY_FILE 
NC_("STR_HTMLEXP_ERROR_COPY_FILE", "The file $(URL1) could not be copied to 
$(URL2)")
-#define STR_STATUSBAR_MASTERPAGE
NC_("STR_STATUSBAR_MASTERPAGE", "Slide Master name. Right-click for list and 
double-click for dialog.")
+#define STR_STATUSBAR_MASTERPAGE
NC_("STR_STATUSBAR_MASTERPAGE", "Slide Master name. Right-click for list or 
click for dialog.")
 #define STR_TITLE_RENAMESLIDE   
NC_("STR_TITLE_RENAMESLIDE", "Rename Slide")
 #define STR_TITLE_RENAMEPAGE
NC_("STR_TITLE_RENAMEPAGE", "Rename Page")
 #define STR_TOOLTIP_RENAME  
NC_("STR_TOOLTIP_RENAME", "Duplicate or empty names are not possible")


[Libreoffice-commits] core.git: sd/inc

2021-08-24 Thread Julien Nabet (via logerrit)
 sd/inc/strings.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d21a9968728295736e63bfc53eb83ee162dafae7
Author: Julien Nabet 
AuthorDate: Mon Aug 23 22:41:25 2021 +0200
Commit: Heiko Tietze 
CommitDate: Tue Aug 24 10:36:02 2021 +0200

tdf#144032: fix STR_ASK_DELETE_LAYER

Like this since initial import

Change-Id: Ie1b475e594860480159d4dea0d401f33b28adab2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120929
Tested-by: Jenkins
Reviewed-by: Sophie Gautier 
Reviewed-by: Heiko Tietze 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index e1f9f0706930..4103cc7e452b 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -84,7 +84,7 @@
 #define STR_UNDO_DELETEPAGES
NC_("STR_UNDO_DELETEPAGES", "Delete slides")
 #define STR_UNDO_DELETEPAGES_DRAW   
NC_("STR_UNDO_DELETEPAGES_DRAW", "Delete pages")
 #define STR_UNDO_INSERTPAGES
NC_("STR_UNDO_INSERTPAGES", "Insert slides")
-#define STR_ASK_DELETE_LAYER
NC_("STR_ASK_DELETE_LAYER", "Are you sure you want to delete the level 
\"$\"?\nNote: All objects on this level will be deleted!")
+#define STR_ASK_DELETE_LAYER
NC_("STR_ASK_DELETE_LAYER", "Are you sure you want to delete the layer 
\"$\"?\nNote: All objects on this layer will be deleted!")
 #define STR_ASK_DELETE_ALL_PICTURES 
NC_("STR_ASK_DELETE_ALL_PICTURES", "Do you really want to delete all images?")
 #define STR_UNDO_CHANGE_TITLE_AND_LAYOUT
NC_("STR_UNDO_CHANGE_TITLE_AND_LAYOUT", "Modify title and outline")
 #define STR_WAV_FILENC_("STR_WAV_FILE", 
"Audio")


[Libreoffice-commits] core.git: sd/inc sd/source

2021-08-04 Thread Mike Kaganski (via logerrit)
 sd/inc/stlsheet.hxx |   12 +
 sd/source/core/stlsheet.cxx |  101 +++-
 2 files changed, 94 insertions(+), 19 deletions(-)

New commits:
commit f234fe77a0070927b8ae2ba3309f63aa718624f5
Author: Mike Kaganski 
AuthorDate: Wed Aug 4 11:33:09 2021 +0300
Commit: Mike Kaganski 
CommitDate: Wed Aug 4 15:50:46 2021 +0200

SdStyleSheet: implement XMultiPropertySet

Reduces broadcast frequency

Change-Id: I25f4281e792aa6bb42a11d3566e7d4e64e833f4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119992
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index 105eb4cd797a..645259e9e8fc 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -22,6 +22,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -43,6 +44,7 @@ struct SfxItemPropertyMapEntry;
 
 typedef cppu::ImplInheritanceHelper< SfxUnoStyleSheet,
 css::beans::XPropertySet,
+css::beans::XMultiPropertySet,
 css::lang::XServiceInfo,
 css::beans::XPropertyState,
 css::util::XModifyBroadcaster,
@@ -109,6 +111,13 @@ public:
 virtual void SAL_CALL addVetoableChangeListener( const OUString& 
PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& 
aListener ) override;
 virtual void SAL_CALL removeVetoableChangeListener( const OUString& 
PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& 
aListener ) override;
 
+// XMultiPropertySet
+virtual void SAL_CALL setPropertyValues(const 
css::uno::Sequence& aPropertyNames, const 
css::uno::Sequence& aValues) override;
+virtual css::uno::Sequence SAL_CALL getPropertyValues(const 
css::uno::Sequence& aPropertyNames) override;
+virtual void SAL_CALL addPropertiesChangeListener(const 
css::uno::Sequence& aPropertyNames, const 
css::uno::Reference& xListener) override;
+virtual void SAL_CALL removePropertiesChangeListener(const 
css::uno::Reference& xListener) override;
+virtual void SAL_CALL firePropertiesChangeEvent(const 
css::uno::Sequence& aPropertyNames, const 
css::uno::Reference& xListener) override;
+
 // XPropertyState
 virtual css::beans::PropertyState SAL_CALL getPropertyState( const 
OUString& PropertyName ) override;
 virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL 
getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName ) 
override;
@@ -130,6 +139,9 @@ private:
 /// @throws css::uno::RuntimeException
 static const SfxItemPropertyMapEntry* getPropertyMapEntry( 
std::u16string_view rPropertyName );
 
+void setPropertyValue_Impl(const OUString& aPropertyName, const 
css::uno::Any& aValue);
+css::uno::Any getPropertyValue_Impl(const OUString& PropertyName);
+
 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
 virtual ~SdStyleSheet() override;
 
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 9f87290c52f2..533a9846557f 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -951,20 +951,12 @@ void SAL_CALL SdStyleSheet::setParentStyle( const 
OUString& rParentName  )
 }
 }
 
-// XPropertySet
+// XPropertySet/XMultiPropertySet utility functions
 
-Reference< XPropertySetInfo > SdStyleSheet::getPropertySetInfo()
-{
-throwIfDisposed();
-static Reference< XPropertySetInfo > xInfo = 
GetStylePropertySet().getPropertySetInfo();
-return xInfo;
-}
-
-void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, 
const Any& aValue )
+// Does not broadcast
+// Must be guarded by solar mutex; must not be disposed
+void SdStyleSheet::setPropertyValue_Impl(const OUString& aPropertyName, const 
css::uno::Any& aValue)
 {
-SolarMutexGuard aGuard;
-throwIfDisposed();
-
 const SfxItemPropertyMapEntry* pEntry = getPropertyMapEntry( aPropertyName 
);
 if( pEntry == nullptr )
 {
@@ -1058,16 +1050,11 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const 
OUString& aPropertyName, con
 }
 
 rStyleSet.Put( aSet );
-Broadcast(SfxHint(SfxHintId::DataChanged));
-
 }
 
-Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName )
+// Must be guarded by solar mutex; must not be disposed
+css::uno::Any SdStyleSheet::getPropertyValue_Impl(const OUString& PropertyName)
 {
-SolarMutexGuard aGuard;
-
-throwIfDisposed();
-
 const SfxItemPropertyMapEntry* pEntry = getPropertyMapEntry( PropertyName 
);
 if( pEntry == nullptr )
 {
@@ -1164,7 +1151,32 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const 
OUString& PropertyName )
 }
 
 return aAny;
+}
+
+// XPropertySet
+
+Reference< XPropertySetInfo > SdStyleSheet::getPropertySetInfo()
+{
+

[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig

2021-06-29 Thread Tibor Nagy (via logerrit)
 sd/inc/drawdoc.hxx  |1 +
 sd/qa/unit/uiimpress.cxx|   17 +
 sd/source/core/drawdoc.cxx  |3 ++-
 sd/source/ui/dlg/custsdlg.cxx   |   21 +
 sd/source/ui/func/fucushow.cxx  |   25 ++---
 sd/source/ui/func/fusldlg.cxx   |1 +
 sd/source/ui/inc/custsdlg.hxx   |2 --
 sd/source/ui/inc/slideshow.hxx  |3 ++-
 sd/source/ui/view/drviewse.cxx  |4 
 sd/uiconfig/simpress/ui/customslideshows.ui |   20 
 10 files changed, 50 insertions(+), 47 deletions(-)

New commits:
commit a46a847d4298806d4e91e4665c3c1907c09a17c7
Author: Tibor Nagy 
AuthorDate: Fri Jun 25 11:52:03 2021 +0200
Commit: László Németh 
CommitDate: Tue Jun 29 19:16:47 2021 +0200

tdf#142589 Impress UI: fix Start button of Custom Slide Shows

This button started the selected custom slide show only
by changing the (already) selected custom slide show, and
enabling the checkbox "Use custom slide show". Otherwise it
started always the full show.

Remove the redundant checkbox "Use custom slide show" of the
dialog window "Custom Slide Shows" (Slide Show->Custom Slide Show...)
to avoid inconsistent behavior of the Start button (which could
start the full show instead of the selected custom slide show).

Now Start button of the dialog starts the selected custom slide
show only once, i.e. it doesn't modify the global slide show
settings for all the next slide shows (that is already handled
by Slide Show->Slide Show Settings->Range->"Custom slide show:"
and Slide Show->Slide Show Settings->Range->"All slides").

Change-Id: I6e97a69c546870199d5a45d9a6ad102e30d820c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117876
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 7d4c3c92ce5c..80a79955537f 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -108,6 +108,7 @@ namespace sd
 bool mbAnimationAllowed;
 sal_Int32 mnPauseTimeout;
 bool mbShowPauseLogo;
+bool mbStartCustomShow;
 
 PresentationSettings();
 };
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 8fa1622d6197..444677fdda41 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -717,6 +718,22 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, 
testSearchAllInDocumentAndNotes)
 Scheduler::ProcessEventsToIdle();
 }
 
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf142589)
+{
+mxComponent = loadFromDesktop("private:factory/simpress",
+  
"com.sun.star.presentation.PresentationDocument");
+CPPUNIT_ASSERT(mxComponent.is());
+
+auto pImpressDocument = 
dynamic_cast(mxComponent.get());
+sd::ViewShell* pViewShell = 
pImpressDocument->GetDocShell()->GetViewShell();
+
+SfxRequest aRequest(pViewShell->GetViewFrame(), SID_PRESENTATION);
+pImpressDocument->GetDoc()->getPresentationSettings().mbCustomShow = true;
+pImpressDocument->GetDoc()->getPresentationSettings().mbStartCustomShow = 
true;
+sd::slideshowhelp::ShowSlideShow(aRequest, *pImpressDocument->GetDoc());
+CPPUNIT_ASSERT_EQUAL(false, 
pImpressDocument->GetDoc()->getPresentationSettings().mbCustomShow);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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/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, 

[Libreoffice-commits] core.git: sd/inc sd/source

2021-06-09 Thread Tomaž Vajngerl (via logerrit)
 sd/inc/Outliner.hxx|3 +
 sd/source/ui/view/Outliner.cxx |   63 +
 2 files changed, 36 insertions(+), 30 deletions(-)

New commits:
commit 36db408b9027da01464927e5853950435596ae05
Author: Tomaž Vajngerl 
AuthorDate: Wed Jun 9 14:58:28 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 10 02:36:22 2021 +0200

sd: ubsan - fix heap-use-after-free in SdOutliner

OutlinerView can change (old one deleted and new one create)
so we can't store it in a local vairable and need to always
fetch it.

UBSAN Error log:
==21484==ERROR: AddressSanitizer: heap-use-after-free on address 
0x606000af7d28 at pc 0x2ab7c5979405 bp 0x7ffcd1a3d1a0 sp 0x7ffcd1a3d198
  READ of size 8 at 0x606000af7d28 thread T0
  -0 0x2ab7c5979404 in std::__uniq_ptr_impl >::_M_ptr() const 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:147:42
  -1 0x2ab7c59792ea in std::unique_ptr >::get() const 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:337:21
  -2 0x2ab7c59791d9 in std::unique_ptr >::operator*() const 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:322:2
  -3 0x2ab7c59725da in OutlinerView::GetEditView() const 
/include/editeng/outliner.hxx:209:46
  -4 0x2ab7c70e36bb in 
SdOutliner::SearchAndReplaceOnce(std::__debug::vector >*) /sd/source/ui/view/Outliner.cxx:903:21
  -5 0x2ab7c70dcb32 in SdOutliner::SearchAndReplaceAll() 
/sd/source/ui/view/Outliner.cxx:622:29
  -6 0x2ab7c70da81b in SdOutliner::StartSearchAndReplace(SvxSearchItem 
const*) /sd/source/ui/view/Outliner.cxx:478:28
  -7 0x2ab7c61e4fc5 in sd::FuSearch::SearchAndReplace(SvxSearchItem 
const*) /sd/source/ui/func/fusearch.cxx:128:44
  -8 0x2ab7c5c61fc5 in sd::DrawDocShell::Execute(SfxRequest&) 
/sd/source/ui/docshell/docshel3.cxx:228:36
  -9 0x2ab7c5cac074 in SfxStubDrawDocShellExecute(SfxShell*, 
SfxRequest&) /workdir/SdiTarget/sd/sdi/sdslots.hxx:18384:1
  -10 0x2ab7cd885d8f in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot 
const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:253:9
  -11 0x2ab7cd89bd8f in SfxDispatcher::Execute_(SfxShell&, SfxSlot 
const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9
  -12 0x2ab7cd89ccd6 in SfxDispatcher::Execute(unsigned short, 
SfxCallMode, SfxItemSet const*, SfxItemSet const*, unsigned short) 
/sfx2/source/control/dispatch.cxx:811:9
  -13 0x2ab7cdd11d76 in 
SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, 
com::sun::star::uno::Sequence const&, 
com::sun::star::uno::Reference 
const&) /sfx2/source/control/unoctitm.cxx:738:46
  -14 0x2ab7cdd15135 in 
SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, 
com::sun::star::uno::Sequence const&, 
com::sun::star::uno::Reference 
const&) /sfx2/source/control/unoctitm.cxx:243:16
  -15 0x2ab7f54b25d7 in 
framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference
 const&, com::sun::star::util::URL const&, bool, 
com::sun::star::uno::Sequence const&) 
/framework/source/services/dispatchhelper.cxx:159:30
  -16 0x2ab7f54b1531 in 
framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference
 const&, rtl::OUString const&, rtl::OUString const&, int, 
com::sun::star::uno::Sequence const&) 
/framework/source/services/dispatchhelper.cxx:117:16
  -17 0x2ab7f54b2d17 in non-virtual thunk to 
framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference
 const&, rtl::OUString const&, rtl::OUString const&, int, 
com::sun::star::uno::Sequence const&) 
/framework/source/services/dispatchhelper.cxx
  -18 0x2ab7e63c546f in 
unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference
 const&, rtl::OUString const&, 
com::sun::star::uno::Sequence const&) 
/unotest/source/cpp/macros_test.cxx:85:22
  -19 0x2ab7b1a9ac2d in testSearchAllInDocumentAndNotes::TestBody() 
/sd/qa/unit/uiimpress.cxx:715:5
  -20 0x2ab7b1b43f84 in void std::__invoke_impl(std::__invoke_memfun_deref, void 
(testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:73:14
  -21 0x2ab7b1b43b5e in std::__invoke_result::type std::__invoke(void 
(testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95:14
  -22 0x2ab7b1b439b2 in void std::_Bind::__call(std::tuple<>&&, 
std::_Index_tuple<0ul>) 

[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/workben

2021-03-24 Thread Vincent LE GARREC (via logerrit)
 sd/inc/AnnotationEnumeration.hxx   
 |5 +
 sd/inc/CustomAnimationCloner.hxx   
 |5 +
 sd/inc/CustomAnimationEffect.hxx   
 |5 +
 sd/inc/CustomAnimationPreset.hxx   
 |5 +
 sd/inc/DocumentRenderer.hrc
 |5 +
 sd/inc/EffectMigration.hxx 
 |5 +
 sd/inc/FactoryIds.hxx  
 |5 +
 sd/inc/Outliner.hxx
 |5 +
 sd/inc/OutlinerIterator.hxx
 |5 +
 sd/inc/SdShapeTypes.hxx
 |5 +
 sd/inc/TransitionPreset.hxx
 |5 +
 sd/inc/animations.hxx  
 |5 +
 sd/inc/anminfo.hxx 
 |5 +
 sd/inc/app.hrc 
 |4 +---
 sd/inc/bitmaps.hlst
 |5 +
 sd/inc/createpresentation.hxx  
 |5 +
 sd/inc/createunocustomshow.hxx 
 |5 +
 sd/inc/createunopageimpl.hxx   
 |5 +
 sd/inc/cusshow.hxx 
 |5 +
 sd/inc/customshowlist.hxx  
 |5 +
 sd/inc/diadef.h
 |5 +
 sd/inc/drawdoc.hxx 
 |5 +
 sd/inc/errhdl.hrc  
 |5 +
 sd/inc/fadedef.h   
 |5 +
 sd/inc/family.hrc  
 |5 +
 sd/inc/glob.hxx
 |5 +
 sd/inc/helper/simplereferencecomponent.hxx 
 |5 +
 sd/inc/helpids.h   
 |5 +
 sd/inc/misc/scopelock.hxx  
 |5 +
 sd/inc/notifydocumentevent.hxx 
 |5 +
 sd/inc/pageformatpanel.hrc 
 |5 +
 sd/inc/pglink.hxx  
 |5 +
 sd/inc/pres.hxx
 |5 +
 sd/inc/prlayout.hxx
 |5 +
 sd/inc/randomnode.hxx  
 |5 +
 sd/inc/resltn.hxx  
 |5 +
 sd/inc/sdabstdlg.hxx   
 |4 +---
 sd/inc/sdattr.hrc  
 |5 +
 sd/inc/sdattr.hxx  
 |5 +
 sd/inc/sdcgmfilter.hxx 
 |5 +
 sd/inc/sdcommands.h
 |5 +
 sd/inc/sddll.hxx   
 |5 +
 sd/inc/sddllapi.h  
 |5 +
 sd/inc/sdenumdef.hxx   
 |5 +
 sd/inc/sderror.hxx 
 |5 +
 sd/inc/sdfilter.hxx
 |5 +
 sd/inc/sdgrffilter.hxx 
 |5 +
 sd/inc/sdhtmlfilter.hxx
 |5 +
 sd/inc/sdiocmpt.hxx
 |5 +
 sd/inc/sdmod.hxx   
 |5 +
 sd/inc/sdpdffilter.hxx 
 |5 +
 sd/inc/sdpptwrp.hxx
 |5 +
 sd/inc/sdundo.hxx   

[Libreoffice-commits] core.git: sd/inc sd/source

2021-03-03 Thread Noel (via logerrit)
 sd/inc/stlsheet.hxx  |2 +-
 sd/source/core/stlfamily.cxx |2 +-
 sd/source/core/stlsheet.cxx  |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit fd91c4937b942f7e28a1b6a30afddfb2abadfcf1
Author: Noel 
AuthorDate: Tue Mar 2 09:23:06 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 3 09:33:29 2021 +0100

loplugin:refcounting in sd

Change-Id: I5e259fc7028b75910efd6a99ed445690a9c496ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111803
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index dc32df9fa5eb..b6b693d4f937 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -72,7 +72,7 @@ public:
 
 static OUString GetFamilyString( SfxStyleFamily eFamily );
 
-static SdStyleSheet* CreateEmptyUserStyle( SfxStyleSheetBasePool& rPool, 
SfxStyleFamily eFamily );
+static rtl::Reference CreateEmptyUserStyle( 
SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily );
 
 //Broadcast that a SdStyleSheet has changed, taking into account outline 
sublevels
 //which need to be explicitly broadcast as changing if their parent style 
was
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx
index 8e9150a292ef..164fb7814b41 100644
--- a/sd/source/core/stlfamily.cxx
+++ b/sd/source/core/stlfamily.cxx
@@ -429,7 +429,7 @@ Reference< XInterface > SAL_CALL 
SdStyleFamily::createInstance()
 throw IllegalAccessException();
 }
 return Reference(
-static_cast(SdStyleSheet::CreateEmptyUserStyle(*mxPool, 
mnFamily)));
+static_cast(SdStyleSheet::CreateEmptyUserStyle(*mxPool, 
mnFamily).get()));
 }
 
 Reference< XInterface > SAL_CALL SdStyleFamily::createInstanceWithArguments( 
const Sequence< Any >&  )
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 270b1c5d63b7..a470ff28c4f1 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -675,7 +675,7 @@ void SdStyleSheet::throwIfDisposed()
 throw DisposedException();
 }
 
-SdStyleSheet* SdStyleSheet::CreateEmptyUserStyle( SfxStyleSheetBasePool& 
rPool, SfxStyleFamily eFamily )
+rtl::Reference SdStyleSheet::CreateEmptyUserStyle( 
SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily )
 {
 OUString aName;
 sal_Int32 nIndex = 1;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source sd/uiconfig

2021-02-19 Thread Caolán McNamara (via logerrit)
 sd/inc/bitmaps.hlst |5 
 sd/inc/strings.hrc  |7 
 sd/source/ui/slideshow/slideshowimpl.cxx|  202 
 sd/source/ui/slideshow/slideshowimpl.hxx|2 
 sd/uiconfig/simpress/ui/slidecontextmenu.ui |  120 ++--
 5 files changed, 146 insertions(+), 190 deletions(-)

New commits:
commit e872d77cc0e5dc1571df4559101d0b80e40097c2
Author: Caolán McNamara 
AuthorDate: Fri Feb 19 16:13:36 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 19 21:05:57 2021 +0100

weld slidecontextmenu

Change-Id: Ia3fea3ddf920c45daa244826dffb7effa58c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111238
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sd/inc/bitmaps.hlst b/sd/inc/bitmaps.hlst
index 6186abcab3c1..6986085a8992 100644
--- a/sd/inc/bitmaps.hlst
+++ b/sd/inc/bitmaps.hlst
@@ -204,6 +204,11 @@
 #define BMP_CUSTOMANIMATION_MEDIA_PAUSE 
"sd/res/breakplayingblue_16.png"
 #define BMP_CUSTOMANIMATION_MEDIA_STOP  
"sd/res/stopplayingblue_16.png"
 
+#define BMP_MENU_NEXT   
"cmd/sc_nextrecord.png"
+#define BMP_MENU_PREV   
"cmd/sc_prevrecord.png"
+#define BMP_MENU_FIRST  
"cmd/sc_firstrecord.png"
+#define BMP_MENU_LAST   
"cmd/sc_lastrecord.png"
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index ec8222b8bd15..183324d2679a 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -478,7 +478,12 @@
 
 #define STR_ANIMATION_DIALOG_TITLE  
NC_("STR_ANIMATION_DIALOG_TITLE", "Animation")
 
-#define RID_SVXSTR_EDIT_GRAPHIC 
NC_("RID_SVXSTR_EDIT_GRAPHIC", "Link")
+#define RID_SVXSTR_EDIT_GRAPHIC 
NC_("RID_SVXSTR_EDIT_GRAPHIC", "Link")
+
+#define RID_SVXSTR_MENU_NEXT
NC_("RID_SVXSTR_MENU_NEXT", "~Next")
+#define RID_SVXSTR_MENU_PREV
NC_("RID_SVXSTR_MENU_NEXT", "~Previous")
+#define RID_SVXSTR_MENU_FIRST   
NC_("RID_SVXSTR_MENU_FIRST", "~First Slide")
+#define RID_SVXSTR_MENU_LAST
NC_("RID_SVXSTR_MENU_LAST", "~Last Slide")
 
 #endif
 
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 22893cf34a3a..b9639f184cb9 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -67,10 +67,12 @@
 #include "PaneHider.hxx"
 
 #include 
-#include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1942,119 +1944,102 @@ IMPL_LINK_NOARG(SlideshowImpl, ContextMenuHdl, void*, 
void)
 if( !mbWasPaused )
 pause();
 
-VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), 
"modules/simpress/ui/slidecontextmenu.ui", "");
-VclPtr pMenu(aBuilder.get_menu("menu"));
+std::unique_ptr 
xBuilder(Application::CreateBuilder(nullptr, 
"modules/simpress/ui/slidecontextmenu.ui"));
+std::unique_ptr xMenu(xBuilder->weld_menu("menu"));
+OUString sNextImage(BMP_MENU_NEXT), sPrevImage(BMP_MENU_PREV);
+xMenu->insert(0, "next", SdResId(RID_SVXSTR_MENU_NEXT), , 
nullptr, nullptr, TRISTATE_INDET);
+xMenu->insert(1, "prev", SdResId(RID_SVXSTR_MENU_PREV), , 
nullptr, nullptr, TRISTATE_INDET);
 
 // Adding button to display if in Pen  mode
-pMenu->CheckItem("pen", mbUsePen);
+xMenu->set_active("pen", mbUsePen);
 
 const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
-pMenu->EnableItem(pMenu->GetItemId("next"), 
mpSlideController->getNextSlideIndex() != -1);
-pMenu->EnableItem(pMenu->GetItemId("prev"), 
(mpSlideController->getPreviousSlideIndex() != -1 ) || (eMode == 
SHOWWINDOWMODE_END) || (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == 
SHOWWINDOWMODE_BLANK));
-pMenu->EnableItem(pMenu->GetItemId("edit"), 
mpViewShell->GetDoc()->IsStartWithPresentation());
+xMenu->set_visible("next", mpSlideController->getNextSlideIndex() != -1);
+xMenu->set_visible("prev", (mpSlideController->getPreviousSlideIndex() != 
-1 ) || (eMode == SHOWWINDOWMODE_END) || (eMode == SHOWWINDOWMODE_PAUSE) || 
(eMode == SHOWWINDOWMODE_BLANK));
+xMenu->set_visible("edit", 
mpViewShell->GetDoc()->IsStartWithPresentation());
 
-PopupMenu* pPageMenu = pMenu->GetPopupMenu(pMenu->GetItemId("goto"));
+std::unique_ptr xPageMenu(xBuilder->weld_menu("gotomenu"));
+OUString sFirstImage(BMP_MENU_FIRST), sLastImage(BMP_MENU_LAST);
+xPageMenu->insert(0, "first", SdResId(RID_SVXSTR_MENU_FIRST), 
, nullptr, nullptr, TRISTATE_INDET);
+xPageMenu->insert(1, "last", SdResId(RID_SVXSTR_MENU_LAST), , 
nullptr, nullptr, TRISTATE_INDET);
 

[Libreoffice-commits] core.git: sd/inc sd/IwyuFilter_sd.yaml sd/qa sd/source svx/IwyuFilter_svx.yaml svx/source

2020-12-07 Thread Gabor Kelemen (via logerrit)
 sd/IwyuFilter_sd.yaml|   75 
++
 sd/inc/Annotation.hxx|1 
 sd/inc/errhdl.hrc|2 
 sd/inc/helper/simplereferencecomponent.hxx   |2 
 sd/inc/pageformatpanel.hrc   |2 
 sd/inc/undo/undomanager.hxx  |1 
 sd/qa/unit/SdrPdfImportTest.cxx  |   13 +
 sd/qa/unit/dialogs-test.cxx  |2 
 sd/qa/unit/export-tests.cxx  |2 
 sd/qa/unit/import-tests.cxx  |4 
 sd/qa/unit/tiledrendering/LOKitSearchTest.cxx|6 
 sd/qa/unit/tiledrendering/tiledrendering.cxx |1 
 sd/qa/unit/uiimpress.cxx |2 
 sd/source/core/CustomAnimationPreset.cxx |4 
 sd/source/core/annotations/Annotation.cxx|1 
 sd/source/core/drawdoc2.cxx  |2 
 sd/source/core/sdpage.cxx|5 
 sd/source/filter/pdf/sdpdffilter.cxx |1 
 sd/source/filter/xml/sdxmlwrp.cxx|2 
 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx|2 
 sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx|1 
 sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx|1 
 sd/source/ui/accessibility/AccessiblePresentationShape.cxx   |1 
 sd/source/ui/animations/CustomAnimationDialog.cxx|1 
 sd/source/ui/animations/CustomAnimationDialog.hxx|1 
 sd/source/ui/app/sddll.cxx   |9 -
 sd/source/ui/dlg/BulletAndPositionDlg.cxx|1 
 sd/source/ui/dlg/dlgolbul.cxx|1 
 sd/source/ui/dlg/dlgpage.cxx |1 
 sd/source/ui/dlg/dlgsnap.cxx |1 
 sd/source/ui/dlg/navigatr.cxx|5 
 sd/source/ui/dlg/prltempl.cxx|2 
 sd/source/ui/dlg/sdabstdlg.cxx   |1 
 sd/source/ui/dlg/sdtreelb.cxx|3 
 sd/source/ui/dlg/tpaction.cxx|1 
 sd/source/ui/docshell/docshel3.cxx   |2 
 sd/source/ui/docshell/docshel4.cxx   |1 
 sd/source/ui/docshell/docshell.cxx   |2 
 sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx |1 
 sd/source/ui/framework/module/ShellStackGuard.cxx|1 
 sd/source/ui/func/fudraw.cxx |1 
 sd/source/ui/func/fuoaprms.cxx   |1 
 sd/source/ui/func/fusnapln.cxx   |1 
 sd/source/ui/func/futext.cxx |1 
 sd/source/ui/inc/TemplateScanner.hxx |1 
 sd/source/ui/inc/WindowUpdater.hxx   |1 
 sd/source/ui/inc/drawview.hxx|2 
 sd/source/ui/inc/ins_paste.hxx   |2 
 sd/source/ui/inc/navigatr.hxx|1 
 sd/source/ui/remotecontrol/Listener.cxx  |1 
 sd/source/ui/sidebar/LayoutMenu.hxx  |1 
 sd/source/ui/sidebar/MasterPageContainer.cxx |2 
 sd/source/ui/sidebar/PageMarginUtils.hxx |1 
 sd/source/ui/sidebar/SlideBackground.cxx |8 -
 sd/source/ui/sidebar/SlideBackground.hxx |4 
 sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx|1 
 sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx |1 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx   |2 
 sd/source/ui/slidesorter/view/SlideSorterView.cxx|1 
 sd/source/ui/table/TableDesignPane.cxx   |1 
 sd/source/ui/tools/TimerBasedTaskExecution.cxx   |1 
 sd/source/ui/unoidl/DrawController.cxx   |2 
 sd/source/ui/unoidl/unodoc.cxx   |2 
 sd/source/ui/unoidl/unomodel.cxx 

[Libreoffice-commits] core.git: sd/inc sd/uiconfig

2020-11-02 Thread Ayhan Yalçınsoy (via logerrit)
 sd/inc/strings.hrc |2 +-
 sd/uiconfig/sdraw/ui/drawpagedialog.ui |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3112126964247fb0c6479a411c003d0819f31fd9
Author: Ayhan Yalçınsoy 
AuthorDate: Fri Oct 30 13:46:15 2020 +0300
Commit: Heiko Tietze 
CommitDate: Mon Nov 2 15:02:15 2020 +0100

tdf#137720: Slide, Page Setup replaced with Slide, Page Properties

Change-Id: I69600305698583d64bd9c5d3950b3fb7762fcf8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105044
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 0e093d1da84b..ec8222b8bd15 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -322,7 +322,7 @@
 #define STR_UNDO_MOVEPAGES  
NC_("STR_UNDO_MOVEPAGES", "Move slides" )
 #define STR_INSERT_PAGES
NC_("STR_INSERT_PAGES", "Insert Pages" )
 #define STR_INSERT_PAGE_DRAW
NC_("STR_INSERT_PAGE_DRAW", "Insert Page" )
-#define STR_SLIDE_SETUP_TITLE   
NC_("STR_SLIDE_SETUP_TITLE", "Slide Setup" )
+#define STR_SLIDE_SETUP_TITLE   
NC_("STR_SLIDE_SETUP_TITLE", "Slide Properties" )
 
 #define STR_POOLSHEET_OBJWITHOUTFILL
NC_("STR_POOLSHEET_OBJWITHOUTFILL", "Object without fill" )
 #define STR_POOLSHEET_OBJNOLINENOFILL   
NC_("STR_POOLSHEET_OBJNOLINENOFILL", "Object with no fill and no line" )
diff --git a/sd/uiconfig/sdraw/ui/drawpagedialog.ui 
b/sd/uiconfig/sdraw/ui/drawpagedialog.ui
index e6fb663df764..c229f030c434 100644
--- a/sd/uiconfig/sdraw/ui/drawpagedialog.ui
+++ b/sd/uiconfig/sdraw/ui/drawpagedialog.ui
@@ -5,7 +5,7 @@
   
 False
 6
-Page Setup
+Page Properties
 True
 dialog
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source sfx2/source

2020-11-02 Thread Jan-Marek Glogowski (via logerrit)
 sd/inc/sdmod.hxx |4 +++-
 sd/source/ui/app/sdmod1.cxx  |   12 +---
 sfx2/source/view/frmload.cxx |3 ++-
 3 files changed, 14 insertions(+), 5 deletions(-)

New commits:
commit d4892e5452bff155da6c34063ffe8c331284d8e9
Author: Jan-Marek Glogowski 
AuthorDate: Wed Oct 21 00:18:03 2020 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Mon Nov 2 13:14:35 2020 +0100

tdf#126700 handle Impress default documents

Impress has a two stage load, eventually because of the optional
template manager. Since I don't know, what the 2nd load URL
"private:object" is used for otherwise in LO, this just marks the
empty and default documents as replaceable in Impress.

Regressed-by: 61e1e0413296928d929f99c0f006c6cbbcf4ac40
Change-Id: Ief8d9eeaa65e8fb40400e64c16768d37ca343893
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104581
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
Reviewed-by: Jan-Marek Glogowski 

diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 9b07b442abdc..42c4ea4e85bc 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -142,7 +142,9 @@ private:
 SfxFrame* ExecuteNewDocument( SfxRequest const & rReq );
 
 static SfxFrame* CreateEmptyDocument( const css::uno::Reference< 
css::frame::XFrame >& i_rFrame );
-static SfxFrame* CreateFromTemplate( const OUString& rTemplatePath, const 
css::uno::Reference< css::frame::XFrame >& i_rFrame );
+static SfxFrame* CreateFromTemplate(const OUString& rTemplatePath,
+const 
css::uno::Reference& i_rFrame,
+const bool bReplaceable);
 
 bool mbEventListenerAdded;
 
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 4ec1e83b190d..35bf5ebfb5ea 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -411,7 +412,8 @@ IMPL_STATIC_LINK( SdModule, EventListenerHdl, 
VclSimpleEvent&, rSimpleEvent, voi
 }
 
 
-SfxFrame* SdModule::CreateFromTemplate( const OUString& rTemplatePath, const 
Reference< XFrame >& i_rFrame )
+SfxFrame* SdModule::CreateFromTemplate(const OUString& rTemplatePath, const 
Reference& i_rFrame,
+   const bool bReplaceable)
 {
 SfxFrame* pFrame = nullptr;
 
@@ -430,6 +432,8 @@ SfxFrame* SdModule::CreateFromTemplate( const OUString& 
rTemplatePath, const Ref
 }
 else if( pDocShell )
 {
+if (pDocShell->GetMedium() && pDocShell->GetMedium()->GetItemSet())
+
pDocShell->GetMedium()->GetItemSet()->Put(SfxBoolItem(SID_REPLACEABLE, 
bReplaceable));
 SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( 
*pDocShell, i_rFrame );
 OSL_ENSURE( pViewFrame, "SdModule::CreateFromTemplate: no view frame - 
was the document really loaded?" );
 pFrame = pViewFrame ? >GetFrame() : nullptr;
@@ -464,7 +468,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest const & 
rReq )
 if( !aStandardTemplate.isEmpty() )
 {
 //load a template document
-pFrame = CreateFromTemplate( aStandardTemplate, xTargetFrame );
+pFrame = CreateFromTemplate(aStandardTemplate, xTargetFrame, 
true);
 }
 else
 {
@@ -485,7 +489,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest const & 
rReq )
 
 //pFrame is loaded with the desired template
 if (!aTemplDlg.getTemplatePath().isEmpty())
-pFrame = CreateFromTemplate(aTemplDlg.getTemplatePath(), 
xTargetFrame);
+pFrame = CreateFromTemplate(aTemplDlg.getTemplatePath(), 
xTargetFrame, false);
 }
 }
 
@@ -506,6 +510,8 @@ SfxFrame* SdModule::CreateEmptyDocument( const Reference< 
XFrame >& i_rFrame )
 pDoc->CreateFirstPages();
 pDoc->StopWorkStartupDelay();
 }
+if (pNewDocSh->GetMedium() && pNewDocSh->GetMedium()->GetItemSet())
+pNewDocSh->GetMedium()->GetItemSet()->Put(SfxBoolItem(SID_REPLACEABLE, 
true));
 
 SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( 
*pNewDocSh, i_rFrame );
 OSL_ENSURE( pViewFrame, "SdModule::CreateEmptyDocument: no view frame - 
was the document really loaded?" );
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index f69706de1b04..bb9c3218da21 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -612,7 +612,8 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const 
Sequence< PropertyValue >& rA
 const bool bIsFactoryURL = sURL.startsWith( "private:factory/" );
 bool bInitNewModel = bIsFactoryURL;
 const bool bIsDefault = bIsFactoryURL && !bExternalModel;
-aDescriptor.put("Replaceable", bIsDefault);
+if (!aDescriptor.has("Replaceable"))
+aDescriptor.put("Replaceable", bIsDefault);
 if 

[Libreoffice-commits] core.git: sd/inc

2020-10-10 Thread Julien Nabet (via logerrit)
 sd/inc/TransitionPreset.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ed964997ccfbb4cc189a0f87fd131034658af86b
Author: Julien Nabet 
AuthorDate: Sat Oct 10 12:13:32 2020 +0200
Commit: Julien Nabet 
CommitDate: Sat Oct 10 13:18:31 2020 +0200

Replace list by vector

Change-Id: I890653de84250e66258bde1baa22e1e2cb5b20ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104139
Reviewed-by: Noel Grandin 
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/sd/inc/TransitionPreset.hxx b/sd/inc/TransitionPreset.hxx
index 9365e051ecfa..0549289e820b 100644
--- a/sd/inc/TransitionPreset.hxx
+++ b/sd/inc/TransitionPreset.hxx
@@ -22,7 +22,7 @@
 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -36,7 +36,7 @@ namespace sd {
 
 class TransitionPreset;
 typedef std::shared_ptr< TransitionPreset > TransitionPresetPtr;
-typedef std::list< TransitionPresetPtr > TransitionPresetList;
+typedef std::vector< TransitionPresetPtr > TransitionPresetList;
 typedef std::unordered_map< OUString, OUString > UStringMap;
 
 class TransitionPreset
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source

2020-10-04 Thread Tomaž Vajngerl (via logerrit)
 sd/inc/Annotation.hxx |   75 +-
 sd/source/core/annotations/Annotation.cxx |   74 -
 2 files changed, 76 insertions(+), 73 deletions(-)

New commits:
commit 73576d93ebec33a97d8a13bfd8d1f374438b414b
Author: Tomaž Vajngerl 
AuthorDate: Sat Oct 3 13:25:20 2020 +0200
Commit: Caolán McNamara 
CommitDate: Sun Oct 4 15:06:58 2020 +0200

sd: move Annotation to the header file

Change-Id: Ibae50a235dcc80af94be37fce2b35c69586ca111
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103893
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx
index cd3c011fe8a5..24eb09989aca 100644
--- a/sd/inc/Annotation.hxx
+++ b/sd/inc/Annotation.hxx
@@ -23,7 +23,15 @@
 #include 
 #include 
 
-class SdPage;
+#include 
+#include 
+#include 
+#include 
+
+#include "drawdoc.hxx"
+#include "sdpage.hxx"
+#include "textapi.hxx"
+
 class SdrUndoAction;
 
 namespace com::sun::star::office {
@@ -53,6 +61,71 @@ void LOKCommentNotify(CommentNotificationType nType, const 
SfxViewShell* pViewSh
 
 void LOKCommentNotifyAll(CommentNotificationType nType,
 css::uno::Reference const & rxAnnotation);
+
+class Annotation : private ::cppu::BaseMutex,
+   public 
::cppu::WeakComponentImplHelper,
+   public ::cppu::PropertySetMixin
+{
+public:
+explicit Annotation( const 
css::uno::Reference& context, SdPage* pPage );
+Annotation(const Annotation&) = delete;
+Annotation& operator=(const Annotation&) = delete;
+
+static sal_uInt32 m_nLastId;
+
+SdPage* GetPage() const { return mpPage; }
+SdrModel* GetModel() { return (mpPage != nullptr) ? 
>getSdrModelFromSdrPage() : nullptr; }
+sal_uInt32 GetId() const { return m_nId; }
+
+// XInterface:
+virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const & type) 
override;
+virtual void SAL_CALL acquire() throw () override { 
::cppu::WeakComponentImplHelper::acquire(); }
+virtual void SAL_CALL release() throw () override { 
::cppu::WeakComponentImplHelper::release(); }
+
+// css::beans::XPropertySet:
+virtual css::uno::Reference SAL_CALL 
getPropertySetInfo() override;
+virtual void SAL_CALL setPropertyValue(const OUString & aPropertyName, 
const css::uno::Any & aValue) override;
+virtual css::uno::Any SAL_CALL getPropertyValue(const OUString & 
PropertyName) override;
+virtual void SAL_CALL addPropertyChangeListener(const OUString & 
aPropertyName, const css::uno::Reference & 
xListener) override;
+virtual void SAL_CALL removePropertyChangeListener(const OUString & 
aPropertyName, const css::uno::Reference & 
aListener) override;
+virtual void SAL_CALL addVetoableChangeListener(const OUString & 
PropertyName, const css::uno::Reference & 
aListener) override;
+virtual void SAL_CALL removeVetoableChangeListener(const OUString & 
PropertyName, const css::uno::Reference & 
aListener) override;
+
+// css::office::XAnnotation:
+virtual css::uno::Any SAL_CALL getAnchor() override;
+virtual css::geometry::RealPoint2D SAL_CALL getPosition() override;
+virtual void SAL_CALL setPosition(const css::geometry::RealPoint2D & 
the_value) override;
+virtual css::geometry::RealSize2D SAL_CALL getSize() override;
+virtual void SAL_CALL setSize(const css::geometry::RealSize2D& _size) 
override;
+virtual OUString SAL_CALL getAuthor() override;
+virtual void SAL_CALL setAuthor(const OUString & the_value) override;
+virtual OUString SAL_CALL getInitials() override;
+virtual void SAL_CALL setInitials(const OUString & the_value) override;
+virtual css::util::DateTime SAL_CALL getDateTime() override;
+virtual void SAL_CALL setDateTime(const css::util::DateTime & the_value) 
override;
+virtual css::uno::Reference SAL_CALL getTextRange() 
override;
+
+void createChangeUndo();
+
+private:
+// destructor is private and will be called indirectly by the release call 
   virtual ~Annotation() {}
+
+// override WeakComponentImplHelperBase::disposing()
+// This function is called upon disposing the component,
+// if your component needs special work when it becomes
+// disposed, do it here.
+virtual void SAL_CALL disposing() override;
+
+sal_uInt32 m_nId;
+SdPage* mpPage;
+css::geometry::RealPoint2D m_Position;
+css::geometry::RealSize2D m_Size;
+OUString m_Author;
+OUString m_Initials;
+css::util::DateTime m_DateTime;
+rtl::Reference m_TextRange;
+};
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/core/annotations/Annotation.cxx 
b/sd/source/core/annotations/Annotation.cxx
index 6a22623c1da5..d1562581c7bd 100644
--- a/sd/source/core/annotations/Annotation.cxx
+++ b/sd/source/core/annotations/Annotation.cxx
@@ -19,16 +19,14 @@
 
 #include 
 
+#include 
+
 #include 
 
-#include 
 #include 
 
 #include 
 #include 

[Libreoffice-commits] core.git: sd/inc

2020-10-04 Thread Tomaž Vajngerl (via logerrit)
 sd/inc/Annotation.hxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 9554ca530a488fcbe922858436d36f324feb1212
Author: Tomaž Vajngerl 
AuthorDate: Sat Oct 3 13:17:29 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Sun Oct 4 08:41:01 2020 +0200

use pragma-once for Annotation.hxx

Change-Id: Id788ce493a4698c27aae1a41693f03acf6eb0c50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103892
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sd/inc/Annotation.hxx b/sd/inc/Annotation.hxx
index ab08c234e0ec..cd3c011fe8a5 100644
--- a/sd/inc/Annotation.hxx
+++ b/sd/inc/Annotation.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SD_INC_ANNOTATION_HXX
-#define INCLUDED_SD_INC_ANNOTATION_HXX
+#pragma once
 
 #include 
 #include 
@@ -56,6 +55,4 @@ void LOKCommentNotifyAll(CommentNotificationType nType,
 css::uno::Reference const & rxAnnotation);
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source

2020-09-01 Thread Andrea Gelmini (via logerrit)
 sd/inc/stlsheet.hxx|4 ++--
 sd/source/core/stlsheet.cxx|   12 ++--
 sd/source/ui/annotations/annotationmanager.cxx |   10 +-
 sd/source/ui/annotations/annotationmanagerimpl.hxx |4 ++--
 4 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 9742be3aff5436d242d78f71e2b6ec416692f337
Author: Andrea Gelmini 
AuthorDate: Mon Aug 31 16:19:22 2020 +0200
Commit: Julien Nabet 
CommitDate: Tue Sep 1 09:48:56 2020 +0200

Fix typo in code

It passed "make check" on Linux

Change-Id: Id5aa544f169a13b52ebd126a71a7e5b8cc9e4ffa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101803
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index 83bce2472c58..42f6a4e4bde4 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -39,7 +39,7 @@
 
 #include "prlayout.hxx"
 
-class ModifyListenerForewarder;
+class ModifyListenerForwarder;
 struct SfxItemPropertySimpleEntry;
 
 typedef cppu::ImplInheritanceHelper< SfxUnoStyleSheet,
@@ -145,7 +145,7 @@ private:
 /** broadcast helper for events */
 ::cppu::OBroadcastHelper mrBHelper;
 
-std::unique_ptr< ModifyListenerForewarder > mpModifyListenerForewarder;
+std::unique_ptr< ModifyListenerForwarder > mpModifyListenerForwarder;
 
 SdStyleSheet( const SdStyleSheet& ) = delete;
 SdStyleSheet& operator=( const SdStyleSheet& ) = delete;
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 4c4703e188aa..616da711d329 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -106,10 +106,10 @@ static SvxItemPropertySet& GetStylePropertySet()
 return aPropSet;
 }
 
-class ModifyListenerForewarder : public SfxListener
+class ModifyListenerForwarder : public SfxListener
 {
 public:
-explicit ModifyListenerForewarder( SdStyleSheet* pStyleSheet );
+explicit ModifyListenerForwarder( SdStyleSheet* pStyleSheet );
 
 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
 
@@ -117,7 +117,7 @@ private:
 SdStyleSheet* mpStyleSheet;
 };
 
-ModifyListenerForewarder::ModifyListenerForewarder( SdStyleSheet* pStyleSheet )
+ModifyListenerForwarder::ModifyListenerForwarder( SdStyleSheet* pStyleSheet )
 : mpStyleSheet( pStyleSheet )
 {
 if( pStyleSheet )
@@ -127,7 +127,7 @@ ModifyListenerForewarder::ModifyListenerForewarder( 
SdStyleSheet* pStyleSheet )
 }
 }
 
-void ModifyListenerForewarder::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& 
/*rHint*/)
+void ModifyListenerForwarder::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& 
/*rHint*/)
 {
 if( mpStyleSheet )
 mpStyleSheet->notifyModifyListener();
@@ -800,8 +800,8 @@ void SAL_CALL SdStyleSheet::addModifyListener( const 
Reference< XModifyListener
 }
 else
 {
-if (!mpModifyListenerForewarder)
-mpModifyListenerForewarder.reset( new ModifyListenerForewarder( 
this ) );
+if (!mpModifyListenerForwarder)
+mpModifyListenerForwarder.reset( new ModifyListenerForwarder( this 
) );
 mrBHelper.addListener( cppu::UnoType::get(), 
xListener );
 }
 }
diff --git a/sd/source/ui/annotations/annotationmanager.cxx 
b/sd/source/ui/annotations/annotationmanager.cxx
index 2f2f668a5f3e..80f6fba904c4 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -746,7 +746,7 @@ void AnnotationManagerImpl::GetAnnotationState(SfxItemSet& 
rSet)
 }
 }
 
-void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward)
+void AnnotationManagerImpl::SelectNextAnnotation(bool bForward)
 {
 ShowAnnotations( true );
 
@@ -758,7 +758,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool 
bForeward)
 
 AnnotationVector aAnnotations( pPage->getAnnotations() );
 
-if( bForeward )
+if( bForward )
 {
 if( xCurrent.is() )
 {
@@ -804,7 +804,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool 
bForeward)
 {
 do
 {
-pPage = GetNextPage( pPage, bForeward );
+pPage = GetNextPage( pPage, bForward );
 
 if( pPage && !pPage->getAnnotations().empty() )
 {
@@ -817,7 +817,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool 
bForeward)
 
 SfxDispatcher* pDispatcher = getDispatcher( mrBase );
 if( pDispatcher )
-pDispatcher->Execute( bForeward ? SID_NEXT_POSTIT : 
SID_PREVIOUS_POSTIT );
+pDispatcher->Execute( bForward ? SID_NEXT_POSTIT : 
SID_PREVIOUS_POSTIT );
 
 return;
 }
@@ -828,7 +828,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool 
bForeward)
 // The question text depends on the search direction.
 bool bImpress = mpDoc->GetDocumentType() == DocumentType::Impress;
 const char* pStringId;
- 

[Libreoffice-commits] core.git: sd/inc sd/source

2020-09-01 Thread Andrea Gelmini (via logerrit)
 sd/inc/sdabstdlg.hxx|2 +-
 sd/source/ui/dlg/inspagob.cxx   |2 +-
 sd/source/ui/dlg/sddlgfact.cxx  |4 ++--
 sd/source/ui/dlg/sddlgfact.hxx  |2 +-
 sd/source/ui/func/fuinsfil.cxx  |2 +-
 sd/source/ui/inc/inspagob.hxx   |2 +-
 sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx |2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 3426cc7a4a19cb5d9ea5ba6b12f1eb5a901d5cfe
Author: Andrea Gelmini 
AuthorDate: Mon Aug 31 15:00:15 2020 +0200
Commit: Julien Nabet 
CommitDate: Tue Sep 1 09:11:21 2020 +0200

Fix typo in code

It passed "make check" on Linux

Change-Id: I89200406a2422173a96caa5fd74b66211cced557
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101784
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index eebe5695748d..820c3666214b 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -114,7 +114,7 @@ protected:
 public:
 virtual std::vector GetList ( const sal_uInt16 nType ) = 0;
 virtual boolIsLink() = 0;
-virtual boolIsRemoveUnnessesaryMasterPages() const = 0;
+virtual boolIsRemoveUnnecessaryMasterPages() const = 0;
 };
 
 class AbstractMorphDlg : public VclAbstractDialog
diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx
index d36adcd5b8ad..5c984dd2329a 100644
--- a/sd/source/ui/dlg/inspagob.cxx
+++ b/sd/source/ui/dlg/inspagob.cxx
@@ -110,7 +110,7 @@ bool SdInsertPagesObjsDlg::IsLink() const
 /**
  *  is link checked
  */
-bool SdInsertPagesObjsDlg::IsRemoveUnnessesaryMasterPages() const
+bool SdInsertPagesObjsDlg::IsRemoveUnnecessaryMasterPages() const
 {
 return m_xCbxMasters->get_active();
 }
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 30b945a82e51..f5ab2524cdb9 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -468,9 +468,9 @@ bool AbstractSdInsertPagesObjsDlg_Impl::IsLink()
 return m_xDlg->IsLink();
 }
 
-bool AbstractSdInsertPagesObjsDlg_Impl::IsRemoveUnnessesaryMasterPages() const
+bool AbstractSdInsertPagesObjsDlg_Impl::IsRemoveUnnecessaryMasterPages() const
 {
-return m_xDlg->IsRemoveUnnessesaryMasterPages();
+return m_xDlg->IsRemoveUnnecessaryMasterPages();
 }
 
 BitmapEx AbstractSdInsertPagesObjsDlg_Impl::createScreenshot() const
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 75071a54f07a..52bcf2efb631 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -274,7 +274,7 @@ public:
 virtual short   Execute() override;
 virtual std::vector GetList ( const sal_uInt16 nType ) override;
 virtual boolIsLink() override;
-virtual boolIsRemoveUnnessesaryMasterPages() const override;
+virtual boolIsRemoveUnnecessaryMasterPages() const override;
 
 // screenshotting
 virtual BitmapEx createScreenshot() const override;
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index acb012fdbf1a..abff3b1c7046 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -388,7 +388,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
 bOK = mpDoc->InsertBookmarkAsObject( aObjectBookmarkList, 
aExchangeList,
 nullptr, nullptr, false );
 
-if( pDlg->IsRemoveUnnessesaryMasterPages() )
+if( pDlg->IsRemoveUnnecessaryMasterPages() )
 mpDoc->RemoveUnnecessaryMasterPages();
 }
 
diff --git a/sd/source/ui/inc/inspagob.hxx b/sd/source/ui/inc/inspagob.hxx
index daad42cf1e63..0c3ffc76009d 100644
--- a/sd/source/ui/inc/inspagob.hxx
+++ b/sd/source/ui/inc/inspagob.hxx
@@ -52,7 +52,7 @@ public:
 std::vector GetList ( const sal_uInt16 nType ) ;
 
 boolIsLink() const;
-boolIsRemoveUnnessesaryMasterPages() const;
+boolIsRemoveUnnecessaryMasterPages() const;
 };
 
 #endif // INCLUDED_SD_SOURCE_UI_INC_INSPAGOB_HXX
diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx 
b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
index 70e53010e163..9eba6427953d 100644
--- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
@@ -206,7 +206,7 @@ void CurrentMasterPagesSelector::ExecuteCommand(const 
OString )
 && mrDocument.GetMasterPageUserCount(pMasterPage) == 0)
 {
 // Removing the precious flag so that the following call to
-// RemoveUnnessesaryMasterPages() will remove this master page.
+// RemoveUnnecessaryMasterPages() will remove this master page.
 pMasterPage->SetPrecious(false);
 mrDocument.RemoveUnnecessaryMasterPages(pMasterPage);
 }

[Libreoffice-commits] core.git: sd/inc sd/source svx/source

2020-08-31 Thread Andrea Gelmini (via logerrit)
 sd/inc/sdpage.hxx |2 +-
 sd/source/core/sdpage2.cxx|4 ++--
 sd/source/ui/animations/CustomAnimationDialog.cxx |2 +-
 sd/source/ui/animations/CustomAnimationDialog.hxx |2 +-
 sd/source/ui/animations/CustomAnimationPane.cxx   |2 +-
 svx/source/engine3d/view3d.cxx|   10 +-
 svx/source/form/ParseContext.cxx  |6 +++---
 7 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 3dfbb9d41cf8fad3b41a9528967febcec6ea433b
Author: Andrea Gelmini 
AuthorDate: Mon Aug 31 10:51:34 2020 +0200
Commit: Julien Nabet 
CommitDate: Mon Aug 31 14:50:49 2020 +0200

Fix typos in code

It passed "make check" on Linux

Change-Id: I9ba795bf188a9fe11d83516d6895888f880747c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101706
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index c29d2c84ebe2..4c4c3b9ca88a 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -245,7 +245,7 @@ public:
 voidsetTransitionFadeColor( sal_Int32 nTransitionFadeColor );
 
 double  getTransitionDuration() const { return mfTransitionDuration;}
-voidsetTransitionDuration( double fTranstionDuration );
+voidsetTransitionDuration( double fTransitionDuration );
 
 virtual void Changed(const SdrObject& rObj, SdrUserCallType eType,
  const ::tools::Rectangle& rOldBoundRect) override;
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index b477b03e1930..2f8f36c2b682 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -520,9 +520,9 @@ void SdPage::setTransitionFadeColor ( sal_Int32 
nTransitionFadeColor )
 ActionChanged();
 }
 
-void SdPage::setTransitionDuration ( double fTranstionDuration )
+void SdPage::setTransitionDuration ( double fTransitionDuration )
 {
-mfTransitionDuration = fTranstionDuration;
+mfTransitionDuration = fTransitionDuration;
 ActionChanged();
 }
 
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx 
b/sd/source/ui/animations/CustomAnimationDialog.cxx
index c9f64e2c8125..ff9f8538b899 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -2032,7 +2032,7 @@ std::unique_ptr 
CustomAnimationDialog::createDefaultSet()
 pSet->setPropertyDefaultValue( nHandleCurrentPage, aEmpty );
 
 pSet->setPropertyDefaultValue( nHandleSoundURL, aEmpty );
-pSet->setPropertyDefaultValue( nHandleSoundVolumne, makeAny( 1.0) );
+pSet->setPropertyDefaultValue( nHandleSoundVolume, makeAny( 1.0) );
 pSet->setPropertyDefaultValue( nHandleSoundEndAfterSlide, makeAny( 
sal_Int32(0) ) );
 
 pSet->setPropertyDefaultValue( nHandleCommand, makeAny( sal_Int16(0) ) );
diff --git a/sd/source/ui/animations/CustomAnimationDialog.hxx 
b/sd/source/ui/animations/CustomAnimationDialog.hxx
index 64272633505d..ea8ebaed3158 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.hxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.hxx
@@ -58,7 +58,7 @@ const sal_Int32 nHandleTextReverse = 26;
 
 const sal_Int32 nHandleCurrentPage = 27;
 const sal_Int32 nHandleSoundURL = 28;
-const sal_Int32 nHandleSoundVolumne = 29;
+const sal_Int32 nHandleSoundVolume = 29;
 const sal_Int32 nHandleSoundEndAfterSlide = 30;
 
 const sal_Int32 nHandleCommand = 31;
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index 5e80435051bd..f7bfc28fca55 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1140,7 +1140,7 @@ std::unique_ptr 
CustomAnimationPane::createSelectionSet()
 if( pEffect->getAudio().is() )
 {
 aSoundSource = pEffect->getAudio()->getSource();
-addValue( pSet, nHandleSoundVolumne, makeAny( 
pEffect->getAudio()->getVolume() ) );
+addValue( pSet, nHandleSoundVolume, makeAny( 
pEffect->getAudio()->getVolume() ) );
 // todo addValue( pSet, nHandleSoundEndAfterSlide, makeAny( 
pEffect->getAudio()->getEndAfterSlide() ) );
 // this is now stored at the XCommand parameter sequence
 }
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 2a03587f1fe2..f572b92d1c0e 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -1573,26 +1573,26 @@ void E3dView::CheckPossibilities()
 return;
 
 const size_t nMarkCnt = GetMarkedObjectCount();
-bool bCoumpound = false;
+bool bCompound = false;
 bool b3DObject = false;
-for(size_t nObjs = 0; (nObjs < nMarkCnt) && !bCoumpound; ++nObjs)
+for(size_t nObjs = 0; (nObjs < nMarkCnt) && !bCompound; ++nObjs)
 {
 SdrObject *pObj = GetMarkedObjectByIndex(nObjs);
 if(dynamic_cast< const E3dCompoundObject* >(pObj))
-   

[Libreoffice-commits] core.git: sd/inc sd/source

2020-08-29 Thread Andrea Gelmini (via logerrit)
 sd/inc/Outliner.hxx|2 +-
 sd/source/ui/view/Outliner.cxx |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 233b75581456efe2ec93c57678f05ef663f28118
Author: Andrea Gelmini 
AuthorDate: Fri Aug 28 12:03:43 2020 +0200
Commit: Noel Grandin 
CommitDate: Sat Aug 29 11:25:53 2020 +0200

Fix typo in code

It passed "make check" on Linux

Change-Id: I173e4887af5cbe3c660412d8463a5a82ee2c5724
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101591
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 5a65f3aab4be..d49140a6ea3f 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -414,7 +414,7 @@ private:
 beginning/end of the document and continue with the search/spell
 check.
 */
-bool ShowWrapArroundDialog();
+bool ShowWrapAroundDialog();
 
 /** Put text of current text object into outliner so that the text can
 be searched/spell checked.
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 8ac435249f7a..98fd0bdc87b2 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1347,7 +1347,7 @@ void SdOutliner::EndOfSearch()
 }
 // Ask the user whether to wrap around and continue the search or
 // to terminate.
-else if (meMode==TEXT_CONVERSION || ShowWrapArroundDialog ())
+else if (meMode==TEXT_CONVERSION || ShowWrapAroundDialog ())
 {
 mbMatchMayExist = false;
 // Everything back to beginning (or end?) of the document.
@@ -1402,7 +1402,7 @@ void SdOutliner::ShowEndOfSearchDialog()
 xInfoBox->run();
 }
 
-bool SdOutliner::ShowWrapArroundDialog()
+bool SdOutliner::ShowWrapAroundDialog()
 {
 // Determine whether to show the dialog.
 if (mpSearchItem)
@@ -1691,7 +1691,7 @@ bool SdOutliner::HandleFailedSearch()
 {
 // No further matches found.  Ask the user whether to wrap
 // around and start again.
-bContinueSearch = ShowWrapArroundDialog();
+bContinueSearch = ShowWrapAroundDialog();
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source

2020-08-17 Thread Tomaž Vajngerl (via logerrit)
 sd/inc/VectorGraphicSearchContext.hxx |   35 
 sd/source/ui/inc/View.hxx |6 +++
 sd/source/ui/view/Outliner.cxx|   59 ++
 3 files changed, 66 insertions(+), 34 deletions(-)

New commits:
commit 74e2f2178fd8a0ad29c5dbcefb22a9778a75ae82
Author: Tomaž Vajngerl 
AuthorDate: Sun Aug 16 12:06:30 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Mon Aug 17 16:49:39 2020 +0200

move vector graphic search to View, so it works in multiple views

VectorGraphicSearch was instantiated for the Outline, which is
the same for every view. The problem with this is that when we
have multiple views, the search would interfere with each other,
which is especially distracting in online when multiple users
connect to the same document and try searching.
This adds VectorGraphicSearchContext class, that is added to the
View, which makes the search view dependent and multiple instances
of VectorGraphicSearch are created, each one for its own view.

Change-Id: Ia0f34647b30b35f4ddb84d33353990d635756905
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100837
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sd/inc/VectorGraphicSearchContext.hxx 
b/sd/inc/VectorGraphicSearchContext.hxx
new file mode 100644
index ..e6f978ca273c
--- /dev/null
+++ b/sd/inc/VectorGraphicSearchContext.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include 
+
+namespace sd
+{
+struct VectorGraphicSearchContext
+{
+bool mbCurrentIsVectorGraphic;
+std::unique_ptr mpVectorGraphicSearch;
+
+VectorGraphicSearchContext()
+: mbCurrentIsVectorGraphic(false)
+{
+}
+
+void reset()
+{
+mbCurrentIsVectorGraphic = false;
+mpVectorGraphicSearch.reset();
+}
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index 5aba1fb326d9..d7da6fc2df12 100644
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "smarttag.hxx"
 
@@ -217,6 +218,8 @@ public:
 void SetAuthor(const OUString& rAuthor) { m_sAuthor = rAuthor; }
 const OUString& GetAuthor() const { return m_sAuthor; }
 
+VectorGraphicSearchContext& getVectorGraphicSearchContext() { return 
aVectorGraphicSearchContext; }
+
 protected:
 DECL_LINK( OnParagraphInsertedHdl, ::Outliner::ParagraphHdlParam, void );
 DECL_LINK( OnParagraphRemovingHdl, ::Outliner::ParagraphHdlParam, void );
@@ -250,6 +253,9 @@ protected:
 private:
 ::std::unique_ptr mpClipboard;
 OutlinerMasterViewFilter maMasterViewFilter;
+
+VectorGraphicSearchContext aVectorGraphicSearchContext;
+
 OUString m_sAuthor;
 };
 
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index b6fc569b9b61..8ac435249f7a 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -21,7 +21,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -61,6 +60,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -99,11 +99,6 @@ public:
 */
 void ReleaseOutlinerView();
 
-/** Search in vector graphic
- */
-bool mbCurrentIsVectorGraphic;
-std::unique_ptr mpVectorGraphicSearch;
-
 private:
 /** Flag that specifies whether we own the outline view pointed to by
 mpOutlineView and thus have to
@@ -729,9 +724,10 @@ void 
SdOutliner::sendLOKSearchResultCallback(std::shared_ptr & pV
  std::vector* 
pSelections)
 {
 std::vector<::tools::Rectangle> aLogicRects;
-if (mpImpl->mbCurrentIsVectorGraphic)
+auto& rVectorGraphicSearchContext = 
pViewShell->GetView()->getVectorGraphicSearchContext();
+if (rVectorGraphicSearchContext.mbCurrentIsVectorGraphic)
 {
-basegfx::B2DRectangle aSelectionHMM = 
getPDFSelection(mpImpl->mpVectorGraphicSearch, mpObj);
+basegfx::B2DRectangle aSelectionHMM = 
getPDFSelection(rVectorGraphicSearchContext.mpVectorGraphicSearch, mpObj);
 
 tools::Rectangle aSelection(Point(aSelectionHMM.getMinX(), 
aSelectionHMM.getMinY()),
 Size(aSelectionHMM.getWidth(), 
aSelectionHMM.getHeight()));
@@ -787,7 +783,7 @@ void 
SdOutliner::sendLOKSearchResultCallback(std::shared_ptr & pV
 aPayload = aStream.str().c_str();
 
rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_RESULT_SELECTION, 
aPayload.getStr());

[Libreoffice-commits] core.git: sd/inc sd/source

2020-07-19 Thread Noel Grandin (via logerrit)
 sd/inc/drawdoc.hxx|   16 +---
 sd/source/filter/eppt/epptooxml.hxx   |6 ++
 sd/source/filter/eppt/pptx-animations.hxx |5 +
 sd/source/ui/unoidl/sddetect.hxx  |   14 +-
 sd/source/ui/unoidl/unomodule.hxx |   15 +--
 5 files changed, 6 insertions(+), 50 deletions(-)

New commits:
commit 39aa0d149eb71fabe9307d0aa466624f855d6daf
Author: Noel Grandin 
AuthorDate: Sun Jul 19 18:46:26 2020 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 19 19:54:00 2020 +0200

compact namespace: sd

Change-Id: I3189239e100f2bf6bef55bb787c850dd2ca5c8fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99004
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 9bcce338fa0e..12d905f732db 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -35,21 +35,7 @@
 namespace com::sun::star::xml::dom { class XNode; }
 namespace com::sun::star::uno { class XInterface; }
 namespace vcl { class Font; }
-
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace presentation
-{
-class XPresentation2;
-}
-}
-}
-}
-
+namespace com::sun::star::presentation { class XPresentation2; }
 class SdOutliner;
 class Timer;
 class SfxObjectShell;
diff --git a/sd/source/filter/eppt/epptooxml.hxx 
b/sd/source/filter/eppt/epptooxml.hxx
index d4f2b618f25d..56b70a0d9d58 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -27,9 +27,7 @@
 
 using ::sax_fastparser::FSHelperPtr;
 
-namespace oox {
-
-namespace core {
+namespace oox::core {
 
 struct LayoutInfo
 {
@@ -155,7 +153,7 @@ private:
 };
 
 }
-}
+
 
 #endif
 
diff --git a/sd/source/filter/eppt/pptx-animations.hxx 
b/sd/source/filter/eppt/pptx-animations.hxx
index 67aeb4fda7e1..7f9cb6f1ca8a 100644
--- a/sd/source/filter/eppt/pptx-animations.hxx
+++ b/sd/source/filter/eppt/pptx-animations.hxx
@@ -16,15 +16,12 @@
 
 #include "epptooxml.hxx"
 
-namespace oox
-{
-namespace core
+namespace oox::core
 {
 void WriteAnimations(const ::sax_fastparser::FSHelperPtr& pFS,
  const css::uno::Reference& 
rXDrawPage,
  PowerPointExport& rExport);
 }
-}
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/unoidl/sddetect.hxx b/sd/source/ui/unoidl/sddetect.hxx
index 612dfd2d0659..7b9da4383334 100644
--- a/sd/source/ui/unoidl/sddetect.hxx
+++ b/sd/source/ui/unoidl/sddetect.hxx
@@ -27,19 +27,7 @@
 #include 
 
 
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace beans
-{
-struct PropertyValue;
-}
-}
-}
-}
+namespace com::sun::star::beans { struct PropertyValue; }
 
 class SdFilterDetect : public ::cppu::WeakImplHelper< 
css::document::XExtendedFilterDetection, css::lang::XServiceInfo >
 {
diff --git a/sd/source/ui/unoidl/unomodule.hxx 
b/sd/source/ui/unoidl/unomodule.hxx
index e68d54c802c5..8f1c1f85a3be 100644
--- a/sd/source/ui/unoidl/unomodule.hxx
+++ b/sd/source/ui/unoidl/unomodule.hxx
@@ -28,20 +28,7 @@
 
 #include 
 
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace beans
-{
-struct PropertyValue;
-}
-}
-}
-}
-
+namespace com::sun::star::beans { struct PropertyValue; }
 namespace com::sun::star::frame { struct DispatchDescriptor; }
 
 class SdUnoModule : public ::cppu::WeakImplHelper< 
css::frame::XDispatchProvider, css::frame::XNotifyingDispatch, 
css::lang::XServiceInfo >
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source

2020-07-01 Thread Stephan Bergmann (via logerrit)
 sd/inc/strmname.h  |8 +-
 sd/source/core/sdpage.cxx  |4 -
 sd/source/filter/eppt/pptx-epptbase.cxx|2 
 sd/source/filter/eppt/pptx-epptooxml.cxx   |2 
 sd/source/filter/html/htmlex.cxx   |   12 +--
 sd/source/filter/xml/sdtransform.cxx   |6 -
 sd/source/ui/animations/motionpathtag.cxx  |2 
 sd/source/ui/annotations/annotationtag.cxx |2 
 sd/source/ui/controller/displaymodecontroller.cxx  |4 -
 sd/source/ui/controller/slidelayoutcontroller.cxx  |8 +-
 sd/source/ui/dlg/gluectrl.cxx  |2 
 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx  |   10 +--
 sd/source/ui/framework/factories/BasicPaneFactory.cxx  |4 -
 sd/source/ui/framework/factories/PresentationFactory.cxx   |2 
 sd/source/ui/framework/module/ModuleController.cxx |4 -
 sd/source/ui/framework/module/SlideSorterModule.cxx|4 -
 sd/source/ui/framework/module/ToolBarModule.cxx|8 +-
 sd/source/ui/framework/module/ViewTabBarModule.cxx |6 -
 sd/source/ui/func/fuoltext.cxx |2 
 sd/source/ui/func/fusearch.cxx |2 
 sd/source/ui/func/futext.cxx   |2 
 sd/source/ui/inc/OutlineView.hxx   |2 
 sd/source/ui/inc/ViewShell.hxx |8 +-
 sd/source/ui/presenter/PresenterTextView.cxx   |   18 ++---
 sd/source/ui/remotecontrol/BluetoothServiceRecord.hxx  |2 
 sd/source/ui/sidebar/LayoutMenu.cxx|6 -
 sd/source/ui/sidebar/MasterPagesSelector.cxx   |2 
 sd/source/ui/sidebar/PreviewValueSet.cxx   |4 -
 sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx   |2 
 sd/source/ui/sidebar/SlideBackground.hxx   |2 
 sd/source/ui/slideshow/showwin.cxx |4 -
 sd/source/ui/slideshow/slideshowimpl.cxx   |   10 +--
 sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx  |2 
 sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx|4 -
 sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx   |   32 
+-
 sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx  |2 
 sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx |6 -
 sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx |2 
 sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx|8 +-
 sd/source/ui/slidesorter/view/SlsTheme.cxx |4 -
 sd/source/ui/table/TableDesignPane.cxx |   16 ++---
 sd/source/ui/tools/EventMultiplexer.cxx|6 -
 sd/source/ui/unoidl/DrawController.cxx |2 
 sd/source/ui/unoidl/UnoDocumentSettings.cxx|2 
 sd/source/ui/unoidl/unoobj.cxx |   30 -
 sd/source/ui/unoidl/unopage.cxx|2 
 sd/source/ui/view/viewoverlaymanager.cxx   |6 -
 47 files changed, 140 insertions(+), 140 deletions(-)

New commits:
commit 72fcc08ea042f660dba802f20714a7fe8e86e1a8
Author: Stephan Bergmann 
AuthorDate: Wed Jul 1 21:26:45 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jul 1 23:44:43 2020 +0200

Upcoming improved loplugin:staticanonymous -> redundantstatic: sd

Change-Id: I4a7a3771890e3b7f782954a1bdce9e55db99739c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97656
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sd/inc/strmname.h b/sd/inc/strmname.h
index 724bd3987fa3..5af7cdd1fd36 100644
--- a/sd/inc/strmname.h
+++ b/sd/inc/strmname.h
@@ -23,12 +23,12 @@
 #include 
 
 // PowerPoint-Filter
-static const OUString pFilterPowerPoint97( "MS PowerPoint 97" );
-static const OUString pFilterPowerPoint97Template( "MS PowerPoint 97 Vorlage" 
);
-static const OUString pFilterPowerPoint97AutoPlay( "MS PowerPoint 97 AutoPlay" 
);
+const OUString pFilterPowerPoint97( "MS PowerPoint 97" );
+const OUString pFilterPowerPoint97Template( "MS PowerPoint 97 Vorlage" );
+const OUString pFilterPowerPoint97AutoPlay( "MS PowerPoint 97 AutoPlay" );
 
 // XML content stream
-static const OUString pStarDrawXMLContent( "content.xml" );
+const OUString pStarDrawXMLContent( "content.xml" );
 
 #endif // INCLUDED_SD_INC_STRMNAME_H
 
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 39b59ca30ed6..899912028ea2 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -888,11 +888,11 @@ void 

[Libreoffice-commits] core.git: sd/inc

2020-06-04 Thread Srijan Bhatia (via logerrit)
 sd/inc/strings.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4949050c43300eee047531d856bd4a25e60980c3
Author: Srijan Bhatia 
AuthorDate: Sat May 30 21:17:14 2020 +0530
Commit: Heiko Tietze 
CommitDate: Thu Jun 4 11:59:07 2020 +0200

tdf#132137 Rename Default Style to Default Drawing Style in Draw and 
Impress.

Change-Id: I130bd0e070a3449753cc76a8f7e6352c8b7a1bba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95403
Tested-by: Heiko Tietze 
Reviewed-by: Heiko Tietze 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 54c6d81362a6..0e093d1da84b 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -318,7 +318,7 @@
 #define STR_PRESOBJ_TABLE   
NC_("STR_PRESOBJ_TABLE", "Double-click to add a Spreadsheet" )
 #define STR_LAYOUT_DEFAULT_NAME 
NC_("STR_LAYOUT_DEFAULT_NAME", "Default" )
 #define STR_LAYOUT_DEFAULT_TITLE_NAME   
NC_("STR_LAYOUT_DEFAULT_TITLE_NAME", "Title" )
-#define STR_STANDARD_STYLESHEET_NAME
NC_("STR_STANDARD_STYLESHEET_NAME", "Default" )
+#define STR_STANDARD_STYLESHEET_NAME
NC_("STR_STANDARD_STYLESHEET_NAME", "Default Drawing Style" )
 #define STR_UNDO_MOVEPAGES  
NC_("STR_UNDO_MOVEPAGES", "Move slides" )
 #define STR_INSERT_PAGES
NC_("STR_INSERT_PAGES", "Insert Pages" )
 #define STR_INSERT_PAGE_DRAW
NC_("STR_INSERT_PAGE_DRAW", "Insert Page" )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source

2020-06-02 Thread Tomaž Vajngerl (via logerrit)
 sd/inc/Outliner.hxx|7 ---
 sd/source/ui/view/Outliner.cxx |   20 +---
 2 files changed, 13 insertions(+), 14 deletions(-)

New commits:
commit 14b55b3a8de070935489acd4f6f8be7b6a3d96a4
Author: Tomaž Vajngerl 
AuthorDate: Wed May 27 14:13:02 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Tue Jun 2 09:20:05 2020 +0200

sd: move IsValidTextObject into source as anon. function

IsValidTextObject is only used internally in Outline, so put it
inside the source file as an anonymous function and not as a
member function of Outliner.

Change-Id: I867dc4f465a694e61b6102b19f8e54ce623e2858
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95307
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 79c54c032a03..5a65f3aab4be 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -416,13 +416,6 @@ private:
 */
 bool ShowWrapArroundDialog();
 
-/** Check whether the object pointed to by the iterator is a valid text
-object.
-@param aPosition
-The object for which to test whether it is a valid text object.
-*/
-static bool IsValidTextObject(const ::sd::outliner::IteratorPosition& 
rPosition);
-
 /** Put text of current text object into outliner so that the text can
 be searched/spell checked.
 */
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 0aebe2838e4c..7ce6cab0b0a7 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1013,6 +1013,18 @@ void SdOutliner::RestoreStartPosition()
 }
 }
 
+namespace
+{
+
+bool lclIsValidTextObject(const sd::outliner::IteratorPosition& rPosition)
+{
+auto* pObject = dynamic_cast< SdrTextObj* >( rPosition.mxObject.get() );
+return (pObject != nullptr) && pObject->HasText() && ! 
pObject->IsEmptyPresObj();
+}
+
+} // end anonymous namespace
+
+
 /** The main purpose of this method is to iterate over all shape objects of
 the search area (current selection, current view, or whole document)
 until a text object has been found that contains at least one match or
@@ -1058,7 +1070,7 @@ void SdOutliner::ProvideNextTextObject()
 bool bForbiddenPage = comphelper::LibreOfficeKit::isActive() && 
(maCurrentPosition.mePageKind != PageKind::Standard || 
maCurrentPosition.meEditMode != EditMode::Page);
 
 // Switch to the current object only if it is a valid text object.
-if (!bForbiddenPage && IsValidTextObject(maCurrentPosition))
+if (!bForbiddenPage && lclIsValidTextObject(maCurrentPosition))
 {
 // Don't set yet in case of searching: the text object may not 
match.
 if (meMode != SEARCH)
@@ -1226,12 +1238,6 @@ bool SdOutliner::ShowWrapArroundDialog()
 return (nBoxResult == RET_YES);
 }
 
-bool SdOutliner::IsValidTextObject (const sd::outliner::IteratorPosition& 
rPosition)
-{
-SdrTextObj* pObject = dynamic_cast< SdrTextObj* >( 
rPosition.mxObject.get() );
-return (pObject != nullptr) && pObject->HasText() && ! 
pObject->IsEmptyPresObj();
-}
-
 void SdOutliner::PutTextIntoOutliner()
 {
 mpSearchSpellTextObj = dynamic_cast( mpObj );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source

2020-05-23 Thread Tomaž Vajngerl (via logerrit)
 sd/inc/Outliner.hxx|7 ++-
 sd/source/ui/view/Outliner.cxx |   11 ---
 2 files changed, 6 insertions(+), 12 deletions(-)

New commits:
commit beacca27ecc1b1463477c644e36a7e5815053433
Author: Tomaž Vajngerl 
AuthorDate: Sat May 23 16:52:09 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Sat May 23 19:15:21 2020 +0200

sd: move SearchSelection constructor to header file

Change-Id: I71d7986044208b6c733c1d46db7bf84bc6254915
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94727
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index c95786577b62..3a73b9339f09 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -46,13 +46,18 @@ struct SearchSelection
 {
 /// 0-based index of the page that has the selection.
 int m_nPage;
+
 /**
  * List of selection rectangles in twips -- multiple rectangles only in
  * case the selection spans over more layout lines.
  */
 OString m_aRectangles;
 
-SearchSelection(int nPage, const OString& rRectangles);
+SearchSelection(int nPage, const OString& rRectangles)
+: m_nPage(nPage)
+, m_aRectangles(rRectangles)
+{
+}
 
 bool operator==(const SearchSelection& rOther) const
 {
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index e67d823e9a11..e7f676f43e4e 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -66,17 +66,6 @@ using namespace ::com::sun::star::linguistic2;
 
 class SfxStyleSheetPool;
 
-namespace sd {
-
-SearchSelection::SearchSelection(int nPage, const OString& rRectangles)
-: m_nPage(nPage),
-m_aRectangles(rRectangles)
-{
-}
-
-} // end of namespace sd
-
-
 class SdOutliner::Implementation
 {
 public:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/Library_sd.mk sd/source sd/uiconfig solenv/clang-format solenv/sanitizers

2020-04-06 Thread Caolán McNamara (via logerrit)
 sd/Library_sd.mk|1 
 sd/inc/strings.hrc  |1 
 sd/source/ui/animations/CategoryListBox.cxx |   93 -
 sd/source/ui/animations/CategoryListBox.hxx |   45 
 sd/source/ui/animations/CustomAnimationDialog.cxx   |9 
 sd/source/ui/animations/CustomAnimationDialog.hxx   |8 
 sd/source/ui/animations/CustomAnimationList.cxx | 1116 
 sd/source/ui/animations/CustomAnimationList.hxx |   92 +
 sd/source/ui/animations/CustomAnimationPane.cxx |  622 +--
 sd/source/ui/animations/CustomAnimationPane.hxx |   67 -
 sd/uiconfig/simpress/ui/customanimationfragment.ui  |6 
 sd/uiconfig/simpress/ui/customanimationspanel.ui|  212 ++-
 sd/uiconfig/simpress/ui/customanimationtimingtab.ui |   14 
 sd/uiconfig/simpress/ui/effectmenu.ui   |   10 
 sd/uiconfig/simpress/ui/slidetransitionspanel.ui|   38 
 solenv/clang-format/blacklist   |2 
 solenv/sanitizers/ui/modules/simpress.suppr |1 
 17 files changed, 1097 insertions(+), 1240 deletions(-)

New commits:
commit 21e8ce9ab9a522d25e95773af59b7aee4e54
Author: Caolán McNamara 
AuthorDate: Tue Mar 24 11:44:16 2020 +
Commit: Caolán McNamara 
CommitDate: Mon Apr 6 21:24:40 2020 +0200

weld custom animation panel

and align animation panel and slide transitions panel padding/spacing

Change-Id: I25a1d10894de635ebb9c8a1cba358940886125c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91006
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index 048a0c4f1edc..43b168be8d8c 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -183,7 +183,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/accessibility/AccessibleSlideSorterView \
sd/source/ui/accessibility/AccessibleViewForwarder \
sd/source/ui/accessibility/SdShapeTypes \
-   sd/source/ui/animations/CategoryListBox \
sd/source/ui/animations/CustomAnimationDialog \
sd/source/ui/animations/CustomAnimationList \
sd/source/ui/animations/CustomAnimationPane \
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 26ec246e19b3..84cfea801a70 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -444,7 +444,6 @@
 #define STR_CUSTOMANIMATION_BROWSE_SOUND
NC_("STR_CUSTOMANIMATION_BROWSE_SOUND", "Other sound...")
 #define STR_CUSTOMANIMATION_SAMPLE  
NC_("STR_CUSTOMANIMATION_SAMPLE", "Sample")
 #define STR_CUSTOMANIMATION_TRIGGER 
NC_("STR_CUSTOMANIMATION_TRIGGER", "Trigger")
-#define STR_CUSTOMANIMATION_LIST_HELPTEXT   
NC_("STR_CUSTOMANIMATION_LIST_HELPTEXT", "First select the slide element and 
then click 'Add...' to add an animation effect.")
 #define STR_CUSTOMANIMATION_USERPATH
NC_("STR_CUSTOMANIMATION_USERPATH", "User paths")
 #define STR_CUSTOMANIMATION_ENTRANCE
NC_("STR_CUSTOMANIMATION_ENTRANCE", "Entrance: %1")
 #define STR_CUSTOMANIMATION_EMPHASIS
NC_("STR_CUSTOMANIMATION_EMPHASIS", "Emphasis: %1")
diff --git a/sd/source/ui/animations/CategoryListBox.cxx 
b/sd/source/ui/animations/CategoryListBox.cxx
deleted file mode 100644
index 054cb84acdcd..
--- a/sd/source/ui/animations/CategoryListBox.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "CategoryListBox.hxx"
-#include 
-
-#include 
-
-namespace sd {
-
-CategoryListBox::CategoryListBox( vcl::Window* pParent )
-: ListBox( pParent, WB_TABSTOP | WB_BORDER )
-{
-EnableUserDraw( true );
-SetDoubleClickHdl( LINK( this, CategoryListBox, implDoubleClickHdl ) );
-}
-
-VCL_BUILDER_FACTORY(CategoryListBox)
-
-CategoryListBox::~CategoryListBox()
-{
-}
-
-void  CategoryListBox::InsertCategory( const OUString& rStr )
-{
-sal_Int32  n = ListBox::InsertEntry( rStr );
-if( n != LISTBOX_ENTRY_NOTFOUND )
-ListBox::SetEntryFlags( n, ListBox::GetEntryFlags(n) | 

[Libreoffice-commits] core.git: sd/inc sd/source

2020-04-03 Thread Noel Grandin (via logerrit)
 sd/inc/pres.hxx   |   41 -
 sd/source/core/anminfo.cxx|4 
 sd/source/core/sdpage.cxx |  383 +++---
 sd/source/core/sdpage2.cxx|6 
 sd/source/core/undo/undoobjects.cxx   |   12 
 sd/source/filter/html/htmlex.cxx  |   20 
 sd/source/filter/ppt/pptin.cxx|   86 +--
 sd/source/filter/xml/sdxmlwrp.cxx |4 
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |2 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx |4 
 sd/source/ui/dlg/headerfooterdlg.cxx  |   14 
 sd/source/ui/dlg/masterlayoutdlg.cxx  |   24 
 sd/source/ui/func/fuexpand.cxx|   10 
 sd/source/ui/func/fuinsert.cxx|4 
 sd/source/ui/func/fuinsfil.cxx|2 
 sd/source/ui/func/fusumry.cxx |6 
 sd/source/ui/func/futext.cxx  |   10 
 sd/source/ui/inc/DrawViewShell.hxx|2 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx|4 
 sd/source/ui/table/tablefunction.cxx  |4 
 sd/source/ui/unoidl/unoobj.cxx|2 
 sd/source/ui/unoidl/unopage.cxx   |   85 +--
 sd/source/ui/view/DocumentRenderer.cxx|2 
 sd/source/ui/view/drawview.cxx|   26 
 sd/source/ui/view/drviews1.cxx|2 
 sd/source/ui/view/drviews2.cxx|8 
 sd/source/ui/view/drviews7.cxx|6 
 sd/source/ui/view/drviewse.cxx|4 
 sd/source/ui/view/outlnvsh.cxx|   10 
 sd/source/ui/view/outlview.cxx|   20 
 sd/source/ui/view/sdview.cxx  |   34 -
 sd/source/ui/view/sdview2.cxx |2 
 sd/source/ui/view/sdview4.cxx |6 
 sd/source/ui/view/sdview5.cxx |   14 
 34 files changed, 433 insertions(+), 430 deletions(-)

New commits:
commit 10055ff899ed8f9c205155cd15c6de81cba37471
Author: Noel Grandin 
AuthorDate: Thu Apr 2 21:04:59 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 3 10:19:24 2020 +0200

convert PresObjKind to scoped enum

Change-Id: I30761f15f46f91435e80296c4f685bc691bb6304
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91600
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/pres.hxx b/sd/inc/pres.hxx
index d5b29c3cb04d..6019283af66b 100644
--- a/sd/inc/pres.hxx
+++ b/sd/inc/pres.hxx
@@ -19,28 +19,27 @@
 #ifndef INCLUDED_SD_INC_PRES_HXX
 #define INCLUDED_SD_INC_PRES_HXX
 
-enum PresObjKind
+enum class PresObjKind
 {
-PRESOBJ_NONE = 0,
-PRESOBJ_TITLE,
-PRESOBJ_OUTLINE,
-PRESOBJ_TEXT,
-PRESOBJ_GRAPHIC,
-PRESOBJ_OBJECT,
-PRESOBJ_CHART,
-PRESOBJ_ORGCHART,
-PRESOBJ_TABLE,
-PRESOBJ_PAGE,
-PRESOBJ_HANDOUT,
-PRESOBJ_NOTES,
-PRESOBJ_HEADER,
-PRESOBJ_FOOTER,
-PRESOBJ_DATETIME,
-PRESOBJ_SLIDENUMBER,
-PRESOBJ_CALC,
-PRESOBJ_MEDIA,
-
-PRESOBJ_MAX
+NONE = 0,
+Title,
+Outline,
+Text,
+Graphic,
+Object,
+Chart,
+OrgChart,
+Table,
+Page,
+Handout,
+Notes,
+Header,
+Footer,
+DateTime,
+SlideNumber,
+Calc,
+Media,
+LAST = Media
 };
 
 enum class PageKind
diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx
index d54a318d67d4..5abc0accf39e 100644
--- a/sd/source/core/anminfo.cxx
+++ b/sd/source/core/anminfo.cxx
@@ -28,7 +28,7 @@ using namespace ::com::sun::star;
 
 SdAnimationInfo::SdAnimationInfo(SdrObject& rObject)
: SdrObjUserData(SdrInventor::StarDrawUserData, 
SD_ANIMATIONINFO_ID),
- mePresObjKind  (PRESOBJ_NONE),
+ mePresObjKind  (PresObjKind::NONE),
  meEffect   
(presentation::AnimationEffect_NONE),
  meTextEffect   
(presentation::AnimationEffect_NONE),
  meSpeed
(presentation::AnimationSpeed_SLOW),
@@ -52,7 +52,7 @@ SdAnimationInfo::SdAnimationInfo(SdrObject& rObject)
 
 SdAnimationInfo::SdAnimationInfo(const SdAnimationInfo& rAnmInfo, SdrObject& 
rObject)
: SdrObjUserData (rAnmInfo),
- mePresObjKind   (PRESOBJ_NONE),
+ mePresObjKind   (PresObjKind::NONE),
  meEffect   (rAnmInfo.meEffect),
  meTextEffect   (rAnmInfo.meTextEffect),
  meSpeed

[Libreoffice-commits] core.git: sd/inc sd/source

2020-04-01 Thread Noel Grandin (via logerrit)
 sd/inc/drawdoc.hxx |6 +++---
 sd/source/core/drawdoc.cxx |8 
 sd/source/filter/xml/sdxmlwrp.cxx  |2 +-
 sd/source/ui/docshell/docshel4.cxx |4 ++--
 sd/source/ui/view/sdview3.cxx  |2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 8d43860bbdee020080503ed838d92e634ee9092e
Author: Noel Grandin 
AuthorDate: Wed Apr 1 09:51:26 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Apr 1 12:54:16 2020 +0200

convert DocCreationMode to scoped enum

Change-Id: I42fd704601fe81462f17b3968911fd79c13b50ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91473
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index ab7c46c8614b..28ea7a6107f0 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -99,10 +99,10 @@ struct StyleReplaceData
 OUStringaNewName;
 };
 
-enum DocCreationMode
+enum class DocCreationMode
 {
-NEW_DOC,
-DOC_LOADED
+New,
+Loaded
 };
 
 namespace sd
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index c793ef34df74..02c7b5667d8a 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -618,7 +618,7 @@ SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const
 
 lcl_copyUserDefinedProperties(GetDocSh(), pNewDocSh);
 
-pNewModel->NewOrLoadCompleted( DOC_LOADED );  // loaded from source 
document
+pNewModel->NewOrLoadCompleted( DocCreationMode::Loaded );  // loaded 
from source document
 }
 else if( mbAllocDocSh )
 {
@@ -683,7 +683,7 @@ void SdDrawDocument::NbcSetChanged(bool bFlag)
 // it won't load any more.
 void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
 {
-if (eMode == NEW_DOC)
+if (eMode == DocCreationMode::New)
 {
 // New document:
 // create slideshow and default templates,
@@ -693,7 +693,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode 
eMode)
 
 static_cast< SdStyleSheetPool* >( mxStyleSheetPool.get() 
)->CreatePseudosIfNecessary();
 }
-else if (eMode == DOC_LOADED)
+else if (eMode == DocCreationMode::Loaded)
 {
 // Document has finished loading
 
@@ -770,7 +770,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode 
eMode)
 
mpInternalOutliner->SetStyleSheetPool(static_cast(GetStyleSheetPool()));
 }
 
-if ( eMode == DOC_LOADED )
+if ( eMode == DocCreationMode::Loaded )
 {
 // Make presentation objects listeners of the appropriate styles
 SdStyleSheetPool* pSPool = static_cast( 
GetStyleSheetPool() );
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx 
b/sd/source/filter/xml/sdxmlwrp.cxx
index 5dcbc27c4fe3..c866a5ab6680 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -472,7 +472,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
 SdDrawDocument* pDoc = mrDocShell.GetDoc();
 bool const bWasUndo(pDoc->IsUndoEnabled());
 pDoc->EnableUndo(false);
-pDoc->NewOrLoadCompleted( NEW_DOC );
+pDoc->NewOrLoadCompleted( DocCreationMode::New );
 pDoc->CreateFirstPages();
 pDoc->StopWorkStartupDelay();
 
diff --git a/sd/source/ui/docshell/docshel4.cxx 
b/sd/source/ui/docshell/docshel4.cxx
index 93c1fd4df139..9e90dd020282 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -247,7 +247,7 @@ bool DrawDocShell::InitNew( const css::uno::Reference< 
css::embed::XStorage >& x
 if (bRet)
 {
 if( !mbSdDataObj )
-mpDoc->NewOrLoadCompleted(NEW_DOC);  // otherwise calling
+mpDoc->NewOrLoadCompleted(DocCreationMode::New);  // otherwise 
calling
 // 
NewOrLoadCompleted(NEW_LOADED) in
 // SdDrawDocument::AllocModel()
 }
@@ -350,7 +350,7 @@ bool DrawDocShell::LoadFrom( SfxMedium& rMedium )
 if( mpViewShell )
 pWait.reset(new weld::WaitObject(mpViewShell->GetFrameWeld()));
 
-mpDoc->NewOrLoadCompleted( NEW_DOC );
+mpDoc->NewOrLoadCompleted( DocCreationMode::New );
 mpDoc->CreateFirstPages();
 mpDoc->StopWorkStartupDelay();
 
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index c74845cc836d..ba876ab75c25 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -1524,7 +1524,7 @@ bool View::InsertData( const TransferableDataHelper& 
rDataHelper,
 bool View::PasteRTFTable( const ::tools::SvRef& xStm, 
SdrPage* pPage, SdrInsertFlags nPasteOptions )
 {
 std::unique_ptr pModel(new SdDrawDocument( 
DocumentType::Impress, mpDocSh ));
-pModel->NewOrLoadCompleted(NEW_DOC);
+pModel->NewOrLoadCompleted(DocCreationMode::New);
 pModel->GetItemPool().SetDefaultMetric(MapUnit::Map100thMM);
 pModel->InsertPage(pModel->AllocPage(false));
 
___

[Libreoffice-commits] core.git: sd/inc sd/source

2020-04-01 Thread Noel Grandin (via logerrit)
 sd/inc/sdenumdef.hxx   |3 ++-
 sd/source/ui/dlg/dlgsnap.cxx   |6 +++---
 sd/source/ui/func/fusnapln.cxx |6 +++---
 3 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit e73688139b1d861a19bddbf5c2fd82de97d0c741
Author: Noel Grandin 
AuthorDate: Wed Apr 1 09:27:39 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Apr 1 11:33:51 2020 +0200

convert SnapKind to scoped enum

Change-Id: I56a17f582b66212933077a7de62b3dbe7d3c3af5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91465
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/sdenumdef.hxx b/sd/inc/sdenumdef.hxx
index cb9f9a8def34..d042c7671f12 100644
--- a/sd/inc/sdenumdef.hxx
+++ b/sd/inc/sdenumdef.hxx
@@ -21,7 +21,8 @@
 #define INCLUDED_SD_INC_SDENUMDEF_HXX
 
 #define RET_SNAP_DELETE 111
-enum SnapKind { SK_HORIZONTAL, SK_VERTICAL, SK_POINT };
+
+enum class SnapKind { Horizontal, Vertical, Point };
 
 #endif
 
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index c07fa83552e4..9657608c23bb 100644
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -119,9 +119,9 @@ void SdSnapLineDlg::GetAttr(SfxItemSet& rOutAttrs)
 {
 SnapKind eKind;
 
-if (m_xRbHorz->get_active())  eKind = SK_HORIZONTAL;
-else if (m_xRbVert->get_active()) eKind = SK_VERTICAL;
-else  eKind = SK_POINT;
+if (m_xRbHorz->get_active())  eKind = SnapKind::Horizontal;
+else if (m_xRbVert->get_active()) eKind = SnapKind::Vertical;
+else  eKind = SnapKind::Point;
 
 nXValue = sal_Int32(GetCoreValue(*m_xMtrFldX, MapUnit::Map100thMM) * 
aUIScale);
 nYValue = sal_Int32(GetCoreValue(*m_xMtrFldY, MapUnit::Map100thMM) * 
aUIScale);
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index bbad6ce82ef7..dbf08f4fbe01 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -172,9 +172,9 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
 switch ( static_cast(static_cast(
  pArgs->Get(ATTR_SNAPLINE_KIND)).GetValue()) )
 {
-case SK_HORIZONTAL  : eKind = SdrHelpLineKind::Horizontal;   break;
-case SK_VERTICAL: eKind = SdrHelpLineKind::Vertical; break;
-default : eKind = SdrHelpLineKind::Point;break;
+case SnapKind::Horizontal  : eKind = SdrHelpLineKind::Horizontal;  
 break;
+case SnapKind::Vertical: eKind = SdrHelpLineKind::Vertical;
 break;
+default: eKind = SdrHelpLineKind::Point;   
 break;
 }
 pPV->InsertHelpLine(SdrHelpLine(eKind, aHlpPos));
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source

2020-04-01 Thread Noel Grandin (via logerrit)
 sd/inc/sdmod.hxx  |6 +++---
 sd/source/ui/app/sdmod.cxx|2 +-
 sd/source/ui/dlg/morphdlg.cxx |4 ++--
 sd/source/ui/dlg/vectdlg.cxx  |4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit f370aa88faf3c0ef7138b87d2bcf89f5eb8541c1
Author: Noel Grandin 
AuthorDate: Wed Apr 1 09:24:58 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Apr 1 11:11:44 2020 +0200

convert SdOptionStreamMode to scoped enum

Change-Id: Ib9784c5364e52dde03c0ba2a91cc8fab9d286029
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91464
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index f37b79771f3e..7b12253c07d8 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -49,10 +49,10 @@ namespace com { namespace sun { namespace star { namespace 
frame {
 class XFrame;
 } } } }
 
-enum SdOptionStreamMode
+enum class SdOptionStreamMode
 {
-SD_OPTION_LOAD = 0,
-SD_OPTION_STORE = 1
+Load = 0,
+Store = 1
 };
 
 typedef std::map< SfxItemPropertyMapEntry const * , 
css::uno::Reference > SdExtPropertySetInfoCache;
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 077ab4b259bd..27fea87ae28b 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -193,7 +193,7 @@ tools::SvRef SdModule::GetOptionStream( 
const OUString& rOptio
 
 aStmName += rOptionName;
 
-if( SD_OPTION_STORE == eMode || xOptionStorage->IsContained( aStmName 
) )
+if( SdOptionStreamMode::Store == eMode || xOptionStorage->IsContained( 
aStmName ) )
 xStm = xOptionStorage->OpenSotStream( aStmName );
 }
 
diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx
index b359b802fb19..c0d7f4e5af20 100644
--- a/sd/source/ui/dlg/morphdlg.cxx
+++ b/sd/source/ui/dlg/morphdlg.cxx
@@ -66,7 +66,7 @@ MorphDlg::~MorphDlg()
 void MorphDlg::LoadSettings()
 {
 tools::SvRef  xIStm( SD_MOD()->GetOptionStream( 
SD_OPTION_MORPHING ,
-   SD_OPTION_LOAD ) );
+   SdOptionStreamMode::Load ) );
 sal_uInt16  nSteps;
 boolbOrient, bAttrib;
 
@@ -90,7 +90,7 @@ void MorphDlg::LoadSettings()
 void MorphDlg::SaveSettings() const
 {
 tools::SvRef xOStm( SD_MOD()->GetOptionStream( 
SD_OPTION_MORPHING ,
-   SD_OPTION_STORE ) );
+   SdOptionStreamMode::Store ) );
 
 if( xOStm.is() )
 {
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index 6bc0f8dffa7b..843d593f5e28 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -292,7 +292,7 @@ void SdVectorizeDlg::LoadSettings()
 {
 tools::SvRef  xIStm( SD_MOD()->GetOptionStream(
SD_OPTION_VECTORIZE ,
-   SD_OPTION_LOAD ) );
+   SdOptionStreamMode::Load ) );
 sal_uInt16  nLayers;
 sal_uInt16  nReduce;
 sal_uInt16  nFillHoles;
@@ -323,7 +323,7 @@ void SdVectorizeDlg::SaveSettings() const
 {
 tools::SvRef xOStm( SD_MOD()->GetOptionStream(
   SD_OPTION_VECTORIZE  ,
-  SD_OPTION_STORE ) );
+  SdOptionStreamMode::Store ) );
 
 if( xOStm.is() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source

2020-04-01 Thread Noel Grandin (via logerrit)
 sd/inc/sdxmlwrp.hxx|8 
 sd/source/filter/xml/sdxmlwrp.cxx  |6 +++---
 sd/source/ui/docshell/docshel4.cxx |   12 ++--
 3 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 8fb5ee2a1399383dbfe3baec8c8716788c1fa0e8
Author: Noel Grandin 
AuthorDate: Wed Apr 1 09:21:10 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Apr 1 10:28:58 2020 +0200

convert SdXMLFilterMode to scoped enum

Change-Id: I5e5e533c076f3108fed776d00c7ec649e202d9df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91463
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/sdxmlwrp.hxx b/sd/inc/sdxmlwrp.hxx
index 84d3862b0c03..0c42447be28f 100644
--- a/sd/inc/sdxmlwrp.hxx
+++ b/sd/inc/sdxmlwrp.hxx
@@ -26,10 +26,10 @@
 class ErrCode;
 
 // SdXMLFilter
-enum SdXMLFilterMode
+enum class SdXMLFilterMode
 {
-SDXMLMODE_Normal,   ///< standard load and save of the complete document
-SDXMLMODE_Organizer ///< only for import, only the styles are loaded
+Normal,   ///< standard load and save of the complete document
+Organizer ///< only for import, only the styles are loaded
 };
 
 class SdXMLFilter final : public SdFilter
@@ -38,7 +38,7 @@ public:
 SdXMLFilter(
 SfxMedium& rMedium,
 ::sd::DrawDocShell& rDocShell,
-SdXMLFilterMode eFilterMode = SDXMLMODE_Normal,
+SdXMLFilterMode eFilterMode = SdXMLFilterMode::Normal,
 sal_uLong nStoreVer = SOFFICE_FILEFORMAT_8 );
 virtual ~SdXMLFilter() override;
 
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx 
b/sd/source/filter/xml/sdxmlwrp.cxx
index 34bdf10d30bf..5dcbc27c4fe3 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -598,7 +598,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
 xInfoSet->setPropertyValue( "StreamRelPath", Any( aName ) );
 }
 
-if (SDXMLMODE_Organizer == meFilterMode)
+if (SdXMLFilterMode::Organizer == meFilterMode)
 xInfoSet->setPropertyValue("OrganizerMode", uno::makeAny(true));
 
 if( ERRCODE_NONE == nRet )
@@ -630,7 +630,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
 pServices->mpMeta,
 aEmptyArgs, aName, false );
 
-if( meFilterMode != SDXMLMODE_Organizer )
+if( meFilterMode != SdXMLFilterMode::Organizer )
 {
 nWarn2 = ReadThroughComponent(
 xStorage, xModelComp, "settings.xml", nullptr, rxContext,
@@ -643,7 +643,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
 pServices->mpStyles,
 aFilterArgs, aName, true );
 
-if( !nRet && (meFilterMode != SDXMLMODE_Organizer) )
+if( !nRet && (meFilterMode != SdXMLFilterMode::Organizer) )
 nRet = ReadThroughComponent(
xStorage, xModelComp, "content.xml", "Content.xml", rxContext,
pServices->mpContent,
diff --git a/sd/source/ui/docshell/docshel4.cxx 
b/sd/source/ui/docshell/docshel4.cxx
index b2a7bc8cc18c..93c1fd4df139 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -292,7 +292,7 @@ bool DrawDocShell::Load( SfxMedium& rMedium )
 {
 comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = 
getEmbeddedObjectContainer();
 rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false);
-bRet = SdXMLFilter( rMedium, *this, SDXMLMODE_Normal, 
SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError );
+bRet = SdXMLFilter( rMedium, *this, SdXMLFilterMode::Normal, 
SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError );
 }
 
 if( bRet )
@@ -356,7 +356,7 @@ bool DrawDocShell::LoadFrom( SfxMedium& rMedium )
 
 // TODO/LATER: nobody is interested in the error code?!
 ErrCode nError = ERRCODE_NONE;
-bool bRet = SdXMLFilter( rMedium, *this, SDXMLMODE_Organizer, 
SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError );
+bool bRet = SdXMLFilter( rMedium, *this, SdXMLFilterMode::Organizer, 
SotStorage::GetVersion( rMedium.GetStorage() ) ).Import( nError );
 
 // tell SFX to change viewshell when in preview mode
 if( IsPreview() )
@@ -470,7 +470,7 @@ bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
 mpDoc->CreateFirstPages();
 mpDoc->StopWorkStartupDelay();
 ErrCode nError = ERRCODE_NONE;
-bRet = SdXMLFilter( rMedium, *this, SDXMLMODE_Normal, 
SOFFICE_FILEFORMAT_60 ).Import( nError );
+bRet = SdXMLFilter( rMedium, *this, SdXMLFilterMode::Normal, 
SOFFICE_FILEFORMAT_60 ).Import( nError );
 }
 else if (aFilterName == "CGM - Computer Graphics Metafile")
 {
@@ -528,7 +528,7 @@ bool DrawDocShell::Save()
 bool bRet = SfxObjectShell::Save();
 
 if( bRet )
-bRet = SdXMLFilter( *GetMedium(), *this, SDXMLMODE_Normal, 
SotStorage::GetVersion( GetMedium()->GetStorage() ) ).Export();
+bRet = SdXMLFilter( *GetMedium(), *this, SdXMLFilterMode::Normal, 

[Libreoffice-commits] core.git: sd/inc sd/qa sd/source

2020-04-01 Thread Noel Grandin (via logerrit)
 sd/inc/prlayout.hxx|   30 
 sd/qa/unit/dialogs-test.cxx|2 -
 sd/source/core/stlsheet.cxx|4 +--
 sd/source/ui/dlg/prltempl.cxx  |   50 -
 sd/source/ui/func/fuprobjs.cxx |4 +--
 sd/source/ui/func/futempl.cxx  |   32 +-
 sd/source/ui/view/drtxtob1.cxx |2 -
 7 files changed, 62 insertions(+), 62 deletions(-)

New commits:
commit 4de3d96458006b8312446397b423bc3dc5d50294
Author: Noel Grandin 
AuthorDate: Wed Apr 1 09:16:28 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Apr 1 10:27:43 2020 +0200

convert PresentationObjects to scoped enum

Change-Id: I65c030d33b0c3ed6350e98e9a8a63414c905f88c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91462
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/prlayout.hxx b/sd/inc/prlayout.hxx
index fcd83737dd86..54c62dda96dc 100644
--- a/sd/inc/prlayout.hxx
+++ b/sd/inc/prlayout.hxx
@@ -26,22 +26,22 @@
 #ifndef INCLUDED_SD_INC_PRLAYOUT_HXX
 #define INCLUDED_SD_INC_PRLAYOUT_HXX
 
-enum PresentationObjects
+enum class PresentationObjects
 {
-PO_TITLE,
-PO_BACKGROUND,
-PO_BACKGROUNDOBJECTS,
-PO_OUTLINE_1,
-PO_OUTLINE_2,
-PO_OUTLINE_3,
-PO_OUTLINE_4,
-PO_OUTLINE_5,
-PO_OUTLINE_6,
-PO_OUTLINE_7,
-PO_OUTLINE_8,
-PO_OUTLINE_9,
-PO_NOTES,
-PO_SUBTITLE
+Title,
+Background,
+BackgroundObjects,
+Outline_1,
+Outline_2,
+Outline_3,
+Outline_4,
+Outline_5,
+Outline_6,
+Outline_7,
+Outline_8,
+Outline_9,
+Notes,
+Subtitle
 };
 
 #endif // INCLUDED_SD_INC_PRLAYOUT_HXX
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index a3f39a69650b..396e4f9980e6 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -461,7 +461,7 @@ VclPtr 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 pWin ? pWin->GetFrameWeld() : nullptr,
 false,
 *pStyleSheet,
-PO_TITLE,
+PresentationObjects::Title,
 pStyleSheetPool);
 break;
 }
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index ab8e01cfd629..c19b87e67645 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -1316,12 +1316,12 @@ void 
SdStyleSheet::BroadcastSdStyleSheetChange(SfxStyleSheetBase const * pStyleS
 SdStyleSheet* pRealSheet = static_cast(pStyleSheet)->GetRealStyleSheet();
 pRealSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
 
-if( !((ePO >= PO_OUTLINE_1) && (ePO <= PO_OUTLINE_8)) )
+if( !((ePO >= PresentationObjects::Outline_1) && (ePO <= 
PresentationObjects::Outline_8)) )
 return;
 
 OUString sStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " ");
 
-for( sal_uInt16 n = static_cast(ePO - PO_OUTLINE_1 + 2); n < 
10; n++ )
+for( sal_uInt16 n = static_cast(ePO) - 
static_cast(PresentationObjects::Outline_1) + 2; n < 10; n++ )
 {
 OUString aName( sStyleName + OUString::number(n) );
 
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index 3e6fb20f3d93..55dada4755d3 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -37,7 +37,7 @@
 #include 
 #include 
 
-#define IS_OUTLINE(x) (x >= PO_OUTLINE_1 && x <= PO_OUTLINE_9)
+#define IS_OUTLINE(x) (x >= PresentationObjects::Outline_1 && x <= 
PresentationObjects::Outline_9)
 
 /**
  * Constructor of Tab dialog: appends pages to the dialog
@@ -171,36 +171,36 @@ 
SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg(SfxObjectShell const * pDocSh,
 
 switch( ePO )
 {
-case PO_TITLE:
+case PresentationObjects::Title:
 aTitle = SdResId(STR_PSEUDOSHEET_TITLE);
 break;
 
-case PO_SUBTITLE:
+case PresentationObjects::Subtitle:
 aTitle = SdResId(STR_PSEUDOSHEET_SUBTITLE);
 break;
 
-case PO_BACKGROUND:
+case PresentationObjects::Background:
 aTitle = SdResId(STR_PSEUDOSHEET_BACKGROUND);
 break;
 
-case PO_BACKGROUNDOBJECTS:
+case PresentationObjects::BackgroundObjects:
 aTitle = SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS);
 break;
 
-case PO_OUTLINE_1:
-case PO_OUTLINE_2:
-case PO_OUTLINE_3:
-case PO_OUTLINE_4:
-case PO_OUTLINE_5:
-case PO_OUTLINE_6:
-case PO_OUTLINE_7:
-case PO_OUTLINE_8:
-case PO_OUTLINE_9:
+case PresentationObjects::Outline_1:
+case PresentationObjects::Outline_2:
+case PresentationObjects::Outline_3:
+case PresentationObjects::Outline_4:
+case PresentationObjects::Outline_5:
+case PresentationObjects::Outline_6:
+case PresentationObjects::Outline_7:
+case PresentationObjects::Outline_8:
+case PresentationObjects::Outline_9:
 

[Libreoffice-commits] core.git: sd/inc sd/sdi sd/source

2020-04-01 Thread Noel Grandin (via logerrit)
 sd/inc/diadef.h |   12 +---
 sd/sdi/SlideSorterController.sdi|6 +++---
 sd/sdi/sdgslots.sdi |6 +++---
 sd/sdi/sdslots.sdi  |6 +++---
 sd/source/core/EffectMigration.cxx  |6 +++---
 sd/source/core/sdpage.cxx   |2 +-
 sd/source/filter/html/htmlex.cxx|2 +-
 sd/source/filter/ppt/pptin.cxx  |6 +++---
 sd/source/ui/animations/SlideTransitionPane.cxx |   10 +-
 9 files changed, 27 insertions(+), 29 deletions(-)

New commits:
commit eed94d15a49ad2038a59a3a1bfaa4a66a27ed540
Author: Noel Grandin 
AuthorDate: Wed Apr 1 08:55:15 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Apr 1 09:37:34 2020 +0200

convert PresChange to scoped enum

Change-Id: I8184e436ae9c0fd2cb78a94b3146ab1903453f72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91459
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/diadef.h b/sd/inc/diadef.h
index 0da1bd899d35..e09cab69649d 100644
--- a/sd/inc/diadef.h
+++ b/sd/inc/diadef.h
@@ -20,16 +20,14 @@
 #ifndef INCLUDED_SD_INC_DIADEF_H
 #define INCLUDED_SD_INC_DIADEF_H
 
-enum PresChange
+enum class PresChange
 {
-PRESCHANGE_MANUAL = 0,
-PRESCHANGE_AUTO = 1,
-PRESCHANGE_SEMIAUTO = 2
+Manual = 0,
+Auto = 1,
+SemiAuto = 2,
+LAST = SemiAuto
 };
 
-// has to be adjusted
-#define PRESCHANGE_COUNT 3
-
 #endif // INCLUDED_SD_INC_DIADEF_H
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/sdi/SlideSorterController.sdi b/sd/sdi/SlideSorterController.sdi
index e9d1ae77d7b2..8b4f08c63e1f 100644
--- a/sd/sdi/SlideSorterController.sdi
+++ b/sd/sdi/SlideSorterController.sdi
@@ -52,9 +52,9 @@ enum FadeSpeed
 
 enum PresChange
 {
-PRESCHANGE_MANUAL ,
-PRESCHANGE_AUTO ,
-PRESCHANGE_SEMIAUTO
+PresChange::Manual ,
+PresChange::Auto ,
+PresChange::SemiAuto
 } ;
 
  // Items
diff --git a/sd/sdi/sdgslots.sdi b/sd/sdi/sdgslots.sdi
index f6731011037d..e7c94ab322cd 100644
--- a/sd/sdi/sdgslots.sdi
+++ b/sd/sdi/sdgslots.sdi
@@ -62,9 +62,9 @@ module StarDraw
 
 enum PresChange
 {
-PRESCHANGE_MANUAL,
-PRESCHANGE_AUTO,
-PRESCHANGE_SEMIAUTO
+PresChange::Manual,
+PresChange::Auto,
+PresChange::SemiAuto
 };
 
 // Items
diff --git a/sd/sdi/sdslots.sdi b/sd/sdi/sdslots.sdi
index 204cbfcafa2f..751c09901fa8 100644
--- a/sd/sdi/sdslots.sdi
+++ b/sd/sdi/sdslots.sdi
@@ -63,9 +63,9 @@ module StarDraw
 
 enum PresChange
 {
-PRESCHANGE_MANUAL,
-PRESCHANGE_AUTO,
-PRESCHANGE_SEMIAUTO
+PresChange::Manual,
+PresChange::Auto,
+PresChange::SemiAuto
 };
 
 // Items
diff --git a/sd/source/core/EffectMigration.cxx 
b/sd/source/core/EffectMigration.cxx
index 8a62c180d82f..7ca5fcee2c92 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -509,7 +509,7 @@ void EffectMigration::SetAnimationEffect( SvxShape* pShape, 
AnimationEffect eEff
 CustomAnimationEffectPtr pEffect = 
std::make_shared( xNode );
 pEffect->setTarget( makeAny( xShape ) );
 SdPage* pPage = dynamic_cast< SdPage* >( 
pObj->getSdrPageFromSdrObject() );
-const bool bManual = (pPage == nullptr) || 
(pPage->GetPresChange() == PRESCHANGE_MANUAL);
+const bool bManual = (pPage == nullptr) || 
(pPage->GetPresChange() == PresChange::Manual);
 if( !bManual )
 pEffect->setNodeType( EffectNodeType::AFTER_PREVIOUS );
 
@@ -668,7 +668,7 @@ void EffectMigration::SetTextAnimationEffect( SvxShape* 
pShape, AnimationEffect
 pMainSequence->append( pShapeEffect );
 
 SdPage* pPage = dynamic_cast< SdPage* >( 
pObj->getSdrPageFromSdrObject() );
-if( pPage && pPage->GetPresChange() != PRESCHANGE_MANUAL )
+if( pPage && pPage->GetPresChange() != PresChange::Manual )
 pShapeEffect->setNodeType( 
EffectNodeType::AFTER_PREVIOUS );
 }
 }
@@ -677,7 +677,7 @@ void EffectMigration::SetTextAnimationEffect( SvxShape* 
pShape, AnimationEffect
 if( pShapeEffect.get() )
 {
 SdPage* pPage = dynamic_cast< SdPage* >( 
pObj->getSdrPageFromSdrObject() );
-const bool bManual = (pPage == nullptr) || (pPage->GetPresChange() 
== PRESCHANGE_MANUAL);
+const bool bManual = (pPage == nullptr) || (pPage->GetPresChange() 
== PresChange::Manual);
 
 // now create effects for each paragraph
 pGroup =
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index fc2fcdafe155..7b50a3a9b0f9 100644
--- a/sd/source/core/sdpage.cxx
+++ 

[Libreoffice-commits] core.git: sd/inc sd/source

2020-03-12 Thread Noel Grandin (via logerrit)
 sd/inc/CustomAnimationEffect.hxx|2 
 sd/inc/CustomAnimationPreset.hxx|2 
 sd/inc/Outliner.hxx |4 
 sd/inc/OutlinerIterator.hxx |2 
 sd/inc/animations.hxx   |2 
 sd/inc/anminfo.hxx  |4 
 sd/inc/drawdoc.hxx  |2 
 sd/inc/sdfilter.hxx |2 
 sd/inc/sdiocmpt.hxx |2 
 sd/inc/sdpage.hxx   |2 
 sd/inc/sdxmlwrp.hxx |4 
 sd/inc/undo/undoobjects.hxx |2 
 sd/source/core/CustomAnimationEffect.cxx|2 
 sd/source/core/EffectMigration.cxx  |4 
 sd/source/core/annotations/Annotation.cxx   |4 
 sd/source/core/stlpool.cxx  |2 
 sd/source/core/stlsheet.cxx |4 
 sd/source/filter/eppt/eppt.hxx  |   10 -
 sd/source/filter/eppt/epptbase.hxx  |   10 -
 sd/source/filter/eppt/pptexsoundcollection.hxx  |2 
 sd/source/filter/eppt/pptx-epptooxml.cxx|2 
 sd/source/filter/html/htmlex.hxx|2 
 sd/source/filter/ppt/pptatom.hxx|2 
 sd/source/ui/animations/CustomAnimationDialog.cxx   |   16 +--
 sd/source/ui/animations/CustomAnimationDialog.hxx   |2 
 sd/source/ui/animations/CustomAnimationList.cxx |8 -
 sd/source/ui/animations/SlideTransitionPane.cxx |2 
 sd/source/ui/animations/motionpathtag.cxx   |8 -
 sd/source/ui/annotations/annotationtag.hxx  |4 
 sd/source/ui/annotations/annotationwindow.hxx   |2 
 sd/source/ui/controller/displaymodecontroller.cxx   |2 
 sd/source/ui/controller/slidelayoutcontroller.cxx   |2 
 sd/source/ui/dlg/TemplateScanner.cxx|4 
 sd/source/ui/dlg/headerfooterdlg.cxx|6 -
 sd/source/ui/framework/factories/ChildWindowPane.hxx|2 
 sd/source/ui/framework/tools/FrameworkHelper.cxx|6 -
 sd/source/ui/inc/AccessibleDrawDocumentView.hxx |2 
 sd/source/ui/inc/AccessibleSlideSorterObject.hxx|2 
 sd/source/ui/inc/AccessibleViewForwarder.hxx|2 
 sd/source/ui/inc/Client.hxx |2 
 sd/source/ui/inc/DrawDocShell.hxx   |4 
 sd/source/ui/inc/EventMultiplexer.hxx   |2 
 sd/source/ui/inc/MasterPageObserver.hxx |2 
 sd/source/ui/inc/OutlineView.hxx|2 
 sd/source/ui/inc/RemoteServer.hxx   |4 
 sd/source/ui/inc/SlideTransitionPane.hxx|2 
 sd/source/ui/inc/TemplateScanner.hxx|4 
 sd/source/ui/inc/ViewShellHint.hxx  |2 
 sd/source/ui/inc/copydlg.hxx|4 
 sd/source/ui/inc/dlgsnap.hxx|2 
 sd/source/ui/inc/framework/Configuration.hxx|2 
 sd/source/ui/inc/fuinsert.hxx   |2 
 sd/source/ui/inc/inspagob.hxx   |2 
 sd/source/ui/inc/prltempl.hxx   |2 
 sd/source/ui/inc/sdxfer.hxx |2 
 sd/source/ui/inc/slideshow.hxx  |2 
 sd/source/ui/inc/smarttag.hxx   |2 
 sd/source/ui/inc/tabtempl.hxx   |   18 +--
 sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx  |2 
 sd/source/ui/inc/undolayer.hxx  |   26 ++---
 sd/source/ui/inc/undopage.hxx   |   52 
+-
 sd/source/ui/inc/unmodpg.hxx|2 
 sd/source/ui/inc/unoaprms.hxx   |2 
 sd/source/ui/inc/unosrch.hxx|2 
 sd/source/ui/inc/vectdlg.hxx|4 
 sd/source/ui/remotecontrol/BufferedStreamSocket.hxx |2 
 sd/source/ui/remotecontrol/Server.cxx   |4 
 sd/source/ui/remotecontrol/ZeroconfService.hxx  |2 
 

[Libreoffice-commits] core.git: sd/inc sd/qa sd/source solenv/clang-format

2020-03-07 Thread Muhammet Kara (via logerrit)
 sd/inc/Outliner.hxx  |   48 ++-
 sd/inc/SdShapeTypes.hxx  |4 +-
 sd/qa/unit/HtmlExportTest.cxx|6 ++--
 sd/source/core/typemap.cxx   |3 --
 sd/source/filter/html/buttonset.hxx  |4 +-
 sd/source/filter/xml/sdtransform.hxx |2 -
 sd/source/ui/inc/MutexOwner.hxx  |4 +-
 sd/source/ui/inc/dlg_char.hxx|4 +-
 sd/source/ui/inc/paragr.hxx  |2 -
 sd/source/ui/inc/unokywds.hxx|5 ++-
 solenv/clang-format/blacklist|   10 ---
 11 files changed, 43 insertions(+), 49 deletions(-)

New commits:
commit be22ca7cc69ba905c86e05f0413c05ca0bd42556
Author: Muhammet Kara 
AuthorDate: Sat Mar 7 12:21:32 2020 +0300
Commit: Muhammet Kara 
CommitDate: Sat Mar 7 11:33:42 2020 +0100

clang-format sd with under 5-percent lines of change

Files which could become clang-format conformant with
under 5-percent lines of change relative to the total
count of lines in the file are found by using bin/find-clang-format.py,
and fixed with /opt/lo/bin/clang-format -i 

There will be follow-up patches to fix all 'under-5-percent' files.

Change-Id: I08c01d7069b041964614c233d452d70f332228f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90145
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 27ec4d80127d..11d79a2a1199 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -30,12 +30,13 @@ class SdrObject;
 class SdrTextObj;
 class SdDrawDocument;
 
-namespace weld {
+namespace weld
+{
 class Window;
 }
 
-namespace sd {
-
+namespace sd
+{
 class View;
 class ViewShell;
 class Window;
@@ -61,7 +62,6 @@ struct SearchSelection
 
 } // end of namespace sd
 
-
 /** The main purpose of this class is searching and replacing as well as
 spelling of impress documents.  The main part of both tasks lies in
 iterating over the pages and view modes of a document and apply the
@@ -114,8 +114,7 @@ struct SearchSelection
 queried.  This is only sufficient for searching the outline view.
 
 */
-class SdOutliner
-: public SdrOutliner
+class SdOutliner : public SdrOutliner
 {
 public:
 friend class ::sd::outliner::OutlinerContainer;
@@ -131,7 +130,7 @@ public:
 OutlinerMode::OutlineView are defined in
 editeng/outliner.hxx.
 */
-SdOutliner( SdDrawDocument* pDoc, OutlinerMode nMode );
+SdOutliner(SdDrawDocument* pDoc, OutlinerMode nMode);
 virtual ~SdOutliner() override;
 /// Forbid copy construction and copy assignment
 SdOutliner(const Outliner&) = delete;
@@ -156,7 +155,7 @@ public:
 indicated by user input to the search dialog).  A  
value
 indicates that another call to this method is required.
 */
-bool StartSearchAndReplace (const SvxSearchItem* pSearchItem);
+bool StartSearchAndReplace(const SvxSearchItem* pSearchItem);
 
 /** Iterate over the sentences in all text shapes and stop at the
 next sentence with spelling errors. While doing so the view
@@ -174,8 +173,8 @@ public:
 
 /** Starts the text conversion (hangul/hanja or Chinese 
simplified/traditional)
 for the current viewshell */
-void StartConversion( LanguageType nSourceLanguage,  LanguageType 
nTargetLanguage,
-const vcl::Font *pTargetFont, sal_Int32 nOptions, bool 
bIsInteractive );
+void StartConversion(LanguageType nSourceLanguage, LanguageType 
nTargetLanguage,
+ const vcl::Font* pTargetFont, sal_Int32 nOptions, 
bool bIsInteractive);
 
 /** This is called internally when text conversion is started.
 The position of current view mode/page/object/caret position
@@ -186,9 +185,9 @@ public:
 /** Release all resources that have been created during the conversion */
 void EndConversion();
 
-int GetIgnoreCurrentPageChangesLevel() const { return 
mnIgnoreCurrentPageChangesLevel; };
-voidIncreIgnoreCurrentPageChangesLevel() { 
mnIgnoreCurrentPageChangesLevel++; };
-voidDecreIgnoreCurrentPageChangesLevel() { 
mnIgnoreCurrentPageChangesLevel--; };
+int GetIgnoreCurrentPageChangesLevel() const { return 
mnIgnoreCurrentPageChangesLevel; };
+void IncreIgnoreCurrentPageChangesLevel() { 
mnIgnoreCurrentPageChangesLevel++; };
+void DecreIgnoreCurrentPageChangesLevel() { 
mnIgnoreCurrentPageChangesLevel--; };
 SdDrawDocument* GetDoc() const { return mpDrawDocument; }
 
 private:
@@ -197,7 +196,12 @@ private:
 
 /// Specifies whether to search and replace, to spell check or to do a
 /// text conversion.
-enum mode {SEARCH, SPELL, TEXT_CONVERSION} meMode;
+enum mode
+{
+SEARCH,
+SPELL,
+TEXT_CONVERSION
+} meMode;
 
 /// The view which displays the searched objects.
 ::sd::View* mpView;
@@ -207,7 +211,7 @@ private:
 */
 

[Libreoffice-commits] core.git: sd/inc sd/source

2020-03-01 Thread Muhammet Kara (via logerrit)
 sd/inc/strings.hrc   |1 +
 sd/source/ui/func/futext.cxx |3 +++
 2 files changed, 4 insertions(+)

New commits:
commit 5f2cf0cc76316d27c0841fda027b350b83032531
Author: Muhammet Kara 
AuthorDate: Mon Feb 24 17:03:12 2020 +0300
Commit: Muhammet Kara 
CommitDate: Sun Mar 1 17:27:36 2020 +0100

lok: Set default text for new text box on mobile

Change-Id: I0b6056e9dbf5fb81d092092cc183b05120b95d70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89352
Reviewed-by: Jan Holesovsky 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89710
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index e4a1ed418524..26ec246e19b3 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -309,6 +309,7 @@
 #define STR_PRESOBJ_TITLE_MOBILE
NC_("STR_PRESOBJ_TITLE_MOBILE", "Double-tap to add Title" )
 #define STR_PRESOBJ_OUTLINE_MOBILE  
NC_("STR_PRESOBJ_OUTLINE_MOBILE", "Double-tap to add Text" )
 #define STR_PRESOBJ_TEXT_MOBILE 
NC_("STR_PRESOBJ_TEXT_MOBILE", "Double-tap to add Text" )
+#define STR_PRESOBJ_TEXT_EDIT_MOBILE
NC_("STR_PRESOBJ_TEXT_MOBILE", "Tap to edit text" )
 #define STR_PRESOBJ_NOTESTEXT_MOBILE
NC_("STR_PRESOBJ_NOTESTEXT_MOBILE", "Double-tap to add Notes" )
 #define STR_PRESOBJ_GRAPHIC 
NC_("STR_PRESOBJ_GRAPHIC", "Double-click to add an Image" )
 #define STR_PRESOBJ_OBJECT  
NC_("STR_PRESOBJ_OBJECT", "Double-click to add an Object" )
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index f26d25504722..a6b7677debae 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -523,6 +524,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* 
pTxtObj)
 pTxtObj->AdjustTextFrameWidthAndHeight();
 
aSet.Put(makeSdrTextMaxFrameHeightItem(pTxtObj->GetLogicRect().GetSize().Height()));
 pTxtObj->SetMergedItemSet(aSet);
+if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+pTxtObj->SetText(SdResId(STR_PRESOBJ_TEXT_EDIT_MOBILE));
 }
 else if( nSlotId == SID_ATTR_CHAR_VERTICAL )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source

2020-02-28 Thread Jan Holesovsky (via logerrit)
 sd/inc/strings.hrc|4 
 sd/source/core/sdpage.cxx |   42 ++
 2 files changed, 34 insertions(+), 12 deletions(-)

New commits:
commit e701ab6945e62bb958a435aaef7cb67ca6ffa9ed
Author: Jan Holesovsky 
AuthorDate: Fri Feb 21 18:45:20 2020 +0100
Commit: Andras Timar 
CommitDate: Fri Feb 28 14:03:45 2020 +0100

android: Hardcode the 'double-tap' in case of the native app.

We know we are mobile, so why bother...  We could go even further, and
do that directly in the comphelper, but that would need more testing I
guess.

Change-Id: Ia371d42fe0e31b5c6f17313fbf6baad4c256cbe9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89236
Tested-by: Michael Meeks 
Reviewed-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89695
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 08481d170398..e4a1ed418524 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -290,6 +290,8 @@
 #define STR_HANDOUT NC_("STR_HANDOUT", 
"Handouts" )
 #define STR_PRESOBJ_MPTITLE 
NC_("STR_PRESOBJ_MPTITLE", "Click to edit the title text format" )
 #define STR_PRESOBJ_MPOUTLINE   
NC_("STR_PRESOBJ_MPOUTLINE", "Click to edit the outline text format" )
+#define STR_PRESOBJ_MPTITLE_MOBILE  
NC_("STR_PRESOBJ_MPTITLE_MOBILE", "Double-tap to edit the title text format" )
+#define STR_PRESOBJ_MPOUTLINE_MOBILE
NC_("STR_PRESOBJ_MPOUTLINE_MOBILE", "Double-tap to edit the outline text 
format" )
 #define STR_PRESOBJ_MPOUTLLAYER2
NC_("STR_PRESOBJ_MPOUTLLAYER2", "Second Outline Level" )
 #define STR_PRESOBJ_MPOUTLLAYER3
NC_("STR_PRESOBJ_MPOUTLLAYER3", "Third Outline Level" )
 #define STR_PRESOBJ_MPOUTLLAYER4
NC_("STR_PRESOBJ_MPOUTLLAYER4", "Fourth Outline Level" )
@@ -298,6 +300,8 @@
 #define STR_PRESOBJ_MPOUTLLAYER7
NC_("STR_PRESOBJ_MPOUTLLAYER7", "Seventh Outline Level" )
 #define STR_PRESOBJ_MPNOTESTITLE
NC_("STR_PRESOBJ_MPNOTESTITLE", "Click to move the slide" )
 #define STR_PRESOBJ_MPNOTESTEXT 
NC_("STR_PRESOBJ_MPNOTESTEXT", "Click to edit the notes format" )
+#define STR_PRESOBJ_MPNOTESTITLE_MOBILE 
NC_("STR_PRESOBJ_MPNOTESTITLE_MOBILE", "Double-tap to move the slide" )
+#define STR_PRESOBJ_MPNOTESTEXT_MOBILE  
NC_("STR_PRESOBJ_MPNOTESTEXT_MOBILE", "Double-tap to edit the notes format" )
 #define STR_PRESOBJ_TITLE   
NC_("STR_PRESOBJ_TITLE", "Click to add Title" )
 #define STR_PRESOBJ_OUTLINE 
NC_("STR_PRESOBJ_OUTLINE", "Click to add Text" )
 #define STR_PRESOBJ_TEXT
NC_("STR_PRESOBJ_TEXT", "Click to add Text" )
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 7c280cfc1f7f..31bc4cec27d1 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2600,24 +2600,32 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) 
const
 {
 OUString aString;
 
+#if defined(IOS) || defined(ANDROID)
+bool isMobile = true;
+#else
+bool isMobile = 
comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView());
+#endif
+
 if (eObjKind == PRESOBJ_TITLE)
 {
 if (mbMaster)
 {
 if (mePageKind != PageKind::Notes)
 {
-aString = SdResId( STR_PRESOBJ_MPTITLE );
+if (isMobile)
+aString = SdResId(STR_PRESOBJ_MPTITLE_MOBILE);
+else
+aString = SdResId(STR_PRESOBJ_MPTITLE);
 }
 else
 {
-aString = SdResId( STR_PRESOBJ_MPNOTESTITLE );
+if (isMobile)
+aString = SdResId(STR_PRESOBJ_MPNOTESTITLE_MOBILE);
+else
+aString = SdResId(STR_PRESOBJ_MPNOTESTITLE);
 }
 }
-else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())
-#ifdef IOS
- || (true)
-#endif
- )
+else if (isMobile)
 aString = SdResId(STR_PRESOBJ_TITLE_MOBILE);
 else
 aString = SdResId(STR_PRESOBJ_TITLE);
@@ -2625,8 +2633,13 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) 
const
 else if (eObjKind == PRESOBJ_OUTLINE)
 {
 if (mbMaster)
-aString = SdResId(STR_PRESOBJ_MPOUTLINE);
-else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+{
+if (isMobile)
+aString = SdResId(STR_PRESOBJ_MPOUTLINE_MOBILE);
+else
+aString = SdResId(STR_PRESOBJ_MPOUTLINE);
+}
+else if (isMobile)
 aString = 

[Libreoffice-commits] core.git: sd/inc sd/source

2020-02-01 Thread Jan Holesovsky (via logerrit)
 sd/inc/strings.hrc|4 
 sd/source/core/sdpage.cxx |   33 +
 2 files changed, 21 insertions(+), 16 deletions(-)

New commits:
commit 74e46a9f2e55a1e918e03efe269abcb93cc1a10d
Author: Jan Holesovsky 
AuthorDate: Wed Jan 29 10:51:49 2020 +0100
Commit: Jan Holesovsky 
CommitDate: Sat Feb 1 09:25:40 2020 +0100

android lok: Correct the hint in the slides from click to double-tap.

Change-Id: I71744dc48f50115c9b4245ac2c81a6431ecbdce6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87678
Reviewed-by: Jan Holesovsky 
Tested-by: Jenkins

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 3d1d90273395..0f188c5b1227 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -304,6 +304,10 @@
 #define STR_PRESOBJ_OUTLINE 
NC_("STR_PRESOBJ_OUTLINE", "Click to add Text" )
 #define STR_PRESOBJ_TEXT
NC_("STR_PRESOBJ_TEXT", "Click to add Text" )
 #define STR_PRESOBJ_NOTESTEXT   
NC_("STR_PRESOBJ_NOTESTEXT", "Click to add Notes" )
+#define STR_PRESOBJ_TITLE_MOBILE
NC_("STR_PRESOBJ_TITLE_MOBILE", "Double-tap to add Title" )
+#define STR_PRESOBJ_OUTLINE_MOBILE  
NC_("STR_PRESOBJ_OUTLINE_MOBILE", "Double-tap to add Text" )
+#define STR_PRESOBJ_TEXT_MOBILE 
NC_("STR_PRESOBJ_TEXT_MOBILE", "Double-tap to add Text" )
+#define STR_PRESOBJ_NOTESTEXT_MOBILE
NC_("STR_PRESOBJ_NOTESTEXT_MOBILE", "Double-tap to add Notes" )
 #define STR_PRESOBJ_GRAPHIC 
NC_("STR_PRESOBJ_GRAPHIC", "Double-click to add an Image" )
 #define STR_PRESOBJ_OBJECT  
NC_("STR_PRESOBJ_OBJECT", "Double-click to add an Object" )
 #define STR_PRESOBJ_CHART   
NC_("STR_PRESOBJ_CHART", "Double-click to add a Chart" )
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 5ce948618f18..ab91aec1d9d2 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -35,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2611,36 +2613,35 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) 
const
 aString = SdResId( STR_PRESOBJ_MPNOTESTITLE );
 }
 }
+else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+aString = SdResId(STR_PRESOBJ_TITLE_MOBILE);
 else
-{
-aString = SdResId( STR_PRESOBJ_TITLE );
-}
+aString = SdResId(STR_PRESOBJ_TITLE);
 }
 else if (eObjKind == PRESOBJ_OUTLINE)
 {
 if (mbMaster)
-{
-aString = SdResId( STR_PRESOBJ_MPOUTLINE );
-}
+aString = SdResId(STR_PRESOBJ_MPOUTLINE);
+else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+aString = SdResId(STR_PRESOBJ_OUTLINE_MOBILE);
 else
-{
-aString = SdResId( STR_PRESOBJ_OUTLINE );
-}
+aString = SdResId(STR_PRESOBJ_OUTLINE);
 }
 else if (eObjKind == PRESOBJ_NOTES)
 {
 if (mbMaster)
-{
-aString = SdResId( STR_PRESOBJ_MPNOTESTEXT );
-}
+aString = SdResId(STR_PRESOBJ_MPNOTESTEXT);
+else if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+aString = SdResId(STR_PRESOBJ_NOTESTEXT_MOBILE);
 else
-{
-aString = SdResId( STR_PRESOBJ_NOTESTEXT );
-}
+aString = SdResId(STR_PRESOBJ_NOTESTEXT);
 }
 else if (eObjKind == PRESOBJ_TEXT)
 {
-aString = SdResId( STR_PRESOBJ_TEXT );
+if (comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+aString = SdResId(STR_PRESOBJ_TEXT_MOBILE);
+else
+aString = SdResId(STR_PRESOBJ_TEXT);
 }
 else if (eObjKind == PRESOBJ_GRAPHIC)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc

2020-01-28 Thread Caolán McNamara (via logerrit)
 sd/inc/pch/precompiled_sd.hxx   |9 -
 sd/inc/pch/precompiled_sdui.hxx |5 -
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 150e0be8377f132952f1cd6195142116a7dcab94
Author: Caolán McNamara 
AuthorDate: Tue Jan 28 15:30:57 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 28 21:12:51 2020 +0100

update sd pches

Change-Id: If8de411ce76a3ffa15384fac3ce7900b5aefebbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87641
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index b3c53e6d3828..4627640f0bda 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2020-01-02 15:15:28 using:
+ Generated on 2020-01-28 15:30:31 using:
  ./bin/update_pch sd sd --cutoff=4 --exclude:system --exclude:module 
--include:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -73,17 +73,14 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -99,7 +96,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -260,6 +256,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -317,9 +314,11 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/sd/inc/pch/precompiled_sdui.hxx b/sd/inc/pch/precompiled_sdui.hxx
index 7b2124a09afa..df0ec0b49088 100644
--- a/sd/inc/pch/precompiled_sdui.hxx
+++ b/sd/inc/pch/precompiled_sdui.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2020-01-02 15:15:40 using:
+ Generated on 2020-01-28 15:30:36 using:
  ./bin/update_pch sd sdui --cutoff=4 --exclude:system --include:module 
--include:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -225,6 +225,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source sd/uiconfig

2020-01-28 Thread Caolán McNamara (via logerrit)
 sd/inc/strings.hrc  |2 
 sd/source/ui/dlg/animobjs.cxx   |  378 ++---
 sd/source/ui/inc/animobjs.hxx   |   79 +-
 sd/uiconfig/simpress/ui/dockinganimation.ui |  775 
 4 files changed, 580 insertions(+), 654 deletions(-)

New commits:
commit cad2485d924a9f766a8e65379bdcd7a42c0228ee
Author: Caolán McNamara 
AuthorDate: Tue Jan 28 14:29:11 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 28 20:56:33 2020 +0100

weld AnimationWindow

Change-Id: I66bcd02a5fc98fff4d2fb0fcd24d702ff894d536
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87638
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 9c645f7a6250..3d1d90273395 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -487,6 +487,8 @@
 
 #define STR_SD_NONE NC_("STR_SD_NONE", "- 
None -")
 
+#define STR_ANIMATION_DIALOG_TITLE  
NC_("STR_ANIMATION_DIALOG_TITLE", "Animation")
+
 #define RID_SVXSTR_EDIT_GRAPHIC 
NC_("RID_SVXSTR_EDIT_GRAPHIC", "Link")
 
 #endif
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index f2807c71e570..b3f21c63a75a 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -53,13 +54,9 @@ namespace sd {
 /**
  *  SdDisplay - Control
  */
-SdDisplay::SdDisplay(vcl::Window* pWin)
-: Control(pWin, 0)
-, aScale(1, 1)
+SdDisplay::SdDisplay()
+: aScale(1, 1)
 {
-SetMapMode(MapMode(MapUnit::MapPixel));
-const StyleSettings& rStyles = 
Application::GetSettings().GetStyleSettings();
-SetBackground( Wallpaper( rStyles.GetFieldColor() ) );
 }
 
 SdDisplay::~SdDisplay()
@@ -80,10 +77,18 @@ void SdDisplay::SetBitmapEx( BitmapEx const * pBmpEx )
 }
 }
 
-void SdDisplay::Paint( vcl::RenderContext& /*rRenderContext*/, const 
::tools::Rectangle& )
+void SdDisplay::Paint(vcl::RenderContext& rRenderContext, const 
::tools::Rectangle&)
 {
+rRenderContext.Push(PushFlags::MAPMODE);
+
+rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
+const StyleSettings& rStyles = 
Application::GetSettings().GetStyleSettings();
+rRenderContext.SetBackground( Wallpaper( rStyles.GetFieldColor() ) );
+rRenderContext.Erase();
+
 Point aPt;
-Size aSize = GetOutputSize();
+Size aSize = GetOutputSizePixel();
+
 Size aBmpSize = aBitmapEx.GetBitmap().GetSizePixel();
 aBmpSize.setWidth( static_cast( 
static_cast(aBmpSize.Width()) * static_cast(aScale) ) );
 aBmpSize.setHeight( static_cast( 
static_cast(aBmpSize.Height()) * static_cast(aScale) ) );
@@ -93,7 +98,9 @@ void SdDisplay::Paint( vcl::RenderContext& 
/*rRenderContext*/, const ::tools::Re
 if( aBmpSize.Height() < aSize.Height() )
 aPt.setY( ( aSize.Height() - aBmpSize.Height() ) / 2 );
 
-aBitmapEx.Draw( this, aPt, aBmpSize );
+aBitmapEx.Draw(, aPt, aBmpSize);
+
+rRenderContext.Pop();
 }
 
 void SdDisplay::SetScale( const Fraction& rFrac )
@@ -101,23 +108,12 @@ void SdDisplay::SetScale( const Fraction& rFrac )
 aScale = rFrac;
 }
 
-Size SdDisplay::GetOptimalSize() const
+void SdDisplay::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 {
-return LogicToPixel(Size(147, 87), MapMode(MapUnit::MapAppFont));
-}
-
-void SdDisplay::DataChanged( const DataChangedEvent& rDCEvt )
-{
-Control::DataChanged( rDCEvt );
-
-if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && 
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
-{
-const StyleSettings& rStyles = 
Application::GetSettings().GetStyleSettings();
-SetBackground( Wallpaper( rStyles.GetFieldColor() ) );
-SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode()
-? sd::OUTPUT_DRAWMODE_CONTRAST
-: sd::OUTPUT_DRAWMODE_COLOR );
-}
+CustomWidgetController::SetDrawingArea(pDrawingArea);
+Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(147, 87), 
MapMode(MapUnit::MapAppFont)));
+pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
+SetOutputSizePixel(aSize);
 }
 
 const size_t AnimationWindow::EMPTY_FRAMELIST = 
std::numeric_limits::max();
@@ -127,37 +123,33 @@ const size_t AnimationWindow::EMPTY_FRAMELIST = 
std::numeric_limits::max
  */
 AnimationWindow::AnimationWindow(SfxBindings* pInBindings, SfxChildWindow 
*pCW, vcl::Window* pParent)
 : SfxDockingWindow(pInBindings, pCW, pParent,
-"DockingAnimation", "modules/simpress/ui/dockinganimation.ui")
+"DockingAnimation", "modules/simpress/ui/dockinganimation.ui", true)
+, m_xCtlDisplay(new SdDisplay)
+, m_xCtlDisplayWin(new weld::CustomWeld(*m_xBuilder, "preview", 
*m_xCtlDisplay))
+, m_xBtnFirst(m_xBuilder->weld_button("first"))
+, 

[Libreoffice-commits] core.git: sd/inc sd/source sd/uiconfig sd/UIConfig_simpress.mk

2020-01-27 Thread Caolán McNamara (via logerrit)
 sd/UIConfig_simpress.mk   |1 
 sd/inc/strings.hrc|2 
 sd/source/ui/controller/displaymodecontroller.cxx |  147 +-
 sd/uiconfig/simpress/ui/displaywindow.ui  |  134 
 4 files changed, 197 insertions(+), 87 deletions(-)

New commits:
commit f6154457c704f75d37ed216d7ac2dbda8fa0c5c4
Author: Caolán McNamara 
AuthorDate: Mon Jan 27 10:57:31 2020 +
Commit: Caolán McNamara 
CommitDate: Mon Jan 27 20:25:31 2020 +0100

weld DisplayModeToolbarMenu

Change-Id: I210c608d2493c5b8b1ccf32af39c51b144bb45e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87509
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index 09d97c63..fe0dcce15873 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -115,6 +115,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
sd/uiconfig/simpress/ui/customanimationtexttab \
sd/uiconfig/simpress/ui/customslideshows \
sd/uiconfig/simpress/ui/definecustomslideshow \
+   sd/uiconfig/simpress/ui/displaywindow \
sd/uiconfig/simpress/ui/dlgfield \
sd/uiconfig/simpress/ui/dockinganimation \
sd/uiconfig/simpress/ui/effectmenu \
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index fe3e182f2b2f..9c645f7a6250 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -62,8 +62,6 @@
 #define STR_AUTOLAYOUT_HANDOUT4 
NC_("STR_AUTOLAYOUT_HANDOUT4", "Four Slides")
 #define STR_AUTOLAYOUT_HANDOUT6 
NC_("STR_AUTOLAYOUT_HANDOUT6", "Six Slides")
 #define STR_AUTOLAYOUT_HANDOUT9 
NC_("STR_AUTOLAYOUT_HANDOUT9", "Nine Slides")
-#define STR_DISPLAYMODE_EDITMODES   
NC_("STR_DISPLAYMODE_EDITMODES", "Edit Modes")
-#define STR_DISPLAYMODE_MASTERMODES 
NC_("STR_DISPLAYMODE_MASTERMODES", "Master Modes")
 #define STR_AUTOLAYOUT_NOTES
NC_("STR_AUTOLAYOUT_NOTES", "Notes")
 #define STR_TRANSFORM   NC_("STR_TRANSFORM", 
"Transform")
 #define STR_LINEEND NC_("STR_LINEEND", 
"Line Ends")
diff --git a/sd/source/ui/controller/displaymodecontroller.cxx 
b/sd/source/ui/controller/displaymodecontroller.cxx
index 7fc63d053e4d..1513e543fbb9 100644
--- a/sd/source/ui/controller/displaymodecontroller.cxx
+++ b/sd/source/ui/controller/displaymodecontroller.cxx
@@ -36,6 +36,7 @@ class DisplayModeController : public 
svt::PopupWindowController
 public:
 explicit DisplayModeController( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext );
 
+virtual std::unique_ptr weldPopupWindow() override;
 virtual VclPtr createVclPopupWindow( vcl::Window* pParent ) 
override;
 
 // XInitialization
@@ -48,22 +49,25 @@ public:
 void setToolboxItemImage(const OUString& rImage);
 };
 
-class DisplayModeToolbarMenu : public svtools::ToolbarMenu
+class DisplayModeToolbarMenu final : public WeldToolbarPopup
 {
 public:
-DisplayModeToolbarMenu( DisplayModeController& rController, vcl::Window* 
pParent );
-virtual ~DisplayModeToolbarMenu() override;
-virtual void dispose() override;
-
-protected:
-DECL_LINK( SelectToolbarMenuHdl, ToolbarMenu*, void );
-DECL_LINK( SelectValueSetHdl, ValueSet*, void );
-void SelectHdl(void const *);
+DisplayModeToolbarMenu(DisplayModeController* pControl, weld::Widget* 
pParent);
+virtual void GrabFocus() override
+{
+mxDisplayModeSet1->GrabFocus();
+}
 
 private:
-DisplayModeController& mrController;
-VclPtr mpDisplayModeSet1;
-VclPtr mpDisplayModeSet2;
+rtl::Reference mxControl;
+std::unique_ptr mxFrame1;
+std::unique_ptr mxDisplayModeSet1;
+std::unique_ptr mxDisplayModeSetWin1;
+std::unique_ptr mxFrame2;
+std::unique_ptr mxDisplayModeSet2;
+std::unique_ptr mxDisplayModeSetWin2;
+
+DECL_LINK(SelectValueSetHdl, SvtValueSet*, void);
 };
 
 struct snewfoil_value_info
@@ -115,7 +119,7 @@ static const snewfoil_value_info mastermodes[] =
 };
 
 
-static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info* 
pInfo )
+static void fillLayoutValueSet(SvtValueSet* pValue, const snewfoil_value_info* 
pInfo)
 {
 Size aLayoutItemSize;
 for( ; pInfo->mnId; pInfo++ )
@@ -130,97 +134,60 @@ static void fillLayoutValueSet( ValueSet* pValue, const 
snewfoil_value_info* pIn
 }
 
 aLayoutItemSize = pValue->CalcItemSizePixel( aLayoutItemSize );
-pValue->SetSizePixel( pValue->CalcWindowSizePixel( aLayoutItemSize ) );
-}
+Size aSize(pValue->CalcWindowSizePixel(aLayoutItemSize));
 
-DisplayModeToolbarMenu::DisplayModeToolbarMenu( DisplayModeController& 
rController, vcl::Window* pParent )
-: svtools::ToolbarMenu( rController.getFrameInterface(), pParent, 
WB_CLIPCHILDREN )
-, 

[Libreoffice-commits] core.git: sd/inc

2020-01-26 Thread Mehmet Emin Başoğlu (via logerrit)
 sd/inc/sdresid.hxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 20b5c03ae6406a64ffec328e550fd3c9b3f0306c
Author: Mehmet Emin Başoğlu 
AuthorDate: Sat Jan 25 14:58:36 2020 +0300
Commit: Muhammet Kara 
CommitDate: Sun Jan 26 20:29:14 2020 +0100

tdf#124176: Use pragma once instead of include guards

Change-Id: Iaf87f70db32bcdb9ae079732e931b4c80879e247
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87383
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/sd/inc/sdresid.hxx b/sd/inc/sdresid.hxx
index 8ac4ea45405e..20254c0979fb 100644
--- a/sd/inc/sdresid.hxx
+++ b/sd/inc/sdresid.hxx
@@ -17,14 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SD_INC_SDRESID_HXX
-#define INCLUDED_SD_INC_SDRESID_HXX
+#pragma once
 
 #include 
 #include "sddllapi.h"
 
 SD_DLLPUBLIC OUString SdResId(const char* pId);
 
-#endif /* _SD_SDRESID_HXX */
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc

2020-01-22 Thread Seth Chaiklin (via logerrit)
 sd/inc/strings.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0970b8b652835001076d14138a54b4add1b93a93
Author: Seth Chaiklin 
AuthorDate: Wed Jan 22 10:34:56 2020 +0100
Commit: Heiko Tietze 
CommitDate: Wed Jan 22 14:13:16 2020 +0100

tdf#129786  give correct title for Draw dialog box

Change-Id: Ied53edf066ce8a554899848f261a272f812121cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87180
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 1eeb0c178976..fe3e182f2b2f 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -264,7 +264,7 @@
 #define STR_NAVIGATOR_SHOW_NAMED_SHAPES 
NC_("STR_NAVIGATOR_SHOW_NAMED_SHAPES", "Named shapes")
 #define STR_NAVIGATOR_SHOW_ALL_SHAPES   
NC_("STR_NAVIGATOR_SHOW_ALL_SHAPES", "All shapes")
 #define STR_NAVIGATOR_SHAPE_BASE_NAME   
NC_("STR_NAVIGATOR_SHAPE_BASE_NAME", "Shape %1")
-#define STR_SET_BACKGROUND_PICTURE  
NC_("STR_SET_BACKGROUND_PICTURE", "Set Background Image for Slide ..." )
+#define STR_SET_BACKGROUND_PICTURE  
NC_("STR_SET_BACKGROUND_PICTURE", "Set Background Image" )
 #define RID_ANNOTATIONS_START   
NC_("RID_ANNOTATIONS_START", "Comments")
 #define STR_RESET_LAYOUT
NC_("STR_RESET_LAYOUT", "Reset Slide Layout")
 #define STR_INSERT_TABLE
NC_("STR_INSERT_TABLE", "Insert Table")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc

2019-12-20 Thread Noel Grandin (via logerrit)
 sd/inc/app.hrc |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f7817d988c6251fd42433c1f4886b7f8270a24ff
Author: Noel Grandin 
AuthorDate: Wed Dec 18 14:16:02 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Dec 20 17:03:36 2019 +0100

loplugin:duplicate-defines

Change-Id: Ic98501b755fee242bf40d4e60b2116fe500522e6
Reviewed-on: https://gerrit.libreoffice.org/85568
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index 9c4f8f73a0a0..450bc35195fa 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -155,7 +155,7 @@
 #define SID_STATUS_PAGE (SID_SD_START+86)
 #define SID_STATUS_LAYOUT   (SID_SD_START+87)
 #define SID_STATUS_SELMODE  (SID_SD_START+88)
-#define SID_MODIFIED
TypedWhichId(SID_SD_START+89)
+// In sfxsids.hrc: SID_MODIFIED  
TypedWhichId(SID_SD_START+89)
 #define SID_OBJECT_CROOK_ROTATE (SID_SD_START+90)
 #define SID_OBJECT_CROOK_SLANT  (SID_SD_START+91)
 #define SID_OBJECT_CROOK_STRETCH(SID_SD_START+92)
@@ -165,7 +165,7 @@
 // In svxids.hrc:  SID_ENTER_GROUP  (SID_SD_START+96)
 // In svxids.hrc:  SID_LEAVE_GROUP  (SID_SD_START+97)
 // In svxids.hrc:  SID_SIZE_PAGE_WIDTH  (SID_SD_START+98)
-#define SID_SIZE_OPTIMAL(SID_SD_START+99)
+// In sfxsids.hrc: SID_SIZE_OPTIMAL (SID_SD_START+99)
 #define SID_OBJECT_TRANSPARENCE (SID_SD_START+100)
 #define SID_OBJECT_GRADIENT (SID_SD_START+101)
 // FREE
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/inc sd/source

2019-12-11 Thread Caolán McNamara (via logerrit)
 sd/inc/pageformatpanel.hrc   |   38 +--
 sd/source/ui/sidebar/SlideBackground.cxx |   15 ++--
 2 files changed, 35 insertions(+), 18 deletions(-)

New commits:
commit b26f29a976838247175576f17fb4a3087e1bb922
Author: Caolán McNamara 
AuthorDate: Tue Dec 10 17:10:24 2019 +
Commit: Caolán McNamara 
CommitDate: Wed Dec 11 11:27:32 2019 +0100

Related: tdf#129267 format numbers with the UI locale

Change-Id: I70d8cc48869073596c101eec6a6d3a79db044a78
Reviewed-on: https://gerrit.libreoffice.org/84883
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/inc/pageformatpanel.hrc b/sd/inc/pageformatpanel.hrc
index 732f39e19c53..6d45a7957e87 100644
--- a/sd/inc/pageformatpanel.hrc
+++ b/sd/inc/pageformatpanel.hrc
@@ -16,27 +16,33 @@ namespace sd
 {
 
 // To translators: this is a listbox labelled by "Margins:", inch units
-const char* RID_PAGEFORMATPANEL_MARGINS_INCH[] =
+const std::pair RID_PAGEFORMATPANEL_MARGINS_INCH[] =
 {
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "None"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Narrow"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Moderate"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (0.75″)"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1″)"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1.25″)"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Wide"),
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "None"), 0 },
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Narrow"), 0 },
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Moderate"), 0 },
+// Normal (0.75")
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (%1)"),  75 },
+// Normal (1")
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (%1)"), 100 },
+// Normal (1.25")
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (%1)"), 125 },
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Wide"), 0 }
 };
 
 // To translators: this is a listbox labelled by "Margins:", cm units
-const char* RID_PAGEFORMATPANEL_MARGINS_CM[] =
+const std::pair RID_PAGEFORMATPANEL_MARGINS_CM[] =
 {
-NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "None"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Narrow"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Moderate"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (1.9 cm)"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (2.54 cm)"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (3.18 cm)"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Wide"),
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "None"), 0 },
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Narrow"), 0 },
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Moderate"), 0 },
+// Normal (1.9 cm)
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (%1)"), 190 },
+// Normal (2.54 cm)
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (%1)"), 254 },
+// Normal (3.18 cm)
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (%1)"), 318 },
+{ NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Wide"), 0 }
 };
 
 }
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index c28242b57a61..7a43a4c63161 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -52,6 +52,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -190,15 +191,25 @@ void SlideBackground::SetMarginsFieldUnit()
 auto nSelected = mpMarginSelectBox->GetSelectedEntryPos();
 mpMarginSelectBox->Clear();
 
+const LocaleDataWrapper& rLocaleData = 
Application::GetSettings().GetLocaleDataWrapper();
+
 if (IsInch(meFUnit))
 {
+OUString sSuffix = 
weld::MetricSpinButton::MetricToString(FieldUnit::INCH);
 for (size_t i = 0; i < 
SAL_N_ELEMENTS(RID_PAGEFORMATPANEL_MARGINS_INCH); ++i)
-
mpMarginSelectBox->InsertEntry(SdResId(RID_PAGEFORMATPANEL_MARGINS_INCH[i]));
+{
+OUString sMeasurement = 
rLocaleData.getNum(RID_PAGEFORMATPANEL_MARGINS_INCH[i].second, 2, true, false) 
+ sSuffix;
+
mpMarginSelectBox->InsertEntry(SdResId(RID_PAGEFORMATPANEL_MARGINS_INCH[i].first).replaceFirst("%1",
 sMeasurement));
+}
 }
 else
 {
+OUString sSuffix = " " + 
weld::MetricSpinButton::MetricToString(FieldUnit::CM);
 for (size_t i = 0; i < SAL_N_ELEMENTS(RID_PAGEFORMATPANEL_MARGINS_CM); 
++i)
-
mpMarginSelectBox->InsertEntry(SdResId(RID_PAGEFORMATPANEL_MARGINS_CM[i]));
+{
+OUString sMeasurement = 
rLocaleData.getNum(RID_PAGEFORMATPANEL_MARGINS_CM[i].second, 2, true, false) + 
sSuffix;
+
mpMarginSelectBox->InsertEntry(SdResId(RID_PAGEFORMATPANEL_MARGINS_CM[i].first).replaceFirst("%1",
 sMeasurement));
+}
 }
 
 mpMarginSelectBox->SelectEntryPos(nSelected);
___
Libreoffice-commits mailing list

[Libreoffice-commits] core.git: sd/inc svx/inc sw/inc

2019-12-10 Thread Caolán McNamara (via logerrit)
 sd/inc/pageformatpanel.hrc |6 +++---
 svx/inc/spacing.hrc|   28 ++--
 sw/inc/pageformatpanel.hrc |6 +++---
 3 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit af728b8ce5cc7c5b3860282f87ee3dfed79f1fcc
Author: Caolán McNamara 
AuthorDate: Mon Dec 9 19:52:12 2019 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 10 10:15:47 2019 +0100

use double prime for inch symbol

Change-Id: I6a663bcb55155bd2331aa79cebd5b922c2ee7605
Reviewed-on: https://gerrit.libreoffice.org/84787
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/inc/pageformatpanel.hrc b/sd/inc/pageformatpanel.hrc
index ec01fd6ecdb3..732f39e19c53 100644
--- a/sd/inc/pageformatpanel.hrc
+++ b/sd/inc/pageformatpanel.hrc
@@ -21,9 +21,9 @@ const char* RID_PAGEFORMATPANEL_MARGINS_INCH[] =
 NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "None"),
 NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Narrow"),
 NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Moderate"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (0.75\")"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1\")"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1.25\")"),
+NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (0.75″)"),
+NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1″)"),
+NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1.25″)"),
 NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Wide"),
 };
 
diff --git a/svx/inc/spacing.hrc b/svx/inc/spacing.hrc
index 445484248a07..82f107fc67db 100644
--- a/svx/inc/spacing.hrc
+++ b/svx/inc/spacing.hrc
@@ -17,13 +17,13 @@
 const std::pair RID_SVXSTRARY_SPACING_INCH[] =
 {
 { NC_("RID_SVXSTRARY_SPACING_INCH", "None"),0 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Small (1/16\")"),   91 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Small (1/8\")"), 181 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Small Medium (1/4\")"),  363 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Medium (3/8\")"),539 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Medium Large (1/2\")"),  720 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Large (3/4\")"),1077 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Large (1\")"),1440 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Small (1/16″)"),   91 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Small (1/8″)"), 181 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Small Medium (1/4″)"),  363 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Medium (3/8″)"),539 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Medium Large (1/2″)"),  720 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Large (3/4″)"),1077 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Large (1″)"),1440 },
 { nullptr, 0 }
 };
 
@@ -45,13 +45,13 @@ const std::pair 
RID_SVXSTRARY_SPACING_CM[] =
 const std::pair RID_SVXSTRARY_MARGINS_INCH[] =
 {
 { NC_("RID_SVXSTRARY_MARGINS_INCH", "None"),0 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Small (1/16\")"),   91 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Small (1/8\")"), 181 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Small Medium (1/4\")"),  363 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium (3/8\")"),539 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium Large (1/2\")"),  720 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Large (3/4\")"),1077 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Large (1\")"),1440 },
+{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Small (1/16″)"),   91 },
+{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Small (1/8″)"), 181 },
+{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Small Medium (1/4″)"),  363 },
+{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium (3/8″)"),539 },
+{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium Large (1/2″)"),  720 },
+{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Large (3/4″)"),1077 },
+{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Large (1″)"),1440 },
 { nullptr, 0 }
 };
 
diff --git a/sw/inc/pageformatpanel.hrc b/sw/inc/pageformatpanel.hrc
index 3d9e7727efca..ddc82ed620d3 100644
--- a/sw/inc/pageformatpanel.hrc
+++ b/sw/inc/pageformatpanel.hrc
@@ -21,9 +21,9 @@ const char* RID_PAGEFORMATPANEL_MARGINS_INCH[] =
 NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "None"),
 NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Narrow"),
 NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Moderate"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (0.75\")"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1\")"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1.25\")"),
+NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (0.75″)"),
+NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1″)"),
+NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Normal (1.25″)"),
 NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Wide"),
 NC_("RID_PAGEFORMATPANEL_MARGINS_INCH", "Mirrored")
 };

[Libreoffice-commits] core.git: sd/inc

2019-12-09 Thread Caolán McNamara (via logerrit)
 sd/inc/pageformatpanel.hrc |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c902202ca0f8547d3fb35e6e729c6b1244c290e1
Author: Caolán McNamara 
AuthorDate: Mon Dec 9 19:50:20 2019 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 9 22:24:56 2019 +0100

separate cm from value in built-in en_US strings

Change-Id: I64f78192d176fe225baea789e2283c5c95ab62fa
Reviewed-on: https://gerrit.libreoffice.org/84786
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/inc/pageformatpanel.hrc b/sd/inc/pageformatpanel.hrc
index b7309ee69748..ec01fd6ecdb3 100644
--- a/sd/inc/pageformatpanel.hrc
+++ b/sd/inc/pageformatpanel.hrc
@@ -33,9 +33,9 @@ const char* RID_PAGEFORMATPANEL_MARGINS_CM[] =
 NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "None"),
 NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Narrow"),
 NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Moderate"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (1.9cm)"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (2.54cm)"),
-NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (3.18cm)"),
+NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (1.9 cm)"),
+NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (2.54 cm)"),
+NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Normal (3.18 cm)"),
 NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Wide"),
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sd/inc sd/source

2019-12-05 Thread Stephan Bergmann (via logerrit)
 sd/inc/sdabstdlg.hxx  |2 +-
 sd/source/ui/inc/drawview.hxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 86f148afbb8b476d22f92632c619f1b94f0b2102
Author: Stephan Bergmann 
AuthorDate: Thu Dec 5 16:53:29 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 5 21:01:37 2019 +0100

CppunitTest_sd_dialogs_test still needs some symbols as SD_DLLPUBLIC

...after e189a3f5b5c4f381dcf109eb9a2ee9b6d32d5551 "make some classes module
private":

> [LNK] CppunitTest/libtest_sd_dialogs_test.so
> sd/qa/unit/dialogs-test.cxx:107: error: undefined reference to 
'SdAbstractDialogFactory::Create()'
> sd/qa/unit/dialogs-test.cxx:160: error: undefined reference to 'typeinfo 
for sd::DrawView'

Change-Id: Ib173d576bfe3c59c31229bb76693d8ec9d57
Reviewed-on: https://gerrit.libreoffice.org/84575
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index 3f77b5efd3b5..eebe5695748d 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -169,7 +169,7 @@ protected:
 class SdAbstractDialogFactory
 {
 public:
-static SdAbstractDialogFactory* Create();
+SD_DLLPUBLIC static SdAbstractDialogFactory* Create();
 
 virtual VclPtr 
CreateSvxBulletAndPositionDlg(weld::Window* pParent, const SfxItemSet* pAttr, 
::sd::View* pView) = 0;
 virtual VclPtr  CreateBreakDlg(weld::Window* 
pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong 
nSumActionCount, sal_uLong nObjCount ) = 0;
diff --git a/sd/source/ui/inc/drawview.hxx b/sd/source/ui/inc/drawview.hxx
index 34360c61c772..2d41de1af250 100644
--- a/sd/source/ui/inc/drawview.hxx
+++ b/sd/source/ui/inc/drawview.hxx
@@ -30,7 +30,7 @@ class DrawViewShell;
 /**
  * Derivative of ::sd::View; contains also a pointer to the document
  */
-class DrawView : public ::sd::View
+class SD_DLLPUBLIC DrawView : public ::sd::View
 {
 public:
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sd/inc sw/inc

2019-11-06 Thread Jan Holesovsky (via logerrit)
 sd/inc/pageformatpanel.hrc |5 +
 sw/inc/pageformatpanel.hrc |5 +
 2 files changed, 10 insertions(+)

New commits:
commit c503fc6e478510f0fec72cd88b776ca683a00021
Author: Jan Holesovsky 
AuthorDate: Wed Nov 6 17:25:39 2019 +0100
Commit: Jan Holesovsky 
CommitDate: Thu Nov 7 08:21:10 2019 +0100

android: ODR fix of RID_PAGEFORMATPANEL_MARGINS_CM.

Without this, we get a linking error that RID_PAGEFORMATPANEL_MARGINS_CM
is defined twice.

Change-Id: Ib9c07adcb0a8def991d1e39429c1bb4947cd7d32
Reviewed-on: https://gerrit.libreoffice.org/82159
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/sd/inc/pageformatpanel.hrc b/sd/inc/pageformatpanel.hrc
index 23325e26ac2f..b7309ee69748 100644
--- a/sd/inc/pageformatpanel.hrc
+++ b/sd/inc/pageformatpanel.hrc
@@ -12,6 +12,9 @@
 
 #define NC_(Context, String) reinterpret_cast(Context "\004" 
u8##String)
 
+namespace sd
+{
+
 // To translators: this is a listbox labelled by "Margins:", inch units
 const char* RID_PAGEFORMATPANEL_MARGINS_INCH[] =
 {
@@ -36,6 +39,8 @@ const char* RID_PAGEFORMATPANEL_MARGINS_CM[] =
 NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Wide"),
 };
 
+}
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sw/inc/pageformatpanel.hrc b/sw/inc/pageformatpanel.hrc
index ecad14cf51a2..048ff93a8776 100644
--- a/sw/inc/pageformatpanel.hrc
+++ b/sw/inc/pageformatpanel.hrc
@@ -12,6 +12,9 @@
 
 #define NC_(Context, String) reinterpret_cast(Context "\004" 
u8##String)
 
+namespace sw
+{
+
 // To translators: this is a listbox labelled by "Margins:", inch units
 const char* RID_PAGEFORMATPANEL_MARGINS_INCH[] =
 {
@@ -38,6 +41,8 @@ const char* RID_PAGEFORMATPANEL_MARGINS_CM[] =
 NC_("RID_PAGEFORMATPANEL_MARGINS_CM", "Mirrored")
 };
 
+}
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sd/inc

2019-11-05 Thread Stephan Bergmann (via logerrit)
 sd/inc/sdabstdlg.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 645e014a15b6895b9533afa3b11f2f3afcb4c190
Author: Stephan Bergmann 
AuthorDate: Wed Nov 6 07:49:01 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Nov 6 08:48:32 2019 +0100

SdAbstractDialogFactory::Create is still needed by 
CppunitTest_sd_dialogs_test

This partialy reverts c02c4df9414ed2bef96565522238ca05013d3ac3 "make some
classes module-private".

Change-Id: Ice669f8a19d2721959b74125a3b2bddb8c06d60d
Reviewed-on: https://gerrit.libreoffice.org/82120
Reviewed-by: Noel Grandin 
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index 3f77b5efd3b5..eebe5695748d 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -169,7 +169,7 @@ protected:
 class SdAbstractDialogFactory
 {
 public:
-static SdAbstractDialogFactory* Create();
+SD_DLLPUBLIC static SdAbstractDialogFactory* Create();
 
 virtual VclPtr 
CreateSvxBulletAndPositionDlg(weld::Window* pParent, const SfxItemSet* pAttr, 
::sd::View* pView) = 0;
 virtual VclPtr  CreateBreakDlg(weld::Window* 
pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong 
nSumActionCount, sal_uLong nObjCount ) = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sd/inc

2019-11-01 Thread Noel Grandin (via logerrit)
 sd/inc/CustomAnimationEffect.hxx |2 +-
 sd/inc/anminfo.hxx   |2 +-
 sd/inc/drawdoc.hxx   |4 +---
 sd/inc/pglink.hxx|2 +-
 sd/inc/sdcgmfilter.hxx   |2 +-
 sd/inc/sdgrffilter.hxx   |2 +-
 sd/inc/sdhtmlfilter.hxx  |3 +--
 sd/inc/sdpdffilter.hxx   |2 +-
 sd/inc/sdpptwrp.hxx  |2 +-
 sd/inc/sdxmlwrp.hxx  |2 +-
 sd/inc/shapelist.hxx |2 +-
 sd/inc/stlfamily.hxx |2 +-
 sd/inc/textapi.hxx   |2 +-
 sd/inc/undo/undofactory.hxx  |2 +-
 sd/inc/undo/undomanager.hxx  |2 +-
 sd/inc/undo/undoobjects.hxx  |8 
 sd/inc/undoanim.hxx  |6 +++---
 17 files changed, 22 insertions(+), 25 deletions(-)

New commits:
commit faff2437d83b437766d1c59dc473cc8b6ad9a548
Author: Noel Grandin 
AuthorDate: Fri Nov 1 11:28:02 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 1 11:27:20 2019 +0100

loplugin:finalclasses in sd/inc

Change-Id: I29c7656d532fc0c8bcf1379a2f54d052aa4253e8
Reviewed-on: https://gerrit.libreoffice.org/81877
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/CustomAnimationEffect.hxx b/sd/inc/CustomAnimationEffect.hxx
index f60e350ba3cf..cf2cfe7cb7a4 100644
--- a/sd/inc/CustomAnimationEffect.hxx
+++ b/sd/inc/CustomAnimationEffect.hxx
@@ -345,7 +345,7 @@ protected:
 
 class MainSequence;
 
-class InteractiveSequence : public EffectSequenceHelper
+class InteractiveSequence final : public EffectSequenceHelper
 {
 friend class MainSequence;
 friend class MainSequenceChangeGuard;
diff --git a/sd/inc/anminfo.hxx b/sd/inc/anminfo.hxx
index dbd13720ec29..08224994a2ce 100644
--- a/sd/inc/anminfo.hxx
+++ b/sd/inc/anminfo.hxx
@@ -28,7 +28,7 @@
 #include 
 #include "sddllapi.h"
 
-class SD_DLLPUBLIC SdAnimationInfo : public SdrObjUserData
+class SD_DLLPUBLIC SdAnimationInfo final : public SdrObjUserData
 {
 public:
 PresObjKind mePresObjKind;
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 304d4e282c78..b5b6e574ca0c 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -128,7 +128,7 @@ namespace sd
 }
 
 // SdDrawDocument
-class SD_DLLPUBLIC SdDrawDocument : public FmFormModel
+class SD_DLLPUBLIC SdDrawDocument final : public FmFormModel
 {
 public:
 SAL_DLLPRIVATE void setDocAccTitle( const OUString& rTitle ) { 
msDocAccTitle = rTitle; }
@@ -200,8 +200,6 @@ private:
 bool mbEmbedFontScriptAsian : 1;
 bool mbEmbedFontScriptComplex : 1;
 
-protected:
-
 SAL_DLLPRIVATE virtual css::uno::Reference< css::uno::XInterface > 
createUnoModel() override;
 
 public:
diff --git a/sd/inc/pglink.hxx b/sd/inc/pglink.hxx
index a6344ca3ef7c..c36b2afcda3a 100644
--- a/sd/inc/pglink.hxx
+++ b/sd/inc/pglink.hxx
@@ -24,7 +24,7 @@
 
 class SdPage;
 
-class SdPageLink : public ::sfx2::SvBaseLink
+class SdPageLink final : public ::sfx2::SvBaseLink
 {
 SdPage* pPage;
 
diff --git a/sd/inc/sdcgmfilter.hxx b/sd/inc/sdcgmfilter.hxx
index 44ba359aab17..000a50bde63d 100644
--- a/sd/inc/sdcgmfilter.hxx
+++ b/sd/inc/sdcgmfilter.hxx
@@ -23,7 +23,7 @@
 #include "sdfilter.hxx"
 
 // SdCGMFilter
-class SdCGMFilter : public SdFilter
+class SdCGMFilter final : public SdFilter
 {
 public:
 SdCGMFilter (
diff --git a/sd/inc/sdgrffilter.hxx b/sd/inc/sdgrffilter.hxx
index 2b34ecf93e52..2ec180a52bf3 100644
--- a/sd/inc/sdgrffilter.hxx
+++ b/sd/inc/sdgrffilter.hxx
@@ -24,7 +24,7 @@
 class ErrCode;
 
 // SdCGMFilter
-class SdGRFFilter : public SdFilter
+class SdGRFFilter final : public SdFilter
 {
 public:
 SdGRFFilter ( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell );
diff --git a/sd/inc/sdhtmlfilter.hxx b/sd/inc/sdhtmlfilter.hxx
index 86a7eb157fe8..c55d24150b71 100644
--- a/sd/inc/sdhtmlfilter.hxx
+++ b/sd/inc/sdhtmlfilter.hxx
@@ -23,8 +23,7 @@
 #include "sdfilter.hxx"
 
 // SdHTMLFilter
-class SdHTMLFilter
-: public SdFilter
+class SdHTMLFilter final : public SdFilter
 {
 public:
 SdHTMLFilter (
diff --git a/sd/inc/sdpdffilter.hxx b/sd/inc/sdpdffilter.hxx
index ce085a7036b3..44cae287d19f 100644
--- a/sd/inc/sdpdffilter.hxx
+++ b/sd/inc/sdpdffilter.hxx
@@ -28,7 +28,7 @@ namespace sd
 class DrawDocShell;
 }
 
-class SdPdfFilter : public SdFilter
+class SdPdfFilter final : public SdFilter
 {
 public:
 SdPdfFilter(SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell);
diff --git a/sd/inc/sdpptwrp.hxx b/sd/inc/sdpptwrp.hxx
index 6414226d4596..9126f814d585 100644
--- a/sd/inc/sdpptwrp.hxx
+++ b/sd/inc/sdpptwrp.hxx
@@ -25,7 +25,7 @@
 #include 
 
 // SdPPTFilter
-class SdPPTFilter : public SdFilter
+class SdPPTFilter final : public SdFilter
 {
 public:
 SdPPTFilter (
diff --git a/sd/inc/sdxmlwrp.hxx b/sd/inc/sdxmlwrp.hxx
index a73ce57d22f7..9fe46506b9a0 100644
--- a/sd/inc/sdxmlwrp.hxx
+++ b/sd/inc/sdxmlwrp.hxx
@@ -32,7 +32,7 @@ enum SdXMLFilterMode
 SDXMLMODE_Organizer ///< only for import, only the styles are loaded
 };
 

[Libreoffice-commits] core.git: sd/inc sd/source

2019-10-30 Thread Muhammet Kara (via logerrit)
 sd/inc/strings.hrc |1 +
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |6 --
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit f943dd99ce7dfab222edaafbc7e5d3711781f89c
Author: Muhammet Kara 
AuthorDate: Wed Oct 30 12:01:11 2019 +0300
Commit: Muhammet Kara 
CommitDate: Wed Oct 30 15:06:06 2019 +0100

tdf#114175: Set proper title for page rename dialog in Draw

Change-Id: I014a4a654b9f6f4f330e61d1436d2a7aceead0c1
Reviewed-on: https://gerrit.libreoffice.org/81738
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 2a08bee0da7f..514275a4de20 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -232,6 +232,7 @@
 #define STR_HTMLEXP_ERROR_COPY_FILE 
NC_("STR_HTMLEXP_ERROR_COPY_FILE", "The file $(URL1) could not be copied to 
$(URL2)")
 #define STR_STATUSBAR_MASTERPAGE
NC_("STR_STATUSBAR_MASTERPAGE", "Slide Master name. Right-click for list and 
double-click for dialog.")
 #define STR_TITLE_RENAMESLIDE   
NC_("STR_TITLE_RENAMESLIDE", "Rename Slide")
+#define STR_TITLE_RENAMEPAGE
NC_("STR_TITLE_RENAMEPAGE", "Rename Page")
 #define STR_DESC_RENAMESLIDE
NC_("STR_DESC_RENAMESLIDE", "Name")
 #define STR_TITLE_RENAMEMASTER  
NC_("STR_TITLE_RENAMEMASTER", "Rename Master Slide")
 #define STR_PLACEHOLDER_DESCRIPTION_TITLE   
NC_("STR_PLACEHOLDER_DESCRIPTION_TITLE", "Title Area for AutoLayouts" )
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx 
b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index cd43dd1b467f..ba1152da21b6 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -886,6 +886,8 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
 OUString aTitle;
 if( rRequest.GetSlot() == SID_RENAME_MASTER_PAGE )
 aTitle = SdResId( STR_TITLE_RENAMEMASTER );
+else if (pDrView && pDrView->GetDoc().GetDocumentType() == 
DocumentType::Draw)
+aTitle = SdResId( STR_TITLE_RENAMEPAGE );
 else
 aTitle = SdResId( STR_TITLE_RENAMESLIDE );
 
@@ -897,7 +899,7 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
OUString aName = rRequest.GetArgs()->GetItem(SID_RENAMEPAGE)->GetValue();
 
bool bResult =  
RenameSlideFromDrawViewShell(pSelectedPage->GetPageNum()/2, aName );
-   DBG_ASSERT( bResult, "Couldn't rename slide" );
+   DBG_ASSERT( bResult, "Couldn't rename slide or page" );
 }
 else
 {
@@ -921,7 +923,7 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
 bool bResult =
 RenameSlideFromDrawViewShell(
   pSelectedPage->GetPageNum()/2, aNewName );
-DBG_ASSERT( bResult, "Couldn't rename slide" );
+DBG_ASSERT( bResult, "Couldn't rename slide or page" );
 }
 }
 OUString aNewName;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sd/inc sd/source

2019-10-30 Thread Muhammet Kara (via logerrit)
 sd/inc/strings.hrc |1 +
 sd/source/ui/view/viewshe3.cxx |6 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 3701a8a8197f94551a0080ca7db102c0317b2133
Author: Muhammet Kara 
AuthorDate: Wed Oct 30 11:47:36 2019 +0300
Commit: Muhammet Kara 
CommitDate: Wed Oct 30 14:25:10 2019 +0100

tdf#114175: Proper naming for 'Insert Page' undo action in Draw

Change-Id: Ia22b4ee8cde95dac936715ef89ca5ef9811ede12
Reviewed-on: https://gerrit.libreoffice.org/81735
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 10717e37f12c..2a08bee0da7f 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -313,6 +313,7 @@
 #define STR_STANDARD_STYLESHEET_NAME
NC_("STR_STANDARD_STYLESHEET_NAME", "Default" )
 #define STR_UNDO_MOVEPAGES  
NC_("STR_UNDO_MOVEPAGES", "Move slides" )
 #define STR_INSERT_PAGES
NC_("STR_INSERT_PAGES", "Insert Pages" )
+#define STR_INSERT_PAGE_DRAW
NC_("STR_INSERT_PAGE_DRAW", "Insert Page" )
 
 #define STR_POOLSHEET_OBJWITHOUTFILL
NC_("STR_POOLSHEET_OBJWITHOUTFILL", "Object without fill" )
 #define STR_POOLSHEET_OBJNOLINENOFILL   
NC_("STR_POOLSHEET_OBJNOLINENOFILL", "Object with no fill and no line" )
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index 4ffa985b0ed5..cad902ed86db 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -278,9 +278,13 @@ SdPage* ViewShell::CreateOrDuplicatePage (
 // 2. Create a new page or duplicate an existing one.
 View* pDrView = GetView();
 const bool bUndo = pDrView && pDrView->IsUndoEnabled();
-if( bUndo )
+if( bUndo && GetDoc()->GetDocumentType() == DocumentType::Draw)
+pDrView->BegUndo(SdResId(STR_INSERT_PAGE_DRAW));
+else if (bUndo)
 pDrView->BegUndo(SdResId(STR_INSERTPAGE));
 
+
+
 sal_uInt16 nNewPageIndex = 0x;
 switch (nSId)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sd/inc sd/source

2019-10-28 Thread Muhammet Kara (via logerrit)
 sd/inc/strings.hrc |2 ++
 sd/source/ui/dlg/inspagob.cxx  |2 ++
 sd/source/ui/docshell/docshel2.cxx |7 ++-
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 25506d15222e583ce5d62b016cf598a9aef65d09
Author: Muhammet Kara 
AuthorDate: Tue Oct 29 01:16:03 2019 +0300
Commit: Muhammet Kara 
CommitDate: Tue Oct 29 01:14:22 2019 +0100

tdf#108202: Correct Draw page naming in insert pages, and page naming 
dialogs

Change-Id: I2485bc29d6286cc30436fa9ecfb29e724578db41
Reviewed-on: https://gerrit.libreoffice.org/81631
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 26956a1fb751..10717e37f12c 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -74,6 +74,7 @@
 #define STR_TITLE_NAMEGROUP 
NC_("STR_TITLE_NAMEGROUP", "Name Object")
 #define STR_DESC_NAMEGROUP  
NC_("STR_DESC_NAMEGROUP", "Name")
 #define STR_WARN_PAGE_EXISTS
NC_("STR_WARN_PAGE_EXISTS", "The slide name already exists or is invalid. 
Please enter another name.")
+#define STR_WARN_PAGE_EXISTS_DRAW   
NC_("STR_WARN_PAGE_EXISTS_DRAW", "The page name already exists or is invalid. 
Please enter another name.")
 #define STR_SNAPDLG_SETLINE 
NC_("STR_SNAPDLG_SETLINE", "Edit Snap Line")
 #define STR_SNAPDLG_SETPOINT
NC_("STR_SNAPDLG_SETPOINT", "Edit Snap Point")
 #define STR_POPUP_EDIT_SNAPLINE 
NC_("STR_POPUP_EDIT_SNAPLINE", "Edit Snap Line...")
@@ -311,6 +312,7 @@
 #define STR_LAYOUT_DEFAULT_TITLE_NAME   
NC_("STR_LAYOUT_DEFAULT_TITLE_NAME", "Title" )
 #define STR_STANDARD_STYLESHEET_NAME
NC_("STR_STANDARD_STYLESHEET_NAME", "Default" )
 #define STR_UNDO_MOVEPAGES  
NC_("STR_UNDO_MOVEPAGES", "Move slides" )
+#define STR_INSERT_PAGES
NC_("STR_INSERT_PAGES", "Insert Pages" )
 
 #define STR_POOLSHEET_OBJWITHOUTFILL
NC_("STR_POOLSHEET_OBJWITHOUTFILL", "Object without fill" )
 #define STR_POOLSHEET_OBJNOLINENOFILL   
NC_("STR_POOLSHEET_OBJNOLINENOFILL", "Object with no fill and no line" )
diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx
index bab9494acb3e..37fa11ece19c 100644
--- a/sd/source/ui/dlg/inspagob.cxx
+++ b/sd/source/ui/dlg/inspagob.cxx
@@ -49,6 +49,8 @@ SdInsertPagesObjsDlg::SdInsertPagesObjsDlg(
 // insert text
 if (!m_pMedium)
 m_xDialog->set_title(SdResId(STR_INSERT_TEXT));
+else if (m_pDoc && m_pDoc->GetDocumentType() == DocumentType::Draw)
+m_xDialog->set_title(SdResId(STR_INSERT_PAGES));
 
 Reset();
 }
diff --git a/sd/source/ui/docshell/docshel2.cxx 
b/sd/source/ui/docshell/docshel2.cxx
index 92e1024158fd..084c0d313359 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -279,9 +279,14 @@ bool DrawDocShell::CheckPageName(weld::Window* pWin, 
OUString& rName)
 
 if( ! bIsNameValid )
 {
-OUString aDesc( SdResId( STR_WARN_PAGE_EXISTS ) );
+OUString aDesc;
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
 
+if (GetDocumentType() == DocumentType::Draw)
+aDesc = SdResId( STR_WARN_PAGE_EXISTS_DRAW );
+else
+aDesc = SdResId( STR_WARN_PAGE_EXISTS );
+
 ScopedVclPtr 
aNameDlg(pFact->CreateSvxNameDialog(pWin, aStrForDlg, aDesc));
 aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sd/inc sd/source

2019-09-29 Thread Noel Grandin (via logerrit)
 sd/inc/Outliner.hxx|2 -
 sd/inc/anminfo.hxx |2 -
 sd/inc/drawdoc.hxx |   14 

 sd/inc/sdpage.hxx  |2 -
 sd/inc/textapi.hxx |2 -
 sd/source/core/PageListWatcher.cxx |2 -
 sd/source/core/PageListWatcher.hxx |2 -
 sd/source/core/anminfo.cxx |2 -
 sd/source/core/drawdoc.cxx |2 -
 sd/source/core/drawdoc2.cxx|2 -
 sd/source/core/text/textapi.cxx|6 +--
 sd/source/filter/eppt/epptbase.hxx |2 -
 sd/source/filter/eppt/pptx-animations.cxx  |   10 
+++---
 sd/source/filter/eppt/pptx-text.cxx|2 -
 sd/source/filter/eppt/text.hxx |2 -
 sd/source/filter/html/pubdlg.cxx   |4 +-
 sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx |2 -
 sd/source/ui/animations/CustomAnimationPane.cxx|2 -
 sd/source/ui/animations/CustomAnimationPane.hxx|2 -
 sd/source/ui/annotations/annotationwindow.hxx  |2 -
 sd/source/ui/dlg/BulletAndPositionDlg.cxx  |6 +--
 sd/source/ui/dlg/dlgfield.cxx  |2 -
 sd/source/ui/dlg/filedlg.cxx   |2 -
 sd/source/ui/dlg/inspagob.cxx  |2 -
 sd/source/ui/dlg/navigatr.cxx  |2 -
 sd/source/ui/dlg/sdtreelb.cxx  |4 +-
 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx  |2 -
 sd/source/ui/framework/configuration/ConfigurationUpdater.hxx  |2 -
 sd/source/ui/framework/tools/FrameworkHelper.cxx   |2 -
 sd/source/ui/func/fuconbez.cxx |2 -
 sd/source/ui/func/fuconrec.cxx |2 -
 sd/source/ui/func/fudraw.cxx   |4 +-
 sd/source/ui/func/fupage.cxx   |2 -
 sd/source/ui/func/fusel.cxx|2 -
 sd/source/ui/inc/AccessibleSlideSorterObject.hxx   |2 -
 sd/source/ui/inc/BulletAndPositionDlg.hxx  |6 +--
 sd/source/ui/inc/DrawViewShell.hxx |   14 

 sd/source/ui/inc/FrameView.hxx |   16 
+-
 sd/source/ui/inc/OutlineView.hxx   |2 -
 sd/source/ui/inc/SdUnoDrawView.hxx |2 -
 sd/source/ui/inc/View.hxx  |2 -
 sd/source/ui/inc/ViewShell.hxx |6 +--
 sd/source/ui/inc/ViewShellBase.hxx |4 +-
 sd/source/ui/inc/ViewShellImplementation.hxx   |2 -
 sd/source/ui/inc/ViewTabBar.hxx|2 -
 sd/source/ui/inc/Window.hxx|   16 
+-
 sd/source/ui/inc/dlgfield.hxx  |2 -
 sd/source/ui/inc/drawview.hxx  |2 -
 sd/source/ui/inc/filedlg.hxx   |2 -
 sd/source/ui/inc/framework/FrameworkHelper.hxx |2 -
 sd/source/ui/inc/framework/ViewShellWrapper.hxx|2 -
 sd/source/ui/inc/fuconbez.hxx  |2 -
 sd/source/ui/inc/fudraw.hxx|4 +-
 sd/source/ui/inc/fupage.hxx|2 -
 sd/source/ui/inc/fusel.hxx |4 +-
 sd/source/ui/inc/inspagob.hxx  |2 -
 sd/source/ui/inc/navigatr.hxx  |6 +--
 sd/source/ui/inc/sdtreelb.hxx  |6 +--
 sd/source/ui/inc/slideshow.hxx |6 +--
 sd/source/ui/inc/unopage.hxx   |2 -
 sd/source/ui/sidebar/LayoutMenu.cxx|2 -
 sd/source/ui/sidebar/LayoutMenu.hxx|2 -
 sd/source/ui/slideshow/slideshow.cxx   |6 +--
 sd/source/ui/slideshow/slideshowimpl.cxx   |2 -
 

[Libreoffice-commits] core.git: sd/inc

2019-09-26 Thread Caolán McNamara (via logerrit)
 sd/inc/pch/precompiled_sdui.hxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 622a11cf60d9772d6f66ad99a6bd1ef0a3bacb4e
Author: Caolán McNamara 
AuthorDate: Thu Sep 26 09:12:17 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Sep 26 15:27:00 2019 +0200

update sd pch

Change-Id: I3175fa36f006c47933c96288e8e5812ba6d77bb9
Reviewed-on: https://gerrit.libreoffice.org/79592
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/inc/pch/precompiled_sdui.hxx b/sd/inc/pch/precompiled_sdui.hxx
index 5db0c8f19ca1..0fbdaca068f6 100644
--- a/sd/inc/pch/precompiled_sdui.hxx
+++ b/sd/inc/pch/precompiled_sdui.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2019-09-25 10:58:48 using:
+ Generated on 2019-09-26 09:12:06 using:
  ./bin/update_pch sd sdui --cutoff=4 --exclude:system --include:module 
--include:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -91,7 +91,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -103,7 +102,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sd/inc sd/IwyuFilter_sd.yaml sd/source

2019-09-26 Thread Gabor Kelemen (via logerrit)
 sd/IwyuFilter_sd.yaml |   11 ++
 sd/inc/TransitionPreset.hxx   |1 
 sd/inc/drawdoc.hxx|1 
 sd/source/core/CustomAnimationCloner.cxx  |3 
 sd/source/core/CustomAnimationPreset.cxx  |1 
 sd/source/core/TransitionPreset.cxx   |2 
 sd/source/core/drawdoc2.cxx   |3 
 sd/source/core/stlsheet.cxx   |1 
 sd/source/filter/eppt/eppt.cxx|3 
 sd/source/filter/eppt/pptx-animations.cxx |1 
 sd/source/filter/html/htmlattr.cxx|1 
 sd/source/filter/html/htmlex.cxx  |2 
 sd/source/filter/xml/sdxmlwrp.cxx |1 
 sd/source/helper/simplereferencecomponent.cxx |1 
 sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx |1 
 sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx |1 
 sd/source/ui/accessibility/AccessiblePresentationShape.cxx|1 
 sd/source/ui/app/sdmod.cxx|1 
 sd/source/ui/dlg/BulletAndPositionDlg.cxx |   42 
--
 sd/source/ui/dlg/PhotoAlbumDialog.cxx |1 
 sd/source/ui/dlg/RemoteDialogClientBox.cxx|8 -
 sd/source/ui/dlg/RemoteDialogClientBox.hxx|1 
 sd/source/ui/dlg/paragr.cxx   |3 
 sd/source/ui/dlg/sdtreelb.cxx |1 
 sd/source/ui/dlg/tpaction.cxx |1 
 sd/source/ui/framework/tools/FrameworkHelper.cxx  |2 
 sd/source/ui/func/fudraw.cxx  |7 -
 sd/source/ui/func/fuexecuteinteraction.cxx|2 
 sd/source/ui/func/fuinsert.cxx|1 
 sd/source/ui/func/fuolbull.cxx|2 
 sd/source/ui/func/fusel.cxx   |   15 ---
 sd/source/ui/func/futext.cxx  |1 
 sd/source/ui/inc/assclass.hxx |1 
 sd/source/ui/inc/pubdlg.hxx   |1 
 34 files changed, 19 insertions(+), 106 deletions(-)

New commits:
commit 357fff1574ef29732b8a5209af97d9d026ccc650
Author: Gabor Kelemen 
AuthorDate: Thu Sep 19 17:45:19 2019 +0200
Commit: Miklos Vajna 
CommitDate: Thu Sep 26 10:54:22 2019 +0200

tdf#42949 Fix IWYU warnings in sd/

Recheck sd/ after recent refactorings and developments

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I6f0fd19c52889cbd85b387183e2136bca4a1eeca
Reviewed-on: https://gerrit.libreoffice.org/79218
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sd/IwyuFilter_sd.yaml b/sd/IwyuFilter_sd.yaml
index cf0361f74de5..b5b715e0214e 100644
--- a/sd/IwyuFilter_sd.yaml
+++ b/sd/IwyuFilter_sd.yaml
@@ -97,6 +97,9 @@ blacklist:
 # Needed on MACOSX
 - svl/intitem.hxx
 - app.hrc
+sd/source/ui/dlg/sdtreelb.cxx:
+# comphelper::ScopeGuard is actually used
+- comphelper/scopeguard.hxx
 sd/source/ui/framework/configuration/ConfigurationTracer.hxx:
 # Needed for css shortcut
 - sal/types.h
@@ -339,6 +342,11 @@ blacklist:
 sd/source/core/stlsheet.cxx:
 # Needed for UnoType
 - com/sun/star/table/BorderLine.hpp
+# Needed for TypedWhichId macros
+- svx/sdtaaitm.hxx
+- svx/sdtacitm.hxx
+- svx/sdtayitm.hxx
+- svx/sdtaiitm.hxx
 sd/source/core/typemap.cxx:
 # Needed by sdslots.hxx to build
 - config_options.h
@@ -385,6 +393,7 @@ blacklist:
 - svx/sdooitm.hxx
 - svx/sdprcitm.hxx
 - svx/sdtfsitm.hxx
+- svx/unomid.hxx
 - svx/xbtmpit.hxx
 - svx/xfillit0.hxx
 - svx/xflclit.hxx
@@ -443,6 +452,8 @@ blacklist:
 sd/source/ui/framework/configuration/ConfigurationUpdater.cxx:
 # Needed for DEBUG_SD_CONFIGURATION_TRACE
 - ConfigurationTracer.hxx
+# comphelper::ScopeGuard is actually used
+- comphelper/scopeguard.hxx
 sd/source/ui/framework/configuration/ResourceFactoryManager.cxx:
 # Needed for VERBOSE mode
 - sal/log.hxx
diff --git a/sd/inc/TransitionPreset.hxx b/sd/inc/TransitionPreset.hxx
index c8b266338631..ee44e48ee8ad 100644
--- a/sd/inc/TransitionPreset.hxx
+++ b/sd/inc/TransitionPreset.hxx
@@ -23,6 +23,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 64397dd9a960..a9d2172ca0f6 100644
--- a/sd/inc/drawdoc.hxx
+++ 

[Libreoffice-commits] core.git: sd/inc sd/sdi sd/source sfx2/source

2019-07-25 Thread Ashod Nakashian (via logerrit)
 sd/inc/app.hrc |1 
 sd/sdi/SlideSorterController.sdi   |5 
 sd/sdi/drviewsh.sdi|5 
 sd/sdi/sdraw.sdi   |   18 +
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |   11 ++
 sd/source/ui/view/drviews2.cxx |3 ++
 sfx2/source/sidebar/DeckLayouter.cxx   |1 
 sfx2/source/sidebar/SidebarController.cxx  |1 
 8 files changed, 44 insertions(+), 1 deletion(-)

New commits:
commit 11b06f0e00fc21654384e2816842ab101e15010e
Author: Ashod Nakashian 
AuthorDate: Sun Aug 26 22:11:43 2018 -0400
Commit: Noel Grandin 
CommitDate: Thu Jul 25 12:18:58 2019 +0200

sidebar: Add .uno:MasterSlidesPanel

Change-Id: I578dc8b1f9c8df7f7cc9108c70d6fad8006871c6
Reviewed-on: https://gerrit.libreoffice.org/73502
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index 9445f47cd0a7..40424d73097f 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -229,6 +229,7 @@
 #define SID_BEFORE_OBJ  (SID_SD_START+181)
 // FREE
 #define SID_CUSTOM_ANIMATION_PANEL  (SID_SD_START+183)
+#define SID_MASTER_SLIDES_PANEL (SID_SD_START+184)
 // FREE
 // and even more...
 #define ID_VAL_ENDINTENS(SID_SD_START+197)
diff --git a/sd/sdi/SlideSorterController.sdi b/sd/sdi/SlideSorterController.sdi
index 5937ba159cec..e9d1ae77d7b2 100644
--- a/sd/sdi/SlideSorterController.sdi
+++ b/sd/sdi/SlideSorterController.sdi
@@ -204,6 +204,11 @@ interface SlideSorterView
 ExecMethod = FuTemporary ;
 StateMethod = GetMenuState ;
 ]
+SID_MASTER_SLIDES_PANEL // ole : no, status : ?
+[
+ExecMethod = FuTemporary ;
+StateMethod = GetMenuState ;
+]
 SID_PRESENTATION_DLG
 [
 ExecMethod = FuTemporary ;
diff --git a/sd/sdi/drviewsh.sdi b/sd/sdi/drviewsh.sdi
index 7ee014de5f76..1139fc5790b5 100644
--- a/sd/sdi/drviewsh.sdi
+++ b/sd/sdi/drviewsh.sdi
@@ -57,6 +57,11 @@ interface ImpressEditView : DrawView
 ExecMethod = FuTemporary ;
 StateMethod = GetMenuState ;
 ]
+SID_MASTER_SLIDES_PANEL // ole : no, status : ?
+[
+ExecMethod = FuTemporary ;
+StateMethod = GetMenuState ;
+]
 SID_REHEARSE_TIMINGS // ole : no, status : ?
 [
 ExecMethod = FuSupport ;
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index ad88ee8a09ab..ca7d5bed8ac1 100644
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -3542,6 +3542,24 @@ SfxBoolItem SlideChangeWindow SID_SLIDE_TRANSITIONS_PANEL
 GroupId = SfxGroupId::Modify;
 ]
 
+SfxBoolItem MasterSlidesPanel SID_MASTER_SLIDES_PANEL
+
+[
+AutoUpdate = TRUE,
+FastCall = FALSE,
+ReadOnlyDoc = FALSE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+
+AccelConfig = TRUE,
+MenuConfig = TRUE,
+ToolBoxConfig = TRUE,
+GroupId = SfxGroupId::Modify;
+]
+
 SfxVoidItem SlideMasterPage SID_SLIDE_MASTER_MODE
 ()
 [
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx 
b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 17b4adeeb958..4c2af27c3a93 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -181,6 +181,17 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
 break;
 }
 
+case SID_MASTER_SLIDES_PANEL:
+{
+// First make sure that the sidebar is visible
+pShell->GetViewFrame()->ShowChildWindow(SID_SIDEBAR);
+::sfx2::sidebar::Sidebar::ShowPanel(
+"SdAllMasterPagesPanel",
+pShell->GetViewFrame()->GetFrame().GetFrameInterface());
+rRequest.Ignore ();
+break;
+}
+
 case SID_PRESENTATION_DLG:
 FuSlideShowDlg::Create (
 pShell,
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 11025537247f..3c70dc1596c6 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -3176,6 +3176,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 break;
 
 case SID_SLIDE_TRANSITIONS_PANEL:
+case SID_MASTER_SLIDES_PANEL:
 case SID_CUSTOM_ANIMATION_PANEL:
 case SID_GALLERY:
 {
@@ -3189,6 +3190,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 panelId = "GalleryPanel";
 else if (nSId == SID_SLIDE_TRANSITIONS_PANEL)
 panelId = "SdSlideTransitionPanel";
+else if (nSId == SID_MASTER_SLIDES_PANEL)
+panelId = "SdAllMasterPagesPanel";
 
 ::sfx2::sidebar::Sidebar::ShowPanel(
 panelId,
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx 

[Libreoffice-commits] core.git: sd/inc sd/source

2019-07-25 Thread Ashod Nakashian (via logerrit)
 sd/inc/TransitionPreset.hxx |4 ++-
 sd/source/core/TransitionPreset.cxx |   44 +++-
 2 files changed, 22 insertions(+), 26 deletions(-)

New commits:
commit 3fa4f52ad52a1db53c2336eac8053502b03681e3
Author: Ashod Nakashian 
AuthorDate: Mon Jan 28 20:39:17 2019 -0500
Commit: Noel Grandin 
CommitDate: Thu Jul 25 11:24:37 2019 +0200

sd: LOK: support localization of slide transition presets

Reviewed-on: https://gerrit.libreoffice.org/68264
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
(cherry picked from commit 312346531dde33cd000a1d3c95c7b7829b656438)

Change-Id: Ic3ea57e537e118e10d155203921574967154c234
Reviewed-on: https://gerrit.libreoffice.org/76283
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/TransitionPreset.hxx b/sd/inc/TransitionPreset.hxx
index 14518e51b661..c8b266338631 100644
--- a/sd/inc/TransitionPreset.hxx
+++ b/sd/inc/TransitionPreset.hxx
@@ -42,7 +42,6 @@ class TransitionPreset
 {
 public:
 static const TransitionPresetList& getTransitionPresetList();
-static bool importTransitionPresetList( TransitionPresetList& rList );
 
 sal_Int16 getTransition() const { return mnTransition; }
 sal_Int16 getSubtype() const { return mnSubtype; }
@@ -57,6 +56,9 @@ public:
 private:
 TransitionPreset( const css::uno::Reference< 
css::animations::XAnimationNode >& xNode );
 
+static bool importTransitionPresetList(TransitionPresetList& rList);
+static std::map mPresetsMap;
+
 sal_Int16 mnTransition;
 sal_Int16 mnSubtype;
 bool mbDirection;
diff --git a/sd/source/core/TransitionPreset.cxx 
b/sd/source/core/TransitionPreset.cxx
index 4dc21cd8afcf..a654072132a4 100644
--- a/sd/source/core/TransitionPreset.cxx
+++ b/sd/source/core/TransitionPreset.cxx
@@ -27,11 +27,15 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 #include 
 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -227,34 +231,24 @@ bool TransitionPreset::importTransitionPresetList( 
TransitionPresetList& rList )
 return bRet;
 }
 
-namespace
-{
-class ImportedTransitionPresetList
-{
-private:
-sd::TransitionPresetList m_aTransitionPresetList;
-public:
-ImportedTransitionPresetList()
-{
-sd::TransitionPreset::importTransitionPresetList(
-m_aTransitionPresetList);
-}
-const sd::TransitionPresetList& getList() const
-{
-return m_aTransitionPresetList;
-}
-};
-
-class theTransitionPresetList :
-public rtl::Static
-{
-};
-}
+std::map sd::TransitionPreset::mPresetsMap;
 
 const TransitionPresetList& TransitionPreset::getTransitionPresetList()
 {
-return theTransitionPresetList::get().getList();
+// Support localization per-view. Currently not useful for Desktop
+// but very much critical for LOK. The cache now is per-language.
+const OUString aLang = comphelper::LibreOfficeKit::isActive()
+   ? 
comphelper::LibreOfficeKit::getLanguageTag().getLanguage()
+   : 
SvtSysLocaleOptions().GetLanguageTag().getLanguage();
+
+SolarMutexGuard aGuard;
+const auto it = mPresetsMap.find(aLang);
+if (it != mPresetsMap.end())
+return it->second;
+
+TransitionPresetList& rList = mPresetsMap[aLang];
+sd::TransitionPreset::importTransitionPresetList(rList);
+return rList;
 }
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sd/inc sd/source

2019-07-24 Thread Ashod Nakashian (via logerrit)
 sd/inc/CustomAnimationPreset.hxx|6 +++-
 sd/source/core/CustomAnimationPreset.cxx|   34 ++--
 sd/source/ui/animations/CustomAnimationPane.cxx |   20 --
 sd/source/ui/animations/CustomAnimationPane.hxx |   12 +---
 4 files changed, 34 insertions(+), 38 deletions(-)

New commits:
commit 3b55741586883d4fbb7f3e4c5368b5382c3ce5f8
Author: Ashod Nakashian 
AuthorDate: Mon Jan 28 10:03:39 2019 -0500
Commit: Noel Grandin 
CommitDate: Wed Jul 24 21:01:51 2019 +0200

sd: LOK: support per-user localization of CustomAnimationPreset

This only fixes the caching in CustomAnimationPreset and
CustomAnimationPane. Other cached labels will be done separately.

Reviewed-on: https://gerrit.libreoffice.org/68263
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
(cherry picked from commit b44679e47211a27f4fe22d05762d9d48c8f88935)

Change-Id: Iaf511168d26b3a5567ca53556e242d3c071d2623
Reviewed-on: https://gerrit.libreoffice.org/76241
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/inc/CustomAnimationPreset.hxx b/sd/inc/CustomAnimationPreset.hxx
index ac55ad77..57669734014b 100644
--- a/sd/inc/CustomAnimationPreset.hxx
+++ b/sd/inc/CustomAnimationPreset.hxx
@@ -88,6 +88,9 @@ public:
 SAL_DLLPRIVATE CustomAnimationPresets();
 SAL_DLLPRIVATE ~CustomAnimationPresets();
 
+/** This method gets presets instance, which is localized
+ * for the current user's locale.
+*/
 static const CustomAnimationPresets& getCustomAnimationPresets();
 
 SAL_DLLPRIVATE css::uno::Reference< css::animations::XAnimationNode > 
getRandomPreset( sal_Int16 nPresetClass ) const;
@@ -125,7 +128,8 @@ private:
 PresetCategoryList maMotionPathsPresets;
 PresetCategoryList maMiscPresets;
 
-SAL_DLLPRIVATE static CustomAnimationPresets*  mpCustomAnimationPresets;
+//! Maps per-language the animation presets.
+SAL_DLLPRIVATE static std::map  
mpCustomAnimationPresetsMap;
 };
 
 
diff --git a/sd/source/core/CustomAnimationPreset.cxx 
b/sd/source/core/CustomAnimationPreset.cxx
index 1f2066e6af9c..4c02acc25d6c 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -35,6 +35,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 #include 
 
 #include 
@@ -521,22 +524,27 @@ void CustomAnimationPresets::changePresetSubType( const 
CustomAnimationEffectPtr
 }
 }
 
-CustomAnimationPresets* CustomAnimationPresets::mpCustomAnimationPresets = 
nullptr;
+std::map  
CustomAnimationPresets::mpCustomAnimationPresetsMap;
 
 const CustomAnimationPresets& 
CustomAnimationPresets::getCustomAnimationPresets()
 {
-if( !mpCustomAnimationPresets )
-{
-SolarMutexGuard aGuard;
-
-if( !mpCustomAnimationPresets )
-{
-mpCustomAnimationPresets = new sd::CustomAnimationPresets();
-mpCustomAnimationPresets->importResources();
-}
-}
-
-return *mpCustomAnimationPresets;
+// Support localization per-view. Currently not useful for Desktop
+// but very much critical for LOK. The cache now is per-language.
+const OUString aLang = comphelper::LibreOfficeKit::isActive()
+   ? 
comphelper::LibreOfficeKit::getLanguageTag().getLanguage()
+   : 
SvtSysLocaleOptions().GetLanguageTag().getLanguage();
+
+SolarMutexGuard aGuard;
+const auto it = mpCustomAnimationPresetsMap.find(aLang);
+if (it != mpCustomAnimationPresetsMap.end())
+return *it->second;
+
+// Note: we are invoked recursively(!), so we must set the instance pointer
+// in the cache map before we importResources, lest we get in infinite 
loop.
+sd::CustomAnimationPresets* pCustomAnimationPresets = new 
sd::CustomAnimationPresets();
+mpCustomAnimationPresetsMap[aLang] = pCustomAnimationPresets;
+pCustomAnimationPresets->importResources();
+return *pCustomAnimationPresets;
 }
 
 Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 
nPresetClass ) const
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index 6971328837e8..ee1807187fbd 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -124,7 +124,6 @@ CustomAnimationPane::CustomAnimationPane( Window* pParent, 
ViewShellBase& rBase,
   const 
css::uno::Reference& rxFrame )
 :   PanelLayout( pParent, "CustomAnimationsPanel", 
"modules/simpress/ui/customanimationspanel.ui", rxFrame ),
 mrBase( rBase ),
-mpCustomAnimationPresets(nullptr),
 mnPropertyType( nPropertyTypeNone ),
 mnCurvePathPos( LISTBOX_ENTRY_NOTFOUND ),
 mnPolygonPathPos( LISTBOX_ENTRY_NOTFOUND ),
@@ -532,7 +531,7 @@ void CustomAnimationPane::updateControls()
 {
 

[Libreoffice-commits] core.git: sd/inc sd/IwyuFilter_sd.yaml sd/source

2019-07-10 Thread Gabor Kelemen (via logerrit)
 sd/IwyuFilter_sd.yaml   |6 ++
 sd/inc/notifydocumentevent.hxx  |2 ++
 sd/inc/randomnode.hxx   |5 +
 sd/inc/sdpptwrp.hxx |2 ++
 sd/inc/shapelist.hxx|1 +
 sd/inc/stlpool.hxx  |1 +
 sd/source/filter/eppt/pptx-animations.hxx   |7 +++
 sd/source/filter/xml/sdtransform.hxx|2 ++
 sd/source/ui/dlg/BulletAndPositionDlg.cxx   |1 +
 sd/source/ui/dlg/PhotoAlbumDialog.hxx   |2 ++
 sd/source/ui/inc/AccessibleOutlineEditSource.hxx|1 +
 sd/source/ui/inc/BulletAndPositionDlg.hxx   |3 ---
 sd/source/ui/inc/assclass.hxx   |1 +
 sd/source/ui/inc/createcustomanimationpanel.hxx |5 +
 sd/source/ui/inc/createslidetransitionpanel.hxx |5 +
 sd/source/ui/inc/dlgpage.hxx|1 +
 sd/source/ui/inc/docprev.hxx|2 ++
 sd/source/ui/inc/filedlg.hxx|1 +
 sd/source/ui/inc/registerinterfaces.hxx |1 +
 sd/source/ui/inc/sdpopup.hxx|1 +
 sd/source/ui/inc/tablefunction.hxx  |3 +++
 sd/source/ui/inc/tpaction.hxx   |1 +
 sd/source/ui/inc/unchss.hxx |2 ++
 sd/source/ui/inc/undoback.hxx   |2 ++
 sd/source/ui/inc/unokywds.hxx   |2 --
 sd/source/ui/remotecontrol/ZeroconfService.hxx  |2 --
 sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx |2 ++
 sd/source/ui/sidebar/MasterPagesSelector.hxx|2 +-
 sd/source/ui/slideshow/slideshowviewimpl.hxx|1 -
 sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx|1 +
 sd/source/ui/unoidl/unopool.hxx |3 +++
 31 files changed, 62 insertions(+), 9 deletions(-)

New commits:
commit e77999fda551867e4fc199a489cf898821ef6d09
Author: Gabor Kelemen 
AuthorDate: Sat Jun 29 22:13:45 2019 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jul 10 09:51:15 2019 +0200

tdf#42949 Fix IWYU warnings in sd/*/hxx

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

New IWYU and recent developments in f-u-i helped to identify
some non self contained files, those were fixed too.

Change-Id: I4b1b4fe59c572cdd969d26aac13a276d5aa6844c
Reviewed-on: https://gerrit.libreoffice.org/74981
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sd/IwyuFilter_sd.yaml b/sd/IwyuFilter_sd.yaml
index 930f081dd117..13a431777e23 100644
--- a/sd/IwyuFilter_sd.yaml
+++ b/sd/IwyuFilter_sd.yaml
@@ -279,6 +279,9 @@ blacklist:
 sd/source/ui/sidebar/PanelFactory.hxx:
 # base class has to be a complete type
 - com/sun/star/ui/XUIElementFactory.hpp
+sd/source/ui/sidebar/PageMarginUtils.hxx:
+# Needed for std::abs
+- cmath
 sd/source/ui/slideshow/slideshowimpl.hxx:
 # base class has to be a complete type
 - com/sun/star/presentation/XShapeEventListener.hpp
@@ -411,6 +414,9 @@ blacklist:
 sd/source/filter/eppt/epptso.cxx:
 # Needed for direct member access
 - com/sun/star/table/XTable.hpp
+sd/source/filter/eppt/pptx-animations.hxx:
+# Needed for typedef
+- sax/fshelper.hxx
 sd/source/filter/eppt/pptx-epptooxml.cxx:
 # Needed for direct member access
 - com/sun/star/task/XStatusIndicator.hpp
diff --git a/sd/inc/notifydocumentevent.hxx b/sd/inc/notifydocumentevent.hxx
index 960999774c02..16c74a318522 100644
--- a/sd/inc/notifydocumentevent.hxx
+++ b/sd/inc/notifydocumentevent.hxx
@@ -21,6 +21,8 @@
 #define INCLUDED_SD_INC_NOTIFYDOCUMENTEVENT_HXX
 
 #include 
+#include 
+#include 
 
 class SdDrawDocument;
 
diff --git a/sd/inc/randomnode.hxx b/sd/inc/randomnode.hxx
index 83cb52b44c38..2a30b448541e 100644
--- a/sd/inc/randomnode.hxx
+++ b/sd/inc/randomnode.hxx
@@ -22,6 +22,11 @@
 
 #include 
 
+#include 
+#include 
+
+#include "sddllapi.h"
+
 namespace sd {
 
 SD_DLLPUBLIC css::uno::Reference
diff --git a/sd/inc/sdpptwrp.hxx b/sd/inc/sdpptwrp.hxx
index 85ad2ffa5ad2..6414226d4596 100644
--- a/sd/inc/sdpptwrp.hxx
+++ b/sd/inc/sdpptwrp.hxx
@@ -22,6 +22,8 @@
 
 #include "sdfilter.hxx"
 
+#include 
+
 // SdPPTFilter
 class SdPPTFilter : public SdFilter
 {
diff --git a/sd/inc/shapelist.hxx b/sd/inc/shapelist.hxx
index a129b9fceca5..beef8211c9bb 100644
--- a/sd/inc/shapelist.hxx
+++ b/sd/inc/shapelist.hxx
@@ -20,6 +20,7 @@
 #ifndef INCLUDED_SD_INC_SHAPELIST_HXX
 #define INCLUDED_SD_INC_SHAPELIST_HXX
 
+#include 
 #include 
 
 #include 
diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx
index d1fd4505fc80..3f60309813a2 100644
--- a/sd/inc/stlpool.hxx
+++ b/sd/inc/stlpool.hxx
@@ -25,6 +25,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
diff --git 

[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig

2019-03-14 Thread Libreoffice Gerrit user
 sd/inc/sdabstdlg.hxx |2 +-
 sd/qa/unit/dialogs-test.cxx  |2 +-
 sd/source/ui/dlg/sddlgfact.cxx   |   13 -
 sd/source/ui/dlg/sddlgfact.hxx   |   13 ++---
 sd/source/ui/dlg/tpaction.cxx|   17 -
 sd/source/ui/func/fuoaprms.cxx   |2 +-
 sd/source/ui/inc/tpaction.hxx|4 ++--
 sd/uiconfig/simpress/ui/interactiondialog.ui |8 +++-
 8 files changed, 38 insertions(+), 23 deletions(-)

New commits:
commit 8bc23968129fc38d70fb614668a411599d4e6d0e
Author: Caolán McNamara 
AuthorDate: Wed Mar 13 14:17:22 2019 +
Commit: Caolán McNamara 
CommitDate: Thu Mar 14 11:22:58 2019 +0100

weld SdActionDlg

Change-Id: I2d43c1fc65e8cfed1e252e1a16c37b907ec9f319
Reviewed-on: https://gerrit.libreoffice.org/69180
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index adb34590569c..5ecd310d54f8 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -185,7 +185,7 @@ public:
 virtual VclPtr   
CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, 
bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, 
SfxStyleSheetBasePool* pSSPool) = 0;
 virtual VclPtr
CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, 
const SfxItemSet& rInAttrs) = 0;
 virtual VclPtr   
CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, 
SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0;
-virtual VclPtr  
CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* 
pView) = 0;
+virtual VclPtr  
CreatSdActionDialog(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* 
pView) = 0;
 virtual VclPtr 
CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, 
::sd::DrawDocShell* pDocShell) = 0;
 virtual VclPtrCreateSdPublishingDlg( 
vcl::Window* pWindow, DocumentType eDocType) = 0;
 
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 7a8ea154a8c2..1b114462584a 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -532,7 +532,7 @@ VclPtr 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
 aSet.Put(SfxBoolItem(ATTR_ACTION_SOUNDON, false));
 aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false));
 pRetval = getSdAbstractDialogFactory()->CreatSdActionDialog(
-getViewShell()->GetActiveWindow(),
+getViewShell()->GetFrameWeld(),
 ,
 getDrawView());
 break;
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 0818046394b1..c29066beca1f 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -109,7 +109,10 @@ short AbstractSdPresLayoutDlg_Impl::Execute()
 return m_xDlg->run();
 }
 
-IMPL_ABSTDLG_BASE(SdAbstractSfxDialog_Impl);
+short SdAbstractSfxDialog_Impl::Execute()
+{
+return m_xDlg->run();
+}
 
 short AbstractSdVectorizeDlg_Impl::Execute()
 {
@@ -342,12 +345,12 @@ void AbstractSdPresLayoutDlg_Impl::GetAttr( SfxItemSet& 
rOutAttrs )
 
 const SfxItemSet* SdAbstractSfxDialog_Impl::GetOutputItemSet() const
 {
-return pDlg->GetOutputItemSet();
+return m_xDlg->GetOutputItemSet();
 }
 
 void SdAbstractSfxDialog_Impl::SetText( const OUString& rStr )
 {
-pDlg->SetText( rStr );
+m_xDlg->set_title(rStr);
 }
 
 const GDIMetaFile& AbstractSdVectorizeDlg_Impl::GetGDIMetaFile() const
@@ -455,9 +458,9 @@ VclPtr  
SdAbstractDialogFactory_Impl::CreateSdTabTemplateD
 return 
VclPtr::Create(std::make_unique(pParent,
 pDocShell, rStyleBase, pModel, pView));
 }
 
-VclPtr 
SdAbstractDialogFactory_Impl::CreatSdActionDialog(vcl::Window* pParent, const 
SfxItemSet* pAttr, ::sd::View* pView )
+VclPtr 
SdAbstractDialogFactory_Impl::CreatSdActionDialog(weld::Window* pParent, const 
SfxItemSet* pAttr, ::sd::View* pView )
 {
-return VclPtr::Create( 
VclPtr::Create( pParent, pAttr, pView ) );
+return 
VclPtr::Create(std::make_unique(pParent, 
pAttr, pView));
 }
 
 VclPtr  
SdAbstractDialogFactory_Impl::CreateSdVectorizeDlg(weld::Window* pParent, const 
Bitmap& rBmp, ::sd::DrawDocShell* pDocShell)
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 269795b4c690..8f419d943036 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -292,9 +292,16 @@ public:
 
 class SdAbstractSfxDialog_Impl : public SfxAbstractDialog
 {
-DECL_ABSTDLG_BASE(SdAbstractSfxDialog_Impl,SfxModalDialog)
+private:
+std::unique_ptr m_xDlg;
+public:
+SdAbstractSfxDialog_Impl(std::unique_ptr 
pDlg)
+: m_xDlg(std::move(pDlg))
+{
+}
+virtual short   Execute() override;
 virtual const SfxItemSet*   

[Libreoffice-commits] core.git: sd/inc sd/source sd/xml

2019-02-24 Thread Libreoffice Gerrit user
 sd/inc/strings.hrc  |1 +
 sd/source/ui/animations/CustomAnimationList.cxx |2 ++
 sd/xml/effects.xml  |6 +++---
 3 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit df8629e14f522d9116d81bdc09dad4b438e4e2cf
Author: Mark Hung 
AuthorDate: Sun Feb 24 13:09:28 2019 +0800
Commit: Mark Hung 
CommitDate: Mon Feb 25 01:30:19 2019 +0100

sd: fix preset class for media call effects.

Change-Id: I2a2a72a3a19beb9911fa694e983945480029ae0d
Reviewed-on: https://gerrit.libreoffice.org/68276
Tested-by: Jenkins
Reviewed-by: Mark Hung 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index c0d6631d5b19..02f709408d72 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -442,6 +442,7 @@
 #define STR_CUSTOMANIMATION_EMPHASIS
NC_("STR_CUSTOMANIMATION_EMPHASIS", "Emphasis: %1")
 #define STR_CUSTOMANIMATION_EXIT
NC_("STR_CUSTOMANIMATION_EXIT", "Exit: %1")
 #define STR_CUSTOMANIMATION_MOTION_PATHS
NC_("STR_CUSTOMANIMATION_MOTION_PATHS", "Motion Paths: %1")
+#define STR_CUSTOMANIMATION_MISC
NC_("STR_CUSTOMANIMATION_MISC", "Misc: %1")
 #define STR_SLIDETRANSITION_NONE
NC_("STR_SLIDETRANSITION_NONE", "None")
 
 #define STR_ANNOTATION_TODAY
NC_("STR_ANNOTATION_TODAY", "Today," )
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx 
b/sd/source/ui/animations/CustomAnimationList.cxx
index d3f88d483f1d..a3c210d55013 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -253,6 +253,8 @@ CustomAnimationListEntryItem::CustomAnimationListEntryItem( 
const OUString& aDes
 msEffectName = SdResId(STR_CUSTOMANIMATION_EMPHASIS); break;
 case EffectPresetClass::MOTIONPATH:
 msEffectName = SdResId(STR_CUSTOMANIMATION_MOTION_PATHS); break;
+default:
+msEffectName = SdResId(STR_CUSTOMANIMATION_MISC); break;
 }
 msEffectName = msEffectName.replaceFirst( "%1" , 
CustomAnimationPresets::getCustomAnimationPresets().getUINameForPresetId(mpEffect->getPresetId()));
 }
diff --git a/sd/xml/effects.xml b/sd/xml/effects.xml
index b7789383ed27..393ad5d50263 100644
--- a/sd/xml/effects.xml
+++ b/sd/xml/effects.xml
@@ -2641,21 +2641,21 @@
 
 
 
-
+
 
 
 
 
 
 
-
+
 
 
 
 
 
 
-
+
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sd/inc sd/source

2019-01-30 Thread Libreoffice Gerrit user
 sd/inc/strings.hrc   |1 +
 sd/source/ui/slideshow/slideshow.cxx |6 ++
 2 files changed, 7 insertions(+)

New commits:
commit 7373581b52ef3870e463585f53a798acb544d9a7
Author: Sumit Chauhan 
AuthorDate: Fri Jan 25 17:15:35 2019 +0530
Commit: Mike Kaganski 
CommitDate: Thu Jan 31 02:17:21 2019 +0100

tdf#98143 ,Providing title for the fullscreen slideshow .

The bug is solved by calling SystemWindow::SetText().

Change-Id: If069adaded88e32a23847d519c4177643ac2acfd
Reviewed-on: https://gerrit.libreoffice.org/66919
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 16a35da20e35..22f10372f2ab 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -147,6 +147,7 @@
 #define STR_EFFECTDLG_DOCUMENT  
NC_("STR_EFFECTDLG_DOCUMENT", "Document")
 #define STR_EFFECTDLG_PROGRAM   
NC_("STR_EFFECTDLG_PROGRAM", "Program")
 #define STR_EFFECTDLG_MACRO 
NC_("STR_EFFECTDLG_MACRO", "Macro")
+#define STR_FULLSCREEN_SLIDESHOW
NC_("STR_FULLSCREEN_SLIDESHOW", "Presenting: %s")
 // Strings for animation effects
 #define STR_INSERT_TEXT NC_("STR_INSERT_TEXT", 
"Insert Text")
 #define STR_SLIDE_SINGULAR  
NC_("STR_SLIDE_SINGULAR", " Slide")
diff --git a/sd/source/ui/slideshow/slideshow.cxx 
b/sd/source/ui/slideshow/slideshow.cxx
index 5bf3202dd0e2..864cc4a8b2bb 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -57,6 +57,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using ::com::sun::star::presentation::XSlideShowController;
 using ::sd::framework::FrameworkHelper;
@@ -,6 +1113,10 @@ void SlideShow::StartFullscreenPresentation( )
 const sal_Int32 nDisplay (GetDisplay());
 VclPtr pWorkWindow = 
VclPtr::Create(this, mpCurrentViewShellBase);
 pWorkWindow->SetBackground(Wallpaper(COL_BLACK));
+OUString Title(SdResId(STR_FULLSCREEN_SLIDESHOW));
+Title = Title.replaceFirst("%s",
+   
mpCurrentViewShellBase->GetDocShell()->GetTitle(SFX_TITLE_DETECT));
+pWorkWindow->SetText(Title);
 pWorkWindow->StartPresentationMode( true, 
mpDoc->getPresentationSettings().mbAlwaysOnTop ? PresentationFlags::HideAllApps 
: PresentationFlags::NONE, nDisplay);
 //pWorkWindow->ShowFullScreenMode(sal_False, nDisplay);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   3   >