[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sd/inc sd/source sfx2/source

2020-11-10 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 432b72852fc3cd39392f6fd878e946790024a412
Author: Jan-Marek Glogowski 
AuthorDate: Wed Oct 21 00:18:03 2020 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Tue Nov 10 17:29:20 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 
(cherry picked from commit d4892e5452bff155da6c34063ffe8c331284d8e9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105065

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 f16751c0085c..ea9d4b695421 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;
@@ -465,7 +469,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest const & 
rReq )
 if( !aStandardTemplate.isEmpty() )
 {
 //load a template document
-pFrame = CreateFromTemplate( aStandardTemplate, xTargetFrame );
+pFrame = CreateFromTemplate(aStandardTemplate, xTargetFrame, 
true);
 }
 else
 {
@@ -486,7 +490,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);
 }
 }
 
@@ -507,6 +511,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;
-

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sd/inc

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

New commits:
commit 5efdd8cb7cc9253931557713a09733713c9047bf
Author: Srijan Bhatia 
AuthorDate: Sat May 30 21:17:14 2020 +0530
Commit: Heiko Tietze 
CommitDate: Sat Jun 13 10:25:49 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 
(cherry picked from commit 4949050c43300eee047531d856bd4a25e60980c3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96217
Tested-by: Jenkins

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