[Libreoffice-commits] .: 2 commits - filter/source svtools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 26 06:52:54 PDT 2012


 filter/source/xsltdialog/xmlfiltercommon.hxx         |    3 -
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx |   44 +++++++++----------
 svtools/source/filter/wmf/enhwmf.cxx                 |    8 +--
 3 files changed, 28 insertions(+), 27 deletions(-)

New commits:
commit 2536fae7b8565b5dd9f09bb3dc015576fafe4031
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 26 14:51:16 2012 +0100

    Resolves: fdo#47291 polypoly[line|gon] points are signed
    
    regression from f6a34255af1339cd7132b7527dc0c10c10d38249
    
    Change-Id: Iabfaf92629cd4d53ab7af5f3e3013eb81bb8104d

diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx
index 72ea16d..688780b 100644
--- a/svtools/source/filter/wmf/enhwmf.cxx
+++ b/svtools/source/filter/wmf/enhwmf.cxx
@@ -517,11 +517,11 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
             break;
 
             case EMR_POLYPOLYLINE :
-                ReadAndDrawPolyLine<sal_uInt32>();
+                ReadAndDrawPolyLine<sal_Int32>();
             break;
 
             case EMR_POLYPOLYGON :
-                ReadAndDrawPolyPolygon<sal_uInt32>();
+                ReadAndDrawPolyPolygon<sal_Int32>();
             break;
 
             case EMR_SETWINDOWEXTEX :
@@ -1205,11 +1205,11 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
             break;
 
             case EMR_POLYPOLYLINE16 :
-                ReadAndDrawPolyLine<sal_uInt16>();
+                ReadAndDrawPolyLine<sal_Int16>();
                 break;
 
             case EMR_POLYPOLYGON16 :
-                ReadAndDrawPolyPolygon<sal_uInt16>();
+                ReadAndDrawPolyPolygon<sal_Int16>();
             break;
 
             case EMR_FILLRGN :
commit dbd0e001d83e3198c3ad4ec202a00577b608b3a4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 26 13:15:00 2012 +0100

    XubString->OUString
    
    Change-Id: Ie54528ccf641b380eda1d1bb12b39d0536c4d17b

diff --git a/filter/source/xsltdialog/xmlfiltercommon.hxx b/filter/source/xsltdialog/xmlfiltercommon.hxx
index f00cbcf..40d0bf7 100644
--- a/filter/source/xsltdialog/xmlfiltercommon.hxx
+++ b/filter/source/xsltdialog/xmlfiltercommon.hxx
@@ -97,7 +97,8 @@ extern const application_info_impl* getApplicationInfo( const rtl::OUString& rSe
 
 extern ResMgr* getXSLTDialogResMgr();
 
-#define RESID(x) ResId(x, *getXSLTDialogResMgr() )
+#define RESID(x) ResId(x, *getXSLTDialogResMgr())
+#define RESIDSTR(x) RESID(x).toString()
 
 #endif
 
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 5337a2a..e066786 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -81,8 +81,8 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog( Window* pParent, ResMgr& rResM
     mpFilterListBox->SetSelectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) );
     mpFilterListBox->SetDeselectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) );
     mpFilterListBox->SetDoubleClickHdl( LINK( this, XMLFilterSettingsDialog, DoubleClickHdl_Impl ) );
-    mpFilterListBox->SetAccessibleName(String( RESID( STR_XML_FILTER_LISTBOX )));
-    maCtrlFilterList.SetAccessibleName(String( RESID( STR_XML_FILTER_LISTBOX )));
+    mpFilterListBox->SetAccessibleName(RESIDSTR(STR_XML_FILTER_LISTBOX));
+    maCtrlFilterList.SetAccessibleName(RESIDSTR(STR_XML_FILTER_LISTBOX));
     mpFilterListBox->SetHelpId( HID_XML_FILTER_LIST );
 
     maPBNew.SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
@@ -234,14 +234,14 @@ void XMLFilterSettingsDialog::onNew()
     filter_info_impl aTempInfo;
 
     // create a unique filter name
-    aTempInfo.maFilterName = createUniqueFilterName( String( RESID( STR_DEFAULT_FILTER_NAME ) ) );
+    aTempInfo.maFilterName = createUniqueFilterName(RESIDSTR(STR_DEFAULT_FILTER_NAME));
 
     // init default extension
-    String aDefaultExtension( RESID( STR_DEFAULT_EXTENSION ) );
+    String aDefaultExtension(RESIDSTR(STR_DEFAULT_EXTENSION));
     aTempInfo.maExtension = aDefaultExtension;
 
     // set default ui name
-    aTempInfo.maInterfaceName = createUniqueInterfaceName( String( RESID( STR_DEFAULT_UI_NAME ) ) );
+    aTempInfo.maInterfaceName = createUniqueInterfaceName(RESIDSTR(STR_DEFAULT_UI_NAME));
 
     // set default application
     aTempInfo.maDocumentService = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ));
@@ -811,7 +811,7 @@ void XMLFilterSettingsDialog::onDelete()
         filter_info_impl* pInfo = (filter_info_impl*)pEntry->GetUserData();
 
         String aPlaceHolder( RTL_CONSTASCII_USTRINGPARAM("%s") );
-        String aMessage(RESID(STR_WARN_DELETE));
+        String aMessage(RESIDSTR(STR_WARN_DELETE));
         aMessage.SearchAndReplace( aPlaceHolder, pInfo->maFilterName );
 
         WarningBox aWarnBox(this, (WinBits)(WB_YES_NO | WB_DEF_YES),    aMessage );
@@ -916,7 +916,7 @@ void XMLFilterSettingsDialog::onSave()
         0 );
 
     String aExtensions( RTL_CONSTASCII_USTRINGPARAM("*.jar") );
-    String aFilterName( RESID( STR_FILTER_PACKAGE ) );
+    String aFilterName(RESIDSTR(STR_FILTER_PACKAGE));
     aFilterName += String( RTL_CONSTASCII_USTRINGPARAM(" (") );
     aFilterName += aExtensions;
     aFilterName += sal_Unicode(')');
@@ -935,13 +935,13 @@ void XMLFilterSettingsDialog::onSave()
         String aMsg;
         if( nFilters > 0 )
         {
-            aMsg = String( RESID( STR_FILTERS_HAVE_BEEN_SAVED ) );
+            aMsg = RESIDSTR(STR_FILTERS_HAVE_BEEN_SAVED);
             aMsg.SearchAndReplace( sPlaceholder, String::CreateFromInt32(nFilters) );
             aMsg.SearchAndReplace( sPlaceholder, aURL.GetName() );
         }
         else
         {
-            aMsg = String( RESID( STR_FILTER_HAS_BEEN_SAVED ) );
+            aMsg = RESIDSTR(STR_FILTER_HAS_BEEN_SAVED);
             aMsg.SearchAndReplace( sPlaceholder, (*aFilters.begin())->maFilterName );
             aMsg.SearchAndReplace( sPlaceholder, aURL.GetName() );
         }
@@ -962,7 +962,7 @@ void XMLFilterSettingsDialog::onOpen()
         com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
 
     String aExtensions( RTL_CONSTASCII_USTRINGPARAM("*.jar") );
-    String aFilterName( RESID( STR_FILTER_PACKAGE ) );
+    String aFilterName(RESIDSTR(STR_FILTER_PACKAGE));
     aFilterName += String( RTL_CONSTASCII_USTRINGPARAM(" (") );
     aFilterName += aExtensions;
     aFilterName += sal_Unicode(')');
@@ -999,18 +999,18 @@ void XMLFilterSettingsDialog::onOpen()
         if( nFilters == 0 )
         {
             INetURLObject aURLObj( aURL );
-            aMsg = String( RESID( STR_NO_FILTERS_FOUND ) );
+            aMsg = RESIDSTR(STR_NO_FILTERS_FOUND);
             aMsg.SearchAndReplace( sPlaceholder, aURLObj.GetName() );
         }
         else if( nFilters == 1 )
         {
-            aMsg = String( RESID( STR_FILTER_INSTALLED ) );
+            aMsg = RESIDSTR(STR_FILTER_INSTALLED);
             aMsg.SearchAndReplace( sPlaceholder, aFilterName );
 
         }
         else
         {
-            aMsg = String( RESID( STR_FILTERS_INSTALLED ) );
+            aMsg = RESIDSTR(STR_FILTERS_INSTALLED);
             aMsg.SearchAndReplace( sPlaceholder, String::CreateFromInt32(nFilters) );
         }
 
@@ -1359,7 +1359,7 @@ OUString getApplicationUIName( const OUString& rServiceName )
     }
     else
     {
-        OUString aRet = String( RESID( STR_UNKNOWN_APPLICATION ) );
+        OUString aRet = RESIDSTR(STR_UNKNOWN_APPLICATION);
         if( !rServiceName.isEmpty() )
         {
             aRet += OUString( RTL_CONSTASCII_USTRINGPARAM( " (" ));
@@ -1403,8 +1403,8 @@ XMLFilterListBox::XMLFilterListBox( SvxPathControl_Impl * pParent )
     mpHeaderBar->SetPosSizePixel( Point( 0, 0 ), Size( aBoxSize.Width(), 16 ) );
     mpHeaderBar->SetEndDragHdl( LINK( this, XMLFilterListBox, HeaderEndDrag_Impl ) );
 
-    String aStr1( RESID( STR_COLUMN_HEADER_NAME ) );
-    String aStr2( RESID( STR_COLUMN_HEADER_TYPE ) );
+    OUString aStr1(RESIDSTR(STR_COLUMN_HEADER_NAME));
+    OUString aStr2(RESIDSTR(STR_COLUMN_HEADER_TYPE));
 
     long nTabSize = aBoxSize.Width() / 2;
 
@@ -1504,7 +1504,7 @@ IMPL_LINK( XMLFilterListBox, HeaderEndDrag_Impl, HeaderBar*, pBar )
 /** adds a new filter info entry to the ui filter list */
 void XMLFilterListBox::addFilterEntry( const filter_info_impl* pInfo )
 {
-    const XubString aEntryStr( getEntryString( pInfo ) );
+    const OUString aEntryStr( getEntryString( pInfo ) );
     InsertEntryToColumn( aEntryStr, LIST_APPEND, 0xffff, (void*)pInfo );
 }
 
@@ -1519,7 +1519,7 @@ void XMLFilterListBox::changeEntry( const filter_info_impl* pInfo )
         SvTreeListEntry* pEntry = GetEntry( nPos );
         if( (filter_info_impl*)pEntry->GetUserData() == pInfo )
         {
-            XubString aEntryText( getEntryString( pInfo ) );
+            OUString aEntryText( getEntryString( pInfo ) );
             SetEntryText( aEntryText, pEntry );
             break;
         }
@@ -1545,20 +1545,20 @@ String XMLFilterListBox::getEntryString( const filter_info_impl* pInfo ) const
     {
         if( pInfo->maFlags & 2 )
         {
-            aEntryStr += String( RESID( STR_IMPORT_EXPORT ) );
+            aEntryStr += RESIDSTR(STR_IMPORT_EXPORT);
         }
         else
         {
-            aEntryStr += String( RESID( STR_IMPORT_ONLY ) );
+            aEntryStr += RESIDSTR(STR_IMPORT_ONLY);
         }
     }
     else if( pInfo->maFlags & 2 )
     {
-        aEntryStr += String( RESID( STR_EXPORT_ONLY ) );
+        aEntryStr += RESIDSTR(STR_EXPORT_ONLY);
     }
     else
     {
-        aEntryStr += String( RESID( STR_UNDEFINED_FILTER ) );
+        aEntryStr += RESIDSTR(STR_UNDEFINED_FILTER);
     }
 
     return aEntryStr;


More information about the Libreoffice-commits mailing list