summaryrefslogtreecommitdiff
path: root/reportdesign/source/ui/inspection/GeometryHandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'reportdesign/source/ui/inspection/GeometryHandler.cxx')
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx112
1 files changed, 56 insertions, 56 deletions
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index cc4a4d709941..7c0ffd7d16a3 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -84,9 +84,9 @@
#include <svl/itempool.hxx>
#include <svl/itemset.hxx>
-#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
-#define ITEMID_DASH_LIST SID_DASH_LIST
-#define ITEMID_LINEEND_LIST SID_LINEEND_LIST
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_DASH_LIST SID_DASH_LIST
+#define ITEMID_LINEEND_LIST SID_LINEEND_LIST
#include <svx/xdef.hxx>
#include <svx/xpool.hxx>
#include <svx/xtable.hxx>
@@ -103,9 +103,9 @@
#include <svx/xlineit0.hxx>
#include <svx/svxids.hrc>
-#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
-#define ITEMID_DASH_LIST SID_DASH_LIST
-#define ITEMID_LINEEND_LIST SID_LINEEND_LIST
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_DASH_LIST SID_DASH_LIST
+#define ITEMID_LINEEND_LIST SID_LINEEND_LIST
#include <svx/drawitem.hxx>
#define ITEMID_BRUSH SID_ATTR_BRUSH
#include <editeng/brshitem.hxx>
@@ -175,7 +175,7 @@ void lcl_collectFunctionNames(const uno::Reference< report::XSection>& _xSection
nPos = getPositionInIndexAccess(xGroups.get(),xGroup);
else if ( _xSection == xReportDefinition->getDetail() )
nPos = xGroups->getCount()-1;
-
+
for (sal_Int32 i = 0 ; i <= nPos ; ++i)
{
xGroup.set(xGroups->getByIndex(i),uno::UNO_QUERY_THROW);
@@ -248,7 +248,7 @@ GeometryHandler::GeometryHandler(uno::Reference< uno::XComponentContext > const
// -----------------------------------------------------------------------------
GeometryHandler::~GeometryHandler()
{
- DBG_DTOR(rpt_GeometryHandler,NULL);
+ DBG_DTOR(rpt_GeometryHandler,NULL);
}
//------------------------------------------------------------------------
::rtl::OUString SAL_CALL GeometryHandler::getImplementationName( ) throw(uno::RuntimeException)
@@ -299,7 +299,7 @@ void SAL_CALL GeometryHandler::disposing()
::comphelper::disposeComponent(m_xTypeConverter);
if ( m_xReportComponent.is() && m_xReportComponent->getPropertySetInfo()->hasPropertyByName(PROPERTY_DATAFIELD) )
m_xReportComponent->removePropertyChangeListener(PROPERTY_DATAFIELD,static_cast< beans::XPropertyChangeListener* >( this ));
-
+
m_xReportComponent.clear();
m_xRowSet.clear();
m_aPropertyListeners.clear();
@@ -397,7 +397,7 @@ uno::Any SAL_CALL GeometryHandler::getPropertyValue(const ::rtl::OUString & Prop
aPropertyValue = uno::Any();
break;
}
-
+
}
break;
case PROPERTY_ID_TYPE:
@@ -433,8 +433,8 @@ uno::Any SAL_CALL GeometryHandler::getPropertyValue(const ::rtl::OUString & Prop
aPropertyValue <<= m_sScope;
break;
}
-
- }
+
+ }
break;
case PROPERTY_ID_BACKCOLOR:
case PROPERTY_ID_CONTROLBACKGROUND:
@@ -493,7 +493,7 @@ void SAL_CALL GeometryHandler::setPropertyValue(const ::rtl::OUString & Property
else if ( m_aFunctionNames.find(sDataField) != m_aFunctionNames.end() )
m_nDataFieldType = USER_DEF_FUNCTION;
}
-
+
resetOwnProperties(aGuard,sOldFunctionName,sOldScope,nOldDataFieldType);
}
break;
@@ -591,10 +591,10 @@ void SAL_CALL GeometryHandler::setPropertyValue(const ::rtl::OUString & Property
}
}
}
-
+
break;
case PROPERTY_ID_SCOPE:
- if ( !(Value >>= m_sScope) )
+ if ( !(Value >>= m_sScope) )
m_sScope = ::rtl::OUString();
else
{
@@ -617,7 +617,7 @@ void SAL_CALL GeometryHandler::setPropertyValue(const ::rtl::OUString & Property
::rtl::OUString sDefaultFunctionName;
::rtl::OUString sDataField;
OSL_VERIFY( impl_isDefaultFunction_nothrow(m_xFunction,sDataField,sDefaultFunctionName) );
- m_sDefaultFunction = sDefaultFunctionName;
+ m_sDefaultFunction = sDefaultFunctionName;
createDefaultFunction(aGuard,m_sDefaultFunction,sDataField);
}
}
@@ -644,7 +644,7 @@ void SAL_CALL GeometryHandler::setPropertyValue(const ::rtl::OUString & Property
aAwtSize.Height = nNewValue;
else if ( nId == PROPERTY_ID_WIDTH )
aAwtSize.Width = nNewValue;
-
+
checkPosAndSize(aAwtPoint,aAwtSize);
}
}
@@ -689,7 +689,7 @@ void GeometryHandler::implCreateListLikeControl(
{
::std::vector< ::rtl::OUString > aList;
tools::StringListResource aRes(ModuleRes(_nResId),aList);
-
+
implCreateListLikeControl(_rxControlFactory,out_Descriptor,aList,_bReadOnlyControl,_bTrueIfListBoxFalseIfComboBox);
}
// -----------------------------------------------------------------------------
@@ -754,7 +754,7 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const
case PROPERTY_ID_TYPE:
implCreateListLikeControl(_xControlFactory,aOut,RID_STR_TYPE_CONST,sal_False,sal_True);
break;
- case PROPERTY_ID_VISIBLE:
+ case PROPERTY_ID_VISIBLE:
case PROPERTY_ID_CANGROW:
case PROPERTY_ID_CANSHRINK:
case PROPERTY_ID_REPEATSECTION:
@@ -844,7 +844,7 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const
aOut = m_xFormComponentHandler->describePropertyLine(PropertyName, _xControlFactory);
}
}
-
+
if ( nId != -1 )
{
aOut.Category = ((m_pInfoService->getPropertyUIFlags(nId ) & PROP_FLAG_DATA_PROPERTY) != 0) ?
@@ -854,7 +854,7 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const
aOut.HelpURL = HelpIdUrl::getHelpURL( m_pInfoService->getPropertyHelpId( nId ) );
aOut.DisplayName = m_pInfoService->getPropertyTranslation(nId);
}
-
+
if ( ( nId == PROPERTY_ID_POSITIONX )
|| ( nId == PROPERTY_ID_POSITIONY )
|| ( nId == PROPERTY_ID_WIDTH )
@@ -973,7 +973,7 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const ::rtl::OUString
aPropertyValue <<= static_cast<sal_Int32>(COL_TRANSPARENT);
break;
}
- // run through
+ // run through
case PROPERTY_ID_KEEPTOGETHER:
if ( uno::Reference< report::XGroup>(m_xReportComponent,uno::UNO_QUERY).is())
@@ -981,7 +981,7 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const ::rtl::OUString
aPropertyValue = getConstantValue(sal_False,RID_STR_KEEPTOGETHER_CONST,_rControlValue,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.KeepTogether")),PropertyName);
break;
}
- // run through
+ // run through
case PROPERTY_ID_VISIBLE:
case PROPERTY_ID_CANGROW:
@@ -998,17 +998,17 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const ::rtl::OUString
case PROPERTY_ID_CONTROLBACKGROUNDTRANSPARENT:
{
if ( aPropertyValue.hasValue() )
- {
+ {
const beans::Property aProp = getProperty(PropertyName);
if ( aPropertyValue.getValueType().equals( aProp.Type ) )
// nothing to do, type is already as desired
return aPropertyValue;
-
+
if ( _rControlValue.getValueType().getTypeClass() == uno::TypeClass_STRING )
{
::rtl::OUString sControlValue;
_rControlValue >>= sControlValue;
-
+
const uno::Reference< inspection::XStringRepresentation > xConversionHelper = inspection::StringRepresentation::create( m_xContext,m_xTypeConverter );
aPropertyValue = xConversionHelper->convertToPropertyValue( sControlValue, aProp.Type );
}
@@ -1024,7 +1024,7 @@ uno::Any SAL_CALL GeometryHandler::convertToPropertyValue(const ::rtl::OUString
}
}
}
-
+
break;
}
case PROPERTY_ID_CONDITIONALPRINTEXPRESSION:
@@ -1335,10 +1335,10 @@ uno::Sequence< beans::Property > SAL_CALL GeometryHandler::getSupportedPropertie
// {
// beans::Property aValue;
// aValue.Name = PROPERTY_AREA;
-// aNewProps.push_back(aValue);
+// aNewProps.push_back(aValue);
// }
// re-enable when the remaining issues of #i88727# are fixed
-
+
return uno::Sequence< beans::Property > (&(*aNewProps.begin()),aNewProps.size());
}
@@ -1383,7 +1383,7 @@ inspection::InteractiveSelectionResult SAL_CALL GeometryHandler::onInteractivePr
if ( !_rxInspectorUI.is() )
throw lang::NullPointerException();
if ( PropertyName.equalsAscii(PROPERTY_FILTER) )
- {
+ {
::osl::ClearableMutexGuard aGuard( m_aMutex );
inspection::InteractiveSelectionResult eResult = inspection::InteractiveSelectionResult_Cancelled;
@@ -1394,9 +1394,9 @@ inspection::InteractiveSelectionResult SAL_CALL GeometryHandler::onInteractivePr
eResult = inspection::InteractiveSelectionResult_ObtainedValue;
}
return eResult;
- }
+ }
else if ( PropertyName.equalsAscii(PROPERTY_FONT) )
- {
+ {
::osl::ClearableMutexGuard aGuard( m_aMutex );
inspection::InteractiveSelectionResult eResult = inspection::InteractiveSelectionResult_Cancelled;
@@ -1412,21 +1412,21 @@ inspection::InteractiveSelectionResult SAL_CALL GeometryHandler::onInteractivePr
}
return eResult;
}
- else if ( PropertyName.equalsAscii(PROPERTY_FORMULA)
- || PropertyName.equalsAscii(PROPERTY_INITIALFORMULA)
- || PropertyName.equalsAscii(PROPERTY_DATAFIELD)
+ else if ( PropertyName.equalsAscii(PROPERTY_FORMULA)
+ || PropertyName.equalsAscii(PROPERTY_INITIALFORMULA)
+ || PropertyName.equalsAscii(PROPERTY_DATAFIELD)
|| PropertyName.equalsAscii(PROPERTY_CONDITIONALPRINTEXPRESSION))
- {
+ {
::osl::ClearableMutexGuard aGuard( m_aMutex );
-
+
::rtl::OUString sFormula;
m_xReportComponent->getPropertyValue(PropertyName) >>= sFormula;
const uno::Reference< awt::XWindow> xInspectorWindow(m_xContext->getValueByName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DialogParentWindow"))) ,uno::UNO_QUERY);
uno::Reference< uno::XComponentContext > xContext = m_xContext;
uno::Reference< beans::XPropertySet > xRowSet( m_xRowSet,uno::UNO_QUERY);
aGuard.clear();
-
+
inspection::InteractiveSelectionResult eResult = inspection::InteractiveSelectionResult_Cancelled;
if ( rptui::openDialogFormula_nothrow( sFormula, xContext,xInspectorWindow,xRowSet ) )
{
@@ -1436,7 +1436,7 @@ inspection::InteractiveSelectionResult SAL_CALL GeometryHandler::onInteractivePr
return eResult;
}
else if ( PropertyName.equalsAscii(PROPERTY_AREA) )
- {
+ {
::osl::ClearableMutexGuard aGuard( m_aMutex );
inspection::InteractiveSelectionResult eResult = inspection::InteractiveSelectionResult_Cancelled;
@@ -1481,14 +1481,14 @@ void SAL_CALL GeometryHandler::actuatingPropertyChanged(const ::rtl::OUString &
_rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,sal_False);
_rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,sal_False);
OSL_ENSURE(m_sDefaultFunction.getLength() == 0,"Why is the m_sDefaultFunction set?");
- OSL_ENSURE(m_sScope.getLength() == 0,"Why is the m_sScope set?");
+ OSL_ENSURE(m_sScope.getLength() == 0,"Why is the m_sScope set?");
break;
case FUNCTION:
_rxInspectorUI->rebuildPropertyUI(PROPERTY_DATAFIELD);
_rxInspectorUI->rebuildPropertyUI(PROPERTY_FORMULALIST);
_rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_True);
- _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,m_sDefaultFunction.getLength() != 0);
- _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,m_sScope.getLength() != 0);
+ _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,m_sDefaultFunction.getLength() != 0);
+ _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,m_sScope.getLength() != 0);
break;
case USER_DEF_FUNCTION:
_rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_False);
@@ -1540,7 +1540,7 @@ void SAL_CALL GeometryHandler::actuatingPropertyChanged(const ::rtl::OUString &
default:
m_xFormComponentHandler->actuatingPropertyChanged(ActuatingPropertyName, NewValue, OldValue, _rxInspectorUI, _bFirstTimeInit);
break;
- }
+ }
}
::sal_Bool SAL_CALL GeometryHandler::suspend(::sal_Bool Suspend) throw (uno::RuntimeException)
@@ -1624,7 +1624,7 @@ void GeometryHandler::checkPosAndSize( const awt::Point& _aNewPos,
const uno::Reference< report::XSection> xSection(xSourceReportComponent->getParent(),uno::UNO_QUERY);
if ( !xSection.is() || uno::Reference< report::XShape>(xSourceReportComponent,uno::UNO_QUERY).is() ) // shapes can overlap.
return;
-
+
::Point aPos(VCLPoint(_aNewPos));
if ( aPos.X() < 0 || aPos.Y() < 0 ) // TODO: have to check size with pos aka || (aPos.X() + aAwtSize.Width) > m_xSection->getReportDefinition()->
throw beans::PropertyVetoException(String(ModuleRes(RID_STR_ILLEGAL_POSITION)),xSourceReportComponent);
@@ -1749,7 +1749,7 @@ uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(::r
const uno::Reference< report::XSection> xSection(xSourceReportComponent->getParent(),uno::UNO_QUERY_THROW);
const uno::Reference< report::XReportDefinition> xReportDefinition = xSection->getReportDefinition();
if ( !m_sScope.getLength() )
- {
+ {
const uno::Reference< report::XGroup> xGroup(xSection->getGroup(),uno::UNO_QUERY);
if ( xGroup.is() )
{
@@ -1769,7 +1769,7 @@ uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(::r
String sGroupName = String(ModuleRes(RID_STR_SCOPE_GROUP));
_rsNamePostFix = xGroup2->getExpression();
sGroupName.SearchAndReplaceAscii("%1",_rsNamePostFix);
- m_sScope = sGroupName;
+ m_sScope = sGroupName;
xReturn = xGroup2.get();
}
}
@@ -1788,7 +1788,7 @@ uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(::r
{
uno::Reference< report::XGroups> xGroups = xReportDefinition->getGroups();
const sal_Int32 nCount = xGroups->getCount();
-
+
for (sal_Int32 i = 0 ; i < nCount; ++i)
{
const uno::Reference< report::XGroup> xGroup(xGroups->getByIndex(i),uno::UNO_QUERY_THROW);
@@ -1801,7 +1801,7 @@ uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(::r
break;
}
}
-
+
}
OSL_ENSURE(xReturn.is(),"Why don't we have a functionssupplier here!");
@@ -1819,7 +1819,7 @@ sal_Bool GeometryHandler::isDefaultFunction( const ::rtl::OUString& _sQuotedFunc
const uno::Reference< report::XReportComponent> xSourceReportComponent(m_xReportComponent,uno::UNO_QUERY_THROW);
const uno::Reference< report::XSection> xSection(xSourceReportComponent->getParent(),uno::UNO_QUERY_THROW);
const uno::Reference< report::XReportDefinition> xReportDefinition = xSection->getReportDefinition();
-
+
::std::pair<TFunctions::const_iterator,TFunctions::const_iterator> aFind = m_aFunctionNames.equal_range(_sQuotedFunction);
while ( aFind.first != aFind.second )
{
@@ -1890,7 +1890,7 @@ sal_Bool GeometryHandler::impl_isDefaultFunction_nothrow( const uno::Reference<
break;
}
}
-
+
bDefaultFunction = aIter != aDeEnd;
}
catch(uno::Exception&)
@@ -2038,7 +2038,7 @@ void GeometryHandler::resetOwnProperties(::osl::ResettableMutexGuard& _aGuard,co
aFormulaEvent.PropertyName = PROPERTY_FORMULALIST;
aFormulaEvent.OldValue <<= _sOldFunctionName;
aFormulaEvent.NewValue <<= sNewFunction;
-
+
m_aPropertyListeners.notify( aFormulaEvent, &beans::XPropertyChangeListener::propertyChange );
}
if ( _sOldScope != sNewScope )
@@ -2049,7 +2049,7 @@ void GeometryHandler::resetOwnProperties(::osl::ResettableMutexGuard& _aGuard,co
aScopeEvent.NewValue <<= sNewScope;
m_aPropertyListeners.notify( aScopeEvent, &beans::XPropertyChangeListener::propertyChange );
}
-
+
_aGuard.reset();
}
//------------------------------------------------------------------------
@@ -2167,7 +2167,7 @@ void GeometryHandler::impl_setCounterFunction_throw()
::rtl::OUString sScope;
if ( !(sFunctionName.getLength() && m_aFunctionNames.find(sQuotedFunctionName) != m_aFunctionNames.end() && impl_isCounterFunction_throw(sQuotedFunctionName,sScope)) )
impl_createFunction(sFunctionName,::rtl::OUString(),m_aCounterFunction);
-
+
OBlocker aBlocker(m_bIn);
m_xReportComponent->setPropertyValue(PROPERTY_DATAFIELD,uno::makeAny(impl_convertToFormula( uno::makeAny(sQuotedFunctionName))));
}
@@ -2184,7 +2184,7 @@ sal_uInt32 GeometryHandler::impl_getDataFieldType_throw(const ::rtl::OUString& _
lcl_convertFormulaTo(aDataField,aDataField);
aDataField >>= sDataField;
}
-
+
if ( sDataField.getLength() )
{
if ( impl_isDataField(sDataField) )
@@ -2236,7 +2236,7 @@ void SAL_CALL GeometryHandler::propertyChange(const beans::PropertyChangeEvent&
default:
;
}
-
+
resetOwnProperties(aGuard,sOldFunctionName,sOldScope,nOldDataFieldType);
}
}