[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - basctl/uiconfig include/svx officecfg/registry sc/uiconfig sd/uiconfig svx/inc svx/source svx/util sw/uiconfig

Andrzej J.R. Hunt andrzej at ahunt.org
Fri May 24 07:32:01 PDT 2013


 basctl/uiconfig/basicide/toolbar/findbar.xml                         |    1 
 include/svx/dialogs.hrc                                              |    1 
 officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu      |   11 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |    5 
 sc/uiconfig/scalc/toolbar/findbar.xml                                |    1 
 sd/uiconfig/sdraw/toolbar/findbar.xml                                |    1 
 sd/uiconfig/simpress/toolbar/findbar.xml                             |    1 
 svx/inc/tbunosearchcontrollers.hxx                                   |   43 ++
 svx/source/tbxctrls/tbunosearchcontrollers.cxx                       |  213 ++++++++--
 svx/source/tbxctrls/tbunosearchcontrollers.src                       |    5 
 svx/source/unodraw/unoctabl.cxx                                      |    7 
 svx/util/svx.component                                               |    3 
 sw/uiconfig/sglobal/toolbar/findbar.xml                              |    1 
 sw/uiconfig/sweb/toolbar/findbar.xml                                 |    1 
 sw/uiconfig/swriter/toolbar/findbar.xml                              |    1 
 sw/uiconfig/swxform/toolbar/findbar.xml                              |    1 
 16 files changed, 254 insertions(+), 42 deletions(-)

New commits:
commit 0eccb0d1618b7e00856e778ed9c2e785ef3af3ce
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date:   Mon May 20 14:08:48 2013 +0100

    fdo#63035 Add "Match Case" to Find bar.
    
    Change-Id: I1339767de7980426d32960bf5ee60e2f5c011be4
    Signed-off-by: Michael Meeks <michael.meeks at suse.com>

diff --git a/basctl/uiconfig/basicide/toolbar/findbar.xml b/basctl/uiconfig/basicide/toolbar/findbar.xml
index 42baa21..57aec06 100644
--- a/basctl/uiconfig/basicide/toolbar/findbar.xml
+++ b/basctl/uiconfig/basicide/toolbar/findbar.xml
@@ -22,6 +22,7 @@
   <toolbar:toolbaritem xlink:href=".uno:FindText"/>
   <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
   <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+  <toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
   <toolbar:toolbarseparator/>
   <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
 </toolbar:toolbar>
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 9950f2c..e714c39 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -961,6 +961,7 @@
 
 #define RID_SVXSTR_TEXTCOLOR                                (RID_SVX_START + 1178)
 
+#define RID_SVXSTR_FINDBAR_MATCHCASE                        (RID_SVX_START + 1189)
 #define RID_SVXSTR_FINDBAR_FIND                             (RID_SVX_START + 1190)
 
 #define RID_SVXSTR_NUMBULLET_NONE                           (RID_SVX_START + 1191)
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index 5abc0a8..64fa7b0 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -429,6 +429,17 @@
           <value>com.sun.star.svx.UpSearchToolboxController</value>
         </prop>
       </node>
+      <node oor:name="com.sun.star.svx.MatchCaseToolboxController" oor:op="replace">
+        <prop oor:name="Command">
+          <value>.uno:MatchCase</value>
+        </prop>
+        <prop oor:name="Module">
+          <value/>
+        </prop>
+        <prop oor:name="Controller">
+          <value>com.sun.star.svx.MatchCaseToolboxController</value>
+        </prop>
+      </node>
       <node oor:name="c4" oor:op="replace" install:module="reportbuilder">
         <prop oor:name="Command">
           <value>.uno:FontColor</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 7b01925..74fbeeb 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -1478,6 +1478,11 @@
           <value>1</value>
         </prop>
       </node>
+      <node oor:name=".uno:MatchCase" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">Match Case</value>
+        </prop>
+      </node>
       <node oor:name=".uno:ExitSearch" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">Exit Search</value>
diff --git a/sc/uiconfig/scalc/toolbar/findbar.xml b/sc/uiconfig/scalc/toolbar/findbar.xml
index a0e6037..f8052a1 100644
--- a/sc/uiconfig/scalc/toolbar/findbar.xml
+++ b/sc/uiconfig/scalc/toolbar/findbar.xml
@@ -22,6 +22,7 @@
   <toolbar:toolbaritem xlink:href=".uno:FindText"/>
   <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
   <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+  <toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
   <toolbar:toolbarseparator/>
   <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
 </toolbar:toolbar>
diff --git a/sd/uiconfig/sdraw/toolbar/findbar.xml b/sd/uiconfig/sdraw/toolbar/findbar.xml
index a0e6037..f8052a1 100644
--- a/sd/uiconfig/sdraw/toolbar/findbar.xml
+++ b/sd/uiconfig/sdraw/toolbar/findbar.xml
@@ -22,6 +22,7 @@
   <toolbar:toolbaritem xlink:href=".uno:FindText"/>
   <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
   <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+  <toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
   <toolbar:toolbarseparator/>
   <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
 </toolbar:toolbar>
diff --git a/sd/uiconfig/simpress/toolbar/findbar.xml b/sd/uiconfig/simpress/toolbar/findbar.xml
index a0e6037..f8052a1 100644
--- a/sd/uiconfig/simpress/toolbar/findbar.xml
+++ b/sd/uiconfig/simpress/toolbar/findbar.xml
@@ -22,6 +22,7 @@
   <toolbar:toolbaritem xlink:href=".uno:FindText"/>
   <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
   <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+  <toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
   <toolbar:toolbarseparator/>
   <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
 </toolbar:toolbar>
diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx
index 23eb22f..b68b4b5 100644
--- a/svx/inc/tbunosearchcontrollers.hxx
+++ b/svx/inc/tbunosearchcontrollers.hxx
@@ -33,6 +33,7 @@
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/weak.hxx>
 #include <svtools/toolboxcontroller.hxx>
+#include <vcl/button.hxx>
 #include <vcl/combobox.hxx>
 #include <vcl/window.hxx>
 
@@ -215,6 +216,47 @@ private:
     Type meType;
 };
 
+class MatchCaseToolboxController : public svt::ToolboxController,
+                                      public css::lang::XServiceInfo
+{
+public:
+    MatchCaseToolboxController( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+    ~MatchCaseToolboxController();
+
+    // XInterface
+    virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException );
+    virtual void SAL_CALL acquire() throw ();
+    virtual void SAL_CALL release() throw ();
+
+    // XServiceInfo
+    virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException );
+    virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException );
+    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
+
+    static OUString getImplementationName_Static( ) throw()
+    {
+        return OUString( "com.sun.star.svx.MatchCaseToolboxController" );
+    }
+
+    static css::uno::Sequence< OUString >  getSupportedServiceNames_Static() throw();
+
+    // XComponent
+    virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
+
+    // XInitialization
+    virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException);
+
+    // XToolbarController
+    virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw ( css::uno::RuntimeException );
+    virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createItemWindow( const css::uno::Reference< css::awt::XWindow >& Parent ) throw ( css::uno::RuntimeException );
+
+    // XStatusListener
+    virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException );
+
+private:
+    CheckBox* m_pMatchCaseControl;
+};
+
 // protocol handler for "vnd.sun.star.findbar:*" URLs
 // The dispatch object will be used for shortcut commands for findbar
 class FindbarDispatcher : public css::lang::XServiceInfo,
@@ -267,6 +309,7 @@ private:
 css::uno::Reference< css::uno::XInterface > SAL_CALL FindTextToolbarController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
 css::uno::Reference< css::uno::XInterface > SAL_CALL DownSearchToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
 css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
+css::uno::Reference< css::uno::XInterface > SAL_CALL MatchCaseToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
 css::uno::Reference< css::uno::XInterface > SAL_CALL ExitFindbarToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
 css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
 
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index d67e5ac..5270b07 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -17,14 +17,15 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include "tbunosearchcontrollers.hxx"
+
 #include <svx/dialogs.hrc>
 #include <svx/dialmgr.hxx>
 
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/frame/XLayoutManager.hpp>
+#include <com/sun/star/i18n/TransliterationModules.hpp>
 #include <com/sun/star/text/XTextRange.hpp>
 #include <com/sun/star/ui/XUIElement.hpp>
 #include <com/sun/star/util/URL.hpp>
@@ -42,23 +43,61 @@ namespace svx
 static const char SEARCHITEM_SEARCHSTRING[] = "SearchItem.SearchString";
 static const char SEARCHITEM_SEARCHBACKWARD[] = "SearchItem.Backward";
 static const char SEARCHITEM_SEARCHFLAGS[] = "SearchItem.SearchFlags";
+static const char SEARCHITEM_TRANSLITERATEFLAGS[] = "SearchItem.TransliterateFlags";
 
 static const char COMMAND_EXECUTESEARCH[] = ".uno:ExecuteSearch";
 static const char COMMAND_FINDTEXT[] = ".uno:FindText";
 static const char COMMAND_DOWNSEARCH[] = ".uno:DownSearch";
 static const char COMMAND_UPSEARCH[] = ".uno:UpSearch";
 static const char COMMAND_EXITSEARCH[] = ".uno:ExitSearch";
+static const char COMMAND_MATCHCASE[] = ".uno:MatchCase";
 static const char COMMAND_APPENDSEARCHHISTORY[] = "AppendSearchHistory";
 
 static const sal_Int32       REMEMBER_SIZE = 10;
 
-void impl_executeSearch( const css::uno::Reference< css::uno::XComponentContext >& rxContext, const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Sequence< css::beans::PropertyValue >& lArgs )
+void impl_executeSearch( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+                         const css::uno::Reference< css::frame::XFrame >& xFrame,
+                         const ToolBox* pToolBox,
+                         const sal_Bool aSearchBackwards = false )
 {
     css::uno::Reference< css::util::XURLTransformer > xURLTransformer( css::util::URLTransformer::create( rxContext ) );
     css::util::URL aURL;
     aURL.Complete = OUString(COMMAND_EXECUTESEARCH);
     xURLTransformer->parseStrict(aURL);
 
+    OUString sFindText;
+    sal_Bool aMatchCase = false;
+    if ( pToolBox )
+    {
+        sal_uInt16 nItemCount = pToolBox->GetItemCount();
+        for ( sal_uInt16 i=0; i<nItemCount; ++i )
+        {
+            OUString sItemCommand = pToolBox->GetItemCommand(i);
+            if ( sItemCommand == COMMAND_FINDTEXT )
+            {
+                Window* pItemWin = pToolBox->GetItemWindow(i);
+                if (pItemWin)
+                    sFindText = pItemWin->GetText();
+            } else if ( sItemCommand == COMMAND_MATCHCASE )
+            {
+                CheckBox* pItemWin = (CheckBox*) pToolBox->GetItemWindow(i);
+                if (pItemWin)
+                    aMatchCase = pItemWin->IsChecked();
+            }
+        }
+    }
+
+    css::uno::Sequence< css::beans::PropertyValue > lArgs(4);
+    lArgs[0].Name = OUString(SEARCHITEM_SEARCHSTRING);
+    lArgs[0].Value <<= sFindText;
+    lArgs[1].Name = OUString(SEARCHITEM_SEARCHBACKWARD);
+    lArgs[1].Value <<= aSearchBackwards;
+    lArgs[2].Name = OUString(SEARCHITEM_SEARCHFLAGS);
+    lArgs[2].Value <<= (sal_Int32)0;
+    lArgs[3].Name = OUString(SEARCHITEM_TRANSLITERATEFLAGS);
+    lArgs[3].Value <<= (sal_Int32)(!aMatchCase ?
+        com::sun::star::i18n::TransliterationModules_IGNORE_CASE : 0);
+
     css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider(xFrame, css::uno::UNO_QUERY);
     if ( xDispatchProvider.is() )
     {
@@ -163,22 +202,10 @@ long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt )
             {
                 Remember_Impl(GetText());
 
-                OUString sFindText = GetText();
-                css::uno::Sequence< css::beans::PropertyValue > lArgs(3);
-
-                lArgs[0].Name = OUString(SEARCHITEM_SEARCHSTRING);
-                lArgs[0].Value <<= sFindText;
-
-                lArgs[1].Name = OUString(SEARCHITEM_SEARCHBACKWARD);
-                if (bShift)
-                    lArgs[1].Value <<= sal_True;
-                else
-                    lArgs[1].Value <<= sal_False;
-
-                lArgs[2].Name = OUString(SEARCHITEM_SEARCHFLAGS);
-                lArgs[2].Value <<= (sal_Int32)0;
+                Window* pWindow = GetParent();
+                ToolBox* pToolBox = (ToolBox*)pWindow;
 
-                impl_executeSearch( m_xContext, m_xFrame, lArgs);
+                impl_executeSearch( m_xContext, m_xFrame, pToolBox, bShift);
                 nRet = 1;
             }
             break;
@@ -560,34 +587,10 @@ void SAL_CALL UpDownSearchToolboxController::execute( sal_Int16 /*KeyModifier*/
     if ( m_bDisposed )
         throw css::lang::DisposedException();
 
-    OUString sFindText;
     Window* pWindow = VCLUnoHelper::GetWindow( getParent() );
     ToolBox* pToolBox = (ToolBox*)pWindow;
-    if ( pToolBox )
-    {
-        sal_uInt16 nItemCount = pToolBox->GetItemCount();
-        for ( sal_uInt16 i=0; i<nItemCount; ++i )
-        {
-            OUString sItemCommand = pToolBox->GetItemCommand(i);
-            if ( sItemCommand == COMMAND_FINDTEXT )
-            {
-                Window* pItemWin = pToolBox->GetItemWindow(i);
-                if (pItemWin)
-                    sFindText = pItemWin->GetText();
-                break;
-            }
-        }
-    }
 
-    css::uno::Sequence< css::beans::PropertyValue > lArgs(3);
-    lArgs[0].Name = OUString(SEARCHITEM_SEARCHSTRING);
-    lArgs[0].Value <<= sFindText;
-    lArgs[1].Name = OUString(SEARCHITEM_SEARCHBACKWARD);
-    lArgs[1].Value <<= sal_Bool( meType == UP );
-    lArgs[2].Name = OUString(SEARCHITEM_SEARCHFLAGS);
-    lArgs[2].Value <<= (sal_Int32)0;
-
-    impl_executeSearch(m_xContext, m_xFrame, lArgs);
+    impl_executeSearch(m_xContext, m_xFrame, pToolBox, sal_Bool( meType == UP ));
 
     css::frame::FeatureStateEvent aEvent;
     aEvent.FeatureURL.Complete = OUString(COMMAND_APPENDSEARCHHISTORY);
@@ -603,6 +606,125 @@ void SAL_CALL UpDownSearchToolboxController::statusChanged( const css::frame::Fe
     if ( m_bDisposed )
         return;
 }
+
+//-----------------------------------------------------------------------------------------------------------
+// MatchCaseToolboxController
+
+MatchCaseToolboxController::MatchCaseToolboxController( const css::uno::Reference< css::uno::XComponentContext >& rxContext )
+    :svt::ToolboxController( rxContext,
+    css::uno::Reference< css::frame::XFrame >(),
+    OUString(COMMAND_MATCHCASE) )
+{
+}
+
+MatchCaseToolboxController::~MatchCaseToolboxController()
+{
+}
+
+// XInterface
+css::uno::Any SAL_CALL MatchCaseToolboxController::queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException )
+{
+    css::uno::Any a = ToolboxController::queryInterface( aType );
+    if ( a.hasValue() )
+        return a;
+
+    return ::cppu::queryInterface( aType, static_cast< css::lang::XServiceInfo* >( this ) );
+}
+
+void SAL_CALL MatchCaseToolboxController::acquire() throw ()
+{
+    ToolboxController::acquire();
+}
+
+void SAL_CALL MatchCaseToolboxController::release() throw ()
+{
+    ToolboxController::release();
+}
+
+// XServiceInfo
+OUString SAL_CALL MatchCaseToolboxController::getImplementationName() throw( css::uno::RuntimeException )
+{
+    return getImplementationName_Static();
+}
+
+sal_Bool SAL_CALL MatchCaseToolboxController::supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException )
+{
+    const css::uno::Sequence< OUString > aSNL( getSupportedServiceNames() );
+    const OUString * pArray = aSNL.getConstArray();
+
+    for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
+        if( pArray[i] == ServiceName )
+            return true;
+
+    return false;
+}
+
+css::uno::Sequence< OUString > SAL_CALL MatchCaseToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException )
+{
+    return getSupportedServiceNames_Static();
+}
+
+css::uno::Sequence< OUString >  MatchCaseToolboxController::getSupportedServiceNames_Static() throw()
+{
+    css::uno::Sequence< OUString > aSNS( 1 );
+    aSNS.getArray()[0] = OUString( "com.sun.star.frame.ToolbarController" );
+    return aSNS;
+}
+
+// XComponent
+void SAL_CALL MatchCaseToolboxController::dispose() throw ( css::uno::RuntimeException )
+{
+    SolarMutexGuard aSolarMutexGuard;
+
+    SearchToolbarControllersManager::createControllersManager().freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL);
+
+    svt::ToolboxController::dispose();
+
+    delete m_pMatchCaseControl;
+    m_pMatchCaseControl = 0;
+}
+
+// XInitialization
+void SAL_CALL MatchCaseToolboxController::initialize( const css::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException)
+{
+    svt::ToolboxController::initialize(aArguments);
+
+    SearchToolbarControllersManager::createControllersManager().registryController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL);
+}
+
+// XToolbarController
+void SAL_CALL MatchCaseToolboxController::execute( sal_Int16 /*KeyModifier*/ ) throw ( css::uno::RuntimeException )
+{
+}
+
+css::uno::Reference< css::awt::XWindow > SAL_CALL MatchCaseToolboxController::createItemWindow( const css::uno::Reference< css::awt::XWindow >& Parent ) throw ( css::uno::RuntimeException )
+{
+    css::uno::Reference< css::awt::XWindow > xItemWindow;
+
+    css::uno::Reference< css::awt::XWindow > xParent( Parent );
+    Window* pParent = VCLUnoHelper::GetWindow( xParent );
+    if ( pParent )
+    {
+        ToolBox* pToolbar = (ToolBox* )pParent;
+        m_pMatchCaseControl = new CheckBox( pToolbar, 0 );
+        m_pMatchCaseControl->SetText( SVX_RESSTR( RID_SVXSTR_FINDBAR_MATCHCASE ) );
+        Size aSize( m_pMatchCaseControl->GetOptimalSize() );
+        m_pMatchCaseControl->SetSizePixel( aSize );
+    }
+    xItemWindow = VCLUnoHelper::GetInterface( m_pMatchCaseControl );
+
+    return xItemWindow;
+}
+
+// XStatusListener
+void SAL_CALL MatchCaseToolboxController::statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException )
+{
+    (void) rEvent;
+    SolarMutexGuard aSolarMutexGuard;
+    if ( m_bDisposed )
+        return;
+}
+
 //-----------------------------------------------------------------------------------------------------------
 // class ExitSearchToolboxController
 
@@ -899,6 +1021,13 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_c
             comphelper::getComponentContext(rSMgr), UpDownSearchToolboxController::UP ) );
 }
 
+css::uno::Reference< css::uno::XInterface > SAL_CALL MatchCaseToolboxController_createInstance(
+    const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
+{
+    return static_cast< cppu::OWeakObject * >(
+        new MatchCaseToolboxController( comphelper::getComponentContext(rSMgr) ) );
+}
+
 css::uno::Reference< css::uno::XInterface > SAL_CALL ExitFindbarToolboxController_createInstance(
     const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
 {
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.src b/svx/source/tbxctrls/tbunosearchcontrollers.src
index a9d42b9..d3b8920 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.src
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.src
@@ -24,4 +24,9 @@ String RID_SVXSTR_FINDBAR_FIND
     Text [ en-US ] = "Find" ;
 };
 
+String RID_SVXSTR_FINDBAR_MATCHCASE
+{
+    Text [ en-US ] = "Match Case" ;
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx
index 60002a4..ada6692 100644
--- a/svx/source/unodraw/unoctabl.cxx
+++ b/svx/source/unodraw/unoctabl.cxx
@@ -308,6 +308,13 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svx_component_getFactory (
                 svx::UpSearchToolboxController_createInstance,
                 svx::UpDownSearchToolboxController::getSupportedServiceNames_Static() );
         }
+        else if ( svx::MatchCaseToolboxController::getImplementationName_Static().equalsAscii( pImplName ) )
+        {
+            xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
+                svx::MatchCaseToolboxController::getImplementationName_Static(),
+                svx::MatchCaseToolboxController_createInstance,
+                svx::MatchCaseToolboxController::getSupportedServiceNames_Static() );
+        }
         else if ( svx::ExitSearchToolboxController::getImplementationName_Static().equalsAscii( pImplName ) )
         {
             xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
diff --git a/svx/util/svx.component b/svx/util/svx.component
index 8745a59..458e2ad 100644
--- a/svx/util/svx.component
+++ b/svx/util/svx.component
@@ -58,6 +58,9 @@
   <implementation name="com.sun.star.svx.FindTextToolboxController">
     <service name="com.sun.star.frame.ToolbarController"/>
   </implementation>
+  <implementation name="com.sun.star.svx.MatchCaseToolboxController">
+    <service name="com.sun.star.frame.ToolbarController"/>
+  </implementation>
   <implementation name="com.sun.star.svx.FontHeightToolBoxController">
     <service name="com.sun.star.frame.ToolbarController"/>
   </implementation>
diff --git a/sw/uiconfig/sglobal/toolbar/findbar.xml b/sw/uiconfig/sglobal/toolbar/findbar.xml
index a0e6037..f8052a1 100644
--- a/sw/uiconfig/sglobal/toolbar/findbar.xml
+++ b/sw/uiconfig/sglobal/toolbar/findbar.xml
@@ -22,6 +22,7 @@
   <toolbar:toolbaritem xlink:href=".uno:FindText"/>
   <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
   <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+  <toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
   <toolbar:toolbarseparator/>
   <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
 </toolbar:toolbar>
diff --git a/sw/uiconfig/sweb/toolbar/findbar.xml b/sw/uiconfig/sweb/toolbar/findbar.xml
index a0e6037..f8052a1 100644
--- a/sw/uiconfig/sweb/toolbar/findbar.xml
+++ b/sw/uiconfig/sweb/toolbar/findbar.xml
@@ -22,6 +22,7 @@
   <toolbar:toolbaritem xlink:href=".uno:FindText"/>
   <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
   <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+  <toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
   <toolbar:toolbarseparator/>
   <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
 </toolbar:toolbar>
diff --git a/sw/uiconfig/swriter/toolbar/findbar.xml b/sw/uiconfig/swriter/toolbar/findbar.xml
index a0e6037..f8052a1 100644
--- a/sw/uiconfig/swriter/toolbar/findbar.xml
+++ b/sw/uiconfig/swriter/toolbar/findbar.xml
@@ -22,6 +22,7 @@
   <toolbar:toolbaritem xlink:href=".uno:FindText"/>
   <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
   <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+  <toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
   <toolbar:toolbarseparator/>
   <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
 </toolbar:toolbar>
diff --git a/sw/uiconfig/swxform/toolbar/findbar.xml b/sw/uiconfig/swxform/toolbar/findbar.xml
index a0e6037..f8052a1 100644
--- a/sw/uiconfig/swxform/toolbar/findbar.xml
+++ b/sw/uiconfig/swxform/toolbar/findbar.xml
@@ -22,6 +22,7 @@
   <toolbar:toolbaritem xlink:href=".uno:FindText"/>
   <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
   <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
+  <toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
   <toolbar:toolbarseparator/>
   <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
 </toolbar:toolbar>


More information about the Libreoffice-commits mailing list