[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - 3 commits - fpicker/source include/svtools svtools/source

Szymon Kłos eszkadev at gmail.com
Fri Aug 21 01:53:22 PDT 2015


 fpicker/source/office/RemoteFilesDialog.cxx |    3 ++
 include/svtools/breadcrumb.hxx              |    4 ++-
 svtools/source/control/autocmpledit.cxx     |    2 -
 svtools/source/control/breadcrumb.cxx       |   35 +++++++++++++++++++++++++++-
 4 files changed, 41 insertions(+), 3 deletions(-)

New commits:
commit 41bf8d9bf7200be9f15ecb39cf2898c9c3d2e073
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Fri Aug 21 10:51:08 2015 +0200

    Autocompletion should be case insensitive
    
    Change-Id: I6f173590a94df6a04d5eee76653fa47ea8f71853

diff --git a/svtools/source/control/autocmpledit.cxx b/svtools/source/control/autocmpledit.cxx
index 14cf58b..8032b6e 100644
--- a/svtools/source/control/autocmpledit.cxx
+++ b/svtools/source/control/autocmpledit.cxx
@@ -70,7 +70,7 @@ bool AutocompleteEdit::Match( const OUString& rText )
 
     for( std::vector< OUString >::size_type i = 0; i < m_aEntries.size(); ++i )
     {
-        if( m_aEntries[i].startsWith( rText ) )
+        if( m_aEntries[i].startsWithIgnoreAsciiCase( rText ) )
         {
             m_aMatching.push_back( m_aEntries[i] );
             bRet = true;
commit 57d4419b63e226a403c721e141e156ff95dd5c01
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Fri Aug 21 10:42:37 2015 +0200

    clear file name field while changing dir
    
    Change-Id: I46e9d9e7b56c09c65808fe231e5ba4eeddf90ad2

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index e8d25c6..c54eca7 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -541,6 +541,9 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString const & sURL )
 
             // -1 timeout - sync
             m_pCurrentAsyncAction->execute( sURL, sFilter, -1, -1, GetBlackList() );
+
+            if( m_eMode != REMOTEDLG_MODE_SAVE )
+                m_pName_ed->SetText( "" );
         }
         else
         {
commit fe7608675ba30c9acb60d5966c420255cdb3a8d5
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Fri Aug 21 10:29:49 2015 +0200

    Breadcrumb: mouseover effect
    
    Change-Id: If38d799e0fa7506416082fb15f37b12267a9b5df

diff --git a/include/svtools/breadcrumb.hxx b/include/svtools/breadcrumb.hxx
index ddd377d..c1a94d9 100644
--- a/include/svtools/breadcrumb.hxx
+++ b/include/svtools/breadcrumb.hxx
@@ -27,10 +27,12 @@ enum SvtBreadcrumbMode
     ALL_VISITED = 1
 };
 
+class CustomLink;
+
 class SVT_DLLPUBLIC Breadcrumb : public VclHBox
 {
     private:
-        std::vector< VclPtr< FixedHyperlink > > m_aLinks;
+        std::vector< VclPtr< CustomLink > > m_aLinks;
         std::vector< VclPtr< FixedText > > m_aSeparators;
 
         OUString m_sRootName;
diff --git a/svtools/source/control/breadcrumb.cxx b/svtools/source/control/breadcrumb.cxx
index 4636a6d..4d496bc 100644
--- a/svtools/source/control/breadcrumb.cxx
+++ b/svtools/source/control/breadcrumb.cxx
@@ -9,6 +9,38 @@
 
 #include <svtools/breadcrumb.hxx>
 
+class CustomLink : public FixedHyperlink
+{
+public:
+    CustomLink( vcl::Window* pParent, WinBits nWinStyle )
+    : FixedHyperlink( pParent, nWinStyle )
+    {
+        vcl::Font aFont = GetControlFont( );
+        aFont.SetUnderline( UNDERLINE_NONE );
+        SetControlFont( aFont );
+    }
+
+protected:
+    virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE
+    {
+        // changes the style if the control is enabled
+        if ( !rMEvt.IsLeaveWindow() && IsEnabled() )
+        {
+            vcl::Font aFont = GetControlFont( );
+            aFont.SetUnderline( UNDERLINE_SINGLE );
+            SetControlFont( aFont );
+        }
+        else
+        {
+            vcl::Font aFont = GetControlFont( );
+            aFont.SetUnderline( UNDERLINE_NONE );
+            SetControlFont( aFont );
+        }
+
+        FixedHyperlink::MouseMove( rMEvt );
+    }
+};
+
 Breadcrumb::Breadcrumb( vcl::Window* pParent, WinBits nWinStyle ) : VclHBox( pParent, nWinStyle )
 {
     m_eMode = SvtBreadcrumbMode::ONLY_CURRENT_PATH;
@@ -112,6 +144,7 @@ void Breadcrumb::SetURL( const OUString& rURL )
         m_aLinks[i]->SetURL( sRootPath + OUString( sPath.getStr(), nEnd ) );
         m_aLinks[i]->Hide();
         m_aLinks[i]->Enable( true );
+
         m_aSeparators[i]->Hide();
 
         nPos = nEnd;
@@ -208,7 +241,7 @@ void Breadcrumb::SetMode( SvtBreadcrumbMode eMode )
 
 void Breadcrumb::appendField()
 {
-    m_aLinks.push_back( VclPtr< FixedHyperlink >::Create( this, WB_TABSTOP ) );
+    m_aLinks.push_back( VclPtr< CustomLink >::Create( this, WB_TABSTOP ) );
     m_aLinks[m_aLinks.size() - 1]->Hide();
     m_aLinks[m_aLinks.size() - 1]->SetClickHdl( LINK( this, Breadcrumb, ClickLinkHdl ) );
 


More information about the Libreoffice-commits mailing list