[Libreoffice-commits] core.git: 3 commits - cppcanvas/qa cui/source include/sfx2 reportdesign/source sc/source sfx2/source sw/source writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Sun Nov 9 09:08:36 PST 2014


 cppcanvas/qa/extras/emfplus/emfplus.cxx            |    2 +-
 cui/source/tabpages/bbdlg.cxx                      |    4 ++--
 include/sfx2/styledlg.hxx                          |    2 +-
 include/sfx2/tabdlg.hxx                            |    4 ++--
 reportdesign/source/ui/dlg/dlgpage.cxx             |    4 ++--
 reportdesign/source/ui/inc/dlgpage.hxx             |    2 +-
 reportdesign/source/ui/report/ReportController.cxx |    4 ++--
 sc/source/ui/inc/anyrefdg.hxx                      |    4 ++--
 sc/source/ui/inc/hfedtdlg.hxx                      |    2 +-
 sc/source/ui/pagedlg/hfedtdlg.cxx                  |    2 +-
 sc/source/ui/styleui/styledlg.cxx                  |    4 ++--
 sfx2/source/dialog/styledlg.cxx                    |    2 +-
 sfx2/source/dialog/tabdlg.cxx                      |    8 ++++----
 sw/source/ui/fmtui/tmpdlg.cxx                      |    2 +-
 sw/source/ui/frmdlg/frmdlg.cxx                     |    2 +-
 writerfilter/source/ooxml/factoryimpl.py           |    4 ++--
 writerfilter/source/ooxml/modelpreprocess.py       |    4 ++--
 17 files changed, 28 insertions(+), 28 deletions(-)

New commits:
commit 6d3507b02917c97b117e94c83b56cfe442d5f544
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sun Nov 9 14:41:08 2014 +0100

    SfxTabDialog ctors: take an OUString
    
    Change-Id: I91b9b2ffd19b2412ac01dd12429d6460b4c4812c

diff --git a/cui/source/tabpages/bbdlg.cxx b/cui/source/tabpages/bbdlg.cxx
index 2116a64..e3e89f4 100644
--- a/cui/source/tabpages/bbdlg.cxx
+++ b/cui/source/tabpages/bbdlg.cxx
@@ -30,8 +30,8 @@ SvxBorderBackgroundDlg::SvxBorderBackgroundDlg(vcl::Window *pParent,
     bool bEnableDrawingLayerFillStyles)
     : SfxTabDialog(pParent,
         bEnableDrawingLayerFillStyles
-            ? OString("BorderAreaTransparencyDialog")
-            : OString("BorderBackgroundDialog"),
+            ? OUString("BorderAreaTransparencyDialog")
+            : OUString("BorderBackgroundDialog"),
         bEnableDrawingLayerFillStyles
             ? OUString("cui/ui/borderareatransparencydialog.ui")
             : OUString("cui/ui/borderbackgrounddialog.ui"),
diff --git a/include/sfx2/styledlg.hxx b/include/sfx2/styledlg.hxx
index e428d9a..f3b0448 100644
--- a/include/sfx2/styledlg.hxx
+++ b/include/sfx2/styledlg.hxx
@@ -37,7 +37,7 @@ protected:
     virtual const SfxItemSet*   GetRefreshedSet() SAL_OVERRIDE;
 
 public:
-    SfxStyleDialog(vcl::Window* pParent, const OString& rID,
+    SfxStyleDialog(vcl::Window* pParent, const OUString& rID,
         const OUString& rUIXMLDescription, SfxStyleSheetBase&);
 
     virtual ~SfxStyleDialog();
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index c4f0e98..f91e011 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -124,10 +124,10 @@ protected:
 
 public:
     SfxTabDialog(vcl::Window* pParent,
-                 const OString& rID, const OUString& rUIXMLDescription,
+                 const OUString& rID, const OUString& rUIXMLDescription,
                  const SfxItemSet * = 0, bool bEditFmt = false);
     SfxTabDialog(SfxViewFrame *pViewFrame, vcl::Window* pParent,
-                 const OString& rID, const OUString& rUIXMLDescription,
+                 const OUString& rID, const OUString& rUIXMLDescription,
                  const SfxItemSet * = 0, bool bEditFmt = false);
     virtual ~SfxTabDialog();
 
diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx
index 821648d..1036109 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -37,9 +37,9 @@ namespace rptui
 |*
 \************************************************************************/
 
-ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const OString &rDialog)
+ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const OUString &rDialog)
     : SfxTabDialog (pParent, rDialog, OUString("modules/dbreport/ui/") +
-        OStringToOUString(rDialog, RTL_TEXTENCODING_UTF8).toAsciiLowerCase() +
+        rDialog.toAsciiLowerCase() +
         OUString(".ui"), pAttr)
     , rOutAttrs(*pAttr)
 {
diff --git a/reportdesign/source/ui/inc/dlgpage.hxx b/reportdesign/source/ui/inc/dlgpage.hxx
index ff39900..a613cbb 100644
--- a/reportdesign/source/ui/inc/dlgpage.hxx
+++ b/reportdesign/source/ui/inc/dlgpage.hxx
@@ -37,7 +37,7 @@ private:
     void operator =(const ORptPageDialog&);
 public:
 
-    ORptPageDialog(vcl::Window* pParent, const SfxItemSet* pAttr, const OString &rDialog);
+    ORptPageDialog(vcl::Window* pParent, const SfxItemSet* pAttr, const OUString &rDialog);
 };
 
 } // namespace rptui
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 2fa10d6..82962b3 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2498,8 +2498,8 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
 
         {   // want the dialog to be destroyed before our set
             ORptPageDialog aDlg(getView(), pDescriptor.get(),_xSection.is()
-                ? OString("BackgroundDialog")
-                : OString("PageDialog"));
+                ? OUString("BackgroundDialog")
+                : OUString("PageDialog"));
             if (RET_OK == aDlg.Execute())
             {
 
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 6fcff6b..32157a6 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -203,7 +203,7 @@ private:
     ScRefHdlrImplBase( TParentWindow* pParent, TResId nResId, const TArg &rArg, SfxBindings *pB = NULL );
 
     template<class TParentWindow, class TArg>
-    ScRefHdlrImplBase( TParentWindow* pParent, const OString& rID, const OUString& rUIXMLDescription, const TArg &rArg, SfxBindings *pB = NULL );
+    ScRefHdlrImplBase( TParentWindow* pParent, const OUString& rID, const OUString& rUIXMLDescription, const TArg &rArg, SfxBindings *pB = NULL );
 
     virtual ~ScRefHdlrImplBase();
 
@@ -238,7 +238,7 @@ ScRefHdlrImplBase<TWindow,bBindRef>::ScRefHdlrImplBase( TParentWindow* pParent,
 
 template<class TWindow, bool bBindRef >
 template<class TParentWindow, class TArg>
-ScRefHdlrImplBase<TWindow,bBindRef>::ScRefHdlrImplBase( TParentWindow* pParent, const OString& rID, const OUString& rUIXMLDescription, const TArg &rArg, SfxBindings *pB )
+ScRefHdlrImplBase<TWindow,bBindRef>::ScRefHdlrImplBase( TParentWindow* pParent, const OUString& rID, const OUString& rUIXMLDescription, const TArg &rArg, SfxBindings *pB )
     : TWindow( pParent, rID, rUIXMLDescription, rArg ),
     ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef )
 {
diff --git a/sc/source/ui/inc/hfedtdlg.hxx b/sc/source/ui/inc/hfedtdlg.hxx
index dfc6882..64887a9 100644
--- a/sc/source/ui/inc/hfedtdlg.hxx
+++ b/sc/source/ui/inc/hfedtdlg.hxx
@@ -31,7 +31,7 @@ class ScHFEditDlg : public SfxTabDialog
 protected:
     ScHFEditDlg(SfxViewFrame* pFrame, vcl::Window* pParent,
         const SfxItemSet& rCoreSet, const OUString& rPageStyle,
-        const OString& rID, const OUString& rUIXMLDescription );
+        const OUString& rID, const OUString& rUIXMLDescription );
 public:
     virtual void PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) SAL_OVERRIDE;
 };
diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx b/sc/source/ui/pagedlg/hfedtdlg.cxx
index 745aa4e..b2383f2 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.cxx
+++ b/sc/source/ui/pagedlg/hfedtdlg.cxx
@@ -45,7 +45,7 @@ ScHFEditDlg::ScHFEditDlg( SfxViewFrame*     pFrameP,
                           vcl::Window*           pParent,
                           const SfxItemSet& rCoreSet,
                           const OUString&   rPageStyle,
-                          const OString& rID, const OUString& rUIXMLDescription )
+                          const OUString& rID, const OUString& rUIXMLDescription )
     :   SfxTabDialog( pFrameP, pParent, rID, rUIXMLDescription, &rCoreSet )
 {
     eNumType = static_cast<const SvxPageItem&>(rCoreSet.Get(ATTR_PAGE)).GetNumType();
diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx
index c834d84..1c1dc17 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -45,8 +45,8 @@ ScStyleDlg::ScStyleDlg( vcl::Window*             pParent,
 
     : SfxStyleDialog  ( pParent,
                         nRscId == RID_SCDLG_STYLES_PAR ?
-                          OString("ParaTemplateDialog") :
-                          OString("PageTemplateDialog"),
+                          OUString("ParaTemplateDialog") :
+                          OUString("PageTemplateDialog"),
                         nRscId == RID_SCDLG_STYLES_PAR ?
                           OUString("modules/scalc/ui/paratemplatedialog.ui") :
                           OUString("modules/scalc/ui/pagetemplatedialog.ui"),
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 1854b41..2b08f1f 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -33,7 +33,7 @@
 SfxStyleDialog::SfxStyleDialog
 (
     vcl::Window* pParent,           // Parent
-    const OString& rID, const OUString& rUIXMLDescription,
+    const OUString& rID, const OUString& rUIXMLDescription,
     SfxStyleSheetBase& rStyle  // stylesheet to be processed
 )
 
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 3433867..d73ffaa 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -311,12 +311,12 @@ SfxTabDialog::SfxTabDialog
 (
     SfxViewFrame* pViewFrame,     // Frame, to which the Dialog belongs
     vcl::Window* pParent,              // Parent Window
-    const OString& rID, const OUString& rUIXMLDescription, //Dialog Name, Dialog .ui path
+    const OUString& rID, const OUString& rUIXMLDescription, //Dialog Name, Dialog .ui path
     const SfxItemSet* pItemSet,   // Itemset with the data;
                                   // can be NULL, when Pages are onDemand
     bool bEditFmt                 // when yes -> additional Button for standard
 )
-    : TabDialog(pParent, rID, rUIXMLDescription)
+    : TabDialog(pParent, OUStringToOString(rID, RTL_TEXTENCODING_UTF8), rUIXMLDescription)
     , pFrame(pViewFrame)
     , pSet(pItemSet)
     , pOutSet(0)
@@ -340,12 +340,12 @@ SfxTabDialog::SfxTabDialog
 
 (
     vcl::Window* pParent,              // Parent Window
-    const OString& rID, const OUString& rUIXMLDescription, //Dialog Name, Dialog .ui path
+    const OUString& rID, const OUString& rUIXMLDescription, //Dialog Name, Dialog .ui path
     const SfxItemSet* pItemSet,   // Itemset with the data;
                                   // can be NULL, when Pages are onDemand
     bool bEditFmt                 // when yes -> additional Button for standard
 )
-    : TabDialog(pParent, rID, rUIXMLDescription)
+    : TabDialog(pParent, OUStringToOString(rID, RTL_TEXTENCODING_UTF8), rUIXMLDescription)
     , pFrame(0)
     , pSet(pItemSet)
     , pOutSet(0)
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index c6255cd..998e0d1 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -74,7 +74,7 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
                              SwWrtShell* pActShell,
                              bool bNew)
     : SfxStyleDialog(pParent,
-                    OString("TemplateDialog") + OString::number(nRegion),
+                    OUString("TemplateDialog") + OUString::number(nRegion),
                     OUString("modules/swriter/ui/templatedialog") +
                         OUString::number(nRegion) + ".ui",
                     rBase)
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 4a4bdf7..ca6f722 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -53,7 +53,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame*       pViewFrame,
                     const OString&      sDefPage,
                     const OUString*     pStr)
 
-    : SfxTabDialog(pViewFrame, pParent, OUStringToOString(sResType, RTL_TEXTENCODING_UTF8),
+    : SfxTabDialog(pViewFrame, pParent, sResType,
         OUString("modules/swriter/ui/") +
         sResType.toAsciiLowerCase() +
         (".ui"), &rCoreSet, pStr != 0)
commit 949b6ef2e976926cdc946ff1b0550e3f6d8fec3b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sun Nov 9 13:49:11 2014 +0100

    cppcanvas: CPPCANVAS_DEBUG_EMFPLUS_DUMP_TO is expected to be UTF-8
    
    Change-Id: I95101bed2e2d0f87027f2d80e5e7e23f59b3e159

diff --git a/cppcanvas/qa/extras/emfplus/emfplus.cxx b/cppcanvas/qa/extras/emfplus/emfplus.cxx
index 70ee827..ac4a6f2 100644
--- a/cppcanvas/qa/extras/emfplus/emfplus.cxx
+++ b/cppcanvas/qa/extras/emfplus/emfplus.cxx
@@ -60,7 +60,7 @@ public:
         char* pEnv = getenv("CPPCANVAS_DEBUG_EMFPLUS_DUMP_TO");
         if (pEnv)
         {
-            SvFileStream aStream(OStringToOUString(pEnv, RTL_TEXTENCODING_UTF8), STREAM_WRITE);
+            SvFileStream aStream(OUString::fromUtf8(pEnv), STREAM_WRITE);
             vcl::PNGWriter aWriter(aResultBitmap);
             CPPUNIT_ASSERT(aWriter.Write(aStream));
         }
commit 8836de49e533ec67c2242161f68f656a719d6d1e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sun Nov 9 13:36:33 2014 +0100

    test for membership should be 'not in'
    
    Change-Id: I493bad18ed3f728bcf42049377d7f4c6039264c8

diff --git a/writerfilter/source/ooxml/factoryimpl.py b/writerfilter/source/ooxml/factoryimpl.py
index db47039..4834c89 100644
--- a/writerfilter/source/ooxml/factoryimpl.py
+++ b/writerfilter/source/ooxml/factoryimpl.py
@@ -127,7 +127,7 @@ std::string fastTokenToId(sal_uInt32 nToken)
 
     aliases = []
     for alias in sorted(ooxUrlAliases.values()):
-        if not alias in aliases:
+        if alias not in aliases:
             aliases.append(alias)
             print("""    case oox::NMSP_%s:
         sResult += "%s:";
@@ -139,7 +139,7 @@ std::string fastTokenToId(sal_uInt32 nToken)
 
     tokens = [""]
     for token in [t.getAttribute("localname") for t in getElementsByTagNamesNS(model, "http://relaxng.org/ns/structure/1.0", ["element", "attribute"])]:
-        if not token in tokens:
+        if token not in tokens:
             tokens.append(token)
             print("""    case oox::XML_%s:
         sResult += "%s";
diff --git a/writerfilter/source/ooxml/modelpreprocess.py b/writerfilter/source/ooxml/modelpreprocess.py
index 8d2c3a1..f814960 100644
--- a/writerfilter/source/ooxml/modelpreprocess.py
+++ b/writerfilter/source/ooxml/modelpreprocess.py
@@ -37,10 +37,10 @@ def parseNamespaces(fro):
 def check(model):
     defines = [i.getAttribute("name") for i in model.getElementsByTagName("define")]
     for reference in [i.getAttribute("name") for i in model.getElementsByTagName("ref")]:
-        if not reference in defines:
+        if reference not in defines:
             raise Exception("Unknown define element with name '%s'" % reference)
     for start in [i.getAttribute("name") for i in model.getElementsByTagName("start")]:
-        if not start in defines:
+        if start not in defines:
             raise Exception("Unknown start element with name '%s'" % start)
 
 


More information about the Libreoffice-commits mailing list