summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2010-02-12 16:56:44 +0100
committerJens-Heiner Rechtien <hr@openoffice.org>2010-02-12 16:56:44 +0100
commit532d335fd539263d2427caca29341cd07591c2e8 (patch)
tree070a4baec3e065f8d6cce220c89e8f05835e1430 /reportdesign
parent1708f6091bfc05164fe2bd770664ceb26826a6b8 (diff)
changefileheader2: #i10000#: convert files with CR/LF characters to CR only
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/filter/xml/xmlHelper.cxx22
-rw-r--r--reportdesign/source/filter/xml/xmlImage.cxx24
-rw-r--r--reportdesign/source/ui/dlg/Condition.cxx28
-rw-r--r--reportdesign/source/ui/inc/UITools.hxx18
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx100
5 files changed, 96 insertions, 96 deletions
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index eab39ef1a802..0409ca67a067 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -401,17 +401,17 @@ SvXMLTokenMap* OXMLHelper::GetSubDocumentElemTokenMap()
return new SvXMLTokenMap( aElemTokenMap );
}
// -----------------------------------------------------------------------------
-const SvXMLEnumMapEntry* OXMLHelper::GetImageScaleOptions()
-{
- static SvXMLEnumMapEntry s_aXML_EnumMap[] =
- {
- // { XML_NONE, awt::ImageScaleMode::None }, // default
- { XML_ISOTROPIC, awt::ImageScaleMode::Isotropic },
- { XML_ANISOTROPIC, awt::ImageScaleMode::Anisotropic },
- { XML_TOKEN_INVALID, 0 }
- };
- return s_aXML_EnumMap;
-}
+const SvXMLEnumMapEntry* OXMLHelper::GetImageScaleOptions()
+{
+ static SvXMLEnumMapEntry s_aXML_EnumMap[] =
+ {
+ // { XML_NONE, awt::ImageScaleMode::None }, // default
+ { XML_ISOTROPIC, awt::ImageScaleMode::Isotropic },
+ { XML_ANISOTROPIC, awt::ImageScaleMode::Anisotropic },
+ { XML_TOKEN_INVALID, 0 }
+ };
+ return s_aXML_EnumMap;
+}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
} // rptxml
diff --git a/reportdesign/source/filter/xml/xmlImage.cxx b/reportdesign/source/filter/xml/xmlImage.cxx
index 0d26ec78517d..1f489bc947fd 100644
--- a/reportdesign/source/filter/xml/xmlImage.cxx
+++ b/reportdesign/source/filter/xml/xmlImage.cxx
@@ -89,18 +89,18 @@ OXMLImage::OXMLImage( ORptFilter& rImport,
_xComponent->setPreserveIRI(s_sTRUE == sValue);
break;
case XML_TOK_SCALE:
- {
- sal_uInt16 nRet = awt::ImageScaleMode::None;
- if ( s_sTRUE == sValue )
- {
- nRet = awt::ImageScaleMode::Anisotropic;
- }
- else
- {
- const SvXMLEnumMapEntry* aXML_EnumMap = OXMLHelper::GetImageScaleOptions();
- SvXMLUnitConverter::convertEnum( nRet, sValue, aXML_EnumMap );
- }
- _xComponent->setScaleMode( nRet );
+ {
+ sal_uInt16 nRet = awt::ImageScaleMode::None;
+ if ( s_sTRUE == sValue )
+ {
+ nRet = awt::ImageScaleMode::Anisotropic;
+ }
+ else
+ {
+ const SvXMLEnumMapEntry* aXML_EnumMap = OXMLHelper::GetImageScaleOptions();
+ SvXMLUnitConverter::convertEnum( nRet, sValue, aXML_EnumMap );
+ }
+ _xComponent->setScaleMode( nRet );
}
break;
case XML_TOK_DATA_FORMULA:
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index 5a338141a2a9..e3591ae03534 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -72,7 +72,7 @@ ConditionField::ConditionField( Condition* _pParent, const ResId& _rResId ) : Ed
m_pSubEdit = new Edit(this,0);
SetSubEdit(m_pSubEdit);
m_pSubEdit->EnableRTL( FALSE );
- m_pSubEdit->SetPosPixel( Point() );
+ m_pSubEdit->SetPosPixel( Point() );
m_aFormula.SetText(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("...")));
m_aFormula.SetClickHdl( LINK( this, ConditionField, OnFormula ) );
@@ -99,19 +99,19 @@ void ConditionField::Resize()
// -----------------------------------------------------------------------------
IMPL_LINK( ConditionField, OnFormula, Button*, /*_pClickedButton*/ )
{
- ::rtl::OUString sFormula(m_pSubEdit->GetText());
- const sal_Int32 nLen = sFormula.getLength();
- if ( nLen )
- {
- ReportFormula aFormula( sFormula );
- sFormula = aFormula.getCompleteFormula();
- } // if ( nLen )
- uno::Reference< awt::XWindow> xInspectorWindow = VCLUnoHelper::GetInterface(this);
- uno::Reference< beans::XPropertySet> xProp(m_pParent->getController().getRowSet(),uno::UNO_QUERY);
- if ( rptui::openDialogFormula_nothrow( sFormula, m_pParent->getController().getContext(),xInspectorWindow,xProp ) )
- {
- ReportFormula aFormula( sFormula );
- m_pSubEdit->SetText(aFormula.getUndecoratedContent());
+ ::rtl::OUString sFormula(m_pSubEdit->GetText());
+ const sal_Int32 nLen = sFormula.getLength();
+ if ( nLen )
+ {
+ ReportFormula aFormula( sFormula );
+ sFormula = aFormula.getCompleteFormula();
+ } // if ( nLen )
+ uno::Reference< awt::XWindow> xInspectorWindow = VCLUnoHelper::GetInterface(this);
+ uno::Reference< beans::XPropertySet> xProp(m_pParent->getController().getRowSet(),uno::UNO_QUERY);
+ if ( rptui::openDialogFormula_nothrow( sFormula, m_pParent->getController().getContext(),xInspectorWindow,xProp ) )
+ {
+ ReportFormula aFormula( sFormula );
+ m_pSubEdit->SetText(aFormula.getUndecoratedContent());
}
return 0L;
}
diff --git a/reportdesign/source/ui/inc/UITools.hxx b/reportdesign/source/ui/inc/UITools.hxx
index 585f35fa495f..d7aa74c240e8 100644
--- a/reportdesign/source/ui/inc/UITools.hxx
+++ b/reportdesign/source/ui/inc/UITools.hxx
@@ -102,17 +102,17 @@ namespace rptui
);
/** opens the formula dialog
- @param _out_rFormula
- the formula chosen by the user
- @precond
- we're really inspecting a database report (well, a RowSet at least)
- @return
+ @param _out_rFormula
+ the formula chosen by the user
+ @precond
+ we're really inspecting a database report (well, a RowSet at least)
+ @return
<TRUE/> if and only if the user successfully chose a clause
*/
- bool openDialogFormula_nothrow( ::rtl::OUString& _in_out_rFormula
- , const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xContext
- , const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow>& _xWindow
- , const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& _xRowSet
+ bool openDialogFormula_nothrow( ::rtl::OUString& _in_out_rFormula
+ , const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xContext
+ , const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow>& _xWindow
+ , const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& _xRowSet
);
/** applies the character settings previously obtained via openCharDialog
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index eecc03b6de7a..ee2cab9b0a93 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -90,8 +90,8 @@
#include <comphelper/propmultiplex.hxx>
#include <comphelper/namedvaluecollection.hxx>
-#include <connectivity/dbexception.hxx>
-#include <connectivity/dbconversion.hxx>
+#include <connectivity/dbexception.hxx>
+#include <connectivity/dbconversion.hxx>
#include <connectivity/dbtools.hxx>
#include <com/sun/star/report/XGroups.hpp>
@@ -1027,56 +1027,56 @@ void setZoomFactor(const Fraction& _aZoom,Window& _rWindow)
_rWindow.SetMapMode(aMapMode);
}
// -----------------------------------------------------------------------------
-bool openDialogFormula_nothrow( ::rtl::OUString& _in_out_rFormula
- , const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xContext
- , const uno::Reference< awt::XWindow>& _xInspectorWindow
- , const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& _xRowSet
- )
-{
+bool openDialogFormula_nothrow( ::rtl::OUString& _in_out_rFormula
+ , const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xContext
+ , const uno::Reference< awt::XWindow>& _xInspectorWindow
+ , const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& _xRowSet
+ )
+{
OSL_PRECOND( _xInspectorWindow.is(), "openDialogFormula_nothrow: invalid parameters!" );
if ( !_xInspectorWindow.is() )
- return false;
- // _out_rFormula = ::rtl::OUString();
- bool bSuccess = false;
- ::dbtools::SQLExceptionInfo aErrorInfo;
- uno::Reference< awt::XWindow > xInspectorWindow;
- uno::Reference< lang::XMultiComponentFactory > xFactory;
- uno::Reference<lang::XMultiServiceFactory> xServiceFactory;
- try
- {
- xFactory = _xContext->getServiceManager();
- xServiceFactory.set(xFactory,uno::UNO_QUERY);
- Window* pParent = VCLUnoHelper::GetWindow( _xInspectorWindow );
-
- uno::Reference< report::meta::XFunctionManager> xMgr(xFactory->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.pentaho.SOFunctionManager")),_xContext),uno::UNO_QUERY);
- if ( xMgr.is() )
- {
- ::boost::shared_ptr< formula::IFunctionManager > pFormulaManager(new FunctionManager(xMgr) );
- ReportFormula aFormula( _in_out_rFormula );
- FormulaDialog aDlg(pParent,xServiceFactory,pFormulaManager,aFormula.getUndecoratedContent(),_xRowSet);
- bSuccess = aDlg.Execute() == RET_OK;
- if ( bSuccess )
- {
- String sFormula = aDlg.getCurrentFormula();
- xub_StrLen nIndex = 0;
- if ( sFormula.GetChar(0) == '=' )
- nIndex = 1;
- _in_out_rFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:")) + sFormula.Copy(nIndex);
- }
- }
- }
- catch (sdb::SQLContext& e) { aErrorInfo = e; }
- catch (sdbc::SQLWarning& e) { aErrorInfo = e; }
- catch (sdbc::SQLException& e) { aErrorInfo = e; }
- catch( const uno::Exception& )
- {
- OSL_ENSURE( sal_False, "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
- }
-
- if ( aErrorInfo.isValid() )
- ::dbtools::showError( aErrorInfo, xInspectorWindow, xServiceFactory );
-
- return bSuccess;
+ return false;
+ // _out_rFormula = ::rtl::OUString();
+ bool bSuccess = false;
+ ::dbtools::SQLExceptionInfo aErrorInfo;
+ uno::Reference< awt::XWindow > xInspectorWindow;
+ uno::Reference< lang::XMultiComponentFactory > xFactory;
+ uno::Reference<lang::XMultiServiceFactory> xServiceFactory;
+ try
+ {
+ xFactory = _xContext->getServiceManager();
+ xServiceFactory.set(xFactory,uno::UNO_QUERY);
+ Window* pParent = VCLUnoHelper::GetWindow( _xInspectorWindow );
+
+ uno::Reference< report::meta::XFunctionManager> xMgr(xFactory->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.pentaho.SOFunctionManager")),_xContext),uno::UNO_QUERY);
+ if ( xMgr.is() )
+ {
+ ::boost::shared_ptr< formula::IFunctionManager > pFormulaManager(new FunctionManager(xMgr) );
+ ReportFormula aFormula( _in_out_rFormula );
+ FormulaDialog aDlg(pParent,xServiceFactory,pFormulaManager,aFormula.getUndecoratedContent(),_xRowSet);
+ bSuccess = aDlg.Execute() == RET_OK;
+ if ( bSuccess )
+ {
+ String sFormula = aDlg.getCurrentFormula();
+ xub_StrLen nIndex = 0;
+ if ( sFormula.GetChar(0) == '=' )
+ nIndex = 1;
+ _in_out_rFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:")) + sFormula.Copy(nIndex);
+ }
+ }
+ }
+ catch (sdb::SQLContext& e) { aErrorInfo = e; }
+ catch (sdbc::SQLWarning& e) { aErrorInfo = e; }
+ catch (sdbc::SQLException& e) { aErrorInfo = e; }
+ catch( const uno::Exception& )
+ {
+ OSL_ENSURE( sal_False, "GeometryHandler::impl_dialogFilter_nothrow: caught an exception!" );
+ }
+
+ if ( aErrorInfo.isValid() )
+ ::dbtools::showError( aErrorInfo, xInspectorWindow, xServiceFactory );
+
+ return bSuccess;
}
// -----------------------------------------------------------------------------
} // namespace rptui