[Libreoffice-commits] .: sfx2/source

2013-01-28 Thread Libreoffice Gerrit user
 sfx2/source/doc/templatedlg.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 2064d3df551b651479c0602e197674d4efede15f
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Mon Jan 28 17:51:54 2013 +0100

Template Manager: don't show any tab and show all folders when saving 
template

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 824cfc1..b756111 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -227,6 +227,8 @@ SfxTemplateManagerDlg::~SfxTemplateManagerDlg ()
 void SfxTemplateManagerDlg::setSaveMode(bool bMode)
 {
 mbIsSaveMode = bMode;
+maTabControl.Clear();
+mpCurView-filterTemplatesByApp(FILTER_APP_NONE);
 
 if (bMode)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2013-01-28 Thread Libreoffice Gerrit user
 sfx2/source/doc/templatedlg.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 4651402a5399e00f62311bb3fe545413b0818a2d
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Mon Jan 28 18:50:39 2013 +0100

Template Manager: focus in search edit when clicking search action

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index b756111..d3721ab 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -964,6 +964,8 @@ void SfxTemplateManagerDlg::OnTemplateSearch ()
 
 mpSearchEdit-Show(!bVisible);
 mpSearchEdit-SetText(OUString());
+if (!bVisible)
+mpSearchEdit-GrabFocus();
 
 // display all templates if we hide the search bar
 if (bVisible  mpCurView-isOverlayVisible())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2013-01-24 Thread Libreoffice Gerrit user
 sfx2/source/dialog/templdlg.cxx |  105 
 1 file changed, 76 insertions(+), 29 deletions(-)

New commits:
commit 439ac45925039aa7a537feedab3e731e8a60a8e5
Author: Joren De Cuyper joren.libreoff...@telenet.be
Date:   Thu Jan 17 15:28:37 2013 +0100

fdo#46718 Delete multiple styles at once

Change-Id: I5f5982b2a2768d021f24693a285274544e07e40f
Reviewed-on: https://gerrit.libreoffice.org/1737
Reviewed-by: Radek Doulík r...@novell.com
Tested-by: Radek Doulík r...@novell.com

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index b315453..31920f2 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -911,6 +911,7 @@ void SfxCommonTemplateDialog_Impl::Initialize()
 aFilterLb.SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, 
FilterSelectHdl ) );
 aFmtLb.SetDoubleClickHdl( LINK( this, SfxCommonTemplateDialog_Impl, 
ApplyHdl ) );
 aFmtLb.SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, 
FmtSelectHdl ) );
+aFmtLb.SetSelectionMode(MULTIPLE_SELECTION);
 
 aFilterLb.Show();
 aFmtLb.Show();
@@ -1046,7 +1047,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const 
String rStr)
 {
 aFmtLb.MakeVisible( pEntry );
 aFmtLb.Select( pEntry );
-bWaterDisabled = !HasSelectedStyle();
+bWaterDisabled = (aFmtLb.GetSelectionCount() =1 ? sal_False : 
sal_True);
 FmtSelectHdl( NULL );
 }
 }
@@ -1306,7 +1307,8 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const 
SfxBoolItem *pItem)
 bWaterDisabled =  pItem == 0;
 
 if(!bWaterDisabled)
-bWaterDisabled = !HasSelectedStyle();
+//make sure the watercan is only activated when there is (only) one 
selection
+bWaterDisabled = (aFmtLb.GetSelectionCount() =1 ? sal_False : 
sal_True);
 
 if(pItem  !bWaterDisabled)
 {
@@ -1644,6 +1646,7 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
 aUpdName.SetValue(aTemplName);
 pItems[ nCount++ ] = aUpdName;
 }
+
 if ( rRefStr.Len() )
 pItems[ nCount++ ] = aRefName;
 
@@ -1660,7 +1663,7 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
 if ( !pItem || aDeleted )
 return sal_False;
 
-if ( nId == SID_STYLE_NEW || SID_STYLE_EDIT == nId )
+if ( (nId == SID_STYLE_NEW || SID_STYLE_EDIT == nId)  
(aFmtLb.GetSelectionCount() = 1) )
 {
 SfxUInt16Item *pFilterItem = PTR_CAST(SfxUInt16Item, pItem);
 OSL_ENSURE(pFilterItem, SfxUINT16Item expected);
@@ -1899,7 +1902,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, DropHdl, 
StyleTreeListBox_Impl *, pBox
 void SfxCommonTemplateDialog_Impl::NewHdl(void *)
 {
 String aEmpty;
-if ( nActFamily != 0x )
+if ( nActFamily != 0x  (aFmtLb.GetSelectionCount() = 1))
 {
 Window* pTmp;
 pTmp = Application::GetDefDialogParent();
@@ -1963,39 +1966,80 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
 {
 if ( IsInitialized()  HasSelectedStyle() )
 {
-const String aTemplName( GetSelectedEntry() );
-SfxStyleSheetBase* pStyle = GetSelectedStyle();
-if ( pStyle )
+sal_uLong SelectionCount = 0;
+sal_Bool bChecked = 0;
+String aRet;
+
+SelectionCount = aFmtLb.GetSelectionCount();
+std::vectorSvTreeListEntry* aList;
+
+SvTreeListEntry* pEntry = aFmtLb.FirstSelected();
+
+while (pEntry)
 {
-String aMsg;
-if ( pStyle-IsUsed() )
-aMsg = SfxResId(STR_DELETE_STYLE_USED).toString();
-aMsg += SfxResId(STR_DELETE_STYLE).toString();
-aMsg.SearchAndReplaceAscii( $1, aTemplName );
-#if defined UNX
-QueryBox aBox( SFX_APP()-GetTopWindow(), WB_YES_NO | WB_DEF_NO, 
aMsg );
-#else
-QueryBox aBox( GetWindow(), WB_YES_NO | WB_DEF_NO , aMsg );
-#endif
-if ( RET_YES == aBox.Execute() )
+aList.push_back( pEntry );
+pEntry = aFmtLb.NextSelected( pEntry );
+SelectionCount++;
+}
+
+std::vectorSvTreeListEntry*::const_iterator it = aList.begin(), 
itEnd = aList.end();
+
+for (; it != itEnd; ++it)
+{
+if (pTreeBox)
+aRet = pTreeBox-GetEntryText( *it );
+else
+aRet = aFmtLb.GetEntryText( *it );
+const String aTemplName( aRet );
+
+const SfxStyleFamilyItem* pItem = GetFamilyItem_Impl();
+
+SfxStyleSheetBase* pStyle = pStyleSheetPool-Find( aTemplName, 
pItem-GetFamily(), SFXSTYLEBIT_ALL );
+
+bool bUsedStyle = pStyle-IsUsed();
+bool approve;
+
+if ( bChecked == 0 )
+{
+String aMsg;
+if ( bUsedStyle )
+aMsg = SfxResId(STR_DELETE_STYLE_USED).toString();
+aMsg += 

[Libreoffice-commits] .: sfx2/source

2013-01-24 Thread Libreoffice Gerrit user
 sfx2/source/doc/templatedlg.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 23baf527ffc9c082dcbc6a328019760725cc0c08
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Thu Jan 24 16:50:32 2013 +0100

Template Manager: remote repositories only for experimental mode

Change-Id: I79501bdcd25f362065d9b95efd1a43f6be84577e

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 11fddc2..824cfc1 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -30,6 +30,7 @@
 #include sfx2/thumbnailviewitem.hxx
 #include sot/storage.hxx
 #include svtools/imagemgr.hxx
+#include svtools/miscopt.hxx
 #include svtools/PlaceEditDialog.hxx
 #include tools/urlobj.hxx
 #include unotools/moduleoptions.hxx
@@ -178,6 +179,13 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window 
*parent)
 
 
maTabControl.SetActivatePageHdl(LINK(this,SfxTemplateManagerDlg,ActivatePageHdl));
 
+SvtMiscOptions aMiscOptions;
+if ( !aMiscOptions.IsExperimentalMode() )
+{
+sal_uInt16 nPos = mpViewBar-GetItemId(TBI_TEMPLATE_REPOSITORY);
+mpViewBar-RemoveItem(nPos);
+}
+
 mpViewBar-Show();
 mpActionBar-Show();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2013-01-21 Thread Libreoffice Gerrit user
 sfx2/source/doc/guisaveas.cxx |   46 +-
 1 file changed, 23 insertions(+), 23 deletions(-)

New commits:
commit 862f694f54db1594c24bfbed8e1e833b1c7e
Author: Tor Lillqvist t...@iki.fi
Date:   Mon Jan 21 14:27:27 2013 +0200

Fix spelling misteak

Change-Id: Ie5d3564cf00c27c11597dd3ff1ba8dc82e250c0b

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 6c5f2e2..d603ce5 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -298,8 +298,8 @@ public:
 
 sal_Bool ShowDocumentInfoDialog();
 
-::rtl::OUString GetReccomendedDir( const ::rtl::OUString aSuggestedDir );
-::rtl::OUString GetReccomendedName( const ::rtl::OUString aSuggestedName,
+::rtl::OUString GetRecommendedDir( const ::rtl::OUString aSuggestedDir );
+::rtl::OUString GetRecommendedName( const ::rtl::OUString aSuggestedName,
 const ::rtl::OUString aTypeName );
 
 };
@@ -946,12 +946,12 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 
nStoreMode,
 }
 }
 
-::rtl::OUString aReccomendedDir = GetReccomendedDir( aSuggestedDir );
-if ( !aReccomendedDir.isEmpty() )
-pFileDlg-SetDisplayFolder( aReccomendedDir );
-::rtl::OUString aReccomendedName = GetReccomendedName( aSuggestedName, 
aAdjustToType );
-if ( !aReccomendedName.isEmpty() )
-pFileDlg-SetFileName( aReccomendedName );
+::rtl::OUString aRecommendedDir = GetRecommendedDir( aSuggestedDir );
+if ( !aRecommendedDir.isEmpty() )
+pFileDlg-SetDisplayFolder( aRecommendedDir );
+::rtl::OUString aRecommendedName = GetRecommendedName( aSuggestedName, 
aAdjustToType );
+if ( !aRecommendedName.isEmpty() )
+pFileDlg-SetFileName( aRecommendedName );
 
 uno::Reference  view::XSelectionSupplier  xSel( 
GetModel()-getCurrentController(), uno::UNO_QUERY );
 if ( xSel.is()  xSel-getSelection().hasValue() )
@@ -1133,9 +1133,9 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog()
 }
 
 //-
-::rtl::OUString ModelData_Impl::GetReccomendedDir( const ::rtl::OUString 
aSuggestedDir )
+::rtl::OUString ModelData_Impl::GetRecommendedDir( const ::rtl::OUString 
aSuggestedDir )
 {
-::rtl::OUString aReccomendedDir;
+::rtl::OUString aRecommendedDir;
 
 if ( ( !aSuggestedDir.isEmpty() || GetStorable()-hasLocation() )
!GetMediaDescr().getUnpackedValueOrDefault( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(RepairPackage)),
@@ -1160,36 +1160,36 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog()
 
 aLocation.setFinalSlash();
 if ( !aLocation.HasError() )
-aReccomendedDir = aLocation.GetMainURL( INetURLObject::NO_DECODE );
+aRecommendedDir = aLocation.GetMainURL( INetURLObject::NO_DECODE );
 }
 else
 {
-aReccomendedDir = INetURLObject( SvtPathOptions().GetWorkPath() 
).GetMainURL( INetURLObject::NO_DECODE );
+aRecommendedDir = INetURLObject( SvtPathOptions().GetWorkPath() 
).GetMainURL( INetURLObject::NO_DECODE );
 }
 
-return aReccomendedDir;
+return aRecommendedDir;
 }
 
 //-
-::rtl::OUString ModelData_Impl::GetReccomendedName( const ::rtl::OUString 
aSuggestedName, const ::rtl::OUString aTypeName )
+::rtl::OUString ModelData_Impl::GetRecommendedName( const ::rtl::OUString 
aSuggestedName, const ::rtl::OUString aTypeName )
 {
 // the last used name might be provided by aSuggestedName from the old 
selection, or from the MediaDescriptor
-::rtl::OUString aReccomendedName;
+::rtl::OUString aRecommendedName;
 
 if ( !aSuggestedName.isEmpty() )
-aReccomendedName = aSuggestedName;
+aRecommendedName = aSuggestedName;
 else
 {
-aReccomendedName = INetURLObject( GetStorable()-getLocation() 
).GetName( INetURLObject::DECODE_WITH_CHARSET );
-if ( aReccomendedName.isEmpty() )
+aRecommendedName = INetURLObject( GetStorable()-getLocation() 
).GetName( INetURLObject::DECODE_WITH_CHARSET );
+if ( aRecommendedName.isEmpty() )
 {
 try {
 uno::Reference frame::XTitle  xTitle( GetModel(), 
uno::UNO_QUERY_THROW );
-aReccomendedName = xTitle-getTitle();
+aRecommendedName = xTitle-getTitle();
 } catch( const uno::Exception ) {}
 }
 
-if ( !aReccomendedName.isEmpty()  !aTypeName.isEmpty() )
+if ( !aRecommendedName.isEmpty()  !aTypeName.isEmpty() )
 {
 // adjust the extension to the type
 uno::Reference container::XNameAccess  xTypeDetection = 
uno::Reference container::XNameAccess (
@@ -1197,7 +1197,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog()
 uno::UNO_QUERY );
 if ( xTypeDetection.is() )
 {
-

[Libreoffice-commits] .: sfx2/source

2013-01-14 Thread Libreoffice Gerrit user
 sfx2/source/doc/objstor.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3495f4817b80c3fc9846ed2bddfc492d39f01679
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Jan 14 14:11:53 2013 +0100

Work around may be used uninitialized warnings

Change-Id: Ib31ebaf6a6117689737705921a7af558257e8cd1

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index d646e5f..059bf5b 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2873,8 +2873,8 @@ sal_uInt16 SfxObjectShell::GetHiddenInformationState( 
sal_uInt16 nStates )
 sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, 
Window* pParent )
 {
 sal_Int16 nRet = RET_YES;
-sal_uInt16 nResId = 0;
-SvtSecurityOptions::EOption eOption;
+sal_uInt16 nResId = sal_uInt16();
+SvtSecurityOptions::EOption eOption = SvtSecurityOptions::EOption();
 
 switch ( eFact )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2013-01-10 Thread Libreoffice Gerrit user
 sfx2/source/appl/appuno.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4f6cd9a3dc5e83e7394dfb35161abb94699e59fb
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Thu Jan 10 10:52:18 2013 +0100

fdo#58328: fixed items types made versioning work again

Change-Id: Ib74f8f1a79ca04c42db9bd2c35ae6c4729edad69

diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 2e6ba66..fb16aad 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -130,8 +130,8 @@ SfxFormalArgument aFormalArgs[] = {
 SFX_ARGUMENT(SID_DEFAULTFILENAME,SuggestedSaveAsName,SfxStringItem),
 SFX_ARGUMENT(SID_DEFAULTFILEPATH,SuggestedSaveAsDir,SfxStringItem),
 SFX_ARGUMENT(SID_DOCINFO_AUTHOR,VersionAuthor,SfxStringItem),
-SFX_ARGUMENT(SID_DOCINFO_COMMENTS,VersionComment,SfxBoolItem),
-SFX_ARGUMENT(SID_DOCINFO_MAJOR,VersionMajor,SfxStringItem),
+SFX_ARGUMENT(SID_DOCINFO_COMMENTS,VersionComment,SfxStringItem),
+SFX_ARGUMENT(SID_DOCINFO_MAJOR,VersionMajor,SfxBoolItem),
 SFX_ARGUMENT(SID_FILE_FILTEROPTIONS,FilterOptions,SfxStringItem),
 SFX_ARGUMENT(SID_FILTER_NAME,FilterName,SfxStringItem),
 //SFX_ARGUMENT(SID_FILE_NAME,FileName,SfxStringItem),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2013-01-09 Thread Libreoffice Gerrit user
 sfx2/source/doc/templatedlg.cxx |3 ---
 sfx2/source/doc/templatedlg.hrc |1 -
 sfx2/source/doc/templatedlg.src |5 -
 3 files changed, 9 deletions(-)

New commits:
commit 52006aa4050a07fcc238f3cc9e1faa1ac95d08ec
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Wed Jan 9 14:22:23 2013 +0100

Template Manager: removed All category

Change-Id: I073b9601c82a464f705df30cfd7e760c212eb7ca

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 6b9a2c4..4c12338 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -254,9 +254,6 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg,ActivatePageHdl)
 case FILTER_DRAWS:
 eFilter = FILTER_APP_DRAW;
 break;
-default:
-case FILTER_ALL:
-;
 }
 mpCurView-filterTemplatesByApp(eFilter);
 return 0;
diff --git a/sfx2/source/doc/templatedlg.hrc b/sfx2/source/doc/templatedlg.hrc
index 02c6702..672575c 100644
--- a/sfx2/source/doc/templatedlg.hrc
+++ b/sfx2/source/doc/templatedlg.hrc
@@ -7,7 +7,6 @@
  */
 
 #define TAB_CONTROL 1
-#define FILTER_ALL  2
 #define FILTER_DOCS 3
 #define FILTER_PRESENTATIONS4
 #define FILTER_SHEETS   5
diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src
index 2480862..a351431 100644
--- a/sfx2/source/doc/templatedlg.src
+++ b/sfx2/source/doc/templatedlg.src
@@ -121,11 +121,6 @@ ModelessDialog DLG_TEMPLATE_MANAGER
 {
 PageItem
 {
-Identifier = FILTER_ALL;
-Text [ en-US ] = All;
-};
-PageItem
-{
 Identifier = FILTER_DOCS;
 Text [ en-US ] = Documents;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2013-01-09 Thread Libreoffice Gerrit user
 sfx2/source/control/templateabstractview.cxx |7 ++-
 sfx2/source/doc/templatedlg.cxx  |2 ++
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 1ce372eec4dd0e4e807baa7bbf568245b955f99f
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Wed Jan 9 15:18:17 2013 +0100

Template Manager: filter the results when opening the dialog

Change-Id: If6cc5f6d5e502c1fc5da210179263be63fc8c8a6

diff --git a/sfx2/source/control/templateabstractview.cxx 
b/sfx2/source/control/templateabstractview.cxx
index c9ea989..27d37a8 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -103,7 +103,7 @@ TemplateAbstractView::TemplateAbstractView (Window 
*pParent, WinBits nWinStyle,
 : ThumbnailView(pParent,nWinStyle,bDisableTransientChildren),
   mpItemView(new TemplateView(this)),
   mbFilteredResults(false),
-  meFilterOption(FILTER_APP_NONE)
+  meFilterOption(FILTER_APP_WRITER)
 {
 
mpItemView-setItemStateHdl(LINK(this,TemplateAbstractView,OverlayItemStateHdl));
 }
@@ -112,7 +112,7 @@ TemplateAbstractView::TemplateAbstractView(Window *pParent, 
const ResId rResId,
 : ThumbnailView(pParent,rResId,bDisableTransientChildren),
   mpItemView(new TemplateView(this)),
   mbFilteredResults(false),
-  meFilterOption(FILTER_APP_NONE)
+  meFilterOption(FILTER_APP_WRITER)
 {
 
mpItemView-setItemStateHdl(LINK(this,TemplateAbstractView,OverlayItemStateHdl));
 }
@@ -186,9 +186,6 @@ void TemplateAbstractView::showOverlay (bool bVisible)
 if (mbFilteredResults)
 {
 filterItems(ViewFilter_Application(meFilterOption));
-
-mbFilteredResults = false;
-meFilterOption = FILTER_APP_NONE;
 }
 
 mpItemView-Clear();
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 4c12338..9a50ba9 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -191,6 +191,8 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window 
*parent)
 maView-Populate();
 maView-Show();
 
+mpCurView-filterTemplatesByApp(FILTER_APP_WRITER);
+
 FreeResource();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2013-01-09 Thread Libreoffice Gerrit user
 sfx2/source/doc/templatedlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3c08052394409a9c8aac07557a343070235672e7
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Wed Jan 9 16:41:58 2013 +0100

Template Manager: delete popup menus in the proper order

Change-Id: Iafccfaa572b945d8d75d926ccc1935320b9d70d9

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 9a50ba9..11fddc2 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -210,9 +210,9 @@ SfxTemplateManagerDlg::~SfxTemplateManagerDlg ()
 delete mpSearchView;
 delete maView;
 delete mpOnlineView;
+delete mpTemplateDefaultMenu;
 delete mpActionMenu;
 delete mpRepositoryMenu;
-delete mpTemplateDefaultMenu;
 delete mpToolbars;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2013-01-08 Thread Libreoffice Gerrit user
 sfx2/source/control/thumbnailview.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 59555e5b38d62b92397d7f3eac5097211ed261c4
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Tue Jan 8 16:05:48 2013 +0100

Template Manager: unselect folder when double-clicking

Change-Id: I11ad88b3a69d3e2a00e859ee33cbc22c5d525618

diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index b9b0e89..618d7f2 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -513,7 +513,7 @@ void ThumbnailView::MouseButtonDown( const MouseEvent 
rMEvt )
 else if ( rMEvt.GetClicks() == 2 )
 {
 // The mouse button down event 1 click right before is 
pointless
-pItem-setSelection(!pItem-isSelected());
+pItem-setSelection(false);
 maItemStateHdl.Call(pItem);
 
 Rectangle aRect(pItem-getDrawArea());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2013-01-08 Thread Libreoffice Gerrit user
 sfx2/source/control/thumbnailview.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 49d7492e1dd89c52b798e5ac8ab01d4a0f771a35
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Tue Jan 8 16:18:24 2013 +0100

Template Manager: clicking on empty space deselect everything

Change-Id: I7cfbbd3a4f4283b9438a97eb383b460cad1f5a63

diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 618d7f2..61cb3f2 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -525,6 +525,8 @@ void ThumbnailView::MouseButtonDown( const MouseEvent 
rMEvt )
 
 return;
 }
+else if (!pItem)
+deselectItems( );
 }
 
 Control::MouseButtonDown( rMEvt );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2013-01-08 Thread Libreoffice Gerrit user
 sfx2/source/control/thumbnailview.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f10a3305473c83893a2c3062ce9fb8c9146fd1dc
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Tue Jan 8 16:45:20 2013 +0100

Template Manager: clicking on selected item should deselect it

Change-Id: Id13ce13ec222fc10cbfcad7fec5e7eeb5957312c

diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 61cb3f2..0e47fb7 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -503,7 +503,7 @@ void ThumbnailView::MouseButtonDown( const MouseEvent 
rMEvt )
 {
 if (!pItem-isSelected()  !rMEvt.IsMod1())
 deselectItems( );
-pItem-setSelection(!pItem-isSelected());
+pItem-setSelection(true);
 
 if (!pItem-isHighlighted())
 DrawItem(pItem);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2013-01-03 Thread Libreoffice Gerrit user
 sfx2/source/view/viewprn.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 446ac227bf3477ac3041d87bd0d880c3d61f4208
Author: Noel Power noel.po...@suse.com
Date:   Thu Jan 3 13:46:38 2013 +

fix fdo#58779 fdo#58403 re. raise print dialog

adds another tweak that had been removed with some print related rewrite

Change-Id: If63072c9b2c6158d46f26933fd54766fd808569c

diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 2b2f119..6a0a9fa 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -682,6 +682,13 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest rReq )
 if ( !bSilent  pDoc-QueryHiddenInformation( WhenPrinting, NULL 
) != RET_YES )
 return;
 
+// should we print only the selection or the whole document
+SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, 
sal_False);
+sal_Bool bSelection = ( pSelectItem != NULL  
pSelectItem-GetValue() );
+// detect non api call from writer ( that adds SID_SELECTION ) and 
reset bIsAPI
+if ( pSelectItem  rReq.GetArgs()-Count() == 1 )
+bIsAPI = sal_False;
+
 uno::Sequence  beans::PropertyValue  aProps;
 if ( bIsAPI )
 {
@@ -739,10 +746,6 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest rReq )
 // it would be better if writer handled this internally
 if( nId == SID_PRINTDOCDIRECT )
 {
-// should we print only the selection or the whole document
-SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, 
sal_False);
-sal_Bool bSelection = ( pSelectItem != NULL  
pSelectItem-GetValue() );
-
 aProps[nLen].Name = rtl::OUString( PrintSelectionOnly  );
 aProps[nLen].Value = makeAny( bSelection );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-12-20 Thread Libreoffice Gerrit user
 sfx2/source/view/viewprn.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6c336f4e07835f3f7969531f5fc69c6ac153920a
Author: Noel Power noel.po...@suse.com
Date:   Thu Dec 20 19:30:23 2012 +

fix fdo#58403 fix processing of arguments from .uno:Print request

Change-Id: I011c2ea45d33ead14910e149a99ee8e587ef79b9

diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 4902d90..a001557 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -653,7 +653,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest rReq )
 boolbSilent = false;
 
 // does the function have been called by the user interface or by an API 
call
-sal_Bool bIsAPI = rReq.IsAPI();
+sal_Bool bIsAPI = rReq.GetArgs()  rReq.GetArgs()-Count();
 if ( bIsAPI )
 {
 // the function have been called by the API
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-12-18 Thread Libreoffice Gerrit user
 sfx2/source/appl/appserv.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3b87d3dd507cd48286160e62383f48e2f70f0067
Author: Rob Snelders programm...@ertai.nl
Date:   Tue Dec 18 22:36:14 2012 +0100

fdo#58370 - 'Send Feedback...' URL invalid in other languages then English

Change-Id: Idfd689c86700fe3b6ec2af477973a2cb484fc29d
Reviewed-on: https://gerrit.libreoffice.org/1408
Reviewed-by: Kohei Yoshida kohei.yosh...@gmail.com
Tested-by: Kohei Yoshida kohei.yosh...@gmail.com

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index b190c52..fd224a5 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -477,8 +477,8 @@ void SfxApplication::MiscExec_Impl( SfxRequest rReq )
 case SID_SEND_FEEDBACK:
 {
 ::rtl::OUString module = SfxHelp::GetCurrentModuleIdentifier();
-::rtl::OUString 
sURL(http://hub.libreoffice.org/send-feedback/?version=; + 
utl::ConfigManager::getAboutBoxProductVersion() +
-locale= + utl::ConfigManager::getLocale() + 
module= + module.copy(module.lastIndexOf(.) + 1 )  );
+::rtl::OUString 
sURL(http://hub.libreoffice.org/send-feedback/?LOversion=; + 
utl::ConfigManager::getAboutBoxProductVersion() +
+LOlocale= + utl::ConfigManager::getLocale() + LOmodule= 
+ module.copy(module.lastIndexOf(.) + 1 )  );
 try
 {
 uno::Reference com::sun::star::system::XSystemShellExecute  
xSystemShellExecute(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-12-13 Thread Libreoffice Gerrit user
 sfx2/source/doc/templatedlg.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit af0a4a7a4efe19c88cf7cf567f49abe21a69df3d
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Thu Dec 13 16:07:29 2012 +0100

Template Manager: fixed typo in .src file

Change-Id: I27195076b6a0a8f48c676d884d671fc9a746ce6b

diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src
index a9a844c..2480862 100644
--- a/sfx2/source/doc/templatedlg.src
+++ b/sfx2/source/doc/templatedlg.src
@@ -107,7 +107,7 @@ ModelessDialog DLG_TEMPLATE_MANAGER
 SVLook = TRUE;
 Moveable = TRUE;
 Closeable = TRUE;
-Resizeable = TRUE;
+Sizeable = TRUE;
 Hide = TRUE;
 Size = MAP_APPFONT ( 290 , 250 );
 Text [en-US] = Template Manager;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-12-12 Thread Libreoffice Gerrit user
 sfx2/source/dialog/taskpane.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 8a4db529db50dca5df7b56f770fce2da7725fdda
Author: Rob Snelders programm...@ertai.nl
Date:   Mon Dec 3 22:49:37 2012 +0100

fdo#31309 Taskpane items visibility can't be restored

Change-Id: I9959b8e0a21252638a4f39f88bf5049ea905f4bb
Reviewed-on: https://gerrit.libreoffice.org/1231
Reviewed-by: Lennard Wasserthal wassert...@nefkom.net
Reviewed-by: Kohei Yoshida kohei.yosh...@gmail.com
Tested-by: Kohei Yoshida kohei.yosh...@gmail.com

diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index a92d27e..cdc6f22 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -958,15 +958,16 @@ namespace sfx2
 TaskPaneController_Impl::~TaskPaneController_Impl()
 {
 m_rTaskPane.GetPanelDeck().RemoveListener( *this );
+int i = 0;
 
 // remove the panels which are not under the control of the panel deck 
currently
 for (   PanelDescriptors::iterator panelPos = 
m_aPanelRepository.begin();
 panelPos != m_aPanelRepository.end();
-++panelPos
+++panelPos, ++i
 )
 {
 if ( panelPos-bHidden )
-panelPos-pPanel-Dispose();
+impl_togglePanelVisibility( i );
 }
 m_aPanelRepository.clear();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-12-07 Thread Libreoffice Gerrit user
 sfx2/source/doc/doctemplates.cxx |5 ++---
 sfx2/source/doc/guisaveas.cxx|2 +-
 sfx2/source/doc/objcont.cxx  |2 +-
 sfx2/source/doc/objstor.cxx  |3 ---
 4 files changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 6a7371d266b7050a9c07b3abce84ef23904525ac
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Dec 7 09:47:37 2012 +

loplugin: various unused variables

Change-Id: I59cfea1b755fb4da5cdc9032e719e4e1579a906e

diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 1313fee..49e71cd 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -444,7 +444,7 @@ void SfxDocTplService_Impl::init_Impl()
 m_xDocProps.set(document::DocumentProperties::create(
 ::comphelper::getProcessComponentContext()));
 } catch (uno::RuntimeException const e) {
-SAL_WARN(sfx.doc, SfxDocTplService_Impl::init_Impl: 
+SAL_WARN(sfx2.doc, SfxDocTplService_Impl::init_Impl: 
 cannot create DocumentProperties service:  e.Message);
 }
 
@@ -1903,7 +1903,6 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const 
OUString rGroupName,
 aStoreArgs[1].Name = ::rtl::OUString(DocumentTitle);
 aStoreArgs[1].Value = rTemplateName;
 
-::rtl::OUString aCurrentDocumentURL = rStorable-getLocation();
 if( !::utl::UCBContentHelper::EqualURLs( aNewTemplateTargetURL, 
rStorable-getLocation() ))
 rStorable-storeToURL( aNewTemplateTargetURL, aStoreArgs );
 else
@@ -1987,7 +1986,7 @@ sal_Bool SfxDocTplService_Impl::addTemplate( const 
OUString rGroupName,
 }
 
 // Get the content type
-OUString aTitle, aType, aTargetURL2, aFullName;
+OUString aTitle, aType, aTargetURL2;
 
 sal_Bool bDocHasTitle = sal_False;
 if( !getTitleFromURL( rSourceURL, aTitle, aType, bDocHasTitle ) )
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index c6af316..6c5f2e2 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1734,7 +1734,7 @@ void SfxStoringHelper::SetDocInfoState(
 }
 catch (const uno::Exception e)
 {
-SAL_INFO(sfx.doc, SetDocInfoState: caught exception:   
e.Message);
+SAL_INFO(sfx2.doc, SetDocInfoState: caught exception:   
e.Message);
 }
 
 // set the modified flag back if required
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index c532a31..118851e 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -907,7 +907,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl(  )
 }
 catch (const Exception e)
 {
-SAL_INFO(sfx.doc, caught exception  e.Message);
+SAL_INFO(sfx2.doc, caught exception  e.Message);
 }
 
 // if modify date was read successfully
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 88380bb..887be25 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1469,7 +1469,6 @@ sal_Bool SfxObjectShell::SaveTo_Impl
 aInfo.Comment = pVersionItem-GetValue();
 
 // version author
-String aAuthor;
 if ( pAuthorItem )
 aInfo.Author = pAuthorItem-GetValue();
 else
@@ -2133,7 +2132,6 @@ sal_Bool SfxObjectShell::ConvertFrom
 
 sal_Bool SfxObjectShell::ImportFrom( SfxMedium rMedium, bool bInsert )
 {
-::rtl::OUString aTypeName( rMedium.GetFilter()-GetTypeName() );
 ::rtl::OUString aFilterName( rMedium.GetFilter()-GetFilterName() );
 
 uno::Reference lang::XMultiServiceFactory   xMan = 
::comphelper::getProcessServiceFactory();
@@ -2244,7 +2242,6 @@ sal_Bool SfxObjectShell::ImportFrom( SfxMedium rMedium, 
bool bInsert )
 
 sal_Bool SfxObjectShell::ExportTo( SfxMedium rMedium )
 {
-::rtl::OUString aTypeName( rMedium.GetFilter()-GetTypeName() );
 ::rtl::OUString aFilterName( rMedium.GetFilter()-GetFilterName() );
 uno::Reference document::XExporter  xExporter;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-12-05 Thread Libreoffice Gerrit user
 sfx2/source/control/templateabstractview.cxx |   29 ---
 1 file changed, 26 insertions(+), 3 deletions(-)

New commits:
commit e2a35977ca056d7bf1dae3a9c41ae135a85892fd
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Wed Dec 5 18:40:16 2012 +0100

Template manager: keep thumbnails ratio when scaling down

Change-Id: Ic597dd9fd12895c0d21f678cba44feba9f6fcd47

diff --git a/sfx2/source/control/templateabstractview.cxx 
b/sfx2/source/control/templateabstractview.cxx
index 8cbf60f..0baed64 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -137,10 +137,33 @@ BitmapEx TemplateAbstractView::scaleImg (const BitmapEx 
rImg, long width, long
 {
 BitmapEx aImg = rImg;
 
-int sWidth = std::min(aImg.GetSizePixel().getWidth(),width);
-int sHeight = std::min(aImg.GetSizePixel().getHeight(),height);
+if ( !rImg.IsEmpty() )
+{
+
+const Size aImgSize = aImg.GetSizePixel();
+double nRatio = double(aImgSize.getWidth()) / 
double(aImgSize.getHeight());
+
+long nDestWidth = aImgSize.getWidth();
+long nDestHeight = aImgSize.getHeight();
+
+// Which one side is the overflowing most?
+long nDistW = aImgSize.getWidth() - width;
+long nDistH = aImgSize.getHeight() - height;
+
+// Use the biggest overflow side to make it fit the destination
+if ( nDistW = nDistH  nDistW  0 )
+{
+nDestWidth = width;
+nDestHeight = width / nRatio;
+}
+else if ( nDistW  nDistH  nDistH  0 )
+{
+nDestHeight = height;
+nDestWidth = height * nRatio;
+}
 
-aImg.Scale(Size(sWidth,sHeight),BMP_SCALE_INTERPOLATE);
+aImg.Scale(Size(nDestWidth,nDestHeight));
+}
 
 return aImg;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-12-03 Thread Libreoffice Gerrit user
 sfx2/source/doc/doctemplates.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit d43d756500114738ac845c6e24cba8c897ed659d
Author: Tor Lillqvist tlillqv...@suse.com
Date:   Mon Dec 3 15:07:18 2012 +0200

WaE: BaseReference::_pInterface may be used uninitialized in this function

Change-Id: I061dc4ee8c8fb5b369e3ed78f0fba136ef8b02d0

diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index a724dea..1313fee 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -1857,7 +1857,9 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const 
OUString rGroupName,
 throw uno::RuntimeException();
 
 // find the mediatype and extension
-uno::Reference container::XNameAccess  xTypeDetection =
+uno::Reference container::XNameAccess  xTypeDetection;
+
+xTypeDetection =
 mxType.is() ?
 uno::Reference container::XNameAccess ( mxType, 
uno::UNO_QUERY_THROW ) :
 uno::Reference container::XNameAccess (
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-11-28 Thread Libreoffice Gerrit user
 sfx2/source/appl/appserv.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7226672d4b894192d5312885c1c13a6394c27187
Author: Rob Snelders programm...@ertai.nl
Date:   Wed Nov 28 18:35:45 2012 +0100

rename the URL for feedback to something more positive

Change-Id: Iea248eeb3c3eacf9b0f123daa52516f5c1f0259c

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 269dcbf..744a0ef 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -424,7 +424,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest rReq )
 case SID_SEND_FEEDBACK:
 {
 ::rtl::OUString module = SfxHelp::GetCurrentModuleIdentifier();
-::rtl::OUString 
sURL(http://hub.libreoffice.org/file-a-bug/?version=; + 
utl::ConfigManager::getAboutBoxProductVersion() +
+::rtl::OUString 
sURL(http://hub.libreoffice.org/send-feedback/?version=; + 
utl::ConfigManager::getAboutBoxProductVersion() +
 locale= + utl::ConfigManager::getLocale() + 
module= + module.copy(module.lastIndexOf(.) + 1 )  );
 try
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-11-23 Thread Libreoffice Gerrit user
 sfx2/source/appl/appserv.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 80086a82883239cad5a6e667c8ff174623e190a2
Author: Rob Snelders programm...@ertai.nl
Date:   Fri Nov 23 22:58:34 2012 +0100

Get more information to the BSA from the send feedback-menuitem

Change-Id: I77b3afa52bd5cc25a6385cbdb480a30e7aef387c

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 3e0a297..269dcbf 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -423,7 +423,9 @@ void SfxApplication::MiscExec_Impl( SfxRequest rReq )
 
 case SID_SEND_FEEDBACK:
 {
-::rtl::OUString sURL(http://hub.libreoffice.org/file-a-bug/;);
+::rtl::OUString module = SfxHelp::GetCurrentModuleIdentifier();
+::rtl::OUString 
sURL(http://hub.libreoffice.org/file-a-bug/?version=; + 
utl::ConfigManager::getAboutBoxProductVersion() +
+locale= + utl::ConfigManager::getLocale() + 
module= + module.copy(module.lastIndexOf(.) + 1 )  );
 try
 {
 uno::Reference com::sun::star::system::XSystemShellExecute  
xSystemShellExecute(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-11-16 Thread Libreoffice Gerrit user
 sfx2/source/appl/linkmgr2.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 21675d2d49be13ba48d4fb444b618944a454bd9c
Author: Eike Rathke er...@redhat.com
Date:   Sat Nov 17 00:39:07 2012 +0100

use LanguageTag

Change-Id: Ie060f2357a17be818d34c9393ac4ac606331d081

diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 9564a18..4f8a7a2 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -34,7 +34,7 @@
 #include svl/eitem.hxx
 #include svl/intitem.hxx
 #include unotools/localfilehelper.hxx
-#include i18npool/mslangid.hxx
+#include i18npool/languagetag.hxx
 #include sfx2/request.hxx
 
 #include fileobj.hxx
@@ -608,8 +608,7 @@ sal_Bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
 {
 // first only loop over the DocumentShells the shells and find those
 // with the name:
-com::sun::star::lang::Locale aLocale;
-MsLangId::convertLanguageToLocale( LANGUAGE_SYSTEM, aLocale );
+com::sun::star::lang::Locale aLocale( LanguageTag( 
LANGUAGE_SYSTEM).getLocale());
 CharClass aCC( aLocale );
 
 TypeId aType( TYPE(SfxObjectShell) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-11-11 Thread Libreoffice Gerrit user
 sfx2/source/doc/templatedlg.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1d4e242b9edd30e38794d22972c3f5527a5340db
Author: Stefan Knorr heinzless...@gmail.com
Date:   Sun Nov 11 20:02:45 2012 +0100

Correct typo in new template dialog: Spreedsheet - Spreadsheet

Change-Id: If0dc7cf7694a2e11839d033b98603263f7600896
Reviewed-on: https://gerrit.libreoffice.org/1039
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src
index 4098472..c81c507 100644
--- a/sfx2/source/doc/templatedlg.src
+++ b/sfx2/source/doc/templatedlg.src
@@ -140,7 +140,7 @@ ModelessDialog DLG_TEMPLATE_MANAGER
 Pos = MAP_APPFONT(160,5);
 Size = MAP_APPFONT(50,14);
 TabStop = TRUE;
-Text [en-US] = Spreedsheets;
+Text [en-US] = Spreadsheets;
 };
 
 PushButton BTN_SELECT_DRAWS
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-11-08 Thread Libreoffice Gerrit user
 sfx2/source/bastyp/fltfnc.cxx   |1 -
 sfx2/source/control/dispatch.cxx|2 --
 sfx2/source/dialog/dinfdlg.cxx  |5 -
 sfx2/source/dialog/securitypage.cxx |5 -
 4 files changed, 13 deletions(-)

New commits:
commit a599f5b4b51848e3b397d471c9d12b373caadcef
Author: jailletc36 christophe.jail...@wanadoo.fr
Date:   Thu Nov 8 07:25:02 2012 +0100

cppCheck: Unused variable and Redundant assignment

Change-Id: I67084c1cb9dc23eb77787d2a6d57a5b70126873c
Signed-off-by: jailletc36 christophe.jail...@wanadoo.fr
Reviewed-on: https://gerrit.libreoffice.org/1005
Reviewed-by: Radek Doulík r...@novell.com
Tested-by: Radek Doulík r...@novell.com

diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 14df8c4..60de316 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -1147,7 +1147,6 @@ void SfxFilterContainer::ReadFilters_Impl( sal_Bool 
bUpdate )
 SfxFilter* pFilter;
 for ( size_t i = 0, n = rList.size(); i  n; ++i )
 {
-pFilter = NULL;
 pFilter = rList[ i ];
 pFilter-nFormatType |= SFX_FILTER_NOTINSTALLED;
 }
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 069273e..935077c 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -2073,7 +2073,6 @@ SfxPopupMenuManager* SfxDispatcher::Popup( sal_uInt16 
nConfigId,Window *pWin, co
 SfxDispatcher rDisp = *SFX_APP()-GetDispatcher_Impl();
 sal_uInt16 nShLevel = 0;
 SfxShell *pSh;
-nShLevel=0;
 
 if ( rDisp.pImp-bQuiet )
 {
@@ -2101,7 +2100,6 @@ void SfxDispatcher::ExecutePopup( sal_uInt16 nConfigId, 
Window *pWin, const Poin
 sal_uInt16 nShLevel = 0;
 SfxShell *pSh;
 
-nShLevel=0;
 if ( rDisp.pImp-bQuiet )
 {
 nConfigId = 0;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index ee59b5e..99d7dbf 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2321,11 +2321,6 @@ CustomPropertiesControl::CustomPropertiesControl( 
Window* pParent, const ResId
 m_aVertScroll.SetPageSize( nVisibleEntries - 1 );
 m_aVertScroll.SetVisibleSize( nVisibleEntries );
 
-Point aPos = m_aHeaderBar.GetPosPixel();
-Size aSize = m_aHeaderBar.GetSizePixel();
-aPos = m_aVertScroll.GetPosPixel();
-aSize = m_aVertScroll.GetSizePixel();
-
 Link aScrollLink = LINK( this, CustomPropertiesControl, ScrollHdl );
 m_aVertScroll.SetScrollHdl( aScrollLink );
 }
diff --git a/sfx2/source/dialog/securitypage.cxx 
b/sfx2/source/dialog/securitypage.cxx
index ffa3a7a..b4de6af 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -200,11 +200,6 @@ SfxSecurityPage_Impl::SfxSecurityPage_Impl( 
SfxSecurityPage rTabPage, const Sfx
 m_bEndRedliningWarningDone  ( false )
 {
 m_aChangeProtectionPB.SetText( m_aProtectSTR );
-// adjust button width if necessary
-long nBtnTextWidth = 0;
-long nTemp = m_aChangeProtectionPB.GetCtrlTextWidth( 
m_aChangeProtectionPB.GetText() );
-if (nTemp  nBtnTextWidth)
-nBtnTextWidth = nTemp;
 
 // force toggle hdl called before visual change of checkbox
 m_aRecordChangesCB.SetStyle( m_aRecordChangesCB.GetStyle() | 
WB_EARLYTOGGLE );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source ucb/source

2012-11-05 Thread Libreoffice Gerrit user
 sfx2/source/appl/app.hrc |1 
 sfx2/source/appl/app.src |7 +
 sfx2/source/doc/objserv.cxx  |5 +++-
 ucb/source/ucp/cmis/cmis_content.cxx |   41 +--
 4 files changed, 33 insertions(+), 21 deletions(-)

New commits:
commit bce042ca83c7cb5cc3e3bdc07c50b60e6a1ed659
Author: Cédric Bosdonnat cedric.bosdon...@free.fr
Date:   Sat Nov 3 14:55:19 2012 +0100

CMIS: added confirmation dialog for cancel checkout

Change-Id: I12317bd8c91756c7960f04d2fad38dd509840932

diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index 5cbfd7f..fb322cb 100644
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/app.hrc
@@ -112,6 +112,7 @@
 
 #define RID_XMLSEC_QUERY_LOSINGSIGNATURE(RID_SFX_APP_START + 186)
 #define RID_XMLSEC_QUERY_SAVEBEFORESIGN (RID_SFX_APP_START + 187)
+#define RID_QUERY_CANCELCHECKOUT(RID_SFX_APP_START + 188)
 
 #define RID_XMLSEC_INFO_WRONGDOCFORMAT  (RID_SFX_APP_START + 190)
 
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index 6eae48d..d1dcccd 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -432,6 +432,13 @@ QueryBox RID_XMLSEC_QUERY_SAVEBEFORESIGN
 Message [ en-US ] = The document has to be saved before it can be 
signed.\nDo you want to save the document? ;
 };
 
+QueryBox RID_QUERY_CANCELCHECKOUT
+{
+Buttons = WB_YES_NO ;
+DefButton = WB_DEF_YES ;
+Message [ en-US ] = This will discard all changes on the server since 
check-out.\nDo you want to proceed? ;
+};
+
 InfoBox RID_XMLSEC_INFO_WRONGDOCFORMAT
 {
 Message [ en-US ] = This document must be saved in OpenDocument file 
format before it can be digitally signed. ;
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 116f976..490a72b 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -951,7 +951,10 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest rReq)
 }
 case SID_CANCELCHECKOUT:
 {
-CancelCheckOut( );
+if (  QueryBox( NULL, SfxResId( RID_QUERY_CANCELCHECKOUT ) 
).Execute( ) == RET_YES )
+{
+CancelCheckOut( );
+}
 break;
 }
 case SID_CHECKIN:
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 0c6ba36..83551b2 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -837,9 +837,9 @@ namespace cmis
 
 // Get the Original document (latest version)
 vector libcmis::DocumentPtr  aVersions = pPwc-getAllVersions( );
-libcmis::DocumentPtr pDoc;
+bool bFound = false;
 for ( vector libcmis::DocumentPtr ::iterator it = 
aVersions.begin();
-it != aVersions.end( )  pDoc != NULL; ++it )
+it != aVersions.end( )  !bFound; ++it )
 {
 libcmis::DocumentPtr pVersion = *it;
 map string, libcmis::PropertyPtr  aProps = 
pVersion-getProperties( );
@@ -851,25 +851,26 @@ namespace cmis
 }
 
 if ( bIsLatestVersion )
-pDoc.reset( pVersion.get( ) );
-}
-
-// Compute the URL of the Document
-URL aCmisUrl( m_sURL );
-vector string  aPaths = pDoc-getPaths( );
-if ( !aPaths.empty() )
-{
-string sPath = aPaths.front( );
-aCmisUrl.setObjectPath( STD_TO_OUSTR( sPath ) );
-}
-else
-{
-// We may have unfiled doc depending on the server, those
-// won't have any path, use their ID instead
-string sId = pDoc-getId( );
-aCmisUrl.setObjectId( STD_TO_OUSTR( sId ) );
+{
+bFound = true;
+// Compute the URL of the Document
+URL aCmisUrl( m_sURL );
+vector string  aPaths = pVersion-getPaths( );
+if ( !aPaths.empty() )
+{
+string sPath = aPaths.front( );
+aCmisUrl.setObjectPath( STD_TO_OUSTR( sPath ) );
+}
+else
+{
+// We may have unfiled doc depending on the server, 
those
+// won't have any path, use their ID instead
+string sId = pVersion-getId( );
+aCmisUrl.setObjectId( STD_TO_OUSTR( sId ) );
+}
+aRet = aCmisUrl.asString( );
+}
 }
-aRet = aCmisUrl.asString( );
 }
 catch ( const libcmis::Exception e )
 {
___
Libreoffice-commits mailing list

[Libreoffice-commits] .: sfx2/source

2012-10-30 Thread Libreoffice Gerrit user
 sfx2/source/dialog/tabdlg.cxx |   17 ++---
 1 file changed, 6 insertions(+), 11 deletions(-)

New commits:
commit bd2c14ec78a7549d4a19738154cdd5ea890f61c4
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Oct 30 12:00:01 2012 +

we have to have all tabpages in all modes now

Change-Id: I05a587d4b0556cb9eda49583441b3f57d923a800

diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index b137cee..eda2375 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -727,19 +727,14 @@ sal_Bool SfxTabDialog::IsApplyButtonEnabled() const
 
 void SfxTabDialog::Start_Impl()
 {
-//If we're layout enabled, we need to force all tabs to
-//exist to get overall optimal size for dialog
-if (isLayoutEnabled())
+//We need to force all tabs to exist to get overall optimal size for dialog
+for (sal_uInt16 n=0; n  m_pTabCtrl-GetPageCount(); ++n)
 {
-for ( sal_uInt16 n=0; n  m_pTabCtrl-GetPageCount(); ++n)
+sal_uInt16 nPageId = m_pTabCtrl-GetPageId(n);
+if (!m_pTabCtrl-GetTabPage(nPageId))
 {
-sal_uInt16 nPageId = m_pTabCtrl-GetPageId(n);
-TabPage* pTabPage = m_pTabCtrl-GetTabPage(nPageId);
-if (!pTabPage)
-{
-m_pTabCtrl-SetCurPageId(nPageId);
-ActivatePageHdl(m_pTabCtrl);
-}
+m_pTabCtrl-SetCurPageId(nPageId);
+ActivatePageHdl(m_pTabCtrl);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-10-14 Thread Libreoffice Gerrit user
 sfx2/source/view/viewsh.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 22a550690bc7643ba1157543e15907ebba9444a0
Author: Caolán McNamara caol...@redhat.com
Date:   Sun Oct 14 14:33:21 2012 +0100

Related: fdo#47250 catch harder

Change-Id: Ie6b26670a6809fc07b344660111be44cb3e6a011

diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index c61e300..f6c2eb5 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -2050,7 +2050,7 @@ sal_Bool SfxViewShell::TryContextMenuInterception( Menu 
rIn, const ::rtl::OUStr
 continue;
 }
 }
-catch (const uno::RuntimeException)
+catch (...)
 {
 aIt.remove();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-10-12 Thread Libreoffice Gerrit user
 sfx2/source/doc/templatedlg.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 581438a0c609c957e2db0b262b3bea83fa387eac
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Oct 12 13:03:42 2012 +0100

lcl_createTemplate declared but not defined

Change-Id: I755853c326c5e3dbeae18e3fdb9f7b5607aac874

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index c79c779..ca5e0b3 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -64,8 +64,6 @@ using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::ui::dialogs;
 
-static void lcl_createTemplate(uno::ReferenceXComponentLoader xDesktop, 
const FILTER_APPLICATION eApp);
-
 static bool lcl_getServiceName (const OUString rFileURL, OUString rName );
 
 static std::vectorOUString lcl_getAllFactoryURLs ();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-10-09 Thread Libreoffice Gerrit user
 sfx2/source/dialog/tabdlg.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit bf59cceafd05dba74e4fc3a3f5fdc8098bb1a95b
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Oct 9 22:02:44 2012 +0100

fix blank dialogs: now need to explicitly call show on containers

Change-Id: I803f808e7049777ec5a46dc2fce00a3943321ffa

diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 5d883c7..b137cee 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -592,6 +592,8 @@ void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const 
String* pUserButtonText,
 LINK( this, SfxTabDialog, ActivatePageHdl ) );
 m_pTabCtrl-SetDeactivatePageHdl(
 LINK( this, SfxTabDialog, DeactivatePageHdl ) );
+m_pActionArea-Show();
+m_pVBox-Show();
 m_pTabCtrl-Show();
 m_pOKBtn-Show();
 m_pCancelBtn-Show();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-10-07 Thread Libreoffice Gerrit user
 sfx2/source/appl/app.cxx |   33 -
 sfx2/source/appl/appserv.cxx |7 ++-
 2 files changed, 30 insertions(+), 10 deletions(-)

New commits:
commit 5c02bb0f022ae6f51ccc07452901ad45a9a243e9
Author: Tor Lillqvist t...@iki.fi
Date:   Sun Oct 7 11:50:10 2012 +0300

DISABLE_DYNLOADING fixes and minor cleanup

Change-Id: I08ce3523f259b1ace7c2a1a58b091b43a44a7d92

diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 3aa48ab..a4ffed8 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -468,17 +468,22 @@ void SfxApplication::Invalidate( sal_uInt16 nId )
 Invalidate_Impl( pFrame-GetBindings(), nId );
 }
 
-#define DOSTRING( x )   #x
-#define STRING( x ) DOSTRING( x )
-
 #ifndef DISABLE_SCRIPTING
 
+#ifndef DISABLE_DYNLOADING
+
 typedef long (SAL_CALL *basicide_handle_basic_error)(void*);
-typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(void*, sal_Bool, 
rtl_uString*);
 typedef void* (SAL_CALL *basicide_macro_organizer)(sal_Int16);
 
 extern C { static void SAL_CALL thisModule() {} }
 
+#else
+
+extern C long basicide_handle_basic_error(void*);
+extern C void *basicide_macro_organizer(sal_Int16);
+
+#endif
+
 #endif
 
 IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic )
@@ -487,6 +492,8 @@ IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, 
StarBASIC*, pStarBasic )
 (void) pStarBasic;
 return 0;
 #else
+
+#ifndef DISABLE_DYNLOADING
 // get basctl dllname
 static ::rtl::OUString aLibName( SVLIBRARY( basctl  ) );
 
@@ -501,7 +508,14 @@ IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, 
StarBASIC*, pStarBasic )
 // call basicide_handle_basic_error in basctl
 long nRet = pSymbol ? pSymbol( pStarBasic ) : 0;
 
+#else
+
+long nRet = basicide_handle_basic_error( pStarBasic );
+
+#endif
+
 return nRet;
+
 #endif
 }
 
@@ -586,6 +600,8 @@ void SfxApplication::MacroOrganizer( sal_Int16 nTabId )
 #ifdef DISABLE_SCRIPTING
 (void) nTabId;
 #else
+
+#ifndef DISABLE_DYNLOADING
 // get basctl dllname
 static ::rtl::OUString aLibName( SVLIBRARY( basctl  ) );
 
@@ -597,8 +613,15 @@ void SfxApplication::MacroOrganizer( sal_Int16 nTabId )
 ::rtl::OUString aSymbol( basicide_macro_organizer  );
 basicide_macro_organizer pSymbol = (basicide_macro_organizer) 
osl_getFunctionSymbol( handleMod, aSymbol.pData );
 
-// call basicide_choose_macro in basctl
+// call basicide_macro_organizer in basctl
 pSymbol( nTabId );
+
+#else
+
+basicide_macro_organizer( nTabId );
+
+#endif
+
 #endif
 }
 
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 08d0352..450da3e 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -836,14 +836,11 @@ void SfxApplication::MiscState_Impl(SfxItemSet rSet)
 
 #ifndef DISABLE_SCRIPTING
 
+#ifndef DISABLE_DYNLOADING
+
 typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(XModel*, sal_Bool, 
rtl_uString*);
 typedef void (SAL_CALL *basicide_macro_organizer)( sal_Int16 );
 
-#define DOSTRING( x )   #x
-#define STRING( x ) DOSTRING( x )
-
-#ifndef DISABLE_DYNLOADING
-
 extern C { static void SAL_CALL thisModule() {} }
 
 #else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-10-07 Thread Libreoffice Gerrit user
 sfx2/source/doc/docfile.cxx  |1 +
 sfx2/source/doc/doctemplates.cxx |3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1f79b55bcabe2a627573e711a04d413d478c5882
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Oct 7 17:09:36 2012 +0200

Some cppcheck cleaning

Change-Id: I9ce4af18d1cdbf694093309a026fd6c738590b82

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 9c199ad..995be9c 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -325,6 +325,7 @@ SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP ) :
 bIsStorage( false ),
 bUseInteractionHandler( true ),
 bAllowDefaultIntHdl( false ),
+bDisposeStorage( false ),
 bStorageBasedOnInStream( false ),
 m_bSalvageMode( false ),
 m_bVersionsAlreadyLoaded( false ),
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 76a4f5d..e1f1986 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -618,12 +618,11 @@ void SfxDocTplService_Impl::getDirList()
 sal_Bool SfxDocTplService_Impl::needsUpdate()
 {
 OUString aPropName( PROPERTY_NEEDSUPDATE  );
-sal_Bool bHasProperty = sal_False;
 sal_Bool bNeedsUpdate = sal_True;
 Any  aValue;
 
 // Get the template dir list
-bHasProperty = getProperty( maRootContent, aPropName, aValue );
+sal_Bool bHasProperty = getProperty( maRootContent, aPropName, aValue );
 
 if ( bHasProperty )
 aValue = bNeedsUpdate;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source unotools/inc unotools/source

2012-10-05 Thread Libreoffice Gerrit user
 sfx2/source/appl/childwin.cxx  |2 -
 unotools/inc/unotools/viewoptions.hxx  |7 +
 unotools/source/config/viewoptions.cxx |   40 +++--
 3 files changed, 41 insertions(+), 8 deletions(-)

New commits:
commit 9db74c6133ede2a28af077fd563398176ff0d858
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Oct 5 15:00:39 2012 +0200

fdo#46071: Do not hide windows based on nil Visible property

This appears to be messy:  The /org.openoffice.Office.Views/WindowType
configuration group template has both a nilable bool Visible property and 
a
UserData/Data string property that encodes various things like 
geometry---but
also visibility---in a string.

Now, likely due to the problem that has meanwhile been fixed through
f3f79cc9e6c265baf48955d53f7e888205e0b3e0 Resolves fdo#46074: Fix
Partial::contains for paths that go past a leaf node, some
registrymodification.xcu files in the wild contain such WindowType entries 
in
default state, without a UserData/Data string and with a nil Visible
property.

The way SfxChildWindow::InitializeChildWinFactory_Impl and
SvtViewOptions::IsVisible are implemented, they will always lead to an 
invisible
window for such broken registrymodification.xcu data (as IsVisible 
unhelpfully
returns false for a nil value, and InitializeChildWinFactory_Impl uses that
value when there is no UserData/Data string).

For the Math formula editor window (ID 30378) this means that it can 
disappear
from the UI completely, as there appears to be no UI trigger for the user to
show it in case it is hidden.

The fix is to introdue SvtViewOptions::HasVisible (which only returns true 
if
the property is not nil) and change InitializeChidlWinFactory_Impl to only 
use
the value of IsVisible() if HasVisible() returns true.  This makes the code 
even
more baroque, but this is a rather central, generic piece of code for all 
sorts
of windows, so I do not want to break any other uses by e.g. changing 
IsVisible
to return true for a nil property.

Change-Id: Iae40075a7116a8aabd2d25aa9334709522e23d8f

diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 18038da..e1e24be 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -352,7 +352,7 @@ void SfxChildWindow::InitializeChildWinFactory_Impl( 
sal_uInt16 nId, SfxChildWin
 // load configuration
 SvtViewOptions aWinOpt( E_WINDOW, String::CreateFromInt32( nId ) );
 
-if ( aWinOpt.Exists() )
+if ( aWinOpt.Exists()  aWinOpt.HasVisible() )
 rInfo.bVisible  = aWinOpt.IsVisible(); // set state from 
configuration. Can be overwritten by UserData, see below
 
 ::com::sun::star::uno::Sequence  ::com::sun::star::beans::NamedValue  
aSeq = aWinOpt.GetUserData();
diff --git a/unotools/inc/unotools/viewoptions.hxx 
b/unotools/inc/unotools/viewoptions.hxx
index 2dbfdd4..8270ed9 100644
--- a/unotools/inc/unotools/viewoptions.hxx
+++ b/unotools/inc/unotools/viewoptions.hxx
@@ -225,6 +225,13 @@ class UNOTOOLS_DLLPUBLIC SvtViewOptions: public 
utl::detail::Options
 sal_Bool IsVisible ( ) const;
 void SetVisible( sal_Bool bState );
 
+/** Return true if the Visible property actually has a non-nil value
+
+(IsVisible will somewhat arbitrarily return false if the property 
is
+nil.)
+*/
+bool HasVisible() const;
+
 
/*-//**
 @short  use it to set/get the extended user data (consisting 
of a set of named scalar values)
 @descr  It's supported for ALL types!
diff --git a/unotools/source/config/viewoptions.cxx 
b/unotools/source/config/viewoptions.cxx
index faf5937..2b4ffbc 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -266,6 +266,8 @@ class SvtViewOptionsBase_Impl
 {
 
//-
 public:
+enum State { STATE_NONE, STATE_FALSE, STATE_TRUE };
+
 
SvtViewOptionsBase_Impl ( const ::rtl::OUString
sList);
 virtual
~SvtViewOptionsBase_Impl (  
  );
 sal_BoolExists 
 ( const ::rtl::OUStringsName);
@@ -279,7 +281,7 @@ class SvtViewOptionsBase_Impl
 sal_Int32   GetPageID  
 ( const ::rtl::OUStringsName);
 voidSetPageID  

[Libreoffice-commits] .: sfx2/source

2012-10-03 Thread Libreoffice Gerrit user
 sfx2/source/doc/doctemplates.cxx |4 
 sfx2/source/doc/docvor.cxx   |   16 
 2 files changed, 8 insertions(+), 12 deletions(-)

New commits:
commit 02394b10d348aeabcbaceaa7659794a6b74a3768
Author: Cédric Bosdonnat cedric.bosdonnat@free.fr
Date:   Wed Oct 3 15:38:54 2012 +0200

n#782597: Allow adding external templates

Change-Id: I56d5a716795b7303a77194964a612c550f25eeec

diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 25ed459..281e1c7 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -678,8 +678,6 @@ sal_Bool SfxDocTplService_Impl::getTitleFromURL( const 
OUString rURL, OUString
 }
 catch ( Exception )
 {
-// the document is not a StarOffice document
-return sal_False;
 }
 
 try
@@ -2014,7 +2012,6 @@ sal_Bool SfxDocTplService_Impl::addTemplate( const 
OUString rGroupName,
 // Get the content type
 OUString aTitle, aType, aTargetURL2, aFullName;
 
-// only StarOffice documents are acceptable
 sal_Bool bDocHasTitle = sal_False;
 if( !getTitleFromURL( rSourceURL, aTitle, aType, bDocHasTitle ) )
 return sal_False;
@@ -2573,7 +2570,6 @@ void SfxDocTplService_Impl::addFsysGroup( GroupList_Impl 
rList,
 if ( aChildTitle.compareToAscii( sfx.tlx ) == 0 || 
aChildTitle == groupuinames.xml )
 continue;
 
-// only StarOffice templates are accepted
 sal_Bool bDocHasTitle = sal_False;
 if( !getTitleFromURL( aTargetURL, aChildTitle, aType, 
bDocHasTitle ) )
 continue;
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index cf016f3..2c28cd3 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -1548,7 +1548,7 @@ String SfxOrganizeDlg_Impl::GetPath_Impl( sal_Bool bOpen, 
const String rFileNam
 pFileDlg-SetDisplayDirectory( aObj.GetMainURL( 
INetURLObject::NO_DECODE ) );
 }
 
-pFileDlg-StartExecuteModal( LINK( this, SfxOrganizeDlg_Impl, ImportHdl ) 
);
+pFileDlg-StartExecuteModal( LINK( this, SfxOrganizeDlg_Impl, ExportHdl ) 
);
 
 return aPath;
 }
@@ -1592,18 +1592,18 @@ String SfxOrganizeDlg_Impl::GetPath_Impl( sal_Bool 
bOpen, const String rFileNam
 // add filters of modules which are installed
 SvtModuleOptions aModuleOpt;
 if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) )
-sFilterExt += DEFINE_CONST_UNICODE( *.ott;*.stw;*.oth );
+sFilterExt += DEFINE_CONST_UNICODE( 
*.ott;*.stw;*.oth;*.dot;*.dotm;*.dotx );
 if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SCALC ) )
 {
 if ( sFilterExt.Len()  0 )
 sFilterExt += ';';
-sFilterExt += DEFINE_CONST_UNICODE( *.ots;*.stc );
+sFilterExt += DEFINE_CONST_UNICODE( *.ots;*.stci;*.xlt;*.xltm;*.xltm 
);
 }
 if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) )
 {
 if ( sFilterExt.Len()  0 )
 sFilterExt += ';';
-sFilterExt += DEFINE_CONST_UNICODE( *.otp;*.sti );
+sFilterExt += DEFINE_CONST_UNICODE( *.otp;*.sti;*.pot;*.potm;*.potx 
);
 }
 if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) )
 {
@@ -1644,7 +1644,7 @@ String SfxOrganizeDlg_Impl::GetPath_Impl( sal_Bool bOpen, 
const String rFileNam
 pFileDlg-SetDisplayDirectory( aObj.GetMainURL( 
INetURLObject::NO_DECODE ) );
 }
 
-pFileDlg-StartExecuteModal( LINK( this, SfxOrganizeDlg_Impl, ExportHdl ) 
);
+pFileDlg-StartExecuteModal( LINK( this, SfxOrganizeDlg_Impl, ImportHdl ) 
);
 
 return aPaths;
 }
@@ -2225,9 +2225,9 @@ IMPL_LINK( SfxOrganizeDlg_Impl, AddFiles_Impl, Button *, 
pButton )
 
 //-
 
-IMPL_LINK_NOARG(SfxOrganizeDlg_Impl, ImportHdl)
+IMPL_LINK_NOARG(SfxOrganizeDlg_Impl, ExportHdl)
 {
-DBG_ASSERT( pFileDlg, SfxOrganizeDlg_Impl::ImportHdl(): no file dialog );
+DBG_ASSERT( pFileDlg, SfxOrganizeDlg_Impl::ExportHdl(): no file dialog );
 
 if ( ERRCODE_NONE == pFileDlg-GetError() )
 {
@@ -2262,7 +2262,7 @@ IMPL_LINK_NOARG(SfxOrganizeDlg_Impl, ImportHdl)
 
 //-
 
-IMPL_LINK_NOARG(SfxOrganizeDlg_Impl, ExportHdl)
+IMPL_LINK_NOARG(SfxOrganizeDlg_Impl, ImportHdl)
 {
 DBG_ASSERT( pFileDlg, SfxOrganizeDlg_Impl::ImportHdl(): no file dialog );
 ::com::sun::star::uno::Sequence ::rtl::OUString  aPaths;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-09-28 Thread Libreoffice Gerrit user
 sfx2/source/doc/docfile.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 469780c715f2a5dee6c58347941aefe6f3de079f
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Sep 28 12:47:13 2012 +0200

fdo#54744: Fix broken logic of string comparison

d1cc007108442056f50d3a6d1212b2b4cfdc4c14 sal_Bool to bool, String to 
OUString,
in SfxMedium. changed

  !aLogicName.CompareToAscii( private:stream, 14 ) == COMPARE_EQUAL 
// (a)

where that suspicious ! made it effectively behave as

  aLogicName.CompareToAscii( private:stream, 14 ) != COMPARE_EQUAL  
// (b)

to

  (aLogicName.compareToAscii(private:stream, 14) == 0)  
// (c)

where (c) corresponds to (a), but the intended behavior was apparently (b):
Exporting to hybrid PDF now causes the embedded ODF stream (which is saved 
to a
private:stream URL) to be empty, as (c) is erroneously satisfied now, 
causing
the following lines to erroneously clear SID_OUTPUTSTREAM.

Change-Id: Ia2c1a69db7b4da07bfe01f52c3f6759301358a84

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 06253f3..db5887e 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2464,7 +2464,7 @@ void SfxMedium::Init_Impl()
 SFX_ITEMSET_ARG( pImp-m_pSet, pOutStreamItem, SfxUnoAnyItem, 
SID_OUTPUTSTREAM, false);
 if( pOutStreamItem
   ( !( pOutStreamItem-GetValue() = rOutStream )
-  || (pImp-m_aLogicName.compareToAscii(private:stream, 14) == 0)) )
+  || (pImp-m_aLogicName.compareToAscii(private:stream, 14) != 0)) )
 {
 pImp-m_pSet-ClearItem( SID_OUTPUTSTREAM );
 OSL_FAIL( Unexpected Output stream parameter!\n );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source writerfilter/inc writerfilter/source writerfilter/unocomponent

2012-09-21 Thread Libreoffice Gerrit user
 sfx2/source/doc/objstor.cxx   |8 
+++-
 writerfilter/inc/dmapper/DomainMapper.hxx |3 
++-
 writerfilter/inc/ooxml/OOXMLDocument.hxx  |1 +
 writerfilter/source/dmapper/DomainMapper.cxx  |6 
+++---
 writerfilter/source/filter/ImportFilter.cxx   |7 
+++
 writerfilter/source/filter/RtfFilter.cxx  |3 
++-
 writerfilter/source/ooxml/OOXMLStreamImpl.cxx |9 
++---
 writerfilter/source/ooxml/OOXMLStreamImpl.hxx |2 +-
 writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx |2 +-
 writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx|2 +-
 10 files changed, 27 insertions(+), 16 deletions(-)

New commits:
commit ff300e59e74ee88aa6a4981b57a51af416c9e991
Author: Michael Meeks michael.me...@suse.com
Date:   Fri Sep 21 21:32:11 2012 +0100

fdo#49819 - allow slightly inconsistent docx files to be repaired

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index cf8d0c2..9e7407a 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -33,6 +33,7 @@
 #include com/sun/star/document/XExporter.hpp
 #include com/sun/star/document/FilterOptionsRequest.hpp
 #include com/sun/star/document/XInteractionFilterOptions.hpp
+#include com/sun/star/packages/zip/ZipIOException.hpp
 #include com/sun/star/task/XInteractionHandler.hpp
 #include com/sun/star/task/XInteractionAskLater.hpp
 #include com/sun/star/task/FutureDocumentVersionProductUpdateRequest.hpp
@@ -2219,7 +2220,12 @@ sal_Bool SfxObjectShell::ImportFrom( SfxMedium rMedium, 
bool bInsert )
 }
 
 return xLoader-filter( aArgs );
-}catch(...)
+}
+catch (const packages::zip::ZipIOException)
+{
+SetError( ERRCODE_IO_BROKENPACKAGE, Badness in the underlying 
package format. );
+}
+catch(...)
 {}
 }
 
diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx 
b/writerfilter/inc/dmapper/DomainMapper.hxx
index 4dbbe87..1d9b2f0 100644
--- a/writerfilter/inc/dmapper/DomainMapper.hxx
+++ b/writerfilter/inc/dmapper/DomainMapper.hxx
@@ -80,7 +80,8 @@ public:
 DomainMapper(const ::com::sun::star::uno::Reference 
::com::sun::star::uno::XComponentContext  xContext,
 ::com::sun::star::uno::Reference 
::com::sun::star::io::XInputStream  xInputStream,
 ::com::sun::star::uno::Reference 
::com::sun::star::lang::XComponent  xModel,
-SourceDocumentType eDocumentType );
+bool bRepairStorage,
+SourceDocumentType eDocumentType);
 virtual ~DomainMapper();
 
 // Stream
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx 
b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index f3365db..c97e2b2 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -248,6 +248,7 @@ public:
 static OOXMLStream::Pointer_t
 createStream(uno::Referenceuno::XComponentContext rContext,
  uno::Referenceio::XInputStream rStream,
+ bool bRepairStorage,
  OOXMLStream::StreamType_t nStreamType = 
OOXMLStream::DOCUMENT);
 
 static OOXMLStream::Pointer_t
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 38a9961..cd4a17c 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -88,7 +88,8 @@ struct _PageSz
 DomainMapper::DomainMapper( const uno::Reference uno::XComponentContext  
xContext,
 uno::Reference io::XInputStream  xInputStream,
 uno::Reference lang::XComponent  xModel,
-SourceDocumentType eDocumentType) :
+bool bRepairStorage,
+SourceDocumentType eDocumentType ) :
 LoggedProperties(dmapper_logger, DomainMapper),
 LoggedTable(dmapper_logger, DomainMapper),
 LoggedStream(dmapper_logger, DomainMapper),
@@ -101,12 +102,11 @@ LoggedStream(dmapper_logger, DomainMapper),
 uno::makeAny( false ) );
 
 //import document properties
-
 try
 {
 uno::Reference lang::XMultiServiceFactory  
xFactory(xContext-getServiceManager(), uno::UNO_QUERY_THROW);
 uno::Reference embed::XStorage  xDocumentStorage =
-
(comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(OFOPXML_STORAGE_FORMAT_STRING,
 xInputStream));
+
(comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(OFOPXML_STORAGE_FORMAT_STRING,
 xInputStream, xFactory, bRepairStorage ));
 
 uno::Reference uno::XInterface  xTemp = 

[Libreoffice-commits] .: sfx2/source

2012-09-18 Thread Libreoffice Gerrit user
 sfx2/source/appl/appdde.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8ed8bb24b5300267f83be9ff537599537ffa4cb0
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Sep 18 08:21:43 2012 +0200

Adapt Windows-only code to changed ucbhelper::Content

Change-Id: I1ed4a59b7eef5f841754bc616ad94cbd82227ad0

diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 94067d9..2f28591 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -40,6 +40,7 @@
 #include sfx2/sfxsids.hrc
 #include helper.hxx
 #include sfx2/docfile.hxx
+#include comphelper/processfactory.hxx
 #include comphelper/string.hxx
 #include com/sun/star/ucb/IllegalIdentifierException.hpp
 
@@ -86,7 +87,7 @@ namespace
 
 try
 {
-::ucbhelper::Content aCnt( aObj.GetMainURL( 
INetURLObject::NO_DECODE ), uno::Reference ucb::XCommandEnvironment  () );
+::ucbhelper::Content aCnt( aObj.GetMainURL( 
INetURLObject::NO_DECODE ), uno::Reference ucb::XCommandEnvironment (), 
comphelper::getProcessComponentContext() );
 bRet = aCnt.isDocument();
 }
 catch( const ucb::CommandAbortedException )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-09-11 Thread Libreoffice Gerrit user
 sfx2/source/doc/objxtor.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6c29057f55dc1afde8911ac527814ca09ead2c2f
Author: Noel Power noel.po...@suse.com
Date:   Tue Sep 11 11:59:45 2012 +0100

missing part of fix for fdo#54721

commit id cea414bfe8fe356793778bdf09f5ca3b3a42daa0 for
fix vba not tracking currently selected doc correctly was missing 
necessary
change in sfx2

Change-Id: I1697c005374b3d26dc63c78702a46c6d9879adaa

diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index a9bb168..deee41b 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -135,7 +135,7 @@ static VBAConstantNameMap s_aRegisteredVBAConstants;
 if( xProps.is() ) try
 {
 ::rtl::OUString aConstName;
-xProps-getPropertyValue( ::rtl::OUString( VBAGlobalConstantName  ) 
) = aConstName;
+xProps-getPropertyValue( ::rtl::OUString( ThisVBADocObj  ) ) = 
aConstName;
 return ::rtl::OUStringToOString( aConstName, RTL_TEXTENCODING_ASCII_US 
);
 }
 catch (const uno::Exception) // not supported
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-08-21 Thread Libreoffice Gerrit user
 sfx2/source/control/templateview.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 6f37f7f06b1b4810d0cee025a3502e3282c25986
Author: Rafael Dominguez venccsra...@gmail.com
Date:   Tue Aug 21 13:35:20 2012 -0430

setFontAttribute on TextLayouterDevice for templateview title.

Change-Id: I963994f6c20995ea9d1037cadb6c17a43e8a28c9

diff --git a/sfx2/source/control/templateview.cxx 
b/sfx2/source/control/templateview.cxx
index bc13853..e2c7960 100644
--- a/sfx2/source/control/templateview.cxx
+++ b/sfx2/source/control/templateview.cxx
@@ -184,6 +184,9 @@ void TemplateView::MouseButtonDown (const MouseEvent rMEvt)
 else
 {
 drawinglayer::primitive2d::TextLayouterDevice aTextDev;
+aTextDev.setFontAttribute(mpItemAttrs-aFontAttr,
+  mpItemAttrs-aFontSize.getX(), 
mpItemAttrs-aFontSize.getY(),
+  com::sun::star::lang::Locale() );
 
 float fTextWidth = 
aTextDev.getTextWidth(maName,0,maName.getLength());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-08-16 Thread Stephan Bergmann
 sfx2/source/doc/objserv.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 4e923fb5a293ce570974e620b87ff84ccb6a139b
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Aug 16 17:53:45 2012 +0200

fdo#53280: Reset read-only UI after successful Save As

Change-Id: Ica9214d3655df27bbb259c463a7589a842f01c47

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 6a25743..1bd9c9c 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -694,6 +694,11 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest rReq)
 nErrorCode = ( lErr != ERRCODE_IO_ABORT )  ( nErrorCode == 
ERRCODE_NONE ) ? nErrorCode : lErr;
 }
 
+if (nId == SID_SAVEASDOC  nErrorCode == ERRCODE_NONE)
+{
+SetReadOnlyUI(false);
+}
+
 rReq.SetReturnValue( SfxBoolItem(0, nErrorCode == ERRCODE_NONE ) );
 
 ResetError();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-08-15 Thread Michael Stahl
 sfx2/source/doc/templatedlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1df49b79fd33d0ed505c4bdd053607064b5ae88e
Author: Michael Stahl mst...@redhat.com
Date:   Wed Aug 15 14:04:04 2012 +0200

SfxTemplateManagerDlg::OnTemplateSaveAs: fix assert

Change-Id: I5dac56ac36eac128f1880987c084d09d8076c3f7

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 9e17da4..b6a705d 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1131,7 +1131,7 @@ void SfxTemplateManagerDlg::OnRepositoryDelete()
 
 void SfxTemplateManagerDlg::OnTemplateSaveAs()
 {
-assert(m_xModel);
+assert(m_xModel.is());
 
 if (!maView-isOverlayVisible()  maSelFolders.empty())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-07-30 Thread Stephan Bergmann
 sfx2/source/control/templatelocalview.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 442b57834aa4e01b832cad42b2b466e8cb2a94a8
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Jul 30 10:46:00 2012 +0200

...or rather, renamed #include

Change-Id: I01e330672d2382e9241b836e7c2b38c0a5f5f0da

diff --git a/sfx2/source/control/templatelocalview.cxx 
b/sfx2/source/control/templatelocalview.cxx
index bc1cf1b..119168d 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -14,7 +14,6 @@
 #include sfx2/templatelocalviewitem.hxx
 #include sfx2/templateview.hxx
 #include sfx2/templateviewitem.hxx
-#include sfx2/templatefolderviewitem.hxx
 #include svl/inettype.hxx
 #include svtools/imagemgr.hxx
 #include tools/urlobj.hxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-07-25 Thread Kohei Yoshida
 sfx2/source/doc/docfile.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit a201c00b9330f6e765d9fe10b5a6c120f49a6da8
Author: Kohei Yoshida kohei.yosh...@gmail.com
Date:   Wed Jul 25 17:50:09 2012 -0400

The impl class is never null. No point checking for it.

Change-Id: I992e335bf217f3df30356f260ef1eb0f94d40233

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index d6a0864..21f93ab 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2387,15 +2387,13 @@ sal_Bool SfxMedium::IsRemote()
 
 void SfxMedium::SetUpdatePickList(sal_Bool bVal)
 {
-if(!pImp)
-pImp = new SfxMedium_Impl( this );
 pImp-bUpdatePickList = bVal;
 }
 //--
 
 sal_Bool SfxMedium::IsUpdatePickList() const
 {
-return pImp? pImp-bUpdatePickList: true;
+return pImp-bUpdatePickList;
 }
 
 void SfxMedium::SetLongName(const OUString rName)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-07-17 Thread Jan Holesovsky
 sfx2/source/appl/shutdowniconw32.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3e3a6a799debca97dc4f7c496eda7259dc421407
Author: Jan Holesovsky ke...@suse.cz
Date:   Tue Jul 17 10:34:30 2012 +0200

Fix MinGW build.

Change-Id: I48bad55cc982fba6fb48a921746801de9993bff1

diff --git a/sfx2/source/appl/shutdowniconw32.cxx 
b/sfx2/source/appl/shutdowniconw32.cxx
index f4a540e..dbef7e1 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -280,7 +280,7 @@ static void addTaskbarIcon( HWND hWnd )
 IMAGE_ICON, GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( 
SM_CYSMICON ),
 LR_DEFAULTCOLOR | LR_SHARED );
 
-wcsncpy( nid.szTip, strTip.getStr(), 64 );
+wcsncpy( nid.szTip, reinterpret_castLPCWSTR(strTip.getStr()), 64 );
 
 nid.cbSize  = sizeof(nid);
 nid.hWnd= hWnd;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-07-16 Thread Andras Timar
 sfx2/source/appl/shutdowniconw32.cxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 34ebc821d9942641c256157ada9f817338832711
Author: Andras Timar ati...@suse.com
Date:   Mon Jul 16 15:03:46 2012 +0200

fdo#52143 use Unicode functions for QuickStarter tooltip

Change-Id: Ic9c7ed84925ea5b4ce324a98a1089102dcda24b8

diff --git a/sfx2/source/appl/shutdowniconw32.cxx 
b/sfx2/source/appl/shutdowniconw32.cxx
index 78d1a9c..f4a540e 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -275,13 +275,12 @@ static void addTaskbarIcon( HWND hWnd )
 strTip = ShutdownIcon::getInstance()-GetResString( STR_QUICKSTART_TIP 
);
 
 // add taskbar icon
-NOTIFYICONDATAA nid;
+NOTIFYICONDATAW nid;
 nid.hIcon = (HICON)LoadImageA( GetModuleHandle( NULL ), MAKEINTRESOURCE( 
ICON_LO_DEFAULT ),
 IMAGE_ICON, GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( 
SM_CYSMICON ),
 LR_DEFAULTCOLOR | LR_SHARED );
 
-// better use unicode wrapper here ?
-strncpy( nid.szTip, ( OUStringToOString(strTip, 
osl_getThreadTextEncoding()).getStr() ), 64 );
+wcsncpy( nid.szTip, strTip.getStr(), 64 );
 
 nid.cbSize  = sizeof(nid);
 nid.hWnd= hWnd;
@@ -289,7 +288,7 @@ static void addTaskbarIcon( HWND hWnd )
 nid.uCallbackMessage= SFX_TASKBAR_NOTIFICATION;
 nid.uFlags  = NIF_MESSAGE|NIF_TIP|NIF_ICON;
 
-Shell_NotifyIconA(NIM_ADD, nid);
+Shell_NotifyIconW(NIM_ADD, nid);
 }
 
 // ---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-07-15 Thread Julien Nabet
 sfx2/source/appl/lnkbase2.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 602445c1aae34c1770b627c60238f4f8ba8515ac
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Jul 15 15:24:09 2012 +0200

Prefer prefix ++/-- operators for non-primitive types

Change-Id: I6cfaf9f4623c67fcf9383426f04b32e095acbf42

diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index d22c4fd..8bc6704 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -620,7 +620,7 @@ static DdeTopic* FindTopic( const String  rLinkName, 
sal_uInt16* pItemStt )
 for( int i = 0; i  2; ++i )
 {
 for( std::vectorDdeTopic*::iterator iterTopic = 
rTopics.begin();
- iterTopic != rTopics.end(); iterTopic++ )
+ iterTopic != rTopics.end(); ++iterTopic )
 if( (*iterTopic)-GetName() == sTopic )
 return *iterTopic;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-07-13 Thread Caolán McNamara
 sfx2/source/appl/app.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0d2afe08450ad041afa21adf48d6c6d90e8cc4e0
Author: Laurent Godard lgodard.li...@laposte.net
Date:   Wed Jul 11 17:07:23 2012 +0200

change Exit menu entry to Exit %PRODUCTNAME fdo#51944

Some user do not understand that Exit is for exiting all libreoffice 
modules and not exiting the current window

Change-Id: If3a88a1e7f79c5c19f3011ba65dde3cda11462a4

diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index de7368a..bcb19cb 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -257,7 +257,7 @@ ToolBox RID_FULLSCREENTOOLBOX
 
 String STR_QUITAPP
 {
-Text [ en-US ] = E~xit ;
+Text [ en-US ] = E~xit %PRODUCTNAME ;
 };
 
 String RID_STR_HELP
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-07-06 Thread Michael Meeks
 sfx2/source/doc/templatedlg.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 94d16ebac784e6d04e1274c728b880c7d79d1575
Author: Michael Meeks michael.me...@suse.com
Date:   Fri Jul 6 18:03:25 2012 +0100

revert change to missing image; please change back when it's added.

Change-Id: Icde577676e5ae55786dd2341291aad788bc40abc

diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src
index f0ac332..08275ba 100644
--- a/sfx2/source/doc/templatedlg.src
+++ b/sfx2/source/doc/templatedlg.src
@@ -134,7 +134,7 @@ ModalDialog DLG_TEMPLATE_MANAGER
 {
 ImageBitmap = Bitmap
 {
-File = ln053.png;
+File = signet.png;
 };
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-07-06 Thread Rafael Dominguez
 sfx2/source/doc/templatedlg.src |8 
 1 file changed, 8 deletions(-)

New commits:
commit 0a158923ac74714cecb47a977d553746a730bf7b
Author: Rafael Dominguez venccsra...@gmail.com
Date:   Fri Jul 6 13:41:36 2012 -0430

Remove unused image resource.

Change-Id: I789006f413b750d67e80fcedec9130f33275d74f

diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src
index 08275ba..0a8f851 100644
--- a/sfx2/source/doc/templatedlg.src
+++ b/sfx2/source/doc/templatedlg.src
@@ -130,14 +130,6 @@ ModalDialog DLG_TEMPLATE_MANAGER
 TabStop = TRUE;
 };
 
-Image IMG_ONLINE_REPOSITORY
-{
-ImageBitmap = Bitmap
-{
-File = signet.png;
-};
-};
-
 Image IMG_CREATE_TEXT
 {
 ImageBitmap = Bitmap
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-06-08 Thread Michael Stahl
 sfx2/source/appl/appdde.cxx |   14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

New commits:
commit f4ac2ffd9e0854a767f15ed38eab947cb16e66ad
Author: Michael Stahl mst...@redhat.com
Date:   Sat Jun 9 00:31:29 2012 +0200

fix WNT only SfxApplication::AddDdeTopic

Change-Id: Ifa5f845817178f7ec3608670c65c71e8c0a717cd

diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index e6d3706..10d5b19 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -577,7 +577,8 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
 // prevent double submit
 String sShellNm;
 sal_Bool bFnd = sal_False;
-for( sal_uInt16 n = pAppData_Impl-pDocTopics-Count(); n; )
+for (size_t n = pAppData_Impl-pDocTopics-size(); n;)
+{
 if( (*pAppData_Impl-pDocTopics)[ --n ]-pSh == pSh )
 {
 // If the document is untitled, is still a new Topic is created!
@@ -590,10 +591,10 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
 if( sShellNm == sNm.ToLowerAscii() )
 return ;
 }
+}
 
 const SfxDdeDocTopic_Impl* pTopic = new SfxDdeDocTopic_Impl( pSh );
-pAppData_Impl-pDocTopics-Insert( pTopic,
-   pAppData_Impl-pDocTopics-Count() );
+pAppData_Impl-pDocTopics-push_back(pTopic);
 pAppData_Impl-pDdeService-AddTopic( *pTopic );
 }
 #endif
@@ -606,13 +607,16 @@ void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
 return;
 
 SfxDdeDocTopic_Impl* pTopic;
-for( sal_uInt16 n = pAppData_Impl-pDocTopics-size(); n; )
-if( ( pTopic = (*pAppData_Impl-pDocTopics)[ --n ])-pSh == pSh )
+for (size_t n = pAppData_Impl-pDocTopics-size(); n; )
+{
+pTopic = (*pAppData_Impl-pDocTopics)[ --n ];
+if (pTopic-pSh == pSh)
 {
 pAppData_Impl-pDdeService-RemoveTopic( *pTopic );
 delete pTopic;
 pAppData_Impl-pDocTopics-erase( 
pAppData_Impl-pDocTopics-begin() + n );
 }
+}
 }
 
 const DdeService* SfxApplication::GetDdeService() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-06-08 Thread Michael Stahl
 sfx2/source/appl/appdde.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit f859ee7f9b867ab893d2414c2cd35b42b64a5e63
Author: Michael Stahl mst...@redhat.com
Date:   Sat Jun 9 00:58:14 2012 +0200

sigh... fix const abuse in WNT only code...

Change-Id: Ie6a93e15f4e7342faf232f28df133ff808cbe073

diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 10d5b19..f72e64a 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -593,7 +593,7 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
 }
 }
 
-const SfxDdeDocTopic_Impl* pTopic = new SfxDdeDocTopic_Impl( pSh );
+SfxDdeDocTopic_Impl *const pTopic = new SfxDdeDocTopic_Impl(pSh);
 pAppData_Impl-pDocTopics-push_back(pTopic);
 pAppData_Impl-pDdeService-AddTopic( *pTopic );
 }
@@ -606,10 +606,9 @@ void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
 if( !pAppData_Impl-pDocTopics )
 return;
 
-SfxDdeDocTopic_Impl* pTopic;
 for (size_t n = pAppData_Impl-pDocTopics-size(); n; )
 {
-pTopic = (*pAppData_Impl-pDocTopics)[ --n ];
+SfxDdeDocTopic_Impl *const pTopic = (*pAppData_Impl-pDocTopics)[ --n 
];
 if (pTopic-pSh == pSh)
 {
 pAppData_Impl-pDdeService-RemoveTopic( *pTopic );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-06-05 Thread Kohei Yoshida
 sfx2/source/bastyp/fltfnc.cxx |   37 +++--
 1 file changed, 27 insertions(+), 10 deletions(-)

New commits:
commit 3da8f3680556e0163f660a0a159930337c8c32ff
Author: Kohei Yoshida kohei.yosh...@gmail.com
Date:   Tue Jun 5 15:45:52 2012 -0400

fdo#50694: Honor the preferred filter returned by type detection.

Because that filter is more reliable.

Change-Id: Ifbab294bf4f344301410cd671a9245bffa03fa11

diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index fbb253e..72b3590 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -433,6 +433,7 @@ sal_uInt32  SfxFilterMatcher::GuessFilterControlDefaultUI( 
SfxMedium rMedium, c
 
 ::rtl::OUString sURL( rMedium.GetURLObject().GetMainURL( 
INetURLObject::NO_DECODE ) );
 ::com::sun::star::uno::Reference ::com::sun::star::io::XInputStream  
xInStream = rMedium.GetInputStream();
+rtl::OUString aFilterName;
 
 // stream exists = deep detection (with preselection ... if possible)
 if (xInStream.is())
@@ -454,6 +455,13 @@ sal_uInt32  SfxFilterMatcher::GuessFilterControlDefaultUI( 
SfxMedium rMedium, c
 
 ::com::sun::star::uno::Sequence 
::com::sun::star::beans::PropertyValue  lDescriptor = 
aDescriptor.getAsConstPropertyValueList();
 sTypeName = xDetection-queryTypeByDescriptor(lDescriptor, 
sal_True); // lDescriptor is used as In/Out param ... dont use 
aDescriptor.getAsConstPropertyValueList() directly!
+
+for (sal_Int32 i = 0; i  lDescriptor.getLength(); ++i)
+{
+if (lDescriptor[i].Name == FilterName)
+// Type detection picked a preferred filter for this 
format.
+aFilterName = lDescriptor[i].Value.getrtl::OUString();
+}
 }
 // no stream exists = try flat detection without preselection as 
fallback
 else
@@ -461,16 +469,25 @@ sal_uInt32  
SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium rMedium, c
 
 if (!sTypeName.isEmpty())
 {
-// detect filter by given type
-// In case of this matcher is bound to a particular document type:
-// If there is no acceptable type for this document at all, the 
type detection has possibly returned something else.
-// The DocumentService property is only a preselection, and all 
preselections are considered as optional!
-// This wrong type will be sorted out now because we match only 
allowed filters to the detected type
-::com::sun::star::uno::Sequence 
::com::sun::star::beans::NamedValue  lQuery(1);
-lQuery[0].Name = ::rtl::OUString(Name);
-lQuery[0].Value = sTypeName;
-
-const SfxFilter* pFilter = GetFilterForProps(lQuery, nMust, nDont);
+const SfxFilter* pFilter = NULL;
+if (!aFilterName.isEmpty())
+// Type detection returned a suitable filter for this.  Use it.
+pFilter = SfxFilter::GetFilterByName(aFilterName);
+
+if (!pFilter)
+{
+// detect filter by given type
+// In case of this matcher is bound to a particular document 
type:
+// If there is no acceptable type for this document at all, 
the type detection has possibly returned something else.
+// The DocumentService property is only a preselection, and 
all preselections are considered as optional!
+// This wrong type will be sorted out now because we match 
only allowed filters to the detected type
+::com::sun::star::uno::Sequence 
::com::sun::star::beans::NamedValue  lQuery(1);
+lQuery[0].Name = ::rtl::OUString(Name);
+lQuery[0].Value = sTypeName;
+
+pFilter = GetFilterForProps(lQuery, nMust, nDont);
+}
+
 if (pFilter)
 {
 *ppFilter = pFilter;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-05-24 Thread Kohei Yoshida
 sfx2/source/control/unoctitm.cxx |   14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit f6d9b4afbda6cf1a3db822b5fb5125448ef9e1d1
Author: Kohei Yoshida kohei.yosh...@gmail.com
Date:   Thu May 24 11:40:46 2012 -0400

Delete SfxItemSet before the current shell gets destroyed.

SfxItemSet takes hold of the SfxItemPool instance from the current
shell, and accesses it when it gets destroyed.  The problem arises
when the current shell gets destroyed before the SfxItemSet instnace
does, in which case an illegal memory access ensues.

This fixes intermittent crashes when opening a document in Writer.

Change-Id: Ib5e74b43051f868f22f6efdb311e6c2a75326d9a

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 005db6e..360590f 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -67,6 +67,8 @@
 #include sfx2/msgpool.hxx
 #include sfx2/objsh.hxx
 
+#include boost/scoped_ptr.hpp
+
 namespace css = ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
@@ -725,16 +727,20 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const 
::com::sun::star::util
 }
 
 eMapUnit = GetCoreMetric( pShell-GetPool(), GetId() );
-SfxAllItemSet aSet( pShell-GetPool() );
-TransformParameters( GetId(), lNewArgs, aSet, pSlot );
-if ( aSet.Count() )
+boost::scoped_ptrSfxAllItemSet xSet(new 
SfxAllItemSet(pShell-GetPool()));
+TransformParameters(GetId(), lNewArgs, *xSet, pSlot);
+if (xSet-Count())
 {
 // execute with arguments - call directly
-pItem = pDispatcher-Execute( GetId(), nCall, aSet, 
aInternalSet, nModifier );
+pItem = pDispatcher-Execute(GetId(), nCall, 
xSet.get(), aInternalSet, nModifier);
 bSuccess = (pItem != NULL);
 }
 else
 {
+// Be sure to delete this before we send a dispatch
+// request, which will destroy the current shell.
+xSet.reset();
+
 // execute using bindings, enables support for 
toggle/enum etc.
 SfxRequest aReq( GetId(), nCall, pShell-GetPool() );
 aReq.SetModifier( nModifier );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-04-27 Thread Stephan Bergmann
 sfx2/source/dialog/filedlghelper.cxx |   61 ++-
 1 file changed, 47 insertions(+), 14 deletions(-)

New commits:
commit 2d0ff6aa5d6951aaa00e2d6cf3878788b025983e
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Apr 27 16:54:32 2012 +0200

Related fdo#43895: Fixed shortcommings of FileDialogHelper_Impl::verifyPath

* maPath.reverseCompareToAsciiL(file:///tmp,11) == 0 failed for 
file:///tmp/
* It was unclear whether special treatment should only happen for files 
directly
  in /tmp or also in sub-dirs; assuming the latter now.
* Proper translation from file URL to system path.

diff --git a/sfx2/source/dialog/filedlghelper.cxx 
b/sfx2/source/dialog/filedlghelper.cxx
index 138f8a3..43f643e 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -63,6 +63,7 @@
 #include unotools/ucbstreamhelper.hxx
 #include unotools/ucbhelper.hxx
 #include unotools/localfilehelper.hxx
+#include osl/file.hxx
 #include osl/mutex.hxx
 #include osl/security.hxx
 #include osl/thread.hxx
@@ -1641,24 +1642,56 @@ void FileDialogHelper_Impl::getRealFilter( String 
_rFilter ) const
 void FileDialogHelper_Impl::verifyPath()
 {
 #ifdef UNX
-static char const s_FileScheme[] = file://;
-if (0 != rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength(
-maPath.getStr(), maPath.getLength(),
-s_FileScheme, RTL_CONSTASCII_LENGTH(s_FileScheme)))
-{
-return;
-}
-const OString sFullPath = OUStringToOString(
-maPath.copy(RTL_CONSTASCII_LENGTH(s_FileScheme)) + maFileName,
-osl_getThreadTextEncoding() );
-struct stat aFileStat;
-stat( sFullPath.getStr(), aFileStat );
 // lp#905355, fdo#43895
 // Check that the file has read only permission and is in /tmp -- this is
 //  the case if we have opened the file from the web with firefox only.
-if ( maPath.reverseCompareToAsciiL(file:///tmp,11) == 0 
-( aFileStat.st_mode  (S_IRWXO + S_IRWXG + S_IRWXU) ) == S_IRUSR )
+if (maFileName.isEmpty()) {
+return;
+}
+INetURLObject url(maPath);
+if (url.GetProtocol() != INET_PROT_FILE
+|| url.getName(0, true, INetURLObject::DECODE_WITH_CHARSET) != tmp)
+{
+return;
+}
+if (maFileName.indexOf('/') != -1) {
+SAL_WARN(sfx2, maFileName   contains /);
+return;
+}
+url.insertName(
+maFileName, false, INetURLObject::LAST_SEGMENT, true,
+INetURLObject::ENCODE_ALL);
+rtl::OUString sysPathU;
+osl::FileBase::RC e = osl::FileBase::getSystemPathFromFileURL(
+url.GetMainURL(INetURLObject::NO_DECODE), sysPathU);
+if (e != osl::FileBase::E_None) {
+SAL_WARN(
+sfx2,
+getSystemPathFromFileURL(
+ url.GetMainURL(INetURLObject::NO_DECODE)  ) failed with 
+ +e);
+return;
+}
+rtl::OString sysPathC;
+if (!sysPathU.convertToString(
+sysPathC, osl_getThreadTextEncoding(),
+(RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
+ | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
 {
+SAL_WARN(
+sfx2,
+convertToString(  sysPathU  ) failed for encoding 
+ +osl_getThreadTextEncoding());
+return;
+}
+struct stat aFileStat;
+if (stat(sysPathC.getStr(), aFileStat) == -1) {
+SAL_WARN(
+sfx2,
+stat(  sysPathC.getStr()  ) failed with errno   errno);
+return;
+}
+if ((aFileStat.st_mode  (S_IRWXO | S_IRWXG | S_IRWXU)) == S_IRUSR) {
 maPath = SvtPathOptions().GetWorkPath();
 mxFileDlg-setDisplayDirectory( maPath );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-04-27 Thread Stephan Bergmann
 sfx2/source/dialog/filedlghelper.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit ce44a0326e9e399a23d0adaadcf99f2e62a363d7
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Apr 27 17:22:43 2012 +0200

Missing #include errno.h

Change-Id: I79490015faf57a3f84395fa9ba29dd17503b9ef6

diff --git a/sfx2/source/dialog/filedlghelper.cxx 
b/sfx2/source/dialog/filedlghelper.cxx
index 43f643e..0fcc340 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -102,7 +102,9 @@
 #include sfxlocal.hrc
 #include rtl/oustringostreaminserter.hxx
 #include rtl/strbuf.hxx
+
 #ifdef UNX
+#include errno.h
 #include sys/stat.h
 #endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source sw/source xmloff/source

2012-04-10 Thread Jan Holesovsky
 sfx2/source/doc/sfxbasemodel.cxx|   13 -
 sw/source/core/swg/SwXMLTextBlocks1.cxx |2 +-
 xmloff/source/meta/xmlversion.cxx   |2 +-
 3 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit 1ae4c87367d1719a100b61eb694a7a186d2e8d6b
Author: Jan Holesovsky ke...@suse.cz
Date:   Tue Apr 10 12:40:00 2012 +0200

char[] - const char[].

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 5ec029e..02a4b9a 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3402,17 +3402,12 @@ uno::Reference ui::XUIConfigurationManager  SAL_CALL 
SfxBaseModel::getUIConfig
 {
 SfxObjectShell* pObjShell = 
SfxBaseModel::GetObjectShell();
 
-char aNum[]   = 
private:resource/toolbar/custom_OOo1x_0;
-char aTitle[] = Toolbar 0;
-sal_Int32 nNumIndex = strlen( aNum )-1;
-sal_Int32 nTitleIndex = strlen( aTitle )-1;
+rtl::OUString aNum( 
private:resource/toolbar/custom_OOo1x_ );
+rtl::OUString aTitle( Toolbar  );
 for ( sal_Int32 i = 0; i  rToolbars.getLength(); i++ )
 {
-aNum[nNumIndex]++;
-aTitle[nTitleIndex]++;
-
-rtl::OUString aCustomTbxName( 
RTL_CONSTASCII_USTRINGPARAM( aNum ));
-rtl::OUString aCustomTbxTitle( 
RTL_CONSTASCII_USTRINGPARAM( aTitle ));
+rtl::OUString aCustomTbxName = aNum + 
rtl::OUString::valueOf( i + 1 );
+rtl::OUString aCustomTbxTitle = aTitle + 
rtl::OUString::valueOf( i + 1 );
 
 uno::Reference container::XIndexContainer  
xToolbar = rToolbars[i];
 ConvertSlotsToCommands( pObjShell, xToolbar );
diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx 
b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index 62a2494..3a20eb8 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -50,7 +50,7 @@
 #define STREAM_STGREAD  ( STREAM_READ | STREAM_SHARE_DENYWRITE | 
STREAM_NOCREATE )
 #define STREAM_STGWRITE ( STREAM_READ | STREAM_WRITE | STREAM_SHARE_DENYWRITE )
 
-sal_Char XMLN_BLOCKLIST[] = BlockList.xml;
+const char XMLN_BLOCKLIST[] = BlockList.xml;
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/xmloff/source/meta/xmlversion.cxx 
b/xmloff/source/meta/xmlversion.cxx
index 9b2cb9d..3940fdd 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -48,7 +48,7 @@ using ::rtl::OUString;
 
 // 
 
-sal_Char XMLN_VERSIONSLIST[] = VersionList.xml;
+const char XMLN_VERSIONSLIST[] = VersionList.xml;
 
 // 
 // #110897#
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-04-10 Thread Caolán McNamara
 sfx2/source/doc/docinf.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 628d2e71aca4a97723efe36bc398a06e36f199a8
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Apr 10 13:13:24 2012 +0100

fix tinderbox

diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index 3048a3e..136d9cf 100644
--- a/sfx2/source/doc/docinf.cxx
+++ b/sfx2/source/doc/docinf.cxx
@@ -241,7 +241,7 @@ bool SFX2_DLLPUBLIC SaveOlePropertySet(
 rGlobSect.SetFileTimeValue( PROPID_EDITTIME, aEditTime );
 
 rGlobSect.SetStringValue( PROPID_REVNUMBER,
-rtl::OUString::valueOf( i_xDocProps-getEditingCycles() ) );
+rtl::OUString::valueOf( 
static_castsal_Int32(i_xDocProps-getEditingCycles()) ) );
 if ( i_pThumb  i_pThumb-getLength() )
 rGlobSect.SetThumbnailValue( PROPID_THUMBNAIL, *i_pThumb );
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-04-02 Thread Michael Meeks
 sfx2/source/appl/shutdowniconunx.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 8fa3aae7b302d3c9846bfa352c1db619a5b05ca0
Author: Michael Meeks michael.me...@suse.com
Date:   Mon Apr 2 20:26:24 2012 +0100

fdo#34324 - fix colorspace conversion for greyscale bitmaps

diff --git a/sfx2/source/appl/shutdowniconunx.cxx 
b/sfx2/source/appl/shutdowniconunx.cxx
index b249544..8aad0f6 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -90,6 +90,9 @@ static GdkPixbuf * ResIdToPixbuf( sal_uInt16 nResId )
 Bitmap pInSalBitmap = aIcon.GetBitmap();
 AlphaMask pInSalAlpha = aIcon.GetAlpha();
 
+if( pInSalBitmap.GetBitCount() != 24 )
+pInSalBitmap.Convert( BMP_CONVERSION_24BIT );
+
 Bitmap::ScopedReadAccess pSalBitmap(pInSalBitmap);
 AlphaMask::ScopedReadAccess pSalAlpha(pInSalAlpha);
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-03-27 Thread Bjoern Michaelsen
 sfx2/source/dialog/filedlghelper.cxx |   23 +++
 sfx2/source/dialog/filedlgimpl.hxx   |2 ++
 2 files changed, 25 insertions(+)

New commits:
commit dd2fe95cce75f1157bd1c75d286a0047b2e4175e
Author: Andrzej J. R. Hunt andr...@hunt.org
Date:   Tue Mar 27 10:32:52 2012 +0200

fdo#43895 lp#905355: Never let users save in /tmp by default

diff --git a/sfx2/source/dialog/filedlghelper.cxx 
b/sfx2/source/dialog/filedlghelper.cxx
index 3bf4fb5..0018912 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -101,6 +101,9 @@
 #include sfxlocal.hrc
 #include rtl/oustringostreaminserter.hxx
 #include rtl/strbuf.hxx
+#ifdef UNX
+#include sys/stat.h
+#endif
 
 //-
 
@@ -1635,6 +1638,24 @@ void FileDialogHelper_Impl::getRealFilter( String 
_rFilter ) const
 }
 }
 
+void FileDialogHelper_Impl::verifyPath()
+{
+#ifdef UNX
+struct stat aFileStat;
+const OString sFullPath = OUStringToOString( 
maPath.copy(RTL_CONSTASCII_LENGTH(file://)) + maFileName, 
osl_getThreadTextEncoding() );
+stat( sFullPath.getStr(), aFileStat );
+// lp#905355, fdo#43895
+// Check that the file has read only permission and is in /tmp -- this is
+//  the case if we have opened the file from the web with firefox only.
+if ( maPath.reverseCompareToAsciiL(file:///tmp,11) == 0 
+( aFileStat.st_mode  (S_IRWXO + S_IRWXG + S_IRWXU) ) == S_IRUSR )
+{
+maPath = SvtPathOptions().GetWorkPath();
+mxFileDlg-setDisplayDirectory( maPath );
+}
+#endif
+}
+
 // 
 void FileDialogHelper_Impl::displayFolder( const ::rtl::OUString _rPath )
 {
@@ -1648,6 +1669,7 @@ void FileDialogHelper_Impl::displayFolder( const 
::rtl::OUString _rPath )
 try
 {
 mxFileDlg-setDisplayDirectory( maPath );
+verifyPath();
 }
 catch( const IllegalArgumentException )
 {
@@ -1665,6 +1687,7 @@ void FileDialogHelper_Impl::setFileName( const 
::rtl::OUString _rFile )
 try
 {
 mxFileDlg-setDefaultName( maFileName );
+verifyPath();
 }
 catch( const IllegalArgumentException )
 {
diff --git a/sfx2/source/dialog/filedlgimpl.hxx 
b/sfx2/source/dialog/filedlgimpl.hxx
index 4f4e86d..4c3c68b 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -152,6 +152,8 @@ namespace sfx2
 
 voidimplInitializeFileName( );
 
+voidverifyPath( );
+
 voidimplGetAndCacheFiles( const 
::com::sun::star::uno::Reference XInterface  xPicker  ,
   
std::vectorrtl::OUString   rpURLList,
   const SfxFilter* 
   pFilter  );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-02-27 Thread Tor Lillqvist
 sfx2/source/appl/appbas.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 3eff0e79154d73098f8b1ace1015bdb436f423a8
Author: Tor Lillqvist tlillqv...@suse.com
Date:   Mon Feb 27 23:43:18 2012 +0200

Deduplication of aSfxInt16Item_Impl only for iOS

diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 9943157..12ef3f0 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -88,7 +88,9 @@
 #if defined(LIBO_MERGELIBS) || defined(IOS)
 /* Avoid clash with the ones from svx/source/form/typemap.cxx */
 #define aSfxBoolItem_Impl sfx2_source_appl_appbas_aSfxBoolItem_Impl
+#ifdef IOS
 #define aSfxInt16Item_Impl sfx2_source_appl_appbas_aSfxInt16Item_Impl
+#endif
 #define aSfxStringItem_Impl sfx2_source_appl_appbas_aSfxStringItem_Impl
 #define aSfxUInt16Item_Impl sfx2_source_appl_appbas_aSfxUInt16Item_Impl
 #define aSfxUInt32Item_Impl sfx2_source_appl_appbas_aSfxUInt32Item_Impl
@@ -101,7 +103,9 @@
 
 #if defined(LIBO_MERGELIBS) || defined(IOS)
 #undef aSfxBoolItem_Impl
+#ifdef IOS
 #undef aSfxInt16Item_Impl
+#endif
 #undef aSfxStringItem_Impl
 #undef aSfxUInt16Item_Impl
 #undef aSfxUInt32Item_Impl
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-02-14 Thread Michael Meeks
 sfx2/source/appl/sfxpicklist.cxx |  109 +++
 sfx2/source/doc/objserv.cxx  |3 -
 sfx2/source/doc/objstor.cxx  |2 
 sfx2/source/doc/objxtor.cxx  |1 
 sfx2/source/inc/objshimp.hxx |1 
 sfx2/source/inc/sfxpicklist.hxx  |6 ++
 6 files changed, 71 insertions(+), 51 deletions(-)

New commits:
commit 2e01faac3fa50f7036093583ae52f1584b3de55c
Author: Muhammad Haggag mhag...@gmail.com
Date:   Tue Feb 14 10:46:46 2012 +0200

fdo#37775: Recent Documents not updated by Save  Save As

This patch changes LO behavior so that we update recent documents on file 
save, save as, save all, and close. The previous behavior was to only update 
the list on document close.

= Changes =
SfxPickList (sfxpicklist.cxx/hxx):
. Extracted the logic to add a document to the Recent Documents list 
into a function of its own: AddDocumentToPickList
- Simplified the logic used by removing the check of 
SfxObjectShell_impl::bWaitingForPickList (see 
SfxObjectShell_impl::bWaitingForPickList below for details)
. Modified SfxPickList::Notify to call the aforementioned function on 
save, save-to, and save-as.

SfxObjectShell::APISaveAs_Impl (objserv.cxx):
. Modified it to allow picklist entry when doing Save As.

SfxObjectShell_impl::bWaitingForPickList (objstor.cxx, objxtor.cxx, 
objshimp.hxx):
. Removed this flag. It was used to indicate that a document wants to 
be added to the picklist, then cleared after it's added. Since we now always 
add documents to the picklist on saving, we no longer need it.

= Verification =
The change is in sfx2, so it should apply to all LO apps. I verified the 
new behavior in both writer and calc with the following actions:
. File-Save
. File-Save As
. File-Save All
. File-Close

diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index b0169a5..1198732 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -164,6 +164,52 @@ SfxPickList::PickListEntry* SfxPickList::GetPickListEntry( 
sal_uInt32 nIndex )
 return 0;
 }
 
+void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
+{
+SfxMedium *pMed = pDocSh-GetMedium();
+if( !pMed )
+return;
+
+// Unnamed Documents and embedded-Documents not in Picklist
+if ( !pDocSh-HasName() ||
+SFX_CREATE_MODE_STANDARD != pDocSh-GetCreateMode() )
+return;
+
+// Help not in History
+INetURLObject aURL( pDocSh-IsDocShared() ? pDocSh-GetSharedFileURL() : 
::rtl::OUString( pMed-GetOrigURL() ) );
+if ( aURL.GetProtocol() == INET_PROT_VND_SUN_STAR_HELP )
+return;
+
+// only add r/w document into picklist
+if ( pDocSh-IsReadOnly() || !pMed-IsUpdatePickList() )
+return;
+
+// add no document that forbids this (for example Message-Body)
+SFX_ITEMSET_ARG( pMed-GetItemSet(), pPicklistItem, SfxBoolItem, 
SID_PICKLIST, sal_False );
+if ( pPicklistItem  !pPicklistItem-GetValue() )
+return;
+
+// ignore hidden documents
+if ( !SfxViewFrame::GetFirst( pDocSh, sal_True ) )
+return;
+
+::rtl::OUString  aTitle = pDocSh-GetTitle(SFX_TITLE_PICKLIST);
+::rtl::OUString  aFilter;
+const SfxFilter* pFilter = pMed-GetOrigFilter();
+if ( pFilter )
+aFilter = pFilter-GetFilterName();
+
+// add to svtool history options
+SvtHistoryOptions().AppendItem( ePICKLIST,
+aURL.GetURLNoPass( INetURLObject::NO_DECODE ),
+aFilter,
+aTitle,
+SfxStringEncode( aURL.GetPass() ) );
+
+if ( aURL.GetProtocol() == INET_PROT_FILE )
+Application::AddToRecentDocumentList( aURL.GetURLNoPass( 
INetURLObject::NO_DECODE ), (pFilter) ? pFilter-GetMimeType() : 
::rtl::OUString() );
+}
+
 SfxPickList SfxPickList::Get()
 {
 static SfxPickList aUniqueInstance(SvtHistoryOptions().GetSize(ePICKLIST));
@@ -375,55 +421,30 @@ void SfxPickList::Notify( SfxBroadcaster, const SfxHint 
rHint )
 }
 break;
 
+case SFX_EVENT_SAVEDOCDONE:
+case SFX_EVENT_SAVEASDOCDONE:
+case SFX_EVENT_SAVETODOCDONE:
 case SFX_EVENT_CLOSEDOC:
 {
-SfxMedium *pMed = pDocSh-GetMedium();
-if( !pMed )
-return;
-
-// Unnamed Documents and embedded-Documents not im Pickliste
-if ( !pDocSh-HasName() ||
- SFX_CREATE_MODE_STANDARD != pDocSh-GetCreateMode() )
-return;
-
-// Help not in History
-INetURLObject aURL( pDocSh-IsDocShared() ? 
pDocSh-GetSharedFileURL() : ::rtl::OUString( pMed-GetOrigURL() ) );
-if ( aURL.GetProtocol() == INET_PROT_VND_SUN_STAR_HELP )
-return;
-
-// only add r/w document into picklist

[Libreoffice-commits] .: sfx2/source

2012-02-13 Thread Tor Lillqvist
 sfx2/source/notify/eventsupplier.cxx |4 ++--
 sfx2/source/view/ipclient.cxx|4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit eb676d0a9c6ce1d6fc50a595f3353f60d377e507
Author: Tor Lillqvist tlillqv...@suse.com
Date:   Mon Feb 13 13:28:30 2012 +0200

WaE: unreferenced local variable

diff --git a/sfx2/source/notify/eventsupplier.cxx 
b/sfx2/source/notify/eventsupplier.cxx
index c5a6d6b..1af00d5 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -810,7 +810,7 @@ void SfxGlobalEvents_Impl::implts_notifyJobExecution(const 
css::document::EventO
 if (xJobExecutor.is())
 xJobExecutor-notifyEvent(aEvent);
 }
-catch(const css::uno::RuntimeException exRun)
+catch(const css::uno::RuntimeException)
 { throw; }
 catch(const css::uno::Exception)
 {}
@@ -832,7 +832,7 @@ void 
SfxGlobalEvents_Impl::implts_checkAndExecuteEventBindings(const css::docume
 aAny = xEvents-getByName(aEvent.EventName);
 Execute(aAny, aEvent, 0);
 }
-catch(const css::uno::RuntimeException exRun)
+catch(const css::uno::RuntimeException)
 { throw; }
 catch(const css::uno::Exception)
 {}
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index ac7dea2..3dbacca 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -279,7 +279,7 @@ void SAL_CALL SfxInPlaceClient_Impl::saveObject()
 xStatusIndicator = 
xStatusIndicatorFactory-createStatusIndicator();
 xPropSet-setPropertyValue( rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( IndicatorInterception )), uno::makeAny( 
xStatusIndicator ));
 }
-catch ( const uno::RuntimeException e )
+catch ( const uno::RuntimeException )
 {
 throw;
 }
@@ -309,7 +309,7 @@ void SAL_CALL SfxInPlaceClient_Impl::saveObject()
 xPropSet-setPropertyValue( rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( IndicatorInterception )), uno::makeAny( 
xStatusIndicator ));
 }
 }
-catch ( const uno::RuntimeException e )
+catch ( const uno::RuntimeException )
 {
 throw;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-02-10 Thread Andras Timar
 sfx2/source/dialog/alienwarn.cxx |   58 ++-
 1 file changed, 33 insertions(+), 25 deletions(-)

New commits:
commit 05720546215976d8d42fa7321f455c641147db9f
Author: Tomcsik Bence tomcsikbe...@gmail.com
Date:   Fri Feb 10 13:35:23 2012 +0100

fdo#45330 Improving layout of Confirm File Format dialog

Although fdo#45330 was a duplicate of fdo#45117 which was fixed
earlier, this patch makes the layout look better when the button
text is very long, because it resizes the boundary boxes of fixed
text and ruler, too. I've changed the sequence of
the functions in InitSize() and the size calculations.

diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index 3e99575..8ed0b71 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -119,13 +119,32 @@ void SfxAlienWarningDialog::InitSize()
 m_aMoreInfoBtn.SetPosSizePixel( aNewPoint, aNewSize );
 }
 
-// text of checkbox to wide - add new line
-nTxtW = m_aWarningOnBox.GetCtrlTextWidth( m_aWarningOnBox.GetText() ) + 
IMPL_EXTRA_BUTTON_WIDTH;
+// recalculate the size and position of the buttons
+m_aMoreInfoBtn.Hide();
+nTxtW = m_aKeepCurrentBtn.GetCtrlTextWidth( m_aKeepCurrentBtn.GetText() );
+nTxtW += IMPL_EXTRA_BUTTON_WIDTH;
+Size aNewSize = m_aKeepCurrentBtn.GetSizePixel();
+aNewSize.Width() = nTxtW;
+m_aKeepCurrentBtn.SetSizePixel( aNewSize );
+Point aPos = m_aSaveODFBtn.GetPosPixel();
+aPos.X() = AW_COL_3 + nTxtW;
+m_aSaveODFBtn.SetPosPixel( aPos );
+nTxtW = m_aSaveODFBtn.GetCtrlTextWidth( m_aSaveODFBtn.GetText() );
+nTxtW += IMPL_EXTRA_BUTTON_WIDTH;
+aNewSize = m_aSaveODFBtn.GetSizePixel();
+aNewSize.Width() = nTxtW;
+m_aSaveODFBtn.SetSizePixel( aNewSize );
+long nBtnsWidthSize = m_aKeepCurrentBtn.GetSizePixel().Width() + 
m_aSaveODFBtn.GetSizePixel().Width() + AW_COL_3 + IMPL_EXTRA_BUTTON_WIDTH;
+
+// resize + text of checkbox too wide - add new line
+aNewSize = m_aWarningOnBox.GetSizePixel();
+aNewSize.Width() = nBtnsWidthSize - 4*IMPL_EXTRA_BUTTON_WIDTH;
+m_aWarningOnBox.SetSizePixel( aNewSize );
+nTxtW = m_aWarningOnBox.GetCtrlTextWidth( m_aWarningOnBox.GetText() );
 nCtrlW = m_aWarningOnBox.GetSizePixel().Width();
 if ( nTxtW = nCtrlW )
 {
 long nTextHeight = m_aWarningOnBox.GetTextHeight();
-Size aNewSize = m_aWarningOnBox.GetSizePixel();
 aNewSize.Height() += nTextHeight;
 m_aWarningOnBox.SetSizePixel( aNewSize );
 aNewSize = GetSizePixel();
@@ -133,15 +152,18 @@ void SfxAlienWarningDialog::InitSize()
 SetSizePixel( aNewSize );
 }
 
-// align the size of the information text control (FixedText) to its 
content
+// resize + align the size of the information text control (FixedText) to 
its content
+aNewSize = m_aInfoText.GetSizePixel();
+aNewSize.Width() = nBtnsWidthSize - 4*IMPL_EXTRA_BUTTON_WIDTH;
+m_aInfoText.SetSizePixel( aNewSize );
 Size aMinSize = m_aInfoText.CalcMinimumSize( 
m_aInfoText.GetSizePixel().Width() );
 long nTxtH = aMinSize.Height();
 long nCtrlH = m_aInfoText.GetSizePixel().Height();
 long nDelta = ( nCtrlH - nTxtH );
-Size aNewSize = m_aInfoText.GetSizePixel();
 aNewSize.Height() -= nDelta;
 m_aInfoText.SetSizePixel( aNewSize );
 
+
 // new position for the succeeding windows
 Window* pWins[] =
 {
@@ -155,31 +177,17 @@ void SfxAlienWarningDialog::InitSize()
 (*pCurrent)-SetPosPixel( aNewPos );
 }
 
-// recalculate the size and position of the buttons
-m_aMoreInfoBtn.Hide();
-nTxtW = m_aKeepCurrentBtn.GetCtrlTextWidth( m_aKeepCurrentBtn.GetText() );
-nTxtW += IMPL_EXTRA_BUTTON_WIDTH;
-aNewSize = m_aKeepCurrentBtn.GetSizePixel();
-aNewSize.Width() = nTxtW;
-m_aKeepCurrentBtn.SetSizePixel( aNewSize );
-Point aPos = m_aSaveODFBtn.GetPosPixel();
-aPos.X() = AW_COL_3 + nTxtW;
-m_aSaveODFBtn.SetPosPixel( aPos );
-nTxtW = m_aSaveODFBtn.GetCtrlTextWidth( m_aSaveODFBtn.GetText() );
-nTxtW += IMPL_EXTRA_BUTTON_WIDTH;
-aNewSize = m_aSaveODFBtn.GetSizePixel();
-aNewSize.Width() = nTxtW;
-m_aSaveODFBtn.SetSizePixel( aNewSize );
-
 // new size of the dialog
 aNewSize = GetSizePixel();
 aNewSize.Height() -= nDelta;
-if (aPos.X() + nTxtW + IMPL_EXTRA_BUTTON_WIDTH  aNewSize.Width())
-{
-aNewSize.Width() = aPos.X() + nTxtW + IMPL_EXTRA_BUTTON_WIDTH;
-}
+aNewSize.Width() = nBtnsWidthSize;
 SetSizePixel( aNewSize );
 
+// resize the FixedLine
+aNewSize = m_aOptionLine.GetSizePixel();
+aNewSize.Width() = GetSizePixel().Width();
+m_aOptionLine.SetSizePixel( aNewSize );
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org

[Libreoffice-commits] .: sfx2/source

2012-02-08 Thread Petr Mladek
 sfx2/source/dialog/alienwarn.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 09be8bbee6b49680dd2a16f5b4c2c2f8d9eca72c
Author: Josh Heidenreich josh.sickm...@gmail.com
Date:   Wed Feb 8 18:48:37 2012 +1030

Fix fdo#45117 - Alien save dialog buttons run off the edge

Adjusts the width of the dialog to be wider, if required.

diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index e913c88..3e99575 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -174,6 +174,10 @@ void SfxAlienWarningDialog::InitSize()
 // new size of the dialog
 aNewSize = GetSizePixel();
 aNewSize.Height() -= nDelta;
+if (aPos.X() + nTxtW + IMPL_EXTRA_BUTTON_WIDTH  aNewSize.Width())
+{
+aNewSize.Width() = aPos.X() + nTxtW + IMPL_EXTRA_BUTTON_WIDTH;
+}
 SetSizePixel( aNewSize );
 
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-01-26 Thread Ivan Timofeev
 sfx2/source/view/sfxbasecontroller.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e2407767b39df00c4057a8174391ab70b97a39a5
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Jan 25 23:37:30 2012 +0400

remember that map has been initialized

diff --git a/sfx2/source/view/sfxbasecontroller.cxx 
b/sfx2/source/view/sfxbasecontroller.cxx
index f8903d6..932c2f5 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -193,6 +193,7 @@ sal_Int16 MapGroupIDToCommandGroup( sal_Int16 nGroupID )
 GroupIDCommandGroupMap[i].nCommandGroup ));
 ++i;
 }
+bGroupIDMapInitialized = sal_True;
 }
 
 GroupHashMap::const_iterator pIter = mHashMap.find( nGroupID );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-01-23 Thread Michael Stahl
 sfx2/source/inc/virtmenu.hxx  |8 +---
 sfx2/source/menu/virtmenu.cxx |   20 +---
 2 files changed, 18 insertions(+), 10 deletions(-)

New commits:
commit a0093404ffbca79655a52019d6bf66b976964fe9
Author: Michael Stahl mst...@redhat.com
Date:   Mon Jan 23 18:38:45 2012 +0100

SfxVirtualMenu: fix context menu crash:

SfxMenuCtrlArr_Impl used to be a PTRARR_DEL, so use a boost::ptr_vector
to ensure elements are deleted.
(regression from 94d4764a42f8f38b884bb8960791d80ac876b786)

diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx
index 998fe66..44bf381 100644
--- a/sfx2/source/inc/virtmenu.hxx
+++ b/sfx2/source/inc/virtmenu.hxx
@@ -25,8 +25,10 @@
  * for a copy of the LGPLv3 License.
  *
  /
-#ifndef _SFXVIRTMENU_HXX
-#define _SFXVIRTMENU_HXX
+#ifndef SFXVIRTMENU_HXX
+#define SFXVIRTMENU_HXX
+
+#include boost/ptr_container/ptr_vector.hpp
 
 #include sfx2/mnuitem.hxx
 #include mnucfga.hxx
@@ -35,7 +37,7 @@ class SfxBindings;
 class Timer;
 class SfxMenuImageControl_Impl;
 
-typedef std::vectorSfxMenuControl* SfxMenuCtrlArr_Impl;
+typedef ::boost::ptr_vectorSfxMenuControl SfxMenuCtrlArr_Impl;
 
 class SAL_DLLPUBLIC_EXPORT SfxVirtualMenu
 {
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index c62dfd5..0098ee5 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -731,11 +731,14 @@ void SfxVirtualMenu::BindControllers()
 }
 
 SfxMenuCtrlArr_Impl rCtrlArr = GetAppCtrl_Impl();
-for(SfxMenuCtrlArr_Impl::const_iterator i = rCtrlArr.begin(); i != 
rCtrlArr.end(); ++i)
+for (SfxMenuCtrlArr_Impl::iterator i = rCtrlArr.begin();
+i != rCtrlArr.end(); ++i)
 {
-sal_uInt16 nSlotId = (*i)-GetId();
+sal_uInt16 nSlotId = i-GetId();
 if ( !pSVMenu-GetItemCommand(nSlotId).Len() )
-(*i)-ReBind();
+{
+i-ReBind();
+}
 }
 
 pBindings-LEAVEREGISTRATIONS();
@@ -755,11 +758,14 @@ void SfxVirtualMenu::UnbindControllers()
 }
 
 SfxMenuCtrlArr_Impl rCtrlArr = GetAppCtrl_Impl();
-for(SfxMenuCtrlArr_Impl::const_iterator i = rCtrlArr.begin(); i != 
rCtrlArr.end(); ++i)
+for (SfxMenuCtrlArr_Impl::iterator i = rCtrlArr.begin();
+i != rCtrlArr.end(); ++i)
 {
-if((*i)-IsBound())
-// UnoController is not binded!
-(*i)-UnBind();
+if (i-IsBound())
+{
+// UnoController is not bound!
+i-UnBind();
+}
 }
 
 pBindings-LEAVEREGISTRATIONS();
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-01-16 Thread Stephan Bergmann
 sfx2/source/control/dispatch.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e75308f9099e3baebe7b283241e8b2fd799ef9ff
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Jan 17 08:55:50 2012 +0100

Avoid compilation problem.

diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 4d3f2d7..c1d41e0 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -572,7 +572,7 @@ sal_Bool SfxDispatcher::CheckVirtualStack( const SfxShell 
rShell, sal_Bool bDee
 SFX_STACK(SfxDispatcher::CheckVirtualStack);
 
 SfxShellStack_Impl aStack( pImp-aStack );
-for(std::dequeSfxToDo_Impl::const_reverse_iterator i = 
pImp-aToDoStack.rbegin(); i != pImp-aToDoStack.rend(); ++i)
+for(std::dequeSfxToDo_Impl::reverse_iterator i = 
pImp-aToDoStack.rbegin(); i != pImp-aToDoStack.rend(); ++i)
 {
 if(i-bPush)
 aStack.Push(static_castSfxShell*(i-pCluster));
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-01-09 Thread Andras Timar
 sfx2/source/dialog/alienwarn.cxx |   16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

New commits:
commit 2e0ec77cd6bbfe599d63f3a67218c1cf09bb19a6
Author: Andras Timar ati...@suse.com
Date:   Mon Jan 9 21:18:38 2012 +0100

autoresize 'Use ODF format' button, too

diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index 6acf107..e913c88 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -155,11 +155,6 @@ void SfxAlienWarningDialog::InitSize()
 (*pCurrent)-SetPosPixel( aNewPos );
 }
 
-// new size of the dialog
-aNewSize = GetSizePixel();
-aNewSize.Height() -= nDelta;
-SetSizePixel( aNewSize );
-
 // recalculate the size and position of the buttons
 m_aMoreInfoBtn.Hide();
 nTxtW = m_aKeepCurrentBtn.GetCtrlTextWidth( m_aKeepCurrentBtn.GetText() );
@@ -170,6 +165,17 @@ void SfxAlienWarningDialog::InitSize()
 Point aPos = m_aSaveODFBtn.GetPosPixel();
 aPos.X() = AW_COL_3 + nTxtW;
 m_aSaveODFBtn.SetPosPixel( aPos );
+nTxtW = m_aSaveODFBtn.GetCtrlTextWidth( m_aSaveODFBtn.GetText() );
+nTxtW += IMPL_EXTRA_BUTTON_WIDTH;
+aNewSize = m_aSaveODFBtn.GetSizePixel();
+aNewSize.Width() = nTxtW;
+m_aSaveODFBtn.SetSizePixel( aNewSize );
+
+// new size of the dialog
+aNewSize = GetSizePixel();
+aNewSize.Height() -= nDelta;
+SetSizePixel( aNewSize );
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-01-09 Thread Andras Timar
 sfx2/source/dialog/alienwarn.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6a62d7628f35c259dc3688f326b5ad31d674ab33
Author: Andras Timar ati...@suse.com
Date:   Mon Jan 9 21:27:46 2012 +0100

revert text change in alienwarn.src

diff --git a/sfx2/source/dialog/alienwarn.src b/sfx2/source/dialog/alienwarn.src
index bd72a23..98d3372 100644
--- a/sfx2/source/dialog/alienwarn.src
+++ b/sfx2/source/dialog/alienwarn.src
@@ -51,7 +51,7 @@ ModalDialog RID_DLG_ALIEN_WARNING
 Size = MAP_APPFONT( 
DIALOG_WIDTH-AW_COL_2-RSC_SP_DLG_INNERBORDER_RIGHT, 
INFO_TEXT_LINES*RSC_CD_FIXEDTEXT_HEIGHT );
 NoLabel = TRUE;
 Wordbreak = TRUE;
-Text [ en-US ] = This document may contain content that cannot be 
saved in the currently selected file format \%FORMATNAME\. Do you really want 
to use \%FORMATNAME\?\n\nTo be sure the document is saved correctly, use the 
ODF format.;
+Text [ en-US ] = This document may contain formatting or content that 
cannot be saved in the currently selected file format \%FORMATNAME\.\n\nUse 
the default ODF file format to be sure that the document is saved correctly.;
 };
 OKButton PB_NO
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source tools/inc tools/source vcl/source

2012-01-09 Thread David Tardon
 sfx2/source/appl/appopen.cxx |6 -
 sfx2/source/appl/appserv.cxx |4 
 sfx2/source/bastyp/bitset.cxx|   14 --
 sfx2/source/bastyp/minarray.cxx  |9 -
 sfx2/source/control/bindings.cxx |   22 ---
 sfx2/source/control/ctrlitem.cxx |   15 --
 sfx2/source/control/dispatch.cxx |   13 --
 sfx2/source/control/msgpool.cxx  |7 -
 sfx2/source/control/objface.cxx  |4 
 sfx2/source/control/request.cxx  |   13 --
 sfx2/source/control/statcach.cxx |6 -
 sfx2/source/menu/mnuitem.cxx |8 -
 sfx2/source/menu/mnumgr.cxx  |5 
 sfx2/source/menu/virtmenu.cxx|   13 --
 sfx2/source/notify/hintpost.cxx  |3 
 sfx2/source/statbar/stbitem.cxx  |1 
 sfx2/source/toolbox/tbxitem.cxx  |1 
 sfx2/source/view/viewfrm.cxx |3 
 tools/inc/tools/debug.hxx|   33 -
 tools/source/debug/debug.cxx |   75 -
 vcl/source/app/dbggui.cxx|  220 ---
 21 files changed, 3 insertions(+), 472 deletions(-)

New commits:
commit 1efa072b558d5b2aee03c658c4a781654985ba2b
Author: Marcel Metz mm...@adrian-broher.net
Date:   Tue Jan 10 07:19:46 2012 +0100

Remove cruft in debug tools

diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index ebb9749..e60c108 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -530,8 +530,6 @@ sal_uIntPtr SfxApplication::LoadTemplate( 
SfxObjectShellLock xDoc, const String
 
 void SfxApplication::NewDocDirectExec_Impl( SfxRequest rReq )
 {
-DBG_MEMTEST();
-
 SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, 
sal_False);
 String aFactName;
 if ( pFactoryItem )
@@ -565,8 +563,6 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest 
rReq )
 
 void SfxApplication::NewDocExec_Impl( SfxRequest rReq )
 {
-DBG_MEMTEST();
-
 // No Parameter from BASIC only Factory given?
 SFX_REQUEST_ARG(rReq, pTemplNameItem, SfxStringItem, SID_TEMPLATE_NAME, 
sal_False);
 SFX_REQUEST_ARG(rReq, pTemplFileNameItem, SfxStringItem, SID_FILE_NAME, 
sal_False);
@@ -696,8 +692,6 @@ bool lcl_isFilterNativelySupported(const SfxFilter rFilter)
 
 void SfxApplication::OpenDocExec_Impl( SfxRequest rReq )
 {
-DBG_MEMTEST();
-
 sal_uInt16 nSID = rReq.GetSlot();
 SFX_REQUEST_ARG( rReq, pFileNameItem, SfxStringItem, SID_FILE_NAME, 
sal_False );
 if ( pFileNameItem )
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index f6eb9ca..3ac3122 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -182,7 +182,6 @@ static void showDocument( const char* pBaseName )
 
 void SfxApplication::MiscExec_Impl( SfxRequest rReq )
 {
-DBG_MEMTEST();
 bool bDone = false;
 switch ( rReq.GetSlot() )
 {
@@ -616,8 +615,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest rReq )
 
 void SfxApplication::MiscState_Impl(SfxItemSet rSet)
 {
-DBG_MEMTEST();
-
 LocaleDataWrapper aLocaleWrapper( 
::comphelper::getProcessServiceFactory(), 
Application::GetSettings().GetLocale() );
 const sal_uInt16 *pRanges = rSet.GetRanges();
 DBG_ASSERT(pRanges  *pRanges, Set without range);
@@ -886,7 +883,6 @@ static ::rtl::OUString getConfigurationStringValue(
 
 void SfxApplication::OfaExec_Impl( SfxRequest rReq )
 {
-DBG_MEMTEST();
 switch ( rReq.GetSlot() )
 {
 case SID_OPTIONS_TREEDIALOG:
diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx
index 3c7bf60..1b5e750 100644
--- a/sfx2/source/bastyp/bitset.cxx
+++ b/sfx2/source/bastyp/bitset.cxx
@@ -38,7 +38,6 @@
 
 BitSet BitSet::operator( sal_uInt16 nOffset ) const
 {
-DBG_MEMTEST();
 // create a work-copy, return it if nothing to shift
 BitSet aSet(*this);
 if ( nOffset == 0 )
@@ -89,7 +88,6 @@ BitSet BitSet::operator( sal_uInt16 nOffset ) const
 
 BitSet BitSet::operator( sal_uInt16 ) const
 {
-DBG_MEMTEST();
 return BitSet();
 }
 
@@ -99,12 +97,10 @@ BitSet BitSet::operator( sal_uInt16 ) const
 
 void BitSet::CopyFrom( const BitSet rSet )
 {
-DBG_MEMTEST();
 nCount = rSet.nCount;
 nBlocks = rSet.nBlocks;
 if ( rSet.nBlocks )
 {
-DBG_MEMTEST();
 pBitmap = new sal_uIntPtr[nBlocks];
 memcpy( pBitmap, rSet.pBitmap, 4 * nBlocks );
 }
@@ -118,7 +114,6 @@ void BitSet::CopyFrom( const BitSet rSet )
 
 BitSet::BitSet()
 {
-DBG_MEMTEST();
 nCount = 0;
 nBlocks = 0;
 pBitmap = 0;
@@ -130,7 +125,6 @@ BitSet::BitSet()
 
 BitSet::BitSet( const BitSet rOrig )
 {
-DBG_MEMTEST();
 CopyFrom(rOrig);
 }
 
@@ -140,7 +134,6 @@ BitSet::BitSet( const BitSet rOrig )
 
 BitSet::~BitSet()
 {
-DBG_MEMTEST();
 delete [] pBitmap;
 }
 
@@ -150,7 +143,6 @@ BitSet::~BitSet()
 
 BitSet BitSet::operator=( const BitSet rOrig )
 {
-DBG_MEMTEST();
 if ( this != rOrig )
 {
 delete [] pBitmap;
@@ -165,7 +157,6 @@ BitSet BitSet::operator=( const BitSet rOrig )
 
 BitSet BitSet::operator=( sal_uInt16 

[Libreoffice-commits] .: sfx2/source svtools/AllLangResTarget_svt.mk svtools/inc svtools/Library_svt.mk svtools/Package_inc.mk svtools/source svtools/util

2011-12-21 Thread August Sodora
 sfx2/source/appl/app.cxx|  106 -
 svtools/AllLangResTarget_svt.mk |1 
 svtools/Library_svt.mk  |1 
 svtools/Package_inc.mk  |2 
 svtools/inc/svtools/helpid.hrc  |6 
 svtools/inc/svtools/testtool.hxx|   78 
 svtools/source/misc/helpagentwindow.cxx |3 
 svtools/source/plugapp/testtool.hrc |   55 -
 svtools/source/plugapp/testtool.src |  194 
 svtools/source/plugapp/ttprops.cxx  |   36 -
 svtools/util/hidother.src   |3 
 11 files changed, 485 deletions(-)

New commits:
commit eeecf625351238f90c61c82b403bd65e35d7833e
Author: August Sodora aug...@gmail.com
Date:   Wed Dec 21 06:49:39 2011 -0500

Remove TTProperties

diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index de0f385..d611d94 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -26,7 +26,6 @@
  *
  /
 
-
 #if defined UNX
 #include limits.h
 #else // UNX
@@ -153,109 +152,6 @@ static SfxHelp*pSfxHelp = NULL;
 
 namespace
 {
-class SfxPropertyHandler : public PropertyHandler
-{
-virtual void Property( ApplicationProperty );
-};
-
-void SfxPropertyHandler::Property( ApplicationProperty rProp )
-{
-TTProperties* pTTProperties = PTR_CAST( TTProperties, rProp );
-if ( pTTProperties )
-{
-pTTProperties-nPropertyVersion = TT_PROPERTIES_VERSION;
-switch ( pTTProperties-nActualPR )
-{
-case TT_PR_SLOTS:
-{
-pTTProperties-nSidOpenUrl = SID_OPENURL;
-pTTProperties-nSidFileName = SID_FILE_NAME;
-pTTProperties-nSidNewDocDirect = SID_NEWDOCDIRECT;
-pTTProperties-nSidCopy = SID_COPY;
-pTTProperties-nSidPaste = SID_PASTE;
-pTTProperties-nSidSourceView = SID_SOURCEVIEW;
-pTTProperties-nSidSelectAll = SID_SELECTALL;
-pTTProperties-nSidReferer = SID_REFERER;
-pTTProperties-nActualPR = 0;
-}
-break;
-case TT_PR_DISPATCHER:
-{
-// interface for TestTool
-SfxViewFrame* pViewFrame=0;
-SfxDispatcher* pDispatcher=0;
-pViewFrame = SfxViewFrame::Current();
-if ( !pViewFrame )
-pViewFrame = SfxViewFrame::GetFirst();
-if ( pViewFrame )
-pDispatcher = pViewFrame-GetDispatcher();
-else
-pDispatcher = NULL;
-if ( !pDispatcher )
-pTTProperties-nActualPR = TT_PR_ERR_NODISPATCHER;
-else
-{
-
pDispatcher-SetExecuteMode(EXECUTEMODE_DIALOGASYNCHRON);
-if ( pTTProperties-mnSID == SID_NEWDOCDIRECT
-  || pTTProperties-mnSID == SID_OPENDOC )
-{
-SfxPoolItem** pArgs = pTTProperties-mppArgs;
-SfxAllItemSet aSet( SFX_APP()-GetPool() );
-if ( pArgs  *pArgs )
-{
-for ( SfxPoolItem **pArg = pArgs; *pArg; 
++pArg )
-aSet.Put( **pArg );
-}
-if ( pTTProperties-mnSID == SID_NEWDOCDIRECT )
-{
-String aFactory = 
String::CreateFromAscii(private:factory/);
-if ( pArgs  *pArgs )
-{
-SFX_ITEMSET_ARG( aSet, pFactoryName, 
SfxStringItem, SID_NEWDOCDIRECT, sal_False );
-if ( pFactoryName )
-aFactory += pFactoryName-GetValue();
-else
-aFactory += 
String::CreateFromAscii(swriter);
-}
-else
-aFactory += 
String::CreateFromAscii(swriter);
-
-aSet.Put( SfxStringItem( SID_FILE_NAME, 
aFactory ) );
-aSet.ClearItem( SID_NEWDOCDIRECT );
-pTTProperties-mnSID = SID_OPENDOC;
-}
-
-aSet.Put( SfxStringItem( SID_TARGETNAME, 
DEFINE_CONST_UNICODE(_blank) ) );
-if ( pDispatcher-ExecuteFunction( 
pTTProperties-mnSID, aSet, pTTProperties-mnMode )
-  

[Libreoffice-commits] .: sfx2/source

2011-12-03 Thread August Sodora
 sfx2/source/view/viewfrm.cxx |   15 ---
 1 file changed, 15 deletions(-)

New commits:
commit f4b3bd91ca177101d90f522e81163dc6421e14c9
Author: August Sodora aug...@gmail.com
Date:   Sat Dec 3 18:24:06 2011 -0500

fdo#41865: Make macro recording work without experimental features

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 36b1e3e..a158f53 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -3037,14 +3037,6 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet rSet)
 case SID_RECORDMACRO :
 {
 SvtMiscOptions aMiscOptions;
-const char* pName = 
GetObjectShell()-GetFactory().GetShortName();
-if ( !aMiscOptions.IsExperimentalMode() ||
- ( strcmp(pName,swriter)  strcmp(pName,scalc) ) )
-{
-rSet.DisableItem( nWhich );
-rSet.Put(SfxVisibilityItem(nWhich, sal_False));
-break;
-}
 
 ::rtl::OUString 
sProperty(RTL_CONSTASCII_USTRINGPARAM(DispatchRecorderSupplier));
 com::sun::star::uno::Reference 
com::sun::star::beans::XPropertySet  xSet(
@@ -3063,13 +3055,6 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet rSet)
 case SID_STOP_RECORDING :
 {
 SvtMiscOptions aMiscOptions;
-const char* pName = 
GetObjectShell()-GetFactory().GetShortName();
-if ( !aMiscOptions.IsExperimentalMode() ||
- ( strcmp(pName,swriter)  strcmp(pName,scalc) ) )
-{
-rSet.DisableItem( nWhich );
-break;
-}
 
 ::rtl::OUString 
sProperty(RTL_CONSTASCII_USTRINGPARAM(DispatchRecorderSupplier));
 com::sun::star::uno::Reference 
com::sun::star::beans::XPropertySet  xSet(
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2011-12-03 Thread August Sodora
 sfx2/source/view/viewfrm.cxx |   15 +++
 1 file changed, 15 insertions(+)

New commits:
commit 2561e3f7860e79817658e536b91192cedaa4aab7
Author: August Sodora aug...@gmail.com
Date:   Sat Dec 3 19:53:47 2011 -0500

Revert fdo#41865: Make macro recording work without experimental features

This reverts commit f4b3bd91ca177101d90f522e81163dc6421e14c9.

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index a158f53..36b1e3e 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -3037,6 +3037,14 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet rSet)
 case SID_RECORDMACRO :
 {
 SvtMiscOptions aMiscOptions;
+const char* pName = 
GetObjectShell()-GetFactory().GetShortName();
+if ( !aMiscOptions.IsExperimentalMode() ||
+ ( strcmp(pName,swriter)  strcmp(pName,scalc) ) )
+{
+rSet.DisableItem( nWhich );
+rSet.Put(SfxVisibilityItem(nWhich, sal_False));
+break;
+}
 
 ::rtl::OUString 
sProperty(RTL_CONSTASCII_USTRINGPARAM(DispatchRecorderSupplier));
 com::sun::star::uno::Reference 
com::sun::star::beans::XPropertySet  xSet(
@@ -3055,6 +3063,13 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet rSet)
 case SID_STOP_RECORDING :
 {
 SvtMiscOptions aMiscOptions;
+const char* pName = 
GetObjectShell()-GetFactory().GetShortName();
+if ( !aMiscOptions.IsExperimentalMode() ||
+ ( strcmp(pName,swriter)  strcmp(pName,scalc) ) )
+{
+rSet.DisableItem( nWhich );
+break;
+}
 
 ::rtl::OUString 
sProperty(RTL_CONSTASCII_USTRINGPARAM(DispatchRecorderSupplier));
 com::sun::star::uno::Reference 
com::sun::star::beans::XPropertySet  xSet(
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2011-11-11 Thread Takeshi Abe
 sfx2/source/appl/sfxpicklist.cxx |4 
 sfx2/source/inc/sfxpicklist.hxx  |2 --
 2 files changed, 6 deletions(-)

New commits:
commit 48f67acf8f13e10c892847b77a16712cfa01d6af
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Sat Nov 12 07:28:44 2011 +0900

removed unused variable

diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 0be0c5d..c3332d9 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -70,10 +70,6 @@ using namespace ::com::sun::star::util;
 
 // 
 
-SfxPickList*SfxPickList::pUniqueInstance = 0;
-
-// 
-
 class StringLength : public ::cppu::WeakImplHelper1 XStringWidth 
 {
 public:
diff --git a/sfx2/source/inc/sfxpicklist.hxx b/sfx2/source/inc/sfxpicklist.hxx
index 7990905..80a7f87 100644
--- a/sfx2/source/inc/sfxpicklist.hxx
+++ b/sfx2/source/inc/sfxpicklist.hxx
@@ -52,8 +52,6 @@ class SfxPickList : public SfxListener
 String  aOptions;
 };
 
-static SfxPickList* pUniqueInstance;
-
 std::vector PickListEntry*m_aPicklistVector;
 sal_uInt32  m_nAllowedMenuSize;
 ::com::sun::star::uno::Reference ::com::sun::star::util::XStringWidth  
m_xStringLength;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2011-11-04 Thread Michael Meeks
 sfx2/source/appl/shutdownicon.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 9b699a2ce1e70f4752de9b9184765f46ffd274f8
Author: Michael Meeks michael.me...@suse.com
Date:   Fri Nov 4 12:34:19 2011 +

WaE: calm down windows shutdownicon warning

diff --git a/sfx2/source/appl/shutdownicon.cxx 
b/sfx2/source/appl/shutdownicon.cxx
index 82c1af7..81b814e 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -116,11 +116,14 @@ SFX_IMPL_ONEINSTANCEFACTORY( ShutdownIcon );
 bool ShutdownIcon::bModalMode = false;
 ShutdownIcon* ShutdownIcon::pShutdownIcon = NULL;
 
+#if !defined( ENABLE_QUICKSTART_APPLET ) || defined( UNX )
 // To remove conditionals
 extern C {
 static void disabled_initSystray() { }
 static void disabled_deInitSystray() { }
 }
+#endif
+
 #define DOSTRING( x )   #x
 #define STRING( x ) DOSTRING( x )
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2011-11-01 Thread Caolán McNamara
 sfx2/source/appl/appmisc.cxx |   26 --
 1 file changed, 26 deletions(-)

New commits:
commit 9df6f53a88fb5e6d6c9ea430eb1f6d426ea7f755
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Nov 1 12:31:11 2011 +

impl_loadBitmap is now dangling unused

diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index 119b8a5..6e76d44 100644
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -280,32 +280,6 @@ sal_Bool  SfxApplication::IsDowning() const { return 
pAppData_Impl-bDowning; }
 SfxDispatcher* SfxApplication::GetAppDispatcher_Impl() { return 
pAppData_Impl-pAppDispat; }
 SfxSlotPool SfxApplication::GetAppSlotPool_Impl() const { return 
*pAppData_Impl-pSlotPool; }
 
-static bool impl_loadBitmap(
-const rtl::OUString rPath, const rtl::OUString rBmpFileName,
-Image rLogo )
-{
-rtl::OUString uri( rPath );
-rtl::Bootstrap::expandMacros( uri );
-INetURLObject aObj( uri );
-aObj.insertName( rBmpFileName );
-SvFileStream aStrm( aObj.PathToFileName(), STREAM_STD_READ );
-if ( !aStrm.GetError() )
-{
-// Use graphic class to also support more graphic formats (bmp,png,...)
-Graphic aGraphic;
-
-GraphicFilter rGF = GraphicFilter::GetGraphicFilter();
-rGF.ImportGraphic( aGraphic, String(), aStrm, GRFILTER_FORMAT_DONTKNOW 
);
-
-// Default case, we load the intro bitmap from a seperate file
-// (e.g. staroffice_intro.bmp or starsuite_intro.bmp)
-BitmapEx aBmp = aGraphic.GetBitmapEx();
-rLogo = Image( aBmp );
-return true;
-}
-return false;
-}
-
 /** loads the application logo as used in the about dialog and impress 
slideshow pause screen */
 Image SfxApplication::GetApplicationLogo()
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits