[Libreoffice-commits] core.git: cui/source include/sfx2 sfx2/source sw/source

2018-03-19 Thread Jan Holesovsky
 cui/source/factory/dlgfact.cxx  |4 ++--
 cui/source/factory/dlgfact.hxx  |2 +-
 include/sfx2/sfxdlg.hxx |2 +-
 sfx2/source/appl/appserv.cxx|3 ++-
 sw/source/uibase/app/docsh2.cxx |2 +-
 5 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 67a023ef9b251c1e6e2a46521a51ad829c417451
Author: Jan Holesovsky 
Date:   Fri Mar 16 22:23:14 2018 +0100

lokdialog: Set parent for AutoCorrect Options... so that it can be tunneled.

To get this dialog: Right-click on a mis-spelled word, and it's in the
tunneled context menu.

Still it should be converted to async though.

Change-Id: Ia8f2aaf0d04f144c74999107de98e52cd51876e7
Reviewed-on: https://gerrit.libreoffice.org/51441
Reviewed-by: pranavk 
Tested-by: pranavk 
(cherry picked from commit 7b83827d7b5d07401878fe552c421331629a7880)
Reviewed-on: https://gerrit.libreoffice.org/51548
Tested-by: Jenkins 
Reviewed-by: Jan Holesovsky 

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 2683c93264b3..f8ed8b406591 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -860,9 +860,9 @@ VclPtr 
AbstractDialogFactory_Impl::CreateFrameDialog( const R
 }
 
 // TabDialog outside the drawing layer
-VclPtr 
AbstractDialogFactory_Impl::CreateAutoCorrTabDialog( const SfxItemSet* pAttrSet 
)
+VclPtr 
AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(vcl::Window* pParent, const 
SfxItemSet* pAttrSet)
 {
-VclPtrInstance pDlg( nullptr, pAttrSet );
+VclPtrInstance pDlg(pParent, pAttrSet);
 return VclPtr::Create( pDlg );
 }
 
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index b0c22bb2f0b5..157e949bebf0 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -492,7 +492,7 @@ public:
 virtual VclPtrCreateFrameDialog( const 
css::uno::Reference< css::frame::XFrame >& rxFrame,
sal_uInt32 nResId,
const OUString& 
rParameter ) override;
-virtual VclPtr CreateAutoCorrTabDialog( const 
SfxItemSet* pAttrSet ) override;
+virtual VclPtr CreateAutoCorrTabDialog(vcl::Window* 
pParent, const SfxItemSet* pAttrSet) override;
 virtual VclPtr CreateCustomizeTabDialog(
 const SfxItemSet* pAttrSet,
 const css::uno::Reference< 
css::frame::XFrame >& xViewFrame ) override;
diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx
index 78cbf7361968..030b866a5977 100644
--- a/include/sfx2/sfxdlg.hxx
+++ b/include/sfx2/sfxdlg.hxx
@@ -128,7 +128,7 @@ public:
 virtual ~SfxAbstractDialogFactory() 
override;// needed for export of vtable
 static SfxAbstractDialogFactory*Create();
 virtual VclPtr  CreateFrameDialog( const 
css::uno::Reference< css::frame::XFrame >& rFrame, sal_uInt32 nResId, const 
rtl::OUString& rParameter ) = 0;
-virtual VclPtr   CreateAutoCorrTabDialog( const 
SfxItemSet* pAttrSet ) = 0;
+virtual VclPtr   
CreateAutoCorrTabDialog(vcl::Window* pParent, const SfxItemSet* pAttrSet) = 0;
 virtual VclPtr   CreateCustomizeTabDialog(
 const SfxItemSet* pAttrSet,
 const css::uno::Reference< 
css::frame::XFrame >& xViewFrame ) = 0;
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index f7765defa192..d73bc3a61da9 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1615,7 +1615,8 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
 if ( pSet && pSet->GetItemState( pSetPool->GetWhich( 
SID_AUTO_CORRECT_DLG ), false, &pItem ) == SfxItemState::SET )
 aSet.Put( *pItem );
 
-ScopedVclPtr 
pDlg(pFact->CreateAutoCorrTabDialog( &aSet ));
+const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+ScopedVclPtr 
pDlg(pFact->CreateAutoCorrTabDialog(pViewFrame? &pViewFrame->GetWindow(): 
nullptr, &aSet));
 pDlg->Execute();
 }
 
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 33f942256ff9..f2c34c8f21c1 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -376,7 +376,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
 aSet.Put( *static_cast(pOpenSmartTagOptionsItem) );
 
 SfxAbstractDialogFactory* pFact = 
SfxAbstractDialogFactory::Create();
-VclPtr pDlg = 
pFact->CreateAutoCorrTabDialog( &aSet );
+VclPtr pDlg = 
pFact->CreateAutoCorrTabDialog(&GetView()->GetViewFrame()->GetWindow(), &aSet);
 pDlg->Execute();
 pDlg.disposeAndClear();
 

[Libreoffice-commits] core.git: cui/source include/sfx2 sfx2/source sw/source

2017-03-05 Thread Noel Grandin
 cui/source/dialogs/insdlg.cxx  |   12 ++--
 include/sfx2/frmdescr.hxx  |8 
 sfx2/source/bastyp/frmhtml.cxx |8 
 sfx2/source/doc/frmdescr.cxx   |2 +-
 sfx2/source/doc/iframe.cxx |8 
 sw/source/filter/html/htmlplug.cxx |4 ++--
 sw/source/filter/xml/xmltexti.cxx  |8 
 sw/source/uibase/shells/textsh.cxx |8 
 8 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 24ae6e86671c0729a6a6ea7da86b262b4fdd1c0f
Author: Noel Grandin 
Date:   Mon Mar 6 08:45:01 2017 +0200

convert ScrollingMode to scoped enum

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

diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index d7e0688..6b0e888 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -545,13 +545,13 @@ short SfxInsertFloatingFrameDialog::Execute()
 m_xObj->changeState( embed::EmbedStates::RUNNING );
 
 OUString aName = m_pEDName->GetText();
-ScrollingMode eScroll = ScrollingNo;
+ScrollingMode eScroll = ScrollingMode::No;
 if ( m_pRBScrollingOn->IsChecked() )
-eScroll = ScrollingYes;
+eScroll = ScrollingMode::Yes;
 if ( m_pRBScrollingOff->IsChecked() )
-eScroll = ScrollingNo;
+eScroll = ScrollingMode::No;
 if ( m_pRBScrollingAuto->IsChecked() )
-eScroll = ScrollingAuto;
+eScroll = ScrollingMode::Auto;
 
 bool bHasBorder = m_pRBFrameBorderOn->IsChecked();
 
@@ -570,10 +570,10 @@ short SfxInsertFloatingFrameDialog::Execute()
 xSet->setPropertyValue( "FrameURL", Any( aURL ) );
 xSet->setPropertyValue( "FrameName", Any( aName ) );
 
-if ( eScroll == ScrollingAuto )
+if ( eScroll == ScrollingMode::Auto )
 xSet->setPropertyValue( "FrameIsAutoScroll", Any( true ) );
 else
-xSet->setPropertyValue( "FrameIsScrollingMode", Any( 
eScroll == ScrollingYes ) );
+xSet->setPropertyValue( "FrameIsScrollingMode", Any( 
eScroll == ScrollingMode::Yes ) );
 
 xSet->setPropertyValue( "FrameIsBorder", Any( bHasBorder ) );
 xSet->setPropertyValue( "FrameMarginWidth", Any( sal_Int32( 
lMarginWidth ) ) );
diff --git a/include/sfx2/frmdescr.hxx b/include/sfx2/frmdescr.hxx
index 4f09680..5e8e3d9 100644
--- a/include/sfx2/frmdescr.hxx
+++ b/include/sfx2/frmdescr.hxx
@@ -43,11 +43,11 @@ class Wallpaper;
 // aligned, from which also the alignment of the FrameSet is given.
 
 
-enum ScrollingMode
+enum class ScrollingMode
 {
-ScrollingYes,
-ScrollingNo,
-ScrollingAuto
+Yes,
+No,
+Auto
 };
 
 #define SPACING_NOT_SET -1L
diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx
index af567e9..c27201e 100644
--- a/sfx2/source/bastyp/frmhtml.cxx
+++ b/sfx2/source/bastyp/frmhtml.cxx
@@ -40,9 +40,9 @@ static sal_Char const sHTML_SC_auto[] = "AUTO";
 
 static HTMLOptionEnum const aScrollingTable[] =
 {
-{ sHTML_SC_yes, ScrollingYes},
-{ sHTML_SC_no,  ScrollingNo },
-{ sHTML_SC_auto,ScrollingAuto   },
+{ sHTML_SC_yes, ScrollingMode::Yes},
+{ sHTML_SC_no,  ScrollingMode::No },
+{ sHTML_SC_auto,ScrollingMode::Auto   },
 { nullptr,  (ScrollingMode)0 }
 };
 
@@ -93,7 +93,7 @@ void SfxFrameHTMLParser::ParseFrameOptions(
 bMarginHeight = true;
 break;
 case HTML_O_SCROLLING:
-pFrame->SetScrollingMode( rOption.GetEnum( aScrollingTable, 
ScrollingAuto ) );
+pFrame->SetScrollingMode( rOption.GetEnum( aScrollingTable, 
ScrollingMode::Auto ) );
 break;
 case HTML_O_FRAMEBORDER:
 {
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index a23126b..5eb4fc2 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -40,7 +40,7 @@ struct SfxFrameDescriptor_Impl
 
 SfxFrameDescriptor::SfxFrameDescriptor() :
 aMargin( -1, -1 ),
-eScroll( ScrollingAuto ),
+eScroll( ScrollingMode::Auto ),
 bHasBorder( true ),
 bHasBorderSet( false ),
 bResizeHorizontal( true ),
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 1ca63db..ad44a09 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -262,14 +262,14 @@ void SAL_CALL IFrameObject::setPropertyValue(const 
OUString& aPropertyName, cons
 {
 bool bIsAutoScroll;
 if ( (aAny >>= bIsAutoScroll) && bIsAutoScroll )
-maFrmDescr.SetScrollingMode( ScrollingAuto );
+maFrmDescr.Set

[Libreoffice-commits] core.git: cui/source include/sfx2 sfx2/source sw/source

2015-09-11 Thread Oliver Specht
 cui/source/inc/border.hxx|1 
 cui/source/inc/chardlg.hxx   |3 ++
 cui/source/inc/cuitabarea.hxx|2 +
 cui/source/inc/paragrph.hxx  |4 +++
 cui/source/tabpages/border.cxx   |7 +
 cui/source/tabpages/chardlg.cxx  |   34 +--
 cui/source/tabpages/paragrph.cxx |   48 +--
 cui/source/tabpages/tparea.cxx   |   31 ++---
 include/sfx2/tabdlg.hxx  |1 
 sfx2/source/dialog/tabdlg.cxx|   15 +++-
 sw/source/ui/chrdlg/numpara.cxx  |   12 -
 sw/source/uibase/inc/numpara.hxx |1 
 12 files changed, 139 insertions(+), 20 deletions(-)

New commits:
commit a212ef2b6ebadb22a9abf6d042aa2b5fd9ac1cf0
Author: Oliver Specht 
Date:   Thu Sep 10 11:01:26 2015 +0200

tdf#93901: apply handling in style/edit dialog improved

introduced SfxTabPage::ChangesApplied() to enable resetting values
to their initial state while editing styles

Change-Id: I60fd68d8464e12e795b0e0d2f2e53882a225c181
Reviewed-on: https://gerrit.libreoffice.org/18467
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 23d107b..f6d8abe 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -54,6 +54,7 @@ public:
 
 virtual boolFillItemSet( SfxItemSet* rCoreAttrs ) SAL_OVERRIDE;
 virtual voidReset( const SfxItemSet* ) SAL_OVERRIDE;
+virtual voidChangesApplied() SAL_OVERRIDE;
 
 voidHideShadowControls();
 virtual voidPageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 42cc172..4d5506e 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -151,6 +151,7 @@ public:
 
 virtual voidReset( const SfxItemSet* rSet ) SAL_OVERRIDE;
 virtual boolFillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
+virtual voidChangesApplied() SAL_OVERRIDE;
 
 voidSetFontList( const SvxFontListItem& rItem );
 voidEnableRelativeMode();
@@ -233,6 +234,7 @@ public:
 
 virtual voidReset( const SfxItemSet* rSet ) SAL_OVERRIDE;
 virtual boolFillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
+virtual voidChangesApplied() SAL_OVERRIDE;
 
 voidDisableControls( sal_uInt16 nDisable );
 voidEnableFlash();
@@ -316,6 +318,7 @@ public:
 
 virtual voidReset( const SfxItemSet* rSet ) SAL_OVERRIDE;
 virtual boolFillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
+virtual voidChangesApplied() SAL_OVERRIDE;
 virtual voidFillUserData() SAL_OVERRIDE;
 ///  the writer uses SID_ATTR_BRUSH as font background
 voidSetPreviewBackgroundToCharacter();
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index f3b003d..29dbd03 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -163,6 +163,7 @@ public:
 
 virtual bool FillItemSet(SfxItemSet*) SAL_OVERRIDE;
 virtual void Reset(const SfxItemSet*) SAL_OVERRIDE;
+virtual void ChangesApplied() SAL_OVERRIDE;
 virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
 virtual sfxpg DeactivatePage(SfxItemSet* pSet) SAL_OVERRIDE;
 virtual void PointChanged(vcl::Window* pWindow, RECT_POINT eRP) 
SAL_OVERRIDE;
@@ -296,6 +297,7 @@ public:
 
 virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
 virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
+virtual void ChangesApplied() SAL_OVERRIDE;
 virtual void ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
 virtual sfxpg DeactivatePage( SfxItemSet* pSet ) SAL_OVERRIDE;
 virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) 
SAL_OVERRIDE;
diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index ee5c1dd..12e23f4 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -109,6 +109,7 @@ public:
 
 virtual boolFillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
 virtual voidReset( const SfxItemSet* rSet ) SAL_OVERRIDE;
+virtual voidChangesApplied() SAL_OVERRIDE;
 
 
 voidSetPageWidth( sal_uInt16 nPageWidth );
@@ -172,6 +173,7 @@ public:
 
 virtual boolFillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
 virtual voidReset( const SfxItemSet* rSet ) SAL_OVERRIDE;
+virtual voidChangesApplied() SAL_OVERRIDE;
 
 voidEnableJustifyExt();
 virtual voidPageCreated(const SfxAllItemSet& aSet) 
SAL_OVERRIDE;
@@ -207,6 +209,7 @@ public:
 
 virtual boolFillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
 virtual voidReset( const SfxItemSet* rSet ) SAL_OVERRIDE;
+