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

2018-05-21 Thread manujvashist
 include/svx/srchdlg.hxx   |2 ++
 svx/source/dialog/srchdlg.cxx |   24 ++--
 2 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 813397885356c0d63271472adb7d3800e4ac2ca8
Author: manujvashist <manujvash...@gmail.com>
Date:   Mon Mar 12 15:38:09 2018 +0530

tdf#98544 Other Options remain expanded if any checkbox is checked.

Change-Id: I2de79da0f0a6295d4d3c294d7cf6c123fca914bc
Reviewed-on: https://gerrit.libreoffice.org/51190
Reviewed-by: Manuj Vashist <manujvash...@gmail.com>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 8da9ca5eb535..e879068db4f4 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -176,6 +176,7 @@ private:
 VclPtr m_pCloseBtn;
 VclPtr   m_pIncludeDiacritics;
 VclPtr   m_pIncludeKashida;
+VclPtrm_pOtherOptionsExpander;
 VclPtr   m_pSelectionBtn;
 VclPtr   m_pRegExpBtn;
 VclPtr   m_pWildcardBtn;
@@ -262,6 +263,7 @@ private:
 voidSaveToModule_Impl();
 
 voidApplyTransliterationFlags_Impl( TransliterationFlags 
nSettings );
+boolIsOtherOptionsExpanded();
 };
 
 #endif
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 71f65c825506..6a999380ee7a 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -309,6 +309,7 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, 
SfxChildWindow* pChildWi
 
 get(m_pCloseBtn, "close");
 
+get(m_pOtherOptionsExpander, "OptionsExpander");
 get(m_pIncludeDiacritics, "includediacritics");
 get(m_pIncludeKashida, "includekashida");
 get(m_pSelectionBtn, "selection");
@@ -391,6 +392,7 @@ void SvxSearchDialog::dispose()
 m_pCloseBtn.clear();
 m_pIncludeDiacritics.clear();
 m_pIncludeKashida.clear();
+m_pOtherOptionsExpander.clear();
 m_pSelectionBtn.clear();
 m_pReplaceBackwardsCB.clear();
 m_pRegExpBtn.clear();
@@ -612,6 +614,22 @@ void SvxSearchDialog::ApplyTransliterationFlags_Impl( 
TransliterationFlags nSett
 }
 
 
+bool SvxSearchDialog::IsOtherOptionsExpanded()
+{
+return m_pReplaceBackwardsCB->IsChecked() ||
+   m_pSelectionBtn->IsChecked() ||
+   m_pRegExpBtn->IsChecked() ||
+   m_pLayoutBtn->IsChecked() ||
+   m_pSimilarityBox->IsChecked() ||
+   m_pJapMatchFullHalfWidthCB->IsChecked() ||
+   m_pJapOptionsCB->IsChecked() ||
+   m_pWildcardBtn->IsChecked() ||
+   m_pNotesBtn->IsChecked() ||
+   m_pIncludeKashida->IsChecked() ||
+   m_pIncludeDiacritics->IsChecked();
+}
+
+
 void SvxSearchDialog::Activate()
 {
 // apply possible transliteration changes of the SvxSearchItem member
@@ -806,11 +824,13 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
 if (m_pNotesBtn->IsChecked())
 m_pLayoutBtn->Disable();
 m_pSimilarityBox->Check( pSearchItem->IsLevenshtein() );
-if( m_pJapOptionsCB->IsVisible() )
+if ( m_pJapOptionsCB->IsVisible() )
 m_pJapOptionsCB->Check( pSearchItem->IsUseAsianOptions() );
 m_pIncludeDiacritics->Check( !aOpt.IsIgnoreDiacritics_CTL() );
-if (m_pIncludeKashida->IsVisible())
+if ( m_pIncludeKashida->IsVisible() )
 m_pIncludeKashida->Check( !aOpt.IsIgnoreKashida_CTL() );
+if ( SvxSearchDialog::IsOtherOptionsExpanded() )
+m_pOtherOptionsExpander->set_expanded( true );
 ApplyTransliterationFlags_Impl( pSearchItem->GetTransliterationFlags() );
 
 ShowOptionalControls_Impl();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry sc/source sc/uiconfig

2018-01-26 Thread manujvashist
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   21 +
 sc/source/ui/dbgui/asciiopt.cxx  |   59 +++
 sc/source/ui/dbgui/csvgrid.cxx   |4 -
 sc/source/ui/dbgui/csvtablebox.cxx   |4 -
 sc/source/ui/dbgui/imoptdlg.cxx  |7 +
 sc/source/ui/dbgui/scuiasciiopt.cxx  |   32 ++--
 sc/source/ui/docshell/impex.cxx  |   24 +-
 sc/source/ui/inc/asciiopt.hxx|5 +
 sc/source/ui/inc/csvgrid.hxx |2 
 sc/source/ui/inc/csvtablebox.hxx |2 
 sc/source/ui/inc/imoptdlg.hxx|2 
 sc/source/ui/inc/impex.hxx   |2 
 sc/source/ui/inc/scuiasciiopt.hxx|1 
 sc/uiconfig/scalc/ui/textimportcsv.ui|   18 
 14 files changed, 148 insertions(+), 35 deletions(-)

New commits:
commit d999b55e28d0445df870f69b3a269964e3635def
Author: manujvashist <manujvash...@gmail.com>
Date:   Sun Dec 10 10:56:38 2017 +0530

tdf#114200  : added 'Trim space' feature in 'Text Import'

made a checkbox to Trim extra white spaces from both ends
while using seperators in 'Text Imort'

Change-Id: Ib05d9b17525e3ebec380ec8b7eebfa35fff78f01
Reviewed-on: https://gerrit.libreoffice.org/46177
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Manuj Vashist <manujvash...@gmail.com>
Reviewed-by: Heiko Tietze <tietze.he...@gmail.com>
Tested-by: Heiko Tietze <tietze.he...@gmail.com>

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 2d5e7a8696e0..7951d4bf91cc 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1088,6 +1088,13 @@
   
   false
 
+
+  
+If true, leading and trailing white spaces are trimmed 
off.
+RemoveSpace
+  
+  false
+
 
   
 If true, quoted field is always imported as text with no 
exception.
@@ -1163,6 +1170,13 @@
   
   false
 
+
+  
+If true, leading and trailing white spaces are trimmed 
off.
+RemoveSpace
+  
+  false
+
 
   
 If true, quoted field is always imported as text with no 
exception.
@@ -1245,6 +1259,13 @@
   
   false
 
+
+  
+If true, leading and trailing white spaces are trimmed 
off.
+RemoveSpace
+  
+  false
+
 
   
 List of Separators - as a String
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 3032106518f4..d699b4ea3675 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -29,9 +29,12 @@ ScAsciiOptions::ScAsciiOptions() :
 bFixedLen   ( false ),
 aFieldSeps  ( OUString(';') ),
 bMergeFieldSeps ( false ),
+bRemoveSpace( false ),
 bQuotedFieldAsText(false),
 bDetectSpecialNumber(false),
 bSkipEmptyCells(false),
+bSaveAsShown(true),
+bSaveFormulas(false),
 cTextSep( cDefaultTextSep ),
 eCharSet( osl_getThreadTextEncoding() ),
 eLang   ( LANGUAGE_SYSTEM ),
@@ -74,7 +77,12 @@ ScAsciiOptions& ScAsciiOptions::operator=( const 
ScAsciiOptions& rCpy )
 bFixedLen   = rCpy.bFixedLen;
 aFieldSeps  = rCpy.aFieldSeps;
 bMergeFieldSeps = rCpy.bMergeFieldSeps;
+bRemoveSpace= rCpy.bRemoveSpace;
 bQuotedFieldAsText = rCpy.bQuotedFieldAsText;
+bDetectSpecialNumber = rCpy.bDetectSpecialNumber;
+bSkipEmptyCells = rCpy.bSkipEmptyCells;
+bSaveAsShown= rCpy.bSaveAsShown;
+bSaveFormulas   = rCpy.bSaveFormulas;
 cTextSep= rCpy.cTextSep;
 eCharSet= rCpy.eCharSet;
 bCharSetSystem  = rCpy.bCharSetSystem;
@@ -180,15 +188,34 @@ void ScAsciiOptions::ReadFromString( const OUString& 
rString )
 else
 bDetectSpecialNumber = true;// default of versions that didn't add 
the parameter
 
-// 9th token is used for "Save as shown" in export options
-// 10th token is used for "Save cell formulas" in export options
+// Token 8: used for "Save as shown" in export options
+if ( nPos >= 0 )
+{
+bSaveAsShown = rString.getToken(0, ',', nPos) == "true";
+}
+else
+bSaveAsShown = true;//default value
+// Token 9: used for "Save cell formulas" in export options
+if ( nPos >= 0 )
+{
+bSaveFormulas = rString.getToken(0, ',', nPos) ==