diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 98e1afc76b89..9d3da5ee9d83 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1207,6 +1207,17 @@
+
+
+ 0
+
+
+ false
+
+
+ false
+
+
Contains setting for Text to Columns Import
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 245869363f2e..8d46f1b3a2dc 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -396,7 +396,6 @@ public:
virtual LanguageType GetLanguageType() const = 0;
virtual bool IsDateConversionSet() const = 0;
virtual bool IsScientificConversionSet() const = 0;
- virtual bool IsKeepAskingSet() const = 0;
};
class AbstractScGoToTabDlg : public VclAbstractDialog
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 2dc64da32d5f..637c9ae58d78 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -131,7 +131,6 @@ public:
LanguageType GetLanguageType() const override { return m_pDlg->getLanguageType(); }
bool IsDateConversionSet() const override { return m_pDlg->isDateConversionSet(); }
bool IsScientificConversionSet() const override { return m_pDlg->isScientificConversionSet(); }
- bool IsKeepAskingSet() const override { return m_pDlg->isKeepAskingSet(); }
};
}
diff --git a/sc/source/ui/dbgui/textimportoptions.cxx b/sc/source/ui/dbgui/textimportoptions.cxx
index b91f8eb6d1bd..84521cb216f3 100644
--- a/sc/source/ui/dbgui/textimportoptions.cxx
+++ b/sc/source/ui/dbgui/textimportoptions.cxx
@@ -32,7 +32,6 @@ ScTextImportOptionsDlg::ScTextImportOptionsDlg(weld::Window* pParent)
, m_xRbCustom(m_xBuilder->weld_radio_button(u"custom"_ustr))
, m_xCkbConvertDate(m_xBuilder->weld_check_button(u"convertdata"_ustr))
, m_xCkbConvertScientific(m_xBuilder->weld_check_button(u"convertscientificnotation"_ustr))
- , m_xCkbKeepAsking(m_xBuilder->weld_check_button(u"keepasking"_ustr))
, m_xLbCustomLang(new SvxLanguageBox(m_xBuilder->weld_combo_box(u"lang"_ustr)))
{
init();
@@ -60,11 +59,6 @@ bool ScTextImportOptionsDlg::isScientificConversionSet() const
return m_xCkbConvertScientific->get_active();
}
-bool ScTextImportOptionsDlg::isKeepAskingSet() const
-{
- return m_xCkbKeepAsking->get_active();
-}
-
void ScTextImportOptionsDlg::init()
{
m_xBtnOk->connect_clicked(LINK(this, ScTextImportOptionsDlg, OKHdl));
diff --git a/sc/source/ui/inc/textimportoptions.hxx b/sc/source/ui/inc/textimportoptions.hxx
index 7a2cfb6df589..b12b58a26990 100644
--- a/sc/source/ui/inc/textimportoptions.hxx
+++ b/sc/source/ui/inc/textimportoptions.hxx
@@ -33,7 +33,6 @@ public:
LanguageType getLanguageType() const;
bool isDateConversionSet() const;
bool isScientificConversionSet() const;
- bool isKeepAskingSet() const;
private:
void init();
@@ -44,7 +43,6 @@ private:
std::unique_ptr m_xRbCustom;
std::unique_ptr m_xCkbConvertDate;
std::unique_ptr m_xCkbConvertScientific;
- std::unique_ptr m_xCkbKeepAsking;
std::unique_ptr m_xLbCustomLang;
DECL_LINK(OKHdl, weld::Button&, void);
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index ef3c9e2311b0..36cbb20853e8 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -127,8 +127,8 @@ public:
void FillTab( InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink );
- SC_DLLPUBLIC void PasteFromSystem();
- SC_DLLPUBLIC bool PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi = false );
+ SC_DLLPUBLIC void PasteFromSystem(bool useSavedPrefs = false);
+ SC_DLLPUBLIC bool PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi = false, bool useSavedPrefs = false );
void PasteFromTransferable( const css::uno::Reference<
css::datatransfer::XTransferable >& rxTransferable );
@@ -143,7 +143,7 @@ public:
bool PasteDataFormat( SotClipboardFormatId nFormatId,
const css::uno::Reference< css::datatransfer::XTransferable >& rxTransferable,
SCCOL nPosX, SCROW nPosY, const Point* pLogicPos,
- bool bLink = false, bool bAllowDialogs = false );
+ bool bLink = false, bool bAllowDialogs = false, bool useSavedPrefs = false );
bool PasteFile( const Point&, const OUString&, bool bLink );
bool PasteObject( const Point&, const css::uno::Reference < css::embed::XEmbeddedObject >&, const Size*, const Graphic* = nullptr, const OUString& = OUString(), sal_Int64 nAspect = css::embed::Aspects::MSOLE_CONTENT );
@@ -381,7 +381,7 @@ private:
bool PasteDataFormatFormattedText( SotClipboardFormatId nFormatId,
const css::uno::Reference< css::datatransfer::XTransferable >& rxTransferable,
SCCOL nPosX, SCROW nPosY,
- bool bAllowDialogs, const TransferableDataHelper& rDataHelper );
+ bool bAllowDialogs, const TransferableDataHelper& rDataHelper, bool useSavedPrefs = false );
sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, bool bFormula );
diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx
index 3c83c0066e70..b8834f0ab1af 100644
--- a/sc/source/ui/view/cliputil.cxx
+++ b/sc/source/ui/view/cliputil.cxx
@@ -82,7 +82,7 @@ void ScClipUtil::PasteFromClipboard( ScViewData& rViewData, ScTabViewShell* pTab
weld::WaitObject aWait( rViewData.GetDialogParent() );
if (!pOwnClip)
{
- pTabViewShell->PasteFromSystem();
+ pTabViewShell->PasteFromSystem(true);
// Anchor To Cell rather than To Page
ScDrawView* pDrawView = pTabViewShell->GetScDrawView();
if(pDrawView)
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index f485ea2d9439..2fd0bd881d3d 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -489,7 +489,7 @@ void ScViewFunc::PasteDraw()
}
}
-void ScViewFunc::PasteFromSystem()
+void ScViewFunc::PasteFromSystem(bool useSavedPrefs)
{
UpdateInputLine();
@@ -605,7 +605,7 @@ void ScViewFunc::PasteFromSystem()
else if (aDataHelper.HasFormat(SotClipboardFormatId::RICHTEXT))
PasteFromSystem(SotClipboardFormatId::RICHTEXT);
else if (aDataHelper.HasFormat(SotClipboardFormatId::HTML))
- PasteFromSystem(SotClipboardFormatId::HTML);
+ PasteFromSystem(SotClipboardFormatId::HTML, false, useSavedPrefs);
else if (aDataHelper.HasFormat(SotClipboardFormatId::BITMAP))
PasteFromSystem(SotClipboardFormatId::BITMAP);
else if (aDataHelper.HasFormat(SotClipboardFormatId::HTML_SIMPLE))
@@ -717,7 +717,7 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference
+#include
#include
#include
#include
@@ -76,7 +78,7 @@ using namespace com::sun::star;
bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
const uno::Reference& rxTransferable,
- SCCOL nPosX, SCROW nPosY, const Point* pLogicPos, bool bLink, bool bAllowDialogs )
+ SCCOL nPosX, SCROW nPosY, const Point* pLogicPos, bool bLink, bool bAllowDialogs, bool useSavedPrefs )
{
ScDocument& rDoc = GetViewData().GetDocument();
rDoc.SetPastingDrawFromOtherDoc( true );
@@ -126,7 +128,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
nFormatId == SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT )
{
bRet = PasteDataFormatFormattedText(nFormatId, rxTransferable, nPosX, nPosY,
- bAllowDialogs, aDataHelper);
+ bAllowDialogs, aDataHelper, useSavedPrefs);
}
else if (nFormatId == SotClipboardFormatId::SBA_DATAEXCHANGE)
{
@@ -658,7 +660,7 @@ bool ScViewFunc::PasteDataFormatSource( SotClipboardFormatId nFormatId,
bool ScViewFunc::PasteDataFormatFormattedText( SotClipboardFormatId nFormatId,
const uno::Reference& rxTransferable,
SCCOL nPosX, SCROW nPosY, bool bAllowDialogs,
- const TransferableDataHelper& rDataHelper )
+ const TransferableDataHelper& rDataHelper, bool useSavedPrefs )
{
if ( nFormatId == SotClipboardFormatId::RTF && rDataHelper.HasFormat( SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT ) )
{
@@ -676,22 +678,15 @@ bool ScViewFunc::PasteDataFormatFormattedText( SotClipboardFormatId nFormatId,
auto pStrBuffer = std::make_shared();
if (std::unique_ptr xStream = rDataHelper.GetSotStorageStream( nFormatId ) )
{
- // Static variables for per-session storage. This could be
- // changed to longer-term storage in future.
- static bool bHaveSavedPreferences = false;
- static LanguageType eSavedLanguage;
- static bool bSavedDateConversion;
- static bool bSavedScientificConversion;
-
if (nFormatId == SotClipboardFormatId::HTML &&
!comphelper::LibreOfficeKit::isActive())
{
- if (bHaveSavedPreferences)
+ if (useSavedPrefs)
{
ScAsciiOptions aOptions;
- aOptions.SetLanguage(eSavedLanguage);
- aOptions.SetDetectSpecialNumber(bSavedDateConversion);
- aOptions.SetDetectScientificNumber(bSavedScientificConversion);
+ aOptions.SetLanguage(LanguageType(officecfg::Office::Calc::Dialogs::ClipboardHTMLImport::Language::get()));
+ aOptions.SetDetectSpecialNumber(officecfg::Office::Calc::Dialogs::ClipboardHTMLImport::DetectSpecialNumbers::get());
+ aOptions.SetDetectScientificNumber(officecfg::Office::Calc::Dialogs::ClipboardHTMLImport::DetectScientificNumbers::get());
pObj->SetExtOptions(aOptions);
}
else
@@ -710,13 +705,11 @@ bool ScViewFunc::PasteDataFormatFormattedText( SotClipboardFormatId nFormatId,
aOptions.SetLanguage(pDlg->GetLanguageType());
aOptions.SetDetectSpecialNumber(pDlg->IsDateConversionSet());
aOptions.SetDetectScientificNumber(pDlg->IsScientificConversionSet());
- if (!pDlg->IsKeepAskingSet())
- {
- bHaveSavedPreferences = true;
- eSavedLanguage = pDlg->GetLanguageType();
- bSavedDateConversion = pDlg->IsDateConversionSet();
- bSavedScientificConversion = pDlg->IsScientificConversionSet();
- }
+ auto pChange(comphelper::ConfigurationChanges::create());
+ officecfg::Office::Calc::Dialogs::ClipboardHTMLImport::Language::set(pDlg->GetLanguageType().get(), pChange);
+ officecfg::Office::Calc::Dialogs::ClipboardHTMLImport::DetectSpecialNumbers::set(pDlg->IsDateConversionSet(), pChange);
+ officecfg::Office::Calc::Dialogs::ClipboardHTMLImport::DetectScientificNumbers::set(pDlg->IsScientificConversionSet(), pChange);
+ pChange->commit();
pObj->SetExtOptions(aOptions);
}
else
diff --git a/sc/uiconfig/scalc/ui/textimportoptions.ui b/sc/uiconfig/scalc/ui/textimportoptions.ui
index 0abfd7f4b6bd..84e4531f91e6 100644
--- a/sc/uiconfig/scalc/ui/textimportoptions.ui
+++ b/sc/uiconfig/scalc/ui/textimportoptions.ui
@@ -49,22 +49,6 @@
1
-
-
-
- False
- True
- 2
- True
-
-
False