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

2018-05-11 Thread Caolán McNamara
 sd/UIConfig_sdraw.mk  |1 
 sd/qa/unit/data/dialogs-test.txt  |1 
 sd/source/ui/table/TableDesignPane.cxx|   20 --
 sd/source/ui/table/TableDesignPane.hxx|   16 --
 sd/source/ui/table/tablefunction.cxx  |   18 --
 sd/uiconfig/sdraw/ui/tabledesigndialog.ui |  201 --
 6 files changed, 5 insertions(+), 252 deletions(-)

New commits:
commit 6776a3ba00cf9ba304cd4e158d09b3cc03f68ac9
Author: Caolán McNamara 
Date:   Thu May 10 17:46:08 2018 +0100

draw has a sidebar, so impress/draw can use same table properties pane

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

diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk
index 1d2d6e9f2a1e..0091db50ddd8 100644
--- a/sd/UIConfig_sdraw.mk
+++ b/sd/UIConfig_sdraw.mk
@@ -113,7 +113,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\
sd/uiconfig/sdraw/ui/namedesign \
sd/uiconfig/sdraw/ui/paranumberingtab \
sd/uiconfig/sdraw/ui/queryunlinkimagedialog \
-   sd/uiconfig/sdraw/ui/tabledesigndialog \
sd/uiconfig/sdraw/ui/vectorize \
 ))
 
diff --git a/sd/qa/unit/data/dialogs-test.txt b/sd/qa/unit/data/dialogs-test.txt
index eb70982b92c5..63ee21c9550c 100644
--- a/sd/qa/unit/data/dialogs-test.txt
+++ b/sd/qa/unit/data/dialogs-test.txt
@@ -55,7 +55,6 @@ modules/simpress/ui/headerfooterdialog.ui
 
 modules/sdraw/ui/paranumberingtab.ui
 modules/sdraw/ui/namedesign.ui
-modules/sdraw/ui/tabledesigndialog.ui
 
 # currently deactivated, leads to problems and the test to not work
 # This is typically a hint that these should be hard-coded in the
diff --git a/sd/source/ui/table/TableDesignPane.cxx 
b/sd/source/ui/table/TableDesignPane.cxx
index 71f331b43eb8..5e1114ea5e51 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -769,20 +769,6 @@ void TableDesignWidget::FillDesignPreviewControl()
 m_pValueSet->SelectItem(nSelectedItem);
 }
 
-short TableDesignDialog::Execute()
-{
-if( ModalDialog::Execute() )
-{
-if( aImpl.isStyleChanged() )
-aImpl.ApplyStyle();
-
-if( aImpl.isOptionsChanged() )
-aImpl.ApplyOptions();
-return RET_OK;
-}
-return RET_CANCEL;
-}
-
 VclPtr createTableDesignPanel( vcl::Window* pParent, 
ViewShellBase& rBase )
 {
 VclPtr pRet = nullptr;
@@ -796,12 +782,6 @@ VclPtr createTableDesignPanel( vcl::Window* 
pParent, ViewShellBase&
 return pRet;
 }
 
-void showTableDesignDialog( vcl::Window* pParent, ViewShellBase& rBase )
-{
-ScopedVclPtrInstance< TableDesignDialog > xDialog( pParent, rBase );
-xDialog->Execute();
-}
-
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/table/TableDesignPane.hxx 
b/sd/source/ui/table/TableDesignPane.hxx
index 6450674e60c5..347e4ed980c2 100644
--- a/sd/source/ui/table/TableDesignPane.hxx
+++ b/sd/source/ui/table/TableDesignPane.hxx
@@ -126,22 +126,6 @@ public:
 }
 };
 
-class TableDesignDialog : public ModalDialog
-{
-private:
-TableDesignWidget aImpl;
-public:
-TableDesignDialog( vcl::Window* pParent, ViewShellBase& rBase )
-: ModalDialog(pParent, "TableDesignDialog",
-"modules/sdraw/ui/tabledesigndialog.ui")
-, aImpl(this, rBase, true)
-{
-}
-virtual short Execute() override;
-};
-
-void showTableDesignDialog( vcl::Window*, ViewShellBase& );
-
 }
 
 #endif // _SD_TABLEFORMATPANE_HXX
diff --git a/sd/source/ui/table/tablefunction.cxx 
b/sd/source/ui/table/tablefunction.cxx
index 4a998e0dc8ad..818cde2f7c57 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -227,19 +227,11 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
 }
 case SID_TABLEDESIGN:
 {
-if( GetDoc() && (GetDoc()->GetDocumentType() == DocumentType::Draw) )
-{
-// in draw open a modal dialog since we have no tool pane yet
-showTableDesignDialog( GetActiveWindow(), GetViewShellBase() );
-}
-else
-{
-// First make sure that the sidebar is visible
-GetViewFrame()->ShowChildWindow(SID_SIDEBAR);
-::sfx2::sidebar::Sidebar::ShowPanel(
-"SdTableDesignPanel",
-GetViewFrame()->GetFrame().GetFrameInterface());
-}
+// First make sure that the sidebar is visible
+GetViewFrame()->ShowChildWindow(SID_SIDEBAR);
+::sfx2::sidebar::Sidebar::ShowPanel(
+"SdTableDesignPanel",
+GetViewFrame()->GetFrame().GetFrameInterface());
 
 Cancel();
 rReq.Done ();
diff --git a/sd/uiconfig/sdraw/ui/tabledesigndialog.ui 
b/sd/uiconfig/sdraw/ui/tabledesigndialog.ui
deleted file mode 100644
index ecac4ed7f255..
--- 

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

2017-11-17 Thread Henry Castro
 sd/qa/unit/tiledrendering/tiledrendering.cxx |4 +-
 sd/source/ui/docshell/docshel3.cxx   |3 -
 sd/source/ui/docshell/docshell.cxx   |   54 +++
 sd/source/ui/view/ViewShellBase.cxx  |   15 +++
 sd/uiconfig/simpress/statusbar/statusbar.xml |1 
 5 files changed, 41 insertions(+), 36 deletions(-)

New commits:
commit 44badb1175dbe7906aec993e8f2cc90c81ae71fd
Author: Henry Castro 
Date:   Thu Nov 16 22:13:27 2017 -0400

sd: enable language status bar item

Change-Id: I7cb725cdcfc92366694fc8cb24c1443dd74d102e
Reviewed-on: https://gerrit.libreoffice.org/44851
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 9622946a4743..b4110b79a4aa 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1856,8 +1856,8 @@ void SdTiledRenderingTest::testLanguageStatus()
 std::unique_ptr pItem2;
 pView1->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, 
pItem1);
 pView2->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, 
pItem2);
-CPPUNIT_ASSERT(dynamic_cast< const SfxStringListItem* >(pItem1.get()));
-CPPUNIT_ASSERT(dynamic_cast< const SfxStringListItem* >(pItem2.get()));
+CPPUNIT_ASSERT(dynamic_cast< const SfxStringItem* >(pItem1.get()));
+CPPUNIT_ASSERT(dynamic_cast< const SfxStringItem* >(pItem2.get()));
 }
 
 comphelper::LibreOfficeKit::setActive(false);
diff --git a/sd/source/ui/docshell/docshel3.cxx 
b/sd/source/ui/docshell/docshel3.cxx
index ab1cb41a1668..b7e1c5b33feb 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -314,8 +314,6 @@ void DrawDocShell::Execute( SfxRequest& rReq )
 else
 lcl_setLanguage( pDoc, aNewLangTxt );
 
-mpViewShell->GetFrame()->GetBindings().Invalidate( 
SID_LANGUAGE_STATUS );
-
 if ( pDoc->GetOnlineSpell() )
 {
 pDoc->StartOnlineSpelling();
@@ -323,6 +321,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
 }
 }
 }
+Broadcast(SfxHint(SfxHintId::LanguageChanged));
 }
 break;
 
diff --git a/sd/source/ui/docshell/docshell.cxx 
b/sd/source/ui/docshell/docshell.cxx
index 94a66e9bb18d..967f22552eaa 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -275,47 +275,37 @@ void DrawDocShell::GetState(SfxItemSet )
 break;
 case SID_LANGUAGE_STATUS:
 {
-if ( comphelper::LibreOfficeKit::isActive() )
+SdrObject* pObj = nullptr;
+bool bLanguageFound = false;
+OutlinerParaObject* pParaObj = nullptr;
+LanguageType eLanguage( LANGUAGE_DONTKNOW );
+sal_uInt16 nCount = mpDoc->GetPageCount();
+for ( sal_uInt16 itPage = 0; itPage < nCount && 
!bLanguageFound; itPage++ )
 {
-SdrObject* pObj = nullptr;
-bool bLanguageFound = false;
-OutlinerParaObject* pParaObj = nullptr;
-LanguageType eLanguage( LANGUAGE_DONTKNOW );
-sal_uInt16 nCount = mpDoc->GetPageCount();
-for ( sal_uInt16 itPage = 0; itPage < nCount && 
!bLanguageFound; itPage++ )
+SdrObjListIter aListIter(*mpDoc->GetPage(itPage), 
SdrIterMode::DeepWithGroups);
+while ( aListIter.IsMore() && !bLanguageFound )
 {
-SdrObjListIter aListIter(*mpDoc->GetPage(itPage), 
SdrIterMode::DeepWithGroups);
-while ( aListIter.IsMore() && !bLanguageFound )
+pObj = aListIter.Next();
+if ( pObj )
 {
-pObj = aListIter.Next();
-if ( pObj )
+pParaObj = pObj->GetOutlinerParaObject();
+if ( pParaObj )
 {
-pParaObj = pObj->GetOutlinerParaObject();
-if ( pParaObj )
-{
-SdrOutliner aOutliner(>GetPool(), 
OutlinerMode::TextObject);
-aOutliner.SetText(*pParaObj);
-eLanguage = aOutliner.GetLanguage(0, 0);
-bLanguageFound = eLanguage != 
LANGUAGE_DONTKNOW;
-}
+SdrOutliner aOutliner(>GetPool(),