summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-09-28 12:00:18 -0400
committerKohei Yoshida <kyoshida@novell.com>2010-09-28 12:00:18 -0400
commit26d5cf1ecadc17e5c6aff071b8750b9fadaa1d28 (patch)
treefa71ab0cfc58f4726db64e8d820ba76cc1bcea35 /svl
parenta8d9efc16d313a5c8c530f5324f2e067f3013d5e (diff)
Ported calc-find-replace-skip-filtered-svl.diff from ooo-build.
Diffstat (limited to 'svl')
-rw-r--r--svl/inc/svl/memberid.hrc29
-rw-r--r--svl/inc/svl/srchitem.hxx4
-rw-r--r--svl/source/items/srchitem.cxx17
3 files changed, 35 insertions, 15 deletions
diff --git a/svl/inc/svl/memberid.hrc b/svl/inc/svl/memberid.hrc
index 9f5edeae9ebb..7047e0d75e8f 100644
--- a/svl/inc/svl/memberid.hrc
+++ b/svl/inc/svl/memberid.hrc
@@ -49,20 +49,21 @@
#define MID_SEARCH_CELLTYPE 2
#define MID_SEARCH_ROWDIRECTION 3
#define MID_SEARCH_ALLTABLES 4
-#define MID_SEARCH_BACKWARD 5
-#define MID_SEARCH_PATTERN 6
-#define MID_SEARCH_CONTENT 7
-#define MID_SEARCH_ASIANOPTIONS 8
-#define MID_SEARCH_ALGORITHMTYPE 9
-#define MID_SEARCH_FLAGS 10
-#define MID_SEARCH_SEARCHSTRING 11
-#define MID_SEARCH_REPLACESTRING 12
-#define MID_SEARCH_LOCALE 13
-#define MID_SEARCH_CHANGEDCHARS 14
-#define MID_SEARCH_DELETEDCHARS 15
-#define MID_SEARCH_INSERTEDCHARS 16
-#define MID_SEARCH_TRANSLITERATEFLAGS 17
-#define MID_SEARCH_COMMAND 18
+#define MID_SEARCH_SEARCHFILTERED 5
+#define MID_SEARCH_BACKWARD 6
+#define MID_SEARCH_PATTERN 7
+#define MID_SEARCH_CONTENT 8
+#define MID_SEARCH_ASIANOPTIONS 9
+#define MID_SEARCH_ALGORITHMTYPE 10
+#define MID_SEARCH_FLAGS 11
+#define MID_SEARCH_SEARCHSTRING 12
+#define MID_SEARCH_REPLACESTRING 13
+#define MID_SEARCH_LOCALE 14
+#define MID_SEARCH_CHANGEDCHARS 15
+#define MID_SEARCH_DELETEDCHARS 16
+#define MID_SEARCH_INSERTEDCHARS 17
+#define MID_SEARCH_TRANSLITERATEFLAGS 18
+#define MID_SEARCH_COMMAND 19
#endif
diff --git a/svl/inc/svl/srchitem.hxx b/svl/inc/svl/srchitem.hxx
index 3974a8f57b80..70da129c790c 100644
--- a/svl/inc/svl/srchitem.hxx
+++ b/svl/inc/svl/srchitem.hxx
@@ -73,6 +73,7 @@ class SVL_DLLPUBLIC SvxSearchItem :
sal_uInt16 nAppFlag; // Fuer welche Applikation ist der Dialog ueberhaupt
sal_Bool bRowDirection; // Suchrichtung Zeilenweise/Spaltenweise
sal_Bool bAllTables; // in alle Tabellen suchen
+ sal_Bool bSearchFiltered; // search filtered cells.
// Writer-spezifisch
sal_Bool bNotes;
@@ -142,6 +143,9 @@ public:
sal_Bool IsAllTables() const { return bAllTables; }
void SetAllTables(sal_Bool bNew) { bAllTables = bNew; }
+ sal_Bool IsSearchFiltered() const { return bSearchFiltered; }
+ void SetSearchFiltered(sal_Bool b) { bSearchFiltered = b; }
+
sal_uInt16 GetCellType() const { return nCellType; }
void SetCellType(sal_uInt16 nNewCellType) { nCellType = nNewCellType; }
diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx
index cc033bc6905e..ea0c33c8cdf7 100644
--- a/svl/source/items/srchitem.cxx
+++ b/svl/source/items/srchitem.cxx
@@ -51,7 +51,7 @@ using namespace com::sun::star::util;
#define CFG_ROOT_NODE "Office.Common/SearchOptions"
-#define SRCH_PARAMS 11
+#define SRCH_PARAMS 12
#define SRCH_PARA_OPTIONS "Options"
#define SRCH_PARA_FAMILY "Family"
#define SRCH_PARA_COMMAND "Command"
@@ -59,6 +59,7 @@ using namespace com::sun::star::util;
#define SRCH_PARA_APPFLAG "AppFlag"
#define SRCH_PARA_ROWDIR "RowDirection"
#define SRCH_PARA_ALLTABLES "AllTables"
+#define SRCH_PARA_SEARCHFILTERED "SearchFiltered"
#define SRCH_PARA_BACKWARD "Backward"
#define SRCH_PARA_PATTERN "Pattern"
#define SRCH_PARA_CONTENT "Content"
@@ -124,6 +125,7 @@ SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) :
nAppFlag ( SVX_SEARCHAPP_WRITER ),
bRowDirection ( sal_True ),
bAllTables ( sal_False ),
+ bSearchFiltered ( sal_False ),
bNotes ( sal_False),
bBackward ( sal_False ),
bPattern ( sal_False ),
@@ -205,6 +207,7 @@ SvxSearchItem::SvxSearchItem( const SvxSearchItem& rItem ) :
nAppFlag ( rItem.nAppFlag ),
bRowDirection ( rItem.bRowDirection ),
bAllTables ( rItem.bAllTables ),
+ bSearchFiltered ( rItem.bSearchFiltered ),
bNotes ( rItem.bNotes),
bBackward ( rItem.bBackward ),
bPattern ( rItem.bPattern ),
@@ -254,6 +257,7 @@ int SvxSearchItem::operator==( const SfxPoolItem& rItem ) const
( eFamily == rSItem.eFamily ) &&
( bRowDirection == rSItem.bRowDirection ) &&
( bAllTables == rSItem.bAllTables ) &&
+ ( bSearchFiltered == rSItem.bSearchFiltered ) &&
( nCellType == rSItem.nCellType ) &&
( nAppFlag == rSItem.nAppFlag ) &&
( bAsianOptions == rSItem.bAsianOptions ) &&
@@ -447,6 +451,8 @@ sal_Bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMember
aSeq[5].Value <<= bRowDirection;
aSeq[6].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_ALLTABLES ));
aSeq[6].Value <<= bAllTables;
+ aSeq[6].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_SEARCHFILTERED ));
+ aSeq[6].Value <<= bSearchFiltered;
aSeq[7].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_BACKWARD ));
aSeq[7].Value <<= bBackward;
aSeq[8].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SRCH_PARA_PATTERN ));
@@ -468,6 +474,8 @@ sal_Bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMember
rVal <<= (sal_Bool) bRowDirection; break;
case MID_SEARCH_ALLTABLES:
rVal <<= (sal_Bool) bAllTables; break;
+ case MID_SEARCH_SEARCHFILTERED:
+ rVal <<= (sal_Bool) bSearchFiltered; break;
case MID_SEARCH_BACKWARD:
rVal <<= (sal_Bool) bBackward; break;
case MID_SEARCH_PATTERN:
@@ -567,6 +575,11 @@ sal_Bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMe
if ( ( aSeq[i].Value >>= bAllTables ) == sal_True )
++nConvertedCount;
}
+ else if ( aSeq[i].Name.equalsAscii( SRCH_PARA_SEARCHFILTERED ) )
+ {
+ if ( ( aSeq[i].Value >>= bSearchFiltered ) == sal_True )
+ ++nConvertedCount;
+ }
else if ( aSeq[i].Name.equalsAscii( SRCH_PARA_BACKWARD ) )
{
if ( ( aSeq[i].Value >>= bBackward ) == sal_True )
@@ -603,6 +616,8 @@ sal_Bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMe
bRet = (rVal >>= bRowDirection); break;
case MID_SEARCH_ALLTABLES:
bRet = (rVal >>= bAllTables); break;
+ case MID_SEARCH_SEARCHFILTERED:
+ bRet = (rVal >>= bSearchFiltered); break;
case MID_SEARCH_BACKWARD:
bRet = (rVal >>= bBackward); break;
case MID_SEARCH_PATTERN: