Kaydet (Commit) bfd495d9 authored tarafından Andrzej J.R. Hunt's avatar Andrzej J.R. Hunt

fdo#63035 Add "Match Case" to Find bar.

Change-Id: I1339767de7980426d32960bf5ee60e2f5c011be4
üst f2321c52
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<toolbar:toolbaritem xlink:href=".uno:FindText"/> <toolbar:toolbaritem xlink:href=".uno:FindText"/>
<toolbar:toolbaritem xlink:href=".uno:DownSearch"/> <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
<toolbar:toolbaritem xlink:href=".uno:UpSearch"/> <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
<toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
<toolbar:toolbarseparator/> <toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:SearchDialog"/> <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
</toolbar:toolbar> </toolbar:toolbar>
...@@ -961,6 +961,7 @@ ...@@ -961,6 +961,7 @@
#define RID_SVXSTR_TEXTCOLOR (RID_SVX_START + 1178) #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_FINDBAR_FIND (RID_SVX_START + 1190)
#define RID_SVXSTR_NUMBULLET_NONE (RID_SVX_START + 1191) #define RID_SVXSTR_NUMBULLET_NONE (RID_SVX_START + 1191)
......
...@@ -429,6 +429,17 @@ ...@@ -429,6 +429,17 @@
<value>com.sun.star.svx.UpSearchToolboxController</value> <value>com.sun.star.svx.UpSearchToolboxController</value>
</prop> </prop>
</node> </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"> <node oor:name="c4" oor:op="replace" install:module="reportbuilder">
<prop oor:name="Command"> <prop oor:name="Command">
<value>.uno:FontColor</value> <value>.uno:FontColor</value>
......
...@@ -1478,6 +1478,11 @@ ...@@ -1478,6 +1478,11 @@
<value>1</value> <value>1</value>
</prop> </prop>
</node> </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"> <node oor:name=".uno:ExitSearch" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string"> <prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Exit Search</value> <value xml:lang="en-US">Exit Search</value>
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<toolbar:toolbaritem xlink:href=".uno:FindText"/> <toolbar:toolbaritem xlink:href=".uno:FindText"/>
<toolbar:toolbaritem xlink:href=".uno:DownSearch"/> <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
<toolbar:toolbaritem xlink:href=".uno:UpSearch"/> <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
<toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
<toolbar:toolbarseparator/> <toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:SearchDialog"/> <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
</toolbar:toolbar> </toolbar:toolbar>
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<toolbar:toolbaritem xlink:href=".uno:FindText"/> <toolbar:toolbaritem xlink:href=".uno:FindText"/>
<toolbar:toolbaritem xlink:href=".uno:DownSearch"/> <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
<toolbar:toolbaritem xlink:href=".uno:UpSearch"/> <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
<toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
<toolbar:toolbarseparator/> <toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:SearchDialog"/> <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
</toolbar:toolbar> </toolbar:toolbar>
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<toolbar:toolbaritem xlink:href=".uno:FindText"/> <toolbar:toolbaritem xlink:href=".uno:FindText"/>
<toolbar:toolbaritem xlink:href=".uno:DownSearch"/> <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
<toolbar:toolbaritem xlink:href=".uno:UpSearch"/> <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
<toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
<toolbar:toolbarseparator/> <toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:SearchDialog"/> <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
</toolbar:toolbar> </toolbar:toolbar>
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase1.hxx>
#include <cppuhelper/weak.hxx> #include <cppuhelper/weak.hxx>
#include <svtools/toolboxcontroller.hxx> #include <svtools/toolboxcontroller.hxx>
#include <vcl/button.hxx>
#include <vcl/combobox.hxx> #include <vcl/combobox.hxx>
#include <vcl/window.hxx> #include <vcl/window.hxx>
...@@ -215,6 +216,47 @@ private: ...@@ -215,6 +216,47 @@ private:
Type meType; 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 // protocol handler for "vnd.sun.star.findbar:*" URLs
// The dispatch object will be used for shortcut commands for findbar // The dispatch object will be used for shortcut commands for findbar
class FindbarDispatcher : public css::lang::XServiceInfo, class FindbarDispatcher : public css::lang::XServiceInfo,
...@@ -267,6 +309,7 @@ private: ...@@ -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 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 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 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 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 ); css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
......
...@@ -24,4 +24,9 @@ String RID_SVXSTR_FINDBAR_FIND ...@@ -24,4 +24,9 @@ String RID_SVXSTR_FINDBAR_FIND
Text [ en-US ] = "Find" ; Text [ en-US ] = "Find" ;
}; };
String RID_SVXSTR_FINDBAR_MATCHCASE
{
Text [ en-US ] = "Match Case" ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -308,6 +308,13 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svx_component_getFactory ( ...@@ -308,6 +308,13 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svx_component_getFactory (
svx::UpSearchToolboxController_createInstance, svx::UpSearchToolboxController_createInstance,
svx::UpDownSearchToolboxController::getSupportedServiceNames_Static() ); 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 ) ) else if ( svx::ExitSearchToolboxController::getImplementationName_Static().equalsAscii( pImplName ) )
{ {
xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
......
...@@ -58,6 +58,9 @@ ...@@ -58,6 +58,9 @@
<implementation name="com.sun.star.svx.FindTextToolboxController"> <implementation name="com.sun.star.svx.FindTextToolboxController">
<service name="com.sun.star.frame.ToolbarController"/> <service name="com.sun.star.frame.ToolbarController"/>
</implementation> </implementation>
<implementation name="com.sun.star.svx.MatchCaseToolboxController">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.svx.FontHeightToolBoxController"> <implementation name="com.sun.star.svx.FontHeightToolBoxController">
<service name="com.sun.star.frame.ToolbarController"/> <service name="com.sun.star.frame.ToolbarController"/>
</implementation> </implementation>
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<toolbar:toolbaritem xlink:href=".uno:FindText"/> <toolbar:toolbaritem xlink:href=".uno:FindText"/>
<toolbar:toolbaritem xlink:href=".uno:DownSearch"/> <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
<toolbar:toolbaritem xlink:href=".uno:UpSearch"/> <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
<toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
<toolbar:toolbarseparator/> <toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:SearchDialog"/> <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
</toolbar:toolbar> </toolbar:toolbar>
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<toolbar:toolbaritem xlink:href=".uno:FindText"/> <toolbar:toolbaritem xlink:href=".uno:FindText"/>
<toolbar:toolbaritem xlink:href=".uno:DownSearch"/> <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
<toolbar:toolbaritem xlink:href=".uno:UpSearch"/> <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
<toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
<toolbar:toolbarseparator/> <toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:SearchDialog"/> <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
</toolbar:toolbar> </toolbar:toolbar>
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<toolbar:toolbaritem xlink:href=".uno:FindText"/> <toolbar:toolbaritem xlink:href=".uno:FindText"/>
<toolbar:toolbaritem xlink:href=".uno:DownSearch"/> <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
<toolbar:toolbaritem xlink:href=".uno:UpSearch"/> <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
<toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
<toolbar:toolbarseparator/> <toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:SearchDialog"/> <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
</toolbar:toolbar> </toolbar:toolbar>
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<toolbar:toolbaritem xlink:href=".uno:FindText"/> <toolbar:toolbaritem xlink:href=".uno:FindText"/>
<toolbar:toolbaritem xlink:href=".uno:DownSearch"/> <toolbar:toolbaritem xlink:href=".uno:DownSearch"/>
<toolbar:toolbaritem xlink:href=".uno:UpSearch"/> <toolbar:toolbaritem xlink:href=".uno:UpSearch"/>
<toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
<toolbar:toolbarseparator/> <toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:SearchDialog"/> <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
</toolbar:toolbar> </toolbar:toolbar>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment