[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 
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_cast(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 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 
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 svtools/inc svtools/source svx/source

2012-04-03 Thread Andras Timar
 sfx2/source/doc/docmacromode.cxx   |4 
 svtools/inc/svtools/sfxecode.hxx   |1 +
 svtools/inc/svtools/svtools.hrc|2 ++
 svtools/source/java/javaerror.src  |   14 ++
 svtools/source/java/javainteractionhandler.cxx |8 
 svx/source/src/errtxt.src  |4 
 6 files changed, 33 insertions(+)

New commits:
commit 9bc097419568e61018b95148ad2a8181665051f9
Author: Andras Timar 
Date:   Tue Apr 3 16:22:01 2012 +0200

fdo#44698 settings are under a different menu in Mac OS X

diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 763411a..70cd495 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -126,7 +126,11 @@ namespace sfx2
 //
 void lcl_showDocumentMacrosDisabledError( const Reference< 
XInteractionHandler >& rxHandler, sal_Bool& rbAlreadyShown )
 {
+#ifdef MACOSX
+lcl_showGeneralSfxErrorOnce( rxHandler, 
ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC, rbAlreadyShown );
+#else
 lcl_showGeneralSfxErrorOnce( rxHandler, 
ERRCODE_SFX_DOCUMENT_MACRO_DISABLED, rbAlreadyShown );
+#endif
 }
 
 //
diff --git a/svtools/inc/svtools/sfxecode.hxx b/svtools/inc/svtools/sfxecode.hxx
index 1ac67e9..c00572c 100644
--- a/svtools/inc/svtools/sfxecode.hxx
+++ b/svtools/inc/svtools/sfxecode.hxx
@@ -84,6 +84,7 @@
 #define ERRCODE_SFX_BROKENSIGNATURE (ERRCODE_WARNING_MASK | 
ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 53)
 #define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE (ERRCODE_WARNING_MASK | 
ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 54)
 #define ERRCODE_SFX_INCOMPLETE_ENCRYPTION(ERRCODE_WARNING_MASK | 
ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 55)
+#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC (ERRCODE_WARNING_MASK | 
ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 56)
 
 
 
diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc
index 466b978..64c988b 100644
--- a/svtools/inc/svtools/svtools.hrc
+++ b/svtools/inc/svtools/svtools.hrc
@@ -333,6 +333,8 @@
 #define WARNINGBOX_JAVANOTFOUND (RID_SVTOOLS_START+22)
 #define WARNINGBOX_INVALIDJAVASETTINGS  (RID_SVTOOLS_START+23)
 #define ERRORBOX_RESTARTREQUIRED(RID_SVTOOLS_START+24)
+#define WARNINGBOX_INVALIDJAVASETTINGS_MAC  (RID_SVTOOLS_START+25)
+#define ERRORBOX_JVMCREATIONFAILED_MAC  (RID_SVTOOLS_START+26)
 
 //.
 // images
diff --git a/svtools/source/java/javaerror.src 
b/svtools/source/java/javaerror.src
index f7c9763..9e12eb7 100644
--- a/svtools/source/java/javaerror.src
+++ b/svtools/source/java/javaerror.src
@@ -34,6 +34,13 @@ WarningBox WARNINGBOX_JAVANOTFOUND
 Message[ en-US ] ="%PRODUCTNAME requires a Java runtime environment (JRE) 
to perform this task. Please install a JRE and restart %PRODUCTNAME.";
 };
 
+WarningBox WARNINGBOX_INVALIDJAVASETTINGS_MAC
+{
+Buttons = WB_OK ;
+DefButton = WB_DEF_OK ;
+Message[ en-US ] ="The %PRODUCTNAME configuration has been changed. Under 
%PRODUCTNAME - Preferences - %PRODUCTNAME - Java, select the Java runtime 
environment you want to have used by %PRODUCTNAME.";
+};
+
 WarningBox WARNINGBOX_INVALIDJAVASETTINGS
 {
 Buttons = WB_OK ;
@@ -48,6 +55,13 @@ QueryBox QBX_JAVADISABLED
 Message[ en-US ] = "%PRODUCTNAME requires a Java runtime environment (JRE) 
to perform this task. However, use of a JRE has been disabled. Do you want to 
enable the use of a JRE now?";
 };
 
+ErrorBox ERRORBOX_JVMCREATIONFAILED_MAC
+{
+Buttons = WB_OK;
+DefButton = WB_DEF_OK ;
+Message[ en-US ] = "%PRODUCTNAME requires a Java runtime environment (JRE) 
to perform this task. The selected JRE is defective. Please select another 
version or install a new JRE and select it under %PRODUCTNAME - Preferences - 
%PRODUCTNAME - Java.";
+};
+
 ErrorBox ERRORBOX_JVMCREATIONFAILED
 {
 Buttons = WB_OK;
diff --git a/svtools/source/java/javainteractionhandler.cxx 
b/svtools/source/java/javainteractionhandler.cxx
index 61192de..92308ba 100644
--- a/svtools/source/java/javainteractionhandler.cxx
+++ b/svtools/source/java/javainteractionhandler.cxx
@@ -151,7 +151,11 @@ void SAL_CALL JavaInteractionHandler::handle( const 
Reference< XInteractionReque
// javavendors.xml was updated and Java has not been configured yet
 SolarMutexGuard aSolarGuard;
 m_bInvalidSettings_Handled = true;
+#ifdef MACOSX
+WarningBox aWarningBox( NULL, SvtResId( 
WARNINGBOX_INVALIDJAVASETTINGS_MAC ) );
+#else
 WarningBox aWarningBox( NULL, SvtResId( 
WARNINGBOX_INVALIDJAVASETTINGS ) );
+#endif
 String aTitle( SvtResId(STR_WARNING_INVALIDJAVASETTINGS));
 aWarningBox.SetText( aTitle );
  

[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 
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 
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 
 #include 
 #include 
+#ifdef UNX
+#include 
+#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::vector&   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-03-09 Thread Andras Timar
 sfx2/source/dialog/alienwarn.cxx |   41 +++
 1 file changed, 12 insertions(+), 29 deletions(-)

New commits:
commit cc32ce47cef1a72a820a9475a9a2753490a019f2
Author: Andras Timar 
Date:   Fri Mar 9 22:34:08 2012 +0100

fix semantic error in layout calculation

diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index 8ed0b71..1dfecd0 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -96,49 +96,32 @@ SfxAlienWarningDialog::~SfxAlienWarningDialog()
 
 void SfxAlienWarningDialog::InitSize()
 {
-// if the button text is too wide, then broaden the button
-long nTxtW = m_aMoreInfoBtn.GetCtrlTextWidth( m_aMoreInfoBtn.GetText() );
-long nCtrlW = m_aMoreInfoBtn.GetSizePixel().Width();
-if ( nTxtW >= nCtrlW )
-{
-long nDelta = nTxtW - nCtrlW;
-nDelta += IMPL_EXTRA_BUTTON_WIDTH;
-Point aNextPoint = m_aKeepCurrentBtn.GetPosPixel();
-aNextPoint.X() += m_aKeepCurrentBtn.GetSizePixel().Width();
-Point aNewPoint = m_aMoreInfoBtn.GetPosPixel();
-aNewPoint.X() -= nDelta;
-if ( aNextPoint.X() >= aNewPoint.X() )
-{
-long nSpace = aNextPoint.X() - aNewPoint.X();
-nSpace += 2;
-nDelta -= nSpace;
-aNewPoint.X() += nSpace;
-}
-Size aNewSize = m_aMoreInfoBtn.GetSizePixel();
-aNewSize.Width() += nDelta;
-m_aMoreInfoBtn.SetPosSizePixel( aNewPoint, aNewSize );
-}
+const long nExtraButtonWidth = LogicToPixel( 
Size(IMPL_EXTRA_BUTTON_WIDTH,1), MapMode(MAP_APPFONT) ).getWidth();
+const long nAwCol2 = LogicToPixel( Size(AW_COL_2,1), MapMode(MAP_APPFONT) 
).getWidth();
+long nTxtW, nCtrlW;
 
-// recalculate the size and position of the buttons
+// layout calculations should be re-done, when More Info button is enabled
 m_aMoreInfoBtn.Hide();
+
+// recalculate the size and position of the buttons
 nTxtW = m_aKeepCurrentBtn.GetCtrlTextWidth( m_aKeepCurrentBtn.GetText() );
-nTxtW += IMPL_EXTRA_BUTTON_WIDTH;
+nTxtW += nExtraButtonWidth;
 Size aNewSize = m_aKeepCurrentBtn.GetSizePixel();
 aNewSize.Width() = nTxtW;
 m_aKeepCurrentBtn.SetSizePixel( aNewSize );
 Point aPos = m_aSaveODFBtn.GetPosPixel();
-aPos.X() = AW_COL_3 + nTxtW;
+aPos.X() = nAwCol2 + nTxtW + nExtraButtonWidth;
 m_aSaveODFBtn.SetPosPixel( aPos );
 nTxtW = m_aSaveODFBtn.GetCtrlTextWidth( m_aSaveODFBtn.GetText() );
-nTxtW += IMPL_EXTRA_BUTTON_WIDTH;
+nTxtW += nExtraButtonWidth;
 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;
+long nBtnsWidthSize = m_aKeepCurrentBtn.GetSizePixel().Width() + 
m_aSaveODFBtn.GetSizePixel().Width() + nAwCol2 + 2*nExtraButtonWidth;
 
 // resize + text of checkbox too wide -> add new line
 aNewSize = m_aWarningOnBox.GetSizePixel();
-aNewSize.Width() = nBtnsWidthSize - 4*IMPL_EXTRA_BUTTON_WIDTH;
+aNewSize.Width() = nBtnsWidthSize - 2*nExtraButtonWidth;
 m_aWarningOnBox.SetSizePixel( aNewSize );
 nTxtW = m_aWarningOnBox.GetCtrlTextWidth( m_aWarningOnBox.GetText() );
 nCtrlW = m_aWarningOnBox.GetSizePixel().Width();
@@ -154,7 +137,7 @@ void SfxAlienWarningDialog::InitSize()
 
 // 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;
+aNewSize.Width() = nBtnsWidthSize - 2*nExtraButtonWidth;
 m_aInfoText.SetSizePixel( aNewSize );
 Size aMinSize = m_aInfoText.CalcMinimumSize( 
m_aInfoText.GetSizePixel().Width() );
 long nTxtH = aMinSize.Height();
___
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 
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-18 Thread Michael Meeks
 sfx2/source/menu/mnuitem.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit b655b1fedf1399b50050938181199986646abb37
Author: Michael Meeks 
Date:   Sat Feb 18 08:00:43 2012 +

apparently this is required on Linux - re-enable it.

diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 8b05360..4f6e1b4 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -246,13 +246,11 @@ SfxMenuControl* SfxMenuControl::CreateImpl( sal_uInt16 
/*nId*/, Menu& /*rMenu*/,
 return new SfxMenuControl( sal_True );
 }
 
-#ifndef LINUX
 void SfxMenuControl::RegisterControl( sal_uInt16 nSlotId, SfxModule *pMod )
 {
 RegisterMenuControl( pMod, new SfxMenuCtrlFactory(
 SfxMenuControl::CreateImpl, TYPE(SfxStringItem), nSlotId ) );
 }
-#endif
 
 //
 void SfxMenuControl::RegisterMenuControl(SfxModule* pMod, SfxMenuCtrlFactory* 
pFact)
___
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 
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 documen

[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 
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 
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
http://lists.freedesktop.org/mailman/listinfo/libreoffi

[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 
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 
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 
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 
 
 #include 
 #include "mnucfga.hxx"
@@ -35,7 +37,7 @@ class SfxBindings;
 class Timer;
 class SfxMenuImageControl_Impl;
 
-typedef std::vector SfxMenuCtrlArr_Impl;
+typedef ::boost::ptr_vector 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-21 Thread Andras Timar
 sfx2/source/appl/app.src |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1c27584919cb0d55a8bc09e3a1fc4c74fa6aa21a
Author: Andras Timar 
Date:   Sat Jan 21 18:32:49 2012 +0100

Bump copyright year

diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index f52b6da..53515a9 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -533,14 +533,14 @@ ModalDialog DLG_HELP_LICENSING
 String STR_LICENSING_INFORMATION_4
 {
 Text [ en-US ] =
-"Copyright © 2000, 2010 LibreOffice contributors and/or their 
affiliates. All rights\n"
+"Copyright © 2000, 2012 LibreOffice contributors and/or their 
affiliates. All rights\n"
 "reserved." ;
 };
 String STR_LICENSING_INFORMATION_5
 {
 Text [ en-US ] =
 "This product was created by %OOOVENDOR, based on 
OpenOffice.org,\n"
-"which is Copyright 2000, 2010 Oracle and/or its affiliates.\n"
+"which is Copyright 2000, 2011 Oracle and/or its affiliates.\n"
 "%OOOVENDOR acknowledges all community members, please see\n"
 "http://www.libreoffice.org/ for more details." ;
 };
___
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 
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::deque::const_reverse_iterator i = 
pImp->aToDoStack.rbegin(); i != pImp->aToDoStack.rend(); ++i)
+for(std::deque::reverse_iterator i = 
pImp->aToDoStack.rbegin(); i != pImp->aToDoStack.rend(); ++i)
 {
 if(i->bPush)
 aStack.Push(static_cast(i->pCluster));
___
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 
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=( sa

[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 
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

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 
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 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 
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 
 #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 insertions(+)

New commits:
commit 2561e3f7860e79817658e536b91192cedaa4aab7
Author: August Sodora 
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-12-03 Thread August Sodora
 sfx2/source/view/viewfrm.cxx |   15 ---
 1 file changed, 15 deletions(-)

New commits:
commit f4b3bd91ca177101d90f522e81163dc6421e14c9
Author: August Sodora 
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 Norbert Thiebaud
 sfx2/source/dialog/filedlghelper.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit eca5888eaaf3aa254b0e888ba328656e1d699a4d
Author: Norbert Thiebaud 
Date:   Sat Dec 3 10:42:17 2011 -0600

WaE : missing return value on one code path

diff --git a/sfx2/source/dialog/filedlghelper.cxx 
b/sfx2/source/dialog/filedlghelper.cxx
index 96cb966..141b389 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -856,7 +856,7 @@ static bool lcl_isSystemFilePicker( const uno::Reference< 
XFilePicker >& _rxFP )
 return false;
 }
 
-enum open_or_save_t {OPEN, SAVE};
+enum open_or_save_t {OPEN, SAVE, UNDEFINED};
 static open_or_save_t lcl_OpenOrSave(sal_Int16 const nDialogType)
 {
 switch (nDialogType)
@@ -877,6 +877,7 @@ static open_or_save_t lcl_OpenOrSave(sal_Int16 const 
nDialogType)
 default:
 assert(false); // invalid dialog type
 }
+return UNDEFINED;
 }
 
 // 
___
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 
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 
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-04 Thread Stephan Bergmann
 sfx2/source/appl/appdde.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 249df7bf9af38fd992019a413665901558beaffb
Author: Stephan Bergmann 
Date:   Fri Nov 4 09:08:24 2011 +0100

Removed spurious junk left over in previous commit.

diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 08cfba2..a58ab58 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -274,7 +274,7 @@ sal_Bool SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
 aData.remove( aData.getLength() - 1, 1 );
 for ( sal_Int32 n = 0; n < aData.getLength(); )
 {
-switch ( aData[n] == '"' )
+switch ( aData[n] )
 {
 case '"':
 aData.remove( n, 1 );
___
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 
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


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

2011-10-17 Thread Lubos Lunak
 sfx2/source/doc/sfxbasemodel.cxx |   22 +++---
 ucb/source/ucp/cmis/cmis_content.cxx |8 ++--
 2 files changed, 5 insertions(+), 25 deletions(-)

New commits:
commit 4901bdf4c4971e9b8235ab9bfbd0ee1088d51b45
Author: Luboš Luňák 
Date:   Mon Oct 17 17:07:36 2011 +0200

Revert "CMIS: use another name to show than the one extracted from the base 
URL"

The commit makes LO unusable, it fails during startup, smoketest fails as 
well.
This reverts commit cd1a12dc552e9d34c7481c83b07a6f6af0e8762b.

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index c335aea..777929d 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -55,7 +55,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -66,7 +65,6 @@
 #include 
 #include 
 #include 
-#include 
 #include   // can be removed when this is a "real" 
service
 
 #include 
@@ -3771,23 +3769,9 @@ css::uno::Reference< css::frame::XUntitledNumbers > 
SfxBaseModel::impl_getUntitl
 SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium();
 if ( pMedium )
 {
-::ucbhelper::Content aContent( pMedium->GetName(), 
com::sun::star::uno::Reference < ucb::XCommandEnvironment >() );
-com::sun::star::uno::Reference < beans::XPropertySetInfo > xProps 
= aContent.getProperties();
-if ( xProps.is() )
-{
-::rtl::OUString aServerTitle( 
RTL_CONSTASCII_USTRINGPARAM("TitleOnServer") );
-if ( xProps->hasPropertyByName( aServerTitle ) )
-{
-uno::Any aAny = aContent.getPropertyValue( aServerTitle );
-aAny >>= aResult;
-}
-}
-else
-{
-SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairedDocItem, 
SfxBoolItem, SID_REPAIRPACKAGE, sal_False );
-if ( pRepairedDocItem && pRepairedDocItem->GetValue() )
-aResult += String( SfxResId(STR_REPAIREDDOCUMENT) );
-}
+SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairedDocItem, 
SfxBoolItem, SID_REPAIRPACKAGE, sal_False );
+if ( pRepairedDocItem && pRepairedDocItem->GetValue() )
+aResult += String( SfxResId(STR_REPAIREDDOCUMENT) );
 }
 
 if ( m_pData->m_pObjectShell->IsReadOnlyUI() || (pMedium && 
pMedium->IsReadOnly()) )
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index f765f19..d72041e 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -126,9 +126,6 @@ namespace cmis
 for( sal_Int32 n = 0; n < nProps; ++n )
 {
 const beans::Property& rProp = pProps[ n ];
-#if OSL_DEBUG_LEVEL > 1
-fprintf( stderr, "Property: %s\n", rtl::OUStringToOString( 
rProp.Name, RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
 
 if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"IsDocument" ) ) )
 {
@@ -144,9 +141,8 @@ namespace cmis
 else
 xRow->appendVoid( rProp );
 }
-else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"TitleOnServer" ) ) )
+else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"Title" ) ) )
 {
-// TODO Set the path instead of the name
 xRow->appendString( rProp, rtl::OUString::createFromAscii( 
m_pObject->getName().c_str() ) );
 }
 else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"IsReadOnly" ) ) )
@@ -358,7 +354,7 @@ namespace cmis
 beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"IsFolder" ) ),
 -1, getCppuBooleanType(),
 beans::PropertyAttribute::BOUND | 
beans::PropertyAttribute::READONLY ),
-beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"TitleOnServer" ) ),
+beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"Title" ) ),
 -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
 beans::PropertyAttribute::BOUND ),
 beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"IsReadOnly" ) ),
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2011-09-28 Thread Tor Lillqvist
 sfx2/source/appl/shutdowniconaqua.mm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fd100f9cb3f62aa3c8778fdc72bf7d02926f0517
Author: Tor Lillqvist 
Date:   Wed Sep 28 23:59:35 2011 +0300

This was what I meant, sorry for thinko

diff --git a/sfx2/source/appl/shutdowniconaqua.mm 
b/sfx2/source/appl/shutdowniconaqua.mm
index d20d998..eb0500e 100755
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -390,7 +390,7 @@ static void appendRecentMenu( NSMenu* i_pMenu, NSMenu* 
i_pDockMenu, const String
 
 // See above
 // [pRecentMenu setDelegate: pRecentDelegate];
-objc_msgSend(pRecentDelegate, @selector(setDelegate:), 
pRecentDelegate);
+objc_msgSend(pRecentMenu, @selector(setDelegate:), pRecentDelegate);
 
 [pRecentMenu setAutoenablesItems: NO];
 [pItem setSubmenu: pRecentMenu];
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2011-09-16 Thread Kohei Yoshida
 sfx2/source/bastyp/mieclip.cxx |   35 +++
 1 file changed, 27 insertions(+), 8 deletions(-)

New commits:
commit 568e1b979451e29483d06dabebef7ac17b416841
Author: Kohei Yoshida 
Date:   Fri Sep 16 17:27:16 2011 -0400

When pasting from other apps, fall back on Fragment span.

We need to handle fragment span in case the HTML span is not provided
by the source application.  According to the MS spec it is allowed.

The old code assumed that the source app would always provide an
HTML span.  Apparently some apps don't, and only provides a fragment
span.

diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
index badd200..8d0c354 100644
--- a/sfx2/source/bastyp/mieclip.cxx
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -44,12 +44,12 @@ MSE40HTMLClipFormatObj::~MSE40HTMLClipFormatObj()
 
 SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
 {
-sal_Bool bRet = sal_False;
+bool bRet = false;
 if( pStrm )
 delete pStrm, pStrm = 0;
 
 rtl::OString sLine, sVersion;
-sal_uIntPtr nStt = 0, nEnd = 0;
+sal_Int32 nStt = -1, nEnd = -1, nFragStart = -1, nFragEnd = -1;
 sal_Int32 nIndex = 0;
 
 rStream.Seek(STREAM_SEEK_TO_BEGIN);
@@ -64,16 +64,20 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& 
rStream )
 nIndex = 0;
 rtl::OString sTmp(sLine.getToken(0, ':', nIndex));
 if (sTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("StartHTML")))
-nStt = (sal_uIntPtr)(sLine.copy(nIndex).toInt32());
+nStt = sLine.copy(nIndex).toInt32();
 else if (sTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("EndHTML")))
-nEnd = (sal_uIntPtr)(sLine.copy(nIndex).toInt32());
+nEnd = sLine.copy(nIndex).toInt32();
+else if (sTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("StartFragment")))
+nFragStart = sLine.copy(nIndex).toInt32();
+else if (sTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("EndFragment")))
+nFragEnd = sLine.copy(nIndex).toInt32();
 else if (sTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("SourceURL")))
 sBaseURL = S2U(sLine.copy(nIndex));
 
-if( nEnd && nStt &&
-( sBaseURL.Len() || rStream.Tell() >= nStt ))
+if (nEnd >= 0 && nStt >= 0 &&
+(sBaseURL.Len() || rStream.Tell() >= 
static_cast(nStt)))
 {
-bRet = sal_True;
+bRet = true;
 break;
 }
 }
@@ -89,9 +93,24 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream 
)
 *pStrm << rStream;
 pStrm->SetStreamSize( nEnd - nStt + 1L );
 pStrm->Seek( STREAM_SEEK_TO_BEGIN );
+return pStrm;
 }
 
-return pStrm;
+if (nFragStart > 0 && nFragEnd > 0 && nFragEnd > nFragStart)
+{
+sal_uIntPtr nSize = static_cast(nFragEnd - nFragStart + 
1);
+if (nSize < 0x1L)
+{
+rStream.Seek(nFragStart);
+pStrm = new SvCacheStream(nSize);
+*pStrm << rStream;
+pStrm->SetStreamSize(nSize);
+pStrm->Seek(STREAM_SEEK_TO_BEGIN);
+return pStrm;
+}
+}
+
+return NULL;
 }
 
 /* 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 vcl/source

2011-09-16 Thread Julien Nabet
 sfx2/source/appl/workwin.cxx |2 +-
 vcl/source/gdi/sallayout.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3f15bfa050f79fd18ecb46d859c7dd79b79c230b
Author: Julien Nabet 
Date:   Fri Sep 16 23:59:27 2011 +0200

Fix 2 bitwiseOnBoolean detected by cppcheck

diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index f0eb712..bdd2c41 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1070,7 +1070,7 @@ void SfxWorkWindow::ShowChilds_Impl()
 // the child window even in situations where no child window is
 // visible.
 sal_uInt16 nFlags = pCW->aInfo.nFlags;
-bVisible = !bInvisible || ( bInvisible & (( nFlags & 
SFX_CHILDWIN_NEVERHIDE ) != 0 ));
+bVisible = !bInvisible || (( nFlags & SFX_CHILDWIN_NEVERHIDE ) 
!= 0 );
 }
 
 if ( CHILD_VISIBLE == (pCli->nVisible & CHILD_VISIBLE) && bVisible 
)
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index b2f724f..c9f969a 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -740,7 +740,7 @@ bool SalLayout::GetOutline( SalGraphics& rSalGraphics,
 }
 }
 
-return (bAllOk & bOneOk);
+return (bAllOk && bOneOk);
 }
 
 // ---
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits