[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - 50 commits - canvas/README canvas/source canvas/workben compilerplugins/clang external/bzip2 filter/source fpicker/source framework/inc framework/source icon-themes/breeze icon-themes/galaxy icon-themes/hicontrast icon-themes/human icon-themes/tango include/formula include/LibreOfficeKit include/svtools include/vcl libreofficekit/qa libreofficekit/source officecfg/registry onlineupdate/Executable_mar.mk onlineupdate/Executable_updater.mk onlineupdate/source RepositoryExternal.mk sc/inc sc/qa scripting/source sc/source sc/uiconfig sd/source sd/uiconfig sfx2/source starmath/inc starmath/source stoc/source svtools/source svx/source sw/inc sw/qa sw/source sw/uiconfig vcl/inc vcl/osx vcl/source vcl/unx vcl/workben writerfilter/source
Szymon Kłos
eszkadev at gmail.com
Thu Jul 23 02:08:08 PDT 2015
Rebased ref, commits from common ancestor:
commit 7dfe65ec07361d145caf5219e659ee5cc1540836
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Thu Jul 23 10:54:44 2015 +0200
fixed crash
While opening folders in SvtFileView using doubleclick,
sometimes GtkSalFrame::gestureLongPress method is
executed with a null frame pointer and LO crashes.
I noticed this only with remote dirs, probably this
bug occurs only when the doubleclick handler routine
takes a lot of time.
Change-Id: I432046994b3e1662bd7e499681bd20e9696b2d52
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 2cb31bc..ea3eb3b 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -3544,15 +3544,18 @@ void GtkSalFrame::gestureLongPress(GtkGestureLongPress* gesture, gpointer frame)
{
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
- SalLongPressEvent aEvent;
+ if(pThis)
+ {
+ SalLongPressEvent aEvent;
- gdouble x, y;
- GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture));
- gtk_gesture_get_point(GTK_GESTURE(gesture), sequence, &x, &y);
- aEvent.mnX = x;
- aEvent.mnY = y;
+ gdouble x, y;
+ GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture));
+ gtk_gesture_get_point(GTK_GESTURE(gesture), sequence, &x, &y);
+ aEvent.mnX = x;
+ aEvent.mnY = y;
- pThis->CallCallback(SALEVENT_LONGPRESS, &aEvent);
+ pThis->CallCallback(SALEVENT_LONGPRESS, &aEvent);
+ }
}
#endif
commit 326342c36ff89c252cdf2f2f905e7a97448085f2
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Wed Jul 22 17:20:26 2015 +0200
show error when directory doesn't exist
Change-Id: I1c8ca1a509c9187687079d86f0e637b26490a7a3
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index bd35802..4e69c9d 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -462,7 +462,7 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString const & sURL )
if( m_pFileView )
{
- if( ContentIsFolder( sURL ) )
+ if( !sURL.isEmpty() && ContentIsFolder( sURL ) )
{
OUString sFilter = FILEDIALOG_FILTER_ALL;
@@ -496,6 +496,9 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString const & sURL )
else
{
// content doesn't exist
+ m_pTreeView->EndSelection();
+ ErrorHandler::HandleError( ERRCODE_IO_NOTEXISTS );
+ return eFailure;
}
}
@@ -689,13 +692,13 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl )
{
OUString sURL = m_pFileView->GetCurrentURL();
- if( ContentIsFolder( sURL ) )
+ if( ContentIsDocument( sURL ) )
{
- OpenURL( sURL );
+ EndDialog( RET_OK );
}
else
{
- EndDialog( RET_OK );
+ OpenURL( sURL );
}
}
@@ -1043,6 +1046,26 @@ bool RemoteFilesDialog::ContentIsFolder( const OUString& rURL )
return false;
}
+bool RemoteFilesDialog::ContentIsDocument( const OUString& rURL )
+{
+ try
+ {
+ Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ Reference< XInteractionHandler > xInteractionHandler(
+ InteractionHandler::createWithParent( xContext, 0 ), UNO_QUERY_THROW );
+ Reference< XCommandEnvironment > xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
+ ::ucbhelper::Content aContent( rURL, xEnv, xContext );
+
+ return aContent.isDocument();
+ }
+ catch( const Exception& )
+ {
+ // a content doesn't exist
+ }
+
+ return false;
+}
+
sal_Int32 RemoteFilesDialog::getTargetColorDepth()
{
// This dialog doesn't contain preview
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index ede30c7..b0f151e 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -16,6 +16,7 @@
#include <svtools/breadcrumb.hxx>
#include <svtools/fileview.hxx>
+#include <tools/errinf.hxx>
#include <tools/resid.hxx>
#include <vcl/button.hxx>
@@ -81,6 +82,7 @@ public:
virtual const OUString& GetPath() SAL_OVERRIDE;
virtual std::vector<OUString> GetPathList() const SAL_OVERRIDE;
virtual bool ContentIsFolder( const OUString& rURL ) SAL_OVERRIDE;
+ virtual bool ContentIsDocument( const OUString& rURL );
virtual void AddFilter( const OUString& rFilter, const OUString& rType ) SAL_OVERRIDE;
virtual void AddFilterGroup( const OUString& _rFilter,
commit 135d6050915f9d1291b519ea4c2c38b56ff083a9
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Wed Jul 22 16:42:47 2015 +0200
reload content while expanding node
Change-Id: I7ce281ea4e2d5c5c9fc0b2b3f315defc14364df3
diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx
index 63cc7e0..d597168 100644
--- a/svtools/source/contnr/foldertree.cxx
+++ b/svtools/source/contnr/foldertree.cxx
@@ -32,9 +32,14 @@ void FolderTree::RequestingChildren( SvTreeListEntry* pEntry )
void FolderTree::FillTreeEntry( SvTreeListEntry* pEntry )
{
- // fill only empty entries
- if( pEntry && GetChildCount( pEntry ) == 0 )
+ if( pEntry )
{
+ while( GetChildCount( pEntry ) > 0 )
+ {
+ SvTreeListEntry* pChild = FirstChild( pEntry );
+ GetModel()->Remove( pChild );
+ }
+
::std::vector< SortingData_Impl* > aContent;
::rtl::Reference< ::svt::FileViewContentEnumerator >
commit 93bda72dc0559830a49d570d717c61f35b2fa56c
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Wed Jul 22 15:19:37 2015 +0200
check if path exist before init of the fileview
Change-Id: I0c9384644cf5aabf83512c341d3ffff5d4847f36
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 75615d1..bd35802 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -462,34 +462,41 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString const & sURL )
if( m_pFileView )
{
- OUString sFilter = FILEDIALOG_FILTER_ALL;
-
- if( m_nCurrentFilter != LISTBOX_ENTRY_NOTFOUND )
+ if( ContentIsFolder( sURL ) )
{
- sFilter = m_aFilters[m_nCurrentFilter].second;
- }
+ OUString sFilter = FILEDIALOG_FILTER_ALL;
- m_pFileView->EndInplaceEditing( false );
+ if( m_nCurrentFilter != LISTBOX_ENTRY_NOTFOUND )
+ {
+ sFilter = m_aFilters[m_nCurrentFilter].second;
+ }
- EnableChildPointerOverwrite( true );
- SetPointer( PointerStyle::Wait );
+ m_pFileView->EndInplaceEditing( false );
- eResult = m_pFileView->Initialize( sURL, sFilter, NULL, GetBlackList() );
+ EnableChildPointerOverwrite( true );
+ SetPointer( PointerStyle::Wait );
- if( eResult == eSuccess )
- {
- m_pPath->SetURL( sURL );
+ eResult = m_pFileView->Initialize( sURL, sFilter, NULL, GetBlackList() );
- m_pTreeView->SetSelectHdl( Link<>() );
- m_pTreeView->SetTreePath( sURL );
- m_pTreeView->SetSelectHdl( LINK( this, RemoteFilesDialog, TreeSelectHdl ) );
+ if( eResult == eSuccess )
+ {
+ m_pPath->SetURL( sURL );
- m_bIsConnected = true;
- EnableControls();
- }
+ m_pTreeView->SetSelectHdl( Link<>() );
+ m_pTreeView->SetTreePath( sURL );
+ m_pTreeView->SetSelectHdl( LINK( this, RemoteFilesDialog, TreeSelectHdl ) );
+
+ m_bIsConnected = true;
+ EnableControls();
+ }
- SetPointer( PointerStyle::Arrow );
- EnableChildPointerOverwrite( false );
+ SetPointer( PointerStyle::Arrow );
+ EnableChildPointerOverwrite( false );
+ }
+ else
+ {
+ // content doesn't exist
+ }
}
return eResult;
commit c5182ebb592769b089c2c688ec9984556711563a
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Wed Jul 22 14:06:52 2015 +0200
Breadcrumb: clear all fields after changing root
Change-Id: I8cefc8f755234cb4b63ca3a414402469df0394e1
diff --git a/svtools/source/control/breadcrumb.cxx b/svtools/source/control/breadcrumb.cxx
index 564c968..f1725e9 100644
--- a/svtools/source/control/breadcrumb.cxx
+++ b/svtools/source/control/breadcrumb.cxx
@@ -45,6 +45,16 @@ OUString Breadcrumb::GetHdlURL()
void Breadcrumb::SetRootName( const OUString& rURL )
{
m_sRootName = rURL;
+
+ // we changed root - clear all fields
+ for( std::vector<VclPtr<FixedHyperlink>>::size_type i = 1; i < m_aLinks.size(); i++ )
+ {
+ m_aLinks[i]->SetText( "" );
+
+ m_aLinks[i]->Hide();
+ m_aSeparators[i]->Hide();
+ m_aLinks[i]->Enable( true );
+ }
}
void Breadcrumb::SetURL( const OUString& rURL )
commit 05d69afa471403222820157c8ffe7579f4b44524
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Tue Jul 21 17:21:57 2015 +0200
Open/Save Remote File in Impress/Draw toolbars and menu
Change-Id: I9503f5beaa8b5a6afc213747a691265acd5903f7
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index fe9e58a5..1564f37 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -243,6 +243,8 @@ void SdDLL::RegisterControllers()
SvxFrameLineStyleToolBoxControl::RegisterControl(SID_FRAME_LINESTYLE, pMod );
SvxColorToolBoxControl::RegisterControl(SID_FRAME_LINECOLOR, pMod );
SvxFrameToolBoxControl::RegisterControl(SID_ATTR_BORDER, pMod );
+
+ SfxSaveAsToolBoxControl::RegisterControl(SID_SAVEASDOC, pMod );
}
void SdDLL::Init()
diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml
index bc8cfee..c1a9be9 100644
--- a/sd/uiconfig/sdraw/menubar/menubar.xml
+++ b/sd/uiconfig/sdraw/menubar/menubar.xml
@@ -21,6 +21,7 @@
<menu:menupopup>
<menu:menuitem menu:id=".uno:AddDirect"/>
<menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:OpenRemote"/>
<menu:menuitem menu:id=".uno:RecentFileList"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:AutoPilotMenu"/>
@@ -36,6 +37,7 @@
<menu:menuitem menu:id=".uno:Save"/>
<menu:menuitem menu:id=".uno:SaveAs"/>
<menu:menuitem menu:id=".uno:SaveACopy"/>
+ <menu:menuitem menu:id=".uno:SaveAsRemote"/>
<menu:menuitem menu:id=".uno:SaveAll"/>
<menu:menuitem menu:id=".uno:CheckOut"/>
<menu:menuitem menu:id=".uno:CancelCheckOut"/>
diff --git a/sd/uiconfig/sdraw/toolbar/standardbar.xml b/sd/uiconfig/sdraw/toolbar/standardbar.xml
index 06c7d5d..6e2d1fa 100644
--- a/sd/uiconfig/sdraw/toolbar/standardbar.xml
+++ b/sd/uiconfig/sdraw/toolbar/standardbar.xml
@@ -22,8 +22,9 @@
<toolbar:toolbaritem xlink:href=".uno:AddDirect" toolbar:helpid="5537"/>
<toolbar:toolbaritem xlink:href=".uno:NewDoc" toolbar:visible="false" toolbar:helpid="5500"/>
<toolbar:toolbaritem xlink:href=".uno:Open" toolbar:style="dropdown"/>
+ <toolbar:toolbaritem xlink:href=".uno:OpenRemote"/>
<toolbar:toolbaritem xlink:href=".uno:Save" toolbar:helpid="5505"/>
- <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:helpid="5502"/>
+ <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:style="dropdown" toolbar:helpid="5502"/>
<toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:visible="false" toolbar:helpid="5331"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:EditDoc" toolbar:helpid="6312" toolbar:visible="false"/>
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml
index 3eb5156..71146c2 100644
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -21,6 +21,7 @@
<menu:menupopup>
<menu:menuitem menu:id=".uno:AddDirect"/>
<menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:OpenRemote"/>
<menu:menuitem menu:id=".uno:RecentFileList"/>
<menu:menuitem menu:id=".uno:CloseDoc"/>
<menu:menuseparator/>
@@ -38,6 +39,7 @@
<menu:menuitem menu:id=".uno:Save"/>
<menu:menuitem menu:id=".uno:SaveAs"/>
<menu:menuitem menu:id=".uno:SaveACopy"/>
+ <menu:menuitem menu:id=".uno:SaveAsRemote"/>
<menu:menuitem menu:id=".uno:SaveAll"/>
<menu:menuitem menu:id=".uno:CheckOut"/>
<menu:menuitem menu:id=".uno:CancelCheckOut"/>
diff --git a/sd/uiconfig/simpress/toolbar/standardbar.xml b/sd/uiconfig/simpress/toolbar/standardbar.xml
index c82ad6a..a83b414 100644
--- a/sd/uiconfig/simpress/toolbar/standardbar.xml
+++ b/sd/uiconfig/simpress/toolbar/standardbar.xml
@@ -22,8 +22,9 @@
<toolbar:toolbaritem xlink:href=".uno:AddDirect" toolbar:style="dropdown"/>
<toolbar:toolbaritem xlink:href=".uno:NewDoc" toolbar:visible="false"/>
<toolbar:toolbaritem xlink:href=".uno:Open" toolbar:style="dropdown"/>
+ <toolbar:toolbaritem xlink:href=".uno:OpenRemote"/>
<toolbar:toolbaritem xlink:href=".uno:Save"/>
- <toolbar:toolbaritem xlink:href=".uno:SaveAs"/>
+ <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:style="dropdown"/>
<toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:visible="false"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:EditDoc" toolbar:visible="false"/>
commit 7c714c6208daa49f8f563fec10a4d77c1c86c240
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Tue Jul 21 16:45:00 2015 +0200
set pointer to Wait while reading url
Change-Id: I3c0786f8fb20df368cc7c03e35deba51d7ebbecd
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index f618965..75615d1 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -470,6 +470,10 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString const & sURL )
}
m_pFileView->EndInplaceEditing( false );
+
+ EnableChildPointerOverwrite( true );
+ SetPointer( PointerStyle::Wait );
+
eResult = m_pFileView->Initialize( sURL, sFilter, NULL, GetBlackList() );
if( eResult == eSuccess )
@@ -483,6 +487,9 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString const & sURL )
m_bIsConnected = true;
EnableControls();
}
+
+ SetPointer( PointerStyle::Arrow );
+ EnableChildPointerOverwrite( false );
}
return eResult;
commit 42bdf9982e0ec7d7162ab8494e3331f621609f1c
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Tue Jul 21 15:50:09 2015 +0200
select recently added service
Change-Id: I55a32eef4a5eb3b9f57cf6d1b8f3cba5a9a14c55
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 47d2ddf..f618965 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -551,6 +551,7 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, AddServiceHdl )
m_pServices_lb->InsertEntry( sPrefix + newService->GetName() );
m_pServices_lb->SelectEntryPos( m_pServices_lb->GetEntryCount() - 1 );
+ SelectServiceHdl( NULL );
m_bIsUpdated = true;
commit da3a1b2a1600d44eec4ca034df87abde08d893a3
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Tue Jul 21 15:39:08 2015 +0200
automatically select last used service
Change-Id: Ic66517cd65c28bd7e62e38796cf8580ed31305f7
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index d2e3cc5..47d2ddf 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -325,6 +325,11 @@ short RemoteFilesDialog::Execute()
Show();
AddServiceHdl( NULL );
}
+ if( m_pServices_lb->GetEntryCount() > 0 )
+ {
+ Show();
+ SelectServiceHdl( NULL );
+ }
short nRet = SvtFileDialog_Base::Execute();
commit 1d726e9f3d597a2307ededaded33c86ec2e56fe3
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Tue Jul 21 13:28:46 2015 +0200
avoid multiple recursive opening the same url, cleaning
Change-Id: I8a3ae75a64ffcc4879af3e3591b3b433cee1678d
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 7f0447a..d2e3cc5 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -470,7 +470,10 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString const & sURL )
if( eResult == eSuccess )
{
m_pPath->SetURL( sURL );
+
+ m_pTreeView->SetSelectHdl( Link<>() );
m_pTreeView->SetTreePath( sURL );
+ m_pTreeView->SetSelectHdl( LINK( this, RemoteFilesDialog, TreeSelectHdl ) );
m_bIsConnected = true;
EnableControls();
@@ -662,24 +665,17 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl )
{
- SvTreeListEntry* pEntry = m_pFileView->FirstSelected();
-
- if( pEntry )
+ if( m_pFileView->GetSelectionCount() )
{
- SvtContentEntry* pData = static_cast< SvtContentEntry* >( pEntry->GetUserData() );
+ OUString sURL = m_pFileView->GetCurrentURL();
- if( pData )
+ if( ContentIsFolder( sURL ) )
{
- if( pData->mbIsFolder )
- {
- OUString sURL = m_pFileView->GetCurrentURL();
-
- OpenURL( sURL );
- }
- else
- {
- EndDialog( RET_OK );
- }
+ OpenURL( sURL );
+ }
+ else
+ {
+ EndDialog( RET_OK );
}
}
commit adcb7fd94664b7a54cfb8f36b84e623b90847827
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Tue Jul 21 12:35:19 2015 +0200
don't take full email address as a username
Change-Id: Ibc8f951dc3281b0b1d0f4b6783af0dbe2fb75da0
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index cb90be7..125a817 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -198,7 +198,13 @@ void PlaceEditDialog::UpdateLabel( )
if( !m_pEDUsername->GetText().isEmpty( ) )
{
OUString sLabel = SvtResId( STR_SVT_DEFAULT_SERVICE_LABEL );
- sLabel = sLabel.replaceFirst( "$user$", m_pEDUsername->GetText() );
+ OUString sUser = m_pEDUsername->GetText();
+
+ int nLength = sUser.indexOf( '@' );
+ if( nLength < 0 )
+ nLength = sUser.getLength();
+
+ sLabel = sLabel.replaceFirst( "$user$", sUser.copy( 0, nLength ) );
sLabel = sLabel.replaceFirst( "$service$", m_pLBServerType->GetSelectEntry() );
m_pEDServerName->SetText( sLabel );
commit ac5fd4bffe598181055d9936ccad3eb10a66fd68
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Tue Jul 21 11:59:45 2015 +0200
FolderTree: expanded folder icon
Change-Id: If5956b61dec2f00f9233e8f4906bdb9b6f22571d
diff --git a/icon-themes/breeze/links.txt b/icon-themes/breeze/links.txt
index 7ba9f85..9475368 100644
--- a/icon-themes/breeze/links.txt
+++ b/icon-themes/breeze/links.txt
@@ -126,3 +126,6 @@ cmd/sc_showgraphics.png cmd/sc_graphic.png
# split cells duplicates
svx/res/zetlhor2.png /sw/res/zetlhor2.png
svx/res/zetlver2.png /sw/res/zetlver2.png
+
+# FolderTree expanded icon
+svtools/res/folderop.png formula/res/fapopen.png
diff --git a/icon-themes/galaxy/links.txt b/icon-themes/galaxy/links.txt
index 2e42f11..6a68faf 100644
--- a/icon-themes/galaxy/links.txt
+++ b/icon-themes/galaxy/links.txt
@@ -81,3 +81,6 @@ cmd/lc_charbackcolor.png cmd/lc_backcolor.png
# Toggle graphics visibility in Writer
cmd/sc_showgraphics.png cmd/sc_graphic.png
+
+# FolderTree expanded icon
+svtools/res/folderop.png formula/res/fapopen.png
diff --git a/icon-themes/hicontrast/links.txt b/icon-themes/hicontrast/links.txt
index 3c9fd17..ea11b2a 100644
--- a/icon-themes/hicontrast/links.txt
+++ b/icon-themes/hicontrast/links.txt
@@ -5,3 +5,7 @@ cmd/sc_linespacing.png cmd/sc_spacepara15.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
+
+# FolderTree icons
+svtools/res/folder.png formula/res/fapclose.png
+svtools/res/folderop.png formula/res/fapopen.png
diff --git a/icon-themes/human/links.txt b/icon-themes/human/links.txt
index 3e7c8a7..5b1aca0 100644
--- a/icon-themes/human/links.txt
+++ b/icon-themes/human/links.txt
@@ -8,3 +8,6 @@ cmd/sc_linespacing.png cmd/sc_spacepara15.png
# text background colour Impress/Draw
cmd/sc_charbackcolor.png cmd/sc_backcolor.png
cmd/lc_charbackcolor.png cmd/lc_backcolor.png
+
+# FolderTree expanded icon
+svtools/res/folderop.png formula/res/fapopen.png
diff --git a/icon-themes/tango/links.txt b/icon-themes/tango/links.txt
index 2fc1b96..672e153 100644
--- a/icon-themes/tango/links.txt
+++ b/icon-themes/tango/links.txt
@@ -383,6 +383,7 @@ res/sc10712.png cmd/sc_sortdescending.png
res/reload.png cmd/sc_reload.png
res/sc05501.png cmd/sc_open.png
svtools/res/folder.png formula/res/fapclose.png
+svtools/res/folderop.png formula/res/fapopen.png
fpicker/res/fp011.png res/sc06303.png
sfx2/res/styfam1.png sw/imglst/sf01.png
sfx2/res/styfam2.png sw/imglst/sf02.png
diff --git a/include/svtools/foldertree.hxx b/include/svtools/foldertree.hxx
index e430072..4be22b9 100644
--- a/include/svtools/foldertree.hxx
+++ b/include/svtools/foldertree.hxx
@@ -40,6 +40,7 @@ private:
::osl::Mutex m_aMutex;
Sequence< OUString > m_aBlackList;
Image m_aFolderImage;
+ Image m_aFolderExpandedImage;
public:
FolderTree( vcl::Window* pParent, WinBits nBits );
diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index 5ddb4dd..570809b 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -263,6 +263,7 @@
#define IMG_TRIANGLE_DOWN (RID_SVTOOLS_START + 20)
#define IMG_SVT_FOLDER (RID_SVTOOLS_START + 42)
+#define IMG_SVT_FOLDER_OPEN (RID_SVTOOLS_START + 43)
#define RID_IMG_PRNDLG_NOCOLLATE (STR_SVT_PRNDLG_START + 30)
diff --git a/svtools/source/contnr/fileview.src b/svtools/source/contnr/fileview.src
index c645737..54119f3 100644
--- a/svtools/source/contnr/fileview.src
+++ b/svtools/source/contnr/fileview.src
@@ -76,6 +76,12 @@ Image IMG_SVT_FOLDER
MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
};
+Image IMG_SVT_FOLDER_OPEN
+{
+ ImageBitmap = Bitmap { File = "folderop.png" ; };
+ MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
+};
+
// Menus -----------------------------------------------------------------
Menu RID_FILEVIEW_CONTEXTMENU
diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx
index 50df76b..63cc7e0 100644
--- a/svtools/source/contnr/foldertree.cxx
+++ b/svtools/source/contnr/foldertree.cxx
@@ -14,6 +14,7 @@
FolderTree::FolderTree( vcl::Window* pParent, WinBits nBits )
: SvTreeListBox( pParent, nBits | WB_SORT | WB_TABSTOP )
, m_aFolderImage( SvtResId( IMG_SVT_FOLDER ) )
+ , m_aFolderExpandedImage( SvtResId( IMG_SVT_FOLDER_OPEN ) )
{
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
Reference< XInteractionHandler > xInteractionHandler(
@@ -21,7 +22,7 @@ FolderTree::FolderTree( vcl::Window* pParent, WinBits nBits )
m_xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() );
SetDefaultCollapsedEntryBmp( m_aFolderImage );
- SetDefaultExpandedEntryBmp( m_aFolderImage );
+ SetDefaultExpandedEntryBmp( m_aFolderExpandedImage );
}
void FolderTree::RequestingChildren( SvTreeListEntry* pEntry )
commit d44a6ea7af9e23d391f7e3cb6747a743ebd0992f
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Tue Jul 21 09:40:49 2015 +0200
check pointers
Change-Id: Iacf9213d833a0a3c2d951c667108a5e2538f4215
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 1662758..7f0447a 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -689,30 +689,35 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl )
IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl )
{
SvTreeListEntry* pEntry = m_pFileView->FirstSelected();
- if (!pEntry)
- return 1;
- SvtContentEntry* pData = static_cast< SvtContentEntry* >( pEntry->GetUserData() );
- if( ( pData->mbIsFolder && ( m_eType == REMOTEDLG_TYPE_PATHDLG ) )
- || ( !pData->mbIsFolder && ( m_eType == REMOTEDLG_TYPE_FILEDLG ) ) )
+ if( pEntry )
{
- // url must contain user info, because we need this info in recent files entry
- // (to fill user field in login box by default)
- INetURLObject aURL( pData->maURL );
- INetURLObject aCurrentURL( m_sLastServiceUrl );
- aURL.SetUser( aCurrentURL.GetUser() );
+ SvtContentEntry* pData = static_cast< SvtContentEntry* >( pEntry->GetUserData() );
- m_sPath = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ if( pData )
+ {
+ if( ( pData->mbIsFolder && ( m_eType == REMOTEDLG_TYPE_PATHDLG ) )
+ || ( !pData->mbIsFolder && ( m_eType == REMOTEDLG_TYPE_FILEDLG ) ) )
+ {
+ // url must contain user info, because we need this info in recent files entry
+ // (to fill user field in login box by default)
+ INetURLObject aURL( pData->maURL );
+ INetURLObject aCurrentURL( m_sLastServiceUrl );
+ aURL.SetUser( aCurrentURL.GetUser() );
- m_pName_ed->SetText( INetURLObject::decode( aURL.GetLastName(), INetURLObject::DECODE_WITH_CHARSET ) );
- }
- else
- {
- m_sPath.clear();
- m_pName_ed->SetText( "" );
- }
+ m_sPath = aURL.GetMainURL( INetURLObject::NO_DECODE );
- EnableControls();
+ m_pName_ed->SetText( INetURLObject::decode( aURL.GetLastName(), INetURLObject::DECODE_WITH_CHARSET ) );
+ }
+ else
+ {
+ m_sPath.clear();
+ m_pName_ed->SetText( "" );
+ }
+
+ EnableControls();
+ }
+ }
return 1;
}
commit eddb33c6f8a3406796ece7f645be1d8093a58fa6
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Mon Jul 20 16:01:09 2015 +0200
default label for service
Change-Id: Iad4ad161765c943a035dcc15232c4dcbef1cc68c
diff --git a/include/svtools/PlaceEditDialog.hxx b/include/svtools/PlaceEditDialog.hxx
index b601b9b..e492978 100644
--- a/include/svtools/PlaceEditDialog.hxx
+++ b/include/svtools/PlaceEditDialog.hxx
@@ -53,7 +53,9 @@ private:
unsigned int m_nCurrentType;
-public:
+ bool bLabelChanged;
+
+public :
PlaceEditDialog( vcl::Window* pParent);
PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Place> &rPlace );
@@ -69,11 +71,13 @@ public:
private:
void InitDetails( );
+ void UpdateLabel( );
DECL_LINK ( OKHdl, Button * );
DECL_LINK ( DelHdl, Button * );
DECL_LINK ( EditHdl, void * );
DECL_LINK ( SelectTypeHdl, void * );
+ DECL_LINK ( EditLabelHdl, void * );
DECL_LINK ( EditUsernameHdl, void * );
};
diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index 23cf007..5ddb4dd 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -51,6 +51,9 @@
#define STR_SVT_ESTIMATED_SIZE_VEC (RID_SVTOOLS_START + 41)
// FREE
+
+#define STR_SVT_DEFAULT_SERVICE_LABEL (RID_SVTOOLS_START+57)
+
#define STRARY_SVT_DOCINFO (RID_SVTOOLS_START+58)
#define STR_BASICKEY_FORMAT_ON (RID_SVTOOLS_START+103)
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index 15034dd..cb90be7 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -13,6 +13,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <officecfg/Office/Common.hxx>
#include <svtools/svtresid.hxx>
+#include <svtools/svtools.hrc>
#include <vcl/msgbox.hxx>
using namespace com::sun::star::uno;
@@ -21,6 +22,7 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent)
: ModalDialog(pParent, "PlaceEditDialog", "svt/ui/placeedit.ui")
, m_xCurrentDetails()
, m_nCurrentType( 0 )
+ , bLabelChanged( false )
{
get( m_pEDServerName, "name" );
get( m_pLBServerType, "type" );
@@ -33,7 +35,7 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent)
m_pBTOk->SetClickHdl( LINK( this, PlaceEditDialog, OKHdl) );
m_pBTOk->Enable( false );
- m_pEDServerName->SetModifyHdl( LINK( this, PlaceEditDialog, EditHdl) );
+ m_pEDServerName->SetModifyHdl( LINK( this, PlaceEditDialog, EditLabelHdl) );
// This constructor is called when user request a place creation, so
// delete button is hidden.
@@ -48,6 +50,7 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent)
PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Place>& rPlace)
: ModalDialog(pParent, "PlaceEditDialog", "svt/ui/placeedit.ui")
, m_xCurrentDetails( )
+ , bLabelChanged( true )
{
get( m_pEDServerName, "name" );
get( m_pLBServerType, "type" );
@@ -188,6 +191,26 @@ void PlaceEditDialog::InitDetails( )
SelectTypeHdl( m_pLBServerType );
}
+void PlaceEditDialog::UpdateLabel( )
+{
+ if( !bLabelChanged )
+ {
+ if( !m_pEDUsername->GetText().isEmpty( ) )
+ {
+ OUString sLabel = SvtResId( STR_SVT_DEFAULT_SERVICE_LABEL );
+ sLabel = sLabel.replaceFirst( "$user$", m_pEDUsername->GetText() );
+ sLabel = sLabel.replaceFirst( "$service$", m_pLBServerType->GetSelectEntry() );
+
+ m_pEDServerName->SetText( sLabel );
+ bLabelChanged = false;
+ }
+ else
+ {
+ m_pEDServerName->SetText( m_pLBServerType->GetSelectEntry( ) );
+ }
+ }
+}
+
IMPL_LINK ( PlaceEditDialog, OKHdl, Button *, )
{
if ( m_xCurrentDetails.get() )
@@ -234,12 +257,22 @@ IMPL_LINK ( PlaceEditDialog, DelHdl, Button *, )
IMPL_LINK_NOARG( PlaceEditDialog, EditHdl )
{
+ UpdateLabel( );
+
OUString sUrl = GetServerUrl( );
OUString sName = OUString( m_pEDServerName->GetText() ).trim( );
m_pBTOk->Enable( !sName.isEmpty( ) && !sUrl.isEmpty( ) );
return 1;
}
+IMPL_LINK_NOARG( PlaceEditDialog, EditLabelHdl )
+{
+ bLabelChanged = true;
+ EditHdl(NULL);
+
+ return 1;
+}
+
IMPL_LINK_NOARG( PlaceEditDialog, EditUsernameHdl )
{
for ( std::vector< std::shared_ptr< DetailsContainer > >::iterator it = m_aDetailsContainers.begin( );
@@ -247,7 +280,9 @@ IMPL_LINK_NOARG( PlaceEditDialog, EditUsernameHdl )
{
( *it )->setUsername( OUString( m_pEDUsername->GetText() ) );
}
+
EditHdl(NULL);
+
return 1;
}
diff --git a/svtools/source/dialogs/filedlg2.src b/svtools/source/dialogs/filedlg2.src
index 6e68db0..795da0e 100644
--- a/svtools/source/dialogs/filedlg2.src
+++ b/svtools/source/dialogs/filedlg2.src
@@ -18,6 +18,7 @@
*/
#include <svtools/filedlg2.hrc>
+#include <svtools/svtools.hrc>
String STR_FILEDLG_OPEN
{
@@ -32,4 +33,9 @@ String STR_FILEDLG_SAVE
Text [ en-US ] = "Save" ;
};
+String STR_SVT_DEFAULT_SERVICE_LABEL
+{
+ Text [ en-US ] = "$user$'s $service$" ;
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 42e0417cbad2042b252c9d22c515348532d23a2a
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Mon Jul 20 14:26:41 2015 +0200
string: 'Remote File' -> 'Save Remote File...'
Change-Id: I30e664e6fa16cdcbdffa97c57905b73224d42636
diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src
index 4f8ce0e..44e0c70 100644
--- a/framework/source/classes/resource.src
+++ b/framework/source/classes/resource.src
@@ -121,7 +121,7 @@ String STR_OPEN_REMOTE
String STR_REMOTE_FILE
{
- Text [ en-US ] = "Remote file";
+ Text [ en-US ] = "Save Remote File...";
};
String STR_TOOLBAR_TITLE_ADDON
commit 087faa2aa3ece2d3b7d856692c992a547b69b1f1
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Mon Jul 20 14:19:54 2015 +0200
remember user name in recent files
Change-Id: I55b340e90d51b614b8f46c06e3dc1961b3bac2ba
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 28200bb..1662758 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -696,8 +696,13 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl )
if( ( pData->mbIsFolder && ( m_eType == REMOTEDLG_TYPE_PATHDLG ) )
|| ( !pData->mbIsFolder && ( m_eType == REMOTEDLG_TYPE_FILEDLG ) ) )
{
+ // url must contain user info, because we need this info in recent files entry
+ // (to fill user field in login box by default)
INetURLObject aURL( pData->maURL );
- m_sPath = pData->maURL;
+ INetURLObject aCurrentURL( m_sLastServiceUrl );
+ aURL.SetUser( aCurrentURL.GetUser() );
+
+ m_sPath = aURL.GetMainURL( INetURLObject::NO_DECODE );
m_pName_ed->SetText( INetURLObject::decode( aURL.GetLastName(), INetURLObject::DECODE_WITH_CHARSET ) );
}
@@ -815,6 +820,14 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl )
m_sPath = sCurrentPath;
else
m_sPath = sSelectedItem;
+
+ // url must contain user info, because we need this info in recent files entry
+ // (to fill user field in login box by default)
+ INetURLObject aURL( m_sPath );
+ INetURLObject aCurrentURL( m_sLastServiceUrl );
+ aURL.SetUser( aCurrentURL.GetUser() );
+
+ m_sPath = aURL.GetMainURL( INetURLObject::NO_DECODE );
}
bool bExists = false;
@@ -973,7 +986,13 @@ std::vector<OUString> RemoteFilesDialog::GetPathList() const
while( pEntry )
{
- aList.push_back( SvtFileView::GetURL( pEntry ) );
+ // url must contain user info, because we need this info in recent files entry
+ // (to fill user field in login box by default)
+ INetURLObject aURL( SvtFileView::GetURL( pEntry ) );
+ INetURLObject aCurrentURL( m_sLastServiceUrl );
+ aURL.SetUser( aCurrentURL.GetUser() );
+
+ aList.push_back( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
pEntry = m_pFileView->NextSelected( pEntry );
}
commit f87473eb26acb0ca422b75c87e809c3b356b8c97
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Mon Jul 20 11:30:49 2015 +0200
Show 'Add service' dialog when there is no service added yet
Change-Id: I72d294e9c09b0d02b829b91fb188c1c7965d1d45
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index bb2587d..28200bb 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -318,6 +318,19 @@ void RemoteFilesDialog::Resize()
}
}
+short RemoteFilesDialog::Execute()
+{
+ if( m_pServices_lb->GetEntryCount() == 0 )
+ {
+ Show();
+ AddServiceHdl( NULL );
+ }
+
+ short nRet = SvtFileDialog_Base::Execute();
+
+ return nRet;
+}
+
OUString lcl_GetServiceType( ServicePtr pService )
{
INetProtocol aProtocol = pService->GetUrlObject().GetProtocol();
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index ba48b8e..ede30c7 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -64,6 +64,7 @@ public:
virtual void dispose() SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
+ virtual short Execute() SAL_OVERRIDE;
OUString GetPath() const;
commit 4682e1b0eea09b9785e930a644e2d216ec628218
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Mon Jul 20 10:04:09 2015 +0200
accessibility: correct tab-order
Change-Id: Ib554e8bb73367d5f85253f0deb083fbc5a5d454b
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 86be522..bb2587d 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -11,13 +11,22 @@
class FileViewContainer : public vcl::Window
{
+ enum FocusState
+ {
+ Prev = 0,
+ TreeView,
+ FileView,
+ Next,
+ FocusCount
+ };
+
private:
VclPtr< SvtFileView > m_pFileView;
VclPtr< FolderTree > m_pTreeView;
VclPtr< Splitter > m_pSplitter;
int m_nCurrentFocus;
- VclPtr<vcl::Window> m_pFocusWidgets[4];
+ VclPtr<vcl::Window> m_pFocusWidgets[FocusState::FocusCount];
public:
FileViewContainer( vcl::Window *pParent )
@@ -51,10 +60,10 @@ class FileViewContainer : public vcl::Window
m_pFileView = pFileView;
m_pTreeView = pTreeView;
m_pSplitter = pSplitter;
- m_pFocusWidgets[0] = pPrevSibling;
- m_pFocusWidgets[1] = pTreeView;
- m_pFocusWidgets[2] = pFileView;
- m_pFocusWidgets[3] = pNextSibling;
+ m_pFocusWidgets[FocusState::Prev] = pPrevSibling;
+ m_pFocusWidgets[FocusState::TreeView] = pTreeView;
+ m_pFocusWidgets[FocusState::FileView] = pFileView;
+ m_pFocusWidgets[FocusState::Next] = pNextSibling;
}
virtual void Resize() SAL_OVERRIDE
@@ -89,14 +98,20 @@ class FileViewContainer : public vcl::Window
if( !m_pFileView || !m_pTreeView )
return;
- if( !bReverse && m_nCurrentFocus < 3 )
+ if( bReverse && m_nCurrentFocus > FocusState::Prev && m_nCurrentFocus <= FocusState::Next )
{
- m_pFocusWidgets[++m_nCurrentFocus]->SetFakeFocus( true );
+ m_pFocusWidgets[m_nCurrentFocus]->SetFakeFocus(false);
+ m_pFocusWidgets[m_nCurrentFocus]->LoseFocus();
+
+ m_pFocusWidgets[--m_nCurrentFocus]->SetFakeFocus( true );
m_pFocusWidgets[m_nCurrentFocus]->GrabFocus();
}
- else if( m_nCurrentFocus > 0 )
+ else if( !bReverse && m_nCurrentFocus >= FocusState::Prev && m_nCurrentFocus < FocusState::Next )
{
- m_pFocusWidgets[--m_nCurrentFocus]->SetFakeFocus( true );
+ m_pFocusWidgets[m_nCurrentFocus]->SetFakeFocus(false);
+ m_pFocusWidgets[m_nCurrentFocus]->LoseFocus();
+
+ m_pFocusWidgets[++m_nCurrentFocus]->SetFakeFocus( true );
m_pFocusWidgets[m_nCurrentFocus]->GrabFocus();
}
}
@@ -106,13 +121,38 @@ class FileViewContainer : public vcl::Window
if( !m_pFileView || !m_pTreeView )
return;
- m_nCurrentFocus = 1;
- m_pFocusWidgets[m_nCurrentFocus]->SetFakeFocus( true );
- m_pFocusWidgets[m_nCurrentFocus]->GrabFocus();
+ GetFocusFlags aFlags = GetGetFocusFlags();
+
+ if( aFlags & GetFocusFlags::Forward )
+ m_nCurrentFocus = FocusState::TreeView;
+ else if( aFlags & GetFocusFlags::Backward )
+ m_nCurrentFocus = FocusState::FileView;
+
+ if( m_nCurrentFocus >= FocusState::Prev && m_nCurrentFocus <= FocusState::Next )
+ {
+ m_pFocusWidgets[m_nCurrentFocus]->SetFakeFocus( true );
+ m_pFocusWidgets[m_nCurrentFocus]->GrabFocus();
+ }
}
virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE
{
+ if( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS )
+ {
+ // we must also update counter when user change focus using mouse
+ for(int i = FocusState::Prev; i <= FocusState::Next; i++)
+ {
+ if( rNEvt.GetWindow() == m_pFocusWidgets[i] )
+ {
+ m_nCurrentFocus = i;
+ return true;
+ }
+ }
+
+ // GETFOCUS for one of FileView's subcontrols
+ m_nCurrentFocus = FocusState::FileView;
+ return true;
+ }
if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
{
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
commit 6e0936af9e111f4218ada2d2752f802309d8fdf9
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Fri Jul 17 10:12:06 2015 +0300
Don't show open remote entry in the recent doc menu
We use the same menu controller for both the Open toolbar
button and the Recent Documents menu. While it's
reasonable to put the open remote file command under the
open button, it has nothing to do with recent documents,
so it shouldn't appear there.
Also don't add the "No Document" entry in case the open
remote entry is visible. The whole point of the "No
Document" entry is that we can't leave the menu empty,
but if there is another visible entry, it's not needed.
Change-Id: Ibefbdc6dc7d1d49f555d8ee23f67b47eba19b445
Signed-off-by: Szymon Kłos <eszkadev at gmail.com>
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index a2c3432..61d2f02 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -60,7 +60,8 @@ class RecentFilesMenuController : public svt::PopupMenuControllerBase
using svt::PopupMenuControllerBase::disposing;
public:
- RecentFilesMenuController( const uno::Reference< uno::XComponentContext >& xContext );
+ RecentFilesMenuController( const uno::Reference< uno::XComponentContext >& xContext,
+ const uno::Sequence< uno::Any >& args );
virtual ~RecentFilesMenuController();
// XServiceInfo
@@ -115,12 +116,25 @@ private:
std::vector< RecentFile > m_aRecentFilesItems;
bool m_bDisabled : 1;
+ bool m_bShowRemote;
};
-RecentFilesMenuController::RecentFilesMenuController( const uno::Reference< uno::XComponentContext >& xContext ) :
+RecentFilesMenuController::RecentFilesMenuController( const uno::Reference< uno::XComponentContext >& xContext,
+ const uno::Sequence< uno::Any >& args ) :
svt::PopupMenuControllerBase( xContext ),
- m_bDisabled( false )
+ m_bDisabled( false ),
+ m_bShowRemote( false )
{
+ css::beans::PropertyValue aPropValue;
+ for ( sal_Int32 i = 0; i < args.getLength(); ++i )
+ {
+ args[i] >>= aPropValue;
+ if ( aPropValue.Name == "ShowRemote" )
+ {
+ aPropValue.Value >>= m_bShowRemote;
+ break;
+ }
+ }
}
RecentFilesMenuController::~RecentFilesMenuController()
@@ -227,26 +241,30 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
FWK_RESSTR(STR_CLEAR_RECENT_FILES_HELP) );
// Open remote menu entry
- pVCLPopupMenu->InsertItem( sal_uInt16( nCount + 2 ),
- FWK_RESSTR(STR_OPEN_REMOTE) );
- pVCLPopupMenu->SetItemCommand( sal_uInt16( nCount + 2 ),
- OUString( CMD_OPEN_REMOTE ) );
+ if ( m_bShowRemote )
+ {
+ pVCLPopupMenu->InsertItem( sal_uInt16( nCount + 2 ),
+ FWK_RESSTR(STR_OPEN_REMOTE) );
+ pVCLPopupMenu->SetItemCommand( sal_uInt16( nCount + 2 ),
+ OUString( CMD_OPEN_REMOTE ) );
+ }
}
else
{
- // No recent documents => insert "no document" string
- pVCLPopupMenu->InsertItem( 1, FWK_RESSTR(STR_NODOCUMENT) );
- // Do not disable it, otherwise the Toolbar controller and MenuButton
- // will display SV_RESID_STRING_NOSELECTIONPOSSIBLE instead of STR_NODOCUMENT
- pVCLPopupMenu->SetItemBits( 1, pVCLPopupMenu->GetItemBits( 1 ) | MenuItemBits::NOSELECT );
-
- pVCLPopupMenu->InsertSeparator();
-
- // Open remote menu entry
- pVCLPopupMenu->InsertItem( sal_uInt16( 2 ),
- FWK_RESSTR(STR_OPEN_REMOTE) );
- pVCLPopupMenu->SetItemCommand( sal_uInt16( 2 ),
- OUString( CMD_OPEN_REMOTE ) );
+ if ( m_bShowRemote )
+ {
+ // Open remote menu entry
+ pVCLPopupMenu->InsertItem( 1, FWK_RESSTR(STR_OPEN_REMOTE) );
+ pVCLPopupMenu->SetItemCommand( 1, CMD_OPEN_REMOTE );
+ }
+ else
+ {
+ // No recent documents => insert "no document" string
+ pVCLPopupMenu->InsertItem( 1, FWK_RESSTR(STR_NODOCUMENT) );
+ // Do not disable it, otherwise the Toolbar controller and MenuButton
+ // will display SV_RESID_STRING_NOSELECTIONPOSSIBLE instead of STR_NODOCUMENT
+ pVCLPopupMenu->SetItemBits( 1, pVCLPopupMenu->GetItemBits( 1 ) | MenuItemBits::NOSELECT );
+ }
}
}
}
@@ -444,9 +462,9 @@ IMPL_STATIC_LINK( RecentFilesMenuController, ExecuteHdl_Impl, LoadRecentFile*, p
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_comp_framework_RecentFilesMenuController_get_implementation(
css::uno::XComponentContext *context,
- css::uno::Sequence<css::uno::Any> const &)
+ css::uno::Sequence<css::uno::Any> const &args)
{
- return cppu::acquire(new RecentFilesMenuController(context));
+ return cppu::acquire(new RecentFilesMenuController(context, args));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index ed53d96..2906100 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -1153,6 +1153,10 @@ VclPtr<SfxPopupWindow> SfxRecentFilesToolBoxControl::CreatePopupWindow()
aPropValue.Value <<= m_xFrame;
aArgs[1] <<= aPropValue;
+ aPropValue.Name = "ShowRemote";
+ aPropValue.Value <<= true;
+ aArgs[2] <<= aPropValue;
+
uno::Reference< frame::XPopupMenuController > xPopupController( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
"com.sun.star.comp.framework.RecentFilesMenuController", aArgs, m_xContext ), UNO_QUERY );
@@ -1191,7 +1195,7 @@ VclPtr<SfxPopupWindow> SfxSaveAsToolBoxControl::CreatePopupWindow()
sal_uInt16 nItemId = GetId();
::Rectangle aRect( rBox.GetItemRect( nItemId ) );
- Sequence< Any > aArgs( 2 );
+ Sequence< Any > aArgs( 3 );
PropertyValue aPropValue;
aPropValue.Name = "CommandURL";
commit b3db8c891607fef1e1898c3259195fc7ffb63b13
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Fri Jul 17 12:09:05 2015 +0200
File > Save As Remote - Calc and Writer
Change-Id: I03dc6592015dea4b4c5e77650ec8378ee0853a63
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index a8d5d1f..3ee4ec3 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -1972,6 +1972,14 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:SaveAsRemote" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">~Save As Remote File...</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:CircleCut" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Circle Segment</value>
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index 8369c10..43d6392 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -40,6 +40,7 @@
<menu:menuitem menu:id=".uno:Save"/>
<menu:menuitem menu:id=".uno:SaveAs"/>
<menu:menuitem menu:id=".uno:SaveACopy"/>
+ <menu:menuitem menu:id=".uno:SaveAsRemote"/>
<menu:menuitem menu:id=".uno:SaveAll"/>
<menu:menuitem menu:id=".uno:CheckOut"/>
<menu:menuitem menu:id=".uno:CancelCheckOut"/>
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index fd233cf..8300196 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -39,6 +39,7 @@
<menu:menuitem menu:id=".uno:Save"/>
<menu:menuitem menu:id=".uno:SaveAs"/>
<menu:menuitem menu:id=".uno:SaveACopy"/>
+ <menu:menuitem menu:id=".uno:SaveAsRemote"/>
<menu:menuitem menu:id=".uno:SaveAll"/>
<menu:menuitem menu:id=".uno:CheckOut"/>
<menu:menuitem menu:id=".uno:CancelCheckOut"/>
commit 52c4de860f91cceeaf7c3784c471910aaf2447ca
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Fri Jul 17 10:42:31 2015 +0200
Open Remote file in Calc's menubar
Change-Id: Ie0e98768724edca02cfe7dc9fda682ce125e1a9e
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index a474f98..8369c10 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -21,6 +21,7 @@
<menu:menupopup>
<menu:menuitem menu:id=".uno:AddDirect"/>
<menu:menuitem menu:id=".uno:OpenFromCalc"/>
+ <menu:menuitem menu:id=".uno:OpenRemote"/>
<menu:menuitem menu:id=".uno:RecentFileList"/>
<menu:menuitem menu:id=".uno:CloseDoc"/>
<menu:menuseparator/>
commit 48440a06b549280b325d0c62b9c71a8e04833742
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Fri Jul 17 10:01:19 2015 +0200
Open Remote file in Writer's menubar
Change-Id: I5cda8661a44e4c33fab3263c17c1a7900241e70b
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index 7ae2617..fd233cf 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -21,6 +21,7 @@
<menu:menupopup>
<menu:menuitem menu:id=".uno:AddDirect"/>
<menu:menuitem menu:id=".uno:OpenFromWriter"/>
+ <menu:menuitem menu:id=".uno:OpenRemote"/>
<menu:menuitem menu:id=".uno:RecentFileList"/>
<menu:menuitem menu:id=".uno:CloseDoc"/>
<menu:menuseparator/>
commit a960112a9d204bee85386379a992f40104a370e0
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Fri Jul 17 09:34:06 2015 +0200
Separator should not be the default selection
Change-Id: Id879e795d3b6722ca0d86f8f6a8a32b0ef6f12bd
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index 482b763..15034dd 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -140,7 +140,6 @@ void PlaceEditDialog::InitDetails( )
bool bSkipOneDrive= OUString( ONEDRIVE_CLIENT_ID ).isEmpty() ||
OUString( ONEDRIVE_CLIENT_SECRET ).isEmpty();
-
Sequence< OUString > aTypesUrlsList( officecfg::Office::Common::Misc::CmisServersUrls::get( xContext ) );
Sequence< OUString > aTypesNamesList( officecfg::Office::Common::Misc::CmisServersNames::get( xContext ) );
@@ -182,6 +181,10 @@ void PlaceEditDialog::InitDetails( )
// Set default to first value
m_pLBServerType->SelectEntryPos( 0 );
+
+ if ( m_pLBServerType->GetSelectEntry() == "--------------------" )
+ m_pLBServerType->SelectEntryPos( 1 );
+
SelectTypeHdl( m_pLBServerType );
}
commit a40f002a9a8993f8f0d81cfbb408b8e182d1b698
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Fri Jul 17 08:46:31 2015 +0200
question if delete the service
Change-Id: I49e5a93ba1d58b898ec1c7b9a4682c9e86302bd0
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 2fabadc..86be522 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -581,21 +581,26 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
if( nPos >= 0 )
{
- // TODO: Confirm dialog
-
- m_aServices.erase( m_aServices.begin() + nPos );
- m_pServices_lb->RemoveEntry( nSelected );
+ OUString sMsg = ResId( STR_SVT_DELETESERVICE, *ResMgrHolder::getOrCreate() );
+ sMsg = sMsg.replaceFirst( "$servicename$", m_pServices_lb->GetSelectEntry() );
+ ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO );
- if( m_pServices_lb->GetEntryCount() > 0 )
+ if( aBox->Execute() == RET_YES )
{
- m_pServices_lb->SelectEntryPos( 0 );
- }
- else
- {
- m_pServices_lb->SetNoSelection();
- }
+ m_aServices.erase( m_aServices.begin() + nPos );
+ m_pServices_lb->RemoveEntry( nSelected );
- m_bIsUpdated = true;
+ if( m_pServices_lb->GetEntryCount() > 0 )
+ {
+ m_pServices_lb->SelectEntryPos( 0 );
+ }
+ else
+ {
+ m_pServices_lb->SetNoSelection();
+ }
+
+ m_bIsUpdated = true;
+ }
}
}
diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src
index e09fe0b..bc43b98 100644
--- a/fpicker/source/office/iodlg.src
+++ b/fpicker/source/office/iodlg.src
@@ -105,6 +105,11 @@ String STR_SVT_ALREADYEXISTOVERWRITE
Text [ en-US ] = "A file named \"$filename$\" already exists.\n\nDo you want to replace it?" ;
};
+String STR_SVT_DELETESERVICE
+{
+ Text [ en-US ] = "Are you sure you want to delete the service?\n\"$servicename$\"" ;
+};
+
String STR_SVT_NEW_FOLDER
{
Text [ en-US ] = "Folder" ;
diff --git a/include/vcl/fpicker.hrc b/include/vcl/fpicker.hrc
index 387b389..7d4bd16 100644
--- a/include/vcl/fpicker.hrc
+++ b/include/vcl/fpicker.hrc
@@ -27,6 +27,7 @@
#define STR_SVT_FOLDERPICKER_DEFAULT_TITLE (STR_SVT_FILEPICKER_START+12)
#define STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION (STR_SVT_FILEPICKER_START+13)
#define STR_SVT_ALREADYEXISTOVERWRITE (STR_SVT_FILEPICKER_START+14)
+#define STR_SVT_DELETESERVICE (STR_SVT_FILEPICKER_START+15)
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 94ceda8b2fea37587424b664e17fa9ee8b01e158
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Wed Jul 22 11:27:24 2015 +0200
tdf#92600: Restore ability to apply font settings to controls
SmShowSymbol handles font/fg/bg settings by itself, so make
ApplySettings noop there.
This partially reverts commit b010e4074e5d5ee3a3905f1351f04efafe937c2a
Change-Id: Ib5074684ef1277d9b9b4646bd73dce4cbff3943e
Reviewed-on: https://gerrit.libreoffice.org/17288
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx
index d33982b..0f689d0 100644
--- a/include/vcl/ctrl.hxx
+++ b/include/vcl/ctrl.hxx
@@ -41,8 +41,6 @@ protected:
private:
bool mbHasControlFocus;
- bool mbFont;
- bool mbForeground;
bool mbShowAccelerator;
Link<> maGetFocusHdl;
Link<> maLoseFocusHdl;
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index a34e505..968d12e 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -327,6 +327,7 @@ class SmShowSymbol : public Control
Link<> aDblClickHdlLink;
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE;
+ virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 59a08b59..70e7f29 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1384,6 +1384,10 @@ void SmShowSymbol::Resize()
Invalidate();
}
+void SmShowSymbol::ApplySettings(vcl::RenderContext& /*rRenderContext*/ )
+{
+}
+
void SmShowSymbol::setFontSize(vcl::Font &rFont) const
{
rFont.SetSize(Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3));
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 61a1ad7..6062d1a 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -36,8 +36,6 @@ using namespace vcl;
void Control::ImplInitControlData()
{
mbHasControlFocus = false;
- mbFont = false;
- mbForeground = false;
mbShowAccelerator = false;
mpControlData = new ImplControlData;
}
@@ -425,23 +423,15 @@ void Control::ApplySettings(vcl::RenderContext& rRenderContext)
{
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- if (mbFont)
- {
- vcl::Font rFont(GetCanonicalFont(rStyleSettings));
- ApplyControlFont(rRenderContext, rFont);
- }
+ vcl::Font rFont(GetCanonicalFont(rStyleSettings));
+ ApplyControlFont(rRenderContext, rFont);
- if (mbFont || mbForeground)
- {
- ApplyControlForeground(rRenderContext, GetCanonicalTextColor(rStyleSettings));
- rRenderContext.SetTextFillColor();
- }
+ ApplyControlForeground(rRenderContext, GetCanonicalTextColor(rStyleSettings));
+ rRenderContext.SetTextFillColor();
}
-void Control::ImplInitSettings(const bool _bFont, const bool _bForeground)
+void Control::ImplInitSettings(const bool, const bool)
{
- mbFont = _bFont;
- mbForeground = _bForeground;
ApplySettings(*this);
}
commit b1760dc3320bfb44568243359124d2615e69e18d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 22 15:36:08 2015 +0100
Resolves: tdf#92148 SmElementsControl invalidates itself from paint endlessly
Change-Id: Id9cd7fbe9e433005cc27b2e8e3417a5e289b94e3
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx
index 6877d81..7cf8abb 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -106,6 +106,10 @@ class SmElementsControl : public Control
void build();
+ //if pContext is not NULL, then draw, otherwise
+ //just layout
+ void LayoutOrPaintContents(vcl::RenderContext *pContext = NULL);
+
public:
SmElementsControl(vcl::Window *pParent);
virtual ~SmElementsControl();
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 93bd504..62a9093 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -253,10 +253,8 @@ void SmElementsControl::setVerticalMode(bool bVerticalMode)
mbVerticalMode = bVerticalMode;
}
-void SmElementsControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+void SmElementsControl::LayoutOrPaintContents(vcl::RenderContext *pContext)
{
- rRenderContext.Push();
-
bool bOldVisibleState = mxScroll->IsVisible();
sal_Int32 nScrollbarWidth = bOldVisibleState ? GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
@@ -300,7 +298,8 @@ void SmElementsControl::Paint(vcl::RenderContext& rRenderContext, const Rectangl
Rectangle aSelectionRectangle(x + 5 - 1, y + 5,
x + 5 + 1, nControlHeight - 5);
- rRenderContext.DrawRect(PixelToLogic(aSelectionRectangle));
+ if (pContext)
+ pContext->DrawRect(PixelToLogic(aSelectionRectangle));
x += 10;
}
else
@@ -311,14 +310,15 @@ void SmElementsControl::Paint(vcl::RenderContext& rRenderContext, const Rectangl
Rectangle aSelectionRectangle(x + 5, y + 5 - 1,
nControlWidth - 5, y + 5 + 1);
- rRenderContext.DrawRect(PixelToLogic(aSelectionRectangle));
+ if (pContext)
+ pContext->DrawRect(PixelToLogic(aSelectionRectangle));
y += 10;
}
}
else
{
- Size aSizePixel = rRenderContext.LogicToPixel(Size(element->getNode()->GetWidth(),
- element->getNode()->GetHeight()));
+ Size aSizePixel = LogicToPixel(Size(element->getNode()->GetWidth(),
+ element->getNode()->GetHeight()));
if (mbVerticalMode)
{
if (y + boxY > nControlHeight)
@@ -336,20 +336,21 @@ void SmElementsControl::Paint(vcl::RenderContext& rRenderContext, const Rectangl
}
}
- if (mpCurrentElement == element)
+ if (mpCurrentElement == element && pContext)
{
- rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
- rRenderContext.SetFillColor(Color(230, 230, 230));
- rRenderContext.SetLineColor(Color(230, 230, 230));
+ pContext->Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
+ pContext->SetFillColor(Color(230, 230, 230));
+ pContext->SetLineColor(Color(230, 230, 230));
- rRenderContext.DrawRect(PixelToLogic(Rectangle(x + 2, y + 2, x + boxX - 2, y + boxY - 2)));
- rRenderContext.Pop();
+ pContext->DrawRect(PixelToLogic(Rectangle(x + 2, y + 2, x + boxX - 2, y + boxY - 2)));
+ pContext->Pop();
}
Point location(x + ((boxX - aSizePixel.Width()) / 2),
y + ((boxY - aSizePixel.Height()) / 2));
- SmDrawingVisitor(rRenderContext, PixelToLogic(location), element->getNode().get());
+ if (pContext)
+ SmDrawingVisitor(*pContext, PixelToLogic(location), element->getNode().get());
element->mBoxLocation = Point(x,y);
element->mBoxSize = Size(boxX, boxY);
@@ -361,26 +362,29 @@ void SmElementsControl::Paint(vcl::RenderContext& rRenderContext, const Rectangl
}
}
- sal_Int32 nTotalControlHeight = y + boxY + mxScroll->GetThumbPos();
-
- if (nTotalControlHeight > GetOutputSizePixel().Height())
+ if (!pContext)
{
- mxScroll->SetRangeMax(nTotalControlHeight);
- mxScroll->SetPosSizePixel(Point(nControlWidth, 0), Size(nScrollbarWidth, nControlHeight));
- mxScroll->SetVisibleSize(nControlHeight);
- mxScroll->Show();
- }
- else
- {
- mxScroll->SetThumbPos(0);
- mxScroll->Hide();
- }
+ sal_Int32 nTotalControlHeight = y + boxY + mxScroll->GetThumbPos();
- // If scrollbar visibility changed, we have to go through the
- // calculation once more, see nScrollbarWidth
- if (bOldVisibleState != mxScroll->IsVisible())
- Invalidate();
+ if (nTotalControlHeight > GetOutputSizePixel().Height())
+ {
+ mxScroll->SetRangeMax(nTotalControlHeight);
+ mxScroll->SetPosSizePixel(Point(nControlWidth, 0), Size(nScrollbarWidth, nControlHeight));
+ mxScroll->SetVisibleSize(nControlHeight);
+ mxScroll->Show();
+ }
+ else
+ {
+ mxScroll->SetThumbPos(0);
+ mxScroll->Hide();
+ }
+ }
+}
+void SmElementsControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
+{
+ rRenderContext.Push();
+ LayoutOrPaintContents(&rRenderContext);
rRenderContext.Pop();
}
@@ -399,6 +403,7 @@ void SmElementsControl::MouseMove( const MouseEvent& rMouseEvent )
if (mpCurrentElement != element)
{
mpCurrentElement = element;
+ LayoutOrPaintContents();
Invalidate();
tooltip = element->getHelpText();
}
@@ -449,6 +454,7 @@ void SmElementsControl::DoScroll(long nDelta)
aRect.Right() -= mxScroll->GetSizePixel().Width();
Scroll( 0, -nDelta, aRect );
mxScroll->SetPosPixel(aNewPoint);
+ LayoutOrPaintContents();
Invalidate();
}
@@ -629,6 +635,7 @@ void SmElementsControl::build()
}
break;
}
+ LayoutOrPaintContents();
Invalidate();
}
commit 6c2f0c1001b0586b3092e80d63866ae018f09eb8
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Wed Jul 22 16:26:31 2015 +0200
ListBox in grid: properly set selection on change from model
In particular when changing row.
1) Teach DbCellControl about "SelectedItems" as known value property.
2) Fix DbListBox::updateFromModel to actually use the SelectedItems
it reads from the model, as opposed to throwing it away.
Change-Id: I7074c13b3d271bf2362aa059378aa857682a040b
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index fe76271..8208231 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -572,6 +572,7 @@ DbCellControl::DbCellControl( DbGridColumn& _rColumn, bool /*_bText*/ )
implDoPropertyListening( FM_PROP_STATE, false );
implDoPropertyListening( FM_PROP_TEXT, false );
implDoPropertyListening( FM_PROP_EFFECTIVE_VALUE, false );
+ implDoPropertyListening( FM_PROP_SELECT_SEQ, false );
// be listener at the bound field as well
try
@@ -676,6 +677,7 @@ void DbCellControl::_propertyChanged(const PropertyChangeEvent& _rEvent) throw(R
|| _rEvent.PropertyName == FM_PROP_STATE
|| _rEvent.PropertyName == FM_PROP_TEXT
|| _rEvent.PropertyName == FM_PROP_EFFECTIVE_VALUE
+ || _rEvent.PropertyName == FM_PROP_SELECT_SEQ
)
{ // it was one of the known "value" properties
if ( !isValuePropertyLocked() )
@@ -2645,7 +2647,7 @@ void DbListBox::updateFromModel( Reference< XPropertySet > _rxModel )
OSL_ENSURE( _rxModel.is() && m_pWindow, "DbListBox::updateFromModel: invalid call!" );
Sequence< sal_Int16 > aSelection;
- _rxModel->getPropertyValue( FM_PROP_SELECT_SEQ );
+ _rxModel->getPropertyValue( FM_PROP_SELECT_SEQ ) >>= aSelection;
sal_Int16 nSelection = -1;
if ( aSelection.getLength() > 0 )
commit 3b9e66fdcade5a222a9dc99ad74627473b1fd4e7
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Wed Jul 22 16:25:28 2015 +0200
tdf#92725 FormattedField: when model value is NULL, force empty display string
as opposed to implicitly keeping whatever unrelated string was there before.
Change-Id: Ifaf1b41e951e97f209ecb617b32ec4f7522b1d08
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 9a5a28d..fe76271 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1576,7 +1576,7 @@ void DbFormattedField::updateFromModel( Reference< XPropertySet > _rxModel )
OUString sText;
Any aValue = _rxModel->getPropertyValue( FM_PROP_EFFECTIVE_VALUE );
- if ( aValue >>= sText )
+ if ( !aValue.hasValue() || (aValue >>= sText) )
{ // our effective value is transferred as string
pFormattedWindow->SetTextFormatted( sText );
pFormattedWindow->SetSelection( Selection( SELECTION_MAX, SELECTION_MIN ) );
commit a37df351c447373bb893ba154bd124d33e43c040
Author: Matthew J. Francis <mjay.francis at gmail.com>
Date: Fri Jul 10 15:29:22 2015 +0800
Fix logic in the fast path of Implementation::inspect()
- Merge TypeCache and ClassCache
- Don't fill SupportedClassSeq before the fast exit for a
cache hit
- Do query XPropertySet blind in the degenerate interface case
Change-Id: I3fd8ab4a215f4c217e1a687af679aef4a21b68b9
Reviewed-on: https://gerrit.libreoffice.org/16921
Reviewed-by: Matthew Francis <mjay.francis at gmail.com>
Tested-by: Matthew Francis <mjay.francis at gmail.com>
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 497d9e2..a74a729 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -197,7 +197,6 @@ class IntrospectionAccessStatic_Impl: public salhelper::SimpleReferenceObject
// Flags which indicate if various interfaces are present
bool mbFastPropSet;
- bool mbPropertySet;
bool mbElementAccess;
bool mbNameAccess;
bool mbNameContainer;
@@ -270,7 +269,6 @@ IntrospectionAccessStatic_Impl::IntrospectionAccessStatic_Impl( Reference< XIdlR
maPropertyConceptSeq.realloc( ARRAY_SIZE_STEP );
mbFastPropSet = false;
- mbPropertySet = false;
mbElementAccess = false;
mbNameAccess = false;
mbNameContainer = false;
@@ -1499,55 +1497,6 @@ OUString ImplIntrospectionAccess::getExactName( const OUString& rApproximateName
return aRetStr;
}
-struct ClassKey {
- ClassKey(
- css::uno::Reference<css::beans::XPropertySetInfo> const & theProperties,
- css::uno::Reference<css::reflection::XIdlClass> const &
- theImplementation,
- css::uno::Sequence< css::uno::Reference<css::reflection::XIdlClass> >
- const & theClasses):
- properties(theProperties), implementation(theImplementation),
- classes(theClasses)
- {}
-
- css::uno::Reference<css::beans::XPropertySetInfo> properties;
- css::uno::Reference<css::reflection::XIdlClass> implementation;
- css::uno::Sequence< css::uno::Reference<css::reflection::XIdlClass> >
- classes;
-};
-
-struct ClassKeyLess {
- bool operator ()(ClassKey const & key1, ClassKey const & key2) const {
- if (key1.properties.get() < key2.properties.get()) {
- return true;
- }
- if (key1.properties.get() > key2.properties.get()) {
- return false;
- }
- if (key1.implementation.get() < key2.implementation.get()) {
- return true;
- }
- if (key1.implementation.get() > key2.implementation.get()) {
- return false;
- }
- if (key1.classes.getLength() < key2.classes.getLength()) {
- return true;
- }
- if (key1.classes.getLength() > key2.classes.getLength()) {
- return false;
- }
- for (sal_Int32 i = 0; i != key1.classes.getLength(); ++i) {
- if (key1.classes[i].get() < key2.classes[i].get()) {
- return true;
- }
- if (key1.classes[i].get() > key2.classes[i].get()) {
- return false;
- }
- }
- return false;
- }
-};
-
struct TypeKey {
TypeKey(
css::uno::Reference<css::beans::XPropertySetInfo> const & theProperties,
@@ -1653,7 +1602,6 @@ private:
virtual void SAL_CALL disposing() SAL_OVERRIDE {
osl::MutexGuard g(m_aMutex);
reflection_.clear();
- classCache_.clear();
typeCache_.clear();
}
@@ -1679,7 +1627,6 @@ private:
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
css::uno::Reference<css::reflection::XIdlReflection> reflection_;
- Cache<ClassKey, ClassKeyLess> classCache_;
Cache<TypeKey, TypeKeyLess> typeCache_;
};
@@ -1731,10 +1678,8 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
Sequence< Reference<XIdlClass> > SupportedClassSeq;
Sequence< Type > SupportedTypesSeq;
Reference<XTypeProvider> xTypeProvider;
- Reference<XIdlClass> xImplClass;
Reference<XPropertySetInfo> xPropSetInfo;
Reference<XPropertySet> xPropSet;
- bool bHasPropertySet = false;
// Look for interfaces XTypeProvider and PropertySet
if( eType == TypeClass_INTERFACE )
@@ -1746,66 +1691,46 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
sal_Int32 nTypeCount = SupportedTypesSeq.getLength();
if( nTypeCount )
{
- SupportedClassSeq.realloc( nTypeCount );
- Reference<XIdlClass>* pClasses = SupportedClassSeq.getArray();
-
const Type* pTypes = SupportedTypesSeq.getConstArray();
for( sal_Int32 i = 0 ; i < nTypeCount ; i++ )
{
- OUString typeName( pTypes[i].getTypeName() );
- pClasses[i] = reflection->forName( typeName );
- if( !bHasPropertySet && typeName == "com.sun.star.beans.XPropertySet" )
- bHasPropertySet = true;
+ if( pTypes[i].getTypeName() == "com.sun.star.beans.XPropertySet" )
+ {
+ xPropSet = Reference<XPropertySet>::query( x );
+ break;
+ }
}
- // TODO: Caching!
}
} else {
SAL_WARN(
"stoc",
"object of type \"" << aToInspectObj.getValueTypeName()
<< "\" lacks XTypeProvider");
- xImplClass = reflection->forName(aToInspectObj.getValueTypeName());
- SupportedClassSeq.realloc(1);
- SupportedClassSeq[0] = xImplClass;
+ SupportedTypesSeq = Sequence<Type>(&aToInspectObj.getValueType(), 1);
+ xPropSet = Reference<XPropertySet>::query( x );
}
- if ( bHasPropertySet )
- xPropSet = Reference<XPropertySet>::query( x );
// Now try to get the PropertySetInfo
if( xPropSet.is() )
xPropSetInfo = xPropSet->getPropertySetInfo();
+
} else {
- xImplClass = reflection->forName(aToInspectObj.getValueTypeName());
+ SupportedTypesSeq = Sequence<Type>(&aToInspectObj.getValueType(), 1);
}
- if (xTypeProvider.is()) {
- TypeKey key(xPropSetInfo, SupportedTypesSeq);
-
+ {
osl::MutexGuard g(m_aMutex);
if (rBHelper.bDisposed || rBHelper.bInDispose) {
throw css::lang::DisposedException(
getImplementationName(), static_cast<OWeakObject *>(this));
}
+ TypeKey key(xPropSetInfo, SupportedTypesSeq);
pAccess = typeCache_.find(key);
if (pAccess.is()) {
return new ImplIntrospectionAccess(aToInspectObj, pAccess);
}
pAccess = new IntrospectionAccessStatic_Impl(reflection);
typeCache_.insert(key, pAccess);
- } else if (xImplClass.is()) {
- ClassKey key(xPropSetInfo, xImplClass, SupportedClassSeq);
-
- osl::MutexGuard g(m_aMutex);
- if (rBHelper.bDisposed || rBHelper.bInDispose) {
- throw css::lang::DisposedException(
- getImplementationName(), static_cast<OWeakObject *>(this));
- }
- pAccess = classCache_.find(key);
- if (pAccess.is()) {
- return new ImplIntrospectionAccess(aToInspectObj, pAccess);
- }
- pAccess = new IntrospectionAccessStatic_Impl(reflection);
- classCache_.insert(key, pAccess);
}
// No access cached -> create new
@@ -1816,11 +1741,6 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
sal_Int32* pPropertyConceptArray;
sal_Int32 i;
- if( !pAccess.is() )
- pAccess = new IntrospectionAccessStatic_Impl( reflection );
-
- pAccess->mbPropertySet = bHasPropertySet;
-
// References to important data from pAccess
sal_Int32& rPropCount = pAccess->mnPropCount;
IntrospectionNameMap& rPropNameMap = pAccess->maPropertyNameMap;
@@ -1839,6 +1759,17 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
if( eType == TypeClass_INTERFACE )
{
+ sal_Int32 nTypeCount = SupportedTypesSeq.getLength();
+ if( nTypeCount )
+ {
+ SupportedClassSeq.realloc( nTypeCount );
+ Reference<XIdlClass>* pClasses = SupportedClassSeq.getArray();
+
+ const Type* pTypes = SupportedTypesSeq.getConstArray();
+ for( i = 0 ; i < nTypeCount ; i++ )
+ pClasses[i] = reflection->forName( pTypes[i].getTypeName() );
+ }
+
// First look for particular interfaces that are of particular
// importance to the introspection
commit a64c48f523d148cd4750bc9bd26d2349fc8a3c7c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 22 14:52:58 2015 +0100
read block in one swoop, rather than char by char
Change-Id: Ic879c096c6b3167a123cee352361da6c39e57de2
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 1dc8806..0c2ad80 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -3889,13 +3889,8 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
{
if (pExtraArray)
{
- ww::bytes extraData;
- for (sal_uInt16 j = 0; j < nExtraLen; ++j)
- {
- sal_uInt8 iTmp(0);
- rStrm.ReadUChar( iTmp );
- extraData.push_back(iTmp);
- }
+ ww::bytes extraData(nExtraLen);
+ rStrm.Read(extraData.data(), nExtraLen);
pExtraArray->push_back(extraData);
}
else
@@ -3950,13 +3945,8 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
{
if (pExtraArray)
{
- ww::bytes extraData;
- for (sal_uInt16 i=0;i < nExtraLen;++i)
- {
- sal_uInt8 iTmp(0);
- rStrm.ReadUChar( iTmp );
- extraData.push_back(iTmp);
- }
+ ww::bytes extraData(nExtraLen);
+ rStrm.Read(extraData.data(), nExtraLen);
pExtraArray->push_back(extraData);
}
else
commit cbea6a709f33babfb490ab1bd07cde8cc08114ac
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 22 13:51:19 2015 +0100
xstUsrInitl contains max 9 chars
Change-Id: Ia40d037d7af6cd3a283aa12948e4c5565dcb2ae6
diff --git a/sw/qa/core/data/ww8/pass/crash-1.doc b/sw/qa/core/data/ww8/pass/crash-1.doc
new file mode 100644
index 0000000..9f6b253
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/crash-1.doc differ
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 4d82b50..02d26f4 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2170,15 +2170,18 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
if (pA)
sAuthor = *pA;
else
- sAuthor = OUString(pDescri->xstUsrInitl + 1, pDescri->xstUsrInitl[0],
- RTL_TEXTENCODING_MS_1252);
+ {
+ const sal_uInt8 nLen = std::min<sal_uInt8>(pDescri->xstUsrInitl[0],
+ SAL_N_ELEMENTS(pDescri->xstUsrInitl)-1);
+ sAuthor = OUString(pDescri->xstUsrInitl + 1, nLen, RTL_TEXTENCODING_MS_1252);
+ }
}
else
{
const WW8_ATRD* pDescri = static_cast<const WW8_ATRD*>(pSD->GetData());
-
{
- const sal_uInt16 nLen = SVBT16ToShort(pDescri->xstUsrInitl[0]);
+ const sal_uInt16 nLen = std::min<sal_uInt16>(SVBT16ToShort(pDescri->xstUsrInitl[0]),
+ SAL_N_ELEMENTS(pDescri->xstUsrInitl)-1);
OUStringBuffer aBuf;
aBuf.setLength(nLen);
for(sal_uInt16 nIdx = 1; nIdx <= nLen; ++nIdx)
commit 96d44c9b077a6cc8068067a795dc63248ab90fea
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jul 22 10:20:03 2015 +0200
loplugin:unusedmethods sc
Change-Id: I7bdb1889a942d63370731764a58f4ab524dedd8a
Reviewed-on: https://gerrit.libreoffice.org/17287
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx
index 692e91e..c22c1db 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -74,13 +74,31 @@ public:
bool VisitVarDecl( const VarDecl* );
};
-static std::string niceName(const FunctionDecl* functionDecl)
+/**
+ * We need to include the template params when we are building the set
+ * of functions we have walked already, because we need to rewalk anything instantiated with different params
+ */
+enum class NiceNameIncludeTemplateParams { NO, YES };
+static std::string niceName(const FunctionDecl* functionDecl, NiceNameIncludeTemplateParams eIncludeTemplateParams = NiceNameIncludeTemplateParams::NO)
{
std::string s =
compat::getReturnType(*functionDecl).getCanonicalType().getAsString()
+ " ";
if (isa<CXXMethodDecl>(functionDecl)) {
- s += dyn_cast<CXXMethodDecl>(functionDecl)->getParent()->getQualifiedNameAsString() + "::";
+ const CXXRecordDecl* recordDecl = dyn_cast<CXXMethodDecl>(functionDecl)->getParent();
+ s += recordDecl->getQualifiedNameAsString();
+ if (eIncludeTemplateParams == NiceNameIncludeTemplateParams::YES
+ && isa<ClassTemplateSpecializationDecl>(recordDecl))
+ {
+ const ClassTemplateSpecializationDecl* templateDecl = dyn_cast<ClassTemplateSpecializationDecl>(recordDecl);
+ s += "<";
+ for(size_t i=0; i < templateDecl->getTemplateArgs().size(); i++)
+ {
+ s += " ," + templateDecl->getTemplateArgs()[i].getAsType().getAsString();
+ }
+ s += ">";
+ }
+ s += "::";
}
s += functionDecl->getNameAsString() + "(";
bool bFirst = true;
@@ -164,7 +182,7 @@ bool UnusedMethods::VisitCallExpr(CallExpr* expr)
// if the function is templated. However, if we are inside a template function,
// calling another function on the same template, the same problem occurs.
// Rather than tracking all of that, just traverse anything we have not already traversed.
- if (traversedFunctionSet.insert(niceName(calleeFunctionDecl)).second)
+ if (traversedFunctionSet.insert(niceName(calleeFunctionDecl, NiceNameIncludeTemplateParams::YES)).second)
TraverseFunctionDecl(calleeFunctionDecl);
logCallToRootMethods(calleeFunctionDecl);
diff --git a/compilerplugins/clang/unusedmethods.py b/compilerplugins/clang/unusedmethods.py
index 640b42c..f8c5ae2 100755
--- a/compilerplugins/clang/unusedmethods.py
+++ b/compilerplugins/clang/unusedmethods.py
@@ -56,6 +56,7 @@ exclusionSet = set([
"_Bool connectivity::OColumn::isWritable() const",
"_Bool IDocumentLinksAdministration::GetData(const class rtl::OUString &,const class rtl::OUString &,class com::sun::star::uno::Any &) const",
"_Bool IDocumentLinksAdministration::SetData(const class rtl::OUString &,const class rtl::OUString &,const class com::sun::star::uno::Any &)",
+ "_Bool ScImportExport::ImportData(const class rtl::OUString &,const class com::sun::star::uno::Any &)",
# instantiated from templates, not sure why it is not being picked up
"class basegfx::B2DPolygon OutputDevice::PixelToLogic(const class basegfx::B2DPolygon &,const class MapMode &) const",
"type-parameter-0-0 * detail::cloner::clone(type-parameter-0-0 *const)",
diff --git a/sc/inc/addincfg.hxx b/sc/inc/addincfg.hxx
index 74e86c9..f99c8ed 100644
--- a/sc/inc/addincfg.hxx
+++ b/sc/inc/addincfg.hxx
@@ -25,8 +25,6 @@
class ScAddInCfg : public utl::ConfigItem
{
private:
- com::sun::star::uno::Sequence<OUString> GetPropertyNames();
-
virtual void ImplCommit() SAL_OVERRIDE;
public:
diff --git a/sc/inc/clkernelthread.hxx b/sc/inc/clkernelthread.hxx
index 358da11..ef53a5e 100644
--- a/sc/inc/clkernelthread.hxx
+++ b/sc/inc/clkernelthread.hxx
@@ -34,8 +34,6 @@ public:
CLBuildKernelThread();
virtual ~CLBuildKernelThread();
- void finish();
-
void push(CLBuildKernelWorkItem item);
osl::Condition maCompilationDoneCondition;
@@ -47,8 +45,6 @@ private:
osl::Mutex maQueueMutex;
osl::Condition maQueueCondition;
std::queue<CLBuildKernelWorkItem> maQueue;
- static void produce();
- static void consume();
};
}
diff --git a/sc/inc/convuno.hxx b/sc/inc/convuno.hxx
index 6c2c5ec..f2c4c20 100644
--- a/sc/inc/convuno.hxx
+++ b/sc/inc/convuno.hxx
@@ -50,27 +50,15 @@ public:
static inline void FillApiRange(
::com::sun::star::table::CellRangeAddress& rApiRange,
const ScRange& rScRange );
- // CellAddress -> CellRangeAddress
- static inline void FillApiRange(
- ::com::sun::star::table::CellRangeAddress& rApiRange,
- const ::com::sun::star::table::CellAddress& rApiAddress );
// CellRangeAddress-Start -> CellAddress
static inline void FillApiStartAddress(
::com::sun::star::table::CellAddress& rApiAddress,
const ::com::sun::star::table::CellRangeAddress& rApiRange );
- // CellRangeAddress-End -> CellAddress
- static inline void FillApiEndAddress(
- ::com::sun::star::table::CellAddress& rApiAddress,
- const ::com::sun::star::table::CellRangeAddress& rApiRange );
/** Returns true, if the passed ranges have at least one common cell. */
static inline bool Intersects(
const ::com::sun::star::table::CellRangeAddress& rApiARange1,
const ::com::sun::star::table::CellRangeAddress& rApiARange2 );
- /** Returns true, if the passed address rApiInner is inside the passed range rApiOuter. */
- static inline bool Contains(
- const ::com::sun::star::table::CellRangeAddress& rApiOuter,
- const ::com::sun::star::table::CellAddress& rApiInner );
/** Returns true, if the passed range rApiInner is completely inside the passed range rApiOuter. */
static inline bool Contains(
const ::com::sun::star::table::CellRangeAddress& rApiOuter,
@@ -112,15 +100,6 @@ inline void ScUnoConversion::FillApiRange(
rApiRange.EndRow = rScRange.aEnd.Row();
}
-inline void ScUnoConversion::FillApiRange(
- ::com::sun::star::table::CellRangeAddress& rApiRange,
- const ::com::sun::star::table::CellAddress& rApiAddress )
-{
- rApiRange.StartColumn = rApiRange.EndColumn = rApiAddress.Column;
- rApiRange.StartRow = rApiRange.EndRow = rApiAddress.Row;
- rApiRange.Sheet = rApiAddress.Sheet;
-}
-
inline void ScUnoConversion::FillApiStartAddress(
::com::sun::star::table::CellAddress& rApiAddress,
const ::com::sun::star::table::CellRangeAddress& rApiRange )
@@ -130,15 +109,6 @@ inline void ScUnoConversion::FillApiStartAddress(
rApiAddress.Sheet = rApiRange.Sheet;
}
-inline void ScUnoConversion::FillApiEndAddress(
- ::com::sun::star::table::CellAddress& rApiAddress,
- const ::com::sun::star::table::CellRangeAddress& rApiRange )
-{
- rApiAddress.Column = rApiRange.EndColumn;
- rApiAddress.Row = rApiRange.EndRow;
- rApiAddress.Sheet = rApiRange.Sheet;
-}
-
inline bool ScUnoConversion::Intersects(
const ::com::sun::star::table::CellRangeAddress& rApiRange1,
const ::com::sun::star::table::CellRangeAddress& rApiRange2 )
@@ -150,15 +120,6 @@ inline bool ScUnoConversion::Intersects(
inline bool ScUnoConversion::Contains(
const ::com::sun::star::table::CellRangeAddress& rApiOuter,
- const ::com::sun::star::table::CellAddress& rApiInner )
-{
- return (rApiOuter.Sheet == rApiInner.Sheet) &&
- (rApiOuter.StartColumn <= rApiInner.Column) && (rApiInner.Column <= rApiOuter.EndColumn) &&
- (rApiOuter.StartRow <= rApiInner.Row) && (rApiInner.Row <= rApiOuter.EndRow);
-}
-
-inline bool ScUnoConversion::Contains(
- const ::com::sun::star::table::CellRangeAddress& rApiOuter,
const ::com::sun::star::table::CellRangeAddress& rApiInner )
{
return (rApiOuter.Sheet == rApiInner.Sheet) &&
diff --git a/sc/inc/filtopt.hxx b/sc/inc/filtopt.hxx
index a9381ce..ee188c4 100644
--- a/sc/inc/filtopt.hxx
+++ b/sc/inc/filtopt.hxx
@@ -42,10 +42,6 @@ public:
virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames ) SAL_OVERRIDE;
bool GetWK3Flag() const { return bWK3Flag; }
- double GetExcelColScale() const { return fExcelColScale; }
- double GetExcelRowScale() const { return fExcelRowScale; }
-
- // values are never modified by office
};
#endif
diff --git a/sc/inc/grouparealistener.hxx b/sc/inc/grouparealistener.hxx
index 71de7ee..d19c9fec 100644
--- a/sc/inc/grouparealistener.hxx
+++ b/sc/inc/grouparealistener.hxx
@@ -60,10 +60,6 @@ public:
void collectFormulaCells( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2, std::vector<ScFormulaCell*>& rCells ) const;
void collectFormulaCells( SCROW nRow1, SCROW nRow2, std::vector<ScFormulaCell*>& rCells ) const;
- ScAddress getTopCellPos() const;
- const ScRange& getRange() const;
- SCROW getGroupLength() const;
-
private:
void notifyCellChange( const SfxHint& rHint, const ScAddress& rPos );
void notifyBulkChange( const BulkDataHint& rHint );
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 3fcedfc..aab5be0 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -217,7 +217,6 @@ public:
virtual bool GetRenameTable () const = 0;
virtual void GetTabNameString( OUString& rString ) const = 0;
virtual void SetForceCopyTable () = 0;
- virtual void EnableCopyTable (bool bFlag=true) = 0;
virtual void EnableRenameTable (bool bFlag=true) = 0;
};
@@ -231,7 +230,6 @@ class AbstractScNamePasteDlg : public VclAbstractDialog
{
public:
virtual std::vector<OUString> GetSelectedNames() const = 0;
- virtual bool IsAllSelected() const = 0;
};
class AbstractScPivotFilterDlg : public VclAbstractDialog
diff --git a/sc/inc/simpleformulacalc.hxx b/sc/inc/simpleformulacalc.hxx
index 340c9d8..2d20f6d 100644
--- a/sc/inc/simpleformulacalc.hxx
+++ b/sc/inc/simpleformulacalc.hxx
@@ -46,7 +46,6 @@ public:
double GetValue();
svl::SharedString GetString();
short GetFormatType() const { return mnFormatType; }
- sal_uLong GetFormatIndex() const { return mnFormatIndex; }
bool HasColRowName();
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 829c127..b95331c 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -197,27 +197,6 @@ inline std::string print(const ScAddress& rAddr)
return str.str();
}
-namespace CppUnit {
-
-template<>
-struct assertion_traits<ScRange>
-{
- static bool equal( const ScRange& x, const ScRange& y )
- {
- return x == y;
- }
-
- static std::string toString( const ScRange& x )
- {
- std::stringstream str;
- str << "Start: " << print(x.aStart);
- str << "\nEnd: " << print(x.aEnd);
- return str.str();
- }
-};
-
-}
-
class SCQAHELPER_DLLPUBLIC ScBootstrapFixture : public test::BootstrapFixture
{
static const FileFormat aFileFormats[];
diff --git a/sc/source/core/tool/clkernelthread.cxx b/sc/source/core/tool/clkernelthread.cxx
index 6c5afc0..9a83a1e 100644
--- a/sc/source/core/tool/clkernelthread.cxx
+++ b/sc/source/core/tool/clkernelthread.cxx
@@ -76,22 +76,6 @@ void CLBuildKernelThread::push(CLBuildKernelWorkItem item)
sc::FormulaGroupInterpreter::getStatic();
}
-void CLBuildKernelThread::produce()
-{
-}
-
-void CLBuildKernelThread::consume()
-{
-}
-
-void CLBuildKernelThread::finish()
-{
- SAL_INFO("sc.opencl", "telling thread to finish");
- CLBuildKernelWorkItem aWorkItem;
- aWorkItem.meWhatToDo = CLBuildKernelWorkItem::FINISH;
- push(aWorkItem);
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/grouparealistener.cxx b/sc/source/core/tool/grouparealistener.cxx
index ac9ea7f..82a7204 100644
--- a/sc/source/core/tool/grouparealistener.cxx
+++ b/sc/source/core/tool/grouparealistener.cxx
@@ -325,12 +325,6 @@ void FormulaGroupAreaListener::collectFormulaCells(
}
}
-ScAddress FormulaGroupAreaListener::getTopCellPos() const
-{
- const ScFormulaCell* p = getTopCell();
- return p ? p->aPos : ScAddress();
-}
-
const ScFormulaCell* FormulaGroupAreaListener::getTopCell() const
{
size_t nBlockSize = 0;
@@ -339,16 +333,6 @@ const ScFormulaCell* FormulaGroupAreaListener::getTopCell() const
return pp ? *pp : NULL;
}
-const ScRange& FormulaGroupAreaListener::getRange() const
-{
- return maRange;
-}
-
-SCROW FormulaGroupAreaListener::getGroupLength() const
-{
- return mnGroupLen;
-}
-
void FormulaGroupAreaListener::notifyCellChange( const SfxHint& rHint, const ScAddress& rPos )
{
// Determine which formula cells within the group need to be notified of this change.
diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx
index a140fa9..3f3cac7 100644
--- a/sc/source/core/tool/userlist.cxx
+++ b/sc/source/core/tool/userlist.cxx
@@ -326,11 +326,6 @@ ScUserList::iterator ScUserList::begin()
return maData.begin();
}
-ScUserList::const_iterator ScUserList::begin() const
-{
- return maData.begin();
-}
-
void ScUserList::clear()
{
maData.clear();
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 78b4b32..9b4b081 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -185,12 +185,11 @@ void XclExpPCItem::WriteBody( XclExpStream& rStrm )
}
XclExpPCField::XclExpPCField(
- const XclExpRoot& rRoot, const XclExpPivotCache& rPCache, sal_uInt16 nFieldIdx,
+ const XclExpRoot& rRoot, sal_uInt16 nFieldIdx,
const ScDPObject& rDPObj, const ScRange& rRange ) :
XclExpRecord( EXC_ID_SXFIELD ),
XclPCField( EXC_PCFIELD_STANDARD, nFieldIdx ),
XclExpRoot( rRoot ),
- mrPCache( rPCache ),
mnTypeFlags( 0 )
{
// general settings for the standard field, insert all items from source range
@@ -221,12 +220,11 @@ XclExpPCField::XclExpPCField(
}
XclExpPCField::XclExpPCField(
- const XclExpRoot& rRoot, const XclExpPivotCache& rPCache, sal_uInt16 nFieldIdx,
+ const XclExpRoot& rRoot, sal_uInt16 nFieldIdx,
const ScDPObject& rDPObj, const ScDPSaveGroupDimension& rGroupDim, const XclExpPCField& rBaseField ) :
XclExpRecord( EXC_ID_SXFIELD ),
XclPCField( EXC_PCFIELD_STDGROUP, nFieldIdx ),
XclExpRoot( rRoot ),
- mrPCache( rPCache ),
mnTypeFlags( 0 )
{
// add base field info (always using first base field, not predecessor of this field) ***
@@ -750,7 +748,7 @@ void XclExpPivotCache::AddStdFields( const ScDPObject& rDPObj )
aColRange.aStart.SetCol( nScCol );
aColRange.aEnd.SetCol( nScCol );
maFieldList.AppendNewRecord( new XclExpPCField(
- GetRoot(), *this, GetFieldCount(), rDPObj, aColRange ) );
+ GetRoot(), GetFieldCount(), rDPObj, aColRange ) );
}
}
@@ -771,7 +769,7 @@ void XclExpPivotCache::AddGroupFields( const ScDPObject& rDPObj )
{
// insert the new grouping field
XclExpPCFieldRef xNewGroupField( new XclExpPCField(
- GetRoot(), *this, GetFieldCount(), rDPObj, *pGroupDim, *pCurrStdField ) );
+ GetRoot(), GetFieldCount(), rDPObj, *pGroupDim, *pCurrStdField ) );
maFieldList.AppendRecord( xNewGroupField );
// register new grouping field at current grouping field, building a chain
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index fa649ee..bbd768d 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -781,11 +781,6 @@ static ScRange lcl_ToRange( const XclRange& rRange )
return aRange;
}
-OString XclXmlUtils::ToOString( const XclRange& rRange )
-{
- return ToOString( lcl_ToRange( rRange ) );
-}
-
OString XclXmlUtils::ToOString( const XclRangeList& rRanges )
{
ScRangeList aRanges;
diff --git a/sc/source/filter/excel/xltoolbar.hxx b/sc/source/filter/excel/xltoolbar.hxx
index 3a9658c..892ec61 100644
--- a/sc/source/filter/excel/xltoolbar.hxx
+++ b/sc/source/filter/excel/xltoolbar.hxx
@@ -53,7 +53,6 @@ class ScCTB : public TBBase
std::vector<TBVisualData> rVisualData;
sal_uInt32 ectbid;
std::vector< ScTBC > rTBC;
- bool ImportCustomToolBar_Impl( ScCTBWrapper&, CustomToolBarImportHelper& );
public:
ScCTB(sal_uInt16);
virtual ~ScCTB(){}
diff --git a/sc/source/filter/inc/XclExpChangeTrack.hxx b/sc/source/filter/inc/XclExpChangeTrack.hxx
index df1e4d7..cff08cf 100644
--- a/sc/source/filter/inc/XclExpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclExpChangeTrack.hxx
@@ -74,13 +74,8 @@ public:
virtual ~XclExpUserBViewList();
inline iterator begin () { return aViews.begin(); }
-
inline iterator end () { return aViews.end(); }
- inline const_iterator begin () const { return aViews.begin(); }
-
- inline const_iterator end () const { return aViews.end(); }
-
virtual void Save( XclExpStream& rStrm ) SAL_OVERRIDE;
};
diff --git a/sc/source/filter/inc/XclImpChangeTrack.hxx b/sc/source/filter/inc/XclImpChangeTrack.hxx
index bf7801d..ce80abd 100644
--- a/sc/source/filter/inc/XclImpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclImpChangeTrack.hxx
@@ -79,8 +79,6 @@ private:
SCTAB ReadTabNum();
void ReadDateTime( DateTime& rDateTime );
- inline void ReadString( OUString& rString );
-
bool CheckRecord( sal_uInt16 nOpCode );
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list